Index: c/src/exec/posix/src/semaphore.c
===================================================================
--- c/src/exec/posix/src/semaphore.c	(revision 26c828fe47ed75198c4524320189068d4232813f)
+++ c/src/exec/posix/src/semaphore.c	(revision fd882eed44808c3238dcf968da979129b6ab50d9)
@@ -62,9 +62,15 @@
   _Thread_Disable_dispatch();
  
+  /* Sharing semaphores among processes is not currently supported */
+  if (pshared != 0) {
+    _Thread_Enable_dispatch();
+    set_errno_and_return_minus_one( ENOSYS );
+  }
+
   the_semaphore = _POSIX_Semaphore_Allocate();
  
   if ( !the_semaphore ) {
     _Thread_Enable_dispatch();
-    set_errno_and_return_minus_one( ENOMEM );
+    set_errno_and_return_minus_one( ENOSPC );
   }
  
@@ -97,5 +103,11 @@
 
   the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
- 
+
+  /*
+   *  This effectively disables limit checking.
+   */
+
+  the_sem_attr->maximum_count = 0xFFFFFFFF;
+
   _CORE_semaphore_Initialize(
     &the_semaphore->Semaphore,
@@ -244,10 +256,13 @@
   Objects_Id                 the_semaphore_id;
   POSIX_Semaphore_Control   *the_semaphore;
+  Objects_Locations          location;
  
 
   if ( oflag & O_CREAT ) {
     va_start(arg, oflag);
-    mode = (mode_t) va_arg( arg, mode_t * );
-    value = (unsigned int) va_arg( arg, unsigned int * );
+    /*mode = (mode_t) va_arg( arg, mode_t * );*/
+    mode = va_arg( arg, mode_t );
+    /*value = (unsigned int) va_arg( arg, unsigned int * );*/
+    value = va_arg( arg, unsigned int );
     va_end(arg);
   }
@@ -271,5 +286,5 @@
     }
     /* some type of error */
-    set_errno_and_return_minus_one_cast( status, sem_t * );
+    /*set_errno_and_return_minus_one_cast( status, sem_t * );*/
 
   } else {                /* name -> ID translation succeeded */
@@ -284,4 +299,5 @@
      */
 
+    the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
     the_semaphore->open_count += 1;
 
@@ -298,5 +314,5 @@
   status = _POSIX_Semaphore_Create_support(
     name,
-    TRUE,         /* shared across processes */
+    FALSE,         /* not shared across processes */
     value,
     &the_semaphore
@@ -432,4 +448,5 @@
   register POSIX_Semaphore_Control *the_semaphore;
   Objects_Locations                 location;
+  int                               code;
  
   the_semaphore = _POSIX_Semaphore_Get( sem, &location );
@@ -449,5 +466,18 @@
       );
       _Thread_Enable_dispatch();
-      return _Thread_Executing->Wait.return_code;
+      code = _Thread_Executing->Wait.return_code;
+      switch (_Thread_Executing->Wait.return_code) {
+        case 1:
+	  errno = EAGAIN;
+	  code = -1;
+	  break;
+	case 3:
+	  errno = ETIMEDOUT;
+	  code = -1;
+	  break;
+      }
+
+      /*return _Thread_Executing->Wait.return_code;*/
+      return code;
   }
   return POSIX_BOTTOM_REACHED();
@@ -574,2 +604,26 @@
   return POSIX_BOTTOM_REACHED();
 }
+
+/*PAGE
+ *
+ *  _POSIX_Semaphore_Name_to_id
+ *
+ *  XXX
+ */
+
+int _POSIX_Semaphore_Name_to_id(
+  const char          *name,
+  Objects_Id          *id
+)
+{
+  Objects_Name_to_id_errors  status;
+
+  status = _Objects_Name_to_id( &_POSIX_Semaphore_Information, name, 0, id );
+
+  if ( status == OBJECTS_SUCCESSFUL ) {
+	  return 0;
+  } else {
+	  return EINVAL;
+  }
+}
+
Index: cpukit/posix/src/semaphore.c
===================================================================
--- cpukit/posix/src/semaphore.c	(revision 26c828fe47ed75198c4524320189068d4232813f)
+++ cpukit/posix/src/semaphore.c	(revision fd882eed44808c3238dcf968da979129b6ab50d9)
@@ -62,9 +62,15 @@
   _Thread_Disable_dispatch();
  
+  /* Sharing semaphores among processes is not currently supported */
+  if (pshared != 0) {
+    _Thread_Enable_dispatch();
+    set_errno_and_return_minus_one( ENOSYS );
+  }
+
   the_semaphore = _POSIX_Semaphore_Allocate();
  
   if ( !the_semaphore ) {
     _Thread_Enable_dispatch();
-    set_errno_and_return_minus_one( ENOMEM );
+    set_errno_and_return_minus_one( ENOSPC );
   }
  
@@ -97,5 +103,11 @@
 
   the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
- 
+
+  /*
+   *  This effectively disables limit checking.
+   */
+
+  the_sem_attr->maximum_count = 0xFFFFFFFF;
+
   _CORE_semaphore_Initialize(
     &the_semaphore->Semaphore,
@@ -244,10 +256,13 @@
   Objects_Id                 the_semaphore_id;
   POSIX_Semaphore_Control   *the_semaphore;
+  Objects_Locations          location;
  
 
   if ( oflag & O_CREAT ) {
     va_start(arg, oflag);
-    mode = (mode_t) va_arg( arg, mode_t * );
-    value = (unsigned int) va_arg( arg, unsigned int * );
+    /*mode = (mode_t) va_arg( arg, mode_t * );*/
+    mode = va_arg( arg, mode_t );
+    /*value = (unsigned int) va_arg( arg, unsigned int * );*/
+    value = va_arg( arg, unsigned int );
     va_end(arg);
   }
@@ -271,5 +286,5 @@
     }
     /* some type of error */
-    set_errno_and_return_minus_one_cast( status, sem_t * );
+    /*set_errno_and_return_minus_one_cast( status, sem_t * );*/
 
   } else {                /* name -> ID translation succeeded */
@@ -284,4 +299,5 @@
      */
 
+    the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
     the_semaphore->open_count += 1;
 
@@ -298,5 +314,5 @@
   status = _POSIX_Semaphore_Create_support(
     name,
-    TRUE,         /* shared across processes */
+    FALSE,         /* not shared across processes */
     value,
     &the_semaphore
@@ -432,4 +448,5 @@
   register POSIX_Semaphore_Control *the_semaphore;
   Objects_Locations                 location;
+  int                               code;
  
   the_semaphore = _POSIX_Semaphore_Get( sem, &location );
@@ -449,5 +466,18 @@
       );
       _Thread_Enable_dispatch();
-      return _Thread_Executing->Wait.return_code;
+      code = _Thread_Executing->Wait.return_code;
+      switch (_Thread_Executing->Wait.return_code) {
+        case 1:
+	  errno = EAGAIN;
+	  code = -1;
+	  break;
+	case 3:
+	  errno = ETIMEDOUT;
+	  code = -1;
+	  break;
+      }
+
+      /*return _Thread_Executing->Wait.return_code;*/
+      return code;
   }
   return POSIX_BOTTOM_REACHED();
@@ -574,2 +604,26 @@
   return POSIX_BOTTOM_REACHED();
 }
+
+/*PAGE
+ *
+ *  _POSIX_Semaphore_Name_to_id
+ *
+ *  XXX
+ */
+
+int _POSIX_Semaphore_Name_to_id(
+  const char          *name,
+  Objects_Id          *id
+)
+{
+  Objects_Name_to_id_errors  status;
+
+  status = _Objects_Name_to_id( &_POSIX_Semaphore_Information, name, 0, id );
+
+  if ( status == OBJECTS_SUCCESSFUL ) {
+	  return 0;
+  } else {
+	  return EINVAL;
+  }
+}
+
