- size_t len = strlen (str) + 1;
- char *res = (char *)malloc (len);
- if (res) memcpy (res, str, len);
- return res;
-}
+ long long quot; /* Quotient. */
+ long long rem; /* Remainder. */
+} lldiv_t;
+#endif
+
+#if !defined(HAVE_GETENV) || \
+ !defined(HAVE_USELOCALE)
+# include <stddef.h> /* NULL */
+#endif
+
+#ifndef HAVE_REWIND
+# include <stdio.h> /* FILE */
+#endif
+
+#if !defined (HAVE_STRLCPY) || \
+ !defined (HAVE_STRNDUP) || \
+ !defined (HAVE_STRNLEN) || \
+ !defined (HAVE_GETCWD)
+# include <stddef.h> /* size_t */