mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-23 05:20:06 +00:00
3a2832a07f
* sysdeps/mach/hurd/setpriority.c [POLICY_TIMESHARE_BASE_COUNT]: Use task_policy in place of task_priority. * sysdeps/generic/bits/mman.h (MS_ASYNC, MS_SYNC, MS_INVALIDATE): New macros. * sysdeps/mach/msync.c: New file. * sysdeps/mach/powerpc/syscall.S: New file. * mach/msg.c [MACH_MSG_OVERWRITE] (__mach_msg_trap, __mach_msg_overwrite): New functions. * mach/Versions (libc: GLIBC_2.0): Add mach_msg_overwrite and __ name. * sysdeps/mach/configure.in: Check for clock.defs to put into mach_interface_list. * sysdeps/mach/configure: Regenerated. * mach/Makefile (mach-machine): New variable, set from $(base-machine). ($(objpfx)mach-syscalls.mk): Use it in place of $(base-machine). ($(mach-syscalls:%=$(objpfx)%.S) static pattern rule): Use <mach/machine/syscall_sw.h> instead of <sysdep.h>. (mach-shortcuts): Add device_read_overwrite_request, device_read_overwrite, vm_read_overwrite, thread_switch. * configure.in (base_machine): Set to $machine by default. * configure: Regenerated.
76 lines
2.6 KiB
Plaintext
76 lines
2.6 KiB
Plaintext
sinclude(./aclocal.m4)dnl Autoconf lossage.
|
|
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
|
|
|
|
### Sanity checks for Mach header installation
|
|
AC_CHECK_HEADER(mach/mach_types.h,, [AC_MSG_ERROR([cannot find Mach headers])])
|
|
AC_CHECK_HEADER(mach/mach_types.defs,, [dnl
|
|
AC_MSG_ERROR([cannot find Mach .defs files])])
|
|
|
|
dnl
|
|
dnl mach_TYPE_CHECK(foo_t, bar_t)
|
|
dnl
|
|
dnl Check if foo_t is defined by <mach/mach_types.h>.
|
|
dnl If not, compile with -Dfoo_t=bar_t.
|
|
dnl
|
|
AC_DEFUN([mach_TYPE_CHECK], [dnl
|
|
AC_CACHE_CHECK(for $1 in mach/mach_types.h, libc_cv_mach_$1,
|
|
AC_TRY_COMPILE([#include <mach/mach_types.h>], [extern $1 foo;],
|
|
libc_cv_mach_$1=$1, libc_cv_mach_$1=$2))
|
|
if test [$]libc_cv_mach_$1 != $1; then
|
|
DEFINES="$DEFINES -D$1=$2"
|
|
fi])
|
|
|
|
dnl
|
|
dnl OSF Mach has renamed these typedefs for some reason.
|
|
dnl
|
|
mach_TYPE_CHECK(task_t, task_port_t)
|
|
mach_TYPE_CHECK(thread_t, thread_port_t)
|
|
|
|
dnl
|
|
dnl The creation_time field is a GNU Mach addition the other variants lack.
|
|
dnl
|
|
AC_CACHE_CHECK(for creation_time in task_basic_info,
|
|
libc_cv_mach_task_creation_time, [dnl
|
|
AC_TRY_COMPILE([#include <mach/task_info.h>], [
|
|
extern struct task_basic_info *i;
|
|
long s = i->creation_time.seconds;
|
|
], libc_cv_mach_task_creation_time=yes, libc_cv_mach_task_creation_time=no)])
|
|
if test $libc_cv_mach_task_creation_time = no; then
|
|
DEFINES="$DEFINES -DNO_CREATION_TIME=1"
|
|
fi
|
|
|
|
dnl
|
|
dnl The Darwin variant no longer has <mach/mach.defs>
|
|
dnl but instead has several constituent .defs files.
|
|
dnl In this scenario we will presume there is a <mach/mach_interface.h>
|
|
dnl that contains an #include for each constituent header file,
|
|
dnl but we don't do a check for that here because in a bare
|
|
dnl environment the compile against those headers will fail.
|
|
dnl
|
|
mach_interface_list=
|
|
for ifc in mach mach4 \
|
|
clock clock_priv host_priv host_security ledger lock_set \
|
|
processor processor_set task thread_act vm_map \
|
|
memory_object memory_object_default default_pager \
|
|
; do
|
|
AC_CHECK_HEADER(mach/${ifc}.defs, [dnl
|
|
mach_interface_list="$mach_interface_list $ifc"])
|
|
done
|
|
if test "x$mach_interface_list" = x; then
|
|
AC_MSG_ERROR([what manner of Mach is this?])
|
|
fi
|
|
|
|
AC_CACHE_CHECK(for host_page_size in mach_host.defs,
|
|
libc_cv_mach_host_page_size, [dnl
|
|
AC_EGREP_HEADER(host_page_size, mach/mach_host.defs,
|
|
libc_cv_mach_host_page_size=yes,
|
|
libc_cv_mach_host_page_size=no)])
|
|
if test $libc_cv_mach_host_page_size = yes; then
|
|
AC_DEFINE([HAVE_HOST_PAGE_SIZE])
|
|
fi
|
|
|
|
AC_CHECK_HEADER(mach/machine/ndr_def.h, [dnl
|
|
DEFINES="$DEFINES -DNDR_DEF_HEADER='<mach/machine/ndr_def.h>'"], [dnl
|
|
AC_CHECK_HEADER(machine/ndr_def.h, [dnl
|
|
DEFINES="$DEFINES -DNDR_DEF_HEADER='<machine/ndr_def.h>'"])])
|