wince: replace getpid by GetCurrentProcessId
authorPierre Ynard <linkfanel@yahoo.fr>
Sat, 9 May 2009 15:20:46 +0000 (17:20 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 14 May 2009 18:18:23 +0000 (20:18 +0200)
Signed-off-by: Geoffroy Couprie <geo.couprie@gmail.com>
(cherry picked from commit d93246d2d334a21021ab004e99dff22d601fb8ab)

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
src/config/file.c
src/modules/cache.c

index 0b2ba42..6c411f2 100644 (file)
@@ -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);
index 2c190e0..89d1a99 100644 (file)
@@ -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;