| 1 | 1 patch for repository darcs.haskell.org:/srv/darcs/packages/base: |
|---|
| 2 | |
|---|
| 3 | Fri Apr 1 13:19:36 BST 2011 Max Bolingbroke <batterseapower@hotmail.com> |
|---|
| 4 | * Use NSGetEnviron on OS X |
|---|
| 5 | |
|---|
| 6 | New patches: |
|---|
| 7 | |
|---|
| 8 | [Use NSGetEnviron on OS X |
|---|
| 9 | Max Bolingbroke <batterseapower@hotmail.com>**20110401121936 |
|---|
| 10 | Ignore-this: dc33082555e084f3241b6d48f178f903 |
|---|
| 11 | ] { |
|---|
| 12 | hunk ./include/HsBase.h 655 |
|---|
| 13 | } |
|---|
| 14 | #endif /* !defined(__MINGW32__) */ |
|---|
| 15 | |
|---|
| 16 | +#if darwin_HOST_OS |
|---|
| 17 | +// You should not access _environ directly on Darwin in a bundle/shared library. |
|---|
| 18 | +// See #2458 and http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man7/environ.7.html |
|---|
| 19 | +#include <crt_externs.h> |
|---|
| 20 | +INLINE char **__hscore_environ() { return *(_NSGetEnviron()); } |
|---|
| 21 | +#else |
|---|
| 22 | /* ToDo: write a feature test that doesn't assume 'environ' to |
|---|
| 23 | * be in scope at link-time. */ |
|---|
| 24 | extern char** environ; |
|---|
| 25 | hunk ./include/HsBase.h 665 |
|---|
| 26 | INLINE char **__hscore_environ() { return environ; } |
|---|
| 27 | +#endif |
|---|
| 28 | |
|---|
| 29 | /* lossless conversions between pointers and integral types */ |
|---|
| 30 | INLINE void * __hscore_from_uintptr(uintptr_t n) { return (void *)n; } |
|---|
| 31 | } |
|---|
| 32 | |
|---|
| 33 | Context: |
|---|
| 34 | |
|---|
| 35 | [TAG git migration |
|---|
| 36 | Malcolm.Wallace@cs.york.ac.uk**20110331135041 |
|---|
| 37 | Ignore-this: f953c722de899f1df8fed5802dfd3535 |
|---|
| 38 | ] |
|---|
| 39 | Patch bundle hash: |
|---|
| 40 | bfd3550c0b1300e701666e716e15653b5ea2f04a |
|---|