summaryrefslogtreecommitdiff
path: root/hurd/porting
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2014-02-26 12:43:40 +0100
committerThomas Schwinge <thomas@codesourcery.com>2014-02-26 12:43:40 +0100
commitca63bd2d33b3d28eabd50ad58577b52a1fc9eba0 (patch)
tree74bf46806011262f116d83ff5bec0a1cf8a79a4b /hurd/porting
parent5757d0c3b11dac706fbe72247e9d2dcf0ff44df9 (diff)
parent7ffc398e1c386925826c42a30ff10ae84e79378f (diff)
Merge remote-tracking branch 'dirichlet.SCHWINGE/master'
Diffstat (limited to 'hurd/porting')
-rw-r--r--hurd/porting/guidelines.mdwn20
1 files changed, 19 insertions, 1 deletions
diff --git a/hurd/porting/guidelines.mdwn b/hurd/porting/guidelines.mdwn
index d28a777e..a9acd9f9 100644
--- a/hurd/porting/guidelines.mdwn
+++ b/hurd/porting/guidelines.mdwn
@@ -1,5 +1,5 @@
[[!meta copyright="Copyright © 2002, 2003, 2005, 2007, 2008, 2009, 2010, 2011,
-2012 Free Software Foundation, Inc."]]
+2012, 2013 Free Software Foundation, Inc."]]
[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
@@ -83,6 +83,24 @@ because else *-gnu* would catch i386-pc-linux-gnu for instance...
Note: some of such statements are not from the source package itself, but from aclocal.m4 which is actually from libtool. In such case, the package simply needs to be re-libtoolize-d.
+
+## Preprocessor Define
+
+### IRC, freenode, #hurd, 2013-10-23
+
+ <C-Keen> Is there a preprocessor define gcc sets for hurd which I can check
+ in my code?
+ <braunr> __GNU__
+ <braunr> glibc sets it if i'm right
+ <C-Keen> I also see that __MACH__ gets set
+ <azeem> that's also set on Mac OS X
+ <C-Keen> right, which uncovered a bug in the code
+ <braunr> the microkernel doesn't always implies what operating system runs
+ on top of it
+ <C-Keen> braunr: but __GNU__ is the correct define for hurd specific code?
+ <braunr> yes
+
+
## <a name="Undefined_bits_confname_h_tt_mac"> Undefined `bits/confname.h` macros (`PIPE_BUF`, ...) </a>
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.