/* ----------------------------------------------------------------------- */
+/***********************************************************
+* Time-related functions *
+***********************************************************/
+
+/* At least Solaris, and probably others, don't have this */
+
+#ifndef _BSD_SOURCE
+
+# include <time.h>
+# include <stdlib.h>
+
+time_t
+timegm(struct tm * tm)
+{
+time_t ret;
+char *tz;
+
+tz = getenv("TZ");
+setenv("TZ", "", 1);
+tzset();
+ret = mktime(tm);
+if (tz)
+ setenv("TZ", tz, 1);
+else
+ unsetenv("TZ");
+tzset();
+return ret;
+}
+
+#endif
+
+/* ----------------------------------------------------------------------- */
+
if (ele[len]) /* not nul-terminated */
ele = string_copyn(ele, len);
- if (strnlen(CS ele, len) == len) /* ignore any with embedded nul */
+ if (Ustrlen(ele) == len) /* ignore any with embedded nul */
list = string_append_listele(list, sep,
match == -1 ? string_sprintf("%s=%s", tag, ele) : ele);
}