1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-02 06:03:50 +00:00

Fix C++ issues for 12.0

- Unixify the files using dos2unix
- Add patches to fix the C++ issues in the code
- Dump PORTREVISION
This commit is contained in:
Rodrigo Osorio 2018-07-03 09:55:25 +00:00
parent 3430af7176
commit 512c79437f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=473814
4 changed files with 63 additions and 0 deletions

View File

@ -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}

View File

@ -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;

View File

@ -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;

View File

@ -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)
{