diff options
Diffstat (limited to 'src/pj_malloc.c')
| -rw-r--r-- | src/pj_malloc.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/pj_malloc.c b/src/pj_malloc.c index b6400eba..80443a2b 100644 --- a/src/pj_malloc.c +++ b/src/pj_malloc.c @@ -7,12 +7,14 @@ void * pj_malloc(size_t size) { -// Currently, pj_malloc is a hack to solve an errno problem. -// The problem is described in more details at -// https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=86420. -// It seems, that pj_init and similar functions incorrectly -// (under debian/glibs-2.3.2) assume that pj_malloc resets -// errno after success. pj_malloc tries to mimic this. +/* +/ Currently, pj_malloc is a hack to solve an errno problem. +/ The problem is described in more details at +/ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=86420. +/ It seems, that pj_init and similar functions incorrectly +/ (under debian/glibs-2.3.2) assume that pj_malloc resets +/ errno after success. pj_malloc tries to mimic this. +*/ int old_errno = errno; void *res = malloc(size); if ( res && !old_errno ) |
