FatalErrnoError(setgroups(size, list)==-1, "setgroups()");
}
+inline static WRAPPER_DECL int
+Edup2(int oldfd, int newfd)
+{
+ register int res = dup2(oldfd, newfd);
+ FatalErrnoError(res==-1, "dup2()");
+
+ return res;
+}
+
+inline static UNUSED void *
+Emalloc(size_t size)
+{
+ register void *res = malloc(size);
+ FatalErrnoError(res==0 && size!=0, "malloc()");
+ return res;
+}
+
+/*@unused@*/
+inline static /*@null@*//*@only@*/ void *
+Erealloc(/*@only@*//*@out@*//*@null@*/ void *ptr,
+ size_t new_size)
+ /*@ensures maxSet(result) == new_size@*/
+ /*@modifies *ptr@*/
+{
+ register void *res = realloc(ptr, new_size);
+ FatalErrnoError(res==0 && new_size!=0, "realloc()");
+
+ return res;
+}
#undef WRAPPER_DECL