[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-cppi] The thread about Gperf and cppi
From: |
Jim Meyering |
Subject: |
Re: [bug-cppi] The thread about Gperf and cppi |
Date: |
Thu, 20 Sep 2012 12:31:30 +0200 |
Akim Demaille wrote:
> Here is the thread.
And for the record, I'm Cc'ing bug-cppi:
> Début du message réexpédié :
>
>> De : Akim Demaille <address@hidden>
>> Objet : Rép : cppi
>> Date : 30 mars 2012 14:19:47 HAEC
>> À : Jim Meyering <address@hidden>
>>
>>
>>> Le 30 mars 2012 à 14:04, Jim Meyering a écrit :
>>
>>> Akim Demaille wrote:
>>>> Le 30 mars 2012 à 12:21, Jim Meyering a écrit :
>>>>
>>>>> ~/src/gnu/cppi $ gperf --version
>>>>> GNU gperf 3.1
>>>
>>> Thanks! I've upgraded, too, and regenerated cpp-cond.c.
>>> However, this is the only difference:
>>>
>>> --- src/cpp-cond.c.~1~ 2012-03-30 13:56:06.240999545 +0200
>>> +++ src/cpp-cond.c 2012-03-30 13:56:13.090184866 +0200
>>> @@ -1,4 +1,4 @@
>>> -/* ANSI-C code produced by gperf version 3.0.4 */
>>> +/* ANSI-C code produced by gperf version 3.1 */
>>
>> Ahem... There is something really fishy going on here :)
>>
>> However:
>>> #ifdef __GNUC__
>>> __inline
>>> #else
>>> #ifdef __cplusplus
>>> inline
>>> #endif
>>> #endif
>>> static unsigned int
>>> hash (register const char *str, register unsigned int len)
>>
>> You do have that static guy, but you don't have the whole
>> GNU_STDC_INLINE stuff.
>>
>> I don't know what to say :/
>>
>> According to the code:
>>
>>> void
>>> Output::output_hash_function () const
>>> {
>>> /* Output the function's head. */
>>> if (option[CPLUSPLUS])
>>> printf ("inline ");
>>> else if (option[KRC] | option[C] | option[ANSIC])
>>> printf ("#ifdef __GNUC__\n"
>>> "__inline\n"
>>> "#else\n"
>>> "#ifdef __cplusplus\n"
>>> "inline\n"
>>> "#endif\n"
>>> "#endif\n");
>>
>> indeed, there should not be the same #cpp stuff as here:
>>
>>> void
>>> Output::output_lookup_function () const
>>> {
>>> /* Output the function's head. */
>>> if (option[KRC] | option[C] | option[ANSIC])
>>> /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
>>> inline semantics, unless -fgnu89-inline is used. It defines a macro
>>> __GNUC_STDC_INLINE__ to indicate this situation or a macro
>>> __GNUC_GNU_INLINE__ to indicate the opposite situation.
>>> GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline
>>> semantics but warns, unless -fgnu89-inline is used:
>>> warning: C99 inline functions are not supported; using GNU89
>>> warning: to disable this warning use -fgnu89-inline or the
>>> gnu_inline function attribute
>>> It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. */
>>> printf ("#ifdef __GNUC__\n"
>>> "__inline\n"
>>> "#if defined __GNUC_STDC_INLINE__ || defined
>>> __GNUC_GNU_INLINE__\n"
>>> "__attribute__ ((__gnu_inline__))\n"
>>> "#endif\n"
>>> "#endif\n");
>>
>> OK, I have it...
>>
>>> $ less
>>> /opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/gperf/files/c99.patch
>>> --- src/output.cc.orig 2011-07-03 10:13:13.000000000 -0700
>>> +++ src/output.cc 2011-07-03 10:17:43.000000000 -0700
>>> @@ -745,12 +745,10 @@ Output::output_hash_function () const
>>> if (option[CPLUSPLUS])
>>> printf ("inline ");
>>> else if (option[KRC] | option[C] | option[ANSIC])
>>> - printf ("#ifdef __GNUC__\n"
>>> + printf ("#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >=
>>> 199901L) || defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)\n"
>>> + "inline\n"
>>> + "#elif defined(__GNUC__)\n"
>>> "__inline\n"
>>> - "#else\n"
>>> - "#ifdef __cplusplus\n"
>>> - "inline\n"
>>> - "#endif\n"
>>> "#endif\n");
>>>
>>> if (/* The function does not use the 'str' argument? */
>>
>> This patch is local to MacPorts apparently. In itself the patch
>> does not seem wrong (except maybe that Bruno was not contacted),
>> but it tickles your Perl pattern.
>>
>> Actually, they seem to be trying to address the same concern
>> as yourself. Was Bruno put into the loop?
>>
>> https://trac.macports.org/ticket/29974
>>
> Début du message réexpédié :
>
>> De : Jim Meyering <address@hidden>
>> Objet : Rép : cppi
>> Date : 30 mars 2012 14:04:19 HAEC
>> À : Akim Demaille <address@hidden>
>>
>> Akim Demaille wrote:
>>> Le 30 mars 2012 à 12:21, Jim Meyering a écrit :
>>>
>>>>> Début du message réexpédié :
>>>>>
>>>>>> De : Akim Demaille <address@hidden>
>>>>>> Date : 29 mars 2012 14:55:10 HAEC
>>>>>> À : address@hidden
>>>>>> Objet : Invalid tweaking of GPerf output
>>>>>>
>>>>>> I've also needed this patch. Was not part of the first
>>>>>> batch because I was looking for it in gperf, but really
>>>>>> it's in cppi that the problem is. Below is the diff
>>>>>> straight-from-gperf as-patched-by-cppi of cpp-cond.c:
>>>>>>
>>>>>> As you can see the first hunk has twice "static", which
>>>>>> my gcc dislikes.
>>>>
>>>> I don't see this problem with gperf-3.0.4.
>>>> What version are you using?
>>>
>>> I was using that one, and then I installed the git
>>> version.
>>>
>>>> What gcc? It compiles fine for me with 4.7.0 and 4.6.x.
>>>
>>> It was 4.7.
>> ...
>>> perl is going fine. I had already included the diff
>>> before/after perl in my message, and this snippet is adding
>>> a "static" to a function which already has its one:
>> ...
>>> With gperf.git:
>>>
>>>> ~/src/gnu/cppi $ gperf --version
>>>> GNU gperf 3.1
>>
>> Thanks! I've upgraded, too, and regenerated cpp-cond.c.
>> However, this is the only difference:
>>
>> --- src/cpp-cond.c.~1~ 2012-03-30 13:56:06.240999545 +0200
>> +++ src/cpp-cond.c 2012-03-30 13:56:13.090184866 +0200
>> @@ -1,4 +1,4 @@
>> -/* ANSI-C code produced by gperf version 3.0.4 */
>> +/* ANSI-C code produced by gperf version 3.1 */
>> /* Command-line: gperf -C -N cpp_cond_lookup -n -t -s 6 -k '*'
>> --language=ANSI-C src/cpp.gp */
>>
>> #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
>>
>> Here's my full generated cpp-cond.c.
>> I hope that will help you resolve the mystery.
>>
>> /* ANSI-C code produced by gperf version 3.1 */
>> /* Command-line: gperf -C -N cpp_cond_lookup -n -t -s 6 -k '*'
>> --language=ANSI-C src/cpp.gp */
>>
>> #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
>> && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
>> && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
>> && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
>> && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
>> && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
>> && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
>> && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
>> && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
>> && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
>> && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
>> && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
>> && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
>> && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
>> && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
>> && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
>> && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
>> && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
>> && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
>> && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
>> && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
>> && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
>> && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
>> /* The character set is not based on ISO-646. */
>> #error "gperf generated tables don't work with this execution character set.
>> Please report a bug to <address@hidden>."
>> #endif
>>
>> #line 1 "src/cpp.gp"
>> struct KW {char const *name; int code;};
>>
>> #define TOTAL_KEYWORDS 9
>> #define MIN_WORD_LENGTH 2
>> #define MAX_WORD_LENGTH 6
>> #define MIN_HASH_VALUE 0
>> #define MAX_HASH_VALUE 55
>> /* maximum key range = 56, duplicates = 0 */
>>
>> #ifdef __GNUC__
>> __inline
>> #else
>> #ifdef __cplusplus
>> inline
>> #endif
>> #endif
>> static unsigned int
>> hash (register const char *str, register unsigned int len)
>> {
>> static const unsigned char asso_values[] =
>> {
>> 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>> 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>> 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>> 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>> 56, 56, 5, 56, 56, 56, 56, 56, 56, 56,
>> 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>> 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>> 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>> 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>> 56, 56, 56, 56, 56, 56, 56, 0, 56, 56,
>> 0, 15, 10, 0, 56, 10, 56, 56, 0, 0,
>> 5, 56, 0, 56, 0, 0, 56, 56, 56, 56,
>> 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>> 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>> 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>> 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>> 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>> 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>> 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>> 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>> 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>> 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>> 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>> 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>> 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
>> 56, 56, 56, 56, 56, 56
>> };
>> register int hval = 0;
>>
>> switch (len)
>> {
>> default:
>> hval += asso_values[(unsigned char)str[5]];
>> /*FALLTHROUGH*/
>> case 5:
>> hval += asso_values[(unsigned char)str[4]];
>> /*FALLTHROUGH*/
>> case 4:
>> hval += asso_values[(unsigned char)str[3]];
>> /*FALLTHROUGH*/
>> case 3:
>> hval += asso_values[(unsigned char)str[2]];
>> /*FALLTHROUGH*/
>> case 2:
>> hval += asso_values[(unsigned char)str[1]];
>> /*FALLTHROUGH*/
>> case 1:
>> hval += asso_values[(unsigned char)str[0]];
>> break;
>> }
>> return hval;
>> }
>>
>> #ifdef __GNUC__
>> __inline
>> static
>> #if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
>> __attribute__ ((__gnu_inline__))
>> #endif
>> #endif
>> const struct KW *
>> cpp_cond_lookup (register const char *str, register unsigned int len)
>> {
>> static const struct KW wordlist[] =
>> {
>> #line 11 "src/cpp.gp"
>> {"pragma", EIC_PRAGMA},
>> {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
>> #line 3 "src/cpp.gp"
>> {"**", EIC_INVALID},
>> {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
>> #line 4 "src/cpp.gp"
>> {"if", EIC_IF},
>> {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
>> #line 8 "src/cpp.gp"
>> {"else", EIC_ELSE},
>> {""}, {""}, {""}, {""},
>> #line 7 "src/cpp.gp"
>> {"elif", EIC_ELIF},
>> {""}, {""}, {""}, {""},
>> #line 9 "src/cpp.gp"
>> {"endif", EIC_ENDIF},
>> {""}, {""}, {""}, {""},
>> #line 5 "src/cpp.gp"
>> {"ifdef", EIC_IFDEF},
>> {""}, {""}, {""}, {""},
>> #line 6 "src/cpp.gp"
>> {"ifndef", EIC_IFNDEF},
>> {""}, {""}, {""}, {""},
>> #line 10 "src/cpp.gp"
>> {"define", EIC_DEFINE}
>> };
>>
>> if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
>> {
>> register int key = hash (str, len);
>>
>> if (key <= MAX_HASH_VALUE && key >= 0)
>> {
>> register const char *s = wordlist[key].name;
>>
>> if (*str == *s && !strcmp (str + 1, s + 1))
>> return &wordlist[key];
>> }
>> }
>> return 0;
>> }
> Début du message réexpédié :
>
>> De : Akim Demaille <address@hidden>
>> Objet : Rép : cppi
>> Date : 30 mars 2012 13:12:42 HAEC
>> À : Jim Meyering <address@hidden>
>>
>>
>> Le 30 mars 2012 à 12:21, Jim Meyering a écrit :
>>
>>>> Début du message réexpédié :
>>>>
>>>>> De : Akim Demaille <address@hidden>
>>>>> Date : 29 mars 2012 14:55:10 HAEC
>>>>> À : address@hidden
>>>>> Objet : Invalid tweaking of GPerf output
>>>>>
>>>>> I've also needed this patch. Was not part of the first
>>>>> batch because I was looking for it in gperf, but really
>>>>> it's in cppi that the problem is. Below is the diff
>>>>> straight-from-gperf as-patched-by-cppi of cpp-cond.c:
>>>>>
>>>>> As you can see the first hunk has twice "static", which
>>>>> my gcc dislikes.
>>>
>>> I don't see this problem with gperf-3.0.4.
>>> What version are you using?
>>
>> I was using that one, and then I installed the git
>> version.
>>
>>> What gcc? It compiles fine for me with 4.7.0 and 4.6.x.
>>
>> It was 4.7.
>>
>>>>> --- s 2012-03-29 14:42:22.000000000 +0200
>>>>> +++ src/cpp-cond.c 2012-03-29 14:41:01.000000000 +0200
>>>>> @@ -31,20 +31,21 @@
>>>>> #line 1 "../../src/cpp.gp"
>>>>> struct KW {char const *name; int code;};
>>>>>
>>>>> #define TOTAL_KEYWORDS 9
>>>>> #define MIN_WORD_LENGTH 2
>>>>> #define MAX_WORD_LENGTH 6
>>>>> #define MIN_HASH_VALUE 0
>>>>> #define MAX_HASH_VALUE 55
>>>>> /* maximum key range = 56, duplicates = 0 */
>>>
>>> If using a newer gperf does not help, please change
>>> src/local.mk (temporarily) to do this: (inserting the "-i.bak")
>>> and see if this perl code is somehow malfunctioning for you?
>>>
>>> src/cpp-cond.c: src/cpp.gp
>>> $(AM_V_GEN)rm -f $@ address@hidden
>>> $(AM_V_at)$(GPERF) $(GPERF_OPTIONS) $< \
>>> | perl -i.bak -ne '/__GNUC_STDC_INLINE__/ and print "static\n";
>>> print' \
>>> > address@hidden
>>> $(AM_V_at)chmod a-w address@hidden
>>> $(AM_V_at)mv address@hidden $@
>>
>> perl is going fine. I had already included the diff
>> before/after perl in my message, and this snippet is adding
>> a "static" to a function which already has its one:
>>
>>> ~/src/gnu/cppi $ /opt/local/bin/gperf --version 13:02:36GNU gperf
>>> 3.0.4
>>> Copyright (C) 1989-1998, 2000-2004, 2006-2009 Free Software Foundation, Inc.
>>> License GPLv3+: GNU GPL version 3 or later
>>> <http://gnu.org/licenses/gpl.html>
>>> This is free software: you are free to change and redistribute it.
>>> There is NO WARRANTY, to the extent permitted by law.
>>> Written by Douglas C. Schmidt and Bruno Haible.
>>
>>> ~/src/gnu/cppi $ /opt/local/bin/gperf -C -N cpp_cond_lookup -n -t
>>> -s 6 -k '*' --language=ANSI-C --output-file=- src/cpp.gp | grep
>>> -B10 '^hash'
>>> #define MIN_HASH_VALUE 0
>>> #define MAX_HASH_VALUE 55
>>> /* maximum key range = 56, duplicates = 0 */
>>>
>>> #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) ||
>>> defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)
>>> inline
>>> #elif defined(__GNUC__)
>>> __inline
>>> #endif
>>> static unsigned int
>>> hash (register const char *str, register unsigned int len)
>>
>>
>>
>> With gperf.git:
>>
>>> ~/src/gnu/cppi $ gperf --version
>>> GNU gperf 3.1
>>> Copyright (C) 1989-2011 Free Software Foundation, Inc.
>>> License GPLv3+: GNU GPL version 3 or later
>>> <http://gnu.org/licenses/gpl.html>
>>> This is free software: you are free to change and redistribute it.
>>> There is NO WARRANTY, to the extent permitted by law.
>>> Written by Douglas C. Schmidt and Bruno Haible.
>>
>>> ~/src/gnu/cppi $ gperf -C -N cpp_cond_lookup -n -t -s 6 -k '*'
>>> --language=ANSI-C --output-file=- src/cpp.gp | grep -B10 '^hash'
>>> /* maximum key range = 56, duplicates = 0 */
>>>
>>> #ifdef __GNUC__
>>> __inline
>>> #else
>>> #ifdef __cplusplus
>>> inline
>>> #endif
>>> #endif
>>> static unsigned int
>>> hash (register const char *str, register unsigned int len)
>>
>> (I agree the difference is surprising here, yet static
>> is still there).
>>
>>> * .gitignore: Remove all /po/.+ entries; replace with just two:
>>> /po/ and !/po/POTFILES.in, to denote that we VC only that one file
>>
>> I did not know "!", thanks :)
>>
>>> in the po/ directory. Reported by Akim Demaille.
>>
>>
> Début du message réexpédié :
>
>> De : Jim Meyering <address@hidden>
>> Objet : Rép : cppi
>> Date : 30 mars 2012 12:21:22 HAEC
>> À : Akim Demaille <address@hidden>
>>
>> Akim Demaille wrote:
>>> Hi Jim,
>>>
>>> these messages did not appear in the archive, and usually
>>> you answer quickly, so maybe something is going wrong.
>>
>> Thanks for resending. Indeed: I never saw the original.
>>
>>> Début du message réexpédié :
>>>
>>>> De : Akim Demaille <address@hidden>
>>>> Date : 29 mars 2012 14:55:10 HAEC
>>>> À : address@hidden
>>>> Objet : Invalid tweaking of GPerf output
>>>>
>>>> I've also needed this patch. Was not part of the first
>>>> batch because I was looking for it in gperf, but really
>>>> it's in cppi that the problem is. Below is the diff
>>>> straight-from-gperf as-patched-by-cppi of cpp-cond.c:
>>>>
>>>> As you can see the first hunk has twice "static", which
>>>> my gcc dislikes.
>>
>> I don't see this problem with gperf-3.0.4.
>> What version are you using?
>> What gcc? It compiles fine for me with 4.7.0 and 4.6.x.
>>
>>>> --- s 2012-03-29 14:42:22.000000000 +0200
>>>> +++ src/cpp-cond.c 2012-03-29 14:41:01.000000000 +0200
>>>> @@ -31,20 +31,21 @@
>>>> #line 1 "../../src/cpp.gp"
>>>> struct KW {char const *name; int code;};
>>>>
>>>> #define TOTAL_KEYWORDS 9
>>>> #define MIN_WORD_LENGTH 2
>>>> #define MAX_WORD_LENGTH 6
>>>> #define MIN_HASH_VALUE 0
>>>> #define MAX_HASH_VALUE 55
>>>> /* maximum key range = 56, duplicates = 0 */
>>
>> If using a newer gperf does not help, please change
>> src/local.mk (temporarily) to do this: (inserting the "-i.bak")
>> and see if this perl code is somehow malfunctioning for you?
>>
>> src/cpp-cond.c: src/cpp.gp
>> $(AM_V_GEN)rm -f $@ address@hidden
>> $(AM_V_at)$(GPERF) $(GPERF_OPTIONS) $< \
>> | perl -i.bak -ne '/__GNUC_STDC_INLINE__/ and print "static\n";
>> print' \
>> > address@hidden
>> $(AM_V_at)chmod a-w address@hidden
>> $(AM_V_at)mv address@hidden $@
>>
>> ...
>>>> BTW, I have a number of non-gitignored files. What is supposed
>>>> to happen with these guys?
>>
>> Odd... "git st" is clean for me.
>> I see that is because I have a non-VC'd po/.gitignore file.
>>
>> Oh... bootstrap would automatically append names of things it
>> generates to a VC'd po/.gitignore file (I think)... So that file
>> is old. I've removed it and fixed properly with this:
>> [I'll respond to your two other patches separately]
>>
>>> From db9da8f680c307c160e2d8f6a418e726455094ce Mon Sep 17 00:00:00 2001
>> From: Jim Meyering <address@hidden>
>> Date: Fri, 30 Mar 2012 12:17:52 +0200
>> Subject: [PATCH] maint: ignore almost all po/* entries, so that "git status"
>> is clean
>>
>> * .gitignore: Remove all /po/.+ entries; replace with just two:
>> /po/ and !/po/POTFILES.in, to denote that we VC only that one file
>> in the po/ directory. Reported by Akim Demaille.
>> Also ignore gnulib-tool artifact, lib/gnulib.mk.bak.
>> ---
>> .gitignore | 14 +++-----------
>> 1 file changed, 3 insertions(+), 11 deletions(-)
>>
>> diff --git a/.gitignore b/.gitignore
>> index e737fec..d2cbe38 100644
>> --- a/.gitignore
>> +++ b/.gitignore
>> @@ -1,3 +1,4 @@
>> +!/po/POTFILES.in
>> *~
>> .deps
>> .dirstamp
>> @@ -30,6 +31,7 @@
>> /lib/config.h
>> /lib/configmake.h
>> /lib/glthread
>> +/lib/gnulib.mk.bak
>> /lib/libcppi.a
>> /lib/link-warning.h
>> /lib/stamp-h1
>> @@ -37,17 +39,7 @@
>> /m4
>> /m4/.gitignore
>> /maint.mk
>> -/po/.gitignore
>> -/po/.reference
>> -/po/??.gmo
>> -/po/??.po
>> -/po/LINGUAS
>> -/po/Makefile
>> -/po/Makefile.in
>> -/po/Makevars
>> -/po/POTFILES
>> -/po/cppi.pot
>> -/po/stamp-po
>> +/po/
>> /test-suite.log
>> /tests/*.log
>> /tests/*.trs
>> --
>> 1.7.9.3
> Début du message réexpédié :
>
>> De : Akim Demaille <address@hidden>
>> Objet : cppi
>> Date : 30 mars 2012 09:57:50 HAEC
>> À : Jim Meyering <address@hidden>
>>
>> Hi Jim,
>>
>> these messages did not appear in the archive, and usually
>> you answer quickly, so maybe something is going wrong.
>>
>> Cheers!
>>
>> Début du message réexpédié :
>>
>>> De : Akim Demaille <address@hidden>
>>> Date : 29 mars 2012 14:55:10 HAEC
>>> À : address@hidden
>>> Objet : Invalid tweaking of GPerf output
>>>
>>> I've also needed this patch. Was not part of the first
>>> batch because I was looking for it in gperf, but really
>>> it's in cppi that the problem is. Below is the diff
>>> straight-from-gperf as-patched-by-cppi of cpp-cond.c:
>>>
>>> As you can see the first hunk has twice "static", which
>>> my gcc dislikes.
>>>
>>> --- s 2012-03-29 14:42:22.000000000 +0200
>>> +++ src/cpp-cond.c 2012-03-29 14:41:01.000000000 +0200
>>> @@ -31,20 +31,21 @@
>>> #line 1 "../../src/cpp.gp"
>>> struct KW {char const *name; int code;};
>>>
>>> #define TOTAL_KEYWORDS 9
>>> #define MIN_WORD_LENGTH 2
>>> #define MAX_WORD_LENGTH 6
>>> #define MIN_HASH_VALUE 0
>>> #define MAX_HASH_VALUE 55
>>> /* maximum key range = 56, duplicates = 0 */
>>>
>>> +static
>>> #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) ||
>>> defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)
>>> inline
>>> #elif defined(__GNUC__)
>>> __inline
>>> #endif
>>> static unsigned int
>>> hash (register const char *str, register unsigned int len)
>>> {
>>> static const unsigned char asso_values[] =
>>> {
>>> @@ -96,20 +97,21 @@
>>> /*FALLTHROUGH*/
>>> case 1:
>>> hval += asso_values[(unsigned char)str[0]];
>>> break;
>>> }
>>> return hval;
>>> }
>>>
>>> #ifdef __GNUC__
>>> __inline
>>> +static
>>> #if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
>>> __attribute__ ((__gnu_inline__))
>>> #endif
>>> #endif
>>> const struct KW *
>>> cpp_cond_lookup (register const char *str, register unsigned int len)
>>> {
>>> static const struct KW wordlist[] =
>>> {
>>> #line 11 "../../src/cpp.gp"
>>>
>>>
>>>
>
>>
>>>
>>>
>>> BTW, I have a number of non-gitignored files. What is supposed
>>> to happen with these guys?
>>>
>>> ~/src/gnu/cppi $ git st
>>> # On branch master
>>> # Your branch is ahead of 'origin/master' by 3 commits.
>>> #
>>> # Untracked files:
>>> # (use "git add <file>..." to include in what will be committed)
>>> #
>>> # po/Makefile.in.in
>>> # po/Makevars.template
>>> # po/Rules-quot
>>> # po/boldquot.sed
>>> # po/address@hidden
>>> # po/address@hidden
>>> # po/insert-header.sin
>>> # po/quot.sed
>>> # po/remove-potcdate.sin
>>>
>> Début du message réexpédié :
>>
>>> De : Akim Demaille <address@hidden>
>>> Date : 29 mars 2012 14:33:22 HAEC
>>> À : address@hidden
>>> Objet : VPATH issues
>>>
>>> Hi!
>>>
>>> I've needed the following changes to be able to compile
>>> cppi properly in VPATH build. The second patch could
>>> also have moved the -*- comment in the license header,
>>> I don't know what your favorite choice is.
>>>
>>> Cheers!
>>>
>
>
>>
>>>
>>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [bug-cppi] The thread about Gperf and cppi,
Jim Meyering <=