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
bb665255
Commit
bb665255
authored
Jan 11, 2003
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Back out flockfile change for NetBSD. Giles Lean reports they are not
supported.
parent
43057c7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
src/port/fseeko.c
src/port/fseeko.c
+13
-1
No files found.
src/port/fseeko.c
View file @
bb665255
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/port/fseeko.c,v 1.
9 2003/01/02 23:22:49
momjian Exp $
* $Header: /cvsroot/pgsql/src/port/fseeko.c,v 1.
10 2003/01/11 19:38:23
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -21,7 +21,9 @@
#include "c.h"
#ifdef bsdi
#include <pthread.h>
#endif
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
...
...
@@ -44,13 +46,17 @@ 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
:
...
...
@@ -59,13 +65,17 @@ fseeko(FILE *stream, off_t offset, int whence)
return
0
;
break
;
case
SEEK_END
:
#ifdef bsdi
flockfile
(
stream
);
#endif
if
(
fstat
(
fileno
(
stream
),
&
filestat
)
!=
0
)
goto
failure
;
floc
=
filestat
.
st_size
;
if
(
fsetpos
(
stream
,
&
floc
)
!=
0
)
goto
failure
;
#ifdef bsdi
funlockfile
(
stream
);
#endif
return
0
;
break
;
default:
...
...
@@ -74,7 +84,9 @@ fseeko(FILE *stream, off_t offset, int whence)
}
failure:
#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