Would someone with access please push this to the lowpan-tools repo, or
comment as to why it shouldn't be pushed?

On 12/21/2012 12:37 AM, Alexander Aring wrote:
> Currently I get this compile error:
>
> coord-config-parse.h:106:14: error: unknown type name 'yyscan_t'
> coord-config-parse.y:38:0: error: "YYDEBUG" redefined [-Werror]
>
> "yyscan_t" is defined in parser.h but parser.h need a include from
> coord-config-parse.h for "YYSTYPE".
>
> This patch removes typedef of "yyscan_t" from parser.h into new
> file scanner.h.
>
> File coord-config-parse.y includes scanner.h at first so "yyscan_t"
> is known.
>
> Remove redefined:
> Move #define YYDEBUG 1 in coord-config-parse.y at first. Otherwise
> it will be defined in generated coord-config-parse.h to 0.
>
> Tested with bison (GNU Bison) 2.7.
>
> Signed-off-by: Alexander Aring <alex.ar...@gmail.com>
> ---
>  addrdb/coord-config-parse.y |  5 +++--
>  addrdb/parser.h             |  5 -----
>  addrdb/scanner.h            | 25 +++++++++++++++++++++++++
>  3 files changed, 28 insertions(+), 7 deletions(-)
>  create mode 100644 addrdb/scanner.h
>
> diff --git a/addrdb/coord-config-parse.y b/addrdb/coord-config-parse.y
> index 6b0328b..2e10a88 100644
> --- a/addrdb/coord-config-parse.y
> +++ b/addrdb/coord-config-parse.y
> @@ -20,6 +20,8 @@
>   *  with this program; if not, write to the Free Software Foundation, Inc.,
>   *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
>   */
> +     #define YYDEBUG 1
> +
>       #include <stdio.h>
>       #include <unistd.h>
>       #include <stdlib.h>
> @@ -32,11 +34,10 @@
>       #include <libcommon.h>
>       #include <time.h>
>       #include <addrdb.h>
> +     #include "scanner.h"
>       #include "coord-config-parse.h"
>       #include "parser.h"
>  
> -     #define YYDEBUG 1
> -
>       static uint16_t short_addr;
>       static uint8_t hwaddr[8];
>       static time_t mystamp;
> diff --git a/addrdb/parser.h b/addrdb/parser.h
> index 0f1b4d8..66e8f41 100644
> --- a/addrdb/parser.h
> +++ b/addrdb/parser.h
> @@ -22,11 +22,6 @@
>  #ifndef PARSER_H
>  #define PARSER_H
>  
> -#ifndef YY_TYPEDEF_YY_SCANNER_T
> -#define YY_TYPEDEF_YY_SCANNER_T
> -typedef void* yyscan_t;
> -#endif
> -
>  #ifndef YY_EXTRA_TYPE
>  #define YY_EXTRA_TYPE void *
>  #endif
> diff --git a/addrdb/scanner.h b/addrdb/scanner.h
> new file mode 100644
> index 0000000..11fc815
> --- /dev/null
> +++ b/addrdb/scanner.h
> @@ -0,0 +1,25 @@
> +/*
> + * Linux IEEE 802.15.4 userspace tools
> + *
> + *  This program is free software; you can redistribute it and/or modify
> + *  it under the terms of the GNU General Public License as published by
> + *  the Free Software Foundation; version 2 of the License.
> + *
> + *  This program is distributed in the hope that it will be useful,
> + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
> + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + *  GNU General Public License for more details.
> + *
> + *  You should have received a copy of the GNU General Public License along
> + *  with this program; if not, write to the Free Software Foundation, Inc.,
> + *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
> + */
> +#ifndef SCANNER_H
> +#define SCANNER_H
> +
> +#ifndef YY_TYPEDEF_YY_SCANNER_T
> +#define YY_TYPEDEF_YY_SCANNER_T
> +typedef void* yyscan_t;
> +#endif
> +
> +#endif


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to