mirror of
https://github.com/postgres/postgres.git
synced 2025-12-07 12:02:30 +03:00
Remove BSD/OS (BSDi) port. There are no known users upgrading to
Postgres 9.2, and perhaps no existing users either.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user