Merge branch 'es/squelch-openssl-warnings-on-macosx'
authorJunio C Hamano <gitster@pobox.com>
Wed, 7 Jan 2015 21:08:30 +0000 (13:08 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 7 Jan 2015 21:08:30 +0000 (13:08 -0800)
Squelch useless compiler warnings on Mac OS X.

* es/squelch-openssl-warnings-on-macosx:
git-compat-util: suppress unavoidable Apple-specific deprecation warnings

1  2 
git-compat-util.h
diff --combined git-compat-util.h
index b763a4e2693a5f08977132513196e78951868d5b,433b8f2a1d5bc061c143d17fa39653a07768bbbe..dcecd857f159357ff7d79cde218895f43795d944
@@@ -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 <openssl/ssl.h>
  #include <openssl/err.h>
+ #undef MAC_OS_X_VERSION_MIN_REQUIRED
+ #undef __AVAILABILITY_MACROS_USES_AVAILABILITY
  #endif
  
  /* On most systems <netdb.h> 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))