38 lines
927 B
Text
38 lines
927 B
Text
$NetBSD: patch-aa,v 1.4 2009/08/08 05:20:02 tnn Exp $
|
|
|
|
--- tree.c.orig 2007-06-11 22:22:06.000000000 +0900
|
|
+++ tree.c
|
|
@@ -17,7 +17,9 @@
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*/
|
|
|
|
+#if defined(__linux__)
|
|
#include <features.h>
|
|
+#endif
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <time.h>
|
|
@@ -179,10 +181,12 @@ char *sLevel, *curdir, *outfilename = NU
|
|
FILE *outfile;
|
|
int *dirs, maxdirs;
|
|
|
|
-#ifdef CYGWIN
|
|
+#ifndef MB_CUR_MAX
|
|
+# ifdef CYGWIN
|
|
extern int MB_CUR_MAX;
|
|
-#else
|
|
+# else
|
|
extern size_t MB_CUR_MAX;
|
|
+# endif
|
|
#endif
|
|
|
|
int main(int argc, char **argv)
|
|
@@ -619,7 +623,7 @@ void listdir(char *d, int *dt, int *ft,
|
|
if (!noindent) indent();
|
|
|
|
path[0] = 0;
|
|
-#ifdef __USE_FILE_OFFSET64
|
|
+#if defined(__linux__) && defined(__USE_FILE_OFFSET64)
|
|
if (inodeflag) sprintf(path," %7lld",(*dir)->inode);
|
|
#else
|
|
if (inodeflag) sprintf(path," %7ld",(*dir)->inode);
|