Révision | 1712e1d4f7d73b741c8390e11c10d1e162650874 (tree) |
---|---|
l'heure | 2012-01-26 23:28:31 |
Auteur | Jakub Jelinek <jakub@redh...> |
Commiter | Jakub Jelinek |
* make-relative-prefix.c (make_relative_prefix_1): Avoid warning
about using preprocessor directives inside of macro arguments.
@@ -1,3 +1,8 @@ | ||
1 | +2012-01-26 Jakub Jelinek <jakub@redhat.com> | |
2 | + | |
3 | + * make-relative-prefix.c (make_relative_prefix_1): Avoid warning | |
4 | + about using preprocessor directives inside of macro arguments. | |
5 | + | |
1 | 6 | 2012-01-22 Douglas B Rupp <rupp@gnat.com> |
2 | 7 | |
3 | 8 | * configure: Regenerate. |
@@ -248,14 +248,15 @@ make_relative_prefix_1 (const char *progname, const char *bin_prefix, | ||
248 | 248 | { |
249 | 249 | char *startp, *endp, *nstore; |
250 | 250 | size_t prefixlen = strlen (temp) + 1; |
251 | + size_t len; | |
251 | 252 | if (prefixlen < 2) |
252 | 253 | prefixlen = 2; |
253 | 254 | |
254 | - nstore = (char *) alloca (prefixlen + strlen (progname) + 1 | |
255 | + len = prefixlen + strlen (progname) + 1; | |
255 | 256 | #ifdef HAVE_HOST_EXECUTABLE_SUFFIX |
256 | - + strlen (HOST_EXECUTABLE_SUFFIX) | |
257 | + len += strlen (HOST_EXECUTABLE_SUFFIX); | |
257 | 258 | #endif |
258 | - ); | |
259 | + nstore = (char *) alloca (len); | |
259 | 260 | |
260 | 261 | startp = endp = temp; |
261 | 262 | while (1) |