diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-02-01 17:11:35 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-02-01 17:11:35 +0000 |
commit | fd2436817f0466d182ac4478f1fee3f2368a81ea (patch) | |
tree | 06e45dbd118d89504fbfd87ed2787266e607f1e3 | |
parent | 67f3331b28aee547a80a972099c85e91cb3d5382 (diff) | |
download | gnunet-fd2436817f0466d182ac4478f1fee3f2368a81ea.tar.gz gnunet-fd2436817f0466d182ac4478f1fee3f2368a81ea.zip |
-barato's byte order patch, might even help with #2130
-rw-r--r-- | src/include/gnunet_common.h | 14 | ||||
-rw-r--r-- | src/util/os_installation.c | 2 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index 7e6d20b15..35db82a3a 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h | |||
@@ -66,20 +66,32 @@ | |||
66 | 66 | ||
67 | #define GNUNET_MAX(a,b) (((a) > (b)) ? (a) : (b)) | 67 | #define GNUNET_MAX(a,b) (((a) > (b)) ? (a) : (b)) |
68 | 68 | ||
69 | /* some systems use one underscore only... */ | 69 | /* some systems use one underscore only, and mingw uses no underscore... */ |
70 | #ifndef __BYTE_ORDER | 70 | #ifndef __BYTE_ORDER |
71 | #ifdef _BYTE_ORDER | 71 | #ifdef _BYTE_ORDER |
72 | #define __BYTE_ORDER _BYTE_ORDER | 72 | #define __BYTE_ORDER _BYTE_ORDER |
73 | #else | ||
74 | #ifdef BYTE_ORDER | ||
75 | #define __BYTE_ORDER BYTE_ORDER | ||
76 | #endif | ||
73 | #endif | 77 | #endif |
74 | #endif | 78 | #endif |
75 | #ifndef __BIG_ENDIAN | 79 | #ifndef __BIG_ENDIAN |
76 | #ifdef _BIG_ENDIAN | 80 | #ifdef _BIG_ENDIAN |
77 | #define __BIG_ENDIAN _BIG_ENDIAN | 81 | #define __BIG_ENDIAN _BIG_ENDIAN |
82 | #else | ||
83 | #ifdef BIG_ENDIAN | ||
84 | #define __BIG_ENDIAN BIG_ENDIAN | ||
85 | #endif | ||
78 | #endif | 86 | #endif |
79 | #endif | 87 | #endif |
80 | #ifndef __LITTLE_ENDIAN | 88 | #ifndef __LITTLE_ENDIAN |
81 | #ifdef _LITTLE_ENDIAN | 89 | #ifdef _LITTLE_ENDIAN |
82 | #define __LITTLE_ENDIAN _LITTLE_ENDIAN | 90 | #define __LITTLE_ENDIAN _LITTLE_ENDIAN |
91 | #else | ||
92 | #ifdef LITTLE_ENDIAN | ||
93 | #define __LITTLE_ENDIAN LITTLE_ENDIAN | ||
94 | #endif | ||
83 | #endif | 95 | #endif |
84 | #endif | 96 | #endif |
85 | 97 | ||
diff --git a/src/util/os_installation.c b/src/util/os_installation.c index ddd40fc00..2362b160d 100644 --- a/src/util/os_installation.c +++ b/src/util/os_installation.c | |||
@@ -494,12 +494,14 @@ GNUNET_OS_check_helper_binary (const char *binary) | |||
494 | GNUNET_free (p); | 494 | GNUNET_free (p); |
495 | return GNUNET_SYSERR; | 495 | return GNUNET_SYSERR; |
496 | } | 496 | } |
497 | #ifndef MINGW | ||
497 | if (0 == getuid ()) | 498 | if (0 == getuid ()) |
498 | { | 499 | { |
499 | /* as we run as root, we don't insist on SUID */ | 500 | /* as we run as root, we don't insist on SUID */ |
500 | GNUNET_free (p); | 501 | GNUNET_free (p); |
501 | return GNUNET_OK; | 502 | return GNUNET_OK; |
502 | } | 503 | } |
504 | #endif | ||
503 | if (0 != STAT (p, &statbuf)) | 505 | if (0 != STAT (p, &statbuf)) |
504 | { | 506 | { |
505 | LOG (GNUNET_ERROR_TYPE_WARNING, _("stat (%s) failed: %s\n"), p, | 507 | LOG (GNUNET_ERROR_TYPE_WARNING, _("stat (%s) failed: %s\n"), p, |