Added and implemented Silc DIR API.
[crypto.git] / includes / silc.h.in
index 5c3f338b721d2e4527f2c7928f6b9d00c71e1ded..c64d33b8a9e483b767703723d764e0e767666e22 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 1997 - 2007 Pekka Riikonen
+  Copyright (C) 1997 - 2008 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
@@ -67,6 +67,7 @@ extern "C" {
 @__SILC_ENABLE_DEBUG@
 
 #if defined(HAVE_SILCDEFS_H)
+
 /* Automatically generated configuration header */
 #ifndef SILC_SYMBIAN
 #include "silcdefs.h"
@@ -74,6 +75,37 @@ extern "C" {
 #include "../symbian/silcdefs.h"
 #endif /* SILC_SYMBIAN */
 #include "silcdistdefs.h"
+
+#else
+
+/* Autodetect CPU so that inline assembly in headers are enabled */
+
+#if defined(__i386__)
+#undef SILC_I386
+#define SILC_I386
+#undef SILC_I486
+#define SILC_I486
+#endif /* __i386__ */
+
+#if defined(__x86_64__)
+#undef SILC_X86_64
+#define SILC_X86_64
+#endif /* __x86_64__ */
+
+#if defined(__ia64__)
+#undef SILC_IA64
+#define SILC_IA64
+#endif /* __ia64__ */
+
+#if defined(__ppc__) || defined(__ppc64__)
+#undef SILC_POWERPC
+#define SILC_POWERPC
+#endif /* __ppc__ || __ppc64__ */
+
+#ifndef SILC_ALIGNMENT
+#define SILC_ALIGNMENT SILC_SIZEOF_VOID_P
+#endif /* SILC_ALIGNMENT */
+
 #endif /* HAVE_SILCDEFS_H */
 
 /* Platform specific includes */
@@ -90,19 +122,6 @@ extern "C" {
 #define DLLAPI
 #endif
 
-#ifdef SILC_HAVE_PTHREAD
-/* For pthreads rwlock support */
-#ifndef _XOPEN_SOURCE
-#define _XOPEN_SOURCE 600
-#else
-#ifdef _XOPEN_SOURCE < 600
-#define _XOPEN_SOURCE_SAVE _XOPEN_SOURCE
-#undef _XOPEN_SOURCE
-#define _XOPEN_SOURCE 600
-#endif /* _XOPEN_SOURCE < 600 */
-#endif /* _XOPEN_SOURCE */
-#endif /* SILC_HAVE_PTHREAD */
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -111,6 +130,7 @@ extern "C" {
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <time.h>
+#include <dirent.h>
 
 #ifdef HAVE_SIGNAL_H
 #include <signal.h>
@@ -139,14 +159,6 @@ extern "C" {
 #include <grp.h>
 #endif
 
-#if defined(HAVE_GETOPT_H) && defined(HAVE_GETOPT)
-#include <getopt.h>
-#else
-#if defined(HAVE_SILCDEFS_H)
-#include "getopti.h"
-#endif /* HAVE_SILCDEFS_H */
-#endif
-
 #ifdef SOCKS5
 #include "socks.h"
 #endif
@@ -184,21 +196,8 @@ extern "C" {
 #include <limits.h>
 #endif
 
-#ifndef HAVE_REGEX_H
-#if defined(HAVE_SILCDEFS_H)
-#include "regexpr.h"
-#endif /* HAVE_SILCDEFS_H */
-#else
-#include <regex.h>
-#endif
-
 #ifdef SILC_HAVE_PTHREAD
 #include <pthread.h>
-#ifdef _XOPEN_SOURCE_SAVE
-#undef _XOPEN_SOURCE
-#define _XOPEN_SOURCE _XOPEN_SOURCE_SAVE
-#undef _XOPEN_SOURCE_SAVE
-#endif /* _XOPEN_SOURCE_SAVE */
 #endif
 
 #ifdef HAVE_STDDEF_H
@@ -232,12 +231,16 @@ extern "C" {
 #endif                         /* !SILC_WIN32 */
 
 /* Include generic SILC type definitions */
+#include "silcerrno.h"
 #include "silctypes.h"
+#include "silcbitops.h"
 #include "silcmutex.h"
 #include "silcatomic.h"
 #include "silcversion.h"
 
 /* SILC util library includes */
+#include "silcgetopt.h"
+#include "silclist.h"
 #include "silcstack.h"
 #include "silcmemory.h"
 #include "silcsnprintf.h"
@@ -248,14 +251,20 @@ extern "C" {
 
 /* More SILC util library includes */
 #include "silctime.h"
+#include "silctimer.h"
 #include "silccond.h"
 #include "silcthread.h"
 #include "silcschedule.h"
 #include "silclog.h"
+#include "silcdir.h"
+#include "silcfileutil.h"
 #include "silcbuffer.h"
 #include "silcbuffmt.h"
+#include "silcasync.h"
+#include "silcdlist.h"
 
 /* Crypto library includes */
+#include "silccrypto.h"
 #include "silccipher.h"
 #include "silchash.h"
 #include "silchmac.h"
@@ -263,15 +272,21 @@ extern "C" {
 #include "silcpkcs.h"
 #include "silcpk.h"
 #include "silcpkcs1.h"
+#ifdef SILC_DIST_ACC
+#include "silcacc.h"
+#endif /* SILC_DIST_ACC */
+#ifdef SILC_DIST_SSH
+#include "silcssh.h"
+#endif /* SILC_DIST_SSH */
 
 /* More SILC util library includes */
+#include "silcregex.h"
+#include "silcenv.h"
+#include "silcdll.h"
 #include "silchashtable.h"
-#include "silclist.h"
-#include "silcdlist.h"
-#include "silcasync.h"
 #include "silcstream.h"
 #include "silcnet.h"
-#include "silcfileutil.h"
+#include "silcbase64.h"
 #include "silcstrutil.h"
 #include "silcutf8.h"
 #include "silcstringprep.h"
@@ -280,9 +295,12 @@ extern "C" {
 #include "silcfsm.h"
 #include "silcsocketstream.h"
 #include "silcfdstream.h"
-#include "silcvcard.h"
 #include "silcmime.h"
 
+#ifdef SILC_DIST_VCARD
+#include "silcvcard.h"
+#endif /* SILC_DIST_VCARD */
+
 #ifdef SILC_DIST_ASN1
 #include "silcasn1.h"
 #include "silcber.h"