logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: Small bug - missing semicolon in libupnp-1.3.1/threadutil/inc/iasnprint: msg#00000

Subject: Re: Small bug - missing semicolon in libupnp-1.3.1/threadutil/inc/iasnprintf.h
This is fixed in pupnp since 1.4.0 (2006-06-06). You can find the latest 
version 1.4.1 here:
https://sourceforge.net/project/showfiles.php?group_id=166957

BTW, the patch is not correct, because it brakes for newer gcc versions. 
it should look like:

EXPORT int iasnprintf(char **ret,
            int incr,
            int max,
            const char * fmt, ...)
#if (__GNUC__ >= 3)
    __attribute__((format (__printf__, 4, 5)));
#else
;
#endif


cheers,
nektarios

Garaschenko Slava wrote:
> As result of missing semicolon in iasnprintf.h it's
> impossibly to build library on some compilers -
> gcc-2.96 for example (most RH old releases). Then you
> try to "make" it's appear this error:
> ==========================
> src/iasnprintf.c: In function `iasnprintf':
> src/iasnprintf.c:57: parse error before `{'
> inc/iasnprintf.h:56: parm types given both in parmlist
> and separately
> make[2]: *** [src/iasnprintf.lo] Error 1
> make[2]: Leaving directory
> `/root/tmp/UPnP/tmp/libupnp-1.3.1/threadutil'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory
> `/root/tmp/UPnP/tmp/libupnp-1.3.1'
> make: *** [all] Error 2
> ==========================
> This patch will be correcting this bug:
> 
> diff -r -c
> ./old/libupnp-1.3.1/threadutil/inc/iasnprintf.h
> ./new/libupnp-1.3.1/threadutil/inc/iasnprintf.h
> *** ./old/libupnp-1.3.1/threadutil/inc/iasnprintf.h   
>  Sun Feb 26 22:29:12 2006
> --- ./new/libupnp-1.3.1/threadutil/inc/iasnprintf.h   
>  Wed Sep 27 22:13:30 2006
> ***************
> *** 49,55 ****
>   EXPORT int iasnprintf(char **ret,
>                int incr,
>                int max,
> !              const char * fmt, ...)
>   #if (__GNUC__ >= 3)
>         __attribute__((format (__printf__, 4, 5)));
>   #endif
> --- 49,55 ----
>   EXPORT int iasnprintf(char **ret,
>                int incr,
>                int max,
> !              const char * fmt, ...);
>   #if (__GNUC__ >= 3)
>         __attribute__((format (__printf__, 4, 5)));
>   #endif
> 
> =================
> After this, the library is compiled without problem
> also with gcc 2.96, and possibly many other compillers
> with strong checking of program structure.
>                    Vyacheslav Garashchenko
>                    Kiev, Ukraine
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> 
> ------------------------------------------------------------------------
> 
> diff -r -c ./old/libupnp-1.3.1/threadutil/inc/iasnprintf.h 
> ./new/libupnp-1.3.1/threadutil/inc/iasnprintf.h
> *** ./old/libupnp-1.3.1/threadutil/inc/iasnprintf.h   Sun Feb 26 22:29:12 2006
> --- ./new/libupnp-1.3.1/threadutil/inc/iasnprintf.h   Wed Sep 27 22:13:30 2006
> ***************
> *** 49,55 ****
>   EXPORT int iasnprintf(char **ret,
>              int incr,
>              int max,
> !            const char * fmt, ...)
>   #if (__GNUC__ >= 3)
>       __attribute__((format (__printf__, 4, 5)));
>   #endif
> --- 49,55 ----
>   EXPORT int iasnprintf(char **ret,
>              int incr,
>              int max,
> !            const char * fmt, ...);
>   #if (__GNUC__ >= 3)
>       __attribute__((format (__printf__, 4, 5)));
>   #endif
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> UPnP-SDK-discuss mailing list
> UPnP-SDK-discuss@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/upnp-sdk-discuss

-- 
______________________________________________________________
Nektarios K. Papadopoulos
Senior Engineer
Software Engineering Group
inAccess Networks
95A Pentelis Avenue.    Tel    : +30-210-6837640
152 34 Halandri Athens  Fax    : +30-210-6899504
______________________________________________________________

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


<Prev in Thread] Current Thread [Next in Thread>