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