···11+// Modified by Lubos Dolezel for Darling
12/*
23 * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
34 *
···244245#define F_GETLK 7 /* get record locking information */
245246#define F_SETLK 8 /* set record locking information */
246247#define F_SETLKW 9 /* F_SETLK; wait if blocked */
248248+#define F_SETLKWTIMEOUT 10
247249#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
248250#define F_FLUSH_DATA 40
249251#define F_CHKCLEAN 41 /* Used for regression test */
···297299#define F_SETBACKINGSTORE 70 /* Mark the file as being the backing store for another filesystem */
298300#define F_GETPATH_MTMINFO 71 /* return the full path of the FD, but error in specific mtmd circumstances */
299301302302+#define F_GETCODEDIR 72
300303/* 72 is free. It used to be F_GETENCRYPTEDDATA, which is now removed. */
301304302305#define F_SETNOSIGPIPE 73 /* No SIGPIPE generated on EPIPE */
···309312310313#define F_GETPROTECTIONLEVEL 77 /* Get the protection version number for this filesystem */
311314315315+#define F_FINDSIGS 78
312316313317// FS-specific fcntl()'s numbers begin at 0x00010000 and go up
314318#define FCNTL_FS_SPECIFIC_BASE 0x00010000
···11+// Modified by Lubos Dolezel for Darling
12/*
23 * Copyright (c) 1999-2007 Apple Inc. All rights reserved.
34 *
···2829/* Copyright 1998 Apple Computer, Inc. */
29303031#include "SYS.h"
3232+3333+#ifdef DARLING
3434+# define ___gettimeofday __gettimeofday
3535+#endif
31363237#if defined(__i386__)
3338
+5
kernel/libsyscall/custom/__lseek.s
···11+// Modified by Lubos Dolezel for Darling
12/*
23 * Copyright (c) 1999-2007 Apple Inc. All rights reserved.
34 *
···2728 */
28292930#include "SYS.h"
3131+3232+#ifdef DARLING
3333+# define ___lseek __lseek
3434+#endif
30353136#if defined(__x86_64__)
3237
+5
kernel/libsyscall/custom/__pipe.s
···11+// Modified by Lubos Dolezel for Darling
12/*
23 * Copyright (c) 1999-2007 Apple Inc. All rights reserved.
34 *
···2829/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. */
29303031#include "SYS.h"
3232+3333+#ifdef DARLING
3434+# define ___pipe __pipe
3535+#endif
31363237#if defined(__i386__)
3338
+6
kernel/libsyscall/custom/__ptrace.s
···11+// Modified by Lubos Dolezel for Darling
12/*
23 * Copyright (c) 1999-2007 Apple Inc. All rights reserved.
34 *
···2829/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. */
29303031#include "SYS.h"
3232+3333+#ifdef DARLING
3434+# define ___ptrace __ptrace
3535+# define _errno errno
3636+#endif
31373238#if defined(__i386__)
3339
+5
kernel/libsyscall/custom/__sigaltstack.s
···11+// Modified by Lubos Dolezel for Darling
12/*
23 * Copyright (c) 1999-2007 Apple Inc. All rights reserved.
34 *
···2728 */
28292930#include "SYS.h"
3131+3232+#ifdef DARLING
3333+# define ___sigaltstack __sigaltstack
3434+#endif
30353136#if defined(__x86_64__)
3237
+5
kernel/libsyscall/custom/__sigreturn.s
···11+// Modified by Lubos Dolezel for Darling
12/*
23 * Copyright (c) 1999-2007 Apple Inc. All rights reserved.
34 *
···2728 */
28292930#include "SYS.h"
3131+3232+#ifdef DARLING
3333+# define ___sigreturn __sigreturn
3434+#endif
30353136#if defined(__x86_64__)
3237
+5
kernel/libsyscall/custom/__syscall.s
···11+// Modified by Lubos Dolezel for Darling
12/*
23 * Copyright (c) 1999-2007 Apple Inc. All rights reserved.
34 *
···2829/* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved. */
29303031#include "SYS.h"
3232+3333+#ifdef DARLING
3434+# define ___syscall __syscall
3535+#endif
31363237#if defined(__i386__)
3338
+5
kernel/libsyscall/custom/__thread_selfid.s
···11+// Modified by Lubos Dolezel for Darling
12/*
23 * Copyright (c) 1999-2007 Apple Inc. All rights reserved.
34 *
···2728 */
28292930#include "SYS.h"
3131+3232+#ifdef DARLING
3333+# define ___thread_selfid __thread_selfid
3434+#endif
30353136#if defined(__x86_64__)
3237
+5
kernel/libsyscall/custom/__thread_selfusage.s
···11+// Modified by Lubos Dolezel for Darling
12/*
23 * Copyright (c) 2014 Apple Inc. All rights reserved.
34 *
···2728 */
28292930#include "SYS.h"
3131+3232+#ifdef DARLING
3333+# define ___thread_selfusage __thread_selfusage
3434+#endif
30353136#if defined(__x86_64__)
3237
+6
kernel/libsyscall/custom/__vfork.s
···11+// Modified by Lubos Dolezel for Darling
12/*
23 * Copyright (c) 1999-2007 Apple Inc. All rights reserved.
34 *
···3637 */
37383839#include "SYS.h"
4040+4141+#ifdef DARLING
4242+#define ___vfork __vfork
4343+#define _cerror cerror
4444+#endif
39454046#if defined(__i386__)
4147
···11+// Modified by Lubos Dolezel for Darling
12/*
23 * Copyright (c) 1999-2007 Apple Inc. All rights reserved.
34 *
···2829/* Copyright 1998 Apple Computer, Inc. */
29303031#include "SYS.h"
3232+3333+#ifdef DARLING
3434+# define ___gettimeofday __gettimeofday
3535+#endif
31363237#if defined(__i386__)
3338
···11+// Modified by Lubos Dolezel for Darling
12/*
23 * Copyright (c) 1999, 2006-2008 Apple Inc. All rights reserved.
34 *
···212213 // that will be called after an error message appears. It does not make
213214 // sense for developers to call this function, so it is marked
214215 // __private_extern__ to prevent it from becoming API.
216216+#ifndef DARLING
215217 MAGMALLOC_MALLOCERRORBREAK(); // DTrace USDT probe
218218+#endif
216219}
217220218221__private_extern__ boolean_t __stack_logging_locked();
···11+// Modified by Lubos Dolezel for Darling
12/*
23 * Copyright (c) 2000-2008 Apple Inc. All rights reserved.
34 *
···7879#ifdef VARIANT_CANCELABLE
7980extern int __semwait_signal(int cond_sem, int mutex_sem, int timeout, int relative, __int64_t tv_sec, __int32_t tv_nsec);
8081#else
8181-extern int __semwait_signal(int cond_sem, int mutex_sem, int timeout, int relative, __int64_t tv_sec, __int32_t tv_nsec) __asm__("___semwait_signal_nocancel");
8282+extern int __semwait_signal(int cond_sem, int mutex_sem, int timeout, int relative, __int64_t tv_sec, __int32_t tv_nsec) __asm__("__semwait_signal_nocancel");
8283#endif
83848485/*
···8484 sys/setjmp.S
8585 sys/_sigtramp.S
8686 sys/spinlocks_asm.S
8787- sys/spinlocks.c
8787+ #sys/spinlocks.c # aliases in other complation units don't work, work done in spinlocks_asm.S
8888)
89899090