This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] sunrpc/rpc/types.h: Fix OS X build problem.


Hi Mike,

On Fri, Sep 6, 2013 at 9:13 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Thursday 05 September 2013 09:39:00 Jia Liu wrote:
>> Is this code looks OK?
>>
>> #if defined ( __APPLE_CC__ ) || defined( __FreeBSD__ )
>> # define __u_char_defined
>> #endif

I modify the code into this:

#if defined __APPLE_CC__ || defined __FreeBSD__
# define __u_char_defined
#endif

and made a test, it still get the same error.

>>
>> And, Mike, how do you think?
>
> i really wish we didn't have to do this, but the rpc code base is all kinds of
> ugly, and i don't think we really care about throwing more poop onto that
> pile.  so i wouldn't say no to this sort of change.
>
> note: your style is off (incorrect spacing at the start of the apple symbol),
> and you'll have to send a proper patch.


And I try to fix it like this:

@@ -69,7 +69,7 @@ typedef unsigned long rpcport_t;
 #include <sys/types.h>
 #endif

-#ifndef __u_char_defined
+#if !defined __u_char_defined && !defined __APPLE_CC__ && !defined __FreeBSD__
 typedef __u_char u_char;
 typedef __u_short u_short;
 typedef __u_int u_int;
@@ -79,7 +79,7 @@ typedef __u_quad_t u_quad_t;
 typedef __fsid_t fsid_t;
 # define __u_char_defined
 #endif
-#ifndef __daddr_t_defined
+#if !defined __daddr_t_defined && !defined __APPLE_CC__ && !defined __FreeBSD__
 typedef __daddr_t daddr_t;
 typedef __caddr_t caddr_t;
 # define __daddr_t_defined

It test good, is this time right?

> -mike

Regards,
Jia.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]