On Tue, Aug 01, 2006, Doug Summers wrote:

> I tried building with gcc3, gcc4 (both OpenPKG), and IBM's xlc - all
> with the same results:
>
> ./shtool scpp -o pth_p.h -t pth_p.h.in -Dcpp -Cintern -M '==#=='
> pth_compat.c pth_debug.c pth_syscall.c pth_errno.c pth_ring.c pth_mctx.c
> pth_uctx.c pth_clean.c pth_time.c pth_tcb.c pth_util.c pth_pqueue.c
> pth_event.c pth_sched.c pth_data.c pth_msg.c pth_cancel.c pth_sync.c
> pth_attr.c pth_lib.c pth_fork.c pth_high.c pth_ext.c pth_string.c pthread.c
> ./libtool --mode=compile --quiet /syscfg/opkg/bin/gcc3 -c -I. -O2 -pipe
> pth_debug.c
> In file included from pth_p.h.in:54,
>                  from pth_debug.c:29:
> pth.h:93:2: #error "FD_SETSIZE is larger than what GNU Pth can handle."
>
> It doesn't matter if I use the 2.5 or current release of pth. UCLA has
> pth binaries built for AIX 5.3 so I know it's possible but I can't find
> any build docs.

Well, I was able to directly get into contact with the upstream author
of GNU pth ;-) and so let's see what we both can do for you:

GNU pth in its GNU autoconf procedures check what FD_SETSIZE the system
has set with a test program similar to this one:

#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#ifdef SOLVE_THE_PROBLEM
#include <sys/select.h>
#endif
#include <unistd.h>

int main(int argc, char *argv[])
{
    FILE *fp;
    int ac_fdsetsize;
#if defined(FD_SETSIZE)
    ac_fdsetsize = FD_SETSIZE;
    fprintf(stderr, "found: FD_SETSIZE=%d\n", ac_fdsetsize);
#else
    ac_fdsetsize = (sizeof(fd_set)*8);
    fprintf(stderr, "not found: guessed=%d\n", ac_fdsetsize);
#endif
    exit(0);
}

Under its own compile-time the pth.h checks whether the FD_SETSIZE is
(still) the one found under configure-time. And here is the discrepancy
for you. I've already a clue what the problem could be. Please save the
above program as check.c and then run the following commands and show me
the output:

| $ cc -o check check.c && ./check
| found: FD_SETSIZE=1024
| $ cc -DSOLVE_THE_PROBLEM -o check check.c && ./check
| found: FD_SETSIZE=1024

As you can see, for me it detects FD_SETSIZE to be 1024 on my FreeBSD
6.1 box. I guess for you the first output is the "guessed" value while
only the second output reports the correct size, right? If this is
the case, the problem simply is that FD_SETSIZE is defined in your
<sys/select.h> only. If this is not the case, can you send me the
output of:

$ grep -C 9999 -r FD_SETSIZE /usr/include

Yours,
                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com

______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
User Communication List                      openpkg-users@openpkg.org

Reply via email to