summaryrefslogtreecommitdiffstats
path: root/tools/build/src/unhex.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-06-03 15:47:45 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-06-03 15:47:45 +0000
commit52a06419cccfe3c6f479fe3933bbeb43295d691b (patch)
treeea837c683f59f84cc61e6477bfe93378ed623254 /tools/build/src/unhex.c
parent5e7b6272fc10068c22bfedb18a26a23a37e9a7ff (diff)
downloadrtems-52a06419cccfe3c6f479fe3933bbeb43295d691b.tar.bz2
added ifdef for sunos 4.x since it does not have strtoul.
Diffstat (limited to 'tools/build/src/unhex.c')
-rw-r--r--tools/build/src/unhex.c8
1 files changed, 6 insertions, 2 deletions
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);