freebsd-ports/japanese/iv/files/patch-bg
MIHIRA Sanpei Yoshiro c326feac8d Modified to build on 5-current(use gcc 2.95)
Submitted by:	bento
2003-07-09 21:53:42 +00:00

69 lines
2.4 KiB
Text

--- ./src/bin/ibuild/ibcode.c.orig Tue Oct 20 02:58:01 1992
+++ ./src/bin/ibuild/ibcode.c Wed Jul 9 00:22:23 2003
@@ -41,11 +41,26 @@
#include <Unidraw/Graphic/pspaint.h>
#include <InterViews/shape.h>
#include <InterViews/transformer.h>
+
+#if __FreeBSD__ >= 2
+#include <osreldate.h>
+#if (__FreeBSD_cc_version < 400002 && __FreeBSD_version < 500000)
#include <osfcn.h>
+#endif
+#endif
+#if __FreeBSD_cc_version >= 400003
+#include <stdio.h>
+#endif
#include <stdlib.h>
#include <stream.h>
#include <string.h>
+#if (__FreeBSD_version > 500000)
+extern "C" {
+ extern int sprintf(char * __restrict, const char * __restrict, ...);
+}
+#endif
+
/*****************************************************************************/
char* FilterName (const char* name) {
@@ -362,7 +377,7 @@
ButtonStateVar* bsVar = intcomp->GetButtonStateVar();
const char* bsname = bsVar->GetName();
const char* proc = bsVar->GetFuncName();
- boolean export = bsVar->GetExport();
+ boolean getexport = bsVar->GetExport();
const char* subclass = bsVar->GetSubclassName();
if (!bsVar->IsSubclass() && !_emitMain) {
@@ -375,7 +390,7 @@
if (!_bsinitslist->Search(bsname)) {
_bsinitslist->Append(bsname);
- if (export && !_emitMain) {
+ if (getexport && !_emitMain) {
out << " " << bsname;
} else {
out << " " << ButtonClass << "* " << bsname;
@@ -384,7 +399,7 @@
out << bsVar->GetInitial() << ");\n";
if (!_emitMain && proc != nil && *proc != '\0') {
- if (!export || bsVar->IsSubclass()) {
+ if (!getexport || bsVar->IsSubclass()) {
out << " " << bsname << "->SetCoreClass(this);\n";
out <<" "<< bsname<<"->SetCoreFunc("<< "&" << coreclass;
out << "::" << proc << ");\n";
@@ -1598,10 +1613,10 @@
void CodeView::BeginInstantiate (ostream& out) {
InteractorComp* icomp = GetIntComp();
const char* mname = icomp->GetMemberNameVar()->GetName();
- boolean export = icomp->GetMemberNameVar()->GetExport();
+ boolean getexport = icomp->GetMemberNameVar()->GetExport();
const char* classname = icomp->GetClassNameVar()->GetName();
- if (export && !_emitMain) {
+ if (getexport && !_emitMain) {
out << " " << mname << " = new ";
} else {
out << " " << classname << "* ";