From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: stop using P_, __P in header files Date: Sun, 04 Jul 2010 11:55:12 -0400 Message-ID: References: <4C2DB1E0.7010305@swipnet.se> <83aaqa9ml7.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1278258923 14898 80.91.229.12 (4 Jul 2010 15:55:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 4 Jul 2010 15:55:23 +0000 (UTC) Cc: Eli Zaretskii , Jan =?iso-8859-1?Q?Dj=E4rv?= , emacs-devel@gnu.org To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 04 17:55:21 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OVRXM-00038a-Mi for ged-emacs-devel@m.gmane.org; Sun, 04 Jul 2010 17:55:21 +0200 Original-Received: from localhost ([127.0.0.1]:36265 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OVRXM-0006CJ-92 for ged-emacs-devel@m.gmane.org; Sun, 04 Jul 2010 11:55:20 -0400 Original-Received: from [199.232.76.173] (port=33553 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OVRXH-0006Ap-GR for emacs-devel@gnu.org; Sun, 04 Jul 2010 11:55:15 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1OVRXG-0006st-66 for emacs-devel@gnu.org; Sun, 04 Jul 2010 11:55:15 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:40328) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1OVRXF-0006sp-VX for emacs-devel@gnu.org; Sun, 04 Jul 2010 11:55:14 -0400 Original-Received: from dann by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1OVRXF-0001md-3r; Sun, 04 Jul 2010 11:55:13 -0400 In-Reply-To: (Juanma Barranquero's message of "Sun\, 4 Jul 2010 17\:35\:46 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:126747 Archived-At: Juanma Barranquero writes: > On Sun, Jul 4, 2010 at 10:08, Dan Nicolaescu wrote: > >> I've done most of this. > > Thanks. I've fixed a few prototypes that break compilation on Windows > or generate warnings. Thanks! > 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? Yes, they should. I did not convert the code by hand, but by using protoize (which runs the preprocessor) so this is why such prototypes got changed. I caught a few similar ones and worked around them, but it looks like some similar things got away. > 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? I'd say we should resync with gnulib. protoize made this change, so it was not intentional... > 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. That seems TRTD.