gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MS VC6.0 gnokii DLL (WIN32 x86)


From: Peter Nixon
Subject: Re: MS VC6.0 gnokii DLL (WIN32 x86)
Date: Wed, 12 Feb 2003 11:56:08 +0200
User-agent: KNode/0.7.2

Ladislav Michl wrote:

> Marcus Godehardt wrote:
>> here are the patches for win32/gnokii_vc6 folder i updated the makefiles
>> for MSVC6 and removed any absolute pathnames.
>> 
>> gsm-networks.c --> made countries and networks exportable for gnokii.c
>> compat.h       -->
> 
> we have functions for accessing these structures in cvs now. gnokii.c is
> using this way to list networks, so no need to export them.
> 
> static void list_gsm_networks(void)
> {
>                                                                               
>                                
>         gn_network network;
>         int i = 0;
>                                                                               
>                                
>         printf("Network  Name\n");
>         printf("-----------------------------------------\n");
>         while (gn_network_get(&network, i++))
>                 printf("%-7s  %s\n", network.code, network.name);
> }
> 
>> before: #if !defined(HAVE_SNPRINTF) && !defined(HAVE_C99_SNPRINTF)
>> after:  #if !defined(HAVE_SNPRINTF) || !defined(HAVE_C99_SNPRINTF)
>> 
>> if u look at snprintf it must be really a || otherwise i have no
>> prototype and the compiler assumes external linkage and return type int
>> (sometimes that can blow up the app)
> 
> seems correct and matches what we have in common/snprintf.c (but read
> below (1))
> 
> /* yes this really must be a ||. Don't muck with this (tridge) */
> #if !defined(HAVE_VSNPRINTF) || !defined(HAVE_C99_VSNPRINTF)
> API int vsnprintf (char *str, size_t count, const char *fmt, va_list
> args)
> {
>         return dopr(str, count, fmt, args);
> }
> #endif
>                                                                               
>                                
> /* yes this really must be a ||. Don't muck wiith this (tridge)
>  *
>  * The logic for these two is that we need our own definition if the
>  * OS *either* has no definition of *sprintf, or if it does have one
>  * that doesn't work properly according to the autoconf test.  Perhaps
>  * these should really be smb_snprintf to avoid conflicts with buggy
>  * linkers? -- mbp

Hmm.. Why is there Samba code in gnokii?? Or were tridge and Martin Pool
working on gnokii at some stage?? :-)



-- 

Peter Nixon
http://www.peternixon.net/
PGP Key: http://www.peternixon.net/public.asc




reply via email to

[Prev in Thread] Current Thread [Next in Thread]