mirror of
https://github.com/samba-team/samba.git
synced 2025-03-01 04:58:35 +03:00
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)
This commit is contained in:
parent
ffe91d6443
commit
1714adc798
38
source3/ubiqx/sys_include.h
Normal file
38
source3/ubiqx/sys_include.h
Normal file
@ -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 */
|
@ -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";
|
||||
|
||||
/* ========================================================================== **
|
||||
|
@ -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
|
||||
|
@ -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";
|
||||
*/
|
||||
|
||||
|
@ -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.
|
||||
*
|
||||
|
@ -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";
|
||||
|
||||
|
||||
|
@ -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.
|
||||
*
|
||||
|
@ -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. */
|
||||
|
||||
/* ========================================================================== **
|
||||
|
@ -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.
|
||||
*
|
||||
|
@ -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 */
|
||||
|
@ -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. */
|
||||
|
||||
/* ========================================================================== **
|
||||
|
@ -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.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user