Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
07d03d31
Commit
07d03d31
authored
Jul 13, 2014
by
Jacques Germishuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduce some consistency in definition/declaration ordering
parent
662f90e6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
17 deletions
+17
-17
src/unix/posix.h
+3
-4
src/win32/posix.h
+14
-13
No files found.
src/unix/posix.h
View file @
07d03d31
...
@@ -13,12 +13,10 @@
...
@@ -13,12 +13,10 @@
typedef
int
GIT_SOCKET
;
typedef
int
GIT_SOCKET
;
#define INVALID_SOCKET -1
#define INVALID_SOCKET -1
#define p_strcasecmp(s1, s2) strcasecmp(s1, s2)
#define p_strncasecmp(s1, s2, c) strncasecmp(s1, s2, c)
#define p_lseek(f,n,w) lseek(f, n, w)
#define p_lseek(f,n,w) lseek(f, n, w)
#define p_fstat(f,b) fstat(f, b)
#define p_fstat(f,b) fstat(f, b)
#define p_lstat(p,b) lstat(p,b)
#define p_lstat(p,b) lstat(p,b)
#define p_stat(p,b) stat(p, b)
#define p_readlink(a, b, c) readlink(a, b, c)
#define p_readlink(a, b, c) readlink(a, b, c)
#define p_symlink(o,n) symlink(o, n)
#define p_symlink(o,n) symlink(o, n)
...
@@ -32,10 +30,11 @@ extern char *p_realpath(const char *, char *);
...
@@ -32,10 +30,11 @@ extern char *p_realpath(const char *, char *);
#define p_send(s,b,l,f) send(s,b,l,f)
#define p_send(s,b,l,f) send(s,b,l,f)
#define p_inet_pton(a, b, c) inet_pton(a, b, c)
#define p_inet_pton(a, b, c) inet_pton(a, b, c)
#define p_strcasecmp(s1, s2) strcasecmp(s1, s2)
#define p_strncasecmp(s1, s2, c) strncasecmp(s1, s2, c)
#define p_vsnprintf(b, c, f, a) vsnprintf(b, c, f, a)
#define p_vsnprintf(b, c, f, a) vsnprintf(b, c, f, a)
#define p_snprintf(b, c, f, ...) snprintf(b, c, f, __VA_ARGS__)
#define p_snprintf(b, c, f, ...) snprintf(b, c, f, __VA_ARGS__)
#define p_mkstemp(p) mkstemp(p)
#define p_mkstemp(p) mkstemp(p)
#define p_stat(p,b) stat(p, b)
#define p_chdir(p) chdir(p)
#define p_chdir(p) chdir(p)
#define p_chmod(p,m) chmod(p, m)
#define p_chmod(p,m) chmod(p, m)
#define p_rmdir(p) rmdir(p)
#define p_rmdir(p) rmdir(p)
...
...
src/win32/posix.h
View file @
07d03d31
...
@@ -14,35 +14,33 @@
...
@@ -14,35 +14,33 @@
typedef
SOCKET
GIT_SOCKET
;
typedef
SOCKET
GIT_SOCKET
;
#define p_strcasecmp(s1, s2) _stricmp(s1, s2)
#define p_strncasecmp(s1, s2, c) _strnicmp(s1, s2, c)
#define p_lseek(f,n,w) _lseeki64(f, n, w)
#define p_lseek(f,n,w) _lseeki64(f, n, w)
#define p_fstat(f,b) _fstat64(f, b)
#define p_fstat(f,b) _fstat64(f, b)
extern
int
p_lstat
(
const
char
*
file_name
,
struct
stat
*
buf
);
extern
int
p_lstat
(
const
char
*
file_name
,
struct
stat
*
buf
);
extern
int
p_stat
(
const
char
*
path
,
struct
stat
*
buf
);
extern
int
p_readlink
(
const
char
*
path
,
char
*
buf
,
size_t
bufsiz
);
extern
int
p_symlink
(
const
char
*
old
,
const
char
*
new
);
extern
int
p_link
(
const
char
*
old
,
const
char
*
new
);
extern
int
p_link
(
const
char
*
old
,
const
char
*
new
);
extern
int
p_unlink
(
const
char
*
path
);
extern
int
p_unlink
(
const
char
*
path
);
extern
int
p_mkdir
(
const
char
*
path
,
mode_t
mode
);
extern
int
p_mkdir
(
const
char
*
path
,
mode_t
mode
);
extern
int
p_readlink
(
const
char
*
path
,
char
*
buf
,
size_t
bufsiz
);
extern
int
p_fsync
(
int
fd
);
extern
int
p_symlink
(
const
char
*
old
,
const
char
*
new
);
extern
char
*
p_realpath
(
const
char
*
orig_path
,
char
*
buffer
);
extern
char
*
p_realpath
(
const
char
*
orig_path
,
char
*
buffer
);
extern
int
p_recv
(
GIT_SOCKET
socket
,
void
*
buffer
,
size_t
length
,
int
flags
);
extern
int
p_send
(
GIT_SOCKET
socket
,
const
void
*
buffer
,
size_t
length
,
int
flags
);
extern
int
p_inet_pton
(
int
af
,
const
char
*
src
,
void
*
dst
);
#define strcasecmp(s1, s2) _stricmp(s1, s2)
#define strncasecmp(s1, s2, c) _strnicmp(s1, s2, c)
extern
int
p_vsnprintf
(
char
*
buffer
,
size_t
count
,
const
char
*
format
,
va_list
argptr
);
extern
int
p_vsnprintf
(
char
*
buffer
,
size_t
count
,
const
char
*
format
,
va_list
argptr
);
extern
int
p_snprintf
(
char
*
buffer
,
size_t
count
,
const
char
*
format
,
...)
GIT_FORMAT_PRINTF
(
3
,
4
);
extern
int
p_snprintf
(
char
*
buffer
,
size_t
count
,
const
char
*
format
,
...)
GIT_FORMAT_PRINTF
(
3
,
4
);
extern
int
p_mkstemp
(
char
*
tmp_path
);
extern
int
p_mkstemp
(
char
*
tmp_path
);
extern
int
p_stat
(
const
char
*
path
,
struct
stat
*
buf
);
extern
int
p_chdir
(
const
char
*
path
);
extern
int
p_chdir
(
const
char
*
path
);
extern
int
p_chmod
(
const
char
*
path
,
mode_t
mode
);
extern
int
p_chmod
(
const
char
*
path
,
mode_t
mode
);
extern
int
p_rmdir
(
const
char
*
path
);
extern
int
p_rmdir
(
const
char
*
path
);
extern
int
p_access
(
const
char
*
path
,
mode_t
mode
);
extern
int
p_access
(
const
char
*
path
,
mode_t
mode
);
extern
int
p_ftruncate
(
int
fd
,
long
size
);
extern
int
p_ftruncate
(
int
fd
,
long
size
);
extern
int
p_fsync
(
int
fd
);
extern
int
p_recv
(
GIT_SOCKET
socket
,
void
*
buffer
,
size_t
length
,
int
flags
);
extern
int
p_send
(
GIT_SOCKET
socket
,
const
void
*
buffer
,
size_t
length
,
int
flags
);
extern
int
p_inet_pton
(
int
af
,
const
char
*
src
,
void
*
dst
);
extern
struct
tm
*
p_localtime_r
(
const
time_t
*
timer
,
struct
tm
*
result
);
extern
struct
tm
*
p_gmtime_r
(
const
time_t
*
timer
,
struct
tm
*
result
);
/* p_lstat is almost but not quite POSIX correct. Specifically, the use of
/* p_lstat is almost but not quite POSIX correct. Specifically, the use of
* ENOTDIR is wrong, in that it does not mean precisely that a non-directory
* ENOTDIR is wrong, in that it does not mean precisely that a non-directory
...
@@ -52,4 +50,7 @@ extern struct tm * p_gmtime_r (const time_t *timer, struct tm *result);
...
@@ -52,4 +50,7 @@ extern struct tm * p_gmtime_r (const time_t *timer, struct tm *result);
*/
*/
extern
int
p_lstat_posixly
(
const
char
*
filename
,
struct
stat
*
buf
);
extern
int
p_lstat_posixly
(
const
char
*
filename
,
struct
stat
*
buf
);
extern
struct
tm
*
p_localtime_r
(
const
time_t
*
timer
,
struct
tm
*
result
);
extern
struct
tm
*
p_gmtime_r
(
const
time_t
*
timer
,
struct
tm
*
result
);
#endif
#endif
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