This repository was archived by the owner on Aug 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathChangeLog
More file actions
12085 lines (8522 loc) · 416 KB
/
ChangeLog
File metadata and controls
12085 lines (8522 loc) · 416 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
commit 6e8732c5a317a349986a4078718f1d95b67072c5
Author: Jia Tan <jiat0218@gmail.com>
Date: 2024-01-26 19:41:20 +0800
Bump version and soname for 5.4.6.
src/liblzma/Makefile.am | 2 +-
src/liblzma/api/lzma/version.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
commit 6532f55caabe1323b9a3f6ac0f7f334828108c0d
Author: Jia Tan <jiat0218@gmail.com>
Date: 2024-01-26 18:54:24 +0800
Add NEWS for 5.4.6.
NEWS | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
commit 8b1a2798ad5613f5416751a96d4cbafae4778aae
Author: Jia Tan <jiat0218@gmail.com>
Date: 2024-01-19 23:08:14 +0800
Docs: Update .xz file format specification to 1.2.0.
The new RISC-V filter was added to the specification, in addition to
updating the specification URL.
doc/xz-file-format.txt | 29 +++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)
commit 55285900b3bea14d476b880ba011f5a96428581c
Author: Jia Tan <jiat0218@gmail.com>
Date: 2024-01-19 23:08:14 +0800
xz: Update website URLs in the man pages.
src/xz/xz.1 | 6 +++---
src/xzdec/xzdec.1 | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
commit a670f69521ceca5332c7c34dc9d2e23c2c2739ef
Author: Jia Tan <jiat0218@gmail.com>
Date: 2024-01-19 23:08:14 +0800
liblzma: Update website URL.
dos/config.h | 2 +-
src/liblzma/api/lzma.h | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
commit 05aeda9612e2a14d9f9653117f5b9f2b958e69ce
Author: Jia Tan <jiat0218@gmail.com>
Date: 2024-01-19 23:08:14 +0800
Docs: Update website URLs.
COPYING | 3 ++-
README | 4 ++--
doc/faq.txt | 2 +-
doc/lzma-file-format.txt | 18 +++++++++---------
windows/README-Windows.txt | 3 ++-
5 files changed, 16 insertions(+), 14 deletions(-)
commit 3cc54f1c0bc4fe0dcb4a9a02f17694ffd51cd7c7
Author: Jia Tan <jiat0218@gmail.com>
Date: 2024-01-19 23:08:14 +0800
Build: Update website URL.
CMakeLists.txt | 2 +-
configure.ac | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
commit 82f5515de6508f6e2f59a8926912791b487cc104
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-12-21 21:39:08 +0800
Translations: Update the French translation.
po/fr.po | 632 +++++++++++++++++++++++++++++++++++++--------------------------
1 file changed, 370 insertions(+), 262 deletions(-)
commit 9e96ca8c48b0916a2bb592841df016755572cf6a
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-12-21 16:39:53 +0800
xz: Add a comment to Capsicum sandbox setup.
This comment is repeated in xzdec.c to help remind us why all the
capabilities are removed from stdin in certain situations.
src/xz/file_io.c | 1 +
1 file changed, 1 insertion(+)
commit 8191720eac950a5db89c4d33d6beea6316a49b19
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-12-16 20:51:38 +0800
liblzma: Set all values in lzma_lz_encoder to NULL after allocation.
The first member of lzma_lz_encoder doesn't necessarily need to be set
to NULL since it will always be set before anything tries to use it.
However the function pointer members must be set to NULL since other
functions rely on this NULL value to determine if this behavior is
supported or not.
This fixes a somewhat serious bug, where the options_update() and
set_out_limit() function pointers are not set to NULL. This seems to
have been forgotten since these function pointers were added many years
after the original two (code() and end()).
The problem is that by not setting this to NULL we are relying on the
memory allocation to zero things out if lzma_filters_update() is called
on a LZMA1 encoder. The function pointer for set_out_limit() is less
serious because there is not an API function that could call this in an
incorrect way. set_out_limit() is only called by the MicroLZMA encoder,
which must use LZMA1 where set_out_limit() is always set. Its currently
not possible to call set_out_limit() on an LZMA2 encoder at this time.
So calling lzma_filters_update() on an LZMA1 encoder had undefined
behavior since its possible that memory could be manipulated so the
options_update member pointed to a different instruction sequence.
This is unlikely to be a bug in an existing application since it relies
on calling lzma_filters_update() on an LZMA1 encoder in the first place.
For instance, it does not affect xz because lzma_filters_update() can
only be used when encoding to the .xz format.
src/liblzma/lz/lz_encoder.c | 2 ++
1 file changed, 2 insertions(+)
commit 0ba5dd7ba13dee73dce49ce2b32b0ea7b059835d
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-12-16 20:30:55 +0800
liblzma: Tweak a comment.
src/liblzma/lz/lz_encoder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 27ab54af848ec4adc9c17362f6c64a42a7003df5
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-12-16 20:28:21 +0800
liblzma: Make parameter names in function definition match declaration.
lzma_raw_encoder() and lzma_raw_encoder_init() used "options" as the
parameter name instead of "filters" (used by the declaration). "filters"
is more clear since the parameter represents the list of filters passed
to the raw encoder, each of which contains filter options.
src/liblzma/common/filter_encoder.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
commit 019afd72e02339a6bf00c32bfb56f649c637dd6b
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-12-16 20:18:47 +0800
liblzma: Improve lzma encoder init function consistency.
lzma_encoder_init() did not check for NULL options, but
lzma2_encoder_init() did. This is more of a code style improvement than
anything else to help make lzma_encoder_init() and lzma2_encoder_init()
more similar.
src/liblzma/lzma/lzma_encoder.c | 3 +++
1 file changed, 3 insertions(+)
commit 6af9a4cbe5b677a2c48b009b370539ad30dc269a
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-12-16 11:20:20 +0800
Docs: Update repository URL in Changelog.
ChangeLog | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 3f51a4415a6d8f9be87512a502161141cd85dffa
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-12-07 21:48:07 +0800
Tests: Silence -Wsign-conversion warning on GCC version < 10.
Since GCC version 10, GCC no longer complains about simple implicit
integer conversions with Arithmetic operators.
For instance:
uint8_t a = 5;
uint32_t b = a + 5;
Give a warning on GCC 9 and earlier but this:
uint8_t a = 5;
uint32_t b = (a + 5) * 2;
Gives a warning with GCC 10+.
tests/test_block_header.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 932f02990cfd436525e63da2e27172f6c0265997
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-11-30 23:10:43 +0800
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
commit b26d5d547f28423acefb344c2c460845216154a4
Author: Kian-Meng Ang <kianmeng@cpan.org>
Date: 2023-11-30 23:01:19 +0800
Tests: Fix typos
tests/test_index.c | 2 +-
tests/test_lzip_decoder.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
commit 7dc466d62155cb7442aa5e10633e084ed384360d
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-11-23 22:13:39 +0800
xz: Use is_tty() in message.c.
src/xz/message.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 0ecfaa6df91f7c37510f370295f593b9c0b88b98
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-11-23 22:04:35 +0800
xz: Create separate is_tty() function.
The new is_tty() will report if a file descriptor is a terminal or not.
On POSIX systems, it is a wrapper around isatty(). However, the native
Windows implementation of isatty() will return true for all character
devices, not just terminals. So is_tty() has a special case for Windows
so it can use alternative Windows API functions to determine if a file
descriptor is a terminal.
This fixes a bug with MSVC and MinGW-w64 builds that refused to read from
or write to non-terminal character devices because xz thought it was a
terminal. For instance:
xz foo -c > /dev/null
would fail because /dev/null was assumed to be a terminal.
src/xz/util.c | 25 +++++++++++++++++++++++--
src/xz/util.h | 14 ++++++++++++++
2 files changed, 37 insertions(+), 2 deletions(-)
commit 9a300c9068015fae0651c0835ca36d481b472ddd
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-11-22 20:39:41 +0800
tuklib_integer: Fix typo discovered by codespell.
Based on internet dictionary searches, 'choise' is an outdated spelling
of 'choice'.
src/common/tuklib_integer.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 9b469da8f3415e12d650705c7a82256e62e7871b
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-11-17 20:04:58 +0800
Tests: Fix typo in a comment.
tests/test_files.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit afcb30fcadae4d07ec08d5f44eabc1905b2392b1
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-11-17 20:35:11 +0800
Tests: Create test_suffix.sh.
This tests some complicated interactions with the --suffix= option.
The suffix option must be used with --format=raw, but can optionally
be used to override the default .xz suffix.
This test also verifies some recent bugs have been correctly solved
and to hopefully avoid further regressions in the future.
tests/Makefile.am | 2 +
tests/test_suffix.sh | 189 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 191 insertions(+)
commit 87c956d4c4604d30b01326ea88f6241ec44f5526
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-11-14 20:27:04 +0800
xz: Fix suffix check.
The suffix refactor done in 99575947a58a60416c570eb78038d18a1ea4cef4
had a small regression where raw format compression to standard out
failed if a suffix was not set. In this case, setting the suffix did
not make sense since a file is not created.
Now, xz should only fail when a suffix is not provided when it is
actually needed.
For instance:
echo "foo" | xz --format=raw --lzma2 | wc -c
does not need a suffix check since it creates no files. But:
xz --format=raw --lzma2 --suffix=.bar foo
Needs the suffix to be set since it must create foo.bar.
src/xz/args.c | 30 ++++++++++++++++++++++--------
1 file changed, 22 insertions(+), 8 deletions(-)
commit 84196e8c094402cb71b669fb9e984c56ebabb145
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-11-09 01:21:53 +0800
liblzma: Add missing comments to lz_encoder.h.
src/liblzma/lz/lz_encoder.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
commit 49053c0a649f4c8bd2b8d97ce915f401fbc0f3d9
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-10-31 22:30:29 +0800
Bump version and soname for 5.4.5.
src/liblzma/Makefile.am | 2 +-
src/liblzma/api/lzma/version.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
commit 84c0cfc556287628df871703672879e530d0391f
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-11-01 20:18:30 +0800
Add NEWS for 5.4.5.
NEWS | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)
commit d90ed84db9770712e2421e170076b43bda9b64a7
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-10-31 21:41:09 +0200
liblzma: Fix compilation of fastpos_tablegen.c.
The macro lzma_attr_visibility_hidden has to be defined to make
fastpos.h usable. The visibility attribute is irrelevant to
fastpos_tablegen.c so simply #define the macro to an empty value.
fastpos_tablegen.c is never built by the included build systems
and so the problem wasn't noticed earlier. It's just a standalone
program for generating fastpos_table.c.
Fixes: https://github.com/tukaani-project/xz/pull/69
Thanks to GitHub user Jamaika1.
src/liblzma/lzma/fastpos_tablegen.c | 2 ++
1 file changed, 2 insertions(+)
commit 9b1268538b0b2c6c0a121f95165de65fc71ad23c
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-10-31 21:51:40 +0800
Build: Fix text wrapping in an output message.
configure.ac | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
commit 068ee436f4a8a706125ef43e8228b30001b1554e
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-10-22 17:59:11 +0300
liblzma: Use lzma_always_inline in memcmplen.h.
src/liblzma/common/memcmplen.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
commit 6cdf0a7b7974baf58c1fd20ec3278f3b84ae56e5
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-10-30 17:43:03 +0200
liblzma: #define lzma_always_inline in common.h.
src/liblzma/common/common.h | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
commit 33daad3961a4f07f3902b40f13e823e6e43e85da
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-10-22 17:15:32 +0300
liblzma: Use lzma_attr_visibility_hidden on private extern declarations.
These variables are internal to liblzma and not exposed in the API.
src/liblzma/check/check.h | 7 +++++++
src/liblzma/common/stream_flags_common.h | 3 +++
src/liblzma/lz/lz_encoder_hash.h | 1 +
src/liblzma/lzma/fastpos.h | 1 +
src/liblzma/rangecoder/price.h | 1 +
5 files changed, 13 insertions(+)
commit 6961a5ac7df178bfc2b7a181c40575847bc3035f
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-10-22 17:08:39 +0300
liblzma: #define lzma_attr_visibility_hidden in common.h.
In ELF shared libs:
-fvisibility=hidden affects definitions of symbols but not
declarations.[*] This doesn't affect direct calls to functions
inside liblzma as a linker can replace a call to lzma_foo@plt
with a call directly to lzma_foo when -fvisibility=hidden is used.
[*] It has to be like this because otherwise every installed
header file would need to explictly set the symbol visibility
to default.
When accessing extern variables that aren't defined in the
same translation unit, compiler assumes that the variable has
the default visibility and thus indirection is needed. Unlike
function calls, linker cannot optimize this.
Using __attribute__((__visibility__("hidden"))) with the extern
variable declarations tells the compiler that indirection isn't
needed because the definition is in the same shared library.
About 15+ years ago, someone told me that it would be good if
the CRC tables would be defined in the same translation unit
as the C code of the CRC functions. While I understood that it
could help a tiny amount, I didn't want to change the code because
a separate translation unit for the CRC tables was needed for the
x86 assembly code anyway. But when visibility attributes are
supported, simply marking the extern declaration with the
hidden attribute will get identical result. When there are only
a few affected variables, this is trivial to do. I wish I had
understood this back then already.
src/liblzma/common/common.h | 11 +++++++++++
1 file changed, 11 insertions(+)
commit 5b9e16764905d06fa8e8339ba185ddfee304e5fb
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-30 22:54:28 +0300
liblzma: Refer to MinGW-w64 instead of MinGW in the API headers.
MinGW (formely a MinGW.org Project, later the MinGW.OSDN Project
at <https://osdn.net/projects/mingw/>) has GCC 9.2.0 as the
most recent GCC package (released 2021-02-02). The project might
still be alive but majority of people have switched to MinGW-w64.
Thus it seems clearer to refer to MinGW-w64 in our API headers too.
Building with MinGW is likely to still work but I haven't tested it
in the recent years.
src/liblzma/api/lzma.h | 4 ++--
src/liblzma/api/lzma/version.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
commit 36fabdbe67c8a8fbdc3ac695a91fc443a1328cc4
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-27 00:58:17 +0300
CMake: Use -D_FILE_OFFSET_BITS=64 if (and only if) needed.
A CMake option LARGE_FILE_SUPPORT is created if and only if
-D_FILE_OFFSET_BITS=64 affects sizeof(off_t).
This is needed on many 32-bit platforms and even with 64-bit builds
with MinGW-w64 to get support for files larger than 2 GiB.
CMakeLists.txt | 7 ++++-
cmake/tuklib_large_file_support.cmake | 52 +++++++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+), 1 deletion(-)
commit 989c8c354cbd2d20fbae4a432a3e31f5bc1cb9bf
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-30 02:14:25 +0300
CMake: Generate and install liblzma.pc if not using MSVC.
Autotools based build uses -pthread and thus adds it to Libs.private
in liblzma.pc. CMake doesn't use -pthread at all if pthread functions
are available in libc so Libs.private doesn't get -pthread either.
CMakeLists.txt | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
commit 983f3b458dc79c5976a4237fdfe4f8079f8d8830
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-30 01:13:13 +0300
CMake: Rearrange the PACKAGE_ variables.
The windres workaround now replaces spaces with \x20 so
the package name isn't repeated.
These changes will help with creation of liblzma.pc.
CMakeLists.txt | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
commit 4083c8e9501a48934a5fb563d2c3ce2ae143cd27
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-29 20:46:11 +0300
liblzma: Add Cflags.private to liblzma.pc.in for MSYS2.
It properly adds -DLZMA_API_STATIC when compiling code that
will be linked against static liblzma. Having it there on
systems other than Windows does no harm.
See: https://www.msys2.org/docs/pkgconfig/
src/liblzma/liblzma.pc.in | 1 +
1 file changed, 1 insertion(+)
commit 661549ecb7a9b136d72a01c137d9776c75d52d51
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-27 22:46:20 +0300
CMake: Create liblzma.def when building liblzma.dll with MinGW-w64.
CMakeLists.txt | 20 ++++++++++++++++++++
cmake/remove-ordinals.cmake | 26 ++++++++++++++++++++++++++
2 files changed, 46 insertions(+)
commit 0e546eb4da05c52b7d257e5bd85e15c51c4d86a3
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-10-26 21:44:42 +0300
CMake: Change one CMAKE_CURRENT_SOURCE_DIR to CMAKE_CURRENT_LIST_DIR.
In this case they have identical values.
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit da4d04e4d6e199d28b58bd2e0df4e120c52dd5d7
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-10-01 19:10:57 +0300
CMake/Windows: Fix the import library filename.
Both PREFIX and IMPORT_PERFIX have to be set to "" to get
liblzma.dll and liblzma.dll.a.
CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
commit 007558a358c48a0175cc8d47d11798d7967282ab
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-10-11 19:47:44 +0300
CMake: Don't shadow the cache entry ENABLE_THREADS with a normal variable.
Using set(ENABLE_THREADS "posix") is confusing because it sets
a new normal variable and leaves the cache entry with the same
name unchanged. The intent wasn't to change the cache entry so
this switches to a different variable name.
CMakeLists.txt | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
commit 7d01de67ee3dd76cfc12c23220e2e4cdc59708f1
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-10-09 21:12:31 +0300
CMake: Edit threading related messages.
It's mostly to change from "thread method" to "threading method".
CMakeLists.txt | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
commit f8edcf3da689aad4b21e139197725450f2c456a0
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-10-09 20:59:24 +0300
CMake: Use FATAL_ERROR if user-supplied options aren't understood.
This way typos are caught quickly and compounding error messages
are avoided (a single typo could cause more than one error).
This keeps using SEND_ERROR when the system is lacking a feature
(like threading library or sandboxing method). This way the whole
configuration log will be generated in case someone wishes to
report a problem upstream.
CMakeLists.txt | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
commit 1695021e4a233a9388ddd428654c1447f0ea3bfb
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-10-19 16:09:01 +0800
CMake: Add ALLOW_CLMUL_CRC option to enable/disable CLMUL.
The option is enabled by default, but will only be visible to a user
listing cache variables or using a CMake GUI application if the
immintrin.h header file is found.
This mirrors our Autotools build --disable-clmul-crc functionality.
CMakeLists.txt | 40 +++++++++++++++++++++++-----------------
1 file changed, 23 insertions(+), 17 deletions(-)
commit 5056bc51071d1a07097c5667a0d5bd85242e31b9
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-10-14 17:56:59 +0300
tuklib_integer: Revise unaligned reads and writes on strict-align archs.
In XZ Utils context this doesn't matter much because
unaligned reads and writes aren't used in hot code
when TUKLIB_FAST_UNALIGNED_ACCESS isn't #defined.
src/common/tuklib_integer.h | 256 ++++++++++++++++++++++++++++++++------------
1 file changed, 189 insertions(+), 67 deletions(-)
commit 9e14743ee5ba79181076bc33952245d5b18fbc58
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-23 02:21:49 +0300
tuklib_integer: Add missing write64be and write64le fallback functions.
src/common/tuklib_integer.h | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
commit 4cc91ceb3992ef4f51302b56178c3b2c2aeaaaad
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-10-12 20:12:18 +0800
Build: Update visibility.m4 from Gnulib.
Updating from version 6 -> 8 from upstream. Declarations for variables
and function bodies were added to avoid unnecessary failures with
-Werror.
m4/visibility.m4 | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
commit 1824a6007cb1c8d5d7abcc7bf649148bc06fa72c
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-10-06 19:36:35 +0300
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
commit 8fdc71a27d07b10a3da52432432e080b6d577642
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-09-29 20:14:39 +0800
CMake: Rename xz and man page symlink custom targets.
The Ninja Generator for CMake cannot have a custom target and its
BYPRODUCTS have the same name. This has prevented Ninja builds on
Unix-like systems since the xz symlinks were introduced in
80a1a8bb838842a2be343bd88ad1462c21c5e2c9.
CMakeLists.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
commit 38171492ded6426ddf53d0c200fa8c93fcd02a60
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-27 19:54:35 +0300
CMake: Fix Windows build with Clang/LLVM 17.
llvm-windres 17.0.0 has more accurate emulation of GNU windres, so
the hack for GNU windres must now be used with llvm-windres too.
LLVM 16.0.6 has the old behavior and there likely won't be more
16.x releases. So we can simply check for >= 17.0.0.
The workaround must not be used with Clang that is acting in
MSVC mode. This checks for the known environments that need
the workaround instead of using "NOT MSVC".
See also:
https://github.com/llvm/llvm-project/commit/2bcc0fdc58a220cb9921b47ec8a32c85f2511a47
CMakeLists.txt | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
commit 1bce6fe48334b5df33d0487a9cbe41950122230e
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-09-27 00:02:11 +0800
liblzma: Avoid compiler warning without creating extra symbol.
When the generic fast crc64 method is used, then we omit
lzma_crc64_table[][].
The C standards don't allow an empty translation unit which can be
avoided by declaring something, without exporting any symbols.
src/liblzma/check/crc64_table.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
commit dce95a593e6cd9779110aa1e314abd8b35c75f6b
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-26 17:24:15 +0300
Build: Update the comment about -Werror usage in checks.
configure.ac | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
commit f3c32762ae309afa2fe330e7fb397acfdedc4d37
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-26 13:51:31 +0300
Build: Fix underquoted AC_LANG_SOURCE.
It made no practical difference in this case.
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 7dd57f2f2c8fde93fa42b4dbf6d9860717723b41
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-26 13:14:37 +0300
Build: Silence Autoconf warning.
There was a use of AC_COMPILE_IFELSE that didn't use
AC_LANG_SOURCE and Autoconf warned about this. The omission
had been intentional but it turned out that this didn't do
what I thought it would.
Autoconf 2.71 manual gives an impression that AC_LANG_SOURCE
inserts all #defines that have been made with AC_DEFINE so
far (confdefs.h). The idea was that omitting AC_LANG_SOURCE
would mean that only the exact code included in the
AC_COMPILE_IFELSE call would be compiled.
With C programs this is not true: the #defines get added without
AC_LANG_SOURCE too. There seems to be no neat way to avoid this.
Thus, with the C language at least, adding AC_LANG_SOURCE makes
no other difference than silencing a warning from Autoconf. The
generated "configure" remains identical. (Docs of AC_LANG_CONFTEST
say that the #defines have been inserted since Autoconf 2.63b and
that AC_COMPILE_IFELSE uses AC_LANG_CONFTEST. So the behavior is
documented if one also reads the docs of macros that one isn't
calling directly.)
Any extra code, including #defines, can cause problems for
these two tests because these tests must use -Werror.
CC=clang CFLAGS=-Weverything is the most extreme example.
It enables -Wreserved-macro-identifier which warns about
It's possible to write a test file that passes -Weverything but
it becomes impossible when Autoconf inserts confdefs.h.
So this commit adds AC_LANG_SOURCE to silence Autoconf warnings.
A different solution is needed for -Werror tests.
configure.ac | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
commit edec253e418562f3164a01ecc8805295fa022efa
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-09-26 00:47:26 +0800
Build: Remove Gnulib dependency from tests.
The tests do not use any Gnulib replacements so they do not need to link
libgnu.a or have /lib in the include path.
tests/Makefile.am | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
commit 46cb133ce7360496eecca1255b364c05f0205855
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-09-26 00:43:43 +0800
CMake: Remove /lib from tests include path.
The tests never included anything from /lib, so this was not needed.
CMakeLists.txt | 1 -
1 file changed, 1 deletion(-)
commit 4ae13cfe0dedb8ddc3cf9ded8cd1ac09361b3bd1
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-24 16:32:32 +0300
sysdefs.h: Update the comment about __USE_MINGW_ANSI_STDIO.
src/common/sysdefs.h | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
commit 660c8c29e57d30dbd5009ef1f0ec1bbe195ccef6
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-22 02:33:29 +0300
xz: Windows: Don't (de)compress to special files like "con" or "nul".
Before this commit, the following writes "foo" to the
console and deletes the input file:
echo foo | xz > con_xz
xz --suffix=_xz --decompress con_xz
It cannot happen without --suffix because names like con.xz
are also special and so attempting to decompress con.xz
(or compress con to con.xz) will already fail when opening
the input file.
Similar thing is possible when compressing. The following
writes to "nul" and the input file "n" is deleted.
echo foo | xz > n
xz --suffix=ul n
Now xz checks if the destination is a special file before
continuing. DOS/DJGPP version had a check for this but
Windows (and OS/2) didn't.
src/xz/file_io.c | 35 ++++++++++++++++++++++++++++-------
1 file changed, 28 insertions(+), 7 deletions(-)
commit b7ce6e80786fc0c08ed129e8ee262ea96a5473a1
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-21 20:42:52 +0300
CMake: Wrap two overlong lines that are possible to wrap.
CMakeLists.txt | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
commit 1595f454d5c8257c668cccd6a86dd68175d5c430
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-21 20:36:31 +0300
CMake: Add a comment about threads on Cygwin.
CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
commit 5be6275f19784cdd5a954f0188045c8ff4934d54
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-12 21:12:34 +0300
CMake: Bump maximum policy version to 3.27.
There are several new policies. CMP0149 may affect the Windows SDK
version that CMake will choose by default. The new behavior is more
predictable, always choosing the latest SDK version by default.
The other new policies shouldn't affect this package.
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit e515643d7524851d1eb7dab73453e26d8521324c
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-08 19:08:57 +0300
Doxygen: Add more C macro names to PREDEFINED.
doxygen/Doxyfile | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
commit e3478ae4f36cd06522a2fef023860893f068434d
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-11 18:47:26 +0300
liblzma: Move a few __attribute__ uses in function declarations.
The API headers have many attributes but these were left
as is for now.
src/liblzma/common/common.c | 6 ++++--
src/liblzma/common/common.h | 8 ++++----
src/liblzma/common/memcmplen.h | 3 ++-
3 files changed, 10 insertions(+), 7 deletions(-)
commit b71b8922ef3971e5ccffd1e213888d44abe21d11
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-11 19:03:35 +0300
xz, xzdec, lzmainfo: Use tuklib_attr_noreturn.
For compatibility with C23's [[noreturn]], tuklib_attr_noreturn
must be at the beginning of declaration (before "extern" or
"static", and even before any GNU C's __attribute__).
This commit also moves all other function attributes to
the beginning of function declarations. "extern" is kept
at the beginning of a line so the attributes are listed on
separate lines before "extern" or "static".
src/lzmainfo/lzmainfo.c | 6 ++++--
src/xz/coder.c | 3 ++-
src/xz/hardware.h | 3 ++-
src/xz/message.h | 30 +++++++++++++++++-------------
src/xz/options.c | 3 ++-
src/xz/util.h | 8 ++++----
src/xzdec/xzdec.c | 9 ++++++---
7 files changed, 37 insertions(+), 25 deletions(-)
commit 359e5c6cb128dab64ea6070d21d1c240f96cea6b
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-11 18:53:31 +0300
Remove incorrect uses of __attribute__((__malloc__)).
xrealloc() is obviously incorrect, modern GCC docs even
mention realloc() as an example where this attribute
cannot be used.
liblzma's lzma_alloc() and lzma_alloc_zero() would be
correct uses most of the time but custom allocators
may use a memory pool or otherwise hold the pointer
so aliasing issues could happen in theory.
The xstrdup() case likely was correct but I removed it anyway.
Now there are no __malloc__ attributes left in the code.
The allocations aren't in hot paths so this should make
no practical difference.
src/liblzma/common/common.c | 4 ++--
src/liblzma/common/common.h | 4 ++--
src/xz/util.h | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
commit 589b4cba22fccb1dbc919df5d134aefb2b5a6b01
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-19 14:03:45 +0300
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
commit 43728ed2267e921fbdfa699ee1e91b105ab0e98b
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-14 16:35:46 +0300
Update THANKS.
THANKS | 1 +
1 file changed, 1 insertion(+)
commit caf00e0988ba47842cfd93dfbb17f7d30120d6e7
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-09-14 16:34:07 +0300
liblzma: Mark crc64_clmul() with __attribute__((__no_sanitize_address__)).
Thanks to Agostino Sarubbo.
Fixes: https://github.com/tukaani-project/xz/issues/62
src/liblzma/check/crc64_fast.c | 8 ++++++++
1 file changed, 8 insertions(+)
commit a70e96d2da761b8b3a77bf14e08002d871e5950b
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-09-12 22:36:12 +0800
CMake: Fix time.h checks not running on second CMake run.
If CMake was configured more than once, HAVE_CLOCK_GETTIME and
HAVE_CLOCK_MONOTONIC would not be set as compile definitions. The check
for librt being needed to provide HAVE_CLOCK_GETTIME was also
simplified.
CMakeLists.txt | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
commit d5275d83bd2a9701c5feb8666785007c074b1359
Author: Jia Tan <jiat0218@gmail.com>
Date: 2023-09-12 22:34:06 +0800
CMake: Fix unconditionally defining HAVE_CLOCK_MONOTONIC.
If HAVE_CLOCK_GETTIME was defined, then HAVE_CLOCK_MONOTONIC was always
added as a compile definition even if the check for it failed.
CMakeLists.txt | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
commit 1f6e7c68fbdeeaa9482fc77de090be63d90912fd
Author: Lasse Collin <lasse.collin@tukaani.org>
Date: 2023-08-31 19:50:05 +0300
xz: Refactor thousand separator detection and disable it on MSVC.