diff options
| author | Shawn O. Pearce <spearce@spearce.org> | 2008-12-30 23:26:38 -0800 |
|---|---|---|
| committer | Shawn O. Pearce <spearce@spearce.org> | 2008-12-30 23:29:23 -0800 |
| commit | 7dd8a9f71052cc12f8dd9c1eec2e99afbf08df76 (patch) | |
| tree | cf5f7235b9c9689b133f6ea12015720b411329bd /src/fileops.h | |
| parent | 64a47c01426a36cdb7e598d17018d5791e54bb97 (diff) | |
| download | libgit2-7dd8a9f71052cc12f8dd9c1eec2e99afbf08df76.tar.gz | |
Set GIT_EOSERR when the OS errno should be consulted
This error code indicates the OS error code has a better value
describing the last error, as it is likely a network or local
file IO problem identified by a C library function call.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'src/fileops.h')
| -rw-r--r-- | src/fileops.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/fileops.h b/src/fileops.h index 9de0a701b..336ab27f4 100644 --- a/src/fileops.h +++ b/src/fileops.h @@ -24,7 +24,6 @@ #define GITFO_BUF_INIT {NULL, 0} typedef int git_file; -typedef struct stat gitfo_statbuf; typedef struct gitfo_cache gitfo_cache; typedef struct { /* file io buffer */ @@ -33,18 +32,13 @@ typedef struct { /* file io buffer */ } gitfo_buf; -#define gitfo_open(path, flags) open(path, flags) -#define gitfo_creat(path, mode) creat(path, mode) +extern int gitfo_open(const char *path, int flags); +extern int gitfo_creat(const char *path, int mode); #define gitfo_close(fd) close(fd) extern int gitfo_read(git_file fd, void *buf, size_t cnt); extern int gitfo_write(git_file fd, void *buf, size_t cnt); - extern off_t gitfo_size(git_file fd); -#define gitfo_lstat(path, buf) lstat(path, buf) -#define gitfo_fstat(fd, buf) fstat(fd, buf) -#define gitfo_stat(path, buf) stat(path, buf) -#define gitfo_fsync(fd) fsync(fd) extern int gitfo_read_file(gitfo_buf *obj, const char *path); extern void gitfo_free_buf(gitfo_buf *obj); |
