This patch is for PR 621, which says (correctly) that strdupa is not
a portable function. It is a linux extension.  This patch replaces
'strdupa(src)' with 'strcpy(alloca(strlen(src)+1), src)', which
accomplishes the same thing that strdupa does.

I searched the sources and this is the only use of strdupa that I 
found.

Can a gatekeeper approve this patch?

Steve Ellcey
s...@cup.hp.com


Index: osprey/driver/file_names.c
===================================================================
--- osprey/driver/file_names.c  (revision 3367)
+++ osprey/driver/file_names.c  (working copy)
@@ -156,7 +156,7 @@ get_object_file (char *src)
            !option_was_seen(O_c) &&
            keep_flag != TRUE) {
          char *p;
-         src = strdupa(src);
+         src = strcpy(alloca(strlen(src)+1), src);
          for (p = src; *p != '\0'; p++) {
            if (*p == '/')
              *p = '%';

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to