summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2010-05-15 10:14:20 +0000
committerBruce Momjian2010-05-15 10:14:20 +0000
commit5b79fdadda71cad77bdb127d046b785bdd8332ec (patch)
tree36646c1993e9b88e09edda840a9e1475eca2f83a
parent5781d96dc3bd1bf8f7cb9c07a9927627e72aeaa7 (diff)
Use __bsdi__ consistently.
-rw-r--r--src/include/port.h4
-rw-r--r--src/port/fseeko.c14
2 files changed, 9 insertions, 9 deletions
diff --git a/src/include/port.h b/src/include/port.h
index 973ac940a1..7f190c461c 100644
--- a/src/include/port.h
+++ b/src/include/port.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* 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 */
#ifndef WIN32
#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 off_t ftello(FILE *stream);
#endif
diff --git a/src/port/fseeko.c b/src/port/fseeko.c
index b7342fc497..ab6067e5f0 100644
--- a/src/port/fseeko.c
+++ b/src/port/fseeko.c
@@ -8,7 +8,7 @@
*
*
* 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"
-#ifdef bsdi
+#ifdef __bsdi__
#include <pthread.h>
#endif
#include <sys/stat.h>
@@ -44,7 +44,7 @@ fseeko(FILE *stream, off_t offset, int whence)
switch (whence)
{
case SEEK_CUR:
-#ifdef bsdi
+#ifdef __bsdi__
flockfile(stream);
#endif
if (fgetpos(stream, &floc) != 0)
@@ -52,7 +52,7 @@ fseeko(FILE *stream, off_t offset, int whence)
floc += offset;
if (fsetpos(stream, &floc) != 0)
goto failure;
-#ifdef bsdi
+#ifdef __bsdi__
funlockfile(stream);
#endif
return 0;
@@ -63,7 +63,7 @@ fseeko(FILE *stream, off_t offset, int whence)
return 0;
break;
case SEEK_END:
-#ifdef bsdi
+#ifdef __bsdi__
flockfile(stream);
#endif
fflush(stream); /* force writes to fd for stat() */
@@ -73,7 +73,7 @@ fseeko(FILE *stream, off_t offset, int whence)
floc += offset;
if (fsetpos(stream, &floc) != 0)
goto failure;
-#ifdef bsdi
+#ifdef __bsdi__
funlockfile(stream);
#endif
return 0;
@@ -84,7 +84,7 @@ fseeko(FILE *stream, off_t offset, int whence)
}
failure:
-#ifdef bsdi
+#ifdef __bsdi__
funlockfile(stream);
#endif
return -1;