(M17260): Separate U+6CBF, J90-3168 and C1-4E58.
[chise/xemacs-chise.git] / src / realpath.c
index 9f7489e..f81bab6 100644 (file)
@@ -22,25 +22,20 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include <sys/types.h>
-#if defined(HAVE_UNISTD_H) || defined(STDC_HEADERS)
-#include <unistd.h>
-#endif
 #include <stdio.h>
 #include <string.h>
+#include <errno.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 #ifdef _POSIX_VERSION
 #include <limits.h>                    /* for PATH_MAX */
 #else
 #include <sys/param.h>                 /* for MAXPATHLEN */
 #endif
-#include <errno.h>
-#ifndef STDC_HEADERS
-extern int errno;
-#endif
 
 #ifdef WINDOWSNT
 #include <direct.h>
@@ -62,19 +57,14 @@ extern int errno;
 
 #define MAX_READLINKS 32
 
-#ifdef __STDC__
-char *xrealpath(const char *path, char resolved_path [])
-#else
-char *xrealpath(path, resolved_path)
-const char *path;
-char resolved_path [];
-#endif
+char *
+xrealpath (const char *path, char resolved_path [])
 {
   char copy_path[PATH_MAX];
   char *new_path = resolved_path;
   char *max_path;
-  int readlinks = 0;
 #ifdef S_IFLNK
+  int readlinks = 0;
   char link_path[PATH_MAX];
   int n;
 #endif