summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2004-10-05 13:05:57 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2004-10-05 13:05:57 (GMT)
commit7f21ee17a9d152fdb775855aa03cf83903579a55 (patch)
treec7c8d096a0b47c0e229b818fd4316ec4cdf3f17a
parentdcaf523a7dcdb578b25c7e9232f0b7049e325d93 (diff)
downloadCMake-7f21ee17a9d152fdb775855aa03cf83903579a55.zip
CMake-7f21ee17a9d152fdb775855aa03cf83903579a55.tar.gz
CMake-7f21ee17a9d152fdb775855aa03cf83903579a55.tar.bz2
BUG: Fix O_NONBLOCK test
-rw-r--r--Source/CTest/Curl/CMake/CurlTests.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/Source/CTest/Curl/CMake/CurlTests.c b/Source/CTest/Curl/CMake/CurlTests.c
index 9da467f..a637b38 100644
--- a/Source/CTest/Curl/CMake/CurlTests.c
+++ b/Source/CTest/Curl/CMake/CurlTests.c
@@ -25,8 +25,7 @@ return 0;
int
main ()
{
-
-/* try to compile O_NONBLOCK */
+ /* try to compile O_NONBLOCK */
#if defined(sun) || defined(__sun__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
# if defined(__SVR4) || defined(__srv4__)
@@ -39,17 +38,11 @@ main ()
# define PLATFORM_AIX_V3
#endif
-#if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3)
+#if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3) || defined(__BEOS__)
#error "O_NONBLOCK does not work on this platform"
#endif
int socket;
-#ifndef fcntl
- (void)fcntl;
-#endif
int flags = fcntl(socket, F_SETFL, flags | O_NONBLOCK);
-
- ;
- return 0;
}
#endif
@@ -420,3 +413,17 @@ void main(void) {
}
}
#endif
+#ifdef _FILE_OFFSET_BITS
+#undef _FILE_OFFSET_BITS
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int main () { ; return 0; }
+#endif