Index: /trunk/acconfig.h
===================================================================
--- /trunk/acconfig.h	(revision 155)
+++ /trunk/acconfig.h	(revision 156)
@@ -342,4 +342,7 @@
 /* Define if UINT64 is 32 bits.                 */
 #undef UINT64_IS_32
+
+/* Define if you have uint64_t.               */
+#undef HAVE_UINT64_T
 
 /* Define if you have utmpx.h.                */
Index: /trunk/aclocal.m4
===================================================================
--- /trunk/aclocal.m4	(revision 155)
+++ /trunk/aclocal.m4	(revision 156)
@@ -250,6 +250,13 @@
     sh_cv_typedef_foo=`echo sh_cv_typedef_$1 | sed -e 's% %_%g'`
     AC_CACHE_VAL( $sh_cv_typedef_foo,
-    [AC_TRY_COMPILE([#include <stdlib.h>
-    #include <sys/types.h>], [
+    [AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <sys/types.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif], [
     #undef $1
     int a = sizeof($1);
Index: /trunk/configure.ac
===================================================================
--- /trunk/configure.ac	(revision 155)
+++ /trunk/configure.ac	(revision 156)
@@ -34,6 +34,8 @@
 AC_SUBST(BUILD_CC)
 
-GCC_STACK_PROTECT_LIB
-GCC_STACK_PROTECT_CC
+if test "x$GCC" == "xyes"; then
+   GCC_STACK_PROTECT_LIB
+   GCC_STACK_PROTECT_CC
+fi
 
 AC_HEADER_STDC
@@ -399,4 +401,5 @@
 AC_C_LONG_DOUBLE
 SH_CHECK_TYPEDEF(long long, HAVE_LONG_LONG)
+SH_CHECK_TYPEDEF(uint64_t, HAVE_UINT64_T)
 if test "$sh_HAVE_LONG_LONG" = "yes"; then
    AC_CHECK_SIZEOF(unsigned long long, 4)
Index: /trunk/docs/Changelog
===================================================================
--- /trunk/docs/Changelog	(revision 155)
+++ /trunk/docs/Changelog	(revision 156)
@@ -1,3 +1,4 @@
 2.4.2:
+	* put result vector of rng in skey struct
 	* fix more compiler warnings, and a potential (compiler-dependent)
 	  NULL dereference in the unix entropy collector
Index: /trunk/include/samhain.h
===================================================================
--- /trunk/include/samhain.h	(revision 155)
+++ /trunk/include/samhain.h	(revision 156)
@@ -98,11 +98,10 @@
 #ifdef HAVE_INTTYPES_H
 #include <inttypes.h>
-#else
+#endif
 #ifdef HAVE_STDINT_H
 #include <stdint.h>
 #endif
-#endif
-
-#if !defined(HAVE_INTTYPES_H) && !defined(HAVE_STDINT_H)
+
+#if !defined(HAVE_UINT64_T)
 
 #ifdef HAVE_LONG_LONG_64
@@ -112,6 +111,5 @@
 #define  UINT64 unsigned long
 #else
-#define UINT64_IS_32
-#define  UINT64 unsigned long
+#error "no 64bit type found"
 #endif
 #endif
@@ -135,5 +133,5 @@
 #define SH_MOD_ACTIVE  0
 #define SH_MOD_FAILED -1
- 
+
 /* Flags for file status
  */
@@ -325,4 +323,6 @@
   UINT32 rng2[3];
 
+  UINT32 res_vec[6];
+
   UINT32 ErrFlag[2];
 
Index: /trunk/include/sh_unix.h
===================================================================
--- /trunk/include/sh_unix.h	(revision 155)
+++ /trunk/include/sh_unix.h	(revision 156)
@@ -23,5 +23,10 @@
 #define SH_UNIX_H
 
+/* For PATH_MAX */
 #include <limits.h>
+#if !defined(PATH_MAX)
+#define PATH_MAX 1024
+#endif
+
 #include <unistd.h>
 #include "samhain.h"
Index: /trunk/include/slib.h
===================================================================
--- /trunk/include/slib.h	(revision 155)
+++ /trunk/include/slib.h	(revision 156)
@@ -68,6 +68,6 @@
 #define SL_GNUC_CONST   __attribute__((const))
 #else
-#undef  SH_GNUC_CONST
-#define SH_GNUC_CONST
+#undef  SL_GNUC_CONST
+#define SL_GNUC_CONST
 #endif
 
Index: /trunk/src/sh_utils.c
===================================================================
--- /trunk/src/sh_utils.c	(revision 155)
+++ /trunk/src/sh_utils.c	(revision 156)
@@ -941,8 +941,10 @@
 UINT32 taus_get ()
 {
-  UINT32   taus_svec[6];
+#define TAUS_SAMPLE 12
+
+  UINT32   taus_svec[TAUS_SAMPLE];
   UINT32   retval;
   UINT32 * res;
-  static   UINT32   res_vec[6];
+  UINT32 * res_vec = &(skey->res_vec[0]);
   static   int      res_num = 0;
   register int i;
@@ -962,15 +964,15 @@
 
   SH_MUTEX_LOCK_UNSAFE(mutex_skey);
-  taus_svec[0] = taus_get_long (&(skey->rng0[0]));
-  taus_svec[1] = taus_get_long (&(skey->rng1[0]));
-  taus_svec[2] = taus_get_long (&(skey->rng2[0]));
-  taus_svec[3] = taus_get_long (&(skey->rng0[0]));
-  taus_svec[4] = taus_get_long (&(skey->rng1[0]));
-  taus_svec[5] = taus_get_long (&(skey->rng2[0]));
+  for (i = 0; i < (TAUS_SAMPLE/3); ++i)
+    {
+      taus_svec[i*3]   = taus_get_long (&(skey->rng0[0]));
+      taus_svec[i*3+1] = taus_get_long (&(skey->rng1[0]));
+      taus_svec[i*3+2] = taus_get_long (&(skey->rng2[0]));
+    }
   SH_MUTEX_UNLOCK_UNSAFE(mutex_skey);
 
   res     = sh_tiger_hash_uint32 ( (char *) &taus_svec[0], 
 				   TIGER_DATA, 
-				   (unsigned long)(6 * sizeof(UINT32)),
+				   (unsigned long)(TAUS_SAMPLE * sizeof(UINT32)),
 				   kbuf, KEY_BYT/sizeof(UINT32));
 
@@ -980,10 +982,9 @@
       res_vec[i] = res[i];
     }
-  retval  = taus_svec[0];
+  retval  = res[0];
   res_num = 1;
   SH_MUTEX_UNLOCK_UNSAFE(mutex_skey);
 
-  taus_svec[0] = 0; taus_svec[1] = 0; taus_svec[2] = 0; 
-  taus_svec[3] = 0; taus_svec[4] = 0; taus_svec[5] = 0; 
+  memset(taus_svec, '\0', TAUS_SAMPLE * sizeof(UINT32));
 
   return retval;
