[w3m-dev 04143] Patch for OS/2

* config.h.in: ifdef HAVE_SETPGRP
* configure.in: define USE_BINMODE_STREAM for *os2-emx*
* islang.c: ULONG -> unsigned long
* main.c: ULONG -> unsigned long
This commit is contained in:
Fumitoshi UKAI
2005-02-26 17:06:44 +00:00
parent fa58752f06
commit 088e2bc30b
4 changed files with 8 additions and 5 deletions

View File

@@ -145,12 +145,15 @@ typedef long clen_t;
#undef HAVE_LANGINFO_CODESET
#undef SETPGRP_VOID
#ifdef HAVE_SETPGRP
#ifdef SETPGRP_VOID
#define SETPGRP() setpgrp()
#else
#define SETPGRP() setpgrp(0,0)
#endif
#else /* no HAVE_SETPGRP; OS/2 EMX */
#define SETPGRP() setpgid(0, 0)
#endif
#undef HAVE_FLOAT_H
#undef HAVE_SYS_SELECT_H

View File

@@ -110,7 +110,7 @@ AC_DEFINE(AUXBIN_TARGETS, "$AUXBIN_TARGETS")
AC_SUBST(USE_BINMODE_STREAM)
case "$host_os" in
*cygwin*)
*cygwin*|*os2-emx*)
AC_DEFINE(USE_BINMODE_STREAM)
;;
esac

View File

@@ -18,7 +18,7 @@ main(int argc, char **argv)
return 1;
if (isdigit((int)*argv[1])) {
ULONG CpList[8], CpSize;
unsigned long CpList[8], CpSize;
APIRET rc = DosQueryCp(sizeof(CpList), CpList, &CpSize);
if (rc)
return rc;

4
main.c
View File

@@ -1,4 +1,4 @@
/* $Id: main.c,v 1.246 2004/09/29 15:44:03 ukai Exp $ */
/* $Id: main.c,v 1.247 2005/02/26 17:06:44 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -5673,7 +5673,7 @@ searchKeyNum(void)
static char *
getCodePage(void)
{
ULONG CpList[8], CpSize;
unsigned long CpList[8], CpSize;
if (!getenv("WINDOWID") && !DosQueryCp(sizeof(CpList), CpList, &CpSize))
return Sprintf("CP%d", *CpList)->ptr;