small signed/unsigned fixes for pedantic warning setups
[util-vserver.git] / util-vserver / lib / vserver.h
index e476f4d..ebad12c 100644 (file)
 #include <stdlib.h>
 #include <sys/types.h>
 
-#define VC_NOCTX       ((ctx_t)(-1))
+#ifndef VC_NOCTX
+#  define VC_NOCTX     ((ctx_t)(-1))
+#endif
+
+#ifndef S_CTX_INFO_LOCK
+#  define S_CTX_INFO_LOCK      1
+#endif
+
+#ifndef S_CTX_INFO_SCHED
+#  define S_CTX_INFO_SCHED     2
+#endif
+
+#ifndef S_CTX_INFO_NPROC
+#  define S_CTX_INFO_NPROC     4
+#endif
+
+#ifndef S_CTX_INFO_PRIVATE
+#  define S_CTX_INFO_PRIVATE   8
+#endif
+
+#ifndef S_CTX_INFO_INIT
+#  define S_CTX_INFO_INIT      16
+#endif
+
+#ifndef S_CTX_INFO_HIDEINFO
+#  define S_CTX_INFO_HIDEINFO  32
+#endif
+
+#ifndef S_CTX_INFO_ULIMIT
+#  define S_CTX_INFO_ULIMIT    64
+#endif
+
 
 #ifdef __cplusplus
 extern "C" {
@@ -56,7 +87,7 @@ extern "C" {
   ctx_t        vc_X_getctx(pid_t pid);
 
     /** Returns the context of the current process. */
-#define vc_X_getcctx           (getctx(getpid()))
+#define vc_X_getcctx()         (vc_X_getctx(getpid()))
     
 #ifdef __cplusplus
 }