Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 02 Mar 2013 12:15:16 -0300
From: Claudio André <claudioandre.br@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: sizeof(unsigned long)

Em 02-03-2013 07:53, magnum escreveu:
>> I tried this:
>> https://github.com/claudioandre/JohnTheRipper/commit/94fdc15bf9f92140ee05252b82e2e5fb47e6c0df
> Where does the host side get its definition or typedef from with this patch applied? I see no inclusion of stdint.h. BTW I see that common-opencl.c use uint64_t but I can't find where it is defined or included.
>
> magnum

Unstable is a little bit different, but the same applies.

Claudio


>From 210d11d8ecfc6c59ae12f6f2efbd948777d5bda0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Claudio=20Andr=C3=A9?= <claudio.andre@...reios.net.br>
Date: Fri, 1 Mar 2013 00:54:20 -0300
Subject: [PATCH 4/5] Use default uint64_t definition (stdint.h) for
 non-OpenCL code.

---
 src/opencl_sha256.h |   10 ++++++----
 src/opencl_sha512.h |   10 ++++++----
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/src/opencl_sha256.h b/src/opencl_sha256.h
index 9c96a26..f3b180d 100644
--- a/src/opencl_sha256.h
+++ b/src/opencl_sha256.h
@@ -13,10 +13,12 @@
 #define	OPENCL_SHA256_H
 
 //Type names definition.
-#define uint8_t  unsigned char
-#define uint16_t unsigned short
-#define uint32_t unsigned int
-#define uint64_t unsigned long  //Tip: unsigned long long int failed on compile (AMD).
+#ifdef _OPENCL_COMPILER
+	#define uint8_t  unsigned char
+	#define uint16_t unsigned short
+	#define uint32_t unsigned int
+	#define uint64_t unsigned long  //Tip: unsigned long long int failed on compile (AMD).
+#endif
 
 #define MIN_KEYS_PER_CRYPT      1
 #define MAX_KEYS_PER_CRYPT      1
diff --git a/src/opencl_sha512.h b/src/opencl_sha512.h
index f9129ed..bd122ee 100644
--- a/src/opencl_sha512.h
+++ b/src/opencl_sha512.h
@@ -13,10 +13,12 @@
 #define	OPENCL_SHA512_H
 
 //Type names definition.
-#define uint8_t  unsigned char
-#define uint16_t unsigned short
-#define uint32_t unsigned int
-#define uint64_t unsigned long  //Tip: unsigned long long int failed on compile (AMD).
+#ifdef _OPENCL_COMPILER
+	#define uint8_t  unsigned char
+	#define uint16_t unsigned short
+	#define uint32_t unsigned int
+	#define uint64_t unsigned long  //Tip: unsigned long long int failed on compile (AMD).
+#endif
 
 #define MIN_KEYS_PER_CRYPT      1
 #define MAX_KEYS_PER_CRYPT      1
-- 
1.7.9.5


>From fb7c6a881d984599226c0609983451009eeafa1a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Claudio=20Andr=C3=A9?= <claudio.andre@...reios.net.br>
Date: Sat, 2 Mar 2013 12:11:00 -0300
Subject: [PATCH 5/5] Include uint64_t definition (stdint.h) in
 common-opencl.h.

---
 src/common-opencl.h |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/common-opencl.h b/src/common-opencl.h
index 0f4113a..6d95d1a 100644
--- a/src/common-opencl.h
+++ b/src/common-opencl.h
@@ -15,6 +15,7 @@
 #include "common.h"
 #include "formats.h"
 #include "path.h"
+#include "stdint.h"
 #include "opencl_device_info.h"
 
 #define MAXGPUS	8
-- 
1.7.9.5


Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ