Skip to content

Commit d46bf4f

Browse files
committed
Changes for string conversion of negative POSIX timestamps
1 parent 47838ce commit d46bf4f

File tree

9 files changed

+194
-80
lines changed

9 files changed

+194
-80
lines changed

.github/workflows/build_macos.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Build from source.
2+
name: build_macos
3+
on: [push, pull_request]
4+
permissions: read-all
5+
jobs:
6+
build_ubuntu:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
include:
11+
- os: macos-12
12+
configure_options: ''
13+
- os: macos-13
14+
configure_options: ''
15+
- os: macos-14
16+
configure_options: ''
17+
- os: macos-15
18+
configure_options: ''
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Install build dependencies
22+
run: |
23+
brew update -q
24+
brew install -q autoconf automake gettext gnu-sed libtool pkg-config || true
25+
brew link --force gettext
26+
ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
27+
- name: Download test data
28+
run: |
29+
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
30+
- name: Building from source
31+
env:
32+
CC: ${{ matrix.compiler }}
33+
run: |
34+
tests/build.sh ${{ matrix.configure_options }}
35+
- name: Run tests
36+
run: |
37+
tests/runtests.sh

acinclude.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dnl Checks for required headers and functions
22
dnl
3-
dnl Version: 20240413
3+
dnl Version: 20240518
44

55
dnl Function to detect if libfdatetime dependencies are available
66
AC_DEFUN([AX_LIBFDATETIME_CHECK_LOCAL],

appveyor.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,23 @@ environment:
7272
PYTHON_PATH: "C:\\Python311"
7373
- TARGET: macos-x64-clang
7474
BUILD_ENVIRONMENT: xcode
75-
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
75+
APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma
7676
HOMEBREW_NO_INSTALL_CLEANUP: 1
7777
CC: clang
7878
CFLAGS: "-I/usr/local/include"
7979
LDFLAGS: "-L/usr/local/lib"
8080
CONFIGURE_OPTIONS: ""
8181
- TARGET: macos-x64-gcc
8282
BUILD_ENVIRONMENT: xcode
83-
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
83+
APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma
8484
HOMEBREW_NO_INSTALL_CLEANUP: 1
8585
CC: gcc
8686
CFLAGS: "-I/usr/local/include"
8787
LDFLAGS: "-L/usr/local/lib"
8888
CONFIGURE_OPTIONS: ""
8989
- TARGET: macos-pkgbuild
9090
BUILD_ENVIRONMENT: xcode
91-
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
91+
APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma
9292
HOMEBREW_NO_INSTALL_CLEANUP: 1
9393
CONFIGURE_OPTIONS: "--disable-dependency-tracking --prefix=/usr/local --with-pyprefix"
9494
- TARGET: cygwin64-gcc

autogen.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Script to generate the necessary files for a msvscpp build
22
#
3-
# Version: 20240306
3+
# Version: 20241014
44

55
$WinFlex = "..\win_flex_bison\win_flex.exe"
66
$WinBison = "..\win_flex_bison\win_bison.exe"
77

8-
$Library = Get-Content -Path configure.ac | select -skip 3 -first 1 | % { $_ -Replace " \[","" } | % { $_ -Replace "\],","" }
9-
$Version = Get-Content -Path configure.ac | select -skip 4 -first 1 | % { $_ -Replace " \[","" } | % { $_ -Replace "\],","" }
8+
$Library = Get-Content -Path configure.ac | select -skip 3 -first 1 | % { $_ -Replace " \[","" } | % { $_ -Replace "\],","" }
9+
$Version = Get-Content -Path configure.ac | select -skip 4 -first 1 | % { $_ -Replace " \[","" } | % { $_ -Replace "\],","" }
1010
$Prefix = ${Library}.Substring(3)
1111

1212
Get-Content -Path "include\${Library}.h.in" | Out-File -Encoding ascii "include\${Library}.h"

autogen.sh

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,38 @@
11
#!/bin/sh
2-
# Script to generate ./configure using the autotools
2+
# Script to generate configure and Makefile using the autotools.
33
#
4-
# Version: 20230405
4+
# Version: 20241013
55

66
EXIT_SUCCESS=0;
77
EXIT_FAILURE=1;
88

9-
BINDIR="/usr/bin";
9+
BINDIR=`which aclocal`;
10+
BINDIR=`dirname ${BINDIR}`;
1011

11-
if ! test -x "${BINDIR}/aclocal";
12+
if ! test -x "${BINDIR}/aclocal" && test "${BINDIR}" != "/usr/bin";
1213
then
13-
BINDIR="/usr/local/bin";
14+
BINDIR="/usr/bin";
1415
fi
15-
if ! test -x "${BINDIR}/aclocal";
16+
if ! test -x "${BINDIR}/aclocal" && test "${BINDIR}" != "/usr/local/bin";
1617
then
1718
BINDIR="/usr/local/bin";
1819
fi
19-
if ! test -x "${BINDIR}/aclocal";
20+
if ! test -x "${BINDIR}/aclocal" && test "${BINDIR}" != "/opt/local/bin";
2021
then
2122
# Default location of MacPorts installed binaries.
2223
BINDIR="/opt/local/bin";
2324
fi
24-
if ! test -x "${BINDIR}/aclocal";
25+
if ! test -x "${BINDIR}/aclocal" && test "${BINDIR}" != "/opt/homebrew/bin";
26+
then
27+
# Default location of Homebrew installed binaries.
28+
BINDIR="/opt/homebrew/bin";
29+
fi
30+
if ! test -x "${BINDIR}/aclocal" && test "${BINDIR}" != "/mingw32/bin";
2531
then
2632
# Default location of 32-bit MSYS2-MinGW installed binaries.
2733
BINDIR="/mingw32/bin";
2834
fi
29-
if ! test -x "${BINDIR}/aclocal";
35+
if ! test -x "${BINDIR}/aclocal" && test "${BINDIR}" != "/mingw64/bin";
3036
then
3137
# Default location of 64-bit MSYS2-MinGW installed binaries.
3238
BINDIR="/mingw64/bin";
@@ -91,35 +97,30 @@ else
9197

9298
exit ${EXIT_FAILURE};
9399
fi
94-
95100
if ! test -x "${AUTOCONF}";
96101
then
97102
echo "Unable to find: autoconf";
98103

99104
exit ${EXIT_FAILURE};
100105
fi
101-
102106
if ! test -x "${AUTOHEADER}";
103107
then
104108
echo "Unable to find: autoheader";
105109

106110
exit ${EXIT_FAILURE};
107111
fi
108-
109112
if ! test -x "${AUTOMAKE}";
110113
then
111114
echo "Unable to find: automake";
112115

113116
exit ${EXIT_FAILURE};
114117
fi
115-
116118
if ! test -x "${AUTOPOINT}";
117119
then
118120
echo "Unable to find: autopoint";
119121

120122
exit ${EXIT_FAILURE};
121123
fi
122-
123124
if ! test -x "${LIBTOOLIZE}";
124125
then
125126
echo "Unable to find: libtoolize";

configure.ac

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
AC_PREREQ([2.71])
22

33
AC_INIT(
4-
[libfdatetime],
5-
[20240518],
6-
4+
[libfdatetime],
5+
[20241214],
6+
77

88
AC_CONFIG_SRCDIR(
9-
[include/libfdatetime.h.in])
9+
[include/libfdatetime.h.in])
1010

1111
AM_INIT_AUTOMAKE([gnu 1.6 tar-ustar])
1212
AM_EXTRA_RECURSIVE_TARGETS([sources splint])
@@ -71,21 +71,21 @@ CFLAGS="$CFLAGS -Wall";
7171

7272
dnl Check if requires and build requires should be set in spec file
7373
AS_IF(
74-
[test "x$ac_cv_libcerror" = xyes],
75-
[AC_SUBST(
76-
[libfdatetime_spec_requires],
77-
[Requires:])
78-
])
74+
[test "x$ac_cv_libcerror" = xyes],
75+
[AC_SUBST(
76+
[libfdatetime_spec_requires],
77+
[Requires:])
78+
])
7979

8080
dnl Set the date for the dpkg files
8181
AC_SUBST(
82-
[DPKG_DATE],
83-
[`date -R 2> /dev/null`])
82+
[DPKG_DATE],
83+
[`date -R 2> /dev/null`])
8484

8585
dnl Set the date for the spec file
8686
AC_SUBST(
87-
[SPEC_DATE],
88-
[`date +"%a %b %e %Y" 2> /dev/null`])
87+
[SPEC_DATE],
88+
[`date +"%a %b %e %Y" 2> /dev/null`])
8989

9090
dnl Generate Makefiles
9191
AC_CONFIG_FILES([Makefile])

0 commit comments

Comments
 (0)