add get_pid() which returns getpid().

2008-02-07  Michael Natterer  <mitch@gimp.org>

	* app/base/base-utils.[ch]: add get_pid() which returns getpid().

	* app/base/base.c
	* app/base/tile-swap.c
	* app/core/gimp-utils.c
	* app/plug-in/gimppluginshm.c
	* app/widgets/gimpselectiondata.c
	* tools/pdbgen/pdb/misc.pdb: use it instead of getpid() and remove
	all the #ifdef'ed includes getpid() needs.

	* tools/pdbgen/app.pl: remove support for these includes. Also
	remove some perl cruft in the include handling which is not needed
	any longer.

	* app/pdb/misc_cmds.c: regenerated.


svn path=/trunk/; revision=24827
This commit is contained in:
Michael Natterer
2008-02-07 13:19:15 +00:00
committed by Michael Natterer
parent ce7e0c224c
commit 3a66deae00
11 changed files with 51 additions and 86 deletions

View File

@ -26,18 +26,6 @@
#include <langinfo.h>
#endif
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <glib.h>
#ifdef G_OS_WIN32
#include <process.h>
#endif
#include <glib-object.h>
#include <gobject/gvaluecollector.h>
@ -48,6 +36,8 @@
#include "core-types.h"
#include "base/base-utils.h"
#include "config/gimpbaseconfig.h"
#include "gimp.h"
@ -491,7 +481,7 @@ gimp_get_temp_filename (Gimp *gimp,
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
if (id == 0)
pid = getpid ();
pid = get_pid ();
if (extension)
basename = g_strdup_printf ("gimp-temp-%d%d.%s", pid, id++, extension);