Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
5b79fdad
Commit
5b79fdad
authored
May 15, 2010
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use __bsdi__ consistently.
parent
5781d96d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
src/include/port.h
src/include/port.h
+2
-2
src/port/fseeko.c
src/port/fseeko.c
+7
-7
No files found.
src/include/port.h
View file @
5b79fdad
...
...
@@ -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.13
2 2010/04/23 23:21:44 rhaas
Exp $
* $PostgreSQL: pgsql/src/include/port.h,v 1.13
3 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
...
...
src/port/fseeko.c
View file @
5b79fdad
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/port/fseeko.c,v 1.2
4 2010/01/02 16:58:13
momjian Exp $
* $PostgreSQL: pgsql/src/port/fseeko.c,v 1.2
5 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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment