Various curl build definitions for Solaris for both Studio and Gnu compilers.
These changes need to be sent upsteam.
--- include/curl/curlbuild.h.orig 2014-09-10 12:10:14.624818524 -0700
+++ include/curl/curlbuild.h 2014-09-10 12:10:08.344835020 -0700
@@ -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(__ILP32__) || \
defined(__i386__) || defined(__ppc__) || defined(__arm__) || defined(__sparc__)
# define CURL_SIZEOF_LONG 4
@@ -552,6 +625,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!"