[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lstat()
From: |
John Poltorak |
Subject: |
Re: lstat() |
Date: |
Wed, 6 Mar 2002 17:45:07 +0000 |
On Wed, Mar 06, 2002 at 09:14:17AM -0800, Paul Eggert wrote:
> > From: John Poltorak <address@hidden>
> > Date: Wed, 6 Mar 2002 16:49:21 +0000
> >
> > what I'm looking for is a way of adding platform specific plugins
> > which don't need to be incorporated into Autoconf itself, but Autoconf
> > will call them if they exist.
>
> Presumably you can build the plugin and add it to LIBS before invoking
> AC_CHECK_LIB or AC_TRY_RUN. But I expect it will be a bit of a
> hassle. For example, if the plugin supplies .h files I guess you'll
> also need to modify CPPFLAGS.
To be honest I wouldn't know how to do it, it's just that an OS/2 port of
v2.50 had a couple of patches in acheaders.m4 such as:-
+AH_VERBATIM([_EMX_REPLACE_STRCASECMP],
+[/* Replace strcasecmp() by stricmp() if necessary (EMX only) */
+#if !HAVE_STRCASECMP && HAVE_STRICMP && !defined strcasecmp
+# define strcasecmp(x,y) stricmp(x,y)
+#endif])
+AH_VERBATIM([_EMX_REPLACE_STRNCASECMP],
+[/* Replace strncasecmp() by strnicmp() if necessary (EMX only) */
+#if !HAVE_STRNCASECMP && HAVE_STRNICMP && !defined strncasecmp
+# define strncasecmp(x,y,z) strnicmp(x,y,z)
+#endif])
+AH_VERBATIM([_EMX_REPLACE_LSTAT],
+[/* If libc does not support lstat(), replace it by stat() (EMX only) */
+#if !HAVE_LSTAT && HAVE_STAT && !defined lstat
+# define lstat(x, y) stat(x, y)
+#endif])
+
and this worked very well. I was simply wondering if any OS/2 specific
code could be plugged in indepedently of the main Autoconf code via some
existing hook, such as:-
test -f $THISPLATFORM.m4 && use $THISPLATFORM.m4
--
John
- lstat(), John Poltorak, 2002/03/06
- Re: lstat(), Paul Eggert, 2002/03/06
- Re: lstat(),
John Poltorak <=