diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2008-12-05 06:44:40 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2008-12-05 06:44:40 +0000 |
commit | 1749cefdad726f2a44510a6c46d904b6e837dcc9 (patch) | |
tree | 844e660413b38c13a8742e4e2684ebc4d26a3a3e /cpukit | |
parent | 2008-12-05 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-1749cefdad726f2a44510a6c46d904b6e837dcc9.tar.bz2 |
Compile contents conditionally.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/libcsupport/src/closedir.c | 4 | ||||
-rw-r--r-- | cpukit/libcsupport/src/getcwd.c | 4 | ||||
-rw-r--r-- | cpukit/libcsupport/src/isatty.c | 4 | ||||
-rw-r--r-- | cpukit/libcsupport/src/opendir.c | 4 | ||||
-rw-r--r-- | cpukit/libcsupport/src/readdir.c | 6 | ||||
-rw-r--r-- | cpukit/libcsupport/src/readdir_r.c | 4 | ||||
-rw-r--r-- | cpukit/libcsupport/src/rewinddir.c | 4 | ||||
-rw-r--r-- | cpukit/libcsupport/src/seekdir.c | 4 | ||||
-rw-r--r-- | cpukit/libcsupport/src/telldir.c | 4 | ||||
-rw-r--r-- | cpukit/libcsupport/src/ttyname.c | 6 | ||||
-rw-r--r-- | cpukit/posix/src/execl.c | 4 | ||||
-rw-r--r-- | cpukit/posix/src/execle.c | 4 | ||||
-rw-r--r-- | cpukit/posix/src/execlp.c | 4 | ||||
-rw-r--r-- | cpukit/posix/src/execv.c | 4 | ||||
-rw-r--r-- | cpukit/posix/src/execve.c | 4 | ||||
-rw-r--r-- | cpukit/posix/src/execvp.c | 4 | ||||
-rw-r--r-- | cpukit/posix/src/sleep.c | 3 | ||||
-rw-r--r-- | cpukit/posix/src/usleep.c | 4 |
18 files changed, 73 insertions, 2 deletions
diff --git a/cpukit/libcsupport/src/closedir.c b/cpukit/libcsupport/src/closedir.c index cea96c1dd4..0ea9e8daa4 100644 --- a/cpukit/libcsupport/src/closedir.c +++ b/cpukit/libcsupport/src/closedir.c @@ -44,6 +44,8 @@ static char sccsid[] = "@(#)closedir.c 5.9 (Berkeley) 2/23/91"; #include "config.h" #endif +#ifndef HAVE_CLOSEDIR + #include <sys/types.h> #include <dirent.h> #include <stdlib.h> @@ -72,3 +74,5 @@ closedir( (void)free((void *)dirp); return(close(fd)); } + +#endif diff --git a/cpukit/libcsupport/src/getcwd.c b/cpukit/libcsupport/src/getcwd.c index 1838ce7830..2f2be7fc72 100644 --- a/cpukit/libcsupport/src/getcwd.c +++ b/cpukit/libcsupport/src/getcwd.c @@ -40,6 +40,8 @@ #include "config.h" #endif +#ifndef HAVE_GETCWD + /* * Added these when moved to RTEMS */ @@ -285,3 +287,5 @@ err: } #endif /* _REENT_ONLY */ + +#endif diff --git a/cpukit/libcsupport/src/isatty.c b/cpukit/libcsupport/src/isatty.c index d1ee06ee97..b29ce7b53d 100644 --- a/cpukit/libcsupport/src/isatty.c +++ b/cpukit/libcsupport/src/isatty.c @@ -13,6 +13,8 @@ #include "config.h" #endif +#ifndef HAVE_ISATTY + #include <sys/stat.h> int isatty( @@ -29,3 +31,5 @@ int isatty( return 0; } + +#endif diff --git a/cpukit/libcsupport/src/opendir.c b/cpukit/libcsupport/src/opendir.c index 87bcb2a17e..95d9f0a574 100644 --- a/cpukit/libcsupport/src/opendir.c +++ b/cpukit/libcsupport/src/opendir.c @@ -44,6 +44,8 @@ static char sccsid[] = "@(#)opendir.c 5.11 (Berkeley) 2/23/91"; #include "config.h" #endif +#ifndef HAVE_OPENDIR + #include <dirent.h> #include <fcntl.h> #include <stdlib.h> @@ -87,3 +89,5 @@ opendir( */ return dirp; } + +#endif diff --git a/cpukit/libcsupport/src/readdir.c b/cpukit/libcsupport/src/readdir.c index 5ce6e4d7ec..058712903e 100644 --- a/cpukit/libcsupport/src/readdir.c +++ b/cpukit/libcsupport/src/readdir.c @@ -44,10 +44,12 @@ static char sccsid[] = "@(#)readdir.c 5.7 (Berkeley) 6/1/90"; #include "config.h" #endif +#ifndef HAVE_READDIR + #include <dirent.h> #include <rtems/stdint.h> -int getdents( +extern int getdents( int dd_fd, char *dd_buf, int dd_len @@ -89,3 +91,5 @@ readdir( DIR *dirp ) return (dp); } } + +#endif diff --git a/cpukit/libcsupport/src/readdir_r.c b/cpukit/libcsupport/src/readdir_r.c index 7d598cd7e3..f1d53ae593 100644 --- a/cpukit/libcsupport/src/readdir_r.c +++ b/cpukit/libcsupport/src/readdir_r.c @@ -8,6 +8,8 @@ #include "config.h" #endif +#ifndef HAVE_READDIR_R + #include <sys/types.h> #include <dirent.h> #include <errno.h> @@ -24,3 +26,5 @@ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) *entry = **result; return *result ? 0 : errno; } + +#endif diff --git a/cpukit/libcsupport/src/rewinddir.c b/cpukit/libcsupport/src/rewinddir.c index f4542d2db6..abee190c0a 100644 --- a/cpukit/libcsupport/src/rewinddir.c +++ b/cpukit/libcsupport/src/rewinddir.c @@ -14,6 +14,8 @@ #include "config.h" #endif +#ifndef HAVE_REWINDDIR + #include <sys/types.h> #include <assert.h> #include <dirent.h> @@ -37,3 +39,5 @@ void rewinddir( dirp->dd_loc = 0; } + +#endif diff --git a/cpukit/libcsupport/src/seekdir.c b/cpukit/libcsupport/src/seekdir.c index be96bb50d3..95f4505942 100644 --- a/cpukit/libcsupport/src/seekdir.c +++ b/cpukit/libcsupport/src/seekdir.c @@ -14,6 +14,8 @@ #include "config.h" #endif +#ifndef HAVE_SEEKDIR + #include <sys/param.h> #include <assert.h> #include <dirent.h> @@ -42,3 +44,5 @@ void seekdir( dirp->dd_loc = 0; } + +#endif diff --git a/cpukit/libcsupport/src/telldir.c b/cpukit/libcsupport/src/telldir.c index d7b9f23b4d..8b6ba5dce5 100644 --- a/cpukit/libcsupport/src/telldir.c +++ b/cpukit/libcsupport/src/telldir.c @@ -14,6 +14,8 @@ #include "config.h" #endif +#ifndef HAVE_TELLDIR + #include <sys/param.h> #include <assert.h> #include <dirent.h> @@ -45,3 +47,5 @@ long telldir( return (long)( iop->offset ); } + +#endif diff --git a/cpukit/libcsupport/src/ttyname.c b/cpukit/libcsupport/src/ttyname.c index 59ea29be6e..9b86997caf 100644 --- a/cpukit/libcsupport/src/ttyname.c +++ b/cpukit/libcsupport/src/ttyname.c @@ -39,6 +39,8 @@ #include "config.h" #endif +#ifndef HAVE_TTYNAME + #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> @@ -98,7 +100,7 @@ int ttyname_r( } /* - * ttyname() - POSIX 1003.1b 4.7.2 - Demetermine Terminal Device Name + * ttyname() - POSIX 1003.1b 4.7.2 - Determine Terminal Device Name */ char *ttyname( @@ -109,3 +111,5 @@ char *ttyname( return ttyname_buf; return NULL; } + +#endif diff --git a/cpukit/posix/src/execl.c b/cpukit/posix/src/execl.c index 0ea72edbf3..9edaba341d 100644 --- a/cpukit/posix/src/execl.c +++ b/cpukit/posix/src/execl.c @@ -15,6 +15,8 @@ #include "config.h" #endif +#ifndef HAVE_EXECL + #include <errno.h> #include <rtems/seterr.h> @@ -26,3 +28,5 @@ int execl( { rtems_set_errno_and_return_minus_one( ENOSYS ); } + +#endif diff --git a/cpukit/posix/src/execle.c b/cpukit/posix/src/execle.c index 520fc589b1..947a4e104f 100644 --- a/cpukit/posix/src/execle.c +++ b/cpukit/posix/src/execle.c @@ -15,6 +15,8 @@ #include "config.h" #endif +#ifndef HAVE_EXECLE + #include <errno.h> #include <rtems/seterr.h> @@ -26,3 +28,5 @@ int execle( { rtems_set_errno_and_return_minus_one( ENOSYS ); } + +#endif diff --git a/cpukit/posix/src/execlp.c b/cpukit/posix/src/execlp.c index af584fc5ab..fabc6986bb 100644 --- a/cpukit/posix/src/execlp.c +++ b/cpukit/posix/src/execlp.c @@ -15,6 +15,8 @@ #include "config.h" #endif +#ifndef HAVE_EXECLP + #include <errno.h> #include <rtems/seterr.h> @@ -26,3 +28,5 @@ int execlp( { rtems_set_errno_and_return_minus_one( ENOSYS ); } + +#endif diff --git a/cpukit/posix/src/execv.c b/cpukit/posix/src/execv.c index e7c9a9ce85..46595232ad 100644 --- a/cpukit/posix/src/execv.c +++ b/cpukit/posix/src/execv.c @@ -15,6 +15,8 @@ #include "config.h" #endif +#ifndef HAVE_EXECV + #include <errno.h> #include <rtems/seterr.h> @@ -25,3 +27,5 @@ int execv( { rtems_set_errno_and_return_minus_one( ENOSYS ); } + +#endif diff --git a/cpukit/posix/src/execve.c b/cpukit/posix/src/execve.c index 5a00a26790..b89009866e 100644 --- a/cpukit/posix/src/execve.c +++ b/cpukit/posix/src/execve.c @@ -15,6 +15,8 @@ #include "config.h" #endif +#ifndef HAVE_EXECVE + #include <errno.h> #include <rtems/seterr.h> @@ -26,3 +28,5 @@ int execve( { rtems_set_errno_and_return_minus_one( ENOSYS ); } + +#endif diff --git a/cpukit/posix/src/execvp.c b/cpukit/posix/src/execvp.c index e68f44c1a9..720543fcdf 100644 --- a/cpukit/posix/src/execvp.c +++ b/cpukit/posix/src/execvp.c @@ -15,6 +15,8 @@ #include "config.h" #endif +#ifndef HAVE_EXECVP + #include <errno.h> #include <rtems/seterr.h> @@ -25,3 +27,5 @@ int execvp( { rtems_set_errno_and_return_minus_one( ENOSYS ); } + +#endif diff --git a/cpukit/posix/src/sleep.c b/cpukit/posix/src/sleep.c index 961aa4b352..98239dc292 100644 --- a/cpukit/posix/src/sleep.c +++ b/cpukit/posix/src/sleep.c @@ -15,6 +15,7 @@ #include "config.h" #endif +#ifndef HAVE_SLEEP #include <time.h> #include <unistd.h> @@ -35,3 +36,5 @@ unsigned int sleep( return tm.tv_sec; /* seconds remaining */ } + +#endif diff --git a/cpukit/posix/src/usleep.c b/cpukit/posix/src/usleep.c index 67abc438a6..e864f3566a 100644 --- a/cpukit/posix/src/usleep.c +++ b/cpukit/posix/src/usleep.c @@ -15,6 +15,8 @@ #include "config.h" #endif +#ifndef HAVE_USLEEP + #include <time.h> #include <unistd.h> @@ -39,3 +41,5 @@ int usleep( remaining += tm.tv_nsec / 1000; return remaining; /* seconds remaining */ } + +#endif |