From 53d1817e97521f0047640a8d36329237f370c0a8 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 11 Aug 2008 19:33:46 +0000 Subject: [PATCH] 2008-08-11 21:20 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * include/hbsetup.h * config/hpux/gcc.cf * config/linux/gcc.cf * config/os2/gcc.cf * config/bsd/gcc.cf ! Never force the platform from the make files, rather rely on the autodetection in hbsetup.h. Compiling default parts of the software should only rely on manually set macros if there is no reasonable chance to make the detection automatic. ! HB_OS_LINUX, HB_OS_HPUX autodetection supposedly made more robust. * include/hbsetup.ch * include/hbapi.h * source/rtl/hbffind.c - Removed HB_FILE_VER stuff. It's lost it's importancy with SVN. * include/Makefile * include/hbcommon.ch - Removed hbcommon.ch no longer needed. It only contained HB_FILE_VER related stuff. * contrib/rddado/Makefile ! Excluded from OS/2 builds. --- harbour/ChangeLog | 26 ++++++++++++++ harbour/config/bsd/gcc.cf | 2 +- harbour/config/hpux/gcc.cf | 2 +- harbour/config/linux/gcc.cf | 3 +- harbour/config/os2/gcc.cf | 2 +- harbour/contrib/rddado/Makefile | 10 ++++-- harbour/include/Makefile | 1 - harbour/include/hbapi.h | 7 ---- harbour/include/hbcommon.ch | 63 --------------------------------- harbour/include/hbsetup.ch | 2 -- harbour/include/hbsetup.h | 19 +++++----- harbour/source/rtl/hbffind.c | 3 -- 12 files changed, 48 insertions(+), 92 deletions(-) delete mode 100644 harbour/include/hbcommon.ch diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 23518040b3..fe1e9ad81a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,32 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-08-11 21:20 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * include/hbsetup.h + * config/hpux/gcc.cf + * config/linux/gcc.cf + * config/os2/gcc.cf + * config/bsd/gcc.cf + ! Never force the platform from the make files, rather + rely on the autodetection in hbsetup.h. + Compiling default parts of the software should only rely + on manually set macros if there is no reasonable chance to + make the detection automatic. + ! HB_OS_LINUX, HB_OS_HPUX autodetection supposedly made more robust. + + * include/hbsetup.ch + * include/hbapi.h + * source/rtl/hbffind.c + - Removed HB_FILE_VER stuff. It's lost it's importancy with SVN. + + * include/Makefile + * include/hbcommon.ch + - Removed hbcommon.ch no longer needed. It only contained + HB_FILE_VER related stuff. + + * contrib/rddado/Makefile + ! Excluded from OS/2 builds. + 2008-08-11 20:41 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * contrib/hbmisc/spd.c ! Fix to SQL_SPRINTF() by Xavi. diff --git a/harbour/config/bsd/gcc.cf b/harbour/config/bsd/gcc.cf index 04aa8707a5..4305b37c08 100644 --- a/harbour/config/bsd/gcc.cf +++ b/harbour/config/bsd/gcc.cf @@ -13,7 +13,7 @@ CC = gcc CC_IN = -c CC_OUT = -o CPPFLAGS = -I. -I$(HB_INC_COMPILE) -CFLAGS = -W -Wall -DHB_OS_BSD +CFLAGS = -W -Wall LD = gcc LD_OUT = -o diff --git a/harbour/config/hpux/gcc.cf b/harbour/config/hpux/gcc.cf index 18b885e87d..9363d52b04 100644 --- a/harbour/config/hpux/gcc.cf +++ b/harbour/config/hpux/gcc.cf @@ -14,7 +14,7 @@ CC_IN = -c CC_OUT = -o CPPFLAGS = -I. -I$(HB_INC_COMPILE) -CFLAGS = -DHB_OS_HPUX -Wall -W +CFLAGS = -Wall -W LDFLAGS = # uncomment this if you want to farce relocateable code for .so libs diff --git a/harbour/config/linux/gcc.cf b/harbour/config/linux/gcc.cf index e2e60077a6..4de2c01167 100644 --- a/harbour/config/linux/gcc.cf +++ b/harbour/config/linux/gcc.cf @@ -20,8 +20,7 @@ CC_IN = -c CC_OUT = -o CPPFLAGS = -I. -I$(HB_INC_COMPILE) -# We are under linux -CFLAGS = -DHB_OS_LINUX -Wall -W +CFLAGS = -Wall -W # uncomment this if you want to force relocateable code for .so libs # it's necessary on some platforms but can reduce performance diff --git a/harbour/config/os2/gcc.cf b/harbour/config/os2/gcc.cf index 2210c86e81..d2425907cc 100644 --- a/harbour/config/os2/gcc.cf +++ b/harbour/config/os2/gcc.cf @@ -13,7 +13,7 @@ CC = gcc CC_IN = -c CC_OUT = -o CPPFLAGS = -I. -I$(TOP)include -I$(HB_INC_COMPILE) -CFLAGS = -W -Wall -DHB_OS_OS2 -O2 +CFLAGS = -W -Wall -O2 # 26/03/2004 - # added -DTCPV40HDRS to compile with GCC 3.2.2 on OS/2 v4.0 with mixed 16/32 bit tcp/ip stack diff --git a/harbour/contrib/rddado/Makefile b/harbour/contrib/rddado/Makefile index 5dee669669..7dc5d827d1 100644 --- a/harbour/contrib/rddado/Makefile +++ b/harbour/contrib/rddado/Makefile @@ -4,17 +4,23 @@ ROOT = ../../ +LIBNAME=rddado + +ifneq ($(HB_ARCHITECTURE),os2) + PRG_SOURCES= \ adordd.prg \ PRG_HEADERS=\ adordd.ch \ -LIBNAME=rddado - include $(TOP)$(ROOT)config/header.cf INSTALL_RULE_HEADERS := $(INSTALL_RULE) include $(TOP)$(ROOT)config/lib.cf install:: $(INSTALL_RULE_HEADERS) + +else +include $(TOP)$(ROOT)config/none.cf +endif diff --git a/harbour/include/Makefile b/harbour/include/Makefile index 5fd29228b2..ff7bc3e6f5 100644 --- a/harbour/include/Makefile +++ b/harbour/include/Makefile @@ -75,7 +75,6 @@ PRG_HEADERS=\ fileio.ch \ getexit.ch \ hbclass.ch \ - hbcommon.ch \ hbdebug.ch \ hbextern.ch \ hbgetcmt.ch \ diff --git a/harbour/include/hbapi.h b/harbour/include/hbapi.h index f8866e3f14..811fe0ccee 100644 --- a/harbour/include/hbapi.h +++ b/harbour/include/hbapi.h @@ -1015,13 +1015,6 @@ extern char * hb_getenv( const char * name ); extern char * hb_netname( void ); extern char * hb_username( void ); -/* Version tracking related things */ -#ifdef HB_FILE_VER_STATIC - #define HB_FILE_VER( id ) static char s_hb_file_ver[] = id; -#else - #define HB_FILE_VER( id ) -#endif - /* Translation related things */ /* Dummy define for start */ diff --git a/harbour/include/hbcommon.ch b/harbour/include/hbcommon.ch deleted file mode 100644 index af86469107..0000000000 --- a/harbour/include/hbcommon.ch +++ /dev/null @@ -1,63 +0,0 @@ -/* - * $Id$ - */ - -/* - * Harbour Project source code: - * Common header file for the source of Harbour itself. - * - * Copyright 2001-2002 Viktor Szakats - * www - http://www.harbour-project.org - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). - * - * As a special exception, the Harbour Project gives permission for - * additional uses of the text contained in its release of Harbour. - * - * The exception is that, if you link the Harbour libraries with other - * files to produce an executable, this does not by itself cause the - * resulting executable to be covered by the GNU General Public License. - * Your use of that executable is in no way restricted on account of - * linking the Harbour library code into it. - * - * This exception does not however invalidate any other reasons why - * the executable file might be covered by the GNU General Public License. - * - * This exception applies only to the code released by the Harbour - * Project under the name Harbour. If you copy code from other - * Harbour Project or Free Software Foundation releases into a copy of - * Harbour, as the General Public License permits, the exception does - * not apply to the code that you add in this way. To avoid misleading - * anyone as to the status of such modified files, you must delete - * this exception notice from them. - * - * If you write modifications of your own for Harbour, it is your choice - * whether to permit this exception to apply to your modifications. - * If you do not wish that, delete this exception notice. - * - */ - -#ifndef HB_HBCOMMON_CH_ -#define HB_HBCOMMON_CH_ - -#ifdef HB_FILE_VER_STATIC - #define HB_FILE_VER( id ) STATIC s_hb_file_ver := id -#else - #define HB_FILE_VER( id ) -#endif - -#endif /* HB_HBCOMMON_CH_ */ - diff --git a/harbour/include/hbsetup.ch b/harbour/include/hbsetup.ch index 73de71c504..79fb2f7def 100644 --- a/harbour/include/hbsetup.ch +++ b/harbour/include/hbsetup.ch @@ -70,6 +70,4 @@ /* #define HB_COMPAT_DBASE */ /* Enable dBase extensions */ /* #define HB_COMPAT_CLIP */ /* Enable CLIP extensions */ -/* #define HB_FILE_VER_STATIC */ /* Enable inclusion of file version strings */ - #endif /* HB_SETUP_CH_ */ diff --git a/harbour/include/hbsetup.h b/harbour/include/hbsetup.h index 1650fcafe7..1032ce7014 100644 --- a/harbour/include/hbsetup.h +++ b/harbour/include/hbsetup.h @@ -193,13 +193,6 @@ */ /* #define HB_PP_MULTILINE_STRING */ -/* *********************************************************************** - * Detect GCC/OS2 - */ -#if defined(__EMX__) && ! defined(__RSXNT__) - #define HARBOUR_GCC_OS2 -#endif - /* *********************************************************************** * Operating system specific definitions */ @@ -268,6 +261,13 @@ #endif #endif +/* *********************************************************************** + * Detect GCC/OS2 + */ +#if defined(__EMX__) && ! defined(__RSXNT__) + #define HARBOUR_GCC_OS2 +#endif + #ifndef HB_OS_OS2 #if defined(OS2) || defined(__OS2__) || defined(OS_2) || defined(HARBOUR_GCC_OS2) #define HB_OS_OS2 @@ -295,7 +295,7 @@ #endif #ifndef HB_OS_LINUX - #if defined(linux) || defined(__linux) || defined(__linux__) + #if defined(linux) || defined(__linux) || defined(__linux__) || defined(__gnu_linux__) #define HB_OS_LINUX #endif #endif @@ -307,7 +307,8 @@ #endif #ifndef HB_OS_HPUX - #if defined(__hpux) + /* HP cc in ANSI mode defines __hpux. GCC defines __hpux__ */ + #if defined(__hpux) || defined(__hpux__) #define HB_OS_HPUX #endif #endif diff --git a/harbour/source/rtl/hbffind.c b/harbour/source/rtl/hbffind.c index 8d889de7e7..4522cfe388 100644 --- a/harbour/source/rtl/hbffind.c +++ b/harbour/source/rtl/hbffind.c @@ -65,9 +65,6 @@ #include "hbdate.h" #include "hb_io.h" - -HB_FILE_VER( "$Id$" ) - /* ------------------------------------------------------------- */ #include