tag 710651 + patch
thanks

Hi,

On Sun, 2 Jun 2013 15:41:41 +0200, "Didier 'OdyX' Raboud" <o...@debian.org>
wrote:
> can you take a look at that ? I have no clue how in that area and would 
> appreciate if you could take a look.

On Sat, June 1, 2013 18:38, Andrey Rahmatullin wrote:
> On Fri, May 31, 2013 at 08:37:24PM +0200, David Suárez wrote:  
>> > i686-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I../../util -I.. -I..  
>> -I../../include -I../../intl    -g -Os -fno-omit-frame-pointer -Wall
>> -Wno-pointer-sign -MT regex.o -MD -MP -MF .deps/regex.Tpo -c -o
>> regex.o ../../util/regex.c  
>> > In file included from ../../util/regex.c:50:0:
>> > ../../util/regcomp.c:528:20: error: unknown type name 'preg'
>> > ../../util/regcomp.c:528:26: error: unknown type name 'errbuf'
>> > ../../util/regcomp.c:528:34: error: unknown type name 'errbuf_size'
>> > ../../util/regcomp.c:533:1: error: expected identifier or '(' before  
>> '{' token  
> The code:
>
> size_t
> regerror (errcode, preg, errbuf, errbuf_size)
>     int errcode;
>     const regex_t *preg;
>     char *errbuf;
>     size_t errbuf_size;
> {
>
>
> So it looks like the i686-w64-mingw32-gcc used doesn't support K&R
> function
> definitions?  

Rest assured, it still supports K&R function definitions. This is a
combination of failures... On Windows, errcode is typedef'ed as int;
mingw-w64 added this recently. This combined with the K&R-style
function declaration means gcc can't compile regcomp.c!

The attached quilt patch fixes this.

While working on this I noticed another problem: the configure script no
longer determines that C symbols need underscores, so the assembler mpi files
don't produce the correct output. I'm trying to find a better fix, but a
quick workaround is to use

build-win32/config.status:
        dh_testdir
        (mkdir -p $(@D); cd $(@D); CFLAGS="-g -Os" \
            ../configure $(CONFARGS) --host i686-w64-mingw32 \
            --disable-gnupg-iconv --without-bzip2 --without-readline
            --without-libcurl --disable-ldap ac_cv_sys_symbol_underscore=yes)

in debian/rules.

Regards,

Stephen
Author: Stephen Kitt <sk...@debian.org>
Description: Use non-K&R-style declarations when using errcode

diff -ur gnupg-1.4.12/util/regcomp.c gnupg-1.4.12-patched/util/regcomp.c
--- gnupg-1.4.12/util/regcomp.c 2012-01-20 11:51:16.000000000 +0100
+++ gnupg-1.4.12-patched/util/regcomp.c 2013-06-02 22:57:19.628244534 +0200
@@ -461,10 +461,7 @@
    the return codes and their meanings.)  */
 
 int
-regcomp (preg, pattern, cflags)
-    regex_t *__restrict preg;
-    const char *__restrict pattern;
-    int cflags;
+regcomp (regex_t *__restrict preg, const char *__restrict pattern, int cflags)
 {
   reg_errcode_t ret;
   reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED
@@ -525,11 +522,7 @@
    from either regcomp or regexec.   We don't use PREG here.  */
 
 size_t
-regerror (errcode, preg, errbuf, errbuf_size)
-    int errcode;
-    const regex_t *preg;
-    char *errbuf;
-    size_t errbuf_size;
+regerror (int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)
 {
   const char *msg;
   size_t msg_size;

Attachment: signature.asc
Description: PGP signature

Reply via email to