diff options
Diffstat (limited to 'src/update.c')
-rw-r--r-- | src/update.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/update.c b/src/update.c index f4b8b78..e3ee717 100644 --- a/src/update.c +++ b/src/update.c | |||
@@ -30,7 +30,7 @@ write_header (GDBM_FILE dbf) | |||
30 | off_t file_pos; /* Return value for lseek. */ | 30 | off_t file_pos; /* Return value for lseek. */ |
31 | int rc; | 31 | int rc; |
32 | 32 | ||
33 | file_pos = __lseek (dbf, 0L, SEEK_SET); | 33 | file_pos = gdbm_file_seek (dbf, 0L, SEEK_SET); |
34 | if (file_pos != 0) | 34 | if (file_pos != 0) |
35 | { | 35 | { |
36 | GDBM_SET_ERRNO2 (dbf, GDBM_FILE_SEEK_ERROR, TRUE, GDBM_DEBUG_STORE); | 36 | GDBM_SET_ERRNO2 (dbf, GDBM_FILE_SEEK_ERROR, TRUE, GDBM_DEBUG_STORE); |
@@ -50,7 +50,7 @@ write_header (GDBM_FILE dbf) | |||
50 | 50 | ||
51 | /* Sync the file if fast_write is FALSE. */ | 51 | /* Sync the file if fast_write is FALSE. */ |
52 | if (dbf->fast_write == FALSE) | 52 | if (dbf->fast_write == FALSE) |
53 | __fsync (dbf); | 53 | gdbm_file_sync (dbf); |
54 | 54 | ||
55 | return 0; | 55 | return 0; |
56 | } | 56 | } |
@@ -94,7 +94,7 @@ _gdbm_end_update (GDBM_FILE dbf) | |||
94 | /* Write the directory. */ | 94 | /* Write the directory. */ |
95 | if (dbf->directory_changed) | 95 | if (dbf->directory_changed) |
96 | { | 96 | { |
97 | file_pos = __lseek (dbf, dbf->header->dir, SEEK_SET); | 97 | file_pos = gdbm_file_seek (dbf, dbf->header->dir, SEEK_SET); |
98 | if (file_pos != dbf->header->dir) | 98 | if (file_pos != dbf->header->dir) |
99 | { | 99 | { |
100 | GDBM_SET_ERRNO2 (dbf, GDBM_FILE_SEEK_ERROR, TRUE, GDBM_DEBUG_STORE); | 100 | GDBM_SET_ERRNO2 (dbf, GDBM_FILE_SEEK_ERROR, TRUE, GDBM_DEBUG_STORE); |
@@ -114,7 +114,7 @@ _gdbm_end_update (GDBM_FILE dbf) | |||
114 | 114 | ||
115 | dbf->directory_changed = FALSE; | 115 | dbf->directory_changed = FALSE; |
116 | if (!dbf->header_changed && dbf->fast_write == FALSE) | 116 | if (!dbf->header_changed && dbf->fast_write == FALSE) |
117 | __fsync (dbf); | 117 | gdbm_file_sync (dbf); |
118 | } | 118 | } |
119 | 119 | ||
120 | /* Final write of the header. */ | 120 | /* Final write of the header. */ |