Update make_mkid
authorBruce Momjian <bruce@momjian.us>
Wed, 11 Oct 2000 17:55:34 +0000 (17:55 +0000)
committerBruce Momjian <bruce@momjian.us>
Wed, 11 Oct 2000 17:55:34 +0000 (17:55 +0000)
src/backend/postmaster/postmaster.c
src/backend/utils/misc/guc.c
src/tools/make_mkid

index 7b49bcdab9d1c80775a800ba3544dc9022388362..90fc52d7e5fc4d05c9514082f45f2b0cfdea15ef 100644 (file)
@@ -11,7 +11,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.169 2000/10/08 09:25:36 ishii Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.170 2000/10/11 17:55:32 momjian Exp $
  *
  * NOTES
  *
@@ -543,6 +543,22 @@ PostmasterMain(int argc, char *argv[])
        exit(1);
    }
 
+   /*
+    * Select default values for switches where needed
+    */
+   if (HostName == NULL)
+   {
+       if (!(HostName = getenv("PGHOST")))
+       {
+           HostName = "any";
+       }
+   }
+   else if (!NetServer)
+   {
+       fprintf(stderr, "%s: -h requires -i.\n", progname);
+       exit(1);
+   }
+
    /*
     * Check for invalid combinations of switches
     */
index e877f41e737c1b84583708cefbe1f96ed557e67e..cf6831df00039bca413338a0ec282d759b2978b3 100644 (file)
@@ -4,7 +4,7 @@
  * Support for grand unified configuration scheme, including SET
  * command, configuration file, and command line options.
  *
- * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.12 2000/10/08 09:25:37 ishii Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.13 2000/10/11 17:55:32 momjian Exp $
  *
  * Copyright 2000 by PostgreSQL Global Development Group
  * Written by Peter Eisentraut <peter_e@gmx.net>.
@@ -237,6 +237,8 @@ ConfigureNamesInt[] =
     DEF_NBUFFERS, 16, INT_MAX},
    {"port",                    PGC_POSTMASTER,         &PostPortName,
     DEF_PGPORT, 1, 65535},
+   {"unixsocket",              PGC_POSTMASTER,         &UnixSocketName,
+    DEF_PGSOCKETFILE, 1, 65535},
 
    {"sort_mem",                PGC_USERSET,            &SortMem,
     512, 1, INT_MAX},
@@ -372,7 +374,10 @@ ResetAllOptions(void)
    }
 
    if (getenv("PGPORT"))
-       PostPortName = atoi(getenv("PGPORT"));
+       PostPortNumber = atoi(getenv("PGPORT"));
+
+   if (UnixSocketName == NULL)
+       UnixSocketName = getenv("PGUNIXSOCKET");
 }
 
 
index 6827e5710c56cb1921c3b0ca31ae442562d0501c..1565b9c806636f3833ef39eb938ed3052ece2450 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
-find `pwd`/ \( -name _deadcode -a -prune \) -o \
-   -type f -name '*.[chyl]' -print|sed 's;//;/;g' | mkid -
+#set -x
+
+mkid `find \`pwd\`/ \( -name _deadcode -a -prune \) -o \
+   -type f -name '*.[chyl]' -print|sed 's;//;/;g'`
 
 find . -name  'CVS' -prune -o -type d -print  |while read DIR
 do