Skip to content

Commit 8c80cea

Browse files
committed
Merge commit '15e0582dd02b702817601b73804af9145da6b0f4' into pull-subtrees
2 parents 318e691 + 15e0582 commit 8c80cea

File tree

4 files changed

+36
-4
lines changed

4 files changed

+36
-4
lines changed

libreadtags/.github/workflows/msys2.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,5 @@ jobs:
5050
- run: make check V=1
5151
- run: cat tests/test-suite.log
5252
if: failure()
53+
- run: for x in tests/*.log; do echo '#' $x; cat $x; done
54+
if: failure()

libreadtags/NEWS.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
# Version ???
1+
# Version 0.2.1
2+
3+
- use "m" mode flag of fopen only when compiling with glibc 2.3 or higher.
4+
5+
- LT_VERSION 2:1:1
6+
7+
- no change in public interface
8+
9+
# Version 0.2.0
210

311
- delete debug output automatically printed when DEBUG is defiend in
412
build-time.
@@ -20,6 +28,15 @@
2028
- add a new API function (tagsFindPseudoTag) for finding a pseudo tag for
2129
given name.
2230

31+
- Use mmap(2) when opening a tags file if fopen() supports "m" mode flag.
32+
33+
- LT_VERSION 2:0:1
34+
35+
- extend the API
36+
37+
- add a constant: TagErrnoFileMaybeTooBig
38+
- add a function: tagsFindPseudoTag
39+
2340
# Version 0.1.0
2441

2542
- propagate internal errors to caller

libreadtags/configure.ac

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- Autoconf -*-
2-
AC_INIT(libreadtags, 0.1.0)
2+
AC_INIT(libreadtags, 0.2.1)
33
AC_CONFIG_MACRO_DIR([m4])
44
AC_CONFIG_SRCDIR([readtags.c])
55

@@ -27,8 +27,12 @@ AC_PROG_LIBTOOL
2727
#
2828
# 2:0:1
2929
# introduced TagErrnoFileMayTooBig.
30+
# introduced tagsFindPseudoTag.
3031
#
31-
AC_SUBST(LT_VERSION, [2:0:1])
32+
# 2:1:1
33+
# no change in public interface.
34+
#
35+
AC_SUBST(LT_VERSION, [2:1:1])
3236

3337
AC_ARG_ENABLE([gcov],
3438
[AS_HELP_STRING([--enable-gcov],

libreadtags/readtags.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,16 @@ static tagFile *initialize (const char *const filePath, tagFileInfo *const info)
832832
result->fields.max, sizeof (tagExtensionField));
833833
if (result->fields.list == NULL)
834834
goto mem_error;
835-
result->fp = fopen (filePath, "rb");
835+
836+
#if defined(__GLIBC__) && (__GLIBC__ >= 2) \
837+
&& defined(__GLIBC_MINOR__) && (__GLIBC_MINOR__ >= 3)
838+
result->fp = fopen (filePath, "rbm");
839+
#endif
840+
if (result->fp == NULL)
841+
{
842+
errno = 0;
843+
result->fp = fopen (filePath, "rb");
844+
}
836845
if (result->fp == NULL)
837846
{
838847
info->status.error_number = errno;

0 commit comments

Comments
 (0)