ENH: fix suffix stuff

This commit is contained in:
Bill Hoffman 2008-09-26 17:50:41 -04:00
parent 1a9ca21684
commit b25f4b76c7
1 changed files with 9 additions and 5 deletions

View File

@ -44,7 +44,6 @@ function(curl_find_curl_off_t trytypes size)
if(DEFINED curl_typeof_curl_off_t) if(DEFINED curl_typeof_curl_off_t)
return() return()
endif(DEFINED curl_typeof_curl_off_t) endif(DEFINED curl_typeof_curl_off_t)
message("${size}")
foreach(type ${${trytypes}}) foreach(type ${${trytypes}})
# force the try compile to try until it works # force the try compile to try until it works
set(curl_typeof_curl_off_t "UNKNOWN") set(curl_typeof_curl_off_t "UNKNOWN")
@ -82,7 +81,7 @@ curl_find_curl_off_t(try_types_2 2 )
if(curl_show_typeof_status) if(curl_show_typeof_status)
message(STATUS "curl_typeof_curl_off_t = ${curl_typeof_curl_off_t}") message(STATUS "curl_typeof_curl_off_t = ${curl_typeof_curl_off_t}")
check_type_size("${CURL_TYPEOF_CURL_OFF_T}" CURL_SIZEOF_CURL_OFF_T) check_type_size("${CURL_TYPEOF_CURL_OFF_T}" CURL_SIZEOF_CURL_OFF_T)
message(STATUS "sizeof curl_typeof_curl_off_t = ${CURL_SIZEOF_CURL_OFF_T}") message(STATUS "sizeof ${curl_typeof_curl_off_t} = ${CURL_SIZEOF_CURL_OFF_T}")
endif(curl_show_typeof_status) endif(curl_show_typeof_status)
@ -139,16 +138,17 @@ else(curl_pri_macro)
endif(curl_pri_macro) endif(curl_pri_macro)
function (check_curl_off_t_suffix ) function (check_curl_off_t_suffix )
if(DEFINED curl_suffix_curl_off_t) if(DEFINED CURL_SUFFIX_CURL_OFF_T)
return() return()
endif(DEFINED curl_suffix_curl_off_t) endif()
set(CURL_TYPEOF_CURL_OFF_T "long long")
if(CURL_TYPEOF_CURL_OFF_T MATCHES "long.*long") if(CURL_TYPEOF_CURL_OFF_T MATCHES "long.*long")
set(curl_test_suffix "LL") set(curl_test_suffix "LL")
endif() endif()
if(CURL_TYPEOF_CURL_OFF_T STREQUAL "long") if(CURL_TYPEOF_CURL_OFF_T STREQUAL "long")
set(curl_test_suffix "L") set(curl_test_suffix "L")
endif() endif()
if(CURL_TYPEOF_CURL_OFF_T) if(CURL_TYPEOF_CURL_OFF_T STREQUAL "int")
set(curl_test_suffix "") set(curl_test_suffix "")
endif() endif()
if(CURL_TYPEOF_CURL_OFF_T STREQUAL "__int64") if(CURL_TYPEOF_CURL_OFF_T STREQUAL "__int64")
@ -184,6 +184,10 @@ function (check_curl_off_t_suffix )
set(CURL_SUFFIX_CURL_OFF_TU ${curl_test_suffix_u} CACHE INTERNAL "unsigned suffix for off_t") set(CURL_SUFFIX_CURL_OFF_TU ${curl_test_suffix_u} CACHE INTERNAL "unsigned suffix for off_t")
endif(curl_suffix_curl_off_t_test) endif(curl_suffix_curl_off_t_test)
endforeach(suffix) endforeach(suffix)
if(NOT DEFINED CURL_SUFFIX_CURL_OFF_T)
set(CURL_SUFFIX_CURL_OFF_T "" CACHE INTERNAL "signed suffix for off_t")
set(CURL_SUFFIX_CURL_OFF_TU "" CACHE INTERNAL "unsigned suffix for off_t")
endif()
endfunction(check_curl_off_t_suffix) endfunction(check_curl_off_t_suffix)
# find the suffix to add to a literal number for the off_t type # find the suffix to add to a literal number for the off_t type
check_curl_off_t_suffix() check_curl_off_t_suffix()