1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-14 03:13:54 +02:00

unixodbc: Remove custom unixodbc_conf.h

As unixodbc_conf.h is now generated by configure instead of
odbc_config[1], it is not necessary to use a custom copy of the header
file anymore.

[1]: be3341cdc6

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
Jeffery To 2023-10-27 14:10:59 +08:00 committed by Rosen Penev
parent 3efee178f2
commit f3d25a7472
3 changed files with 2 additions and 61 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=unixodbc
PKG_VERSION:=2.3.9
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=unixODBC-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.unixodbc.org
@ -107,7 +107,6 @@ define Build/InstallDev
$(INSTALL_DIR) $(1)/etc
$(CP) $(PKG_INSTALL_DIR)/etc/odbc* $(1)/etc/
$(INSTALL_DIR) $(1)/etc/ODBCDataSources
$(TARGET_CC) $(TARGET_CFLAGS) -E ./files/unixodbc_conf.h | tr '@' '\#' >$(1)/usr/include/unixodbc_conf.h
endef
define Package/unixodbc/install
@ -145,7 +144,7 @@ define Host/Compile
$(MAKE) -C $(HOST_BUILD_DIR)/exe \
DESTDIR="$(HOST_INSTALL_DIR)" \
CC="$(HOSTCC)" \
CFLAGS="$(HOST_CFLAGS) -DUSE_UNIXODBC_CONF_H" \
CFLAGS="$(HOST_CFLAGS) \
LDFLAGS="$(HOST_LDFLAGS)" \
odbc_config
endef

View File

@ -1,22 +0,0 @@
@ifndef HAVE_UNISTD_H
@define HAVE_UNISTD_H
@endif
@ifndef HAVE_PWD_H
@define HAVE_PWD_H
@endif
@ifndef HAVE_SYS_TYPES_H
@define HAVE_SYS_TYPES_H
@endif
@ifndef HAVE_LONG_LONG
@define HAVE_LONG_LONG
@endif
@ifndef ODBCINT64
@define ODBCINT64 long
@endif
@ifndef UODBCINT64
@define UODBCINT64 unsigned long
@endif
@ifndef SIZEOF_LONG_INT
@define SIZEOF_LONG_INT __SIZEOF_LONG__
@endif

View File

@ -1,36 +0,0 @@
--- a/exe/odbc-config.c
+++ b/exe/odbc-config.c
@@ -40,6 +40,33 @@
#include <unistd.h>
#endif
+#ifdef USE_UNIXODBC_CONF_H
+
+#ifdef HAVE_UNISTD_H
+#undef HAVE_UNISTD_H
+#endif
+#ifdef HAVE_PWD_H
+#undef HAVE_PWD_H
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#undef HAVE_SYS_TYPES_H
+#endif
+#ifdef HAVE_LONG_LONG
+#undef HAVE_LONG_LONG
+#endif
+#ifdef ODBCINT64
+#undef ODBCINT64
+#endif
+#ifdef UODBCINT64
+#undef UODBCINT64
+#endif
+#ifdef SIZEOF_LONG_INT
+#undef SIZEOF_LONG_INT
+#endif
+
+#include <unixodbc_conf.h>
+#endif
+
#include <sql.h>
static void usage( void )