mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-08 22:08:56 +00:00
Introduce some consistency in definition/declaration ordering
This commit is contained in:
parent
662f90e6ec
commit
07d03d3145
@ -13,12 +13,10 @@
|
||||
typedef int GIT_SOCKET;
|
||||
#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_fstat(f,b) fstat(f, 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_symlink(o,n) symlink(o, n)
|
||||
@ -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_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_snprintf(b, c, f, ...) snprintf(b, c, f, __VA_ARGS__)
|
||||
#define p_mkstemp(p) mkstemp(p)
|
||||
#define p_stat(p,b) stat(p, b)
|
||||
#define p_chdir(p) chdir(p)
|
||||
#define p_chmod(p,m) chmod(p, m)
|
||||
#define p_rmdir(p) rmdir(p)
|
||||
|
@ -14,35 +14,33 @@
|
||||
|
||||
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_fstat(f,b) _fstat64(f, b)
|
||||
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_unlink(const char *path);
|
||||
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_symlink(const char *old, const char *new);
|
||||
extern int p_fsync(int fd);
|
||||
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_snprintf(char *buffer, size_t count, const char *format, ...) GIT_FORMAT_PRINTF(3, 4);
|
||||
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_chmod(const char* path, mode_t mode);
|
||||
extern int p_rmdir(const char* path);
|
||||
extern int p_access(const char* path, mode_t mode);
|
||||
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
|
||||
* 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);
|
||||
*/
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user