* emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Replace strtoll,

strtoul and strtoull with bfd_scan_vma.
	(gld${EMULATION_NAME}_read_file): Likewise.
This commit is contained in:
Alan Modra 2002-08-28 01:55:46 +00:00
parent 6d110b652a
commit c89e8944a4
2 changed files with 16 additions and 10 deletions

View File

@ -1,3 +1,9 @@
2002-08-28 Alan Modra <amodra@bigpond.net.au>
* emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Replace strtoll,
strtoul and strtoull with bfd_scan_vma.
(gld${EMULATION_NAME}_read_file): Likewise.
2002-08-28 Alan Modra <amodra@bigpond.net.au> 2002-08-28 Alan Modra <amodra@bigpond.net.au>
* configure.tgt: Remove h8[35]00-*-hms*. Add h8500-*-rtems*. * configure.tgt: Remove h8[35]00-*-hms*. Add h8500-*-rtems*.

View File

@ -180,7 +180,7 @@ gld${EMULATION_NAME}_parse_args (argc, argv)
int longind; int longind;
int optc; int optc;
bfd_signed_vma val; bfd_signed_vma val;
char *end; const char *end;
enum enum
{ {
@ -319,7 +319,7 @@ gld${EMULATION_NAME}_parse_args (argc, argv)
break; break;
case 'D': case 'D':
val = strtoll (optarg, &end, 0); val = bfd_scan_vma (optarg, &end, 0);
if (*end != '\0') if (*end != '\0')
einfo ("%P: warning: ignoring invalid -D number %s\n", optarg); einfo ("%P: warning: ignoring invalid -D number %s\n", optarg);
else if (val != -1) else if (val != -1)
@ -327,7 +327,7 @@ gld${EMULATION_NAME}_parse_args (argc, argv)
break; break;
case 'H': case 'H':
val = strtoul (optarg, &end, 0); val = bfd_scan_vma (optarg, &end, 0);
if (*end != '\0' || (val & (val - 1)) != 0) if (*end != '\0' || (val & (val - 1)) != 0)
einfo ("%P: warning: ignoring invalid -H number %s\n", optarg); einfo ("%P: warning: ignoring invalid -H number %s\n", optarg);
else else
@ -345,7 +345,7 @@ gld${EMULATION_NAME}_parse_args (argc, argv)
number, we assume the AIX option is intended. Otherwise, we number, we assume the AIX option is intended. Otherwise, we
assume the usual GNU ld -T option is intended. We can't just assume the usual GNU ld -T option is intended. We can't just
ignore the AIX option, because gcc passes it to the linker. */ ignore the AIX option, because gcc passes it to the linker. */
val = strtoull (optarg, &end, 0); val = bfd_scan_vma (optarg, &end, 0);
if (*end != '\0') if (*end != '\0')
{ {
optind = prevoptind; optind = prevoptind;
@ -430,7 +430,7 @@ gld${EMULATION_NAME}_parse_args (argc, argv)
break; break;
case OPTION_MAXDATA: case OPTION_MAXDATA:
val = strtoull (optarg, &end, 0); val = bfd_scan_vma (optarg, &end, 0);
if (*end != '\0') if (*end != '\0')
einfo ("%P: warning: ignoring invalid -bmaxdata number %s\n", optarg); einfo ("%P: warning: ignoring invalid -bmaxdata number %s\n", optarg);
else else
@ -438,7 +438,7 @@ gld${EMULATION_NAME}_parse_args (argc, argv)
break; break;
case OPTION_MAXSTACK: case OPTION_MAXSTACK:
val = strtoull (optarg, &end, 0); val = bfd_scan_vma (optarg, &end, 0);
if (*end != '\0') if (*end != '\0')
einfo ("%P: warning: ignoring invalid -bmaxstack number %s\n", einfo ("%P: warning: ignoring invalid -bmaxstack number %s\n",
optarg); optarg);
@ -471,7 +471,7 @@ gld${EMULATION_NAME}_parse_args (argc, argv)
start on. The offset within the page should still be the start on. The offset within the page should still be the
offset within the file, so we need to build an appropriate offset within the file, so we need to build an appropriate
expression. */ expression. */
val = strtoull (optarg, &end, 0); val = bfd_scan_vma (optarg, &end, 0);
if (*end != '\0') if (*end != '\0')
einfo ("%P: warning: ignoring invalid -pD number %s\n", optarg); einfo ("%P: warning: ignoring invalid -pD number %s\n", optarg);
else else
@ -494,7 +494,7 @@ gld${EMULATION_NAME}_parse_args (argc, argv)
/* This set the page that the .text section is supposed to start /* This set the page that the .text section is supposed to start
on. The offset within the page should still be the offset on. The offset within the page should still be the offset
within the file. */ within the file. */
val = strtoull (optarg, &end, 0); val = bfd_scan_vma (optarg, &end, 0);
if (*end != '\0') if (*end != '\0')
einfo ("%P: warning: ignoring invalid -pT number %s\n", optarg); einfo ("%P: warning: ignoring invalid -pT number %s\n", optarg);
else else
@ -1112,14 +1112,14 @@ gld${EMULATION_NAME}_read_file (filename, import)
if (s != se) if (s != se)
{ {
int status; int status;
char *end; const char *end;
status = is_syscall (s, &syscall_flag); status = is_syscall (s, &syscall_flag);
if (0 > status) if (0 > status)
{ {
/* not a system call, check for address */ /* not a system call, check for address */
address = strtoul (s, &end, 0); address = bfd_scan_vma (s, &end, 0);
if (*end != '\0') if (*end != '\0')
{ {
einfo ("%s:%d: warning: syntax error in import/export file\n", einfo ("%s:%d: warning: syntax error in import/export file\n",