8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 16:03:03 +01:00

Move public headers to include/firebird with wrappers in include for legacy files.

This commit is contained in:
Adriano dos Santos Fernandes 2024-09-29 15:29:04 -03:00
parent 74c3725e0e
commit 3f7f82d640
13 changed files with 1337 additions and 1268 deletions

View File

@ -397,7 +397,6 @@ 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...

View File

@ -743,18 +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 \
OtherDistribHeaders = include/ib_util.h \
include/iberror.h \
include/ibase.h
@ -764,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' $< > $@

View File

@ -96,7 +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\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

View File

@ -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>

View File

@ -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>

View File

@ -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 */

View File

@ -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,7 +904,6 @@ 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
)
add_dependencies_cc (copy_files databases)

1202
src/include/firebird/ibase.h Normal file

File diff suppressed because it is too large Load Diff

View 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 */

24
src/include/ib_util.h Normal file
View File

@ -0,0 +1,24 @@
/*
* 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): ______________________________________.
*/
#include "firebird/ib_util.h"

File diff suppressed because it is too large Load Diff

View File

@ -10,88 +10,4 @@
* rights and limitations under the License.
*/
#ifndef FIREBIRD_IBERROR_H
#define FIREBIRD_IBERROR_H
#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"