HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: hylafax beta and Linux 2.2.x



On Sun, 16 May 1999, Robert Colquhoun wrote:

> >../port.h:25: warning: previous declaration here
> >Dispatcher.c++: In method `fxBool FdMask::anySet() const':
> >Dispatcher.c++:67: `fds_bits' undeclared (first use this function)
> >Dispatcher.c++:67: (Each undeclared identifier is reported only once
> >Dispatcher.c++:67: for each function it appears in.)
> >Dispatcher.c++: In method `int FdMask::numSet() const':
> >Dispatcher.c++:78: confused by earlier errors, bailing out
> >make[3]: *** [Dispatcher.o] Error 1
> >
> 
> This is more serious, it seems that hylafax has assumed some stuff about
> the internals of the FD_* macros....ie how the operating system contructs
> fd_sets.   This might need rewriting.

Yes, it might...  glibc2.1 makes a very big effort to hide all internals,
forcing access through the proper means.  I think this is a good thing,
but breaks software writing assuming the internals of the c library.

If you define __USE_XOPEN, you should be able to see fd_bits.

>From glibc-2.1's bits/types.h
====================================================================
/* fd_set for select and pselect.  */
typedef struct
  {
    /* XPG4.2 requires this member name.  Otherwise avoid the name
       from the global namespace.  */
#ifdef __USE_XOPEN
    __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
# define __FDS_BITS(set) ((set)->fds_bits) 
#else
    __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS];
# define __FDS_BITS(set) ((set)->__fds_bits)
#endif
  } __fd_set;
====================================================================

Dispatcher.c++ uses fds_bits nicely for some quick checking.  The easiest
"quick" solution for Dave would be to define __USE_XOPEN at the top
Dispatcher.c++.

But I don't think this is a proper solution for the distribution.
Do we want to know the internals and use the quicker anySet, numSet? or
not know the internals and iterate through every bit to find them...

a.



Aidan Van Dyk                                        Create like a god,
aidan@ottawa.com                                   command like a king,
http://www.highrise.ca/                              work like a slave.

   |\^/|       |\^/|       |\^/|       |\^/|       |\^/|       |\^/|
_|\|   |/|_ _|\|   |/|_ _|\|   |/|_ _|\|   |/|_ _|\|   |/|_ _|\|   |/|_
>    C    < >    a    < >    n    < >    a    < >    d    < >    a    <
 >_./|\._<   >_./|\._<   >_./|\._<   >_./|\._<   >_./|\._<   >_./|\._<





Project hosted by iFAX Solutions