All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block-sha1: Windows declares ntohl() in winsock2.h
@ 2009-08-18  7:15 Johannes Sixt
  2009-08-18 10:45 ` Sebastian Schuberth
  0 siblings, 1 reply; 34+ messages in thread
From: Johannes Sixt @ 2009-08-18  7:15 UTC (permalink / raw)
  To: msysGit; +Cc: Junio C Hamano, Git Mailing List

From: Johannes Sixt <j6t@kdbg.org>

This is a minimal fix to compile block-sha1 on Windows. I did not do any
benchmarks whether the implementation of ntohl() is actually faster than
bytewise access and shifts.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
 I would appreciate if our Windows experts could tell whether the
 implementation of ntohl/htonl is worth its money or whether we should
 go with the generic byte access plus shifts.

 the function call over
 block-sha1/sha1.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/block-sha1/sha1.c b/block-sha1/sha1.c
index a1228cf..67c1ee8 100644
--- a/block-sha1/sha1.c
+++ b/block-sha1/sha1.c
@@ -7,7 +7,11 @@
  */

 #include <string.h>
+#ifndef _WIN32
 #include <arpa/inet.h>
+#else
+#include <winsock2.h>
+#endif

 #include "sha1.h"

-- 
1.6.4.1179.g9a91.dirty

^ permalink raw reply related	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2009-08-20  2:46 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-18  7:15 [PATCH] block-sha1: Windows declares ntohl() in winsock2.h Johannes Sixt
2009-08-18 10:45 ` Sebastian Schuberth
2009-08-18 11:07   ` Junio C Hamano
2009-08-18 11:28     ` Sebastian Schuberth
2009-08-18 12:56   ` Artur Skawina
2009-08-18 13:17     ` Sebastian Schuberth
2009-08-18 13:39       ` Junio C Hamano
2009-08-18 15:40         ` Linus Torvalds
2009-08-18 16:08           ` Linus Torvalds
2009-08-18 16:23             ` Sebastian Schuberth
2009-08-18 16:43               ` Junio C Hamano
2009-08-18 16:30         ` Nicolas Pitre
2009-08-18 16:43           ` Nicolas Pitre
2009-08-18 16:50             ` Junio C Hamano
2009-08-18 18:01               ` Nicolas Pitre
2009-08-18 19:00                 ` Junio C Hamano
2009-08-18 19:22                   ` Nicolas Pitre
2009-08-18 19:26                     ` [PATCH] make sure byte swapping is optimal for git Nicolas Pitre
2009-08-18 19:37                     ` [PATCH] block-sha1: guard gcc extensions with __GNUC__ Nicolas Pitre
2009-08-18 19:40                   ` [PATCH] block-sha1: Windows declares ntohl() in winsock2.h Junio C Hamano
2009-08-18 19:56                   ` Brandon Casey
2009-08-18 20:10                     ` Nicolas Pitre
2009-08-18 20:25                       ` Linus Torvalds
2009-08-18 20:29                       ` Brandon Casey
2009-08-20  2:26                     ` Nicolas Pitre
2009-08-20  2:30                       ` Linus Torvalds
2009-08-20  2:45                       ` Brandon Casey
2009-08-18 16:59             ` Sebastian Schuberth
2009-08-18 17:05               ` Junio C Hamano
2009-08-18 18:16                 ` Nicolas Pitre
2009-08-18 20:17                   ` Junio C Hamano
2009-08-18 20:30                     ` Junio C Hamano
2009-08-18 20:49                       ` Nicolas Pitre
2009-08-18 18:10               ` Nicolas Pitre

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.