Summary: Looks like some platforms fail to build (open source, not internal) due to #if conditional.
Reviewed By: @ldemailly
Differential Revision:
D2464555
} // namespace
-size_t strlcpy(char* dest, const char* const src, size_t size) {
- size_t len = strlen(src);
- if (size != 0) {
- size_t n = std::min(len, size - 1); // always null terminate!
- memcpy(dest, src, n);
- dest[n] = '\0';
- }
- return len;
-}
-
size_t demangle(const char* name, char* out, size_t outSize) {
DemangleBuf dbuf;
dbuf.dest = out;
#endif
+size_t strlcpy(char* dest, const char* const src, size_t size) {
+ size_t len = strlen(src);
+ if (size != 0) {
+ size_t n = std::min(len, size - 1); // always null terminate!
+ memcpy(dest, src, n);
+ dest[n] = '\0';
+ }
+ return len;
+}
+
} // folly