public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/24383] New: mingw doesn't have SSIZE_MAX
@ 2005-10-15 13:44 fxcoudert at gcc dot gnu dot org
2005-10-15 13:54 ` [Bug libfortran/24383] " pinskia at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-10-15 13:44 UTC (permalink / raw)
To: gcc-bugs
With the 2005-10-07 patch from Janne, libgfortran uses SSIZE_MAX, a POSIX
macro. mingw doesn't have that macro, so we need to provided a fallback case. I
was wondering about something like
#ifndef SSIZE_MAX
#define SSIZE_MAX SHRT_MAX
#endif
or an explicit value. It's a bit ugly, but it works (and should work on other
problematic platforms). Or we could set it to a numeric value, just in case :)
Jane, what do you think would be the best solution?
--
Summary: mingw doesn't have SSIZE_MAX
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: build
Severity: normal
Priority: P2
Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fxcoudert at gcc dot gnu dot org
GCC target triplet: i686-pc-mingw32
OtherBugsDependingO 23261
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24383
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/24383] mingw doesn't have SSIZE_MAX
2005-10-15 13:44 [Bug libfortran/24383] New: mingw doesn't have SSIZE_MAX fxcoudert at gcc dot gnu dot org
@ 2005-10-15 13:54 ` pinskia at gcc dot gnu dot org
2005-10-15 15:17 ` fxcoudert at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-15 13:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2005-10-15 13:54 -------
(In reply to comment #0)
> #ifndef SSIZE_MAX
> #define SSIZE_MAX SHRT_MAX
> #endif
Short is too small. SSIZE_MAX is the signed version of size_t. If you can
figure out what the type of size_t, you have figured out that too.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24383
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/24383] mingw doesn't have SSIZE_MAX
2005-10-15 13:44 [Bug libfortran/24383] New: mingw doesn't have SSIZE_MAX fxcoudert at gcc dot gnu dot org
2005-10-15 13:54 ` [Bug libfortran/24383] " pinskia at gcc dot gnu dot org
@ 2005-10-15 15:17 ` fxcoudert at gcc dot gnu dot org
2005-10-15 20:43 ` jblomqvi at cc dot hut dot fi
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-10-15 15:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from fxcoudert at gcc dot gnu dot org 2005-10-15 15:17 -------
(In reply to comment #1)
> Short is too small. SSIZE_MAX is the signed version of size_t. If you can
> figure out what the type of size_t, you have figured out that too.
I only mentionned short because it's written in my i686-linux (debian) headers
as the minimal standard mandated. And you'd better have a value of SSIZE_MAX
too small than a value too large (if I understand correctly its use).
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2005-10-15 15:17:52
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24383
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/24383] mingw doesn't have SSIZE_MAX
2005-10-15 13:44 [Bug libfortran/24383] New: mingw doesn't have SSIZE_MAX fxcoudert at gcc dot gnu dot org
2005-10-15 13:54 ` [Bug libfortran/24383] " pinskia at gcc dot gnu dot org
2005-10-15 15:17 ` fxcoudert at gcc dot gnu dot org
@ 2005-10-15 20:43 ` jblomqvi at cc dot hut dot fi
2005-10-20 8:53 ` fxcoudert at gmail dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jblomqvi at cc dot hut dot fi @ 2005-10-15 20:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jblomqvi at cc dot hut dot fi 2005-10-15 20:43 -------
I think something like LONG_MAX might be appropriate. long should be the same
as size_t both on 32 and 64 bit mingw-windows, right (if 64 bit mingw indeed
exists at all)?
If LONG_MAX is too risky then at least INT_MAX should work.
But yeah, in this particular case any size that is smaller than the maximum
value of ssize_t would work.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24383
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/24383] mingw doesn't have SSIZE_MAX
2005-10-15 13:44 [Bug libfortran/24383] New: mingw doesn't have SSIZE_MAX fxcoudert at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-10-15 20:43 ` jblomqvi at cc dot hut dot fi
@ 2005-10-20 8:53 ` fxcoudert at gmail dot com
2005-10-21 19:40 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gmail dot com @ 2005-10-20 8:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from fxcoudert at gmail dot com 2005-10-20 08:53 -------
This is fixed in mingw CVS. I will add the workaround with SHRT_MAX. It might
not be very efficient, but at least it's garanteed to work, and I think we'd
better be on the safe side.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24383
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/24383] mingw doesn't have SSIZE_MAX
2005-10-15 13:44 [Bug libfortran/24383] New: mingw doesn't have SSIZE_MAX fxcoudert at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-10-20 8:53 ` fxcoudert at gmail dot com
@ 2005-10-21 19:40 ` cvs-commit at gcc dot gnu dot org
2005-10-21 19:49 ` fxcoudert at gmail dot com
2005-10-23 23:03 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-10-21 19:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from cvs-commit at gcc dot gnu dot org 2005-10-21 19:40 -------
Subject: Bug 24383
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: fxcoudert@gcc.gnu.org 2005-10-21 19:40:32
Modified files:
libgfortran : ChangeLog
libgfortran/io : unix.c
Log message:
PR libfortran/24383
* io/unix.c: Add fallback definition for SSIZE_MAX.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.328&r2=1.329
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/io/unix.c.diff?cvsroot=gcc&r1=1.45&r2=1.46
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24383
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/24383] mingw doesn't have SSIZE_MAX
2005-10-15 13:44 [Bug libfortran/24383] New: mingw doesn't have SSIZE_MAX fxcoudert at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-10-21 19:40 ` cvs-commit at gcc dot gnu dot org
@ 2005-10-21 19:49 ` fxcoudert at gmail dot com
2005-10-23 23:03 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gmail dot com @ 2005-10-21 19:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from fxcoudert at gmail dot com 2005-10-21 19:49 -------
Fixed.
--
fxcoudert at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24383
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug libfortran/24383] mingw doesn't have SSIZE_MAX
2005-10-15 13:44 [Bug libfortran/24383] New: mingw doesn't have SSIZE_MAX fxcoudert at gcc dot gnu dot org
` (5 preceding siblings ...)
2005-10-21 19:49 ` fxcoudert at gmail dot com
@ 2005-10-23 23:03 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-23 23:03 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24383
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-10-23 23:03 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-15 13:44 [Bug libfortran/24383] New: mingw doesn't have SSIZE_MAX fxcoudert at gcc dot gnu dot org
2005-10-15 13:54 ` [Bug libfortran/24383] " pinskia at gcc dot gnu dot org
2005-10-15 15:17 ` fxcoudert at gcc dot gnu dot org
2005-10-15 20:43 ` jblomqvi at cc dot hut dot fi
2005-10-20 8:53 ` fxcoudert at gmail dot com
2005-10-21 19:40 ` cvs-commit at gcc dot gnu dot org
2005-10-21 19:49 ` fxcoudert at gmail dot com
2005-10-23 23:03 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).