components/bash/solaris-008.xmbsrtowcs.c.patch
author Stefan Teleman <stefan.teleman@oracle.com>
Sat, 26 Feb 2011 10:03:27 -0800
changeset 110 77641682ba6f
permissions -rw-r--r--
7015638 bash needs to move to userland
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
110
77641682ba6f 7015638 bash needs to move to userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     1
--- lib/glob/xmbsrtowcs.c	2008-08-12 10:17:54.000000000 -0400
77641682ba6f 7015638 bash needs to move to userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     2
+++ lib/glob/xmbsrtowcs.c	2009-08-10 15:46:18.000000000 -0400
77641682ba6f 7015638 bash needs to move to userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     3
@@ -30,7 +30,7 @@
77641682ba6f 7015638 bash needs to move to userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     4
 #if HANDLE_MULTIBYTE
77641682ba6f 7015638 bash needs to move to userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     5
 
77641682ba6f 7015638 bash needs to move to userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     6
 #ifndef FREE
77641682ba6f 7015638 bash needs to move to userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     7
-#  define FREE(x)	do { if (x) free (x); } while (0)
77641682ba6f 7015638 bash needs to move to userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     8
+#  define FREE(x)	do { if (x) free (x);  x = 0; } while (0)
77641682ba6f 7015638 bash needs to move to userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     9
 #endif
77641682ba6f 7015638 bash needs to move to userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    10
 /* On some locales (ex. ja_JP.sjis), mbsrtowc doesn't convert 0x5c to U<0x5c>.
77641682ba6f 7015638 bash needs to move to userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    11
    So, this function is made for converting 0x5c to U<0x5c>. */