Skip to Content.
Sympa Menu

freetds - Re: [freetds] Win32 Make

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Michael Becker <m.becker AT spider-software.net>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Win32 Make
  • Date: Thu, 30 Jul 2015 16:26:39 +0200

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
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds



_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds

begin:vcard
fn:Michael Becker
n:Becker;Michael
email;internet:m.becker AT spider-software.net
x-mozilla-html:FALSE
version:2.1
end:vcard

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature




Archive powered by MHonArc 2.6.24.

Top of Page