-barato's byte order patch, might even help with #2130
authorChristian Grothoff <christian@grothoff.org>
Wed, 1 Feb 2012 17:11:35 +0000 (17:11 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 1 Feb 2012 17:11:35 +0000 (17:11 +0000)
src/include/gnunet_common.h
src/util/os_installation.c

index 7e6d20b157b9923876f48d0a17a2a0ef7501c10e..35db82a3a0ddc3d1e9a844bf6a0b75489ae4c065 100644 (file)
 
 #define GNUNET_MAX(a,b) (((a) > (b)) ? (a) : (b))
 
-/* some systems use one underscore only... */
+/* some systems use one underscore only, and mingw uses no underscore... */
 #ifndef __BYTE_ORDER
 #ifdef _BYTE_ORDER
 #define __BYTE_ORDER _BYTE_ORDER
+#else
+#ifdef BYTE_ORDER
+#define __BYTE_ORDER BYTE_ORDER
+#endif
 #endif
 #endif
 #ifndef __BIG_ENDIAN
 #ifdef _BIG_ENDIAN
 #define __BIG_ENDIAN _BIG_ENDIAN
+#else
+#ifdef BIG_ENDIAN
+#define __BIG_ENDIAN BIG_ENDIAN
+#endif
 #endif
 #endif
 #ifndef __LITTLE_ENDIAN
 #ifdef _LITTLE_ENDIAN
 #define __LITTLE_ENDIAN _LITTLE_ENDIAN
+#else
+#ifdef LITTLE_ENDIAN
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
+#endif
 #endif
 #endif
 
index ddd40fc00a95ba26282cc35f3629058d3efa7e6d..2362b160daa52a370f5d3a7f005dcae9d6576bb6 100644 (file)
@@ -494,12 +494,14 @@ GNUNET_OS_check_helper_binary (const char *binary)
     GNUNET_free (p);
     return GNUNET_SYSERR;
   }
+#ifndef MINGW
   if (0 == getuid ())
   {
     /* as we run as root, we don't insist on SUID */
     GNUNET_free (p);
     return GNUNET_OK;
   }
+#endif
   if (0 != STAT (p, &statbuf))
   {
     LOG (GNUNET_ERROR_TYPE_WARNING, _("stat (%s) failed: %s\n"), p,