# @(#)Makefile.inc 8.3 (Berkeley) 10/24/94
# $FreeBSD: src/lsys/Makefile.inc,v 1.91 2001/09/21 21:35:22 rwatson Exp $
-# sys sources
-.PATH: ${.CURDIR}/${MACHINE_ARCH}/sys ${.CURDIR}/sys
-
-# Include the generated makefile containing the *complete* list
-# of syscall names in MIASM.
-#.include "${.CURDIR}/../../sys/sys/syscall.mk"
-
# Include machine dependent definitions.
#
# MDASM names override the default syscall names in MIASM.
.include "${.CURDIR}/${MACHINE_ARCH}/sys/Makefile.inc"
.endif
+# sys sources
+.PATH: ${.CURDIR}/sys
+
+# Include the generated makefile containing the *complete* list
+# of syscall names in MIASM.
+#.include "${.CURDIR}/../../sys/sys/syscall.mk"
+
# Sources common to both syscall interfaces:
-SRCS+= errno.c gettimeofday.c sigcatch.c sigsuspend.c getdtablesize.c \
- sigaction.c sigtramp.c crt_externs.c
+# 3375657: patches for sem_open() sem_unlink() shm_open() shm_unlink()
+MISRCS+= errno.c gettimeofday.c sigcatch.c sigsuspend.c \
+ sigaction.c sigtramp.c crt_externs.c \
+ sem_open.c sem_unlink.c shm_open.c shm_unlink.c fix-3375657.c \
+ accessx_np.c chmodx_np.c getsgroups_np.c \
+ getwgroups_np.c openx_np.c mmap.c \
+ pthread_getuid_np.c pthread_setuid_np.c setsgroups_np.c \
+ setwgroups_np.c statx_np.c umaskx_np.c \
+ semctl.c shmctl.c msgctl.c \
+ mprotect.c msync.c munmap.c other_libc_init.c
+
+.for _src in sem_open.c sem_unlink.c shm_open.c shm_unlink.c fix-3375657.c
+CFLAGS-${_src} += -D__APPLE_PR3375657_HACK__
+.endfor
+
+.include "Makefile.obsd_begin"
+OBSDMISRCS= stack_protector.c
+.include "Makefile.obsd_end"
+
+UNIX03SRCS += mmap.c mprotect.c msgctl.c msync.c munmap.c semctl.c shmctl.c
# Add machine dependent asm sources:
SRCS+=${MDASM}
sem_unlink.2 sem_wait.2 shm_open.2 shm_unlink.2 \
sigwait.2 getdtablesize.2 setreuid.2 setregid.2 \
nanosleep.2
+MAN3+= atomic.3 barrier.3 spinlock.3
+MLINKS+= atomic.3 OSAtomicAdd32.3
+MLINKS+= atomic.3 OSAtomicIncrement32.3
+MLINKS+= atomic.3 OSAtomicDecrement32.3
+MLINKS+= atomic.3 OSAtomicOr32.3
+MLINKS+= atomic.3 OSAtomicAnd32.3
+MLINKS+= atomic.3 OSAtomicXor32.3
+MLINKS+= atomic.3 OSAtomicAdd64.3
+MLINKS+= atomic.3 OSAtomicIncrement64.3
+MLINKS+= atomic.3 OSAtomicDecrement64.3
+MLINKS+= atomic.3 OSAtomicCompareAndSwap32.3
+MLINKS+= atomic.3 OSAtomicCompareAndSwap64.3
+MLINKS+= atomic.3 OSAtomicTestAndSet.3
+MLINKS+= atomic.3 OSAtomicTestAndClear.3
+MLINKS+= barrier.3 OSMemoryBarrier.3
+MLINKS+= spinlock.3 OSSpinLockTry.3
+MLINKS+= spinlock.3 OSSpinLockLock.3
+MLINKS+= spinlock.3 OSSpinLockUnlock.3
+
#MAN+= _exit.2 accept.2 access.2 acct.2 adjtime.2 \
# aio_cancel.2 aio_error.2 aio_read.2 aio_return.2 \
# aio_suspend.2 aio_waitcomplete.2 aio_write.2 \