Hi
I have started work on the VMS port of Squid, using V1.1.17 as a base
reference model, on OpenVMS AXP V6.2-1H3, UCX 4.1 ECO 6 and DEC C V5.6
(the only one to support the "backport" libraries - otherwise I'd need
to be OpenVMS AXP V7.1 if I was using an earlier version of the DEC C
compiler).  Most of the changes so far look to be in the Makefile area,
using Digital's MMS instead of make, and adjusting the the different
invocation lines for compiler (CC vs cc), linker (LINK instead of ld)
and object librarian (LIBRARY instead of ar).  I have also had to
manually build the temporary C files that configure uses to test e.g.
socket buffer sizes, but no sweat, I am learning as I go.
Not being a real sockets programmer, can someone explain why COMM.C uses
fcntl calls instead of ioctl codes ?  The DEC C run-time library only
supports ioctl.   The parameters look similar for both fcntl and ioctl,
so I am not sure what the real differences are, and if someone can point
me to either a direct code replacement for the following fragment using
ioctl, or provide other help, I would be most greatful.
PS: DNSSERVER works !!!   Oh yeah !!!!
PPS: Is the fact that UCX doesn't support IP Multicast going to be a
problem (it looks like if IP_MULTICAST_TTL is not defined then no harm
is done - multicast just won't work) ?
Regards
Jason Armistead
armistej@oeca.otis.com
$ sear comm.c fcntl /win=10 /num
  1262  commSetNonBlocking(int fd)
  1263  {
  1264      int flags;
  1265      int dummy = 0;
  1266      if ((flags = fcntl(fd, F_GETFL, dummy)) < 0) {
  1267          debug(50, 0, "FD %d: fcntl F_GETFL: %s\n", fd,
xstrerror());
  1268          return COMM_ERROR;
  1269      }
  1270  #if defined(O_NONBLOCK) && !defined(_SQUID_SUNOS_) &&
!defined(_SQUID_SOLARIS_)
  1271      if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0) {
  1272          debug(50, 0, "FD %d: error setting O_NONBLOCK: %s\n",
fd, xstrerror());
  1273          return COMM_ERROR;
  1274      }
  1275  #else
  1276      if (fcntl(fd, F_SETFL, flags | O_NDELAY) < 0) {
  1277          debug(50, 0, "FD %d: error setting O_NDELAY: %s\n", fd,
xstrerror());
  1278          return COMM_ERROR;
  1279      }
  1280  #endif
  1281      return 0;
***************
  1285  commSetCloseOnExec(int fd)
  1286  {
  1287  #ifdef FD_CLOEXEC
  1288      int flags;
  1289      if ((flags = fcntl(fd, F_GETFL)) < 0) {
  1290          debug(50, 0, "FD %d: fcntl F_GETFL: %s\n", fd,
xstrerror());
  1291          return;
  1292      }
  1293      if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) < 0)
  1294          debug(50, 0, "FD %d: set close-on-exec failed: %s\n",
fd, xstrerror());
  1295  #endif
  1296  }
  1297
  1298  #ifdef TCP_NODELAY
Received on Wed Nov 12 1997 - 20:34:50 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:37:31 MST