home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / d / libc / libc-4.7 / libc-4
Tape Archive  |  1995-04-29  |  6.7 MB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Tape Archive (archive/tar).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Tape Archive (archive/tar) magic Supported
100% file POSIX tar archive (GNU) default
99% file POSIX tar archive (GNU), directory ./libc/, mode 40755 , uid 1676 , gid 334 , size 0 , seconds 5750477323, user hjl, group isl default
98% file data default
41% TrID Sybase iAnywhere database files default (weak)
36% TrID TAR - Tape ARchive (GNU) default
21% TrID TAR - Tape ARchive (directory) default
100% siegfried x-fmt/265 Tape Archive Format default
100% lsar Tar default
100% gt2 TAR Archiv gefunden (Auflistung ist deaktiviert) default
100% disktype GNU tar archive default
100% detectItEasy Archive: tar default
100% binwalkID POSIX tar archive (GNU) default
100% xdgMime application/x-tar default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 2e 2f 6c 69 62 63 2f 00 | 00 00 00 00 00 00 00 00 |./libc/.|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 34 30 37 | 35 35 20 00 20 20 31 36 |.... 407|55 . 16|
|00000070| 37 36 20 00 20 20 20 33 | 33 34 20 00 20 20 20 20 |76 . 3|34 . |
|00000080| 20 20 20 20 20 20 30 20 | 20 35 37 35 30 34 37 37 | 0 | 5750477|
|00000090| 33 32 33 20 20 20 37 36 | 37 36 00 20 35 00 00 00 |323 76|76. 5...|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 75 73 74 61 72 20 20 | 00 68 6a 6c 00 00 00 00 |.ustar |.hjl....|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 69 73 6c 00 00 00 00 |........|.isl....|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 2e 2f 6c 69 62 63 2f 62 | 73 64 2f 00 00 00 00 00 |./libc/b|sd/.....|
|00000210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 20 34 30 37 | 35 35 20 00 20 20 31 36 |.... 407|55 . 16|
|00000270| 37 36 20 00 20 20 20 33 | 33 34 20 00 20 20 20 20 |76 . 3|34 . |
|00000280| 20 20 20 20 20 20 30 20 | 20 35 37 35 30 34 37 36 | 0 | 5750476|
|00000290| 36 35 32 20 20 31 30 34 | 35 32 00 20 35 00 00 00 |652 104|52. 5...|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 75 73 74 61 72 20 20 | 00 68 6a 6c 00 00 00 00 |.ustar |.hjl....|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 69 73 6c 00 00 00 00 |........|.isl....|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 2e 2f 6c 69 62 63 2f 62 | 73 64 2f 4d 61 6b 65 66 |./libc/b|sd/Makef|
|00000410| 69 6c 65 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |ile.....|........|
|00000420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000460| 00 00 00 00 31 30 30 36 | 34 34 20 00 20 20 31 36 |....1006|44 . 16|
|00000470| 37 36 20 00 20 20 20 33 | 33 34 20 00 20 20 20 20 |76 . 3|34 . |
|00000480| 20 20 20 20 35 33 33 20 | 20 35 37 32 31 33 30 33 | 533 | 5721303|
|00000490| 32 33 35 20 20 31 32 31 | 35 30 00 20 30 00 00 00 |235 121|50. 0...|
|000004a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000500| 00 75 73 74 61 72 20 20 | 00 68 6a 6c 00 00 00 00 |.ustar |.hjl....|
|00000510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000520| 00 00 00 00 00 00 00 00 | 00 69 73 6c 00 00 00 00 |........|.isl....|
|00000530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000600| 23 0a 23 20 54 68 69 73 | 20 69 73 20 4d 61 6b 65 |#.# This| is Make|
|00000610| 66 69 6c 65 20 6f 66 20 | 62 73 64 20 6c 69 62 20 |file of |bsd lib |
|00000620| 66 6f 72 20 4c 69 6e 75 | 78 2e 0a 23 0a 0a 54 4f |for Linu|x..#..TO|
|00000630| 50 44 49 52 3d 2e 2e 0a | 0a 69 6e 63 6c 75 64 65 |PDIR=...|.include|
|00000640| 20 24 28 54 4f 50 44 49 | 52 29 2f 4d 61 6b 65 63 | $(TOPDI|R)/Makec|
|00000650| 6f 6e 66 69 67 0a 69 6e | 63 6c 75 64 65 20 24 28 |onfig.in|clude $(|
|00000660| 54 4f 50 44 49 52 29 2f | 4d 61 6b 65 72 75 6c 65 |TOPDIR)/|Makerule|
|00000670| 73 0a 0a 49 4e 43 5f 43 | 46 4c 41 47 53 3d 20 2d |s..INC_C|FLAGS= -|
|00000680| 49 2e 20 2d 49 24 28 54 | 4f 50 44 49 52 29 0a 0a |I. -I$(T|OPDIR)..|
|00000690| 44 49 52 53 3a 3d 0a 0a | 53 52 43 53 20 3d 20 73 |DIRS:=..|SRCS = s|
|000006a0| 65 74 65 6e 76 2e 63 20 | 66 74 69 6d 65 2e 63 20 |etenv.c |ftime.c |
|000006b0| 70 73 69 67 6e 61 6c 2e | 63 20 6d 6b 73 74 65 6d |psignal.|c mkstem|
|000006c0| 70 2e 63 20 73 69 67 69 | 6e 74 2e 63 20 72 65 61 |p.c sigi|nt.c rea|
|000006d0| 6c 70 61 74 68 2e 63 0a | 41 53 4d 53 3d 20 24 28 |lpath.c.|ASMS= $(|
|000006e0| 53 52 43 53 3a 2e 63 3d | 2e 73 29 0a 4f 42 4a 53 |SRCS:.c=|.s).OBJS|
|000006f0| 3d 20 24 28 53 52 43 53 | 3a 2e 63 3d 2e 6f 29 0a |= $(SRCS|:.c=.o).|
|00000700| 41 4c 49 41 53 45 53 3d | 0a 0a 69 6e 63 6c 75 64 |ALIASES=|..includ|
|00000710| 65 20 24 28 54 4f 50 44 | 49 52 29 2f 4d 61 6b 65 |e $(TOPD|IR)/Make|
|00000720| 74 61 72 67 65 74 73 0a | 0a 66 6f 6f 3a 0a 09 65 |targets.|.foo:..e|
|00000730| 63 68 6f 20 24 28 45 4c | 46 5f 53 54 41 54 49 43 |cho $(EL|F_STATIC|
|00000740| 5f 44 49 52 29 0a 09 65 | 63 68 6f 20 24 28 53 54 |_DIR)..e|cho $(ST|
|00000750| 41 54 49 43 5f 44 49 52 | 29 0a 0a 00 00 00 00 00 |ATIC_DIR|).......|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000800| 2e 2f 6c 69 62 63 2f 62 | 73 64 2f 66 74 69 6d 65 |./libc/b|sd/ftime|
|00000810| 2e 63 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.c......|........|
|00000820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000860| 00 00 00 00 31 30 30 36 | 34 34 20 00 20 20 31 36 |....1006|44 . 16|
|00000870| 37 36 20 00 20 20 20 33 | 33 34 20 00 20 20 20 20 |76 . 3|34 . |
|00000880| 20 20 20 31 31 30 37 20 | 20 35 37 32 31 33 30 33 | 1107 | 5721303|
|00000890| 32 33 35 20 20 31 31 37 | 37 36 00 20 30 00 00 00 |235 117|76. 0...|
|000008a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000900| 00 75 73 74 61 72 20 20 | 00 68 6a 6c 00 00 00 00 |.ustar |.hjl....|
|00000910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000920| 00 00 00 00 00 00 00 00 | 00 69 73 6c 00 00 00 00 |........|.isl....|
|00000930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a00| 2f 2a 20 20 42 65 7a 65 | 72 6b 65 6c 65 79 20 63 |/* Beze|rkeley c|
|00000a10| 6f 6d 70 61 74 69 62 6c | 65 20 66 74 69 6d 65 28 |ompatibl|e ftime(|
|00000a20| 33 43 29 2e 0a 20 20 20 | 20 54 68 69 73 20 63 61 |3C).. | This ca|
|00000a30| 6c 6c 20 69 73 20 64 65 | 70 72 65 63 61 74 65 64 |ll is de|precated|
|00000a40| 2c 20 75 73 65 20 67 65 | 74 74 69 6d 65 6f 66 64 |, use ge|ttimeofd|
|00000a50| 61 79 28 32 29 20 69 6e | 20 6e 65 77 20 63 6f 64 |ay(2) in| new cod|
|00000a60| 65 2e 0a 20 20 20 20 57 | 65 20 75 73 65 20 74 68 |e.. W|e use th|
|00000a70| 65 20 42 65 7a 65 72 6b | 65 6c 65 79 20 67 65 74 |e Bezerk|eley get|
|00000a80| 74 69 6d 65 6f 66 64 61 | 79 28 32 29 20 63 61 6c |timeofda|y(2) cal|
|00000a90| 6c 20 69 6e 20 74 68 65 | 20 69 6d 70 6c 65 6d 65 |l in the| impleme|
|00000aa0| 6e 74 61 74 69 6f 6e 2c | 20 61 73 0a 20 20 20 20 |ntation,| as. |
|00000ab0| 74 68 65 72 65 20 69 73 | 20 6e 6f 20 77 61 79 20 |there is| no way |
|00000ac0| 74 6f 20 67 65 74 20 6d | 69 6c 6c 69 73 65 63 6f |to get m|illiseco|
|00000ad0| 6e 64 20 72 65 73 6f 6c | 75 74 69 6f 6e 20 69 6e |nd resol|ution in|
|00000ae0| 20 50 4f 53 49 58 20 28 | 6c 6f 73 65 2c 20 6c 6f | POSIX (|lose, lo|
|00000af0| 73 65 29 2e 20 2a 2f 0a | 0a 23 69 6e 63 6c 75 64 |se). */.|.#includ|
|00000b00| 65 20 3c 73 79 73 2f 74 | 79 70 65 73 2e 68 3e 0a |e <sys/t|ypes.h>.|
|00000b10| 23 69 6e 63 6c 75 64 65 | 20 3c 73 79 73 2f 74 69 |#include| <sys/ti|
|00000b20| 6d 65 62 2e 68 3e 0a 23 | 69 6e 63 6c 75 64 65 20 |meb.h>.#|include |
|00000b30| 3c 73 79 73 2f 74 69 6d | 65 2e 68 3e 0a 0a 69 6e |<sys/tim|e.h>..in|
|00000b40| 74 0a 66 74 69 6d 65 28 | 73 74 72 75 63 74 20 74 |t.ftime(|struct t|
|00000b50| 69 6d 65 62 20 2a 74 62 | 29 0a 7b 0a 20 20 73 74 |imeb *tb|).{. st|
|00000b60| 72 75 63 74 20 74 69 6d | 65 76 61 6c 20 74 76 3b |ruct tim|eval tv;|
|00000b70| 0a 20 20 73 74 72 75 63 | 74 20 74 69 6d 65 7a 6f |. struc|t timezo|
|00000b80| 6e 65 20 74 7a 3b 0a 0a | 20 20 69 66 20 28 5f 5f |ne tz;..| if (__|
|00000b90| 67 65 74 74 69 6d 65 6f | 66 64 61 79 28 26 74 76 |gettimeo|fday(&tv|
|00000ba0| 2c 20 26 74 7a 29 20 3c | 20 30 20 29 0a 20 20 20 |, &tz) <| 0 ). |
|00000bb0| 20 72 65 74 75 72 6e 20 | 2d 31 3b 0a 20 20 74 62 | return |-1;. tb|
|00000bc0| 2d 3e 74 69 6d 65 20 3d | 20 74 76 2e 74 76 5f 73 |->time =| tv.tv_s|
|00000bd0| 65 63 3b 0a 20 20 74 62 | 2d 3e 6d 69 6c 6c 69 74 |ec;. tb|->millit|
|00000be0| 6d 20 3d 20 74 76 2e 74 | 76 5f 75 73 65 63 2f 31 |m = tv.t|v_usec/1|
|00000bf0| 30 30 30 3b 20 0a 20 20 | 74 62 2d 3e 74 69 6d 65 |000; . |tb->time|
|00000c00| 7a 6f 6e 65 20 3d 20 74 | 7a 2e 74 7a 5f 6d 69 6e |zone = t|z.tz_min|
|00000c10| 75 74 65 73 77 65 73 74 | 3b 0a 20 20 74 62 2d 3e |uteswest|;. tb->|
|00000c20| 64 73 74 66 6c 61 67 20 | 3d 20 74 7a 2e 74 7a 5f |dstflag |= tz.tz_|
|00000c30| 64 73 74 74 69 6d 65 3b | 0a 20 20 72 65 74 75 72 |dsttime;|. retur|
|00000c40| 6e 20 30 3b 0a 7d 0a 00 | 00 00 00 00 00 00 00 00 |n 0;.}..|........|
|00000c50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e00| 2e 2f 6c 69 62 63 2f 62 | 73 64 2f 6d 6b 73 74 65 |./libc/b|sd/mkste|
|00000e10| 6d 70 2e 63 00 00 00 00 | 00 00 00 00 00 00 00 00 |mp.c....|........|
|00000e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000e60| 00 00 00 00 31 30 30 36 | 34 34 20 00 20 20 31 36 |....1006|44 . 16|
|00000e70| 37 36 20 00 20 20 20 33 | 33 34 20 00 20 20 20 20 |76 . 3|34 . |
|00000e80| 20 20 20 33 36 31 30 20 | 20 35 37 32 31 33 30 33 | 3610 | 5721303|
|00000e90| 32 33 35 20 20 31 32 33 | 35 33 00 20 30 00 00 00 |235 123|53. 0...|
|00000ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f00| 00 75 73 74 61 72 20 20 | 00 68 6a 6c 00 00 00 00 |.ustar |.hjl....|
|00000f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f20| 00 00 00 00 00 00 00 00 | 00 69 73 6c 00 00 00 00 |........|.isl....|
|00000f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001000| 2f 2a 20 43 6f 70 79 72 | 69 67 68 74 20 28 43 29 |/* Copyr|ight (C)|
|00001010| 20 31 39 39 31 2c 20 31 | 39 39 32 2c 20 31 39 39 | 1991, 1|992, 199|
|00001020| 33 20 46 72 65 65 20 53 | 6f 66 74 77 61 72 65 20 |3 Free S|oftware |
|00001030| 46 6f 75 6e 64 61 74 69 | 6f 6e 2c 20 49 6e 63 2e |Foundati|on, Inc.|
|00001040| 0a 54 68 69 73 20 66 69 | 6c 65 20 69 73 20 70 61 |.This fi|le is pa|
|00001050| 72 74 20 6f 66 20 74 68 | 65 20 47 4e 55 20 43 20 |rt of th|e GNU C |
|00001060| 4c 69 62 72 61 72 79 2e | 0a 0a 54 68 65 20 47 4e |Library.|..The GN|
|00001070| 55 20 43 20 4c 69 62 72 | 61 72 79 20 69 73 20 66 |U C Libr|ary is f|
|00001080| 72 65 65 20 73 6f 66 74 | 77 61 72 65 3b 20 79 6f |ree soft|ware; yo|
|00001090| 75 20 63 61 6e 20 72 65 | 64 69 73 74 72 69 62 75 |u can re|distribu|
|000010a0| 74 65 20 69 74 20 61 6e | 64 2f 6f 72 0a 6d 6f 64 |te it an|d/or.mod|
|000010b0| 69 66 79 20 69 74 20 75 | 6e 64 65 72 20 74 68 65 |ify it u|nder the|
|000010c0| 20 74 65 72 6d 73 20 6f | 66 20 74 68 65 20 47 4e | terms o|f the GN|
|000010d0| 55 20 4c 69 62 72 61 72 | 79 20 47 65 6e 65 72 61 |U Librar|y Genera|
|000010e0| 6c 20 50 75 62 6c 69 63 | 20 4c 69 63 65 6e 73 65 |l Public| License|
|000010f0| 20 61 73 0a 70 75 62 6c | 69 73 68 65 64 20 62 79 | as.publ|ished by|
|00001100| 20 74 68 65 20 46 72 65 | 65 20 53 6f 66 74 77 61 | the Fre|e Softwa|
|00001110| 72 65 20 46 6f 75 6e 64 | 61 74 69 6f 6e 3b 20 65 |re Found|ation; e|
|00001120| 69 74 68 65 72 20 76 65 | 72 73 69 6f 6e 20 32 20 |ither ve|rsion 2 |
|00001130| 6f 66 20 74 68 65 0a 4c | 69 63 65 6e 73 65 2c 20 |of the.L|icense, |
|00001140| 6f 72 20 28 61 74 20 79 | 6f 75 72 20 6f 70 74 69 |or (at y|our opti|
|00001150| 6f 6e 29 20 61 6e 79 20 | 6c 61 74 65 72 20 76 65 |on) any |later ve|
|00001160| 72 73 69 6f 6e 2e 0a 0a | 54 68 65 20 47 4e 55 20 |rsion...|The GNU |
|00001170| 43 20 4c 69 62 72 61 72 | 79 20 69 73 20 64 69 73 |C Librar|y is dis|
|00001180| 74 72 69 62 75 74 65 64 | 20 69 6e 20 74 68 65 20 |tributed| in the |
|00001190| 68 6f 70 65 20 74 68 61 | 74 20 69 74 20 77 69 6c |hope tha|t it wil|
|000011a0| 6c 20 62 65 20 75 73 65 | 66 75 6c 2c 0a 62 75 74 |l be use|ful,.but|
|000011b0| 20 57 49 54 48 4f 55 54 | 20 41 4e 59 20 57 41 52 | WITHOUT| ANY WAR|
|000011c0| 52 41 4e 54 59 3b 20 77 | 69 74 68 6f 75 74 20 65 |RANTY; w|ithout e|
|000011d0| 76 65 6e 20 74 68 65 20 | 69 6d 70 6c 69 65 64 20 |ven the |implied |
|000011e0| 77 61 72 72 61 6e 74 79 | 20 6f 66 0a 4d 45 52 43 |warranty| of.MERC|
|000011f0| 48 41 4e 54 41 42 49 4c | 49 54 59 20 6f 72 20 46 |HANTABIL|ITY or F|
|00001200| 49 54 4e 45 53 53 20 46 | 4f 52 20 41 20 50 41 52 |ITNESS F|OR A PAR|
|00001210| 54 49 43 55 4c 41 52 20 | 50 55 52 50 4f 53 45 2e |TICULAR |PURPOSE.|
|00001220| 20 20 53 65 65 20 74 68 | 65 20 47 4e 55 0a 4c 69 | See th|e GNU.Li|
|00001230| 62 72 61 72 79 20 47 65 | 6e 65 72 61 6c 20 50 75 |brary Ge|neral Pu|
|00001240| 62 6c 69 63 20 4c 69 63 | 65 6e 73 65 20 66 6f 72 |blic Lic|ense for|
|00001250| 20 6d 6f 72 65 20 64 65 | 74 61 69 6c 73 2e 0a 0a | more de|tails...|
|00001260| 59 6f 75 20 73 68 6f 75 | 6c 64 20 68 61 76 65 20 |You shou|ld have |
|00001270| 72 65 63 65 69 76 65 64 | 20 61 20 63 6f 70 79 20 |received| a copy |
|00001280| 6f 66 20 74 68 65 20 47 | 4e 55 20 4c 69 62 72 61 |of the G|NU Libra|
|00001290| 72 79 20 47 65 6e 65 72 | 61 6c 20 50 75 62 6c 69 |ry Gener|al Publi|
|000012a0| 63 0a 4c 69 63 65 6e 73 | 65 20 61 6c 6f 6e 67 20 |c.Licens|e along |
|000012b0| 77 69 74 68 20 74 68 65 | 20 47 4e 55 20 43 20 4c |with the| GNU C L|
|000012c0| 69 62 72 61 72 79 3b 20 | 73 65 65 20 74 68 65 20 |ibrary; |see the |
|000012d0| 66 69 6c 65 20 43 4f 50 | 59 49 4e 47 2e 4c 49 42 |file COP|YING.LIB|
|000012e0| 2e 20 20 49 66 0a 6e 6f | 74 2c 20 77 72 69 74 65 |. If.no|t, write|
|000012f0| 20 74 6f 20 74 68 65 20 | 46 72 65 65 20 53 6f 66 | to the |Free Sof|
|00001300| 74 77 61 72 65 20 46 6f | 75 6e 64 61 74 69 6f 6e |tware Fo|undation|
|00001310| 2c 20 49 6e 63 2e 2c 20 | 36 37 35 20 4d 61 73 73 |, Inc., |675 Mass|
|00001320| 20 41 76 65 2c 0a 43 61 | 6d 62 72 69 64 67 65 2c | Ave,.Ca|mbridge,|
|00001330| 20 4d 41 20 30 32 31 33 | 39 2c 20 55 53 41 2e 20 | MA 0213|9, USA. |
|00001340| 20 2a 2f 0a 0a 23 69 6e | 63 6c 75 64 65 20 3c 61 | */..#in|clude <a|
|00001350| 6e 73 69 64 65 63 6c 2e | 68 3e 0a 23 69 6e 63 6c |nsidecl.|h>.#incl|
|00001360| 75 64 65 20 3c 73 74 72 | 69 6e 67 2e 68 3e 0a 23 |ude <str|ing.h>.#|
|00001370| 69 6e 63 6c 75 64 65 20 | 3c 65 72 72 6e 6f 2e 68 |include |<errno.h|
|00001380| 3e 0a 23 69 6e 63 6c 75 | 64 65 20 3c 75 6e 69 73 |>.#inclu|de <unis|
|00001390| 74 64 2e 68 3e 0a 23 69 | 6e 63 6c 75 64 65 20 3c |td.h>.#i|nclude <|
|000013a0| 73 74 64 69 6f 2e 68 3e | 0a 23 69 6e 63 6c 75 64 |stdio.h>|.#includ|
|000013b0| 65 20 3c 66 63 6e 74 6c | 2e 68 3e 0a 23 69 6e 63 |e <fcntl|.h>.#inc|
|000013c0| 6c 75 64 65 20 3c 73 79 | 73 2f 74 79 70 65 73 2e |lude <sy|s/types.|
|000013d0| 68 3e 0a 0a 2f 2a 20 52 | 65 74 75 72 6e 20 61 20 |h>../* R|eturn a |
|000013e0| 66 69 6c 65 20 64 65 73 | 63 72 69 70 74 6f 72 20 |file des|criptor |
|000013f0| 77 69 74 68 20 61 20 75 | 6e 69 71 75 65 20 74 65 |with a u|nique te|
|00001400| 6d 70 6f 72 61 72 79 20 | 66 69 6c 65 20 6e 61 6d |mporary |file nam|
|00001410| 65 20 66 72 6f 6d 0a 20 | 20 20 54 45 4d 50 4c 41 |e from. | TEMPLA|
|00001420| 54 45 2e 20 54 68 65 20 | 6c 61 73 74 20 73 69 78 |TE. The |last six|
|00001430| 20 63 68 61 72 61 63 74 | 65 72 73 20 6f 66 20 54 | charact|ers of T|
|00001440| 45 4d 50 4c 41 54 45 20 | 6d 75 73 74 20 62 65 20 |EMPLATE |must be |
|00001450| 22 58 58 58 58 58 58 22 | 3b 0a 20 20 20 74 68 65 |"XXXXXX"|;. the|
|00001460| 79 20 61 72 65 20 72 65 | 70 6c 61 63 65 64 20 77 |y are re|placed w|
|00001470| 69 74 68 20 61 20 73 74 | 72 69 6e 67 20 74 68 61 |ith a st|ring tha|
|00001480| 74 20 6d 61 6b 65 73 20 | 74 68 65 20 66 69 6c 65 |t makes |the file|
|00001490| 6e 61 6d 65 20 75 6e 69 | 71 75 65 2e 0a 20 20 20 |name uni|que.. |
|000014a0| 52 65 74 75 72 6e 20 2d | 31 20 69 66 20 6e 6f 20 |Return -|1 if no |
|000014b0| 73 75 69 74 61 62 6c 65 | 20 66 69 6c 65 20 63 6f |suitable| file co|
|000014c0| 75 6c 64 20 62 65 20 63 | 72 65 61 74 65 64 2e 20 |uld be c|reated. |
|000014d0| 2a 2f 0a 69 6e 74 0a 44 | 45 46 55 4e 28 6d 6b 73 |*/.int.D|EFUN(mks|
|000014e0| 74 65 6d 70 2c 20 28 74 | 65 6d 70 6c 61 74 65 29 |temp, (t|emplate)|
|000014f0| 2c 20 63 68 61 72 20 2a | 74 65 6d 70 6c 61 74 65 |, char *|template|
|00001500| 29 0a 7b 0a 20 20 73 74 | 61 74 69 63 20 43 4f 4e |).{. st|atic CON|
|00001510| 53 54 20 63 68 61 72 20 | 6c 65 74 74 65 72 73 5b |ST char |letters[|
|00001520| 5d 0a 20 20 20 20 3d 20 | 22 61 62 63 64 65 66 67 |]. = |"abcdefg|
|00001530| 68 69 6a 6b 6c 6d 6e 6f | 70 71 72 73 74 75 76 77 |hijklmno|pqrstuvw|
|00001540| 78 79 7a 41 42 43 44 45 | 46 47 48 49 4a 4b 4c 4d |xyzABCDE|FGHIJKLM|
|00001550| 4e 4f 50 51 52 53 54 55 | 56 57 58 59 5a 30 31 32 |NOPQRSTU|VWXYZ012|
|00001560| 33 34 35 36 37 38 39 22 | 3b 0a 20 20 43 4f 4e 53 |3456789"|;. CONS|
|00001570| 54 20 63 68 61 72 20 2a | 70 74 72 20 3d 20 6c 65 |T char *|ptr = le|
|00001580| 74 74 65 72 73 3b 0a 20 | 20 70 69 64 5f 74 20 70 |tters;. | pid_t p|
|00001590| 69 64 20 3d 20 5f 5f 67 | 65 74 70 69 64 28 29 3b |id = __g|etpid();|
|000015a0| 0a 20 20 69 6e 74 20 66 | 64 3b 0a 20 20 73 69 7a |. int f|d;. siz|
|000015b0| 65 5f 74 20 6c 65 6e 3b | 0a 0a 20 20 6c 65 6e 20 |e_t len;|.. len |
|000015c0| 3d 20 73 74 72 6c 65 6e | 28 74 65 6d 70 6c 61 74 |= strlen|(templat|
|000015d0| 65 29 3b 0a 20 20 69 66 | 20 28 6c 65 6e 20 3c 20 |e);. if| (len < |
|000015e0| 36 20 7c 7c 20 73 74 72 | 63 6d 70 28 26 74 65 6d |6 || str|cmp(&tem|
|000015f0| 70 6c 61 74 65 5b 6c 65 | 6e 20 2d 20 36 5d 2c 20 |plate[le|n - 6], |
|00001600| 22 58 58 58 58 58 58 22 | 29 29 0a 20 20 20 20 7b |"XXXXXX"|)). {|
|00001610| 0a 20 20 20 20 20 20 65 | 72 72 6e 6f 20 3d 20 45 |. e|rrno = E|
|00001620| 49 4e 56 41 4c 3b 0a 20 | 20 20 20 20 20 72 65 74 |INVAL;. | ret|
|00001630| 75 72 6e 20 2d 31 3b 0a | 20 20 20 20 7d 0a 0a 20 |urn -1;.| }.. |
|00001640| 20 69 66 20 28 73 70 72 | 69 6e 74 66 20 28 26 74 | if (spr|intf (&t|
|00001650| 65 6d 70 6c 61 74 65 5b | 6c 65 6e 20 2d 20 35 5d |emplate[|len - 5]|
|00001660| 2c 20 22 25 2e 35 75 22 | 2c 0a 20 20 09 20 28 75 |, "%.5u"|,. . (u|
|00001670| 6e 73 69 67 6e 65 64 20 | 69 6e 74 29 20 70 69 64 |nsigned |int) pid|
|00001680| 20 25 20 31 30 30 30 30 | 30 29 20 21 3d 20 35 29 | % 10000|0) != 5)|
|00001690| 0a 20 20 20 20 72 65 74 | 75 72 6e 20 2d 31 3b 0a |. ret|urn -1;.|
|000016a0| 0a 20 20 77 68 69 6c 65 | 20 28 2a 70 74 72 20 21 |. while| (*ptr !|
|000016b0| 3d 20 27 5c 30 27 29 20 | 7b 0a 20 20 20 20 74 65 |= '\0') |{. te|
|000016c0| 6d 70 6c 61 74 65 5b 6c | 65 6e 20 2d 20 36 5d 20 |mplate[l|en - 6] |
|000016d0| 3d 20 2a 70 74 72 2b 2b | 3b 0a 20 20 20 20 2f 2a |= *ptr++|;. /*|
|000016e0| 20 4d 61 6b 65 20 73 75 | 72 65 20 60 74 65 6d 70 | Make su|re `temp|
|000016f0| 6c 61 74 65 27 20 64 6f | 65 73 6e 27 74 20 65 78 |late' do|esn't ex|
|00001700| 69 73 74 2e 20 2a 2f 0a | 20 20 20 20 66 64 20 3d |ist. */.| fd =|
|00001710| 20 5f 5f 6f 70 65 6e 20 | 28 74 65 6d 70 6c 61 74 | __open |(templat|
|00001720| 65 2c 20 4f 5f 52 44 57 | 52 20 7c 20 4f 5f 43 52 |e, O_RDW|R | O_CR|
|00001730| 45 41 54 20 7c 20 4f 5f | 45 58 43 4c 2c 20 30 36 |EAT | O_|EXCL, 06|
|00001740| 36 36 29 3b 0a 20 20 20 | 20 69 66 20 28 66 64 20 |66);. | if (fd |
|00001750| 3e 3d 20 30 20 7c 7c 20 | 65 72 72 6e 6f 20 21 3d |>= 0 || |errno !=|
|00001760| 20 45 45 58 49 53 54 29 | 20 72 65 74 75 72 6e 20 | EEXIST)| return |
|00001770| 66 64 3b 0a 20 20 7d 0a | 0a 20 20 72 65 74 75 72 |fd;. }.|. retur|
|00001780| 6e 20 2d 31 3b 0a 7d 0a | 00 00 00 00 00 00 00 00 |n -1;.}.|........|
|00001790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001800| 2e 2f 6c 69 62 63 2f 62 | 73 64 2f 70 73 69 67 6e |./libc/b|sd/psign|
|00001810| 61 6c 2e 63 00 00 00 00 | 00 00 00 00 00 00 00 00 |al.c....|........|
|00001820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001860| 00 00 00 00 31 30 30 36 | 34 34 20 00 20 20 31 36 |....1006|44 . 16|
|00001870| 37 36 20 00 20 20 20 33 | 33 34 20 00 20 20 20 20 |76 . 3|34 . |
|00001880| 20 20 20 33 37 32 37 20 | 20 35 37 32 31 33 30 33 | 3727 | 5721303|
|00001890| 32 33 35 20 20 31 32 33 | 34 31 00 20 30 00 00 00 |235 123|41. 0...|
|000018a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001900| 00 75 73 74 61 72 20 20 | 00 68 6a 6c 00 00 00 00 |.ustar |.hjl....|
|00001910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001920| 00 00 00 00 00 00 00 00 | 00 69 73 6c 00 00 00 00 |........|.isl....|
|00001930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a00| 2f 2a 20 43 6f 70 79 72 | 69 67 68 74 20 28 43 29 |/* Copyr|ight (C)|
|00001a10| 20 31 39 39 31 2c 20 31 | 39 39 32 20 46 72 65 65 | 1991, 1|992 Free|
|00001a20| 20 53 6f 66 74 77 61 72 | 65 20 46 6f 75 6e 64 61 | Softwar|e Founda|
|00001a30| 74 69 6f 6e 2c 20 49 6e | 63 2e 0a 54 68 69 73 20 |tion, In|c..This |
|00001a40| 66 69 6c 65 20 69 73 20 | 70 61 72 74 20 6f 66 20 |file is |part of |
|00001a50| 74 68 65 20 47 4e 55 20 | 43 20 4c 69 62 72 61 72 |the GNU |C Librar|
|00001a60| 79 2e 0a 0a 54 68 65 20 | 47 4e 55 20 43 20 4c 69 |y...The |GNU C Li|
|00001a70| 62 72 61 72 79 20 69 73 | 20 66 72 65 65 20 73 6f |brary is| free so|
|00001a80| 66 74 77 61 72 65 3b 20 | 79 6f 75 20 63 61 6e 20 |ftware; |you can |
|00001a90| 72 65 64 69 73 74 72 69 | 62 75 74 65 20 69 74 20 |redistri|bute it |
|00001aa0| 61 6e 64 2f 6f 72 0a 6d | 6f 64 69 66 79 20 69 74 |and/or.m|odify it|
|00001ab0| 20 75 6e 64 65 72 20 74 | 68 65 20 74 65 72 6d 73 | under t|he terms|
|00001ac0| 20 6f 66 20 74 68 65 20 | 47 4e 55 20 4c 69 62 72 | of the |GNU Libr|
|00001ad0| 61 72 79 20 47 65 6e 65 | 72 61 6c 20 50 75 62 6c |ary Gene|ral Publ|
|00001ae0| 69 63 20 4c 69 63 65 6e | 73 65 20 61 73 0a 70 75 |ic Licen|se as.pu|
|00001af0| 62 6c 69 73 68 65 64 20 | 62 79 20 74 68 65 20 46 |blished |by the F|
|00001b00| 72 65 65 20 53 6f 66 74 | 77 61 72 65 20 46 6f 75 |ree Soft|ware Fou|
|00001b10| 6e 64 61 74 69 6f 6e 3b | 20 65 69 74 68 65 72 20 |ndation;| either |
|00001b20| 76 65 72 73 69 6f 6e 20 | 32 20 6f 66 20 74 68 65 |version |2 of the|
|00001b30| 0a 4c 69 63 65 6e 73 65 | 2c 20 6f 72 20 28 61 74 |.License|, or (at|
|00001b40| 20 79 6f 75 72 20 6f 70 | 74 69 6f 6e 29 20 61 6e | your op|tion) an|
|00001b50| 79 20 6c 61 74 65 72 20 | 76 65 72 73 69 6f 6e 2e |y later |version.|
|00001b60| 0a 0a 54 68 65 20 47 4e | 55 20 43 20 4c 69 62 72 |..The GN|U C Libr|
|00001b70| 61 72 79 20 69 73 20 64 | 69 73 74 72 69 62 75 74 |ary is d|istribut|
|00001b80| 65 64 20 69 6e 20 74 68 | 65 20 68 6f 70 65 20 74 |ed in th|e hope t|
|00001b90| 68 61 74 20 69 74 20 77 | 69 6c 6c 20 62 65 20 75 |hat it w|ill be u|
|00001ba0| 73 65 66 75 6c 2c 0a 62 | 75 74 20 57 49 54 48 4f |seful,.b|ut WITHO|
|00001bb0| 55 54 20 41 4e 59 20 57 | 41 52 52 41 4e 54 59 3b |UT ANY W|ARRANTY;|
|00001bc0| 20 77 69 74 68 6f 75 74 | 20 65 76 65 6e 20 74 68 | without| even th|
|00001bd0| 65 20 69 6d 70 6c 69 65 | 64 20 77 61 72 72 61 6e |e implie|d warran|
|00001be0| 74 79 20 6f 66 0a 4d 45 | 52 43 48 41 4e 54 41 42 |ty of.ME|RCHANTAB|
|00001bf0| 49 4c 49 54 59 20 6f 72 | 20 46 49 54 4e 45 53 53 |ILITY or| FITNESS|
|00001c00| 20 46 4f 52 20 41 20 50 | 41 52 54 49 43 55 4c 41 | FOR A P|ARTICULA|
|00001c10| 52 20 50 55 52 50 4f 53 | 45 2e 20 20 53 65 65 20 |R PURPOS|E. See |
|00001c20| 74 68 65 20 47 4e 55 0a | 4c 69 62 72 61 72 79 20 |the GNU.|Library |
|00001c30| 47 65 6e 65 72 61 6c 20 | 50 75 62 6c 69 63 20 4c |General |Public L|
|00001c40| 69 63 65 6e 73 65 20 66 | 6f 72 20 6d 6f 72 65 20 |icense f|or more |
|00001c50| 64 65 74 61 69 6c 73 2e | 0a 0a 59 6f 75 20 73 68 |details.|..You sh|
|00001c60| 6f 75 6c 64 20 68 61 76 | 65 20 72 65 63 65 69 76 |ould hav|e receiv|
|00001c70| 65 64 20 61 20 63 6f 70 | 79 20 6f 66 20 74 68 65 |ed a cop|y of the|
|00001c80| 20 47 4e 55 20 4c 69 62 | 72 61 72 79 20 47 65 6e | GNU Lib|rary Gen|
|00001c90| 65 72 61 6c 20 50 75 62 | 6c 69 63 0a 4c 69 63 65 |eral Pub|lic.Lice|
|00001ca0| 6e 73 65 20 61 6c 6f 6e | 67 20 77 69 74 68 20 74 |nse alon|g with t|
|00001cb0| 68 65 20 47 4e 55 20 43 | 20 4c 69 62 72 61 72 79 |he GNU C| Library|
|00001cc0| 3b 20 73 65 65 20 74 68 | 65 20 66 69 6c 65 20 43 |; see th|e file C|
|00001cd0| 4f 50 59 49 4e 47 2e 4c | 49 42 2e 20 20 49 66 0a |OPYING.L|IB. If.|
|00001ce0| 6e 6f 74 2c 20 77 72 69 | 74 65 20 74 6f 20 74 68 |not, wri|te to th|
|00001cf0| 65 20 46 72 65 65 20 53 | 6f 66 74 77 61 72 65 20 |e Free S|oftware |
|00001d00| 46 6f 75 6e 64 61 74 69 | 6f 6e 2c 20 49 6e 63 2e |Foundati|on, Inc.|
|00001d10| 2c 20 36 37 35 20 4d 61 | 73 73 20 41 76 65 2c 0a |, 675 Ma|ss Ave,.|
|00001d20| 43 61 6d 62 72 69 64 67 | 65 2c 20 4d 41 20 30 32 |Cambridg|e, MA 02|
|00001d30| 31 33 39 2c 20 55 53 41 | 2e 20 20 2a 2f 0a 0a 23 |139, USA|. */..#|
|00001d40| 69 6e 63 6c 75 64 65 20 | 3c 61 6e 73 69 64 65 63 |include |<ansidec|
|00001d50| 6c 2e 68 3e 0a 23 69 6e | 63 6c 75 64 65 20 3c 73 |l.h>.#in|clude <s|
|00001d60| 74 64 69 6f 2e 68 3e 0a | 23 69 6e 63 6c 75 64 65 |tdio.h>.|#include|
|00001d70| 20 3c 73 69 67 6e 61 6c | 2e 68 3e 0a 0a 0a 23 69 | <signal|.h>...#i|
|00001d80| 66 20 21 64 65 66 69 6e | 65 64 28 48 41 56 45 5f |f !defin|ed(HAVE_|
|00001d90| 47 4e 55 5f 4c 44 29 20 | 26 26 20 21 64 65 66 69 |GNU_LD) |&& !defi|
|00001da0| 6e 65 64 20 28 5f 5f 45 | 4c 46 5f 5f 29 0a 23 64 |ned (__E|LF__).#d|
|00001db0| 65 66 69 6e 65 09 5f 73 | 79 73 5f 73 69 67 6c 69 |efine._s|ys_sigli|
|00001dc0| 73 74 09 73 79 73 5f 73 | 69 67 6c 69 73 74 0a 23 |st.sys_s|iglist.#|
|00001dd0| 65 6e 64 69 66 0a 0a 23 | 69 66 20 4e 4c 53 0a 23 |endif..#|if NLS.#|
|00001de0| 69 6e 63 6c 75 64 65 20 | 22 6e 6c 5f 74 79 70 65 |include |"nl_type|
|00001df0| 73 2e 68 22 0a 23 65 6e | 64 69 66 0a 0a 23 69 66 |s.h".#en|dif..#if|
|00001e00| 6e 64 65 66 20 6c 69 6e | 75 78 0a 2f 2a 20 44 65 |ndef lin|ux./* De|
|00001e10| 66 69 6e 65 64 20 69 6e | 20 73 79 73 5f 73 69 67 |fined in| sys_sig|
|00001e20| 6c 69 73 74 2e 63 2e 20 | 20 2a 2f 0a 65 78 74 65 |list.c. | */.exte|
|00001e30| 72 6e 20 43 4f 4e 53 54 | 20 63 68 61 72 20 2a 43 |rn CONST| char *C|
|00001e40| 4f 4e 53 54 20 5f 73 79 | 73 5f 73 69 67 6c 69 73 |ONST _sy|s_siglis|
|00001e50| 74 5b 5d 3b 0a 23 65 6e | 64 69 66 0a 0a 2f 2a 20 |t[];.#en|dif../* |
|00001e60| 50 72 69 6e 74 20 6f 75 | 74 20 6f 6e 20 73 74 64 |Print ou|t on std|
|00001e70| 65 72 72 20 61 20 6c 69 | 6e 65 20 63 6f 6e 73 69 |err a li|ne consi|
|00001e80| 73 74 69 6e 67 20 6f 66 | 20 74 68 65 20 74 65 73 |sting of| the tes|
|00001e90| 74 20 69 6e 20 53 2c 20 | 61 20 63 6f 6c 6f 6e 2c |t in S, |a colon,|
|00001ea0| 20 61 20 73 70 61 63 65 | 2c 0a 20 20 20 61 20 6d | a space|,. a m|
|00001eb0| 65 73 73 61 67 65 20 64 | 65 73 63 72 69 62 69 6e |essage d|escribin|
|00001ec0| 67 20 74 68 65 20 6d 65 | 61 6e 69 6e 67 20 6f 66 |g the me|aning of|
|00001ed0| 20 74 68 65 20 73 69 67 | 6e 61 6c 20 6e 75 6d 62 | the sig|nal numb|
|00001ee0| 65 72 20 53 49 47 20 61 | 6e 64 20 61 20 6e 65 77 |er SIG a|nd a new|
|00001ef0| 6c 69 6e 65 2e 0a 20 20 | 20 49 66 20 53 20 69 73 |line.. | If S is|
|00001f00| 20 4e 55 4c 4c 20 6f 72 | 20 22 22 2c 20 74 68 65 | NULL or| "", the|
|00001f10| 20 63 6f 6c 6f 6e 20 61 | 6e 64 20 73 70 61 63 65 | colon a|nd space|
|00001f20| 20 61 72 65 20 6f 6d 69 | 74 74 65 64 2e 20 20 2a | are omi|tted. *|
|00001f30| 2f 0a 76 6f 69 64 0a 44 | 45 46 55 4e 28 70 73 69 |/.void.D|EFUN(psi|
|00001f40| 67 6e 61 6c 2c 20 28 73 | 69 67 2c 20 73 29 2c 20 |gnal, (s|ig, s), |
|00001f50| 69 6e 74 20 73 69 67 20 | 41 4e 44 20 72 65 67 69 |int sig |AND regi|
|00001f60| 73 74 65 72 20 43 4f 4e | 53 54 20 63 68 61 72 20 |ster CON|ST char |
|00001f70| 2a 73 29 0a 7b 0a 20 20 | 43 4f 4e 53 54 20 63 68 |*s).{. |CONST ch|
|00001f80| 61 72 20 2a 63 6f 6c 6f | 6e 3b 0a 0a 23 69 66 20 |ar *colo|n;..#if |
|00001f90| 4e 4c 53 0a 20 20 6c 69 | 62 63 5f 6e 6c 73 5f 69 |NLS. li|bc_nls_i|
|00001fa0| 6e 69 74 28 29 3b 0a 23 | 65 6e 64 69 66 0a 0a 20 |nit();.#|endif.. |
|00001fb0| 20 69 66 20 28 73 20 3d | 3d 20 4e 55 4c 4c 20 7c | if (s =|= NULL ||
|00001fc0| 7c 20 73 20 3d 3d 20 27 | 5c 30 27 29 0a 20 20 20 || s == '|\0'). |
|00001fd0| 20 73 20 3d 20 63 6f 6c | 6f 6e 20 3d 20 22 22 3b | s = col|on = "";|
|00001fe0| 0a 20 20 65 6c 73 65 0a | 20 20 20 20 63 6f 6c 6f |. else.| colo|
|00001ff0| 6e 20 3d 20 22 3a 20 22 | 3b 0a 0a 20 20 69 66 20 |n = ": "|;.. if |
|00002000| 28 73 69 67 20 3e 3d 20 | 30 20 26 26 20 73 69 67 |(sig >= |0 && sig|
|00002010| 20 3c 20 4e 53 49 47 29 | 0a 23 69 66 20 4e 4c 53 | < NSIG)|.#if NLS|
|00002020| 0a 20 20 20 20 28 76 6f | 69 64 29 20 66 70 72 69 |. (vo|id) fpri|
|00002030| 6e 74 66 28 73 74 64 65 | 72 72 2c 20 22 25 73 25 |ntf(stde|rr, "%s%|
|00002040| 73 25 73 5c 6e 22 2c 20 | 73 2c 20 63 6f 6c 6f 6e |s%s\n", |s, colon|
|00002050| 2c 0a 09 20 20 20 63 61 | 74 67 65 74 73 28 5f 6c |,.. ca|tgets(_l|
|00002060| 69 62 63 5f 63 61 74 2c | 20 53 69 67 6e 61 6c 4c |ibc_cat,| SignalL|
|00002070| 69 73 74 53 65 74 2c 20 | 73 69 67 20 2b 31 2c 20 |istSet, |sig +1, |
|00002080| 28 63 68 61 72 20 2a 29 | 20 5f 73 79 73 5f 73 69 |(char *)| _sys_si|
|00002090| 67 6c 69 73 74 5b 73 69 | 67 5d 29 29 3b 0a 23 65 |glist[si|g]));.#e|
|000020a0| 6c 73 65 0a 20 20 20 20 | 28 76 6f 69 64 29 20 66 |lse. |(void) f|
|000020b0| 70 72 69 6e 74 66 28 73 | 74 64 65 72 72 2c 20 22 |printf(s|tderr, "|
|000020c0| 25 73 25 73 25 73 5c 6e | 22 2c 20 73 2c 20 63 6f |%s%s%s\n|", s, co|
|000020d0| 6c 6f 6e 2c 20 5f 73 79 | 73 5f 73 69 67 6c 69 73 |lon, _sy|s_siglis|
|000020e0| 74 5b 73 69 67 5d 29 3b | 0a 23 65 6e 64 69 66 0a |t[sig]);|.#endif.|
|000020f0| 20 20 65 6c 73 65 0a 23 | 69 66 20 4e 4c 53 0a 20 | else.#|if NLS. |
|00002100| 20 20 20 28 76 6f 69 64 | 29 20 66 70 72 69 6e 74 | (void|) fprint|
|00002110| 66 28 73 74 64 65 72 72 | 2c 20 22 25 73 25 73 25 |f(stderr|, "%s%s%|
|00002120| 73 20 25 64 5c 6e 22 2c | 20 73 2c 20 63 6f 6c 6f |s %d\n",| s, colo|
|00002130| 6e 2c 0a 09 09 20 20 20 | 63 61 74 67 65 74 73 28 |n,... |catgets(|
|00002140| 5f 6c 69 62 63 5f 63 61 | 74 2c 20 53 69 67 6e 61 |_libc_ca|t, Signa|
|00002150| 6c 4c 69 73 74 53 65 74 | 2c 20 31 2c 20 20 22 55 |lListSet|, 1, "U|
|00002160| 6e 6b 6e 6f 77 6e 20 73 | 69 67 6e 61 6c 22 29 2c |nknown s|ignal"),|
|00002170| 0a 09 09 20 20 20 73 69 | 67 29 3b 0a 23 65 6c 73 |... si|g);.#els|
|00002180| 65 0a 20 20 20 20 28 76 | 6f 69 64 29 20 66 70 72 |e. (v|oid) fpr|
|00002190| 69 6e 74 66 28 73 74 64 | 65 72 72 2c 20 22 25 73 |intf(std|err, "%s|
|000021a0| 25 73 25 73 20 25 64 5c | 6e 22 2c 20 73 2c 20 63 |%s%s %d\|n", s, c|
|000021b0| 6f 6c 6f 6e 2c 20 22 55 | 6e 6b 6e 6f 77 6e 20 73 |olon, "U|nknown s|
|000021c0| 69 67 6e 61 6c 22 2c 20 | 73 69 67 29 3b 0a 23 65 |ignal", |sig);.#e|
|000021d0| 6e 64 69 66 0a 7d 0a 00 | 00 00 00 00 00 00 00 00 |ndif.}..|........|
|000021e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002200| 2e 2f 6c 69 62 63 2f 62 | 73 64 2f 72 65 61 6c 70 |./libc/b|sd/realp|
|00002210| 61 74 68 2e 63 00 00 00 | 00 00 00 00 00 00 00 00 |ath.c...|........|
|00002220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002260| 00 00 00 00 31 30 30 36 | 34 34 20 00 20 20 31 36 |....1006|44 . 16|
|00002270| 37 36 20 00 20 20 20 33 | 33 34 20 00 20 20 20 20 |76 . 3|34 . |
|00002280| 20 20 20 37 35 35 36 20 | 20 35 37 32 31 33 30 33 | 7556 | 5721303|
|00002290| 32 33 35 20 20 31 32 35 | 31 30 00 20 30 00 00 00 |235 125|10. 0...|
|000022a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002300| 00 75 73 74 61 72 20 20 | 00 68 6a 6c 00 00 00 00 |.ustar |.hjl....|
|00002310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002320| 00 00 00 00 00 00 00 00 | 00 69 73 6c 00 00 00 00 |........|.isl....|
|00002330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000023f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002400| 2f 2a 0a 20 2a 20 72 65 | 61 6c 70 61 74 68 2e 63 |/*. * re|alpath.c|
|00002410| 20 2d 2d 20 63 61 6e 6f | 6e 69 63 61 6c 69 7a 65 | -- cano|nicalize|
|00002420| 20 70 61 74 68 6e 61 6d | 65 20 62 79 20 72 65 6d | pathnam|e by rem|
|00002430| 6f 76 69 6e 67 20 73 79 | 6d 6c 69 6e 6b 73 0a 20 |oving sy|mlinks. |
|00002440| 2a 20 43 6f 70 79 72 69 | 67 68 74 20 28 43 29 20 |* Copyri|ght (C) |
|00002450| 31 39 39 33 20 52 69 63 | 6b 20 53 6c 61 64 6b 65 |1993 Ric|k Sladke|
|00002460| 79 20 3c 6a 72 73 40 77 | 6f 72 6c 64 2e 73 74 64 |y <jrs@w|orld.std|
|00002470| 2e 63 6f 6d 3e 0a 20 2a | 0a 20 2a 20 54 68 69 73 |.com>. *|. * This|
|00002480| 20 70 72 6f 67 72 61 6d | 20 69 73 20 66 72 65 65 | program| is free|
|00002490| 20 73 6f 66 74 77 61 72 | 65 3b 20 79 6f 75 20 63 | softwar|e; you c|
|000024a0| 61 6e 20 72 65 64 69 73 | 74 72 69 62 75 74 65 20 |an redis|tribute |
|000024b0| 69 74 20 61 6e 64 2f 6f | 72 20 6d 6f 64 69 66 79 |it and/o|r modify|
|000024c0| 0a 20 2a 20 69 74 20 75 | 6e 64 65 72 20 74 68 65 |. * it u|nder the|
|000024d0| 20 74 65 72 6d 73 20 6f | 66 20 74 68 65 20 47 4e | terms o|f the GN|
|000024e0| 55 20 4c 69 62 72 61 72 | 79 20 50 75 62 6c 69 63 |U Librar|y Public|
|000024f0| 20 4c 69 63 65 6e 73 65 | 20 61 73 20 70 75 62 6c | License| as publ|
|00002500| 69 73 68 65 64 20 62 79 | 0a 20 2a 20 74 68 65 20 |ished by|. * the |
|00002510| 46 72 65 65 20 53 6f 66 | 74 77 61 72 65 20 46 6f |Free Sof|tware Fo|
|00002520| 75 6e 64 61 74 69 6f 6e | 3b 20 65 69 74 68 65 72 |undation|; either|
|00002530| 20 76 65 72 73 69 6f 6e | 20 32 2c 20 6f 72 20 28 | version| 2, or (|
|00002540| 61 74 20 79 6f 75 72 20 | 6f 70 74 69 6f 6e 29 0a |at your |option).|
|00002550| 20 2a 20 61 6e 79 20 6c | 61 74 65 72 20 76 65 72 | * any l|ater ver|
|00002560| 73 69 6f 6e 2e 0a 20 2a | 0a 20 2a 20 54 68 69 73 |sion.. *|. * This|
|00002570| 20 70 72 6f 67 72 61 6d | 20 69 73 20 64 69 73 74 | program| is dist|
|00002580| 72 69 62 75 74 65 64 20 | 69 6e 20 74 68 65 20 68 |ributed |in the h|
|00002590| 6f 70 65 20 74 68 61 74 | 20 69 74 20 77 69 6c 6c |ope that| it will|
|000025a0| 20 62 65 20 75 73 65 66 | 75 6c 2c 0a 20 2a 20 62 | be usef|ul,. * b|
|000025b0| 75 74 20 57 49 54 48 4f | 55 54 20 41 4e 59 20 57 |ut WITHO|UT ANY W|
|000025c0| 41 52 52 41 4e 54 59 3b | 20 77 69 74 68 6f 75 74 |ARRANTY;| without|
|000025d0| 20 65 76 65 6e 20 74 68 | 65 20 69 6d 70 6c 69 65 | even th|e implie|
|000025e0| 64 20 77 61 72 72 61 6e | 74 79 20 6f 66 0a 20 2a |d warran|ty of. *|
|000025f0| 20 4d 45 52 43 48 41 4e | 54 41 42 49 4c 49 54 59 | MERCHAN|TABILITY|
|00002600| 20 6f 72 20 46 49 54 4e | 45 53 53 20 46 4f 52 20 | or FITN|ESS FOR |
|00002610| 41 20 50 41 52 54 49 43 | 55 4c 41 52 20 50 55 52 |A PARTIC|ULAR PUR|
|00002620| 50 4f 53 45 2e 20 20 53 | 65 65 20 74 68 65 0a 20 |POSE. S|ee the. |
|00002630| 2a 20 47 4e 55 20 4c 69 | 62 72 61 72 79 20 50 75 |* GNU Li|brary Pu|
|00002640| 62 6c 69 63 20 4c 69 63 | 65 6e 73 65 20 66 6f 72 |blic Lic|ense for|
|00002650| 20 6d 6f 72 65 20 64 65 | 74 61 69 6c 73 2e 0a 20 | more de|tails.. |
|00002660| 2a 2f 0a 0a 23 69 66 64 | 65 66 20 48 41 56 45 5f |*/..#ifd|ef HAVE_|
|00002670| 43 4f 4e 46 49 47 5f 48 | 0a 23 69 6e 63 6c 75 64 |CONFIG_H|.#includ|
|00002680| 65 20 3c 63 6f 6e 66 69 | 67 2e 68 3e 0a 23 65 6e |e <confi|g.h>.#en|
|00002690| 64 69 66 0a 0a 23 69 6e | 63 6c 75 64 65 20 3c 73 |dif..#in|clude <s|
|000026a0| 79 73 2f 74 79 70 65 73 | 2e 68 3e 0a 23 69 66 20 |ys/types|.h>.#if |
|000026b0| 64 65 66 69 6e 65 64 28 | 48 41 56 45 5f 55 4e 49 |defined(|HAVE_UNI|
|000026c0| 53 54 44 5f 48 29 20 7c | 7c 20 64 65 66 69 6e 65 |STD_H) ||| define|
|000026d0| 64 28 53 54 44 43 5f 48 | 45 41 44 45 52 53 29 0a |d(STDC_H|EADERS).|
|000026e0| 23 69 6e 63 6c 75 64 65 | 20 3c 75 6e 69 73 74 64 |#include| <unistd|
|000026f0| 2e 68 3e 0a 23 65 6e 64 | 69 66 0a 23 69 6e 63 6c |.h>.#end|if.#incl|
|00002700| 75 64 65 20 3c 73 74 64 | 69 6f 2e 68 3e 0a 23 69 |ude <std|io.h>.#i|
|00002710| 66 64 65 66 20 48 41 56 | 45 5f 53 54 52 49 4e 47 |fdef HAV|E_STRING|
|00002720| 5f 48 0a 23 69 6e 63 6c | 75 64 65 20 3c 73 74 72 |_H.#incl|ude <str|
|00002730| 69 6e 67 2e 68 3e 0a 23 | 65 6c 73 65 0a 23 69 6e |ing.h>.#|else.#in|
|00002740| 63 6c 75 64 65 20 3c 73 | 74 72 69 6e 67 73 2e 68 |clude <s|trings.h|
|00002750| 3e 0a 23 65 6e 64 69 66 | 0a 23 69 66 64 65 66 20 |>.#endif|.#ifdef |
|00002760| 5f 50 4f 53 49 58 5f 56 | 45 52 53 49 4f 4e 0a 23 |_POSIX_V|ERSION.#|
|00002770| 69 6e 63 6c 75 64 65 20 | 3c 6c 69 6d 69 74 73 2e |include |<limits.|
|00002780| 68 3e 09 09 09 2f 2a 20 | 66 6f 72 20 50 41 54 48 |h>.../* |for PATH|
|00002790| 5f 4d 41 58 20 2a 2f 0a | 23 65 6c 73 65 0a 23 69 |_MAX */.|#else.#i|
|000027a0| 6e 63 6c 75 64 65 20 3c | 73 79 73 2f 70 61 72 61 |nclude <|sys/para|
|000027b0| 6d 2e 68 3e 09 09 09 2f | 2a 20 66 6f 72 20 4d 41 |m.h>.../|* for MA|
|000027c0| 58 50 41 54 48 4c 45 4e | 20 2a 2f 0a 23 65 6e 64 |XPATHLEN| */.#end|
|000027d0| 69 66 0a 23 69 6e 63 6c | 75 64 65 20 3c 65 72 72 |if.#incl|ude <err|
|000027e0| 6e 6f 2e 68 3e 0a 23 69 | 66 6e 64 65 66 20 53 54 |no.h>.#i|fndef ST|
|000027f0| 44 43 5f 48 45 41 44 45 | 52 53 0a 65 78 74 65 72 |DC_HEADE|RS.exter|
|00002800| 6e 20 69 6e 74 20 65 72 | 72 6e 6f 3b 0a 23 65 6e |n int er|rno;.#en|
|00002810| 64 69 66 0a 0a 23 69 6e | 63 6c 75 64 65 20 3c 73 |dif..#in|clude <s|
|00002820| 79 73 2f 73 74 61 74 2e | 68 3e 09 09 09 2f 2a 20 |ys/stat.|h>.../* |
|00002830| 66 6f 72 20 53 5f 49 46 | 4c 4e 4b 20 2a 2f 0a 0a |for S_IF|LNK */..|
|00002840| 23 69 66 6e 64 65 66 20 | 50 41 54 48 5f 4d 41 58 |#ifndef |PATH_MAX|
|00002850| 0a 23 69 66 64 65 66 20 | 5f 50 4f 53 49 58 5f 56 |.#ifdef |_POSIX_V|
|00002860| 45 52 53 49 4f 4e 0a 23 | 64 65 66 69 6e 65 20 50 |ERSION.#|define P|
|00002870| 41 54 48 5f 4d 41 58 20 | 5f 50 4f 53 49 58 5f 50 |ATH_MAX |_POSIX_P|
|00002880| 41 54 48 5f 4d 41 58 0a | 23 65 6c 73 65 0a 23 69 |ATH_MAX.|#else.#i|
|00002890| 66 64 65 66 20 4d 41 58 | 50 41 54 48 4c 45 4e 0a |fdef MAX|PATHLEN.|
|000028a0| 23 64 65 66 69 6e 65 20 | 50 41 54 48 5f 4d 41 58 |#define |PATH_MAX|
|000028b0| 20 4d 41 58 50 41 54 48 | 4c 45 4e 0a 23 65 6c 73 | MAXPATH|LEN.#els|
|000028c0| 65 0a 23 64 65 66 69 6e | 65 20 50 41 54 48 5f 4d |e.#defin|e PATH_M|
|000028d0| 41 58 20 31 30 32 34 0a | 23 65 6e 64 69 66 0a 23 |AX 1024.|#endif.#|
|000028e0| 65 6e 64 69 66 0a 23 65 | 6e 64 69 66 0a 0a 23 64 |endif.#e|ndif..#d|
|000028f0| 65 66 69 6e 65 20 4d 41 | 58 5f 52 45 41 44 4c 49 |efine MA|X_READLI|
|00002900| 4e 4b 53 20 33 32 0a 0a | 23 69 66 64 65 66 20 5f |NKS 32..|#ifdef _|
|00002910| 5f 53 54 44 43 5f 5f 0a | 63 68 61 72 20 2a 72 65 |_STDC__.|char *re|
|00002920| 61 6c 70 61 74 68 28 63 | 6f 6e 73 74 20 63 68 61 |alpath(c|onst cha|
|00002930| 72 20 2a 70 61 74 68 2c | 20 63 68 61 72 20 72 65 |r *path,| char re|
|00002940| 73 6f 6c 76 65 64 5f 70 | 61 74 68 20 5b 5d 29 0a |solved_p|ath []).|
|00002950| 23 65 6c 73 65 0a 63 68 | 61 72 20 2a 72 65 61 6c |#else.ch|ar *real|
|00002960| 70 61 74 68 28 70 61 74 | 68 2c 20 72 65 73 6f 6c |path(pat|h, resol|
|00002970| 76 65 64 5f 70 61 74 68 | 29 0a 63 6f 6e 73 74 20 |ved_path|).const |
|00002980| 63 68 61 72 20 2a 70 61 | 74 68 3b 0a 63 68 61 72 |char *pa|th;.char|
|00002990| 20 72 65 73 6f 6c 76 65 | 64 5f 70 61 74 68 20 5b | resolve|d_path [|
|000029a0| 5d 3b 0a 23 65 6e 64 69 | 66 0a 7b 0a 09 63 68 61 |];.#endi|f.{..cha|
|000029b0| 72 20 63 6f 70 79 5f 70 | 61 74 68 5b 50 41 54 48 |r copy_p|ath[PATH|
|000029c0| 5f 4d 41 58 5d 3b 0a 09 | 63 68 61 72 20 6c 69 6e |_MAX];..|char lin|
|000029d0| 6b 5f 70 61 74 68 5b 50 | 41 54 48 5f 4d 41 58 5d |k_path[P|ATH_MAX]|
|000029e0| 3b 0a 09 63 68 61 72 20 | 2a 6e 65 77 5f 70 61 74 |;..char |*new_pat|
|000029f0| 68 20 3d 20 72 65 73 6f | 6c 76 65 64 5f 70 61 74 |h = reso|lved_pat|
|00002a00| 68 3b 0a 09 63 68 61 72 | 20 2a 6d 61 78 5f 70 61 |h;..char| *max_pa|
|00002a10| 74 68 3b 0a 09 69 6e 74 | 20 72 65 61 64 6c 69 6e |th;..int| readlin|
|00002a20| 6b 73 20 3d 20 30 3b 0a | 09 69 6e 74 20 6e 3b 0a |ks = 0;.|.int n;.|
|00002a30| 0a 09 2f 2a 20 4d 61 6b | 65 20 61 20 63 6f 70 79 |../* Mak|e a copy|
|00002a40| 20 6f 66 20 74 68 65 20 | 73 6f 75 72 63 65 20 70 | of the |source p|
|00002a50| 61 74 68 20 73 69 6e 63 | 65 20 77 65 20 6d 61 79 |ath sinc|e we may|
|00002a60| 20 6e 65 65 64 20 74 6f | 20 6d 6f 64 69 66 79 20 | need to| modify |
|00002a70| 69 74 2e 20 2a 2f 0a 09 | 73 74 72 63 70 79 28 63 |it. */..|strcpy(c|
|00002a80| 6f 70 79 5f 70 61 74 68 | 2c 20 70 61 74 68 29 3b |opy_path|, path);|
|00002a90| 0a 09 70 61 74 68 20 3d | 20 63 6f 70 79 5f 70 61 |..path =| copy_pa|
|00002aa0| 74 68 3b 0a 09 6d 61 78 | 5f 70 61 74 68 20 3d 20 |th;..max|_path = |
|00002ab0| 63 6f 70 79 5f 70 61 74 | 68 20 2b 20 50 41 54 48 |copy_pat|h + PATH|
|00002ac0| 5f 4d 41 58 20 2d 20 32 | 3b 0a 09 2f 2a 20 49 66 |_MAX - 2|;../* If|
|00002ad0| 20 69 74 27 73 20 61 20 | 72 65 6c 61 74 69 76 65 | it's a |relative|
|00002ae0| 20 70 61 74 68 6e 61 6d | 65 20 75 73 65 20 67 65 | pathnam|e use ge|
|00002af0| 74 77 64 20 66 6f 72 20 | 73 74 61 72 74 65 72 73 |twd for |starters|
|00002b00| 2e 20 2a 2f 0a 09 69 66 | 20 28 2a 70 61 74 68 20 |. */..if| (*path |
|00002b10| 21 3d 20 27 2f 27 29 20 | 7b 0a 23 69 66 64 65 66 |!= '/') |{.#ifdef|
|00002b20| 20 48 41 56 45 5f 47 45 | 54 43 57 44 0a 09 09 67 | HAVE_GE|TCWD...g|
|00002b30| 65 74 63 77 64 28 6e 65 | 77 5f 70 61 74 68 2c 20 |etcwd(ne|w_path, |
|00002b40| 50 41 54 48 5f 4d 41 58 | 20 2d 20 31 29 3b 0a 23 |PATH_MAX| - 1);.#|
|00002b50| 65 6c 73 65 0a 09 09 67 | 65 74 77 64 28 6e 65 77 |else...g|etwd(new|
|00002b60| 5f 70 61 74 68 29 3b 0a | 23 65 6e 64 69 66 0a 09 |_path);.|#endif..|
|00002b70| 09 6e 65 77 5f 70 61 74 | 68 20 2b 3d 20 73 74 72 |.new_pat|h += str|
|00002b80| 6c 65 6e 28 6e 65 77 5f | 70 61 74 68 29 3b 0a 09 |len(new_|path);..|
|00002b90| 09 69 66 20 28 6e 65 77 | 5f 70 61 74 68 5b 2d 31 |.if (new|_path[-1|
|00002ba0| 5d 20 21 3d 20 27 2f 27 | 29 0a 09 09 09 2a 6e 65 |] != '/'|)....*ne|
|00002bb0| 77 5f 70 61 74 68 2b 2b | 20 3d 20 27 2f 27 3b 0a |w_path++| = '/';.|
|00002bc0| 09 7d 0a 09 65 6c 73 65 | 20 7b 0a 09 09 2a 6e 65 |.}..else| {...*ne|
|00002bd0| 77 5f 70 61 74 68 2b 2b | 20 3d 20 27 2f 27 3b 0a |w_path++| = '/';.|
|00002be0| 09 09 70 61 74 68 2b 2b | 3b 0a 09 7d 0a 09 2f 2a |..path++|;..}../*|
|00002bf0| 20 45 78 70 61 6e 64 20 | 65 61 63 68 20 73 6c 61 | Expand |each sla|
|00002c00| 73 68 2d 73 65 70 61 72 | 61 74 65 64 20 70 61 74 |sh-separ|ated pat|
|00002c10| 68 6e 61 6d 65 20 63 6f | 6d 70 6f 6e 65 6e 74 2e |hname co|mponent.|
|00002c20| 20 2a 2f 0a 09 77 68 69 | 6c 65 20 28 2a 70 61 74 | */..whi|le (*pat|
|00002c30| 68 20 21 3d 20 27 5c 30 | 27 29 20 7b 0a 09 09 2f |h != '\0|') {.../|
|00002c40| 2a 20 49 67 6e 6f 72 65 | 20 73 74 72 61 79 20 22 |* Ignore| stray "|
|00002c50| 2f 22 2e 20 2a 2f 0a 09 | 09 69 66 20 28 2a 70 61 |/". */..|.if (*pa|
|00002c60| 74 68 20 3d 3d 20 27 2f | 27 29 20 7b 0a 09 09 09 |th == '/|') {....|
|00002c70| 70 61 74 68 2b 2b 3b 0a | 09 09 09 63 6f 6e 74 69 |path++;.|...conti|
|00002c80| 6e 75 65 3b 0a 09 09 7d | 0a 09 09 69 66 20 28 2a |nue;...}|...if (*|
|00002c90| 70 61 74 68 20 3d 3d 20 | 27 2e 27 29 20 7b 0a 09 |path == |'.') {..|
|00002ca0| 09 09 2f 2a 20 49 67 6e | 6f 72 65 20 22 2e 22 2e |../* Ign|ore ".".|
|00002cb0| 20 2a 2f 0a 09 09 09 69 | 66 20 28 70 61 74 68 5b | */....i|f (path[|
|00002cc0| 31 5d 20 3d 3d 20 27 5c | 30 27 20 7c 7c 20 70 61 |1] == '\|0' || pa|
|00002cd0| 74 68 5b 31 5d 20 3d 3d | 20 27 2f 27 29 20 7b 0a |th[1] ==| '/') {.|
|00002ce0| 09 09 09 09 70 61 74 68 | 2b 2b 3b 0a 09 09 09 09 |....path|++;.....|
|00002cf0| 63 6f 6e 74 69 6e 75 65 | 3b 0a 09 09 09 7d 0a 09 |continue|;....}..|
|00002d00| 09 09 69 66 20 28 70 61 | 74 68 5b 31 5d 20 3d 3d |..if (pa|th[1] ==|
|00002d10| 20 27 2e 27 29 20 7b 0a | 09 09 09 09 69 66 20 28 | '.') {.|....if (|
|00002d20| 70 61 74 68 5b 32 5d 20 | 3d 3d 20 27 5c 30 27 20 |path[2] |== '\0' |
|00002d30| 7c 7c 20 70 61 74 68 5b | 32 5d 20 3d 3d 20 27 2f ||| path[|2] == '/|
|00002d40| 27 29 20 7b 0a 09 09 09 | 09 09 70 61 74 68 20 2b |') {....|..path +|
|00002d50| 3d 20 32 3b 0a 09 09 09 | 09 09 2f 2a 20 49 67 6e |= 2;....|../* Ign|
|00002d60| 6f 72 65 20 22 2e 2e 22 | 20 61 74 20 72 6f 6f 74 |ore ".."| at root|
|00002d70| 2e 20 2a 2f 0a 09 09 09 | 09 09 69 66 20 28 6e 65 |. */....|..if (ne|
|00002d80| 77 5f 70 61 74 68 20 3d | 3d 20 72 65 73 6f 6c 76 |w_path =|= resolv|
|00002d90| 65 64 5f 70 61 74 68 20 | 2b 20 31 29 0a 09 09 09 |ed_path |+ 1)....|
|00002da0| 09 09 09 63 6f 6e 74 69 | 6e 75 65 3b 0a 09 09 09 |...conti|nue;....|
|00002db0| 09 09 2f 2a 20 48 61 6e | 64 6c 65 20 22 2e 2e 22 |../* Han|dle ".."|
|00002dc0| 20 62 79 20 62 61 63 6b | 69 6e 67 20 75 70 2e 20 | by back|ing up. |
|00002dd0| 2a 2f 0a 09 09 09 09 09 | 77 68 69 6c 65 20 28 28 |*/......|while ((|
|00002de0| 2d 2d 6e 65 77 5f 70 61 | 74 68 29 5b 2d 31 5d 20 |--new_pa|th)[-1] |
|00002df0| 21 3d 20 27 2f 27 29 0a | 09 09 09 09 09 09 3b 0a |!= '/').|......;.|
|00002e00| 09 09 09 09 09 63 6f 6e | 74 69 6e 75 65 3b 0a 09 |.....con|tinue;..|
|00002e10| 09 09 09 7d 0a 09 09 09 | 7d 0a 09 09 7d 0a 09 09 |...}....|}...}...|
|00002e20| 2f 2a 20 53 61 66 65 6c | 79 20 63 6f 70 79 20 74 |/* Safel|y copy t|
|00002e30| 68 65 20 6e 65 78 74 20 | 70 61 74 68 6e 61 6d 65 |he next |pathname|
|00002e40| 20 63 6f 6d 70 6f 6e 65 | 6e 74 2e 20 2a 2f 0a 09 | compone|nt. */..|
|00002e50| 09 77 68 69 6c 65 20 28 | 2a 70 61 74 68 20 21 3d |.while (|*path !=|
|00002e60| 20 27 5c 30 27 20 26 26 | 20 2a 70 61 74 68 20 21 | '\0' &&| *path !|
|00002e70| 3d 20 27 2f 27 29 20 7b | 0a 09 09 09 69 66 20 28 |= '/') {|....if (|
|00002e80| 70 61 74 68 20 3e 20 6d | 61 78 5f 70 61 74 68 29 |path > m|ax_path)|
|00002e90| 20 7b 0a 09 09 09 09 65 | 72 72 6e 6f 20 3d 20 45 | {.....e|rrno = E|
|00002ea0| 4e 41 4d 45 54 4f 4f 4c | 4f 4e 47 3b 0a 09 09 09 |NAMETOOL|ONG;....|
|00002eb0| 09 72 65 74 75 72 6e 20 | 4e 55 4c 4c 3b 0a 09 09 |.return |NULL;...|
|00002ec0| 09 7d 0a 09 09 09 2a 6e | 65 77 5f 70 61 74 68 2b |.}....*n|ew_path+|
|00002ed0| 2b 20 3d 20 2a 70 61 74 | 68 2b 2b 3b 0a 09 09 7d |+ = *pat|h++;...}|
|00002ee0| 0a 23 69 66 64 65 66 20 | 53 5f 49 46 4c 4e 4b 0a |.#ifdef |S_IFLNK.|
|00002ef0| 09 09 2f 2a 20 50 72 6f | 74 65 63 74 20 61 67 61 |../* Pro|tect aga|
|00002f00| 69 6e 73 74 20 69 6e 66 | 69 6e 69 74 65 20 6c 6f |inst inf|inite lo|
|00002f10| 6f 70 73 2e 20 2a 2f 0a | 09 09 69 66 20 28 72 65 |ops. */.|..if (re|
|00002f20| 61 64 6c 69 6e 6b 73 2b | 2b 20 3e 20 4d 41 58 5f |adlinks+|+ > MAX_|
|00002f30| 52 45 41 44 4c 49 4e 4b | 53 29 20 7b 0a 09 09 09 |READLINK|S) {....|
|00002f40| 65 72 72 6e 6f 20 3d 20 | 45 4c 4f 4f 50 3b 0a 09 |errno = |ELOOP;..|
|00002f50| 09 09 72 65 74 75 72 6e | 20 4e 55 4c 4c 3b 0a 09 |..return| NULL;..|
|00002f60| 09 7d 0a 09 09 2f 2a 20 | 53 65 65 20 69 66 20 6c |.}.../* |See if l|
|00002f70| 61 74 65 73 74 20 70 61 | 74 68 6e 61 6d 65 20 63 |atest pa|thname c|
|00002f80| 6f 6d 70 6f 6e 65 6e 74 | 20 69 73 20 61 20 73 79 |omponent| is a sy|
|00002f90| 6d 6c 69 6e 6b 2e 20 2a | 2f 0a 09 09 2a 6e 65 77 |mlink. *|/...*new|
|00002fa0| 5f 70 61 74 68 20 3d 20 | 27 5c 30 27 3b 0a 09 09 |_path = |'\0';...|
|00002fb0| 6e 20 3d 20 72 65 61 64 | 6c 69 6e 6b 28 72 65 73 |n = read|link(res|
|00002fc0| 6f 6c 76 65 64 5f 70 61 | 74 68 2c 20 6c 69 6e 6b |olved_pa|th, link|
|00002fd0| 5f 70 61 74 68 2c 20 50 | 41 54 48 5f 4d 41 58 20 |_path, P|ATH_MAX |
|00002fe0| 2d 20 31 29 3b 0a 09 09 | 69 66 20 28 6e 20 3c 20 |- 1);...|if (n < |
|00002ff0| 30 29 20 7b 0a 09 09 09 | 2f 2a 20 45 49 4e 56 41 |0) {....|/* EINVA|
|00003000| 4c 20 6d 65 61 6e 73 20 | 74 68 65 20 66 69 6c 65 |L means |the file|
|00003010| 20 65 78 69 73 74 73 20 | 62 75 74 20 69 73 6e 27 | exists |but isn'|
|00003020| 74 20 61 20 73 79 6d 6c | 69 6e 6b 2e 20 2a 2f 0a |t a syml|ink. */.|
|00003030| 09 09 09 69 66 20 28 65 | 72 72 6e 6f 20 21 3d 20 |...if (e|rrno != |
|00003040| 45 49 4e 56 41 4c 29 0a | 09 09 09 09 72 65 74 75 |EINVAL).|....retu|
|00003050| 72 6e 20 4e 55 4c 4c 3b | 0a 09 09 7d 0a 09 09 65 |rn NULL;|...}...e|
|00003060| 6c 73 65 20 7b 0a 09 09 | 09 2f 2a 20 4e 6f 74 65 |lse {...|./* Note|
|00003070| 3a 20 72 65 61 64 6c 69 | 6e 6b 20 64 6f 65 73 6e |: readli|nk doesn|
|00003080| 27 74 20 61 64 64 20 74 | 68 65 20 6e 75 6c 6c 20 |'t add t|he null |
|00003090| 62 79 74 65 2e 20 2a 2f | 0a 09 09 09 6c 69 6e 6b |byte. */|....link|
|000030a0| 5f 70 61 74 68 5b 6e 5d | 20 3d 20 27 5c 30 27 3b |_path[n]| = '\0';|
|000030b0| 0a 09 09 09 69 66 20 28 | 2a 6c 69 6e 6b 5f 70 61 |....if (|*link_pa|
|000030c0| 74 68 20 3d 3d 20 27 2f | 27 29 0a 09 09 09 09 2f |th == '/|')...../|
|000030d0| 2a 20 53 74 61 72 74 20 | 6f 76 65 72 20 66 6f 72 |* Start |over for|
|000030e0| 20 61 6e 20 61 62 73 6f | 6c 75 74 65 20 73 79 6d | an abso|lute sym|
|000030f0| 6c 69 6e 6b 2e 20 2a 2f | 0a 09 09 09 09 6e 65 77 |link. */|.....new|
|00003100| 5f 70 61 74 68 20 3d 20 | 72 65 73 6f 6c 76 65 64 |_path = |resolved|
|00003110| 5f 70 61 74 68 3b 0a 09 | 09 09 65 6c 73 65 0a 09 |_path;..|..else..|
|00003120| 09 09 09 2f 2a 20 4f 74 | 68 65 72 77 69 73 65 20 |.../* Ot|herwise |
|00003130| 62 61 63 6b 20 75 70 20 | 6f 76 65 72 20 74 68 69 |back up |over thi|
|00003140| 73 20 63 6f 6d 70 6f 6e | 65 6e 74 2e 20 2a 2f 0a |s compon|ent. */.|
|00003150| 09 09 09 09 77 68 69 6c | 65 20 28 2a 28 2d 2d 6e |....whil|e (*(--n|
|00003160| 65 77 5f 70 61 74 68 29 | 20 21 3d 20 27 2f 27 29 |ew_path)| != '/')|
|00003170| 0a 09 09 09 09 09 3b 0a | 09 09 09 2f 2a 20 53 61 |......;.|.../* Sa|
|00003180| 66 65 20 73 65 78 20 63 | 68 65 63 6b 2e 20 2a 2f |fe sex c|heck. */|
|00003190| 0a 09 09 09 69 66 20 28 | 73 74 72 6c 65 6e 28 70 |....if (|strlen(p|
|000031a0| 61 74 68 29 20 2b 20 6e | 20 3e 3d 20 50 41 54 48 |ath) + n| >= PATH|
|000031b0| 5f 4d 41 58 29 20 7b 0a | 09 09 09 09 65 72 72 6e |_MAX) {.|....errn|
|000031c0| 6f 20 3d 20 45 4e 41 4d | 45 54 4f 4f 4c 4f 4e 47 |o = ENAM|ETOOLONG|
|000031d0| 3b 0a 09 09 09 09 72 65 | 74 75 72 6e 20 4e 55 4c |;.....re|turn NUL|
|000031e0| 4c 3b 0a 09 09 09 7d 0a | 09 09 09 2f 2a 20 49 6e |L;....}.|.../* In|
|000031f0| 73 65 72 74 20 73 79 6d | 6c 69 6e 6b 20 63 6f 6e |sert sym|link con|
|00003200| 74 65 6e 74 73 20 69 6e | 74 6f 20 70 61 74 68 2e |tents in|to path.|
|00003210| 20 2a 2f 0a 09 09 09 73 | 74 72 63 61 74 28 6c 69 | */....s|trcat(li|
|00003220| 6e 6b 5f 70 61 74 68 2c | 20 70 61 74 68 29 3b 0a |nk_path,| path);.|
|00003230| 09 09 09 73 74 72 63 70 | 79 28 63 6f 70 79 5f 70 |...strcp|y(copy_p|
|00003240| 61 74 68 2c 20 6c 69 6e | 6b 5f 70 61 74 68 29 3b |ath, lin|k_path);|
|00003250| 0a 09 09 09 70 61 74 68 | 20 3d 20 63 6f 70 79 5f |....path| = copy_|
|00003260| 70 61 74 68 3b 0a 09 09 | 7d 0a 23 65 6e 64 69 66 |path;...|}.#endif|
|00003270| 20 2f 2a 20 53 5f 49 46 | 4c 4e 4b 20 2a 2f 0a 09 | /* S_IF|LNK */..|
|00003280| 09 2a 6e 65 77 5f 70 61 | 74 68 2b 2b 20 3d 20 27 |.*new_pa|th++ = '|
|00003290| 2f 27 3b 0a 09 7d 0a 09 | 2f 2a 20 44 65 6c 65 74 |/';..}..|/* Delet|
|000032a0| 65 20 74 72 61 69 6c 69 | 6e 67 20 73 6c 61 73 68 |e traili|ng slash|
|000032b0| 20 62 75 74 20 64 6f 6e | 27 74 20 77 68 6f 6d 70 | but don|'t whomp|
|000032c0| 20 61 20 6c 6f 6e 65 20 | 73 6c 61 73 68 2e 20 2a | a lone |slash. *|
|000032d0| 2f 0a 09 69 66 20 28 6e | 65 77 5f 70 61 74 68 20 |/..if (n|ew_path |
|000032e0| 21 3d 20 72 65 73 6f 6c | 76 65 64 5f 70 61 74 68 |!= resol|ved_path|
|000032f0| 20 2b 20 31 20 26 26 20 | 6e 65 77 5f 70 61 74 68 | + 1 && |new_path|
|00003300| 5b 2d 31 5d 20 3d 3d 20 | 27 2f 27 29 0a 09 09 6e |[-1] == |'/')...n|
|00003310| 65 77 5f 70 61 74 68 2d | 2d 3b 0a 09 2f 2a 20 4d |ew_path-|-;../* M|
|00003320| 61 6b 65 20 73 75 72 65 | 20 69 74 27 73 20 6e 75 |ake sure| it's nu|
|00003330| 6c 6c 20 74 65 72 6d 69 | 6e 61 74 65 64 2e 20 2a |ll termi|nated. *|
|00003340| 2f 0a 09 2a 6e 65 77 5f | 70 61 74 68 20 3d 20 27 |/..*new_|path = '|
|00003350| 5c 30 27 3b 0a 09 72 65 | 74 75 72 6e 20 72 65 73 |\0';..re|turn res|
|00003360| 6f 6c 76 65 64 5f 70 61 | 74 68 3b 0a 7d 0a 00 00 |olved_pa|th;.}...|
|00003370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000033f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003400| 2e 2f 6c 69 62 63 2f 62 | 73 64 2f 73 65 74 65 6e |./libc/b|sd/seten|
|00003410| 76 2e 63 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |v.c.....|........|
|00003420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003460| 00 00 00 00 31 30 30 36 | 34 34 20 00 20 20 31 36 |....1006|44 . 16|
|00003470| 37 36 20 00 20 20 20 33 | 33 34 20 00 20 20 20 20 |76 . 3|34 . |
|00003480| 20 20 31 30 37 32 37 20 | 20 35 37 32 31 33 30 33 | 10727 | 5721303|
|00003490| 32 33 35 20 20 31 32 32 | 32 36 00 20 30 00 00 00 |235 122|26. 0...|
|000034a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000034f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003500| 00 75 73 74 61 72 20 20 | 00 68 6a 6c 00 00 00 00 |.ustar |.hjl....|
|00003510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003520| 00 00 00 00 00 00 00 00 | 00 69 73 6c 00 00 00 00 |........|.isl....|
|00003530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000035f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003600| 2f 2a 0a 20 2a 20 43 6f | 70 79 72 69 67 68 74 20 |/*. * Co|pyright |
|00003610| 28 63 29 20 31 39 38 37 | 20 52 65 67 65 6e 74 73 |(c) 1987| Regents|
|00003620| 20 6f 66 20 74 68 65 20 | 55 6e 69 76 65 72 73 69 | of the |Universi|
|00003630| 74 79 20 6f 66 20 43 61 | 6c 69 66 6f 72 6e 69 61 |ty of Ca|lifornia|
|00003640| 2e 0a 20 2a 20 41 6c 6c | 20 72 69 67 68 74 73 20 |.. * All| rights |
|00003650| 72 65 73 65 72 76 65 64 | 2e 0a 20 2a 0a 20 2a 20 |reserved|.. *. * |
|00003660| 52 65 64 69 73 74 72 69 | 62 75 74 69 6f 6e 20 61 |Redistri|bution a|
|00003670| 6e 64 20 75 73 65 20 69 | 6e 20 73 6f 75 72 63 65 |nd use i|n source|
|00003680| 20 61 6e 64 20 62 69 6e | 61 72 79 20 66 6f 72 6d | and bin|ary form|
|00003690| 73 2c 20 77 69 74 68 20 | 6f 72 20 77 69 74 68 6f |s, with |or witho|
|000036a0| 75 74 0a 20 2a 20 6d 6f | 64 69 66 69 63 61 74 69 |ut. * mo|dificati|
|000036b0| 6f 6e 2c 20 61 72 65 20 | 70 65 72 6d 69 74 74 65 |on, are |permitte|
|000036c0| 64 20 70 72 6f 76 69 64 | 65 64 20 74 68 61 74 20 |d provid|ed that |
|000036d0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 63 6f |the foll|owing co|
|000036e0| 6e 64 69 74 69 6f 6e 73 | 0a 20 2a 20 61 72 65 20 |nditions|. * are |
|000036f0| 6d 65 74 3a 0a 20 2a 20 | 31 2e 20 52 65 64 69 73 |met:. * |1. Redis|
|00003700| 74 72 69 62 75 74 69 6f | 6e 73 20 6f 66 20 73 6f |tributio|ns of so|
|00003710| 75 72 63 65 20 63 6f 64 | 65 20 6d 75 73 74 20 72 |urce cod|e must r|
|00003720| 65 74 61 69 6e 20 74 68 | 65 20 61 62 6f 76 65 20 |etain th|e above |
|00003730| 63 6f 70 79 72 69 67 68 | 74 0a 20 2a 20 20 20 20 |copyrigh|t. * |
|00003740| 6e 6f 74 69 63 65 2c 20 | 74 68 69 73 20 6c 69 73 |notice, |this lis|
|00003750| 74 20 6f 66 20 63 6f 6e | 64 69 74 69 6f 6e 73 20 |t of con|ditions |
|00003760| 61 6e 64 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |and the |followin|
|00003770| 67 20 64 69 73 63 6c 61 | 69 6d 65 72 2e 0a 20 2a |g discla|imer.. *|
|00003780| 20 32 2e 20 52 65 64 69 | 73 74 72 69 62 75 74 69 | 2. Redi|stributi|
|00003790| 6f 6e 73 20 69 6e 20 62 | 69 6e 61 72 79 20 66 6f |ons in b|inary fo|
|000037a0| 72 6d 20 6d 75 73 74 20 | 72 65 70 72 6f 64 75 63 |rm must |reproduc|
|000037b0| 65 20 74 68 65 20 61 62 | 6f 76 65 20 63 6f 70 79 |e the ab|ove copy|
|000037c0| 72 69 67 68 74 0a 20 2a | 20 20 20 20 6e 6f 74 69 |right. *| noti|
|000037d0| 63 65 2c 20 74 68 69 73 | 20 6c 69 73 74 20 6f 66 |ce, this| list of|
|000037e0| 20 63 6f 6e 64 69 74 69 | 6f 6e 73 20 61 6e 64 20 | conditi|ons and |
|000037f0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 64 69 |the foll|owing di|
|00003800| 73 63 6c 61 69 6d 65 72 | 20 69 6e 20 74 68 65 0a |sclaimer| in the.|
|00003810| 20 2a 20 20 20 20 64 6f | 63 75 6d 65 6e 74 61 74 | * do|cumentat|
|00003820| 69 6f 6e 20 61 6e 64 2f | 6f 72 20 6f 74 68 65 72 |ion and/|or other|
|00003830| 20 6d 61 74 65 72 69 61 | 6c 73 20 70 72 6f 76 69 | materia|ls provi|
|00003840| 64 65 64 20 77 69 74 68 | 20 74 68 65 20 64 69 73 |ded with| the dis|
|00003850| 74 72 69 62 75 74 69 6f | 6e 2e 0a 20 2a 20 33 2e |tributio|n.. * 3.|
|00003860| 20 41 6c 6c 20 61 64 76 | 65 72 74 69 73 69 6e 67 | All adv|ertising|
|00003870| 20 6d 61 74 65 72 69 61 | 6c 73 20 6d 65 6e 74 69 | materia|ls menti|
|00003880| 6f 6e 69 6e 67 20 66 65 | 61 74 75 72 65 73 20 6f |oning fe|atures o|
|00003890| 72 20 75 73 65 20 6f 66 | 20 74 68 69 73 20 73 6f |r use of| this so|
|000038a0| 66 74 77 61 72 65 0a 20 | 2a 20 20 20 20 6d 75 73 |ftware. |* mus|
|000038b0| 74 20 64 69 73 70 6c 61 | 79 20 74 68 65 20 66 6f |t displa|y the fo|
|000038c0| 6c 6c 6f 77 69 6e 67 20 | 61 63 6b 6e 6f 77 6c 65 |llowing |acknowle|
|000038d0| 64 67 65 6d 65 6e 74 3a | 0a 20 2a 09 54 68 69 73 |dgement:|. *.This|
|000038e0| 20 70 72 6f 64 75 63 74 | 20 69 6e 63 6c 75 64 65 | product| include|
|000038f0| 73 20 73 6f 66 74 77 61 | 72 65 20 64 65 76 65 6c |s softwa|re devel|
|00003900| 6f 70 65 64 20 62 79 20 | 74 68 65 20 55 6e 69 76 |oped by |the Univ|
|00003910| 65 72 73 69 74 79 20 6f | 66 0a 20 2a 09 43 61 6c |ersity o|f. *.Cal|
|00003920| 69 66 6f 72 6e 69 61 2c | 20 42 65 72 6b 65 6c 65 |ifornia,| Berkele|
|00003930| 79 20 61 6e 64 20 69 74 | 73 20 63 6f 6e 74 72 69 |y and it|s contri|
|00003940| 62 75 74 6f 72 73 2e 0a | 20 2a 20 34 2e 20 4e 65 |butors..| * 4. Ne|
|00003950| 69 74 68 65 72 20 74 68 | 65 20 6e 61 6d 65 20 6f |ither th|e name o|
|00003960| 66 20 74 68 65 20 55 6e | 69 76 65 72 73 69 74 79 |f the Un|iversity|
|00003970| 20 6e 6f 72 20 74 68 65 | 20 6e 61 6d 65 73 20 6f | nor the| names o|
|00003980| 66 20 69 74 73 20 63 6f | 6e 74 72 69 62 75 74 6f |f its co|ntributo|
|00003990| 72 73 0a 20 2a 20 20 20 | 20 6d 61 79 20 62 65 20 |rs. * | may be |
|000039a0| 75 73 65 64 20 74 6f 20 | 65 6e 64 6f 72 73 65 20 |used to |endorse |
|000039b0| 6f 72 20 70 72 6f 6d 6f | 74 65 20 70 72 6f 64 75 |or promo|te produ|
|000039c0| 63 74 73 20 64 65 72 69 | 76 65 64 20 66 72 6f 6d |cts deri|ved from|
|000039d0| 20 74 68 69 73 20 73 6f | 66 74 77 61 72 65 0a 20 | this so|ftware. |
|000039e0| 2a 20 20 20 20 77 69 74 | 68 6f 75 74 20 73 70 65 |* wit|hout spe|
|000039f0| 63 69 66 69 63 20 70 72 | 69 6f 72 20 77 72 69 74 |cific pr|ior writ|
|00003a00| 74 65 6e 20 70 65 72 6d | 69 73 73 69 6f 6e 2e 0a |ten perm|ission..|
|00003a10| 20 2a 0a 20 2a 20 54 48 | 49 53 20 53 4f 46 54 57 | *. * TH|IS SOFTW|
|00003a20| 41 52 45 20 49 53 20 50 | 52 4f 56 49 44 45 44 20 |ARE IS P|ROVIDED |
|00003a30| 42 59 20 54 48 45 20 52 | 45 47 45 4e 54 53 20 41 |BY THE R|EGENTS A|
|00003a40| 4e 44 20 43 4f 4e 54 52 | 49 42 55 54 4f 52 53 20 |ND CONTR|IBUTORS |
|00003a50| 60 60 41 53 20 49 53 27 | 27 20 41 4e 44 0a 20 2a |``AS IS'|' AND. *|
|00003a60| 20 41 4e 59 20 45 58 50 | 52 45 53 53 20 4f 52 20 | ANY EXP|RESS OR |
|00003a70| 49 4d 50 4c 49 45 44 20 | 57 41 52 52 41 4e 54 49 |IMPLIED |WARRANTI|
|00003a80| 45 53 2c 20 49 4e 43 4c | 55 44 49 4e 47 2c 20 42 |ES, INCL|UDING, B|
|00003a90| 55 54 20 4e 4f 54 20 4c | 49 4d 49 54 45 44 20 54 |UT NOT L|IMITED T|
|00003aa0| 4f 2c 20 54 48 45 0a 20 | 2a 20 49 4d 50 4c 49 45 |O, THE. |* IMPLIE|
|00003ab0| 44 20 57 41 52 52 41 4e | 54 49 45 53 20 4f 46 20 |D WARRAN|TIES OF |
|00003ac0| 4d 45 52 43 48 41 4e 54 | 41 42 49 4c 49 54 59 20 |MERCHANT|ABILITY |
|00003ad0| 41 4e 44 20 46 49 54 4e | 45 53 53 20 46 4f 52 20 |AND FITN|ESS FOR |
|00003ae0| 41 20 50 41 52 54 49 43 | 55 4c 41 52 20 50 55 52 |A PARTIC|ULAR PUR|
|00003af0| 50 4f 53 45 0a 20 2a 20 | 41 52 45 20 44 49 53 43 |POSE. * |ARE DISC|
|00003b00| 4c 41 49 4d 45 44 2e 20 | 20 49 4e 20 4e 4f 20 45 |LAIMED. | IN NO E|
|00003b10| 56 45 4e 54 20 53 48 41 | 4c 4c 20 54 48 45 20 52 |VENT SHA|LL THE R|
|00003b20| 45 47 45 4e 54 53 20 4f | 52 20 43 4f 4e 54 52 49 |EGENTS O|R CONTRI|
|00003b30| 42 55 54 4f 52 53 20 42 | 45 20 4c 49 41 42 4c 45 |BUTORS B|E LIABLE|
|00003b40| 0a 20 2a 20 46 4f 52 20 | 41 4e 59 20 44 49 52 45 |. * FOR |ANY DIRE|
|00003b50| 43 54 2c 20 49 4e 44 49 | 52 45 43 54 2c 20 49 4e |CT, INDI|RECT, IN|
|00003b60| 43 49 44 45 4e 54 41 4c | 2c 20 53 50 45 43 49 41 |CIDENTAL|, SPECIA|
|00003b70| 4c 2c 20 45 58 45 4d 50 | 4c 41 52 59 2c 20 4f 52 |L, EXEMP|LARY, OR|
|00003b80| 20 43 4f 4e 53 45 51 55 | 45 4e 54 49 41 4c 0a 20 | CONSEQU|ENTIAL. |
|00003b90| 2a 20 44 41 4d 41 47 45 | 53 20 28 49 4e 43 4c 55 |* DAMAGE|S (INCLU|
|00003ba0| 44 49 4e 47 2c 20 42 55 | 54 20 4e 4f 54 20 4c 49 |DING, BU|T NOT LI|
|00003bb0| 4d 49 54 45 44 20 54 4f | 2c 20 50 52 4f 43 55 52 |MITED TO|, PROCUR|
|00003bc0| 45 4d 45 4e 54 20 4f 46 | 20 53 55 42 53 54 49 54 |EMENT OF| SUBSTIT|
|00003bd0| 55 54 45 20 47 4f 4f 44 | 53 0a 20 2a 20 4f 52 20 |UTE GOOD|S. * OR |
|00003be0| 53 45 52 56 49 43 45 53 | 3b 20 4c 4f 53 53 20 4f |SERVICES|; LOSS O|
|00003bf0| 46 20 55 53 45 2c 20 44 | 41 54 41 2c 20 4f 52 20 |F USE, D|ATA, OR |
|00003c00| 50 52 4f 46 49 54 53 3b | 20 4f 52 20 42 55 53 49 |PROFITS;| OR BUSI|
|00003c10| 4e 45 53 53 20 49 4e 54 | 45 52 52 55 50 54 49 4f |NESS INT|ERRUPTIO|
|00003c20| 4e 29 0a 20 2a 20 48 4f | 57 45 56 45 52 20 43 41 |N). * HO|WEVER CA|
|00003c30| 55 53 45 44 20 41 4e 44 | 20 4f 4e 20 41 4e 59 20 |USED AND| ON ANY |
|00003c40| 54 48 45 4f 52 59 20 4f | 46 20 4c 49 41 42 49 4c |THEORY O|F LIABIL|
|00003c50| 49 54 59 2c 20 57 48 45 | 54 48 45 52 20 49 4e 20 |ITY, WHE|THER IN |
|00003c60| 43 4f 4e 54 52 41 43 54 | 2c 20 53 54 52 49 43 54 |CONTRACT|, STRICT|
|00003c70| 0a 20 2a 20 4c 49 41 42 | 49 4c 49 54 59 2c 20 4f |. * LIAB|ILITY, O|
|00003c80| 52 20 54 4f 52 54 20 28 | 49 4e 43 4c 55 44 49 4e |R TORT (|INCLUDIN|
|00003c90| 47 20 4e 45 47 4c 49 47 | 45 4e 43 45 20 4f 52 20 |G NEGLIG|ENCE OR |
|00003ca0| 4f 54 48 45 52 57 49 53 | 45 29 20 41 52 49 53 49 |OTHERWIS|E) ARISI|
|00003cb0| 4e 47 20 49 4e 20 41 4e | 59 20 57 41 59 0a 20 2a |NG IN AN|Y WAY. *|
|00003cc0| 20 4f 55 54 20 4f 46 20 | 54 48 45 20 55 53 45 20 | OUT OF |THE USE |
|00003cd0| 4f 46 20 54 48 49 53 20 | 53 4f 46 54 57 41 52 45 |OF THIS |SOFTWARE|
|00003ce0| 2c 20 45 56 45 4e 20 49 | 46 20 41 44 56 49 53 45 |, EVEN I|F ADVISE|
|00003cf0| 44 20 4f 46 20 54 48 45 | 20 50 4f 53 53 49 42 49 |D OF THE| POSSIBI|
|00003d00| 4c 49 54 59 20 4f 46 0a | 20 2a 20 53 55 43 48 20 |LITY OF.| * SUCH |
|00003d10| 44 41 4d 41 47 45 2e 0a | 20 2a 2f 0a 0a 23 69 66 |DAMAGE..| */..#if|
|00003d20| 20 64 65 66 69 6e 65 64 | 28 4c 49 42 43 5f 53 43 | defined|(LIBC_SC|
|00003d30| 43 53 29 20 26 26 20 21 | 64 65 66 69 6e 65 64 28 |CS) && !|defined(|
|00003d40| 6c 69 6e 74 29 0a 73 74 | 61 74 69 63 20 63 68 61 |lint).st|atic cha|
|00003d50| 72 20 73 63 63 73 69 64 | 5b 5d 20 3d 20 22 40 28 |r sccsid|[] = "@(|
|00003d60| 23 29 73 65 74 65 6e 76 | 2e 63 09 35 2e 36 20 28 |#)setenv|.c.5.6 (|
|00003d70| 42 65 72 6b 65 6c 65 79 | 29 20 36 2f 34 2f 39 31 |Berkeley|) 6/4/91|
|00003d80| 22 3b 0a 23 65 6e 64 69 | 66 20 2f 2a 20 4c 49 42 |";.#endi|f /* LIB|
|00003d90| 43 5f 53 43 43 53 20 61 | 6e 64 20 6e 6f 74 20 6c |C_SCCS a|nd not l|
|00003da0| 69 6e 74 20 2a 2f 0a 0a | 23 69 6e 63 6c 75 64 65 |int */..|#include|
|00003db0| 20 3c 73 74 64 64 65 66 | 2e 68 3e 0a 23 69 6e 63 | <stddef|.h>.#inc|
|00003dc0| 6c 75 64 65 20 3c 73 74 | 64 6c 69 62 2e 68 3e 0a |lude <st|dlib.h>.|
|00003dd0| 23 69 6e 63 6c 75 64 65 | 20 3c 73 74 72 69 6e 67 |#include| <string|
|00003de0| 2e 68 3e 0a 0a 23 64 65 | 66 69 6e 65 20 65 6e 76 |.h>..#de|fine env|
|00003df0| 69 72 6f 6e 09 5f 5f 65 | 6e 76 69 72 6f 6e 0a 0a |iron.__e|nviron..|
|00003e00| 2f 2a 0a 20 2a 20 5f 66 | 69 6e 64 65 6e 76 20 2d |/*. * _f|indenv -|
|00003e10| 2d 0a 20 2a 09 52 65 74 | 75 72 6e 73 20 70 6f 69 |-. *.Ret|urns poi|
|00003e20| 6e 74 65 72 20 74 6f 20 | 76 61 6c 75 65 20 61 73 |nter to |value as|
|00003e30| 73 6f 63 69 61 74 65 64 | 20 77 69 74 68 20 6e 61 |sociated| with na|
|00003e40| 6d 65 2c 20 69 66 20 61 | 6e 79 2c 20 65 6c 73 65 |me, if a|ny, else|
|00003e50| 20 4e 55 4c 4c 2e 0a 20 | 2a 09 53 65 74 73 20 6f | NULL.. |*.Sets o|
|00003e60| 66 66 73 65 74 20 74 6f | 20 62 65 20 74 68 65 20 |ffset to| be the |
|00003e70| 6f 66 66 73 65 74 20 6f | 66 20 74 68 65 20 6e 61 |offset o|f the na|
|00003e80| 6d 65 2f 76 61 6c 75 65 | 20 63 6f 6d 62 69 6e 61 |me/value| combina|
|00003e90| 74 69 6f 6e 20 69 6e 20 | 74 68 65 0a 20 2a 09 65 |tion in |the. *.e|
|00003ea0| 6e 76 69 72 6f 6e 6d 65 | 6e 74 61 6c 20 61 72 72 |nvironme|ntal arr|
|00003eb0| 61 79 2c 20 66 6f 72 20 | 75 73 65 20 62 79 20 73 |ay, for |use by s|
|00003ec0| 65 74 65 6e 76 28 33 29 | 20 61 6e 64 20 75 6e 73 |etenv(3)| and uns|
|00003ed0| 65 74 65 6e 76 28 33 29 | 2e 0a 20 2a 09 45 78 70 |etenv(3)|.. *.Exp|
|00003ee0| 6c 69 63 69 74 6c 79 20 | 72 65 6d 6f 76 65 73 20 |licitly |removes |
|00003ef0| 27 3d 27 20 69 6e 20 61 | 72 67 75 6d 65 6e 74 20 |'=' in a|rgument |
|00003f00| 6e 61 6d 65 2e 0a 20 2a | 0a 20 2a 09 54 68 69 73 |name.. *|. *.This|
|00003f10| 20 72 6f 75 74 69 6e 65 | 20 2a 73 68 6f 75 6c 64 | routine| *should|
|00003f20| 2a 20 62 65 20 61 20 73 | 74 61 74 69 63 3b 20 64 |* be a s|tatic; d|
|00003f30| 6f 6e 27 74 20 75 73 65 | 20 69 74 2e 0a 20 2a 2f |on't use| it.. */|
|00003f40| 0a 73 74 61 74 69 63 20 | 63 68 61 72 20 2a 0a 5f |.static |char *._|
|00003f50| 66 69 6e 64 65 6e 76 28 | 6e 61 6d 65 2c 20 6f 66 |findenv(|name, of|
|00003f60| 66 73 65 74 29 0a 09 72 | 65 67 69 73 74 65 72 20 |fset)..r|egister |
|00003f70| 63 6f 6e 73 74 20 63 68 | 61 72 20 2a 6e 61 6d 65 |const ch|ar *name|
|00003f80| 3b 0a 09 69 6e 74 20 2a | 6f 66 66 73 65 74 3b 0a |;..int *|offset;.|
|00003f90| 7b 0a 09 72 65 67 69 73 | 74 65 72 20 69 6e 74 20 |{..regis|ter int |
|00003fa0| 6c 65 6e 3b 0a 09 72 65 | 67 69 73 74 65 72 20 63 |len;..re|gister c|
|00003fb0| 68 61 72 20 2a 2a 50 3b | 0a 09 72 65 67 69 73 74 |har **P;|..regist|
|00003fc0| 65 72 20 63 6f 6e 73 74 | 20 63 68 61 72 20 2a 43 |er const| char *C|
|00003fd0| 3b 0a 0a 09 66 6f 72 20 | 28 43 20 3d 20 6e 61 6d |;...for |(C = nam|
|00003fe0| 65 2c 20 6c 65 6e 20 3d | 20 30 3b 20 2a 43 20 26 |e, len =| 0; *C &|
|00003ff0| 26 20 2a 43 20 21 3d 20 | 27 3d 27 3b 20 2b 2b 43 |& *C != |'='; ++C|
|00004000| 2c 20 2b 2b 6c 65 6e 29 | 3b 0a 09 66 6f 72 20 28 |, ++len)|;..for (|
|00004010| 50 20 3d 20 65 6e 76 69 | 72 6f 6e 3b 20 2a 50 3b |P = envi|ron; *P;|
|00004020| 20 2b 2b 50 29 0a 09 09 | 69 66 20 28 21 73 74 72 | ++P)...|if (!str|
|00004030| 6e 63 6d 70 28 2a 50 2c | 20 6e 61 6d 65 2c 20 6c |ncmp(*P,| name, l|
|00004040| 65 6e 29 29 0a 09 09 09 | 69 66 20 28 2a 28 43 20 |en))....|if (*(C |
|00004050| 3d 20 2a 50 20 2b 20 6c | 65 6e 29 20 3d 3d 20 27 |= *P + l|en) == '|
|00004060| 3d 27 29 20 7b 0a 09 09 | 09 09 2a 6f 66 66 73 65 |=') {...|..*offse|
|00004070| 74 20 3d 20 50 20 2d 20 | 65 6e 76 69 72 6f 6e 3b |t = P - |environ;|
|00004080| 0a 09 09 09 09 72 65 74 | 75 72 6e 28 28 63 68 61 |.....ret|urn((cha|
|00004090| 72 2a 29 2b 2b 43 29 3b | 0a 09 09 09 7d 0a 09 72 |r*)++C);|....}..r|
|000040a0| 65 74 75 72 6e 28 4e 55 | 4c 4c 29 3b 0a 7d 0a 0a |eturn(NU|LL);.}..|
|000040b0| 2f 2a 0a 20 2a 20 73 65 | 74 65 6e 76 20 2d 2d 0a |/*. * se|tenv --.|
|000040c0| 20 2a 09 53 65 74 20 74 | 68 65 20 76 61 6c 75 65 | *.Set t|he value|
|000040d0| 20 6f 66 20 74 68 65 20 | 65 6e 76 69 72 6f 6e 6d | of the |environm|
|000040e0| 65 6e 74 61 6c 20 76 61 | 72 69 61 62 6c 65 20 22 |ental va|riable "|
|000040f0| 6e 61 6d 65 22 20 74 6f | 20 62 65 0a 20 2a 09 22 |name" to| be. *."|
|00004100| 76 61 6c 75 65 22 2e 20 | 20 49 66 20 72 65 77 72 |value". | If rewr|
|00004110| 69 74 65 20 69 73 20 73 | 65 74 2c 20 72 65 70 6c |ite is s|et, repl|
|00004120| 61 63 65 20 61 6e 79 20 | 63 75 72 72 65 6e 74 20 |ace any |current |
|00004130| 76 61 6c 75 65 2e 0a 20 | 2a 2f 0a 69 6e 74 0a 73 |value.. |*/.int.s|
|00004140| 65 74 65 6e 76 28 6e 61 | 6d 65 2c 20 76 61 6c 75 |etenv(na|me, valu|
|00004150| 65 2c 20 72 65 77 72 69 | 74 65 29 0a 09 72 65 67 |e, rewri|te)..reg|
|00004160| 69 73 74 65 72 20 63 6f | 6e 73 74 20 63 68 61 72 |ister co|nst char|
|00004170| 20 2a 6e 61 6d 65 3b 0a | 09 72 65 67 69 73 74 65 | *name;.|.registe|
|00004180| 72 20 63 6f 6e 73 74 20 | 63 68 61 72 20 2a 76 61 |r const |char *va|
|00004190| 6c 75 65 3b 0a 09 69 6e | 74 20 72 65 77 72 69 74 |lue;..in|t rewrit|
|000041a0| 65 3b 0a 7b 0a 09 73 74 | 61 74 69 63 20 69 6e 74 |e;.{..st|atic int|
|000041b0| 20 61 6c 6c 6f 63 65 64 | 3b 09 09 09 2f 2a 20 69 | alloced|;.../* i|
|000041c0| 66 20 61 6c 6c 6f 63 61 | 74 65 64 20 73 70 61 63 |f alloca|ted spac|
|000041d0| 65 20 62 65 66 6f 72 65 | 20 2a 2f 0a 09 72 65 67 |e before| */..reg|
|000041e0| 69 73 74 65 72 20 63 68 | 61 72 20 2a 43 3b 0a 09 |ister ch|ar *C;..|
|000041f0| 69 6e 74 20 6c 5f 76 61 | 6c 75 65 2c 20 6f 66 66 |int l_va|lue, off|
|00004200| 73 65 74 3b 0a 0a 09 69 | 66 20 28 2a 76 61 6c 75 |set;...i|f (*valu|
|00004210| 65 20 3d 3d 20 27 3d 27 | 29 09 09 09 2f 2a 20 6e |e == '='|).../* n|
|00004220| 6f 20 60 3d 27 20 69 6e | 20 76 61 6c 75 65 20 2a |o `=' in| value *|
|00004230| 2f 0a 09 09 2b 2b 76 61 | 6c 75 65 3b 0a 09 6c 5f |/...++va|lue;..l_|
|00004240| 76 61 6c 75 65 20 3d 20 | 73 74 72 6c 65 6e 28 76 |value = |strlen(v|
|00004250| 61 6c 75 65 29 3b 0a 09 | 69 66 20 28 28 43 20 3d |alue);..|if ((C =|
|00004260| 20 5f 66 69 6e 64 65 6e | 76 28 6e 61 6d 65 2c 20 | _finden|v(name, |
|00004270| 26 6f 66 66 73 65 74 29 | 29 29 20 7b 09 2f 2a 20 |&offset)|)) {./* |
|00004280| 66 69 6e 64 20 69 66 20 | 61 6c 72 65 61 64 79 20 |find if |already |
|00004290| 65 78 69 73 74 73 20 2a | 2f 0a 09 09 69 66 20 28 |exists *|/...if (|
|000042a0| 21 72 65 77 72 69 74 65 | 29 0a 09 09 09 72 65 74 |!rewrite|)....ret|
|000042b0| 75 72 6e 20 28 30 29 3b | 0a 09 09 69 66 20 28 73 |urn (0);|...if (s|
|000042c0| 74 72 6c 65 6e 28 43 29 | 20 3e 3d 20 6c 5f 76 61 |trlen(C)| >= l_va|
|000042d0| 6c 75 65 29 20 7b 09 2f | 2a 20 6f 6c 64 20 6c 61 |lue) {./|* old la|
|000042e0| 72 67 65 72 3b 20 63 6f | 70 79 20 6f 76 65 72 20 |rger; co|py over |
|000042f0| 2a 2f 0a 09 09 09 77 68 | 69 6c 65 20 28 28 2a 43 |*/....wh|ile ((*C|
|00004300| 2b 2b 20 3d 20 2a 76 61 | 6c 75 65 2b 2b 29 29 3b |++ = *va|lue++));|
|00004310| 0a 09 09 09 72 65 74 75 | 72 6e 20 28 30 29 3b 0a |....retu|rn (0);.|
|00004320| 09 09 7d 0a 09 7d 20 65 | 6c 73 65 20 7b 09 09 09 |..}..} e|lse {...|
|00004330| 09 09 2f 2a 20 63 72 65 | 61 74 65 20 6e 65 77 20 |../* cre|ate new |
|00004340| 73 6c 6f 74 20 2a 2f 0a | 09 09 72 65 67 69 73 74 |slot */.|..regist|
|00004350| 65 72 20 69 6e 74 09 63 | 6e 74 3b 0a 09 09 72 65 |er int.c|nt;...re|
|00004360| 67 69 73 74 65 72 20 63 | 68 61 72 09 2a 2a 50 3b |gister c|har.**P;|
|00004370| 0a 0a 09 09 66 6f 72 20 | 28 50 20 3d 20 65 6e 76 |....for |(P = env|
|00004380| 69 72 6f 6e 2c 20 63 6e | 74 20 3d 20 30 3b 20 2a |iron, cn|t = 0; *|
|00004390| 50 3b 20 2b 2b 50 2c 20 | 2b 2b 63 6e 74 29 3b 0a |P; ++P, |++cnt);.|
|000043a0| 09 09 69 66 20 28 61 6c | 6c 6f 63 65 64 29 20 7b |..if (al|loced) {|
|000043b0| 09 09 09 2f 2a 20 6a 75 | 73 74 20 69 6e 63 72 65 |.../* ju|st incre|
|000043c0| 61 73 65 20 73 69 7a 65 | 20 2a 2f 0a 09 09 09 65 |ase size| */....e|
|000043d0| 6e 76 69 72 6f 6e 20 3d | 20 28 63 68 61 72 20 2a |nviron =| (char *|
|000043e0| 2a 29 72 65 61 6c 6c 6f | 63 28 28 63 68 61 72 20 |*)reallo|c((char |
|000043f0| 2a 29 65 6e 76 69 72 6f | 6e 2c 0a 09 09 09 20 20 |*)enviro|n,.... |
|00004400| 20 20 28 73 69 7a 65 5f | 74 29 28 73 69 7a 65 6f | (size_|t)(sizeo|
|00004410| 66 28 63 68 61 72 20 2a | 29 20 2a 20 28 63 6e 74 |f(char *|) * (cnt|
|00004420| 20 2b 20 32 29 29 29 3b | 0a 09 09 09 69 66 20 28 | + 2)));|....if (|
|00004430| 21 65 6e 76 69 72 6f 6e | 29 0a 09 09 09 09 72 65 |!environ|).....re|
|00004440| 74 75 72 6e 20 28 2d 31 | 29 3b 0a 09 09 7d 0a 09 |turn (-1|);...}..|
|00004450| 09 65 6c 73 65 20 7b 09 | 09 09 09 2f 2a 20 67 65 |.else {.|.../* ge|
|00004460| 74 20 6e 65 77 20 73 70 | 61 63 65 20 2a 2f 0a 09 |t new sp|ace */..|
|00004470| 09 09 61 6c 6c 6f 63 65 | 64 20 3d 20 31 3b 09 09 |..alloce|d = 1;..|
|00004480| 2f 2a 20 63 6f 70 79 20 | 6f 6c 64 20 65 6e 74 72 |/* copy |old entr|
|00004490| 69 65 73 20 69 6e 74 6f | 20 69 74 20 2a 2f 0a 09 |ies into| it */..|
|000044a0| 09 09 50 20 3d 20 28 63 | 68 61 72 20 2a 2a 29 6d |..P = (c|har **)m|
|000044b0| 61 6c 6c 6f 63 28 28 73 | 69 7a 65 5f 74 29 28 73 |alloc((s|ize_t)(s|
|000044c0| 69 7a 65 6f 66 28 63 68 | 61 72 20 2a 29 20 2a 0a |izeof(ch|ar *) *.|
|000044d0| 09 09 09 20 20 20 20 28 | 63 6e 74 20 2b 20 32 29 |... (|cnt + 2)|
|000044e0| 29 29 3b 0a 09 09 09 69 | 66 20 28 21 50 29 0a 09 |));....i|f (!P)..|
|000044f0| 09 09 09 72 65 74 75 72 | 6e 20 28 2d 31 29 3b 0a |...retur|n (-1);.|
|00004500| 09 09 09 62 63 6f 70 79 | 28 65 6e 76 69 72 6f 6e |...bcopy|(environ|
|00004510| 2c 20 50 2c 20 63 6e 74 | 20 2a 20 73 69 7a 65 6f |, P, cnt| * sizeo|
|00004520| 66 28 63 68 61 72 20 2a | 29 29 3b 0a 09 09 09 65 |f(char *|));....e|
|00004530| 6e 76 69 72 6f 6e 20 3d | 20 50 3b 0a 09 09 7d 0a |nviron =| P;...}.|
|00004540| 09 09 65 6e 76 69 72 6f | 6e 5b 63 6e 74 20 2b 20 |..enviro|n[cnt + |
|00004550| 31 5d 20 3d 20 4e 55 4c | 4c 3b 0a 09 09 6f 66 66 |1] = NUL|L;...off|
|00004560| 73 65 74 20 3d 20 63 6e | 74 3b 0a 09 7d 0a 09 66 |set = cn|t;..}..f|
|00004570| 6f 72 20 28 43 20 3d 20 | 28 63 68 61 72 20 2a 29 |or (C = |(char *)|
|00004580| 6e 61 6d 65 3b 20 2a 43 | 20 26 26 20 2a 43 20 21 |name; *C| && *C !|
|00004590| 3d 20 27 3d 27 3b 20 2b | 2b 43 29 3b 09 2f 2a 20 |= '='; +|+C);./* |
|000045a0| 6e 6f 20 60 3d 27 20 69 | 6e 20 6e 61 6d 65 20 2a |no `=' i|n name *|
|000045b0| 2f 0a 09 69 66 20 28 21 | 28 65 6e 76 69 72 6f 6e |/..if (!|(environ|
|000045c0| 5b 6f 66 66 73 65 74 5d | 20 3d 09 09 09 2f 2a 20 |[offset]| =.../* |
|000045d0| 6e 61 6d 65 20 2b 20 60 | 3d 27 20 2b 20 76 61 6c |name + `|=' + val|
|000045e0| 75 65 20 2a 2f 0a 09 20 | 20 20 20 6d 61 6c 6c 6f |ue */.. | mallo|
|000045f0| 63 28 28 73 69 7a 65 5f | 74 29 28 28 69 6e 74 29 |c((size_|t)((int)|
|00004600| 28 43 20 2d 20 6e 61 6d | 65 29 20 2b 20 6c 5f 76 |(C - nam|e) + l_v|
|00004610| 61 6c 75 65 20 2b 20 32 | 29 29 29 29 0a 09 09 72 |alue + 2|))))...r|
|00004620| 65 74 75 72 6e 20 28 2d | 31 29 3b 0a 09 66 6f 72 |eturn (-|1);..for|
|00004630| 20 28 43 20 3d 20 65 6e | 76 69 72 6f 6e 5b 6f 66 | (C = en|viron[of|
|00004640| 66 73 65 74 5d 3b 20 28 | 2a 43 20 3d 20 2a 6e 61 |fset]; (|*C = *na|
|00004650| 6d 65 2b 2b 29 20 26 26 | 20 2a 43 20 21 3d 20 27 |me++) &&| *C != '|
|00004660| 3d 27 3b 20 2b 2b 43 29 | 0a 09 09 3b 0a 09 66 6f |='; ++C)|...;..fo|
|00004670| 72 20 28 2a 43 2b 2b 20 | 3d 20 27 3d 27 3b 20 28 |r (*C++ |= '='; (|
|00004680| 2a 43 2b 2b 20 3d 20 2a | 76 61 6c 75 65 2b 2b 29 |*C++ = *|value++)|
|00004690| 3b 20 29 0a 09 09 3b 0a | 09 72 65 74 75 72 6e 20 |; )...;.|.return |
|000046a0| 28 30 29 3b 0a 7d 0a 0a | 2f 2a 0a 20 2a 20 75 6e |(0);.}..|/*. * un|
|000046b0| 73 65 74 65 6e 76 28 6e | 61 6d 65 29 20 2d 2d 0a |setenv(n|ame) --.|
|000046c0| 20 2a 09 44 65 6c 65 74 | 65 20 65 6e 76 69 72 6f | *.Delet|e enviro|
|000046d0| 6e 6d 65 6e 74 61 6c 20 | 76 61 72 69 61 62 6c 65 |nmental |variable|
|000046e0| 20 22 6e 61 6d 65 22 2e | 0a 20 2a 2f 0a 76 6f 69 | "name".|. */.voi|
|000046f0| 64 0a 75 6e 73 65 74 65 | 6e 76 28 6e 61 6d 65 29 |d.unsete|nv(name)|
|00004700| 0a 09 63 6f 6e 73 74 20 | 63 68 61 72 09 2a 6e 61 |..const |char.*na|
|00004710| 6d 65 3b 0a 7b 0a 09 65 | 78 74 65 72 6e 20 63 68 |me;.{..e|xtern ch|
|00004720| 61 72 20 2a 2a 65 6e 76 | 69 72 6f 6e 3b 0a 09 72 |ar **env|iron;..r|
|00004730| 65 67 69 73 74 65 72 20 | 63 68 61 72 20 2a 2a 50 |egister |char **P|
|00004740| 3b 0a 09 69 6e 74 20 6f | 66 66 73 65 74 3b 0a 0a |;..int o|ffset;..|
|00004750| 09 77 68 69 6c 65 20 28 | 5f 66 69 6e 64 65 6e 76 |.while (|_findenv|
|00004760| 28 6e 61 6d 65 2c 20 26 | 6f 66 66 73 65 74 29 29 |(name, &|offset))|
|00004770| 09 09 2f 2a 20 69 66 20 | 73 65 74 20 6d 75 6c 74 |../* if |set mult|
|00004780| 69 70 6c 65 20 74 69 6d | 65 73 20 2a 2f 0a 09 09 |iple tim|es */...|
|00004790| 66 6f 72 20 28 50 20 3d | 20 26 65 6e 76 69 72 6f |for (P =| &enviro|
|000047a0| 6e 5b 6f 66 66 73 65 74 | 5d 3b 3b 20 2b 2b 50 29 |n[offset|];; ++P)|
|000047b0| 0a 09 09 09 69 66 20 28 | 21 28 2a 50 20 3d 20 2a |....if (|!(*P = *|
|000047c0| 28 50 20 2b 20 31 29 29 | 29 0a 09 09 09 09 62 72 |(P + 1))|).....br|
|000047d0| 65 61 6b 3b 0a 7d 0a 00 | 00 00 00 00 00 00 00 00 |eak;.}..|........|
|000047e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000047f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004800| 2e 2f 6c 69 62 63 2f 62 | 73 64 2f 73 69 67 69 6e |./libc/b|sd/sigin|
|00004810| 74 2e 63 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |t.c.....|........|
|00004820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004860| 00 00 00 00 31 30 30 36 | 34 34 20 00 20 20 31 36 |....1006|44 . 16|
|00004870| 37 36 20 00 20 20 20 33 | 33 34 20 00 20 20 20 20 |76 . 3|34 . |
|00004880| 20 20 20 31 37 35 33 20 | 20 35 37 32 31 33 30 33 | 1753 | 5721303|
|00004890| 32 33 35 20 20 31 32 31 | 37 36 00 20 30 00 00 00 |235 121|76. 0...|
|000048a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000048b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000048c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000048d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000048e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000048f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004900| 00 75 73 74 61 72 20 20 | 00 68 6a 6c 00 00 00 00 |.ustar |.hjl....|
|00004910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004920| 00 00 00 00 00 00 00 00 | 00 69 73 6c 00 00 00 00 |........|.isl....|
|00004930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000049a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000049b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000049c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000049d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000049e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000049f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004a00| 23 69 6e 63 6c 75 64 65 | 20 3c 73 69 67 6e 61 6c |#include| <signal|
|00004a10| 2e 68 3e 0a 23 69 6e 63 | 6c 75 64 65 20 3c 65 72 |.h>.#inc|lude <er|
|00004a20| 72 6e 6f 2e 68 3e 0a 0a | 2f 2a 20 53 65 74 20 60 |rno.h>..|/* Set `|
|00004a30| 73 69 67 27 20 62 69 74 | 20 69 66 20 77 65 20 61 |sig' bit| if we a|
|00004a40| 6c 6c 6f 77 20 69 6e 74 | 65 72 72 75 70 74 20 6f |llow int|errupt o|
|00004a50| 6e 20 69 74 2e 20 2a 2f | 20 0a 73 69 67 73 65 74 |n it. */| .sigset|
|00004a60| 5f 74 20 5f 73 69 67 69 | 6e 74 72 20 3d 20 30 3b |_t _sigi|ntr = 0;|
|00004a70| 0a 0a 69 6e 74 0a 73 69 | 67 69 6e 74 65 72 72 75 |..int.si|ginterru|
|00004a80| 70 74 20 28 69 6e 74 20 | 73 69 67 2c 20 69 6e 74 |pt (int |sig, int|
|00004a90| 20 66 6c 61 67 29 0a 7b | 0a 20 20 73 74 72 75 63 | flag).{|. struc|
|00004aa0| 74 20 73 69 67 61 63 74 | 69 6f 6e 20 73 61 3b 0a |t sigact|ion sa;.|
|00004ab0| 0a 20 20 69 66 20 28 73 | 69 67 20 3c 20 31 20 7c |. if (s|ig < 1 ||
|00004ac0| 7c 20 73 69 67 20 3e 3d | 20 4e 53 49 47 29 20 7b || sig >=| NSIG) {|
|00004ad0| 0a 20 20 20 20 65 72 72 | 6e 6f 20 3d 20 45 49 4e |. err|no = EIN|
|00004ae0| 56 41 4c 3b 0a 20 20 20 | 20 72 65 74 75 72 6e 20 |VAL;. | return |
|00004af0| 2d 31 3b 0a 20 20 7d 0a | 0a 20 20 69 66 20 28 5f |-1;. }.|. if (_|
|00004b00| 5f 73 69 67 61 63 74 69 | 6f 6e 20 28 73 69 67 2c |_sigacti|on (sig,|
|00004b10| 20 28 73 74 72 75 63 74 | 20 73 69 67 61 63 74 69 | (struct| sigacti|
|00004b20| 6f 6e 20 2a 29 30 2c 20 | 26 73 61 29 29 0a 20 20 |on *)0, |&sa)). |
|00004b30| 20 20 72 65 74 75 72 6e | 20 2d 31 3b 0a 20 0a 20 | return| -1;. . |
|00004b40| 20 69 66 20 28 66 6c 61 | 67 29 20 7b 0a 20 20 20 | if (fla|g) {. |
|00004b50| 20 5f 5f 73 69 67 61 64 | 64 73 65 74 20 28 26 5f | __sigad|dset (&_|
|00004b60| 73 69 67 69 6e 74 72 2c | 20 73 69 67 29 3b 0a 23 |sigintr,| sig);.#|
|00004b70| 69 66 64 65 66 20 53 41 | 5f 52 45 53 54 41 52 54 |ifdef SA|_RESTART|
|00004b80| 0a 20 20 20 20 69 66 20 | 28 21 28 73 61 2e 73 61 |. if |(!(sa.sa|
|00004b90| 5f 66 6c 61 67 73 20 26 | 20 53 41 5f 52 45 53 54 |_flags &| SA_REST|
|00004ba0| 41 52 54 29 20 26 26 20 | 28 73 61 2e 73 61 5f 66 |ART) && |(sa.sa_f|
|00004bb0| 6c 61 67 73 20 26 20 53 | 41 5f 49 4e 54 45 52 52 |lags & S|A_INTERR|
|00004bc0| 55 50 54 29 29 0a 20 20 | 20 20 20 20 72 65 74 75 |UPT)). | retu|
|00004bd0| 72 6e 20 30 3b 0a 20 20 | 20 20 73 61 2e 73 61 5f |rn 0;. | sa.sa_|
|00004be0| 66 6c 61 67 73 20 7c 3d | 20 53 41 5f 49 4e 54 45 |flags |=| SA_INTE|
|00004bf0| 52 52 55 50 54 3b 0a 20 | 20 20 20 73 61 2e 73 61 |RRUPT;. | sa.sa|
|00004c00| 5f 66 6c 61 67 73 20 26 | 3d 20 7e 20 53 41 5f 52 |_flags &|= ~ SA_R|
|00004c10| 45 53 54 41 52 54 3b 0a | 23 65 6c 73 65 0a 20 20 |ESTART;.|#else. |
|00004c20| 20 20 69 66 20 28 73 61 | 2e 73 61 5f 66 6c 61 67 | if (sa|.sa_flag|
|00004c30| 73 20 26 20 53 41 5f 49 | 4e 54 45 52 52 55 50 54 |s & SA_I|NTERRUPT|
|00004c40| 29 20 72 65 74 75 72 6e | 20 30 3b 0a 20 20 20 20 |) return| 0;. |
|00004c50| 73 61 2e 73 61 5f 66 6c | 61 67 73 20 7c 3d 20 53 |sa.sa_fl|ags |= S|
|00004c60| 41 5f 49 4e 54 45 52 52 | 55 50 54 3b 0a 23 65 6e |A_INTERR|UPT;.#en|
|00004c70| 64 69 66 0a 20 20 7d 0a | 20 20 65 6c 73 65 20 7b |dif. }.| else {|
|00004c80| 0a 20 20 20 20 5f 5f 73 | 69 67 64 65 6c 73 65 74 |. __s|igdelset|
|00004c90| 20 28 26 5f 73 69 67 69 | 6e 74 72 2c 20 73 69 67 | (&_sigi|ntr, sig|
|00004ca0| 29 3b 0a 23 69 66 64 65 | 66 20 53 41 5f 52 45 53 |);.#ifde|f SA_RES|
|00004cb0| 54 41 52 54 0a 20 20 20 | 20 69 66 20 28 28 73 61 |TART. | if ((sa|
|00004cc0| 2e 73 61 5f 66 6c 61 67 | 73 20 26 20 53 41 5f 52 |.sa_flag|s & SA_R|
|00004cd0| 45 53 54 41 52 54 29 20 | 26 26 20 21 28 73 61 2e |ESTART) |&& !(sa.|
|00004ce0| 73 61 5f 66 6c 61 67 73 | 20 26 20 53 41 5f 49 4e |sa_flags| & SA_IN|
|00004cf0| 54 45 52 52 55 50 54 29 | 29 0a 20 20 20 20 20 20 |TERRUPT)|). |
|00004d00| 72 65 74 75 72 6e 20 30 | 3b 0a 20 20 20 20 73 61 |return 0|;. sa|
|00004d10| 2e 73 61 5f 66 6c 61 67 | 73 20 26 3d 20 7e 20 53 |.sa_flag|s &= ~ S|
|00004d20| 41 5f 49 4e 54 45 52 52 | 55 50 54 3b 0a 20 20 20 |A_INTERR|UPT;. |
|00004d30| 20 73 61 2e 73 61 5f 66 | 6c 61 67 73 20 7c 3d 20 | sa.sa_f|lags |= |
|00004d40| 53 41 5f 52 45 53 54 41 | 52 54 3b 0a 23 65 6c 73 |SA_RESTA|RT;.#els|
|00004d50| 65 0a 20 20 20 20 69 66 | 20 28 21 28 73 61 2e 73 |e. if| (!(sa.s|
|00004d60| 61 5f 66 6c 61 67 73 20 | 26 20 53 41 5f 49 4e 54 |a_flags |& SA_INT|
|00004d70| 45 52 52 55 50 54 29 29 | 20 72 65 74 75 72 6e 20 |ERRUPT))| return |
|00004d80| 30 3b 0a 20 20 20 20 73 | 61 2e 73 61 5f 66 6c 61 |0;. s|a.sa_fla|
|00004d90| 67 73 20 26 3d 20 7e 20 | 53 41 5f 49 4e 54 45 52 |gs &= ~ |SA_INTER|
|00004da0| 52 55 50 54 3b 0a 23 65 | 6e 64 69 66 0a 20 20 7d |RUPT;.#e|ndif. }|
|00004db0| 0a 20 20 72 65 74 75 72 | 6e 20 5f 5f 73 69 67 61 |. retur|n __siga|
|00004dc0| 63 74 69 6f 6e 20 28 73 | 69 67 2c 20 26 73 61 2c |ction (s|ig, &sa,|
|00004dd0| 20 28 73 74 72 75 63 74 | 20 73 69 67 61 63 74 69 | (struct| sigacti|
|00004de0| 6f 6e 20 2a 29 30 29 3b | 0a 7d 0a 00 00 00 00 00 |on *)0);|.}......|
|00004df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e00| 2e 2f 6c 69 62 63 2f 63 | 6f 6d 70 61 74 2f 00 00 |./libc/c|ompat/..|
|00004e10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e60| 00 00 00 00 20 34 30 37 | 35 35 20 00 20 20 31 36 |.... 407|55 . 16|
|00004e70| 37 36 20 00 20 20 20 33 | 33 34 20 00 20 20 20 20 |76 . 3|34 . |
|00004e80| 20 20 20 20 20 20 30 20 | 20 35 37 35 30 34 37 36 | 0 | 5750476|
|00004e90| 36 35 35 20 20 31 31 31 | 37 30 00 20 35 00 00 00 |655 111|70. 5...|
|00004ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f00| 00 75 73 74 61 72 20 20 | 00 68 6a 6c 00 00 00 00 |.ustar |.hjl....|
|00004f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f20| 00 00 00 00 00 00 00 00 | 00 69 73 6c 00 00 00 00 |........|.isl....|
|00004f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005000| 2e 2f 6c 69 62 63 2f 63 | 6f 6d 70 61 74 2f 69 33 |./libc/c|ompat/i3|
|00005010| 38 36 2f 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |86/.....|........|
|00005020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005060| 00 00 00 00 20 34 30 37 | 35 35 20 00 20 20 31 36 |.... 407|55 . 16|
|00005070| 37 36 20 00 20 20 20 33 | 33 34 20 00 20 20 20 20 |76 . 3|34 . |
|00005080| 20 20 20 20 20 20 30 20 | 20 35 37 35 30 34 37 36 | 0 | 5750476|
|00005090| 36 35 34 20 20 31 31 36 | 36 30 00 20 35 00 00 00 |654 116|60. 5...|
|000050a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005100| 00 75 73 74 61 72 20 20 | 00 68 6a 6c 00 00 00 00 |.ustar |.hjl....|
|00005110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005120| 00 00 00 00 00 00 00 00 | 00 69 73 6c 00 00 00 00 |........|.isl....|
|00005130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005200| 2e 2f 6c 69 62 63 2f 63 | 6f 6d 70 61 74 2f 69 33 |./libc/c|ompat/i3|
|00005210| 38 36 2f 4d 61 6b 65 66 | 69 6c 65 00 00 00 00 00 |86/Makef|ile.....|
|00005220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005260| 00 00 00 00 31 30 30 36 | 34 34 20 00 20 20 31 36 |....1006|44 . 16|
|00005270| 37 36 20 00 20 20 20 33 | 33 34 20 00 20 20 20 20 |76 . 3|34 . |
|00005280| 20 20 20 20 37 30 32 20 | 20 35 37 32 31 33 30 33 | 702 | 5721303|
|00005290| 32 33 35 20 20 31 33 33 | 35 32 00 20 30 00 00 00 |235 133|52. 0...|
|000052a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005300| 00 75 73 74 61 72 20 20 | 00 68 6a 6c 00 00 00 00 |.ustar |.hjl....|
|00005310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005320| 00 00 00 00 00 00 00 00 | 00 69 73 6c 00 00 00 00 |........|.isl....|
|00005330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005400| 23 0a 23 20 54 68 69 73 | 20 69 73 20 4d 61 6b 65 |#.# This| is Make|
|00005410| 66 69 6c 65 20 66 6f 72 | 20 73 6f 6d 65 20 6d 69 |file for| some mi|
|00005420| 73 63 20 66 75 6e 63 74 | 69 6f 6e 73 2e 0a 23 0a |sc funct|ions..#.|
|00005430| 0a 6f 76 65 72 72 69 64 | 65 20 53 48 41 52 45 44 |.overrid|e SHARED|
|00005440| 3d 74 72 75 65 0a 6f 76 | 65 72 72 69 64 65 20 53 |=true.ov|erride S|
|00005450| 54 41 54 49 43 3d 66 61 | 6c 73 65 0a 6f 76 65 72 |TATIC=fa|lse.over|
|00005460| 72 69 64 65 20 44 45 42 | 55 47 3d 66 61 6c 73 65 |ride DEB|UG=false|
|00005470| 0a 6f 76 65 72 72 69 64 | 65 20 50 52 4f 46 49 4c |.overrid|e PROFIL|
|00005480| 45 3d 66 61 6c 73 65 0a | 4a 55 4d 50 5f 4c 49 42 |E=false.|JUMP_LIB|
|00005490| 20 3d 20 6c 69 62 63 6f | 6d 70 61 74 0a 0a 54 4f | = libco|mpat..TO|
|000054a0| 50 44 49 52 3d 2e 2e 2f | 2e 2e 0a 0a 69 6e 63 6c |PDIR=../|....incl|
|000054b0| 75 64 65 20 24 28 54 4f | 50 44 49 52 29 2f 4d 61 |ude $(TO|PDIR)/Ma|
|000054c0| 6b 65 63 6f 6e 66 69 67 | 0a 69 6e 63 6c 75 64 65 |keconfig|.include|
|000054d0| 20 24 28 54 4f 50 44 49 | 52 29 2f 4d 61 6b 65 72 | $(TOPDI|R)/Maker|
|000054e0| 75 6c 65 73 0a 0a 53 48 | 41 52 45 44 5f 4c 49 42 |ules..SH|ARED_LIB|
|000054f0| 3d 24 28 53 48 41 52 45 | 44 5f 44 49 52 29 2f 6c |=$(SHARE|D_DIR)/l|
|00005500| 69 62 63 6f 6d 70 61 74 | 2f 6c 69 62 63 6f 6d 70 |ibcompat|/libcomp|
|00005510| 61 74 2e 61 0a 2e 50 48 | 4f 4e 59 3a 20 24 28 53 |at.a..PH|ONY: $(S|
|00005520| 48 41 52 45 44 5f 4c 49 | 42 29 0a 0a 49 4e 43 5f |HARED_LI|B)..INC_|
|00005530| 43 46 4c 41 47 53 3d 0a | 0a 44 49 52 53 3a 3d 0a |CFLAGS=.|.DIRS:=.|
|00005540| 0a 53 52 43 53 3d 20 5f | 5f 6f 6c 64 5f 73 69 67 |.SRCS= _|_old_sig|
|00005550| 6a 6d 70 2e 63 20 5f 5f | 6f 6c 64 5f 5f 75 6e 61 |jmp.c __|old__una|
|00005560| 6d 65 2e 63 20 5f 5f 6f | 6c 64 5f 5f 67 68 6e 2e |me.c __o|ld__ghn.|
|00005570| 63 0a 41 53 4d 53 3d 20 | 24 28 53 52 43 53 3a 2e |c.ASMS= |$(SRCS:.|
|00005580| 63 3d 2e 73 29 0a 4f 42 | 4a 53 3d 20 24 28 53 52 |c=.s).OB|JS= $(SR|
|00005590| 43 53 3a 2e 63 3d 2e 6f | 29 0a 41 4c 49 41 53 45 |CS:.c=.o|).ALIASE|
|000055a0| 53 3d 0a 0a 69 6e 63 6c | 75 64 65 20 24 28 54 4f |S=..incl|ude $(TO|
|000055b0| 50 44 49 52 29 2f 4d 61 | 6b 65 74 61 72 67 65 74 |PDIR)/Ma|ketarget|
|000055c0| 73 0a 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |s.......|........|
|000055d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000055e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000055f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005600| 2e 2f 6c 69 62 63 2f 63 | 6f 6d 70 61 74 2f 69 33 |./libc/c|ompat/i3|
|00005610| 38 36 2f 5f 5f 6f 6c 64 | 5f 5f 67 68 6e 2e 63 00 |86/__old|__ghn.c.|
|00005620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005660| 00 00 00 00 31 30 30 36 | 34 34 20 00 20 20 31 36 |....1006|44 . 16|
|00005670| 37 36 20 00 20 20 20 33 | 33 34 20 00 20 20 20 20 |76 . 3|34 . |
|00005680| 20 20 20 20 36 30 36 20 | 20 35 37 32 31 33 30 33 | 606 | 5721303|
|00005690| 32 33 35 20 20 31 34 31 | 33 30 00 20 30 00 00 00 |235 141|30. 0...|
|000056a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000056b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000056c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000056d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000056e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000056f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005700| 00 75 73 74 61 72 20 20 | 00 68 6a 6c 00 00 00 00 |.ustar |.hjl....|
|00005710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005720| 00 00 00 00 00 00 00 00 | 00 69 73 6c 00 00 00 00 |........|.isl....|
|00005730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000057a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000057b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000057c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000057d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000057e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000057f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005800| 23 69 6e 63 6c 75 64 65 | 20 3c 73 74 72 69 6e 67 |#include| <string|
|00005810| 2e 68 3e 0a 23 69 6e 63 | 6c 75 64 65 20 3c 75 6e |.h>.#inc|lude <un|
|00005820| 69 73 74 64 2e 68 3e 0a | 23 69 6e 63 6c 75 64 65 |istd.h>.|#include|
|00005830| 20 3c 6c 69 6e 75 78 2f | 75 74 73 6e 61 6d 65 2e | <linux/|utsname.|
|00005840| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 3c 65 72 72 |h>.#incl|ude <err|
|00005850| 6e 6f 2e 68 3e 0a 0a 69 | 6e 74 0a 5f 5f 6f 6c 64 |no.h>..i|nt.__old|
|00005860| 5f 5f 67 65 74 68 6f 73 | 74 6e 61 6d 65 28 63 68 |__gethos|tname(ch|
|00005870| 61 72 20 2a 6e 61 6d 65 | 2c 20 73 69 7a 65 5f 74 |ar *name|, size_t|
|00005880| 20 6c 65 6e 29 0a 7b 0a | 20 20 73 74 72 75 63 74 | len).{.| struct|
|00005890| 20 6f 6c 64 5f 75 74 73 | 6e 61 6d 65 20 75 74 73 | old_uts|name uts|
|000058a0| 3b 0a 0a 20 20 69 66 20 | 28 6e 61 6d 65 20 3d 3d |;.. if |(name ==|
|000058b0| 20 4e 55 4c 4c 29 20 7b | 0a 20 20 20 20 65 72 72 | NULL) {|. err|
|000058c0| 6e 6f 20 3d 20 45 49 4e | 56 41 4c 3b 0a 20 20 20 |no = EIN|VAL;. |
|000058d0| 20 72 65 74 75 72 6e 20 | 2d 31 3b 0a 20 20 7d 0a | return |-1;. }.|
|000058e0| 0a 20 20 69 66 20 28 5f | 5f 6f 6c 64 5f 5f 75 6e |. if (_|_old__un|
|000058f0| 61 6d 65 28 26 75 74 73 | 29 20 3d 3d 20 2d 31 29 |ame(&uts|) == -1)|
|00005900| 20 72 65 74 75 72 6e 20 | 2d 31 3b 0a 0a 20 20 69 | return |-1;.. i|
|00005910| 66 20 28 73 74 72 6c 65 | 6e 28 75 74 73 2e 6e 6f |f (strle|n(uts.no|
|00005920| 64 65 6e 61 6d 65 29 2b | 31 20 3e 20 6c 65 6e 29 |dename)+|1 > len)|
|00005930| 20 7b 0a 20 20 20 20 65 | 72 72 6e 6f 20 3d 20 45 | {. e|rrno = E|
|00005940| 49 4e 56 41 4c 3b 0a 20 | 20 20 20 72 65 74 75 72 |INVAL;. | retur|
|00005950| 6e 20 2d 31 3b 0a 20 20 | 7d 0a 20 20 73 74 72 63 |n -1;. |}. strc|
|00005960| 70 79 28 6e 61 6d 65 2c | 20 75 74 73 2e 6e 6f 64 |py(name,| uts.nod|
|00005970| 65 6e 61 6d 65 29 3b 0a | 20 20 72 65 74 75 72 6e |ename);.| return|
|00005980| 20 30 3b 0a 7d 0a 00 00 | 00 00 00 00 00 00 00 00 | 0;.}...|........|
|00005990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a00| 2e 2f 6c 69 62 63 2f 63 | 6f 6d 70 61 74 2f 69 33 |./libc/c|ompat/i3|
|00005a10| 38 36 2f 5f 5f 6f 6c 64 | 5f 5f 75 6e 61 6d 65 2e |86/__old|__uname.|
|00005a20| 63 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |c.......|........|
|00005a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a60| 00 00 00 00 31 30 30 36 | 34 34 20 00 20 20 31 36 |....1006|44 . 16|
|00005a70| 37 36 20 00 20 20 20 33 | 33 34 20 00 20 20 20 20 |76 . 3|34 . |
|00005a80| 20 20 20 20 37 30 31 20 | 20 35 37 32 31 33 30 33 | 701 | 5721303|
|00005a90| 32 33 35 20 20 31 34 34 | 35 35 00 20 30 00 00 00 |235 144|55. 0...|
|00005aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b00| 00 75 73 74 61 72 20 20 | 00 68 6a 6c 00 00 00 00 |.ustar |.hjl....|
|00005b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b20| 00 00 00 00 00 00 00 00 | 00 69 73 6c 00 00 00 00 |........|.isl....|
|00005b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005c00| 23 69 6e 63 6c 75 64 65 | 20 3c 65 72 72 6e 6f 2e |#include| <errno.|
|00005c10| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 3c 6c 69 6e |h>.#incl|ude <lin|
|00005c20| 75 78 2f 75 74 73 6e 61 | 6d 65 2e 68 3e 0a 23 69 |ux/utsna|me.h>.#i|
|00005c30| 6e 63 6c 75 64 65 20 3c | 73 79 73 2f 73 79 73 63 |nclude <|sys/sysc|
|00005c40| 61 6c 6c 2e 68 3e 0a 0a | 69 6e 74 0a 5f 5f 6f 6c |all.h>..|int.__ol|
|00005c50| 64 5f 5f 75 6e 61 6d 65 | 20 28 73 74 72 75 63 74 |d__uname| (struct|
|00005c60| 20 6f 6c 64 5f 75 74 73 | 6e 61 6d 65 20 2a 62 75 | old_uts|name *bu|
|00005c70| 66 29 0a 7b 0a 09 72 65 | 67 69 73 74 65 72 20 69 |f).{..re|gister i|
|00005c80| 6e 74 20 72 65 73 3b 0a | 0a 23 69 66 20 64 65 66 |nt res;.|.#if def|
|00005c90| 69 6e 65 64 28 5f 5f 50 | 49 43 5f 5f 29 20 7c 7c |ined(__P|IC__) |||
|00005ca0| 20 64 65 66 69 6e 65 64 | 28 5f 5f 70 69 63 5f 5f | defined|(__pic__|
|00005cb0| 29 0a 09 5f 5f 61 73 6d | 5f 5f 28 22 70 75 73 68 |)..__asm|__("push|
|00005cc0| 6c 20 25 25 65 62 78 5c | 6e 5c 74 22 0a 09 09 22 |l %%ebx\|n\t"..."|
|00005cd0| 6d 6f 76 6c 20 25 25 65 | 63 78 2c 25 25 65 62 78 |movl %%e|cx,%%ebx|
|00005ce0| 5c 6e 5c 74 22 0a 09 09 | 22 69 6e 74 20 24 30 78 |\n\t"...|"int $0x|
|00005cf0| 38 30 5c 6e 5c 74 22 0a | 09 09 22 70 6f 70 6c 20 |80\n\t".|.."popl |
|00005d00| 25 25 65 62 78 22 0a 09 | 09 3a 22 3d 61 22 20 28 |%%ebx"..|.:"=a" (|
|00005d10| 72 65 73 29 0a 09 09 3a | 22 30 22 20 28 53 59 53 |res)...:|"0" (SYS|
|00005d20| 5f 6f 6c 64 75 6e 61 6d | 65 29 2c 22 63 22 20 28 |_oldunam|e),"c" (|
|00005d30| 62 75 66 29 29 3b 0a 23 | 65 6c 73 65 0a 09 5f 5f |buf));.#|else..__|
|00005d40| 61 73 6d 5f 5f 28 22 69 | 6e 74 20 24 30 78 38 30 |asm__("i|nt $0x80|
|00005d50| 22 0a 09 09 3a 22 3d 61 | 22 20 28 72 65 73 29 0a |"...:"=a|" (res).|
|00005d60| 09 09 3a 22 30 22 20 28 | 53 59 53 5f 6f 6c 64 75 |..:"0" (|SYS_oldu|
|00005d70| 6e 61 6d 65 29 2c 22 62 | 22 20 28 62 75 66 29 29 |name),"b|" (buf))|
|00005d80| 3b 0a 23 65 6e 64 69 66 | 0a 09 69 66 20 28 72 65 |;.#endif|..if (re|
|00005d90| 73 3e 3d 30 29 0a 09 09 | 72 65 74 75 72 6e 20 72 |s>=0)...|return r|
|00005da0| 65 73 3b 0a 09 65 72 72 | 6e 6f 20 3d 20 2d 72 65 |es;..err|no = -re|
|00005db0| 73 3b 0a 09 72 65 74 75 | 72 6e 20 2d 31 3b 0a 7d |s;..retu|rn -1;.}|
|00005dc0| 0a 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e00| 2e 2f 6c 69 62 63 2f 63 | 6f 6d 70 61 74 2f 69 33 |./libc/c|ompat/i3|
|00005e10| 38 36 2f 5f 5f 6f 6c 64 | 5f 73 69 67 6a 6d 70 2e |86/__old|_sigjmp.|
|00005e20| 63 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |c.......|........|
|00005e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e60| 00 00 00 00 31 30 30 36 | 34 34 20 00 20 20 31 36 |....1006|44 . 16|
|00005e70| 37 36 20 00 20 20 20 33 | 33 34 20 00 20 20 20 20 |76 . 3|34 . |
|00005e80| 20 20 20 33 33 33 34 20 | 20 35 37 32 31 33 30 33 | 3334 | 5721303|
|00005e90| 32 33 35 20 20 31 34 35 | 32 37 00 20 30 00 00 00 |235 145|27. 0...|
|00005ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f00| 00 75 73 74 61 72 20 20 | 00 68 6a 6c 00 00 00 00 |.ustar |.hjl....|
|00005f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f20| 00 00 00 00 00 00 00 00 | 00 69 73 6c 00 00 00 00 |........|.isl....|
|00005f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006000| 2f 2a 20 43 6f 70 79 72 | 69 67 68 74 20 28 43 29 |/* Copyr|ight (C)|
|00006010| 20 31 39 39 31 2c 20 31 | 39 39 32 20 46 72 65 65 | 1991, 1|992 Free|
|00006020| 20 53 6f 66 74 77 61 72 | 65 20 46 6f 75 6e 64 61 | Softwar|e Founda|
|00006030| 74 69 6f 6e 2c 20 49 6e | 63 2e 0a 54 68 69 73 20 |tion, In|c..This |
|00006040| 66 69 6c 65 20 69 73 20 | 70 61 72 74 20 6f 66 20 |file is |part of |
|00006050| 74 68 65 20 47 4e 55 20 | 43 20 4c 69 62 72 61 72 |the GNU |C Librar|
|00006060| 79 2e 0a 0a 54 68 65 20 | 47 4e 55 20 43 20 4c 69 |y...The |GNU C Li|
|00006070| 62 72 61 72 79 20 69 73 | 20 66 72 65 65 20 73 6f |brary is| free so|
|00006080| 66 74 77 61 72 65 3b 20 | 79 6f 75 20 63 61 6e 20 |ftware; |you can |
|00006090| 72 65 64 69 73 74 72 69 | 62 75 74 65 20 69 74 20 |redistri|bute it |
|000060a0| 61 6e 64 2f 6f 72 0a 6d | 6f 64 69 66 79 20 69 74 |and/or.m|odify it|
|000060b0| 20 75 6e 64 65 72 20 74 | 68 65 20 74 65 72 6d 73 | under t|he terms|
|000060c0| 20 6f 66 20 74 68 65 20 | 47 4e 55 20 4c 69 62 72 | of the |GNU Libr|
|000060d0| 61 72 79 20 47 65 6e 65 | 72 61 6c 20 50 75 62 6c |ary Gene|ral Publ|
|000060e0| 69 63 20 4c 69 63 65 6e | 73 65 20 61 73 0a 70 75 |ic Licen|se as.pu|
|000060f0| 62 6c 69 73 68 65 64 20 | 62 79 20 74 68 65 20 46 |blished |by the F|
|00006100| 72 65 65 20 53 6f 66 74 | 77 61 72 65 20 46 6f 75 |ree Soft|ware Fou|
|00006110| 6e 64 61 74 69 6f 6e 3b | 20 65 69 74 68 65 72 20 |ndation;| either |
|00006120| 76 65 72 73 69 6f 6e 20 | 32 20 6f 66 20 74 68 65 |version |2 of the|
|00006130| 0a 4c 69 63 65 6e 73 65 | 2c 20 6f 72 20 28 61 74 |.License|, or (at|
|00006140| 20 79 6f 75 72 20 6f 70 | 74 69 6f 6e 29 20 61 6e | your op|tion) an|
|00006150| 79 20 6c 61 74 65 72 20 | 76 65 72 73 69 6f 6e 2e |y later |version.|
|00006160| 0a 0a 54 68 65 20 47 4e | 55 20 43 20 4c 69 62 72 |..The GN|U C Libr|
|00006170| 61 72 79 20 69 73 20 64 | 69 73 74 72 69 62 75 74 |ary is d|istribut|
|00006180| 65 64 20 69 6e 20 74 68 | 65 20 68 6f 70 65 20 74 |ed in th|e hope t|
|00006190| 68 61 74 20 69 74 20 77 | 69 6c 6c 20 62 65 20 75 |hat it w|ill be u|
|000061a0| 73 65 66 75 6c 2c 0a 62 | 75 74 20 57 49 54 48 4f |seful,.b|ut WITHO|
|000061b0| 55 54 20 41 4e 59 20 57 | 41 52 52 41 4e 54 59 3b |UT ANY W|ARRANTY;|
|000061c0| 20 77 69 74 68 6f 75 74 | 20 65 76 65 6e 20 74 68 | without| even th|
|000061d0| 65 20 69 6d 70 6c 69 65 | 64 20 77 61 72 72 61 6e |e implie|d warran|
|000061e0| 74 79 20 6f 66 0a 4d 45 | 52 43 48 41 4e 54 41 42 |ty of.ME|RCHANTAB|
|000061f0| 49 4c 49 54 59 20 6f 72 | 20 46 49 54 4e 45 53 53 |ILITY or| FITNESS|
|00006200| 20 46 4f 52 20 41 20 50 | 41 52 54 49 43 55 4c 41 | FOR A P|ARTICULA|
|00006210| 52 20 50 55 52 50 4f 53 | 45 2e 20 20 53 65 65 20 |R PURPOS|E. See |
|00006220| 74 68 65 20 47 4e 55 0a | 4c 69 62 72 61 72 79 20 |the GNU.|Library |
|00006230| 47 65 6e 65 72 61 6c 20 | 50 75 62 6c 69 63 20 4c |General |Public L|
|00006240| 69 63 65 6e 73 65 20 66 | 6f 72 20 6d 6f 72 65 20 |icense f|or more |
|00006250| 64 65 74 61 69 6c 73 2e | 0a 0a 59 6f 75 20 73 68 |details.|..You sh|
|00006260| 6f 75 6c 64 20 68 61 76 | 65 20 72 65 63 65 69 76 |ould hav|e receiv|
|00006270| 65 64 20 61 20 63 6f 70 | 79 20 6f 66 20 74 68 65 |ed a cop|y of the|
|00006280| 20 47 4e 55 20 4c 69 62 | 72 61 72 79 20 47 65 6e | GNU Lib|rary Gen|
|00006290| 65 72 61 6c 20 50 75 62 | 6c 69 63 0a 4c 69 63 65 |eral Pub|lic.Lice|
|000062a0| 6e 73 65 20 61 6c 6f 6e | 67 20 77 69 74 68 20 74 |nse alon|g with t|
|000062b0| 68 65 20 47 4e 55 20 43 | 20 4c 69 62 72 61 72 79 |he GNU C| Library|
|000062c0| 3b 20 73 65 65 20 74 68 | 65 20 66 69 6c 65 20 43 |; see th|e file C|
|000062d0| 4f 50 59 49 4e 47 2e 4c | 49 42 2e 20 20 49 66 0a |OPYING.L|IB. If.|
|000062e0| 6e 6f 74 2c 20 77 72 69 | 74 65 20 74 6f 20 74 68 |not, wri|te to th|
|000062f0| 65 20 46 72 65 65 20 53 | 6f 66 74 77 61 72 65 20 |e Free S|oftware |
|00006300| 46 6f 75 6e 64 61 74 69 | 6f 6e 2c 20 49 6e 63 2e |Foundati|on, Inc.|
|00006310| 2c 20 36 37 35 20 4d 61 | 73 73 20 41 76 65 2c 0a |, 675 Ma|ss Ave,.|
|00006320| 43 61 6d 62 72 69 64 67 | 65 2c 20 4d 41 20 30 32 |Cambridg|e, MA 02|
|00006330| 31 33 39 2c 20 55 53 41 | 2e 20 20 2a 2f 0a 0a 23 |139, USA|. */..#|
|00006340| 69 6e 63 6c 75 64 65 20 | 3c 61 6e 73 69 64 65 63 |include |<ansidec|
|00006350| 6c 2e 68 3e 0a 23 69 6e | 63 6c 75 64 65 20 3c 73 |l.h>.#in|clude <s|
|00006360| 74 64 64 65 66 2e 68 3e | 0a 23 69 6e 63 6c 75 64 |tddef.h>|.#includ|
|00006370| 65 20 3c 73 65 74 6a 6d | 70 2e 68 3e 0a 23 69 6e |e <setjm|p.h>.#in|
|00006380| 63 6c 75 64 65 20 3c 73 | 69 67 6e 61 6c 2e 68 3e |clude <s|ignal.h>|
|00006390| 0a 0a 2f 2a 20 53 74 6f | 72 65 20 74 68 65 20 63 |../* Sto|re the c|
|000063a0| 61 6c 6c 69 6e 67 20 65 | 6e 76 69 72 6f 6e 6d 65 |alling e|nvironme|
|000063b0| 6e 74 20 69 6e 20 45 4e | 56 2c 20 61 6c 73 6f 20 |nt in EN|V, also |
|000063c0| 73 61 76 69 6e 67 20 74 | 68 65 0a 20 20 20 73 69 |saving t|he. si|
|000063d0| 67 6e 61 6c 20 6d 61 73 | 6b 20 69 66 20 53 41 56 |gnal mas|k if SAV|
|000063e0| 45 4d 41 53 4b 20 69 73 | 20 6e 6f 6e 7a 65 72 6f |EMASK is| nonzero|
|000063f0| 2e 20 20 52 65 74 75 72 | 6e 20 30 2e 20 20 2a 2f |. Retur|n 0. */|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.