summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJennifer Averett <Jennifer.Averett@OARcorp.com>1998-12-03 22:17:13 +0000
committerJennifer Averett <Jennifer.Averett@OARcorp.com>1998-12-03 22:17:13 +0000
commit7a3878b26f5a94c3b88e715ccf84d097e925fe87 (patch)
tree6ac83618de002201073ae27d99b36645072e8f98
parentAdded a imfs fdatasync routine that gets called for fdatasync and datasync. (diff)
downloadrtems-7a3878b26f5a94c3b88e715ccf84d097e925fe87.tar.bz2
Modifications for RTEMS_UNIX.
-rw-r--r--c/src/exec/include/rtems/libio_.h5
-rw-r--r--c/src/exec/libcsupport/include/rtems/libio.h1
-rw-r--r--c/src/exec/libcsupport/include/rtems/libio_.h5
-rw-r--r--c/src/exec/libcsupport/src/base_fs.c2
-rw-r--r--c/src/exec/libfs/src/imfs/ioman.c11
-rw-r--r--c/src/lib/include/rtems/libio.h1
-rw-r--r--c/src/lib/include/rtems/libio_.h5
-rw-r--r--c/src/lib/libc/base_fs.c2
-rw-r--r--c/src/lib/libc/ioman.c11
-rw-r--r--c/src/lib/libc/libio.h1
-rw-r--r--c/src/lib/libc/libio_.h5
-rw-r--r--c/src/libfs/src/imfs/ioman.c11
-rw-r--r--cpukit/include/rtems/libio_.h5
-rw-r--r--cpukit/libcsupport/include/rtems/libio.h1
-rw-r--r--cpukit/libcsupport/include/rtems/libio_.h5
-rw-r--r--cpukit/libcsupport/src/base_fs.c2
-rw-r--r--cpukit/libfs/src/imfs/ioman.c11
17 files changed, 80 insertions, 4 deletions
diff --git a/c/src/exec/include/rtems/libio_.h b/c/src/exec/include/rtems/libio_.h
index bb6f81f35a..33a9e7bda5 100644
--- a/c/src/exec/include/rtems/libio_.h
+++ b/c/src/exec/include/rtems/libio_.h
@@ -27,6 +27,7 @@ extern "C" {
#include <fcntl.h> /* O_RDONLY, et.al. */
#include <assert.h>
#include <stdarg.h>
+#include <errno.h>
#if ! defined(O_NDELAY)
# if defined(solaris2)
@@ -36,6 +37,10 @@ extern "C" {
# endif
#endif
+#if !defined(ENOTSUP)
+#define ENOTSUP EOPNOTSUPP
+#endif
+
#include <errno.h>
#include <string.h> /* strcmp */
#include <unistd.h>
diff --git a/c/src/exec/libcsupport/include/rtems/libio.h b/c/src/exec/libcsupport/include/rtems/libio.h
index 76a90954b0..ee0aaf9b7f 100644
--- a/c/src/exec/libcsupport/include/rtems/libio.h
+++ b/c/src/exec/libcsupport/include/rtems/libio.h
@@ -20,6 +20,7 @@
#ifndef _RTEMS_LIBIO_H
#define _RTEMS_LIBIO_H
+#include <sys/types.h>
#include <sys/stat.h>
/*
diff --git a/c/src/exec/libcsupport/include/rtems/libio_.h b/c/src/exec/libcsupport/include/rtems/libio_.h
index bb6f81f35a..33a9e7bda5 100644
--- a/c/src/exec/libcsupport/include/rtems/libio_.h
+++ b/c/src/exec/libcsupport/include/rtems/libio_.h
@@ -27,6 +27,7 @@ extern "C" {
#include <fcntl.h> /* O_RDONLY, et.al. */
#include <assert.h>
#include <stdarg.h>
+#include <errno.h>
#if ! defined(O_NDELAY)
# if defined(solaris2)
@@ -36,6 +37,10 @@ extern "C" {
# endif
#endif
+#if !defined(ENOTSUP)
+#define ENOTSUP EOPNOTSUPP
+#endif
+
#include <errno.h>
#include <string.h> /* strcmp */
#include <unistd.h>
diff --git a/c/src/exec/libcsupport/src/base_fs.c b/c/src/exec/libcsupport/src/base_fs.c
index c8c23e5b43..a3bb196482 100644
--- a/c/src/exec/libcsupport/src/base_fs.c
+++ b/c/src/exec/libcsupport/src/base_fs.c
@@ -40,6 +40,7 @@ mode_t rtems_filesystem_umask;
void rtems_filesystem_initialize( void )
{
+#if !defined(RTEMS_UNIX)
int status;
rtems_filesystem_mount_table_entry_t *first_entry;
@@ -78,4 +79,5 @@ void rtems_filesystem_initialize( void )
status = mkdir( "/dev", S_IRWXU | S_IRWXG | S_IRWXO );
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
+#endif
}
diff --git a/c/src/exec/libfs/src/imfs/ioman.c b/c/src/exec/libfs/src/imfs/ioman.c
index f8b725e987..23d5c5b18f 100644
--- a/c/src/exec/libfs/src/imfs/ioman.c
+++ b/c/src/exec/libfs/src/imfs/ioman.c
@@ -13,6 +13,8 @@
* $Id$
*/
+
+
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -24,6 +26,10 @@
#include "libio_.h"
#include "imfs.h"
+#if defined(__linux__)
+#define S_IFCHR __S_IFCHR
+#endif
+
/*
* rtems_io_register_name
*
@@ -36,6 +42,7 @@ rtems_status_code rtems_io_register_name(
rtems_device_minor_number minor
)
{
+#if !defined(RTEMS_UNIX)
int status;
dev_t dev;
@@ -46,6 +53,7 @@ rtems_status_code rtems_io_register_name(
if ( status )
return RTEMS_TOO_MANY;
+#endif
return RTEMS_SUCCESSFUL;
}
@@ -60,6 +68,7 @@ rtems_status_code rtems_io_lookup_name(
rtems_driver_name_t **device_info
)
{
+#if !defined(RTEMS_UNIX)
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t temp_loc;
static rtems_driver_name_t device;
@@ -78,6 +87,6 @@ rtems_status_code rtems_io_lookup_name(
device.major = the_jnode->info.device.major;
device.minor = the_jnode->info.device.minor;
*device_info = &device;
+#endif
return RTEMS_SUCCESSFUL;
-
}
diff --git a/c/src/lib/include/rtems/libio.h b/c/src/lib/include/rtems/libio.h
index 76a90954b0..ee0aaf9b7f 100644
--- a/c/src/lib/include/rtems/libio.h
+++ b/c/src/lib/include/rtems/libio.h
@@ -20,6 +20,7 @@
#ifndef _RTEMS_LIBIO_H
#define _RTEMS_LIBIO_H
+#include <sys/types.h>
#include <sys/stat.h>
/*
diff --git a/c/src/lib/include/rtems/libio_.h b/c/src/lib/include/rtems/libio_.h
index bb6f81f35a..33a9e7bda5 100644
--- a/c/src/lib/include/rtems/libio_.h
+++ b/c/src/lib/include/rtems/libio_.h
@@ -27,6 +27,7 @@ extern "C" {
#include <fcntl.h> /* O_RDONLY, et.al. */
#include <assert.h>
#include <stdarg.h>
+#include <errno.h>
#if ! defined(O_NDELAY)
# if defined(solaris2)
@@ -36,6 +37,10 @@ extern "C" {
# endif
#endif
+#if !defined(ENOTSUP)
+#define ENOTSUP EOPNOTSUPP
+#endif
+
#include <errno.h>
#include <string.h> /* strcmp */
#include <unistd.h>
diff --git a/c/src/lib/libc/base_fs.c b/c/src/lib/libc/base_fs.c
index c8c23e5b43..a3bb196482 100644
--- a/c/src/lib/libc/base_fs.c
+++ b/c/src/lib/libc/base_fs.c
@@ -40,6 +40,7 @@ mode_t rtems_filesystem_umask;
void rtems_filesystem_initialize( void )
{
+#if !defined(RTEMS_UNIX)
int status;
rtems_filesystem_mount_table_entry_t *first_entry;
@@ -78,4 +79,5 @@ void rtems_filesystem_initialize( void )
status = mkdir( "/dev", S_IRWXU | S_IRWXG | S_IRWXO );
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
+#endif
}
diff --git a/c/src/lib/libc/ioman.c b/c/src/lib/libc/ioman.c
index f8b725e987..23d5c5b18f 100644
--- a/c/src/lib/libc/ioman.c
+++ b/c/src/lib/libc/ioman.c
@@ -13,6 +13,8 @@
* $Id$
*/
+
+
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -24,6 +26,10 @@
#include "libio_.h"
#include "imfs.h"
+#if defined(__linux__)
+#define S_IFCHR __S_IFCHR
+#endif
+
/*
* rtems_io_register_name
*
@@ -36,6 +42,7 @@ rtems_status_code rtems_io_register_name(
rtems_device_minor_number minor
)
{
+#if !defined(RTEMS_UNIX)
int status;
dev_t dev;
@@ -46,6 +53,7 @@ rtems_status_code rtems_io_register_name(
if ( status )
return RTEMS_TOO_MANY;
+#endif
return RTEMS_SUCCESSFUL;
}
@@ -60,6 +68,7 @@ rtems_status_code rtems_io_lookup_name(
rtems_driver_name_t **device_info
)
{
+#if !defined(RTEMS_UNIX)
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t temp_loc;
static rtems_driver_name_t device;
@@ -78,6 +87,6 @@ rtems_status_code rtems_io_lookup_name(
device.major = the_jnode->info.device.major;
device.minor = the_jnode->info.device.minor;
*device_info = &device;
+#endif
return RTEMS_SUCCESSFUL;
-
}
diff --git a/c/src/lib/libc/libio.h b/c/src/lib/libc/libio.h
index 76a90954b0..ee0aaf9b7f 100644
--- a/c/src/lib/libc/libio.h
+++ b/c/src/lib/libc/libio.h
@@ -20,6 +20,7 @@
#ifndef _RTEMS_LIBIO_H
#define _RTEMS_LIBIO_H
+#include <sys/types.h>
#include <sys/stat.h>
/*
diff --git a/c/src/lib/libc/libio_.h b/c/src/lib/libc/libio_.h
index bb6f81f35a..33a9e7bda5 100644
--- a/c/src/lib/libc/libio_.h
+++ b/c/src/lib/libc/libio_.h
@@ -27,6 +27,7 @@ extern "C" {
#include <fcntl.h> /* O_RDONLY, et.al. */
#include <assert.h>
#include <stdarg.h>
+#include <errno.h>
#if ! defined(O_NDELAY)
# if defined(solaris2)
@@ -36,6 +37,10 @@ extern "C" {
# endif
#endif
+#if !defined(ENOTSUP)
+#define ENOTSUP EOPNOTSUPP
+#endif
+
#include <errno.h>
#include <string.h> /* strcmp */
#include <unistd.h>
diff --git a/c/src/libfs/src/imfs/ioman.c b/c/src/libfs/src/imfs/ioman.c
index f8b725e987..23d5c5b18f 100644
--- a/c/src/libfs/src/imfs/ioman.c
+++ b/c/src/libfs/src/imfs/ioman.c
@@ -13,6 +13,8 @@
* $Id$
*/
+
+
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -24,6 +26,10 @@
#include "libio_.h"
#include "imfs.h"
+#if defined(__linux__)
+#define S_IFCHR __S_IFCHR
+#endif
+
/*
* rtems_io_register_name
*
@@ -36,6 +42,7 @@ rtems_status_code rtems_io_register_name(
rtems_device_minor_number minor
)
{
+#if !defined(RTEMS_UNIX)
int status;
dev_t dev;
@@ -46,6 +53,7 @@ rtems_status_code rtems_io_register_name(
if ( status )
return RTEMS_TOO_MANY;
+#endif
return RTEMS_SUCCESSFUL;
}
@@ -60,6 +68,7 @@ rtems_status_code rtems_io_lookup_name(
rtems_driver_name_t **device_info
)
{
+#if !defined(RTEMS_UNIX)
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t temp_loc;
static rtems_driver_name_t device;
@@ -78,6 +87,6 @@ rtems_status_code rtems_io_lookup_name(
device.major = the_jnode->info.device.major;
device.minor = the_jnode->info.device.minor;
*device_info = &device;
+#endif
return RTEMS_SUCCESSFUL;
-
}
diff --git a/cpukit/include/rtems/libio_.h b/cpukit/include/rtems/libio_.h
index bb6f81f35a..33a9e7bda5 100644
--- a/cpukit/include/rtems/libio_.h
+++ b/cpukit/include/rtems/libio_.h
@@ -27,6 +27,7 @@ extern "C" {
#include <fcntl.h> /* O_RDONLY, et.al. */
#include <assert.h>
#include <stdarg.h>
+#include <errno.h>
#if ! defined(O_NDELAY)
# if defined(solaris2)
@@ -36,6 +37,10 @@ extern "C" {
# endif
#endif
+#if !defined(ENOTSUP)
+#define ENOTSUP EOPNOTSUPP
+#endif
+
#include <errno.h>
#include <string.h> /* strcmp */
#include <unistd.h>
diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h
index 76a90954b0..ee0aaf9b7f 100644
--- a/cpukit/libcsupport/include/rtems/libio.h
+++ b/cpukit/libcsupport/include/rtems/libio.h
@@ -20,6 +20,7 @@
#ifndef _RTEMS_LIBIO_H
#define _RTEMS_LIBIO_H
+#include <sys/types.h>
#include <sys/stat.h>
/*
diff --git a/cpukit/libcsupport/include/rtems/libio_.h b/cpukit/libcsupport/include/rtems/libio_.h
index bb6f81f35a..33a9e7bda5 100644
--- a/cpukit/libcsupport/include/rtems/libio_.h
+++ b/cpukit/libcsupport/include/rtems/libio_.h
@@ -27,6 +27,7 @@ extern "C" {
#include <fcntl.h> /* O_RDONLY, et.al. */
#include <assert.h>
#include <stdarg.h>
+#include <errno.h>
#if ! defined(O_NDELAY)
# if defined(solaris2)
@@ -36,6 +37,10 @@ extern "C" {
# endif
#endif
+#if !defined(ENOTSUP)
+#define ENOTSUP EOPNOTSUPP
+#endif
+
#include <errno.h>
#include <string.h> /* strcmp */
#include <unistd.h>
diff --git a/cpukit/libcsupport/src/base_fs.c b/cpukit/libcsupport/src/base_fs.c
index c8c23e5b43..a3bb196482 100644
--- a/cpukit/libcsupport/src/base_fs.c
+++ b/cpukit/libcsupport/src/base_fs.c
@@ -40,6 +40,7 @@ mode_t rtems_filesystem_umask;
void rtems_filesystem_initialize( void )
{
+#if !defined(RTEMS_UNIX)
int status;
rtems_filesystem_mount_table_entry_t *first_entry;
@@ -78,4 +79,5 @@ void rtems_filesystem_initialize( void )
status = mkdir( "/dev", S_IRWXU | S_IRWXG | S_IRWXO );
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
+#endif
}
diff --git a/cpukit/libfs/src/imfs/ioman.c b/cpukit/libfs/src/imfs/ioman.c
index f8b725e987..23d5c5b18f 100644
--- a/cpukit/libfs/src/imfs/ioman.c
+++ b/cpukit/libfs/src/imfs/ioman.c
@@ -13,6 +13,8 @@
* $Id$
*/
+
+
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -24,6 +26,10 @@
#include "libio_.h"
#include "imfs.h"
+#if defined(__linux__)
+#define S_IFCHR __S_IFCHR
+#endif
+
/*
* rtems_io_register_name
*
@@ -36,6 +42,7 @@ rtems_status_code rtems_io_register_name(
rtems_device_minor_number minor
)
{
+#if !defined(RTEMS_UNIX)
int status;
dev_t dev;
@@ -46,6 +53,7 @@ rtems_status_code rtems_io_register_name(
if ( status )
return RTEMS_TOO_MANY;
+#endif
return RTEMS_SUCCESSFUL;
}
@@ -60,6 +68,7 @@ rtems_status_code rtems_io_lookup_name(
rtems_driver_name_t **device_info
)
{
+#if !defined(RTEMS_UNIX)
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t temp_loc;
static rtems_driver_name_t device;
@@ -78,6 +87,6 @@ rtems_status_code rtems_io_lookup_name(
device.major = the_jnode->info.device.major;
device.minor = the_jnode->info.device.minor;
*device_info = &device;
+#endif
return RTEMS_SUCCESSFUL;
-
}