[Gluster-devel] TMP_MAX on Linux vs OSX
jclift at redhat.com
Mon Mar 11 15:07:26 UTC 2013
Just following up your review for the TMP_MAX thing. :)
I'm happy to go with using TMP_MAX from stdio.h by
#including that instead. The only thing that's making
me unsure about it, is they're very very different values
on Linux vs OSX.
Code snippet from RHEL 6.x stdio.h -> <bits/stdio_lim.h>:
(stdio.h includes it from stdio_lim.h)
# define TMP_MAX 238328
Code snippet from OSX 10.7 stdio.h:
/* System V/ANSI C; this is the wrong way to do this, do *not* use these. */
#define P_tmpdir "/var/tmp/"
#define L_tmpnam 1024 /* XXX must be == PATH_MAX */
#define TMP_MAX 308915776
The version of TMP_MAX is about 1300x the size of
the Linux one. Strongly suspecting that'd lead to
incorrect behaviour, though I have no real idea here.
What do you reckon?
Regards and best wishes,
Open Source and Standards @ Red Hat
More information about the Gluster-devel