diff -ruNX excluded curl-7.19.5/include/curl/curlbuild.h curl-7.19.5-updated/include/curl/curlbuild.h
--- curl-7.19.5/include/curl/curlbuild.h	2009-04-28 22:05:41.000000000 -0400
+++ curl-7.19.5-updated/include/curl/curlbuild.h	2009-04-29 16:33:13.000000000 -0400
@@ -438,6 +438,17 @@
 #    endif
 #  endif
 
+#elif defined(TPF)
+#    define CURL_SIZEOF_LONG        8
+#    define CURL_TYPEOF_CURL_OFF_T  long
+#    define CURL_FORMAT_CURL_OFF_T  "ld"
+#    define CURL_FORMAT_CURL_OFF_TU "lu"
+#    define CURL_FORMAT_OFF_T       "%ld"
+#    define CURL_SIZEOF_CURL_OFF_T  8
+#    define CURL_SUFFIX_CURL_OFF_T  L
+#    define CURL_SUFFIX_CURL_OFF_TU UL
+#    define SIZEOF_OFF_T            8
+
 /* ===================================== */
 /*    KEEP MSVC THE PENULTIMATE ENTRY    */
 /* ===================================== */
diff -ruNX excluded curl-7.19.5/lib/setup.h curl-7.19.5-updated/lib/setup.h
--- curl-7.19.5/lib/setup.h	2009-02-12 22:00:04.000000000 -0500
+++ curl-7.19.5-updated/lib/setup.h	2009-04-29 16:33:14.000000000 -0400
@@ -65,6 +65,7 @@
 #endif
 
 #ifdef TPF
+#include <sys/socket.h>
 #include "config-tpf.h" /* hand-modified TPF config.h */
 /* change which select is used for libcurl */
 #define select(a,b,c,d,e) tpf_select_libcurl(a,b,c,d,e)
diff -ruNX excluded curl-7.19.5/src/setup.h curl-7.19.5-updated/src/setup.h
--- curl-7.19.5/src/setup.h	2008-09-04 22:00:15.000000000 -0400
+++ curl-7.19.5-updated/src/setup.h	2009-04-29 16:33:14.000000000 -0400
@@ -63,6 +63,7 @@
 #endif
 
 #ifdef TPF
+#include <sys/socket.h>
 #include "config-tpf.h"
 /* change which select is used for the curl command line tool */
 #define select(a,b,c,d,e) tpf_select_bsd(a,b,c,d,e)
diff -ruNX excluded curl-7.19.5/tests/libtest/test.h curl-7.19.5-updated/tests/libtest/test.h
--- curl-7.19.5/tests/libtest/test.h	2008-09-18 22:00:13.000000000 -0400
+++ curl-7.19.5-updated/tests/libtest/test.h	2009-04-29 16:33:15.000000000 -0400
@@ -33,6 +33,10 @@
 #include <unistd.h>
 #endif
 
+#ifdef TPF
+#include "select.h"
+#endif /* TPF */
+
 #define TEST_ERR_MAJOR_BAD     100
 #define TEST_ERR_RUNS_FOREVER   99
 
diff -ruNX excluded curl-7.19.5/packages/TPF/curl.mak curl-7.19.5-updated/packages/TPF/curl.mak
--- curl-7.19.5/packages/TPF/curl.mak	1969-12-31 19:00:00.000000000 -0500
+++ curl-7.19.5-updated/packages/TPF/curl.mak	2009-04-30 17:53:33.372082000 -0400
@@ -0,0 +1,127 @@
+#######################################################################
+#                                                                     #
+#  MAKEFILE NAME.....  curl.mak                                       #
+#                                                                     #
+#  DESCRIPTION.....    This is the makefile for libcurl.              #
+#                                                                     #
+#######################################################################
+
+APP := CURL
+
+TPF_RUN_TPFSOCHK := NO
+
+#######################################################################
+# Define any additional libs needed to link
+#######################################################################
+
+LIBS := CRYP CSSL
+
+#######################################################################
+# Define the envs needed to build this module
+#######################################################################
+
+maketpf_env := curllib
+maketpf_env += openssl
+maketpf_env += base_rt
+maketpf_env += system
+
+#######################################################################
+# Segments to be compiled with gcc compiler
+#######################################################################
+#
+### lib directory:
+C_SRC := base64.c
+C_SRC += connect.c
+C_SRC += content_encoding.c
+C_SRC += cookie.c
+C_SRC += curl_addrinfo.c
+C_SRC += curl_sspi.c
+C_SRC += dict.c
+C_SRC += easy.c
+C_SRC += escape.c
+C_SRC += file.c
+C_SRC += formdata.c
+C_SRC += ftp.c
+C_SRC += getenv.c
+C_SRC += getinfo.c
+C_SRC += gtls.c
+C_SRC += hash.c
+C_SRC += hostares.c
+C_SRC += hostasyn.c
+C_SRC += hostip.c
+C_SRC += hostip4.c
+C_SRC += hostip6.c
+C_SRC += hostsyn.c
+C_SRC += hostthre.c
+C_SRC += http.c
+C_SRC += http_chunks.c
+C_SRC += http_digest.c
+C_SRC += http_negotiate.c
+C_SRC += http_ntlm.c
+C_SRC += if2ip.c
+C_SRC += inet_ntop.c
+C_SRC += inet_pton.c
+C_SRC += krb4.c
+C_SRC += krb5.c
+C_SRC += ldap.c
+C_SRC += llist.c
+C_SRC += md5.c
+C_SRC += memdebug.c
+C_SRC += mprintf.c
+C_SRC += multi.c
+C_SRC += netrc.c
+C_SRC += nss.c
+C_SRC += parsedate.c
+C_SRC += progress.c
+C_SRC += qssl.c
+C_SRC += rawstr.c
+C_SRC += security.c
+C_SRC += select.c
+C_SRC += sendf.c
+C_SRC += share.c
+C_SRC += slist.c
+C_SRC += socks.c
+C_SRC += socks_gssapi.c
+C_SRC += socks_sspi.c
+C_SRC += speedcheck.c
+C_SRC += splay.c
+C_SRC += ssh.c
+C_SRC += ssluse.c
+C_SRC += sslgen.c
+C_SRC += strdup.c
+C_SRC += strequal.c
+C_SRC += strerror.c
+C_SRC += strtok.c
+C_SRC += strtoofft.c
+C_SRC += telnet.c
+C_SRC += tftp.c
+C_SRC += timeval.c
+C_SRC += transfer.c
+C_SRC += url.c
+C_SRC += version.c
+
+#######################################################################
+# Additions and overrides for gcc compiler flags
+#######################################################################
+
+# suppress expected warnings in the ported code:
+CFLAGS_CURL += -w
+
+# use SSL
+# (overrides Curl's lib/config-tpf.h file)
+CFLAGS_CURL += -DUSE_OPENSSL
+CFLAGS_CURL += -DUSE_SSLEAY
+
+# disable all protocols except FTP and HTTP
+# (overrides Curl's lib/config-tpf.h file)
+CFLAGS_CURL += -DCURL_DISABLE_DICT
+CFLAGS_CURL += -DCURL_DISABLE_FILE
+CFLAGS_CURL += -DCURL_DISABLE_LDAP
+CFLAGS_CURL += -DCURL_DISABLE_TELNET
+CFLAGS_CURL += -DCURL_DISABLE_TFTP
+
+#######################################################################
+# Include the maketpf.rules
+#######################################################################
+
+include maketpf.rules
diff -ruNX excluded curl-7.19.5/packages/TPF/maketpf.env_curl curl-7.19.5-updated/packages/TPF/maketpf.env_curl
--- curl-7.19.5/packages/TPF/maketpf.env_curl	1969-12-31 19:00:00.000000000 -0500
+++ curl-7.19.5-updated/packages/TPF/maketpf.env_curl	2009-04-30 17:49:23.682082000 -0400
@@ -0,0 +1,23 @@
+################################################################################
+################################################################################
+#env TPF CURL Includes
+################################################################################
+################################################################################
+
+################################################################################
+# Define the directories where the shared objects reside
+################################################################################ 
+ROOTLIBDIRS := $(foreach d,$(TPF_ROOT),$d/opensource/curl/output/lib)
+
+################################################################################
+# Set the include/header file directories
+################################################################################
+
+ROOTINCDIRS := $(foreach d,$(TPF_ROOT_LM),$d/opensource/curl/include)
+ROOTINCDIRS += $(foreach d,$(TPF_ROOT_LM),$d/opensource/curl/include/curl)
+
+################################################################################
+# Define "TPF" to enable TPF-specific code in Curl files.
+################################################################################
+
+CFLAGS_$(APP) += -D TPF
diff -ruNX excluded curl-7.19.5/packages/TPF/maketpf.env_curllib curl-7.19.5-updated/packages/TPF/maketpf.env_curllib
--- curl-7.19.5/packages/TPF/maketpf.env_curllib	1969-12-31 19:00:00.000000000 -0500
+++ curl-7.19.5-updated/packages/TPF/maketpf.env_curllib	2009-04-30 17:49:00.512082000 -0400
@@ -0,0 +1,54 @@
+################################################################################
+################################################################################
+#env TPF CURL Library Source and Output
+################################################################################
+################################################################################
+
+################################################################################
+# Define the directories where the shared objects reside
+################################################################################ 
+ROOTLIBDIRS := $(foreach d,$(TPF_ROOT),$d/opensource/curl/output/lib)
+
+################################################################################
+# Define the directories where the loadables (XXXXVV) are to be written         
+################################################################################
+
+ROOTLOADDIRS := $(foreach d,$(TPF_ROOT),$d/opensource/curl/output/load)
+
+################################################################################
+# Define the location of the export files used by the LD postprocessor
+# - currently expected that .exp files will also live in lib dir 
+################################################################################ 
+ROOTEXPDIRS := $(foreach d,$(TPF_ROOT_LM),$d/opensource/curl/output/exp)
+
+################################################################################
+# Define the object file directory name
+################################################################################
+
+ROOTOBJDIRS := $(foreach d,$(TPF_ROOT),$d/opensource/curl/output/obj)
+
+################################################################################
+# Define the listing files directory name
+################################################################################
+
+ROOTLSTDIRS := $(foreach d,$(TPF_ROOT),$d/opensource/curl/output/lst)
+
+################################################################################
+# Set the include/header file directories
+################################################################################
+
+ROOTINCDIRS := $(foreach d,$(TPF_ROOT_LM),$d/opensource/curl/lib)
+ROOTINCDIRS += $(foreach d,$(TPF_ROOT_LM),$d/opensource/curl/include)
+ROOTINCDIRS += $(foreach d,$(TPF_ROOT_LM),$d/opensource/curl/include/curl)
+
+################################################################################
+# Set the C file directories
+################################################################################
+
+ROOTCDIRS := $(foreach d,$(TPF_ROOT_LM),$d/opensource/curl/lib)
+
+################################################################################
+# Define "TPF" to enable TPF-specific code in Curl files.
+################################################################################
+
+CFLAGS_$(APP) += -D TPF

