]> granicus.if.org Git - curl/commitdiff
David McCreedy's "TPF-platform specific changes to various files" patch
authorYang Tse <yangsita@gmail.com>
Fri, 1 May 2009 12:39:40 +0000 (12:39 +0000)
committerYang Tse <yangsita@gmail.com>
Fri, 1 May 2009 12:39:40 +0000 (12:39 +0000)
13 files changed:
TODO-RELEASE
ares/ares_build.h.dist
include/curl/curlbuild.h.dist
lib/config-tpf.h
lib/setup.h
packages/Makefile.am
packages/TPF/Makefile.am [new file with mode: 0644]
packages/TPF/curl.mak [new file with mode: 0644]
packages/TPF/maketpf.env_curl [new file with mode: 0644]
packages/TPF/maketpf.env_curllib [new file with mode: 0644]
src/main.c
src/setup.h
tests/libtest/test.h

index 565f8de23e7c3b5be27de416f99b9609dfe0b991..a5771e550858596d05f3a93af93b085236da5e3f 100644 (file)
@@ -14,6 +14,8 @@ To be addressed in 7.19.5 (planned release: May 2009)
 230 - [PATCH] http.c fix to Curl_proxyCONNECT for non-ASCII platforms.
 
 231 - [PATCH] TPF-platform specific changes to various files
+      - committed with minor changes
+      - awaiting feedback
 
 232 - [PATCH] transfer.c fixes for CURL_DO_LINEEND_CONV and non-ASCII 
       platform HTTP requests
@@ -24,4 +26,4 @@ To be addressed in 7.19.5 (planned release: May 2009)
 234 - [PATCH] Allow various Curl test suite tests to work on non-ASCII 
       platforms
 
-235 - 
\ No newline at end of file
+235 - 
index 16a5cc5d87827ca73793237274639594127977c4..77f13286bf7fe6add007f4258260f327c6e20614 100644 (file)
 #    endif
 #  endif
 
+#elif defined(TPF)
+#  define CARES_SIZEOF_LONG           8
+#  define CARES_TYPEOF_ARES_SOCKLEN_T FIXME
+#  define CARES_SIZEOF_ARES_SOCKLEN_T -1
+
 /* ===================================== */
 /*    KEEP MSVC THE PENULTIMATE ENTRY    */
 /* ===================================== */
index 62d0a1ec150b2e304fc80e86bca6c7b87b2b44c6..f606790065a8a86f1ecaae464f31424dd974f757 100644 (file)
 #  define CURL_TYPEOF_CURL_SOCKLEN_T FIXME
 #  define CURL_SIZEOF_CURL_SOCKLEN_T -1
 
+#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 CURL_TYPEOF_CURL_SOCKLEN_T FIXME
+#  define CURL_SIZEOF_CURL_SOCKLEN_T -1
+
 /* ===================================== */
 /*    KEEP MSVC THE PENULTIMATE ENTRY    */
 /* ===================================== */
index 107158ca8d1de8a1fbd2758d010f51a5a26ceda8..e67467ba6f9cc406aa01c2991464c78611085c10 100644 (file)
 /* Define to the type of arg 5 for `select'. */
 #define SELECT_TYPE_ARG5 (struct timeval *)
 
+/* The size of an `off_t', as computed by sizeof. */
+#define SIZEOF_OFF_T 8
+
 /* The size of a `size_t', as computed by sizeof. */
 #define SIZEOF_SIZE_T 8
 
index efab2ea6fe3710f97e6fbe6cd14fa09252e426c1..7316f1e45b9178ce2369685596657615253e9675 100644 (file)
@@ -65,9 +65,7 @@
 #endif
 
 #ifdef TPF
-#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)
+#  include "config-tpf.h"
 #endif
 
 #endif /* HAVE_CONFIG_H */
 #  include <sys/socket.h> /* for select and ioctl*/
 #  include <netdb.h>      /* for in_addr_t definition */
 #  include <tpf/sysapi.h> /* for tpf_process_signals */
+   /* change which select is used for libcurl */
+#  define select(a,b,c,d,e) tpf_select_libcurl(a,b,c,d,e)
 #endif
 
 #include <stdio.h>
index 32f9c8b2a157dec9f4913970c3da334a0a26ca3f..3f731721e7373292df8dfaaf68c79d749ac1ce1d 100644 (file)
@@ -1,4 +1,4 @@
-SUBDIRS = Win32 Linux Solaris EPM DOS AIX vms
+SUBDIRS = Win32 Linux Solaris EPM DOS AIX vms TPF
 
 EXTRA_DIST = README NetWare/get_ver.awk OS400/ccsidcurl.c OS400/ccsidcurl.h   \
 OS400/curl.inc.in OS400/initscript.sh OS400/makefile.sh OS400/make-include.sh \
diff --git a/packages/TPF/Makefile.am b/packages/TPF/Makefile.am
new file mode 100644 (file)
index 0000000..225d3c7
--- /dev/null
@@ -0,0 +1 @@
+EXTRA_DIST = curl.mak maketpf.env_curl maketpf.env_curllib
diff --git a/packages/TPF/curl.mak b/packages/TPF/curl.mak
new file mode 100644 (file)
index 0000000..c865b39
--- /dev/null
@@ -0,0 +1,128 @@
+#######################################################################
+#                                                                     #
+#  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 --git a/packages/TPF/maketpf.env_curl b/packages/TPF/maketpf.env_curl
new file mode 100644 (file)
index 0000000..fd9a90f
--- /dev/null
@@ -0,0 +1,24 @@
+################################################################################
+################################################################################
+#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 --git a/packages/TPF/maketpf.env_curllib b/packages/TPF/maketpf.env_curllib
new file mode 100644 (file)
index 0000000..8a9ad9f
--- /dev/null
@@ -0,0 +1,55 @@
+################################################################################
+################################################################################
+#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
+
index 1efa3fe003d63f43a17af4c4149dccc8929e5e9b..77de03b17fb64d1ca6a87015b72f86aaff0a8ccf 100644 (file)
@@ -257,6 +257,8 @@ typedef enum {
 #    if defined(_LP64) || defined(_LARGE_FILES)
 #      define SIZEOF_OFF_T 8
 #    endif
+#  elif defined(TPF)
+#    define SIZEOF_OFF_T 8
 #  endif
 #  ifndef SIZEOF_OFF_T
 #    define SIZEOF_OFF_T 4
index b56407c644dc2de01f6ac118acec6a243991a52e..1c74eb6d3b5d46ae8886853f6fb4320dc71cc7f0 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
 
 #ifdef TPF
 #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)
-/* and turn off the progress meter */
-#define CONF_DEFAULT (0|CONF_NOPROGRESS)
 #endif
 
 #endif /* HAVE_CONFIG_H */
 #  endif
 #endif
 
+#ifdef TPF
+#  include <sys/socket.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)
+   /* and turn off the progress meter */
+#  define CONF_DEFAULT (0|CONF_NOPROGRESS)
+#endif
 
 #include <stdio.h>
 
index b4541c6c4bd98030061ddc7cec67696319f76ab6..c66fd61d75861b12b4ccee6838a551d91652be5e 100644 (file)
 #include <unistd.h>
 #endif
 
+#ifdef TPF
+#  include "select.h"
+#endif
+
 #define TEST_ERR_MAJOR_BAD     100
 #define TEST_ERR_RUNS_FOREVER   99