diff --git a/c/src/exec/posix/ChangeLog b/c/src/exec/posix/ChangeLog index 90eb3a390b..5053b6bf37 100644 --- a/c/src/exec/posix/ChangeLog +++ b/c/src/exec/posix/ChangeLog @@ -1,3 +1,7 @@ +2000-11-30 Joel Sherrill + + * inline/rtems/posix/mqueue.inl: Removed explicit dependency on abs(). + 2000-11-27 Joel Sherrill * src/sysconf.c: Add support for _SC_CLK_TCK and _SC_OPEN_MAX. diff --git a/c/src/exec/posix/inline/rtems/posix/mqueue.inl b/c/src/exec/posix/inline/rtems/posix/mqueue.inl index e6da6674b4..4feaed5b59 100644 --- a/c/src/exec/posix/inline/rtems/posix/mqueue.inl +++ b/c/src/exec/posix/inline/rtems/posix/mqueue.inl @@ -102,7 +102,8 @@ RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core( CORE_message_queue_Submit_types priority ) { - return abs( priority ); + /* absolute value without a library dependency */ + return ((priority >= 0) ? priority : -priority); } #endif diff --git a/cpukit/posix/ChangeLog b/cpukit/posix/ChangeLog index 90eb3a390b..5053b6bf37 100644 --- a/cpukit/posix/ChangeLog +++ b/cpukit/posix/ChangeLog @@ -1,3 +1,7 @@ +2000-11-30 Joel Sherrill + + * inline/rtems/posix/mqueue.inl: Removed explicit dependency on abs(). + 2000-11-27 Joel Sherrill * src/sysconf.c: Add support for _SC_CLK_TCK and _SC_OPEN_MAX. diff --git a/cpukit/posix/inline/rtems/posix/mqueue.inl b/cpukit/posix/inline/rtems/posix/mqueue.inl index e6da6674b4..4feaed5b59 100644 --- a/cpukit/posix/inline/rtems/posix/mqueue.inl +++ b/cpukit/posix/inline/rtems/posix/mqueue.inl @@ -102,7 +102,8 @@ RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core( CORE_message_queue_Submit_types priority ) { - return abs( priority ); + /* absolute value without a library dependency */ + return ((priority >= 0) ? priority : -priority); } #endif