diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-02-17 11:47:22 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-02-17 12:04:18 -0800 |
commit | 0378e3cc9a0e036b0c1fb53341c9ab5db3e1342c (patch) | |
tree | d962a964dd105e4ff7f2f8e34f5f3a4027cb4b8a | |
parent | 7aa6c8f669939335b97673bc065e702b5c7788f7 (diff) |
Remove ifdefs for non-Solaris SVR4 systems
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | src/FSlibInt.c | 17 | ||||
-rw-r--r-- | src/FSlibos.h | 30 |
2 files changed, 13 insertions, 34 deletions
diff --git a/src/FSlibInt.c b/src/FSlibInt.c index 9690363..46ed728 100644 --- a/src/FSlibInt.c +++ b/src/FSlibInt.c @@ -243,9 +243,6 @@ _FSRead( register long size) { register long bytes_read; -#if defined(SVR4) && defined(i386) - int num_failed_reads = 0; -#endif if (size == 0) return; @@ -261,19 +258,9 @@ _FSRead( if (bytes_read > 0) { size -= bytes_read; data += bytes_read; -#if defined(SVR4) && defined(i386) - num_failed_reads = 0; -#endif } else if (ETEST()) { _FSWaitForReadable(svr); -#if defined(SVR4) && defined(i386) - num_failed_reads++; - if (num_failed_reads > 1) { - ESET(EPIPE); - (*_FSIOErrorFunction) (svr); - } -#endif ESET(0); } #ifdef SUNSYSV @@ -290,10 +277,6 @@ _FSRead( /* If it's a system call interrupt, it's not an error. */ if (!ECHECK(EINTR)) (*_FSIOErrorFunction) (svr); -#if defined(SVR4) && defined(i386) - else - num_failed_reads = 0; -#endif } } } diff --git a/src/FSlibos.h b/src/FSlibos.h index e42c8c2..3233c0e 100644 --- a/src/FSlibos.h +++ b/src/FSlibos.h @@ -84,33 +84,29 @@ in this Software without prior written authorization from The Open Group. # endif # endif # ifndef OPEN_MAX -# ifdef SVR4 -# define OPEN_MAX 256 -# else -# include <sys/param.h> -# ifndef OPEN_MAX -# ifdef NOFILE -# define OPEN_MAX NOFILE -# else -# ifdef __GNU__ -# define OPEN_MAX (sysconf(_SC_OPEN_MAX)) -# else /* !__GNU__ */ -# define OPEN_MAX NOFILES_MAX -# endif /* __GNU__ */ -# endif +# include <sys/param.h> +# ifndef OPEN_MAX +# ifdef NOFILE +# define OPEN_MAX NOFILE +# else +# if defined(__GNU__) || defined(__sun) +# define OPEN_MAX (sysconf(_SC_OPEN_MAX)) +# else /* !__GNU__ || __sun */ +# define OPEN_MAX NOFILES_MAX +# endif /*__GNU__ || __sun */ # endif # endif # endif -# ifdef __GNU__ +# if defined(__GNU__) || defined(__sun) # define FS_OPEN_MAX 256 -# else /*!__GNU__*/ +# else /* !__GNU__ || __sun */ # if OPEN_MAX > 256 # define FS_OPEN_MAX 256 # else # define FS_OPEN_MAX OPEN_MAX # endif -# endif /*__GNU__*/ +# endif /* __GNU__ || __sun */ # endif /* FS_OPEN_MAX */ |