1 |
786 |
skrzyp |
#ifndef CYGONCE_PKGCONF_INFRA_H
|
2 |
|
|
# define CYGONCE_PKGCONF_INFRA_H
|
3 |
|
|
|
4 |
|
|
//======================================================================
|
5 |
|
|
//
|
6 |
|
|
// infra.h
|
7 |
|
|
//
|
8 |
|
|
// Host side implementation of the infrastructure configuration
|
9 |
|
|
// header.
|
10 |
|
|
//
|
11 |
|
|
//======================================================================
|
12 |
|
|
// ####ECOSHOSTGPLCOPYRIGHTBEGIN####
|
13 |
|
|
// -------------------------------------------
|
14 |
|
|
// This file is part of the eCos host tools.
|
15 |
|
|
// Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
|
16 |
|
|
//
|
17 |
|
|
// This program is free software; you can redistribute it and/or modify
|
18 |
|
|
// it under the terms of the GNU General Public License as published by
|
19 |
|
|
// the Free Software Foundation; either version 2 or (at your option) any
|
20 |
|
|
// later version.
|
21 |
|
|
//
|
22 |
|
|
// This program is distributed in the hope that it will be useful, but
|
23 |
|
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
24 |
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
25 |
|
|
// General Public License for more details.
|
26 |
|
|
//
|
27 |
|
|
// You should have received a copy of the GNU General Public License
|
28 |
|
|
// along with this program; if not, write to the
|
29 |
|
|
// Free Software Foundation, Inc., 51 Franklin Street,
|
30 |
|
|
// Fifth Floor, Boston, MA 02110-1301, USA.
|
31 |
|
|
// -------------------------------------------
|
32 |
|
|
// ####ECOSHOSTGPLCOPYRIGHTEND####
|
33 |
|
|
//======================================================================
|
34 |
|
|
//#####DESCRIPTIONBEGIN####
|
35 |
|
|
//
|
36 |
|
|
// Author(s): bartv
|
37 |
|
|
// Contact(s): bartv
|
38 |
|
|
// Date: 1998/07/13
|
39 |
|
|
// Version: 0.01
|
40 |
|
|
//
|
41 |
|
|
//####DESCRIPTIONEND####
|
42 |
|
|
//======================================================================
|
43 |
|
|
|
44 |
|
|
// The purpose of this header file is to replicate appropriate
|
45 |
|
|
// functionality from the target-side header file <pkgconf/infra.h>.
|
46 |
|
|
// This header file is intended to contain configuration options
|
47 |
|
|
// related to the implementation of the infrastructure, as opposed
|
48 |
|
|
// to how that infrastructure gets used by other packages. A good
|
49 |
|
|
// example would be a configuration option to control the size
|
50 |
|
|
// of the circular trace buffer.
|
51 |
|
|
//
|
52 |
|
|
// On the host side these things are handled by autoconf, and in
|
53 |
|
|
// particular the configure.in script will offer command-line
|
54 |
|
|
// arguments allowing the relevant options to be controlled.
|
55 |
|
|
// The relevant information will end up in <cyg/pkgconf/hostinfra.h>
|
56 |
|
|
# include <pkgconf/hostinfra.h>
|
57 |
|
|
|
58 |
|
|
// Some options should always be enabled in this header file.
|
59 |
|
|
#define CYGDBG_INFRA_DIAG_PRINTF_USE_VARARG
|
60 |
|
|
#define CYGDBG_INFRA_DEBUG_ASSERT_MESSAGE
|
61 |
|
|
#define CYGDBG_INFRA_DEBUG_TRACE_MESSAGE
|
62 |
|
|
|
63 |
|
|
// Other options should be decided on a package by package basis,
|
64 |
|
|
// e.g. whether or not assertions are used. On the host side it is
|
65 |
|
|
// not appropriate to control these globally, instead the infrastructure
|
66 |
|
|
// always provides the necessary functionality and it is up to the
|
67 |
|
|
// other parts of the system to decide whether or not the facilities
|
68 |
|
|
// get used.
|
69 |
|
|
|
70 |
|
|
// A third set of options deal with the environment, e.g. the sizes
|
71 |
|
|
// of various data types. autoconf macros take care of most of the
|
72 |
|
|
// work, but some translation is needed into eCos-style names to
|
73 |
|
|
// avoid namespace pollution.
|
74 |
|
|
|
75 |
|
|
// Process the definitions of SIZEOF_INT_P and SIZEOF_LONG to work
|
76 |
|
|
// out a sensible data type for CYG_ADDRESS and CYG_ADDRWORD.
|
77 |
|
|
|
78 |
|
|
#if (!defined(SIZEOF_INT_P) || !defined(SIZEOF_LONG))
|
79 |
|
|
# error "Configure problem: data type sizes not set"
|
80 |
|
|
#endif
|
81 |
|
|
|
82 |
|
|
#if (SIZEOF_INT_P == 4)
|
83 |
|
|
// The default, nothing needs to be done
|
84 |
|
|
#elif (SIZEOF_INT_P == 8)
|
85 |
|
|
# define cyg_haladdress cyg_halint64
|
86 |
|
|
#else
|
87 |
|
|
# error "Only 32 and 64 bit pointers are supported"
|
88 |
|
|
#endif
|
89 |
|
|
|
90 |
|
|
#if ((SIZEOF_INT_P == 4) && (SIZEOF_LONG == 4))
|
91 |
|
|
// The default, nothing needs to be done
|
92 |
|
|
#elif ((SIZEOF_INT_P <= 8) && (SIZEOF_LONG <= 8))
|
93 |
|
|
// cyg_halint64 will have been defined appropriately.
|
94 |
|
|
# define cyg_haladdrword cyg_halint64
|
95 |
|
|
#else
|
96 |
|
|
# error "Only 32 and 64 bit machine word sizes are supported"
|
97 |
|
|
#endif
|
98 |
|
|
|
99 |
|
|
// Any symbols defined in <pkgconf/hostconf.h> which have been processed
|
100 |
|
|
// here should no longer be of any interest, and in the interests of
|
101 |
|
|
// reducing name space pollution they get undef'ed here.
|
102 |
|
|
|
103 |
|
|
// In addition there are two #define's in the config.h header file
|
104 |
|
|
// which are always present and which have names that are rather too
|
105 |
|
|
// generic. These get removed here as well. The version is worth
|
106 |
|
|
// preserving under a different name.
|
107 |
|
|
#undef SIZEOF_INT_P
|
108 |
|
|
#undef SIZEOF_LONG
|
109 |
|
|
#undef PACKAGE
|
110 |
|
|
#undef VERSION
|
111 |
|
|
|
112 |
|
|
#endif // CYGONCE_PKGCONF_INFRA_H
|
113 |
|
|
// End of infra.h
|