Re: Win32 Make
Michael Becker <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
these functions must be checked using check_symbol_exists
I have changed CMakeLists.txt as follows:
==============================================
# find functions
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
set(FUNCS _atoi64 strtok_r readpassphrase
strlcpy strlcat basename getopt strsep gettimeofday
nl_langinfo locale_charset setenv putenv
getuid getpwuid getpwuid_r fstat alarm fork
gethrtime localtime_r setitimer
_fseeki64 _ftelli64 setrlimit
inet_ntoa_r getipnodebyaddr getipnodebyname
getaddrinfo inet_ntop gethostname poll socketpair
clock_gettime fseeko pthread_cond_timedwait
pthread_condattr_setclock _lock_file _unlock_file usleep nanosleep
readdir_r)
foreach(func ${FUNCS})
string(TOUPPER "HAVE_${func}" var)
check_function_exists(${func} ${var})
set(HAVE_GETADDRINFO 1 CACHE INTERNAL "")
config_write("/* Define to 1 if you have function <${func}>. */\n")
config_write("#cmakedefine ${var} 1\n\n")
endforeach(func)
set(VSPRINTF asprintf vasprintf vsnprintf _vsnprintf snprintf _snprintf _vscprintf)
foreach(func ${VSPRINTF})
string(TOUPPER "HAVE_${func}" var)
check_symbol_exists(${func} stdio.h ${var})
config_write("/* Define to 1 if you have function <${func}>. */\n")
config_write("#cmakedefine ${var} 1\n\n")
endforeach(func)
set(CMAKE_REQUIRED_LIBRARIES)
==============================================
This works for the replacement functions but runs into an error when linking tdsodbc.dll because some stdio functions
seem to have moved to legacy_stdio_definitions.lib
How can this lib be included optional into cmake?
On 30/07/15 13:04, Michael Becker wrote:
> have created an entry in cmake bugtracker
>
> On 30/07/15 12:41, Michael Becker wrote:
>>>
>>> There are different possibilities. Function is inline (I suspect it is).
>>> Function is non __cdecl. Function is declared as C++ (I don't think so).
>>> Can you find function declaration into the headers?
>>>
>>
>> both (vsnprintf and _vsnprintf) are in stdio.h and both are inlines ...
>>
>>
>> _______________________________________________
>> FreeTDS mailing list
>> [email protected]
>> http://lists.ibiblio.org/mailman/listinfo/freetds
>>
>
>
> _______________________________________________
> FreeTDS mailing list
> [email protected]
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
m_becker.vcf
(text/x-vcard, 135 B)
begin:vcard fn:Michael Becker n:Becker;Michael email;internet:[email protected] x-mozilla-html:FALSE version:2.1 end:vcard
smime.p7s
(application/pkcs7-signature, 4.2 KB) - not displayed