lib_main.c
1 /*
2  shm-arena shared memory arena
3  Copyright (C) 2006-2008 Lance Arsenault (LGPL v3)
4 
5 
6  This file is part of shm-arena.
7 
8  shm-arena is free software; you can redistribute it and/or modify
9  it under the terms of the GNU Lesser General Public License as
10  published by the Free Software Foundation; either version 3 of the
11  License, or (at your option) any later version.
12 
13  shm-arena is distributed in the hope that it will be useful, but
14  WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public
19  License along with this program. If not, see
20  <http://www.gnu.org/licenses/>.
21 */
22 
27 #include "config.h"
28 #include <gnu/lib-names.h>
29 #include <stdio.h>
30 #include <stdlib.h>
31 
32 #include "spew.h"
33 #include "shm_arena.h"
34 
35 
36 /* This is the stuff that will tell the compiler to make this library,
37  * libshm_arena.so, one that can be executed. */
38 #ifdef __i386__
39 # define LIBDIR "/lib/"
40 #endif
41 
42 #ifdef __x86_64__
43 # define LIBDIR "/lib64/"
44 #endif
45 
46 const char my_interp[] __attribute__((section(".interp"))) = LIBDIR LD_SO;
47 
53 DLL_LOCAL
54 void _shm_lib_main(void)
55 {
56  printf(" =============================================\n"
57  " " PACKAGE_NAME " version: " VERSION "\n"
58  " =============================================\n"
59  "\n"
60  " Compiled ("__FILE__") on date: "__DATE__ "\n"
61  " at: "__TIME__"\n"
62  "\n"
63  " ------------------------------------------------\n"
64  " BUILD OPTIONS\n"
65  "\n"
66 #ifdef WITH_SPEW
67  " The default print level SHM_SPEW is: " SHM_DEFAULT_SPEW_LEVEL "\n"
68 #else
69  " The diagnostic printing is not compiled in.\n"
70 #endif
71 #ifdef SHM_DEBUG
72  " This is a DEBUG BUILD. SHM_DEBUG was defined.\n"
73 #else
74  " This is NOT a DEBUG BUILD. SHM_DEBUG was not defined.\n"
75 #endif
76  " ------------------------------------------------\n"
77  "\n"
78  " The shared memory arena homepage is:\n"
79  " "SHM_HOMEPAGE "\n"
80  "\n"
81  " Copyright (C) 2006-2008 - Lance Arsenault\n"
82  " This is free software licensed under the GNU LGPL (v3).\n"
83  );
84 
85  /* This needs to call exit and not return 0 since this is not main()
86  * and main is not called. */
87  exit(0);
88 }
#define SHM_DEFAULT_SPEW_LEVEL
the default spew level
Definition: shm_arena.h:64
#define SHM_HOMEPAGE
the Shared Memory Arena homepage URL
Definition: shm_arena.h:70

Shared Memory Arena version RC-0.0.25