* Chris Chan <[EMAIL PROTECTED]> [010101 12:17]:
> 
> Thank you Peter, but it's difficult for me to make it work. i modify the
> alias.c carefully. but i get a lot of error when compile it. I just not
> understand why not Ken add this useful feature to the qmail admin.

Ah, that's probably why my little feature wasn't added: it isn't portable.
:-(

> First error message:
> 
> gmake[1]: Entering directory `/var/download/qmailadmin/tmp/qmailadmin-0.40'
> gmake[2]: Entering directory `/var/download/qmailadmin/tmp/qmailadmin-0.40'
> gcc -I. -I/var/vpopmail/include      -g -O2 -c alias.c
> alias.c: In function `show_dotqmail_lines':
> alias.c:72: `alphasort' undeclared (first use in this function)
[snip]
> ######### the scandir manpage #############
> 
> SunOS/BSD Compatibility Library Functions           scandir(3UCB)
> 
> NAME
>      scandir, alphasort - scan a directory
> 
> SYNOPSIS
>      /usr/ucb/cc [ flag ... ] file ...
>      #include <sys/types.h>
>      #include <sys/dir.h>
> 
>      int scandir(dirname, namelist, select, dcomp);
>      char *dirname;
>      struct direct *(*namelist[]);
>      int (*select(.),(*dcomp)();
> 
>      int alphasort(d1, d2);

Have you tried adding a line:

  extern int alphasort(struct direct **, struct direct **);

to alias.c? Maybe if the compiler has a prototype for it, it will be able to
properly link it to the correct function in the C library. If not, then you
are out of luck from my perspective.

Sorry!

/pg
-- 
Peter Green : Gospel Communications Network, SysAdmin : [EMAIL PROTECTED]
---
The Internet Revolution was founded on open systems: an open system is one
whose software you can look at, a box you can unwrap and play with.  It's
not about secret binaries or crippleware or brother-can-you-spare-a-dime
shareware. If everyone always had hidden software, you wouldn't have
1/100th the useful software you have right now.
And you wouldn't have Perl.
--- Tom Christiansen in
    `The new Camel and compiling perl'
    <news:53mal3$4b5$[EMAIL PROTECTED]>

Reply via email to