mercurial/bdiff.c
changeset 411 9e9f7ab43ce2
parent 400 8b067bde6679
child 433 79c694462294
equal deleted inserted replaced
410:7c678976df3e 411:9e9f7ab43ce2
    10 */
    10 */
    11 
    11 
    12 #include <Python.h>
    12 #include <Python.h>
    13 #include <stdlib.h>
    13 #include <stdlib.h>
    14 #include <string.h>
    14 #include <string.h>
    15 #include <netinet/in.h>
    15 #ifdef _WIN32
    16 #include <sys/types.h>
    16 
       
    17 typedef unsigned long uint32_t;
       
    18 
       
    19 static uint32_t htonl(uint32_t x)
       
    20 {
       
    21 	return ((x & 0x000000ffUL) << 24) |
       
    22 		((x & 0x0000ff00UL) <<  8) |
       
    23 		((x & 0x00ff0000UL) >>  8) |
       
    24 		((x & 0xff000000UL) >> 24);
       
    25 }
       
    26 
       
    27 #else
       
    28   #include <netinet/in.h>
       
    29   #include <sys/types.h>
       
    30 #endif
    17 
    31 
    18 struct line {
    32 struct line {
    19 	int h, len, n;
    33 	int h, len, n;
    20 	const char *l;
    34 	const char *l;
    21 };
    35 };