delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/01/28/17:37:56

Message-ID: <34CFA8EE.D826946F@gmx.net>
Date: Wed, 28 Jan 1998 22:53:50 +0100
From: Robert Hoehne <robert DOT hoehne AT gmx DOT net>
Organization: none provided
MIME-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
CC: andrewc AT rosemail DOT rose DOT hp DOT com, djgpp-workers AT delorie DOT com
Subject: Re: iostream concern
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980128131634 DOT 3916J-100000 AT is>

Eli Zaretskii wrote :
> 
> Is this relevant to the problem with _G_fpos_t?  AFAIK, compiling GCC
> doesn't require using the C++ headers.  Or is it?

As I can overlook it, there are no C++ headers are required when
compiling gcc itseld, but I'm not 100% sure for now (but to 90%).

> Robert, can you tell whether you saw this problem when you build GCC,
> and if so, how should it be solved?

There were some warnings I got (redefining NULL and so on) which I
ignored and some others, which I fixed by patching the fixinclude
script (or better creating a newly fixinc.djgpp) which does the
fixing of the standard system headers.

To solve this, I will include in the gcc280b.zip archive the fixed
headers in $DJDIR/lib/gcc-lib/djgpp/2.80/include, so gcc 2.8.0 will
find them before the standard headers assuming here, that we modify
djgpp.env in a may, that $DJDIR/include is _NOT_ part of
$C_INCLUDE_PATH,
since the coming gcc will search this directory as default with its
builtin paths after the fixincudes directory, but only if it isn't
searched already using $C_INCLUDE_PATH, which is searched before the
builtin paths.

And to the concrete problem (see above with _G_fpos_t) gcc280b.zip
(and/or) the C++ libarry will come with a file file

$DJDIR/djgpp/include/_G_config.h

which will define this like gcc it needs and this directory is also
in the default search path builtin in gcc (except see above the
problems).

And since we are here, I have now again a quaestion. Because I was now
able to build libg++ I would do the following. Since there were in the
past some problems with it, I would include libstdcxx.a in gpp280b.zip
and would have in lgpp280b.zip only libgxx.a . Are you agree?
As you could see, I have changed the libgpp.a to libgxx.a. Is this a
problem in general?

And BTW: I will configure gcc (or better cpp) to have $DJDIR/include/gxx
as default directories for C++ headers and not $DJDIR/lang/cxx. If this
will make trouble, please let me know.

And a last qeustion: Since the gcc port goes now in the final stage
I would hear your comments what I should upload for the test stage
of the port. Is it neccessare to upload also the sources or is there
no interest for it, since they are not the smallest one (about 5.8 MB)?


----
And, before you read the diffs (and answer to me), don't expect to get
an
an answer from me before monday, since I'm not at home until then.
----

Here now only for your interest is a diff from the original DJGPP
headers
against the "fixed" ones from gcc.

*** d:/djgpp/include/sys/time.h Wed Jul  2 22:13:46 1997
--- include/sys/time.h  Wed Jan 28 22:08:36 1998
***************
*** 1,3 ****
--- 1,5 ----
+ #ifndef __GCC_GOT_sys_time_h_
+ #define __GCC_GOT_sys_time_h_
  /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  #ifndef __dj_include_sys_time_h_
  #define __dj_include_sys_time_h_
***************
*** 38,40 ****
--- 40,43 ----
  #endif

  #endif /* !__dj_include_sys_time_h_ */
+ #endif /* !_GCC_GOT_sys_time_h_ */
*** d:/djgpp/include/stddef.h   Wed Jul  2 22:13:44 1997
--- include/stddef.h    Wed Jan 28 22:08:06 1998
***************
*** 10,16 ****

  #define NULL 0
  #define offsetof(s_type, mbr) ((size_t) &((s_type *)0)->mbr)
! typedef int ptrdiff_t;

  __DJ_size_t
  #undef __DJ_size_t
--- 10,19 ----

  #define NULL 0
  #define offsetof(s_type, mbr) ((size_t) &((s_type *)0)->mbr)
! #ifndef __PTRDIFF_TYPE__
! #define __PTRDIFF_TYPE__ long int
! #endif
! typedef __PTRDIFF_TYPE__ ptrdiff_t;

  __DJ_size_t
  #undef __DJ_size_t
*** d:/djgpp/include/time.h     Wed Jul  2 22:13:46 1997
--- include/time.h      Wed Jan 28 22:08:34 1998
***************
*** 1,3 ****
--- 1,5 ----
+ #ifndef __GCC_GOT_time_h_
+ #define __GCC_GOT_time_h_
  /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  #ifndef __dj_include_time_h_
  #define __dj_include_time_h_
***************
*** 95,97 ****
--- 97,100 ----
  #endif

  #endif /* !__dj_include_time_h_ */
+ #endif /* !_GCC_GOT_time_h_ */
*** d:/djgpp/include/stdio.h    Wed Jul  2 22:13:44 1997
--- include/stdio.h     Wed Jan 28 22:08:28 1998
***************
*** 1,3 ****
--- 1,5 ----
+ #define __need___va_list
+ #include <stdarg.h>
  /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */

  #ifndef __dj_include_stdio_h_
***************
*** 93,101 ****
  FILE *        tmpfile(void);
  char *        tmpnam(char *_s);
  int   ungetc(int _c, FILE *_stream);
! int   vfprintf(FILE *_stream, const char *_format, va_list _ap);
! int   vprintf(const char *_format, va_list _ap);
! int   vsprintf(char *_s, const char *_format, va_list _ap);

  #ifndef __STRICT_ANSI__

--- 95,103 ----
  FILE *        tmpfile(void);
  char *        tmpnam(char *_s);
  int   ungetc(int _c, FILE *_stream);
! int   vfprintf(FILE *_stream, const char *_format, __gnuc_va_list
_ap);
! int   vprintf(const char *_format, __gnuc_va_list _ap);
! int   vsprintf(char *_s, const char *_format, __gnuc_va_list _ap);

  #ifndef __STRICT_ANSI__

***************
*** 115,121 ****
  #define stdaux        (&__dj_stdaux)

  void  _djstat_describe_lossage(FILE *_to_where);
! int   _doprnt(const char *_fmt, va_list _args, FILE *_f);
  int   _doscan(FILE *_f, const char *_fmt, void **_argp);
  int   _doscan_low(FILE *, int (*)(FILE *_get), int (*_unget)(int, FILE
*), const char *_fmt, void **_argp);
  int   fpurge(FILE *_f);
--- 117,123 ----
  #define stdaux        (&__dj_stdaux)

  void  _djstat_describe_lossage(FILE *_to_where);
! int   _doprnt(const char *_fmt, __gnuc_va_list _args, FILE *_f);
  int   _doscan(FILE *_f, const char *_fmt, void **_argp);
  int   _doscan_low(FILE *, int (*)(FILE *_get), int (*_unget)(int, FILE
*), const char *_fmt, void **_argp);
  int   fpurge(FILE *_f);
*** d:/djgpp/include/math.h     Wed Jul  2 22:13:44 1997
--- include/math.h      Wed Jan 28 22:08:42 1998
***************
*** 13,19 ****
--- 13,21 ----
  #ifndef __dj_ENFORCE_ANSI_FREESTANDING

  extern double __dj_huge_val;
+ #ifndef HUGE_VAL
  #define HUGE_VAL  __dj_huge_val
+ #endif

  double        acos(double _x);
  double        asin(double _x);
***************
*** 70,76 ****
--- 72,84 ----
  /* These are in libm.a (Cygnus).  You must link -lm to get these */
  /* See libm/math.h for comments */

+ #ifdef __cplusplus
+ #define exception __math_exception
+ #endif
  struct exception {
+ #ifdef __cplusplus
+ #undef exception
+ #endif
        int type;
        char *name;
        double arg1;
***************
*** 99,105 ****
--- 107,125 ----
  extern double nextafter(double, double);
  extern double remainder(double, double);
  extern double scalb(double, double);
+ #ifdef __cplusplus
+ #define exception __math_exception
+ #endif
+ #ifdef __cplusplus
+ #define exception __math_exception
+ #endif
  extern int matherr(struct exception *);
+ #ifdef __cplusplus
+ #undef exception
+ #endif
+ #ifdef __cplusplus
+ #undef exception
+ #endif
  extern double significand(double);
  extern double copysign(double, double);
  extern int ilogb(double);


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019