summaryrefslogtreecommitdiff
path: root/port
diff options
context:
space:
mode:
Diffstat (limited to 'port')
-rw-r--r--port/Makefile.vc36
-rw-r--r--port/libport.h8
2 files changed, 38 insertions, 6 deletions
diff --git a/port/Makefile.vc b/port/Makefile.vc
index 992d2696..501f7d74 100644
--- a/port/Makefile.vc
+++ b/port/Makefile.vc
@@ -23,13 +23,45 @@
# Makefile for MS Visual C and Watcom C compilers.
#
# To build:
-# C:\libtiff\port> nmake /f makefile.vc
+# C:\libtiff\port> nmake /f makefile.vc
!INCLUDE ..\nmake.opt
+!IF $(HAVE_STRTOL)
+STRTOL_OBJ =
+EXTRAFLAGS = -DHAVE_STRTOL $(EXTRAFLAGS)
+!ELSE
+STRTOL_OBJ = strtol.obj
+!ENDIF
+
+!IF $(HAVE_STRTOUL)
+STRTOUL_OBJ =
+EXTRAFLAGS = -DHAVE_STRTOUL $(EXTRAFLAGS)
+!ELSE
+STRTOUL_OBJ = strtoul.obj
+!ENDIF
+
+!IF $(HAVE_STRTOLL)
+STRTOLL_OBJ =
+EXTRAFLAGS = -DHAVE_STRTOLL $(EXTRAFLAGS)
+!ELSE
+STRTOLL_OBJ = strtoll.obj
+!ENDIF
+
+!IF $(HAVE_STRTOULL)
+STRTOULL_OBJ =
+EXTRAFLAGS = -DHAVE_STRTOULL $(EXTRAFLAGS)
+!ELSE
+STRTOULL_OBJ = strtoull.obj
+!ENDIF
+
OBJ = \
- snprintf.obj \
+ snprintf.obj \
strcasecmp.obj \
+ $(STRTOL_OBJ) \
+ $(STRTOUL_OBJ) \
+ $(STRTOLL_OBJ) \
+ $(STRTOULL_OBJ) \
getopt.obj
all: libport.lib
diff --git a/port/libport.h b/port/libport.h
index ff262638..24e559b6 100644
--- a/port/libport.h
+++ b/port/libport.h
@@ -36,16 +36,16 @@ int strcasecmp(const char *s1, const char *s2);
# define HAVE_GETOPT 1
#endif
-#if HAVE_STRTOL
+#if defined(HAVE_STRTOL)
long strtol(const char *nptr, char **endptr, int base);
#endif
-#if HAVE_STRTOLL
+#if defined(HAVE_STRTOLL)
long long strtoll(const char *nptr, char **endptr, int base);
#endif
-#if HAVE_STRTOUL
+#if defined(HAVE_STRTOUL)
unsigned long strtoul(const char *nptr, char **endptr, int base);
#endif
-#if HAVE_STRTOULL
+#if defined(HAVE_STRTOULL)
unsigned long long strtoull(const char *nptr, char **endptr, int base);
#endif