summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-01-30 20:59:22 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-01-30 20:59:22 +0000
commit421dfef68ecd8f424f987d75df3c3080108c5925 (patch)
tree9c4b8fae8fc3532ff25f3e633d3cad7dd419b942
parent243ce5d741d2eb0e7268e3b0a9672419029d7e81 (diff)
downloadrtems-421dfef68ecd8f424f987d75df3c3080108c5925.tar.bz2
Corrected Linux port for glibc2
-rw-r--r--c/src/exec/libcsupport/src/__times.c2
-rw-r--r--c/src/exec/libcsupport/src/malloc.c2
-rw-r--r--c/src/lib/libbsp/unix/posix/startup/bspstart.c2
-rw-r--r--c/src/lib/libc/__times.c2
-rw-r--r--c/src/lib/libc/malloc.c2
-rw-r--r--c/src/lib/libmisc/monitor/mon-symbols.c3
-rw-r--r--c/src/libmisc/monitor/mon-symbols.c3
-rw-r--r--cpukit/libcsupport/src/__times.c2
-rw-r--r--cpukit/libcsupport/src/malloc.c2
-rw-r--r--cpukit/libmisc/monitor/mon-symbols.c3
10 files changed, 16 insertions, 7 deletions
diff --git a/c/src/exec/libcsupport/src/__times.c b/c/src/exec/libcsupport/src/__times.c
index d0b96a8657..3a8812a8b3 100644
--- a/c/src/exec/libcsupport/src/__times.c
+++ b/c/src/exec/libcsupport/src/__times.c
@@ -63,6 +63,7 @@ clock_t times(
return _times( ptms );
}
+#if defined(RTEMS_NEWLIB)
clock_t _times_r(
struct _reent *ptr,
struct tms *ptms
@@ -70,3 +71,4 @@ clock_t _times_r(
{
return _times(ptms);
}
+#endif
diff --git a/c/src/exec/libcsupport/src/malloc.c b/c/src/exec/libcsupport/src/malloc.c
index 35acf86a2f..1c0c00b732 100644
--- a/c/src/exec/libcsupport/src/malloc.c
+++ b/c/src/exec/libcsupport/src/malloc.c
@@ -28,7 +28,7 @@
#include <string.h>
/* for sbrk prototype in linux */
-#if defined(linux)
+#if defined(__linux__)
#define __USE_MISC
#endif
#include <unistd.h> /* sbrk(2) */
diff --git a/c/src/lib/libbsp/unix/posix/startup/bspstart.c b/c/src/lib/libbsp/unix/posix/startup/bspstart.c
index d91d8f95a0..e0b14f91f3 100644
--- a/c/src/lib/libbsp/unix/posix/startup/bspstart.c
+++ b/c/src/lib/libbsp/unix/posix/startup/bspstart.c
@@ -27,7 +27,7 @@
#include <fcntl.h>
/* for sbrk prototype in linux */
-#if defined(linux)
+#if defined(__linux__)
#define __USE_MISC
#endif
#include <unistd.h>
diff --git a/c/src/lib/libc/__times.c b/c/src/lib/libc/__times.c
index d0b96a8657..3a8812a8b3 100644
--- a/c/src/lib/libc/__times.c
+++ b/c/src/lib/libc/__times.c
@@ -63,6 +63,7 @@ clock_t times(
return _times( ptms );
}
+#if defined(RTEMS_NEWLIB)
clock_t _times_r(
struct _reent *ptr,
struct tms *ptms
@@ -70,3 +71,4 @@ clock_t _times_r(
{
return _times(ptms);
}
+#endif
diff --git a/c/src/lib/libc/malloc.c b/c/src/lib/libc/malloc.c
index 35acf86a2f..1c0c00b732 100644
--- a/c/src/lib/libc/malloc.c
+++ b/c/src/lib/libc/malloc.c
@@ -28,7 +28,7 @@
#include <string.h>
/* for sbrk prototype in linux */
-#if defined(linux)
+#if defined(__linux__)
#define __USE_MISC
#endif
#include <unistd.h> /* sbrk(2) */
diff --git a/c/src/lib/libmisc/monitor/mon-symbols.c b/c/src/lib/libmisc/monitor/mon-symbols.c
index 1fed3c47f7..48781bb6cc 100644
--- a/c/src/lib/libmisc/monitor/mon-symbols.c
+++ b/c/src/lib/libmisc/monitor/mon-symbols.c
@@ -12,7 +12,8 @@
*/
/* for strcasecmp in linux and solaris */
-#if defined(linux)
+#if defined(__linux__)
+#include <features.h>
#define __USE_BSD
#endif
#include <string.h>
diff --git a/c/src/libmisc/monitor/mon-symbols.c b/c/src/libmisc/monitor/mon-symbols.c
index 1fed3c47f7..48781bb6cc 100644
--- a/c/src/libmisc/monitor/mon-symbols.c
+++ b/c/src/libmisc/monitor/mon-symbols.c
@@ -12,7 +12,8 @@
*/
/* for strcasecmp in linux and solaris */
-#if defined(linux)
+#if defined(__linux__)
+#include <features.h>
#define __USE_BSD
#endif
#include <string.h>
diff --git a/cpukit/libcsupport/src/__times.c b/cpukit/libcsupport/src/__times.c
index d0b96a8657..3a8812a8b3 100644
--- a/cpukit/libcsupport/src/__times.c
+++ b/cpukit/libcsupport/src/__times.c
@@ -63,6 +63,7 @@ clock_t times(
return _times( ptms );
}
+#if defined(RTEMS_NEWLIB)
clock_t _times_r(
struct _reent *ptr,
struct tms *ptms
@@ -70,3 +71,4 @@ clock_t _times_r(
{
return _times(ptms);
}
+#endif
diff --git a/cpukit/libcsupport/src/malloc.c b/cpukit/libcsupport/src/malloc.c
index 35acf86a2f..1c0c00b732 100644
--- a/cpukit/libcsupport/src/malloc.c
+++ b/cpukit/libcsupport/src/malloc.c
@@ -28,7 +28,7 @@
#include <string.h>
/* for sbrk prototype in linux */
-#if defined(linux)
+#if defined(__linux__)
#define __USE_MISC
#endif
#include <unistd.h> /* sbrk(2) */
diff --git a/cpukit/libmisc/monitor/mon-symbols.c b/cpukit/libmisc/monitor/mon-symbols.c
index 1fed3c47f7..48781bb6cc 100644
--- a/cpukit/libmisc/monitor/mon-symbols.c
+++ b/cpukit/libmisc/monitor/mon-symbols.c
@@ -12,7 +12,8 @@
*/
/* for strcasecmp in linux and solaris */
-#if defined(linux)
+#if defined(__linux__)
+#include <features.h>
#define __USE_BSD
#endif
#include <string.h>