* make-relative-prefix.c (make_relative_prefix_1): Avoid warning
about using preprocessor directives inside of macro arguments.
This commit is contained in:
parent
4033a6bf64
commit
1712e1d4f7
|
@ -1,3 +1,8 @@
|
||||||
|
2012-01-26 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* make-relative-prefix.c (make_relative_prefix_1): Avoid warning
|
||||||
|
about using preprocessor directives inside of macro arguments.
|
||||||
|
|
||||||
2012-01-22 Douglas B Rupp <rupp@gnat.com>
|
2012-01-22 Douglas B Rupp <rupp@gnat.com>
|
||||||
|
|
||||||
* configure: Regenerate.
|
* configure: Regenerate.
|
||||||
|
|
|
@ -248,14 +248,15 @@ make_relative_prefix_1 (const char *progname, const char *bin_prefix,
|
||||||
{
|
{
|
||||||
char *startp, *endp, *nstore;
|
char *startp, *endp, *nstore;
|
||||||
size_t prefixlen = strlen (temp) + 1;
|
size_t prefixlen = strlen (temp) + 1;
|
||||||
|
size_t len;
|
||||||
if (prefixlen < 2)
|
if (prefixlen < 2)
|
||||||
prefixlen = 2;
|
prefixlen = 2;
|
||||||
|
|
||||||
nstore = (char *) alloca (prefixlen + strlen (progname) + 1
|
len = prefixlen + strlen (progname) + 1;
|
||||||
#ifdef HAVE_HOST_EXECUTABLE_SUFFIX
|
#ifdef HAVE_HOST_EXECUTABLE_SUFFIX
|
||||||
+ strlen (HOST_EXECUTABLE_SUFFIX)
|
len += strlen (HOST_EXECUTABLE_SUFFIX);
|
||||||
#endif
|
#endif
|
||||||
);
|
nstore = (char *) alloca (len);
|
||||||
|
|
||||||
startp = endp = temp;
|
startp = endp = temp;
|
||||||
while (1)
|
while (1)
|
||||||
|
|
Loading…
Reference in New Issue