[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fix link errors on MacOS X
From: |
Bruno Haible |
Subject: |
fix link errors on MacOS X |
Date: |
Mon, 26 Jan 2009 03:03:41 +0100 |
User-agent: |
KMail/1.9.9 |
On MacOS X 10.3 / PowerPC, variables that are implicitly zero-initialized
can lead to link errors:
$ gcc -g -O2 -o test-mbsnrtowcs test-mbsnrtowcs.o ../gllib/libgnu.a
ld: Undefined symbols:
__gl_mbsrtowcs_state
This fixes it:
2009-01-25 Bruno Haible <address@hidden>
Avoid link errors on MacOS X 10.3.
* lib/mbsrtowcs-state.c (_gl_mbsrtowcs_state): Add initializer.
* lib/wcsrtombs-state.c (_gl_wcsrtombs_state): Likewise.
--- lib/mbsrtowcs-state.c.orig 2009-01-26 03:01:36.000000000 +0100
+++ lib/mbsrtowcs-state.c 2009-01-26 02:58:20.000000000 +0100
@@ -1,5 +1,5 @@
/* Convert string to wide string.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2009 Free Software Foundation, Inc.
Written by Bruno Haible <address@hidden>, 2008.
This program is free software: you can redistribute it and/or modify
@@ -20,4 +20,4 @@
#include <wchar.h>
/* Internal state used by the functions mbsrtowcs() and mbsnrtowcs(). */
-mbstate_t _gl_mbsrtowcs_state;
+mbstate_t _gl_mbsrtowcs_state = 0;
--- lib/wcsrtombs-state.c.orig 2009-01-26 03:01:36.000000000 +0100
+++ lib/wcsrtombs-state.c 2009-01-26 02:59:05.000000000 +0100
@@ -1,5 +1,5 @@
/* Convert wide string to string.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2009 Free Software Foundation, Inc.
Written by Bruno Haible <address@hidden>, 2008.
This program is free software: you can redistribute it and/or modify
@@ -20,4 +20,4 @@
#include <wchar.h>
/* Internal state used by the functions wcsrtombs() and wcsnrtombs(). */
-mbstate_t _gl_wcsrtombs_state;
+mbstate_t _gl_wcsrtombs_state = 0;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- fix link errors on MacOS X,
Bruno Haible <=