From b3023927a4916cf86f2c08d9be0aa1dc58326fe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Wed, 2 Feb 2011 12:22:49 +0000 Subject: [PATCH] const or not const that is the question, whether we're on mac or on a different system; refs #22 --- openssl-act-engine/src/CertificateList.cpp | 8 ++- openssl-act-engine/src/engine_sct.cpp | 8 ++- qt/makefile | 7 +- swisssurfer/src/makefile.am | 11 ++- swisssurfer/src/swisssurfer_de.ts | 80 +++++++++++----------- swisssurfer/src/swisssurfer_en.ts | 80 +++++++++++----------- swisssurfer/src/swisssurfer_fr.ts | 80 +++++++++++----------- swisssurfer/src/swisssurfer_it.ts | 80 +++++++++++----------- 8 files changed, 187 insertions(+), 167 deletions(-) diff --git a/openssl-act-engine/src/CertificateList.cpp b/openssl-act-engine/src/CertificateList.cpp index 7a606aa..998b2f1 100644 --- a/openssl-act-engine/src/CertificateList.cpp +++ b/openssl-act-engine/src/CertificateList.cpp @@ -22,6 +22,12 @@ #include #include +#if defined win32 || defined linux +#define CONST_OR_NOTCONST const +#else +#define CONST_OR_NOTCONST +#endif + CertificateList::CertificateList() : m_num_certs(0) @@ -130,7 +136,7 @@ void CertificateList::init(SlotList& slots) for(cert_map_t::const_iterator it = cert_temp_map.begin(); it != cert_temp_map.end();++it) { const act::Blob& certblob = it->first; - unsigned char *cbp = const_cast(&certblob[0]); + CONST_OR_NOTCONST unsigned char *cbp = const_cast(&certblob[0]); cert_p->cert = d2i_X509(NULL, &cbp, certblob.size()); diff --git a/openssl-act-engine/src/engine_sct.cpp b/openssl-act-engine/src/engine_sct.cpp index 141ddd5..c7ff589 100644 --- a/openssl-act-engine/src/engine_sct.cpp +++ b/openssl-act-engine/src/engine_sct.cpp @@ -28,6 +28,12 @@ #include +#if defined win32 || defined linux +#define CONST_OR_NOTCONST const +#else +#define CONST_OR_NOTCONST +#endif + EVP_PKEY *SecureTokenEngine::encapsule_CardKey(CardKey *ck) { EVP_PKEY* pk(EVP_PKEY_new()); @@ -157,7 +163,7 @@ int SecureTokenEngine::loadCertCtrl(ENGINE *e, load_cert_params *p) return NULL; const act::Blob& certblob = co.getCertBlob(); - unsigned char *cbp = const_cast(&certblob[0]); + CONST_OR_NOTCONST unsigned char *cbp = const_cast(&certblob[0]); p->cert = d2i_X509(NULL, &cbp, certblob.size()); diff --git a/qt/makefile b/qt/makefile index de09eb5..be6723b 100644 --- a/qt/makefile +++ b/qt/makefile @@ -1,4 +1,5 @@ QT=$(shell ls -1 | sed -n 's/\(qt-.*\)\.tar\.gz/\1/p') +PREFIX=/usr/local/trolltech/qt all: build-lin32 build @@ -6,6 +7,7 @@ maintainer-clean: clean -rm -rf ${QT} ${QT}-lin32 install: install-lin32 + rm -rf ${PREFIX} cd ${QT} && make install ${QT}: ${QT}.tar.gz @@ -14,10 +16,11 @@ ${QT}: ${QT}.tar.gz build: ${QT} -cd $< && make confclean - cd $< && (echo "yes" | ./configure -opensource -prefix /usr/local/trolltech/qt) + cd $< && (echo "yes" | ./configure -opensource -prefix ${PREFIX}) cd $< && make install-lin32: + rm -rf ${PREFIX}-32bit cd ${QT}-lin32 && make install ${QT}-lin32: ${QT} @@ -25,7 +28,7 @@ ${QT}-lin32: ${QT} build-lin32: ${QT}-lin32 -cd $< && make confclean - cd $< && (echo "yes" | ./configure -opensource -platform linux-g++-32 -prefix /usr/local/trolltech/qt-32bit) + cd $< && (echo "yes" | ./configure -opensource -platform linux-g++-32 -prefix ${PREFIX}-32bit) cd $< && make .PHONY: maintainer-clean all build install build-lin32 install-lin32 diff --git a/swisssurfer/src/makefile.am b/swisssurfer/src/makefile.am index a593460..66b5fb1 100644 --- a/swisssurfer/src/makefile.am +++ b/swisssurfer/src/makefile.am @@ -17,9 +17,6 @@ QMAKE_TARGET = @PACKAGENAME@ TARGETS = ${QMAKE_TARGET} -EXTRA_SCRIPTS= swisssurfer -bin_SCRIPTS = ${EXTRA_SCRIPTS} - if BUILD_WIN QMAKE_MAKEFILE_WIN = makefile.win.qmake QMAKE_OPTIONS_WIN = ${QMAKE_OPTIONS} -win32 -spec cross-mingw-g++ @@ -69,6 +66,14 @@ ${QMAKE_TARGET_WIN}: ${QMAKE_MAKEFILE_WIN} ${ALL_SRC} $(LANGS:%=@PACKAGENAME@_%. maintainer-clean-local: -rm -rf ${QMAKE_TARGET}.app +install-exec-local: + ( test -f @PACKAGENAME@ && cp @PACKAGENAME@ ${bindir}/ ) \ + || ( test -f @PACKAGENAME@.exe && cp @PACKAGENAME@.exe ${bindir}/ ) \ + || ( test -f @PACKAGENAME@.app && cp -r @PACKAGENAME@.app ${bindir}/ ) + +uninstall-local: + -rm -rf ${bindir}/@PACKAGENAME@{,.exe,.app} + CLEANFILES = ${TARGETS} $(LANGS:%=@PACKAGENAME@_%.qm) \ *.o *.obj qrc_*.cpp ui_*.h moc_*.cpp \ ${QMAKE_TARGET} ${QMAKE_TARGET_WIN} diff --git a/swisssurfer/src/swisssurfer_de.ts b/swisssurfer/src/swisssurfer_de.ts index d912b25..12cba98 100644 --- a/swisssurfer/src/swisssurfer_de.ts +++ b/swisssurfer/src/swisssurfer_de.ts @@ -193,210 +193,210 @@ - + The connection to the proxy server was refused (the proxy server is not accepting requests). the connection to the proxy timed out or the proxy did not reply in time to the request sent - + The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). the Network Access API cannot honor the request because the protocol is not known - + Checking: %1 Opening: %1 - + Reading: %1 Reading: %1% - + Zoom: %1% - + Network connection successful, remote host can be reached. - + The remote server refused the connection (the server is not accepting requests). - + The remote server closed the connection prematurely, before the entire reply was received and processed. - + The remote host name was not found (invalid hostname). - + The connection to the remote server timed out. - + The operation was canceled via calls to abort() or close() before it was finished. - + The SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted. - + The proxy server closed the connection prematurely, before the entire reply was received and processed. - + The proxy host name was not found (invalid proxy hostname). - + The connection to the proxy timed out or the proxy did not reply in time to the request sent. - + The access to the remote content was denied (similar to HTTP error 401). - + The operation requested on the remote content is not permitted. - + The remote content was not found at the server (similar to HTTP error 404). - + The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). - + The Network Access API cannot honor the request because the protocol is not known. - + The requested operation is invalid for this protocol. - + An unknown network-related error was detected. - + An unknown proxy-related error was detected. - + An unknonwn error related to the remote content was detected. - + A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). - + <strong>Unknown network error (code: %1).</string> - + Illegal URL: %1 - + Print Document - + %1 - %2 Back to %1 - %2 statusbar actionBack_hovered %1=url %2=title - + Info: %1 - + done. - + %1 statusbar for hovered link %1=url - + Forbidden: %1 - + Access Denied - + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - + %1 - %2 statusbar actionForward_hovered %1=url %2=title - + %1 - + Save File As ... - + authentication required - + ssl error diff --git a/swisssurfer/src/swisssurfer_en.ts b/swisssurfer/src/swisssurfer_en.ts index d912b25..12cba98 100644 --- a/swisssurfer/src/swisssurfer_en.ts +++ b/swisssurfer/src/swisssurfer_en.ts @@ -193,210 +193,210 @@ - + The connection to the proxy server was refused (the proxy server is not accepting requests). the connection to the proxy timed out or the proxy did not reply in time to the request sent - + The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). the Network Access API cannot honor the request because the protocol is not known - + Checking: %1 Opening: %1 - + Reading: %1 Reading: %1% - + Zoom: %1% - + Network connection successful, remote host can be reached. - + The remote server refused the connection (the server is not accepting requests). - + The remote server closed the connection prematurely, before the entire reply was received and processed. - + The remote host name was not found (invalid hostname). - + The connection to the remote server timed out. - + The operation was canceled via calls to abort() or close() before it was finished. - + The SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted. - + The proxy server closed the connection prematurely, before the entire reply was received and processed. - + The proxy host name was not found (invalid proxy hostname). - + The connection to the proxy timed out or the proxy did not reply in time to the request sent. - + The access to the remote content was denied (similar to HTTP error 401). - + The operation requested on the remote content is not permitted. - + The remote content was not found at the server (similar to HTTP error 404). - + The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). - + The Network Access API cannot honor the request because the protocol is not known. - + The requested operation is invalid for this protocol. - + An unknown network-related error was detected. - + An unknown proxy-related error was detected. - + An unknonwn error related to the remote content was detected. - + A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). - + <strong>Unknown network error (code: %1).</string> - + Illegal URL: %1 - + Print Document - + %1 - %2 Back to %1 - %2 statusbar actionBack_hovered %1=url %2=title - + Info: %1 - + done. - + %1 statusbar for hovered link %1=url - + Forbidden: %1 - + Access Denied - + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - + %1 - %2 statusbar actionForward_hovered %1=url %2=title - + %1 - + Save File As ... - + authentication required - + ssl error diff --git a/swisssurfer/src/swisssurfer_fr.ts b/swisssurfer/src/swisssurfer_fr.ts index d912b25..12cba98 100644 --- a/swisssurfer/src/swisssurfer_fr.ts +++ b/swisssurfer/src/swisssurfer_fr.ts @@ -193,210 +193,210 @@ - + The connection to the proxy server was refused (the proxy server is not accepting requests). the connection to the proxy timed out or the proxy did not reply in time to the request sent - + The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). the Network Access API cannot honor the request because the protocol is not known - + Checking: %1 Opening: %1 - + Reading: %1 Reading: %1% - + Zoom: %1% - + Network connection successful, remote host can be reached. - + The remote server refused the connection (the server is not accepting requests). - + The remote server closed the connection prematurely, before the entire reply was received and processed. - + The remote host name was not found (invalid hostname). - + The connection to the remote server timed out. - + The operation was canceled via calls to abort() or close() before it was finished. - + The SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted. - + The proxy server closed the connection prematurely, before the entire reply was received and processed. - + The proxy host name was not found (invalid proxy hostname). - + The connection to the proxy timed out or the proxy did not reply in time to the request sent. - + The access to the remote content was denied (similar to HTTP error 401). - + The operation requested on the remote content is not permitted. - + The remote content was not found at the server (similar to HTTP error 404). - + The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). - + The Network Access API cannot honor the request because the protocol is not known. - + The requested operation is invalid for this protocol. - + An unknown network-related error was detected. - + An unknown proxy-related error was detected. - + An unknonwn error related to the remote content was detected. - + A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). - + <strong>Unknown network error (code: %1).</string> - + Illegal URL: %1 - + Print Document - + %1 - %2 Back to %1 - %2 statusbar actionBack_hovered %1=url %2=title - + Info: %1 - + done. - + %1 statusbar for hovered link %1=url - + Forbidden: %1 - + Access Denied - + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - + %1 - %2 statusbar actionForward_hovered %1=url %2=title - + %1 - + Save File As ... - + authentication required - + ssl error diff --git a/swisssurfer/src/swisssurfer_it.ts b/swisssurfer/src/swisssurfer_it.ts index d912b25..12cba98 100644 --- a/swisssurfer/src/swisssurfer_it.ts +++ b/swisssurfer/src/swisssurfer_it.ts @@ -193,210 +193,210 @@ - + The connection to the proxy server was refused (the proxy server is not accepting requests). the connection to the proxy timed out or the proxy did not reply in time to the request sent - + The proxy requires authentication in order to honour the request but did not accept any credentials offered (if any). the Network Access API cannot honor the request because the protocol is not known - + Checking: %1 Opening: %1 - + Reading: %1 Reading: %1% - + Zoom: %1% - + Network connection successful, remote host can be reached. - + The remote server refused the connection (the server is not accepting requests). - + The remote server closed the connection prematurely, before the entire reply was received and processed. - + The remote host name was not found (invalid hostname). - + The connection to the remote server timed out. - + The operation was canceled via calls to abort() or close() before it was finished. - + The SSL/TLS handshake failed and the encrypted channel could not be established. The sslErrors() signal should have been emitted. - + The proxy server closed the connection prematurely, before the entire reply was received and processed. - + The proxy host name was not found (invalid proxy hostname). - + The connection to the proxy timed out or the proxy did not reply in time to the request sent. - + The access to the remote content was denied (similar to HTTP error 401). - + The operation requested on the remote content is not permitted. - + The remote content was not found at the server (similar to HTTP error 404). - + The remote server requires authentication to serve the content but the credentials provided were not accepted (if any). - + The Network Access API cannot honor the request because the protocol is not known. - + The requested operation is invalid for this protocol. - + An unknown network-related error was detected. - + An unknown proxy-related error was detected. - + An unknonwn error related to the remote content was detected. - + A breakdown in protocol was detected (parsing error, invalid or unexpected responses, etc.). - + <strong>Unknown network error (code: %1).</string> - + Illegal URL: %1 - + Print Document - + %1 - %2 Back to %1 - %2 statusbar actionBack_hovered %1=url %2=title - + Info: %1 - + done. - + %1 statusbar for hovered link %1=url - + Forbidden: %1 - + Access Denied - + <p>Access denied due to security considerations.</p><p>You are not allowed to connect to %1. - + %1 - %2 statusbar actionForward_hovered %1=url %2=title - + %1 - + Save File As ... - + authentication required - + ssl error