Patch to make R13B01 build with non-C99 compiler
Akira Kitada
akitada@REDACTED
Sun Aug 9 07:03:47 CEST 2009
Hi,
Unlike R12B-5, R13B01 doesn't compile with non-C99 compiler like gcc 2.95.4.
The following patch replaces C99-ish code with good old C89.
Note that I also needed Michael Turner's patch to build it with the
old compiler.
The patch can be found on
http://www.erlang.org/cgi-bin/ezmlm-cgi?2:mss:1440:200907:dadanlkdcocjdfghmcaa
diff --git a/lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src
b/lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src
index f8305db..b96a694 100644
--- a/lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src
+++ b/lib/megaco/src/flex/megaco_flex_scanner_drv.flex.src
@@ -1021,8 +1021,6 @@ static void mfs_load_property_groups(MfsErlDrvData* dataP)
// MfsErlDrvData* dataP = &mfs_drv_data;
#endif
- DBG( ("mfs_load_property_groups -> entry\n") );
-
/*
* Process the property groups string
* v= is a property group delimiter
@@ -1044,6 +1042,8 @@ static void mfs_load_property_groups(MfsErlDrvData* dataP)
int valueStart = 0; // Start position of the property parm name
int valueLen = 0; // Length of the value part
+ DBG( ("mfs_load_property_groups -> entry\n") );
+
mfs_ensure_term_spec(dataP, 10); /*\xa0Just in case... */
while (i <= yyleng) {
@@ -1498,14 +1498,14 @@ DRIVER_INIT(mfs_drv)
static ErlDrvData mfs_start(ErlDrvPort port, char *buf)
{
- DBG( ("mfs_start -> entry\n") );
-
#if defined(MEGACO_REENTRANT_FLEX_SCANNER)
MfsErlDrvData* dataP = ALLOC(sizeof(MfsErlDrvData));
#else
MfsErlDrvData* dataP = &mfs_drv_data;
#endif
+ DBG( ("mfs_start -> entry\n") );
+
dataP->port = port;
dataP->digit_map_name_ptr = NULL;
dataP->digit_map_name_len = 0;
More information about the erlang-patches
mailing list