kou commented on code in PR #54656:
URL: https://github.com/apache/arrow/pull/54656#discussion_r4320966515


##########
cpp/src/arrow/vendored/musl/strptime.c:
##########
@@ -17,12 +17,29 @@
 
 #undef HAVE_LANGINFO
 
-#ifndef _WIN32
+#if !defined(_WIN32) && !defined(ARROW_TEST_FALLBACK_LANGINFO)
 #define HAVE_LANGINFO 1
 #endif
 
 #ifdef HAVE_LANGINFO
 #include <langinfo.h>
+#else
+// C-locale replacement for nl_langinfo(), restricted to the items used below.
+// The constants follow the glibc/musl layout that the symbolic_range loop
+// relies on: full names directly follow the abbreviated ones.
+enum { ABDAY_1 = 0, DAY_1 = 7, ABMON_1 = 14, MON_1 = 26, AM_STR = 38, PM_STR = 
39,
+       D_T_FMT = 40, D_FMT = 41, T_FMT = 42, T_FMT_AMPM = 43 };
+static const char *arrow_c_langinfo[] = {
+       "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
+       "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", 
"Saturday",
+       "Jan", "Feb", "Mar", "Apr", "May", "Jun",
+       "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
+       "January", "February", "March", "April", "May", "June",
+       "July", "August", "September", "October", "November", "December",
+       "AM", "PM",
+       "%a %b %e %T %Y", "%m/%d/%y", "%H:%M:%S", "%I:%M:%S %p"};

Review Comment:
   Could you mention where the values come from?



##########
cpp/src/arrow/vendored/musl/strptime.c:
##########
@@ -17,12 +17,29 @@
 
 #undef HAVE_LANGINFO
 
-#ifndef _WIN32
+#if !defined(_WIN32) && !defined(ARROW_TEST_FALLBACK_LANGINFO)

Review Comment:
   Why do we need this change? It seems that `ARROW_TEST_FALLBACK_LANGINFO` 
isn't defined.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to