[vlc-devel] commit: wince: replace getpid by GetCurrentProcessId (Pierre Ynard )
git version control
git at videolan.org
Thu May 14 23:21:13 CEST 2009
vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Sat May 9 17:20:46 2009 +0200| [91116db9656d8135f6e0e6091fef9134f58f34e0] | committer: Jean-Baptiste Kempf
wince: replace getpid by GetCurrentProcessId
Signed-off-by: Geoffroy Couprie <geo.couprie at gmail.com>
(cherry picked from commit d93246d2d334a21021ab004e99dff22d601fb8ab)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=91116db9656d8135f6e0e6091fef9134f58f34e0
---
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 0b2ba42..6c411f2 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 2c190e0..89d1a99 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;
More information about the vlc-devel
mailing list