summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES3
-rw-r--r--RELEASE-NOTES3
-rw-r--r--docs/INSTALL12
-rw-r--r--include/curl/curl.h8
-rw-r--r--lib/Makefile.am2
-rw-r--r--lib/config-symbian.h791
-rw-r--r--lib/connect.c5
-rw-r--r--lib/easy.c13
-rw-r--r--lib/file.c2
-rw-r--r--lib/ftp.c5
-rw-r--r--lib/if2ip.c2
-rw-r--r--lib/setup.h10
-rw-r--r--lib/url.c4
-rw-r--r--packages/Makefile.am2
-rw-r--r--packages/Symbian/bwins/libcurlu.def58
-rw-r--r--packages/Symbian/eabi/libcurlu.def58
-rw-r--r--packages/Symbian/group/bld.inf7
-rw-r--r--packages/Symbian/group/curl.iby13
-rw-r--r--packages/Symbian/group/curl.mmp23
-rw-r--r--packages/Symbian/group/libcurl.iby12
-rw-r--r--packages/Symbian/group/libcurl.mmp32
-rw-r--r--packages/Symbian/readme.txt71
-rw-r--r--src/getpass.c15
-rw-r--r--src/main.c17
-rw-r--r--src/setup.h6
25 files changed, 1158 insertions, 16 deletions
diff --git a/CHANGES b/CHANGES
index 9d491488e..0b7d02a40 100644
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,9 @@
Changelog
+Daniel Fandrich (22 Apr 2008)
+- Added support for running on Symbian OS.
+
Daniel Fandrich (18 Apr 2008)
- Added test cases 1026 and 1027 to do some rudimentary tests on the --manual
and --help options.
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 9549b1bd9..20ae4f20e 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -12,6 +12,7 @@ This release includes the following changes:
o CURLFORM_STREAM was added
o CURLOPT_NOBODY is now supported over SFTP
+ o curl can now run on Symbian OS
This release includes the following bugfixes:
@@ -21,7 +22,7 @@ This release includes the following bugfixes:
o configure now correctly recognizes Heimdal and MIT gssapi libraries
o malloc() failure check in Negotiate
o -i and -I together now work the same no matter what order they're used
- * the typechecker can be bypassed by defining CURL_DISABLE_TYPECHECK
+ o the typechecker can be bypassed by defining CURL_DISABLE_TYPECHECK
This release includes the following known bugs:
diff --git a/docs/INSTALL b/docs/INSTALL
index d51e92ae7..35364d9a8 100644
--- a/docs/INSTALL
+++ b/docs/INSTALL
@@ -655,6 +655,17 @@ Minix
make
+Symbian OS
+==========
+ The Symbian OS port uses the Symbian build system to compile. From the
+ packages/Symbian/group/ directory, run:
+
+ bldmake bldfiles
+ abld build
+
+ to compile and install curl and libcurl.
+
+
CROSS COMPILE
=============
(This section was graciously brought to us by Jim Duey, with additions by
@@ -785,6 +796,7 @@ PORTS
- StrongARM (and other ARM) RISC OS 3.1, 4.02
- StrongARM/ARM7/ARM9 Linux 2.4, 2.6
- StrongARM NetBSD 1.4.1
+ - Symbian OS (P.I.P.S.)
- TPF
- Ultrix 4.3a
- UNICOS 9.0
diff --git a/include/curl/curl.h b/include/curl/curl.h
index aa1dfb7e2..8b7268188 100644
--- a/include/curl/curl.h
+++ b/include/curl/curl.h
@@ -33,7 +33,7 @@
* Define WIN32 when build target is Win32 API
*/
-#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
+#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) && !defined(__SYMBIAN32__)
#define WIN32
#endif
@@ -62,7 +62,7 @@
/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
libc5-based Linux systems. Only include it on system that are known to
require it! */
-#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || defined(__minix)
+#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || defined(__minix) || defined(__SYMBIAN32__)
#include <sys/select.h>
#endif
@@ -86,10 +86,10 @@ extern "C" {
typedef void CURL;
/*
- * Decorate exportable functions for Win32 DLL linking.
+ * Decorate exportable functions for Win32 and Symbian OS DLL linking.
* This avoids using a .def file for building libcurl.dll.
*/
-#if (defined(WIN32) || defined(_WIN32)) && !defined(CURL_STATICLIB)
+#if (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)) && !defined(CURL_STATICLIB)
#if defined(BUILDING_LIBCURL)
#define CURL_EXTERN __declspec(dllexport)
#else
diff --git a/lib/Makefile.am b/lib/Makefile.am
index c7e810860..1a5e9d618 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -34,7 +34,7 @@ EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 Makefile.riscos \
libcurl.framework.make libcurl.plist libcurl.rc config-amigaos.h \
amigaos.c amigaos.h makefile.amiga Makefile.netware nwlib.c nwos.c \
libcurl.imp msvcproj.head msvcproj.foot config-win32ce.h \
- config-os400.h setup-os400.h \
+ config-os400.h setup-os400.h config-symbian.h \
Makefile.Watcom config-tpf.h $(DOCS) $(VCPROJ) mk-ca-bundle.pl
CLEANFILES = $(DSP) $(VCPROJ)
diff --git a/lib/config-symbian.h b/lib/config-symbian.h
new file mode 100644
index 000000000..bfe7eed0f
--- /dev/null
+++ b/lib/config-symbian.h
@@ -0,0 +1,791 @@
+/* config-symbian.h. Manually generated. */
+
+/* when building libcurl itself */
+/* #undef BUILDING_LIBCURL */
+
+/* Location of default ca bundle */
+/* #define CURL_CA_BUNDLE "/etc/pki/tls/certs/ca-bundle.crt"*/
+
+/* Location of default ca path */
+/* #undef CURL_CA_PATH */
+
+/* to disable cookies support */
+/* #undef CURL_DISABLE_COOKIES */
+
+/* to disable cryptographic authentication */
+/* #undef CURL_DISABLE_CRYPTO_AUTH */
+
+/* to disable DICT */
+/* #undef CURL_DISABLE_DICT */
+
+/* to disable FILE */
+/* #undef CURL_DISABLE_FILE */
+
+/* to disable FTP */
+/* #undef CURL_DISABLE_FTP */
+
+/* to disable HTTP */
+/* #undef CURL_DISABLE_HTTP */
+
+/* to disable LDAP */
+#define CURL_DISABLE_LDAP 1
+
+/* to disable LDAPS */
+#define CURL_DISABLE_LDAPS 1
+
+/* to disable TELNET */
+/* #undef CURL_DISABLE_TELNET */
+
+/* to disable TFTP */
+/* #undef CURL_DISABLE_TFTP */
+
+/* to disable verbose strings */
+/* #define CURL_DISABLE_VERBOSE_STRINGS 1*/
+
+/* to make a symbol visible */
+/*#define CURL_EXTERN_SYMBOL __declspec(dllexport)*/
+
+/* to enable hidden symbols */
+/*#define CURL_HIDDEN_SYMBOLS 1*/
+
+/* W$ LDAP with non-W$ compiler */
+/* #undef CURL_LDAP_HYBRID */
+
+/* Use W$ LDAP implementation */
+/* #undef CURL_LDAP_WIN */
+
+/* when not building a shared library */
+/* #undef CURL_STATICLIB */
+
+/* Set to explicitly specify we don't want to use thread-safe functions */
+/* #undef DISABLED_THREADSAFE */
+
+/* your Entropy Gathering Daemon socket pathname */
+/* #undef EGD_SOCKET */
+
+/* Define if you want to enable IPv6 support */
+#define ENABLE_IPV6 1
+
+/* Define to the type qualifier of arg 1 for getnameinfo. */
+#define GETNAMEINFO_QUAL_ARG1 const
+
+/* Define to the type of arg 1 for getnameinfo. */
+#define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
+
+/* Define to the type of arg 2 for getnameinfo. */
+#define GETNAMEINFO_TYPE_ARG2 socklen_t
+
+/* Define to the type of args 4 and 6 for getnameinfo. */
+#define GETNAMEINFO_TYPE_ARG46 size_t
+
+/* Define to the type of arg 7 for getnameinfo. */
+#define GETNAMEINFO_TYPE_ARG7 int
+
+/* Define to 1 if you have the <alloca.h> header file. */
+/*#define HAVE_ALLOCA_H 1*/
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#define HAVE_ARPA_INET_H 1
+
+/* Define to 1 if you have the <arpa/tftp.h> header file. */
+/*#define HAVE_ARPA_TFTP_H 1*/
+
+/* Define to 1 if you have the <assert.h> header file. */
+#define HAVE_ASSERT_H 1
+
+/* Define to 1 if you have the `basename' function. */
+/*#define HAVE_BASENAME 1*/
+
+/* Define to 1 if bool is an available type. */
+/*#define HAVE_BOOL_T 1*/
+
+/* Define to 1 if you have the `closesocket' function. */
+/* #undef HAVE_CLOSESOCKET */
+
+/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
+/*#define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1*/
+
+/* Define to 1 if you have the <crypto.h> header file. */
+/* #undef HAVE_CRYPTO_H */
+
+/* Define to 1 if you have the <des.h> header file. */
+/* #undef HAVE_DES_H */
+
+/* disabled non-blocking sockets */
+/* #undef HAVE_DISABLED_NONBLOCKING */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the `ENGINE_load_builtin_engines' function. */
+/*#define HAVE_ENGINE_LOAD_BUILTIN_ENGINES 1*/
+
+/* Define to 1 if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define to 1 if you have the <err.h> header file. */
+#define HAVE_ERR_H 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* use FIONBIO for non-blocking sockets */
+#define HAVE_FIONBIO 1
+
+/* Define to 1 if you have the `fork' function. */
+/*#define HAVE_FORK 1*/
+
+/* Define to 1 if you have the `ftruncate' function. */
+#define HAVE_FTRUNCATE 1
+
+/* Define if getaddrinfo exists and works */
+#define HAVE_GETADDRINFO 1
+
+/* Define to 1 if you have the `geteuid' function. */
+#define HAVE_GETEUID 1
+
+/* Define to 1 if you have the `gethostbyaddr' function. */
+#define HAVE_GETHOSTBYADDR 1
+
+/* If you have gethostbyname */
+#define HAVE_GETHOSTBYNAME 1
+
+/* Define to 1 if you have the `gethostbyname_r' function. */
+/* #undef HAVE_GETHOSTBYNAME_R */
+
+/* gethostbyname_r() takes 3 args */
+/* #undef HAVE_GETHOSTBYNAME_R_3 */
+
+/* gethostbyname_r() takes 5 args */
+/* #undef HAVE_GETHOSTBYNAME_R_5 */
+
+/* gethostbyname_r() takes 6 args */
+/* #undef HAVE_GETHOSTBYNAME_R_6 */
+
+/* Define to 1 if you have the getnameinfo function. */
+#define HAVE_GETNAMEINFO 1
+
+/* Define to 1 if you have the `getpass_r' function. */
+/* #undef HAVE_GETPASS_R */
+
+/* Define to 1 if you have the `getppid' function. */
+#define HAVE_GETPPID 1
+
+/* Define to 1 if you have the `getprotobyname' function. */
+#define HAVE_GETPROTOBYNAME 1
+
+/* Define to 1 if you have the `getpwuid' function. */
+#define HAVE_GETPWUID 1
+
+/* Define to 1 if you have the `getrlimit' function. */
+/*#define HAVE_GETRLIMIT 1*/
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#define HAVE_GETTIMEOFDAY 1
+
+/* we have a glibc-style strerror_r() */
+/* #undef HAVE_GLIBC_STRERROR_R */
+
+/* Define to 1 if you have the `gmtime_r' function. */
+#define HAVE_GMTIME_R 1
+
+/* if you have the gssapi libraries */
+/* #undef HAVE_GSSAPI */
+
+/* Define to 1 if you have the <gssapi/gssapi_generic.h> header file. */
+/* #undef HAVE_GSSAPI_GSSAPI_GENERIC_H */
+
+/* Define to 1 if you have the <gssapi/gssapi.h> header file. */
+/* #undef HAVE_GSSAPI_GSSAPI_H */
+
+/* Define to 1 if you have the <gssapi/gssapi_krb5.h> header file. */
+/* #undef HAVE_GSSAPI_GSSAPI_KRB5_H */
+
+/* if you have the GNU gssapi libraries */
+/* #undef HAVE_GSSGNU */
+
+/* if you have the Heimdal gssapi libraries */
+/* #undef HAVE_GSSHEIMDAL */
+
+/* if you have the MIT gssapi libraries */
+/* #undef HAVE_GSSMIT */
+
+/* Define to 1 if you have the `idna_strerror' function. */
+/*#define HAVE_IDNA_STRERROR 1*/
+
+/* Define to 1 if you have the `idn_free' function. */
+/*#define HAVE_IDN_FREE 1*/
+
+/* Define to 1 if you have the <idn-free.h> header file. */
+/*#define HAVE_IDN_FREE_H 1*/
+
+/* Define to 1 if you have the `inet_addr' function. */
+/*#define HAVE_INET_ADDR 1*/
+
+/* Define to 1 if you have the `inet_ntoa' function. */
+/*#define HAVE_INET_NTOA 1*/
+
+/* Define to 1 if you have the `inet_ntoa_r' function. */
+/* #undef HAVE_INET_NTOA_R */
+
+/* inet_ntoa_r() is declared */
+/* #undef HAVE_INET_NTOA_R_DECL */
+
+/* Define to 1 if you have the `inet_pton' function. */
+#define HAVE_INET_PTON 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* use ioctlsocket() for non-blocking sockets */
+/* #undef HAVE_IOCTLSOCKET */
+
+/* use Ioctlsocket() for non-blocking sockets */
+/* #undef HAVE_IOCTLSOCKET_CASE */
+
+/* Define to 1 if you have the <io.h> header file. */
+/* #undef HAVE_IO_H */
+
+/* if you have the Kerberos4 libraries (including -ldes) */
+/* #undef HAVE_KRB4 */
+
+/* Define to 1 if you have the `krb_get_our_ip_for_realm' function. */
+/* #undef HAVE_KRB_GET_OUR_IP_FOR_REALM */
+
+/* Define to 1 if you have the <krb.h> header file. */
+/* #undef HAVE_KRB_H */
+
+/* Define to 1 if you have the lber.h header file. */
+/*#define HAVE_LBER_H 1*/
+
+/* Define to 1 if you have the ldapssl.h header file. */
+/* #undef HAVE_LDAPSSL_H */
+
+/* Define to 1 if you have the ldap.h header file. */
+/*#define HAVE_LDAP_H 1*/
+
+/* Use LDAPS implementation */
+/*#define HAVE_LDAP_SSL 1*/
+
+/* Define to 1 if you have the ldap_ssl.h header file. */
+/* #undef HAVE_LDAP_SSL_H */
+
+/* Define to 1 if you have the `ldap_url_parse' function. */
+/*#define HAVE_LDAP_URL_PARSE 1*/
+
+/* Define to 1 if you have the <libgen.h> header file. */
+/*#define HAVE_LIBGEN_H 1*/
+
+/* Define to 1 if you have the `idn' library (-lidn). */
+/*#define HAVE_LIBIDN 1*/
+
+/* Define to 1 if you have the `resolv' library (-lresolv). */
+/* #undef HAVE_LIBRESOLV */
+
+/* Define to 1 if you have the `resolve' library (-lresolve). */
+/* #undef HAVE_LIBRESOLVE */
+
+/* Define to 1 if you have the `socket' library (-lsocket). */
+/* #undef HAVE_LIBSOCKET */
+
+/* Define to 1 if you have the `ssh2' library (-lssh2). */
+/*#define HAVE_LIBSSH2 1*/
+
+/* Define to 1 if you have the <libssh2.h> header file. */
+/*#define HAVE_LIBSSH2_H 1*/
+
+/* Define to 1 if you have the `ssl' library (-lssl). */
+/*#define HAVE_LIBSSL 1*/
+
+/* if zlib is available */
+/*#define HAVE_LIBZ 1*/
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* if your compiler supports LL */
+#define HAVE_LL 1
+
+/* Define to 1 if you have the <locale.h> header file. */
+#define HAVE_LOCALE_H 1
+
+/* Define to 1 if you have the `localtime_r' function. */
+#define HAVE_LOCALTIME_R 1
+
+/* if your compiler supports long long */
+#define HAVE_LONGLONG 1
+
+/* Define to 1 if you have the malloc.h header file. */
+/*#define HAVE_MALLOC_H 1*/
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the MSG_NOSIGNAL flag. */
+/*#define HAVE_MSG_NOSIGNAL 1*/
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#define HAVE_NETDB_H 1
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#define HAVE_NETINET_IN_H 1
+
+/* Define to 1 if you have the <netinet/tcp.h> header file. */
+/*#define HAVE_NETINET_TCP_H 1*/
+
+/* Define to 1 if you have the <net/if.h> header file. */
+#define HAVE_NET_IF_H 1
+
+/* Define to 1 if NI_WITHSCOPEID exists and works. */
+/*#define HAVE_NI_WITHSCOPEID 1*/
+
+/* Defined if no inet_pton() prototype available */
+/* #undef HAVE_NO_INET_PTON_PROTO */
+
+/* we have no strerror_r() proto */
+/* #undef HAVE_NO_STRERROR_R_DECL */
+
+/* if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE
+ */
+/* #undef HAVE_OLD_GSSMIT */
+
+/* Define to 1 if you have the <openssl/crypto.h> header file. */
+/*#define HAVE_OPENSSL_CRYPTO_H 1*/
+
+/* Define to 1 if you have the <openssl/engine.h> header file. */
+/*#define HAVE_OPENSSL_ENGINE_H 1*/
+
+/* Define to 1 if you have the <openssl/err.h> header file. */
+/*#define HAVE_OPENSSL_ERR_H 1*/
+
+/* Define to 1 if you have the <openssl/pem.h> header file. */
+/*#define HAVE_OPENSSL_PEM_H 1*/
+
+/* Define to 1 if you have the <openssl/pkcs12.h> header file. */
+/*#define HAVE_OPENSSL_PKCS12_H 1*/
+
+/* Define to 1 if you have the <openssl/rsa.h> header file. */
+/*#define HAVE_OPENSSL_RSA_H 1*/
+
+/* Define to 1 if you have the <openssl/ssl.h> header file. */
+/*#define HAVE_OPENSSL_SSL_H 1*/
+
+/* Define to 1 if you have the <openssl/x509.h> header file. */
+/*#define HAVE_OPENSSL_X509_H 1*/
+
+/* use O_NONBLOCK for non-blocking sockets */
+#define HAVE_O_NONBLOCK 1
+
+/* Define to 1 if you have the <pem.h> header file. */
+/* #undef HAVE_PEM_H */
+
+/* Define to 1 if you have the `perror' function. */
+#define HAVE_PERROR 1
+
+/* Define to 1 if you have the `pipe' function. */
+#define HAVE_PIPE 1
+
+/* if you have the function PK11_CreateGenericObject */
+/* #undef HAVE_PK11_CREATEGENERICOBJECT */
+
+/* Define to 1 if you have the `poll' function. */
+/*#define HAVE_POLL 1*/
+
+/* If you have a fine poll */
+/*#define HAVE_POLL_FINE 1*/
+
+/* Define to 1 if you have the <poll.h> header file. */
+/*#define HAVE_POLL_H 1*/
+
+/* we have a POSIX-style strerror_r() */
+#define HAVE_POSIX_STRERROR_R 1
+
+/* Define to 1 if you have the <pwd.h> header file. */
+#define HAVE_PWD_H 1
+
+/* Define to 1 if you have the `RAND_egd' function. */
+#define HAVE_RAND_EGD 1
+
+/* Define to 1 if you have the `RAND_screen' function. */
+/* #undef HAVE_RAND_SCREEN */
+
+/* Define to 1 if you have the `RAND_status' function. */
+/*#define HAVE_RAND_STATUS 1*/
+
+/* Define to 1 if you have the recv function. */
+#define HAVE_RECV 1
+
+/* Define to 1 if you have the <rsa.h> header file. */
+/* #undef HAVE_RSA_H */
+
+/* Define to 1 if you have the select function. */
+#define HAVE_SELECT 1
+
+/* Define to 1 if you have the send function. */
+#define HAVE_SEND 1
+
+/* Define to 1 if you have the <setjmp.h> header file. */
+#define HAVE_SETJMP_H 1
+
+/* Define to 1 if you have the `setlocale' function. */
+#define HAVE_SETLOCALE 1
+
+/* Define to 1 if you have the `setmode' function. */
+/* #undef HAVE_SETMODE */
+
+/* Define to 1 if you have the `setrlimit' function. */
+/*#define HAVE_SETRLIMIT 1*/
+
+/* Define to 1 if you have the <sgtty.h> header file. */
+/*#define HAVE_SGTTY_H 1*/
+
+/* Define to 1 if you have the `sigaction' function. */
+/*#define HAVE_SIGACTION 1*/
+
+/* Define to 1 if you have the `siginterrupt' function. */
+/*#define HAVE_SIGINTERRUPT 1*/
+
+/* Define to 1 if you have the `signal' function. */
+/*#define HAVE_SIGNAL 1*/
+
+/* Define to 1 if you have the <signal.h> header file. */
+#define HAVE_SIGNAL_H 1
+
+/* If you have sigsetjmp */
+/*#define HAVE_SIGSETJMP 1*/
+
+/* Define to 1 if sig_atomic_t is an available typedef. */
+/*#define HAVE_SIG_ATOMIC_T 1*/
+
+/* Define to 1 if sig_atomic_t is already defined as volatile. */
+/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */
+
+/* Define to 1 if you have the `socket' function. */
+#define HAVE_SOCKET 1
+
+/* use SO_NONBLOCK for non-blocking sockets */
+/* #undef HAVE_SO_NONBLOCK */
+
+/* Define this if you have the SPNEGO library fbopenssl */
+/* #undef HAVE_SPNEGO */
+
+/* Define to 1 if you have the `SSL_get_shutdown' function. */
+/*#define HAVE_SSL_GET_SHUTDOWN 1*/
+
+/* Define to 1 if you have the <ssl.h> header file. */
+/* #undef HAVE_SSL_H */
+
+/* Define to 1 if you have the <stdbool.h> header file. */
+#define HAVE_STDBOOL_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdio.h> header file. */
+#define HAVE_STDIO_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#define HAVE_STRCASECMP 1
+
+/* Define to 1 if you have the `strcasestr' function. */
+#define HAVE_STRCASESTR 1
+
+/* Define to 1 if you have the `strcmpi' function. */
+/* #undef HAVE_STRCMPI */
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the `strerror_r' function. */
+#define HAVE_STRERROR_R 1
+
+/* Define to 1 if you have the `stricmp' function. */
+/* #undef HAVE_STRICMP */
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strlcat' function. */
+#define HAVE_STRLCAT 1
+
+/* Define to 1 if you have the `strlcpy' function. */
+#define HAVE_STRLCPY 1
+
+/* Define to 1 if you have the `strstr' function. */
+#define HAVE_STRSTR 1
+
+/* Define to 1 if you have the `strtok_r' function. */
+#define HAVE_STRTOK_R 1
+
+/* Define to 1 if you have the `strtoll' function. */
+#define HAVE_STRTOLL 1
+
+/* if struct sockaddr_storage is defined */
+#define HAVE_STRUCT_SOCKADDR_STORAGE 1
+
+/* Define to 1 if you have the timeval struct. */
+#define HAVE_STRUCT_TIMEVAL 1
+
+/* Define to 1 if you have the <sys/filio.h> header file. */
+#define HAVE_SYS_FILIO_H 1
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#define HAVE_SYS_IOCTL_H 1
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#define HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/poll.h> header file. */
+/*#define HAVE_SYS_POLL_H 1*/
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#define HAVE_SYS_RESOURCE_H 1
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#define HAVE_SYS_SELECT_H 1
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the <sys/sockio.h> header file. */
+#define HAVE_SYS_SOCKIO_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/utime.h> header file. */
+/* #undef HAVE_SYS_UTIME_H */
+
+/* Define to 1 if you have the <termios.h> header file. */
+/*#define HAVE_TERMIOS_H 1*/
+
+/* Define to 1 if you have the <termio.h> header file. */
+/*#define HAVE_TERMIO_H 1*/
+
+/* Define to 1 if you have the <time.h> header file. */
+#define HAVE_TIME_H 1
+
+/* Define to 1 if you have the <tld.h> header file. */
+/*#define HAVE_TLD_H 1*/
+
+/* Define to 1 if you have the `tld_strerror' function. */
+/*#define HAVE_TLD_STRERROR 1*/
+
+/* Define to 1 if you have the `uname' function. */
+#define HAVE_UNAME 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the `utime' function. */
+#define HAVE_UTIME 1
+
+/* Define to 1 if you have the <utime.h> header file. */
+#define HAVE_UTIME_H 1
+
+/* Define to 1 if compiler supports C99 variadic macro style. */
+#define HAVE_VARIADIC_MACROS_C99 1
+
+/* Define to 1 if compiler supports old gcc variadic macro style. */
+#define HAVE_VARIADIC_MACROS_GCC 1
+
+/* Define to 1 if you have the winber.h header file. */
+/* #undef HAVE_WINBER_H */
+
+/* Define to 1 if you have the windows.h header file. */
+/* #undef HAVE_WINDOWS_H */
+
+/* Define to 1 if you have the winldap.h header file. */
+/* #undef HAVE_WINLDAP_H */
+
+/* Define to 1 if you have the winsock2.h header file. */
+/* #undef HAVE_WINSOCK2_H */
+
+/* Define to 1 if you have the winsock.h header file. */
+/* #undef HAVE_WINSOCK_H */
+
+/* Define this symbol if your OS supports changing the contents of argv */
+/*#define HAVE_WRITABLE_ARGV 1*/
+
+/* Define to 1 if you have the ws2tcpip.h header file. */
+/* #undef HAVE_WS2TCPIP_H */
+
+/* Define to 1 if you have the <x509.h> header file. */
+/* #undef HAVE_X509_H */
+
+/* if you have the zlib.h header file */
+/*#define HAVE_ZLIB_H 1*/
+
+/* Define to 1 if you are building a native Windows target. */
+/* #undef NATIVE_WINDOWS */
+
+/* If you lack a fine basename() prototype */
+/* #undef NEED_BASENAME_PROTO */
+
+/* Define to 1 if you need the lber.h header file even with ldap.h */
+/* #undef NEED_LBER_H */
+
+/* Define to 1 if you need the malloc.h header file even with stdlib.h */
+/* #undef NEED_MALLOC_H */
+
+/* need REENTRANT defined */
+/* #undef NEED_REENTRANT */
+
+/* cpu-machine-OS */
+#ifdef __WINS__
+#define OS "i386-pc-epoc"
+#elif __MARM__
+#define OS "arm-unknown-epoc"
+#else
+#define OS "unknown-unknown-epoc"
+#endif
+
+/* Name of package */
+/*#define PACKAGE "curl"*/
+
+/* Define to the address where bug reports for this package should be sent. */
+/*#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"*/
+
+/* Define to the full name of this package. */
+/*#define PACKAGE_NAME "curl"*/
+
+/* Define to the full name and version of this package. */
+/*#define PACKAGE_STRING "curl -"*/
+
+/* Define to the one symbol short name of this package. */
+/*#define PACKAGE_TARNAME "curl"*/
+
+/* Define to the version of this package. */
+/*#define PACKAGE_VERSION "-"*/
+
+/* a suitable file to read random data from */
+/*#define RANDOM_FILE "/dev/urandom"*/
+
+#define RECV_TYPE_ARG1 int
+#define RECV_TYPE_ARG2 void*
+#define RECV_TYPE_ARG3 size_t
+#define RECV_TYPE_ARG4 int
+#define RECV_TYPE_RETV ssize_t
+
+#define SEND_TYPE_ARG1 int
+#define SEND_QUAL_ARG2 const
+#define SEND_TYPE_ARG2 void*
+#define SEND_TYPE_ARG3 size_t
+#define SEND_TYPE_ARG4 int
+#define SEND_TYPE_RETV ssize_t
+
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+/*#define RETSIGTYPE void*/
+
+/* Define to the type of arg 1 for `select'. */
+#define SELECT_TYPE_ARG1 int
+
+/* Define to the type of args 2, 3 and 4 for `select'. */
+#define SELECT_TYPE_ARG234 (fd_set *)
+
+/* Define to the type of arg 5 for `select'. */
+#define SELECT_TYPE_ARG5 (struct timeval *)
+
+/* The size of `curl_off_t', as computed by sizeof. */
+#define SIZEOF_CURL_OFF_T 8
+
+/* The size of `long', as computed by sizeof. */
+#define SIZEOF_LONG 4
+
+/* The size of `off_t', as computed by sizeof. */
+#define SIZEOF_OFF_T 8
+
+/* The size of `size_t', as computed by sizeof. */
+#define SIZEOF_SIZE_T 4
+
+/* The size of `time_t', as computed by sizeof. */
+#define SIZEOF_TIME_T 4
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* Define if you want to enable c-ares support */
+/* #undef USE_ARES */
+
+/* if GnuTLS is enabled */
+/* #undef USE_GNUTLS */
+
+/* if libSSH2 is in use */
+/*#define USE_LIBSSH2 1*/
+
+/* If you want to build curl with the built-in manual */
+/*#define USE_MANUAL 1*/
+
+/* if NSS is enabled */
+/* #undef USE_NSS */
+
+/* if OpenSSL is in use */
+/*#define USE_OPENSSL 1*/
+
+/* if SSL is enabled */
+/*#define USE_SSLEAY 1*/
+
+/* to enable SSPI support */
+/* #undef USE_WINDOWS_SSPI */
+
+/* Define to 1 if using yaSSL in OpenSSL compatibility mode. */
+/* #undef USE_YASSLEMUL */
+
+/* Version number of package */
+/*#define VERSION "7.18.2-CVS"*/
+
+/* Define to avoid automatic inclusion of winsock.h */
+/* #undef WIN32_LEAN_AND_MEAN */
+
+/* Define to 1 if on AIX 3.
+ System headers sometimes define this.
+ We just want to avoid a redefinition error message. */
+#ifndef _ALL_SOURCE
+/* # undef _ALL_SOURCE */
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#define _FILE_OFFSET_BITS 64
+
+/* Define for large files, on AIX-style hosts. */
+/* #undef _LARGE_FILES */
+
+/* define this if you need it to compile thread-safe code */
+/* #undef _THREAD_SAFE */
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* type to use in place of in_addr_t if not defined */
+/* #undef in_addr_t */
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+/* #undef inline */
+#endif
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* #undef size_t */
+
+/* type to use in place of socklen_t if not defined */
+/* #undef socklen_t */
+
+/* the signed version of size_t */
+/* #undef ssize_t */
diff --git a/lib/connect.c b/lib/connect.c
index 393c85603..063556315 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -93,6 +93,11 @@
/* The last #include file should be: */
#include "memdebug.h"
+#ifdef __SYMBIAN32__
+/* This isn't actually supported under Symbian OS */
+#undef SO_NOSIGPIPE
+#endif
+
static bool verifyconnect(curl_socket_t sockfd, int *error);
static curl_socket_t
diff --git a/lib/easy.c b/lib/easy.c
index 65fde81fb..1af575416 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -194,16 +194,27 @@ static long init_flags;
#define system_strdup strdup
#endif
+#ifndef __SYMBIAN32__
/*
* If a memory-using function (like curl_getenv) is used before
* curl_global_init() is called, we need to have these pointers set already.
*/
-
curl_malloc_callback Curl_cmalloc = (curl_malloc_callback)malloc;
curl_free_callback Curl_cfree = (curl_free_callback)free;
curl_realloc_callback Curl_crealloc = (curl_realloc_callback)realloc;
curl_strdup_callback Curl_cstrdup = (curl_strdup_callback)system_strdup;
curl_calloc_callback Curl_ccalloc = (curl_calloc_callback)calloc;
+#else
+/*
+ * Symbian OS doesn't support initialization to code in writeable static data.
+ * Initialization will occur in the curl_global_init() call.
+ */
+curl_malloc_callback Curl_cmalloc;
+curl_free_callback Curl_cfree;
+curl_realloc_callback Curl_crealloc;
+curl_strdup_callback Curl_cstrdup;
+curl_calloc_callback Curl_ccalloc;
+#endif
/**
* curl_global_init() globally initializes cURL given a bitwise set of the
diff --git a/lib/file.c b/lib/file.c
index c79c635ec..33f9c10fd 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -90,7 +90,7 @@
/* The last #include file should be: */
#include "memdebug.h"
-#if defined(WIN32) || defined(MSDOS) || defined(__EMX__)
+#if defined(WIN32) || defined(MSDOS) || defined(__EMX__) || defined(__SYMBIAN32__)
#define MSDOS_FILESYSTEM 1
#endif
diff --git a/lib/ftp.c b/lib/ftp.c
index 473fffb2f..02f9a2ac8 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -110,8 +110,13 @@
#define NIFLAGS NI_NUMERICHOST | NI_NUMERICSERV
#endif
+#ifdef __SYMBIAN32__
+/* Symbian OS panics when given a timeout much greater than 1/2 hour */
+#define RESP_TIMEOUT (1800*1000)
+#else
/* Default response timeout in milliseconds */
#define RESP_TIMEOUT (3600*1000)
+#endif
#ifdef CURL_DISABLE_VERBOSE_STRINGS
#define ftp_pasv_verbose(a,b,c,d) do { } while(0)
diff --git a/lib/if2ip.c b/lib/if2ip.c
index 518200cb8..18696e9e7 100644
--- a/lib/if2ip.c
+++ b/lib/if2ip.c
@@ -39,7 +39,7 @@
*/
#if !defined(WIN32) && !defined(__BEOS__) && !defined(__CYGWIN__) && \
!defined(__riscos__) && !defined(__INTERIX) && !defined(NETWARE) && \
- !defined(__AMIGA__) && !defined(__minix)
+ !defined(__AMIGA__) && !defined(__minix) && !defined(__SYMBIAN32__)
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
diff --git a/lib/setup.h b/lib/setup.h
index b08120ce3..38ae32099 100644
--- a/lib/setup.h
+++ b/lib/setup.h
@@ -36,7 +36,7 @@
* Define WIN32 when build target is Win32 API
*/
-#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
+#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) && !defined(__SYMBIAN32__)
#define WIN32
#endif
@@ -65,6 +65,10 @@
#include "amigaos.h"
#endif
+#ifdef __SYMBIAN32__
+#include "config-symbian.h"
+#endif
+
#ifdef __OS400__
#include "config-os400.h"
#include "setup-os400.h"
@@ -268,6 +272,10 @@ extern char * strtok_r(char *s, const char *delim, char **last);
extern struct tm * gmtime_r(const time_t * const timep, struct tm *tmp);
#endif
+#ifdef __SYMBIAN32__
+#undef HAVE_ALARM
+#endif
+
#define DIR_CHAR "/"
#ifndef DOT_CHAR
#define DOT_CHAR "."
diff --git a/lib/url.c b/lib/url.c
index 45d8c58c0..9cda6dbac 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -150,6 +150,10 @@ void idn_free (void *ptr); /* prototype from idn-free.h, not provided by
/* The last #include file should be: */
#include "memdebug.h"
+#ifdef __SYMBIAN32__
+#undef SIGALRM
+#endif
+
/* Local static prototypes */
static long ConnectionKillOne(struct SessionHandle *data);
static bool ConnectionExists(struct SessionHandle *data,
diff --git a/packages/Makefile.am b/packages/Makefile.am
index 2ab707752..df5f7c263 100644
--- a/packages/Makefile.am
+++ b/packages/Makefile.am
@@ -3,5 +3,5 @@ SUBDIRS = Win32 Linux Solaris EPM DOS AIX vms
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 \
OS400/make-lib.sh OS400/make-src.sh OS400/make-tests.sh OS400/os400sys.c \
-OS400/os400sys.h OS400/README.OS400
+OS400/os400sys.h OS400/README.OS400 Symbian
diff --git a/packages/Symbian/bwins/libcurlu.def b/packages/Symbian/bwins/libcurlu.def
new file mode 100644
index 000000000..0536096e9
--- /dev/null
+++ b/packages/Symbian/bwins/libcurlu.def
@@ -0,0 +1,58 @@
+EXPORTS
+ curl_easy_cleanup @ 1 NONAME
+ curl_easy_duphandle @ 2 NONAME
+ curl_easy_escape @ 3 NONAME
+ curl_easy_getinfo @ 4 NONAME
+ curl_easy_init @ 5 NONAME
+ curl_easy_pause @ 6 NONAME
+ curl_easy_perform @ 7 NONAME
+ curl_easy_reset @ 8 NONAME
+ curl_easy_setopt @ 9 NONAME
+ curl_easy_strerror @ 10 NONAME
+ curl_easy_unescape @ 11 NONAME
+ curl_escape @ 12 NONAME
+ curl_formadd @ 13 NONAME
+ curl_formfree @ 14 NONAME
+ curl_formget @ 15 NONAME
+ curl_free @ 16 NONAME
+ curl_getdate @ 17 NONAME
+ curl_getenv @ 18 NONAME
+ curl_global_cleanup @ 19 NONAME
+ curl_global_init @ 20 NONAME
+ curl_global_init_mem @ 21 NONAME
+ curl_maprintf @ 22 NONAME
+ curl_mfprintf @ 23 NONAME
+ curl_mprintf @ 24 NONAME
+ curl_msnprintf @ 25 NONAME
+ curl_msprintf @ 26 NONAME
+ curl_multi_add_handle @ 27 NONAME
+ curl_multi_assign @ 28 NONAME
+ curl_multi_cleanup @ 29 NONAME
+ curl_multi_fdset @ 30 NONAME
+ curl_multi_info_read @ 31 NONAME
+ curl_multi_init @ 32 NONAME
+ curl_multi_perform @ 33 NONAME
+ curl_multi_remove_handle @ 34 NONAME
+ curl_multi_setopt @ 35 NONAME
+ curl_multi_socket @ 36 NONAME
+ curl_multi_socket_action @ 37 NONAME
+ curl_multi_socket_all @ 38 NONAME
+ curl_multi_strerror @ 39 NONAME
+ curl_multi_timeout @ 40 NONAME
+ curl_mvaprintf @ 41 NONAME
+ curl_mvfprintf @ 42 NONAME
+ curl_mvprintf @ 43 NONAME
+ curl_mvsnprintf @ 44 NONAME
+ curl_mvsprintf @ 45 NONAME
+ curl_share_cleanup @ 46 NONAME
+ curl_share_init @ 47 NONAME
+ curl_share_setopt @ 48 NONAME
+ curl_share_strerror @ 49 NONAME
+ curl_slist_append @ 50 NONAME
+ curl_slist_free_all @ 51 NONAME
+ curl_strequal @ 52 NONAME
+ curl_strnequal @ 53 NONAME
+ curl_unescape @ 54 NONAME
+ curl_version @ 55 NONAME
+ curl_version_info @ 56 NONAME
+
diff --git a/packages/Symbian/eabi/libcurlu.def b/packages/Symbian/eabi/libcurlu.def
new file mode 100644
index 000000000..0536096e9
--- /dev/null
+++ b/packages/Symbian/eabi/libcurlu.def
@@ -0,0 +1,58 @@
+EXPORTS
+ curl_easy_cleanup @ 1 NONAME
+ curl_easy_duphandle @ 2 NONAME
+ curl_easy_escape @ 3 NONAME
+ curl_easy_getinfo @ 4 NONAME
+ curl_easy_init @ 5 NONAME
+ curl_easy_pause @ 6 NONAME
+ curl_easy_perform @ 7 NONAME
+ curl_easy_reset @ 8 NONAME
+ curl_easy_setopt @ 9 NONAME
+ curl_easy_strerror @ 10 NONAME
+ curl_easy_unescape @ 11 NONAME
+ curl_escape @ 12 NONAME
+ curl_formadd @ 13 NONAME
+ curl_formfree @ 14 NONAME
+ curl_formget @ 15 NONAME
+ curl_free @ 16 NONAME
+ curl_getdate @ 17 NONAME
+ curl_getenv @ 18 NONAME
+ curl_global_cleanup @ 19 NONAME
+ curl_global_init @ 20 NONAME
+ curl_global_init_mem @ 21 NONAME
+ curl_maprintf @ 22 NONAME
+ curl_mfprintf @ 23 NONAME
+ curl_mprintf @ 24 NONAME
+ curl_msnprintf @ 25 NONAME
+ curl_msprintf @ 26 NONAME
+ curl_multi_add_handle @ 27 NONAME
+ curl_multi_assign @ 28 NONAME
+ curl_multi_cleanup @ 29 NONAME
+ curl_multi_fdset @ 30 NONAME
+ curl_multi_info_read @ 31 NONAME
+ curl_multi_init @ 32 NONAME
+ curl_multi_perform @ 33 NONAME
+ curl_multi_remove_handle @ 34 NONAME
+ curl_multi_setopt @ 35 NONAME
+ curl_multi_socket @ 36 NONAME
+ curl_multi_socket_action @ 37 NONAME
+ curl_multi_socket_all @ 38 NONAME
+ curl_multi_strerror @ 39 NONAME
+ curl_multi_timeout @ 40 NONAME
+ curl_mvaprintf @ 41 NONAME
+ curl_mvfprintf @ 42 NONAME
+ curl_mvprintf @ 43 NONAME
+ curl_mvsnprintf @ 44 NONAME
+ curl_mvsprintf @ 45 NONAME
+ curl_share_cleanup @ 46 NONAME
+ curl_share_init @ 47 NONAME
+ curl_share_setopt @ 48 NONAME
+ curl_share_strerror @ 49 NONAME
+ curl_slist_append @ 50 NONAME
+ curl_slist_free_all @ 51 NONAME
+ curl_strequal @ 52 NONAME
+ curl_strnequal @ 53 NONAME
+ curl_unescape @ 54 NONAME
+ curl_version @ 55 NONAME
+ curl_version_info @ 56 NONAME
+
diff --git a/packages/Symbian/group/bld.inf b/packages/Symbian/group/bld.inf
new file mode 100644
index 000000000..efba26b3b
--- /dev/null
+++ b/packages/Symbian/group/bld.inf
@@ -0,0 +1,7 @@
+//
+// libcurl and curl bld.inf file for Symbian OS
+//
+
+PRJ_MMPFILES
+ libcurl.mmp
+ curl.mmp
diff --git a/packages/Symbian/group/curl.iby b/packages/Symbian/group/curl.iby
new file mode 100644
index 000000000..33eac4ad6
--- /dev/null
+++ b/packages/Symbian/group/curl.iby
@@ -0,0 +1,13 @@
+//
+// curl file transfer utility command-line utility
+//
+
+#ifndef CURL_IBY
+#define CURL_IBY
+
+#include <openenv.iby>
+#include <libcurl.iby>
+
+file=ABI_DIR\BUILD_DIR\curl.exe System\Programs\curl.exe
+
+#endif // CURL_IBY
diff --git a/packages/Symbian/group/curl.mmp b/packages/Symbian/group/curl.mmp
new file mode 100644
index 000000000..6fbaf995e
--- /dev/null
+++ b/packages/Symbian/group/curl.mmp
@@ -0,0 +1,23 @@
+//
+// cURL network retrieval client
+//
+
+TARGET curl.exe
+TARGETTYPE exe
+UID 0x00000000 0x10206442
+
+SOURCEPATH ..\..\..\src
+SOURCE \
+ main.c hugehelp.c urlglob.c writeout.c writeenv.c \
+ getpass.c homedir.c curlutil.c
+
+SYSTEMINCLUDE ..\..\..\include ..\..\..\lib ..\..\..\include\curl \
+ \epoc32\include \epoc32\include\stdapis
+
+LIBRARY euser.lib libc.lib libcurl.lib
+STATICLIBRARY libcrt0.lib
+
+CAPABILITY ALL -Tcb
+
+EPOCSTACKSIZE 0x18000
+
diff --git a/packages/Symbian/group/libcurl.iby b/packages/Symbian/group/libcurl.iby
new file mode 100644
index 000000000..6ea4fbb9f
--- /dev/null
+++ b/packages/Symbian/group/libcurl.iby
@@ -0,0 +1,12 @@
+//
+// libcurl file transfer DLL
+//
+
+#ifndef LIBCURL_IBY
+#define LIBCURL_IBY
+
+#include <openenv.iby>
+
+file=ABI_DIR\BUILD_DIR\libcurl.dll System\Libs\libcurl.dll
+
+#endif
diff --git a/packages/Symbian/group/libcurl.mmp b/packages/Symbian/group/libcurl.mmp
new file mode 100644
index 000000000..75f572dab
--- /dev/null
+++ b/packages/Symbian/group/libcurl.mmp
@@ -0,0 +1,32 @@
+//
+// libcurl.dll cURL network retrieval client library
+//
+
+TARGET libcurl.dll
+TARGETTYPE dll
+UID 0x1000008d 0x10206D00
+
+MACRO BUILDING_LIBCURL=1
+
+SOURCEPATH ..\..\..\lib
+SOURCE \
+ file.c timeval.c base64.c hostip.c progress.c formdata.c \
+ cookie.c http.c sendf.c ftp.c url.c dict.c if2ip.c speedcheck.c \
+ ldap.c ssluse.c version.c getenv.c escape.c mprintf.c telnet.c \
+ netrc.c getinfo.c transfer.c strequal.c easy.c security.c krb4.c \
+ krb5.c memdebug.c http_chunks.c strtok.c connect.c llist.c hash.c \
+ multi.c content_encoding.c share.c http_digest.c md5.c \
+ http_negotiate.c http_ntlm.c inet_pton.c strtoofft.c strerror.c \
+ hostares.c hostasyn.c hostip4.c hostip6.c hostsyn.c hostthre.c \
+ inet_ntop.c parsedate.c select.c gtls.c sslgen.c tftp.c splay.c \
+ strdup.c socks.c ssh.c nss.c qssl.c
+
+USERINCLUDE ..\..\..\lib
+
+SYSTEMINCLUDE ..\..\..\include ..\..\..\include\curl \
+ \epoc32\include\stdapis \epoc32\include
+
+LIBRARY euser.lib libc.lib
+CAPABILITY ALL -Tcb
+
+EPOCALLOWDLLDATA
diff --git a/packages/Symbian/readme.txt b/packages/Symbian/readme.txt
new file mode 100644
index 000000000..5ce85eada
--- /dev/null
+++ b/packages/Symbian/readme.txt
@@ -0,0 +1,71 @@
+Curl on Symbian OS
+==================
+This is a basic port of curl and libcurl to Symbian OS. The port is
+a straightforward one using Symbian's P.I.P.S. POSIX compatibility
+layer. A more complete port would involve writing a Symbian C++ binding,
+or wrapping libcurl as a Symbian application server with a C++ API to
+handle requests from client applications and creating a GUI application
+to allow file transfers. The author has no current plans to do so.
+
+This means that integration with standard Symbian OS programs can be
+tricky, since libcurl isn't designed with Symbian's native asynchronous
+message passing idioms in mind. However, it may be possible to use libcurl
+in an active object-based application through libcurl's multi interface.
+The port is most easily used when porting POSIX applications to Symbian
+OS using P.I.P.S.
+
+libcurl is built as a standard Symbian ordinal-linked DLL, and curl is
+built as a text mode EXE application. They have not been Symbian
+Signed, which is required in order to install them on most phones.
+
+Following are some things to keep in mind when using this port.
+
+curl notes
+----------
+When starting curl in the Windows emulator from the Windows command-line,
+place a double-dash -- before the first curl command-line option.
+e.g. \epoc32\release\winscw\udeb\curl -- -v http://localhost/
+Failure to do so may mean that some of your options won't be correctly
+processed.
+
+Symbian OS does not provide for redirecting the standard I/O streams, so
+stdin always comes from the keyboard and stdout always goes to the
+console; stderr is thrown away. The standard curl options -o, --stderr
+and --trace-ascii can be used to redirect output to a file (or stdout)
+instead.
+
+P.I.P.S. doesn't inherit the current working directory at startup, so you
+may need to use the -o option to specify a specific location to store a
+downloaded file.
+
+P.I.P.S. provides no way to disable echoing of characters as they are
+entered, so passwords typed in on the console will be visible.
+
+All screen output disappears after curl exits, so after a transfer completes,
+curl waits by default for Enter to pressed before exiting. This behaviour
+is suppressed when the -s option is given.
+
+The "home directory" in Symbian is C:\Private\10206442\. The .curlrc is read
+from this directory on startup.
+
+libcurl notes
+-------------
+libcurl uses writeable static data, so the EPOCALLOWDLLDATA option is
+used in its MMP file, with the corresponding additional memory usage
+and limitations on the Windows emulator.
+
+curl_global_init() *must* be called before any libcurl functions that could
+allocate memory (like curl_getenv()).
+
+P.I.P.S. doesn't support signals or the alarm() call, so some timeouts
+(such as the connect timeout) are not honoured.
+
+P.I.P.S. causes a USER:87 panic if a timeout much longer than half an hour
+is selected.
+
+SSL/TLS encryption is not supported.
+
+
+Dan Fandrich
+dan@coneharvesters.com
+April 2008
diff --git a/src/getpass.c b/src/getpass.c
index b5f2bc4ec..7209a2ab1 100644
--- a/src/getpass.c
+++ b/src/getpass.c
@@ -95,9 +95,18 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
#define DONE
#endif /* VMS */
+
#ifdef WIN32
/* Windows implementation */
#include <conio.h>
+#endif
+
+#ifdef __SYMBIAN32__
+#define getch() getchar()
+#endif
+
+#if defined(WIN32) || defined(__SYMBIAN32__)
+
char *getpass_r(const char *prompt, char *buffer, size_t buflen)
{
size_t i;
@@ -105,7 +114,7 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
for(i=0; i<buflen; i++) {
buffer[i] = getch();
- if ( buffer[i] == '\r' ) {
+ if ( buffer[i] == '\r' || buffer[i] == '\n' ) {
buffer[i] = 0;
break;
}
@@ -115,8 +124,10 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
previous one as well */
i = i - (i>=1?2:1);
}
+#ifndef __SYMBIAN32__
/* since echo is disabled, print a newline */
fputs("\n", stderr);
+#endif
/* if user didn't hit ENTER, terminate buffer */
if (i==buflen)
buffer[buflen-1]=0;
@@ -124,7 +135,7 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen)
return buffer; /* we always return success */
}
#define DONE
-#endif /* WIN32 */
+#endif /* WIN32 || __SYMBIAN32__ */
#ifdef NETWARE
/* NetWare implementation */
diff --git a/src/main.c b/src/main.c
index e3b3a6fe3..e9e1cb543 100644
--- a/src/main.c
+++ b/src/main.c
@@ -124,6 +124,15 @@
#include "memdebug.h"
#endif
+#if defined(NETWARE)
+#define PRINT_LINES_PAUSE 23
+#endif
+
+#if defined(__SYMBIAN32__)
+#define PRINT_LINES_PAUSE 16
+#define pressanykey() getchar()
+#endif
+
#define DEFAULT_MAXREDIRS 50L
#if defined(O_BINARY) && defined(HAVE_SETMODE)
@@ -787,8 +796,8 @@ static void help(void)
};
for(i=0; helptext[i]; i++) {
puts(helptext[i]);
-#ifdef NETWARE
- if (i && ((i % 23) == 0))
+#ifdef PRINT_LINES_PAUSE
+ if (i && ((i % PRINT_LINES_PAUSE) == 0))
pressanykey();
#endif
}
@@ -4988,6 +4997,10 @@ int main(int argc, char *argv[])
checkfds();
res = operate(&config, argc, argv);
+#ifdef __SYMBIAN32__
+ if (config.showerror)
+ pressanykey();
+#endif
free_config_fields(&config);
#ifdef __NOVELL_LIBC__
diff --git a/src/setup.h b/src/setup.h
index 41ba43084..b6a30b957 100644
--- a/src/setup.h
+++ b/src/setup.h
@@ -29,7 +29,7 @@
* Define WIN32 when build target is Win32 API
*/
-#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
+#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) && !defined(__SYMBIAN32__)
#define WIN32
#endif
@@ -58,6 +58,10 @@
#include "config-amigaos.h"
#endif
+#ifdef __SYMBIAN32__
+#include "config-symbian.h"
+#endif
+
#ifdef TPF
#include "config-tpf.h"
/* change which select is used for the curl command line tool */