Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1552676
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 2/4] linux/const.h: move UL() macro to include/linux/const.h |
| Date | 2017-01-06 11:50 +0100 |
| Message-ID | <sWAfT-w2-1@gated-at.bofh.it> (permalink) |
| References | <sW5Yu-4QA-5@gated-at.bofh.it> <sW5Yu-4QA-7@gated-at.bofh.it> <sW5Yu-4QA-5@gated-at.bofh.it> |
| Organization | Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 |
Masahiro Yamada <yamada.masahiro@socionext.com> wrote: > diff --git a/include/uapi/linux/const.h b/include/uapi/linux/const.h > index c872bfd..76fb0f9 100644 > --- a/include/uapi/linux/const.h > +++ b/include/uapi/linux/const.h > @@ -1,7 +1,7 @@ > /* const.h: Macros for dealing with constants. */ > > -#ifndef _LINUX_CONST_H > -#define _LINUX_CONST_H > +#ifndef _UAPI_LINUX_CONST_H > +#define _UAPI_LINUX_CONST_H You need to be very careful doing this. Some userspace stuff depends on the guard macro names on the kernel header files. > /* Some constant macros are used in both assembler and > * C code. Therefore we cannot annotate them always with > @@ -21,7 +21,10 @@ > #define _AT(T,X) ((T)(X)) > #endif > > +#define _UL(x) (_AC(x, UL)) > +#define _ULL(x) (_AC(x, ULL)) How likely is this to collide with existing userspace code somewhere? It looks like the sort of thing that could collide with a C library. David
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 2/4] linux/const.h: move UL() macro to include/linux/const.h Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-01-05 03:30 +0100
Re: [PATCH v2 2/4] linux/const.h: move UL() macro to include/linux/const.h Catalin Marinas <catalin.marinas@arm.com> - 2017-01-05 12:20 +0100
Re: [PATCH v2 2/4] linux/const.h: move UL() macro to include/linux/const.h Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-01-05 12:40 +0100
Re: [PATCH v2 2/4] linux/const.h: move UL() macro to include/linux/const.h David Howells <dhowells@redhat.com> - 2017-01-06 11:50 +0100
Re: [PATCH v2 2/4] linux/const.h: move UL() macro to include/linux/const.h Masahiro Yamada <yamada.masahiro@socionext.com> - 2017-01-08 07:30 +0100
csiph-web