From: Sebastian Schuberth <sschuberth@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH 1/2] MinGW: Use pid_t more consequently, introduce uid_t for greater compatibility
Date: Tue, 29 Dec 2009 02:18:46 +0100 [thread overview]
Message-ID: <hhbldr$di8$1@ger.gmane.org> (raw)
MinGW: Use pid_t more consequently, introduce uid_t for greater compatibility
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
---
compat/mingw.h | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/compat/mingw.h b/compat/mingw.h
index b3d299f..af2f810 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -6,6 +6,7 @@
*/
typedef int pid_t;
+typedef int uid_t;
#define hstrerror strerror
#define S_IFLNK 0120000 /* Symbolic link */
@@ -75,17 +76,17 @@ static inline int symlink(const char *oldpath, const char *newpath)
{ errno = ENOSYS; return -1; }
static inline int fchmod(int fildes, mode_t mode)
{ errno = ENOSYS; return -1; }
-static inline int fork(void)
+static inline pid_t fork(void)
{ errno = ENOSYS; return -1; }
static inline unsigned int alarm(unsigned int seconds)
{ return 0; }
static inline int fsync(int fd)
{ return 0; }
-static inline int getppid(void)
+static inline pid_t getppid(void)
{ return 1; }
static inline void sync(void)
{}
-static inline int getuid()
+static inline uid_t getuid()
{ return 1; }
static inline struct passwd *getpwnam(const char *name)
{ return NULL; }
@@ -117,7 +118,7 @@ static inline int mingw_unlink(const char *pathname)
}
#define unlink mingw_unlink
-static inline int waitpid(pid_t pid, int *status, unsigned options)
+static inline pid_t waitpid(pid_t pid, int *status, unsigned options)
{
if (options == 0)
return _cwait(status, pid, 0);
@@ -158,7 +159,7 @@ int poll(struct pollfd *ufds, unsigned int nfds, int timeout);
struct tm *gmtime_r(const time_t *timep, struct tm *result);
struct tm *localtime_r(const time_t *timep, struct tm *result);
int getpagesize(void); /* defined in MinGW's libgcc.a */
-struct passwd *getpwuid(int uid);
+struct passwd *getpwuid(uid_t uid);
int setitimer(int type, struct itimerval *in, struct itimerval *out);
int sigaction(int sig, struct sigaction *in, struct sigaction *out);
int link(const char *oldpath, const char *newpath);
--
1.6.5.rc2.13.g1be2
next reply other threads:[~2009-12-29 1:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-29 1:18 Sebastian Schuberth [this message]
2009-12-29 21:09 ` [PATCH 1/2] MinGW: Use pid_t more consequently, introduce uid_t for greater compatibility Johannes Sixt
2009-12-30 0:49 ` Sebastian Schuberth
2009-12-30 0:55 ` Erik Faye-Lund
2009-12-30 1:16 ` Sebastian Schuberth
2009-12-30 11:11 ` Johannes Schindelin
2009-12-31 13:50 ` Johannes Sixt
2009-12-31 14:12 ` Johannes Schindelin
2009-12-31 14:14 ` Sebastian Schuberth
2009-12-31 14:20 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='hhbldr$di8$1@ger.gmane.org' \
--to=sschuberth@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.