From: Philippe DEFERT (philippe.defert@cern.ch)
Date: Wed Mar 06 2002 - 15:31:04 GMT
On Wed, 2002-03-06 at 15:06, F J Franklin wrote:
> On 6 Mar 2002, Philippe DEFERT wrote:
> > To compile abiword on OS different from Linux, and where
> > scandir/alphasort do not exists, there is a patch needed to the file
> > ut_unixDirent.h. The patch is just to make compile this include file
> > within the C++ context. Could include that in the next release, please ?
> > The file is attachment.
>
> Why should this work? If scandir & alphasort are missing then this will
> result in link-errors. If they are just un-declared, which the patch
> fixes, then why aren't they being declared?
>
> SCANDIR_MISSING should imply that scandir is missing, so a simple
> declaration won't help. (Technically you need a separate
> ALPHASORT_MISSING for alphasort anyway...)
>
> Please tell us: what platform are you using? Solaris? AIX? HP?
>
I compiled and tested (it works) on RedHat 6.2, Solaris 2.6 and 7.
If you are on Solaris This ut_unixDirent.h is completely included as the
solaris config file contains the SCANDIR_MISSING variable defined (I
think in PORT_FLAGS of the sunos.mk). On Linux, SCANDIR_MISSING is not
defined thus ut_unixDirent.h is not read, at least, not the declarations
that it contains. On Solaris, this ut_unixDirent.h is completely
compiled as a C++ include file, if you don't have these
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
it does not compile.
The functions scandir and alphasort are defined in the file
ut_unixDirent.cpp in the same directory. This ut_unixDirent.cpp is
compiled when SCANDIR_MISSING is defined and ignored otherwise.
Amicalement.
Philippe.
This archive was generated by hypermail 2.1.4 : Wed Mar 06 2002 - 10:36:39 GMT