This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH to mbchar.c when you --enable-c-mbchar


This is relevant to both the gcc3 branch, and to the main trunk.

Without this patch, --enable-c-mbchar will result in cc1 and others to fail to
link, with unresolved references to variables like `literal_codeset'.  This is
because config.h is now supplying the definition of MULTIBYTE_CHARS, yet since
mbchar.c brings in config.h *after* checking that macro value, it ends up in
an object file that's effectively empty.

This patch moves the inclusion of config.h to occur first, so we'll find out
whether mbchar support is enabled for this build.

B

2001-02-20  Brendan Kehoe  <brendan@zen.org>

	* mbchar.c: Include config.h before looking at MULTIBYTE_CHARS, since
	it's defined in the header, not on the command line since 2000-08-09.

*** mbchar.c.~1~	Thu May  4 05:38:00 2000
--- mbchar.c	Tue Feb 20 11:20:18 2001
*************** Boston, MA 02111-1307, USA.  */
*** 30,35 ****
     state shifting markers).  */
  
- #ifdef MULTIBYTE_CHARS
  #include "config.h"
  #include "system.h"
  #include "mbchar.h"
--- 30,35 ----
     state shifting markers).  */
  
  #include "config.h"
+ #ifdef MULTIBYTE_CHARS
  #include "system.h"
  #include "mbchar.h"


-- 
Brendan Kehoe

CTO, nobie.com (http://www.nobie.com/)
       -- Finally true Net marketing in .ie


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]