updates.
authorPekka Riikonen <priikone@silcnet.org>
Sat, 1 Sep 2007 10:15:03 +0000 (10:15 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 1 Sep 2007 10:15:03 +0000 (10:15 +0000)
CHANGES.CRYPTO
CHANGES.RUNTIME
TODO
includes/silc.h.in
silc.m4

index f79ddb5b329d730cc2eaac90cf9a2d82f8379083..294800a222f3b6f47878927c0980a8e19d8a19fe 100644 (file)
@@ -1,3 +1,11 @@
+Sat Sep  1 12:33:44 EEST 2007  Pekka Riikonen <priikone@silcnet.org>
+
+       * Added SHA-512 to crypto library.
+
+       * Added hmac-sha512 and hmac-sha512-96 to crypto library.
+
+       * Added x86 optimized SHA-256 implementation to crypto library.
+
 Tue Aug  7 21:05:53 EEST 2007  Pekka Riikonen <priikone@silcnet.org>
 
        * Changed cipher and hash APIs to use const char *name instead
 Tue Aug  7 21:05:53 EEST 2007  Pekka Riikonen <priikone@silcnet.org>
 
        * Changed cipher and hash APIs to use const char *name instead
index 644be70781785e56df3122ed1afb4623c2568504..2a62d8f996abc3bfda712f766a6b05687f3e7390 100644 (file)
@@ -1,3 +1,31 @@
+Sat Sep  1 12:09:32 EEST 2007  Pekka Riikonen <priikone@silcnet.org>
+
+       * Rewrote parts of the SILC Atomic API to not use volatile
+         members in structures but to handle the memory accesses
+         volatily, the right way to do it.  Affected file is
+         lib/silcutil/silcatomic.h.
+
+       * Added silc_timer_tick and silc_timer_synchronize functions
+         to SILC Timer API.  Affected files are 
+         lib/silcutil/silctimer.[ch] and silctimer_i.h.
+
+       * Use clock_gettime in place of gettimeofday, if it is
+         available.  Affected files are configure.ad and
+         lib/silcutil/unix/silcunixutil.c.
+
+       * Added silc_offsetof, silc_likely and silc_unlikely to public
+         API.  Added silc_attribute compiler specific definition.
+         Affected file is lib/silcutil/silctypes.h.
+
+       * Added silc_prefetch and silc_prefetch_block functions that
+         provide routines for prefetching data to CPU cache.  Affected
+         file is lib/silcutil/silctypes.h.
+
+       * Added --with-alignment for specifying default memory alignment
+         used in the compiled code.  Currently only SilcStack respects
+         this value.  Affected files are lib/configure.ad,
+         lib/silcutil/silcstack_i.h and includes/silc.h.in.
+
 Tue Aug  7 21:00:00 EEST 2007  Pekka Riikonen <priikone@silcnet.org>
 
        * Fixed alignment issues on 64-bit CPUs.  Affected files are
 Tue Aug  7 21:00:00 EEST 2007  Pekka Riikonen <priikone@silcnet.org>
 
        * Fixed alignment issues on 64-bit CPUs.  Affected files are
diff --git a/TODO b/TODO
index 0132fb66835dddea66c67b58b17aa30bdcb77f84..be1abf80d26edeaaadcbebc82a952e0306e188bf 100644 (file)
--- a/TODO
+++ b/TODO
@@ -198,6 +198,8 @@ Runtime library, lib/silcutil/
    _ua unaligned memory allocation routines.  Remove unaligned memory
    allocation possibility. (***DONE)
 
    _ua unaligned memory allocation routines.  Remove unaligned memory
    allocation possibility. (***DONE)
 
+ o silc_malloc et. al. to respect --with-alignment.
+
  o Add '%@' format to silc_snprintf functions.  It marks for external
    rendering function of following type:
 
  o Add '%@' format to silc_snprintf functions.  It marks for external
    rendering function of following type:
 
@@ -219,7 +221,7 @@ Runtime library, lib/silcutil/
    silc_snprintf(buf, sizeof(buf), "Client ID %@", id_renderer, client_id);
 
  o Change silc_gettimeofday on Unix to use clock_gettime with REALTIME
    silc_snprintf(buf, sizeof(buf), "Client ID %@", id_renderer, client_id);
 
  o Change silc_gettimeofday on Unix to use clock_gettime with REALTIME
-   clock if it is available, otherwise use gettimeofday().
+   clock if it is available, otherwise use gettimeofday(). (***DONE)
 
  (o Generic SilcStatus or SilcResult that includes all possible status and
     error conditions, including those of SILC protocol.  Though, the SILC
 
  (o Generic SilcStatus or SilcResult that includes all possible status and
     error conditions, including those of SILC protocol.  Though, the SILC
index 2e46a7e3f1f48d84039fc40ad900fdfa7ae7fb49..037bc3294dfae93a35b7eb317c05b57a2b205842 100644 (file)
@@ -67,6 +67,7 @@ extern "C" {
 @__SILC_ENABLE_DEBUG@
 
 #if defined(HAVE_SILCDEFS_H)
 @__SILC_ENABLE_DEBUG@
 
 #if defined(HAVE_SILCDEFS_H)
+
 /* Automatically generated configuration header */
 #ifndef SILC_SYMBIAN
 #include "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"
 #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 */
 #endif /* HAVE_SILCDEFS_H */
 
 /* Platform specific includes */
diff --git a/silc.m4 b/silc.m4
index c05aa2ab00d233918880816f6813e13e0c0d5b6e..300f3035dd4ae72750c6ce9f8b9ee62bce5e638f 100644 (file)
--- a/silc.m4
+++ b/silc.m4
@@ -115,7 +115,7 @@ AC_DEFUN([SILC_CPU_FLAG],
         ifelse([$3], , :, [$3])
       else
         AC_MSG_RESULT(yes)
         ifelse([$3], , :, [$3])
       else
         AC_MSG_RESULT(yes)
-          x_have_cpu_$1=true
+        x_have_cpu_$1=true
         ifelse([$2], , :, [$2])
       fi
       ;;
         ifelse([$2], , :, [$2])
       fi
       ;;