summaryrefslogtreecommitdiff
path: root/hurd
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2011-07-20 21:53:36 +0200
committerThomas Schwinge <tschwinge@gnu.org>2011-07-20 21:53:36 +0200
commit9c5d5fdd54d403540766dae48f8f7875dbed551b (patch)
tree9f6d1215079cd0d129666ce64837dfb53cb3356a /hurd
parente50143a1d90ad43887baaf4e55ebefe20d815ddb (diff)
parent272a3459d4c22258d637115c20d7c938cf489d32 (diff)
Merge remote branch 'flubber--anongit/master'
Diffstat (limited to 'hurd')
-rw-r--r--hurd/documentation/translator_primer.mdwn2
-rw-r--r--hurd/porting/guidelines.mdwn15
-rw-r--r--hurd/running/qemu.mdwn5
3 files changed, 18 insertions, 4 deletions
diff --git a/hurd/documentation/translator_primer.mdwn b/hurd/documentation/translator_primer.mdwn
index 24e66681..4586a8e6 100644
--- a/hurd/documentation/translator_primer.mdwn
+++ b/hurd/documentation/translator_primer.mdwn
@@ -29,7 +29,7 @@ To try out the simplest of translators, you can go the following simple steps:
$ touch hello
$ cat hello
- $ setrans hello /hurd/hello
+ $ settrans hello /hurd/hello
$ cat hello
"Hello World!"
$ settrans -g hello
diff --git a/hurd/porting/guidelines.mdwn b/hurd/porting/guidelines.mdwn
index ade921b0..8b7dcf02 100644
--- a/hurd/porting/guidelines.mdwn
+++ b/hurd/porting/guidelines.mdwn
@@ -1,5 +1,5 @@
-[[!meta copyright="Copyright © 2002, 2003, 2005, 2007, 2008, 2009 Free Software
-Foundation, Inc."]]
+[[!meta copyright="Copyright © 2002, 2003, 2005, 2007, 2008, 2009, 2010, 2011
+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
@@ -50,10 +50,19 @@ An example with `fpathconf`:
If you get Bad File Descriptor error when trying to read from a file (or accessing it at all), check the `open()` invocation. The second argument is the access method. If it is a hard coded number instead of a symbol defined in the standard header files, the code is screwed and should be fixed to either use `O_RDONLY`, `O_WRONLY` or `O_RDWR`. This bug was observed in the `fortunes` and `mtools` packages for example.
-## <a name="PATH_MAX_tt_MAX_PATH_tt_MAXPATHL"> `PATH_MAX` / `MAX_PATH` / `MAXPATHLEN` </a>
+## <a name="PATH_MAX_tt_MAX_PATH_tt_MAXPATHL">`PATH_MAX`, `MAX_PATH`, `MAXPATHLEN`, `_POSIX_PATH_MAX`</a>
Every unconditionalized use of `PATH_MAX`, `MAX_PATH` or `MAXPATHLEN` is a POSIX incompatibility. If there is no upper limit on the length of a path (as its the case for GNU), this symbol is not defined in any header file. Instead, you need to either use a different implementation that does not rely on the length of a string or use `sysconf()` to query the length at runtime. If `sysconf()` returns -1, you have to use `realloc()` to allocate the needed memory dynamically. Usually it is thus simpler to just use dynamic allocation. Sometimes the amount is actually known. Else, a geometrically growing loop can be used: for instance, see [Alioth patch](http://alioth.debian.org/tracker/download.php/30628/410472/303735/1575/cpulimit-path-max-fix.patch) or [Pulseaudio patch](http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=patch-pulse;att=1;bug=522100). Note that in some cases there are GNU extensions that just work fine: when the `__GLIBC__` macro is defined, `getcwd()` calls can be just replaced by `get_current_dir_name()` calls.
+Note: constants such as `_POSIX_PATH_MAX` are only the minimum required value
+for a potential corresponding `PATH_MAX` macro. They are not a replacement for
+`PATH_MAX`, just the minimum value that one can assume.
+
+Note 2: Yes, some POSIX functions such as `realpath()` actually assume that
+`PATH_MAX` is defined. This is a bug of the POSIX standard, which got fixed in
+the latest revisions, in which one can simply pass `NULL` to get a dynamically
+allocated buffer.
+
## <a name="ARG_MAX"> `ARG_MAX` </a>
Same rationale as `PATH_MAX`. There is no limit on the number of arguments.
diff --git a/hurd/running/qemu.mdwn b/hurd/running/qemu.mdwn
index 9f085d24..343707fa 100644
--- a/hurd/running/qemu.mdwn
+++ b/hurd/running/qemu.mdwn
@@ -100,6 +100,11 @@ If your machine supports hardware acceleration, you should really use the kvm va
to the command line, see below, if you are running Linux kernels 2.6.37 or 2.6.38 else IRQs may hang sooner or later. The kvm irq problems will be solved in kernel 2.6.39.
+/!\ Note that there are known performance issues with KVM on Linux 2.6.39
+kernels, compared to 2.6.32: [[!debbug 634149]]. We're preparing on a change
+on our side to work around this.
+
+
# Installing Debian/Hurd with QEMU using the Debian installer
Note: If you have hardware support, replace the qemu commands below with kvm, e.g. qemu-ing -> kvm-img.