[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Add an autoconf test for whether unaligned int access is pe...



Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/tmp/cvs-serv3947/src/common

Modified Files:
	util.c util.h 
Log Message:
Add an autoconf test for whether unaligned int access is permitted.
It works on macos, and works correctly when I twiddle the test code to
generate a spurious segfault.  Will it work anywhere else?


Index: util.c
===================================================================
RCS file: /home/or/cvsroot/src/common/util.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- util.c	21 Mar 2004 02:01:17 -0000	1.69
+++ util.c	21 Mar 2004 04:14:06 -0000	1.70
@@ -86,7 +86,7 @@
   }
 }
 
-#ifndef UNALIGNED_ACCESS_OK
+#ifndef UNALIGNED_INT_ACCESS_OK
 uint16_t get_uint16(char *cp)
 {
   uint16_t v;

Index: util.h
===================================================================
RCS file: /home/or/cvsroot/src/common/util.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- util.h	21 Mar 2004 02:01:17 -0000	1.39
+++ util.h	21 Mar 2004 04:14:06 -0000	1.40
@@ -43,7 +43,7 @@
 #define tor_free(p) do {if(p) {free(p); (p)=NULL;}} while(0)
 void tor_strlower(char *s);
 
-#ifdef UNALIGNED_ACCESS_OK
+#ifdef UNALIGNED_INT_ACCESS_OK
 /* XXX Not actually used yet, but would probably be faster on non-sun
  * hardare.
  */