Skip to content

building R-1.3.0

3 messages · Deborah Swayne, Brian Ripley

#
I'm building R-1.3.0 on an SGI running IRIX 6.5.  (Duncan will
testify that he longs to go into our computer room and shoot
this particular machine, but I'm stuck with it.)

I get the following complaints during the build, despite the
fact that configure has happily verified that the machine has
sys/socket.h and netinet/in.h, in which these are defined:

nanoftp.c:771: `AF_INET' undeclared (first use in this function)
nanoftp.c:781: `SOCK_STREAM' undeclared (first use in this function)
nanoftp.c:1090: `IPPROTO_TCP' undeclared (first use in this function)

Any advice?

Debby
#
I've learned a bit more about this, and I'd say I've probably
encountered a puzzle and a bug.

The puzzle:

  If I'm reading config.cache correctly, configure fails to locate
      /usr/include/netinet/tcp.h
  though it finds other files in the same directory

  from config.cache:
    ac_cv_header_netinet_in_h=${ac_cv_header_netinet_in_h=yes}
    ac_cv_header_netinet_tcp_h=${ac_cv_header_netinet_tcp_h=no}
  but
   -r--r--r--  1 root   root  23975 Jul 24  2000 /usr/include/netinet/in.h
   -r--r--r--  1 root   root   3754 Jul 24  2000 /usr/include/netinet/tcp.h

As a consequence of that decision, HAVE_BSD_NETWORKING is not defined.

The bug:

  nanoftp.c checks that macro before including tcp.h (and other
  files), but doesn't seem to do the right test later on when it uses
  the contents of the include files in question.

  All the code in the file is embedded in this test:
    #if !defined(Unix) || defined(HAVE_BSD_NETWORKING)

  While the test for including tcp.h (et al) is more stringent:
    #ifdef HAVE_BSD_NETWORKING


Debby
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Tue, 26 Jun 2001, Deborah Swayne wrote:

            
Um ....
But it is as intended.  Is not Unix defined on your system?  Or is that
being parsed incorrectly (according to my understanding, and Harbison &
Steele's)?

Does

#if (!defined(Unix)) || defined(HAVE_BSD_NETWORKING)

work?

We do need the extra freedom on Windows, where HAVE_BSD_NETWORKING is
false but the  #ifdef Win32 lines save the day.

Brian