Compile contents conditionally.

This commit is contained in:
Ralf Corsepius
2008-12-05 06:44:40 +00:00
parent 73c56eea4f
commit 1749cefdad
18 changed files with 73 additions and 2 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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