summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblythe%netscape.com <devnull@localhost>2002-02-05 19:24:59 +0000
committerblythe%netscape.com <devnull@localhost>2002-02-05 19:24:59 +0000
commit01e570721dba48780989fe4c6df0c414a3e16643 (patch)
tree0a6f3f5bac23f445401f074e1931664bfd808dc4
parent7e18b17c1a90adea6691f935c2131e710a9fa184 (diff)
downloadnspr-hg-01e570721dba48780989fe4c6df0c414a3e16643.tar.gz
Get rid of some warnings and link errors.
Work in progress.
-rw-r--r--pr/src/io/prfile.c2
-rw-r--r--pr/src/io/prio.c8
-rw-r--r--pr/src/io/priometh.c2
-rw-r--r--pr/src/io/prlog.c7
-rw-r--r--pr/src/io/prsocket.c2
5 files changed, 14 insertions, 7 deletions
diff --git a/pr/src/io/prfile.c b/pr/src/io/prfile.c
index 0307b97d..07b7801d 100644
--- a/pr/src/io/prfile.c
+++ b/pr/src/io/prfile.c
@@ -705,7 +705,7 @@ PR_IMPLEMENT(PRStatus) PR_CreatePipe(
#pragma unused (readPipe, writePipe)
#endif
-#ifdef WIN32
+#if defined(WIN32) && !defined(WINCE)
HANDLE readEnd, writeEnd;
SECURITY_ATTRIBUTES pipeAttributes;
diff --git a/pr/src/io/prio.c b/pr/src/io/prio.c
index 71a3e652..0cefe003 100644
--- a/pr/src/io/prio.c
+++ b/pr/src/io/prio.c
@@ -68,10 +68,12 @@ void _PR_InitIO(void)
/*
* WINCE has some oddity of _getstdfilex to determine stdin, et. al.
* As unsure what that code actually does, just get fileno here.
+ *
+ * How odd, _fileno returns a void*, so cast it...
*/
- _pr_stdin = PR_AllocFileDesc(_fileno(stdin), methods);
- _pr_stdout = PR_AllocFileDesc(_fileno(stdout), methods);
- _pr_stderr = PR_AllocFileDesc(_fileno(stderr), methods);
+ _pr_stdin = PR_AllocFileDesc((PRInt32)_fileno(stdin), methods);
+ _pr_stdout = PR_AllocFileDesc((PRInt32)_fileno(stdout), methods);
+ _pr_stderr = PR_AllocFileDesc((PRInt32)_fileno(stderr), methods);
#endif
#else
_pr_stdin = PR_AllocFileDesc(0, methods);
diff --git a/pr/src/io/priometh.c b/pr/src/io/priometh.c
index b9279fad..4a54304d 100644
--- a/pr/src/io/priometh.c
+++ b/pr/src/io/priometh.c
@@ -360,7 +360,7 @@ PR_IMPLEMENT(PRInt32) PR_EmulateSendFile(
goto done;
}
if (sfd->file_nbytes &&
- (info.size < (sfd->file_offset + sfd->file_nbytes))) {
+ ((PRUint32)info.size < (sfd->file_offset + sfd->file_nbytes))) {
/*
* there are fewer bytes in file to send than specified
*/
diff --git a/pr/src/io/prlog.c b/pr/src/io/prlog.c
index d79952a6..5c8ac12b 100644
--- a/pr/src/io/prlog.c
+++ b/pr/src/io/prlog.c
@@ -507,7 +507,12 @@ PR_IMPLEMENT(void) PR_LogFlush(void)
PR_IMPLEMENT(void) PR_Abort(void)
{
PR_LogPrint("Aborting");
+
+#if !defined(WINCE)
abort();
+#else
+ TerminateProcess(GetCurrentProcess(), 3 /* exit code, same as abort */);
+#endif
}
#if defined(XP_OS2)
@@ -541,7 +546,7 @@ PR_IMPLEMENT(void) PR_Assert(const char *s, const char *file, PRIntn ln)
DebugBreak();
#endif
#ifndef XP_MAC
- abort();
+ PR_Abort();
#endif
}
diff --git a/pr/src/io/prsocket.c b/pr/src/io/prsocket.c
index eca44852..57f09fcc 100644
--- a/pr/src/io/prsocket.c
+++ b/pr/src/io/prsocket.c
@@ -64,7 +64,7 @@ static PRBool IsValidNetAddrLen(const PRNetAddr *addr, PRInt32 addr_len)
#ifdef XP_UNIX
&& (addr->raw.family != AF_UNIX)
#endif
- && (PR_NETADDR_SIZE(addr) != addr_len)) {
+ && (PR_NETADDR_SIZE(addr) != (PRUintn)addr_len)) {
#if defined(LINUX) && __GLIBC__ == 2 && __GLIBC_MINOR__ == 1
/*
* In glibc 2.1, struct sockaddr_in6 is 24 bytes. In glibc 2.2