components/curl/patches/002-curlbuild.h.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Wed, 29 Aug 2012 11:05:56 -0700
changeset 957 255465c5756f
parent 174 187aa0541610
child 2151 8977d970976a
permissions -rw-r--r--
Close of build 04.
--- include/curl/curlbuild.h	2010-10-12 15:04:32.000000000 -0700
+++ include/curl/curlbuild.h	2010-12-02 10:18:42.364070201 -0800
@@ -496,6 +496,45 @@
 #  define CURL_SIZEOF_CURL_SOCKLEN_T 4
 
 /* ===================================== */
+/*    Sun Studio Compilers		 */
+/* ===================================== */
+
+#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+#include <stdint.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#  define CURL_TYPEOF_CURL_OFF_T off_t
+#  define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
+#  define CURL_SIZEOF_CURL_SOCKLEN_T 4
+#  if defined(__amd64) || defined(__sparcv9)
+#     define CURL_SIZEOF_CURL_OFF_T 8
+#     define CURL_SIZEOF_LONG 8
+#     define CURL_FORMAT_CURL_OFF_T  "ld"
+#     define CURL_FORMAT_CURL_OFF_TU "lu"
+#     define CURL_FORMAT_OFF_T       "%ld"
+#     define CURL_SUFFIX_CURL_OFF_T L
+#     define CURL_SUFFIX_CURL_OFF_TU UL
+#  else
+#     define CURL_SIZEOF_LONG 4
+#     if _FILE_OFFSET_BITS == 64 && _LARGEFILE_SOURCE != 0
+#        define CURL_SIZEOF_CURL_OFF_T 8
+#        define CURL_FORMAT_CURL_OFF_T  "lld"
+#        define CURL_FORMAT_CURL_OFF_TU "llu"
+#        define CURL_FORMAT_OFF_T       "%lld"
+#        define CURL_SUFFIX_CURL_OFF_T LL
+#        define CURL_SUFFIX_CURL_OFF_TU ULL
+#     else
+#        define CURL_SIZEOF_CURL_OFF_T 4
+#        define CURL_FORMAT_CURL_OFF_T  "ld"
+#        define CURL_FORMAT_CURL_OFF_TU "lu"
+#        define CURL_FORMAT_OFF_T       "%ld"
+#        define CURL_SUFFIX_CURL_OFF_T L
+#        define CURL_SUFFIX_CURL_OFF_TU UL
+#     endif
+#  endif
+
+/* ===================================== */
 /*    KEEP MSVC THE PENULTIMATE ENTRY    */
 /* ===================================== */
 
@@ -527,6 +566,40 @@
 /* ===================================== */
 
 #elif defined(__GNUC__)
+#  if defined(sun) || defined(__sun) || defined(__sun__)
+#  include <stdint.h>
+#  include <sys/types.h>
+#  include <sys/socket.h>
+#  define CURL_TYPEOF_CURL_OFF_T off_t
+#  define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
+#  define CURL_SIZEOF_CURL_SOCKLEN_T 4
+#  if defined(__x86_64__) || defined(__sparcv9)
+#     define CURL_SIZEOF_CURL_OFF_T 8
+#     define CURL_SIZEOF_LONG 8
+#     define CURL_FORMAT_CURL_OFF_T  "ld"
+#     define CURL_FORMAT_CURL_OFF_TU "lu"
+#     define CURL_FORMAT_OFF_T       "%ld"
+#     define CURL_SUFFIX_CURL_OFF_T L
+#     define CURL_SUFFIX_CURL_OFF_TU UL
+#  else /* (__i386__) || (__sparc) */
+#     define CURL_SIZEOF_LONG 4
+#     if _FILE_OFFSET_BITS == 64 && _LARGEFILE_SOURCE != 0
+#        define CURL_SIZEOF_CURL_OFF_T 8
+#        define CURL_FORMAT_CURL_OFF_T  "lld"
+#        define CURL_FORMAT_CURL_OFF_TU "llu"
+#        define CURL_FORMAT_OFF_T       "%lld"
+#        define CURL_SUFFIX_CURL_OFF_T LL
+#        define CURL_SUFFIX_CURL_OFF_TU ULL
+#    else
+#        define CURL_SIZEOF_CURL_OFF_T 4
+#        define CURL_FORMAT_CURL_OFF_T  "ld"
+#        define CURL_FORMAT_CURL_OFF_TU "lu"
+#        define CURL_FORMAT_OFF_T       "%ld"
+#        define CURL_SUFFIX_CURL_OFF_T L
+#        define CURL_SUFFIX_CURL_OFF_TU UL
+#     endif
+#  endif
+#  else /* !((sun) || (__sun) || (__sun__)) */
 #  if defined(__i386__) || defined(__ppc__)
 #    define CURL_SIZEOF_LONG           4
 #    define CURL_TYPEOF_CURL_OFF_T     long long
@@ -550,6 +623,7 @@
 #  define CURL_SIZEOF_CURL_SOCKLEN_T 4
 #  define CURL_PULL_SYS_TYPES_H      1
 #  define CURL_PULL_SYS_SOCKET_H     1
+#  endif /* ((sun) || (__sun) || (__sun__)) */
 
 #else
 #  error "Unknown non-configure build target!"