help-flex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 2.5.31: unprotected uint32_t usage in flex.skl


From: Hans-Bernhard Broeker
Subject: Re: 2.5.31: unprotected uint32_t usage in flex.skl
Date: Mon, 7 Jul 2003 16:14:56 +0200 (MET DST)

On Mon, 7 Jul 2003, W. L. Estes wrote:

> Oh no. Thanks for sending them. Just be sure to include any relevant
> platform information with each one.

Digital Unix (a.k.a. Tru64 or OSF/1) version 4.0d on a 64-bit DEC Alpha
processor.

> ah, the bare uint references get covered up by flexint.h. That's why
> you had trouble.

No, the actually bare ones are *not* covered up.  The cover-up relies on
them being prefixed with "flex_", and that's the exact change it took for
this to compile:

diff -uwpr -x Makefile.in flex-2.5.31/flex.skl
/var/tmp/broeker/flex-2.5.31/flex
--- flex-2.5.31/flex.skl        Tue Apr  1 03:51:38 2003
+++ /var/tmp/broeker/flex-2.5.31/flex.skl       Fri Jul  4 14:34:10 2003
@@ -1100,7 +1100,7 @@ static struct yytbl_dmap yydmap[] =
 /** A tables-reader object to maintain some state in the read. */
 struct yytbl_reader {
     FILE * fp; /**< input stream */
-    uint32_t bread; /**< bytes read since beginning of current tableset */
+    flex_uint32_t bread; /**< bytes read since beginning of current tableset */
 };

 %endif
@@ -2867,35 +2867,35 @@ m4preproc_include(`tables_shared.c')
 static int yytbl_read8 (void *v, struct yytbl_reader * rd)
 {
     errno = 0;
-    if (fread (v, sizeof (uint8_t), 1, rd->fp) != 1){
+    if (fread (v, sizeof (flex_uint8_t), 1, rd->fp) != 1){
         errno = EIO;
         return -1;
     }
-    rd->bread += sizeof(uint8_t);
+    rd->bread += sizeof(flex_uint8_t);

[... and *lots* more along the same pattern ...]

> It is worth noting though that skel.c is dependent on flex.skl so
> skel.c is a built_SOURCE.

Right.  But should it be present in the tarball at all, then?  I think
not.

Either way the rules have to be capable of building it in its correct
place.  Which the current version isn't, viz. the m4 error messages about
included files sitting somewher below $(srcdir).  This would need some -I
$(srcdir) flag to m4 or similar.

-- 
Hans-Bernhard Broeker (address@hidden)
Even if all the snow were burnt, ashes would remain.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]