Skip to Content.
Sympa Menu

freetds - Re: [freetds] Win32 Make

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Win32 Make
  • Date: Thu, 30 Jul 2015 19:23:22 +0100

2015-07-30 15:26 GMT+01:00 Michael Becker <m.becker AT spider-software.net>:
> 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)
> ==============================================
>

Change a bit to do both the tests, it continues to build on old Visual
Studio versions.

> 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
>

Which functions?

> How can this lib be included optional into cmake?
>

I think just include in lib_BASE define but perhaps would be better to
avoid to use them. Depends on the functions.

Frediano

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




Archive powered by MHonArc 2.6.24.

Top of Page