]> Savannah Git Hosting - gnulib.git/commitdiff
sys_resource: Add support for OpenVMS.
authorJohn E. Malmberg <wb8tyw@gmail.com>
Sat, 15 Jul 2017 15:30:13 +0000 (17:30 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 15 Jul 2017 15:30:13 +0000 (17:30 +0200)
* lib/resource.in.h [__VMS]: Define RUSAGE_SELF, RUSAGE_CHILDREN.
* doc/posix-headers/sys_resource.texi: Mention OpenVMS issues.

ChangeLog
doc/posix-headers/sys_resource.texi
lib/sys_resource.in.h

index 2634b3a6d842a174f2ebda8b5bdd3e24eaaf2a2b..0ae7337cac53213bb746d8341ea28e7f53a7a59c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-07-15  John E. Malmberg  <wb8tyw@gmail.com>
+
+       sys_resource: Add support for OpenVMS.
+       * lib/resource.in.h [__VMS]: Define RUSAGE_SELF, RUSAGE_CHILDREN.
+       * doc/posix-headers/sys_resource.texi: Mention OpenVMS issues.
+
 2017-07-15  John E. Malmberg  <wb8tyw@gmail.com>
             Bruno Haible  <bruno@clisp.org>
 
index 489a6625a52f334fa8b173fe1f8d82e36e08a9de..e70223b4bb70b5d9e46db25b0b0e7b144b8c7ff5 100644 (file)
@@ -14,12 +14,16 @@ mingw, MSVC 14.
 On some platforms, this header file requires that <sys/types.h> and
 <sys/time.h> already be included:
 FreeBSD 5.0.
+@item
+On some platforms, this header file does not define the @code{RUSAGE_SELF} and
+@code{RUSAGE_CHILDREN} constants:
+OpenVMS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @item
 On some platforms, this header does not define some or all of the
-symbolic constants required by POSIX@.  For example, Android does not
-define @code{RLIM_SAVED_CUR} or @code{RLIM_SAVED_MAX}.
+symbolic constants required by POSIX@.  For example, OpenVMS and Android do
+not define @code{RLIM_SAVED_CUR} or @code{RLIM_SAVED_MAX}.
 @end itemize
index 7fcc69f78a2736c003ef555d460e9f847d077e4d..ac747f47a231afc7bcbae3852ce4081d27a35743 100644 (file)
@@ -79,6 +79,18 @@ struct rusage
 }
 # endif
 
+#else
+
+# ifdef __VMS                      /* OpenVMS */
+/* Define the RUSAGE_* constants.  */
+#  ifndef RUSAGE_SELF
+#   define RUSAGE_SELF 0
+#  endif
+#  ifndef RUSAGE_CHILDREN
+#   define RUSAGE_CHILDREN -1
+#  endif
+# endif
+
 #endif
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */