mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
examples: beware of intl portability issues
Reported by Horst von Brand. https://lists.gnu.org/r/bug-bison/2020-04/msg00033.html * examples/c/bistromathic/Makefile: libintl might not be needed, but libm probably is. * examples/c/bistromathic/parse.y: Include locale.h.
This commit is contained in:
@@ -5,7 +5,7 @@ BASE = bistromathic
|
||||
BISON = bison
|
||||
XSLTPROC = xsltproc
|
||||
|
||||
# We need to find the headers and libs for readline and intl.
|
||||
# We need to find the headers and libs for readline (and possibly intl).
|
||||
# You probably need to customize this for your own environment.
|
||||
CPPFLAGS = -I/opt/local/include
|
||||
LDFLAGS = -L/opt/local/lib
|
||||
@@ -14,7 +14,7 @@ LDFLAGS = -L/opt/local/lib
|
||||
BISON_LOCALEDIR = $(shell $(BISON) $(BISON_FLAGS) --print-localedir)
|
||||
CPPFLAGS += -DENABLE_NLS -DBISON_LOCALEDIR='"$(BISON_LOCALEDIR)"'
|
||||
|
||||
LIBS = -lreadline -lintl
|
||||
LIBS = -lreadline -lm # In some environments, -lintl is needed.
|
||||
|
||||
all: $(BASE)
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
%code top {
|
||||
#include <ctype.h> // isdigit
|
||||
#include <locale.h> // LC_ALL
|
||||
#include <math.h> // cos, sin, etc.
|
||||
#include <stdarg.h> // va_start
|
||||
#include <stdio.h> // printf
|
||||
|
||||
Reference in New Issue
Block a user