Merge commit 'a39d4083cab589d7cd6a13e8a4b8db8875261d75'
[gnulib.git] / tests / test-idpriv-drop.c
index 5dbc8e2..b7edeac 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of dropping uid/gid privileges of the current process permanently.
-   Copyright (C) 2009 Free Software Foundation, Inc.
+   Copyright (C) 2009-2014 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #include <string.h>
 #include <unistd.h>
 
-#define ASSERT(expr) \
-  do                                                                         \
-    {                                                                        \
-      if (!(expr))                                                           \
-        {                                                                    \
-          fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
-          fflush (stderr);                                                   \
-          abort ();                                                          \
-        }                                                                    \
-    }                                                                        \
-  while (0)
+#include "macros.h"
 
 static void
 show_uids ()
@@ -48,7 +38,7 @@ show_uids ()
           (int) real, (int) effective, (int) saved);
 #elif HAVE_GETEUID
   printf ("uids: real=%d effective=%d",
-          (int) getuid (), (int) geteuid());
+          (int) getuid (), (int) geteuid ());
 #elif HAVE_GETUID
   printf ("uids: real=%d",
           (int) getuid ());
@@ -67,7 +57,7 @@ show_gids ()
           (int) real, (int) effective, (int) saved);
 #elif HAVE_GETEGID
   printf ("gids: real=%d effective=%d",
-          (int) getgid (), (int) getegid());
+          (int) getgid (), (int) getegid ());
 #elif HAVE_GETGID
   printf ("gids: real=%d",
           (int) getgid ());