[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freewnn:00079] hpux patch (Re: malloc define)
- To: freewnn@tomo.tomo.gr.jp
- Subject: [freewnn:00079] hpux patch (Re: malloc define)
- From: Katsuomi Hamajima/濱嶋克臣<hamajima@XXXX>
- Date: Wed, 18 Aug 1999 13:45:10 +0900
- In-Reply-To: Your message of "Wed, 18 Aug 1999 01:03:26 +0900"
- References: <199908171559.AAA22631@pop1.ngy.3web.ne.jp>
- Reply-To: freewnn@tomo.gr.jp
濱嶋@YDCです
> "1.1.1-a003" 用のやつでお願いします。フルアーカイブは以下↓にあります。
HP-UX 11.0対応のパッチです。9.05と11.0のccとgccで確認しています
HP-UX 10.Xでもconfigureは通ります(cppのパスが11.0と同じなので)が、手元に
マシンが無いためコンパイルの確認はしていません
あと、永江さんが[freewnn:00036]で流したNetBSD対応パッチと、その後の
OpenBSD対応が含まれています
--
濱嶋 克臣 (Katsuomi Hamajima) E-mail hamajima@ydc.co.jp
横河ディジタルコンピュータ(株) 中部支社 システム部
diff -rc FreeWnn-1.1.1-a003/Xsi/Wnn/etc/msg.c Xsi/Wnn/etc/msg.c
*** FreeWnn-1.1.1-a003/Xsi/Wnn/etc/msg.c Wed Jul 28 01:29:11 1999
--- hpux/Xsi/Wnn/etc/msg.c Mon Aug 16 15:22:16 1999
***************
*** 59,64 ****
--- 59,73 ----
extern char *getenv();
+ #ifdef hpux
+ void *
+ bsearch(ky, bs, nel, width, compar)
+ const void *ky;
+ const void *bs;
+ size_t nel;
+ size_t width;
+ int (*compar)(const void *, const void *);
+ #else
static char *
bsearch(ky, bs, nel, width, compar)
char *ky;
***************
*** 66,71 ****
--- 75,81 ----
unsigned long nel;
unsigned long width;
int (*compar)();
+ #endif /* hpux */
{
char *key = ky;
char *base = bs;
diff -rc FreeWnn-1.1.1-a003/Xsi/Wnn/include/wnn_malloc.h Xsi/Wnn/include/wnn_malloc.h
*** FreeWnn-1.1.1-a003/Xsi/Wnn/include/wnn_malloc.h Mon Feb 8 11:40:59 1999
--- hpux/Xsi/Wnn/include/wnn_malloc.h Mon Aug 16 15:22:20 1999
***************
*** 40,48 ****
--- 40,54 ----
#ifndef WNN_MALLOC
#define WNN_MALLOC
+ #ifdef hpux
+ extern void *malloc0(size_t);
+ extern void free0(void *);
+ extern void *realloc0(void *, size_t);
+ #else
extern char *malloc0();
extern void free0();
extern char *realloc0();
+ #endif /* hpux */
#define malloc(s) malloc0(s)
#define free(p) free0(p)
diff -rc FreeWnn-1.1.1-a003/Xsi/Wnn/jlib/js.c Xsi/Wnn/jlib/js.c
*** FreeWnn-1.1.1-a003/Xsi/Wnn/jlib/js.c Mon May 17 12:04:45 1999
--- hpux/Xsi/Wnn/jlib/js.c Wed Aug 18 13:18:24 1999
***************
*** 70,77 ****
*/
- extern char *malloc();
-
#include <stdio.h>
#include <ctype.h>
#ifdef UX386
--- 70,75 ----
***************
*** 103,109 ****
--- 101,111 ----
#include "../etc/bdic.c"
#include "../etc/pwd.c"
+ #ifdef hpux
+ void *malloc(size_t);
+ #else
char *malloc();
+ #endif /* hpux */
#ifdef SYSVR2
#define bzero(adr,n) memset((adr),0,(n))
diff -rc FreeWnn-1.1.1-a003/Xsi/Wnn/jserver/malloc.c Xsi/Wnn/jserver/malloc.c
*** FreeWnn-1.1.1-a003/Xsi/Wnn/jserver/malloc.c Mon Feb 8 12:11:06 1999
--- hpux/Xsi/Wnn/jserver/malloc.c Mon Aug 16 15:22:33 1999
***************
*** 44,57 ****
--- 44,70 ----
#undef realloc
#undef free
+ #ifdef hpux
+ extern void *malloc(size_t);
+ extern void free(void *);
+ extern void *realloc(void *, size_t);
+ extern void *calloc(size_t, size_t);
+ #else
extern char *malloc();
extern void free();
extern char *realloc();
extern char *calloc();
+ #endif /* hpux */
+ #ifdef hpux
+ void *
+ malloc0(size)
+ size_t size;
+ #else
char *
malloc0(size)
int size;
+ #endif /* hpux */
{
if(size == NULL){
size = 1;
***************
*** 60,78 ****
--- 73,104 ----
return(calloc(size,1));
}
+ #ifdef hpux
+ void
+ free0(pter)
+ void *pter;
+ #else
void
free0(pter)
char *pter;
+ #endif /* hpux */
{
if(pter == NULL) return;
free(pter);
return;
}
+ #ifdef hpux
+ void *
+ realloc0(pter,size)
+ void *pter;
+ size_t size;
+ #else
char *
realloc0(pter,size)
char *pter;
int size;
+ #endif /* hpux */
{
if(size == NULL){
size = 1;
diff -rc FreeWnn-1.1.1-a003/Xsi/configure Xsi/configure
*** FreeWnn-1.1.1-a003/Xsi/configure Wed Aug 11 00:56:02 1999
--- hpux/Xsi/configure Wed Aug 18 13:20:55 1999
***************
*** 704,710 ****
CPP=/lib/cpp
fi
;;
! "FreeBSD"|"NetBSD"|"OpenBSD")
CCOPTIONS="-DCSRG_BASED"
CDEBUGFLAGS="-O2 -fno-strength-reduce"
if test -x /usr/libexec/cpp; then
--- 704,710 ----
CPP=/lib/cpp
fi
;;
! "FreeBSD")
CCOPTIONS="-DCSRG_BASED"
CDEBUGFLAGS="-O2 -fno-strength-reduce"
if test -x /usr/libexec/cpp; then
***************
*** 757,762 ****
--- 757,767 ----
A.09.*)
if test -x /lib/cpp; then
CPP=/lib/cpp
+ fi
+ ;;
+ B.10.*|B.11.*)
+ if test -x /lib/cpp; then
+ CPP=/opt/langtools/lbin/cpp
fi
;;
*)
diff -rc FreeWnn-1.1.1-a003/Xsi/configure.in Xsi/configure.in
*** FreeWnn-1.1.1-a003/Xsi/configure.in Wed Aug 11 00:56:02 1999
--- hpux/Xsi/configure.in Wed Aug 18 13:21:49 1999
***************
*** 54,60 ****
CPP=/lib/cpp
fi
;;
! "FreeBSD"|"NetBSD"|"OpenBSD")
CCOPTIONS="-DCSRG_BASED"
CDEBUGFLAGS="-O2 -fno-strength-reduce"
if test -x /usr/libexec/cpp; then
--- 54,60 ----
CPP=/lib/cpp
fi
;;
! "FreeBSD")
CCOPTIONS="-DCSRG_BASED"
CDEBUGFLAGS="-O2 -fno-strength-reduce"
if test -x /usr/libexec/cpp; then
***************
*** 92,98 ****
fi
;;
*)
! { echo "configure: error: "This system is not supported."" 1>&2; exit 1; }
;;
esac
;;
--- 92,98 ----
fi
;;
*)
! AC_MSG_ERROR("This system is not supported.")
;;
esac
;;
***************
*** 109,116 ****
CPP=/lib/cpp
fi
;;
*)
! { echo "configure: error: "This system is not supported."" 1>&2; exit 1; }
;;
esac
;;
--- 109,121 ----
CPP=/lib/cpp
fi
;;
+ B.10.*|B.11.*)
+ if test -x /lib/cpp; then
+ CPP=/opt/langtools/lbin/cpp
+ fi
+ ;;
*)
! AC_MSG_ERROR("This system is not supported.")
;;
esac
;;