]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - hurd/hurd.h
Prefer https to http for gnu.org and fsf.org URLs
[thirdparty/glibc.git] / hurd / hurd.h
index 6ba73b25fd179ab25f8fff814036253eb767acf1..ff7700a6c7d1991405bec0dcb47e688084f889c2 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993,94,95,96,97,98,99,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -12,9 +12,8 @@
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
 
 #ifndef        _HURD_H
 
 #include <hurd/port.h>
 
 #include <errno.h>
+#include <bits/types/error_t.h>
+#include <bits/types/sigset_t.h>
 
 #ifndef _HURD_H_EXTERN_INLINE
-#define _HURD_H_EXTERN_INLINE extern __inline
+#define _HURD_H_EXTERN_INLINE __extern_inline
 #endif
 
+extern int __hurd_fail (error_t err);
+
+#ifdef __USE_EXTERN_INLINES
 _HURD_H_EXTERN_INLINE int
 __hurd_fail (error_t err)
 {
@@ -55,24 +59,28 @@ __hurd_fail (error_t err)
     case EMACH_SEND_INVALID_DEST:
     case EMIG_SERVER_DIED:
       /* The server has disappeared!  */
-      err = EIEIO;
+      err = (error_t) EIEIO;
       break;
 
     case KERN_NO_SPACE:
-      err = ENOMEM;
+      err = (error_t) ENOMEM;
       break;
+
     case KERN_INVALID_ARGUMENT:
-      err = EINVAL;
+      err = (error_t) EINVAL;
       break;
 
     case 0:
       return 0;
+
     default:
+      break;
     }
 
   errno = err;
   return -1;
 }
+#endif
 \f
 /* Basic ports and info, initialized by startup.  */
 
@@ -139,8 +147,7 @@ extern struct mutex _hurd_brk_lock;
 
 extern int _hurd_set_brk (vm_address_t newbrk);
 \f
-#define __need_FILE
-#include <stdio.h>
+#include <bits/types/FILE.h>
 
 /* Calls to get and set basic ports.  */
 
@@ -239,12 +246,21 @@ extern FILE *fopenport (io_t port, const char *mode);
 extern FILE *__fopenport (io_t port, const char *mode);
 
 
-/* Execute a file, replacing TASK's current program image.  */
+/* Deprecated: use _hurd_exec_paths instead.  */
 
 extern error_t _hurd_exec (task_t task,
                           file_t file,
                           char *const argv[],
-                          char *const envp[]);
+                          char *const envp[]) __attribute_deprecated__;
+
+/* Execute a file, replacing TASK's current program image.  */
+
+extern error_t _hurd_exec_paths (task_t task,
+                                file_t file,
+                                const char *path,
+                                const char *abspath,
+                                char *const argv[],
+                                char *const envp[]);
 
 
 /* Inform the proc server we have exited with STATUS, and kill the
@@ -296,9 +312,9 @@ extern error_t hurd_sig_post (pid_t pid, int sig, mach_port_t refport);
    other than the proc server (such as a bootstrap filesystem) can set
    these variables to install the ports.  */
 
-extern kern_return_t __get_privileged_ports (host_priv_t *host_priv_ptr,
+extern kern_return_t __get_privileged_ports (mach_port_t *host_priv_ptr,
                                             device_t *device_master_ptr);
-extern kern_return_t get_privileged_ports (host_priv_t *host_priv_ptr,
+extern kern_return_t get_privileged_ports (mach_port_t *host_priv_ptr,
                                           device_t *device_master_ptr);
 extern mach_port_t _hurd_host_priv, _hurd_device_master;