Shift the definition out of globals.h into fde.h where the type class
is defined, and the instance into fde.cc. Fixing bug 3720; build errors
on OpenIndiana and Solaris.
Also, move it into the fde class scope as a static Table member.
Provides wrapper definition of fd_table to reduce patch impact.
tests/stub_fatal.cc \
fd.h \
fd.cc \
+ fde.h \
+ fde.cc \
FileMap.h \
filemap.cc \
HttpBody.h \
tests/stub_DiskIOModule.cc \
tests/stub_errorpage.cc \
fd.h \
+ fde.h \
tests/stub_fd.cc \
tests/stub_helper.cc \
tests/stub_HelperChildConfig.cc \
tests/stub_fatal.cc \
fd.h \
fd.cc \
+ fde.h \
+ fde.cc \
client_db.h \
disk.h \
disk.cc \
tests/stub_fatal.cc \
fd.h \
fd.cc \
+ fde.h \
+ fde.cc \
FileMap.h \
filemap.cc \
HttpHeaderFieldStat.h \
tests/stub_fatal.cc \
fd.h \
fd.cc \
+ fde.h \
+ fde.cc \
disk.h \
disk.cc \
FileMap.h \
#include "SquidTime.h"
#include "Store.h"
+fde *fde::Table = NULL;
+
bool
fde::readPending(int fdNumber)
{
void noteUse(PconnPool *);
public:
+
+ /// global table of FD and their state.
+ static fde* Table;
+
unsigned int type;
unsigned short remote_port;
}
};
+#define fd_table fde::Table
+
int fdNFree(void);
#define FD_READ_METHOD(fd, buf, len) (*fd_table[fd].read_method)(fd, buf, len)
extern const char *pingStatusStr[];
extern const char *storeStatusStr[];
extern const char *swapStatusStr[];
-class fde;
-extern fde *fd_table; /* NULL */
extern int Biggest_FD; /* -1 */
extern int Number_FD; /* 0 */
extern int Opening_FD; /* 0 */
#define STUB_API "fd.cc"
#include "tests/STUB.h"
+fde *fde::Table = NULL;
+
int fdNFree(void) STUB_RETVAL(-1)
void fd_open(int fd, unsigned int type, const char *desc) STUB
void fd_close(int fd) STUB