mirror of
https://github.com/git/git
synced 2024-10-02 14:45:21 +00:00
Merge branch 'jk/avoid-redef-system-functions-2.30'
Redefining system functions for a few functions did not follow our usual "implement git_foo() and #define foo(args) git_foo(args)" pattern, which has broken build for some folks. * jk/avoid-redef-system-functions-2.30: git-compat-util: undefine system names before redeclaring them git-compat-util: avoid redefining system function names
This commit is contained in:
commit
efcc48efa7
|
@ -341,11 +341,13 @@ struct itimerval {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NO_SETITIMER
|
#ifdef NO_SETITIMER
|
||||||
static inline int setitimer(int which UNUSED,
|
static inline int git_setitimer(int which UNUSED,
|
||||||
const struct itimerval *value UNUSED,
|
const struct itimerval *value UNUSED,
|
||||||
struct itimerval *newvalue UNUSED) {
|
struct itimerval *newvalue UNUSED) {
|
||||||
return 0; /* pretend success */
|
return 0; /* pretend success */
|
||||||
}
|
}
|
||||||
|
#undef setitimer
|
||||||
|
#define setitimer(which,value,ovalue) git_setitimer(which,value,ovalue)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NO_LIBGEN_H
|
#ifndef NO_LIBGEN_H
|
||||||
|
@ -1471,14 +1473,19 @@ int open_nofollow(const char *path, int flags);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _POSIX_THREAD_SAFE_FUNCTIONS
|
#ifndef _POSIX_THREAD_SAFE_FUNCTIONS
|
||||||
static inline void flockfile(FILE *fh UNUSED)
|
static inline void git_flockfile(FILE *fh UNUSED)
|
||||||
{
|
{
|
||||||
; /* nothing */
|
; /* nothing */
|
||||||
}
|
}
|
||||||
static inline void funlockfile(FILE *fh UNUSED)
|
static inline void git_funlockfile(FILE *fh UNUSED)
|
||||||
{
|
{
|
||||||
; /* nothing */
|
; /* nothing */
|
||||||
}
|
}
|
||||||
|
#undef flockfile
|
||||||
|
#undef funlockfile
|
||||||
|
#undef getc_unlocked
|
||||||
|
#define flockfile(fh) git_flockfile(fh)
|
||||||
|
#define funlockfile(fh) git_funlockfile(fh)
|
||||||
#define getc_unlocked(fh) getc(fh)
|
#define getc_unlocked(fh) getc(fh)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue