aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2001-09-19 05:33:36 +0000
committerH.J. Lu <hjl.tools@gmail.com>2001-09-19 05:33:36 +0000
commit3882b010780ca1aa1ed5d7b38e936cd2d6d5486b (patch)
treec806a73a13afd3265ba6b538ba73cae065c591f5 /ld/emultempl
parent6b819c92c4512ccfba90f0caa204ab687fae8254 (diff)
downloadgdb-3882b010780ca1aa1ed5d7b38e936cd2d6d5486b.zip
gdb-3882b010780ca1aa1ed5d7b38e936cd2d6d5486b.tar.gz
gdb-3882b010780ca1aa1ed5d7b38e936cd2d6d5486b.tar.bz2
Locale changes from Bruno Haible <haible@clisp.cons.org>.
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/aix.em20
-rw-r--r--ld/emultempl/elf32.em5
-rw-r--r--ld/emultempl/gld960c.em5
-rw-r--r--ld/emultempl/sunos.em7
4 files changed, 17 insertions, 20 deletions
diff --git a/ld/emultempl/aix.em b/ld/emultempl/aix.em
index 775a678..eb01b66 100644
--- a/ld/emultempl/aix.em
+++ b/ld/emultempl/aix.em
@@ -36,12 +36,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
#include "libiberty.h"
+#include "safe-ctype.h"
#include "getopt.h"
#include "obstack.h"
#include "bfdlink.h"
-#include <ctype.h>
-
#include "ld.h"
#include "ldmain.h"
#include "ldmisc.h"
@@ -950,7 +949,7 @@ gld${EMULATION_NAME}_read_file (filename, import)
++lineno;
s = (char *) obstack_base (o);
- while (isspace ((unsigned char) *s))
+ while (ISSPACE (*s))
++s;
if (*s == '\0'
|| *s == '*'
@@ -965,7 +964,7 @@ gld${EMULATION_NAME}_read_file (filename, import)
if (*s == '#' && s[1] == '!')
{
s += 2;
- while (isspace ((unsigned char) *s))
+ while (ISSPACE (*s))
++s;
if (*s == '\0')
{
@@ -986,7 +985,8 @@ gld${EMULATION_NAME}_read_file (filename, import)
keep = true;
imppath = s;
file = NULL;
- while (! isspace ((unsigned char) *s) && *s != '(' && *s != '\0')
+ while (! ISSPACE (*s)
+ && *s != '(' && *s != '\0')
{
if (*s == '/')
file = s + 1;
@@ -1006,7 +1006,7 @@ gld${EMULATION_NAME}_read_file (filename, import)
}
cs = *s;
*s = '\0';
- while (isspace ((unsigned char) cs))
+ while (ISSPACE (cs))
{
++s;
cs = *s;
@@ -1042,7 +1042,7 @@ gld${EMULATION_NAME}_read_file (filename, import)
syscall_flag = 0;
address = (bfd_vma) -1;
- while (! isspace ((unsigned char) *s) && *s != '\0')
+ while (! ISSPACE (*s) && *s != '\0')
++s;
if (*s != '\0')
{
@@ -1050,16 +1050,16 @@ gld${EMULATION_NAME}_read_file (filename, import)
*s++ = '\0';
- while (isspace ((unsigned char) *s))
+ while (ISSPACE (*s))
++s;
se = s;
- while (! isspace ((unsigned char) *se) && *se != '\0')
+ while (! ISSPACE (*se) && *se != '\0')
++se;
if (*se != '\0')
{
*se++ = '\0';
- while (isspace ((unsigned char) *se))
+ while (ISSPACE (*se))
++se;
if (*se != '\0')
einfo ("%s%d: warning: syntax error in import/export file\n",
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index 0e5cd99..f2011ce 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -38,8 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
#include "libiberty.h"
-
-#include <ctype.h>
+#include "safe-ctype.h"
#include "bfdlink.h"
@@ -1194,7 +1193,7 @@ gld${EMULATION_NAME}_place_orphan (file, s)
/* If the name of the section is representable in C, then create
symbols to mark the start and the end of the section. */
for (ps = outsecname; *ps != '\0'; ps++)
- if (! isalnum ((unsigned char) *ps) && *ps != '_')
+ if (! ISALNUM (*ps) && *ps != '_')
break;
if (*ps == '\0')
{
diff --git a/ld/emultempl/gld960c.em b/ld/emultempl/gld960c.em
index 46d6e87..2fdabe9 100644
--- a/ld/emultempl/gld960c.em
+++ b/ld/emultempl/gld960c.em
@@ -26,10 +26,10 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
*/
-#include <ctype.h>
#include "bfd.h"
#include "sysdep.h"
#include "libiberty.h"
+#include "safe-ctype.h"
#include "bfdlink.h"
#include "ld.h"
@@ -96,8 +96,7 @@ gld960_set_output_arch()
s = concat ("i960:", ldfile_output_machine_name, (char *) NULL);
for (s1 = s; *s1 != '\0'; s1++)
- if (isupper ((unsigned char) *s1))
- *s1 = tolower ((unsigned char) *s1);
+ *s1 = TOLOWER (*s1);
ldfile_set_output_arch (s);
free (s);
}
diff --git a/ld/emultempl/sunos.em b/ld/emultempl/sunos.em
index d2f62e9..17cd407 100644
--- a/ld/emultempl/sunos.em
+++ b/ld/emultempl/sunos.em
@@ -32,12 +32,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define TARGET_IS_${EMULATION_NAME}
-#include <ctype.h>
-
#include "bfd.h"
#include "sysdep.h"
#include "bfdlink.h"
#include "libiberty.h"
+#include "safe-ctype.h"
#include "ld.h"
#include "ldmain.h"
@@ -311,13 +310,13 @@ gld${EMULATION_NAME}_search_dir (dirname, filename, found_static)
if (entry->d_name[6 + len] == '\0')
;
else if (entry->d_name[6 + len] == '.'
- && isdigit ((unsigned char) entry->d_name[7 + len]))
+ && ISDIGIT (entry->d_name[7 + len]))
;
else
continue;
for (s = entry->d_name + 6 + len; *s != '\0'; s++)
- if (*s != '.' && ! isdigit ((unsigned char) *s))
+ if (*s != '.' && ! ISDIGIT (*s))
break;
if (*s != '\0')
continue;