|
| 1 | +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 | +<html> <head> |
| 3 | +<title></title> |
| 4 | +</head> |
| 5 | + |
| 6 | +<body> |
| 7 | +<h1></h1> |
| 8 | + |
| 9 | +This is a collection of notes on the topic of compiling R with using a |
| 10 | +strict ANSI C compatible compiler. We (Kurt and I) used the -ansi flag |
| 11 | +for gcc and encountered the following problems. |
| 12 | + |
| 13 | +<h2>arithmetic.c:</h2> |
| 14 | + struct exception and DOMAIN are in math.h iff __USE_SVID is defined. See features.h. |
| 15 | + STRICT_ANSI leaves this symbol undefined. |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +<h2>connections.c</h2> |
| 20 | + IFDIR and IFIFO |
| 21 | + <br> |
| 22 | + See /usr/include/sys/stat.h and this conditionally defines |
| 23 | + __USE_XOPEN is probably the offender. Also, neither __USE_MISC or __USE_BSD are defined. |
| 24 | + |
| 25 | +<h2>devPS.c:</h2> |
| 26 | + popen not declared. |
| 27 | + |
| 28 | +<h2>platform.c</h2> |
| 29 | + S_IFDIR not there. |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | +<h2>src/modules/X11</h2> |
| 35 | +devX11.c: |
| 36 | + caddr_t is not defined. |
| 37 | + sys/types.h has definition within __USE_BSD |
| 38 | +<p> |
| 39 | + This actually looks like it should be XPointer anyway, not caddr_t. |
| 40 | + (Some) Solaris doesn't declare this as XPointer for XSaveContext. |
| 41 | + Instead it uses _Xconst char *! |
| 42 | + |
| 43 | +<p> |
| 44 | + fd_set in eventloop.h is not defined. |
| 45 | + |
| 46 | +<h2>rotated.c:</h2> |
| 47 | + M_PI |
| 48 | +<br> |
| 49 | + Problem is __USE_XOPEN again. |
| 50 | + |
| 51 | + |
| 52 | +<h2>sock.c:</h2> |
| 53 | + struct sigaction not defined. |
| 54 | + This is within a #if defined(SIGPIPE) |
| 55 | + |
| 56 | + |
| 57 | +<h2>Miscellaneous Notes</h2> |
| 58 | + |
| 59 | +The output showing the setting sat the end of running <b>configure</b> should |
| 60 | +show the CPPFLAGS as part of the different compiler flags. |
| 61 | +Since -ansi is part of CPPFLAGS, enabling it with |
| 62 | +<pre> |
| 63 | + ./configure CPPFLAGS=-ansi |
| 64 | +</pre> |
| 65 | +means that is not visible in the displayed settings of the flags. |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | +<hr> |
| 71 | +<address><a href="http://cm.bell-labs.com/stat/duncan">Duncan Temple Lang</a> |
| 72 | +<a href= mailto:[email protected]>< [email protected]> </a></address> |
| 73 | +<!-- hhmts start --> |
| 74 | +Last modified: Mon Aug 19 07:43:50 EDT 2002 |
| 75 | +<!-- hhmts end --> |
| 76 | +</body> </html> |
0 commit comments