diff options
author | novel <novel@FreeBSD.org> | 2017-01-17 01:06:39 +0800 |
---|---|---|
committer | novel <novel@FreeBSD.org> | 2017-01-17 01:06:39 +0800 |
commit | 73e4b594d42cc6d180ccaf7d9d3251576c0f74f8 (patch) | |
tree | f357f53c4fb58343ca0d49c337996da4dd0f63e9 /astro | |
parent | 1100df832b6e5f759812386b642773a8102938a8 (diff) | |
download | freebsd-ports-graphics-73e4b594d42cc6d180ccaf7d9d3251576c0f74f8.tar.gz freebsd-ports-graphics-73e4b594d42cc6d180ccaf7d9d3251576c0f74f8.tar.zst freebsd-ports-graphics-73e4b594d42cc6d180ccaf7d9d3251576c0f74f8.zip |
astro/xplanet: fix build with libc++ 4.0 and gcc6
PR: 216035
Reported by: jbeich
Obtained from: upstream
Diffstat (limited to 'astro')
-rw-r--r-- | astro/xplanet/files/patch-null-comparison-fix | 150 |
1 files changed, 150 insertions, 0 deletions
diff --git a/astro/xplanet/files/patch-null-comparison-fix b/astro/xplanet/files/patch-null-comparison-fix new file mode 100644 index 00000000000..f03de03a6ec --- /dev/null +++ b/astro/xplanet/files/patch-null-comparison-fix @@ -0,0 +1,150 @@ +Index: src/libmultiple/RayleighScattering.cpp +=================================================================== +--- src/libmultiple/RayleighScattering.cpp (revision 206) ++++ src/libmultiple/RayleighScattering.cpp (revision 207) +@@ -369,7 +369,7 @@ + + diskTemplate_.clear(); + limbTemplate_.clear(); +- while (inFile.getline(line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline(line, MAX_LINE_LENGTH, '\n')) + { + int i = 0; + while (isDelimiter(line[i])) +@@ -439,7 +439,7 @@ + values.clear(); + + char line[MAX_LINE_LENGTH]; +- while (inFile.getline(line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline(line, MAX_LINE_LENGTH, '\n')) + { + int i = 0; + while (isDelimiter(line[i])) +@@ -470,7 +470,7 @@ + double &value) + { + char line[MAX_LINE_LENGTH]; +- while (inFile.getline(line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline(line, MAX_LINE_LENGTH, '\n')) + { + int i = 0; + while (isDelimiter(line[i])) +Index: src/libmultiple/drawStars.cpp +=================================================================== +--- src/libmultiple/drawStars.cpp (revision 206) ++++ src/libmultiple/drawStars.cpp (revision 207) +@@ -41,7 +41,7 @@ + ifstream inFile(starMap.c_str()); + + char line[MAX_LINE_LENGTH]; +- while (inFile.getline(line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline(line, MAX_LINE_LENGTH, '\n')) + { + if (line[0] == '#') continue; + +Index: src/readConfig.cpp +=================================================================== +--- src/readConfig.cpp (revision 206) ++++ src/readConfig.cpp (revision 207) +@@ -550,7 +550,7 @@ + + ifstream inFile(configFile.c_str()); + char *line = new char[256]; +- while (inFile.getline(line, 256, '\n') != NULL) ++ while (inFile.getline(line, 256, '\n')) + readConfig(line, planetProperties); + + // This condition will only be true if [default] is the only +Index: src/libannotate/addArcs.cpp +=================================================================== +--- src/libannotate/addArcs.cpp (revision 206) ++++ src/libannotate/addArcs.cpp (revision 207) +@@ -258,7 +258,7 @@ + { + ifstream inFile(arcFile.c_str()); + char *line = new char[MAX_LINE_LENGTH]; +- while (inFile.getline (line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline (line, MAX_LINE_LENGTH, '\n')) + readArcFile(line, planet, view, projection, + planetProperties, annotationMap); + +@@ -292,7 +292,7 @@ + { + ifstream inFile(arcFile.c_str()); + char *line = new char[256]; +- while (inFile.getline (line, 256, '\n') != NULL) ++ while (inFile.getline (line, 256, '\n')) + readArcFile(line, NULL, view, NULL, NULL, annotationMap); + + inFile.close(); +Index: src/libannotate/addMarkers.cpp +=================================================================== +--- src/libannotate/addMarkers.cpp (revision 206) ++++ src/libannotate/addMarkers.cpp (revision 207) +@@ -429,7 +429,7 @@ + { + ifstream inFile(markerFile.c_str()); + char *line = new char[MAX_LINE_LENGTH]; +- while (inFile.getline (line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline (line, MAX_LINE_LENGTH, '\n')) + { + unsigned char color[3]; + memcpy(color, planetProperties->MarkerColor(), 3); +@@ -475,7 +475,7 @@ + { + ifstream inFile(markerFile.c_str()); + char *line = new char[MAX_LINE_LENGTH]; +- while (inFile.getline (line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline (line, MAX_LINE_LENGTH, '\n')) + { + unsigned char color[3]; + memcpy(color, options->Color(), 3); +Index: src/libannotate/addSatellites.cpp +=================================================================== +--- src/libannotate/addSatellites.cpp (revision 206) ++++ src/libannotate/addSatellites.cpp (revision 207) +@@ -488,10 +488,10 @@ + { + ifstream inFile(tleFile.c_str()); + char lines[3][80]; +- while (inFile.getline(lines[0], 80) != NULL) ++ while (inFile.getline(lines[0], 80)) + { +- if ((inFile.getline(lines[1], 80) == NULL) +- || (inFile.getline(lines[2], 80) == NULL)) ++ if ((!inFile.getline(lines[1], 80)) ++ || (!inFile.getline(lines[2], 80))) + { + ostringstream errStr; + errStr << "Malformed TLE file (" << tleFile << ")?\n"; +@@ -542,7 +542,7 @@ + { + ifstream inFile(satFile.c_str()); + char *line = new char[MAX_LINE_LENGTH]; +- while (inFile.getline (line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline (line, MAX_LINE_LENGTH, '\n')) + readSatelliteFile(line, planet, view, projection, + planetProperties, annotationMap); + +Index: src/libannotate/addSpiceObjects.cpp +=================================================================== +--- src/libannotate/addSpiceObjects.cpp (revision 206) ++++ src/libannotate/addSpiceObjects.cpp (revision 207) +@@ -524,7 +524,7 @@ + { + ifstream inFile(kernelFile.c_str()); + char *line = new char[MAX_LINE_LENGTH]; +- while (inFile.getline(line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline(line, MAX_LINE_LENGTH, '\n')) + { + int ii = 0; + while (isDelimiter(line[ii])) +@@ -576,7 +576,7 @@ + { + ifstream inFile(spiceFile.c_str()); + char *line = new char[MAX_LINE_LENGTH]; +- while (inFile.getline(line, MAX_LINE_LENGTH, '\n') != NULL) ++ while (inFile.getline(line, MAX_LINE_LENGTH, '\n')) + readSpiceFile(line, planetsFromSunMap, view, projection, + annotationMap); + inFile.close(); |