On Sat, Dec 02, 2000 at 11:40:37PM -0800, [EMAIL PROTECTED] wrote:
> 
> Second question about this patch,
> 
> Index: include/apr_lib.h
> ===================================================================
> RCS file: /home/cvspublic/apr/include/apr_lib.h,v
> retrieving revision 1.44
> diff -u -r1.44 apr_lib.h
> --- include/apr_lib.h 2000/11/26 03:00:01     1.44
> +++ include/apr_lib.h 2000/12/03 07:21:44
> @@ -113,6 +113,9 @@
>  #define apr_isdigit(c) (isdigit(((unsigned char)(c))))
>  #define apr_isgraph(c) (isgraph(((unsigned char)(c))))
>  #define apr_islower(c) (islower(((unsigned char)(c))))
> +#if !HAVE_isascii
> +#define isascii(c) (((c) & ~0x7f)==0)
> +#endif 
>  #define apr_isascii(c) (isascii(((unsigned char)(c))))
>  #define apr_isprint(c) (isprint(((unsigned char)(c))))
>  #define apr_ispunct(c) (ispunct(((unsigned char)(c))))
> Index: network_io/beos/networkio.h
> ===================================================================
> RCS file: /home/cvspublic/apr/network_io/beos/networkio.h,v
> retrieving revision 1.18
> diff -u -r1.18 networkio.h
> --- network_io/beos/networkio.h       2000/08/02 05:26:26     1.18
> +++ network_io/beos/networkio.h       2000/12/03 07:21:52
> @@ -78,9 +78,6 @@
>   *
>   * It will be included in the next release, but until then... 
>   */
> -#if !HAVE_isascii
> -#define isascii(c) (((c) & ~0x7f)==0)
> -#endif
>  
>  #include "apr_general.h"
> 
> Could you try just using apr_isascii instead of isascii?  We can't put
> isascii in apr_lib.h, because some platforms actually have that macro.  We
> also can't put HAVE_isascii in apr_lib.h, because that would require
> putting #include apr_private.h in a public header so that the definition
> of HAVE_isascii is found.  Unfortunately, autoconf doesn't let us
> name-space protect the macros it generates, so we can't include
> apr_private.h in a public header, because then any program that used
> autoconf couldn't use APR.  :-(

Well, the problem is that isacii doesn't exist at all in the system
headers.  And so using apr_isascii, which is just a wrapper around
isascii, doesn't help.  However, I think the easiest way to do that is
to just change 

#if !HAVE_isascii 
to 
#if BEOS && __POWER_PC__

which is where the problem occurs.  Of course, this doesn't solve the
general problem of providing isascii to systems that don't have it,
but it does fix the problem at hand.

So the new patch is:

Index: apr_lib.h
===================================================================
RCS file: /home/cvspublic/apr/include/apr_lib.h,v
retrieving revision 1.44
diff -u -r1.44 apr_lib.h
--- apr_lib.h   2000/11/26 03:00:01     1.44
+++ apr_lib.h   2000/12/03 08:09:37
@@ -113,6 +113,9 @@
 #define apr_isdigit(c) (isdigit(((unsigned char)(c))))
 #define apr_isgraph(c) (isgraph(((unsigned char)(c))))
 #define apr_islower(c) (islower(((unsigned char)(c))))
+#if BEOS && __POWER_PC__
+#define isascii(c) (((c) & ~0x7f)==0)
+#endif 
 #define apr_isascii(c) (isascii(((unsigned char)(c))))
 #define apr_isprint(c) (isprint(((unsigned char)(c))))
 #define apr_ispunct(c) (ispunct(((unsigned char)(c))))
       
        sam th               
        [EMAIL PROTECTED]
        http://www.abisource.com/~sam/
        GnuPG Key:  
        http://www.abisource.com/~sam/key

Attachment: pgp089AyfqcKm.pgp
Description: PGP signature

Reply via email to