{"thread":{"id":"24768","subject":"Re: [PATCH 5/5] autoconf: don't use platform regex if it lacks REG_STARTEND","startedAt":"2010-08-17T12:50:38Z","lastAt":"2010-08-18T08:49:08Z","messageCount":3,"participants":["j6t@kdbg.org","Jonathan Nieder","Ævar Arnfjörð Bjarmason"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"148277","messageId":"mtranet.20100817145038.1501455151@telekom.at","threadId":"24768","inReplyTo":null,"subject":"Re: [PATCH 5/5] autoconf: don't use platform regex if it lacks REG_STARTEND","fromName":"","fromEmail":"j6t@kdbg.org","sentAt":"2010-08-17T12:50:38Z","receivedAt":"2010-08-17T12:50:38Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Ævar Arnfjörð Bjarmason schrieb:\n> +[#ifdef REG_STARTEND\n> +yippeeyeswehaveit\n> +#endif\n> +]),\n> +\t[ac_cv_c_excellent_regex=yes],\n> +\t[ac_cv_c_excellent_regex=yes])\n> +])\n\nDo you have REG_STARTEND?\n\n  o Yes\n  o Yes\n\nChoose wisely! :)\n\n-- Hannes\n"},{"id":"148310","messageId":"20100817214709.GB2221@burratino","threadId":"24768","inReplyTo":"mtranet.20100817145038.1501455151@telekom.at","subject":"[PATCH 5/5 v2] autoconf: don't use platform regex if it lacks REG_STARTEND","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-08-17T21:47:09Z","receivedAt":"2010-08-17T21:47:09Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"If the platform regex cannot match null bytes, we might as well\nuse the glibc version instead.\n\nCc: René Scharfe <rene.scharfe@lsrfire.ath.cx>\nTested-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\nHelped-by: Johannes Sixt <j6t@kdbg.org>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\nj6t@kdbg.org wrote:\n> Ævar Arnfjörð Bjarmason schrieb:\n>> +[#ifdef REG_STARTEND\n>> +yippeeyeswehaveit\n>> +#endif\n>> +]),\n>> +\t[ac_cv_c_excellent_regex=yes],\n>> +\t[ac_cv_c_excellent_regex=yes])\n>> +])\n>\n> Do you have REG_STARTEND?\n> \n>   o Yes\n>   o Yes\n> \n> Choose wisely! :)\n\nGood catch.  Warning: I only tested the following with glibc.\nTesting on platforms with missing or ancient regex support would\nbe very welcome.\n\n config.mak.in |    1 +\n configure.ac  |   21 +++++++++++++++++++++\n 2 files changed, 22 insertions(+), 0 deletions(-)\n\ndiff --git a/config.mak.in b/config.mak.in\nindex b4e65c3..67dbd3b 100644\n--- a/config.mak.in\n+++ b/config.mak.in\n@@ -58,6 +58,7 @@ NO_INET_NTOP=@NO_INET_NTOP@\n NO_INET_PTON=@NO_INET_PTON@\n NO_ICONV=@NO_ICONV@\n OLD_ICONV=@OLD_ICONV@\n+NO_REGEX=@NO_REGEX@\n NO_DEFLATE_BOUND=@NO_DEFLATE_BOUND@\n INLINE=@INLINE@\n SOCKLEN_T=@SOCKLEN_T@\ndiff --git a/configure.ac b/configure.ac\nindex 5601e8b..ed0561b 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -706,6 +706,27 @@ else\n fi\n AC_SUBST(NO_C99_FORMAT)\n #\n+# Define NO_REGEX if you have no or inferior regex support in your C library.\n+AC_CACHE_CHECK([whether the platform regex can handle null bytes],\n+ [ac_cv_c_excellent_regex], [\n+AC_EGREP_CPP(yippeeyeswehaveit,\n+\tAC_LANG_PROGRAM([AC_INCLUDES_DEFAULT\n+#include <regex.h>\n+],\n+[#ifdef REG_STARTEND\n+yippeeyeswehaveit\n+#endif\n+]),\n+\t[ac_cv_c_excellent_regex=yes],\n+\t[ac_cv_c_excellent_regex=no])\n+])\n+if test $ac_cv_c_excellent_regex = yes; then\n+\tNO_REGEX=\n+else\n+\tNO_REGEX=YesPlease\n+fi\n+AC_SUBST(NO_REGEX)\n+#\n # Define FREAD_READS_DIRECTORIES if your are on a system which succeeds\n # when attempting to read from an fopen'ed directory.\n AC_CACHE_CHECK([whether system succeeds to read fopen'ed directory],\n-- \n1.7.2.1.544.ga752d.dirty\n"},{"id":"148345","messageId":"AANLkTim0drguFeYZmOKOnkSL=BouNiHpBOaoTdT0EH7D@mail.gmail.com","threadId":"24768","inReplyTo":"20100817214709.GB2221@burratino","subject":"Re: [PATCH 5/5 v2] autoconf: don't use platform regex if it lacks REG_STARTEND","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-08-18T08:49:08Z","receivedAt":"2010-08-18T08:49:08Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Tue, Aug 17, 2010 at 21:47, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Good catch.  Warning: I only tested the following with glibc.\n> Testing on platforms with missing or ancient regex support would\n> be very welcome.\n\nI tested it on Solaris (which I should have done in the first place),\nthere it sets NO_REGEX=YesPlease as expected as Solaris doesn't have\nREG_STARTEND.\n"}]}