mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 16:43:03 +01:00
Merge pull request #8273 from FirebirdSQL/work/public-headers
Reorganize public headers
This commit is contained in:
commit
aacc981b85
@ -38,7 +38,6 @@ s none /usr/lib/libfbclient.so.2=@prefix@/lib/libfbclient.so.2
|
||||
|
||||
d none @prefix@/include 0751 firebird firebird
|
||||
f none @prefix@/include/ib_util.h=$SRCDIR/include/ib_util.h 0444 firebird firebird
|
||||
f none @prefix@/include/perf.h=$SRCDIR/include/perf.h 0444 firebird firebird
|
||||
f none @prefix@/include/iberror.h=$SRCDIR/include/iberror.h 0444 firebird firebird
|
||||
f none @prefix@/include/ibase.h=$SRCDIR/include/ibase.h 0444 firebird firebird
|
||||
|
||||
|
@ -38,7 +38,6 @@ s none /usr/lib/libfbclient.so.2=@prefix@/lib/libfbclient.so.2
|
||||
|
||||
d none @prefix@/include 0755 firebird firebird
|
||||
f none @prefix@/include/ib_util.h=$SRCDIR/include/ib_util.h 0644 firebird firebird
|
||||
f none @prefix@/include/perf.h=$SRCDIR/include/perf.h 0644 firebird firebird
|
||||
f none @prefix@/include/iberror.h=$SRCDIR/include/iberror.h 0644 firebird firebird
|
||||
f none @prefix@/include/ibase.h=$SRCDIR/include/ibase.h 0644 firebird firebird
|
||||
|
||||
|
@ -108,7 +108,6 @@ f none @prefix@/include/blr.h=$SRCDIR/include/blr.h 0644 root root
|
||||
f none @prefix@/include/ib_util.h=$SRCDIR/include/ib_util.h 0644 root root
|
||||
f none @prefix@/include/ibase.h=$SRCDIR/include/ibase.h 0644 root root
|
||||
f none @prefix@/include/iberror.h=$SRCDIR/include/iberror.h 0644 root root
|
||||
f none @prefix@/include/perf.h=$SRCDIR/include/perf.h 0644 root root
|
||||
|
||||
d none @prefix@/intl 0755 root root
|
||||
f none @prefix@/intl/libfbintl.so=$SRCDIR/intl/libfbintl.so 0755 root root
|
||||
|
@ -397,12 +397,10 @@ for %%v in (IPLicense.txt IDPLicense.txt ) do (
|
||||
:: grab some missing bits'n'pieces from different parts of the source tree
|
||||
::=========================================================================
|
||||
@echo Copying ib_util etc
|
||||
@copy %FB_ROOT_PATH%\src\extlib\ib_util.h %FB_OUTPUT_DIR%\include > nul || (call :ERROR Copying ib_util.h failed. & goto :EOF )
|
||||
@copy %FB_ROOT_PATH%\src\misc\pascal\ib_util.pas %FB_OUTPUT_DIR%\include > nul || (call :ERROR Copying ib_util.pas failed. & goto :EOF )
|
||||
|
||||
@echo Copying other include files required for development...
|
||||
@set OUTPATH=%FB_OUTPUT_DIR%\include
|
||||
@copy %FB_ROOT_PATH%\src\yvalve\perf.h %OUTPATH%\ > nul
|
||||
@copy %FB_ROOT_PATH%\src\include\gen\firebird.pas %OUTPATH%\firebird\ > nul || (@call :ERROR Failure executing copy %FB_ROOT_PATH%\src\include\gen\firebird.pas %OUTPATH%\firebird\ )
|
||||
@if ERRORLEVEL 1 goto :END
|
||||
|
||||
|
@ -743,19 +743,12 @@ gbak_files: $(GBAK_FILES)
|
||||
|
||||
INCLUDE_DEST= $(FB_BUILD)/include
|
||||
|
||||
NEW_INCLUDES_SRC = $(shell find $(SRC_ROOT)/include/firebird -type f)
|
||||
NEW_INCLUDES_DEST = $(patsubst $(SRC_ROOT)/include/firebird/%, $(INCLUDE_DEST)/firebird/%, $(NEW_INCLUDES_SRC))
|
||||
|
||||
include_generic: $(INCLUDE_DEST)/ib_util.h \
|
||||
$(NEW_INCLUDES_DEST)
|
||||
|
||||
# ib_util.h actually is a marker for a number of headers
|
||||
|
||||
# Copy all the other headers to the distribution directory. We use
|
||||
# ib_util.h as the marker for all the files.
|
||||
|
||||
OtherDistribHeaders = extlib/ib_util.h \
|
||||
yvalve/perf.h \
|
||||
OtherDistribHeaders = include/ib_util.h \
|
||||
include/iberror.h \
|
||||
include/ibase.h
|
||||
|
||||
@ -765,6 +758,11 @@ $(INCLUDE_DEST)/ib_util.h : $(SRC_OtherDistribHeaders)
|
||||
mkdir -p $(INCLUDE_DEST)
|
||||
$(CP) $^ $(INCLUDE_DEST)/
|
||||
|
||||
NEW_INCLUDES_SRC = $(shell find $(SRC_ROOT)/include/firebird -type f)
|
||||
NEW_INCLUDES_DEST = $(patsubst $(SRC_ROOT)/include/firebird/%, $(INCLUDE_DEST)/firebird/%, $(NEW_INCLUDES_SRC))
|
||||
|
||||
include_generic: $(NEW_INCLUDES_DEST) $(INCLUDE_DEST)/ib_util.h
|
||||
|
||||
ifeq ($(SYSTEM_BOOST_FLG),Y)
|
||||
$(INCLUDE_DEST)/firebird/Message.h : $(SRC_ROOT)/include/firebird/Message.h
|
||||
sed 's,^#include "\./impl/boost/\(.\+\)",#include <boost/\1>,; s/\bFB_BOOST_PP_/BOOST_PP_/g' $< > $@
|
||||
|
@ -96,8 +96,6 @@ for %%v in (gpre_boot build_msg common_test engine_test isql_test) do (
|
||||
)
|
||||
|
||||
:: Headers
|
||||
copy %FB_ROOT_PATH%\src\extlib\ib_util.h %FB_OUTPUT_DIR%\include > nul
|
||||
copy %FB_ROOT_PATH%\src\jrd\perf.h %FB_OUTPUT_DIR%\include >nul
|
||||
copy %FB_ROOT_PATH%\src\include\ibase.h %FB_OUTPUT_DIR%\include > nul
|
||||
copy %FB_ROOT_PATH%\src\include\iberror.h %FB_OUTPUT_DIR%\include > nul
|
||||
copy %FB_GEN_DIR%\iberror_c.h %FB_OUTPUT_DIR%\include\firebird\impl > nul
|
||||
|
@ -192,9 +192,6 @@
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\src\extlib\ib_util.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\src\extlib\ib_util.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\..\src\jrd\version.rc">
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\src\jrd</AdditionalIncludeDirectories>
|
||||
|
@ -18,11 +18,6 @@
|
||||
<Filter>EXTLIB files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\src\extlib\ib_util.h">
|
||||
<Filter>Header files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\..\src\jrd\version.rc">
|
||||
<Filter>Resource files</Filter>
|
||||
|
@ -35,9 +35,9 @@
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <ibase.h>
|
||||
#include "firebird/ibase.h"
|
||||
#include "example.h"
|
||||
#include "ib_util.h"
|
||||
#include "firebird/ib_util.h"
|
||||
|
||||
#define BADVAL -9999L
|
||||
#define MYBUF_LEN 15 /* number of chars to get for */
|
||||
|
@ -527,7 +527,7 @@ set_output_directory (intl intl)
|
||||
# SHARED LIBRARY ib_util
|
||||
########################################
|
||||
|
||||
add_library (ib_util SHARED extlib/ib_util.cpp extlib/ib_util.h ${VERSION_RC})
|
||||
add_library (ib_util SHARED extlib/ib_util.cpp ${VERSION_RC})
|
||||
set_exported_symbols (ib_util ib_util)
|
||||
set_output_directory_unix (ib_util lib)
|
||||
|
||||
@ -904,9 +904,7 @@ add_custom_target(copy_files
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/examples/stat ${output_dir}/examples/stat
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/examples/functions.c ${output_dir}/examples/functions.c
|
||||
# headers
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/src/extlib/ib_util.h ${output_dir}/include/ib_util.h
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/src/include/gen/iberror.h ${output_dir}/include/iberror.h
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/src/yvalve/perf.h ${output_dir}/include/perf.h
|
||||
)
|
||||
add_dependencies_cc (copy_files databases)
|
||||
add_dependencies_unix_cc(copy_files makeHeader)
|
||||
|
@ -21,8 +21,8 @@
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
|
||||
#ifndef _IB_UTIL_H
|
||||
#define _IB_UTIL_H
|
||||
#ifndef FIREBIRD_IB_UTIL_H
|
||||
#define FIREBIRD_IB_UTIL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -34,4 +34,4 @@ extern void *ib_util_malloc(long);
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* _IB_UTIL_H */
|
||||
#endif /* FIREBIRD_IB_UTIL_H */
|
1202
src/include/firebird/ibase.h
Normal file
1202
src/include/firebird/ibase.h
Normal file
File diff suppressed because it is too large
Load Diff
97
src/include/firebird/iberror.h
Normal file
97
src/include/firebird/iberror.h
Normal file
@ -0,0 +1,97 @@
|
||||
/*
|
||||
* The contents of this file are subject to the Interbase Public
|
||||
* License Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy
|
||||
* of the License at http://www.Inprise.com/IPL.html
|
||||
*
|
||||
* Software distributed under the License is distributed on an
|
||||
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
|
||||
* or implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef FIREBIRD_IBERROR_H
|
||||
#define FIREBIRD_IBERROR_H
|
||||
|
||||
#include "impl/msg_helper.h"
|
||||
|
||||
#ifdef __cplusplus /* c++ definitions */
|
||||
|
||||
const ISC_STATUS isc_facility = 20;
|
||||
const ISC_STATUS isc_base = isc_facility << 24;
|
||||
const ISC_STATUS isc_factor = 1;
|
||||
|
||||
const ISC_STATUS isc_arg_end = 0; // end of argument list
|
||||
const ISC_STATUS isc_arg_gds = 1; // generic DSRI status value
|
||||
const ISC_STATUS isc_arg_string = 2; // string argument
|
||||
const ISC_STATUS isc_arg_cstring = 3; // count & string argument
|
||||
const ISC_STATUS isc_arg_number = 4; // numeric argument (long)
|
||||
const ISC_STATUS isc_arg_interpreted = 5; // interpreted status code (string)
|
||||
const ISC_STATUS isc_arg_vms = 6; // VAX/VMS status code (long)
|
||||
const ISC_STATUS isc_arg_unix = 7; // UNIX error code
|
||||
const ISC_STATUS isc_arg_domain = 8; // Apollo/Domain error code
|
||||
const ISC_STATUS isc_arg_dos = 9; // MSDOS/OS2 error code
|
||||
const ISC_STATUS isc_arg_mpexl = 10; // HP MPE/XL error code
|
||||
const ISC_STATUS isc_arg_mpexl_ipc = 11; // HP MPE/XL IPC error code
|
||||
const ISC_STATUS isc_arg_next_mach = 15; // NeXT/Mach error code
|
||||
const ISC_STATUS isc_arg_netware = 16; // NetWare error code
|
||||
const ISC_STATUS isc_arg_win32 = 17; // Win32 error code
|
||||
const ISC_STATUS isc_arg_warning = 18; // warning argument
|
||||
const ISC_STATUS isc_arg_sql_state = 19; // SQLSTATE
|
||||
|
||||
#define FB_IMPL_MSG_NO_SYMBOL(facility, number, text)
|
||||
|
||||
#define FB_IMPL_MSG_SYMBOL(facility, number, symbol, text) \
|
||||
const ISC_STATUS isc_##symbol = FB_IMPL_MSG_ENCODE(number, FB_IMPL_MSG_FACILITY_##facility);
|
||||
|
||||
#define FB_IMPL_MSG(facility, number, symbol, sqlCode, sqlClass, sqlSubClass, text) \
|
||||
FB_IMPL_MSG_SYMBOL(facility, number, symbol, text)
|
||||
|
||||
#include "impl/msg/all.h"
|
||||
|
||||
#undef FB_IMPL_MSG_NO_SYMBOL
|
||||
#undef FB_IMPL_MSG_SYMBOL
|
||||
#undef FB_IMPL_MSG
|
||||
|
||||
const ISC_STATUS isc_err_max = 0
|
||||
#define FB_IMPL_MSG_NO_SYMBOL(facility, number, text)
|
||||
#define FB_IMPL_MSG_SYMBOL(facility, number, symbol, text)
|
||||
#define FB_IMPL_MSG(facility, number, symbol, sqlCode, sqlClass, sqlSubClass, text) + 1
|
||||
|
||||
#include "impl/msg/all.h"
|
||||
|
||||
#undef FB_IMPL_MSG_NO_SYMBOL
|
||||
#undef FB_IMPL_MSG_SYMBOL
|
||||
#undef FB_IMPL_MSG
|
||||
;
|
||||
|
||||
|
||||
#else /* c definitions */
|
||||
|
||||
#define isc_facility 20
|
||||
#define isc_base (isc_facility << 24)
|
||||
#define isc_factor 1
|
||||
|
||||
#define isc_arg_end 0 /* end of argument list */
|
||||
#define isc_arg_gds 1 /* generic DSRI status value */
|
||||
#define isc_arg_string 2 /* string argument */
|
||||
#define isc_arg_cstring 3 /* count & string argument */
|
||||
#define isc_arg_number 4 /* numeric argument (long) */
|
||||
#define isc_arg_interpreted 5 /* interpreted status code (string) */
|
||||
#define isc_arg_vms 6 /* VAX/VMS status code (long) */
|
||||
#define isc_arg_unix 7 /* UNIX error code */
|
||||
#define isc_arg_domain 8 /* Apollo/Domain error code */
|
||||
#define isc_arg_dos 9 /* MSDOS/OS2 error code */
|
||||
#define isc_arg_mpexl 10 /* HP MPE/XL error code */
|
||||
#define isc_arg_mpexl_ipc 11 /* HP MPE/XL IPC error code */
|
||||
#define isc_arg_next_mach 15 /* NeXT/Mach error code */
|
||||
#define isc_arg_netware 16 /* NetWare error code */
|
||||
#define isc_arg_win32 17 /* Win32 error code */
|
||||
#define isc_arg_warning 18 /* warning argument */
|
||||
#define isc_arg_sql_state 19 /* SQLSTATE */
|
||||
|
||||
#include "impl/iberror_c.h"
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* FIREBIRD_IBERROR_H */
|
29
src/include/ib_util.h
Normal file
29
src/include/ib_util.h
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* PROGRAM: UDF and Blob filter Utilities library
|
||||
* MODULE: ib_util.h
|
||||
* DESCRIPTION: Prototype header file for ib_util.c
|
||||
*
|
||||
* The contents of this file are subject to the Interbase Public
|
||||
* License Version 1.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy
|
||||
* of the License at http://www.Inprise.com/IPL.html
|
||||
*
|
||||
* Software distributed under the License is distributed on an
|
||||
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
|
||||
* or implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code was created by Inprise Corporation
|
||||
* and its predecessors. Portions created by Inprise Corporation are
|
||||
* Copyright (C) Inprise Corporation.
|
||||
*
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Including this file is not recommended and it will be removed in the future.
|
||||
* Please include directly the file present in the "firebird" directory.
|
||||
*/
|
||||
|
||||
#include "firebird/ib_util.h"
|
1161
src/include/ibase.h
1161
src/include/ibase.h
File diff suppressed because it is too large
Load Diff
@ -10,88 +10,9 @@
|
||||
* rights and limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef FIREBIRD_IBERROR_H
|
||||
#define FIREBIRD_IBERROR_H
|
||||
/*
|
||||
* Including this file is not recommended and it will be removed in the future.
|
||||
* Please include directly the file present in the "firebird" directory.
|
||||
*/
|
||||
|
||||
#include "firebird/impl/msg_helper.h"
|
||||
|
||||
#ifdef __cplusplus /* c++ definitions */
|
||||
|
||||
const ISC_STATUS isc_facility = 20;
|
||||
const ISC_STATUS isc_base = isc_facility << 24;
|
||||
const ISC_STATUS isc_factor = 1;
|
||||
|
||||
const ISC_STATUS isc_arg_end = 0; // end of argument list
|
||||
const ISC_STATUS isc_arg_gds = 1; // generic DSRI status value
|
||||
const ISC_STATUS isc_arg_string = 2; // string argument
|
||||
const ISC_STATUS isc_arg_cstring = 3; // count & string argument
|
||||
const ISC_STATUS isc_arg_number = 4; // numeric argument (long)
|
||||
const ISC_STATUS isc_arg_interpreted = 5; // interpreted status code (string)
|
||||
const ISC_STATUS isc_arg_vms = 6; // VAX/VMS status code (long)
|
||||
const ISC_STATUS isc_arg_unix = 7; // UNIX error code
|
||||
const ISC_STATUS isc_arg_domain = 8; // Apollo/Domain error code
|
||||
const ISC_STATUS isc_arg_dos = 9; // MSDOS/OS2 error code
|
||||
const ISC_STATUS isc_arg_mpexl = 10; // HP MPE/XL error code
|
||||
const ISC_STATUS isc_arg_mpexl_ipc = 11; // HP MPE/XL IPC error code
|
||||
const ISC_STATUS isc_arg_next_mach = 15; // NeXT/Mach error code
|
||||
const ISC_STATUS isc_arg_netware = 16; // NetWare error code
|
||||
const ISC_STATUS isc_arg_win32 = 17; // Win32 error code
|
||||
const ISC_STATUS isc_arg_warning = 18; // warning argument
|
||||
const ISC_STATUS isc_arg_sql_state = 19; // SQLSTATE
|
||||
|
||||
#define FB_IMPL_MSG_NO_SYMBOL(facility, number, text)
|
||||
|
||||
#define FB_IMPL_MSG_SYMBOL(facility, number, symbol, text) \
|
||||
const ISC_STATUS isc_##symbol = FB_IMPL_MSG_ENCODE(number, FB_IMPL_MSG_FACILITY_##facility);
|
||||
|
||||
#define FB_IMPL_MSG(facility, number, symbol, sqlCode, sqlClass, sqlSubClass, text) \
|
||||
FB_IMPL_MSG_SYMBOL(facility, number, symbol, text)
|
||||
|
||||
#include "firebird/impl/msg/all.h"
|
||||
|
||||
#undef FB_IMPL_MSG_NO_SYMBOL
|
||||
#undef FB_IMPL_MSG_SYMBOL
|
||||
#undef FB_IMPL_MSG
|
||||
|
||||
const ISC_STATUS isc_err_max = 0
|
||||
#define FB_IMPL_MSG_NO_SYMBOL(facility, number, text)
|
||||
#define FB_IMPL_MSG_SYMBOL(facility, number, symbol, text)
|
||||
#define FB_IMPL_MSG(facility, number, symbol, sqlCode, sqlClass, sqlSubClass, text) + 1
|
||||
|
||||
#include "firebird/impl/msg/all.h"
|
||||
|
||||
#undef FB_IMPL_MSG_NO_SYMBOL
|
||||
#undef FB_IMPL_MSG_SYMBOL
|
||||
#undef FB_IMPL_MSG
|
||||
;
|
||||
|
||||
|
||||
#else /* c definitions */
|
||||
|
||||
#define isc_facility 20
|
||||
#define isc_base (isc_facility << 24)
|
||||
#define isc_factor 1
|
||||
|
||||
#define isc_arg_end 0 /* end of argument list */
|
||||
#define isc_arg_gds 1 /* generic DSRI status value */
|
||||
#define isc_arg_string 2 /* string argument */
|
||||
#define isc_arg_cstring 3 /* count & string argument */
|
||||
#define isc_arg_number 4 /* numeric argument (long) */
|
||||
#define isc_arg_interpreted 5 /* interpreted status code (string) */
|
||||
#define isc_arg_vms 6 /* VAX/VMS status code (long) */
|
||||
#define isc_arg_unix 7 /* UNIX error code */
|
||||
#define isc_arg_domain 8 /* Apollo/Domain error code */
|
||||
#define isc_arg_dos 9 /* MSDOS/OS2 error code */
|
||||
#define isc_arg_mpexl 10 /* HP MPE/XL error code */
|
||||
#define isc_arg_mpexl_ipc 11 /* HP MPE/XL IPC error code */
|
||||
#define isc_arg_next_mach 15 /* NeXT/Mach error code */
|
||||
#define isc_arg_netware 16 /* NetWare error code */
|
||||
#define isc_arg_win32 17 /* Win32 error code */
|
||||
#define isc_arg_warning 18 /* warning argument */
|
||||
#define isc_arg_sql_state 19 /* SQLSTATE */
|
||||
|
||||
#include "firebird/impl/iberror_c.h"
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* FIREBIRD_IBERROR_H */
|
||||
#include "firebird/iberror.h"
|
||||
|
Loading…
Reference in New Issue
Block a user