From: Junio C Hamano Date: Wed, 7 Jan 2015 21:08:30 +0000 (-0800) Subject: Merge branch 'es/squelch-openssl-warnings-on-macosx' X-Git-Tag: v2.3.0-rc0~17 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/74a101eb48b72fad372cfa15669a3b6c55fb1046?ds=inline;hp=-c Merge branch 'es/squelch-openssl-warnings-on-macosx' Squelch useless compiler warnings on Mac OS X. * es/squelch-openssl-warnings-on-macosx: git-compat-util: suppress unavoidable Apple-specific deprecation warnings --- 74a101eb48b72fad372cfa15669a3b6c55fb1046 diff --combined git-compat-util.h index b763a4e269,433b8f2a1d..dcecd857f1 --- a/git-compat-util.h +++ b/git-compat-util.h @@@ -75,8 -75,7 +75,8 @@@ # endif #elif !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && \ !defined(_M_UNIX) && !defined(__sgi) && !defined(__DragonFly__) && \ - !defined(__TANDEM) && !defined(__QNX__) && !defined(__MirBSD__) + !defined(__TANDEM) && !defined(__QNX__) && !defined(__MirBSD__) && \ + !defined(__CYGWIN__) #define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */ #define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */ #endif @@@ -212,8 -211,12 +212,12 @@@ extern char *gitbasename(char *) #endif #ifndef NO_OPENSSL + #define __AVAILABILITY_MACROS_USES_AVAILABILITY 0 + #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6 #include #include + #undef MAC_OS_X_VERSION_MIN_REQUIRED + #undef __AVAILABILITY_MACROS_USES_AVAILABILITY #endif /* On most systems would have given us this, but @@@ -475,40 -478,6 +479,40 @@@ extern int git_munmap(void *start, size #define on_disk_bytes(st) ((st).st_blocks * 512) #endif +#ifdef NEEDS_MODE_TRANSLATION +#undef S_IFMT +#undef S_IFREG +#undef S_IFDIR +#undef S_IFLNK +#undef S_IFBLK +#undef S_IFCHR +#undef S_IFIFO +#undef S_IFSOCK +#define S_IFMT 0170000 +#define S_IFREG 0100000 +#define S_IFDIR 0040000 +#define S_IFLNK 0120000 +#define S_IFBLK 0060000 +#define S_IFCHR 0020000 +#define S_IFIFO 0010000 +#define S_IFSOCK 0140000 +#ifdef stat +#undef stat +#endif +#define stat(path, buf) git_stat(path, buf) +extern int git_stat(const char *, struct stat *); +#ifdef fstat +#undef fstat +#endif +#define fstat(fd, buf) git_fstat(fd, buf) +extern int git_fstat(int, struct stat *); +#ifdef lstat +#undef lstat +#endif +#define lstat(path, buf) git_lstat(path, buf) +extern int git_lstat(const char *, struct stat *); +#endif + #define DEFAULT_PACKED_GIT_LIMIT \ ((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))