<p>I don't think it is worth adding a dependency on glib and dragging in the whole glib library. That is likely to cause more problems than it solves.</p>
<div class="gmail_quote">On Jun 6, 2012 4:46 AM, "Shawn" <<a href="mailto:shawnlandden@gmail.com">shawnlandden@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><br><div class="gmail_quote">On Mon, Jun 4, 2012 at 10:42 PM, bjcheny <span dir="ltr"><<a href="mailto:companycy@gmail.com" target="_blank">companycy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

hi shawn,<div><br></div><div>This function exists in glib, other than glibc.</div><div>Glib is not necessarily existing on every platforms, I guss.</div><div>At least, it's missing from my Mac.</div><div>Although it may work as desired, we need to ask for additional lib.</div>

</blockquote><div><br></div><div>yes it is a new lib</div><div><br></div><div>however, it does exist on OSX</div><div><br></div><div><a href="http://www.gtk.org/download/macos.php" target="_blank">http://www.gtk.org/download/macos.php</a> </div>

<div><br></div><div>to only install glib you would probably use macports or something. I don't use mac. We would just ship with the source perhaps.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><br></div><div><div class="gmail_quote">2012/6/5 shawn <span dir="ltr"><<a href="mailto:shawnlandden@gmail.com" target="_blank">shawnlandden@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div>
<br>
from tempfile.c<br>
==<br>
<br>
* It would be nice if we could use a standard function, but I don't<br>
* think any of them are adequate: we need to control the extension<br>
* and know the filename.  tmpfile() does not give back the filename.<br>
* tmpnam() is insecure.  mkstemp() does not allow us to set the<br>
* extension.<br>
*<br>
* It sucks that there is no standard function.  The implementation<br>
* below is inspired by the __gen_tempname() code in glibc; hopefully<br>
* it will be secure on all platforms.<br>
<br>
===<br>
well, such a thing DOES exist, in glib:<br>
<br>
<a href="http://developer.gnome.org/glib/2.33/glib-File-Utilities.html#g-mkstemp" target="_blank">http://developer.gnome.org/glib/2.33/glib-File-Utilities.html#g-mkstemp</a><br>
<br>
interested in switching?<br>
==<br>
<br>
<br>
gint                g_mkstemp                           (gchar *tmpl);<br>
<br>
Opens a temporary file. See the mkstemp() documentation on most<br>
UNIX-like systems.<br>
<br>
The parameter is a string that should follow the rules for mkstemp()<br>
templates, i.e. contain the string "XXXXXX". g_mkstemp() is slightly<br>
more flexible than mkstemp() in that the sequence does not have to occur<br>
at the very end of the template. The X string will be modified to form<br>
the name of a file that didn't exist. The string should be in the GLib<br>
file name encoding. Most importantly, on Windows it should be in UTF-8.<br>
<br>
tmpl :<br>
template filename. [type filename]<br>
<br>
Returns :<br>
A file handle (as from open()) to the file opened for reading and<br>
writing. The file is opened in binary mode on platforms where there is a<br>
difference. The file handle should be closed with close(). In case of<br>
errors, -1 is returned and errno will be set.<br>
<br></div></div>
__<br>
distcc mailing list            <a href="http://distcc.samba.org/" target="_blank">http://distcc.samba.org/</a><br>
To unsubscribe or change options:<br>
<a href="https://lists.samba.org/mailman/listinfo/distcc" target="_blank">https://lists.samba.org/mailman/listinfo/distcc</a><br>
</blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><br>---<br>Shawn Landden<br><br>
<br>__<br>
distcc mailing list            <a href="http://distcc.samba.org/" target="_blank">http://distcc.samba.org/</a><br>
To unsubscribe or change options:<br>
<a href="https://lists.samba.org/mailman/listinfo/distcc" target="_blank">https://lists.samba.org/mailman/listinfo/distcc</a><br></blockquote></div>