GCC-11 compatibility for xc3sprog

This commit is contained in:
layman
2021-05-18 11:08:43 +02:00
parent 39a88ca39d
commit 572b933b01
3 changed files with 60 additions and 6 deletions
@@ -0,0 +1,41 @@
diff -urN xc3sprog-9999.orig/bitfile.cpp xc3sprog-9999/bitfile.cpp
--- xc3sprog-9999.orig/bitfile.cpp 2021-05-18 10:59:54.579686957 +0200
+++ xc3sprog-9999/bitfile.cpp 2021-05-18 11:05:54.542944129 +0200
@@ -35,7 +35,7 @@
#include <time.h>
#include "bitrev.h"
-using namespace std;
+//using namespace std;
BitFile::BitFile()
: length(0)
@@ -607,14 +607,14 @@
return clip;
}
-void BitFile::error(const string &str)
+void BitFile::error(const std::string &str)
{
errorStr=str;
Error=true;
fprintf(logfile,"%s\n",str.c_str());
}
-void BitFile::readField(string &field, FILE *fp)
+void BitFile::readField(std::string &field, FILE *fp)
{
byte t[2];
fread(t,1,2,fp);
diff -urN xc3sprog-9999.orig/srecfile.cpp xc3sprog-9999/srecfile.cpp
--- xc3sprog-9999.orig/srecfile.cpp 2021-05-18 10:59:54.613019051 +0200
+++ xc3sprog-9999/srecfile.cpp 2021-05-18 11:06:12.015624765 +0200
@@ -28,7 +28,7 @@
#include <string.h>
#include <stdlib.h>
-using namespace std;
+//using namespace std;
int SrecFile::DecodeSRecordLine(char *source, unsigned char *dest, S_Record *SRec)
{