This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
glibc-2.1.x current CVS; proposed patches
- To: libc-alpha@sourceware.cygnus.com
- Subject: glibc-2.1.x current CVS; proposed patches
- From: ohme@mail.bs.provi.de (Ohme)
- Date: Sun, 1 Aug 1999 01:31:05 +0200
Hi,
several weeks ago i started to watch the development of glibc-2.1.x.
i looked at the releases, mailing-lists and CVS-distribution.
I repeatedly checked the configure and building-phase on Solaris-Systems
(Solaris 2.4 - 2.7), while taking into account your recommandations
concerning the GNU-tools: gcc-2.8.1, make-3.77, ....
In the building-phase of the CVS-Version of 99-07-31 however, I noticed
some problems which IMHO are of interest for you:
1. Patch for file sysdeps/generic/math_ldbl.h
Problem:
Compilation breaks with "#error: ... don't include directly ..."
Reason:
sysdeps/generic/math_ldbl.h is included by math/math_private.h
Name mismatch _MATH_PRIVATE_H in sysdeps/generic/math_ldbl.h
_MATH_PRIVATE_H_ in math/math_private.h
Proposed Solution:
rename checked define in sysdepss/generic/math_ldbl.h to
_MATH_PRIVATE_H_
Patch appended.
2. Patch for file sysdeps/generic/_G_config.h
Problem:
Compilation breaks while compiling csu/init.c:
In file included from init.c:31:
../sysdeps/generic/_G_config.h:27: parse error before `__mbstate_t'
../sysdeps/generic/_G_config.h:27: warning: no semicolon at end of
struct or union
../sysdeps/generic/_G_config.h:28: warning: type defaults to `int'
in declaration of `_G_fpos_t'
../sysdeps/generic/_G_config.h:28: warning: data definition has no
type or storage class
../sysdeps/generic/_G_config.h:32: parse error before `__mbstate_t'
../sysdeps/generic/_G_config.h:32: warning: no semicolon at end of
struct or union
../sysdeps/generic/_G_config.h:33: warning: type defaults to `int' in
declaration of `_G_fpos64_t'
../sysdeps/generic/_G_config.h:33: warning: data definition has no
type or storage class
make[2]: *** [./csu/init.o] Error 1
make[2]: Leaving directory `./libc/csu'
Reason:
in sysdeps/generic/_G_config.h (included by csu/init.c)
__mbstate_t is needed to define the types _G_fpos_t and _G_fpos64_t,
but the type __mbstate_t is still undefined.
type __mbstate_t is declared instead within #include <gconv.h>;
gconf.h includes wcsmbs/wchar.h, where the type of __mbstate_t
is explicitly defined.
#include <gconv.h> is used shortly after the erraneous usage of
__mbstate_t for the typedef of _G_fpos_t and _G_fpos64_t.
Proposed Solution:
as the types _G_fpos_t and _G_fpos64_t aren't needed in front of
#include <gconv.h>, it seems valid to move the typedef of _G_fpos_t
and _G_fpos64_t down as appropriate
Patch appended.
3. Problem in file sysdeps/generic/strtold.c
Problem:
Compilation breaks while compiling sysdeps/generic/strtold.c:
../sysdeps/generic/strtold.c:33: unbalanced `#endif'
make[1]: *** [strtold.o] Error 1
make[1]: Leaving directory `glibc/stdlib'
make: *** [stdlib/subdir_lib] Error 2
Reason:
a single #endif statement without matching #if | #ifdef | #ifndef -
statement is used in the file sysdeps/generic/strtold.c.
Proposed Solution:
???
maybe a construct using __NO_LONG_DOUBLE_MATH is intended
like it is used in the related cpu-dependend sysdeps-files?
As this is my first attempt to make some hopefully constructive proposals,
I ask you kindly for hints if you find something wrong with the size or
kind of information i've written in this mail.
greetings
Gert
===============================================================================
Gert Ohme
email: ohme@mail.bs.provi.de
===============================================================================
*** sysdeps/generic/math_ldbl.h.orig Wed Jul 14 02:51:57 1999
--- sysdeps/generic/math_ldbl.h Sat Jul 31 16:03:18 1999
***************
*** 1,5 ****
! #ifndef _MATH_PRIVATE_H
#error "Never use <math_ldbl.h> directly; include <math_private.h> instead."
#endif
/* This is empty. Any machine using long double type will override this header. */
--- 1,5 ----
! #ifndef _MATH_PRIVATE_H_
#error "Never use <math_ldbl.h> directly; include <math_private.h> instead."
#endif
/* This is empty. Any machine using long double type will override this header. */
*** sysdeps/generic/_G_config.h.orig Thu Jun 17 00:44:33 1999
--- sysdeps/generic/_G_config.h Sat Jul 31 14:55:04 1999
***************
*** 18,39 ****
set, as well as at least one value that does not correspond to any
member of the extended character set. */
# define _WINT_T
typedef unsigned int wint_t;
#endif
#define _G_size_t size_t
- typedef struct
- {
- __off_t __pos;
- __mbstate_t __state;
- } _G_fpos_t;
- typedef struct
- {
- __off64_t __pos;
- __mbstate_t __state;
- } _G_fpos64_t;
#define _G_ssize_t __ssize_t
#define _G_off_t __off_t
#define _G_off64_t __off_t
#define _G_pid_t __pid_t
#define _G_uid_t __uid_t
#define _G_wchar_t wchar_t
--- 18,29 ----
***************
*** 42,53 ****
--- 32,53 ----
#include <gconv.h>
typedef struct
{
__gconv_t __cd;
struct __gconv_step_data __data;
} _G_iconv_t;
+ typedef struct
+ {
+ __off_t __pos;
+ __mbstate_t __state;
+ } _G_fpos_t;
+ typedef struct
+ {
+ __off64_t __pos;
+ __mbstate_t __state;
+ } _G_fpos64_t;
typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
Change-Log Entries
1999-07-31 Gert Ohme <ohme@mail.bs.provi.de>
* sysdeps/generic/math_ldbl.h: Fixed typo.
1999-07-31 Gert Ohme <ohme@mail.bs.provi.de>
* sysdeps/generic/_G_config.h:
fixed typedef of _G_fpos_t and _G_fpos64_t.