diff options
author | Christopher R. Hertel <crh@samba.org> | 1998-06-02 03:27:16 +0000 |
---|---|---|
committer | Christopher R. Hertel <crh@samba.org> | 1998-06-02 03:27:16 +0000 |
commit | def161eeea4b430d785ec57150f96fae98a34bcb (patch) | |
tree | 4dc898c6226031530d55e2ffc01fae5e8443d9bc | |
parent | 34f40474aba97118e1e80fe6259c686e46dc16b4 (diff) | |
download | samba-def161eeea4b430d785ec57150f96fae98a34bcb.tar.gz samba-def161eeea4b430d785ec57150f96fae98a34bcb.tar.xz samba-def161eeea4b430d785ec57150f96fae98a34bcb.zip |
Changed the mechanism for including the Samba includes.h in the ubiqx code
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 -)-----
-rw-r--r-- | source/ubiqx/sys_include.h | 38 | ||||
-rw-r--r-- | source/ubiqx/ubi_BinTree.c | 11 | ||||
-rw-r--r-- | source/ubiqx/ubi_BinTree.h | 3 | ||||
-rw-r--r-- | source/ubiqx/ubi_Cache.c | 10 | ||||
-rw-r--r-- | source/ubiqx/ubi_Cache.h | 4 | ||||
-rw-r--r-- | source/ubiqx/ubi_SplayTree.c | 11 | ||||
-rw-r--r-- | source/ubiqx/ubi_SplayTree.h | 3 | ||||
-rw-r--r-- | source/ubiqx/ubi_dLinkList.c | 6 | ||||
-rw-r--r-- | source/ubiqx/ubi_dLinkList.h | 4 | ||||
-rw-r--r-- | source/ubiqx/ubi_null.h | 96 | ||||
-rw-r--r-- | source/ubiqx/ubi_sLinkList.c | 6 | ||||
-rw-r--r-- | source/ubiqx/ubi_sLinkList.h | 4 |
12 files changed, 87 insertions, 109 deletions
diff --git a/source/ubiqx/sys_include.h b/source/ubiqx/sys_include.h new file mode 100644 index 00000000000..95968346385 --- /dev/null +++ b/source/ubiqx/sys_include.h @@ -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 */ diff --git a/source/ubiqx/ubi_BinTree.c b/source/ubiqx/ubi_BinTree.c index d60bcafe8dd..77869106326 100644 --- a/source/ubiqx/ubi_BinTree.c +++ b/source/ubiqx/ubi_BinTree.c @@ -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 @@ -129,16 +132,16 @@ * ========================================================================== ** */ -#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"; /* ========================================================================== ** diff --git a/source/ubiqx/ubi_BinTree.h b/source/ubiqx/ubi_BinTree.h index 609566fe3a1..19494d32ff5 100644 --- a/source/ubiqx/ubi_BinTree.h +++ b/source/ubiqx/ubi_BinTree.h @@ -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 diff --git a/source/ubiqx/ubi_Cache.c b/source/ubiqx/ubi_Cache.c index af2fe7b78d8..38eeaa61e42 100644 --- a/source/ubiqx/ubi_Cache.c +++ b/source/ubiqx/ubi_Cache.c @@ -91,6 +91,10 @@ * -------------------------------------------------------------------------- ** * * 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. * @@ -100,7 +104,7 @@ * ========================================================================== ** */ -#include "ubi_null.h" /* ubiqx NULL source. */ +#include "sys_include.h" /* System-specific includes. */ #include "ubi_Cache.h" /* Header for *this* module. */ /* -------------------------------------------------------------------------- ** @@ -110,8 +114,8 @@ /* 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"; */ diff --git a/source/ubiqx/ubi_Cache.h b/source/ubiqx/ubi_Cache.h index e4e2bf05420..4b177b05703 100644 --- a/source/ubiqx/ubi_Cache.h +++ b/source/ubiqx/ubi_Cache.h @@ -93,6 +93,10 @@ * -------------------------------------------------------------------------- ** * * 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. * diff --git a/source/ubiqx/ubi_SplayTree.c b/source/ubiqx/ubi_SplayTree.c index a0d638ecc77..8641ae3340c 100644 --- a/source/ubiqx/ubi_SplayTree.c +++ b/source/ubiqx/ubi_SplayTree.c @@ -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. * @@ -126,16 +129,16 @@ * ========================================================================== ** */ -#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"; diff --git a/source/ubiqx/ubi_SplayTree.h b/source/ubiqx/ubi_SplayTree.h index 800f53d884c..327996d7407 100644 --- a/source/ubiqx/ubi_SplayTree.h +++ b/source/ubiqx/ubi_SplayTree.h @@ -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. * diff --git a/source/ubiqx/ubi_dLinkList.c b/source/ubiqx/ubi_dLinkList.c index 405cfcb6af0..b70198fc2a7 100644 --- a/source/ubiqx/ubi_dLinkList.c +++ b/source/ubiqx/ubi_dLinkList.c @@ -25,6 +25,10 @@ * -------------------------------------------------------------------------- ** * * 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. */ /* ========================================================================== ** diff --git a/source/ubiqx/ubi_dLinkList.h b/source/ubiqx/ubi_dLinkList.h index 0bc6a62dd4d..a038ac7f296 100644 --- a/source/ubiqx/ubi_dLinkList.h +++ b/source/ubiqx/ubi_dLinkList.h @@ -27,6 +27,10 @@ * -------------------------------------------------------------------------- ** * * 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/source/ubiqx/ubi_null.h b/source/ubiqx/ubi_null.h deleted file mode 100644 index 5dbb860be19..00000000000 --- a/source/ubiqx/ubi_null.h +++ /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 */ - diff --git a/source/ubiqx/ubi_sLinkList.c b/source/ubiqx/ubi_sLinkList.c index d1cdb104160..591b00ac96b 100644 --- a/source/ubiqx/ubi_sLinkList.c +++ b/source/ubiqx/ubi_sLinkList.c @@ -25,6 +25,10 @@ * -------------------------------------------------------------------------- ** * * 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. */ /* ========================================================================== ** diff --git a/source/ubiqx/ubi_sLinkList.h b/source/ubiqx/ubi_sLinkList.h index 03ab4f98367..977a014d6b0 100644 --- a/source/ubiqx/ubi_sLinkList.h +++ b/source/ubiqx/ubi_sLinkList.h @@ -27,6 +27,10 @@ * -------------------------------------------------------------------------- ** * * 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. * |