Index: glibc/libio/stdio.h
===================================================================
--- glibc.orig/libio/stdio.h
+++ glibc/libio/stdio.h
@@ -74,7 +74,7 @@ typedef struct _IO_FILE __FILE;
 #include <libio.h>
 
 #if defined __USE_XOPEN || defined __USE_XOPEN2K8
-# ifdef __GNUC__
+# if defined __GNUC__ && __GNUC__ >= 3
 #  ifndef _VA_LIST_DEFINED
 typedef _G_va_list va_list;
 #   define _VA_LIST_DEFINED
Index: glibc/include/limits.h
===================================================================
--- glibc.orig/include/limits.h
+++ glibc/include/limits.h
@@ -131,7 +131,11 @@
 #  define LLONG_MIN	(-LLONG_MAX-1)
 # endif
 # ifndef LLONG_MAX
-#  define LLONG_MAX	__LONG_LONG_MAX__
+#  ifdef __LONG_LONG_MAX__
+#   define LLONG_MAX	__LONG_LONG_MAX__
+#  else
+#   define LLONG_MAX	9223372036854775807LL
+#  endif
 # endif
 # ifndef ULLONG_MAX
 #  define ULLONG_MAX	(LLONG_MAX * 2ULL + 1)
Index: glibc/math/math.h
===================================================================
--- glibc.orig/math/math.h
+++ glibc/math/math.h
@@ -111,9 +111,14 @@ extern long double __REDIRECT_NTH (nextt
 #   endif
 
 #   undef __MATHDECL_1
-#   define __MATHDECL_2(type, function,suffix, args, alias) \
+#   ifdef __REDIRECT_NTH
+#    define __MATHDECL_2(type, function,suffix, args, alias) \
   extern type __REDIRECT_NTH(__MATH_PRECNAME(function,suffix), \
 			     args, alias)
+#   else
+#    define __MATHDECL_2(type, function,suffix, args, alias) \
+		struct __empty__declaration__
+#   endif
 #   define __MATHDECL_1(type, function,suffix, args) \
   __MATHDECL_2(type, function,suffix, args, __CONCAT(function,suffix))
 #  endif
Index: glibc/misc/sys/cdefs.h
===================================================================
--- glibc.orig/misc/sys/cdefs.h
+++ glibc/misc/sys/cdefs.h
@@ -419,6 +419,7 @@
 # define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW
 # define __LDBL_REDIR_NTH(name, proto) name proto __THROW
 # define __LDBL_REDIR_DECL(name)
+# define __LDBL_REDIR1_DECL(name, alias)
 # ifdef __REDIRECT
 #  define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias)
 #  define __REDIRECT_NTH_LDBL(name, proto, alias) \
Index: glibc/wcsmbs/bits/wchar-ldbl.h
===================================================================
--- glibc.orig/wcsmbs/bits/wchar-ldbl.h
+++ glibc/wcsmbs/bits/wchar-ldbl.h
@@ -22,12 +22,12 @@
 
 #if defined __USE_ISOC95 || defined __USE_UNIX98
 __BEGIN_NAMESPACE_C99
-__LDBL_REDIR_DECL (fwprintf);
-__LDBL_REDIR_DECL (wprintf);
-__LDBL_REDIR_DECL (swprintf);
-__LDBL_REDIR_DECL (vfwprintf);
-__LDBL_REDIR_DECL (vwprintf);
-__LDBL_REDIR_DECL (vswprintf);
+__LDBL_REDIR_DECL (fwprintf)
+__LDBL_REDIR_DECL (wprintf)
+__LDBL_REDIR_DECL (swprintf)
+__LDBL_REDIR_DECL (vfwprintf)
+__LDBL_REDIR_DECL (vwprintf)
+__LDBL_REDIR_DECL (vswprintf)
 # if defined __USE_ISOC99 && !defined __USE_GNU \
      && !defined __REDIRECT \
      && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K)
@@ -35,31 +35,31 @@ __LDBL_REDIR1_DECL (fwscanf, __nldbl___i
 __LDBL_REDIR1_DECL (wscanf, __nldbl___isoc99_wscanf)
 __LDBL_REDIR1_DECL (swscanf, __nldbl___isoc99_swscanf)
 # else
-__LDBL_REDIR_DECL (fwscanf);
-__LDBL_REDIR_DECL (wscanf);
-__LDBL_REDIR_DECL (swscanf);
+__LDBL_REDIR_DECL (fwscanf)
+__LDBL_REDIR_DECL (wscanf)
+__LDBL_REDIR_DECL (swscanf)
 # endif
 __END_NAMESPACE_C99
 #endif
 
 #ifdef __USE_ISOC99
 __BEGIN_NAMESPACE_C99
-__LDBL_REDIR1_DECL (wcstold, wcstod);
+__LDBL_REDIR1_DECL (wcstold, wcstod)
 # if !defined __USE_GNU && !defined __REDIRECT \
      && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K)
 __LDBL_REDIR1_DECL (vfwscanf, __nldbl___isoc99_vfwscanf)
 __LDBL_REDIR1_DECL (vwscanf, __nldbl___isoc99_vwscanf)
 __LDBL_REDIR1_DECL (vswscanf, __nldbl___isoc99_vswscanf)
 # else
-__LDBL_REDIR_DECL (vfwscanf);
-__LDBL_REDIR_DECL (vwscanf);
-__LDBL_REDIR_DECL (vswscanf);
+__LDBL_REDIR_DECL (vfwscanf)
+__LDBL_REDIR_DECL (vwscanf)
+__LDBL_REDIR_DECL (vswscanf)
 # endif
 __END_NAMESPACE_C99
 #endif
 
 #ifdef __USE_GNU
-__LDBL_REDIR1_DECL (wcstold_l, wcstod_l);
+__LDBL_REDIR1_DECL (wcstold_l, wcstod_l)
 #endif
 
 #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
Index: glibc/bits/wchar.h
===================================================================
--- glibc.orig/bits/wchar.h
+++ glibc/bits/wchar.h
@@ -32,6 +32,8 @@
 
 #ifdef __WCHAR_MAX__
 # define __WCHAR_MAX	__WCHAR_MAX__
+#elif defined __DECC
+# define __WCHAR_MAX	0x7fffffff
 #elif L'\0' - 1 > 0
 # define __WCHAR_MAX	(0xffffffffu + L'\0')
 #else
@@ -40,6 +42,8 @@
 
 #ifdef __WCHAR_MIN__
 # define __WCHAR_MIN	__WCHAR_MIN__
+#elif defined __DECC
+# define __WCHAR_MIN	(-__WCHAR_MAX - 1)
 #elif L'\0' - 1 > 0
 # define __WCHAR_MIN	(L'\0' + 0)
 #else
Index: glibc/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
===================================================================
--- glibc.orig/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
+++ glibc/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
@@ -38,7 +38,7 @@ typedef unsigned long int pthread_t;
 union pthread_attr_t
 {
   char __size[__SIZEOF_PTHREAD_ATTR_T];
-  long int __align;
+  long int __glibc_align;
 };
 #ifndef __have_pthread_attr_t
 typedef union pthread_attr_t pthread_attr_t;
@@ -70,7 +70,7 @@ typedef union
 #define __PTHREAD_MUTEX_HAVE_PREV	1
   } __data;
   char __size[__SIZEOF_PTHREAD_MUTEX_T];
-  long int __align;
+  long int __glibc_align;
 } pthread_mutex_t;
 
 /* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER.  */
@@ -79,7 +79,7 @@ typedef union
 typedef union
 {
   char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
-  int __align;
+  int __glibc_align;
 } pthread_mutexattr_t;
 
 
@@ -99,13 +99,13 @@ typedef union
     unsigned int __broadcast_seq;
   } __data;
   char __size[__SIZEOF_PTHREAD_COND_T];
-  __extension__ long long int __align;
+  __extension__ long long int __glibc_align;
 } pthread_cond_t;
 
 typedef union
 {
   char __size[__SIZEOF_PTHREAD_CONDATTR_T];
-  int __align;
+  int __glibc_align;
 } pthread_condattr_t;
 
 
@@ -139,7 +139,7 @@ typedef union
     unsigned int __flags;
   } __data;
   char __size[__SIZEOF_PTHREAD_RWLOCK_T];
-  long int __align;
+  long int __glibc_align;
 } pthread_rwlock_t;
 
 #define __PTHREAD_RWLOCK_ELISION_EXTRA 0
@@ -147,7 +147,7 @@ typedef union
 typedef union
 {
   char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
-  long int __align;
+  long int __glibc_align;
 } pthread_rwlockattr_t;
 #endif
 
@@ -161,13 +161,13 @@ typedef volatile int pthread_spinlock_t;
 typedef union
 {
   char __size[__SIZEOF_PTHREAD_BARRIER_T];
-  long int __align;
+  long int __glibc_align;
 } pthread_barrier_t;
 
 typedef union
 {
   char __size[__SIZEOF_PTHREAD_BARRIERATTR_T];
-  int __align;
+  int __glibc_align;
 } pthread_barrierattr_t;
 #endif
 
Index: glibc/sysdeps/unix/sysv/linux/alpha/bits/semaphore.h
===================================================================
--- glibc.orig/sysdeps/unix/sysv/linux/alpha/bits/semaphore.h
+++ glibc/sysdeps/unix/sysv/linux/alpha/bits/semaphore.h
@@ -29,5 +29,5 @@
 typedef union
 {
   char __size[__SIZEOF_SEM_T];
-  long int __align;
+  long int __glibc_align;
 } sem_t;
Index: glibc/inet/netinet/in.h
===================================================================
--- glibc.orig/inet/netinet/in.h
+++ glibc/inet/netinet/in.h
@@ -567,8 +567,8 @@ extern int inet6_option_find (const stru
 /* Hop-by-Hop and Destination Options Processing (RFC 3542).  */
 extern int inet6_opt_init (void *__extbuf, socklen_t __extlen) __THROW;
 extern int inet6_opt_append (void *__extbuf, socklen_t __extlen, int __offset,
-			     uint8_t __type, socklen_t __len, uint8_t __align,
-			     void **__databufp) __THROW;
+			     uint8_t __type, socklen_t __len,
+			     uint8_t __glibc_align, void **__databufp) __THROW;
 extern int inet6_opt_finish (void *__extbuf, socklen_t __extlen, int __offset)
      __THROW;
 extern int inet6_opt_set_val (void *__databuf, int __offset, void *__val,
