mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-07 14:09:26 +00:00
Merge pull request #437 from libexpat/issue-436-protect-expat-config-h
Protect installed expat_config.h from regression + drop obsolescent macro AC_HEADER_STDC (#436)
This commit is contained in:
commit
aafd462fbd
5 changed files with 108 additions and 3 deletions
30
.github/workflows/expat_config_h.yml
vendored
Normal file
30
.github/workflows/expat_config_h.yml
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Copyright (C) 2020 Sebastian Pipping <sebastian@pipping.org>
|
||||
# Licensed under the MIT license
|
||||
|
||||
name: Check expat_config.h.{in,cmake} for regressions
|
||||
|
||||
on:
|
||||
- pull_request
|
||||
- push
|
||||
|
||||
jobs:
|
||||
checks:
|
||||
name: Check expat_config.h.{in,cmake} for regressions
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.4
|
||||
- name: Check expat_config.h.{in,cmake} for regressions
|
||||
run: |
|
||||
set -v
|
||||
# A non-empty diff indicates a change in the list of macros exported:
|
||||
# - Removals would be trouble (because expat_config.h is installed).
|
||||
# - Additions could use an extra check by a human
|
||||
( cd expat && ./buildconf.sh ) # generate expat_config.h.in
|
||||
diff -u <(sort < ci_expat_config_h/expat_config_h_in__expected.txt) <(./ci_expat_config_h/list_exported_macros.sh expat/expat_config.h.in)
|
||||
diff -u <(sort < ci_expat_config_h/expat_config_h_cmake__expected.txt) <(./ci_expat_config_h/list_exported_macros.sh expat/expat_config.h.cmake)
|
||||
|
||||
# Informational (and not an ideal state)
|
||||
diff -u \
|
||||
<(sort < ci_expat_config_h/expat_config_h_in__expected.txt) \
|
||||
<(sort < ci_expat_config_h/expat_config_h_cmake__expected.txt) \
|
||||
|| true
|
36
ci_expat_config_h/expat_config_h_cmake__expected.txt
Normal file
36
ci_expat_config_h/expat_config_h_cmake__expected.txt
Normal file
|
@ -0,0 +1,36 @@
|
|||
BYTEORDER
|
||||
__func__
|
||||
HAVE_ARC4RANDOM
|
||||
HAVE_ARC4RANDOM_BUF
|
||||
HAVE_DLFCN_H
|
||||
HAVE_FCNTL_H
|
||||
HAVE_GETPAGESIZE
|
||||
HAVE_GETRANDOM
|
||||
HAVE_INTTYPES_H
|
||||
HAVE_LIBBSD
|
||||
HAVE_MEMORY_H
|
||||
HAVE_MMAP
|
||||
HAVE_STDINT_H
|
||||
HAVE_STDLIB_H
|
||||
HAVE_STRING_H
|
||||
HAVE_STRINGS_H
|
||||
HAVE_SYSCALL_GETRANDOM
|
||||
HAVE_SYS_STAT_H
|
||||
HAVE_SYS_TYPES_H
|
||||
HAVE_UNISTD_H
|
||||
off_t
|
||||
PACKAGE
|
||||
PACKAGE_BUGREPORT
|
||||
PACKAGE_NAME
|
||||
PACKAGE_STRING
|
||||
PACKAGE_TARNAME
|
||||
PACKAGE_URL
|
||||
PACKAGE_VERSION
|
||||
size_t
|
||||
STDC_HEADERS
|
||||
WORDS_BIGENDIAN
|
||||
XML_ATTR_INFO
|
||||
XML_CONTEXT_BYTES
|
||||
XML_DEV_URANDOM
|
||||
XML_DTD
|
||||
XML_NS
|
40
ci_expat_config_h/expat_config_h_in__expected.txt
Normal file
40
ci_expat_config_h/expat_config_h_in__expected.txt
Normal file
|
@ -0,0 +1,40 @@
|
|||
AC_APPLE_UNIVERSAL_BUILD
|
||||
BYTEORDER
|
||||
const
|
||||
HAVE_ARC4RANDOM
|
||||
HAVE_ARC4RANDOM_BUF
|
||||
HAVE_DLFCN_H
|
||||
HAVE_FCNTL_H
|
||||
HAVE_GETPAGESIZE
|
||||
HAVE_GETRANDOM
|
||||
HAVE_INTTYPES_H
|
||||
HAVE_LIBBSD
|
||||
HAVE_MEMORY_H
|
||||
HAVE_MMAP
|
||||
HAVE_STDINT_H
|
||||
HAVE_STDLIB_H
|
||||
HAVE_STRING_H
|
||||
HAVE_STRINGS_H
|
||||
HAVE_SYSCALL_GETRANDOM
|
||||
HAVE_SYS_PARAM_H
|
||||
HAVE_SYS_STAT_H
|
||||
HAVE_SYS_TYPES_H
|
||||
HAVE_UNISTD_H
|
||||
LT_OBJDIR
|
||||
off_t
|
||||
PACKAGE
|
||||
PACKAGE_BUGREPORT
|
||||
PACKAGE_NAME
|
||||
PACKAGE_STRING
|
||||
PACKAGE_TARNAME
|
||||
PACKAGE_URL
|
||||
PACKAGE_VERSION
|
||||
size_t
|
||||
STDC_HEADERS
|
||||
VERSION
|
||||
WORDS_BIGENDIAN
|
||||
XML_ATTR_INFO
|
||||
XML_CONTEXT_BYTES
|
||||
XML_DEV_URANDOM
|
||||
XML_DTD
|
||||
XML_NS
|
2
ci_expat_config_h/list_exported_macros.sh
Executable file
2
ci_expat_config_h/list_exported_macros.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
#! /usr/bin/env bash
|
||||
grep -Eo '(define|undef) [a-zA-Z0-9_]+' "${1}" | awk '{print $2}' | sort -u
|
|
@ -105,9 +105,6 @@ EXPATCFG_COMPILER_SUPPORTS_VISIBILITY([
|
|||
AX_APPEND_FLAG([-fvisibility=hidden], [AM_CFLAGS])
|
||||
AX_APPEND_FLAG([-DXML_ENABLE_VISIBILITY=1], [AM_CPPFLAGS])])
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
|
||||
dnl We define BYTEORDER to 1234 when the platform is little endian; it
|
||||
|
|
Loading…
Add table
Reference in a new issue