mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Use __bsdi__ consistently.
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/include/port.h,v 1.132 2010/04/23 23:21:44 rhaas Exp $
|
* $PostgreSQL: pgsql/src/include/port.h,v 1.133 2010/05/15 10:14:20 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -352,7 +352,7 @@ extern char *crypt(const char *key, const char *setting);
|
|||||||
/* WIN32 handled in port/win32.h */
|
/* WIN32 handled in port/win32.h */
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#define pgoff_t off_t
|
#define pgoff_t off_t
|
||||||
#if defined(bsdi) || defined(netbsd)
|
#if defined(__bsdi__) || defined(netbsd)
|
||||||
extern int fseeko(FILE *stream, off_t offset, int whence);
|
extern int fseeko(FILE *stream, off_t offset, int whence);
|
||||||
extern off_t ftello(FILE *stream);
|
extern off_t ftello(FILE *stream);
|
||||||
#endif
|
#endif
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/port/fseeko.c,v 1.24 2010/01/02 16:58:13 momjian Exp $
|
* $PostgreSQL: pgsql/src/port/fseeko.c,v 1.25 2010/05/15 10:14:20 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include "c.h"
|
#include "c.h"
|
||||||
|
|
||||||
#ifdef bsdi
|
#ifdef __bsdi__
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#endif
|
#endif
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
@ -44,7 +44,7 @@ fseeko(FILE *stream, off_t offset, int whence)
|
|||||||
switch (whence)
|
switch (whence)
|
||||||
{
|
{
|
||||||
case SEEK_CUR:
|
case SEEK_CUR:
|
||||||
#ifdef bsdi
|
#ifdef __bsdi__
|
||||||
flockfile(stream);
|
flockfile(stream);
|
||||||
#endif
|
#endif
|
||||||
if (fgetpos(stream, &floc) != 0)
|
if (fgetpos(stream, &floc) != 0)
|
||||||
@ -52,7 +52,7 @@ fseeko(FILE *stream, off_t offset, int whence)
|
|||||||
floc += offset;
|
floc += offset;
|
||||||
if (fsetpos(stream, &floc) != 0)
|
if (fsetpos(stream, &floc) != 0)
|
||||||
goto failure;
|
goto failure;
|
||||||
#ifdef bsdi
|
#ifdef __bsdi__
|
||||||
funlockfile(stream);
|
funlockfile(stream);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
@ -63,7 +63,7 @@ fseeko(FILE *stream, off_t offset, int whence)
|
|||||||
return 0;
|
return 0;
|
||||||
break;
|
break;
|
||||||
case SEEK_END:
|
case SEEK_END:
|
||||||
#ifdef bsdi
|
#ifdef __bsdi__
|
||||||
flockfile(stream);
|
flockfile(stream);
|
||||||
#endif
|
#endif
|
||||||
fflush(stream); /* force writes to fd for stat() */
|
fflush(stream); /* force writes to fd for stat() */
|
||||||
@ -73,7 +73,7 @@ fseeko(FILE *stream, off_t offset, int whence)
|
|||||||
floc += offset;
|
floc += offset;
|
||||||
if (fsetpos(stream, &floc) != 0)
|
if (fsetpos(stream, &floc) != 0)
|
||||||
goto failure;
|
goto failure;
|
||||||
#ifdef bsdi
|
#ifdef __bsdi__
|
||||||
funlockfile(stream);
|
funlockfile(stream);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
@ -84,7 +84,7 @@ fseeko(FILE *stream, off_t offset, int whence)
|
|||||||
}
|
}
|
||||||
|
|
||||||
failure:
|
failure:
|
||||||
#ifdef bsdi
|
#ifdef __bsdi__
|
||||||
funlockfile(stream);
|
funlockfile(stream);
|
||||||
#endif
|
#endif
|
||||||
return -1;
|
return -1;
|
||||||
|
Reference in New Issue
Block a user