--- uClibc-0.9.32-rc2/libpthread/nptl/pt-cleanup.c.mps	2011-02-18 19:57:40.000000000 +0100
+++ uClibc-0.9.32-rc2/libpthread/nptl/pt-cleanup.c	2011-02-18 19:58:19.000000000 +0100
@@ -39,13 +39,13 @@ __pthread_cleanup_upto (__jmp_buf target
        cbuf != NULL && _JMPBUF_UNWINDS_ADJ (target, cbuf, adj);
        cbuf = cbuf->__prev)
     {
-#if _STACK_GROWS_DOWN
+#ifdef _STACK_GROWS_DOWN
       if ((uintptr_t) cbuf - adj <= targetframe_adj)
         {
           cbuf = NULL;
           break;
         }
-#elif _STACK_GROWS_UP
+#elif defined _STACK_GROWS_UP
       if ((uintptr_t) cbuf - adj >= targetframe_adj)
         {
           cbuf = NULL;
--- uClibc-0.9.32-rc2/libpthread/nptl/allocatestack.c.mps	2011-02-18 18:36:17.000000000 +0100
+++ uClibc-0.9.32-rc2/libpthread/nptl/allocatestack.c	2011-02-18 18:53:24.000000000 +0100
@@ -316,10 +316,10 @@ change_stack_perm (struct pthread *pd
 		 + (((((pd->stackblock_size - pd->guardsize) / 2)
 		      & pagemask) + pd->guardsize) & pagemask));
   size_t len = pd->stackblock + pd->stackblock_size - stack;
-#elif _STACK_GROWS_DOWN
+#elif defined _STACK_GROWS_DOWN
   void *stack = pd->stackblock + pd->guardsize;
   size_t len = pd->stackblock_size - pd->guardsize;
-#elif _STACK_GROWS_UP
+#elif defined _STACK_GROWS_UP
   void *stack = pd->stackblock;
   size_t len = (uintptr_t) pd - pd->guardsize - (uintptr_t) pd->stackblock;
 #else
@@ -591,9 +591,9 @@ allocate_stack (const struct pthread_att
 	{
 #ifdef NEED_SEPARATE_REGISTER_STACK
 	  char *guard = mem + (((size - guardsize) / 2) & ~pagesize_m1);
-#elif _STACK_GROWS_DOWN
+#elif defined _STACK_GROWS_DOWN
 	  char *guard = mem;
-# elif _STACK_GROWS_UP
+#elif defined _STACK_GROWS_UP
 	  char *guard = (char *) (((uintptr_t) pd - guardsize) & ~pagesize_m1);
 #endif
 	  if (mprotect (guard, guardsize, PROT_NONE) != 0)
@@ -641,11 +641,11 @@ allocate_stack (const struct pthread_att
 			oldguard + pd->guardsize - guard - guardsize,
 			prot) != 0)
 	    goto mprot_error;
-#elif _STACK_GROWS_DOWN
+#elif defined _STACK_GROWS_DOWN
 	  if (mprotect ((char *) mem + guardsize, pd->guardsize - guardsize,
 			prot) != 0)
 	    goto mprot_error;
-#elif _STACK_GROWS_UP
+#elif defined _STACK_GROWS_UP
 	  if (mprotect ((char *) pd - pd->guardsize,
 			pd->guardsize - guardsize, prot) != 0)
 	    goto mprot_error;
@@ -688,9 +688,9 @@ allocate_stack (const struct pthread_att
 #ifdef NEED_SEPARATE_REGISTER_STACK
   *stack = pd->stackblock;
   *stacksize = stacktop - *stack;
-#elif _STACK_GROWS_DOWN
+#elif defined _STACK_GROWS_DOWN
   *stack = stacktop;
-#elif _STACK_GROWS_UP
+#elif defined _STACK_GROWS_UP
   *stack = pd->stackblock;
   assert (*stack > 0);
 #endif
--- uClibc-0.9.32-rc2/libpthread/nptl/unwind.c.mps	2011-02-18 18:55:16.000000000 +0100
+++ uClibc-0.9.32-rc2/libpthread/nptl/unwind.c	2011-02-18 18:59:27.000000000 +0100
@@ -30,7 +30,7 @@
 #ifdef _STACK_GROWS_DOWN
 # define FRAME_LEFT(frame, other, adj) \
   ((uintptr_t) frame - adj >= (uintptr_t) other - adj)
-#elif _STACK_GROWS_UP
+#elif defined _STACK_GROWS_UP
 # define FRAME_LEFT(frame, other, adj) \
   ((uintptr_t) frame - adj <= (uintptr_t) other - adj)
 #else
--- uClibc-0.9.32-rc2/libpthread/linuxthreads/pthread.c.mps	2011-02-18 18:41:14.000000000 +0100
+++ uClibc-0.9.32-rc2/libpthread/linuxthreads/pthread.c	2011-02-18 18:42:40.000000000 +0100
@@ -750,7 +750,7 @@ int __pthread_initialize_manager(void)
 			 THREAD_MANAGER_STACK_SIZE,
 			 CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM,
 			 mgr);
-#elif _STACK_GROWS_UP
+#elif defined _STACK_GROWS_UP
 	  pid = __clone(__pthread_manager_event,
 			(void **) __pthread_manager_thread_bos,
 			CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM,
@@ -789,7 +789,7 @@ int __pthread_initialize_manager(void)
       pid = __clone2(__pthread_manager, (void **) __pthread_manager_thread_bos,
 		     THREAD_MANAGER_STACK_SIZE,
 		     CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM, mgr);
-#elif _STACK_GROWS_UP
+#elif defined _STACK_GROWS_UP
       pid = __clone(__pthread_manager, (void **) __pthread_manager_thread_bos,
 		    CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM, mgr);
 #else
--- uClibc-0.9.32-rc2/libpthread/linuxthreads/ptcleanup.c.mps	2011-02-18 18:42:54.000000000 +0100
+++ uClibc-0.9.32-rc2/libpthread/linuxthreads/ptcleanup.c	2011-02-18 18:43:22.000000000 +0100
@@ -49,13 +49,13 @@ void __pthread_cleanup_upto (__jmp_buf t
        c != NULL && __JMPBUF_UNWINDS(target, c, demangle_ptr);
        c = c->__prev)
     {
-#if _STACK_GROWS_DOWN
+#ifdef _STACK_GROWS_DOWN
       if ((char *) c <= targetframe)
 	{
 	  c = NULL;
 	  break;
 	}
-#elif _STACK_GROWS_UP
+#elif defined _STACK_GROWS_UP
       if ((char *) c >= targetframe)
 	{
 	  c = NULL;
--- uClibc-0.9.32-rc2/libpthread/linuxthreads/cancel.c.mps	2011-02-18 18:40:45.000000000 +0100
+++ uClibc-0.9.32-rc2/libpthread/linuxthreads/cancel.c	2011-02-18 18:41:06.000000000 +0100
@@ -23,7 +23,7 @@
 
 #ifdef _STACK_GROWS_DOWN
 # define FRAME_LEFT(frame, other) ((char *) frame >= (char *) other)
-#elif _STACK_GROWS_UP
+#elif defined _STACK_GROWS_UP
 # define FRAME_LEFT(frame, other) ((char *) frame <= (char *) other)
 #else
 # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
--- uClibc-0.9.32-rc2/libpthread/linuxthreads/manager.c.mps	2011-02-18 18:43:53.000000000 +0100
+++ uClibc-0.9.32-rc2/libpthread/linuxthreads/manager.c	2011-02-18 18:45:50.000000000 +0100
@@ -445,7 +445,7 @@ static int pthread_allocate_stack(const 
       new_thread = ((pthread_descr) (new_thread_bottom + stacksize
 				     + guardsize)) - 1;
 #  endif
-# elif _STACK_GROWS_DOWN
+# elif defined _STACK_GROWS_DOWN
       guardaddr = map_addr;
       if (guardsize > 0)
 	mprotect (guardaddr, guardsize, PROT_NONE);
@@ -456,7 +456,7 @@ static int pthread_allocate_stack(const 
 #  else
       new_thread = ((pthread_descr) (new_thread_bottom + stacksize)) - 1;
 #  endif
-# elif _STACK_GROWS_UP
+# elif defined _STACK_GROWS_UP
       guardaddr = map_addr + stacksize;
       if (guardsize > 0)
 	mprotect (guardaddr, guardsize, PROT_NONE);
@@ -744,7 +744,7 @@ static int pthread_handle_create(pthread
 			 (char *)stack_addr - new_thread_bottom,
 			 CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM |
 			 __pthread_sig_cancel, new_thread);
-#elif _STACK_GROWS_UP
+#elif defined _STACK_GROWS_UP
 	  pid = __clone(pthread_start_thread_event, (void *) new_thread_bottom,
 			CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM |
 			__pthread_sig_cancel, new_thread);
@@ -785,7 +785,7 @@ static int pthread_handle_create(pthread
                      (char *)stack_addr - new_thread_bottom,
 		     CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM |
 		     __pthread_sig_cancel, new_thread);
-#elif _STACK_GROWS_UP
+#elif defined _STACK_GROWS_UP
       pid = __clone(pthread_start_thread, (void *) new_thread_bottom,
 		    CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_SYSVSEM |
 		    __pthread_sig_cancel, new_thread);
@@ -806,7 +806,7 @@ static int pthread_handle_create(pthread
 			    - new_thread_bottom);
 	munmap((caddr_t)new_thread_bottom,
 	       2 * stacksize + new_thread->p_guardsize);
-#elif _STACK_GROWS_UP
+#elif defined _STACK_GROWS_UP
 # ifdef USE_TLS
 	size_t stacksize = guardaddr - stack_addr;
 	munmap(stack_addr, stacksize + guardsize);
