[AC21.4] Patch to build on latest Cygwin (1.5.19)

Vin Shelton acs at xemacs.org
Mon Jan 23 20:40:23 EST 2006


APPROVE COMMIT 21.4

Thanks for the patch, Rick.  This will appear in 21.4.19.

  - Vin

Rick Rankin <rrankin1424-xemacs at yahoo.com> writes:

> I sent this a couple of days ago, but it never showed up on either list I addressed it to...
>
> The patch below fixes a compiler error that occurs when building the latest 21.5 sources from CVS on the latest Cygwin release. Cygwin 1.5.19 has removed the d_ino field from 'struct dirent' since it wasn't used on Cygwin and apparently POSIX doesn't require it to be present. I haven't done a great deal of testing with this patch, but dired seems to work fine with it.
>
> Also, I had to disable the new allocator when building as it was causing core dumps. I haven't had much time to look at it, but apparently, SYS_PAGE_SIZE was returning an unrecognized value in init_mc_allocator() which was causing ABORT() to be called from the switch statement at the beginning of the function. I'll try to look at it in a bit more detail in a few days.
>
> --Rick
>
> Index: src/sysdir.h
> ===================================================================
> RCS file: /pack/xemacscvs/XEmacs/xemacs/src/sysdir.h,v
> retrieving revision 1.7
> diff -u -r1.7 sysdir.h
> --- src/sysdir.h        2002/06/05 09:57:18     1.7
> +++ src/sysdir.h        2006/01/19 04:41:47
> @@ -62,7 +62,11 @@
>     Since applying strlen to the name always works, we'll just do that.  */
>  #define NAMLEN(p) strlen (p->d_name)
>  
> -#define DIRENTRY_NONEMPTY(p) ((p)->d_ino)
> +#ifdef __CYGWIN__
> +# define DIRENTRY_NONEMPTY(p) ((p)->d_name[0] != '\0')
> +#else
> +# define DIRENTRY_NONEMPTY(p) ((p)->d_ino)
> +#endif
>  
>  /* encapsulation: directory calls */
>  




More information about the XEmacs-Beta mailing list