Date: Wed, 17 Nov 2010 15:46:22 GMT From: Peter Klett <peter@netkey.at> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/152333: Patch to compile security/saferpay with GCC 4.2 under amd64 Message-ID: <201011171546.oAHFkMLR068325@www.freebsd.org> Resent-Message-ID: <201011171550.oAHFo8n9041037@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 152333 >Category: ports >Synopsis: Patch to compile security/saferpay with GCC 4.2 under amd64 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Nov 17 15:50:08 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Peter Klett >Release: 8.1-RELEASE-p1 >Organization: netkey information technology gmbh >Environment: FreeBSD esoc-web-be-node1.intern 8.1-RELEASE-p1 FreeBSD 8.1-RELEASE-p1 #3: Thu Nov 11 10:07:25 CET 2010 root@esociety-web-be1.intern:/usr/obj/usr/src/sys/ESX amd64 >Description: Attached is a patch to compile security/saferpay with GCC 4.2 under amd64. News Files are: files/patch-jConfigurationSetup.cpp files/patch-jMessageFactory.cpp files/patch-jMessageFactory.h files/patch-jMessageObject.cpp files/patch-jMessageObject.h Only tested with amd64 though :-( >How-To-Repeat: >Fix: Patch attached with submission follows: diff -ruN saferpay.orig/files/patch-jConfigurationSetup.cpp saferpay/files/patch-jConfigurationSetup.cpp --- saferpay.orig/files/patch-jConfigurationSetup.cpp 1970-01-01 01:00:00.000000000 +0100 +++ saferpay/files/patch-jConfigurationSetup.cpp 2010-11-17 16:17:15.000000000 +0100 @@ -0,0 +1,11 @@ +--- saferpay/jConfigurationSetup.cpp.orig 2008-12-19 13:13:09.000000000 +0100 ++++ saferpay/jConfigurationSetup.cpp 2008-12-19 13:12:50.000000000 +0100 +@@ -33,7 +33,7 @@ + IDP_E_UNEXPECTED) + return; + } ++ env->SetIntField(obj, fid, (jlong)CreateConfigurationSetup()); +- env->SetIntField(obj, fid, (jint)CreateConfigurationSetup()); + } + + JNIEXPORT void JNICALL Java_soplex_saferpay_ConfigurationSetup_nDestruct diff -ruN saferpay.orig/files/patch-jMessageFactory.cpp saferpay/files/patch-jMessageFactory.cpp --- saferpay.orig/files/patch-jMessageFactory.cpp 1970-01-01 01:00:00.000000000 +0100 +++ saferpay/files/patch-jMessageFactory.cpp 2010-11-17 16:20:58.000000000 +0100 @@ -0,0 +1,83 @@ +--- saferpay/jMessageFactory.cpp.orig 2008-12-19 13:15:19.000000000 +0100 ++++ saferpay/jMessageFactory.cpp 2008-12-19 13:13:40.000000000 +0100 +@@ -29,7 +29,7 @@ + IDPJNI_THROW1("MessageFactory::Construct(): m_Handle != 0", IDP_E_UNEXPECTED) + return; + } ++ env->SetIntField(obj, fid, (jlong)CreateMessageFactory()); +- env->SetIntField(obj, fid, (jint)CreateMessageFactory()); + } + + JNIEXPORT void JNICALL Java_soplex_saferpay_MessageFactory_nDestruct +@@ -40,7 +40,7 @@ + DestroyMessageFactory(p); + } + ++JNIEXPORT jlong JNICALL Java_soplex_saferpay_MessageFactory_nVerifyPayConfirm +-JNIEXPORT jint JNICALL Java_soplex_saferpay_MessageFactory_nVerifyPayConfirm + (JNIEnv *env, jobject obj, jstring Data, jstring Signature) + { + IDPCIMPL_MessageFactory *p = 0; +@@ -53,7 +53,7 @@ + + try + { ++ jlong r = (jlong)p->VerifyPayConfirm(mbstoSTRING(pszData), mbstoSTRING(pszSignature)); +- jint r = (jint)p->VerifyPayConfirm(mbstoSTRING(pszData), mbstoSTRING(pszSignature)); + env->ReleaseStringUTFChars(Data, pszData); + env->ReleaseStringUTFChars(Signature, pszSignature); + return r; +@@ -104,7 +104,7 @@ + env->ReleaseStringUTFChars(Path, pszPath); + } + ++JNIEXPORT jlong JNICALL Java_soplex_saferpay_MessageFactory_nCreatePayInit +-JNIEXPORT jint JNICALL Java_soplex_saferpay_MessageFactory_nCreatePayInit + (JNIEnv *env, jobject obj) + { + IDPCIMPL_MessageFactory *p = 0; +@@ -114,7 +114,7 @@ + + try + { ++ return (jlong)p->CreatePayInit(); +- return (jint)p->CreatePayInit(); + } + catch(IDP_Exception e) + { +@@ -132,7 +132,7 @@ + } + } + ++JNIEXPORT jlong JNICALL Java_soplex_saferpay_MessageFactory_nCreatePayComplete +-JNIEXPORT jint JNICALL Java_soplex_saferpay_MessageFactory_nCreatePayComplete + (JNIEnv *env, jobject obj, jstring Id, jstring Token) + { + IDPCIMPL_MessageFactory *p = 0; +@@ -145,7 +145,7 @@ + + try + { ++ jlong r = (jlong)p->CreatePayComplete(mbstoSTRING(pszId), mbstoSTRING(pszToken)); +- jint r = (jint)p->CreatePayComplete(mbstoSTRING(pszId), mbstoSTRING(pszToken)); + env->ReleaseStringUTFChars(Id, pszId); + env->ReleaseStringUTFChars(Token, pszToken); + return r; +@@ -168,7 +168,7 @@ + } + } + ++JNIEXPORT jlong JNICALL Java_soplex_saferpay_MessageFactory_nCreateRequest +-JNIEXPORT jint JNICALL Java_soplex_saferpay_MessageFactory_nCreateRequest + (JNIEnv *env, jobject obj, jstring MsgType) + { + IDPCIMPL_MessageFactory *p = 0; +@@ -180,7 +180,7 @@ + + try + { ++ jlong r = (jlong)p->CreateRequest(mbstoSTRING(pszMsgType)); +- jint r = (jint)p->CreateRequest(mbstoSTRING(pszMsgType)); + env->ReleaseStringUTFChars(MsgType, pszMsgType); + return r; + } diff -ruN saferpay.orig/files/patch-jMessageFactory.h saferpay/files/patch-jMessageFactory.h --- saferpay.orig/files/patch-jMessageFactory.h 1970-01-01 01:00:00.000000000 +0100 +++ saferpay/files/patch-jMessageFactory.h 2010-11-17 16:21:20.000000000 +0100 @@ -0,0 +1,38 @@ +--- saferpay/jMessageFactory.h.orig 2008-12-19 13:15:44.000000000 +0100 ++++ saferpay/jMessageFactory.h 2008-12-19 13:13:46.000000000 +0100 +@@ -12,7 +12,7 @@ + * Method: nVerifyPayConfirm + * Signature: (Ljava/lang/String;Ljava/lang/String;)I + */ ++JNIEXPORT jlong JNICALL Java_soplex_saferpay_MessageFactory_nVerifyPayConfirm +-JNIEXPORT jint JNICALL Java_soplex_saferpay_MessageFactory_nVerifyPayConfirm + (JNIEnv *, jobject, jstring, jstring); + + /* +@@ -44,7 +44,7 @@ + * Method: nCreatePayInit + * Signature: ()I + */ ++JNIEXPORT jlong JNICALL Java_soplex_saferpay_MessageFactory_nCreatePayInit +-JNIEXPORT jint JNICALL Java_soplex_saferpay_MessageFactory_nCreatePayInit + (JNIEnv *, jobject); + + /* +@@ -52,7 +52,7 @@ + * Method: nCreatePayComplete + * Signature: (Ljava/lang/String;Ljava/lang/String;)I + */ ++JNIEXPORT jlong JNICALL Java_soplex_saferpay_MessageFactory_nCreatePayComplete +-JNIEXPORT jint JNICALL Java_soplex_saferpay_MessageFactory_nCreatePayComplete + (JNIEnv *, jobject, jstring Id, jstring Token); + + /* +@@ -60,7 +60,7 @@ + * Method: nCreateRequest + * Signature: (Ljava/lang/String;)I + */ ++JNIEXPORT jlong JNICALL Java_soplex_saferpay_MessageFactory_nCreateRequest +-JNIEXPORT jint JNICALL Java_soplex_saferpay_MessageFactory_nCreateRequest + (JNIEnv *env, jobject obj, jstring MsgType); + + #ifdef __cplusplus diff -ruN saferpay.orig/files/patch-jMessageObject.cpp saferpay/files/patch-jMessageObject.cpp --- saferpay.orig/files/patch-jMessageObject.cpp 1970-01-01 01:00:00.000000000 +0100 +++ saferpay/files/patch-jMessageObject.cpp 2010-11-17 16:21:49.000000000 +0100 @@ -0,0 +1,29 @@ +--- saferpay/jMessageObject.cpp.orig 2008-12-19 13:17:10.000000000 +0100 ++++ saferpay/jMessageObject.cpp 2008-12-19 13:16:25.000000000 +0100 +@@ -30,7 +30,7 @@ + IDPJNI_THROW1("MessageObject::Construct(): m_Handle != 0", IDP_E_UNEXPECTED) + return; + } ++ env->SetIntField(obj, fid, (jlong)CreateMessageObject()); +- env->SetIntField(obj, fid, (jint)CreateMessageObject()); + } + + JNIEXPORT void JNICALL Java_soplex_saferpay_MessageObject_nDestruct +@@ -169,7 +169,7 @@ + } + } + ++JNIEXPORT jlong JNICALL Java_soplex_saferpay_MessageObject_nExecute +-JNIEXPORT jint JNICALL Java_soplex_saferpay_MessageObject_nExecute + (JNIEnv *env, jobject obj) + { + IDPCIMPL_MessageObject *p; +@@ -178,7 +178,7 @@ + + try + { ++ return (jlong)p->Execute(); +- return (jint)p->Execute(); + } + catch(IDP_Exception e) + { diff -ruN saferpay.orig/files/patch-jMessageObject.h saferpay/files/patch-jMessageObject.h --- saferpay.orig/files/patch-jMessageObject.h 1970-01-01 01:00:00.000000000 +0100 +++ saferpay/files/patch-jMessageObject.h 2010-11-17 16:22:05.000000000 +0100 @@ -0,0 +1,12 @@ +--- saferpay/jMessageObject.h.orig 2008-12-19 13:17:21.000000000 +0100 ++++ saferpay/jMessageObject.h 2008-12-19 13:16:20.000000000 +0100 +@@ -52,7 +52,7 @@ + * Method: nExecute + * Signature: ()I; + */ ++JNIEXPORT jlong JNICALL Java_soplex_saferpay_MessageObject_nExecute +-JNIEXPORT jint JNICALL Java_soplex_saferpay_MessageObject_nExecute + (JNIEnv *, jobject); + + /* + >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011171546.oAHFkMLR068325>