summaryrefslogtreecommitdiffstats
path: root/c/src/exec
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/exec')
-rw-r--r--c/src/exec/posix/ChangeLog9
-rw-r--r--c/src/exec/posix/src/Makefile.am10
-rw-r--r--c/src/exec/posix/src/getpagesize.c23
-rw-r--r--c/src/exec/posix/src/mprotect.c23
-rw-r--r--c/src/exec/posix/src/sysconf.c7
5 files changed, 67 insertions, 5 deletions
diff --git a/c/src/exec/posix/ChangeLog b/c/src/exec/posix/ChangeLog
index f7cccea68b..65cde9f685 100644
--- a/c/src/exec/posix/ChangeLog
+++ b/c/src/exec/posix/ChangeLog
@@ -1,3 +1,12 @@
+2001-09-13 Joel Sherrill <joel@OARcorp.com>
+
+ * src/mprotect.c: New file. Stub required by some gcc's to pass tests.
+ In particular, about 350 ACATS tests fail if this is not present.
+ * src/getpagesize.c: Ditto.
+ * src/sysconf.c: Addition of Solaris value for _SC_STACK_PROT required
+ to pass about 350 ACATS test cases.
+ * src/Makefile.am: Added new files.
+
2001-08-30 Joel Sherrill <joel@OARcorp.com>
* macros/rtems/posix/mqueue.inl: Add cast so negation works.
diff --git a/c/src/exec/posix/src/Makefile.am b/c/src/exec/posix/src/Makefile.am
index 3df5b47f38..c841f96353 100644
--- a/c/src/exec/posix/src/Makefile.am
+++ b/c/src/exec/posix/src/Makefile.am
@@ -29,6 +29,8 @@ ID_C_FILES = getegid.c geteuid.c getgid.c getgroups.c getlogin.c getpgrp.c \
KEY_C_FILES = key.c keycreate.c keydelete.c keygetspecific.c \
keyrundestructors.c keysetspecific.c
+MEMORY_C_FILES = getpagesize.c mprotect.c
+
MESSAGE_QUEUE_C_FILES = mqueue.c mqueueclose.c mqueuecreatesupp.c \
mqueuedeletesupp.c mqueuegetattr.c mqueuenametoid.c mqueuenotify.c \
mqueueopen.c mqueuereceive.c mqueuerecvsupp.c mqueuesend.c \
@@ -77,10 +79,10 @@ TIME_C_FILES = time.c posixtimespecsubtract.c posixtimespectointerval.c \
TIMER_C_FILES = ptimer.c ptimer1.c
C_FILES = adasupp.c $(CANCEL_C_FILES) $(CONDITION_VARIABLE_C_FILES) \
- $(ID_C_FILES) $(KEY_C_FILES) $(MESSAGE_QUEUE_C_FILES) $(MUTEX_C_FILES) \
- $(PTHREAD_C_FILES) $(PSIGNAL_C_FILES) sched.c $(SEMAPHORE_C_FILES) \
- sysconf.c $(TIME_C_FILES) $(TIMER_C_FILES) types.c $(ENOSYS_C_FILES) \
- $(BUILD_FOR_NOW_C_FILES) utsname.c
+ $(ID_C_FILES) $(KEY_C_FILES) $(MEMORY_C_FILES) $(MESSAGE_QUEUE_C_FILES) \
+ $(MUTEX_C_FILES) $(PTHREAD_C_FILES) $(PSIGNAL_C_FILES) sched.c \
+ $(SEMAPHORE_C_FILES) sysconf.c $(TIME_C_FILES) $(TIMER_C_FILES) types.c \
+ $(ENOSYS_C_FILES) $(BUILD_FOR_NOW_C_FILES) utsname.c
C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
OBJS = $(C_O_FILES)
diff --git a/c/src/exec/posix/src/getpagesize.c b/c/src/exec/posix/src/getpagesize.c
new file mode 100644
index 0000000000..806c500a9b
--- /dev/null
+++ b/c/src/exec/posix/src/getpagesize.c
@@ -0,0 +1,23 @@
+/*
+ * $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <unistd.h>
+
+/*PAGE
+ *
+ * Get System Page Size (from SVR4 and 4.2+ BSD)
+ *
+ * This is not a functional version but the SPARC backend for at least
+ * gcc 2.8.1 plus gnat 3.13p and gcc 3.0.1 require it to be there and
+ * return a reasonable value.
+ */
+
+size_t getpagesize(void)
+{
+ return 4096;
+}
diff --git a/c/src/exec/posix/src/mprotect.c b/c/src/exec/posix/src/mprotect.c
new file mode 100644
index 0000000000..60740615b5
--- /dev/null
+++ b/c/src/exec/posix/src/mprotect.c
@@ -0,0 +1,23 @@
+/*
+ * $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <unistd.h>
+
+/*PAGE
+ *
+ * 12.2.3 Change Memory Protection, P1003.1b-1996, p. 277.
+ *
+ * This is not a functional version but the SPARC backend for at least
+ * gcc 2.8.1 plus gnat 3.13p and gcc 3.0.1 require it to be there and
+ * return 0.
+ */
+
+int mprotect(const void *addr, size_t len, int prot)
+{
+ return 0;
+}
diff --git a/c/src/exec/posix/src/sysconf.c b/c/src/exec/posix/src/sysconf.c
index ac7a4104c5..534689892b 100644
--- a/c/src/exec/posix/src/sysconf.c
+++ b/c/src/exec/posix/src/sysconf.c
@@ -26,11 +26,16 @@ long sysconf(
case _SC_CLK_TCK:
return _TOD_Ticks_per_second;
- case _SC_OPEN_MAX: {
+o case _SC_OPEN_MAX: {
extern unsigned32 rtems_libio_number_iops;
return rtems_libio_number_iops;
}
+#if defined(__sparc__)
+ case 515: /* Solaris _SC_STACK_PROT */
+ return 0;
+#endif
+
default:
break;
}