Index: c/src/exec/libcsupport/src/utsname.c
===================================================================
--- c/src/exec/libcsupport/src/utsname.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/libcsupport/src/utsname.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -38,5 +38,5 @@
 
   if ( !name )
-    set_errno_and_return_minus_one( EFAULT );
+    rtems_set_errno_and_return_minus_one( EFAULT );
 
   strcpy( name->sysname, "RTEMS" );
Index: c/src/exec/posix/src/clockgetres.c
===================================================================
--- c/src/exec/posix/src/clockgetres.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/clockgetres.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -30,5 +30,5 @@
 {
   if ( !res )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
  
   switch ( clock_id ) {
@@ -49,5 +49,5 @@
  
     default:
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
  
   }
Index: c/src/exec/posix/src/clockgettime.c
===================================================================
--- c/src/exec/posix/src/clockgettime.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/clockgettime.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -34,5 +34,5 @@
 
   if ( !tp )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   switch ( clock_id ) {
@@ -63,5 +63,5 @@
 #endif
     default:
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
 
   }
Index: c/src/exec/posix/src/clocksettime.c
===================================================================
--- c/src/exec/posix/src/clocksettime.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/clocksettime.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -57,5 +57,5 @@
 
       if ( !_TOD_Validate( &tod ) )
-        set_errno_and_return_minus_one( EINVAL );
+        rtems_set_errno_and_return_minus_one( EINVAL );
  
       /*
@@ -82,5 +82,5 @@
 #endif
     default:
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
  
   }
Index: c/src/exec/posix/src/killinfo.c
===================================================================
--- c/src/exec/posix/src/killinfo.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/killinfo.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -64,5 +64,5 @@
  
   if ( pid != getpid() )
-    set_errno_and_return_minus_one( ESRCH );
+    rtems_set_errno_and_return_minus_one( ESRCH );
 
   /*
@@ -71,5 +71,5 @@
  
   if ( sig && !is_valid_signo(sig) ) {
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
   }
 
@@ -321,5 +321,5 @@
                _Chain_Get( &_POSIX_signals_Inactive_siginfo );
     if ( !psiginfo ) {
-      set_errno_and_return_minus_one( EAGAIN );
+      rtems_set_errno_and_return_minus_one( EAGAIN );
     }
 
Index: c/src/exec/posix/src/mqueueclose.c
===================================================================
--- c/src/exec/posix/src/mqueueclose.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/mqueueclose.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -48,9 +48,9 @@
   switch ( location ) {
     case OBJECTS_ERROR:
-      set_errno_and_return_minus_one( EBADF );
+      rtems_set_errno_and_return_minus_one( EBADF );
     case OBJECTS_REMOTE:
       _Thread_Dispatch();
       return POSIX_MP_NOT_IMPLEMENTED();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_LOCAL:
       the_mq->open_count -= 1;
Index: c/src/exec/posix/src/mqueuecreatesupp.c
===================================================================
--- c/src/exec/posix/src/mqueuecreatesupp.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/mqueuecreatesupp.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -68,10 +68,10 @@
     if ( attr_ptr->mq_maxmsg < 0 ){
       _Thread_Enable_dispatch();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     }
 
     if ( attr_ptr->mq_msgsize < 0 ){
       _Thread_Enable_dispatch();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     }
 
@@ -85,5 +85,5 @@
     _POSIX_Message_queue_Free( the_mq );
     _Thread_Enable_dispatch();
-    set_errno_and_return_minus_one( ENFILE );
+    rtems_set_errno_and_return_minus_one( ENFILE );
   }
 #endif
@@ -92,5 +92,5 @@
   if ( !the_mq ) {
     _Thread_Enable_dispatch();
-    set_errno_and_return_minus_one( ENFILE );
+    rtems_set_errno_and_return_minus_one( ENFILE );
   }
  
@@ -131,5 +131,5 @@
     _POSIX_Message_queue_Free( the_mq );
     _Thread_Enable_dispatch();
-    set_errno_and_return_minus_one( ENOSPC );
+    rtems_set_errno_and_return_minus_one( ENOSPC );
   }
 
Index: c/src/exec/posix/src/mqueuegetattr.c
===================================================================
--- c/src/exec/posix/src/mqueuegetattr.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/mqueuegetattr.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -48,14 +48,14 @@
  
   if ( !mqstat )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   the_mq = _POSIX_Message_queue_Get( mqdes, &location );
   switch ( location ) {
     case OBJECTS_ERROR:
-      set_errno_and_return_minus_one( EBADF );
+      rtems_set_errno_and_return_minus_one( EBADF );
     case OBJECTS_REMOTE:
       _Thread_Dispatch();
       return POSIX_MP_NOT_IMPLEMENTED();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_LOCAL:
       /*
Index: c/src/exec/posix/src/mqueuenotify.c
===================================================================
--- c/src/exec/posix/src/mqueuenotify.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/mqueuenotify.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -71,14 +71,14 @@
   switch ( location ) {
     case OBJECTS_ERROR:
-      set_errno_and_return_minus_one( EBADF );
+      rtems_set_errno_and_return_minus_one( EBADF );
     case OBJECTS_REMOTE:
       _Thread_Dispatch();
       return POSIX_MP_NOT_IMPLEMENTED();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_LOCAL:
       if ( notification ) {
         if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) {
           _Thread_Enable_dispatch();
-          set_errno_and_return_minus_one( EBUSY );
+          rtems_set_errno_and_return_minus_one( EBUSY );
         }
 
Index: c/src/exec/posix/src/mqueueopen.c
===================================================================
--- c/src/exec/posix/src/mqueueopen.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/mqueueopen.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -81,5 +81,5 @@
     if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
       _Thread_Enable_dispatch();
-      set_errno_and_return_minus_one_cast( status, mqd_t );
+      rtems_set_errno_and_return_minus_one_cast( status, mqd_t );
     }
 
@@ -92,5 +92,5 @@
     if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
       _Thread_Enable_dispatch();
-      set_errno_and_return_minus_one_cast( EEXIST, mqd_t );
+      rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t );
     }
 
Index: c/src/exec/posix/src/mqueuerecvsupp.c
===================================================================
--- c/src/exec/posix/src/mqueuerecvsupp.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/mqueuerecvsupp.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -56,18 +56,18 @@
   switch ( location ) {
     case OBJECTS_ERROR:
-      set_errno_and_return_minus_one( EBADF );
+      rtems_set_errno_and_return_minus_one( EBADF );
     case OBJECTS_REMOTE:
       _Thread_Dispatch();
       return POSIX_MP_NOT_IMPLEMENTED();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_LOCAL:
       if ( (the_mq->oflag & O_ACCMODE) == O_WRONLY ) {
         _Thread_Enable_dispatch();
-        set_errno_and_return_minus_one( EBADF );
+        rtems_set_errno_and_return_minus_one( EBADF );
       }
 
       if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
         _Thread_Enable_dispatch();
-        set_errno_and_return_minus_one( EMSGSIZE );
+        rtems_set_errno_and_return_minus_one( EMSGSIZE );
       }
  
@@ -95,5 +95,5 @@
         return length_out;
 
-      set_errno_and_return_minus_one(
+      rtems_set_errno_and_return_minus_one(
         _POSIX_Message_queue_Translate_core_message_queue_return_code(
           _Thread_Executing->Wait.return_code
Index: c/src/exec/posix/src/mqueuesendsupp.c
===================================================================
--- c/src/exec/posix/src/mqueuesendsupp.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/mqueuesendsupp.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -57,5 +57,5 @@
 
   if ( msg_prio > MQ_PRIO_MAX )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   the_mq = _POSIX_Message_queue_Get( mqdes, &location );
@@ -63,15 +63,15 @@
   switch ( location ) {
     case OBJECTS_ERROR:
-      set_errno_and_return_minus_one( EBADF );
+      rtems_set_errno_and_return_minus_one( EBADF );
 
     case OBJECTS_REMOTE:
       _Thread_Dispatch();
       return POSIX_MP_NOT_IMPLEMENTED();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
 
     case OBJECTS_LOCAL:
       if ( (the_mq->oflag & O_ACCMODE) == O_RDONLY ) {
         _Thread_Enable_dispatch();
-        set_errno_and_return_minus_one( EBADF );
+        rtems_set_errno_and_return_minus_one( EBADF );
       }
 
@@ -106,5 +106,5 @@
         return msg_status;
 
-      set_errno_and_return_minus_one(
+      rtems_set_errno_and_return_minus_one(
         _POSIX_Message_queue_Translate_core_message_queue_return_code(
           msg_status 
Index: c/src/exec/posix/src/mqueuesetattr.c
===================================================================
--- c/src/exec/posix/src/mqueuesetattr.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/mqueuesetattr.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -50,14 +50,14 @@
  
   if ( !mqstat )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   the_mq = _POSIX_Message_queue_Get( mqdes, &location );
   switch ( location ) {
     case OBJECTS_ERROR:
-      set_errno_and_return_minus_one( EBADF );
+      rtems_set_errno_and_return_minus_one( EBADF );
     case OBJECTS_REMOTE:
       _Thread_Dispatch();
       return POSIX_MP_NOT_IMPLEMENTED();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_LOCAL:
 
Index: c/src/exec/posix/src/mqueueunlink.c
===================================================================
--- c/src/exec/posix/src/mqueueunlink.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/mqueueunlink.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -51,5 +51,5 @@
    if ( status != 0 ) {
     _Thread_Enable_dispatch();
-    set_errno_and_return_minus_one( status );
+    rtems_set_errno_and_return_minus_one( status );
    }
 
@@ -60,5 +60,5 @@
   if ( !_Objects_Is_local_id(the_mq_id) ) {
     _Thread_Enable_dispatch();
-    set_errno_and_return_minus_one( ENOSYS );
+    rtems_set_errno_and_return_minus_one( ENOSYS );
   }
 
Index: c/src/exec/posix/src/nanosleep.c
===================================================================
--- c/src/exec/posix/src/nanosleep.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/nanosleep.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -33,5 +33,5 @@
 
   if ( !rqtp )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   the_rqtp = (struct timespec *)rqtp;
@@ -48,8 +48,8 @@
 
   if ( /* the_rqtp->tv_sec < 0 || */ the_rqtp->tv_nsec < 0 )
-    set_errno_and_return_minus_one( EAGAIN );
+    rtems_set_errno_and_return_minus_one( EAGAIN );
 
   if ( the_rqtp->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
  
   ticks = _POSIX_Timespec_to_interval( the_rqtp );
@@ -98,5 +98,5 @@
 
     if ( ticks )
-      set_errno_and_return_minus_one( EINTR );
+      rtems_set_errno_and_return_minus_one( EINTR );
   }
 
Index: c/src/exec/posix/src/pthreadkill.c
===================================================================
--- c/src/exec/posix/src/pthreadkill.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/pthreadkill.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -36,9 +36,9 @@
 
   if ( sig && !is_valid_signo(sig) )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
 /* commented out when posix timers added 
   if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO )
-    set_errno_and_return_minus_one( ENOSYS );
+    rtems_set_errno_and_return_minus_one( ENOSYS );
 */
 
@@ -47,5 +47,5 @@
     case OBJECTS_ERROR:
     case OBJECTS_REMOTE:
-      set_errno_and_return_minus_one( ESRCH );
+      rtems_set_errno_and_return_minus_one( ESRCH );
     case OBJECTS_LOCAL:
       /*
Index: c/src/exec/posix/src/pthreadsigmask.c
===================================================================
--- c/src/exec/posix/src/pthreadsigmask.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/pthreadsigmask.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -36,5 +36,5 @@
 
   if ( !set && !oset )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
@@ -57,5 +57,5 @@
       break;
     default:
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
   }
 
Index: c/src/exec/posix/src/ptimer1.c
===================================================================
--- c/src/exec/posix/src/ptimer1.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/ptimer1.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -282,5 +282,5 @@
          ( evp->sigev_notify != SIGEV_SIGNAL ) ) {
        /* The value of the field sigev_notify is not valid */
-       set_errno_and_return_minus_one( EINVAL );
+       rtems_set_errno_and_return_minus_one( EINVAL );
      }
   }
@@ -307,5 +307,5 @@
 	    * supports it. It will necessaty to increase the structure used */
 
-           set_errno_and_return_minus_one( EAGAIN );
+           rtems_set_errno_and_return_minus_one( EAGAIN );
         }
 
@@ -339,10 +339,10 @@
      case RTEMS_INVALID_NAME : /* The assigned name is not valid */
 
-       set_errno_and_return_minus_one( EINVAL );
+       rtems_set_errno_and_return_minus_one( EINVAL );
 
      case RTEMS_TOO_MANY :
 
        /* There has been created too much timers for the same process */
-       set_errno_and_return_minus_one( EAGAIN );
+       rtems_set_errno_and_return_minus_one( EAGAIN );
      
      default :
@@ -354,5 +354,5 @@
         */
 
-       set_errno_and_return_minus_one( EINVAL );
+       rtems_set_errno_and_return_minus_one( EINVAL );
   }
 
@@ -361,5 +361,5 @@
    */
 
-  set_errno_and_return_minus_one( EINVAL );
+  rtems_set_errno_and_return_minus_one( EINVAL );
 }
 
@@ -392,5 +392,5 @@
    if ( timer_pos == BAD_TIMER_C ) {
       /* The timer identifier is erroneus */
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
    }
 
@@ -401,5 +401,5 @@
    if ( status == RTEMS_INVALID_ID ) {
      /* The timer identifier is erroneus */
-     set_errno_and_return_minus_one( EINVAL );
+     rtems_set_errno_and_return_minus_one( EINVAL );
    }
 
@@ -438,5 +438,5 @@
    if ( timer_pos == BAD_TIMER_C ) {
      /* The timer identifier is erroneus */
-     set_errno_and_return_minus_one( EINVAL );
+     rtems_set_errno_and_return_minus_one( EINVAL );
    }
 
@@ -445,5 +445,5 @@
 	error but the variable errno is not actualized */
 
-     set_errno_and_return_minus_one( EINVAL );
+     rtems_set_errno_and_return_minus_one( EINVAL );
    }
 
@@ -488,5 +488,5 @@
        /* The number of nanoseconds is not correct */
 
-       set_errno_and_return_minus_one( EINVAL );
+       rtems_set_errno_and_return_minus_one( EINVAL );
     }
 
@@ -611,5 +611,5 @@
                * situation can not occur, but the solution is easy */ 
 
-              set_errno_and_return_minus_one( EINVAL );
+              rtems_set_errno_and_return_minus_one( EINVAL );
 
               break;
@@ -626,5 +626,5 @@
                */
 
-              set_errno_and_return_minus_one( EINVAL );
+              rtems_set_errno_and_return_minus_one( EINVAL );
               break;
            
@@ -688,5 +688,5 @@
   if ( timer_pos == BAD_TIMER_C ) {
     /* The timer identifier is erroneus */  
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
   }
 
@@ -775,5 +775,5 @@
   if ( timer_pos == BAD_TIMER_C ) {
     /* The timer identifier is erroneus */
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
   }
 
Index: c/src/exec/posix/src/sched.c
===================================================================
--- c/src/exec/posix/src/sched.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/sched.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -29,5 +29,5 @@
 )
 {
-  set_errno_and_return_minus_one( ENOSYS );
+  rtems_set_errno_and_return_minus_one( ENOSYS );
 }
 
@@ -42,5 +42,5 @@
 )
 {
-  set_errno_and_return_minus_one( ENOSYS );
+  rtems_set_errno_and_return_minus_one( ENOSYS );
 }
 
@@ -57,5 +57,5 @@
 )
 {
-  set_errno_and_return_minus_one( ENOSYS );
+  rtems_set_errno_and_return_minus_one( ENOSYS );
 }
 
@@ -69,5 +69,5 @@
 )
 {
-  set_errno_and_return_minus_one( ENOSYS );
+  rtems_set_errno_and_return_minus_one( ENOSYS );
 }
 
@@ -89,5 +89,5 @@
  
     default:
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
   }
 
@@ -112,5 +112,5 @@
  
     default:
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
   }
 
@@ -135,8 +135,8 @@
 
   if ( pid && pid != getpid() )
-    set_errno_and_return_minus_one( ESRCH );
+    rtems_set_errno_and_return_minus_one( ESRCH );
 
   if ( !interval )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   _POSIX_Interval_to_timespec( _Thread_Ticks_per_timeslice, interval );
Index: c/src/exec/posix/src/semaphorecreatesupp.c
===================================================================
--- c/src/exec/posix/src/semaphorecreatesupp.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/semaphorecreatesupp.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -14,4 +14,5 @@
 #include <semaphore.h>
 #include <limits.h>
+#include <string.h>	/* strlen */
 
 #include <rtems/system.h>
@@ -45,5 +46,5 @@
   if (pshared != 0) {
     _Thread_Enable_dispatch();
-    set_errno_and_return_minus_one( ENOSYS );
+    rtems_set_errno_and_return_minus_one( ENOSYS );
   }
 
@@ -51,5 +52,5 @@
     if( strlen(name) > PATH_MAX ) { 
       _Thread_Enable_dispatch();
-      set_errno_and_return_minus_one( ENAMETOOLONG );
+      rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
     }
   }
@@ -59,5 +60,5 @@
   if ( !the_semaphore ) {
     _Thread_Enable_dispatch();
-    set_errno_and_return_minus_one( ENOSPC );
+    rtems_set_errno_and_return_minus_one( ENOSPC );
   }
  
@@ -68,5 +69,5 @@
     _POSIX_Semaphore_Free( the_semaphore );
     _Thread_Enable_dispatch();
-    set_errno_and_return_minus_one( EAGAIN );
+    rtems_set_errno_and_return_minus_one( EAGAIN );
   }
 #endif
Index: c/src/exec/posix/src/semaphorewaitsupp.c
===================================================================
--- c/src/exec/posix/src/semaphorewaitsupp.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/semaphorewaitsupp.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -38,8 +38,8 @@
   switch ( location ) {
     case OBJECTS_ERROR:
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_REMOTE:
       _Thread_Dispatch();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_LOCAL:
       _CORE_semaphore_Seize(
@@ -54,9 +54,9 @@
 	  break;
         case CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT:
-          set_errno_and_return_minus_one( EAGAIN );
+          rtems_set_errno_and_return_minus_one( EAGAIN );
         case CORE_SEMAPHORE_WAS_DELETED:
-          set_errno_and_return_minus_one( EAGAIN );
+          rtems_set_errno_and_return_minus_one( EAGAIN );
         case CORE_SEMAPHORE_TIMEOUT:
-          set_errno_and_return_minus_one( ETIMEDOUT );
+          rtems_set_errno_and_return_minus_one( ETIMEDOUT );
 	  break;
         case CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED:
Index: c/src/exec/posix/src/semclose.c
===================================================================
--- c/src/exec/posix/src/semclose.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/semclose.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -41,9 +41,9 @@
   switch ( location ) {
     case OBJECTS_ERROR:
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_REMOTE:
       _Thread_Dispatch();
       return POSIX_MP_NOT_IMPLEMENTED();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_LOCAL:
       the_semaphore->open_count -= 1;
Index: c/src/exec/posix/src/semdestroy.c
===================================================================
--- c/src/exec/posix/src/semdestroy.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/semdestroy.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -36,9 +36,9 @@
   switch ( location ) {
     case OBJECTS_ERROR:
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_REMOTE:
       _Thread_Dispatch();
       return POSIX_MP_NOT_IMPLEMENTED();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_LOCAL:
       /*
@@ -48,5 +48,5 @@
       if ( the_semaphore->named == TRUE ) {
         _Thread_Enable_dispatch();
-        set_errno_and_return_minus_one( EINVAL );
+        rtems_set_errno_and_return_minus_one( EINVAL );
       }
  
Index: c/src/exec/posix/src/semgetvalue.c
===================================================================
--- c/src/exec/posix/src/semgetvalue.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/semgetvalue.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -37,9 +37,9 @@
   switch ( location ) {
     case OBJECTS_ERROR:
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_REMOTE:
       _Thread_Dispatch();
       return POSIX_MP_NOT_IMPLEMENTED();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_LOCAL:
       *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore );
Index: c/src/exec/posix/src/seminit.c
===================================================================
--- c/src/exec/posix/src/seminit.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/seminit.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -36,5 +36,5 @@
 
   if ( !sem )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
     
   status = _POSIX_Semaphore_Create_support(
Index: c/src/exec/posix/src/semopen.c
===================================================================
--- c/src/exec/posix/src/semopen.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/semopen.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -77,5 +77,5 @@
     if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
       _Thread_Enable_dispatch();
-      set_errno_and_return_minus_one_cast( status, sem_t * );
+      rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
     }
   } else { 
@@ -87,5 +87,5 @@
     if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
       _Thread_Enable_dispatch();
-      set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
+      rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
     }
 
Index: c/src/exec/posix/src/sempost.c
===================================================================
--- c/src/exec/posix/src/sempost.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/sempost.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -36,9 +36,9 @@
   switch ( location ) {
     case OBJECTS_ERROR:
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_REMOTE:
       _Thread_Dispatch();
       return POSIX_MP_NOT_IMPLEMENTED();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_LOCAL:
       _CORE_semaphore_Surrender(
Index: c/src/exec/posix/src/semunlink.c
===================================================================
--- c/src/exec/posix/src/semunlink.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/semunlink.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -44,5 +44,5 @@
   if ( status != 0 ) {
     _Thread_Enable_dispatch();
-    set_errno_and_return_minus_one( status );
+    rtems_set_errno_and_return_minus_one( status );
   }
 
@@ -53,5 +53,5 @@
   if ( !_Objects_Is_local_id(the_semaphore_id) ) {
     _Thread_Enable_dispatch();
-    set_errno_and_return_minus_one( ENOSYS );
+    rtems_set_errno_and_return_minus_one( ENOSYS );
   }
 
Index: c/src/exec/posix/src/setpgid.c
===================================================================
--- c/src/exec/posix/src/setpgid.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/setpgid.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -26,4 +26,4 @@
 )
 {
-  set_errno_and_return_minus_one( ENOSYS );
+  rtems_set_errno_and_return_minus_one( ENOSYS );
 }
Index: c/src/exec/posix/src/setsid.c
===================================================================
--- c/src/exec/posix/src/setsid.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/setsid.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -23,5 +23,5 @@
 pid_t setsid( void )
 {
-  set_errno_and_return_minus_one( EPERM );
+  rtems_set_errno_and_return_minus_one( EPERM );
 }
 
Index: c/src/exec/posix/src/sigaction.c
===================================================================
--- c/src/exec/posix/src/sigaction.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/sigaction.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -47,5 +47,5 @@
 
   if ( !is_valid_signo(sig) )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
   
   /* 
@@ -57,5 +57,5 @@
 
   if ( sig == SIGKILL )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
   
   /*
Index: c/src/exec/posix/src/sigaddset.c
===================================================================
--- c/src/exec/posix/src/sigaddset.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/sigaddset.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -30,5 +30,5 @@
 {
   if ( !set )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   if ( !signo )
@@ -36,5 +36,5 @@
 
   if ( !is_valid_signo(signo) )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   *set |= signo_to_mask(signo);
Index: c/src/exec/posix/src/sigdelset.c
===================================================================
--- c/src/exec/posix/src/sigdelset.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/sigdelset.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -34,5 +34,5 @@
 {
   if ( !set )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   if ( !signo )
@@ -40,5 +40,5 @@
 
   if ( !is_valid_signo(signo) )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   *set &= ~signo_to_mask(signo);
Index: c/src/exec/posix/src/sigemptyset.c
===================================================================
--- c/src/exec/posix/src/sigemptyset.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/sigemptyset.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -29,5 +29,5 @@
 {
   if ( !set )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   *set = 0;
Index: c/src/exec/posix/src/sigfillset.c
===================================================================
--- c/src/exec/posix/src/sigfillset.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/sigfillset.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -29,5 +29,5 @@
 {
   if ( !set )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   *set = SIGNAL_ALL_MASK;
Index: c/src/exec/posix/src/sigismember.c
===================================================================
--- c/src/exec/posix/src/sigismember.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/sigismember.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -30,5 +30,5 @@
 {
   if ( !set )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   if ( !signo )
@@ -36,5 +36,5 @@
 
   if ( !is_valid_signo(signo) )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   if ( *set & signo_to_mask(signo) )
Index: c/src/exec/posix/src/sigpending.c
===================================================================
--- c/src/exec/posix/src/sigpending.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/sigpending.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -31,5 +31,5 @@
 
   if ( !set )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
Index: c/src/exec/posix/src/sigtimedwait.c
===================================================================
--- c/src/exec/posix/src/sigtimedwait.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/sigtimedwait.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -71,5 +71,5 @@
     if ( timeout->tv_nsec < 0 ||
          timeout->tv_nsec >= TOD_NANOSECONDS_PER_SECOND) {
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     }
 
Index: c/src/exec/posix/src/utsname.c
===================================================================
--- c/src/exec/posix/src/utsname.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/exec/posix/src/utsname.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -38,5 +38,5 @@
 
   if ( !name )
-    set_errno_and_return_minus_one( EFAULT );
+    rtems_set_errno_and_return_minus_one( EFAULT );
 
   strcpy( name->sysname, "RTEMS" );
Index: c/src/lib/libc/utsname.c
===================================================================
--- c/src/lib/libc/utsname.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ c/src/lib/libc/utsname.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -38,5 +38,5 @@
 
   if ( !name )
-    set_errno_and_return_minus_one( EFAULT );
+    rtems_set_errno_and_return_minus_one( EFAULT );
 
   strcpy( name->sysname, "RTEMS" );
Index: cpukit/libcsupport/src/utsname.c
===================================================================
--- cpukit/libcsupport/src/utsname.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/libcsupport/src/utsname.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -38,5 +38,5 @@
 
   if ( !name )
-    set_errno_and_return_minus_one( EFAULT );
+    rtems_set_errno_and_return_minus_one( EFAULT );
 
   strcpy( name->sysname, "RTEMS" );
Index: cpukit/posix/src/clockgetres.c
===================================================================
--- cpukit/posix/src/clockgetres.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/clockgetres.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -30,5 +30,5 @@
 {
   if ( !res )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
  
   switch ( clock_id ) {
@@ -49,5 +49,5 @@
  
     default:
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
  
   }
Index: cpukit/posix/src/clockgettime.c
===================================================================
--- cpukit/posix/src/clockgettime.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/clockgettime.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -34,5 +34,5 @@
 
   if ( !tp )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   switch ( clock_id ) {
@@ -63,5 +63,5 @@
 #endif
     default:
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
 
   }
Index: cpukit/posix/src/clocksettime.c
===================================================================
--- cpukit/posix/src/clocksettime.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/clocksettime.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -57,5 +57,5 @@
 
       if ( !_TOD_Validate( &tod ) )
-        set_errno_and_return_minus_one( EINVAL );
+        rtems_set_errno_and_return_minus_one( EINVAL );
  
       /*
@@ -82,5 +82,5 @@
 #endif
     default:
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
  
   }
Index: cpukit/posix/src/killinfo.c
===================================================================
--- cpukit/posix/src/killinfo.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/killinfo.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -64,5 +64,5 @@
  
   if ( pid != getpid() )
-    set_errno_and_return_minus_one( ESRCH );
+    rtems_set_errno_and_return_minus_one( ESRCH );
 
   /*
@@ -71,5 +71,5 @@
  
   if ( sig && !is_valid_signo(sig) ) {
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
   }
 
@@ -321,5 +321,5 @@
                _Chain_Get( &_POSIX_signals_Inactive_siginfo );
     if ( !psiginfo ) {
-      set_errno_and_return_minus_one( EAGAIN );
+      rtems_set_errno_and_return_minus_one( EAGAIN );
     }
 
Index: cpukit/posix/src/mqueueclose.c
===================================================================
--- cpukit/posix/src/mqueueclose.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/mqueueclose.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -48,9 +48,9 @@
   switch ( location ) {
     case OBJECTS_ERROR:
-      set_errno_and_return_minus_one( EBADF );
+      rtems_set_errno_and_return_minus_one( EBADF );
     case OBJECTS_REMOTE:
       _Thread_Dispatch();
       return POSIX_MP_NOT_IMPLEMENTED();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_LOCAL:
       the_mq->open_count -= 1;
Index: cpukit/posix/src/mqueuecreatesupp.c
===================================================================
--- cpukit/posix/src/mqueuecreatesupp.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/mqueuecreatesupp.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -68,10 +68,10 @@
     if ( attr_ptr->mq_maxmsg < 0 ){
       _Thread_Enable_dispatch();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     }
 
     if ( attr_ptr->mq_msgsize < 0 ){
       _Thread_Enable_dispatch();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     }
 
@@ -85,5 +85,5 @@
     _POSIX_Message_queue_Free( the_mq );
     _Thread_Enable_dispatch();
-    set_errno_and_return_minus_one( ENFILE );
+    rtems_set_errno_and_return_minus_one( ENFILE );
   }
 #endif
@@ -92,5 +92,5 @@
   if ( !the_mq ) {
     _Thread_Enable_dispatch();
-    set_errno_and_return_minus_one( ENFILE );
+    rtems_set_errno_and_return_minus_one( ENFILE );
   }
  
@@ -131,5 +131,5 @@
     _POSIX_Message_queue_Free( the_mq );
     _Thread_Enable_dispatch();
-    set_errno_and_return_minus_one( ENOSPC );
+    rtems_set_errno_and_return_minus_one( ENOSPC );
   }
 
Index: cpukit/posix/src/mqueuegetattr.c
===================================================================
--- cpukit/posix/src/mqueuegetattr.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/mqueuegetattr.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -48,14 +48,14 @@
  
   if ( !mqstat )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   the_mq = _POSIX_Message_queue_Get( mqdes, &location );
   switch ( location ) {
     case OBJECTS_ERROR:
-      set_errno_and_return_minus_one( EBADF );
+      rtems_set_errno_and_return_minus_one( EBADF );
     case OBJECTS_REMOTE:
       _Thread_Dispatch();
       return POSIX_MP_NOT_IMPLEMENTED();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_LOCAL:
       /*
Index: cpukit/posix/src/mqueuenotify.c
===================================================================
--- cpukit/posix/src/mqueuenotify.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/mqueuenotify.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -71,14 +71,14 @@
   switch ( location ) {
     case OBJECTS_ERROR:
-      set_errno_and_return_minus_one( EBADF );
+      rtems_set_errno_and_return_minus_one( EBADF );
     case OBJECTS_REMOTE:
       _Thread_Dispatch();
       return POSIX_MP_NOT_IMPLEMENTED();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_LOCAL:
       if ( notification ) {
         if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) {
           _Thread_Enable_dispatch();
-          set_errno_and_return_minus_one( EBUSY );
+          rtems_set_errno_and_return_minus_one( EBUSY );
         }
 
Index: cpukit/posix/src/mqueueopen.c
===================================================================
--- cpukit/posix/src/mqueueopen.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/mqueueopen.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -81,5 +81,5 @@
     if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
       _Thread_Enable_dispatch();
-      set_errno_and_return_minus_one_cast( status, mqd_t );
+      rtems_set_errno_and_return_minus_one_cast( status, mqd_t );
     }
 
@@ -92,5 +92,5 @@
     if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
       _Thread_Enable_dispatch();
-      set_errno_and_return_minus_one_cast( EEXIST, mqd_t );
+      rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t );
     }
 
Index: cpukit/posix/src/mqueuerecvsupp.c
===================================================================
--- cpukit/posix/src/mqueuerecvsupp.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/mqueuerecvsupp.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -56,18 +56,18 @@
   switch ( location ) {
     case OBJECTS_ERROR:
-      set_errno_and_return_minus_one( EBADF );
+      rtems_set_errno_and_return_minus_one( EBADF );
     case OBJECTS_REMOTE:
       _Thread_Dispatch();
       return POSIX_MP_NOT_IMPLEMENTED();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_LOCAL:
       if ( (the_mq->oflag & O_ACCMODE) == O_WRONLY ) {
         _Thread_Enable_dispatch();
-        set_errno_and_return_minus_one( EBADF );
+        rtems_set_errno_and_return_minus_one( EBADF );
       }
 
       if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
         _Thread_Enable_dispatch();
-        set_errno_and_return_minus_one( EMSGSIZE );
+        rtems_set_errno_and_return_minus_one( EMSGSIZE );
       }
  
@@ -95,5 +95,5 @@
         return length_out;
 
-      set_errno_and_return_minus_one(
+      rtems_set_errno_and_return_minus_one(
         _POSIX_Message_queue_Translate_core_message_queue_return_code(
           _Thread_Executing->Wait.return_code
Index: cpukit/posix/src/mqueuesendsupp.c
===================================================================
--- cpukit/posix/src/mqueuesendsupp.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/mqueuesendsupp.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -57,5 +57,5 @@
 
   if ( msg_prio > MQ_PRIO_MAX )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   the_mq = _POSIX_Message_queue_Get( mqdes, &location );
@@ -63,15 +63,15 @@
   switch ( location ) {
     case OBJECTS_ERROR:
-      set_errno_and_return_minus_one( EBADF );
+      rtems_set_errno_and_return_minus_one( EBADF );
 
     case OBJECTS_REMOTE:
       _Thread_Dispatch();
       return POSIX_MP_NOT_IMPLEMENTED();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
 
     case OBJECTS_LOCAL:
       if ( (the_mq->oflag & O_ACCMODE) == O_RDONLY ) {
         _Thread_Enable_dispatch();
-        set_errno_and_return_minus_one( EBADF );
+        rtems_set_errno_and_return_minus_one( EBADF );
       }
 
@@ -106,5 +106,5 @@
         return msg_status;
 
-      set_errno_and_return_minus_one(
+      rtems_set_errno_and_return_minus_one(
         _POSIX_Message_queue_Translate_core_message_queue_return_code(
           msg_status 
Index: cpukit/posix/src/mqueuesetattr.c
===================================================================
--- cpukit/posix/src/mqueuesetattr.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/mqueuesetattr.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -50,14 +50,14 @@
  
   if ( !mqstat )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   the_mq = _POSIX_Message_queue_Get( mqdes, &location );
   switch ( location ) {
     case OBJECTS_ERROR:
-      set_errno_and_return_minus_one( EBADF );
+      rtems_set_errno_and_return_minus_one( EBADF );
     case OBJECTS_REMOTE:
       _Thread_Dispatch();
       return POSIX_MP_NOT_IMPLEMENTED();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_LOCAL:
 
Index: cpukit/posix/src/mqueueunlink.c
===================================================================
--- cpukit/posix/src/mqueueunlink.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/mqueueunlink.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -51,5 +51,5 @@
    if ( status != 0 ) {
     _Thread_Enable_dispatch();
-    set_errno_and_return_minus_one( status );
+    rtems_set_errno_and_return_minus_one( status );
    }
 
@@ -60,5 +60,5 @@
   if ( !_Objects_Is_local_id(the_mq_id) ) {
     _Thread_Enable_dispatch();
-    set_errno_and_return_minus_one( ENOSYS );
+    rtems_set_errno_and_return_minus_one( ENOSYS );
   }
 
Index: cpukit/posix/src/nanosleep.c
===================================================================
--- cpukit/posix/src/nanosleep.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/nanosleep.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -33,5 +33,5 @@
 
   if ( !rqtp )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   the_rqtp = (struct timespec *)rqtp;
@@ -48,8 +48,8 @@
 
   if ( /* the_rqtp->tv_sec < 0 || */ the_rqtp->tv_nsec < 0 )
-    set_errno_and_return_minus_one( EAGAIN );
+    rtems_set_errno_and_return_minus_one( EAGAIN );
 
   if ( the_rqtp->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
  
   ticks = _POSIX_Timespec_to_interval( the_rqtp );
@@ -98,5 +98,5 @@
 
     if ( ticks )
-      set_errno_and_return_minus_one( EINTR );
+      rtems_set_errno_and_return_minus_one( EINTR );
   }
 
Index: cpukit/posix/src/pthreadkill.c
===================================================================
--- cpukit/posix/src/pthreadkill.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/pthreadkill.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -36,9 +36,9 @@
 
   if ( sig && !is_valid_signo(sig) )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
 /* commented out when posix timers added 
   if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO )
-    set_errno_and_return_minus_one( ENOSYS );
+    rtems_set_errno_and_return_minus_one( ENOSYS );
 */
 
@@ -47,5 +47,5 @@
     case OBJECTS_ERROR:
     case OBJECTS_REMOTE:
-      set_errno_and_return_minus_one( ESRCH );
+      rtems_set_errno_and_return_minus_one( ESRCH );
     case OBJECTS_LOCAL:
       /*
Index: cpukit/posix/src/pthreadsigmask.c
===================================================================
--- cpukit/posix/src/pthreadsigmask.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/pthreadsigmask.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -36,5 +36,5 @@
 
   if ( !set && !oset )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
@@ -57,5 +57,5 @@
       break;
     default:
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
   }
 
Index: cpukit/posix/src/ptimer1.c
===================================================================
--- cpukit/posix/src/ptimer1.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/ptimer1.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -282,5 +282,5 @@
          ( evp->sigev_notify != SIGEV_SIGNAL ) ) {
        /* The value of the field sigev_notify is not valid */
-       set_errno_and_return_minus_one( EINVAL );
+       rtems_set_errno_and_return_minus_one( EINVAL );
      }
   }
@@ -307,5 +307,5 @@
 	    * supports it. It will necessaty to increase the structure used */
 
-           set_errno_and_return_minus_one( EAGAIN );
+           rtems_set_errno_and_return_minus_one( EAGAIN );
         }
 
@@ -339,10 +339,10 @@
      case RTEMS_INVALID_NAME : /* The assigned name is not valid */
 
-       set_errno_and_return_minus_one( EINVAL );
+       rtems_set_errno_and_return_minus_one( EINVAL );
 
      case RTEMS_TOO_MANY :
 
        /* There has been created too much timers for the same process */
-       set_errno_and_return_minus_one( EAGAIN );
+       rtems_set_errno_and_return_minus_one( EAGAIN );
      
      default :
@@ -354,5 +354,5 @@
         */
 
-       set_errno_and_return_minus_one( EINVAL );
+       rtems_set_errno_and_return_minus_one( EINVAL );
   }
 
@@ -361,5 +361,5 @@
    */
 
-  set_errno_and_return_minus_one( EINVAL );
+  rtems_set_errno_and_return_minus_one( EINVAL );
 }
 
@@ -392,5 +392,5 @@
    if ( timer_pos == BAD_TIMER_C ) {
       /* The timer identifier is erroneus */
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
    }
 
@@ -401,5 +401,5 @@
    if ( status == RTEMS_INVALID_ID ) {
      /* The timer identifier is erroneus */
-     set_errno_and_return_minus_one( EINVAL );
+     rtems_set_errno_and_return_minus_one( EINVAL );
    }
 
@@ -438,5 +438,5 @@
    if ( timer_pos == BAD_TIMER_C ) {
      /* The timer identifier is erroneus */
-     set_errno_and_return_minus_one( EINVAL );
+     rtems_set_errno_and_return_minus_one( EINVAL );
    }
 
@@ -445,5 +445,5 @@
 	error but the variable errno is not actualized */
 
-     set_errno_and_return_minus_one( EINVAL );
+     rtems_set_errno_and_return_minus_one( EINVAL );
    }
 
@@ -488,5 +488,5 @@
        /* The number of nanoseconds is not correct */
 
-       set_errno_and_return_minus_one( EINVAL );
+       rtems_set_errno_and_return_minus_one( EINVAL );
     }
 
@@ -611,5 +611,5 @@
                * situation can not occur, but the solution is easy */ 
 
-              set_errno_and_return_minus_one( EINVAL );
+              rtems_set_errno_and_return_minus_one( EINVAL );
 
               break;
@@ -626,5 +626,5 @@
                */
 
-              set_errno_and_return_minus_one( EINVAL );
+              rtems_set_errno_and_return_minus_one( EINVAL );
               break;
            
@@ -688,5 +688,5 @@
   if ( timer_pos == BAD_TIMER_C ) {
     /* The timer identifier is erroneus */  
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
   }
 
@@ -775,5 +775,5 @@
   if ( timer_pos == BAD_TIMER_C ) {
     /* The timer identifier is erroneus */
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
   }
 
Index: cpukit/posix/src/sched.c
===================================================================
--- cpukit/posix/src/sched.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/sched.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -29,5 +29,5 @@
 )
 {
-  set_errno_and_return_minus_one( ENOSYS );
+  rtems_set_errno_and_return_minus_one( ENOSYS );
 }
 
@@ -42,5 +42,5 @@
 )
 {
-  set_errno_and_return_minus_one( ENOSYS );
+  rtems_set_errno_and_return_minus_one( ENOSYS );
 }
 
@@ -57,5 +57,5 @@
 )
 {
-  set_errno_and_return_minus_one( ENOSYS );
+  rtems_set_errno_and_return_minus_one( ENOSYS );
 }
 
@@ -69,5 +69,5 @@
 )
 {
-  set_errno_and_return_minus_one( ENOSYS );
+  rtems_set_errno_and_return_minus_one( ENOSYS );
 }
 
@@ -89,5 +89,5 @@
  
     default:
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
   }
 
@@ -112,5 +112,5 @@
  
     default:
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
   }
 
@@ -135,8 +135,8 @@
 
   if ( pid && pid != getpid() )
-    set_errno_and_return_minus_one( ESRCH );
+    rtems_set_errno_and_return_minus_one( ESRCH );
 
   if ( !interval )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   _POSIX_Interval_to_timespec( _Thread_Ticks_per_timeslice, interval );
Index: cpukit/posix/src/semaphorecreatesupp.c
===================================================================
--- cpukit/posix/src/semaphorecreatesupp.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/semaphorecreatesupp.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -14,4 +14,5 @@
 #include <semaphore.h>
 #include <limits.h>
+#include <string.h>	/* strlen */
 
 #include <rtems/system.h>
@@ -45,5 +46,5 @@
   if (pshared != 0) {
     _Thread_Enable_dispatch();
-    set_errno_and_return_minus_one( ENOSYS );
+    rtems_set_errno_and_return_minus_one( ENOSYS );
   }
 
@@ -51,5 +52,5 @@
     if( strlen(name) > PATH_MAX ) { 
       _Thread_Enable_dispatch();
-      set_errno_and_return_minus_one( ENAMETOOLONG );
+      rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
     }
   }
@@ -59,5 +60,5 @@
   if ( !the_semaphore ) {
     _Thread_Enable_dispatch();
-    set_errno_and_return_minus_one( ENOSPC );
+    rtems_set_errno_and_return_minus_one( ENOSPC );
   }
  
@@ -68,5 +69,5 @@
     _POSIX_Semaphore_Free( the_semaphore );
     _Thread_Enable_dispatch();
-    set_errno_and_return_minus_one( EAGAIN );
+    rtems_set_errno_and_return_minus_one( EAGAIN );
   }
 #endif
Index: cpukit/posix/src/semaphorewaitsupp.c
===================================================================
--- cpukit/posix/src/semaphorewaitsupp.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/semaphorewaitsupp.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -38,8 +38,8 @@
   switch ( location ) {
     case OBJECTS_ERROR:
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_REMOTE:
       _Thread_Dispatch();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_LOCAL:
       _CORE_semaphore_Seize(
@@ -54,9 +54,9 @@
 	  break;
         case CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT:
-          set_errno_and_return_minus_one( EAGAIN );
+          rtems_set_errno_and_return_minus_one( EAGAIN );
         case CORE_SEMAPHORE_WAS_DELETED:
-          set_errno_and_return_minus_one( EAGAIN );
+          rtems_set_errno_and_return_minus_one( EAGAIN );
         case CORE_SEMAPHORE_TIMEOUT:
-          set_errno_and_return_minus_one( ETIMEDOUT );
+          rtems_set_errno_and_return_minus_one( ETIMEDOUT );
 	  break;
         case CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED:
Index: cpukit/posix/src/semclose.c
===================================================================
--- cpukit/posix/src/semclose.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/semclose.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -41,9 +41,9 @@
   switch ( location ) {
     case OBJECTS_ERROR:
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_REMOTE:
       _Thread_Dispatch();
       return POSIX_MP_NOT_IMPLEMENTED();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_LOCAL:
       the_semaphore->open_count -= 1;
Index: cpukit/posix/src/semdestroy.c
===================================================================
--- cpukit/posix/src/semdestroy.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/semdestroy.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -36,9 +36,9 @@
   switch ( location ) {
     case OBJECTS_ERROR:
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_REMOTE:
       _Thread_Dispatch();
       return POSIX_MP_NOT_IMPLEMENTED();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_LOCAL:
       /*
@@ -48,5 +48,5 @@
       if ( the_semaphore->named == TRUE ) {
         _Thread_Enable_dispatch();
-        set_errno_and_return_minus_one( EINVAL );
+        rtems_set_errno_and_return_minus_one( EINVAL );
       }
  
Index: cpukit/posix/src/semgetvalue.c
===================================================================
--- cpukit/posix/src/semgetvalue.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/semgetvalue.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -37,9 +37,9 @@
   switch ( location ) {
     case OBJECTS_ERROR:
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_REMOTE:
       _Thread_Dispatch();
       return POSIX_MP_NOT_IMPLEMENTED();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_LOCAL:
       *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore );
Index: cpukit/posix/src/seminit.c
===================================================================
--- cpukit/posix/src/seminit.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/seminit.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -36,5 +36,5 @@
 
   if ( !sem )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
     
   status = _POSIX_Semaphore_Create_support(
Index: cpukit/posix/src/semopen.c
===================================================================
--- cpukit/posix/src/semopen.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/semopen.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -77,5 +77,5 @@
     if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
       _Thread_Enable_dispatch();
-      set_errno_and_return_minus_one_cast( status, sem_t * );
+      rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
     }
   } else { 
@@ -87,5 +87,5 @@
     if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
       _Thread_Enable_dispatch();
-      set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
+      rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
     }
 
Index: cpukit/posix/src/sempost.c
===================================================================
--- cpukit/posix/src/sempost.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/sempost.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -36,9 +36,9 @@
   switch ( location ) {
     case OBJECTS_ERROR:
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_REMOTE:
       _Thread_Dispatch();
       return POSIX_MP_NOT_IMPLEMENTED();
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     case OBJECTS_LOCAL:
       _CORE_semaphore_Surrender(
Index: cpukit/posix/src/semunlink.c
===================================================================
--- cpukit/posix/src/semunlink.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/semunlink.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -44,5 +44,5 @@
   if ( status != 0 ) {
     _Thread_Enable_dispatch();
-    set_errno_and_return_minus_one( status );
+    rtems_set_errno_and_return_minus_one( status );
   }
 
@@ -53,5 +53,5 @@
   if ( !_Objects_Is_local_id(the_semaphore_id) ) {
     _Thread_Enable_dispatch();
-    set_errno_and_return_minus_one( ENOSYS );
+    rtems_set_errno_and_return_minus_one( ENOSYS );
   }
 
Index: cpukit/posix/src/setpgid.c
===================================================================
--- cpukit/posix/src/setpgid.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/setpgid.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -26,4 +26,4 @@
 )
 {
-  set_errno_and_return_minus_one( ENOSYS );
+  rtems_set_errno_and_return_minus_one( ENOSYS );
 }
Index: cpukit/posix/src/setsid.c
===================================================================
--- cpukit/posix/src/setsid.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/setsid.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -23,5 +23,5 @@
 pid_t setsid( void )
 {
-  set_errno_and_return_minus_one( EPERM );
+  rtems_set_errno_and_return_minus_one( EPERM );
 }
 
Index: cpukit/posix/src/sigaction.c
===================================================================
--- cpukit/posix/src/sigaction.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/sigaction.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -47,5 +47,5 @@
 
   if ( !is_valid_signo(sig) )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
   
   /* 
@@ -57,5 +57,5 @@
 
   if ( sig == SIGKILL )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
   
   /*
Index: cpukit/posix/src/sigaddset.c
===================================================================
--- cpukit/posix/src/sigaddset.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/sigaddset.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -30,5 +30,5 @@
 {
   if ( !set )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   if ( !signo )
@@ -36,5 +36,5 @@
 
   if ( !is_valid_signo(signo) )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   *set |= signo_to_mask(signo);
Index: cpukit/posix/src/sigdelset.c
===================================================================
--- cpukit/posix/src/sigdelset.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/sigdelset.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -34,5 +34,5 @@
 {
   if ( !set )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   if ( !signo )
@@ -40,5 +40,5 @@
 
   if ( !is_valid_signo(signo) )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   *set &= ~signo_to_mask(signo);
Index: cpukit/posix/src/sigemptyset.c
===================================================================
--- cpukit/posix/src/sigemptyset.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/sigemptyset.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -29,5 +29,5 @@
 {
   if ( !set )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   *set = 0;
Index: cpukit/posix/src/sigfillset.c
===================================================================
--- cpukit/posix/src/sigfillset.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/sigfillset.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -29,5 +29,5 @@
 {
   if ( !set )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   *set = SIGNAL_ALL_MASK;
Index: cpukit/posix/src/sigismember.c
===================================================================
--- cpukit/posix/src/sigismember.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/sigismember.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -30,5 +30,5 @@
 {
   if ( !set )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   if ( !signo )
@@ -36,5 +36,5 @@
 
   if ( !is_valid_signo(signo) )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   if ( *set & signo_to_mask(signo) )
Index: cpukit/posix/src/sigpending.c
===================================================================
--- cpukit/posix/src/sigpending.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/sigpending.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -31,5 +31,5 @@
 
   if ( !set )
-    set_errno_and_return_minus_one( EINVAL );
+    rtems_set_errno_and_return_minus_one( EINVAL );
 
   api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
Index: cpukit/posix/src/sigtimedwait.c
===================================================================
--- cpukit/posix/src/sigtimedwait.c	(revision d4651e4104b33dd6683671302524f0bec3bd1cb7)
+++ cpukit/posix/src/sigtimedwait.c	(revision e180a77eddb4a2e4e7fdaf00dae66234d4d309d6)
@@ -71,5 +71,5 @@
     if ( timeout->tv_nsec < 0 ||
          timeout->tv_nsec >= TOD_NANOSECONDS_PER_SECOND) {
-      set_errno_and_return_minus_one( EINVAL );
+      rtems_set_errno_and_return_minus_one( EINVAL );
     }
 
