Commit 07d03d31 by Jacques Germishuys

Introduce some consistency in definition/declaration ordering

parent 662f90e6
...@@ -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)
......
...@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment