+ String file_name = elem (i);
+ String sep = ::to_string (DIRSEP);
+ String right (file_name.right_string (1));
+ if (file_name.length () && right != sep)
+ file_name += ::to_string (DIRSEP);
+
+ file_name += name;
+
+#if 0 /* Check if directory. TODO: encapsulate for autoconf */
+ struct stat sbuf;
+ if (stat (file_name.to_str0 (), &sbuf) != 0)
+ continue;
+
+ if (! (sbuf.st_mode & __S_IFREG))
+ continue;
+#endif
+#if !STAT_MACROS_BROKEN
+
+ struct stat sbuf;
+ if (stat (file_name.to_str0 (), &sbuf) != 0)
+ continue;
+
+ if (S_ISDIR (sbuf.st_mode))
+ continue;
+#endif