* 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 $
*
*-------------------------------------------------------------------------
*/
/* 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
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
#include "c.h"
-#ifdef bsdi
+#ifdef __bsdi__
#include <pthread.h>
#endif
#include <sys/stat.h>
switch (whence)
{
case SEEK_CUR:
-#ifdef bsdi
+#ifdef __bsdi__
flockfile(stream);
#endif
if (fgetpos(stream, &floc) != 0)
floc += offset;
if (fsetpos(stream, &floc) != 0)
goto failure;
-#ifdef bsdi
+#ifdef __bsdi__
funlockfile(stream);
#endif
return 0;
return 0;
break;
case SEEK_END:
-#ifdef bsdi
+#ifdef __bsdi__
flockfile(stream);
#endif
fflush(stream); /* force writes to fd for stat() */
floc += offset;
if (fsetpos(stream, &floc) != 0)
goto failure;
-#ifdef bsdi
+#ifdef __bsdi__
funlockfile(stream);
#endif
return 0;
}
failure:
-#ifdef bsdi
+#ifdef __bsdi__
funlockfile(stream);
#endif
return -1;