Aded Symbina support. Added new Carbide.c++ project files
authorPekka Riikonen <priikone@silcnet.org>
Sun, 13 May 2007 15:33:34 +0000 (15:33 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sun, 13 May 2007 15:33:34 +0000 (15:33 +0000)
for compiling SILC Toolki for Symbian OS.

CHANGES
README.SYMBIAN
includes/silcsymbian.h
symbian/bld.inf [new file with mode: 0644]
symbian/silc.mmp [new file with mode: 0644]
symbian/silc_static.mmp [new file with mode: 0644]
symbian/silcclient.mmp [new file with mode: 0644]
symbian/silcclient_static.mmp [new file with mode: 0644]
symbian/silcdefs.h

diff --git a/CHANGES b/CHANGES
index 9e7d93c5dc52695bf1ce6068a379d865ea695955..5ddf1fde3d68cb10650775d5edf17afbd4ee7b9d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,9 @@
+Sun May 13 18:27:13 EEST 2007  Pekka Riikonen <priikone@silcnet.org>
+
+       * Fixed client library initialization when the running callback
+         is not given to silc_client_init.  Affected file is
+         lib/silcclient/client.c.
+
 Sun May 13 16:54:35 CEST 2007  Jochen Eisinger <coffee@silcnet.org>
 
        * Fix several warnings in Irssi's Makefiles.
index 6093a905ed0b7c2818786cd4029dd567ee4be609..84fe4dc9eb221efba4796501b416ea39be682f8f 100644 (file)
@@ -9,14 +9,21 @@ target.  The SILC Toolkit has not been tested with other compilers or
 build systems.  The build environment expects MS Windows.
 
 
+Requirements
+============
+
+- MS Windows
+- Carbide.c++ 1.2 or newer
+
+
 Installing Build Environment
 ============================
 
 If you do not have a working Carbide.c++ and Symbian OS SDK environment 
 installed in your MS Windows system it needs to be done first.
 
-1) Download the freely available Carbide.c++ Express from Nokia at 
-   http://forum.nokia.com.  The exact hyprelink location changes often, so 
+1) Download the freely available Carbide.c++ from Nokia at
+   http://forum.nokia.com.  The exact hyperlink location changes often, so 
    it is not referenced here.  It is usually under "Tools and SDKs" link.
 
 2) After installation a web browser is opened automatically by the 
@@ -37,22 +44,35 @@ installed in your MS Windows system it needs to be done first.
 Building with Carbide.c++
 =========================
 
-After starting the Carbide.c++, you should import one of the SILC Toolkit 
-projects under symbian/ directory in the SILC Toolkit package.  Four 
-projects exist:
-
-       libsilc/                - SILC Core DLL
-       libsilcclient/          - SILC Client DLL
-       libsilc_static/         - SILC Core static library
-       libsilcclient_static/   - SILC Client static library
-
-After loading the project, the first thing to do is to add a path variable 
-to define where the SILC Toolkit sources are located.  Go to Window -> 
-Preferences.  Then, go to General -> Workspace -> Linked Resources.  Add 
-a new SILCROOT path variable.  It should point to the drive and directory 
-where the extracted SILC Toolkit sources are located.  For example, if you 
-extracted the SILC Toolkit package into C:\temp\silc-toolkit-1.1.5 the 
-SILCROOT should point to C:\temp.  This needs to be done only once.
-
-After that, the building is ready to begin.  Choose the target you want 
-(emulator or device, debug or release version) and start building.
+After starting the Carbide.c++ you will need to import the SILC Toolkit 
+project.  Go to File -> Import -> Symbian OS -> Symbian OS Bld.inf file, 
+and go to the extracted SILC Toolkit source tree and find symbian/bld.inf 
+file and import it.  When Carbide.c++ asks for the Root Directory, select 
+the root of the extracted SILC Toolkit source tree, if not already 
+selected.
+
+After importing the project it is immediately ready for building.  By 
+default, it will build the following libraries:
+
+       silc.dll                - SILC Core DLL
+       silcclient.dll          - SILC Client DLL
+       silc.lib                - SILC Core static library
+       silcclient.lib          - SILC Client static library
+
+Before building select the target for which you want to build.  Possible
+targets are Emulator or Phone with Debug or Release.
+
+
+Using SILC Toolkit in Your Project
+==================================
+
+When linking with SILC libraries your application will need to also link 
+the following Symbian libraries:
+
+       estlib
+       euser
+       insock
+       esock
+
+You will also need to include the \epoc32\include\libc into your system 
+include path in your project, if not already included.
index 396a1210bd6d43a9c9a567705af802822a385ae0..505a149c405af671f5eb7fcf6b79ab69bcae87f7 100644 (file)
@@ -6,14 +6,14 @@
 
   Copyright (C) 2002 - 2006 Pekka Riikonen
 
-  This program is free software; you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation; version 2 of the License.
+  The contents of this file are subject to one of the Licenses specified 
+  in the COPYING file;  You may not use this file except in compliance 
+  with the License.
 
-  This program is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  The software distributed under the License is distributed on an "AS IS"
+  basis, in the hope that it will be useful, but WITHOUT WARRANTY OF ANY
+  KIND, either expressed or implied.  See the COPYING file for more
+  information.
 
 */
 /* Native Symbian specific includes and definitions. */
 /* And just in case, include stddef.h here to get the Symbian one as
    early as possible. */
 #include <stddef.h>
+#include <sys/times.h>
+#include <sys/stat.h>
+
+/* Some internal routines */
+void silc_symbian_usleep(long microseconds);
+void silc_symbian_debug(const char *function, int line, char *string);
 
 #endif /* SILCSYMBIAN_H */
diff --git a/symbian/bld.inf b/symbian/bld.inf
new file mode 100644 (file)
index 0000000..a725229
--- /dev/null
@@ -0,0 +1,11 @@
+PRJ_PLATFORMS\r
+GCCE WINSCW\r
+\r
+PRJ_MMPFILES\r
+silc.mmp\r
+silc_static.mmp\r
+silcclient.mmp\r
+silcclient_static.mmp\r
+\r
+PRJ_TESTMMPFILES\r
+test_silcnet.mmp\r
diff --git a/symbian/silc.mmp b/symbian/silc.mmp
new file mode 100644 (file)
index 0000000..c1b02bd
--- /dev/null
@@ -0,0 +1,41 @@
+TARGETTYPE dll\r
+TARGET silc.dll\r
+VENDORID 0x12345678\r
+\r
+UID 0x1deadbe1 0xdeadbe11\r
+\r
+SYSTEMINCLUDE \epoc32\include \epoc32\include\libc \epoc32\include\variant .\r
+CAPABILITY NONE\r
+MACRO HAVE_SILCDEFS_H\r
+\r
+SOURCEPATH ..\lib\contrib\r
+SOURCE getopti.c nfkc.c regexpr.c rfc3454.c stringprep.c\r
+SOURCEPATH ..\lib\silcapputil\r
+SOURCE silcapputil.c silcidcache.c\r
+SOURCEPATH ..\lib\silcasn1\r
+SOURCE silcasn1.c silcasn1_decode.c silcasn1_encode.c silcber.c\r
+SOURCEPATH ..\lib\silccore\r
+SOURCE silcargument.c silcattrs.c silcauth.c silcchannel.c silccommand.c silcid.c silcmessage.c silcnotify.c silcpacket.c silcpubkey.c silcstatus.c\r
+SOURCEPATH ..\lib\silccrypt\r
+SOURCE aes.c blowfish.c cast.c md5.c none.c rc5.c rsa.c sha1.c sha256.c silccipher.c silchash.c silchmac.c silcpk.c silcpkcs.c silcpkcs1.c silcrng.c twofish.c\r
+SOURCEPATH ..\lib\silchttp\r
+SOURCE silchttpserver.c\r
+SOURCEPATH ..\lib\silcmath\r
+SOURCE modinv.c mp_tma.c mpbin.c silcprimegen.c tma.c\r
+SOURCEPATH ..\lib\silcsftp\r
+SOURCE sftp_client.c sftp_fs_memory.c sftp_server.c sftp_util.c\r
+SOURCEPATH ..\lib\silcskr\r
+SOURCE silcskr.c\r
+SOURCEPATH ..\lib\silcutil\r
+SOURCE silcasync.c silcbuffmt.c silcconfig.c silcfdstream.c silcfileutil.c silcfsm.c silchashtable.c silclog.c silcmemory.c silcmime.c silcnet.c silcschedule.c silcsnprintf.c silcsocketstream.c silcstack.c silcstream.c silcstringprep.c silcstrutil.c silctime.c silcutf8.c silcutil.c\r
+SOURCEPATH ..\lib\silcutil\symbian\r
+SOURCE silcsymbiannet.cpp silcsymbianscheduler.cpp silcsymbiansocketstream.cpp silcsymbianthread.cpp silcsymbianutil.cpp\r
+SOURCEPATH ..\lib\silcvcard\r
+SOURCE silcvcard.c\r
+SOURCEPATH ..\lib\silcske\r
+SOURCE groups.c payload.c silcconnauth.c silcske.c\r
+\r
+USERINCLUDE . ..\includes ..\lib\silcutil ..\lib\silcvcard ..\lib\silccore ..\lib\silcasn1 ..\lib\contrib ..\lib\silchttp ..\lib\silcapputil ..\lib\silcskr ..\lib\silccrypt ..\lib\silcmath ..\lib\silcsftp ..\lib\silcske\r
+\r
+\r
+LIBRARY estlib.lib euser.lib insock.lib esock.lib\r
diff --git a/symbian/silc_static.mmp b/symbian/silc_static.mmp
new file mode 100644 (file)
index 0000000..55ded7c
--- /dev/null
@@ -0,0 +1,38 @@
+TARGETTYPE lib\r
+TARGET silc.lib\r
+VENDORID 0x00000000\r
+\r
+UID 0x00000000 0x00000000\r
+\r
+SYSTEMINCLUDE \epoc32\include \epoc32\include\libc \epoc32\include\variant .\r
+CAPABILITY NONE\r
+MACRO HAVE_SILCDEFS_H\r
+\r
+SOURCEPATH ..\lib\contrib\r
+SOURCE getopti.c nfkc.c regexpr.c rfc3454.c stringprep.c\r
+SOURCEPATH ..\lib\silcapputil\r
+SOURCE silcapputil.c silcidcache.c\r
+SOURCEPATH ..\lib\silcasn1\r
+SOURCE silcasn1.c silcasn1_decode.c silcasn1_encode.c silcber.c\r
+SOURCEPATH ..\lib\silccore\r
+SOURCE silcargument.c silcattrs.c silcauth.c silcchannel.c silccommand.c silcid.c silcmessage.c silcnotify.c silcpacket.c silcpubkey.c silcstatus.c\r
+SOURCEPATH ..\lib\silccrypt\r
+SOURCE aes.c blowfish.c cast.c md5.c none.c rc5.c rsa.c sha1.c sha256.c silccipher.c silchash.c silchmac.c silcpk.c silcpkcs.c silcpkcs1.c silcrng.c twofish.c\r
+SOURCEPATH ..\lib\silchttp\r
+SOURCE silchttpserver.c\r
+SOURCEPATH ..\lib\silcmath\r
+SOURCE modinv.c mp_tma.c mpbin.c silcprimegen.c tma.c\r
+SOURCEPATH ..\lib\silcsftp\r
+SOURCE sftp_client.c sftp_fs_memory.c sftp_server.c sftp_util.c\r
+SOURCEPATH ..\lib\silcskr\r
+SOURCE silcskr.c\r
+SOURCEPATH ..\lib\silcutil\r
+SOURCE silcasync.c silcbuffmt.c silcconfig.c silcfdstream.c silcfileutil.c silcfsm.c silchashtable.c silclog.c silcmemory.c silcmime.c silcnet.c silcschedule.c silcsnprintf.c silcsocketstream.c silcstack.c silcstream.c silcstringprep.c silcstrutil.c silctime.c silcutf8.c silcutil.c\r
+SOURCEPATH ..\lib\silcutil\symbian\r
+SOURCE silcsymbiannet.cpp silcsymbianscheduler.cpp silcsymbiansocketstream.cpp silcsymbianthread.cpp silcsymbianutil.cpp\r
+SOURCEPATH ..\lib\silcvcard\r
+SOURCE silcvcard.c\r
+SOURCEPATH ..\lib\silcske\r
+SOURCE groups.c payload.c silcconnauth.c silcske.c\r
+\r
+USERINCLUDE . ..\includes ..\lib\silcutil ..\lib\silcvcard ..\lib\silccore ..\lib\silcasn1 ..\lib\contrib ..\lib\silchttp ..\lib\silcapputil ..\lib\silcskr ..\lib\silccrypt ..\lib\silcmath ..\lib\silcsftp ..\lib\silcske\r
diff --git a/symbian/silcclient.mmp b/symbian/silcclient.mmp
new file mode 100644 (file)
index 0000000..d8a16b9
--- /dev/null
@@ -0,0 +1,17 @@
+TARGETTYPE dll\r
+TARGET silcclient.dll\r
+VENDORID 0x12345678\r
+\r
+UID 0x1deadbe1 0xdeadbe10\r
+\r
+SYSTEMINCLUDE \epoc32\include \epoc32\include\libc \epoc32\include\variant .\r
+CAPABILITY NONE\r
+MACRO HAVE_SILCDEFS_H\r
+\r
+SOURCEPATH ..\lib\silcclient\r
+SOURCE client.c client_attrs.c client_channel.c client_connect.c client_entry.c client_ftp.c client_keyagr.c client_listener.c client_notify.c client_prvmsg.c client_register.c command.c command_reply.c\r
+\r
+USERINCLUDE . ..\includes ..\lib\silcutil ..\lib\silcvcard ..\lib\silccore ..\lib\silcasn1 ..\lib\contrib ..\lib\silchttp ..\lib\silcapputil ..\lib\silcskr ..\lib\silccrypt ..\lib\silcmath ..\lib\silcsftp ..\lib\silcske ..\lib\silcclient\r
+\r
+\r
+LIBRARY estlib.lib euser.lib insock.lib esock.lib silc.lib\r
diff --git a/symbian/silcclient_static.mmp b/symbian/silcclient_static.mmp
new file mode 100644 (file)
index 0000000..29c6a50
--- /dev/null
@@ -0,0 +1,14 @@
+TARGETTYPE lib\r
+TARGET silcclient.lib\r
+VENDORID 0x00000000\r
+\r
+UID 0x00000000 0x00000000\r
+\r
+SYSTEMINCLUDE \epoc32\include \epoc32\include\libc \epoc32\include\variant .\r
+CAPABILITY NONE\r
+MACRO HAVE_SILCDEFS_H\r
+\r
+SOURCEPATH ..\lib\silcclient\r
+SOURCE client.c client_attrs.c client_channel.c client_connect.c client_entry.c client_ftp.c client_keyagr.c client_listener.c client_notify.c client_prvmsg.c client_register.c command.c command_reply.c\r
+\r
+USERINCLUDE . ..\includes ..\lib\silcutil ..\lib\silcvcard ..\lib\silccore ..\lib\silcasn1 ..\lib\contrib ..\lib\silchttp ..\lib\silcapputil ..\lib\silcskr ..\lib\silccrypt ..\lib\silcmath ..\lib\silcsftp ..\lib\silcske ..\lib\silcclient\r
index 30d40b0fc70eea7689cdf159fcf6c1c1a6346215..e307a5df3af5b1dd264abde1f686339fe53e1e0c 100644 (file)
@@ -41,7 +41,7 @@
 #define HAVE_GETENV 1
 
 /* Define to 1 if you have the `getgid' function. */
-#define HAVE_GETGID 1
+//#define HAVE_GETGID 1
 
 /* Define to 1 if you have the `gethostbyaddr' function. */
 #define HAVE_GETHOSTBYADDR 1
 #define HAVE_GETHOSTNAME 1
 
 /* Define to 1 if you have the `getpgid' function. */
-#define HAVE_GETPGID 1
+//#define HAVE_GETPGID 1
 
 /* Define to 1 if you have the `getpgrp' function. */
-#define HAVE_GETPGRP 1
+//#define HAVE_GETPGRP 1
 
 /* Define to 1 if you have the `getpid' function. */
 #define HAVE_GETPID 1
@@ -65,7 +65,7 @@
 #define HAVE_GETSERVBYPORT 1
 
 /* Define to 1 if you have the `getsid' function. */
-#define HAVE_GETSID 1
+//#define HAVE_GETSID 1
 
 /* Define to 1 if you have the `gettimeofday' function. */
 #define HAVE_GETTIMEOFDAY 1