ndif
int
@@ -121,6 +124,13 @@
return 0;
}
}
+#if !HAVE_FSEEKO
+ else if (offset < LONG_MIN || offset > LONG_MAX)
+{
+ errno = EOVERFLOW;
+ return -1;
+}
+#endif
else
return fseeko (fp, offset, whence);
}
-Larry Jones
Everything's gotta have rules, rules, rules! -- Calvin
's yacc.am, Gnulib's use of it, CVS's use of the Gnulib module,
or some combination. Anyone care to point fingers? :-)
-Larry Jones
ANY idiot can be famous. I figure I'm more the LEGENDARY type! -- Calvin
erflow in place, and document in
> doc/functions/fseeko.texi that BSD/OS is unable to handle streams larger
> than 2GB and that gnulib does not fix it.
That's fine with me.
-Larry Jones
I think grown-ups just ACT like they know what they're doing. -- Calvin
les, where such behavior is
> undefined; but several GNU programs rely on the POSIX semantics where such
> behavior is well-defined).
Ah, that makes sense. I had missed that nuance of the POSIX spec.
-Larry Jones
I think my cerebellum just fused. -- Calvin
Eric Blake writes:
>
> According to Larry Jones on 12/14/2007 12:25 PM:
> > Eric Blake writes:
> >> maybe it's at least worth adding a compile-time assertion that
> >> sizeof(off_t)
> >> ==sizeof(long) when !HAVE_FSEEKO.
> >
> > Since I
Eric Blake writes:
>
> Larry Jones siemens.com> writes:
> >
> > On a more general note, it looks like fseeko and ftello both need more
> > work to be generally useful on platforms that have a wide off_t but
> > don't have native fseeko/ftello.
>
>
SEEK_CUR) prior
to the magic in hopes that it will undo all the stuff that would keep
the magic from working (which would also have the pleasant side effect
of undoing any ungetc data and clearing the EOF flag), but there's no
easy fix for ftello.
-Larry Jones
They can make me do it, but they can't make me do it with dignity. -- Calvin
fp->_flags |= __SOFF;
+ fp->_flags &= ~__SEOF;
#endif
return 0;
}
-Larry Jones
All this was funny until she did the same thing to me. -- Calvin
the same thing, it wasn't changed in either of the TCs.
-Larry Jones
When you're as far ahead of the class as I am, it doesn't take much time.
-- Calvin
Bruce Korb writes:
>
> Larry Jones wrote:
> >
> > If you have a pointer to
> > char but need to treat the data it points to as unsigned char, you have
> > to cast the pointer and dereference it to get the correct value on ones
> > complement systems -- derefer
f you have a pointer to
char but need to treat the data it points to as unsigned char, you have
to cast the pointer and dereference it to get the correct value on ones
complement systems -- dereferencing and then casting doesn't work
because -0 gets converted to +0.
-Larry Jones
Somebody's
7;t think that works -- CVS only sets the execute permissions on the
repository file when it first creates it.
-Larry Jones
It's going to be a long year. -- Calvin
x27;t object to the essentially similar:
Idx num = fs->num++;
in the previous function.
-Larry Jones
Wh. -- Calvin
nal
exit status was 1
FAIL: sshstdio-6
-Larry Jones
I hate being good. -- Calvin
atch
Thanks.
> (though I used _
> rather than xx as the local variable, just to be ornery :-).
You know, I came *this* close to doing that myself, but chickened out at
the last minute. :-)
-Larry Jones
Wow, how existential can you get? -- Hobbes
Bruno Haible writes:
>
> > 2006-06-23 Larry Jones <[EMAIL PROTECTED]>
> >
> > * stdint_.h: Try harder to find a definition of WCHAR_MIN/MAX.
>
> Do you remember for which system this was necessary? IRIX or BSDI?
BSDI.
-Larry Jones
There's never
defines all types and macros that are defined in .
> ! So we rely only on (included above). */
Exactly.
-Larry Jones
See, it all makes sense. See? See?? They never see. -- Calvin
is beyond my understanding.
Mine, too. I used to know some of the people in the SGI and Cray
compiler groups, and they were quite sharp. I can only assume they've
all left, because there's ample evidence of a serious clue shortage
there now. :-)
-Larry Jones
It's hard to be religious when certain people are never
incinerated by bolts of lightning. -- Calvin
that
existing code would continue to get everything without having to include
an additional header. Given that history, I would be very surprised to
find a system where there's any benefit at all to including
along with . If anyone knows of one, please speak up.
-Larry Jones
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. -- Calvin
Ralf Wildenhues writes:
>
> ...this time the percolation latency will be about as low as it gets.
Only on your end. The bottleneck is usually at the other end of the
pipeline. :-)
-Larry Jones
Physical education is what you learn from having your face in
someone's armpit right b
ge to percolate out into the
world.
-Larry Jones
Somebody's always running my life. I never get to do what I want to do.
-- Calvin
Bruno Haible writes:
>
> Larry Jones wrote:
> > I've found at least one otherwise-c89 compiler that
> > keeps the old preprocessor behavior in its default mode.
>
> Which compiler is this, on which system? Please don't hide your knowledge.
Sorry, it'
e problem, it seems worthwile to do so.
-Larry Jones
It COULD'VE happened by accident! -- Calvin
\
+ : (xx) == 'q' ? 42 \
+ : (xx) == 'r' ? 43 \
+ : (xx) == 's' ? 44 \
+ : (xx) == 't' ? 45 \
+ : (xx) == 'u' ? 46 \
+ : (xx) == 'v' ? 47 \
+ : (xx) == 'w' ? 48 \
+ : (xx) == 'x' ? 49 \
+ : (xx) == 'y' ? 50 \
+ : (xx) == 'z' ? 51 \
+ : (xx) == '0' ? 52 \
+ : (xx) == '1' ? 53 \
+ : (xx) == '2' ? 54 \
+ : (xx) == '3' ? 55 \
+ : (xx) == '4' ? 56 \
+ : (xx) == '5' ? 57 \
+ : (xx) == '6' ? 58 \
+ : (xx) == '7' ? 59 \
+ : (xx) == '8' ? 60 \
+ : (xx) == '9' ? 61 \
+ : (xx) == '+' ? 62 \
+ : (xx) == '/' ? 63 \
: -1)
static const signed char b64[0x100] = {
-Larry Jones
I'll be a hulking, surly teen-ager before you know it!! -- Calvin
char *const *) a;
+ const char *const s2 = *(const char *const *) b;
if (s1 == s2)
return 0;
-Larry Jones
Isn't it sad how some people's grip on their lives is so precarious
that they'll embrace any preposterous delusion rather than face an
occasional bleak truth? -- Calvin
Paul Eggert writes:
>
> [EMAIL PROTECTED] (Larry Jones) writes:
> >
> > I don't understand that recommendation. Since is supposed
> > to #include , why isn't the recommendation:
>
> As I recall, it's for some older hosts where does not
> inclu
;t understand that recommendation. Since is supposed
to #include , why isn't the recommendation:
# if HAVE_INTTYPES_H
# include
# elif HAVE_STDINT_H
# include
# endif
???
-Larry Jones
I'm writing you a message in code. How do you spell "nincompoop"? -- Calvin
/usr/include/inttypes.h
> # endif
Note that that is invalid syntax -- you either need quotes or angle
brackets around the path in the #include.
-Larry Jones
I don't like these stories with morals. -- Calvin
Simon Josefsson writes:
>
> I believe the one in glibc does. Also, 1003.1-2004 says malloc should
> set errno:
But the C Standard doesn't. All the world isn't POSIX.
-Larry Jones
I don't want to learn this! It's completely irrelevant to my life! -- Calvin
either the end-of-file or error indicators are set for the stream,
the C Standard requires fread to immediately return 0 (aka "sticky"
EOF). Most traditional implementations, however, do not do that. That
said, I really don't care one way or the other what you do about it. :-)
Simon Josefsson writes:
>
> Yup. That's the intention. (Of course, other functions may set errno
> too, if, e.g., malloc or fclose fails.)
malloc() doesn't set errno, either.
-Larry Jones
I sure like summer vacation. -- Calvin
..))", it's a red flag that whoever wrote the code
doesn't understand how EOF works in C and the code should not be
trusted. Seeing "do {...} while (!feof(...));" doesn't raise the same
flag.
-Larry Jones
See if we can sell Mom and Dad into slavery for a star cruiser. -- Calvin
, at least in some cases.
-Larry Jones
I think we need to change the rules. -- Calvin
ifndef __attribute__
+# define __attribute__(x)
+# endif
#endif
#ifndef ATTRIBUTE_UNUSED
-Larry Jones
There's never enough time to do all the nothing you want. -- Calvin
Eric Blake writes:
>
> But C89 does not have long long - what does the standard say about
> literals that exceed long?
They have type unsigned long. (Similarly, C99 says that unsuffixed
decimal literals that are too big to fit in long long have type unsigned
long long.)
-Larry Jones
that since it may not have been intended, but Paul is right: because of
their magnitudes, the values *do* have the correct types, despite the
lack of suffixes.
-Larry Jones
Monopoly is more fun when you make your own Chance cards. -- Calvin
___
bug-gnuli
screws up cat in exactly the same way as it
screws up CVS.
-Larry Jones
The living dead don't NEED to solve word problems. -- Calvin
___
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnulib
rtually *no* code, including stdio libraries,
handles it unless it sets nonblocking mode itself. Nor should it, in my
opinion.
-Larry Jones
The hardest part for us avant-garde post-modern artists is
deciding whether or not to embrace commercialism.
is
quite correct for other pointer types, the C Standard requires char *
and void * to have the same representation and alignment and notes that
that is intended to allow them to be used interchangably as arguments to
unprototyped functions, so only a deliberately perverse implementation
would fail
Derek Price writes:
>
> Larry, can you tell us if defining
> _POSIX_PTHREAD_SEMANTICS would work to get the POSIX version of
> getpwnam_r on Solaris?
It looks like it.
-Larry Jones
I never get to do anything fun. -- Calvin
___
bug-gn
and don't
have an explicit argument count), so argv has naturally always been null
terminated. (And the C Standard codified that behavior: at program
startup, argv[argc] is required to be null.)
-Larry Jones
I don't think that question was very hypoth
41 matches
Mail list logo