Displaying 20 results from an estimated 171 matches for "intmax_t".
Did you mean:
uintmax_t
2023 Sep 05
1
[PATCH nbdkit] server: Move size parsing code (nbdkit_parse_size) to common/include
...some of them are valid hex digits.
> > > + */
> > > + errno = 0;
> > > + size = strtoimax (str, &end, 10);
> >
> > (1) A further improvement here (likely best done in a separate patch)
> > could be to change the type of "size" to "intmax_t", from "int64_t".
> > That way, the assignment will be safe even theoretically, *and* the
> > overflow check at the bottom of the function (with the division &
> > comparison of the quotient against INT_MAX) will work just the same.
>
> I'm always ver...
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Remove getintmax in printf
...insertions(+), 34 deletions(-)
diff --git a/usr/dash/bltin/printf.c b/usr/dash/bltin/printf.c
index 5cd34a19..b439a3bb 100644
--- a/usr/dash/bltin/printf.c
+++ b/usr/dash/bltin/printf.c
@@ -46,8 +46,7 @@ static int getchr(void);
#ifdef HAVE_STRTOD
static double getdouble(void);
#endif
-static intmax_t getintmax(void);
-static uintmax_t getuintmax(void);
+static uintmax_t getuintmax(int);
static char *getstr(void);
static char *mklong(const char *, const char *);
static void check_conversion(const char *, const char *);
@@ -181,14 +180,14 @@ pc:
/* skip to field width */
fmt += s...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Remove getintmax in printf
...insertions(+), 34 deletions(-)
diff --git a/usr/dash/bltin/printf.c b/usr/dash/bltin/printf.c
index 5cd34a19..b439a3bb 100644
--- a/usr/dash/bltin/printf.c
+++ b/usr/dash/bltin/printf.c
@@ -46,8 +46,7 @@ static int getchr(void);
#ifdef HAVE_STRTOD
static double getdouble(void);
#endif
-static intmax_t getintmax(void);
-static uintmax_t getuintmax(void);
+static uintmax_t getuintmax(int);
static char *getstr(void);
static char *mklong(const char *, const char *);
static void check_conversion(const char *, const char *);
@@ -181,14 +180,14 @@ pc:
/* skip to field width */
fmt += s...
2020 Mar 28
0
[klibc:update-dash] dash: expand: Ensure result is escaped in cvtnum
...(const char *p, size_t len, int flags);
STATIC ssize_t varvalue(char *, int, int, int);
STATIC void expandmeta(struct strlist *, int);
#ifdef HAVE_GLOB
@@ -133,7 +133,7 @@ STATIC int pmatch(const char *, const char *);
#else
#define pmatch(a, b) !fnmatch((a), (b), 0)
#endif
-STATIC int cvtnum(intmax_t);
+static size_t cvtnum(intmax_t num, int flags);
STATIC size_t esclen(const char *, const char *);
STATIC char *scanleft(char *, char *, char *, char *, int, int);
STATIC char *scanright(char *, char *, char *, char *, int, int);
@@ -463,7 +463,7 @@ static char *expari(char *start, int flag)...
2005 Apr 21
1
Fwd: (KAME-snap 9012) racoon in the kame project
FYI, looks like support for Racoon is ending. Does anyone have any
experience with the version in ipsec-tools ?
---Mike
>Racoon users,
>
>This is the announcement that the kame project will quit providing
>a key management daemon, the racoon, and that "ipsec-tools" will become
>the formal team to release the racoon.
>The final release of the racoon in the
2012 Jul 02
0
[klibc:master] [ARITH] Avoid imaxdiv when only one of the results is wanted
...h_yacc.c | 9 ---------
1 files changed, 0 insertions(+), 9 deletions(-)
diff --git a/usr/dash/arith_yacc.c b/usr/dash/arith_yacc.c
index bf21830..1a087c3 100644
--- a/usr/dash/arith_yacc.c
+++ b/usr/dash/arith_yacc.c
@@ -94,22 +94,13 @@ static inline int higher_prec(int op1, int op2)
static intmax_t do_binop(int op, intmax_t a, intmax_t b)
{
-#ifdef HAVE_IMAXDIV
- imaxdiv_t div;
-#endif
-
switch (op) {
default:
case ARITH_REM:
case ARITH_DIV:
if (!b)
yyerror("division by zero");
-#ifdef HAVE_IMAXDIV
- div = imaxdiv(a, b);
- return op == ARITH_REM ? div.rem : div.quo...
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Use PRIdMAX instead of %j in printf
...t; + memcpy(copy, str, len - 4);
>> + copy[len - 4] = 'l';
>> + copy[len - 3] = 'l';
>> copy[len - 2] = *ch;
>> copy[len - 1] = '\0';
>> return (copy);
>
> The calling code uses the result to print intmax_t and uintmax_t values.
> Printing intmax_t values with %lld is wrong, this will only work if
> intmax_t is really a typedef for long long (which may be true on your
> system, but is not required by the standard).
>
> The other patch that Jonathan linked to should work just fine.
Here...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Use PRIdMAX instead of %j in printf
...t; + memcpy(copy, str, len - 4);
>> + copy[len - 4] = 'l';
>> + copy[len - 3] = 'l';
>> copy[len - 2] = *ch;
>> copy[len - 1] = '\0';
>> return (copy);
>
> The calling code uses the result to print intmax_t and uintmax_t values.
> Printing intmax_t values with %lld is wrong, this will only work if
> intmax_t is really a typedef for long long (which may be true on your
> system, but is not required by the standard).
>
> The other patch that Jonathan linked to should work just fine.
Here...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Replace with listsetvar with mklocal/setvareq
...;
if (eq)
- setvareq(name, 0);
+ setvareq(name, flags);
}
}
lvp->vp = vp;
diff --git a/usr/dash/var.h b/usr/dash/var.h
index 52f559d1..8759be46 100644
--- a/usr/dash/var.h
+++ b/usr/dash/var.h
@@ -139,7 +139,6 @@ struct var *setvar(const char *name, const char *val, int flags);
intmax_t setvarint(const char *, intmax_t, int);
struct var *setvareq(char *s, int flags);
struct strlist;
-void listsetvar(struct strlist *, int);
char *lookupvar(const char *);
intmax_t lookupvarint(const char *);
char **listvars(int, int, char ***);
@@ -147,7 +146,7 @@ char **listvars(int, int, char...
2006 Nov 17
1
gjournal on 6.x wont build
Hi all,
I was intending on trying out gjournal on a new disk i've added in my
desktop. I had a look to see what the most recent patch provided by
Pawel and found
http://people.freebsd.org/~pjd/patches/gjournal6_20061024.patch
I created the directories as per Pawel's original post
(http://lists.freebsd.org/pipermail/freebsd-fs/2006-June/001962.html)
and the patch succeeded with no failed
2012 Dec 04
2
OpenSSH warnings on FreeBSD
on FreeBSD, gcc complains that %d is used for sig_atomic_t
Casting to (int) as a solution ?
Index: serverloop.c
===================================================================
RCS file: /cvs/openssh/serverloop.c,v
retrieving revision 1.172
diff -u -p -r1.172 serverloop.c
--- serverloop.c 2 Dec 2012 22:50:55 -0000 1.172
+++ serverloop.c 4 Dec 2012 11:46:33 -0000
@@ -708,7 +708,7 @@
2004 Aug 13
1
[PATCH] make spotless update
make spotless leaves 2 generated files.
diff -purN klibc-0.159.orig/klibc/Makefile klibc-0.159/klibc/Makefile
--- klibc-0.159.orig/klibc/Makefile 2004-08-03 23:07:05.000000000 +0200
+++ klibc-0.159/klibc/Makefile 2004-08-13 22:23:35.696699671 +0200
@@ -156,6 +156,7 @@ clean: archclean
rm -f sha1hash errlist.c
spotless: clean
+ rm -f include/klibc/havesyscall.h syscalls.nrs
find . \( -name
2010 Mar 22
1
[git pull] dash, sh4, README's
...Size optimisations in parameter expansion parser
[klibc] [MEMALLOC] Made grabstackblock an inline wrapper for stalloc
[klibc] [MEMALLOC] Add pushstackmark
[klibc] [BUILTIN] Treat OPTIND=0 in the same way as OPTIND=1
[klibc] [VAR] Remove setvarsafe
[klibc] [BUILTIN] Use intmax_t arithmetic in test
[klibc] [PARSER] Report substition errors at expansion time
[klibc] [ARITH] Add assignment and intmax_t support
[klibc] [ARITH] Size optimisations in arithmetic lexer
[klibc] [EXPAND] Add likely flags in expari
[klibc] [BUILTIN] Use setvarint to set...
2010 Apr 16
0
[git pull v4] dash, sh4, ipconfig, dprintf, fstype, README's
...Size optimisations in parameter expansion parser
[klibc] [MEMALLOC] Made grabstackblock an inline wrapper for stalloc
[klibc] [MEMALLOC] Add pushstackmark
[klibc] [BUILTIN] Treat OPTIND=0 in the same way as OPTIND=1
[klibc] [VAR] Remove setvarsafe
[klibc] [BUILTIN] Use intmax_t arithmetic in test
[klibc] [PARSER] Report substition errors at expansion time
[klibc] [ARITH] Add assignment and intmax_t support
[klibc] [ARITH] Size optimisations in arithmetic lexer
[klibc] [EXPAND] Add likely flags in expari
[klibc] [BUILTIN] Use setvarint to set...
2010 Apr 16
0
[PATCH] pull faccessat() system call
...Size optimisations in parameter expansion parser
[klibc] [MEMALLOC] Made grabstackblock an inline wrapper for stalloc
[klibc] [MEMALLOC] Add pushstackmark
[klibc] [BUILTIN] Treat OPTIND=0 in the same way as OPTIND=1
[klibc] [VAR] Remove setvarsafe
[klibc] [BUILTIN] Use intmax_t arithmetic in test
[klibc] [PARSER] Report substition errors at expansion time
[klibc] [ARITH] Add assignment and intmax_t support
[klibc] [ARITH] Size optimisations in arithmetic lexer
[klibc] [EXPAND] Add likely flags in expari
[klibc] [BUILTIN] Use setvarint to set...
2010 Mar 28
1
[git pull v3] dash, sh4, ipconfig, dprintf, fstype, README's
...Size optimisations in parameter expansion parser
[klibc] [MEMALLOC] Made grabstackblock an inline wrapper for stalloc
[klibc] [MEMALLOC] Add pushstackmark
[klibc] [BUILTIN] Treat OPTIND=0 in the same way as OPTIND=1
[klibc] [VAR] Remove setvarsafe
[klibc] [BUILTIN] Use intmax_t arithmetic in test
[klibc] [PARSER] Report substition errors at expansion time
[klibc] [ARITH] Add assignment and intmax_t support
[klibc] [ARITH] Size optimisations in arithmetic lexer
[klibc] [EXPAND] Add likely flags in expari
[klibc] [BUILTIN] Use setvarint to set...
2013 May 25
0
[LLVMdev] compiler-rt tests in cmake?
.../interception/interception.h
index d50af35..1771d4e 100644
--- a/lib/interception/interception.h
+++ b/lib/interception/interception.h
@@ -27,8 +27,8 @@ typedef __sanitizer::uptr SIZE_T;
typedef __sanitizer::sptr SSIZE_T;
typedef __sanitizer::sptr PTRDIFF_T;
typedef __sanitizer::s64 INTMAX_T;
-typedef __sanitizer::OFF_T OFF_T;
-typedef __sanitizer::OFF64_T OFF64_T;
+//typedef __sanitizer::OFF_T OFF_T;
+//typedef __sanitizer::OFF64_T OFF64_T;
// How to add an interceptor:
// Suppose you need to wrap/replace system function (generally, from libc):
diff --git a/lib/lsan/lsan_alloca...
2019 Jan 25
0
[klibc:update-dash] mystring: fix "Illegal number" on FreeBSD & macOS for x=; echo $((x))
...Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/dash/mystring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr/dash/mystring.c b/usr/dash/mystring.c
index 0106bd27..de624b89 100644
--- a/usr/dash/mystring.c
+++ b/usr/dash/mystring.c
@@ -125,7 +125,7 @@ intmax_t atomax(const char *s, int base)
errno = 0;
r = strtoimax(s, &p, base);
- if (errno != 0)
+ if (errno == ERANGE)
badnum(s);
/*
2020 Mar 28
0
[klibc:update-dash] dash: mystring: fix "Illegal number" on FreeBSD & macOS for x=; echo $((x))
...Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/dash/mystring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr/dash/mystring.c b/usr/dash/mystring.c
index 0106bd27..de624b89 100644
--- a/usr/dash/mystring.c
+++ b/usr/dash/mystring.c
@@ -125,7 +125,7 @@ intmax_t atomax(const char *s, int base)
errno = 0;
r = strtoimax(s, &p, base);
- if (errno != 0)
+ if (errno == ERANGE)
badnum(s);
/*
2012 Jul 02
0
[klibc:master] dash: sync with latest git
...ort name of this package. */
#define PACKAGE_TARNAME "dash"
@@ -114,7 +111,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "0.5.6"
+#define PACKAGE_VERSION "0.5.7"
/* Define to printf format string for intmax_t */
/* #undef PRIdMAX */
@@ -154,7 +151,10 @@
/* Version number of package */
-#define VERSION "0.5.6"
+#define VERSION "0.5.7"
+
+/* Define if you build with -DWITH_LINENO */
+#define WITH_LINENO 1
/* Define to 1 if on MINIX. */
/* #undef _MINIX */