使用gcc5.3编译libgpg-error-1.12出现
gawk -f ./mkerrcodes.awk >mkerrcodes.h
rm _mkerrcodes.h
cc -I. -I. -o mkerrcodes ./mkerrcodes.c
In file included from ./mkerrcodes.c:26:0:
./mkerrcodes.h:9:5: error: expected expression before ',' token
{ , "GPG_ERR_E2BIG" },
gcc 4.8.3 编译没有问题
使用下面补丁
libgpg.diff
--- a/src/Makefile.am 2015-09-12 20:15:03.707121022 +0300
+++ b/src/Makefile.am 2015-09-12 20:03:05.000000000 +0300
@@ -140,7 +140,7 @@
# It is correct to use $(CPP). We want the host's idea of the error codes.
mkerrcodes.h: Makefile mkerrcodes.awk $(gpg_extra_headers)
$(AWK) -f $(srcdir)/mkerrcodes1.awk $(srcdir)/errnos.in >_$@
- $(CPP) $(CPPFLAGS) $(extra_cppflags) _$@ | grep GPG_ERR_ | \
+ $(CPP) $(CPPFLAGS) $(extra_cppflags) -P _$@ | grep GPG_ERR_ | \
$(AWK) -f $(srcdir)/mkerrcodes.awk >$@
-rm _$@
--- a/src/Makefile.in 2015-09-12 20:15:16.858120992 +0300
+++ b/src/Makefile.in 2015-09-12 20:11:52.000000000 +0300
@@ -979,7 +979,7 @@
# It is correct to use $(CPP). We want the host's idea of the error codes.
mkerrcodes.h: Makefile mkerrcodes.awk $(gpg_extra_headers)
$(AWK) -f $(srcdir)/mkerrcodes1.awk $(srcdir)/errnos.in >_$@
- $(CPP) $(CPPFLAGS) $(extra_cppflags) _$@ | grep GPG_ERR_ | \
+ $(CPP) $(CPPFLAGS) $(extra_cppflags) -P _$@ | grep GPG_ERR_ | \
$(AWK) -f $(srcdir)/mkerrcodes.awk >$@
-rm _$@
gawk -f ./mkerrcodes.awk >mkerrcodes.h
rm _mkerrcodes.h
cc -I. -I. -o mkerrcodes ./mkerrcodes.c
In file included from ./mkerrcodes.c:26:0:
./mkerrcodes.h:9:5: error: expected expression before ',' token
{ , "GPG_ERR_E2BIG" },
./mkerrcodes.h:10:5: error: expected expression before ',' token
{ , "GPG_ERR_EACCES" },
./mkerrcodes.h:11:5: error: expected expression before ',' token
{ , "GPG_ERR_EADDRINUSE" },
./mkerrcodes.h:12:5: error: expected expression before ',' token
{ , "GPG_ERR_EADDRNOTAVAIL" },
./mkerrcodes.h:13:5: error: expected expression before ',' token
{ , "GPG_ERR_EADV" },
gawk -f ./mkerrcodes.awk >mkerrcodes.h
rm _mkerrcodes.h
cc -I. -I. -o mkerrcodes ./mkerrcodes.c
In file included from ./mkerrcodes.c:26:0:
./mkerrcodes.h:9:5: error: expected expression before ',' token
{ , "GPG_ERR_E2BIG" },
./mkerrcodes.h:10:5: error: expected expression before ',' token
{ , "GPG_ERR_EACCES" },
./mkerrcodes.h:11:5: error: expected expression before ',' token
{ , "GPG_ERR_EADDRINUSE" },
./mkerrcodes.h:12:5: error: expected expression before ',' token
{ , "GPG_ERR_EADDRNOTAVAIL" },
./mkerrcodes.h:13:5: error: expected expression before ',' token
{ , "GPG_ERR_EADV" },
gawk -f ./mkerrcodes.awk >mkerrcodes.h
rm _mkerrcodes.h
cc -I. -I. -o mkerrcodes ./mkerrcodes.c
In file included from ./mkerrcodes.c:26:0:
./mkerrcodes.h:9:5: error: expected expression before ',' token
{ , "GPG_ERR_E2BIG" },
./mkerrcodes.h:10:5: error: expected expression before ',' token
{ , "GPG_ERR_EACCES" },
./mkerrcodes.h:11:5: error: expected expression before ',' token
{ , "GPG_ERR_EADDRINUSE" },
./mkerrcodes.h:12:5: error: expected expression before ',' token
{ , "GPG_ERR_EADDRNOTAVAIL" },
./mkerrcodes.h:13:5: error: expected expression before ',' token
{ , "GPG_ERR_EADV" },
阅读(3210) | 评论(0) | 转发(0) |