]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-compat-util.h
Merge branch 'jk/avoid-redef-system-functions-2.30'
[thirdparty/git.git] / git-compat-util.h
index 32ed03768b5b2d5c9228fca48c9ac7400bdf8324..83ec7b7941e653a67efc0e2ccfeaedd6a839b076 100644 (file)
@@ -225,6 +225,7 @@ struct strbuf;
 #endif
 #include <errno.h>
 #include <limits.h>
+#include <locale.h>
 #ifdef NEEDS_SYS_PARAM_H
 #include <sys/param.h>
 #endif
@@ -313,7 +314,9 @@ typedef unsigned long uintptr_t;
 #ifdef PRECOMPOSE_UNICODE
 #include "compat/precompose_utf8.h"
 #else
-static inline const char *precompose_argv_prefix(int argc, const char **argv, const char *prefix)
+static inline const char *precompose_argv_prefix(int argc UNUSED,
+                                                const char **argv UNUSED,
+                                                const char *prefix)
 {
        return prefix;
 }
@@ -338,9 +341,9 @@ struct itimerval {
 #endif
 
 #ifdef NO_SETITIMER
-static inline int git_setitimer(int which,
-                               const struct itimerval *value,
-                               struct itimerval *newvalue) {
+static inline int git_setitimer(int which UNUSED,
+                               const struct itimerval *value UNUSED,
+                               struct itimerval *newvalue UNUSED) {
        return 0; /* pretend success */
 }
 #define setitimer(which,value,ovalue) git_setitimer(which,value,ovalue)
@@ -426,7 +429,7 @@ int lstat_cache_aware_rmdir(const char *path);
 #endif
 
 #ifndef has_dos_drive_prefix
-static inline int git_has_dos_drive_prefix(const char *path)
+static inline int git_has_dos_drive_prefix(const char *path UNUSED)
 {
        return 0;
 }
@@ -434,7 +437,7 @@ static inline int git_has_dos_drive_prefix(const char *path)
 #endif
 
 #ifndef skip_dos_drive_prefix
-static inline int git_skip_dos_drive_prefix(char **path)
+static inline int git_skip_dos_drive_prefix(char **path UNUSED)
 {
        return 0;
 }
@@ -1469,11 +1472,11 @@ int open_nofollow(const char *path, int flags);
 #endif
 
 #ifndef _POSIX_THREAD_SAFE_FUNCTIONS
-static inline void git_flockfile(FILE *fh)
+static inline void git_flockfile(FILE *fh UNUSED)
 {
        ; /* nothing */
 }
-static inline void git_funlockfile(FILE *fh)
+static inline void git_funlockfile(FILE *fh UNUSED)
 {
        ; /* nothing */
 }