[or-cvs] autoconf around missing stdint.h

Nick Mathewson nickm at seul.org
Mon Aug 11 20:40:23 UTC 2003


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

Modified Files:
	aes.c aes.h 
Added Files:
	torint.h 
Log Message:
autoconf around missing stdint.h

--- NEW FILE: torint.h ---
/* Copyright 2003 Roger Dingledine */
/* See LICENSE for licensing information */
/* $Id: torint.h,v 1.1 2003/08/11 20:40:21 nickm Exp $ */

#ifndef __TORINT_H
#define __TORINT_H

#ifdef HAVE_STDINT_H
#include <stdint.h>
#else

#if (SIZEOF_CHAR == 1)
typedef unsigned char uint8_t;
typedef signed char int8_t;
#else
#error "sizeof(char) != 1"
#endif

#if (SIZEOF_SHORT == 2)
typedef unsigned short uint16_t;
typedef signed short int16_t;
#elif (SIZEOF_INT == 2)
typedef unsigned int uint16_t;
typedef signed int int16_t;
#else
#error "sizeof(short) != 2 && sizeof(int) != 2"
#endif

#if (SIZEOF_INT == 4)
typedef unsigned int uint32_t;
typedef signed int int32_t;
#elif (SIZEOF_LONG == 4)
typedef unsigned long uint32_t;
typedef signed long int32_t;
#else
#error "sizeof(int) != 4 && sizeof(long) != 4"
#endif

#if (SIZEOF_LONG == 8)
typedef unsigned long uint64_t;
typedef signed long int64_t;
#elif (SIZEOF_LONG_LONG == 8)
typedef unsigned long long uint64_t;
typedef signed long long int64_t;
#elif (SIZEOF___INT64 == 8)
typedef unsigned __int64 uint64_t;
typedef signed __int64 int64_t;
#else
#error "sizeof(long) != 8 && sizeof(long long) != 8 && sizeof(__int64) != 8"
#endif

#endif /* HAVE_STDINT_H */


#endif /* __TORINT_H */

Index: aes.c
===================================================================
RCS file: /home/or/cvsroot/src/common/aes.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- aes.c	30 Jun 2003 19:18:12 -0000	1.1
+++ aes.c	11 Aug 2003 20:40:20 -0000	1.2
@@ -10,7 +10,6 @@
 #include <assert.h>
 #include <stdlib.h>
 #include <string.h>
-#include <stdint.h>
 #include "../../orconfig.h"
 #include "./aes.h"
 #include "util.h"

Index: aes.h
===================================================================
RCS file: /home/or/cvsroot/src/common/aes.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- aes.h	30 Jun 2003 19:18:12 -0000	1.1
+++ aes.h	11 Aug 2003 20:40:21 -0000	1.2
@@ -7,7 +7,7 @@
 #ifndef __AES_H
 #define __AES_H
 
-#include <stdint.h>
+#include "../common/torint.h"
 
 struct aes_cnt_cipher;
 typedef struct aes_cnt_cipher aes_cnt_cipher_t;



More information about the tor-commits mailing list