From fc398bba855602f9fa01235ab835c9bd4635b459 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net>
Date: Thu, 31 May 2001 15:50:31 -0700
Subject: [PATCH] workaround for case insensetive filesystems...

Rev: lib/master.pike.in:1.155
Rev: lib/modules/System.pmod:1.2
Rev: lib/modules/system.pmod:1.1
Rev: src/modules/system/Makefile.in:1.11
---
 .gitattributes                 |  1 +
 lib/master.pike.in             | 73 +++++++++++++++++++---------------
 lib/modules/System.pmod        |  6 +--
 lib/modules/system.pmod        |  4 ++
 src/modules/system/Makefile.in |  3 +-
 5 files changed, 51 insertions(+), 36 deletions(-)
 create mode 100644 lib/modules/system.pmod

diff --git a/.gitattributes b/.gitattributes
index ce7c492963..8c1f83a12c 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -150,6 +150,7 @@ testfont binary
 /lib/modules/Yabu.pmod/module.pmod foreign_ident
 /lib/modules/_Image.pmod/module.pmod foreign_ident
 /lib/modules/error.pmod foreign_ident
+/lib/modules/system.pmod foreign_ident
 /lib/tools/pike.el foreign_ident
 /man/hilfe.1 foreign_ident
 /man/pike.1 foreign_ident
diff --git a/lib/master.pike.in b/lib/master.pike.in
index 051f428b46..ef086fb68e 100644
--- a/lib/master.pike.in
+++ b/lib/master.pike.in
@@ -1,6 +1,6 @@
 /* -*- Pike -*-
  *	
- * $Id: master.pike.in,v 1.154 2001/05/24 18:14:28 grubba Exp $
+ * $Id: master.pike.in,v 1.155 2001/05/31 22:50:30 hubbe Exp $
  * 
  * Master-file for Pike.
  *
@@ -181,36 +181,6 @@ string master_read_file(string file)
   return 0;
 }
 
-//! @global
-//! Compile the Pike code contained in the file @[filename] into a program.
-//!
-//! This function will compile the file @[filename] to a Pike program that can
-//! later be instantiated. It is the same as doing
-//! @code{@[compile_string](@[Stdio.read_file](@[filename]), @[filename])@}.
-//!
-//! @seealso
-//! @[compile()], @[compile_string()], @[cpp()]
-//!
-program compile_file(string filename,
-		     object|void handler,
-		     void|program p,
-		     void|object o)
-{
-  AUTORELOAD_CHECK_FILE(filename);
-  return compile(cpp(master_read_file(filename),
-		     filename,
-		     1,
-		     handler,
-		     compat_major,
-		     compat_minor),
-		 handler,
-		 compat_major,
-		 compat_minor,
-		 p,
-		 o);
-}
-
-
 #ifdef GETCWD_CACHE
 string current_path;
 int cd(string s)
@@ -230,6 +200,7 @@ string combine_path_with_cwd(string path)
   return combine_path(IS_ABSOLUTE_PATH(path)?"/":getcwd(),path);
 }
 
+#define Stat _static_modules.files.Stat
 #ifdef FILE_STAT_CACHE
 
 #define FILE_STAT_CACHE_TIME 20
@@ -237,7 +208,6 @@ string combine_path_with_cwd(string path)
 int invalidate_time;
 mapping(string:multiset(string)) dir_cache = ([]);
 
-#define Stat _static_modules.files.Stat
 Stat master_file_stat(string x)
 {
   string file, dir=combine_path_with_cwd(x);
@@ -255,12 +225,18 @@ Stat master_file_stat(string x)
   {
     if(array(string) tmp=get_dir(dir))
     {
+#ifdef __NT__
+      tmp=map(tmp, lower_case);
+#endif
       d=dir_cache[dir]=aggregate_multiset(@tmp);
     }else{
       dir_cache[dir]=0;
     }
   }
   
+#ifdef __NT__
+  file=lower_case(file);
+#endif
   if(d && !d[file]) return 0;
 
   return predef::file_stat(x);
@@ -272,6 +248,7 @@ Stat master_file_stat(string x)
 mapping (string:string) environment=([]);
 
 
+
 //! @global
 //! @decl string getenv(string varname)
 //! @decl mapping(string:string) getenv()
@@ -289,6 +266,38 @@ string|mapping(string:string) getenv(string|void s)
   return environment[s];
 }
 
+
+//! @global
+//! Compile the Pike code contained in the file @[filename] into a program.
+//!
+//! This function will compile the file @[filename] to a Pike program that can
+//! later be instantiated. It is the same as doing
+//! @code{@[compile_string](@[Stdio.read_file](@[filename]), @[filename])@}.
+//!
+//! @seealso
+//! @[compile()], @[compile_string()], @[cpp()]
+//!
+program compile_file(string filename,
+		     object|void handler,
+		     void|program p,
+		     void|object o)
+{
+  AUTORELOAD_CHECK_FILE(filename);
+  return compile(cpp(master_read_file(filename),
+		     filename,
+		     1,
+		     handler,
+		     compat_major,
+		     compat_minor),
+		 handler,
+		 compat_major,
+		 compat_minor,
+		 p,
+		 o);
+}
+
+
+
 #if 0
 variant mapping(string:string) getenv()
 {
diff --git a/lib/modules/System.pmod b/lib/modules/System.pmod
index 8d11f03c8c..383ff7ab79 100644
--- a/lib/modules/System.pmod
+++ b/lib/modules/System.pmod
@@ -1,4 +1,4 @@
-// $Id: System.pmod,v 1.1 2001/04/29 20:47:52 mirar Exp $
-// this module is to allow the system module to be called System.
+// $Id: System.pmod,v 1.2 2001/05/31 22:50:31 hubbe Exp $
+// this module is to allow the system module to be called system.
 
-inherit system;
+inherit _system;
diff --git a/lib/modules/system.pmod b/lib/modules/system.pmod
new file mode 100644
index 0000000000..8a673986cd
--- /dev/null
+++ b/lib/modules/system.pmod
@@ -0,0 +1,4 @@
+// $Id: system.pmod,v 1.1 2001/05/31 22:50:31 hubbe Exp $
+// this module is to allow the system module to be called system.
+
+inherit _system;
diff --git a/src/modules/system/Makefile.in b/src/modules/system/Makefile.in
index e9debd2edc..a9f33e3a46 100644
--- a/src/modules/system/Makefile.in
+++ b/src/modules/system/Makefile.in
@@ -1,8 +1,9 @@
-# $Id: Makefile.in,v 1.10 2001/02/03 23:08:40 mirar Exp $
+# $Id: Makefile.in,v 1.11 2001/05/31 22:50:31 hubbe Exp $
 @make_variables@
 VPATH=@srcdir@:@srcdir@/../..:../..:.
 OBJS=system.o syslog.o passwords.o nt.o memory.o
 MODULE_LDFLAGS=@LIBS@
+INSTALL_NAME=_system
 
 CONFIG_HEADERS=@CONFIG_HEADERS@
 
-- 
GitLab