[Xlibs] patches for Xt
Jeremy C. Reed
reed@reedmedia.net
Fri, 30 Jan 2004 18:52:45 -0800 (PST)
> --- Xtos.h 24 Oct 2003 15:47:35 -0000 3.13
> +++ Xtos.h 31 Jan 2004 02:03:40 -0000
> @@ -53,9 +53,25 @@
> #ifndef _Xtos_h
> #define _Xtos_h
>
> -#define ALLOCATE_LOCAL_FALLBACK(_size) XtMalloc((unsigned long)(_size))
> -#define DEALLOCATE_LOCAL_FALLBACK(_ptr) XtFree((XtPointer)(_ptr))
> -#include <X11/Xalloca.h>
> +#if HAVE_ALLOCA
> +/* AIX requires this to be the first thing in the file. */
> +# if HAVE_ALLOCA_H
> +# include <alloca.h>
> +# else
> +# ifdef _AIX
> + #pragma alloca
> +# else
> +# ifndef alloca /* predefined by HP cc +Olibcalls */
> +char *alloca ();
> +# endif
> +# endif
> +# endif
> +#define ALLOCATE_LOCAL(size) alloca((int)(size))
> +#define DEALLOCATE_LOCAL(ptr) /* as nothing */
> +#else
> +#define ALLOCATE_LOCAL(_size) Xalloc((unsigned long)(_size))
> +#define DEALLOCATE_LOCAL(_ptr) Xfree((Pointer)(_ptr))
> +#endif
This Xtos.h patch is not working when tried again.
I believe the last define should have XtPointer instead of Pointer.
> p.s. I am not sure why I received these messages:
>
> cvs diff: cannot find util/Shell.ht
> cvs diff: cannot find util/StrDefs.ct
> cvs diff: cannot find util/StrDefs.ht
I found that util/Makefile.am is set to remove them. Does anyone know
wht? (Feel free to answer in my other thread.) This should be fixed.
Jeremy C. Reed
http://bsd.reedmedia.net/