Displaying 20 results from an estimated 31 matches for "__mach__".
2015 Nov 04
3
[PATCH] launch: add missing headers on Darwin
...| 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 @@
#include <string.h>
#in...
2015 Feb 09
5
Re: Patchable build problems on OS X 10.10
...uot;, "-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 no path)
elsewhere.
> &g...
2015 Feb 12
0
Re: [PATCH 1/3] macosx: Includes/defines for byteswap operations
...lly 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 OS...
2015 Feb 12
8
[PATCH 1/3] macosx: Includes/defines for byteswap operations
...t 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 OSSwapConstInt32
+#endif /* __APPLE__...
2015 Feb 09
11
[PATCH 1/5] macosx: Add required third parameter for xdrproc_t callbacks
...+++
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;
}
@@ -681,7 +686,12 @@ guestfs___r...
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
2004 Sep 10
2
Altivec, automake
...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 unsigned FLAC__CPUINFO_IA32_CPUID...
2015 Nov 04
0
Re: [PATCH] launch: add missing headers on Darwin
...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
>...
2015 Feb 09
0
Re: [PATCH 1/5] macosx: Add required third parameter for xdrproc_t callbacks
...iff --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;
>...
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
2015 Feb 05
4
Patchable build problems on OS X 10.10
Hello,
I'm attempting to create a Homebrew formula to get libguestfs to
compile on Mac OS X. I've managed to achieve success with several
monkey patches, but since Homebrew's policy is to contact maintainers
about proper fixes in upstream, I would like to ask if there are any
plans to fix these issues. I'm afraid I don't know C well enough to
propose decent solutions myself.
2007 Jan 12
2
[LLVMdev] Inserting an assembly instruction in the calling sequence of the powerpc target
..., LowerCALL).
I need some help on how to insert the creqv instruction in the calling
sequence.
After this is implemented, I will be able to send a patch for linux/ppc
support.
I also need to know what is your preference for a linux/ppc target
implementation? I can either
1) Use macros (#ifdef __MACH__ for darwin or #ifdef __PPC__ for linux)
2) Test the target in the code when needed
if (os == linux && ppc32) then...
else if (os == linux && ppc64) then ...
else if (os == darwin && ppc32) then ...
else if (os == darwin && ppc64) then ...
3) Create a new...
2015 Feb 06
0
Re: Patchable build problems on OS X 10.10
...ount", "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
> @@ -334,7 +334,14 @@ do_fuser (const char *mountpoint)
> }
>
> if (pid == 0) {...
2015 Feb 09
0
Re: Patchable build problems on OS X 10.10
...Mon, Feb 09, 2015 at 10:56:54AM +0100, Pino Toscano wrote:
> On Friday 06 February 2015 10:03:37 Richard W.M. Jones wrote:
> > On Thu, Feb 05, 2015 at 10:53:06PM +0000, Margaret Lewicka wrote:
> > > +/* Fixes for Mac OS X */
> > > +#if defined __APPLE__ && defined __MACH__
> > > +#include <sys/un.h>
> > > +#endif
> > > +#ifndef SOCK_CLOEXEC
> > > +# define SOCK_CLOEXEC O_CLOEXEC
> > > +#endif
> > > +#ifndef SOCK_NONBLOCK
> > > +# define SOCK_NONBLOCK O_NONBLOCK
> > > +#endif
> > >...
2015 Feb 09
0
Re: Patchable build problems on OS X 10.10
On 9 February 2015 at 09:56, Pino Toscano <ptoscano@redhat.com> wrote:
> On Friday 06 February 2015 10:03:37 Richard W.M. Jones wrote:
[...]
>> #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 no...
2015 Feb 12
0
[PATCH] gnulib: Define argv[0] as program_name for error.c on Darwin
---
lib/error.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/error.c b/lib/error.c
index 6683197..36a3db7 100644
--- a/lib/error.c
+++ b/lib/error.c
@@ -113,9 +113,13 @@ int strerror_r ();
# endif
# endif
+#if defined __APPLE__ && defined __MACH__
+#define program_name (((char **)*_NSGetArgv())[0])
+#else
/* The calling program should define program_name and set it to the
name of the executing program. */
extern char *program_name;
+#endif
# if HAVE_STRERROR_R || defined strerror_r
# define __strerror_r strerror_r
--
1.9.3
2015 Feb 12
2
Re: [PATCH] gnulib: Define argv[0] as program_name for error.c on Darwin
...++
> 1 file changed, 4 insertions(+)
>
> diff --git a/lib/error.c b/lib/error.c
> index 6683197..36a3db7 100644
> --- a/lib/error.c
> +++ b/lib/error.c
> @@ -113,9 +113,13 @@ int strerror_r ();
> # endif
> # endif
>
> +#if defined __APPLE__ && defined __MACH__
> +#define program_name (((char **)*_NSGetArgv())[0])
> +#else
> /* The calling program should define program_name and set it to the
> name of the executing program. */
> extern char *program_name;
> +#endif
>
> # if HAVE_STRERROR_R || defined strerror_r
> # d...
2007 Jan 14
0
[LLVMdev] Inserting an assembly instruction in the calling sequence of the powerpc target
...o creq reg,reg,reg
> After this is implemented, I will be able to send a patch for linux/ppc
> support.
Nice. This will also resolve http://llvm.org/PR1064
> I also need to know what is your preference for a linux/ppc target
> implementation? I can either
> 1) Use macros (#ifdef __MACH__ for darwin or #ifdef __PPC__ for linux)
This won't work for cross compiles.
> 2) Test the target in the code when needed
> if (os == linux && ppc32) then...
> else if (os == linux && ppc64) then ...
> else if (os == darwin && ppc32) then ...
> el...
2006 Jul 17
2
patch for compilation under MACOSX
...inclusion of malloc.h
under MACOSX. (I'm using osx version 10.4 - Tiger)
--- libspeex/kiss_fft.h 26 Jun 2006 02:22:34 -0000 1.1.1.1
+++ libspeex/kiss_fft.h 17 Jul 2006 15:15:53 -0000
@@ -5,7 +5,9 @@
#include <stdio.h>
#include <math.h>
#include <memory.h>
+#ifndef __MACH__
#include <malloc.h>
+#endif
#ifdef __cplusplus
extern "C" {
Patch is for something close to 1.1.12, I didn't verified
the original speex CVS..
Thanks!
Aymeric
On Thu, 13 Jul 2006, Jean-Marc Valin wrote:
> How about installing the libtool development stuff? Otherwi...
2018 May 07
3
[PATCH] Fix building on macOS
Hello,
I have attached a patch that allowed the build to complete successfully on
macOS.
I haven't tried building the daemon under macOS, but I patched two files
there in a similar manner to some of the other files for consistency (just
the include order for rpc headers).
Thanks,
Adam Robinson
Virtualization and Cloud Infrastructure Senior
Information and Technology Services
University of