This file is indexed.

/usr/share/doc/zlibc/zlibc.html is in zlibc 0.9k-4.3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on January 9, 2016 by texi2html 1.82
texi2html was written by: 
            Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people.
Send bugs and suggestions to <texi2html-bug@nongnu.org>
-->
<head>
<title>Zlibc</title>

<meta name="description" content="Zlibc">
<meta name="keywords" content="Zlibc">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.82">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.roman {font-family:serif; font-weight:normal;}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
-->
</style>


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

<a name="Introduction"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[ &lt; ]</td>
<td valign="middle" align="left">[<a href="#Location" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[ &lt;&lt; ]</td>
<td valign="middle" align="left">[ Up ]</td>
<td valign="middle" align="left">[<a href="#Location" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="unnumbered">Introduction</h1>

<p>The zlibc package allows transparent on the fly uncompression of gzipped
files.  Your programs will be able to access any compressed file, just
as if they were uncompressed.  Zlibc will transparently uncompresses the
data from these files as soon as they are read, just as a compressed
filesystem would do.  No kernel patch, no recompilation of these
executables and no recompilation of the libraries is needed.
</p>
<p>It is not (yet) possible execute compressed files with zlibc. However,
there is another package, called <code>tcx</code>, which is able to uncompress
executables on the fly.  On the other hand <code>tcx</code> isn&rsquo;t able to
uncompress data files on the fly.  Fortunately, the both zlibc and tcx
may coexist on the same machine without problems.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#Location">1. Where to get zlibc</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">              Where to get zlibc and early bug fixes
</td></tr>
<tr><td align="left" valign="top"><a href="#Installing-zlibc">2. Installing zlibc</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">      How to install zlibc
</td></tr>
<tr><td align="left" valign="top"><a href="#Using-zlibc">3. Using zlibc</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">           How to configure your system to use zlibc
</td></tr>
<tr><td align="left" valign="top"><a href="#How-it-works">4. How it works</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">          The general principles behind zlibc
</td></tr>
<tr><td align="left" valign="top"><a href="#Customization">5. Customization</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">         How to customize zlibc to your needs
</td></tr>
<tr><td align="left" valign="top"><a href="#Porting-zlibc">6. Porting zlibc</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">         How to port zlibc to new architectures
</td></tr>
<tr><td align="left" valign="top"><a href="#Variable-Index">Variable index</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">        Variable Index
</td></tr>
<tr><td align="left" valign="top"><a href="#Concept-Index">Concept index</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">         Concept Index
</td></tr>
</table>
<p>This documentation looks most pretty when printed or as html.  Indeed,
in the info version certain examples are difficult to read due to the
confusing quoting conventions of info.
</p>


<a name="index-bugs"></a>
<a name="index-ALPHA-patches"></a>
<a name="index-patches"></a>
<a name="index-diffs"></a>
<a name="index-mailing-list"></a>


<hr size="6">
<a name="Location"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Introduction" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Installing-zlibc" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Introduction" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Installing-zlibc" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Where-to-get-zlibc"></a>
<h1 class="chapter">1. Where to get zlibc</h1>

<p>Zlibc can be found at the following places (and their mirrors):
</p><table><tr><td>&nbsp;</td><td><pre class="example">ftp://zlibc.linux.lu/zlibc-0.9k.tar.gz
ftp://www.tux.org/pub/knaff/zlibc/zlibc-0.9k.tar.gz
ftp://ibiblio.unc.edu/pub/Linux/libs/compression/zlibc-0.9k.tar.gz
ftp://ftp.gnu.org/gnu/zlibc/compression/zlibc-0.9k.tar.gz
</pre></td></tr></table>

<p>Before reporting a bug, make sure that it has not yet been fixed in the
Alpha patches which can be found at:
</p><table><tr><td>&nbsp;</td><td><pre class="example">http://zlibc.linux.lu/
http://www.tux.org/pub/knaff/zlibc
</pre></td></tr></table>

<p>These patches are named
<code>zlibc-</code><var>version</var><code>-</code><var>ddmm</var><code>.taz</code>, where version
stands for the base version, <var>dd</var> for the day and <var>mm</var> for the
month. Due to a lack of space, I usually leave only the most recent
patch.
</p>
<p>There is an zlibc mailing list at zlibc @ www.tux.org .  Please
send all bug reports to this list.  You may subscribe to the list by
sending a message with &rsquo;subscribe zlibc @ www.tux.org&rsquo; in its
body to majordomo @ www.tux.org . (N.B. Please remove the spaces
around the &quot;@&quot; both times. I left them there in order to fool
spambots.)  Announcements of new zlibc versions will also be sent to
the list, in addition to the linux announce newsgroups.  The mailing
list is archived at http://www.tux.org/hypermail/zlibc/latest
</p>
<hr size="6">
<a name="Installing-zlibc"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Location" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Using-zlibc" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Location" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Introduction" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Using-zlibc" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Installing-zlibc-1"></a>
<h1 class="chapter">2. Installing zlibc</h1>
<a name="index-LD_005fPRELOAD"></a>
<a name="index-Installation"></a>
<a name="index-Set_002duid-programs"></a>
<a name="index-Boot-problems"></a>

<ol>
<li> 
If you install zlibc on Linux, make sure that your shared loader
(ld-linux.so.1/ld.so) understands <code>LD_PRELOAD</code>. (Best if
ld.so-1.8.5 or more recent)

</li><li>
Type <code>./configure</code>. This runs the GNU autoconfigure script which
configures the &lsquo;<tt>Makefile</tt>&rsquo; and the &lsquo;<tt>config.h</tt>&rsquo; file.  You may
compile time configuration options to <code>./configure</code>, see for
details.

</li><li>
Type <code>make</code> to compile zlibc.

</li><li>
Type <code>make install</code> to install zlibc and associated programs to its
final target.

</li><li>
To use this module, set the environment variable <code>LD_PRELOAD</code> to
point to the object. Example (sh syntax):

<table><tr><td>&nbsp;</td><td><pre class="example">      LD_PRELOAD=/usr/local/lib/uncompress.so
      export LD_PRELOAD
</pre></td></tr></table>

<p>or (csh syntax):
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">      setenv LD_PRELOAD /usr/local/lib/uncompress.so
</pre></td></tr></table>
<p>On linux, use /lib/uncompress.so instead of /usr/local/lib/uncompress.so .
</p>
<p>You might want to put these lines in your &lsquo;<tt>.profile</tt>&rsquo; or
&lsquo;<tt>.cshrc</tt>&rsquo; in order to have the uncompressing functions available all
the time.
</p></li><li>
Compress your files using gzip and enjoy

</li></ol>

<p>For security reasons, the dynamic loader disregards environmental
variables such as <code>LD_PRELOAD</code> when executing set uid programs.
</p>
<p>However, on Linux, you can use zlibc with set uid programs too, by using
one of the two methods described below:
</p>
<ol>
<li>
You may ing the path to &lsquo;<tt>uncompress.so</tt>&rsquo; into
&lsquo;<tt>/etc/ld.so.preload</tt>&rsquo; instead of using <code>LD_PRELOAD</code>.

<p><strong>WARNING</strong>: If you use &lsquo;<tt>/etc/ld.so.preload</tt>&rsquo;, be sure to
install &lsquo;<tt>uncompress.so</tt>&rsquo; on your root filesystem, for instance in
<code>/lib</code>, as is done by the default configuration.  Using a directory
which is not available at boot time, such as /usr/local/lib will cause
trouble at the next reboot!
</p>
<p>It is also careful to remove zlibc from &lsquo;<tt>/etc/ld.so.preload</tt>&rsquo; when
installing a new version.  First test it out using <code>LD_PRELOAD</code>,
and only if everything is ok, put it back into
&lsquo;<tt>/etc/ld.so.preload</tt>&rsquo;.
</p>
</li><li>
If you have a version of <code>ld.so</code> which is more recent than
<code>1.9.0</code>, you can set <code>LD_PRELOAD</code> to just contain the basename
of &lsquo;<tt>uncompress.so</tt>&rsquo; without the directory.  In that case, the file is
found as long as it is in the shared library path (which usually
contains &lsquo;<tt>/lib</tt>&rsquo; and &lsquo;<tt>/usr/lib</tt>&rsquo;)). Because the search is
restricted to the library search path, this also works for set-uid
programs.

<p>Example (sh syntax):
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">      LD_PRELOAD=uncompress.so
      export LD_PRELOAD
</pre></td></tr></table>

<p>or (csh syntax):
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">      setenv LD_PRELOAD uncompress.so
</pre></td></tr></table>

<p>The advantage of this approach over &lsquo;<tt>ld.so.preload</tt>&rsquo; is that zlibc
can more easily be switched off in case something goes wrong.
</p>
</li></ol>

<hr size="6">
<a name="Using-zlibc"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Installing-zlibc" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Zlibc-and-links" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Installing-zlibc" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Introduction" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#How-it-works" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Using-zlibc-1"></a>
<h1 class="chapter">3. Using zlibc</h1>
<a name="index-Symbolic-links"></a>

<p>Once zlibc is installed, simply compress your biggest datafiles
using gzip. Your programs are now able to uncompress these files on the
fly whenever they need them.
</p>
<hr size="6">
<a name="Zlibc-and-links"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Using-zlibc" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Symbolic-links" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Using-zlibc" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Using-zlibc" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#How-it-works" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">3.1 Zlibc and links</h2>

<hr size="6">
<a name="Symbolic-links"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Zlibc-and-links" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Hard-links" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Using-zlibc" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Zlibc-and-links" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#How-it-works" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection">3.1.1 Symbolic links</h3>

<p>After compressing your datafiles, you also need to change any potential
symbolic links pointing to them.  Let&rsquo;s suppose that &lsquo;<tt>x</tt>&rsquo; is a
symlink to &lsquo;<tt>tstfil</tt>&rsquo;:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">&gt; echo 'this is a test' &gt;tstfil
&gt; ln -s tstfil x
&gt; ls -l
total 1
-rw-r--r--   1 alknaff  sirac          15 Feb 25 19:40 tstfil
lrwxrwxrwx   1 alknaff  sirac           8 Feb 25 19:40 x -&gt; tstfil
</pre></td></tr></table>

<p>After compressing it, you&rsquo;ll see the following listing:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">&gt; gzip tstfil
&gt; ls -l
total 1
pr--r--r--   1 alknaff  sirac          15 Feb 25 19:40 tstfil
lrwxrwxrwx   1 alknaff  sirac           8 Feb 25 19:40 x -&gt; tstfil
</pre></td></tr></table>

<p>&lsquo;<tt>Tstfil</tt>&rsquo; is now shown as a pipe by zlibc in order to warn programs
that they cannot seek in it.  Zlibc still shows it with its old name,
and you can directly look at its contents:
</p><table><tr><td>&nbsp;</td><td><pre class="example">&gt; cat tstfil
this is a test
</pre></td></tr></table>

<p>However, &lsquo;<tt>tstfil</tt>&rsquo; is not yet accessible using the symbolic link:
</p><table><tr><td>&nbsp;</td><td><pre class="example">&gt; cat x
cat: x: No such file or directory
</pre></td></tr></table>

<p>In order to make &lsquo;<tt>tstfil</tt>&rsquo; accessible using the link, you have to
destroy the link, and remake it:
</p><table><tr><td>&nbsp;</td><td><pre class="example">&gt; rm x
/bin/rm: remove `x'? y
&gt; ln -s tstfil x
&gt; ls -l
total 1
pr--r--r--   1 alknaff  sirac          15 Feb 25 19:40 tstfil
lrwxrwxrwx   1 alknaff  sirac           8 Feb 25 19:44 x -&gt; tstfil
&gt; cat x
this is a test
</pre></td></tr></table>

<hr size="6">
<a name="Hard-links"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Symbolic-links" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#How-it-works" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Using-zlibc" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Zlibc-and-links" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#How-it-works" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h3 class="subsection">3.1.2 Hard links</h3>

<p>If you compress datafiles with hard links pointing to them, gzip refuses
to compress them. 
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">&gt; echo 'this is a test' &gt;tstfil
&gt; ln tstfil x
&gt; ls -li
total 2
    166 -rw-r--r--   2 alknaff  sirac          15 Feb 25 19:46 tstfil
    166 -rw-r--r--   2 alknaff  sirac          15 Feb 25 19:46 x
&gt; gzip tstfil
gzip: tstfil has 1 other link  -- unchanged
</pre></td></tr></table>

<p>Thus you need to remove these hard links first, and remake them after
compressing the file.
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">&gt; rm x
/bin/rm: remove `x'? y
&gt; gzip tstfil
&gt; ln tstfil x
&gt; ls -li
total 2
    167 pr--r--r--   2 alknaff  sirac          15 Feb 25 19:46 tstfil
    167 pr--r--r--   2 alknaff  sirac          15 Feb 25 19:46 x
&gt; cat x
this is a test
</pre></td></tr></table>

<hr size="6">
<a name="How-it-works"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Hard-links" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Customization" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Using-zlibc" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Introduction" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Customization" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="How-it-works-1"></a>
<h1 class="chapter">4. How it works</h1>

<p>Usually, programs don&rsquo;t make system calls directly, but instead call a
library function which performs the actual system calls. For instance,
to open a file, the program first calls the <code>open</code> library
function, and then this function makes the actual syscall.  Zlibc
overrides the <code>open</code> function and other related functions in order
to do the uncompression on the fly.
</p>
<p>If the <code>open</code> system call fails because the file doesn&rsquo;t exist,
zlibc constructs the filename of a compressed file by appending
<code>.gz</code> to the filename supplied by the user program. If this
compressed file exists, it is opened and piped trough <code>gunzip</code>, and
the descriptor of the read end of this pipe is returned to the caller.
</p>
<p>In some cases, the compressed file is first uncompressed into a
temporary file, and a read descriptor for this file is passed to the
caller.  This is necessary if the caller wants to call <code>lseek</code> on
the file or <code>mmap</code> it. A description of data files for which using
temporary is necessary can be given in the configuration files
&lsquo;<tt>/usr/local/etc/zlibc.conf</tt>&rsquo; (&lsquo;<tt>/etc/zlibc.conf</tt>&rsquo; on
Linux)<a name="DOCF1" href="#FOOT1">(1)</a> and
&lsquo;<tt>~/.zlibrc</tt>&rsquo;. See section <a href="#Configuration-files">Configuration files</a>, for a detailed description
of their syntax.
</p>
<p>Many user programs try to check the existence of a given file by other
system calls before actually opening it. That&rsquo;s why zlibc also
overrides these system calls. If for example the user program tries to
stat a file, this call is also intercepted.
</p>
<p>The compressed file, which exists physically on the disk, is also called
&rsquo;the real file&rsquo;, and the uncompressed file, whose existence is only
simulated by zlibc is called &rsquo;the virtual file&rsquo;.
</p>
<hr size="6">
<a name="Customization"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#How-it-works" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Environmental-variables" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#How-it-works" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Introduction" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Porting-zlibc" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Customization-1"></a>
<h1 class="chapter">5. Customization</h1>
<a name="index-Customization"></a>

<p>The behavior of zlibc can be tailored using configuration files or
environment variables. This customization should normally not be needed,
as the compiled-in defaults are already pretty complete.
</p>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#Environmental-variables">5.1 Environmental variables</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#Configuration-files">5.2 Configuration files</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#Compiled_002din-defaults">5.3 Compiled-in defaults</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#Compile_002dtime-configuration">5.4 Compile-time configuration via GNU autoconf</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>

<hr size="6">
<a name="Environmental-variables"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Customization" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Switch-variables" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Customization" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Customization" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Porting-zlibc" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Environmental-variables-1"></a>
<h2 class="section">5.1 Environmental variables</h2>

<p>Environmental variables come in two kinds: <em>switch</em> variables have
a boolean value and can only be turned on or off, whereas <em>string</em>
variables can have arbitrary strings as values.
</p>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#Switch-variables">5.1.1 Switch variables</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#String-variables">5.1.2 String variables</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>


<hr size="6">
<a name="Switch-variables"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Environmental-variables" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#String-variables" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Customization" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Environmental-variables" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Porting-zlibc" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Switch-variables-1"></a>
<h3 class="subsection">5.1.1 Switch variables</h3>
<a name="index-LD_005fZLIB_005fVERBOSE"></a>
<a name="index-debugging-zlibc"></a>
<a name="index-LD_005fZLIB_005fUNLINK"></a>
<a name="index-removing-files"></a>
<a name="index-preventing-accidental-removal-of-compressed-files-_0028env_002evar_002e_0029"></a>
<a name="index-LD_005fZLIB_005fDISABLE"></a>
<a name="index-LD_005fZLIB_005fREADDIR_005fCOMPR"></a>
<a name="index-showing-compressed-files-in-a-directory-listing-_0028env_002evar_002e_0029"></a>

<p>These variables represent a flag which can be turned on or off.  If
their value is <code>on</code> or <code>1</code> they are turned on, if their value
is <code>off</code> or <code>0</code> they are turned off. All other values are
ignored. If the same flag can be turned on or off using config files,
the environmental variable always has the priority.
</p>
<dl compact="compact">
<dt> <code>LD_ZLIB_VERBOSE</code> </dt>
<dd><p>If this variable is turned on, informational messages are printed on
many operations of zlibc.  Moreover, error messages are printed in order
to point out errors in the configuration files, if any. If this variable
is turned off, errors are silently ignored.
</p>
</dd>
<dt> <code>LD_ZLIB_UNLINK</code></dt>
<dd><p>If this variable is turned on, and if the user program tries to unlink a
virtual (uncompressed) file, zlibc translates this call into unlinking
the real file. If this variable is turned off, unlink calls on virtual
files are ignored.
</p>
</dd>
<dt> <code>LD_ZLIB_DISABLE</code></dt>
<dd><p>If this variable is turned on, zlibc is switched off.
</p>
</dd>
<dt> <code>LD_ZLIB_READDIR_COMPR</code></dt>
<dd><p>If this variable is turned on, the readdir function shows the real
(compressed) files instead of the virtual (uncompressed) files.
</p></dd>
</dl>

<hr size="6">
<a name="String-variables"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Switch-variables" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Configuration-files" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Customization" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Environmental-variables" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Porting-zlibc" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="String-variables-1"></a>
<h3 class="subsection">5.1.2 String variables</h3>
<a name="index-LD_005fZLIB_005fTMP"></a>
<a name="index-directory-for-temporary-files-_0028env_002evar_002e_0029"></a>
<a name="index-LD_005fZLIB_005fEXT"></a>
<a name="index-filename-extension-for-compressed-files-_0028env_002evar_002e_0029"></a>
<a name="index-LD_005fZLIB_005fUNCOMPRESSOR"></a>
<a name="index-command-line-for-the-uncompressing-program-_0028env_002evar_002e_0029"></a>
<a name="index-LD_005fZLIB_005fCONFFILE"></a>
<a name="index-location-of-the-configuration-file-_0028env_002evar_002e_0029"></a>

<p>These variables have a string value, which represent a file, a directory
or a command.
</p>
<dl compact="compact">
<dt> <code>LD_ZLIB_TMP</code></dt>
<dd><p>This is the name of the directory where the temporary uncompressed files are 
put. The default is /tmp.
</p>
</dd>
<dt> <code>LD_ZLIB_EXT</code></dt>
<dd><p>This is the extension which is appended to a virtual file name in order
to obtain the real (compressed) file name. The default is <code>.gz</code>.
</p>
</dd>
<dt> <code>LD_ZLIB_UNCOMPRESSOR</code></dt>
<dd><p>This is the name of the program to be invoked to uncompress the data. Default
is <code>gzip -dc</code>.
</p>
</dd>
<dt> <code>LD_ZLIB_CONFFILE</code> </dt>
<dd><p>This is the name of an additional configuration file. If this variable
is defined and if the corresponding file exists, the configuration
described in this file overrides the configurations in &lsquo;<tt>~/.zlibrc</tt>&rsquo;
and in &lsquo;<tt>/usr/local/etc/zlibc.conf</tt>&rsquo; (&lsquo;<tt>/etc/zlibc.conf</tt>&rsquo; on
Linux).
</p></dd>
</dl>


<hr size="6">
<a name="Configuration-files"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#String-variables" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Overall-structure" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Customization" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Customization" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Porting-zlibc" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Configuration-files-1"></a>
<h2 class="section">5.2 Configuration files</h2>
<a name="index-Processing-order-of-configuration-file_002e"></a>



<p>To get its configuration, zlibc first looks into the file described by
the environment variable <code>LD_ZLIB_CONFFILE</code> (if any), then in
&lsquo;<tt>~/.zlibrc</tt>&rsquo; and finally in &lsquo;<tt>/usr/local/etc/zlibc.conf</tt>&rsquo;
(&lsquo;<tt>/etc/zlibc.conf</tt>&rsquo; on Linux <a name="DOCF2" href="#FOOT2">(2)</a>).  If the desired information is found in neither of
these files, the compiled-in defaults are used.  It is possible to
supply only part of the needed information in the configuration
files. In that case, the missing information is retrieved from the
compiled-in defaults. This allows you to have really small runtime
configuration files, which only list the differences between the desired
configuration and the compiled-in configuration.
</p>
<p>If an error occurs while parsing one of the configuration files, the
offending file is skipped, and the search continues with the next
file. However, no error message is printed unless the environmental
variable <code>LD_ZLIB_VERBOSE</code> is turned on (i.e. set to <code>1</code> or
to <code>on</code> ).
</p>
<p>If two files contain contradictory information, the information in the
file which is scanned first is retained (usually &lsquo;<tt>~/.zlibrc</tt>&rsquo;). If
any flags have been set or unset using environmental variables, these
settings override the flags specified in the configuration files.
</p>
<p>The configuration files are read by each process. For each process, they
are read at most once, at the time when zlibc is first used (attempt to
access a compressed file). Afterwards they are cached in the process&rsquo;s
virtual memory.  Thus, changing zlibc configuration files doesn&rsquo;t
generally have any effect on already running processes.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#Overall-structure">5.2.1 Overall structure</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#Commands-section">5.2.2 Commands section</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#Class-section">5.2.3 Class section</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>

<hr size="6">
<a name="Overall-structure"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Configuration-files" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Commands-section" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Customization" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Configuration-files" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Porting-zlibc" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Overall-structure-1"></a>
<h3 class="subsection">5.2.1 Overall structure</h3>
<a name="index-commands-section"></a>
<a name="index-class-section"></a>
<a name="index-Parsing-order-of-configuration-files_002e"></a>

<p>The zlibrc files consist of two sections: A <em>commands</em> section
(<a href="#Commands-line-flags">Available commands line flags</a>) and a <em>class definition</em> section
(<a href="#Class-section">Class section</a>).
</p>
<p>The commands section describes how zlibc should behave depending on
the executable that it was called from.  Several commands are grouped
together into <em>command classe</em>.
</p>
<p>The class definition section describes how zlibc should behave depending
on the class of the command and the datafile opened.
</p>
<p>The configuration file may contain comments in both sections: a comment
starts with a hash (<code>#</code>) and stops at the end of the line.
</p>
<p>Dashes (<code>-</code>) and underbars (<code>_</code>) may be used indifferently in
all keywords.
</p>
<hr size="6">
<a name="Commands-section"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Overall-structure" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Commands-section-syntax" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Customization" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Configuration-files" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Porting-zlibc" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Commands-section-1"></a>
<h3 class="subsection">5.2.2 Commands section</h3>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#Commands-section-syntax">5.2.2.1 General syntax of the commands section</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">             What goes into the commands
                                        section
</td></tr>
<tr><td align="left" valign="top"><a href="#Commands-line-flags">5.2.2.2 Available commands line flags</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">                 Which flags are available
</td></tr>
</table>

<hr size="6">
<a name="Commands-section-syntax"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Commands-section" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Commands-line-flags" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Customization" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Commands-section" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Porting-zlibc" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="General-syntax-of-the-commands-section"></a>
<h4 class="subsubsection">5.2.2.1 General syntax of the commands section</h4>
<a name="index-commands-section-1"></a>

<p>The format for a line in the &quot;commands&quot; section is as follows:
</p>
<table><tr><td>&nbsp;</td><td><pre class="display"><code>commands &quot;</code><var>cmd1</var><code>&quot;</code> [ &hellip; <code>&quot;</code><var>cmdn</var><code>&quot;</code> ] <code>use</code> <var>flags</var> <code>&quot;</code><var>class</var><code>&quot;</code>

</pre></td></tr></table>


<p>In this line, the <var>cmd1</var> &hellip; <var>cmdn</var> are the basenames of the
programs (commands) for which this line should apply.  The basename is
the name without the path, i.e. <code>ls</code> instead of
<code>/usr/bin/ls</code>. The command names should be enclosed in quotes.  You
may also use the keyword <code>default</code> (without quotes) to match all
commands.
</p>
<p>The <var>flags</var> describe those aspects of zlibc&rsquo;s behaviour that are
independant from the datafile which is being accessed. These flags come
in pairs.  The flags need not to be listed on a single <code>commands</code>
line, they may occur in several places, even in several different
configuration files (for instance one in <code>/etc/zlibc.conf</code> and
another one in <code>~/.zlibrc</code>.
</p>
<p>If two contradictory flags are found in the configuration files, the one
which is seen first is taken.
</p>
<p>If on the other hand a certain flag is not found at all in the
configuration files, the compiled-in default for this flag is used. This
is usually the second flag of each pair, described below
(see section <a href="#Commands-line-flags">Available commands line flags</a>).
</p>
<p>These flags can all be overridden by environmental variables.  When the
corresponding environmental variable is set to <code>1</code> or to <code>on</code>,
the first flag is used, when it is set to <code>0</code> or to <code>off</code>.  If
the environmental variables is set to neither of these 4 values, it is
ignored).
</p>
<p>The <var>class</var> names the commands class that these commands belong to.
If, for a given command, two <code>commands</code> lines give different
classes, the one which is seen first is taken. No union of classes is
made, the classes are always treated as a whole. Thus, if you want to
make a change to a command class, you need to describe it in its
entirety.
</p>
<p>The following example says that the <code>tar</code>, <code>cpio</code>, <code>pax</code>,
<code>cp</code> and <code>mv</code> show compressed files in a directory listing
(<code>readdir_compr</code> flag), and are of class <code>generic_safe</code>.
</p><table><tr><td>&nbsp;</td><td><pre class="example">commands &quot;tar&quot; &quot;cpio&quot; &quot;pax&quot; &quot;cp&quot; &quot;mv&quot; use readdir_compr &quot;generic_safe&quot;
</pre></td></tr></table>

<p>The class <code>generic_safe</code> would then need to be described further in
the class section.
</p>
<hr size="6">
<a name="Commands-line-flags"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Commands-section-syntax" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Class-section" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Customization" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Commands-section" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Porting-zlibc" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Available-commands-line-flags"></a>
<h4 class="subsubsection">5.2.2.2 Available commands line flags</h4>
<a name="index-disable"></a>
<a name="index-enable"></a>
<a name="index-readdir_005fcompr"></a>
<a name="index-readdir_005funcompr"></a>
<a name="index-verbose"></a>
<a name="index-silent"></a>

<a name="index-disabling-zlibc-_0028conf_002e-file_0029"></a>
<a name="index-showing-compressed-files-on-a-directory-listing-_0028conf_002e-file_0029"></a>
<a name="index-debugging-zlibc-1"></a>


<p>This section describes the flags which can be used on a <code>commands</code>
line. All these flags come in pairs.
</p>
<p>The table below describes each of these pairs.  The first word in the
header of each item is the non-default flag, the second word is the
default flag, and the third word is the environmental variable by which
you can override the settings from the configuration files. If this
environmental variable is turned on (set to 1), the non-default (first)
flag is taken, if it is turned off (set to 0), the default (second) flag
is taken.
</p>
<dl compact="compact">
<dt> <code>disable / enable / LD_ZLIB_DISAB</code></dt>
<dd><p>The <code>disable</code> flag disables zlibc for the programs on this commands
line.  This is useful for compression and uncompression utilities.
Without this flag, <code>gunzip</code> would not work anymore, because it
would think that the uncompressed file exists already, and it would
refuse to overwrite this file.
</p>
</dd>
<dt> <code>disable_child / enable_child / LD_ZLIB_DISAB_CHILD</code></dt>
<dd><p>The <code>disable_child</code> flag disables zlibc for the programs started by
programs on this commands line. This is implemented by removeing all
occurrences of <code>uncompress.so</code> from the LD_PRELOAD environment
variable. This function is useful for programs such as xemacs, in order
to make sure that all launched subprograms return results consistent
with emacs itself (directory listings, etc)
</p>
</dd>
<dt> <code>readdir_compr / readdir_uncompr / LD_ZLIB_READDIR</code></dt>
<dd><p>The readdir function shows the uncompressed files (i.e. with their
trailing <code>.gz</code> extension) when the <code>readdir_compr</code> flag is
set, and the compressed files otherwise.
</p>
</dd>
<dt> <code>verbose / silent / LD_ZLIB_VERBOSE</code></dt>
<dd><p>When <code>verbose</code> is set, zlibc prints informational messages.
</p>
</dd>
<dt> <code>unlink / no_unlink / LD_ZLIB_UNLINK</code></dt>
<dd><p>If the <code>unlink</code> flag is set, and if the user program tries to
unlink a virtual (uncompressed) file, the package translates this call
into unlinking the real file. If the <code>no_unlink</code> flag is set,
requests to unlink virtual (uncompressed) files are silently ignored.
</p>
</dd>
</dl>

<hr size="6">
<a name="Class-section"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Commands-line-flags" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Criteria" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Customization" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Configuration-files" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Porting-zlibc" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Class-section-1"></a>
<h3 class="subsection">5.2.3 Class section</h3>


<p>A command class<a name="DOCF3" href="#FOOT3">(3)</a> definition describes those
aspects of zlibc&rsquo;s behavior that depend on the name of the datafile
which is being accessed. Command classes are identified by a name which
is matched against the <var>class</var> parameter from the commands.  The
class name should be enclosed between quotes both in the commands line
and in the class definition.
</p>

<p>The class section contains descriptions of different command classes
(i.e descriptions how datafiles should be uncompressed). Each class
definition begins with a line of the following format:
</p>
<table><tr><td>&nbsp;</td><td><pre class="display"><code>class &quot;</code><var>id</var><code>&quot;</code>
</pre></td></tr></table>

<p>The class <var>id</var> is the same string as the one used in the commands
line. The remaining lines of a class definition are as follows:
</p><table><tr><td>&nbsp;</td><td><pre class="display">[ [ <var>criterion</var> ] [ <code>&quot;</code><var>name</var><code>&quot;</code> ]] <var>mode</var>
</pre></td></tr></table>

<p>The following example shows the definition of the class used for X-servers.
</p>
<table><tr><td>&nbsp;</td><td><pre class="example"># X uses tmp files in its own directories.
class &quot;X&quot;
subdir &quot;/usr/X11R6&quot; usetmpfile
subdir &quot;/usr/X386&quot; usetmpfile
subdir &quot;/usr/lib/X11&quot; usetmpfile
showpipe
</pre></td></tr></table>

<p>This says that all compressed files who are in a subdirectory below
&lsquo;<tt>/usr/X11R6</tt>&rsquo;, &lsquo;<tt>/usr/X386</tt>&rsquo; or &lsquo;<tt>/usr/lib/X11</tt>&rsquo; are
decompressed using temporary files (<code>usetmpfile</code>), and that files
from other directories are decompressed using pipes (<code>showpipe</code>)
</p>

<p>The following examples illustrates a command class, named <code>nopipe</code>,
which always uses temporary files for decompression
</p><table><tr><td>&nbsp;</td><td><pre class="display"># generic class which uses temp files for all files.
class &quot;nopipe&quot;
usetmpfile
</pre></td></tr></table>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#Criteria">5.2.3.1 File selection Criteria</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">           To which data files does this line apply
</td></tr>
<tr><td align="left" valign="top"><a href="#Mode">5.2.3.2 Mode</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">               How zlibc behaves for the files matching the
                       criterion
</td></tr>
</table>

<hr size="6">
<a name="Criteria"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Class-section" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Mode" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Customization" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Class-section" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Porting-zlibc" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="File-selection-Criteria"></a>
<h4 class="subsubsection">5.2.3.1 File selection Criteria</h4>
<a name="index-directory-_0028selection-criterion_0029"></a>
<a name="index-filename-_0028selection-criterion_0029"></a>
<a name="index-extension-_0028selection-criterion_0029"></a>
<a name="index-suffix-_0028selection-criterion_0029"></a>
<a name="index-basename-_0028selection-criterion_0029"></a>
<a name="index-doublespaced-DOS-filesystem"></a>

<p>The <var>criterion </var> describes what parts of the filename should match:
</p>
<dl compact="compact">
<dt> <code>filename</code></dt>
<dd><p>The entire filename of the target data file must match
<var>name</var>.
</p>
</dd>
<dt> <code>basename</code></dt>
<dd><p>The basename (filename without directory) of the target data file must
match <var>name</var>.
</p>
</dd>
<dt> <code>directory</code></dt>
<dd><p>The data file must live in the directory <var>name</var>.  If the user
program opens the file with an absolute pathname, that filename is used
as is.  If on the other hand the user program uses a relative pathname,
zlibc uses the most direct path to the file (i.e. without symlinks).
</p>
</dd>
<dt> <code>subdirectory</code></dt>
<dd><p>The data file must live in the directory <var>name</var> or in one of its
subdirectories. If the user program opens the file with an absolute
pathname, that filename is used as is.  If on the other hand the user
program uses a relative pathname, zlibc uses the most direct path to the
file (i.e. without symlinks).
</p>
</dd>
<dt> <code>suffix</code></dt>
<dd><p>The data file&rsquo;s name must end in <var>name</var>.  This is useful for
selecting files according to their extension.
</p>
</dd>
<dt> <code>filesystem</code></dt>
<dd><p>The data file must live on the same filesystem as <var>name</var>. This
criterion can for example be used for example to disable zlibc on a
doublespaced filesystem (where zlibc would be redundant), or to switch
off uncompressed size reporting on an <code>ftpfs</code> filesystems
<a name="DOCF4" href="#FOOT4">(4)</a>.
</p>
</dd>
<dt> <code>default</code></dt>
<dd><p>All data files match. All class definitions must have a default line,
and this default line must be the last line of the definition. The
default criterion needs no &rsquo;name&rsquo; parameter.
</p>
</dd>
<dt> <code>all</code></dt>
<dd><p>All data files match. Unlike <code>default</code>, this line needs not to be
the last line of the class definitions. Thus it is possible to specify
several <code>all</code> lines for different aspects of <code>zlibc</code>
behaviour.
</p></dd>
</dl>

<p>The lines of each class definition are scanned in sequence, and, for
each aspect<a name="DOCF5" href="#FOOT5">(5)</a>, the first matching line is
adopted.  The class may be defined in another initialisation file, if
this file is scanned later. The <var>criterion</var> parameter may be omitted
if it can be deduced from the <var>name</var>. In that case, the following
heuristics are used:
</p>
<ul>
<li>
<var>Name</var>s beginning with a dot are considered as <code>suffix</code>.

</li><li>
<var>Name</var>s beginning with a slash, but not ending with a slash are
considered as <var>filename</var>.

</li><li>
<var>Name</var>s beginning and ending with a slash are considered as
<code>subdirectory</code>.

</li><li>
A missing <var>name</var> is considered as <code>default</code>.

</li><li>
All the other <var>name</var>s are considered as <code>basename</code>.
</li></ul>

<p><code>filesystem</code> criteria, because these tend to be more predictable.
</p>
<hr size="6">
<a name="Mode"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Criteria" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Readonly" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Customization" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Class-section" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Porting-zlibc" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Mode-1"></a>
<h4 class="subsubsection">5.2.3.2 Mode</h4>

<p>The <var>mode</var> describes the behavior of zlibc in certain
situations. These are:
</p><ol>
<li>
What to do when a file is accessed in readonly mode.
</li><li>
What to do when a user program tries to append data to an existing file.
</li><li>
What to do when a user program tries to create a new file.
</li><li>
What to do when a user program tries to access an existing file and none
of the preceding situations apply (see section <a href="#Write">Other write requests</a>).
</li><li>
Whether to show the size of the uncompressed file or the size of the
compressed file as a response to stat (see section <a href="#Size">Size shown for compressed files</a>).
</li></ol>

<p>The mode for each off these 5 situations has to be described separately.
For each of these 5 situations, the scan through the class description
is done until the reaction of zlibc for this situation is defined.
</p>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#Readonly">Reaction to a readonly request</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">     Behavior for programs wanting to only read files
</td></tr>
<tr><td align="left" valign="top"><a href="#Append">Reaction to an append request</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">              - for programs wanting to add more data to
                          existing files
</td></tr>
<tr><td align="left" valign="top"><a href="#Creation">Reaction to a file creation request</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">            - for programs wanting to create new files
</td></tr>
<tr><td align="left" valign="top"><a href="#Write">Other write requests</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">               - for programs wanting to apply other
                          modifications to files
</td></tr>
<tr><td align="left" valign="top"><a href="#Size">Size shown for compressed files</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">                - for programs wanting to know the size of a 
                          file
</td></tr>
</table>


<hr size="6">
<a name="Readonly"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Mode" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Append" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Customization" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Class-section" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Porting-zlibc" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Reaction-to-a-readonly-request"></a>
<h4 class="unnumberedsubsubsec">Reaction to a readonly request</h4>

<p>The reaction to a <code>readonly</code> request may be one of the following:
</p>
<dl compact="compact">
<dt> <code>show-pipe</code></dt>
<dd><p>The uncompressed data file is sent to the user program using a
pipe. This consumes very few resources, and it allows the decompression
to run in paralell with the user process, but it has the disadvantage
that the user program cannot use lseek.  To warn the user program of
this, the data file is shown as a named pipe (FIFO) when it is
stat&rsquo;ed.
</p>
</dd>
<dt> <code>use-tmp-file</code></dt>
<dd><p>This is the default setting.  The data is uncompressed and put into a
temporary file. The user programs then reads its data from the temporary
file. This has the advantage that the user program may lseek, and the
disadvantage that more disk space is consumed, while the programming is
accessing the file.
</p>
</dd>
<dt> <code>hide-pipe</code></dt>
<dd><p>The data is sent through a pipe, but the file is shown as a regular file
(&quot;hidden&quot;) to the user program when it stats it. This might be needed
for programs which are picky about a file type, but who actually don&rsquo;t
need lseek.
</p>
</dd>
<dt> <code>leave-compressed</code></dt>
<dd><p>The virtual (uncompressed) file is shown as non-existent to stat, and
readdir shows the physical (compressed) file. For certain programs, this
is enough to disable zlibc on a file per file basis. This is useful, for
example, to make emacs use its own compression support (crypt.el)
instead of zlibc. Crypt.el is able to compress files when writing them
back, whereas zlibc isn&rsquo;t able to do so. The <code>leave-compressed</code>
doesn&rsquo;t work correctly with the <code>directory</code> and <code>subdirectory</code>
criteria.  Use the <code>filesystem</code> criterion instead.
</p>
</dd>
<dt> <code>dir-leave-compressed</code></dt>
<dd><p>The virtual (uncompressed) file is shown to stat, but readdir shows the
physical (compressed) file. This is useful to tell zlibc that we prefer
working on the physical file, but without making access to the virtual
file impossible. The <code>dir-leave-compressed</code> doesn&rsquo;t work with the
<code>dir</code> and <code>subdir</code> criteria. Use the <code>filesystem</code>
criterion instead.
</p>
</dd>
</dl>

<hr size="6">
<a name="Append"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Readonly" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Creation" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Customization" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Class-section" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Porting-zlibc" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Reaction-to-an-append-request"></a>
<h4 class="unnumberedsubsubsec">Reaction to an append request</h4>

<p>The reaction to an <code>append</code> request may be one of the following:
</p>
<dl compact="compact">
<dt> <code>append-compressed</code></dt>
<dd><p>When a user program tries to append data to a non-existant file, but the
corresponding compressed file exists, zlibc translates this request into
appending the compressed data to the compressed file.
</p>
<p><strong>WARNING-1:</strong>
</p>
<p>This works with gzip, and might not work with other (un)compressors!
This relies on gzip&rsquo;s feature to consider a concatenation of compressed
files as a compression of concatenated files.
</p>
<p><strong>WARNING-2:</strong>
</p>
<p>This is only reliable if you can guarantee that the file is not accessed
by some other program while the first one has it still open, or that it
won&rsquo;t be opened again (even by the same program) shortly after it has
been closed. Delays longer than a second should be ok. Don&rsquo;t enable
<code>append-compressed</code> if you expect the file to be written to by
several programs at once.
</p>
</dd>
<dt> <code>no-append-compressed</code></dt>
<dd><p>Don&rsquo;t append to a compressed file (the user program will get a file not
found error). This is the default behavior.
</p>
</dd>
</dl>

<hr size="6">
<a name="Creation"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Append" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Write" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Customization" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Class-section" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Porting-zlibc" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Reaction-to-a-file-creation-request"></a>
<h4 class="unnumberedsubsubsec">Reaction to a file creation request</h4>

<p>The reaction to a <code>create</code> request may be one of the following:
</p>
<dl compact="compact">
<dt> <code>create-compressed</code></dt>
<dd><p>When a user program tries to create a new file whose name matches the
pattern, zlibc translates this request into creating a compressed
file. A file is considered to be created, if the <code>O_TRUNC</code> flag is
set, or if both <code>O_CREAT</code> and <code>O_EXCL</code> are set. This only
applies to files opened write-only.
</p>
<p><strong>WARNING-1:</strong>
</p>
<p>This is only reliable if you can guarantee that the newly
created file is not accessed by some other program while the first one
has it still open, or that it won&rsquo;t be opened again (even by the same
program) shortly after it has been closed.
</p>
<p><strong>WARNING-2:</strong>
</p>
<p>This should not be used if you expect the program to seek in this
file.
</p>
</dd>
<dt> <code>no-create-compressed</code></dt>
<dd><p>Newly created files are created uncompressed. This is the default.
</p></dd>
</dl>

<hr size="6">
<a name="Write"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Creation" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Size" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Customization" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Class-section" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Porting-zlibc" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Other-write-requests"></a>
<h4 class="unnumberedsubsubsec">Other write requests</h4>

<p>The reaction to other <code>write</code> requests may be one of the following:
</p>
<dl compact="compact">
<dt> <code>uncompress-before-write</code></dt>
<dd><p>When a user program tries to write to a non-existing file, and when a
compressed file with a corresponding name exists, this file is
uncompressed in place (i.e. having the same name, but without the .gz
extension)
</p>
<p><strong>WARNING-1:</strong>
</p>
<p>This is only safe when you can guarantee that the file is not opened by
several programs at once. However, once the call to the open function
has returned, other programs may open this file safely. If a second
program tries to open the file during the open call of the first, this
second program gets a permission error.
</p>
<p><strong>WARNING-2:</strong>
</p>
<p>When using this option, be careful when opening files belonging to
another user, or files living in a directory where you have no write
access to. Using this option in a directory without write access will
result in a permission error. Using this option in a directory where you
do have write access will change the ownership of the file to you, even
if it belonged to another user initially.
</p>
</dd>
<dt> <code>no-uncompress-before-write</code></dt>
<dd><p>Compressed files are not uncompressed before writing to them, and zlibc
returns a &quot;file not found&quot; error. This is the default.
</p>
</dd>
</dl>

<p>If several of these options apply for the same file,
<code>create-compressed</code> has priority over <code>append-compressed</code>
which has priority over <code>uncompress-before-write</code>.
</p>
<hr size="6">
<a name="Size"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Write" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Compiled_002din-defaults" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Customization" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Class-section" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Porting-zlibc" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Size-shown-for-compressed-files"></a>
<h4 class="unnumberedsubsubsec">Size shown for compressed files</h4>
<a name="index-find"></a>
<a name="index-size-of-compressed-files"></a>
<a name="index-slowness-_0028of-find-due-to-reading-the-size_0029"></a>
<a name="index-show_002dcompressed_002dsize"></a>
<a name="index-ftpfs"></a>
<a name="index-ls-slowness-_0028on-an-ftpfs-filesystem_0029"></a>
<a name="index-slowness-_0028of-ls_002c-on-an-ftpfs-filesystem_0029"></a>
<a name="index-hanging-_0028of-ls_002c-on-an-ftpfs-filesystem_0029"></a>


<p>When an application calls <code>stat</code> to fetch the attributes of a file
(such as its permissions, size, type, etc.), zlibc stats the
corresponding compressed file instead.  After doing so, zlibc has to
adjust some of the values returned by stat, such as the type and the
size.  The type has to be adjusted for those files that should be shown
as pipes.  The size has to be adjusted because user programs are usually
interested in the amount of data that they can actually read from the
file (i.e. the size of the uncompressed file) rather than the size of
the physical file (i.e. the size of the compressed file).  However, in
order to find out the size of the uncompressed file, zlibc has to read
some data of the file, which may impact performance in situations where
many files are stat&rsquo;ed.  This is for instance the case for <code>find</code>,
or for <code>ls</code> on an <code>ftpfs</code> filesystem.  The following two
behaviors of the stat call may be specified:
</p>
<dl compact="compact">
<dt> <code>show-compressed-size</code></dt>
<dd><p>Stat returns the size of the compressed file.  This is less useful for
the application, but more efficient.  If you mount any <code>ftpfs</code>
filesystems, you may switch on <code>show-compressed-size</code> just for that
filesystem by using the <code>filesystem</code> criterion (see section <a href="#Criteria">File selection Criteria</a>).
</p>
</dd>
<dt> <code>show-uncompressed-size</code></dt>
<dd><p>Stat returns the size of the uncompressed file.  This is more useful for
the application, but less efficient.  This is the default behavior.
</p>
</dd>
</dl>



<hr size="6">
<a name="Compiled_002din-defaults"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Size" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Compile_002dtime-configuration" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Customization" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Customization" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Porting-zlibc" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Compiled_002din-defaults-1"></a>
<h2 class="section">5.3 Compiled-in defaults</h2>

<p>It is possible to operate zlibc entirely without configuration files.
In this case, it uses the <em>compiled-in defaults</em>.  These are
generated at compile-time from the &lsquo;<tt>zlibrc.sample</tt>&rsquo; file.  This file
has the same syntax as the configuration files described above
(see section <a href="#Configuration-files">Configuration files</a>).  If you want to change the compiled-in
defaults of zlibc, edit that file, and remake.
</p>
<hr size="6">
<a name="Compile_002dtime-configuration"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Compiled_002din-defaults" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Porting-zlibc" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Customization" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Customization" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Porting-zlibc" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Compile_002dtime-configuration-via-GNU-autoconf"></a>
<h2 class="section">5.4 Compile-time configuration via GNU autoconf</h2>
<a name="index-configure-options"></a>
<a name="index-temporary-file-directory"></a>
<a name="index-directory-for-temporary-files"></a>
<a name="index-compile_002dtime-configuration"></a>

<p>Before it can be compiled, zlibc must be configured using the GNU
autoconf script <code>./configure</code>.  In most circumstances, running
<code>./configure</code> without any parameters is enough. However, you may
customize zlibc using various options to <code>./configure</code>. The
following options are supported:
</p><dl compact="compact">
<dt> <code>--prefix <var>directory</var></code></dt>
<dd><p>Prefix used for any directories used by zlibc.  By default, this is
&lsquo;<tt>/usr/local</tt>&rsquo;.  Zlibc is installed in &lsquo;<tt>$prefix/lib</tt>&rsquo;, looks for
its system wide configuration file in &lsquo;<tt>$prefix/etc</tt>&rsquo;.  Man pages are
installed in &lsquo;<tt>$prefix/man</tt>&rsquo;, info pages in &lsquo;<tt>$prefix/info</tt>&rsquo; etc.
On Linux, if you use zlibc via &lsquo;<tt>/etc/ld.so.preload</tt>&rsquo;, you should use
&lsquo;<tt>/</tt>&rsquo; as the prefix instead of the default &lsquo;<tt>$prefix/lib</tt>&rsquo;.
</p>
</dd>
<dt> <code>--sysconfdir <var>directory</var></code></dt>
<dd><p>Directory containing the system-wide configuration file
&lsquo;<tt>zlibc.conf</tt>&rsquo;.  By default, this is derived from <code>prefix</code> (see
above).
</p>
</dd>
<dt> <code>--disable-runtime-conf</code></dt>
<dd><p>Disables run time configuration via environmental variables and via the
configuration files.  This may be needed in hyper secure environments.
</p>
</dd>
<dt> <code>--disable-env-conf</code></dt>
<dd><p>Disables run time configuration via environmental variables
</p>
</dd>
<dt> <code>--disable-have-proc</code></dt>
<dd><p>Tells zlibc not to use the /proc filesystem to find out the commandline
of the programs for which it runs, even if a working /proc is detected.
</p>
</dd>
<dt> <code>--disable-have-proc</code></dt>
<dd><p>Tells zlibc to use the /proc filesystem to find out the commandline of
the programs for which it runs, even if no working /proc is detected.
</p>
</dd>
<dt> <code>--with-compr-ext=<var>extension</var></code></dt>
<dd><p>Uses <var>extension</var> as the filename extension of compressed files.  By
default, is <code>.gz</code>
</p>
</dd>
<dt> <code>--with-extlen=<var>length</var></code></dt>
<dd><p>Allows to configure compressed filename extensions with at most
<var>length</var> character via runtime configuration.  By default is 5.
</p>
</dd>
<dt> <code>--with-tmpdir=<var>directory</var></code></dt>
<dd><p>Uses <var>directory</var> to store the uncompressed files.  By default is
<code>/tmp</code>.  
</p>
</dd>
<dt> <code>--with-uncompressor=<var>uncompressor-command-line</var></code></dt>
<dd><p>Defines how the program for uncompressing files should be invoked.  This
command should read the compressed file from stdin, and output the
uncompressed data to stdout By default is <code>gzip -dc</code>.
</p>
</dd>
</dl>

<p>In addition to the above-listed options, the standard GNU autoconf
options apply.  Type <code>./configure --help</code> to get a complete list of
these.
</p>


<hr size="6">
<a name="Porting-zlibc"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Compile_002dtime-configuration" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Customization" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Introduction" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Porting-zlibc-1"></a>
<h1 class="chapter">6. Porting zlibc</h1>

<p>Zlibc has been tested on three variants of Unix so far: Linux, SunOs,
Solaris.  On all three platforms, zlibc has been compiled using GNU make
and gcc.  However, porting it to other platforms should be
straightforward as long as they verify both of the following conditions:
</p>
<ol>
<li>
The target platform should have shared library support.  The default
Makefile links zlibc by supplying the flags <code>-nostdlib -shared</code> to
gcc in addition to the usual <code>CFLAGS</code>.  If your target platform
needs different flags to make shared libraries, change the definition of
the variable <code>SHAREDCFLAGS</code> in the Makefile.
</li><li>
The target platform should supply a way to perform system calls
directly without going through the library functions.  Indeed, this is
needed because we are redefining the library functions and thus the
default functions become unavailable.

<p>Usually direct syscalls done by calling the syscall function.  For
instance, in order to perform <code>open(&quot;test&quot;, O_RDONLY)</code> directly,
<code>sycall(SYS_open, &quot;test&quot;, O_RDONLY)</code> is called.
</p>
<p>If your target platform uses a different way to perform direct
system calls, you need to supply different definitions for the real_xxx
functions in direct_sys.h.  This is the case for AIX.
</p></li><li>
The target platform should provide a way to instruct the dynamic linker
to preload programs with extra object files not present in the shared
library.  Any symbols defined in that object file override equivalent
symbols from libc.  Usually this is done by pointing the
<code>LD_PRELOAD</code> variable to the object file to be used.
Unfortunately, I have found no way to achieve this on AIX.  Any ideas
about how to do this are welcome.
</li></ol>

<p>Many platforms, including Solaris, provide several aliases for their
syscall stubs.  It would be interesting to leave one of them alone, and
use it as a &quot;direct syscall&quot; stub, but unfortunately, it turns out that
in sometimes both stubs are used by the library!  Thus, what would be an
advantage, becomes actually a disadvantage, because we will need to
override these aliases in addition to the canonical names.  This is done
in altnames.c.  Change it as needed.  In order to know the names of
these aliases, try the following command: <code>nm /lib/libc.so | grep
lstat</code>.  This lists any library symbols with <code>unlink</code> in their
name, which could be aliases.
</p>
<p>If you have successfully ported zlibc to a new platform, could you drop
me a note, so that I can include support for that platform in my next
release.  Thanks
</p>
<hr size="6">
<a name="Variable-Index"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Porting-zlibc" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Concept-Index" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Porting-zlibc" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Introduction" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Concept-Index" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Variable-index"></a>
<h1 class="unnumbered">Variable index</h1>
<table><tr><th valign="top">Jump to: &nbsp; </th><td><a href="#Variable-index_vr_letter-D" class="summary-letter"><b>D</b></a>
 &nbsp; 
<a href="#Variable-index_vr_letter-E" class="summary-letter"><b>E</b></a>
 &nbsp; 
<a href="#Variable-index_vr_letter-L" class="summary-letter"><b>L</b></a>
 &nbsp; 
<a href="#Variable-index_vr_letter-R" class="summary-letter"><b>R</b></a>
 &nbsp; 
<a href="#Variable-index_vr_letter-S" class="summary-letter"><b>S</b></a>
 &nbsp; 
<a href="#Variable-index_vr_letter-V" class="summary-letter"><b>V</b></a>
 &nbsp; 
</td></tr></table>
<table border="0" class="index-vr">
<tr><td></td><th align="left">Index Entry</th><th align="left"> Section</th></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="Variable-index_vr_letter-D">D</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-disable"><code>disable</code></a></td><td valign="top"><a href="#Commands-line-flags">5.2.2.2 Available commands line flags</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="Variable-index_vr_letter-E">E</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-enable"><code>enable</code></a></td><td valign="top"><a href="#Commands-line-flags">5.2.2.2 Available commands line flags</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="Variable-index_vr_letter-L">L</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-LD_005fPRELOAD"><code>LD_PRELOAD</code></a></td><td valign="top"><a href="#Installing-zlibc">2. Installing zlibc</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-LD_005fZLIB_005fCONFFILE"><code>LD_ZLIB_CONFFILE</code></a></td><td valign="top"><a href="#String-variables">5.1.2 String variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-LD_005fZLIB_005fDISABLE"><code>LD_ZLIB_DISABLE</code></a></td><td valign="top"><a href="#Switch-variables">5.1.1 Switch variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-LD_005fZLIB_005fEXT"><code>LD_ZLIB_EXT</code></a></td><td valign="top"><a href="#String-variables">5.1.2 String variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-LD_005fZLIB_005fREADDIR_005fCOMPR"><code>LD_ZLIB_READDIR_COMPR</code></a></td><td valign="top"><a href="#Switch-variables">5.1.1 Switch variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-LD_005fZLIB_005fTMP"><code>LD_ZLIB_TMP</code></a></td><td valign="top"><a href="#String-variables">5.1.2 String variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-LD_005fZLIB_005fUNCOMPRESSOR"><code>LD_ZLIB_UNCOMPRESSOR</code></a></td><td valign="top"><a href="#String-variables">5.1.2 String variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-LD_005fZLIB_005fUNLINK"><code>LD_ZLIB_UNLINK</code></a></td><td valign="top"><a href="#Switch-variables">5.1.1 Switch variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-LD_005fZLIB_005fVERBOSE"><code>LD_ZLIB_VERBOSE</code></a></td><td valign="top"><a href="#Switch-variables">5.1.1 Switch variables</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="Variable-index_vr_letter-R">R</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-readdir_005fcompr"><code>readdir_compr</code></a></td><td valign="top"><a href="#Commands-line-flags">5.2.2.2 Available commands line flags</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-readdir_005funcompr"><code>readdir_uncompr</code></a></td><td valign="top"><a href="#Commands-line-flags">5.2.2.2 Available commands line flags</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="Variable-index_vr_letter-S">S</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-show_002dcompressed_002dsize"><code>show-compressed-size</code></a></td><td valign="top"><a href="#Size">Size shown for compressed files</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-silent"><code>silent</code></a></td><td valign="top"><a href="#Commands-line-flags">5.2.2.2 Available commands line flags</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="Variable-index_vr_letter-V">V</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-verbose"><code>verbose</code></a></td><td valign="top"><a href="#Commands-line-flags">5.2.2.2 Available commands line flags</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
</table>
<table><tr><th valign="top">Jump to: &nbsp; </th><td><a href="#Variable-index_vr_letter-D" class="summary-letter"><b>D</b></a>
 &nbsp; 
<a href="#Variable-index_vr_letter-E" class="summary-letter"><b>E</b></a>
 &nbsp; 
<a href="#Variable-index_vr_letter-L" class="summary-letter"><b>L</b></a>
 &nbsp; 
<a href="#Variable-index_vr_letter-R" class="summary-letter"><b>R</b></a>
 &nbsp; 
<a href="#Variable-index_vr_letter-S" class="summary-letter"><b>S</b></a>
 &nbsp; 
<a href="#Variable-index_vr_letter-V" class="summary-letter"><b>V</b></a>
 &nbsp; 
</td></tr></table>

<hr size="6">
<a name="Concept-Index"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Variable-Index" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[ &gt; ]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Introduction" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[ &gt;&gt; ]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Concept-index"></a>
<h1 class="unnumbered">Concept index</h1>
<table><tr><th valign="top">Jump to: &nbsp; </th><td><a href="#Concept-index_cp_letter-A" class="summary-letter"><b>A</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-B" class="summary-letter"><b>B</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-C" class="summary-letter"><b>C</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-D" class="summary-letter"><b>D</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-E" class="summary-letter"><b>E</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-F" class="summary-letter"><b>F</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-H" class="summary-letter"><b>H</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-I" class="summary-letter"><b>I</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-L" class="summary-letter"><b>L</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-M" class="summary-letter"><b>M</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-P" class="summary-letter"><b>P</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-R" class="summary-letter"><b>R</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-S" class="summary-letter"><b>S</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-T" class="summary-letter"><b>T</b></a>
 &nbsp; 
</td></tr></table>
<table border="0" class="index-cp">
<tr><td></td><th align="left">Index Entry</th><th align="left"> Section</th></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="Concept-index_cp_letter-A">A</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-ALPHA-patches">ALPHA patches</a></td><td valign="top"><a href="#Introduction">Introduction</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="Concept-index_cp_letter-B">B</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-basename-_0028selection-criterion_0029">basename (selection criterion)</a></td><td valign="top"><a href="#Criteria">5.2.3.1 File selection Criteria</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Boot-problems">Boot problems</a></td><td valign="top"><a href="#Installing-zlibc">2. Installing zlibc</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-bugs">bugs</a></td><td valign="top"><a href="#Introduction">Introduction</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="Concept-index_cp_letter-C">C</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-class-section">class section</a></td><td valign="top"><a href="#Overall-structure">5.2.1 Overall structure</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-command-line-for-the-uncompressing-program-_0028env_002evar_002e_0029">command line for the uncompressing program (env.var.)</a></td><td valign="top"><a href="#String-variables">5.1.2 String variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-commands-section">commands section</a></td><td valign="top"><a href="#Overall-structure">5.2.1 Overall structure</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-commands-section-1">commands section</a></td><td valign="top"><a href="#Commands-section-syntax">5.2.2.1 General syntax of the commands section</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-compile_002dtime-configuration">compile-time configuration</a></td><td valign="top"><a href="#Compile_002dtime-configuration">5.4 Compile-time configuration via GNU autoconf</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-configure-options">configure options</a></td><td valign="top"><a href="#Compile_002dtime-configuration">5.4 Compile-time configuration via GNU autoconf</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Customization">Customization</a></td><td valign="top"><a href="#Customization">5. Customization</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="Concept-index_cp_letter-D">D</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-debugging-zlibc">debugging zlibc</a></td><td valign="top"><a href="#Switch-variables">5.1.1 Switch variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-debugging-zlibc-1">debugging zlibc</a></td><td valign="top"><a href="#Commands-line-flags">5.2.2.2 Available commands line flags</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-diffs">diffs</a></td><td valign="top"><a href="#Introduction">Introduction</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-directory-_0028selection-criterion_0029">directory (selection criterion)</a></td><td valign="top"><a href="#Criteria">5.2.3.1 File selection Criteria</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-directory-for-temporary-files">directory for temporary files</a></td><td valign="top"><a href="#Compile_002dtime-configuration">5.4 Compile-time configuration via GNU autoconf</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-directory-for-temporary-files-_0028env_002evar_002e_0029">directory for temporary files (env.var.)</a></td><td valign="top"><a href="#String-variables">5.1.2 String variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-disabling-zlibc-_0028conf_002e-file_0029">disabling zlibc (conf. file)</a></td><td valign="top"><a href="#Commands-line-flags">5.2.2.2 Available commands line flags</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-doublespaced-DOS-filesystem">doublespaced DOS filesystem</a></td><td valign="top"><a href="#Criteria">5.2.3.1 File selection Criteria</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="Concept-index_cp_letter-E">E</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-extension-_0028selection-criterion_0029">extension (selection criterion)</a></td><td valign="top"><a href="#Criteria">5.2.3.1 File selection Criteria</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="Concept-index_cp_letter-F">F</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-filename-_0028selection-criterion_0029">filename (selection criterion)</a></td><td valign="top"><a href="#Criteria">5.2.3.1 File selection Criteria</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-filename-extension-for-compressed-files-_0028env_002evar_002e_0029">filename extension for compressed files (env.var.)</a></td><td valign="top"><a href="#String-variables">5.1.2 String variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-find">find</a></td><td valign="top"><a href="#Size">Size shown for compressed files</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-ftpfs">ftpfs</a></td><td valign="top"><a href="#Size">Size shown for compressed files</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="Concept-index_cp_letter-H">H</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-hanging-_0028of-ls_002c-on-an-ftpfs-filesystem_0029">hanging (of ls, on an ftpfs filesystem)</a></td><td valign="top"><a href="#Size">Size shown for compressed files</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="Concept-index_cp_letter-I">I</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-Installation">Installation</a></td><td valign="top"><a href="#Installing-zlibc">2. Installing zlibc</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="Concept-index_cp_letter-L">L</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-location-of-the-configuration-file-_0028env_002evar_002e_0029">location of the configuration file (env.var.)</a></td><td valign="top"><a href="#String-variables">5.1.2 String variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-ls-slowness-_0028on-an-ftpfs-filesystem_0029">ls slowness (on an ftpfs filesystem)</a></td><td valign="top"><a href="#Size">Size shown for compressed files</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="Concept-index_cp_letter-M">M</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-mailing-list">mailing list</a></td><td valign="top"><a href="#Introduction">Introduction</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="Concept-index_cp_letter-P">P</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-Parsing-order-of-configuration-files_002e">Parsing order of configuration files.</a></td><td valign="top"><a href="#Overall-structure">5.2.1 Overall structure</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-patches">patches</a></td><td valign="top"><a href="#Introduction">Introduction</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-preventing-accidental-removal-of-compressed-files-_0028env_002evar_002e_0029">preventing accidental removal of compressed files (env.var.)</a></td><td valign="top"><a href="#Switch-variables">5.1.1 Switch variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Processing-order-of-configuration-file_002e">Processing order of configuration file.</a></td><td valign="top"><a href="#Configuration-files">5.2 Configuration files</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="Concept-index_cp_letter-R">R</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-removing-files">removing files</a></td><td valign="top"><a href="#Switch-variables">5.1.1 Switch variables</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="Concept-index_cp_letter-S">S</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-Set_002duid-programs">Set-uid programs</a></td><td valign="top"><a href="#Installing-zlibc">2. Installing zlibc</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-showing-compressed-files-in-a-directory-listing-_0028env_002evar_002e_0029">showing compressed files in a directory listing (env.var.)</a></td><td valign="top"><a href="#Switch-variables">5.1.1 Switch variables</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-showing-compressed-files-on-a-directory-listing-_0028conf_002e-file_0029">showing compressed files on a directory listing (conf. file)</a></td><td valign="top"><a href="#Commands-line-flags">5.2.2.2 Available commands line flags</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-size-of-compressed-files">size of compressed files</a></td><td valign="top"><a href="#Size">Size shown for compressed files</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-slowness-_0028of-find-due-to-reading-the-size_0029">slowness (of find due to reading the size)</a></td><td valign="top"><a href="#Size">Size shown for compressed files</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-slowness-_0028of-ls_002c-on-an-ftpfs-filesystem_0029">slowness (of ls, on an ftpfs filesystem)</a></td><td valign="top"><a href="#Size">Size shown for compressed files</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-suffix-_0028selection-criterion_0029">suffix (selection criterion)</a></td><td valign="top"><a href="#Criteria">5.2.3.1 File selection Criteria</a></td></tr>
<tr><td></td><td valign="top"><a href="#index-Symbolic-links">Symbolic links</a></td><td valign="top"><a href="#Using-zlibc">3. Using zlibc</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
<tr><th><a name="Concept-index_cp_letter-T">T</a></th><td></td><td></td></tr>
<tr><td></td><td valign="top"><a href="#index-temporary-file-directory">temporary file directory</a></td><td valign="top"><a href="#Compile_002dtime-configuration">5.4 Compile-time configuration via GNU autoconf</a></td></tr>
<tr><td colspan="3"> <hr></td></tr>
</table>
<table><tr><th valign="top">Jump to: &nbsp; </th><td><a href="#Concept-index_cp_letter-A" class="summary-letter"><b>A</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-B" class="summary-letter"><b>B</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-C" class="summary-letter"><b>C</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-D" class="summary-letter"><b>D</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-E" class="summary-letter"><b>E</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-F" class="summary-letter"><b>F</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-H" class="summary-letter"><b>H</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-I" class="summary-letter"><b>I</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-L" class="summary-letter"><b>L</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-M" class="summary-letter"><b>M</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-P" class="summary-letter"><b>P</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-R" class="summary-letter"><b>R</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-S" class="summary-letter"><b>S</b></a>
 &nbsp; 
<a href="#Concept-index_cp_letter-T" class="summary-letter"><b>T</b></a>
 &nbsp; 
</td></tr></table>



<hr size="6">
<a name="SEC_Foot"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1>Footnotes</h1>
<h3><a name="FOOT1" href="#DOCF1">(1)</a></h3>
<p>Actually the location of the system-wide include file
depends on the settings of <code>sysconfdir</code> and <code>prefix</code> during
<code>./configure</code> (see section <a href="#Compile_002dtime-configuration">Compile-time configuration via GNU autoconf</a>).
</p><h3><a name="FOOT2" href="#DOCF2">(2)</a></h3>
<p>Actually the location of the
system-wide include file depends on the settings of <code>sysconfdir</code>
and <code>prefix</code> during <code>./configure</code> (see section <a href="#Compile_002dtime-configuration">Compile-time configuration via GNU autoconf</a>).
</p><h3><a name="FOOT3" href="#DOCF3">(3)</a></h3>
<p>These command classes are unrelated to the
classes in object oriented programming.
</p><h3><a name="FOOT4" href="#DOCF4">(4)</a></h3>
<p>uncompressed size reporting (see section <a href="#Size">Size shown for compressed files</a> would make <code>ls</code>
painfully slow on an <code>ftpfs</code> filesystem, as all files would have to
be downloaded before their size could be reported.
</p><h3><a name="FOOT5" href="#DOCF5">(5)</a></h3>
<p>See see section <a href="#Mode">Mode</a>
</p><hr size="1">
<a name="SEC_Contents"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1>Table of Contents</h1>
<div class="contents">

<ul class="toc">
  <li><a name="toc-Introduction" href="#Introduction">Introduction</a></li>
  <li><a name="toc-Where-to-get-zlibc" href="#Location">1. Where to get zlibc</a></li>
  <li><a name="toc-Installing-zlibc-1" href="#Installing-zlibc">2. Installing zlibc</a></li>
  <li><a name="toc-Using-zlibc-1" href="#Using-zlibc">3. Using zlibc</a>
  <ul class="toc">
    <li><a name="toc-Zlibc-and-links" href="#Zlibc-and-links">3.1 Zlibc and links</a>
    <ul class="toc">
      <li><a name="toc-Symbolic-links" href="#Symbolic-links">3.1.1 Symbolic links</a></li>
      <li><a name="toc-Hard-links" href="#Hard-links">3.1.2 Hard links</a></li>
    </ul>
</li>
  </ul></li>
  <li><a name="toc-How-it-works-1" href="#How-it-works">4. How it works</a></li>
  <li><a name="toc-Customization-1" href="#Customization">5. Customization</a>
  <ul class="toc">
    <li><a name="toc-Environmental-variables-1" href="#Environmental-variables">5.1 Environmental variables</a>
    <ul class="toc">
      <li><a name="toc-Switch-variables-1" href="#Switch-variables">5.1.1 Switch variables</a></li>
      <li><a name="toc-String-variables-1" href="#String-variables">5.1.2 String variables</a></li>
    </ul></li>
    <li><a name="toc-Configuration-files-1" href="#Configuration-files">5.2 Configuration files</a>
    <ul class="toc">
      <li><a name="toc-Overall-structure-1" href="#Overall-structure">5.2.1 Overall structure</a></li>
      <li><a name="toc-Commands-section-1" href="#Commands-section">5.2.2 Commands section</a>
      <ul class="toc">
        <li><a name="toc-General-syntax-of-the-commands-section" href="#Commands-section-syntax">5.2.2.1 General syntax of the commands section</a></li>
        <li><a name="toc-Available-commands-line-flags" href="#Commands-line-flags">5.2.2.2 Available commands line flags</a></li>
      </ul></li>
      <li><a name="toc-Class-section-1" href="#Class-section">5.2.3 Class section</a>
      <ul class="toc">
        <li><a name="toc-File-selection-Criteria" href="#Criteria">5.2.3.1 File selection Criteria</a></li>
        <li><a name="toc-Mode-1" href="#Mode">5.2.3.2 Mode</a></li>
        <li><a name="toc-Reaction-to-a-readonly-request" href="#Readonly">Reaction to a readonly request</a></li>
        <li><a name="toc-Reaction-to-an-append-request" href="#Append">Reaction to an append request</a></li>
        <li><a name="toc-Reaction-to-a-file-creation-request" href="#Creation">Reaction to a file creation request</a></li>
        <li><a name="toc-Other-write-requests" href="#Write">Other write requests</a></li>
        <li><a name="toc-Size-shown-for-compressed-files" href="#Size">Size shown for compressed files</a></li>
      </ul>
</li>
    </ul></li>
    <li><a name="toc-Compiled_002din-defaults-1" href="#Compiled_002din-defaults">5.3 Compiled-in defaults</a></li>
    <li><a name="toc-Compile_002dtime-configuration-via-GNU-autoconf" href="#Compile_002dtime-configuration">5.4 Compile-time configuration via GNU autoconf</a></li>
  </ul></li>
  <li><a name="toc-Porting-zlibc-1" href="#Porting-zlibc">6. Porting zlibc</a></li>
  <li><a name="toc-Variable-index" href="#Variable-Index">Variable index</a></li>
  <li><a name="toc-Concept-index" href="#Concept-Index">Concept index</a></li>
</ul>
</div>
<hr size="1">
<a name="SEC_About"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Introduction" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="#Variable-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1>About This Document</h1>
<p>
  This document was generated by <em>Build Daemon</em> on <em>January 9, 2016</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
</p>
<p>
  The buttons in the navigation panels have the following meaning:
</p>
<table border="1">
  <tr>
    <th> Button </th>
    <th> Name </th>
    <th> Go to </th>
    <th> From 1.2.3 go to</th>
  </tr>
  <tr>
    <td align="center"> [ &lt; ] </td>
    <td align="center">Back</td>
    <td>Previous section in reading order</td>
    <td>1.2.2</td>
  </tr>
  <tr>
    <td align="center"> [ &gt; ] </td>
    <td align="center">Forward</td>
    <td>Next section in reading order</td>
    <td>1.2.4</td>
  </tr>
  <tr>
    <td align="center"> [ &lt;&lt; ] </td>
    <td align="center">FastBack</td>
    <td>Beginning of this chapter or previous chapter</td>
    <td>1</td>
  </tr>
  <tr>
    <td align="center"> [ Up ] </td>
    <td align="center">Up</td>
    <td>Up section</td>
    <td>1.2</td>
  </tr>
  <tr>
    <td align="center"> [ &gt;&gt; ] </td>
    <td align="center">FastForward</td>
    <td>Next chapter</td>
    <td>2</td>
  </tr>
  <tr>
    <td align="center"> [Top] </td>
    <td align="center">Top</td>
    <td>Cover (top) of document</td>
    <td> &nbsp; </td>
  </tr>
  <tr>
    <td align="center"> [Contents] </td>
    <td align="center">Contents</td>
    <td>Table of contents</td>
    <td> &nbsp; </td>
  </tr>
  <tr>
    <td align="center"> [Index] </td>
    <td align="center">Index</td>
    <td>Index</td>
    <td> &nbsp; </td>
  </tr>
  <tr>
    <td align="center"> [ ? ] </td>
    <td align="center">About</td>
    <td>About (help)</td>
    <td> &nbsp; </td>
  </tr>
</table>

<p>
  where the <strong> Example </strong> assumes that the current position is at <strong> Subsubsection One-Two-Three </strong> of a document of the following structure:
</p>

<ul>
  <li> 1. Section One
    <ul>
      <li>1.1 Subsection One-One
        <ul>
          <li>...</li>
        </ul>
      </li>
      <li>1.2 Subsection One-Two
        <ul>
          <li>1.2.1 Subsubsection One-Two-One</li>
          <li>1.2.2 Subsubsection One-Two-Two</li>
          <li>1.2.3 Subsubsection One-Two-Three &nbsp; &nbsp;
            <strong>&lt;== Current Position </strong></li>
          <li>1.2.4 Subsubsection One-Two-Four</li>
        </ul>
      </li>
      <li>1.3 Subsection One-Three
        <ul>
          <li>...</li>
        </ul>
      </li>
      <li>1.4 Subsection One-Four</li>
    </ul>
  </li>
</ul>

<hr size="1">
<p>
 <font size="-1">
  This document was generated by <em>Build Daemon</em> on <em>January 9, 2016</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
 </font>
 <br>

</p>
</body>
</html>