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.
This commit is contained in:
Joel Sherrill
2001-09-13 13:23:37 +00:00
parent 986e111357
commit bc51d7e98f
10 changed files with 134 additions and 10 deletions

View File

@@ -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.

View File

@@ -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)

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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.

View File

@@ -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)

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;
}