Commit Graph

302 Commits

Author SHA1 Message Date
Nicolas Williams
20497ed2d4 com_err: Fix bison/byacc invocation 2022-01-21 23:01:44 -06:00
heitbaum
c7bd01c62a yyerror: update to POSIX standard
To comply with the latest POSIX standard, in Yacc compatibility mode
(options `-y`/`--yacc`) Bison now generates prototypes for yyerror and
yylex.  In some situations, this is breaking compatibility: if the user
has already declared these functions but with some differences (e.g., to
declare them as static, or to use specific attributes), the generated
parser will fail to compile.  To disable these prototypes, #define yyerror
(to `yyerror`), and likewise for yylex.

refer: https://git.savannah.gnu.org/cgit/bison.git/tree/NEWS

GNU Bison 3.8
2021-09-10 09:11:23 +10:00
Nicolas Williams
5eade227ce com_err: make error_table_name() thread-safe 2020-04-24 00:11:56 -05:00
Daria Phoebe Brashear
78c915f65a lex: %option not supported by solaris lex
it turns out that we don't need to tell lex we don't plan to use unput;
we can just.... not use unput. however, if we're flex, use the command
line option if it's available, to avoid warnings
2018-12-18 13:12:46 -06:00
Günther Deschner
27c6c1e177 s4-heimdal: Fix the format-truncation errors.
../lib/com_err/compile_et.c: In function ‘generate_h’:
../lib/com_err/compile_et.c:138:33: error: ‘%s’ directive output may be truncated writing up to 127 bytes into a region of size 126 [-Werror=format-truncation=]
     snprintf(fn, sizeof(fn), "__%s__", hfn);
                                 ^~     ~~~
../lib/com_err/compile_et.c:138:5: note: ‘snprintf’ output between 5 and 132 bytes into a destination of size 128
     snprintf(fn, sizeof(fn), "__%s__", hfn);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/com_err/compile_et.c: In function ‘main’:
../lib/com_err/compile_et.c:234:35: error: ‘.h’ directive output may be truncated writing 2 bytes into a region of size between 1 and 128 [-Werror=format-truncation=]
     snprintf(hfn, sizeof(hfn), "%s.h", Basename);
                                   ^~
../lib/com_err/compile_et.c:234:5: note: ‘snprintf’ output between 3 and 130 bytes into a destination of size 128
     snprintf(hfn, sizeof(hfn), "%s.h", Basename);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/com_err/compile_et.c:235:35: error: ‘.c’ directive output may be truncated writing 2 bytes into a region of size between 1 and 128 [-Werror=format-truncation=]
     snprintf(cfn, sizeof(cfn), "%s.c", Basename);
                                   ^~
../lib/com_err/compile_et.c:235:5: note: ‘snprintf’ output between 3 and 130 bytes into a destination of size 128
     snprintf(cfn, sizeof(cfn), "%s.c", Basename);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13437

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jun  8 13:23:51 CEST 2018 on sn-devel-144
(cherry picked from Samba commit 7ddbf6035dfec6806536f99d0257245f70661363)
2018-09-10 21:18:39 -04:00
Abhinav Upadhyay
abee4b3f68 Add comma between Nm entries 2017-11-04 16:56:43 -04:00
Nicolas Williams
715cb46de6 Fix Appveyor build: lib/com_err 2017-05-26 23:24:30 -04:00
Nicolas Williams
6a0f45c4d7 Use __attribute__ ((__name__)) form
Protect against macros named noreturn and so on.
2017-03-13 18:39:41 -04:00
Nicolas Williams
3e65dfbc32 Fix make dist missing files (#228) 2016-12-15 12:15:56 -06:00
Viktor Dukhovni
17d6d0ac1e Avoid yydebug compiler warning 2016-11-14 01:05:55 -05:00
Nicolas Williams
e40ef47b57 Do not install compile_et (#178) 2016-11-08 16:13:14 -06:00
Love Hornquist Astrand
92c6891c36 get the prototype right for yyparse, it returns an int 2013-06-17 09:29:54 -07:00
Love Hornquist Astrand
db85d0998e include <stddef.h> so that we have a size_t
from metanest and https://github.com/heimdal/heimdal/issues/15
2012-09-23 10:56:16 -07:00
Jeffrey Altman
571e7daab3 Revert "generated files must #include config if supported"
therefore #include config.h is not required.

This reverts commit 9be792055c.
2012-08-12 16:05:04 -04:00
Andrew Tridgell
d9d8e94d66 heimdal: fixed -Werror=format error in com_err
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2012-08-02 14:43:52 +02:00
Roland C. Dowdeswell
7aaeafb72b Typo and separate formatting error in lib/com_err/com_err.3.
Reported by jklowden@schemamania.org and jdf@NetBSD.org via NetBSD in:

http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=46651
2012-07-04 21:53:36 +01:00
Jeffrey Altman
9be792055c generated files must #include config if supported
The source files generated by compile_et and asn1-compile must
begin with:

  #ifdef HAVE_CONFIG_H
  #include <config.h>
  #endif

This permits conditional includes based on HAVE_STDINT_H and
HAVE_UNISTD_H to work.

Change-Id: Iefe25317ac3cb1970793748b8318174bcd7a087f
2012-04-10 17:17:33 -04:00
Roland C. Dowdeswell
cc47c8fa7b Turn on -Wextra -Wno-sign-compare -Wno-unused-paramter and fix issues.
We turn on a few extra warnings and fix the fallout that occurs
when building with --enable-developer.  Note that we get different
warnings on different machines and so this will be a work in
progress.  So far, we have built on NetBSD/amd64 5.99.64 (which
uses gcc 4.5.3) and Ubuntu 10.04.3 LTS (which uses gcc 4.4.3).

Notably, we fixed

	1.  a lot of missing structure initialisers,

	2.  unchecked return values for functions that glibc
	    marks as __attribute__((warn-unused-result)),

	3.  made minor modifications to slc and asn1_compile
	    which can generate code which generates warnings,
	    and

	4.  a few stragglers here and there.

We turned off the extended warnings for many programs in appl/ as
they are nearing the end of their useful lifetime, e.g.  rsh, rcp,
popper, ftp and telnet.

Interestingly, glibc's strncmp() macro needed to be worked around
whereas the function calls did not.

We have not yet tried this on 32 bit platforms, so there will be
a few more warnings when we do.
2012-02-20 19:45:41 +00:00
Linus Nordberg
2e35198908 Add version-script.map to _DEPENDENCIES.
Added to 11 out of 14 directories with map files.  Not lib/ntlm,
lib/hcrypto and kdc which have the map file as an explicit dependency
to _OBBJECTS.

Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org>
2011-07-24 14:07:59 -07:00
Love Hörnquist Åstrand
12403a31ce sprinkle more windows files 2011-07-23 11:18:21 -07:00
Love Hörnquist Åstrand
7aaba443bc add NTMakefile and windows directories 2011-07-17 12:16:59 -07:00
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -07:00
Andrew Bartlett
995d305f8c lib/com_err only use error_message for the exported libcom_err
This avoids using the same function name in compile_et internally

Andrew Bartlett

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2011-01-26 12:00:32 -08:00
Love Hornquist Astrand
1c400805f6 use %option nounput 2010-11-26 12:08:21 -08:00
Asanka C. Herath
29383b4cd0 Windows: Merge in application manifest when building assemblies 2010-11-24 15:33:17 -05:00
Asanka C. Herath
79454a6f62 Block conflicting declarations from Bison
If YYMALLOC and YYFREE aren't defined, Bison can generate
prototypes for them that conflict with the native declarations.
2010-11-24 15:33:08 -05:00
Asanka C. Herath
8432f850ed Windows: Make Heimdal a single assembly 2010-11-24 15:32:59 -05:00
Asanka C. Herath
f51ded7f34 Export annotations for com_right.h 2010-11-24 15:32:46 -05:00
Asanka C. Herath
70c3a1c209 Move export macros from com_err.h to com_right.h 2010-11-24 15:32:45 -05:00
Asanka C. Herath
610bd66bbd Windows: Support building using newer flex 2010-11-24 15:32:29 -05:00
Asanka C. Herath
6ee40622b1 Embed application manifest in Heimdal assembly .dlls 2010-11-24 15:32:24 -05:00
Asanka C. Herath
1b32efe62c Windows: Include manifest dependencies by default when building tools 2010-11-24 15:32:20 -05:00
Asanka C. Herath
f40fe926ad Windows: Comprehensive clean target 2010-11-24 15:32:13 -05:00
Asanka Herath
225e142ac5 Windows: Use correct calling convention for com_err 2010-08-20 13:14:13 -04:00
Asanka Herath
ba44354336 Windows: Check exported symbols
During a test run, cross check the Windows exports list against the
version-script files.  For the test to pass, all symbols on either
list should be accounted for.

If there are symbols that are specific to Windows or symbols that are
not included on Windows, they should be annotated in the .def file as
follows:

    ;!  non_windows_symbol

    	common_symbol

        windows_only_symbol ;!
2010-08-20 13:06:55 -04:00
Asanka Herath
cdcdc5cad5 Windows: Version information for binaries 2010-08-20 13:06:54 -04:00
Asanka Herath
ea4d8dbfdb Windows: Use EXEPREP and DLLPREP macros for processing binaries
Once DLLs and EXEs are built, they need to have their manifests
processed and signed.  These steps are encapsulated in the EXEPREP and
DLLPREP Makefile macros.  Use them instead of invoking each processing
macro individually.
2010-08-20 13:04:06 -04:00
Asanka Herath
8f6d724979 (lib/com_err) Add missing exports 2009-11-26 01:37:11 -05:00
Love Hornquist Astrand
2f290bdd96 Merge 'master' 2009-11-25 02:32:26 +01:00
Asanka Herath
16b7db3e5f Resource file for windows
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2009-11-25 02:04:14 +01:00
Love Hornquist Astrand
3199980f5a use rk_PATH_DELIM 2009-11-25 02:01:57 +01:00
Love Hornquist Astrand
c6bbdb545b First drop of Windows build infrastructure from Secure Endpoints 2009-11-24 12:12:53 -08:00
Asanka Herath
59ae14e814 Consistency fixes for lib/com_err 2009-11-24 10:18:19 -08:00
Asanka Herath
eef0943c0e (compile_et.c) Pick the last path delimiter whichever kind of slash it is 2009-11-24 10:11:15 -08:00
Asanka Herath
b1063ea8fc Initial Windows port 2009-11-24 10:11:14 -08:00
Love Hornquist Astrand
d6d4efe386 Include roken.h for strlcpy rewrite 2009-11-15 21:31:20 -08:00
Love Hornquist Astrand
0c5a5849e1 add com_right_r 2009-10-12 10:41:32 -07:00
Love Hornquist Astrand
f8b06809a1 export _et_list, report by Barry Sia 2009-09-23 16:23:04 -07:00
Love Hörnquist Åstrand
b026493a89 rename different symbols
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24761 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-17 02:50:39 +00:00
Love Hörnquist Åstrand
fdbbdc505d drop libncom_err.la
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24465 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-25 00:48:29 +00:00