Displaying 20 results from an estimated 44 matches for "__wordsize".
2016 Dec 27
3
Definition of uintptr_t in Rinterface.h
Hi,
I was recently pointed out that a definition in Rinterface.h can be conflicting
with a definition in stdint.h:
/usr/include/R/Rinterface.h has:
typedef unsigned long uintptr_t;
/usr/include/stdint.h has:
typedef unsigned int uintptr_t;
(when 32bit platform complete definition is:
#if __WORDSIZE == 64
# ifndef __intptr_t_defined
typedef long int intptr_t;
# define __intptr_t_defined
# endif
typedef unsigned long int uintptr_t;
#else
# ifndef __intptr_t_defined
typedef int intptr_t;
# define __intptr_t_defined
# endif
typedef unsigned int...
2015 Jun 23
1
[PATCH] btrfs: remove redundant whitespace
...a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -512,7 +512,7 @@ do_btrfs_subvolume_list (const mountable_t *fs)
goto error;
}
- struct guestfs_int_btrfssubvolume *this =
+ struct guestfs_int_btrfssubvolume *this =
&ret->guestfs_int_btrfssubvolume_list_val[i];
#if __WORDSIZE == 64
@@ -1298,7 +1298,7 @@ do_btrfs_qgroup_show (const char *path)
for (i = 0; i < nr_qgroups; ++i) {
char *line = lines[i + 2];
- struct guestfs_int_btrfsqgroup *this =
+ struct guestfs_int_btrfsqgroup *this =
&ret->guestfs_int_btrfsqgroup_list_val[i];
uint6...
2020 Mar 06
1
Re: [PATCH nbdkit 2/4] server: Add nbdkit_shutdown() call.
...r constant with a value that does not exceed the limits for the
corresponding type.
...For example, if uint_least64_t is a name for the type unsigned long
long, then UINT64_C(0x123) might expand to the integer constant 0x123ULL."
In fact, in glibc's /usr/include/stdint.h, we have:
# if __WORDSIZE == 64
# define INT64_C(c) c ## L
# else
# define INT64_C(c) c ## LL
# endif
Your code works by sheer luck (expanding to the three tokens '1024',
'*', '1024L'), which in turn results in an expression with 64-bit type,
but in general, INT64_C should ONLY be used on...
2013 Jan 24
5
[PATCH] btrfs: Fix btrfs_subvolume_list on F18
...free_stringslen (lines, nr_subvolumes);
free (ret->guestfs_int_btrfssubvolume_list_val);
free (ret);
+ pcre_free(re);
return NULL;
}
- pos = strstr (line, " path ");
- if (pos == NULL)
- goto unexpected_output;
- pos += 6;
+ #if __WORDSIZE == 64
+ #define STRTOU64 strtoul
+ #else
+ #define STRTOU64 strtoull
+ #endif
+
+ errno = 0;
+ ret->guestfs_int_btrfssubvolume_list_val[i].btrfssubvolume_id =
+ STRTOU64(line + ovector[0], NULL, 10);
+ if (errno == ERANGE) goto unexpected_output;
+ ret->guestf...
2015 Oct 27
1
[PATCHv3] Added btrfs support to vfs_minimum_size.
...needs btrfs-progs >= 4.2");
+
+ r = command (&out, &err, str_btrfs, "inspect-internal",
+ "min-dev-size", sysroot_path (path), NULL);
+
+ if (r == -1) {
+ reply_with_error ("%s", err);
+ return -1;
+ }
+
+#if __WORDSIZE == 64
+#define XSTRTOD64 xstrtol
+#else
+#define XSTRTOD64 xstrtoll
+#endif
+
+ if (XSTRTOD64 (out, NULL, 10, &ret, NULL) != LONGINT_OK) {
+ reply_with_error ("cannot parse minimum size");
+ return -1;
+ }
+
+#undef XSTRTOD64
+
+ return ret;
+}
diff --git a/daemon/daemon.h b/...
2014 Apr 14
1
[PATCH 1/3] tools: Unify export.h
...sr/local/include -I./uinclude -I./include $(CONFIG_INCLUDES)
+INCLUDES = -I. -I/usr/local/include -I./uinclude -I./include -I../../include $(CONFIG_INCLUDES)
# Set compile option CFLAGS if not set elsewhere
CFLAGS ?= -g -DCONFIG_LOCKDEP -DCONFIG_STACKTRACE -DCONFIG_PROVE_LOCKING -DBITS_PER_LONG=__WORDSIZE -DLIBLOCKDEP_VERSION='"$(LIBLOCKDEP_VERSION)"' -rdynamic -O0 -g
diff --git a/tools/lib/lockdep/uinclude/linux/export.h b/tools/lib/lockdep/uinclude/linux/export.h
deleted file mode 100644
index 6bdf3492c535..000000000000
--- a/tools/lib/lockdep/uinclude/linux/export.h
+++ /dev/nul...
2014 Apr 14
1
[PATCH 1/3] tools: Unify export.h
...sr/local/include -I./uinclude -I./include $(CONFIG_INCLUDES)
+INCLUDES = -I. -I/usr/local/include -I./uinclude -I./include -I../../include $(CONFIG_INCLUDES)
# Set compile option CFLAGS if not set elsewhere
CFLAGS ?= -g -DCONFIG_LOCKDEP -DCONFIG_STACKTRACE -DCONFIG_PROVE_LOCKING -DBITS_PER_LONG=__WORDSIZE -DLIBLOCKDEP_VERSION='"$(LIBLOCKDEP_VERSION)"' -rdynamic -O0 -g
diff --git a/tools/lib/lockdep/uinclude/linux/export.h b/tools/lib/lockdep/uinclude/linux/export.h
deleted file mode 100644
index 6bdf3492c535..000000000000
--- a/tools/lib/lockdep/uinclude/linux/export.h
+++ /dev/nul...
2015 Oct 22
2
[PATCH] Added btrfs support for vfs_min_size.
...; \
+ needs btrfs-progs >= 4.2");
+
+ int r = command (&out, &err, str_btrfs, "inspect-internal",
+ "min-dev-size", path, NULL);
+
+ if (r == -1) {
+ reply_with_error ("%s", err);
+ return -1;
+ }
+
+#if __WORDSIZE == 64
+#define XSTRTOD64 xstrtol
+#else
+#define XSTRTOD64 xstrtoll
+#endif
+
+ if (XSTRTOD64 (out, NULL, 10, &ret, NULL) != LONGINT_OK) {
+ reply_with_error ("cannot parse minimum size");
+ return -1;
+ }
+
+#undef XSTRTOD64
+
+ return ret;
+}
+
diff --git a/daemon/daemon.h...
2010 Feb 16
2
[LLVMdev] FD_ZERO unsupported inline asm on 64 bit
...}
I used llvm-2.6 compiled from source and the latest llvm-gcc binaries for Linux x86_64.
This code worked just fine with older versions of llvm-gcc on 32 bit Linux.
FD_ZERO is defined in /usr/include/bits/select.h like this:
# if __WORDSIZE == 64
# define __FD_ZERO_STOS "stosq"
# define __FD_SET_BTS "btsq"
# define __FD_CLR_BTR "btrq"
# define __FD_ISSET_BT "btq"
# else
# define __FD_ZERO_STOS "stosl"
# define __FD_SET_BTS "btsl"
# define __FD_CLR_BTR "btrl"...
2010 Jul 12
2
[LLVMdev] about llvm2.7's inline assembly
Hello,
Whenever I compile a C program containing "FD_SET" function using llvm-gcc
2.7 (with -emit-llvm option), I got the following inline assembly in my
llvm byte code:
%asmtmp = call %struct.__mbstate_t asm sideeffect "cld; rep; stosl",
"={cx},={di},{ax},0,1,~{dirflag},~{fpsr},~{flags},~{memory}"(i32 0, i32
32, i32* getelementptr inbounds (%struct.__sigset_t*
2010 Jul 12
0
[LLVMdev] about llvm2.7's inline assembly
...-gcc
> 2.7 (with -emit-llvm option), I got the following inline assembly in my
> llvm byte code:
this comes directly from your system headers (/usr/include/bits/select.h)
and as such doesn't really have anything to do with llvm-gcc:
#if defined __GNUC__ && __GNUC__ >= 2
# if __WORDSIZE == 64
# define __FD_ZERO_STOS "stosq"
# else
# define __FD_ZERO_STOS "stosl"
# endif
# define __FD_ZERO(fdsp) \
do { \
int __d0, __d1; \...
2016 Dec 29
0
Definition of uintptr_t in Rinterface.h
...nition in Rinterface.h can be conflicting
> with a definition in stdint.h:
>
> /usr/include/R/Rinterface.h has:
> typedef unsigned long uintptr_t;
>
> /usr/include/stdint.h has:
> typedef unsigned int uintptr_t;
> (when 32bit platform complete definition is:
>
> #if __WORDSIZE == 64
> # ifndef __intptr_t_defined
> typedef long int intptr_t;
> # define __intptr_t_defined
> # endif
> typedef unsigned long int uintptr_t;
> #else
> # ifndef __intptr_t_defined
> typedef int intptr_t;
> # define __intptr_t_d...
2015 Oct 20
4
[PATCHv3 0/2] Introduce vfs_min_size API to get minimum filesystem size.
Tried to make it in accordance with your comments.
Difference to v1:
Added reply_with_error where necessary.
Changed name get_min_size -> vfs_min_size.
Difference to v2:
Changed name to vfs_minimum_size.
Changed parsing to xstrtol + STR* macros where possible.
Maxim Perevedentsev (2):
New API: vfs_min_size
Include resize2fs_P into vfs_min_size.
daemon/Makefile.am | 1 +
2015 Oct 20
0
[PATCHv3 2/2] Include resize2fs_P into vfs_min_size.
...r_resize2fs, "-P", device, NULL);
@@ -300,17 +327,36 @@ do_resize2fs_P (const char *device)
if (lines == NULL)
return -1;
- for (i = 0; lines[i] != NULL; ++i) {
- if (verbose)
- fprintf (stderr, "resize2fs_P: lines[%zu] = \"%s\"\n", i, lines[i]);
+#if __WORDSIZE == 64
+#define XSTRTOD64 xstrtol
+#else
+#define XSTRTOD64 xstrtoll
+#endif
- if ((p = strstr (lines[i], pattern))) {
- if (sscanf (p + strlen(pattern), "%" SCNd64, &ret) != 1)
+ for (i = 0; lines[i] != NULL; ++i) {
+ if (STRPREFIX (lines[i], pattern)) {
+ if (XSTRTO...
2015 Oct 20
8
[PATCHv4 0/2] Introduce vfs_minimum_size API to get minimum filesystem size.
Tried to make it in accordance with your comments.
Difference to v1:
Added reply_with_error where necessary.
Changed name get_min_size -> vfs_min_size.
Difference to v2:
Changed name to vfs_minimum_size.
Changed parsing to xstrtol + STR* macros where possible.
Difference to v3:
Decapitalize error messages.
Maxim Perevedentsev (2):
New API: vfs_minimum_size
Include resize2fs_P into
2014 Apr 10
0
[PATCH] tools: Unify export.h
...sr/local/include -I./uinclude -I./include $(CONFIG_INCLUDES)
+INCLUDES = -I. -I/usr/local/include -I./uinclude -I./include -I../../include $(CONFIG_INCLUDES)
# Set compile option CFLAGS if not set elsewhere
CFLAGS ?= -g -DCONFIG_LOCKDEP -DCONFIG_STACKTRACE -DCONFIG_PROVE_LOCKING -DBITS_PER_LONG=__WORDSIZE -DLIBLOCKDEP_VERSION='"$(LIBLOCKDEP_VERSION)"' -rdynamic -O0 -g
diff --git a/tools/lib/lockdep/uinclude/linux/export.h b/tools/lib/lockdep/uinclude/linux/export.h
deleted file mode 100644
index 6bdf3492c535..000000000000
--- a/tools/lib/lockdep/uinclude/linux/export.h
+++ /dev/nul...
2015 Oct 23
0
Re: [PATCH] Added btrfs support for vfs_min_size.
...");
> +
> + int r = command (&out, &err, str_btrfs, "inspect-internal",
> + "min-dev-size", path, NULL);
Same here.
> + if (r == -1) {
> + reply_with_error ("%s", err);
> + return -1;
> + }
> +
> +#if __WORDSIZE == 64
> +#define XSTRTOD64 xstrtol
> +#else
> +#define XSTRTOD64 xstrtoll
> +#endif
> +
> + if (XSTRTOD64 (out, NULL, 10, &ret, NULL) != LONGINT_OK) {
> + reply_with_error ("cannot parse minimum size");
> + return -1;
> + }
> +
> +#undef XSTRTO...
2014 Feb 23
2
[PATCH] tools: Unify export.h
...)
-INCLUDES = -I. -I/usr/local/include -I./uinclude $(CONFIG_INCLUDES)
+INCLUDES = -I. -I/usr/local/include -I./uinclude -I../../include $(CONFIG_INCLUDES)
# Set compile option CFLAGS if not set elsewhere
CFLAGS ?= -g -DCONFIG_LOCKDEP -DCONFIG_STACKTRACE -DCONFIG_PROVE_LOCKING -DBITS_PER_LONG=__WORDSIZE -DLIBLOCKDEP_VERSION='"$(LIBLOCKDEP_VERSION)"' -rdynamic -O0 -g
diff --git a/tools/lib/lockdep/uinclude/linux/export.h b/tools/lib/lockdep/uinclude/linux/export.h
deleted file mode 100644
index 6bdf3492c535..000000000000
--- a/tools/lib/lockdep/uinclude/linux/export.h
+++ /dev/nul...
2015 Oct 23
1
[PATCHv2] Added btrfs support for vfs_min_size.
...needs btrfs-progs >= 4.2");
+
+ r = command (&out, &err, str_btrfs, "inspect-internal",
+ "min-dev-size", sysroot_path (path), NULL);
+
+ if (r == -1) {
+ reply_with_error ("%s", err);
+ return -1;
+ }
+
+#if __WORDSIZE == 64
+#define XSTRTOD64 xstrtol
+#else
+#define XSTRTOD64 xstrtoll
+#endif
+
+ if (XSTRTOD64 (out, NULL, 10, &ret, NULL) != LONGINT_OK) {
+ reply_with_error ("cannot parse minimum size");
+ return -1;
+ }
+
+#undef XSTRTOD64
+
+ return ret;
+}
+
diff --git a/daemon/daemon.h...
2014 Feb 23
2
[PATCH] tools: Unify export.h
...)
-INCLUDES = -I. -I/usr/local/include -I./uinclude $(CONFIG_INCLUDES)
+INCLUDES = -I. -I/usr/local/include -I./uinclude -I../../include $(CONFIG_INCLUDES)
# Set compile option CFLAGS if not set elsewhere
CFLAGS ?= -g -DCONFIG_LOCKDEP -DCONFIG_STACKTRACE -DCONFIG_PROVE_LOCKING -DBITS_PER_LONG=__WORDSIZE -DLIBLOCKDEP_VERSION='"$(LIBLOCKDEP_VERSION)"' -rdynamic -O0 -g
diff --git a/tools/lib/lockdep/uinclude/linux/export.h b/tools/lib/lockdep/uinclude/linux/export.h
deleted file mode 100644
index 6bdf3492c535..000000000000
--- a/tools/lib/lockdep/uinclude/linux/export.h
+++ /dev/nul...