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 | 1714adc7985e0c71d0ec046f727c239dfa33b2af (patch) | |
tree | feb268f5ac0323d4e9a7e5b485a59045fa8289a7 /source3/ubiqx | |
parent | ffe91d6443f2a3e19977ed97167dd100a42a3e9a (diff) | |
download | samba-1714adc7985e0c71d0ec046f727c239dfa33b2af.tar.gz samba-1714adc7985e0c71d0ec046f727c239dfa33b2af.tar.bz2 samba-1714adc7985e0c71d0ec046f727c239dfa33b2af.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 -)-----
(This used to be commit def161eeea4b430d785ec57150f96fae98a34bcb)
Diffstat (limited to 'source3/ubiqx')
-rw-r--r-- | source3/ubiqx/sys_include.h | 38 | ||||
-rw-r--r-- | source3/ubiqx/ubi_BinTree.c | 11 | ||||
-rw-r--r-- | source3/ubiqx/ubi_BinTree.h | 3 | ||||
-rw-r--r-- | source3/ubiqx/ubi_Cache.c | 10 | ||||
-rw-r--r-- | source3/ubiqx/ubi_Cache.h | 4 | ||||
-rw-r--r-- | source3/ubiqx/ubi_SplayTree.c | 11 | ||||
-rw-r--r-- | source3/ubiqx/ubi_SplayTree.h | 3 | ||||
-rw-r--r-- | source3/ubiqx/ubi_dLinkList.c | 6 | ||||
-rw-r--r-- | source3/ubiqx/ubi_dLinkList.h | 4 | ||||
-rw-r--r-- | source3/ubiqx/ubi_null.h | 96 | ||||
-rw-r--r-- | source3/ubiqx/ubi_sLinkList.c | 6 | ||||
-rw-r--r-- | source3/ubiqx/ubi_sLinkList.h | 4 |
12 files changed, 87 insertions, 109 deletions
diff --git a/source3/ubiqx/sys_include.h b/source3/ubiqx/sys_include.h new file mode 100644 index 0000000000..9596834638 --- /dev/null +++ b/source3/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/source3/ubiqx/ubi_BinTree.c b/source3/ubiqx/ubi_BinTree.c index d60bcafe8d..7786910632 100644 --- a/source3/ubiqx/ubi_BinTree.c +++ b/source3/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/source3/ubiqx/ubi_BinTree.h b/source3/ubiqx/ubi_BinTree.h index 609566fe3a..19494d32ff 100644 --- a/source3/ubiqx/ubi_BinTree.h +++ b/source3/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/source3/ubiqx/ubi_Cache.c b/source3/ubiqx/ubi_Cache.c index af2fe7b78d..38eeaa61e4 100644 --- a/source3/ubiqx/ubi_Cache.c +++ b/source3/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/source3/ubiqx/ubi_Cache.h b/source3/ubiqx/ubi_Cache.h index e4e2bf0542..4b177b0570 100644 --- a/source3/ubiqx/ubi_Cache.h +++ b/source3/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/source3/ubiqx/ubi_SplayTree.c b/source3/ubiqx/ubi_SplayTree.c index a0d638ecc7..8641ae3340 100644 --- a/source3/ubiqx/ubi_SplayTree.c +++ b/source3/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/source3/ubiqx/ubi_SplayTree.h b/source3/ubiqx/ubi_SplayTree.h index 800f53d884..327996d740 100644 --- a/source3/ubiqx/ubi_SplayTree.h +++ b/source3/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/source3/ubiqx/ubi_dLinkList.c b/source3/ubiqx/ubi_dLinkList.c index 405cfcb6af..b70198fc2a 100644 --- a/source3/ubiqx/ubi_dLinkList.c +++ b/source3/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/source3/ubiqx/ubi_dLinkList.h b/source3/ubiqx/ubi_dLinkList.h index 0bc6a62dd4..a038ac7f29 100644 --- a/source3/ubiqx/ubi_dLinkList.h +++ b/source3/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/source3/ubiqx/ubi_null.h b/source3/ubiqx/ubi_null.h deleted file mode 100644 index 5dbb860be1..0000000000 --- a/source3/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/source3/ubiqx/ubi_sLinkList.c b/source3/ubiqx/ubi_sLinkList.c index d1cdb10416..591b00ac96 100644 --- a/source3/ubiqx/ubi_sLinkList.c +++ b/source3/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/source3/ubiqx/ubi_sLinkList.h b/source3/ubiqx/ubi_sLinkList.h index 03ab4f9836..977a014d6b 100644 --- a/source3/ubiqx/ubi_sLinkList.h +++ b/source3/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. * |