[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: stop using P_, __P in header files
From: |
Juanma Barranquero |
Subject: |
Re: stop using P_, __P in header files |
Date: |
Sun, 4 Jul 2010 17:35:46 +0200 |
On Sun, Jul 4, 2010 at 10:08, Dan Nicolaescu <address@hidden> wrote:
> I've done most of this.
Thanks. I've fixed a few prototypes that break compilation on Windows
or generate warnings.
A few questions:
1) This one and similar ones on unexelf.c seem errors:
-round_up (x, y)
- ElfW(Addr) x, y;
+round_up (Elf32_Addr x, Elf32_Addr y)
The prototypes should presumably still use ElfW(Addr), ElfW(Ehdr),
etc., shouldn't they?
2) In strftme.c you've converted just some functions, not all, and
removed the LOCALE_PARAM* macros.
static CHAR_T *
-memcpy_lowcase (dest, src, len LOCALE_PARAM)
- CHAR_T *dest;
- const CHAR_T *src;
- size_t len;
- LOCALE_PARAM_DECL
+memcpy_lowcase (char *dest, const char *src, size_t len)
Apparently, there haven't been any changes from gnulib merged back
into strftime.c in the past seven years (since 2003-06-24). Should the
LOCALE_PARAM* macros still be used (and so, re-added to
memcpy_(low|upp)case), or would it be better to just get rid of that
cruft?
3) After this change in print.c
static void
-strout (ptr, size, size_byte, printcharfun, multibyte)
- char *ptr;
- int size, size_byte;
- Lisp_Object printcharfun;
- int multibyte;
+strout (char *ptr, int size, int size_byte, Lisp_Object printcharfun,
int multibyte)
{
compilation throws this warning:
print.c: In function 'print_object':
print.c:1973: warning: passing argument 1 of 'strout' discards
qualifiers from pointer target type
print.c:353: note: expected 'char *' but argument is of type 'const char *'
becase of the call
strout (XSUBR (obj)->symbol_name, -1, -1, printcharfun, 0);
AFAICS, the object pointed to by PTR is never modified, so it seems
safe to use const char *, and I've done so.
Juanma
- Re: stop using P_, __P in header files, (continued)
- Re: stop using P_, __P in header files, Juanma Barranquero, 2010/07/02
- Re: stop using P_, __P in header files, Jan Djärv, 2010/07/02
- Re: stop using P_, __P in header files, Juanma Barranquero, 2010/07/02
- Re: stop using P_, __P in header files, Eli Zaretskii, 2010/07/02
- Re: stop using P_, __P in header files, Andreas Schwab, 2010/07/02
- Re: stop using P_, __P in header files, Eli Zaretskii, 2010/07/03
- Re: stop using P_, __P in header files, Dan Nicolaescu, 2010/07/02
- Re: stop using P_, __P in header files, Eli Zaretskii, 2010/07/02
- Re: stop using P_, __P in header files, Dan Nicolaescu, 2010/07/02
- Re: stop using P_, __P in header files, Dan Nicolaescu, 2010/07/02
- Message not available
- Re: stop using P_, __P in header files,
Juanma Barranquero <=
- Re: stop using P_, __P in header files, Dan Nicolaescu, 2010/07/04
- Re: stop using P_, __P in header files, Juanma Barranquero, 2010/07/04
- Re: stop using P_, __P in header files, Dan Nicolaescu, 2010/07/04
- Re: stop using P_, __P in header files, Juanma Barranquero, 2010/07/04
- Re: stop using P_, __P in header files, Chong Yidong, 2010/07/04
- Re: stop using P_, __P in header files, Dan Nicolaescu, 2010/07/04
- Re: stop using P_, __P in header files, Dan Nicolaescu, 2010/07/04
- Re: stop using P_, __P in header files, Dan Nicolaescu, 2010/07/04
- Re: stop using P_, __P in header files, Juanma Barranquero, 2010/07/04
- Re: stop using P_, __P in header files, Juanma Barranquero, 2010/07/04