search for: longlong_max

Displaying 8 results from an estimated 8 matches for "longlong_max".

2007 Jul 30
4
[Bug 1347] New: LLONG_MAX v LONGLONG_MAX
http://bugzilla.mindrot.org/show_bug.cgi?id=1347 Summary: LLONG_MAX v LONGLONG_MAX Product: Portable OpenSSH Version: 4.6p1 Platform: PPC OS/Version: AIX Status: NEW Severity: normal Priority: P2 Component: Miscellaneous AssignedTo: bitbucket at mindrot.org ReportedBy: David.Leonard a...
2019 Sep 23
0
Re: [PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...+ errno = ERANGE; > +#endif > + PARSE_COMMON_TAIL; > +} > + > +int > +nbdkit_parse_int64_t (const char *what, const char *str, int64_t *rp) > +{ > + long long r; > + char *end; > + > + errno = 0; > + r = strtoll (str, &end, 0); > +#if INT64_MAX != LONGLONG_MAX > + if (r < INT64_MIN || r > INT64_MAX) > + errno = ERANGE; > +#endif > + PARSE_COMMON_TAIL; > +} Probably a dead #if, but doesn't hurt to leave it in. > + > +int > +nbdkit_parse_ssize_t (const char *what, const char *str, ssize_t *rp) > +{ > + long l...
2020 Mar 26
0
[PATCH nbdkit 5/9 patch split 2/5] lib: Move code for parsing, passwords and paths into libnbdkit.so.
...NT32_MAX != LONG_MAX - if (r < INT32_MIN || r > INT32_MAX) - errno = ERANGE; -#endif - PARSE_COMMON_TAIL; -} - -int -nbdkit_parse_int64_t (const char *what, const char *str, int64_t *rp) -{ - long long r; - char *end; - - errno = 0; - r = strtoll (str, &end, 0); -#if INT64_MAX != LONGLONG_MAX - if (r < INT64_MIN || r > INT64_MAX) - errno = ERANGE; -#endif - PARSE_COMMON_TAIL; -} - -/* Functions for parsing unsigned integers. */ - -/* strtou* functions have surprising behaviour if the first character - * (after whitespace) is '-', so reject this early. - */ -#define PA...
2019 Sep 21
2
[PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...NT32_MAX != LONG_MAX + if (r < INT32_MIN || r > INT32_MAX) + errno = ERANGE; +#endif + PARSE_COMMON_TAIL; +} + +int +nbdkit_parse_int64_t (const char *what, const char *str, int64_t *rp) +{ + long long r; + char *end; + + errno = 0; + r = strtoll (str, &end, 0); +#if INT64_MAX != LONGLONG_MAX + if (r < INT64_MIN || r > INT64_MAX) + errno = ERANGE; +#endif + PARSE_COMMON_TAIL; +} + +int +nbdkit_parse_ssize_t (const char *what, const char *str, ssize_t *rp) +{ + long long r; + char *end; + + errno = 0; + r = strtoll (str, &end, 0); +#if SSIZE_MAX != LONGLONG_MAX +#ifnde...
2020 Mar 26
9
[PATCH nbdkit 5/9 patch split 1/5] Create libnbdkit.so.
This is the previous 5/9 patch posted earlier today, split into reviewable chunks. This passes bisection with -x 'make && make check', but I didn't work very hard on the commit messages, so I refer you back to the original patch to explain how it works: https://www.redhat.com/archives/libguestfs/2020-March/msg00248.html Rich.
2019 Sep 23
2
[PATCH nbdkit v2] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...NT32_MAX != LONG_MAX + if (r < INT32_MIN || r > INT32_MAX) + errno = ERANGE; +#endif + PARSE_COMMON_TAIL; +} + +int +nbdkit_parse_int64_t (const char *what, const char *str, int64_t *rp) +{ + long long r; + char *end; + + errno = 0; + r = strtoll (str, &end, 0); +#if INT64_MAX != LONGLONG_MAX + if (r < INT64_MIN || r > INT64_MAX) + errno = ERANGE; +#endif + PARSE_COMMON_TAIL; +} + +/* Functions for parsing unsigned integers. */ + +/* strtou* functions have surprising behaviour if the first character + * (after whitespace) is '-', so reject this early. + */ +#define PA...
2019 Sep 23
2
Re: [PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...> > +nbdkit_parse_size_t (const char *what, const char *str, size_t *rp) > > +{ > > + unsigned long long r; > > + char *end; > > + > > + PARSE_ERROR_IF_NEGATIVE; > > + errno = 0; > > + r = strtoull (str, &end, 0); > > +#if SIZE_MAX != ULONGLONG_MAX > > + if (r > SIZE_MAX) > > + errno = ERANGE; > > +#endif > > + PARSE_COMMON_TAIL; > > +} > > + > > /* Parse a string as a size with possible scaling suffix, or return -1 > > * after reporting the error. > > */ > > Hmm, seein...
2020 Mar 26
15
[PATCH nbdkit 0/9] Create libnbdkit.so
This creates libnbdkit.so as discussed in the following thread: https://www.redhat.com/archives/libguestfs/2020-March/thread.html#00203 test-delay-shutdown.sh fails for unclear reasons. This series starts by reverting "tests: Don't strand hung nbdkit processes" which is because several other tests fail randomly unless I revert this patch. I didn't investigate this yet so it