[OpenFPGA Code] Patch syntax compatibility for older gcc
This commit is contained in:
parent
d4bac95cd4
commit
fc6bfdc7a2
|
@ -4,6 +4,7 @@
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
* Include header files that are required by function declaration
|
* Include header files that are required by function declaration
|
||||||
*******************************************************************/
|
*******************************************************************/
|
||||||
|
#include <stddef.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
|
|
|
@ -140,7 +140,7 @@ float string_to_unit(const std::string& scale) {
|
||||||
/* Invalid unit report error */
|
/* Invalid unit report error */
|
||||||
VTR_LOGF_ERROR(__FILE__, __LINE__,
|
VTR_LOGF_ERROR(__FILE__, __LINE__,
|
||||||
"Invalid unit %s!\nAcceptable units are [a|f|p|n|u|k|M|B|T] or empty\n",
|
"Invalid unit %s!\nAcceptable units are [a|f|p|n|u|k|M|B|T] or empty\n",
|
||||||
scale);
|
scale.c_str());
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,13 +153,13 @@ float string_to_time_unit(const std::string& scale) {
|
||||||
&& (2 != scale.length()) ) {
|
&& (2 != scale.length()) ) {
|
||||||
VTR_LOGF_ERROR(__FILE__, __LINE__,
|
VTR_LOGF_ERROR(__FILE__, __LINE__,
|
||||||
"Time unit (='%s') must contain only one or two characters!\n",
|
"Time unit (='%s') must contain only one or two characters!\n",
|
||||||
scale);
|
scale.c_str());
|
||||||
}
|
}
|
||||||
/* The last character must be 's' */
|
/* The last character must be 's' */
|
||||||
if ('s' != scale.back()) {
|
if ('s' != scale.back()) {
|
||||||
VTR_LOGF_ERROR(__FILE__, __LINE__,
|
VTR_LOGF_ERROR(__FILE__, __LINE__,
|
||||||
"Time unit (='%s') must end with 's'!\n",
|
"Time unit (='%s') must end with 's'!\n",
|
||||||
scale);
|
scale.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
float unit = 1.;
|
float unit = 1.;
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
* Include header files required by the data structure definition
|
* Include header files required by the data structure definition
|
||||||
*******************************************************************/
|
*******************************************************************/
|
||||||
|
#include <stddef.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
/* Begin namespace openfpga */
|
/* Begin namespace openfpga */
|
||||||
|
|
Loading…
Reference in New Issue