From 91116db9656d8135f6e0e6091fef9134f58f34e0 Mon Sep 17 00:00:00 2001 From: Pierre Ynard Date: Sat, 9 May 2009 17:20:46 +0200 Subject: [PATCH] wince: replace getpid by GetCurrentProcessId Signed-off-by: Geoffroy Couprie (cherry picked from commit d93246d2d334a21021ab004e99dff22d601fb8ab) Signed-off-by: Jean-Baptiste Kempf --- src/config/file.c | 8 +++++++- src/modules/cache.c | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/config/file.c b/src/config/file.c index 0b2ba422c3..6c411f23ed 100644 --- a/src/config/file.c +++ b/src/config/file.c @@ -512,7 +512,13 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name, goto error; } - if (asprintf (&temporary, "%s.%u", permanent, getpid ()) == -1) + if (asprintf (&temporary, "%s.%u", permanent, +#ifdef UNDER_CE + GetCurrentProcessId () +#else + getpid () +#endif + ) == -1) { temporary = NULL; module_list_free (list); diff --git a/src/modules/cache.c b/src/modules/cache.c index 2c190e0b65..89d1a99a6d 100644 --- a/src/modules/cache.c +++ b/src/modules/cache.c @@ -508,7 +508,12 @@ void CacheSave( vlc_object_t *p_this, module_bank_t *p_bank ) char psz_tmpname[sizeof (psz_filename) + 12]; snprintf (psz_tmpname, sizeof (psz_tmpname), "%s.%"PRIu32, psz_filename, - (uint32_t)getpid ()); +#ifdef UNDER_CE + (uint32_t)GetCurrentProcessId () +#else + (uint32_t)getpid () +#endif + ); file = utf8_fopen( psz_tmpname, "wb" ); if (file == NULL) goto error; -- 2.39.2