summaryrefslogtreecommitdiff
path: root/mach/mach/mig_support.h
diff options
context:
space:
mode:
Diffstat (limited to 'mach/mach/mig_support.h')
-rw-r--r--mach/mach/mig_support.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/mach/mach/mig_support.h b/mach/mach/mig_support.h
index b83b1d0b5c..fc17062b6a 100644
--- a/mach/mach/mig_support.h
+++ b/mach/mach/mig_support.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 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
@@ -26,19 +26,6 @@
#include <sys/types.h>
#include <string.h>
-#ifndef __USE_GNU
-/* The only problem that has come up so far is __stpncpy being undeclared
- below because <string.h> doesn't declare it without __USE_GNU. We could
- work around that problem by just adding the declaration there, or by
- eliding the inline functions in the absence of __USE_GNU. But either of
- these would result in unoptimized calls (because no inline version of
- __stpncpy will have been defined), and there may be other niggling
- problems lurking. Instead we simply insist on _GNU_SOURCE for
- compiling mig output; anyway, that better reflects the fact that mig
- output requires nonstandard special support code not found elsewhere. */
-# error mig stubs must be compiled with -D_GNU_SOURCE
-#endif
-
/* MiG initialization. */
extern void __mig_init (void *__first);
extern void mig_init (void *__first);
@@ -66,6 +53,8 @@ extern void mig_reply_setup (const mach_msg_header_t *__request,
/* Idiocy support function. */
extern vm_size_t mig_strncpy (char *__dst, const char *__src, vm_size_t __len);
extern vm_size_t __mig_strncpy (char *__dst, const char *__src, vm_size_t);
+
+#if defined __USE_EXTERN_INLINES && defined _LIBC
__extern_inline vm_size_t
__mig_strncpy (char *__dst, const char *__src, vm_size_t __len)
{
@@ -76,6 +65,7 @@ mig_strncpy (char *__dst, const char *__src, vm_size_t __len)
{
return __mig_strncpy (__dst, __src, __len);
}
+#endif