summaryrefslogtreecommitdiff
path: root/src/port/fseeko.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/port/fseeko.c')
-rw-r--r--src/port/fseeko.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/src/port/fseeko.c b/src/port/fseeko.c
index c33d94c1096..882b22599aa 100644
--- a/src/port/fseeko.c
+++ b/src/port/fseeko.c
@@ -17,22 +17,17 @@
* We have to use the native defines here because configure hasn't
* completed yet.
*/
-#if defined(__bsdi__) || defined(__NetBSD__)
+#ifdef __NetBSD__
#include "c.h"
-#ifdef __bsdi__
-#include <pthread.h>
-#endif
#include <sys/stat.h>
/*
- * On BSD/OS and NetBSD, off_t and fpos_t are the same. Standards
+ * On NetBSD, off_t and fpos_t are the same. Standards
* say off_t is an arithmetic type, but not necessarily integral,
* while fpos_t might be neither.
- *
- * This is thread-safe on BSD/OS using flockfile/funlockfile.
*/
int
@@ -44,17 +39,11 @@ fseeko(FILE *stream, off_t offset, int whence)
switch (whence)
{
case SEEK_CUR:
-#ifdef __bsdi__
- flockfile(stream);
-#endif
if (fgetpos(stream, &floc) != 0)
goto failure;
floc += offset;
if (fsetpos(stream, &floc) != 0)
goto failure;
-#ifdef __bsdi__
- funlockfile(stream);
-#endif
return 0;
break;
case SEEK_SET:
@@ -63,9 +52,6 @@ fseeko(FILE *stream, off_t offset, int whence)
return 0;
break;
case SEEK_END:
-#ifdef __bsdi__
- flockfile(stream);
-#endif
fflush(stream); /* force writes to fd for stat() */
if (fstat(fileno(stream), &filestat) != 0)
goto failure;
@@ -73,9 +59,6 @@ fseeko(FILE *stream, off_t offset, int whence)
floc += offset;
if (fsetpos(stream, &floc) != 0)
goto failure;
-#ifdef __bsdi__
- funlockfile(stream);
-#endif
return 0;
break;
default:
@@ -84,9 +67,6 @@ fseeko(FILE *stream, off_t offset, int whence)
}
failure:
-#ifdef __bsdi__
- funlockfile(stream);
-#endif
return -1;
}