summaryrefslogtreecommitdiff
path: root/hurd/porting/guidelines.mdwn
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2013-10-27 19:44:32 +0100
committerThomas Schwinge <thomas@codesourcery.com>2013-10-27 19:44:32 +0100
commit9675f765a06325bcbd5ac58a9eee8856cb2c5b7c (patch)
tree359703ed392ac61d3d4ff783c814e01a39fc2ff2 /hurd/porting/guidelines.mdwn
parent8fac6986eadf6db5d155030cc67a904f22cadf29 (diff)
parent47e4d194dc36adfcfd2577fa4630c9fcded005d3 (diff)
Merge remote-tracking branch 'fp/master'
Diffstat (limited to 'hurd/porting/guidelines.mdwn')
-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.