https://github.com/libsdl-org/libtiff/commit/1a8c9ebad7f828fc344e8d78f74b433198f55fdb
From 1a8c9ebad7f828fc344e8d78f74b433198f55fdb Mon Sep 17 00:00:00 2001
From: Bob Friesenhahn <[EMAIL REDACTED]>
Date: Mon, 2 Nov 2009 14:47:41 +0000
Subject: [PATCH] * port/libport.h: Added header file for porting prototypes
and extern declarations.
---
ChangeLog | 5 +++++
port/Makefile.am | 2 +-
port/Makefile.in | 2 +-
port/libport.h | 51 ++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 58 insertions(+), 2 deletions(-)
create mode 100644 port/libport.h
diff --git a/ChangeLog b/ChangeLog
index c9fe454a..9856ca6d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-02 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * port/libport.h: Added header file for porting prototypes and
+ extern declarations.
+
2009-10-31 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* libtiff/tif_dirwrite.c (TIFFWriteAnyArray): Add missing break
diff --git a/port/Makefile.am b/port/Makefile.am
index 110dd85d..ea614d90 100644
--- a/port/Makefile.am
+++ b/port/Makefile.am
@@ -26,6 +26,6 @@
EXTRA_DIST = Makefile.vc
noinst_LTLIBRARIES = libport.la
-libport_la_SOURCES = dummy.c
+libport_la_SOURCES = dummy.c libport.h
libport_la_LIBADD = @LTLIBOBJS@
diff --git a/port/Makefile.in b/port/Makefile.in
index d8eeda26..a4543149 100644
--- a/port/Makefile.in
+++ b/port/Makefile.in
@@ -263,7 +263,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = Makefile.vc
noinst_LTLIBRARIES = libport.la
-libport_la_SOURCES = dummy.c
+libport_la_SOURCES = dummy.c libport.h
libport_la_LIBADD = @LTLIBOBJS@
all: all-am
diff --git a/port/libport.h b/port/libport.h
new file mode 100644
index 00000000..e3413f7a
--- /dev/null
+++ b/port/libport.h
@@ -0,0 +1,51 @@
+/* $Id: libport.h,v 1.2.2.2 2009-11-02 14:47:41 bfriesen Exp $ */
+
+/*
+ * Copyright (c) 2009 Frank Warmerdam
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that (i) the above copyright notices and this permission notice appear in
+ * all copies of the software and related documentation, and (ii) the names of
+ * Sam Leffler and Silicon Graphics may not be used in any advertising or
+ * publicity relating to the software without the specific, prior written
+ * permission of Sam Leffler and Silicon Graphics.
+ *
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#ifndef _LIBPORT_
+#define _LIBPORT_
+
+int getopt(int argc, char * const argv[], const char *optstring);
+extern char *optarg;
+extern int opterr;
+extern int optind;
+extern int optopt;
+
+int strcasecmp(const char *s1, const char *s2);
+
+#ifndef HAVE_GETOPT
+# define HAVE_GETOPT 1
+#endif
+
+#if 0
+unsigned long strtoul(const char *nptr, char **endptr, int base);
+#endif
+
+#if 0
+void *
+lfind(const void *key, const void *base, size_t *nmemb, size_t size,
+ int(*compar)(const void *, const void *));
+#endif
+
+#endif /* ndef _LIBPORT_ */