From 936efba318816cd33faac9f608226133531e7d54 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net>
Date: Thu, 19 Aug 1999 22:06:33 -0700
Subject: [PATCH] bugfix? for NT

Rev: lib/modules/Protocols.pmod/LPD.pmod:1.4
Rev: lib/modules/Protocols.pmod/X.pmod/Auth.pmod:1.5
---
 lib/modules/Protocols.pmod/LPD.pmod         | 12 ++++++++++--
 lib/modules/Protocols.pmod/X.pmod/Auth.pmod |  6 +++++-
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/lib/modules/Protocols.pmod/LPD.pmod b/lib/modules/Protocols.pmod/LPD.pmod
index 52e57f44e0..e72213608a 100644
--- a/lib/modules/Protocols.pmod/LPD.pmod
+++ b/lib/modules/Protocols.pmod/LPD.pmod
@@ -3,7 +3,7 @@
 // This is a module for pike.
 // 3 July 1998 <hww3@riverweb.com> Bill Welliver
 //
-// $Id: LPD.pmod,v 1.3 1998/07/03 20:30:19 grubba Exp $
+// $Id: LPD.pmod,v 1.4 1999/08/20 05:01:58 hubbe Exp $
 //
 
 class client {
@@ -73,7 +73,11 @@ class client {
     // werror("sent send data command\n");
     string control="";
     control+="H"+gethostname()+"\n";
-    control+="P"+(getpwuid(getuid())[0]||"nobody");
+#if constant(getuid) && constant(getpwuid)
+    control+="P"+(getpwuid(getuid())[0]||"nobody")+"\n";
+#else
+    /* Should there be a P-1 here? /Hubbe */
+#endif
     control+=(jobtype||"l")+"dfA"+ sprintf("%3d%s", jobnum, gethostname())+"\n";
     if(jobname)
       control+="J" + jobname + "\n";
@@ -103,7 +107,11 @@ class client {
     if(!conn->connect(host, port))
       return 0;
 
+#if constant(getpwuid) && constant(getuid)
     string agent=(getpwuid(getuid())[0]||"nobody");
+#else
+    string agent="nobody";
+#endif
 
     if(job)
       conn->write(sprintf("%c%s %s %d\n", 05, queue, agent, job));
diff --git a/lib/modules/Protocols.pmod/X.pmod/Auth.pmod b/lib/modules/Protocols.pmod/X.pmod/Auth.pmod
index d41e4d0ee8..aa2b220112 100644
--- a/lib/modules/Protocols.pmod/X.pmod/Auth.pmod
+++ b/lib/modules/Protocols.pmod/X.pmod/Auth.pmod
@@ -1,6 +1,6 @@
 /* Auth.pmod
  *
- * $Id: Auth.pmod,v 1.4 1998/04/20 01:49:35 nisse Exp $
+ * $Id: Auth.pmod,v 1.5 1999/08/20 05:06:33 hubbe Exp $
  */
 
 /*
@@ -91,7 +91,11 @@ class lock_key
 
   int my_hardlink(string from, string to)
   {
+#if constant(hardlink)
     return !catch(hardlink(from, to));
+#else
+    return 0; // Failed, hubbe
+#endif
   }
 
 
-- 
GitLab