From 392ad41ba0c0d61d65e2c218ebf3b1a951a4c30a Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 6 Aug 2009 13:47:25 +0200 Subject: Fix WebKit compilation outside of Qt. WebKit's .pro file uses shell commands that use QMAKE_MOVE/MOVE. The Symbian generator propagates DEL_FILE, but forgot to also propagate MOVE, like it is done for example in unixmake2.cpp. --- qmake/generators/symbian/symmake_abld.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp index 17c365d..e537df9 100644 --- a/qmake/generators/symbian/symmake_abld.cpp +++ b/qmake/generators/symbian/symmake_abld.cpp @@ -190,6 +190,7 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl; t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; + t << "MOVE = " << var("QMAKE_MOVE") << endl; t << "XCOPY = xcopy /d /f /h /r /y /i" << endl; t << "ABLD = ABLD.BAT" << endl; t << "DEBUG_PLATFORMS = " << debugPlatforms.join(" ") << endl; -- cgit v0.12 From ed35633a5953d9d1f52b910347c778a5ddc622d2 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 6 Aug 2009 13:52:31 +0200 Subject: Fix WebKit compilation outside of Qt with SBS. Propagate QMAKE_MOVE similar to commit 392ad41ba0c0d61d65e2c218ebf3b1a951a4c30a. Reviewed-by: Miikka Heikkinen --- qmake/generators/symbian/symmake_sbsv2.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp index 34585e8..885d8a6 100644 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ b/qmake/generators/symbian/symmake_sbsv2.cpp @@ -133,6 +133,7 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo t << "QMAKE = " << Option::fixPathToTargetOS(var("QMAKE_QMAKE")) << endl; t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; + t << "MOVE = " << var("QMAKE_MOVE") << endl; t << "DEBUG_PLATFORMS = " << debugPlatforms.join(" ") << endl; t << "RELEASE_PLATFORMS = " << releasePlatforms.join(" ") << endl; t << "MAKE = make" << endl; -- cgit v0.12 From 30adf7d302b75b6af57196932ca619a9c2087db7 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 6 Aug 2009 13:58:57 +0200 Subject: Fix extern WebKit build that uses qmake generators. WebCore.pro's generators use QMAKE_DEL, which when used with del.exe works if the file is present or not. In the QMAKE_SH branch QMAKE_DEL is mapped to rm, which complaints if the file to delete doesn't exist. Similar to del.exe and unix.conf use rm -f instead of rm for QMAKE_DEL in the QMAKE_SH branch. Reviewed-by: Miikka Heikkinen --- mkspecs/common/symbian/symbian.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index 554bf85..65bb69d 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -77,7 +77,7 @@ QMAKE_LIBS_S60 = -lavkon -leikcoctl QMAKE_COPY = cp QMAKE_COPY_DIR = cp -r QMAKE_MOVE = mv - QMAKE_DEL_FILE = rm + QMAKE_DEL_FILE = rm -f QMAKE_MKDIR = mkdir QMAKE_DEL_DIR = rmdir QMAKE_CHK_DIR_EXISTS = test -d -- cgit v0.12 From 60e2c80ba7f0d4657ca99d5bd90bf2e81b4cf1c5 Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Thu, 6 Aug 2009 14:18:40 +0200 Subject: Move socket wrapper functions into the .cpp file. These functions were in the header, but didn't really need to be since they are used by one source file (if at all). Since the header file is included by other platforms, let's move them rather than ifdef'ing them. --- src/network/socket/qnativesocketengine_p.h | 126 ------------------------ src/network/socket/qnativesocketengine_unix.cpp | 126 ++++++++++++++++++++++++ 2 files changed, 126 insertions(+), 126 deletions(-) diff --git a/src/network/socket/qnativesocketengine_p.h b/src/network/socket/qnativesocketengine_p.h index f522aff..e9e6986 100644 --- a/src/network/socket/qnativesocketengine_p.h +++ b/src/network/socket/qnativesocketengine_p.h @@ -67,132 +67,6 @@ QT_BEGIN_NAMESPACE -static inline int qt_socket_connect(int s, const struct sockaddr * addrptr, socklen_t namelen) -{ - return ::connect(s, addrptr, namelen); -} -#if defined(connect) -# undef connect -#endif - -static inline int qt_socket_bind(int s, const struct sockaddr * addrptr, socklen_t namelen) -{ - return ::bind(s, addrptr, namelen); -} -#if defined(bind) -# undef bind -#endif - -static inline int qt_socket_write(int socket, const char *data, qint64 len) -{ - return ::write(socket, data, len); -} -#if defined(write) -# undef write -#endif - -static inline int qt_socket_read(int socket, char *data, qint64 len) -{ - return ::read(socket, data, len); -} -#if defined(read) -# undef read -#endif - -static inline int qt_socket_recv(int socket, void *data, size_t length, int flags) -{ - return ::recv(socket, data, length, flags); -} -#if defined(recv) -# undef recv -#endif - -static inline int qt_socket_recvfrom(int socket, void *data, size_t length, - int flags, struct sockaddr *address, - socklen_t *address_length) -{ - return ::recvfrom(socket, data, length, flags, address, address_length); -} -#if defined(recvfrom) -# undef recvfrom -#endif - -static inline int qt_socket_sendto(int socket, const void *data, size_t length, - int flags, const struct sockaddr *dest_addr, - socklen_t dest_length) -{ - return ::sendto(socket, data, length, flags, dest_addr, dest_length); -} -#if defined(sendto) -# undef sendto -#endif -static inline int qt_socket_close(int socket) -{ - return ::close(socket); -} -#if defined(close) -# undef close -#endif - -static inline int qt_socket_fcntl(int socket, int command, int option) -{ - return ::fcntl(socket, command, option); -} -#if defined(fcntl) -# undef fcntl -#endif - -static inline int qt_socket_ioctl(int socket, int command, char *option) -{ - return ::ioctl(socket, command, option); -} -#if defined(ioctl) -# undef ioctl -#endif - -static inline int qt_socket_getsockname(int socket, struct sockaddr *address, socklen_t *address_len) -{ - return ::getsockname(socket, address, address_len); -} -#if defined(getsockname) -# undef getsockname -#endif - -static inline int qt_socket_getpeername(int socket, struct sockaddr *address, socklen_t *address_len) -{ - return ::getpeername(socket, address, address_len); -} -#if defined(getpeername) -# undef getpeername -#endif - -static inline int qt_socket_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout) -{ - return ::select(nfds, readfds, writefds, exceptfds, timeout); -} - -#if defined(select) -# undef select -#endif - -static inline int qt_socket_getsockopt(int socket, int level, int optname, void *optval, socklen_t *optlen) -{ - return ::getsockopt(socket, level, optname, optval, optlen); -} - -#if defined(getsockopt) -# undef getsockopt -#endif - -static inline int qt_socket_setsockopt(int socket, int level, int optname, void *optval, socklen_t optlen) -{ - return ::setsockopt(socket, level, optname, optval, optlen); -} - -#if defined(setsockopt) -# undef setsockopt -#endif - // Use our own defines and structs which we know are correct # define QT_SS_MAXSIZE 128 # define QT_SS_ALIGNSIZE (sizeof(qint64)) diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp index 5df9769..423050e 100644 --- a/src/network/socket/qnativesocketengine_unix.cpp +++ b/src/network/socket/qnativesocketengine_unix.cpp @@ -79,6 +79,132 @@ QT_BEGIN_NAMESPACE #if defined QNATIVESOCKETENGINE_DEBUG +static inline int qt_socket_connect(int s, const struct sockaddr * addrptr, socklen_t namelen) +{ + return ::connect(s, addrptr, namelen); +} +#if defined(connect) +# undef connect +#endif + +static inline int qt_socket_bind(int s, const struct sockaddr * addrptr, socklen_t namelen) +{ + return ::bind(s, addrptr, namelen); +} +#if defined(bind) +# undef bind +#endif + +static inline int qt_socket_write(int socket, const char *data, qint64 len) +{ + return ::write(socket, data, len); +} +#if defined(write) +# undef write +#endif + +static inline int qt_socket_read(int socket, char *data, qint64 len) +{ + return ::read(socket, data, len); +} +#if defined(read) +# undef read +#endif + +static inline int qt_socket_recv(int socket, void *data, size_t length, int flags) +{ + return ::recv(socket, data, length, flags); +} +#if defined(recv) +# undef recv +#endif + +static inline int qt_socket_recvfrom(int socket, void *data, size_t length, + int flags, struct sockaddr *address, + socklen_t *address_length) +{ + return ::recvfrom(socket, data, length, flags, address, address_length); +} +#if defined(recvfrom) +# undef recvfrom +#endif + +static inline int qt_socket_sendto(int socket, const void *data, size_t length, + int flags, const struct sockaddr *dest_addr, + socklen_t dest_length) +{ + return ::sendto(socket, data, length, flags, dest_addr, dest_length); +} +#if defined(sendto) +# undef sendto +#endif +static inline int qt_socket_close(int socket) +{ + return ::close(socket); +} +#if defined(close) +# undef close +#endif + +static inline int qt_socket_fcntl(int socket, int command, int option) +{ + return ::fcntl(socket, command, option); +} +#if defined(fcntl) +# undef fcntl +#endif + +static inline int qt_socket_ioctl(int socket, int command, char *option) +{ + return ::ioctl(socket, command, option); +} +#if defined(ioctl) +# undef ioctl +#endif + +static inline int qt_socket_getsockname(int socket, struct sockaddr *address, socklen_t *address_len) +{ + return ::getsockname(socket, address, address_len); +} +#if defined(getsockname) +# undef getsockname +#endif + +static inline int qt_socket_getpeername(int socket, struct sockaddr *address, socklen_t *address_len) +{ + return ::getpeername(socket, address, address_len); +} +#if defined(getpeername) +# undef getpeername +#endif + +static inline int qt_socket_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout) +{ + return ::select(nfds, readfds, writefds, exceptfds, timeout); +} + +#if defined(select) +# undef select +#endif + +static inline int qt_socket_getsockopt(int socket, int level, int optname, void *optval, socklen_t *optlen) +{ + return ::getsockopt(socket, level, optname, optval, optlen); +} + +#if defined(getsockopt) +# undef getsockopt +#endif + +static inline int qt_socket_setsockopt(int socket, int level, int optname, void *optval, socklen_t optlen) +{ + return ::setsockopt(socket, level, optname, optval, optlen); +} + +#if defined(setsockopt) +# undef setsockopt +#endif + /* Returns a human readable representation of the first \a len characters in \a data. -- cgit v0.12