From d72b07f4aa8aac8b4466e5b05e3ddd158cd514b0 Mon Sep 17 00:00:00 2001 From: doursse Date: Sun, 11 May 2008 09:32:52 +0000 Subject: [PATCH] add wrapper around GetCurrentProcessId() SVN revision: 34536 --- legacy/evil/ChangeLog | 6 ++++++ legacy/evil/src/lib/Evil.h | 18 ++++++++++++++++++ legacy/evil/src/lib/evil.c | 6 ++++++ 3 files changed, 30 insertions(+) diff --git a/legacy/evil/ChangeLog b/legacy/evil/ChangeLog index 1d1faf6d06..ef38c79775 100644 --- a/legacy/evil/ChangeLog +++ b/legacy/evil/ChangeLog @@ -1,3 +1,9 @@ +2008-05-11 Vincent Torri + + * src/lib/Evil.h: + * src/lib/evil.c (getpid): + add wrapper around GetCurrentProcessId() + 2008-05-10 Vincent Torri * src/lib/dlfcn/dlfcn.c: (dladdr): diff --git a/legacy/evil/src/lib/Evil.h b/legacy/evil/src/lib/Evil.h index db17e50288..ba812f5b23 100644 --- a/legacy/evil/src/lib/Evil.h +++ b/legacy/evil/src/lib/Evil.h @@ -200,6 +200,24 @@ EAPI int fcntl(int fd, int cmd, ...); */ EAPI int mkstemp(char *template); +/** + * @brief Return the process identifier of the calling process. + * + * @return The process ID. + * + * Return the process identifier of the calling process. Until + * the process terminates, the process identifier uniquely + * identifies the process throughout the system. + * + * Conformity: Not appliclable. + * + * Supported OS: Windows 98, Windows Me, Windows NT, Windows 2000, + * Windows XP. + * + * @ingroup Evil + */ +EAPI pid_t getpid(void); + /** * @brief Create a shell link. * diff --git a/legacy/evil/src/lib/evil.c b/legacy/evil/src/lib/evil.c index d096a9fa18..ec68421b5b 100644 --- a/legacy/evil/src/lib/evil.c +++ b/legacy/evil/src/lib/evil.c @@ -118,6 +118,12 @@ mkstemp(char *template) return fd; } +pid_t +getpid(void) +{ + return (pid_t)GetCurrentProcessId(); +} + /* REMARK: Windows has no symbolic link. */ /* Nevertheless, it can create and read .lnk files */ int