summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorJames E Keenan <jkeenan@cpan.org>2019-08-18 13:16:56 +0000
committerJames E Keenan <jkeenan@cpan.org>2019-08-20 16:37:32 +0000
commit1e1b6d926a0c8361bc2ebd2b6630ac97988335e3 (patch)
tree80070f3441393910becab1a3590c52d08426d11f /Configure
parent96b697999ffc92903f9d0748fba8d281aeed6067 (diff)
downloadperl-1e1b6d926a0c8361bc2ebd2b6630ac97988335e3.tar.gz
Reset xxx_convert to empty string if none of 3 utilities is found
This will cause Configure to enter the WHOA block and default to using sprintf. Change Gconvert checkit() prototype for [perl #134371]. In the checkit() routine inside Configure, clang++ was taking the if (strcmp(expect, got)) branch even though the 'expect' and 'got' strings were identical. A first step in debugging this was to realize that the checkit() function never returned a value, so relabel it as void. With clang version 7.0.1-8 (tags/RELEASE_701/final) (Debian), this change seems to work around the strcmp issue. Further Configure gconvert probe cleanups for C++. As part of debugging [perl #134375] and [perl #134371], try to eliminate warnings thrown by clang++.
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure11
1 files changed, 6 insertions, 5 deletions
diff --git a/Configure b/Configure
index 76ab5b3230..b89d34dbb2 100755
--- a/Configure
+++ b/Configure
@@ -10386,15 +10386,15 @@ esac
$cat >>try.c <<EOP
#ifdef TRY_gconvert
#define Gconvert(x,n,t,b) gconvert((x),(n),(t),(b))
-char *myname = "gconvert";
+const char *myname = "gconvert";
#endif
#ifdef TRY_gcvt
#define Gconvert(x,n,t,b) gcvt((x),(n),(b))
-char *myname = "gcvt";
+const char *myname = "gcvt";
#endif
#ifdef TRY_qgcvt
#define Gconvert(x,n,t,b) qgcvt((x),(n),(b))
-char *myname = "qgcvt";
+const char *myname = "qgcvt";
#define DOUBLETYPE long double
#endif
#ifdef TRY_sprintf
@@ -10407,7 +10407,7 @@ char *myname = "qgcvt";
#else
#define Gconvert(x,n,t,b) sprintf((b),"%.*g",(n),(x))
#endif
-char *myname = "sprintf";
+const char *myname = "sprintf";
#endif
#ifndef DOUBLETYPE
@@ -10426,7 +10426,7 @@ char *myname = "sprintf";
#endif
#include <string.h>
-int checkit(char *expect, char *got)
+void checkit(const char *expect, char *got)
{
if (strcmp(expect, got)) {
printf("%s oddity: Expected %s, got %s\n",
@@ -10575,6 +10575,7 @@ for xxx_convert in $xxx_list; do
fi
else
echo "$xxx_convert NOT found." >&4
+ xxx_convert=''
fi
done