diff options
author | Rodrigo Osorio <rodrigo@FreeBSD.org> | 2018-07-03 09:55:25 +0000 |
---|---|---|
committer | Rodrigo Osorio <rodrigo@FreeBSD.org> | 2018-07-03 09:55:25 +0000 |
commit | 512c79437f6fb0546f78d1a8c67d61df1a4a718d (patch) | |
tree | 57c22cedc56c55c4ff4021e7af23057da7b9813a /www/dfileserver | |
parent | 3430af717641b62d66739b73f98d1c93444c2b5f (diff) | |
download | ports-512c79437f6fb0546f78d1a8c67d61df1a4a718d.tar.gz ports-512c79437f6fb0546f78d1a8c67d61df1a4a718d.zip |
Fix C++ issues for 12.0
- Unixify the files using dos2unix
- Add patches to fix the C++ issues in the code
- Dump PORTREVISION
Notes
Notes:
svn path=/head/; revision=473814
Diffstat (limited to 'www/dfileserver')
-rw-r--r-- | www/dfileserver/Makefile | 3 | ||||
-rw-r--r-- | www/dfileserver/files/patch-src_CPathResolver.cxx | 11 | ||||
-rw-r--r-- | www/dfileserver/files/patch-src_DashFileServer.cxx | 13 | ||||
-rw-r--r-- | www/dfileserver/files/patch-src_contrib_Base64.cpp | 36 |
4 files changed, 63 insertions, 0 deletions
diff --git a/www/dfileserver/Makefile b/www/dfileserver/Makefile index 31c3326c968c..8cc5fe22b813 100644 --- a/www/dfileserver/Makefile +++ b/www/dfileserver/Makefile @@ -3,6 +3,7 @@ PORTNAME= DFileServer PORTVERSION= 1.1.3 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://rodrigo.osorio.free.fr/freebsd/distfiles/ \ http://harpy.soarwitheagles.net/~dashy/ @@ -12,6 +13,8 @@ COMMENT= Compact webserver designed to make sharing files easy LICENSE= BSD3CLAUSE +USES= dos2unix + PLIST_FILES= bin/dfileserver WRKSRC= ${WRKDIR}/${PORTNAME} diff --git a/www/dfileserver/files/patch-src_CPathResolver.cxx b/www/dfileserver/files/patch-src_CPathResolver.cxx new file mode 100644 index 000000000000..9199fc4379eb --- /dev/null +++ b/www/dfileserver/files/patch-src_CPathResolver.cxx @@ -0,0 +1,11 @@ +--- src/CPathResolver.cxx.orig 2018-07-02 11:45:26 UTC ++++ src/CPathResolver.cxx +@@ -100,7 +100,7 @@ CPathResolver::CPathResolver( string Con + mPaths = new SPathNode(); + + ifstream Config( ConfigFile.c_str(), ios::in ); +- if( Config == NULL ) throw( (exn_t)EXN_IO ); ++ if( ! Config.is_open() ) throw( (exn_t)EXN_IO ); + + while( !Config.eof() ) { + string Fake, Real; diff --git a/www/dfileserver/files/patch-src_DashFileServer.cxx b/www/dfileserver/files/patch-src_DashFileServer.cxx new file mode 100644 index 000000000000..73cedd2ad804 --- /dev/null +++ b/www/dfileserver/files/patch-src_DashFileServer.cxx @@ -0,0 +1,13 @@ +--- src/DashFileServer.cxx.orig 2018-07-02 11:55:29 UTC ++++ src/DashFileServer.cxx +@@ -218,8 +218,8 @@ int InitalizeNetwork ( int ArgPort, int + memset(&(ListenAddr.sin_zero), '\0', 8); + + // Bind the socket to the listening network struct. +- if ( bind( NetworkSocket, (struct sockaddr *)&ListenAddr, +- sizeof( struct sockaddr ) ) == -1 ) ++ if ( ::bind( NetworkSocket, (struct sockaddr *)&ListenAddr, ++ sizeof( struct sockaddr ) ) == -1) + { + perror("InitalizeNetwork -- bind()"); + return -1; diff --git a/www/dfileserver/files/patch-src_contrib_Base64.cpp b/www/dfileserver/files/patch-src_contrib_Base64.cpp new file mode 100644 index 000000000000..8d7fc4f0b8d3 --- /dev/null +++ b/www/dfileserver/files/patch-src_contrib_Base64.cpp @@ -0,0 +1,36 @@ +--- src/contrib/Base64.cpp.orig 2005-09-30 05:15:19 UTC ++++ src/contrib/Base64.cpp +@@ -27,11 +27,12 @@ static string cvt = "ABCDEFGHIJKLM + + string Base64::encode(string data) + { +- auto string::size_type i; +- auto char c; +- auto string::size_type len = data.length(); +- auto string ret; ++ std::string::size_type i; ++ std::string::size_type len; ++ char c; ++ string ret; + ++ len = data.length(); + for (i = 0; i < len; ++i) + { + c = (data[i] >> 2) & 0x3f; +@@ -71,11 +72,11 @@ string Base64::encode(string data) + + string Base64::decode(string data) + { +- auto string::size_type i; +- auto char c; +- auto char c1; +- auto string::size_type len = data.length(); +- auto string ret; ++ string::size_type i; ++ char c; ++ char c1; ++ string::size_type len = data.length(); ++ string ret; + + for (i = 0; i < len; ++i) + { |