-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Made it build on EPICS 3.14.12.6, all unit tests pass. #3
Conversation
Ha, I didn't know about std::stoul and friends. Could you also add a travis-ci job for 3.14? This should be as simple as copying the 3.15 job and changing to "BASE=3.14". |
FYI. like |
I addressed std::sto* properly but haven't pushed it yet. I was trying out travis integration and it pointed out a linker problem that I've been fighting since then. Basically tools/info.cpp doesn't link in my epicsParse* functions and I can't figure out what's wrong with it. It's both C++ code, but I did try with extern "C" to no avail. I figured it wouldn't hurt to add epicsShareFunc too, although doesn't have any change on Linux/g++. nm finds the functions and obviously they are part of .so since they're used by other functions, so I'm clueless. Any tips? |
You're on the right track. However, try |
With PVXS_API it seems to be just working now. Travis jobs were failing in my local repo too, but succeeded when I restarted them. Not related to this patch. |
Can you have a look at #4? The main difference is to remove use of |
src/util.cpp
Outdated
try { | ||
size_t idx; | ||
epicsInt8 v = (std::stoi(s, &idx, base) & 0xff); | ||
if (idx == std::string(s).length()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creating temporary std::string
s like this is not so efficient. strlen()
is entirely appropriate. Or if you want to be super efficient, test if s[idx]=='\0'
. As I read it idx
will always point to a valid character, which includes the nil.
epicsEnvUnset("EPICS_PVA_BROADCAST_PORT"); | ||
//epicsEnvUnset("EPICS_PVA_ADDR_LIST"); | ||
//epicsEnvUnset("EPICS_PVA_AUTO_ADDR_LIST"); | ||
//epicsEnvUnset("EPICS_PVA_BROADCAST_PORT"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd forgotten that this was such a recent addition.
Superseded by #4 |
No description provided.