summaryrefslogtreecommitdiff
path: root/Distrib/PortingIssues.mdwn
diff options
context:
space:
mode:
authorRobert Millan <zeratul2@wanadoo.es>2003-03-12 13:18:00 +0000
committerRobert Millan <zeratul2@wanadoo.es>2003-03-12 13:18:00 +0000
commit852cbcbdfcf66b3bcd4a7b238345e6ecb0bc9921 (patch)
tree2398245bf3c654472f5be3ebb02bdbefcd8288d9 /Distrib/PortingIssues.mdwn
parent0219442c7318a601527d1f0a80ae8e402bf48067 (diff)
none
Diffstat (limited to 'Distrib/PortingIssues.mdwn')
-rw-r--r--Distrib/PortingIssues.mdwn14
1 files changed, 12 insertions, 2 deletions
diff --git a/Distrib/PortingIssues.mdwn b/Distrib/PortingIssues.mdwn
index 12be7499..58e1b030 100644
--- a/Distrib/PortingIssues.mdwn
+++ b/Distrib/PortingIssues.mdwn
@@ -20,9 +20,19 @@ You can try out Neal Walfield's implementation of libpthreads. It will serve as
The pthread library is available from [the Hurd CVS on Savannah](http://savannah.gnu.org/projects/hurd/).
-## <a name="Undefined_PIPE_BUF"> </a> Undefined PIPE\_BUF
+## <a name="Undefined_bits_confname_h_macros"> </a> Undefined bits/confname.h macros (PIPE\_BUF, ...)
-Change it to use sysconf(\_SC\_PIPE\_BUF) #ifndef PIPE\_BUF. (from a Roland McGrath message in debian-hurd)
+If macro XXX is undefined, but macro \_SC\_XXX or \_PC\_XXX is defined in bits/confname.h, you probably need to use sysconf, pathconf or fpathconf to obtain it dynamicaly.
+
+The following macros have been found in this offending situation (add more if you find them): PIPE\_BUF
+
+An example with sysconf: (when you find a sysconf offending macro, put a better example)
+
+#ifndef XXX #define XXX sysconf(\_SC\_XXX) #endif [ offending code using XXX follows ]
+
+An example with fpathconf:
+
+#ifdef PIPE\_BUF read(fd, buff, PIPE\_BUF - 1); #else read(fd, buff, fpathconf(fd, \_PC\_PIPE\_BUF) - 1); #endif [ note we can't #define PIPE\_BUF, because it depends on the "fd" variable ]
## <a name="Bad_File_Descriptor"> Bad File Descriptor </a>