diff options
| author | David M. Syzdek <david@syzdek.net> | 2023-01-10 01:16:26 -0900 |
|---|---|---|
| committer | David M. Syzdek <david@syzdek.net> | 2023-01-10 01:16:26 -0900 |
| commit | b6f278b635774eeaa55f38eac7c07ff2b11bd8d6 (patch) | |
| tree | 9cd06053129590d66e649d5dbf9143eb60229a85 | |
| parent | 64e8293df4b5b0a3185db52ad05a1744adaad2fe (diff) | |
| download | otputils-b6f278b635774eeaa55f38eac7c07ff2b11bd8d6.tar.gz otputils-b6f278b635774eeaa55f38eac7c07ff2b11bd8d6.tar.bz2 otputils-b6f278b635774eeaa55f38eac7c07ff2b11bd8d6.tar.xz otputils-b6f278b635774eeaa55f38eac7c07ff2b11bd8d6.zip | |
libotputil: adding otputil_compat.h
| -rw-r--r-- | Makefile.am | 3 | ||||
| -rw-r--r-- | include/otputil_compat.h | 50 | ||||
| -rw-r--r-- | lib/libotputil/libotputil.h | 2 |
3 files changed, 54 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index 2a8ccc7..6fc9976 100644 --- a/Makefile.am +++ b/Makefile.am | |||
| @@ -72,7 +72,7 @@ man_MANS = | |||
| 72 | info_TEXINFOS = | 72 | info_TEXINFOS = |
| 73 | noinst_LTLIBRARIES = | 73 | noinst_LTLIBRARIES = |
| 74 | noinst_LIBRARIES = | 74 | noinst_LIBRARIES = |
| 75 | noinst_HEADERS = | 75 | noinst_HEADERS = include/otputil_compat.h |
| 76 | noinst_PROGRAMS = | 76 | noinst_PROGRAMS = |
| 77 | bin_PROGRAMS = | 77 | bin_PROGRAMS = |
| 78 | bin_SCRIPTS = | 78 | bin_SCRIPTS = |
| @@ -106,6 +106,7 @@ EXTRA_DIST = $(noinst_HEADERS) \ | |||
| 106 | README.md \ | 106 | README.md \ |
| 107 | TODO.md \ | 107 | TODO.md \ |
| 108 | include/otputil.h \ | 108 | include/otputil.h \ |
| 109 | include/otputil_compat.h \ | ||
| 109 | lib/libotputil/libotputil.sym \ | 110 | lib/libotputil/libotputil.sym \ |
| 110 | tests/otp-dicts/otp-dicts.h \ | 111 | tests/otp-dicts/otp-dicts.h \ |
| 111 | tests/test-otputil-hotp.sh \ | 112 | tests/test-otputil-hotp.sh \ |
diff --git a/include/otputil_compat.h b/include/otputil_compat.h new file mode 100644 index 0000000..c61077d --- /dev/null +++ b/include/otputil_compat.h | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | /* | ||
| 2 | * OTP Utilities | ||
| 3 | * Copyright (C) 2022 David M. Syzdek <david@syzdek.net>. | ||
| 4 | * | ||
| 5 | * Redistribution and use in source and binary forms, with or without | ||
| 6 | * modification, are permitted provided that the following conditions are | ||
| 7 | * met: | ||
| 8 | * | ||
| 9 | * * Redistributions of source code must retain the above copyright | ||
| 10 | * notice, this list of conditions and the following disclaimer. | ||
| 11 | * * Redistributions in binary form must reproduce the above copyright | ||
| 12 | * notice, this list of conditions and the following disclaimer in the | ||
| 13 | * documentation and/or other materials provided with the distribution. | ||
| 14 | * * Neither the name of David M. Syzdek nor the | ||
| 15 | * names of its contributors may be used to endorse or promote products | ||
| 16 | * derived from this software without specific prior written permission. | ||
| 17 | * | ||
| 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
| 19 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
| 20 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 21 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID M SYZDEK BE LIABLE FOR | ||
| 22 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
| 24 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
| 25 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 26 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 27 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 28 | * SUCH DAMAGE. | ||
| 29 | */ | ||
| 30 | /* | ||
| 31 | * @file include/otputil_compat.h | ||
| 32 | */ | ||
| 33 | #ifndef __OTPUTIL_COMPAT_H | ||
| 34 | #define __OTPUTIL_COMPAT_H 1 | ||
| 35 | |||
| 36 | |||
| 37 | /////////////////// | ||
| 38 | // // | ||
| 39 | // Definitions // | ||
| 40 | // // | ||
| 41 | /////////////////// | ||
| 42 | #pragma mark - Definitions | ||
| 43 | |||
| 44 | // defined in the Single UNIX Specification | ||
| 45 | #ifndef _XOPEN_SOURCE | ||
| 46 | # define _XOPEN_SOURCE 600 | ||
| 47 | #endif | ||
| 48 | |||
| 49 | |||
| 50 | #endif /* end of header */ | ||
diff --git a/lib/libotputil/libotputil.h b/lib/libotputil/libotputil.h index ee57b84..d96b5a9 100644 --- a/lib/libotputil/libotputil.h +++ b/lib/libotputil/libotputil.h | |||
| @@ -41,6 +41,8 @@ | |||
| 41 | /////////////// | 41 | /////////////// |
| 42 | #pragma mark - Headers | 42 | #pragma mark - Headers |
| 43 | 43 | ||
| 44 | #include <otputil_compat.h> | ||
| 45 | |||
| 44 | #ifdef HAVE_CONFIG_H | 46 | #ifdef HAVE_CONFIG_H |
| 45 | #include <config.h> | 47 | #include <config.h> |
| 46 | #endif | 48 | #endif |
