OSDN Git Service

* src/lha_macro.h: getuid(), chown(), kill(), link() are provisionally
authorarai <arai@6a8cc165-1e22-0410-a132-eb4e3f353aba>
Sat, 18 May 2002 15:48:23 +0000 (15:48 +0000)
committerarai <arai@6a8cc165-1e22-0410-a132-eb4e3f353aba>
Sat, 18 May 2002 15:48:23 +0000 (15:48 +0000)
defined as 0.

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/lha/lha/trunk@47 6a8cc165-1e22-0410-a132-eb4e3f353aba

src/lha_macro.h

index fbd40f1..e00a8b1 100644 (file)
 extern struct tm *localtime();
 extern char    *getenv();
 
 extern struct tm *localtime();
 extern char    *getenv();
 
-#ifndef _MINIX
-#ifndef __STDC__
-extern char    *malloc();
-extern char    *realloc();
-#endif
-#endif
+extern char    *xmalloc();
+extern char    *xrealloc();
 
 /* external variables */
 extern int      errno;
 
 /* external variables */
 extern int      errno;
@@ -83,6 +79,13 @@ typedef int                          boolean;
 
 #define FILENAME_LENGTH        1024
 
 
 #define FILENAME_LENGTH        1024
 
+#if defined __MINGW32__
+# define getuid()       0
+# define chown(file, uid, gid)  0
+# define kill(pid, sig)         0
+# define link(from, to)         0
+#endif
+
 /* ------------------------------------------------------------------------ */
 /* YOUR CUSTOMIZIES                                                                                                                    */
 /* ------------------------------------------------------------------------ */
 /* ------------------------------------------------------------------------ */
 /* YOUR CUSTOMIZIES                                                                                                                    */
 /* ------------------------------------------------------------------------ */
@@ -258,7 +261,7 @@ typedef short                               node;
 /* ------------------------------------------------------------------------ */
 /*     Slide relation                                                                                                                  */
 /* ------------------------------------------------------------------------ */
 /* ------------------------------------------------------------------------ */
 /*     Slide relation                                                                                                                  */
 /* ------------------------------------------------------------------------ */
-#if defined(__STDC__) || defined(AIX)
+#if HAVE_LIMITS_H
 
 #include <limits.h>
 
 
 #include <limits.h>
 
@@ -296,7 +299,7 @@ typedef short                               node;
 #define LONG_MIN       (LONG_MAX-ULONG_MAX)
 #endif
 
 #define LONG_MIN       (LONG_MAX-ULONG_MAX)
 #endif
 
-#endif /* not __STDC__ */
+#endif
 
 /* ------------------------------------------------------------------------ */
 /*     FILE Attribute                                                                                                                  */
 
 /* ------------------------------------------------------------------------ */
 /*     FILE Attribute                                                                                                                  */