+
+#if __DARWIN_UNIX03
+#define const /**/
+#endif
+
+char *
+dirname(const char *path)
+{
+ static char *dname = NULL;
+
+ if (dname == NULL) {
+ dname = (char *)malloc(MAXPATHLEN);
+ if (dname == NULL)
+ return (NULL);
+ }
+ return (dirname_r(path, dname));
+}