* *
* C Implementation File *
* *
- * Copyright (C) 1992-2005 Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2008, Free Software Foundation, Inc. *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
#define _THREAD_SAFE
#define _SGI_MP_SOURCE
+#ifdef MaRTE
+
+/* 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. */
+
+#pragma weak __get_errno
+#pragma weak __set_errno
+
+#endif
+
#include <errno.h>
int
__get_errno(void)