Commit 2bb76715 by Jose Ruiz Committed by Arnaud Charlet

errno.c (__get_errno, [...]): Transform then into weak symbols so we use the…

errno.c (__get_errno, [...]): Transform then into weak symbols so we use the version provided by MaRTE when...

2008-08-20  Jose Ruiz  <ruiz@adacore.com>

	* errno.c (__get_errno, __set_errno for MaRTE): Transform then into
	weak symbols so we use the version provided by MaRTE when available.

From-SVN: r139332
parent 2dd8670a
......@@ -43,18 +43,15 @@
#ifdef MaRTE
/* Function that returns a pointer to the per-task errno variable */
extern int *pthread_errno (void);
/* MaRTE OS provides its own implementation of errno related functionality. We
want to ensure the use of the MaRTE version for tasking programs (the MaRTE
library will not be linked if no tasking constructs are used), so we use the
weak symbols mechanism to use the MaRTE version whenever is available. */
int
__get_errno (void)
{
return *pthread_errno ();
}
/* Function __set_errno is already defined in package MaRTE.POSIX_Pthread */
#pragma weak __get_errno
#pragma weak __set_errno
#else
#endif
#include <errno.h>
int
......@@ -68,5 +65,3 @@ __set_errno(int err)
{
errno = err;
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment