]> granicus.if.org Git - fcron/commitdiff
better support of HP-UX : if seteuid() does not exist, use setresuid() instead
authorthib <thib>
Sat, 12 Mar 2005 12:39:46 +0000 (12:39 +0000)
committerthib <thib>
Sat, 12 Mar 2005 12:39:46 +0000 (12:39 +0000)
global.h

index 9f0393ee76493bb31a6036a6f15da1ca9340656a..a2703e7de631a51d8fe300dc10ffc36989fb1325 100644 (file)
--- a/global.h
+++ b/global.h
@@ -21,7 +21,7 @@
  *  `LICENSE' that comes with the fcron source distribution.
  */
 
- /* $Id: global.h,v 1.43 2004-11-13 19:42:57 thib Exp $ */
+ /* $Id: global.h,v 1.44 2005-03-12 12:39:46 thib Exp $ */
 
 
 /* 
 #define STD 0
 
 /* macros */
+#ifndef HAVE_SETEUID
+#define seteuid(arg) setresuid(-1,(arg),-1)
+#endif
+
+#ifndef HAVE_SETEGID
+#define setegid(arg) setresgid(-1,(arg),-1)
+#endif
+
 #define Alloc(PTR, TYPE) \
         if( (PTR = calloc(1, sizeof(TYPE))) == NULL ) \
             die_e("Could not calloc.");