summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-11-06 13:04:11 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-11-07 07:52:55 +0100
commitd1f7204649ff7c8bed36eab5af20c1a108af8b14 (patch)
treed61f8e715001e2e7538186c142f0c3d04a6fe1f8 /cpukit/libcsupport
parentspconfig02: Check object methods in default config (diff)
downloadrtems-d1f7204649ff7c8bed36eab5af20c1a108af8b14.tar.bz2
config: Fix CONFIGURE_DISABLE_NEWLIB_REENTRANCY
Move the __getreent() variant using the global reentrancy structure to librtemscpu.a. This avoids a definition of __getreent() in the configuration module if CONFIGURE_DISABLE_NEWLIB_REENTRANCY is defined. This avoids all the dependencies which would be exposed by a reference to the global reentrancy structure. This change is only possible since the default configuration moved to librtemsdefaultconfig.a recently.
Diffstat (limited to 'cpukit/libcsupport')
-rw-r--r--cpukit/libcsupport/src/getreentglobal.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/cpukit/libcsupport/src/getreentglobal.c b/cpukit/libcsupport/src/getreentglobal.c
new file mode 100644
index 0000000000..775b4462cc
--- /dev/null
+++ b/cpukit/libcsupport/src/getreentglobal.c
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2018 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Dornierstr. 4
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#if defined(RTEMS_NEWLIB)
+#include <sys/reent.h>
+
+struct _reent *__getreent(void)
+{
+ return _GLOBAL_REENT;
+}
+#endif