configure: Fix gperf length parameter determination
authorTobias Brunner <tobias@strongswan.org>
Tue, 26 Sep 2017 10:23:36 +0000 (12:23 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 2 Oct 2017 15:21:42 +0000 (17:21 +0200)
gperf is not actually a build dependency as the generated files are
shipped in the tarball.  So the type depends on the gperf version on
the host that ran gperf and created the tarball, which might not be
the same as that on the actual build host, and gperf might not even
be installed there, leaving the type undetermined.

Fixes: e0e43229736a ("configure: Detect type of length parameter for gperf generated function")

15 files changed:
configure.ac
src/libstrongswan/.gitignore
src/libstrongswan/Makefile.am
src/libstrongswan/crypto/proposal/proposal_keywords_static.h [deleted file]
src/libstrongswan/crypto/proposal/proposal_keywords_static.h.in [new file with mode: 0644]
src/starter/.gitignore
src/starter/Makefile.am
src/starter/confread.c
src/starter/keywords.h [deleted file]
src/starter/keywords.h.in [new file with mode: 0644]
src/starter/keywords.txt
src/stroke/.gitignore
src/stroke/Makefile.am
src/stroke/stroke_keywords.h [deleted file]
src/stroke/stroke_keywords.h.in [new file with mode: 0644]

index a03370e..9b4109f 100644 (file)
@@ -392,7 +392,7 @@ if test -x "$GPERF"; then
                                [AC_MSG_ERROR([unable to determine gperf len type])]
                        )]
                )
-               AC_DEFINE_UNQUOTED([GPERF_LEN_TYPE], [$GPERF_LEN_TYPE], [gperf len type])
+               AC_SUBST(GPERF_LEN_TYPE)
                AC_MSG_RESULT([yes])
        else
                AC_MSG_RESULT([no])
index 46b69ab..1f2695f 100644 (file)
@@ -1,2 +1,2 @@
 oid.[ch]
-proposal_keywords_static.c
+proposal_keywords_static.[ch]
index b4d8452..75b1d14 100644 (file)
@@ -195,16 +195,19 @@ endif
 EXTRA_DIST = \
 asn1/oid.txt asn1/oid.pl \
 crypto/proposal/proposal_keywords_static.txt \
+crypto/proposal/proposal_keywords_static.h.in \
 plugins/plugin_constructors.py \
 Android.mk
 
 BUILT_SOURCES = \
 $(srcdir)/asn1/oid.c $(srcdir)/asn1/oid.h \
+$(srcdir)/crypto/proposal/proposal_keywords_static.h \
 $(srcdir)/crypto/proposal/proposal_keywords_static.c \
 settings/settings_parser.h
 
 MAINTAINERCLEANFILES = \
 $(srcdir)/asn1/oid.c $(srcdir)/asn1/oid.h \
+$(srcdir)/crypto/proposal/proposal_keywords_static.h \
 $(srcdir)/crypto/proposal/proposal_keywords_static.c
 
 $(srcdir)/asn1/oid.c : $(srcdir)/asn1/oid.pl $(srcdir)/asn1/oid.txt
@@ -215,6 +218,12 @@ $(srcdir)/asn1/oid.h :     $(srcdir)/asn1/oid.pl $(srcdir)/asn1/oid.txt
                $(AM_V_GEN) \
                (cd $(srcdir)/asn1/ && $(PERL) oid.pl)
 
+$(srcdir)/crypto/proposal/proposal_keywords_static.h: $(srcdir)/crypto/proposal/proposal_keywords_static.h.in
+               $(AM_V_GEN) \
+               sed \
+               -e "s:\@GPERF_LEN_TYPE\@:$(GPERF_LEN_TYPE):" \
+               $< > $@
+
 $(srcdir)/crypto/proposal/proposal_keywords_static.c:  $(srcdir)/crypto/proposal/proposal_keywords_static.txt \
                                                                                                                $(srcdir)/crypto/proposal/proposal_keywords_static.h
                $(AM_V_GEN) \
diff --git a/src/libstrongswan/crypto/proposal/proposal_keywords_static.h b/src/libstrongswan/crypto/proposal/proposal_keywords_static.h
deleted file mode 100644 (file)
index c046fab..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (C) 2009 Andreas Steffen
- * Hochschule fuer Technik Rapperswil, Switzerland
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * for more details.
- */
-
-#ifndef PROPOSAL_KEYWORDS_STATIC_H_
-#define PROPOSAL_KEYWORDS_STATIC_H_
-
-#include "proposal_keywords.h"
-
-const proposal_token_t* proposal_get_token_static(register const char *str,
-                                                                                                 register GPERF_LEN_TYPE len);
-
-#endif /* PROPOSAL_KEYWORDS_STATIC_H_ */
-
diff --git a/src/libstrongswan/crypto/proposal/proposal_keywords_static.h.in b/src/libstrongswan/crypto/proposal/proposal_keywords_static.h.in
new file mode 100644 (file)
index 0000000..ee9f7b9
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2009 Andreas Steffen
+ * Hochschule fuer Technik Rapperswil, Switzerland
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * for more details.
+ */
+
+#ifndef PROPOSAL_KEYWORDS_STATIC_H_
+#define PROPOSAL_KEYWORDS_STATIC_H_
+
+#include "proposal_keywords.h"
+
+const proposal_token_t* proposal_get_token_static(register const char *str,
+                                                                                                 register @GPERF_LEN_TYPE@ len);
+
+#endif /* PROPOSAL_KEYWORDS_STATIC_H_ */
+
index a370ee5..23142d9 100644 (file)
@@ -1,4 +1,5 @@
 starter
+keywords.[ch]
 parser/lexer.c
 parser/parser.[ch]
 parser/parser.output
\ No newline at end of file
index a3c5812..c806e37 100644 (file)
@@ -39,14 +39,20 @@ starter_LDADD = \
        libstarter.la \
        $(SOCKLIB) $(PTHREADLIB) $(ATOMICLIB)
 
-EXTRA_DIST = keywords.txt ipsec.conf ipsec.secrets Android.mk
-MAINTAINERCLEANFILES = keywords.c
-BUILT_SOURCES = keywords.c parser/parser.h
+EXTRA_DIST = keywords.h keywords.txt ipsec.conf ipsec.secrets Android.mk
+MAINTAINERCLEANFILES = keywords.h keywords.c
+BUILT_SOURCES = keywords.h keywords.c parser/parser.h
 
 if USE_LOAD_WARNING
   AM_CPPFLAGS += -DLOAD_WARNING
 endif
 
+keywords.h: $(srcdir)/keywords.h.in
+               $(AM_V_GEN) \
+               sed \
+               -e "s:\@GPERF_LEN_TYPE\@:$(GPERF_LEN_TYPE):" \
+               $< > $@
+
 keywords.c:    $(srcdir)/keywords.txt $(srcdir)/keywords.h
                $(AM_V_GEN) \
                $(GPERF) -m 10 -C -G -D -t < $(srcdir)/keywords.txt > $@
index e78f2a7..b3e942f 100644 (file)
@@ -46,11 +46,6 @@ static const char esp_defaults[] = "aes128-sha256";
 static const char firewall_defaults[] = IPSEC_SCRIPT " _updown iptables";
 
 /**
- * Provided by GPERF
- */
-extern const kw_entry_t *in_word_set(register const char*, register GPERF_LEN_TYPE);
-
-/**
  * Process deprecated keywords
  */
 static bool is_deprecated(kw_token_t token, char *name, char *conn)
diff --git a/src/starter/keywords.h b/src/starter/keywords.h
deleted file mode 100644 (file)
index 0cb46a7..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright (C) 2005 Andreas Steffen
- * Hochschule fuer Technik Rapperswil, Switzerland
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * for more details.
- */
-
-#ifndef _KEYWORDS_H_
-#define _KEYWORDS_H_
-
-typedef enum kw_token_t kw_token_t;
-typedef struct kw_entry_t kw_entry_t;
-
-enum kw_token_t {
-       /* config setup keywords */
-       KW_CHARONDEBUG,
-       KW_UNIQUEIDS,
-       KW_CACHECRLS,
-       KW_STRICTCRLPOLICY,
-       KW_PKCS11_DEPRECATED,
-       KW_SETUP_DEPRECATED,
-
-#define KW_SETUP_FIRST  KW_CHARONDEBUG
-#define KW_SETUP_LAST   KW_SETUP_DEPRECATED
-
-       /* conn section keywords */
-       KW_CONN_NAME,
-       KW_CONN_SETUP,
-       KW_KEYEXCHANGE,
-       KW_TYPE,
-       KW_COMPRESS,
-       KW_INSTALLPOLICY,
-       KW_AGGRESSIVE,
-       KW_AUTHBY,
-       KW_EAP_IDENTITY,
-       KW_AAA_IDENTITY,
-       KW_MOBIKE,
-       KW_FORCEENCAPS,
-       KW_FRAGMENTATION,
-       KW_IKEDSCP,
-       KW_IKELIFETIME,
-       KW_KEYLIFE,
-       KW_REKEYMARGIN,
-       KW_LIFEBYTES,
-       KW_MARGINBYTES,
-       KW_LIFEPACKETS,
-       KW_MARGINPACKETS,
-       KW_KEYINGTRIES,
-       KW_REKEYFUZZ,
-       KW_REKEY,
-       KW_REAUTH,
-       KW_IKE,
-       KW_ESP,
-       KW_AH,
-       KW_DPDDELAY,
-       KW_DPDTIMEOUT,
-       KW_DPDACTION,
-       KW_CLOSEACTION,
-       KW_SHA256_96,
-       KW_INACTIVITY,
-       KW_MODECONFIG,
-       KW_XAUTH,
-       KW_XAUTH_IDENTITY,
-       KW_MEDIATION,
-       KW_MEDIATED_BY,
-       KW_ME_PEERID,
-       KW_REQID,
-       KW_REPLAY_WINDOW,
-       KW_MARK,
-       KW_MARK_IN,
-       KW_MARK_OUT,
-       KW_TFC,
-       KW_PFS_DEPRECATED,
-       KW_CONN_DEPRECATED,
-
-#define KW_CONN_FIRST   KW_CONN_SETUP
-#define KW_CONN_LAST    KW_CONN_DEPRECATED
-
-       /* ca section keywords */
-       KW_CA_NAME,
-       KW_CA_SETUP,
-       KW_CACERT,
-       KW_CRLURI,
-       KW_CRLURI2,
-       KW_OCSPURI,
-       KW_OCSPURI2,
-       KW_CERTURIBASE,
-       KW_CA_DEPRECATED,
-
-#define KW_CA_FIRST     KW_CA_SETUP
-#define KW_CA_LAST      KW_CA_DEPRECATED
-
-       /* end keywords */
-       KW_HOST,
-       KW_IKEPORT,
-       KW_SUBNET,
-       KW_PROTOPORT,
-       KW_SOURCEIP,
-       KW_DNS,
-       KW_FIREWALL,
-       KW_HOSTACCESS,
-       KW_ALLOWANY,
-       KW_UPDOWN,
-       KW_AUTH1,
-       KW_AUTH2,
-       KW_ID,
-       KW_ID2,
-       KW_SIGKEY,
-       KW_CERT,
-       KW_CERT2,
-       KW_CERTPOLICY,
-       KW_SENDCERT,
-       KW_CA,
-       KW_CA2,
-       KW_GROUPS,
-       KW_GROUPS2,
-       KW_END_DEPRECATED,
-
-#define KW_END_FIRST    KW_HOST
-#define KW_END_LAST     KW_END_DEPRECATED
-
-       /* left end keywords */
-       KW_LEFT,
-       KW_LEFTIKEPORT,
-       KW_LEFTSUBNET,
-       KW_LEFTPROTOPORT,
-       KW_LEFTSOURCEIP,
-       KW_LEFTDNS,
-       KW_LEFTFIREWALL,
-       KW_LEFTHOSTACCESS,
-       KW_LEFTALLOWANY,
-       KW_LEFTUPDOWN,
-       KW_LEFTAUTH,
-       KW_LEFTAUTH2,
-       KW_LEFTID,
-       KW_LEFTID2,
-       KW_LEFTSIGKEY,
-       KW_LEFTCERT,
-       KW_LEFTCERT2,
-       KW_LEFTCERTPOLICY,
-       KW_LEFTSENDCERT,
-       KW_LEFTCA,
-       KW_LEFTCA2,
-       KW_LEFTGROUPS,
-       KW_LEFTGROUPS2,
-       KW_LEFT_DEPRECATED,
-
-#define KW_LEFT_FIRST   KW_LEFT
-#define KW_LEFT_LAST    KW_LEFT_DEPRECATED
-
-       /* right end keywords */
-       KW_RIGHT,
-       KW_RIGHTIKEPORT,
-       KW_RIGHTSUBNET,
-       KW_RIGHTPROTOPORT,
-       KW_RIGHTSOURCEIP,
-       KW_RIGHTDNS,
-       KW_RIGHTFIREWALL,
-       KW_RIGHTHOSTACCESS,
-       KW_RIGHTALLOWANY,
-       KW_RIGHTUPDOWN,
-       KW_RIGHTAUTH,
-       KW_RIGHTAUTH2,
-       KW_RIGHTID,
-       KW_RIGHTID2,
-       KW_RIGHTSIGKEY,
-       KW_RIGHTCERT,
-       KW_RIGHTCERT2,
-       KW_RIGHTCERTPOLICY,
-       KW_RIGHTSENDCERT,
-       KW_RIGHTCA,
-       KW_RIGHTCA2,
-       KW_RIGHTGROUPS,
-       KW_RIGHTGROUPS2,
-       KW_RIGHT_DEPRECATED,
-
-#define KW_RIGHT_FIRST  KW_RIGHT
-#define KW_RIGHT_LAST   KW_RIGHT_DEPRECATED
-
-       /* general section keywords */
-       KW_ALSO,
-       KW_AUTO,
-
-};
-
-struct kw_entry_t {
-       char *name;
-       kw_token_t token;
-};
-
-#endif /* _KEYWORDS_H_ */
diff --git a/src/starter/keywords.h.in b/src/starter/keywords.h.in
new file mode 100644 (file)
index 0000000..d2b08f2
--- /dev/null
@@ -0,0 +1,203 @@
+/*
+ * Copyright (C) 2005 Andreas Steffen
+ * Hochschule fuer Technik Rapperswil, Switzerland
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * for more details.
+ */
+
+#ifndef _KEYWORDS_H_
+#define _KEYWORDS_H_
+
+typedef enum kw_token_t kw_token_t;
+typedef struct kw_entry_t kw_entry_t;
+
+enum kw_token_t {
+       /* config setup keywords */
+       KW_CHARONDEBUG,
+       KW_UNIQUEIDS,
+       KW_CACHECRLS,
+       KW_STRICTCRLPOLICY,
+       KW_PKCS11_DEPRECATED,
+       KW_SETUP_DEPRECATED,
+
+#define KW_SETUP_FIRST  KW_CHARONDEBUG
+#define KW_SETUP_LAST   KW_SETUP_DEPRECATED
+
+       /* conn section keywords */
+       KW_CONN_NAME,
+       KW_CONN_SETUP,
+       KW_KEYEXCHANGE,
+       KW_TYPE,
+       KW_COMPRESS,
+       KW_INSTALLPOLICY,
+       KW_AGGRESSIVE,
+       KW_AUTHBY,
+       KW_EAP_IDENTITY,
+       KW_AAA_IDENTITY,
+       KW_MOBIKE,
+       KW_FORCEENCAPS,
+       KW_FRAGMENTATION,
+       KW_IKEDSCP,
+       KW_IKELIFETIME,
+       KW_KEYLIFE,
+       KW_REKEYMARGIN,
+       KW_LIFEBYTES,
+       KW_MARGINBYTES,
+       KW_LIFEPACKETS,
+       KW_MARGINPACKETS,
+       KW_KEYINGTRIES,
+       KW_REKEYFUZZ,
+       KW_REKEY,
+       KW_REAUTH,
+       KW_IKE,
+       KW_ESP,
+       KW_AH,
+       KW_DPDDELAY,
+       KW_DPDTIMEOUT,
+       KW_DPDACTION,
+       KW_CLOSEACTION,
+       KW_SHA256_96,
+       KW_INACTIVITY,
+       KW_MODECONFIG,
+       KW_XAUTH,
+       KW_XAUTH_IDENTITY,
+       KW_MEDIATION,
+       KW_MEDIATED_BY,
+       KW_ME_PEERID,
+       KW_REQID,
+       KW_REPLAY_WINDOW,
+       KW_MARK,
+       KW_MARK_IN,
+       KW_MARK_OUT,
+       KW_TFC,
+       KW_PFS_DEPRECATED,
+       KW_CONN_DEPRECATED,
+
+#define KW_CONN_FIRST   KW_CONN_SETUP
+#define KW_CONN_LAST    KW_CONN_DEPRECATED
+
+       /* ca section keywords */
+       KW_CA_NAME,
+       KW_CA_SETUP,
+       KW_CACERT,
+       KW_CRLURI,
+       KW_CRLURI2,
+       KW_OCSPURI,
+       KW_OCSPURI2,
+       KW_CERTURIBASE,
+       KW_CA_DEPRECATED,
+
+#define KW_CA_FIRST     KW_CA_SETUP
+#define KW_CA_LAST      KW_CA_DEPRECATED
+
+       /* end keywords */
+       KW_HOST,
+       KW_IKEPORT,
+       KW_SUBNET,
+       KW_PROTOPORT,
+       KW_SOURCEIP,
+       KW_DNS,
+       KW_FIREWALL,
+       KW_HOSTACCESS,
+       KW_ALLOWANY,
+       KW_UPDOWN,
+       KW_AUTH1,
+       KW_AUTH2,
+       KW_ID,
+       KW_ID2,
+       KW_SIGKEY,
+       KW_CERT,
+       KW_CERT2,
+       KW_CERTPOLICY,
+       KW_SENDCERT,
+       KW_CA,
+       KW_CA2,
+       KW_GROUPS,
+       KW_GROUPS2,
+       KW_END_DEPRECATED,
+
+#define KW_END_FIRST    KW_HOST
+#define KW_END_LAST     KW_END_DEPRECATED
+
+       /* left end keywords */
+       KW_LEFT,
+       KW_LEFTIKEPORT,
+       KW_LEFTSUBNET,
+       KW_LEFTPROTOPORT,
+       KW_LEFTSOURCEIP,
+       KW_LEFTDNS,
+       KW_LEFTFIREWALL,
+       KW_LEFTHOSTACCESS,
+       KW_LEFTALLOWANY,
+       KW_LEFTUPDOWN,
+       KW_LEFTAUTH,
+       KW_LEFTAUTH2,
+       KW_LEFTID,
+       KW_LEFTID2,
+       KW_LEFTSIGKEY,
+       KW_LEFTCERT,
+       KW_LEFTCERT2,
+       KW_LEFTCERTPOLICY,
+       KW_LEFTSENDCERT,
+       KW_LEFTCA,
+       KW_LEFTCA2,
+       KW_LEFTGROUPS,
+       KW_LEFTGROUPS2,
+       KW_LEFT_DEPRECATED,
+
+#define KW_LEFT_FIRST   KW_LEFT
+#define KW_LEFT_LAST    KW_LEFT_DEPRECATED
+
+       /* right end keywords */
+       KW_RIGHT,
+       KW_RIGHTIKEPORT,
+       KW_RIGHTSUBNET,
+       KW_RIGHTPROTOPORT,
+       KW_RIGHTSOURCEIP,
+       KW_RIGHTDNS,
+       KW_RIGHTFIREWALL,
+       KW_RIGHTHOSTACCESS,
+       KW_RIGHTALLOWANY,
+       KW_RIGHTUPDOWN,
+       KW_RIGHTAUTH,
+       KW_RIGHTAUTH2,
+       KW_RIGHTID,
+       KW_RIGHTID2,
+       KW_RIGHTSIGKEY,
+       KW_RIGHTCERT,
+       KW_RIGHTCERT2,
+       KW_RIGHTCERTPOLICY,
+       KW_RIGHTSENDCERT,
+       KW_RIGHTCA,
+       KW_RIGHTCA2,
+       KW_RIGHTGROUPS,
+       KW_RIGHTGROUPS2,
+       KW_RIGHT_DEPRECATED,
+
+#define KW_RIGHT_FIRST  KW_RIGHT
+#define KW_RIGHT_LAST   KW_RIGHT_DEPRECATED
+
+       /* general section keywords */
+       KW_ALSO,
+       KW_AUTO,
+
+};
+
+struct kw_entry_t {
+       char *name;
+       kw_token_t token;
+};
+
+#ifndef IN_GPERF_GENERATED_FILE
+const kw_entry_t *in_word_set(register const char*, register @GPERF_LEN_TYPE@);
+#endif
+
+#endif /* _KEYWORDS_H_ */
index 3f92dc8..dd673bc 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <string.h>
 
+#define IN_GPERF_GENERATED_FILE
 #include "keywords.h"
 
 %}
index 26c37a4..b6bf920 100644 (file)
@@ -1 +1,2 @@
 stroke
+stroke_keywords.[ch]
index ed170bd..e55e203 100644 (file)
@@ -4,13 +4,19 @@ stroke_SOURCES = \
 stroke.c stroke_msg.h stroke_keywords.c stroke_keywords.h
 
 stroke_LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la $(SOCKLIB)
-EXTRA_DIST = stroke_keywords.txt Android.mk
-BUILT_SOURCES = stroke_keywords.c
-MAINTAINERCLEANFILES = stroke_keywords.c
+EXTRA_DIST = stroke_keywords.h.in stroke_keywords.txt Android.mk
+BUILT_SOURCES = stroke_keywords.h stroke_keywords.c
+MAINTAINERCLEANFILES = stroke_keywords.h stroke_keywords.c
 AM_CPPFLAGS = \
        -I$(top_srcdir)/src/libstrongswan \
        -DIPSEC_PIDDIR=\"${piddir}\"
 
+stroke_keywords.h: $(srcdir)/stroke_keywords.h.in
+               $(AM_V_GEN) \
+               sed \
+               -e "s:\@GPERF_LEN_TYPE\@:$(GPERF_LEN_TYPE):" \
+               $< > $@
+
 stroke_keywords.c:     $(srcdir)/stroke_keywords.txt $(srcdir)/stroke_keywords.h
                $(AM_V_GEN) \
                $(GPERF) -m 10 -D -C -G -t < $(srcdir)/stroke_keywords.txt > $@
diff --git a/src/stroke/stroke_keywords.h b/src/stroke/stroke_keywords.h
deleted file mode 100644 (file)
index 51caba6..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/* stroke keywords
- * Copyright (C) 2006 Andreas Steffen
- * Hochschule fuer Technik Rapperswil, Switzerland
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * for more details.
- */
-
-#ifndef _STROKE_KEYWORDS_H_
-#define _STROKE_KEYWORDS_H_
-
-typedef enum {
-       STROKE_ADD,
-       STROKE_DEL,
-       STROKE_DELETE,
-       STROKE_ROUTE,
-       STROKE_UNROUTE,
-       STROKE_UP,
-       STROKE_UP_NOBLK,
-       STROKE_DOWN,
-       STROKE_DOWN_NOBLK,
-       STROKE_DOWN_SRCIP,
-       STROKE_REKEY,
-       STROKE_LOGLEVEL,
-       STROKE_STATUS,
-       STROKE_STATUSALL,
-       STROKE_STATUSALL_NOBLK,
-       STROKE_LIST_PUBKEYS,
-       STROKE_LIST_CERTS,
-       STROKE_LIST_CACERTS,
-       STROKE_LIST_OCSPCERTS,
-       STROKE_LIST_AACERTS,
-       STROKE_LIST_ACERTS,
-       STROKE_LIST_GROUPS,
-       STROKE_LIST_CAINFOS,
-       STROKE_LIST_CRLS,
-       STROKE_LIST_OCSP,
-       STROKE_LIST_ALGS,
-       STROKE_LIST_PLUGINS,
-       STROKE_LIST_ALL,
-       STROKE_REREAD_SECRETS,
-       STROKE_REREAD_CACERTS,
-       STROKE_REREAD_OCSPCERTS,
-       STROKE_REREAD_AACERTS,
-       STROKE_REREAD_ACERTS,
-       STROKE_REREAD_CRLS,
-       STROKE_REREAD_ALL,
-       STROKE_PURGE_OCSP,
-       STROKE_PURGE_CRLS,
-       STROKE_PURGE_CERTS,
-       STROKE_PURGE_IKE,
-       STROKE_EXPORT_X509,
-       STROKE_EXPORT_CONN_CERT,
-       STROKE_EXPORT_CONN_CHAIN,
-       STROKE_LEASES,
-       STROKE_MEMUSAGE,
-       STROKE_USER_CREDS,
-       STROKE_COUNTERS,
-       STROKE_COUNTERS_RESET,
-} stroke_keyword_t;
-
-#define STROKE_LIST_FIRST              STROKE_LIST_PUBKEYS
-#define STROKE_REREAD_FIRST            STROKE_REREAD_SECRETS
-#define STROKE_PURGE_FIRST             STROKE_PURGE_OCSP
-#define STROKE_EXPORT_FIRST            STROKE_EXPORT_X509
-
-typedef struct stroke_token stroke_token_t;
-
-extern const stroke_token_t* in_word_set(register const char *str, register GPERF_LEN_TYPE len);
-
-#endif /* _STROKE_KEYWORDS_H_ */
diff --git a/src/stroke/stroke_keywords.h.in b/src/stroke/stroke_keywords.h.in
new file mode 100644 (file)
index 0000000..2b5780a
--- /dev/null
@@ -0,0 +1,79 @@
+/* stroke keywords
+ * Copyright (C) 2006 Andreas Steffen
+ * Hochschule fuer Technik Rapperswil, Switzerland
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * for more details.
+ */
+
+#ifndef _STROKE_KEYWORDS_H_
+#define _STROKE_KEYWORDS_H_
+
+typedef enum {
+       STROKE_ADD,
+       STROKE_DEL,
+       STROKE_DELETE,
+       STROKE_ROUTE,
+       STROKE_UNROUTE,
+       STROKE_UP,
+       STROKE_UP_NOBLK,
+       STROKE_DOWN,
+       STROKE_DOWN_NOBLK,
+       STROKE_DOWN_SRCIP,
+       STROKE_REKEY,
+       STROKE_LOGLEVEL,
+       STROKE_STATUS,
+       STROKE_STATUSALL,
+       STROKE_STATUSALL_NOBLK,
+       STROKE_LIST_PUBKEYS,
+       STROKE_LIST_CERTS,
+       STROKE_LIST_CACERTS,
+       STROKE_LIST_OCSPCERTS,
+       STROKE_LIST_AACERTS,
+       STROKE_LIST_ACERTS,
+       STROKE_LIST_GROUPS,
+       STROKE_LIST_CAINFOS,
+       STROKE_LIST_CRLS,
+       STROKE_LIST_OCSP,
+       STROKE_LIST_ALGS,
+       STROKE_LIST_PLUGINS,
+       STROKE_LIST_ALL,
+       STROKE_REREAD_SECRETS,
+       STROKE_REREAD_CACERTS,
+       STROKE_REREAD_OCSPCERTS,
+       STROKE_REREAD_AACERTS,
+       STROKE_REREAD_ACERTS,
+       STROKE_REREAD_CRLS,
+       STROKE_REREAD_ALL,
+       STROKE_PURGE_OCSP,
+       STROKE_PURGE_CRLS,
+       STROKE_PURGE_CERTS,
+       STROKE_PURGE_IKE,
+       STROKE_EXPORT_X509,
+       STROKE_EXPORT_CONN_CERT,
+       STROKE_EXPORT_CONN_CHAIN,
+       STROKE_LEASES,
+       STROKE_MEMUSAGE,
+       STROKE_USER_CREDS,
+       STROKE_COUNTERS,
+       STROKE_COUNTERS_RESET,
+} stroke_keyword_t;
+
+#define STROKE_LIST_FIRST              STROKE_LIST_PUBKEYS
+#define STROKE_REREAD_FIRST            STROKE_REREAD_SECRETS
+#define STROKE_PURGE_FIRST             STROKE_PURGE_OCSP
+#define STROKE_EXPORT_FIRST            STROKE_EXPORT_X509
+
+typedef struct stroke_token stroke_token_t;
+
+extern const stroke_token_t* in_word_set(register const char *str,
+                                                                                register @GPERF_LEN_TYPE@ len);
+
+#endif /* _STROKE_KEYWORDS_H_ */