From 52a06419cccfe3c6f479fe3933bbeb43295d691b Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 3 Jun 1996 15:47:45 +0000 Subject: added ifdef for sunos 4.x since it does not have strtoul. --- c/build-tools/src/unhex.c | 8 ++++++-- c/build-tools/unhex.c | 8 ++++++-- tools/build/src/unhex.c | 8 ++++++-- tools/build/unhex.c | 8 ++++++-- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/c/build-tools/src/unhex.c b/c/build-tools/src/unhex.c index ba099c4772..14e51a885c 100644 --- a/c/build-tools/src/unhex.c +++ b/c/build-tools/src/unhex.c @@ -88,8 +88,12 @@ void error(int errn, ...); #define ERR_ABORT (ERR_ERRNO / 4) /* error is fatal; abort */ #define ERR_MASK (ERR_ERRNO | ERR_FATAL | ERR_ABORT) /* all */ -#define stol(p) strtoul(p, (char **) NULL, 0) - +#if (defined(sparc) && (sunos < 500)) +#define stol(p) strtol(p, (char **) NULL, 0) /* Sunos */ +#else +#define stol(p) strtoul(p, (char **) NULL, 0) /* Solaris */ +#endif + int unhex(FILE *ifp, char *inm, FILE *ofp, char *onm); int convert_Intel_records(FILE *ifp, char *inm, FILE *ofp, char *onm); int convert_S_records(FILE *ifp, char *inm, FILE *ofp, char *onm); diff --git a/c/build-tools/unhex.c b/c/build-tools/unhex.c index ba099c4772..14e51a885c 100644 --- a/c/build-tools/unhex.c +++ b/c/build-tools/unhex.c @@ -88,8 +88,12 @@ void error(int errn, ...); #define ERR_ABORT (ERR_ERRNO / 4) /* error is fatal; abort */ #define ERR_MASK (ERR_ERRNO | ERR_FATAL | ERR_ABORT) /* all */ -#define stol(p) strtoul(p, (char **) NULL, 0) - +#if (defined(sparc) && (sunos < 500)) +#define stol(p) strtol(p, (char **) NULL, 0) /* Sunos */ +#else +#define stol(p) strtoul(p, (char **) NULL, 0) /* Solaris */ +#endif + int unhex(FILE *ifp, char *inm, FILE *ofp, char *onm); int convert_Intel_records(FILE *ifp, char *inm, FILE *ofp, char *onm); int convert_S_records(FILE *ifp, char *inm, FILE *ofp, char *onm); diff --git a/tools/build/src/unhex.c b/tools/build/src/unhex.c index ba099c4772..14e51a885c 100644 --- a/tools/build/src/unhex.c +++ b/tools/build/src/unhex.c @@ -88,8 +88,12 @@ void error(int errn, ...); #define ERR_ABORT (ERR_ERRNO / 4) /* error is fatal; abort */ #define ERR_MASK (ERR_ERRNO | ERR_FATAL | ERR_ABORT) /* all */ -#define stol(p) strtoul(p, (char **) NULL, 0) - +#if (defined(sparc) && (sunos < 500)) +#define stol(p) strtol(p, (char **) NULL, 0) /* Sunos */ +#else +#define stol(p) strtoul(p, (char **) NULL, 0) /* Solaris */ +#endif + int unhex(FILE *ifp, char *inm, FILE *ofp, char *onm); int convert_Intel_records(FILE *ifp, char *inm, FILE *ofp, char *onm); int convert_S_records(FILE *ifp, char *inm, FILE *ofp, char *onm); diff --git a/tools/build/unhex.c b/tools/build/unhex.c index ba099c4772..14e51a885c 100644 --- a/tools/build/unhex.c +++ b/tools/build/unhex.c @@ -88,8 +88,12 @@ void error(int errn, ...); #define ERR_ABORT (ERR_ERRNO / 4) /* error is fatal; abort */ #define ERR_MASK (ERR_ERRNO | ERR_FATAL | ERR_ABORT) /* all */ -#define stol(p) strtoul(p, (char **) NULL, 0) - +#if (defined(sparc) && (sunos < 500)) +#define stol(p) strtol(p, (char **) NULL, 0) /* Sunos */ +#else +#define stol(p) strtoul(p, (char **) NULL, 0) /* Solaris */ +#endif + int unhex(FILE *ifp, char *inm, FILE *ofp, char *onm); int convert_Intel_records(FILE *ifp, char *inm, FILE *ofp, char *onm); int convert_S_records(FILE *ifp, char *inm, FILE *ofp, char *onm); -- cgit v1.2.3