/*
- * Copyright (C) 2011-2012 Free Software Foundation, Inc.
+ * Copyright (C) 2011-2013 Free Software Foundation, Inc.
* Written by Ben Walton.
*
* This program is free software: you can redistribute it and/or modify
#include <errno.h>
#include <stdio.h>
+#include "root-uid.h"
+
#include "macros.h"
#define TESTHOSTNAME "gnulib-hostname"
On Cygwin, geteuid() may return non-zero even for user accounts with
administrator privileges, so use a dummy value as well. */
#if !HAVE_GETEUID || defined __CYGWIN__
-# define geteuid() 0
+# define geteuid() ROOT_UID
#endif
int
consider things like CAP_SYS_ADMIN (linux) or PRIV_SYS_ADMIN
(solaris), etc. systems without a working geteuid (mingw, MSVC
9) will always skip this test. */
- if (geteuid () != 0)
+ if (geteuid () != ROOT_UID)
{
fprintf (stderr, "Skipping test: insufficient permissions.\n");
return 77;