Changed the mechanism for including the Samba includes.h in the ubiqx code
authorChristopher R. Hertel <crh@samba.org>
Tue, 2 Jun 1998 03:27:16 +0000 (03:27 +0000)
committerChristopher R. Hertel <crh@samba.org>
Tue, 2 Jun 1998 03:27:16 +0000 (03:27 +0000)
to something less hurried, simpler, and (I believe) more acceptable to
all.  The ubi_*.c files all now #include sys_include.h which, for Samba,
contains only comments and the line

#include "../includes.h"

That will make sure that the Samba header is there, allows me to
distribute a different default header with the main ubiqx set, and allows
others to write their own sys_includes.h for their own purposes.

Thanks to Andrew and Jeremy for hammering this out with me.

Chris -)-----
(This used to be commit def161eeea4b430d785ec57150f96fae98a34bcb)

12 files changed:
source3/ubiqx/sys_include.h [new file with mode: 0644]
source3/ubiqx/ubi_BinTree.c
source3/ubiqx/ubi_BinTree.h
source3/ubiqx/ubi_Cache.c
source3/ubiqx/ubi_Cache.h
source3/ubiqx/ubi_SplayTree.c
source3/ubiqx/ubi_SplayTree.h
source3/ubiqx/ubi_dLinkList.c
source3/ubiqx/ubi_dLinkList.h
source3/ubiqx/ubi_null.h [deleted file]
source3/ubiqx/ubi_sLinkList.c
source3/ubiqx/ubi_sLinkList.h

diff --git a/source3/ubiqx/sys_include.h b/source3/ubiqx/sys_include.h
new file mode 100644 (file)
index 0000000..9596834
--- /dev/null
@@ -0,0 +1,38 @@
+#ifndef SYS_INCLUDE_H
+#define SYS_INCLUDE_H
+/* ========================================================================== **
+ *                               sys_include.h
+ *
+ *  Copyright (C) 1998 by Christopher R. Hertel
+ *
+ *  Email: crh@ubiqx.mn.org
+ * -------------------------------------------------------------------------- **
+ *  This header provides system declarations and data types used internally
+ *  by the ubiqx modules.
+ * -------------------------------------------------------------------------- **
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Library General Public
+ *  License along with this library; if not, write to the Free
+ *  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * -------------------------------------------------------------------------- **
+ *
+ *  Samba version of sys_include.h
+ *
+ * ========================================================================== **
+ */
+
+#include "../includes.h"
+
+/* ================================ The End ================================= */
+#endif /* SYS_INCLUDE_H */
index d60bcafe8dd4d2a2b0d9b2c1b963674ffed333e8..778691063264b99e7bea2c6fcb4061543d7ef6e8 100644 (file)
@@ -27,6 +27,9 @@
  * -------------------------------------------------------------------------- **
  *
  * Log: ubi_BinTree.c,v 
+ * Revision 4.3  1998/06/02 01:28:43  crh
+ * Changed ubi_null.h to sys_include.h to make it more generic.
+ *
  * Revision 4.2  1998/05/20 04:32:36  crh
  * The C file now includes ubi_null.h.  See ubi_null.h for more info.
  * Also, the balance and gender fields of the node were declared as
  * ========================================================================== **
  */
 
-#include "ubi_null.h"     /* ubiqx NULL source.       */
-#include "ubi_BinTree.h"  /* Header for this module.  */
+#include "sys_include.h"  /* System-specific includes. */
+#include "ubi_BinTree.h"  /* Header for this module.   */
 
 /* ========================================================================== **
  * Static data.
  */
 
 static char ModuleID[] = "ubi_BinTree\n\
-\tRevision: 4.2 \n\
-\tDate: 1998/05/20 04:32:36 \n\
+\tRevision: 4.3 \n\
+\tDate: 1998/06/02 01:28:43 \n\
 \tAuthor: crh \n";
 
 /* ========================================================================== **
index 609566fe3a199368de1b76a460ed281b3af5dfc3..19494d32ff5bbeef38a9e7d630db97f958b2da65 100644 (file)
@@ -29,6 +29,9 @@
  * -------------------------------------------------------------------------- **
  *
  * Log: ubi_BinTree.h,v 
+ * Revision 4.3  1998/06/02 01:28:43  crh
+ * Changed ubi_null.h to sys_include.h to make it more generic.
+ *
  * Revision 4.2  1998/05/20 04:32:36  crh
  * The C file now includes ubi_null.h.  See ubi_null.h for more info.
  * Also, the balance and gender fields of the node were declared as
index af2fe7b78d8aff5321cf122079be8d9a6a713625..38eeaa61e42a0a08369916e16e6db31688ffb661 100644 (file)
  * -------------------------------------------------------------------------- **
  *
  *  Log: ubi_Cache.c,v 
+ *  Revision 0.2  1998/06/02 01:36:18  crh
+ *  Changed include name from ubi_null.h to sys_include.h to make it
+ *  more generic.
+ *
  *  Revision 0.1  1998/05/20 04:36:02  crh
  *  The C file now includes ubi_null.h.  See ubi_null.h for more info.
  *
  * ========================================================================== **
  */
 
-#include "ubi_null.h"     /* ubiqx NULL source.       */
+#include "sys_include.h"  /* System-specific includes. */
 #include "ubi_Cache.h"    /* Header for *this* module. */
 
 /* -------------------------------------------------------------------------- **
 /*  commented out until I make use of it...
 static char ModuleID[] = 
 "ubi_Cache\n\
-\tRevision: 0.1 \n\
-\tDate: 1998/05/20 04:36:02 \n\
+\tRevision: 0.2 \n\
+\tDate: 1998/06/02 01:36:18 \n\
 \tAuthor: crh \n";
 */
 
index e4e2bf05420e1593bbd816765d1f12f3baa37c70..4b177b0570346041170e14eea74f63e6c4b4d5ca 100644 (file)
  * -------------------------------------------------------------------------- **
  *
  *  Log: ubi_Cache.h,v 
+ *  Revision 0.2  1998/06/02 01:36:18  crh
+ *  Changed include name from ubi_null.h to sys_include.h to make it
+ *  more generic.
+ *
  *  Revision 0.1  1998/05/20 04:36:02  crh
  *  The C file now includes ubi_null.h.  See ubi_null.h for more info.
  *
index a0d638ecc771da160ccf4971871f09ecf53be30f..8641ae3340cef240d3ff6724a85cb4856329c74f 100644 (file)
@@ -37,6 +37,9 @@
  * -------------------------------------------------------------------------- **
  *
  * Log: ubi_SplayTree.c,v 
+ * Revision 4.2  1998/06/02 01:29:14  crh
+ * Changed ubi_null.h to sys_include.h to make it more generic.
+ *
  * Revision 4.1  1998/05/20 04:37:54  crh
  * The C file now includes ubi_null.h.  See ubi_null.h for more info.
  *
  * ========================================================================== **
  */
 
-#include "ubi_null.h"       /* ubiqx NULL source.       */
-#include "ubi_SplayTree.h"  /* Header for THIS module.  */
+#include "sys_include.h"    /* System-specific includes. */
+#include "ubi_SplayTree.h"  /* Header for THIS module.   */
 
 /* ========================================================================== **
  * Static data.
  */
 
 static char ModuleID[] = "ubi_SplayTree\n\
-\tRevision: 4.1 \n\
-\tDate: 1998/05/20 04:37:54 \n\
+\tRevision: 4.2 \n\
+\tDate: 1998/06/02 01:29:14 \n\
 \tAuthor: crh \n";
 
 
index 800f53d884c445c625660515ab59565fcf2cd78d..327996d7407341314af792a98fa26aa24ea6dc90 100644 (file)
@@ -39,6 +39,9 @@
  * -------------------------------------------------------------------------- **
  *
  * Log: ubi_SplayTree.h,v 
+ * Revision 4.2  1998/06/02 01:29:14  crh
+ * Changed ubi_null.h to sys_include.h to make it more generic.
+ *
  * Revision 4.1  1998/05/20 04:37:54  crh
  * The C file now includes ubi_null.h.  See ubi_null.h for more info.
  *
index 405cfcb6af008113335de4f145a7b5a31b6cf6d4..b70198fc2a7895a9dfec951598ae272fa6ba2b8e 100644 (file)
  * -------------------------------------------------------------------------- **
  *
  * Log: ubi_dLinkList.c,v 
+ * Revision 0.7  1998/06/02 01:38:47  crh
+ * Changed include file name from ubi_null.h to sys_include.h to make it
+ * more generic.
+ *
  * Revision 0.6  1998/05/20 04:38:05  crh
  * The C file now includes ubi_null.h.  See ubi_null.h for more info.
  *
@@ -55,7 +59,7 @@
  * ========================================================================== **
  */
 
-#include "ubi_null.h"       /* ubiqx NULL source.        */
+#include "sys_include.h"    /* System-specific includes. */
 #include "ubi_dLinkList.h"  /* Header for *this* module. */
 
 /* ========================================================================== **
index 0bc6a62dd4de962a8a5f3a24be245b462f743bcd..a038ac7f29655aeb69c306c1b61a36753b929520 100644 (file)
  * -------------------------------------------------------------------------- **
  *
  * Log: ubi_dLinkList.h,v 
+ * Revision 0.7  1998/06/02 01:38:47  crh
+ * Changed include file name from ubi_null.h to sys_include.h to make it
+ * more generic.
+ *
  * Revision 0.6  1998/05/20 04:38:05  crh
  * The C file now includes ubi_null.h.  See ubi_null.h for more info.
  *
diff --git a/source3/ubiqx/ubi_null.h b/source3/ubiqx/ubi_null.h
deleted file mode 100644 (file)
index 5dbb860..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-#ifndef UBI_NULL_H
-#define UBI_NULL_H
-/* ========================================================================== **
- *                                 ubi_null.h
- *
- *  Copyright (C) 1998 by Christopher R. Hertel
- *
- *  Email: crh@ubiqx.mn.org
- * -------------------------------------------------------------------------- **
- *  This header provides declarations and data types used internally by the
- *  ubiqx modules.  It is not intended to be included elsewhere.
- * -------------------------------------------------------------------------- **
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public
- *  License as published by the Free Software Foundation; either
- *  version 2 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public
- *  License along with this library; if not, write to the Free
- *  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * -------------------------------------------------------------------------- **
- *
- *  You don't need this in your code.  It is used by the ubi_*.c files.
- *  At present, its only purpose is to provide a definition of NULL.
- *  Read on...
- *
- * -------------------------------------------------------------------------- **
- *
- * Log: ubi_null.h,v 
- * Revision 0.0  1998/05/20 04:38:38  crh
- * Initial Revision.
- *
- * ========================================================================== **
- */
-
-/* -------------------------------------------------------------------------- **
- *  Looking for NULL.
- *
- *  The core ubiqx modules (all those beginning with 'ubi_') rely on very
- *  little from the outside world.  One exception is that we need a
- *  defintion for NULL.  This has turned out to be something of a problem,
- *  as NULL is NOT always defined in the same place on different systems.
- *
- *  Ahh... standards...
- *
- *  K&R 2nd Ed. (pg 102) says NULL should be in <stdio.h>.  I've heard
- *  that it is in <locale.h> on some systems.  I've also seen it in
- *  <stddef.h> and <stdlib.h>.  In most cases it's defined in multiple
- *  places.  We'll try several of them.  If none of these work on your
- *  system, please send E'mail and let me know where you get your NULL!
- *
- *  The purpose of the mess below, then, is simply to supply a definition
- *  of NULL to the ubi_*.c files.  Keep in mind that C compilers (all
- *  those of which I'm aware) will allow you to define a constant on the
- *  command line, eg.: -DNULL=((void *)0).
- *
- *  Also, 99.9% of the time, NULL is zero.  I have been informed of at
- *  least one exception.
- *
- *  crh; may 1998
- */
-
-#ifdef HAVE_INCLUDES_H
-#include "../includes.h"
-#endif
-
-#ifndef NULL
-#include <stddef.h>
-#endif
-
-#ifndef NULL
-#include <stdlib.h>
-#endif
-
-#ifndef NULL
-#include <stdio.h>
-#endif
-
-#ifndef NULL
-#include <locale.h>
-#endif
-
-#ifndef NULL
-#define NULL ((void *)0)
-#endif
-
-/* ================================ The End ================================= */
-#endif /* UBI_NULL_H */
-
index d1cdb104160288f7214394a2b81fe9b96722fbfe..591b00ac96be2f8590e420eafc997f3579a116b1 100644 (file)
  * -------------------------------------------------------------------------- **
  *
  * Log: ubi_sLinkList.c,v 
+ * Revision 0.6  1998/06/02 01:38:47  crh
+ * Changed include file name from ubi_null.h to sys_include.h to make it
+ * more generic.
+ *
  * Revision 0.5  1998/05/20 04:38:05  crh
  * The C file now includes ubi_null.h.  See ubi_null.h for more info.
  *
@@ -75,7 +79,7 @@
  * ========================================================================== **
  */
 
-#include "ubi_null.h"       /* ubiqx NULL source.        */
+#include "sys_include.h"    /* System-specific includes. */
 #include "ubi_sLinkList.h"  /* Header for *this* module. */
 
 /* ========================================================================== **
index 03ab4f983675a105569e1eab10a6252560a4053e..977a014d6b08141d51fe62a0d40a038c7be57c14 100644 (file)
  * -------------------------------------------------------------------------- **
  *
  * Log: ubi_sLinkList.h,v 
+ * Revision 0.6  1998/06/02 01:38:47  crh
+ * Changed include file name from ubi_null.h to sys_include.h to make it
+ * more generic.
+ *
  * Revision 0.5  1998/05/20 04:38:05  crh
  * The C file now includes ubi_null.h.  See ubi_null.h for more info.
  *