This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH rsa/stdint_noheaders] Cleanup: Add #include <stdint.h> for uint[32|64]_t usage (except installed headers)


On Tue, 2013-06-04 at 11:47 -0400, Carlos O'Donell wrote:
> On 06/04/2013 11:44 AM, Ryan S. Arnold wrote:
> > On Thu, May 30, 2013 at 12:23 PM, Ryan S. Arnold <ryan.arnold@gmail.com> wrote:
> >> On Sun, May 26, 2013 at 2:40 PM, Thomas Schwinge
> >> <thomas@codesourcery.com> wrote:
> >>>>>> On Wed, May 01, 2013 at 11:23:39AM -0500, Ryan Arnold wrote:
> >>>>>>> Per Roland's suggestion in "[PATCH rsa/stdint] Cleanup: Add #include
> >>>>>>> <stdint.h> for uint[32|64]_t usage" I have removed the installed headers
> >>>>>>> from this patch, and separated the ChangeLog entries into the proper
> >>>>>>> subdirectory ChangeLogs.
> >>>
> >>>> Pushed upstream:
> >>>>
> >>>> commit e054f494306530720114b321b3d97ca2f397cbbb
> >>>> Author: Ryan S. Arnold <rsa@linux.vnet.ibm.com>
> >>>> Date:   Wed May 1 10:46:34 2013 -0500
> >>>>
> >>>>     Add #include <stdint.h> for uint[32|64]_t usage (except installed headers).
> >>>
> >>> I'm seeing:
> >>>
> >>>     make[2]: Entering directory `[...]/locale'
> >>>     /usr/bin/perl gen-translit.pl < C-translit.h.in > C-translit.h.tmp
> >>>     mv -f C-translit.h.tmp C-translit.h
> >>>
> >>> ..., resulting in:
> >>>
> >>> diff --git locale/C-translit.h locale/C-translit.h
> >>> index 98f66e2..d7ec778 100644
> >>> --- locale/C-translit.h
> >>> +++ locale/C-translit.h
> >>> @@ -1,5 +1,3 @@
> >>> -#include <stdint.h>
> >>> -
> >>>  #define NTRANSLIT 1355
> >>>  static const uint32_t translit_from_idx[] =
> >>>  {
> >>>
> >>> Should a) the change be reverted for this file (that is, the above hunk
> >>> be applied), or b) the generator be changed to emit that #include, or,
> >>> heck, c) the autogenerated file be removed from the source repository
> >>> (and then some)?
> >>
> >>
> >>
> >> Siddhesh pointed out to me that I should have modified the perl script
> >> which is used to generate this file, rather than the generated file.
> >>
> >> I'll do that shortly.
> > 
> > Considering that C-translit.h is generated, whose responsibility is it
> > to make sure the generated version is pushed into the source tree?
> > 
> > Should I make the change to gen-translit.pl as well as C-translit.h
> > and commit both?  Or should I just make the change to gen-translit.pl
> > and let someone else check in the generated C-translit.h later?
> > 
> > I suppose Thomas's question still stands.  Should the autogenerated
> > file be removed from the source repository?
> 
> It's your responsibility to update the generator, generate the file,
> and check both in. We shouldn't need to force everyone to regenerate
> files on their target system, it would really complicate the build
> process.
> 
> Feel free to argue differently though.

Nope, I'm fine with this.

I regenerated and pushed a fix as:

commit 869378a5bf1d415f52c14d9697b886d8143a73e1
Author: Ryan S. Arnold <rsa@linux.vnet.ibm.com>
Date:   Wed Jun 5 10:28:33 2013 -0500

    Add #include <stdint.h> to locale/gen-translit.pl and fix C-translit.h.

ChangeLog
2013-06-05  Ryan S. Arnold  <rsa@linux.vnet.ibm.com>

        * locale/C-translit.h: Revert #include <stdint.h> because this is a
        generated file.  Regenerate properly from gen-translit.pl.
        * locale/gen-translit.pl: Add #include <stdint.h>.  This generates
        locale/C-translit.h.

diff --git a/locale/C-translit.h b/locale/C-translit.h
index 98f66e2..fdd4450 100644
--- a/locale/C-translit.h
+++ b/locale/C-translit.h
@@ -1,5 +1,4 @@
 #include <stdint.h>
-
 #define NTRANSLIT 1355
 static const uint32_t translit_from_idx[] =
 {
diff --git a/locale/gen-translit.pl b/locale/gen-translit.pl
index d44310b..5f30e30 100644
--- a/locale/gen-translit.pl
+++ b/locale/gen-translit.pl
@@ -53,6 +53,8 @@ while (<F>) {
   }
 }

+printf "#include <stdint.h>\n";
+
 printf "#define NTRANSLIT %d\n", $#froms + 1;

 printf "static const uint32_t translit_from_idx[] =\n{\n  ";



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]