search for: __apple__

Displaying 20 results from an estimated 86 matches for "__apple__".

2012 Feb 28
0
[LLVMdev] [patch] atomic functions on darwin
...---------- Index: cmake/modules/CheckAtomic.cmake =================================================================== --- cmake/modules/CheckAtomic.cmake (revision 151623) +++ cmake/modules/CheckAtomic.cmake (working copy) @@ -6,6 +6,9 @@ #ifdef _MSC_VER #include <windows.h> #endif +#ifdef __APPLE__ +#include <libkern/OSAtomic.h> +#endif int main() { #ifdef _MSC_VER volatile LONG val = 1; @@ -13,6 +16,12 @@ InterlockedCompareExchange(&val, 0, 1); InterlockedIncrement(&val); InterlockedDecrement(&val); +#elif defined(__APPLE__) + int32_t v...
2006 Apr 29
3
[LLVMdev] Building LLVM under Mingw. Part I: tools-only
...ration of CopyFile will look like: void CopyFile(const sys::Path &Dest, const sys::Path &Src) { 2.3 X86 stuff Patch lib/Target/X86/X86SubTarget.cpp & X86JITInfo.cpp in such way: X86SubTarget.cpp: #if defined(__CYGWIN__) || defined(__MINGW32__) TargetType = isCygwin; #elif defined(__APPLE__) TargetType = isDarwin; #elif defined(_WIN32) TargetType = isWindows; #endif X86JITInfo.cpp: #if defined(__CYGWIN__) || defined(__APPLE__) || defined(__MINGW32__) ".globl _X86CompilationCallback\n" "_X86CompilationCallback:\n" #else ... #if defined(__CYGWIN__) ||...
2015 Nov 04
3
[PATCH] launch: add missing headers on Darwin
...CK. --- src/launch-libvirt.c | 1 + src/launch-unix.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c index 1649884..ad07210 100644 --- a/src/launch-libvirt.c +++ b/src/launch-libvirt.c @@ -52,6 +52,7 @@ /* Fixes for Mac OS X */ #if defined __APPLE__ && defined __MACH__ #include <sys/un.h> +#include <sys/fcntl.h> #endif #ifndef SOCK_CLOEXEC # define SOCK_CLOEXEC O_CLOEXEC diff --git a/src/launch-unix.c b/src/launch-unix.c index 5cce9c1..f57910d 100644 --- a/src/launch-unix.c +++ b/src/launch-unix.c @@ -25,6 +25,10 @@ #i...
2013 Jun 25
0
[LLVMdev] [PATCH] Windows implementation of enable_execute_stack
...>> > /* #include "config.h" >> > * FIXME: CMake - include when cmake system is ready. >> > @@ -38,7 +42,7 @@ >> > >> > void __enable_execute_stack(void* addr) >> > { >> > - >> > +#ifndef _WIN32 >> > #if __APPLE__ >> > /* On Darwin, pagesize is always 4096 bytes */ >> > const uintptr_t pageSize = 4096; >> > @@ -54,6 +58,14 @@ >> > unsigned char* endPage = (unsigned >> char*)((p+TRAMPOLINE_SIZE+pageSize) & pageAlignMask); >> > size_t length = endP...
2015 Feb 12
0
Re: [PATCH 1/3] macosx: Includes/defines for byteswap operations
...t be > +/* be32toh is usually a macro defined in <endian.h>, but it might be > * a function in some system so check both, and if neither is defined > * then define be32toh for RHEL 5. > */ > #if !defined(HAVE_BE32TOH) && !defined(be32toh) > + > +#if defined __APPLE__ && defined __MACH__ > +/* Define/include necessary items on MacOS X */ > +#include <machine/endian.h> > +#define __BIG_ENDIAN BIG_ENDIAN > +#define __LITTLE_ENDIAN LITTLE_ENDIAN > +#define __BYTE_ORDER BYTE_ORDER > +#include <libkern/OSByteOrder.h> >...
2015 Feb 12
8
[PATCH 1/3] macosx: Includes/defines for byteswap operations
...nd in <endian.h>, but it might be +/* be32toh is usually a macro defined in <endian.h>, but it might be * a function in some system so check both, and if neither is defined * then define be32toh for RHEL 5. */ #if !defined(HAVE_BE32TOH) && !defined(be32toh) + +#if defined __APPLE__ && defined __MACH__ +/* Define/include necessary items on MacOS X */ +#include <machine/endian.h> +#define __BIG_ENDIAN BIG_ENDIAN +#define __LITTLE_ENDIAN LITTLE_ENDIAN +#define __BYTE_ORDER BYTE_ORDER +#include <libkern/OSByteOrder.h> +#define __bswap_32 OSSwapCon...
2008 Jun 16
0
[LLVMdev] PowerPC instruction cache invalidation
On Mon, 16 Jun 2008, Gary Benson wrote: > When you genetate code on PowerPC you need to explicitly invalidate > the instruction cache to force the processor to reread it. In LLVM > there is code to do this for function stubs on Macintosh, but not > for other platforms and not for JITted code generally. Applied, thanks!
2008 Jun 17
1
[LLVMdev] PowerPC instruction cache invalidation
...Index: lib/Target/PowerPC/PPCCodeEmitter.cpp =================================================================== --- lib/Target/PowerPC/PPCCodeEmitter.cpp (revision 52391) +++ lib/Target/PowerPC/PPCCodeEmitter.cpp (working copy) @@ -80,10 +80,6 @@ return new PPCCodeEmitter(TM, MCE); } -#ifdef __APPLE__ -extern "C" void sys_icache_invalidate(const void *Addr, size_t len); -#endif - bool PPCCodeEmitter::runOnMachineFunction(MachineFunction &MF) { assert((MF.getTarget().getRelocationModel() != Reloc::Default || MF.getTarget().getRelocationModel() != Reloc::Static) &...
2006 Apr 30
0
[LLVMdev] Building LLVM under Mingw. Part I: tools-only
BTW: I've also had to make this change when building tools. (I'm building right now and noticed that it doesn't come up anymore, maybe someone checked it in in the last week or so) On Sat, 29 Apr 2006, Anton Korobeynikov wrote: > Hello, Jeff. > > You wrote Saturday, April 29, 2006, 10:45:02 PM: > > JC> Yes, I know mingw doesn't support dbghelp. I can still rant
2015 Feb 09
5
Re: Patchable build problems on OS X 10.10
...unt", "fusermount", "-u", mountpoint, NULL); > > + execlp ("/sbin/umount", "umount", mountpoint, NULL); > > fusermount is needed on Linux, so this is an example of a patch > which could be written instead as: > > #if !(defined __APPLE__ && defined __MACH__) > execlp ("fusermount", "fusermount", "-u", mountpoint, NULL); > #else > execlp ("/sbin/umount", "umount", mountpoint, NULL); > #endif Or rather use fusermount only on Linux and umount (with...
2006 Apr 29
2
[LLVMdev] Building LLVM under Mingw. Part I: tools-only
Hello, Jeff. You wrote Saturday, April 29, 2006, 10:45:02 PM: JC> Yes, I know mingw doesn't support dbghelp. I can still rant about it :) ;) Well. Maybe this library will be included in some next versions of mingw's win32api package. Anyway, we can make such library just "on-fly" from the corresponding .dll. JC> This is what's already there. What changed? Maybe
2008 Jun 16
6
[LLVMdev] PowerPC instruction cache invalidation
...ry -- http://gbenson.net/ -------------- next part -------------- --- lib/Target/PowerPC/PPCJITInfo.cpp.orig 2008-06-11 07:12:39 +++ lib/Target/PowerPC/PPCJITInfo.cpp 2008-06-16 08:42:25 @@ -336,6 +336,20 @@ #if (defined(__POWERPC__) || defined (__ppc__) || defined(_POWER)) && \ defined(__APPLE__) sys_icache_invalidate(Addr, len); +#elif defined(__GNUC__) + const size_t LineSize = 32; + + const intptr_t Mask = ~(LineSize - 1); + const intptr_t StartLine = ((intptr_t) Addr) & Mask; + const intptr_t EndLine = ((intptr_t) Addr + len + LineSize - 1) & Mask; + + for (intptr_t L...
2015 Feb 09
11
[PATCH 1/5] macosx: Add required third parameter for xdrproc_t callbacks
...--- src/proto.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/proto.c b/src/proto.c index 92ae84d..57f4882 100644 --- a/src/proto.c +++ b/src/proto.c @@ -252,7 +252,12 @@ guestfs___send (guestfs_h *g, int proc_nr, * have no parameters. */ if (xdrp) { +#if !(defined __APPLE__ && defined __MACH__) if (!(*xdrp) (&xdr, args)) { +#else + /* Mac OS X's implementation of xdrproc_t requires a third parameter */ + if (!(*xdrp) (&xdr, args, 0)) { +#endif error (g, _("dispatch failed to marshal args")); return -1; } @@ -...
2017 Jun 06
4
LLD support for mach-o aliases (weak or otherwise)
...ich I’m working on now are going to be completely different… but musl has support for architecture specific overrides in its build system. BTW I now have some quite non-trivial programs compiling against musl-xnu + libcxx + libcxxabi on macos. There are a lot of libcxx changes like this: -#ifdef __APPLE__ +#if defined(__APPLE__) && !defined(_LIBCPP_HAS_MUSL_LIBC) Michael. [1] https://gist.github.com/michaeljclark/0a805652ec4be987a782afb902f06a99 <https://gist.github.com/michaeljclark/0a805652ec4be987a782afb902f06a99> -------------- next part -------------- An HTML attachment was scru...
2004 Sep 10
3
Altivec, automake
I think I've gotten FLAC__lpc_restore_signal() about as good as I'm going to get it. Here's what I have: -a new file, lpc_asm.s, which has the assembly routines -changes to cpu.h, cpu.c, and stream_decoder.c to enable them -changes to configure.in to support the new cpu stuff -a preliminary Makefile.am -maybe something else I'm forgetting Now automake complains that configure.in
2012 Nov 16
2
[LLVMdev] mmap and vm_protect on ARM+Apple systems
...y manager implementation for MCJIT and I want to replace calls to Memory::AllocateRWX with calls to Memory::allocateMappedMemory, possibly still with the RWX flags. However, looking at the Memory::AllocateRWX implementation I see that it's jumping through some hoops in the case where both '__APPLE__' and '__arm__' are defined. I want to handle two cases: 1) Allocate memory as RWX, copy JITed code into it and execute it without ever touching the permissions again. 2) Allocate memory as RW, copy JITed code into it and then set the permissions to RX before executing. Th...
2004 Sep 10
2
Altivec, automake
...rc/libFLAC/cpu.c,v retrieving revision 1.14 diff -c -r1.14 cpu.c *** cpu.c 31 Jan 2003 23:34:57 -0000 1.14 --- cpu.c 25 Jul 2004 23:16:52 -0000 *************** *** 37,42 **** --- 37,50 ---- #include <config.h> #endif + #if defined FLAC__CPU_PPC + #if !defined FLAC__NO_ASM + #if defined __APPLE__ && defined __MACH__ + #include <sys/sysctl.h> + #endif /* __APPLE__ && __MACH__ */ + #endif /* FLAC__NO_ASM */ + #endif /* FLAC__CPU_PPC */ + const unsigned FLAC__CPUINFO_IA32_CPUID_CMOV = 0x00008000; const unsigned FLAC__CPUINFO_IA32_CPUID_MMX = 0x00800000; const unsig...
2015 Nov 04
0
Re: [PATCH] launch: add missing headers on Darwin
...ch-unix.c | 4 ++++ > 2 files changed, 5 insertions(+) > > diff --git a/src/launch-libvirt.c b/src/launch-libvirt.c > index 1649884..ad07210 100644 > --- a/src/launch-libvirt.c > +++ b/src/launch-libvirt.c > @@ -52,6 +52,7 @@ > /* Fixes for Mac OS X */ > #if defined __APPLE__ && defined __MACH__ > #include <sys/un.h> > +#include <sys/fcntl.h> > #endif > #ifndef SOCK_CLOEXEC > # define SOCK_CLOEXEC O_CLOEXEC > diff --git a/src/launch-unix.c b/src/launch-unix.c > index 5cce9c1..f57910d 100644 > --- a/src/launch-unix.c > +...
2015 Feb 09
0
Re: [PATCH 1/5] macosx: Add required third parameter for xdrproc_t callbacks
...10 insertions(+) > > diff --git a/src/proto.c b/src/proto.c > index 92ae84d..57f4882 100644 > --- a/src/proto.c > +++ b/src/proto.c > @@ -252,7 +252,12 @@ guestfs___send (guestfs_h *g, int proc_nr, > * have no parameters. > */ > if (xdrp) { > +#if !(defined __APPLE__ && defined __MACH__) > if (!(*xdrp) (&xdr, args)) { > +#else > + /* Mac OS X's implementation of xdrproc_t requires a third parameter */ > + if (!(*xdrp) (&xdr, args, 0)) { > +#endif > error (g, _("dispatch failed to marshal args"));...
2015 Feb 11
2
Re: [PATCH 2/5] macosx: Add definition of program_name for gnulib
On Wed, Feb 11, 2015 at 09:52:59PM +0000, Margaret Lewicka wrote: > On 11 February 2015 at 19:23, Richard W.M. Jones <rjones@redhat.com> wrote: > > On Wed, Feb 11, 2015 at 07:20:33PM +0000, Margaret Lewicka wrote: > [...] > >> Proposing a patch to gnulib, even should they accept it, does not fix > >> the underlying issue, which is, essentially, that gnulib