]> git.sesse.net Git - vlc/commitdiff
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 0b2ba422c36e911c1dc1801d96b376d5b2a617f2..6c411f23ed9308c07c889b69aac826845a45c6b9 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 2c190e0b6509cab8806a9a4899b54f13584e760b..89d1a99a6d51f0a798c25fc33b2133097c058f5e 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;