#! /bin/sh # # This is patch #6 to gawk 3.1. cd to gawk-3.1.5 and sh this file. # Then remove all the .orig files and rename the directory gawk-3.1.6. # Changes to files that are automatically recreated have been omitted. # They will be recreated the first time you run make. # This includes all the extracted example files in awklib. # First, slight rearranging rm -f ABOUT-NLS ansi2knr.1 ansi2knr.c configure COPYING rm -f missing_d/memmove.c missing_d/strncasecmp.c cd README_d mkdir OBSOLETE mv README.FIRST README.linux README.sco README.sony README.ultrix README.yacc OBSOLETE cd .. # Update a binary file cd doc rm -f statist.pdf cat << \EOF > statist.uu begin 644 statist.pdf M)5!$1BTQ+C,*)SV%.ON**,,A.>04 MUP0(TKBQ?5VUK+!6L8G M?C]T?OJZ0%G_76#]>V&AM6I9+TM#TE@F^7IQ7\ MSOGSX;+^\F#WMK] Z\-?RW2$M=*FHO:+F\4OR\N?RH9W#_\LOSZLK]T<*G&X MNPS["+M_QBV!"#\C X"^]4RAWJ10:^E9@"&S C,\2Q#Q48,9?DX1H&V8*)/POR6@E2;A[S+\(^S^&3?_ M")_V;Z5:*T[_VR:0@C7\789_A-T_X^8?X?/^7;<6_G3; =[7#B*-*E_EY.7I MK4<4Z.0$(-FJ\MJS_^$@#QI"6+N3PY]V^-M6P=SGM M78:]Z[!W?=J^-MIZT=W^V#R*3;+I[G*ZNPQWU^'N^K0[2MG:E?NQ]^L1[X.& M\'OHO &F^YS(YT^^;F1#)]VA_, ?9!5L)"#Z5*G093#@#5#M MH)'%[U/5V! =.52L;".O5ZY-!;R]RPE#UG+ RY M%RR=-;'RU:R5E8^SAHA%LK:(7++FB'T_"[L%YQDAR7YVR!7R M3)$;_OC@?[26&$PYBE,\"T6!6Q2/9]_O5H2UEO4/N^#/@%+X@'+H6RCM('8H MIJ$#W%X.B<1;N MVVB<7??[-+O,SL#7"(ZSF_L2&"!; M," P(#4P-" W,C!="B]2;W1A=&4@,"]087)E;G0@,R P(%(*+U)E"]S979E;B]E:6=H="]N:6YE+V5Q=6%L+V$O92]L+VTO M<"]S+W8I"B]&;VYT1FEL93,@." P(%(^/@IE;F1O8FH*." P(&]B:@H\/"]3 M=6)T>7!E+U1Y<&4Q0R]&:6QT97(O1FQA=&5$96-O9&4O3&5N9W1H(#$S(# @ M4CX^M695E<(JRKU>X*K$(K( \K(%4I%94 0DF,58IK M5]ISA_YTSTZL/7OVG#G__/^=N??^]_N^>TG"WHX@27).9/3OPG^K\@S3ZO*U MAHP=:IO1C72"@KGLZJ6N PX@CM<^"/LV'?6X2( M) M*RS?FY!;F9:2E&^3N6V(3/#P]O?YG\0D,#)1O+_SUBWR35I^1EBU?+&SR MM;JIBO,3=?+U1J-5F-SBU?KM)GRD Q=1FYN3K[< M?:.'W-?;VV>IL/A&9F1MWZ.7QZFS]7*E/%:;MD>GSOL_(T$0TERM/E^GSO)S M]_<(6"%?^<[2P&7>/@I?@H@A0HC-1 *A(C80D<1<8AK!$M.)>824( DG8CXA M(9R)V<04)D+":8_I@4P#886Y3;*9*(V.N#@0Y,'=@GY+]MG,5GH-G1*[R]HL9 MA-DP^]:@A;.%[H>P'O#O)TM&1?PI.,2BP:.-!^HR1E>W>" :+UZ*[?$ZO.[I M;\ -9@[W &7D5E*&D.2T,!2/ME;G-.S]Y/U/BEOHTA[VY'A']PBB'W>'!A2A MHN(B(?P'AG[>JY\L,\-ALXB/X"5L\:O06WB6$%FR1KDD\)H&WLKB3 6W#E;E M(^W\I*1=&[9JR\[ERPZ5'RT_5D/[42?PK)X86"B4Z#1RYWM3:KWK7[G5?PG] M<_8Y5#._L?Y2S[TKV9M+94(J9.3W5I)0.P]2>*-X*87=IQ18SBN$+2BGC&() MY"'CY*9*$HV(P&LRBUWY<]8(98.@-[B/]^YW1&8H&Y8R!?SE)I;YK.CP<73, M)7M_^7D.NAR>A39C=JURCR9=IL]]+ZLH@1ZA3GY9>]&$Z(?7=Z-^O-M:U=8A^RC^O+X-5:"RTK^=%'"%4!;E M'-F79\C0;=^?A.@([:76]IH+3\HXRYFS)RZ4T9+)!T)%,7TVVD<@U_9(F:9> MWLA.&4?@L0,S]*B]J^?V/[1A,ORSS6 [=EW1A-N._$*'YUM:/(+5^=%),MU- M=74H"D8IN[)E#M RP.(\"O*@6_PF%2P< M$CW#Z>Q+D'9#! (?!+Y*B' #*;V9LF#7)KP&87^$_9*PP@^_3B5 9#;!;_EXAU#76&;'H[6B59U!RW6"^@-*9F%,YQMW_ MW')?-RB@Y/IR I: ?-EW>$'BCD-9V[D+D"2&1NJ7T%VF8>.HB2QY O5"]&," MK?N 7OL5)I "!6O5RM20O<)U6(1GG%U[35D;>UMGLK7Y^$O@P,GG&6:"-^9D[R>(8*87@BU M5-CJR/;G&0HK\-$0[!Z/#]+/J3K8^P02P!\RWI1^^0'H38[(&F&%8F&1,J]X M%WX:RXSW-51?N><,(G\3=L1S_!18%%Z==G^KC'FU2K,C6N&,Y[WP 3G(7UB! M'=C1$5@GPS2<%AP?-J:&A">EKE^?U'"OIZGA 8>;[9E7ELZX=U9&Q?D$1'TQ M/-QY4YA), KOWR>A!NZP^/!&./P&L%@3W.XGD=6&5RNL8"LP_2@$"&1"7]=> M[?[LJTHS A;!C,)'ZF[-%ZI+"F'&N"QQPQQVLBZ#N?>:JML_YXKQ^CC/Q4B% MMM4=[*%A+K^+?7P[=+E_I"I@17S'F+7SSI -+C1!H@D1Q$VPKJX3K_/W\2:3 M+7F-5007! C#453VSJ04E<$+"6K%1P8Q UZPY#$P[Y-_E*VLSGZ0ABB M%?9CUSUQ+$Y)6>JQ+/D%Q$/\];$Q[C4CD]Z",GT$(9_A2]FI4LMD8HR##I-[ M#^ %^VBET*=#(.K]=R_)7X(?V:F"8+Z >MO^E[?-W\Q?ZR=YJ:"?#\WLU#3J MXUN7:\PW7K8Y_:OM1A\RHPY]N[I679MP-@SYH+!,352>]MW4HHVTA?JP\:.+ M9ZJJZC\_WXKHP<[8M7&[?J],XY8G8/>5V\*.8._YO(Z2&*IX8R6H*I55E&GZ M\ S3'V;._.;CF;,(XK]OV=8N"F5N9'-TF4@,30@ M+U)O;W0@,2 P(%(@+TEN9F\@,B P(%(*/CX* + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff -urN gawk-3.1.5/ChangeLog gawk-3.1.6/ChangeLog --- gawk-3.1.5/ChangeLog 2005-07-26 21:46:32.000000000 +0300 +++ gawk-3.1.6/ChangeLog 2007-10-22 08:50:42.000000000 +0200 @@ -1,3 +1,768 @@ +Mon Oct 22 08:49:05 2007 Arnold D. Robbins + + * Release 3.1.6: Release tar file made. + +Sun Oct 14 23:19:12 2007 Ralf Wildenhues + + * Makefile.am: Avoid GNU make-specific `make -C'. + +Sun Oct 14 19:37:01 2007 Arnold D. Robbins + + * configure.ac: Add check for `atexit', needed by replacement + version of `snprintf'. + +Sun Sep 30 21:50:59 2007 Arnold D. Robbins + + Rationalize locale's influence on %'g, strtonum, and input. + + * awk.h (use_lc_numeric): Add declaration. + * builtin.c (format_tree): Add check for quote_flag and set + LC_NUMERIC so that The Right Thing gets done, then reset it. + (do_strtonum): Pass use_lc_numeric as second arg to isnondecimal. + * main.c (main): Have do_posix set use_lc_numeric also. + +Thu Sep 27 21:36:23 2007 Stepan Kasal + + * configure.ac: Do not instantiate version.c; remove the hack + to keep version.c from being removed upon `make distclean'. + * Makefile.am (version.c): New rule. + (.c.i, SUFFIXES): Remove, `.i' is unused. + (MAINTAINERCLEANFILES): Remove awkgram.c; Automake takes care of that. + +Wed Sep 26 14:40:13 2007 Eli Zaretskii + + * builtin.c (format_tree): Handle non-standard snprintf that + returns a negative value when the buffer is too small. + +Tue Sep 25 23:27:41 2007 Arnold D. Robbins + + * ChangeLog: Removed all leading spaces. Fixed up formatting of + entries to have capital letter after the colon. Fixed a number of + entries to have the '*' in the right place. ASCII instead of ascii. + Capitalize Linux. (Is this anal-retentive or what? Sheesh.) + +Tue Sep 25 08:24:11 2007 KIMURA Koichi + + * awk.h: Add include of for Visual Studio. + * regex_internal.h: Do the right thing for replacing alloca. + +Sat Sep 22 23:26:27 2007 Arnold D. Robbins + + * field.c (set_FIELDWIDTHS): Restore behavior of 3.1.4 that allowed + FIELDWIDTHS to be "" without crashing, and such a value has NF = 0. + Yet Another Dark Corner. Thanks to Glenn Zazulia + for pointing out the problem. + + Unrelated: + + * builtin.c (format_free): Make `quote_flag' not sticky. Thanks to + Ulrich Drepper for pointing this out. + * main.c (main): Adjust calls to `setlocale' and `localeconv' so that + the %'d flag will work even if not using the locale's decimal point. + +Thu Sep 20 21:02:41 2007 Arnold D. Robbins + + * array.c (hash, awk_hash, gst_hash_string): Add fourth argument + pointer to retrieve code. Only assign a value if not NULL. + Fix most places to pass NULL for fourth argument. + (assoc_lookup): Save the code in the node for use in growing the + array later. + (grow_table): Use the saved code instead of recomputing each time. + * awk.h (NODE hash): Add `code' member and `ahcode' macro. + (hash): Revise declaration. + * awkgram.y: Revise calls to `hash'. + +Tue Aug 21 17:47:07 2007 Arnold D. Robbins + + * main.c (copyleft): Cite version 3 of the license. + * dfa.c: Minor edits to sync with grep 2.5.3. + +Sat Aug 11 22:48:11 2007 Arnold D. Robbins + + * COPYING: Replaced with GPL 3. + * All other relevent files: Upgraded to GPL 3. + +Fri Aug 3 15:01:38 2007 Andrew J. Schorr + + * builtin.c (format_tree): Free `obuf' before call to `fatal' + to keep valgrind happy. + +Mon Jun 4 01:12:21 2007 Arnold D. Robbins + + * All relevant files: Updated copyright year to 2007. + +Mon May 28 08:06:15 2007 Arnold D. Robbins + + * main.c (use_lc_numeric): New variable, true for new + option `--use-lc-numeric'. + (optab): Add option "use-lc-numeric". + (usage): Add to usage message. + (main): Allow the --use-lc-numeric option to also use the + local decimal point. + +Fri May 18 16:26:00 2007 Arnold D. Robbins + + * awk.h (_TANDME_SOURCE): Add test for ! _SCO_DS for + SCO systems. Thanks to John DuBois + +Tue May 15 13:14:04 2007 Arnold D. Robbins + + General capability suggested by Michael May . + + * configure.ac: New option --disable-directories-fatal. Makes gawk + silently skip directories on the command line. + * io.c (iop_open): Add fourth parameter, pointer to flag which is set + to true if the file is a directory. In this case, close the fd and + return NULL. + (nextfile): Modify call to iop_open. Add logic to check for directory + and skip if --disable-directories-fatal was used. If the configure flag + was not used, then if do_traditional also skip. + (redirect): Modify call to iop_open and call fatal if isdir is true. + +Mon May 7 14:51:54 2007 Arnold D. Robbins + + * POSIX.STD: Updated. + +Wed May 2 19:29:56 2007 Stepan Kasal + + Revert precedence of concatenation and | getline. + From mail dated 2005-10-31. + + * awkgram.y (common_exp): Move the two rules for naked regexp and + the rule for "(...) in arr" to ... + (non_post_simp_exp): ... here ... + (simp_exp): ... and here, respectively. Fixes test/parsefld.awk/. + (simp_exp_nc): New nonterminal, needed to fix the + precedence of concatenation over "|getline". + (common_exp): Can also start with simp_exp_nc. + +Tue May 1 19:53:11 2007 Arnold D. Robbins + + Work around problem with /ab{0}c/. + * dfa.h (struct dfa): Add member `broken'. + * dfa.c (dfainit): Initialize it to false. + (lex): Set it if `minrep == maxrep && minrep == 0'. + * re.c (avoid_dfa): Check flag and return TRUE if set. + +Tue May 1 05:34:53 2007 Arnold D. Robbins + + * configure.ac: Add calls to AM_LANGINFO_CODESET, and gt_LC_MESSAGES. + Thanks to Matthew Burgess . + +Sun Apr 29 22:55:12 2007 Arnold D. Robbins + + * regcomp.c (utf8_sb_map): Remove const if not __GNUC__ >= 3. + * regex_internal.h (re_dfa_t): Bracket bizarre macro call with + check for _LIBC. + Thanks to Nelson Beebe for finding both problems. + +Sun Apr 29 13:10:31 2007 Arnold D. Robbins + + * builtin.c (do_strftime): Add optional third argument to strftime() + which if non-zero or non-null means to use UTC. + * awkgram.y (tokentab): Allow three arguments to strftime. + +Fri Apr 27 11:44:27 2007 Arnold D. Robbins + + * README.cvs, bootstrap.sh: Added to CVS archive, not for + inclusion in tarballs. + +Fri Apr 20 16:48:30 2007 Pat Rankin + + * awk.h: Move inclusion of redirect.h before HAVE_func blocks. + +Tue Apr 24 21:55:36 2007 Arnold D. Robbins + + * re.c (research): In the multibyte case, fall back to the full + matcher if need_start, since there are bugs in the dfa matcher + in some obscure cases. Sigh. + * builtin.c (format_tree): When using %.0f instead of %d, assert + that we're not malloc-ing zero. + +Tue Apr 17 21:51:40 2007 Arnold D. Robbins + + Portability fixes for lsbcc from Nelson Beebe. + + * configure.ac: Check for stddef.h header. + * regex.h: Use check and include header to get size_t definition. + * main.c: Update UPDATE_YEAR, add #ifdef for HAVE_MTRACE. + +Tue Apr 17 13:49:13 2007 Arnold D. Robbins + + * configure.ac: Add test for struct sockaddr_storage. + * io.c: Add macro to redefine sockaddr_storage as sockaddr. + +Tue Apr 17 05:45:19 2007 Arnold D. Robbins + + * io.c (get_a_record): Make it static, to match declaration at the + top of the file. (Thank you GCC for not reporting this. Grr.) + +Fri Apr 13 00:29:24 2007 Arnold D. Robbins + + * replace.c: Only include missing/getaddrinfo.c if HAVE_SOCKETS + is defined. Avoids problems on VMS. Thanks to Pat Rankin. + +Tue Apr 10 18:53:04 2007 Arnold D. Robbins + + * awkgram.y, builtin.c, eval.c, ext.c, field.c, io.c, + node.c: Added some sanity to the lint warnings, to only + print them once if they are syntactic or of the type where + they don't need to be repeated. Switch to `short' instead + of `int', and in general use a variable named `warned', for + consistency. + +Sun Apr 8 16:49:28 2007 Arnold D. Robbins + + * awkgram.y: Add guard code to ifdef out "signed" for VMS. Thanks for + the heads-up to Pat Rankin. + * regcomp.c (utf8_sb_map, init_dfa): Move non-GCC code to initialize + this array into code, to preserve word-size independance. + * configure.ac: Add check for . + * io.c: Include if we have it, instead of keyed off + Tandem, needed on some Unix systems. + * awk.h, main.c, msg.c, awkgram.y: Move to use of CAN_USE_STDARG_H + instead of continuously repeating check for header and defined STDC + and STDC. Thanks to Pat Rankin. + +Fri Apr 6 15:28:09 2007 Arnold D. Robbins + + * builtin.c (do_length): Only print `length(array)' lint warning once. + * node.c (dump_wstr): Restore from being ifdef'ed out. Useful in case + it needs to be called from a debugger. + * regcomp.c (utf8_sb_map): Fix gcc-specific code. + * awk.h (snprintf): Add declaration in case not available on the system. + (Ceil, Floor): Add macros changing the name for VMS, in an attempt to + fix linkage problems. + * io.c: Simplify includes for internet headers and for getaddrinfo + defines. + +Wed Apr 4 23:38:24 2007 Arnold D. Robbins + + * io.c [AI_ADDRCONFIG]: Add a definition in case it's not available. + * main.c (usage): Add comment for translators to add translation + bug report address. + +Wed Apr 4 18:26:45 2007 Pat Rankin + + * regexec.c (build_trtrable): Add missing #if HAVE_ALLOCA. + +Thu Mar 29 19:30:20 2007 Pat Rankin + + * re.c (make_regexp): Cast casetable to RE_TRANSLATE_TYPE. + +Mon Mar 19 12:35:00 2007 Arnold D. Robbins + + Finish removing references to STRTOD_NOT_C89. + + * awk.h (gawk_strtod): Use now if there is no strtod. + * replace.c (strtod.c): Include if there is no strtod. + * configure.ac [GAWK_AC_FUNC_STRTOD_C89]: Removed. + +Mon Mar 19 12:17:16 2007 Kimura Koichi + + * dfa.c (dfaexec): Add check for half-width katakana characters in + character classes in ShiftJIS locale. + From mail originally sent Mon, 01 Aug 2005 09:07:55 +0900 + +Fri Mar 9 11:53:25 2007 Arnold D. Robbins + + * field.c (rebuild_record): Assert that wide string is off when + creating new fields. Inspired by Karel Zak. + +Fri Mar 9 11:26:01 2007 Matthew Woehlke + + * io.c (get_a_record): Limit the max amount read to SSIZE_MAX. Needed + on Tandem systems where this amount is incredibly small. + +Tue Mar 6 08:17:49 2007 Paul Eggert + + * node.c (is_ieee_magic_val): Don't rely on strncasecmp; it mishandles + ASCII bytes in some locales. + (get_ieee_magic_val): Use strtod if it works, relying on our handbuilt + code only if it doesn't work. This is more likely to do the right + thing with strings like "-nan". + +Tue Feb 27 20:51:29 2007 Arnold D. Robbins + + * configure.ac (AM_PROG_CC_STDC): Removed, per email suggestion + from Stepan Kasal some time ago. + +Tue Feb 27 20:44:07 2007 Aleksey Cheusov + + * awk.h: Revise checks for MEMCPY_ULONG and MEMSET_ULONG + for MS Interix using MSVC. + * configure.ac (AC_CHECK_FUNCS): Add checks for memcopy_ulong + and memset_ulong. + From mail dated Tue Aug 30 12:38:39 2005. + +Mon Feb 26 12:47:10 2007 Tony Leneis + + * dfa.c (dfacomp): Check that regexp is non-zero in length + also. Avoids problems with empty regex and IGNORECASE on + systems where `malloc(0)' returns a non-NULL pointer. + From mail dated Wed, 26 Oct 2005 15:42:07 -0700. + +Wed Feb 21 10:23:12 2007 Arnold D. Robbins + + * floatcomp.c (Floor, Ceil): Restore correct expression for Cray. + Then ifdef out the whole business, since it's likely to be obsolete. + Thanks to Paul Eggert. + +Mon Feb 19 12:28:47 2007 Arnold D. Robbins + + * node.c (format_val): Simplify code: always format the value + ourselves. Use %.0f if the value is integral. + * floatcomp.c (dval_out_of_range): Remove function, not needed. + (awknum_fraction_bits): Removed. + (adjust_uint): New function, defined IFF have uintmax_t. + * builtin.c (tmp_integer): Use adjust_uint. + Move include of and ... + * awk.h: to here. + (awknum_fraction_bits): Removed. + (adjust_uint): Declare, or define as do-nothing macro. + +Sun Feb 18 17:43:33 2007 Arnold D. Robbins + + * node.c, floatcomp.c: Add include of to get + correct declarations of math functions. + * configure.ac: If doing development, add -DYYDEBUG and also + -fno-builtin for GCC. + +Wed Feb 14 19:42:08 2007 Arnold D. Robbins + + Add support for special infinity and NaN values in non-POSIX + mode, and in POSIX mode, just call system `strtod'. + + * configure.ac [GAWK_AC_FUNC_STRTOD_C89]: Comment out. + * node.c (is_ieee_magic_val, get_ieee_magic_val): New functions. + (r_force_number): Adapt logic and use new functions. + +Tue Feb 13 13:02:32 2007 Arnold D. Robbins + + Move Paul's numeric stuff to a separate file to make code cleaner. + + * floatcomp.c (awknum_fraction_bits): New variable. + (Floor, Ceil): Functions, moved here from macros in builtin.c. + (dval_out_of_range): New function for checking if double is in range + of long. + (FLT_RADIX, FLT_MANT_DIG, DBL_MANT_DIG, AWKSMALL_MANT_DIG, + AWKNUM_MANT_DIG, AWKNUM_FRACTION_BITS): Moved here from awk.h. + * awk.h: Add decls of stuff now in floatcomp.c. + * Makefile.am[base_sources]: Add floatcomp.c. + * builtin.c (tmp_integer): Refer to `awknum_fraction_bits' + instead of AWKNUM_FRACTION_BITS. + * node.c (format_val): Call `dval_out_of_range' instead of + inline coding the test. + +2007-02-06 Paul Eggert + + * node.c (format_val): Fix bug when handling numbers close to + LONG_MIN and LONG_MAX. + * awk.h (FLT_RADIX, FLT_MANT_DIG, DBL_MANT_DIG, AWKSMALL_MANT_DIG, + AWKNUM_MANT_DIG, AWKNUM_FRACTION_BITS): Moved here from builtin.c. + * builtin.c: Move those macros to awk.h. + * awk.h (DBL_FRACTION_BITS): New macro. + +Fri Feb 9 13:40:10 2007 Matthew Woehlke + + More Tandem fixes. + + * configure.ac: Check in Tandem's zrldsrl library for dlopen. + * regex_internal.h: Move include into ifdef. + * regexec.c: Bracket alloca uses. Fix GCC use of `?:'. + +Fri Feb 9 13:30:15 2007 Arnold D. Robbins + + * replace.c: Add include of snprintf.c. Ooops! + * configure.ac: Add check for mkstemp and tmpfile for replacement + snprintf.c. + +Tue Feb 6 14:33:51 2007 Arnold D. Robbins + + * node.c (format_val): Restructure a bit to remove need for and + use of goto. + +Sun Feb 4 16:35:21 2007 Arnold D. Robbins + + * awkgram.y (field_spec, opt_incdec): New terminals. + (variable): Change definition of field reference to use field_spec. + See test/parse1.awk. + +Thu Feb 1 17:38:38 2007 Arnold D. Robbins + + * main.c: Allow YYDEBUG to enable the `-D' option, not just + GAWKDEBUG. + +Wed Jan 31 19:30:26 2007 Arnold D. Robbins + + * node.c (format_val): Restore my test for numeric values + being representable, as it includes more conditions than + Andrew's, pending a thorough review of undealt-with emails on + the topic. + * regexec.c (proceed_next_node): Move check for NULL to after + variable declarations inside initial `if'. + +Wed Jan 31 19:25:21 2007 Andrew J. Schorr + + * configure.ac (getaddrinfo): Improve test, since this function + can be in libsocket on some systems. + +Mon Jan 29 15:33:10 2007 Andrew J. Schorr + + * Makefile.am (valgrind): Also call new valgrind-scan target. + +Mon Jan 29 12:44:54 2007 Andreas Schwab + + * dfa.c (copytoks): Adjust index into multibyte csets when + copying an MBCSET token. + +Fri Jan 26 20:01:38 2007 Andrew J. Schorr + + * node.c (format_val): Test whether a numeric value is integral + simply by converting it to long and then back again, and checking + if the value matches. That's more robust than trying to test + whether the floating-point value is representable as a long. + * builtin.c (format_tree): Fix buffer overflow bug, off-by-one errors + in checking snprintf return codes, and use "%.0f" to implement "%d" + formatting. For octal or hex formatting, test whether the value + is integral by trying to convert back to floating point and seeing + if the value matches. This is more robust than trying to test + whether the floating-point value is representable as an integer. + +Tue Jan 23 17:49:28 2007 Arnold D. Robbins + + * io.c (socketopen): Initialize socketfd to avoid "may be used + uninitialized" warning. + * regexec.c (regexec, re_search_stub): Removed unused variable `dfa'. + * builtin.c (wide_tolower_toupper): Fix signedness of pointer in + allocation calls and in call to make_str_node. + +Mon Jan 22 12:57:19 2007 Kimura Koichi + + Deal with halfwidth katakana in SJIS locale inside character ranges. + Based on http://sources.redhat.com/bugzilla/show_bug.cgi?id=1149. + Changes affect non-__LIBC code only. + + * regcomp.c (re_compile_fastmap_iter): Handle half-size characters. + * regexec.c (check_node_accept_bytes): Same. + +Thu Jan 18 22:19:01 2007 Karel Zak + + * node.c (free_wstr): Assert that type is Node_val. + +Thu Jan 18 12:18:47 2007 Arnold D. Robbins + + * regcomp.c (re_compile_fastmap_iter): Declare `dfa' to be + be volatile. Fixes valgrind problem with the ignrcase test. + Sheesh. Gawk should now be valgrind-clean. We hope. + +Mon Jan 15 14:28:04 2007 Arnold D. Robbins + + Use getaddrinfo instead of gethostbyname, to handle IPV6 + format addresses. Based on patch submitted by + Jan Pazdziora . + + * configure.ac: Add getaddrinfo to list of checked functions. + * configh.in, configure: Regenerated. + * io.c: Rework includes based on HAVE_GETADDRINFO. + (socketopen): Reworked for getaddrinfo. + (devopen): Modified for new socketopen. + * replace.c: Include getaddrinfo.c if necessary. + +Sun Jan 14 12:19:53 2007 Arnold D. Robbins + + * awkgram.y: For bad name in array subscripting, build a + valid node anyway to avoid invalid reads reported by valgrind. + * dfa.c (parse_bracket_exp_mb): Remove assignment of NULL + to work_mbc->chars, was losing data malloc'ed earlier. Thanks + to valgrind. + (state_index): Alway initialize d->states[i].mbps elements to zero. + (dfafree): Free allocated d->states[i].mbps.elems if needed. + * regex.c: Try harder to undef alloca. + * regex_internal.h (__mempcpy): Undef before redefinining for + more recent versions of GLIBC. + +Sat Jan 13 22:10:43 2007 Arnold D. Robbins + + * node.c (str2wstr): For count of zero from mbrtowc, set count to 1 + and fall through to code that copies. Originally from Paul Eggert. + + Unrelated: + * configure.ac: Add call to AC_USE_SYSTEM_EXTENSIONS, should help + on Tandem. This lets us remove AC_AIX and AC_MINIX. + + From Matthew Woehlke for Tandem: + + * awk.h (_TANDEM_SOURCE): Also define _XOPEN_SOURCE_EXTENDED. + * io.c: (_TANDEM_SOURCE): Include more headers. + +Sat Jan 13 21:53:48 2007 Ralf Wildenhues + + * field.c (set_FIELDWIDTHS): Avoid writing one past the end of + the array. + * node.c (r_force_number): Avoid reading uninitialized variable. + +Sat Jan 13 21:37:15 2007 Arnold D. Robbins + + * Makefile.am (valgrind): New target based on idea from + Ralf Wildenhues for running valgrind on test suite. + +Sat Jan 13 21:24:54 2007 Ralf Wildenhues + + Enable more `--lint-old' warnings. + * awkgram.y: Warning about multiple BEGIN or END rules, + `index in array' outside of for loops, multidimensional arrays. + * field.c (set_FS): Warn about regex FS. + * node.c (parse_escape): Warn about `\b', `\f', `\r'. + +Sat Jan 13 20:56:56 2007 Arnold D. Robbins + + * node.c (wcasestrstr): Revert use of continue, reinstate goto. + Thanks to Andrew Schorr. + (free_wstr): Move zeroing of wsptr and wslen and clearing of flag + back outside the if. + * field.c (rebuild_record): In loop that copies fields to new record, + add call to `free_wstr'. This ensures that flag values are correct + and avoids double free later. Thanks to Karel Zak for pointing out + the problem. + +Fri Jan 12 14:01:51 2007 Dmitry V. Levin + + * builtin.c (do_match): In addition to "gawk_mb_cur_max > 1" check, + check for positive string length. + +Fri Jan 12 13:57:20 2007 Arnold D. Robbins + + Sync with GLIBC. Bi-annual this time. + + * regexec.c, regex.h, regex_internal.c, regcomp.c: + Reapply any portability patches specific to gawk. + * regex_internal.h (build_wcs_upper_buffer): Fix return type + in declaration. Reapply any portability patches specific to gawk. + * regex.c: Add definitions for `bool', `true' and `false'. + Define `alloca' to something invalid to keep it from linking + in case a usage of `alloca' slipped through. Reapply any portability + patches specific to gawk. + + Base versions: + getopt1.c 1.10 Tue Mar 9 10:35:37 2004 + getopt.c 1.55 Fri Mar 24 10:59:56 2006 + getopt.h 1.21 Fri Mar 19 00:19:32 2004 + getopt_int.h 1.1 Tue Mar 9 10:31:19 2004 + regex.c 1.129 Fri Mar 24 10:59:57 2006 + regexec.c 1.97 Fri Mar 24 10:59:57 2006 + regex.h 1.40 Mon Sep 25 20:03:05 2006 + regex_internal.c 1.67 Mon Sep 25 20:03:05 2006 + regex_internal.h 1.73 Fri Mar 24 10:59:57 2006 + regcomp.c 1.112 Fri Mar 24 10:59:57 2006 + +Fri Jan 12 12:28:51 2007 Arnold D. Robbins + + * ABOUT-NLS, INSTALL, Makefile.in, aclocal.m4, config.guess, + config.rpath, config.sub, configh.in, configure, configure.ac, + depcomp, gettext.h, install-sh, missing, mkinstalldirs, ylwrap: + Updated to current autotools, Autoconf 2.61, Automake 1.10, + gettext 0.16.1. + +Thu Jan 4 18:23:50 2007 Dmitry V. Levin + + * node.c (free_wstr): Zero wstptr and wstlen only if WSTRCUR + flag is set. + (str2wstr): Replace invalid `free` call with `free_wstr' call. + +Thu Jan 4 16:49:21 2007 Arnold D. Robbins + + * builtin.c (do_match): Move freeing of wc_indices to outside if. + Thanks to Sven Wegener for the report. + +Thu Dec 21 14:32:13 2006 Arnold D. Robbins + + * main.c (arg_assign): Reassign the '=' only if not initing. + * profile.c (varname): Deleted. + (pp_concat): New function to print concatenations. + (tree_eval): Don't use `varname' anymore. Use `pp_concat'. + +Mon Dec 11 12:43:04 2006 Arnold D. Robbins + + * builtin.c (sub_common): Clear numeric flags on result + unconditionally. + * node.c (wcasestr): Replace `goto' with `continue'. + +Thu Nov 30 15:54:07 2006 Bruno Haible . + + * builtin.c: Change use of HAVE_LC_MESSAGES to defined(LC_MESSAGES). + Bruno suggested only for dcngettext, I did it everywhere (ADR). + +Wed Sep 6 02:04:32 2006 Andrew J. Schorr + + * awkgram.y (get_src_buf): Adjust `source' and `sourceline' to + correctly handle mixed -f and --source options. + +Mon Aug 28 21:17:20 2006 Arnold D. Robbins + + * AUTHORS, FUTURES, LIMITATIONS, NEWS, POSIX.STD, PROBLEMS, README: + Added FSF copyright for no other reason than to satisfy the flunkies + running Savannah. + * Makefile.am: Removed `ansi2knr' from AUTOMAKE_OPTIONS also. + +Fri Aug 11 15:07:45 2006 Arnold D. Robbins + + * field.c (set_field, rebuild_record, set_record): Remove calls to + `free_wstr' since they're not needed. + +Sat Aug 5 22:04:24 2006 Arnold D. Robbins + + * node.c (unref): Call `free_wstr' for fields also. Thanks to + Andrew Schorr. + +Tue Jul 4 22:43:05 2006 Arnold D. Robbins + + * eval.c (interpret): Node_assign_concat case: Turn off NUMBER and + NUMCUR flags in result. Sheesh. Thanks to + for finding the problem. + +Mon Jul 3 22:49:44 2006 Pat Rankin + + * main.c (load_environ): When AWKPATH is missing from ENVIRON[], + try to find it with getenv("AWKPATH") before resorting to DEFPATH. + Suggested by Galen Tackett. + +Mon Jul 3 00:27:59 2006 Arnold D. Robbins + + * io.c (INTERNAL_HANDLE): New constant for use by `iop_alloc' + when allocating an internal IOBUF. + (pidopen, useropen): Use it. + (iop_alloc): Add check for it and just return iop. + +Fri Jun 23 15:48:34 2006 Arnold D. Robbins + + * awkgram.y (subn): At end for `do_sprintf' check, verify + that lnode is not NULL before using it assign through. + +Sun Jun 18 22:27:25 2006 Arnold D. Robbins + + Repair internal names like /dev/user, /dev/pid, as well as /dev/fd/N, + which have been broken for a long time but noone noticed. + + * io.c (is_internal): New macro to check for internal file like + `/dev/user'. + (spec_setup): Reduce to two parameters, allocate logic is always true. + Add IOP_NO_FREE to flag. + (pidopen, useropen): Return `IOBUF *' instead of int. Fix + logic to test if `iop' parameter is NULL and if so to allocate it. + (specfdopen,): Return `IOBUF *' instead of int. Fix + logic to test if `iop' parameter is NULL and if so to allocate it. + Don't set IOP_NO_FREE in flag. + (iop_open): Remove `IOBUF iob' field from `struct internal' and its use + and the use of `spec_setup' from the code here. Change the check in the + call to the open function to look for NULL. + (get_a_record): Use `is_internal' in initial check for filling the + buffer to not try to call `read' on internal files. If true, set + the IOP_AT_EOF in the flag and return EOF. + +Fri Mar 24 13:05:56 2006 Arnold D. Robbins + + * awkgram.y (get_src_buf): Remove function argument types from + declaration of `readfunc' to avoid bugaboos with VMS declaration + of `read' system call. + +Fri Mar 10 06:28:23 2006 Arnold D. Robbins + + * awk.h (free_wstr): New declaration if MBS_SUPPORT, empty macro + otherwise. + * node.c (free_wstr): New function, inside MBS_SUPPORT. Frees the wide + string part of a node. Provided so that it can be used consistently + everywhere. + (format_val, r_dupnode, mk_number, make_str_node, unref): Use it. + * builtin.c (sub_common): Call `free_wstr' instead of doing it manually. + * eval.c (r_tree_eval): Same in Node_assign_concat case. + * field.c (set_field, rebuild_record, set_record): Add calls to + `free_wstr'. + +Mon Feb 13 22:45:34 2006 Arnold D. Robbins + + * eval.c (r_tree_eval): Node_assign_concat. Release any + wide string value and reset the WSTRCUR flag. Based on + bug report by Karel Zak. + +2006-01-03 Paul Eggert + + * Makefile.am (awkgram.c): Use $(AWK), not awk, so that the rule + works on Solaris too (e.g., Solaris 10). Problem reported by + Andrew J. Schorr. + +Mon Dec 19 05:39:46 2005 Arnold D. Robbins + + * node.c (format_val): Account for overlow of conversion + from double to long. Shows up worse on 64-bit systems. + +Wed Dec 14 18:57:34 2005 Arnold D. Robbins + + * eval.c (set_BINMODE): Fix logic of test for no numeric value. + Makes `gawk -v BINMODE=1 ...' work again. Thanks to Eli Zaretskii + for pointing out the problem. + +Wed Oct 19 10:58:27 2005 Arnold D. Robbins + + * main.c (main, arg_init): Only use the locale's decimal + point if do_posix is set. Too many people the world over + have complained about this. + +Fri Oct 7 13:54:09 2005 Arnold D. Robbins + + Enhancement to fix from 23 Sept 2005, suggested by Pat Rankin. + + * awkgram.y (one_line_close): New function, closes open FILE * used + by `read_one_line'. + (fp): Static FILE * used by `read_one_line' and `one_line_close'. + * awkgram.y (read_one_line): Simplify check for call to `fdopen'. + (get_src_buf): New variable `closefunc' which is a pointer to a + function implementing the `close' system call interface. + +Fri Oct 7 13:23:29 2005 Arnold D. Robbins + + * field.c (set_FIELDWIDTHS): Fix off-by-one error in assignment + of sentinel value at end of FIELDWIDTHS array. + +Fri Sep 23 16:05:13 2005 Arnold D. Robbins + + * awkgram.y (read_one_line): New function, mainly for debugging, + that reads one line of data at a time to pass back as a buffer. + Emulates the variable-length record filesystem of VMS, where + we first saw the problem fixed here. + (get_src_buf): New variable `readfunc' which is a pointer to a + function implementing the `read' system call interface. Based on + an environment variable, use `read_one_line' instead of `read' + for testing. Make the test for expanding the buffer smarter, + so that it doesn't grow unnecessarily. + + Thanks to Galen Tackett (tackett_galen@bah.com) for reporting + the problem and to Anders Wallin and Pat Rankin for help + tracing and reproducing the problem and testing the fix. + +Fri Sep 9 15:06:07 2005 Arnold D. Robbins + + * hard-locale.h (xmalloc): Move declaration to file scope + for non-glibc systems and gcc 4. Thanks to Kito Danya Dietrich + . + +Thu Aug 25 22:40:40 2005 Arnold D. Robbins + + * regcomp.c (build_range_exp): Avoid `btowc' for single-byte + characters. Fedora Core 2, maybe others, have a broken version + that can't handle values > 127. + +Fri Aug 19 16:13:28 2005 Arnold D. Robbins + + * regexec.c (proceed_next_node): Added a band-aid check at the + top of the first `if' to make sure that `mctx->state_log[*pidx]' + isn't NULL. + +Fri Aug 12 13:10:33 2005 Arnold D. Robbins + + * io.c (iop_alloc): Only free `iop' if it was malloc'ed in + the first place. + Tue Jul 26 21:46:16 2005 Arnold D. Robbins * Release 3.1.5: Release tar file made. @@ -13,8 +778,9 @@ * io.c (do_index): Remove unused variables `mbclen', `mbs1' and `mbs2'. * node.c (wstrstr): Remove unsed variable `j'. (dump_wstr): `#ifdef' out, not currently needed. - * eval.c (op_assign): Move decl of `t1' and `t2' into a separate block for - the `! HAVE_FMOD' case. Keeps the compiler quiet. Similar for `ltemp'. + * eval.c (op_assign): Move decl of `t1' and `t2' into a separate block + for the `! HAVE_FMOD' case. Keeps the compiler quiet. Similar for + `ltemp'. Wed Jul 6 16:51:31 2005 Arnold D. Robbins @@ -44,10 +810,10 @@ More multibyte fixes from Kimura Koichi, . * node.c (format_val, r_dupnode): Spell `wstptr' correctly. - * regex_internal.c (build_wcs_upper_buffer): Label `offsets_needed' should not - be inside `#ifdef _LIBC'. - * regcomp.c (build_charclass): Fix declaration of `class_name' in prototype to - not be unsigned. + * regex_internal.c (build_wcs_upper_buffer): Label `offsets_needed' + should not be inside `#ifdef _LIBC'. + * regcomp.c (build_charclass): Fix declaration of `class_name' in + prototype to not be unsigned. Thu Jun 30 11:52:34 2005 Arnold D. Robbins @@ -75,9 +841,9 @@ Wed Jun 15 21:59:54 2005 Arnold D. Robbins * node.c (make_str_node): If working with multibyte characters, while - parsing string constants, keep multibyte characters together. This avoids - problems in cases where one of the bytes is backslash. Initial patch - supplied by Kimura Koichi, . + parsing string constants, keep multibyte characters together. This + avoids problems in cases where one of the bytes is backslash. Initial + patch supplied by Kimura Koichi, . Tue Jun 14 21:50:37 2005 Andrew J. Schorr @@ -101,7 +867,8 @@ From: Benno Schulenberg - * eval.c (func_call): Take message out of gettext call since it's for debugging. + * eval.c (func_call): Take message out of gettext call since it's for + debugging. * ext.c (get_actual_argument): Fix formatting of message. Wed May 25 09:19:37 2005 Arnold D. Robbins @@ -147,8 +914,8 @@ Straighten out mess with `isblank' which is C99 function. * configure.ac: Remove check for `isblank' in call to AC_CHECK_FUNCS. - * regex_internal.h: #ifdef out definition of `isblank' and provide `is_blank' - function a la dfa.c. + * regex_internal.h: #ifdef out definition of `isblank' and provide + `is_blank' function a la dfa.c. * field.c: Ditto. * regcomp.c: #ifdef use of `isblank' and add `is_blank' use instead. @@ -197,7 +964,7 @@ * configure.ac (PRINTF_HAS_F_FORMAT): Some cosmetic changes. (custom.h): Don't cat custom.h at the end of config.h; instead, use - AH_BOTTOM([#include "custom.h"]) + AH_BOTTOM([#include "custom.h"]) * awklib/Makefile.am (AM_CPPFLAGS): Add $(top_srcdir) so that custom.h can be found. @@ -231,9 +998,9 @@ Thu Apr 28 18:16:09 2005 Andrew J. Schorr - * awk.h (IOBUF): Add new fields `opaque', `get_record', and `close_func', - to support insertion of an alternate input processor. This is used - by the XML extension. + * awk.h (IOBUF): Add new fields `opaque', `get_record', and + *close_func', to support insertion of an alternate input processor. + This is used by the XML extension. (register_deferred_variable, register_open_hook, update_ERRNO_saved): Declare new functions. (load_environ, load_procinfo): Remove declarations -- these functions @@ -348,7 +1115,7 @@ * awk.h "mbsupport.h": Suppress inclusion if NO_MBSUPPORT is defined. * regex.h : Guard inclusion with HAVE_SYS_TYPES_H. * regex.c : Likewise. - * random.c "random.h": include this first to get config.h setup. + * random.c "random.h": Include this first to get config.h setup. : Guard inclusion with HAVE_FCNTL_H. : Guard inclusion with HAVE_UNISTD_H. * io.c [#if defined(MSDOS) ||... defined(__CYGWIN__)]: Splice the @@ -847,14 +1614,14 @@ Thu Jul 8 16:59:51 2004 Stepan Kasal * awkgram.y (output_redir): Make sure not to dereference NULL - pointer. The bug was triggered by the following code: + pointer. The bug was triggered by the following code: - gawk 'BEGIN{print "date" |& getline}' + gawk 'BEGIN{print "date" |& getline}' - No test case created, beacuse of the following: - Correct interpretation involves executing "1" or "0" -- as the user - may have defined this, we would have to override this in the test - script. It's not worth the hassle. + No test case created, beacuse of the following: + Correct interpretation involves executing "1" or "0" -- as the user + may have defined this, we would have to override this in the test + script. It's not worth the hassle. Thu Jul 8 12:59:49 2004 Arnold D. Robbins @@ -890,8 +1657,8 @@ * awk.h (check_special, get_curfunc_parm_count, get_actual_argument): new function declarations. - (get_scalar_argument, get_array_argument): new macros. - * awkgram.y (check_special): new function. + (get_scalar_argument, get_array_argument): New macros. + * awkgram.y (check_special): New function. (yylex): Use `check_special' to search `tokentab'. (dump_funcs): Always count functions, in order to get dynamic ones. Removed bogus use of `static' on `tab' variable. @@ -974,9 +1741,9 @@ * Makefile.am (base_sources): Don't mention version.c, so that it doesn't get distributed. - * po/POTFILES.in: remove version.c + * po/POTFILES.in: Remove version.c * configure.ac: Create version.i from version.in. - * main.c: include version.i. + * main.c: Include version.i. Tue Jun 1 18:33:32 2004 Arnold D. Robbins @@ -1197,7 +1964,7 @@ so that it applies to the current source. * posix/gawkmisc.c: Change a tab to a space (needed for the above). - Make version control more in the style of current autotools: + Make version control more in the style of current autotools: * configure.ac: Remove obsolete versions of macros: AM_INIT_AUTOMAKE doesn't need any parameters. @@ -1335,7 +2102,7 @@ (parse_bracket_exp): Use NON_MATCH variable in addition to "mbcset->non_match", not as an alternative. - (build_charclass_op): rename NOT parameter to + (build_charclass_op): Rename NOT parameter to NON_MATCH, use it instead of declaring a variable. (parse_bracket_exp) [!_LIBC]: Pass NULL for MBCSET if the character set is single-byte. @@ -1574,7 +2341,7 @@ 2003-07-10 Paul Eggert * io.c (two_way_open): If /bin/sh cannot be executed, exit - with status 126 consistently. + with status 126 consistently. Mon Jul 7 11:01:43 2003 Arnold D. Robbins @@ -1626,15 +2393,15 @@ 2003-06-20 Stepan Kasal - * eval.c (comp_func): if memcmp returns 0, we have to compare + * eval.c (comp_func): If memcmp returns 0, we have to compare the lengths. 2003-06-19 Stepan Kasal - * eval.c (interpret) : use NULL, not 0, to - initialize the variable list. - (comp_func): array indices no longer are string values, - you have to use ahname_str, ahname_len. + * eval.c (interpret) : Use NULL, not 0, to + initialize the variable list. + (comp_func): Array indices no longer are string values, + you have to use ahname_str, ahname_len. Tue Jun 17 11:53:46 2003 Arnold D. Robbins @@ -1643,8 +2410,8 @@ 2003-06-17 Stepan Kasal - * array.c (get_actual): even if canfatal is FALSE, don't - tolerate existence of things which can't happen. + * array.c (get_actual): Even if canfatal is FALSE, don't + tolerate existence of things which can't happen. Mon Jun 16 16:21:44 2003 Arnold D. Robbins @@ -1665,14 +2432,14 @@ 2003-06-10 Stepan Kasal - * awkgram.y (release_all_vars): do not try to release a value of + * awkgram.y (release_all_vars): Do not try to release a value of Node_var_new; after get_lhs, use the lhs directly, do not try to do (*lhs)->var_value; the Node_var case doesn't need special treatment. * builtin.c (do_match): `get_param' is successful iff it returns Node_var_array---if the variable was new, get_param has already changed the type. - * field.c (do_split): likewise. + * field.c (do_split): Likewise. Sun Jun 15 19:36:35 2003 Arnold D. Robbins @@ -1732,29 +2499,29 @@ Wed May 28 08:31:23 CEST 2003 Stepan Kasal * eval.c (forloops_active, in_function): Nuked. - (pop_all_forloops, pop_fcall_stack): are now inline. + (pop_all_forloops, pop_fcall_stack): Are now inline. Wed May 28 07:58:35 2003 Stepan Kasal - * field.c, awk.h (Null_field): no longer static. - * field.c (init_fields): initial value of $0 can be Nnull_string, + * field.c, awk.h (Null_field): No longer static. + * field.c (init_fields): Initial value of $0 can be Nnull_string, no need to copy it. - * eval.c (r_get_lhs) : test for uninitialized field, + * eval.c (r_get_lhs) : Test for uninitialized field, which is Nnull_string for $0 and Null_field for $(>0). - * builtin.c (do_print_rec): test for uninitialized $0. + * builtin.c (do_print_rec): Test for uninitialized $0. Tue May 27 17:03:02 2003 Stepan Kasal * awk.h (Node_var_new): New node type for variables which can be either scalar or array. From now on, Node_var is always scalar. (Node_gvar_ref): Nuked, its role can be taken by Node_array_ref. - (orig_var): removed, orig_array is enough. + (orig_var): Removed, orig_array is enough. (SCALAR, UNINITIALIZED): Flags nuked. - (var_uninitialized): new macro to distinguish uninitialized vars; + (var_uninitialized): New macro to distinguish uninitialized vars; used in several other macros. - * array.c (r_get_array, array_vname, do_adump): adapt to the + * array.c (r_get_array, array_vname, do_adump): Adapt to the above changes. - * awkgram.y, eval.c, field.c, main.c, node.c, profile.c: ditto. + * awkgram.y, eval.c, field.c, main.c, node.c, profile.c: Ditto. Tue May 27 14:27:50 2003 Stepan Kasal @@ -1767,9 +2534,9 @@ * awk.h (get_array, r_get_array): Declare the new function and define a macro to speed it up. * builtin.c (do_match): Use get_array. - * eval.c (interpret) : ditto. - (r_get_lhs) : ditto. - * field.c (do_split): ditto. + * eval.c (interpret) : Ditto. + (r_get_lhs) : Ditto. + * field.c (do_split): Ditto. Tue May 27 08:23:51 2003 Stepan Kasal @@ -1786,7 +2553,7 @@ Sun Jun 8 11:25:36 2003 Stepan Kasal - * awkgram.y (append_right): when using savetail, remember that it + * awkgram.y (append_right): When using savetail, remember that it is not necessarily the tail of the list---it's just a pointer to the last chunk appended. @@ -1816,7 +2583,7 @@ Wed May 28 11:38:59 2003 Stepan Kasal - * awkgram.y (switch_body): remove rule ``switch_body:/*empty/'' + * awkgram.y (switch_body): Remove rule ``switch_body:/*empty/'' as ``switch_body:case_statements'' covers it---this disambiguation fixes a reduce/reduce conflict. @@ -1832,7 +2599,7 @@ bit was set or not. We were silly slowing down most of the assignements. - * (get_a_record): after grow_iop_buffer, move recm.rt_start even + * (get_a_record): After grow_iop_buffer, move recm.rt_start even if recm.len == 0. Mon May 19 16:55:59 2003 Arnold D. Robbins @@ -1868,11 +2635,11 @@ Misc patches: - * builtin.c (do_match): if third parameter to `match' is supplied, + * builtin.c (do_match): If third parameter to `match' is supplied, store all subexpressions which are applicable, even though there are some unused between them. - * awkgram.y (yylex): when returning from unterminated REGEXP + * awkgram.y (yylex): When returning from unterminated REGEXP (which is /* kludge */), take care to fake a yylval, to prevent ``internal error'' later. @@ -1880,7 +2647,7 @@ * io.c (rsnullscan, get_a_record): Boundary condition bug fixes. -Sun May 11 15:15:20 IDT 2003 Scott Deifik +Sun May 11 15:15:20 2003 Scott Deifik * awk.h: Add decls for `memcpy_ulong', `memset_ulong', and MSC defines. @@ -1965,10 +2732,10 @@ * m4/uintmax_t.m4, m4/ulonglong.m4: Remove; superseded by the above new m4 files. - * builtin.c (BITS_PER_BYTE): Remove; use CHAR_BIT instead, since - it's the standard name. - (do_lshift, do_rshift): Complain if the shift width is exactly equal - to the word size, too. + * builtin.c (BITS_PER_BYTE): Remove; use CHAR_BIT instead, since + it's the standard name. + (do_lshift, do_rshift): Complain if the shift width is exactly equal + to the word size, too. Thu Mar 27 10:44:11 2003 Arnold D. Robbins @@ -2018,7 +2785,7 @@ Wed Mar 19 13:45:50 2003 Corinna Vinschen - * regex.c [RE_ENBABLE_I18N]: remove definition; the one in + * regex.c [RE_ENBABLE_I18N]: Remove definition; the one in regex_internal.h is better and makes things work with Cygwin. Tue Mar 11 11:54:20 2003 Arnold D. Robbins @@ -2193,21 +2960,21 @@ ADR: More grammar rationalization/repair from Stepan. - * awkgram.y (common_exp, simp_exp): the rule from getline (without + * awkgram.y (common_exp, simp_exp): The rule from getline (without pipe) has been moved from common_exp to simp_exp. The redirection of print statements reworked. The idea comes from mawk-1.3.3; much thanks to Michael Brennan! - * awkgram.y (IO_OUT, IO_IN): new tokens. - (APPEND_OP, TWOWAYIO): swallowed by the above ones. - (in_print, in_parens): new static variables, to trace whether + * awkgram.y (IO_OUT, IO_IN): New tokens. + (APPEND_OP, TWOWAYIO): Swallowed by the above ones. + (in_print, in_parens): New static variables, to trace whether IO_OUT is expected. - (yylex): emit the new tokens, update in_parens on '(' and ')'. - (exp): the print command(s) reworked. - (oputput_redir): reworked. - (print_expression_list): new non-terminal. - (rexp, rexpression_list opt_rexpression_list): nuked. + (yylex): Emit the new tokens, update in_parens on '(' and ')'. + (exp): The print command(s) reworked. + (oputput_redir): Reworked. + (print_expression_list): New non-terminal. + (rexp, rexpression_list opt_rexpression_list): Nuked. (exp, simp_exp): ``cmd|getline'' rule changed to ``cmd IO_IN getline'' and moved from exp to simp_exp. @@ -2234,16 +3001,16 @@ (shadow_funcs): ... which will enable us to end the program if lintfunc is fatal. (program): Cleanup of the rules defining the ``program'' non-terminal. - (start, program, rule): no value associated, + (start, program, rule): No value associated, expression_value is now treated similarily as begin_block and end_block. - (pattern, rule): bison actions for non-terminal `pattern' now + (pattern, rule): Bison actions for non-terminal `pattern' now add a new rule to the appropriate Node_rule_list, action for non-terminal `rule' now only adds the associated code block to the rnode of Node_rule_node. - (io_allowed): renamed to !begin_or_end_rule. + (io_allowed): Renamed to !begin_or_end_rule. (append_pattern): New function, adds new Node_rule_node to a rule_list. (mkrangenode): Deleted, this tiny function was called only once. - (function_body): non-terminal replaced by `action'. + (function_body): Non-terminal replaced by `action'. (statements, action, statement): `statements' can now be empty; both callers had to accomodate to this. (statements): Don't call isnoeffect($2->type) if @@ -2276,7 +3043,7 @@ * awk.h [NUMSUBPATS]: New macro. * builtin.c (do_match): Use it in loop that fills in subpattern info. - * eval.c (r_tree_eval): for Node_assign, don't call free_temp(), + * eval.c (r_tree_eval): For Node_assign, don't call free_temp(), as assign_val() contains dupnode(), which would clear the TEMP flag. From Stepan Kasal . * config.sub: Updated from prep. @@ -2375,21 +3142,21 @@ Wed Nov 27 06:04:20 2002 Pat Rankin - * ext.c [#if !DYNAMIC] (do_ext): Cast string value for error node. + * ext.c [#if !DYNAMIC] (do_ext): Cast string value for error node. Sun Nov 24 18:23:29 2002 Arnold D. Robbins From Paul Eggert, with some edits by me. - * builtin.c (do_substr): Consistently use floating point - values for lint messages, so they should be printed pretty - much as the user saw them. Check for overflow before - converting floating point to integer. Do the right thing with - NaNs. - - Check for index out-of-range before checking for length - out-of-range, to avoid some nasty effects if address - arithmetic overflows (e.g., indx + length < index). + * builtin.c (do_substr): Consistently use floating point + values for lint messages, so they should be printed pretty + much as the user saw them. Check for overflow before + converting floating point to integer. Do the right thing with + NaNs. + + Check for index out-of-range before checking for length + out-of-range, to avoid some nasty effects if address + arithmetic overflows (e.g., indx + length < index). Allow zero-length substrings when checking for lint if do_lint == LINT_INVALID. @@ -2538,13 +3305,13 @@ from FALSE to 0, it's not Boolean. (free_temp): Evaluate the argument only once, so that we can call free_temp(tree_eval(n)) for achieving side effects. - (load_environ, load_procinfo): Changed return type to NODE *. - * main.c (load_environ): The ENVIRON_node should be created with type + (load_environ, load_procinfo): Changed return type to NODE *. + * main.c (load_environ): The ENVIRON_node should be created with type Node_var_array and lnode set to NULL. Return pointer to the created node and create an empty hash even on TANDEM. (load_procinfo): Same mods for PROCINFO_node. (init_args): ARGV_node should also have lnode set to NULL. - * eval.c (r_tree_eval): case Node_assign moved just above the other + * eval.c (r_tree_eval): case Node_assign moved just above the other assignment cases. (op_assign): ++ and -- cases merged with += and -=, respectively. (push_args): Evaluate all args, even in cases where more args are @@ -2554,11 +3321,11 @@ can be trusted when linting code. (r_get_lhs): Case Node_param_list was unreachable (unless something breaks really badly), remove it; - (r_tree_eval): case Node_var_array removed from the last switch, + (r_tree_eval): Case Node_var_array removed from the last switch, it was caught in the first switch above. * profile.c (tree_eval): Again, case Node_var_array was caught above. - * awkgram.y (variable): Code simplified, making use of the above - changes. + * awkgram.y (variable): Code simplified, making use of the above + changes. * field.c (sc_parse_field): IGNORECASE only applies to regex based field-splitting, so remove code that pays attention to it. (do_split): Don't use parse_field if RS_is_null. @@ -2686,12 +3453,12 @@ to two NODE's per element from three. * awk.h (ahash): Union is gone. - (hash.ref): new union member. - (ahnext): new definition into hash union. - (ahvalue): new definition into hash union. - (ahname_str): new member, points into hash union. - (ahname_len): new member, points into hash union. - (ahname_ref): new member, points into hash union. + (hash.ref): New union member. + (ahnext): New definition into hash union. + (ahvalue): New definition into hash union. + (ahname_str): New member, points into hash union. + (ahname_len): New member, points into hash union. + (ahname_ref): New member, points into hash union. * array.c: Replaces uses of ahname member with string and length. Set the reference count correctly to 1 on new nodes. * eval.c (interpret): Case for Node_K_arrayfor. dupnode() the @@ -2710,11 +3477,11 @@ * profile.c (pprint): #undef the temporary defines at the end of the case. * eval.c (interpret): Likewise. - (assign_val): we can unref() before doing dupnode(). + (assign_val): We can unref() before doing dupnode(). Also, move the check for NF < 0 from here ... * field.c (set_NF): ... to here. - * main.c (varinit): no need to call set_NF(). - * awkgram.y (statements): don't be so generous when concatenating + * main.c (varinit): No need to call set_NF(). + * awkgram.y (statements): Don't be so generous when concatenating `statements' with a `statement'. @@ -2727,10 +3494,10 @@ Sun Oct 13 21:35:35 2002 Arnold D. Robbins - * awk.h (NODE): reflags is now unsigned long for: - (exec_count): defined to be sub.nodep.reflags. Using `number' + * awk.h (NODE): Reflags is now unsigned long for: + (exec_count): Defined to be sub.nodep.reflags. Using `number' broke pgawk. - * profile.c (Node_K_delete_loop): print out as a for loop + * profile.c (Node_K_delete_loop): Print out as a for loop with a comment that it's internally the same as `delete array'. * eval.c (Node_K_delete_loop): Increment the exec_count. Ooops. * configure.in (AM_GNU_GETTEXT_VERSION): New macro call. @@ -2833,7 +3600,7 @@ (regexp): ... to here. (common_exp): New non-terminal; contains common parts of exp and rexp. (a_relop, relop_or_less): New non-terminals. - (rexp): some rules updated to be analogous to exp. + (rexp): Some rules updated to be analogous to exp. (output_redir): Can contain only common_exp, not exp in general. Mon Sep 16 22:51:51 2002 Arnold D. Robbins @@ -2985,11 +3752,11 @@ * array.c (in_array): Use FALSE not zero for return value. (assoc_exists): New routine to find and return value for an index in an array. - * configure.in: test for termios.h and stropts.h, and grantpt function. - * io.c: include termios.h and stropts.h if available. + * configure.in: Test for termios.h and stropts.h, and grantpt function. + * io.c: Include termios.h and stropts.h if available. (redflags2str): Add RED_PTY to table. (redirect): Add RED_PTY to flags turned off when searching. - (close_redir): close write channel for two-way pipes + (close_redir): Close write channel for two-way pipes that use ptys by sending an EOF. (two_way_open): If pty_vs_pipe(), use pty's to open two-way pipes as they are line-buffered by default --> alleviates deadlock problems. @@ -2999,9 +3766,9 @@ Sun Aug 4 00:37:38 2002 Stepan Kasal - * re.c (make_regexp): don't pass the error message returned by - re_compile_pattern() to gettext(); it's already gettextized. - (make_regexp): minor reformat of code. + * re.c (make_regexp): Don't pass the error message returned by + re_compile_pattern() to gettext(); it's already gettextized. + (make_regexp): Minor reformat of code. Wed Jul 31 23:50:31 2002 Arnold D. Robbins @@ -3049,12 +3816,12 @@ * m4/jm-mktime.m4: Removed. * m4/largefile.m4: Removed. * m4/ssize_t.m4: Removed. - * ansi2knr.c: updated. - * depcomp: updated. - * install-sh: updated. - * missing: updated. - * mkinstalldirs: updated. - * ylwrap: updated. + * ansi2knr.c: Updated. + * depcomp: Updated. + * install-sh: Updated. + * missing: Updated. + * mkinstalldirs: Updated. + * ylwrap: Updated. * configure.in: Improved quoting. * acinclude.m4: Use `m4_sinclude', not antiquated `sinclude'. @@ -3171,10 +3938,10 @@ * eval.c (forloops_active, pop_forloop, pop_all_forloops, push_forloop): new functions. (interpret): Case Node_K_arrayfor, call push and pop functions. - Case Node_rule_list: pop loops and pop fcalls after longjmp. + Case Node_rule_list: Pop loops and pop fcalls after longjmp. Cases Node_K_next, Node_K_nextfile, Node_K_break and Node_K_continue, removed check before longjmp. - Case Node_K_exit: add loop check. + Case Node_K_exit: Add loop check. (loop_stack, nloops, nloops_active): New variables that implement the stack. @@ -3324,9 +4091,9 @@ Upgraded to automake 1.5 and gettext-0.11. Also bug fix to multibyte code. - * ABOUT-NLS: upgraded. - * config.guess, config.sub, config.rpath, gettext.h, ylwrap: new files. - * Makefile.am: added above to appropriate places. + * ABOUT-NLS: Upgraded. + * config.guess, config.sub, config.rpath, gettext.h, ylwrap: New files. + * Makefile.am: Added above to appropriate places. * awk.h: Replace libintl.h and macros with include of gettext.h. (emalloc, erealloc): Add num bytes to error message, put string inside _(). (index_multibyte_buffer): Removed decl. @@ -3336,16 +4103,16 @@ that we don't try to malloc(0): this fails on some systems. * configure.in (AM_GNU_GETTEXT): Update macro for gettext 0.11. (ALL_LINGUAS): Removed. - * m4/codeset.m4: new file. - * m4/gettext.m4: updated. - * m4/glibc21.m4: new file. - * m4/iconv.m4: new file. - * m4/isc-posix.m4: new file. - * m4/lcmessage.m4: updated. - * m4/lib-ld.m4: new file. - * m4/lib-link.m4: new file. - * m4/lib-prefix.m4: new file. - * m4/progtest.m4: updated. + * m4/codeset.m4: New file. + * m4/gettext.m4: Updated. + * m4/glibc21.m4: New file. + * m4/iconv.m4: New file. + * m4/isc-posix.m4: New file. + * m4/lcmessage.m4: Updated. + * m4/lib-ld.m4: New file. + * m4/lib-link.m4: New file. + * m4/lib-prefix.m4: New file. + * m4/progtest.m4: Updated. * intl/*: Replaced with version from gettext 0.11. * po/*: Revised for gettext 0.11. @@ -3392,7 +4159,7 @@ * builtin.c (do_bindtextdomain): Don't free the same variable twice. * main.c (main): Call setlocale for LC_MESSAGE, to make dcgettext - function work on glibc systems. + function work on glibc systems. Wed Jan 23 15:03:36 2002 Andreas Buening @@ -3449,30 +4216,30 @@ Thu Apr 26 08:03:17 2001 Isamu Hasegawa - * builtin.c (index_multibyte_buffer) : inspect the buffer and write + * builtin.c (index_multibyte_buffer): Inspect the buffer and write the index. - (sub_common) : in multibyte environment, skip multibyte characters + (sub_common): In multibyte environment, skip multibyte characters when we check special characters. - * awk.h (index_multibyte_buffer) : add prototype. - * eval.c (cmp_nodes) : in multibyte environment, compare per character. - * field.c (re_parse_field) : in multibyte environment, avoid to + * awk.h (index_multibyte_buffer): Add prototype. + * eval.c (cmp_nodes): In multibyte environment, compare per character. + * field.c (re_parse_field): In multibyte environment, avoid to call research() on invalid boundary. - (sc_parse_field) : in multibyte environment, avoid to compare on + (sc_parse_field): In multibyte environment, avoid to compare on invalid boundary. - (null_parse_field) : in multibyte environment, split per + (null_parse_field): In multibyte environment, split per character, not per byte. - * io.c (get_a_record) : in multibyte environment, avoid to compare + * io.c (get_a_record): In multibyte environment, avoid to compare on invalid boundary. Wed Apr 25 08:29:47 2001 Isamu Hasegawa - * awk.h (strncasecmpmbs) : add prototype. - * builtin.c (strncasecmpmbs) : new function like strncasecmp but for + * awk.h (strncasecmpmbs): Add prototype. + * builtin.c (strncasecmpmbs): New function like strncasecmp but for multibyte strings. - (do_index) : in multibyte environment, compare per character. - * builtin.c (do_tolower) : in multibyte environment, user towlower + (do_index): In multibyte environment, compare per character. + * builtin.c (do_tolower): In multibyte environment, user towlower instead of TOLOWER. - (do_toupper) : in multibyte environment, user towupper instead + (do_toupper): In multibyte environment, user towupper instead of TOUPPER. Tue Apr 24 10:38:06 2001 Isamu Hasegawa @@ -3480,62 +4247,62 @@ In multibyte environments, handle multibyte characters as single characters in bracket expressions. - * dfa.h (mb_char_classes) : new structure. - (mbcsets) : new variable. - (nmbcsets) : new variable. - (mbcsets_alloc) : new variable. - * dfa.c (prtok) : handle MBCSET. - (fetch_wc) : new function to fetch a wide character. - (parse_bracket_exp_mb) : new function to handle multibyte character + * dfa.h (mb_char_classes): New structure. + (mbcsets): New variable. + (nmbcsets): New variable. + (mbcsets_alloc): New variable. + * dfa.c (prtok): Handle MBCSET. + (fetch_wc): New function to fetch a wide character. + (parse_bracket_exp_mb): New function to handle multibyte character in lex(). - (lex) : invoke parse_bracket_exp_mb() for multibyte bracket expression. - (atom) : handle MBCSET. - (epsclosure) : likewise. - (dfaanalyze) : likewise. - (dfastate) : likewise. - (match_mb_charset) : new function to judge whether a bracket match + (lex): Invoke parse_bracket_exp_mb() for multibyte bracket expression. + (atom): Handle MBCSET. + (epsclosure): Likewise. + (dfaanalyze): Likewise. + (dfastate): Likewise. + (match_mb_charset): New function to judge whether a bracket match with a multibyte character. - (check_matching_with_multibyte_ops) : handle MBCSET. - (dfainit) : initialize new variables. - (dfafree) : free new variables. + (check_matching_with_multibyte_ops): Handle MBCSET. + (dfainit): Initialize new variables. + (dfafree): Free new variables. Mon Apr 23 01:40:09 2001 Isamu Hasegawa Implement the mechanism to match with multibyte characters, and use it for `period' in multibyte environments. - * dfa.h (mbps) : new variable. - * dfa.c (prtok) : handle ANYCHAR. - (lex) : use ANYCHAR for `period' in multibyte environments. - (atom) : handle ANYCHAR. - (state_index) : initialize mbps in multibyte environments. - (epsclosure) : handle ANYCHAR. - (dfaanalyze) : handle ANYCHAR. - (dfastate) : handle ANYCHAR. - (realloc_trans_if_necessary) : new function. - (transit_state_singlebyte) : new function. - (match_anychar) : new function. - (check_matching_with_multibyte_ops) : new function. - (transit_state_consume_1char) : new function. - (transit_state) : new function. - (dfaexec) : invoke transit_state if expression can match with + * dfa.h (mbps): New variable. + * dfa.c (prtok): Handle ANYCHAR. + (lex): Use ANYCHAR for `period' in multibyte environments. + (atom): Handle ANYCHAR. + (state_index): Initialize mbps in multibyte environments. + (epsclosure): Handle ANYCHAR. + (dfaanalyze): Handle ANYCHAR. + (dfastate): Handle ANYCHAR. + (realloc_trans_if_necessary): New function. + (transit_state_singlebyte): New function. + (match_anychar): New function. + (check_matching_with_multibyte_ops): New function. + (transit_state_consume_1char): New function. + (transit_state): New function. + (dfaexec): Invoke transit_state if expression can match with a multibyte character in multibyte environments. - (dfamust) : handle ANYCHAR. + (dfamust): Handle ANYCHAR. Fri Apr 20 11:31:24 2001 Isamu Hasegawa Avoid incorrect state transition in multibyte environments. - * dfa.h (nmultibyte_prop) : new variable. - (multibyte_prop) : new variable. - * dfa.c (addtok) : set inputwcs. - (dfastate) : avoid incorrect state transition in multibyte + * dfa.h (nmultibyte_prop): New variable. + (multibyte_prop): New variable. + * dfa.c (addtok): Set inputwcs. + (dfastate): Avoid incorrect state transition in multibyte environments. - (dfaexec) : likewise. - (dfainit) : init multibyte_prop. - (dfafree) : free multibyte_prop. - (inputwcs): new variable. - (mblen_buf) : new variable contains the amount of remain byte + (dfaexec): Likewise. + (dfainit): Init multibyte_prop. + (dfafree): Free multibyte_prop. + (inputwcs): New variable. + (mblen_buf): New variable contains the amount of remain byte of corresponding multibyte character in the input string. Fri Apr 20 06:28:59 2001 Isamu Hasegawa @@ -3543,38 +4310,38 @@ Handle a multibyte character followed by '*', '+', and '{n,m}' correctly. - * dfa.c (update_mb_len_index): new function. + * dfa.c (update_mb_len_index): New function. Support for multibyte string. - (FETCH) : call update_mb_len_index. - (lex) : check cur_mb_index not to misunderstand multibyte characters. - (atom) : make a tree from a multibyte character. - (dfaparse) : initialize new variables. - (mbs) : new variable. - (cur_mb_len) : new variable. - (cur_mb_index) : new variable. + (FETCH): Call update_mb_len_index. + (lex): Check cur_mb_index not to misunderstand multibyte characters. + (atom): Make a tree from a multibyte character. + (dfaparse): Initialize new variables. + (mbs): New variable. + (cur_mb_len): New variable. + (cur_mb_index): New variable. Thu Apr 19 09:32:47 2001 Isamu Hasegawa - * awkgram.y (cur_mbstate) : new varialble containing means current + * awkgram.y (cur_mbstate): New varialble containing means current shift state. - (cur_char_ring) : new varialbe reffering the buffer which contains + (cur_char_ring): New varialbe reffering the buffer which contains last some character from the buffer. - (cur_ring_idx) : new variable containing the current index on + (cur_ring_idx): New variable containing the current index on cur_char_ring. - (nextc_is_1stbyte) : new macro, means that last nextc() return a + (nextc_is_1stbyte): New macro, means that last nextc() return a singlebyte character or 1st byte of a multibyte character. - (nextc) : check the buffer and update cur_ring_char in multibyte + (nextc): Check the buffer and update cur_ring_char in multibyte environments. - (pushback) : adjust cur_ring_idx in multibyte environments. - (yylex) : add check whether nextc() returned 1st-byte in multibyte + (pushback): Adjust cur_ring_idx in multibyte environments. + (yylex): Add check whether nextc() returned 1st-byte in multibyte environments. - * re.c (make_regexp) : in multibyte environment, skip multibyte + * re.c (make_regexp): In multibyte environment, skip multibyte characters when we check special characters. Wed Apr 18 07:58:20 2001 Isamu Hasegawa - * awk.h (MBS_SUPPORT) : New flag, means supporting multibyte strings. - * configure.in : add check for wchar.h, wctype.h, mbrtowc, and mbrlen. + * awk.h (MBS_SUPPORT): New flag, means supporting multibyte strings. + * configure.in : Add check for wchar.h, wctype.h, mbrtowc, and mbrlen. Wed Jan 16 16:32:40 2002 Arnold D. Robbins @@ -3584,20 +4351,20 @@ Mon Jan 7 22:12:15 2002 Arnold D. Robbins - * awkgram.y (statement): moved delete, print, and expressions into + * awkgram.y (statement): Moved delete, print, and expressions into new non-terminal `simple_stmt'. Allow opt_simple_stmt in the first and third part of a for loop, per latest POSIX, which documents an otherwise undocumented historical oddity in Unix awk. This has the pleasant side effect of making line numbers more accurate for messages involving delete statements. - (opt_simple_stmt, simple_stmt): new non-terminals. + (opt_simple_stmt, simple_stmt): New non-terminals. Based on bug report from drj@pobox.com. Mon Dec 24 14:04:02 2001 Arnold D. Robbins * configure.in: Changes for VMS with new strftime: - (AC_HEADER_TIME): added + (AC_HEADER_TIME): Added. (AC_CHECK_HEADERS): Check for sys/time.h. (TIME_T_IN_SYS_TYPES_H): Add header check. * acconfig.h (TIME_T_IN_SYS_TYPES_H): Added. @@ -3625,8 +4392,8 @@ New configure time option, --with-whiny-user-strftime. * configure.in (AC_ARG_WITH): Add appropriate code for autoconf. - * accondig.h (USE_INCLUDED_STRFTIME): add #undef for it. - * custom.h (USE_INCLUDED_STRFTIME): set things up write. + * accondig.h (USE_INCLUDED_STRFTIME): Add #undef for it. + * custom.h (USE_INCLUDED_STRFTIME): Set things up write. Tue Dec 4 16:44:07 2001 Andreas Buening @@ -3634,10 +4401,10 @@ * awk.h (TOUPPER, TOLOWER): Define only if not already defined. * awkgram.y (extproc feature): Add ifdef for __EMX__. - * gawkmisc.c (__EMX__): include pc/gawkmisc.c directly. + * gawkmisc.c (__EMX__): Include pc/gawkmisc.c directly. * io.c (__EMX__): Added for a number of places in addition to OS2 def. (two_way_open): Added OS/2 specific code added that uses spawn. - (gawk_popen): ditto. + (gawk_popen): Ditto. Mon Dec 3 14:07:56 2001 Arnold D. Robbins @@ -3712,9 +4479,9 @@ 2001-09-07 Paul Eggert - * io.c (redirect): When deciding to use the fdopen bug hack, - use "__sun" rather than "solaris". No compilers predefine - "solaris", but both GCC and Sun C predefine "__sun". + * io.c (redirect): When deciding to use the fdopen bug hack, + use "__sun" rather than "solaris". No compilers predefine + "solaris", but both GCC and Sun C predefine "__sun". Thu Aug 30 15:17:12 2001 Arnold D. Robbins @@ -3765,7 +4532,7 @@ Undid BECAMEARRAY changes of 25 June 2001 in favor of correct code: * eval.c (pop_fcall): Change test and comment for freeing n->vname. - (flags2str): removed BECAMEARRAY entry. + (flags2str): Removed BECAMEARRAY entry. * awk.h (BECAMEARRAY): Removed define. * array.c (assoc_lookup): Removed setting of BECAMEARRAY flag. @@ -3789,6 +4556,7 @@ Further rationalization of treatment of dynamic regexes, so that profiling code works correctly. + * awk.h (NODETYPE): New type, Node_dynregex. * awkgram.y (mk_rexp): Use Node_dynregex. * eval.c (nodetypes): Add Node_dynregex. @@ -3799,20 +4567,23 @@ indicate CONST. New lint warning. + * awkgram.y (yylex): Added lint warning that constant with leading zero is treated as octal or hex. Generalized code for those who are Strong In The Ways of the Source. + * awk.h: New boolean variable. - * main.c (main): set it. + * main.c (main): Set it. * eval.c (interpret): For arrays, check it. Remove variable 'first', not needed anymore. - * profile.c (pp_string_fp): Enable printing of non-ascii characters + * profile.c (pp_string_fp): Enable printing of non-ASCII characters verbatim if variable set. Fix memory corruption on SCO for array vars as params changed globally. - * awk.h (BECAMEARRAY): new flag. - * array.c (assoc_lookup): set the flag as appropriate. + + * awk.h (BECAMEARRAY): New flag. + * array.c (assoc_lookup): Set the flag as appropriate. * eval.c (flags2str): Add the flag. (pop_fcall): Check the flag, don't free memory if set. @@ -3881,15 +4652,15 @@ Thu Apr 5 20:12:05 2001 Pat Rankin - * dfa.c: for VMS, #include instead of . - * missing_d/mktime.c: likewise. + * dfa.c: For VMS, #include instead of . + * missing_d/mktime.c: Likewise. - * random.c: reorder include directives to get gawk config info + * random.c: Reorder include directives to get gawk config info from random.h sooner. - [fcntl.h]: guard #include with HAVE_FCNTL_H test. - [unistd.h]: guard #include with HAVE_UNISTD_H test. + [fcntl.h]: Guard #include with HAVE_FCNTL_H test. + [unistd.h]: Guard #include with HAVE_UNISTD_H test. - * random.c (srandomdev): skip /dev/urandom usage if O_RDONLY + * random.c (srandomdev): Skip /dev/urandom usage if O_RDONLY is not defined. Tue Mar 20 11:07:11 2001 Arnold D. Robbins @@ -3916,11 +4687,11 @@ * COPYING: Incorporate latest version from FSF, which fixes a Y2k bug. * builtin.c (do_mktime): Allow the user to specify the - tm_isdst member as an optional trailing integer, and to - specify "out-of-range" members. Check for overflow when - subtracting 1 from month or 1900 from year. Allow years just - past INT_MAX, as they work on some hosts when INT_MAX - 1900 - is representable as an int. + tm_isdst member as an optional trailing integer, and to + specify "out-of-range" members. Check for overflow when + subtracting 1 from month or 1900 from year. Allow years just + past INT_MAX, as they work on some hosts when INT_MAX - 1900 + is representable as an int. * doc/gawk.1, doc/gawk.texi: Document the above changes. Also, document that the origin-zero Gregorian calendar is used. @@ -3952,8 +4723,8 @@ Tue Feb 6 18:17:13 2001 Michal Jaegermann * regex.c (re_match_2_internal): Case maybe_pop_jump, for - charset and not_charset: change cast from (unsigned char) - to (unsigned). Catches last 8 chars with high bit set + charset and not_charset: Change cast from (unsigned char) + to (unsigned). Catches last 8 chars with high bit set if backtracking. See test/rebt8b1.awk, test/rebt8b2.awk. Tue Feb 6 11:20:21 2001 Arnold D. Robbins @@ -3962,21 +4733,21 @@ Make sorted for loops a dynamic test instead of a compile time test. Still requires being Strong In The Ways Of The Source. - * awk.h: (struct search): removed. - (assoc_scan, assoc_next): removed declarations. - * array.c (assoc_scan, assoc_next): removed functions. - * eval.c (interpret): remove Node_K_array_sorted_for. Change code + * awk.h: (struct search): Removed. + (assoc_scan, assoc_next): Removed declarations. + * array.c (assoc_scan, assoc_next): Removed functions. + * eval.c (interpret): Remove Node_K_array_sorted_for. Change code at Node_K_arrayfor. - (nodetypes): remove Node_K_array_sorted_for. - * configure.in: removed array sorting test. - * awkgram.y: removed sorted_in keyword and associated code. + (nodetypes): Remove Node_K_array_sorted_for. + * configure.in: Removed array sorting test. + * awkgram.y: Removed sorted_in keyword and associated code. Sun Feb 4 14:57:49 2001 Arnold D. Robbins - * eval.c (interpret): use tree->rnode->exec_count to hold count of + * eval.c (interpret): Use tree->rnode->exec_count to hold count of times if was true. - profile.c (interpret): ditto. - * main.c (pre_assign): gross hack. malloc fresh copy of assign so can + profile.c (interpret): Ditto. + * main.c (pre_assign): Gross hack. malloc fresh copy of assign so can clear the '=', otherwise screws up profiling print out. Sun Jan 28 16:16:02 2001 Arnold D. Robbins @@ -3990,7 +4761,7 @@ * awk.h (dump_fcall_stack): Add declaration. (init_profiling_signals): Ditto. * main.c (main): Call init_profiling_signals. - * profile.c (init_profiling_signals, dump_and_exit, just_dump): new + * profile.c (init_profiling_signals, dump_and_exit, just_dump): New functions. Sun Jan 28 15:50:02 2001 Eli Zaretskii @@ -4016,8 +4787,8 @@ Wed Jan 17 11:03:40 2001 Eli Zaretskii - * io.c (redirect) [F_GETFL && O_APPEND]: Use binmode in the call - to fdopen. + * io.c (redirect) [F_GETFL && O_APPEND]: Use binmode in the call + to fdopen. Mon Jan 15 16:29:52 2001 Arnold D. Robbins @@ -4058,7 +4829,7 @@ Add a minor memory cleanup facility (undocumented): * awk.h (do_tidy_mem, release_all_vars): Add declarations. * main.c (do_tidy_mem): Add declaration. - (main): if $TIDYMEM exists, do_tidy_mem is true, and call mtrace(). + (main): If $TIDYMEM exists, do_tidy_mem is true, and call mtrace(). * awkgram.y (release_all_vars): New function. Sun Dec 31 10:47:37 2000 Arnold D. Robbins @@ -4082,13 +4853,13 @@ Fri Dec 8 11:47:26 2000 Arnold D. Robbins * ext.c (dummy): Make gcc specific via ifdef. - * builtin.c (do_dcgettext): make conditional compilation smarter. + * builtin.c (do_dcgettext): Make conditional compilation smarter. * msg.c (warning, error, r_fatal): Finish switching back to multi-version function header. Wed Dec 6 13:28:58 2000 Arnold D. Robbins - * random.h: include to get ssize_t definition. + * random.h: Include to get ssize_t definition. * awkgram.y (yyerror): Restore multi-version function header, it seems that what ansi2knr produces doesn't quite do the job on old compilers. @@ -4113,25 +4884,25 @@ * builtin.c (do_dcgettext, do_bindtextdomain): Add calls to free_temp the various arguments. Sigh. - * io.c (yylex): nuked bstart variable, put all uses of mend variable + * io.c (yylex): Nuked bstart variable, put all uses of mend variable into TANDEM ifdef. - * main.c (load_environ): removed cp variable, value never used. + * main.c (load_environ): Removed cp variable, value never used. * random.c: Remvoed uses of `inline' keyword. - * Makefile.am (install-exec-hook, uninstall-local): new targets. + * Makefile.am (install-exec-hook, uninstall-local): New targets. Adds creation of gawk-X.Y.Z and awk links, as in 3.0.x. * configure.in (GAWK_AC_TYPE_SSIZE_T): Added. - m4/ssize_t.m4: new file. + m4/ssize_t.m4: New file. Wed Nov 22 14:47:18 2000 Arnold D. Robbins After consultation with Brian Kernighan and Michael Brennan, nuked the abort keyword. - * awk.h (Node_K_abort): removed. - * eval.c (aborting): removed decl. + * awk.h (Node_K_abort): Removed. + * eval.c (aborting): Removed decl. (interpret): Removed Node_K_abort case. * io.c (do_input): Removed checks for aborting. - * main.c (aborting): removed. + * main.c (aborting): Removed. (main): Removed checks for aborting. * profile.c (pprint): Removed Node_K_abort case. * awk.y (LEX_ABORT): All stuff removed. @@ -4149,7 +4920,7 @@ Tue Nov 21 16:25:41 2000 Arnold D. Robbins - * awk.y: for (iggy in foo) loops: add test that index + * awk.y: for (iggy in foo) loops: Add test that index in delete statement is a simple variable. Tue Nov 14 16:11:39 2000 Arnold D. Robbins @@ -4164,8 +4935,8 @@ compilation work on PCs. * builtin.c (do_dcgettext): Compile out cat_tab and code if not ENABLE_NLS. - * ext.c: for MSC, no long long variable. - * random.c: use clock() instead of gettimeofday(). + * ext.c: For MSC, no long long variable. + * random.c: Use clock() instead of gettimeofday(). * builtin.c: Fixed prototypes for new random functions (ADR). Sun Nov 12 17:45:44 2000 Arnold D. Robbins @@ -4181,8 +4952,8 @@ Wed Nov 8 14:39:20 2000 Arnold D. Robbins - * configure.in: Only add -rdynamic for linux. - * dfa.h, dfa.c: upgraded to versions in grep 2.4.2. + * configure.in: Only add -rdynamic for Linux. + * dfa.h, dfa.c: Upgraded to versions in grep 2.4.2. Tue Nov 7 18:17:17 2000 Arnold D. Robbins @@ -4197,12 +4968,12 @@ Tue Nov 7 14:09:14 2000 Arnold D. Robbins - * awk.h (os_is_setuid): declare function. - * main.c (main): call it if do_lint and warn if true. + * awk.h (os_is_setuid): Declare function. + * main.c (main): Call it if do_lint and warn if true. * awkgram.y (tokentab): - Made sure all extensions are actually marked as such. Ouch. - Changed "sort" to "asort". Potential to break too much old code. - * getopt.h, getopt.c, getopt1.c: replaced with current versions + * getopt.h, getopt.c, getopt1.c: Replaced with current versions from glibc CVS archive. Mon Nov 6 18:14:33 2000 Arnold D. Robbins @@ -4227,7 +4998,7 @@ * awkgram.y (valinfo, var_comp, dump_vars): New functions to dump the list of global variables. * awk.h: Declare dump_vars. - * main.c (optab): new option "dump-variables". + * main.c (optab): New option "dump-variables". (main): Code to handle it, set the output file and then call dump_vars() at the end. (usage): New option added to usage message. @@ -4239,8 +5010,8 @@ (shadow_funcs): Go through all functions and call parms_shadow(). (isnoeffect, isassignable): Add Node_LINT and NODE_BINMODE. * main.c (main): If do_lint, call shadow_funcs(). - * awk.h: add declaration of shadow_funcs(). - * configure.in: added m4/Makefile and awklib/eg/network/Makefile + * awk.h: Add declaration of shadow_funcs(). + * configure.in: Added m4/Makefile and awklib/eg/network/Makefile to list of generated makefiles. Tue Oct 17 10:47:35 2000 Arnold D. Robbins @@ -4273,7 +5044,7 @@ fails. Rationalize return value to either 0 or -1. * builtin.c (do_gensub): 3rd arg of zero generates a warning. - (do_fflush): rationalize return value: -1 for unopen or read-only + (do_fflush): Rationalize return value: -1 for unopen or read-only redirection, status of fflush otherwise. Wed Oct 11 22:11:19 2000 Arnold D. Robbins @@ -4283,13 +5054,13 @@ Thu Oct 5 11:56:42 2000 Arnold D. Robbins - * awk.h, awkgram.y, configure.in, eval.c: enabled + * awk.h, awkgram.y, configure.in, eval.c: Enabled `for (i in_sorted array)' loops for those who are Strong In The Way Of The Source. So there. Mon Oct 2 10:09:32 2000 Arnold D. Robbins - * io.c (do_close): make close(x) for non-open x return -1 + * io.c (do_close): Make close(x) for non-open x return -1 and update ERRNO. close(FILENAME) no longer does anything magic; this is all for better consistency with other awks and is more logical, anyway. @@ -4308,7 +5079,7 @@ Sun Sep 24 16:38:04 2000 Arnold D. Robbins - * awk.h (freenode): set the flags straight to UNINITIALIZED. + * awk.h (freenode): Set the flags straight to UNINITIALIZED. * node.c (unref): Fix test for MALLOC|TEMP to test the actual flags, not zero. * builtin.c (format_tree): ala print and concat, dupnode @@ -4373,15 +5144,15 @@ `do_bindtextdomain', `set_TEXTDOMAIN' and variables `TEXTDOMAIN', `TEXTDOMAIN_node'. New NODETYPE enum `Node_TEXTDOMAIN'. - * eval.c (nodetypes): add Node_TEXTDOMAIN at end. - (set_TEXTDOMAIN): new function. - (r_get_lhs): add case for Node_TEXTDOMAIN. - * main.c (varinit): add entry for TEXTDOMAIN. + * eval.c (nodetypes): Add Node_TEXTDOMAIN at end. + (set_TEXTDOMAIN): New function. + (r_get_lhs): Add case for Node_TEXTDOMAIN. + * main.c (varinit): Add entry for TEXTDOMAIN. * node.c (format_val): If INTLSTR use dcgettext of string and TEXTDOMAIN. * awkgram.y (tokentab): Add entries for "dcgettext" and "bindtextdomain". - * builtin.c (do_dcgettext, do_bindtextdomain): new functions. + * builtin.c (do_dcgettext, do_bindtextdomain): New functions. Tue Sep 5 17:01:34 2000 Arnold D. Robbins @@ -4391,20 +5162,20 @@ chars or after embedded newline, for --gen-po. Fix the calls to it everywhere for new boolean option to yes/no break lines. - * m4/strtod.m4: new file, defines GAWK_AC_FUNC_STRTOD_C89. + * m4/strtod.m4: New file, defines GAWK_AC_FUNC_STRTOD_C89. * configure.in: GAWK_AC_FUNC_STRTOD_C89 call added - * acinclude.m4: include strtod.m4. - * acconfig.h: add entry for STRTOD_NOT_C89. + * acinclude.m4: Include strtod.m4. + * acconfig.h: Add entry for STRTOD_NOT_C89. Remove entries for BITOPS and NON_DEC_DATA. - * missing/missing.c: add check for STRTOD_NOT_C89, use ours + * missing/missing.c: Add check for STRTOD_NOT_C89, use ours if set. - * missing/strtod.c: make smarter for input like 0x345. - * awk.h: [STRTOD_NOT_C89]: define strtod gawk_strtod to get + * missing/strtod.c: Make smarter for input like 0x345. + * awk.h: [STRTOD_NOT_C89]: Define strtod gawk_strtod to get our version. Avoids linker weirdness. Mon Sep 4 09:16:43 2000 Arnold D. Robbins - * field.c (set_record): fix from Utz-Uwe Haus + * field.c (set_record): Fix from Utz-Uwe Haus to make sure there's always enough room in the record. * builtin.c (nondec2awknum): Fix octal conversions to exit @@ -4425,20 +5196,20 @@ In .developing check, remove the AC_DEFINEs. * awk.h: Decls for bitwise functions now there by default. Add decl of `do_non_decimal_data'. - * main.c (do_non_decimal_data): new variable - (optlist): add new entry for `--non-decimal-data'. - (main): turn off `do_non_decimal_data' if `do_traditional'. - (usage): add the new option. - * node.c (r_force_number): make check for non-decimal data a + * main.c (do_non_decimal_data): New variable + (optlist): Add new entry for `--non-decimal-data'. + (main): Turn off `do_non_decimal_data' if `do_traditional'. + (usage): Add the new option. + * node.c (r_force_number): Make check for non-decimal data a runtime check based on do_non_decimal_data. - * awkgram.y (yylex): make non-decimal constants a runtime check. - * builtin.c: remove the ifdefs around the bit functions and + * awkgram.y (yylex): Make non-decimal constants a runtime check. + * builtin.c: Remove the ifdefs around the bit functions and nondec2awknum. Tue Aug 29 18:45:56 2000 Arnold D. Robbins - * configure.in: go back to ARRAYDEBUG if .developing set. - * awkgram.y: use ARRAYDEBUG for adump(), use multiple tests + * configure.in: Go back to ARRAYDEBUG if .developing set. + * awkgram.y: Use ARRAYDEBUG for adump(), use multiple tests for stopme(). Mon Aug 28 17:09:06 2000 Arnold D. Robbins @@ -4448,31 +5219,35 @@ Mon Aug 14 23:01:55 2000 Arnold D. Robbins - * Add %COUNT$... handling to printf. - awk.h (printf_count): new define in NODE structure. - (format_tree): added decl. - awkgram.y (count_args): new function to set printf_count in + Add %COUNT$... handling to printf. + + * awk.h (printf_count): New define in NODE structure. + (format_tree): Added decl. + * awkgram.y (count_args): New function to set printf_count in a node. - [print productions]: call the function. - (snode): for do_sprintf, call count_args, set the count + [print productions]: Call the function. + * (snode): For do_sprintf, call count_args, set the count in the lnode. - builtin.c (format_tree): new fourth arg is argument count. + * builtin.c (format_tree): New fourth arg is argument count. Add smarts to handle the `$' in a format. - (do_sprintf): use new argument to format_tree. - node.c (format_val): ditto. + * (do_sprintf): Use new argument to format_tree. + node.c (format_val): Ditto. Sun Aug 13 11:10:41 2000 Arnold D. Robbins Changes from Alan J. Broder (ajb@woti.com): - Array third arg to match puts subtexts into the array: + * awk.y (tokentab): "match" gets third arg, and lint warning - * builtin.c (do_match): if third arg there, fill it with subtexts + * builtin.c (do_match): If third arg there, fill it with subtexts + - New builtin sort function: - * awk.h (do_sort): declared. + + * awk.h (do_sort): Declared. * array.c (do_sort, dup_table, merge, merge_sort, assoc_from_list, - assoc_sort_inplace): new functions. + assoc_sort_inplace): New functions. - * eval.c (tree_eval): in debug code, make uninitialized var + * eval.c (tree_eval): In debug code, make uninitialized var a warning, not a fatal error. Breaks too many things. Wed Aug 9 10:51:41 2000 Arnold D. Robbins @@ -4480,11 +5255,11 @@ * eval.c (func_call): Increment the exec_count on the function's node; this allows printing a call count for functions. - profile.c (pp_func): print the count for functions. + profile.c (pp_func): Print the count for functions. * ALL: Changed DEBUG to GAWKDEBUG in all gawk files, so that I don't get regex/dfa debugging. In some cases, changed memory-related stuff to MEMDEBUG. Still have work to do. - * awk.h, node.c, profile.c: removed exec_count_init variable; + * awk.h, node.c, profile.c: Removed exec_count_init variable; code has been cleaned up to not need different values for profiling/not profiling. @@ -4492,7 +5267,7 @@ * eval.c (casetable): Removed the USE_PURE_ASCII stuff; it was never documented. Latin 1 forever. - * main.c (main): only call `init_profiling' after arg parsing + * main.c (main): Only call `init_profiling' after arg parsing if `do_profiling' is still false. Avoids resetting `prof_fp' back to stderr. @@ -4516,46 +5291,46 @@ Sun Jan 2 14:48:23 2000 Arnold D. Robbins First edit of the new millenium! - * awk.y (yylex): if lint checking, be obnoxious about gotos. + * awk.y (yylex): If lint checking, be obnoxious about gotos. Mon Oct 25 19:12:02 1999 Arnold D. Robbins - * awk.h: remove C_ALLOCA ifdef. - * main.c (main): remove C_ALLOCA code. - * io.c (do_input): ditto. + * awk.h: Remove C_ALLOCA ifdef. + * main.c (main): Remove C_ALLOCA code. + * io.c (do_input): Ditto. Mon Aug 9 17:36:24 1999 Arnold D. Robbins - * bisonfix.sed: unconditionally #undef YYSTACK_USE_ALLOCA. - * configure.in: remove all alloca and ALLOCA related stuff. - * Makefile.in: ditto + * bisonfix.sed: Unconditionally #undef YYSTACK_USE_ALLOCA. + * configure.in: Remove all alloca and ALLOCA related stuff. + * Makefile.in: Ditto. Thu Jul 29 18:32:05 1999 Arnold D. Robbins * awk.h (NODE): exec_count now in #ifndef NO_PROFILING. - * Makefile.in: changes to only recompile eval.c and profile.c to a + * Makefile.in: Changes to only recompile eval.c and profile.c to a special version for profiling. - * custom.h [MSC_VER]: turn on NO_PROFILING to omit the exec_count + * custom.h [MSC_VER]: Turn on NO_PROFILING to omit the exec_count and save space. - * node.c (more_nodes): move setting of exec_count to + * node.c (more_nodes): Move setting of exec_count to #ifndef NO_PROFILING. Thu Jul 1 12:12:05 1999 Arnold D. Robbins - * configure.in (AC_PREREQ): update to 2.13. + * configure.in (AC_PREREQ): Update to 2.13. GAWK_AC_C_STRINGIZE: convert to AC_C_STRINGIZE. - * aclocal.m4 (GAWK_AC_C_STRINGIZE): remove definition, now + * aclocal.m4 (GAWK_AC_C_STRINGIZE): Remove definition, now part of autoconf. - * acconfig.h (HAVE_STRINGIZE): ditto. + * acconfig.h (HAVE_STRINGIZE): Ditto. Wed Apr 28 11:08:05 1999 Arnold D. Robbins - * array.c (assoc_lookup): fix call to free_temp(subs) to after + * array.c (assoc_lookup): Fix call to free_temp(subs) to after last use of subs. Sun Apr 25 16:48:06 1999 Arnold D. Robbins - * io.c (redirect): add lint warning when same file is used for + * io.c (redirect): Add lint warning when same file is used for > and >>. Thu Apr 22 15:05:30 1999 Arnold D. Robbins @@ -4567,45 +5342,46 @@ Thu Apr 8 14:27:58 1999 Arnold D. Robbins New features for profiling: - * awk.h (NODE): add `exec_count' member. - (freenode): clear `exec_count' upon free. - * awk.y (func_count): new variable, counts total number of functions. - (func_install): increment func_count. - (struct finfo): information for use in sorting functions when + + * awk.h (NODE): Add `exec_count' member. + (freenode): Clear `exec_count' upon free. + * awk.y (func_count): New variable, counts total number of functions. + (func_install): Increment func_count. + (struct finfo): Information for use in sorting functions when pretty printing. - (fcompare): compare two finfo structures. - (dump_funcs): print the functions in sorted order for profiling. - (getfname): return the name of a builtin function. - * eval.c (INCREMENT): new macro for counting execution of nodes. - (interpret): call INCREMENT() appropriately. - * main.c (do_profiling): new flag if doing profiling. - `--profiling': new option added to getopt_long machinery. + (fcompare): Compare two finfo structures. + (dump_funcs): Print the functions in sorted order for profiling. + (getfname): Return the name of a builtin function. + * eval.c (INCREMENT): New macro for counting execution of nodes. + (interpret): Call INCREMENT() appropriately. + * main.c (do_profiling): New flag if doing profiling. + `--profiling': New option added to getopt_long machinery. (main): For profiled version, set do_profile and output file. Call `dump_prog' and `dump_funcs' if do_profiling at end. - (usage): add new argument. - * node.c (more_nodes, freenode): set exec_count to zero. - * profile.c: new file, does pretty printing and prints counts. - * Makefile.in: update to create two versions of gawk, regular + (usage): Add new argument. + * node.c (more_nodes, freenode): Set exec_count to zero. + * profile.c: New file, does pretty printing and prints counts. + * Makefile.in: Update to create two versions of gawk, regular and `pgawk' which does profiling. Wed Mar 10 21:38:14 1999 Arnold D. Robbins - * io.c (close_redir): use update_ERRNO() instead of manually + * io.c (close_redir): Use update_ERRNO() instead of manually doing it. Mon Dec 21 15:58:21 1998 Arnold D. Robbins - * configure.in: add BeOS to list of cases where we hardwire + * configure.in: Add BeOS to list of cases where we hardwire GETPGRP_VOID. - custom.h: remove the #define from __be_os case. Cleaner to + custom.h: Remove the #define from __be_os case. Cleaner to do it all in configure. Based on email from Martin C. Brown, mc@whoever.com. Mon Nov 30 20:52:52 1998 Arnold D. Robbins - * eval.c (update_ERRNO): new function, mainly for use by + * eval.c (update_ERRNO): New function, mainly for use by extension functions. - * awk.h: add decl. + * awk.h: Add decl. Tue Nov 24 18:13:29 1998 Arnold D. Robbins @@ -4619,52 +5395,52 @@ - --lint=fatal makes lint errors become fatal - LINT="fatal" has the same effect, any other positive value makes lint errors be just warnings - * Makefile.in (includedir): new variable for gawk header files - (ext.c, ext.o): new source and object files - (OTHERS, extension): new directory for macro with example extension - (install): install header files - * acconfig.h (DYNAMIC): new macro, true if can do dynamic loading - * array.c (assoc_lookup): new parameter `reference' is true if we + * Makefile.in (includedir): New variable for gawk header files + (ext.c, ext.o): New source and object files + (OTHERS, extension): New directory for macro with example extension + (install): Install header files + * acconfig.h (DYNAMIC): New macro, true if can do dynamic loading + * array.c (assoc_lookup): New parameter `reference' is true if we want to do reference checking. Add appropriate reference checking code. - * awk.h (UNITITIALIZED): new flag - (lintfunc): function pointer for correct function to use - (lintwarn): new macro to produce warnings - (result): new macro for func call result, used in commented out + * awk.h (UNITITIALIZED): New flag + (lintfunc): Function pointer for correct function to use + (lintwarn): New macro to produce warnings + (result): New macro for func call result, used in commented out code in eval.c. - (getnode, freenode): revised to set UNINITIALIZED. - (get_lhs): third arg for reference checking, change all calls + (getnode, freenode): Revised to set UNINITIALIZED. + (get_lhs): Third arg for reference checking, change all calls -- Add appropriate decls of new/changed functions - * awk.y (tokentab): new builtin "extension" for adding extensions - (node_common): set flags to UNINITIALIZED for Node_var. - * configure.in (dynamic linking): new check. Probably should + * awk.y (tokentab): New builtin "extension" for adding extensions + (node_common): Set flags to UNINITIALIZED for Node_var. + * configure.in (dynamic linking): New check. Probably should be a separate macro. - * eval.c (flag2str): add UNINITIALIZED to the table. - (r_tree_eval): add checks for UNINITIALIZED. - (push_args): appropriate changes for UNINITIALIZED to work. - (r_get_lhs): new third argument for reference checking. - (set_LINT): add code to handle setting `lintfunc' appropriately. - * ext.c: new file, for doing dynamic library extensions. - * extension/*: new directory with simple example code. - * main.c (VERSION_node, EXTENSION_node): new nodes for new vars. - (optab): change for "lint" to allow optional argument. - (lintfunc): definition. - (main): add case in option processing for --lint. - (varinit): add entries for VERSION and EXTENSION. - * node.c (r_force_number): checks that string really is a number. - (morenodes): set UNITIALIZED in the flags. - * re.c (all): change `result' to `res' globally to avoid conflict + * eval.c (flag2str): Add UNINITIALIZED to the table. + (r_tree_eval): Add checks for UNINITIALIZED. + (push_args): Appropriate changes for UNINITIALIZED to work. + (r_get_lhs): New third argument for reference checking. + (set_LINT): Add code to handle setting `lintfunc' appropriately. + * ext.c: New file, for doing dynamic library extensions. + * extension/*: New directory with simple example code. + * main.c (VERSION_node, EXTENSION_node): New nodes for new vars. + (optab): Change for "lint" to allow optional argument. + (lintfunc): Definition. + (main): Add case in option processing for --lint. + (varinit): Add entries for VERSION and EXTENSION. + * node.c (r_force_number): Checks that string really is a number. + (morenodes): Set UNITIALIZED in the flags. + * re.c (all): Change `result' to `res' globally to avoid conflict with new macro. - * GLOBAL: change lint calls to warning() to lintwarn(). - * GLOBAL: change all calls to get_lhs() to have 3rd arg. - * GLOBAL: change all calls to assoc_lookup() to have 3rd arg. + * GLOBAL: Change lint calls to warning() to lintwarn(). + * GLOBAL: Change all calls to get_lhs() to have 3rd arg. + * GLOBAL: Change all calls to assoc_lookup() to have 3rd arg. Sun Nov 22 17:07:39 1998 Arnold D. Robbins - * patchlev.h: renamed from patchlevel.h to make life + * patchlev.h: Renamed from patchlevel.h to make life easier for the PC guys. - (main.c): changed to include patchlev.h. - (Makefile.in): changed to ref patchlev.h where needed. + (main.c): Changed to include patchlev.h. + (Makefile.in): Changed to ref patchlev.h where needed. Sat Nov 7 21:29:52 1998 Arnold D. Robbins @@ -4674,53 +5450,54 @@ Thu Nov 5 16:58:38 1998 Arnold D. Robbins - * main.c (init_fds): new function to pre-open 0, 1, and 2 on + * main.c (init_fds): New function to pre-open 0, 1, and 2 on /dev/null if they're not open. Robustness, more or less. - (main): call init_fds. - * io.c (str2mode): add smarts for two-letter strings + (main): Call init_fds. + * io.c (str2mode): Add smarts for two-letter strings such as "rw", "r+", "wr", "w+" and "a+". Mon Nov 2 16:55:46 1998 Arnold D. Robbins - * builtin.c (do_*): added lint checks for non-numeric + * builtin.c (do_*): Added lint checks for non-numeric and/or non-string arguments, as appropriate. This should have been done long ago. Tue Oct 20 21:56:06 1998 Arnold D. Robbins - * awk.h (LINT_node): new variable for LINT special var - (Node_LINT): new node type. - (set_LINT): declare function. - * main.c (varinit): add LINT variable. - (usage): print an emphatic pointer to the manual for bug reports. - * eval.c (nodetypes): new entry for Node_LINT. - (r_get_lhs): case added for Node_LINT. - (set_LINT): set do_lint from LINT variable. + * awk.h (LINT_node): New variable for LINT special var + (Node_LINT): New node type. + (set_LINT): Declare function. + * main.c (varinit): Add LINT variable. + (usage): Print an emphatic pointer to the manual for bug reports. + * eval.c (nodetypes): New entry for Node_LINT. + (r_get_lhs): Case added for Node_LINT. + (set_LINT): Set do_lint from LINT variable. Mon Oct 19 22:35:46 1998 Arnold D. Robbins - * configure.in: for GCC, add -Wall to get warnings for development. - * Makefile.in (awktab.c): move sed stuff to separate script. - * bisonfix.sed: new script, with old fix and Solaris x86 fix. - * awk.h (nodetype2str): add declaration. - (load_procinfo): add declaration. + * configure.in: For GCC, add -Wall to get warnings for development. + * Makefile.in (awktab.c): Move sed stuff to separate script. + * bisonfix.sed: New script, with old fix and Solaris x86 fix. + * awk.h (nodetype2str): Add declaration. + (load_procinfo): Add declaration. Tue Oct 13 22:28:56 1998 Arnold D. Robbins - * Changes to make PROCINFO["FS"] reflect the use of FIELDWIDTHS or FS. - eval.c (assign_val): new function that does the mechanics of + Changes to make PROCINFO["FS"] reflect the use of FIELDWIDTHS or FS. + + * eval.c (assign_val): New function that does the mechanics of assignment - main.c (load_procinfo): add setting of PROCINFO["FS"] to "FS". - field.c (update_PROCINFO): new function to update the array. - (set_FS): call update_PROCINFO. - (set_FIELDWIDTHS): ditto. + * main.c (load_procinfo): Add setting of PROCINFO["FS"] to "FS". + * field.c (update_PROCINFO): New function to update the array. + (set_FS): Call update_PROCINFO. + (set_FIELDWIDTHS): Ditto. Sun Sep 27 10:18:05 1998 Arnold D. Robbins - * awk.h (reisstring): new prototype. - * re.c (reisstring): new function, returns true if the re did + * awk.h (reisstring): New prototype. + * re.c (reisstring): New function, returns true if the re did a simple string match. This is rather simplistic in its logic. - * io.c (get_a_record): in the case that RS is a regexp, AND + * io.c (get_a_record): In the case that RS is a regexp, AND the re matched at the exact end of the buffer, add a call to `reisstring' in case it's a simple string match. If so, we don't need to read more into the buffer because we don't @@ -4730,32 +5507,32 @@ Thu Aug 13 22:07:40 1998 Arnold D. Robbins - * io.c (socketopen): fixes from Juergen Kahrs to socket + * io.c (socketopen): Fixes from Juergen Kahrs to socket opening code for "any host". Tue Jul 14 19:02:33 1998 Arnold D. Robbins - * aclocal.m4 (GAWK_AC_LIB_SOCKETS): removed the caching; + * aclocal.m4 (GAWK_AC_LIB_SOCKETS): Removed the caching; configure gave different results the second time it was run! Fri Jul 10 09:11:06 1998 Arnold D. Robbins - * eval.c (interpret): minor cleanups: add variable name to + * eval.c (interpret): Minor cleanups: add variable name to fatal error Node_K_array_for and other minor changes. Mon Jun 22 16:53:34 1998 Arnold D. Robbins - * Makefile.in (tags, TAGS): add $(LIBSRC). + * Makefile.in (tags, TAGS): Add $(LIBSRC). Tue Jun 2 15:23:05 1998 Arnold D. Robbins - * io.c (devopen): relax previous change, don't require "any", + * io.c (devopen): Relax previous change, don't require "any", just that a port be there. The user can put 0 if they don't care. Wed May 27 21:33:45 1998 Arnold D. Robbins - * io.c (devopen): for /inet, require that local and remote + * io.c (devopen): For /inet, require that local and remote ports and the remote hostname be there, and that `any' be used for a port if they don't care. @@ -4770,102 +5547,102 @@ * awk.h (NODETYPE): Sorted the Node_xxx entries for the builtin variables. Gotta look nice, don't we? - * eval.c (nodetypes): ditto. - (genflags2str): added code to check that we don't + * eval.c (nodetypes): Ditto. + (genflags2str): Added code to check that we don't overflow the static buffer. This is just a debugging routine, not worth the hassle of dynamic allocation. Mon Mar 2 16:06:16 1998 Arnold D. Robbins - * Makefile.in (dist): remove any embedded copied RCS or CVS + * Makefile.in (dist): Remove any embedded copied RCS or CVS directories. Mon Feb 23 00:09:52 1998 Arnold D. Robbins - * awk.h (genflags2str): add declaration. - * eval.c (genflags2str): new function. - (flags2str): use new general purpose function. - * io.c (redflags2str): same. + * awk.h (genflags2str): Add declaration. + * eval.c (genflags2str): New function. + (flags2str): Use new general purpose function. + * io.c (redflags2str): Same. Sun Feb 22 23:57:29 1998 Arnold D. Robbins Significant changes to add two-way i/o and sockets!!! - * Makefile.in: add @SOCKET_LIBS@ to LIBS variable. - * acconfig.h: add HAVE_SOCKETS and HAVE_PORTALS defs. - * aclocal.m4: new macro GAWK_AC_LIB_SOCKETS. - * awk.h: new node type, Node_redirect_twoway, and new redirection + * Makefile.in: Add @SOCKET_LIBS@ to LIBS variable. + * acconfig.h: Add HAVE_SOCKETS and HAVE_PORTALS defs. + * aclocal.m4: New macro GAWK_AC_LIB_SOCKETS. + * awk.h: New node type, Node_redirect_twoway, and new redirection flags: RED_TWOWAY, and RED_SOCKET. - * awk.y (parser): add TWOWAYIO token and appropriate productions. - (yylex): recognize `|&' token if not traditional. - * builtin.c (do_print, do_printf): flush buffer if TWOWAYIO. - * configure.in: add header checks for networking header files, + * awk.y (parser): Add TWOWAYIO token and appropriate productions. + (yylex): Recognize `|&' token if not traditional. + * builtin.c (do_print, do_printf): Flush buffer if TWOWAYIO. + * configure.in: Add header checks for networking header files, add --enable-portals switch, call GAWK_AC_LIB_SOCKETS - * eval.c (nodetypes): add string constant for Node_redirect_twoway. - * io.c (redflags2str): new function. - (redirect): better error message in default case, add code for + * eval.c (nodetypes): Add string constant for Node_redirect_twoway. + * io.c (redflags2str): New function. + (redirect): Better error message in default case, add code for Node_redirect_twoway. - (socketopen): new function. - (iop_open, devopen): add recognition of `/inet/...'. - (two_way_open): new function. + (socketopen): New function. + (iop_open, devopen): Add recognition of `/inet/...'. + (two_way_open): New function. Sat Dec 13 21:15:07 1997 Arnold D. Robbins - * awk.h (struct node): new member, `param_list' in union `x', becomes + * awk.h (struct node): New member, `param_list' in union `x', becomes `node->parmlist' in the code. - * awk.y (func_install): rearranged a bit, to build up a list of + * awk.y (func_install): Rearranged a bit, to build up a list of the function parameter names and to save it in the `parmlist' field. - * eval.c (push_args): new parameter, `varnames', which is the list + * eval.c (push_args): New parameter, `varnames', which is the list of variable names. Use this to set the vname field of each parameter's value as it's created. Special case arrays to include where they came from, mainly for array vs. scalar diagnostics. - (r_tree_eval): don't set the `vname' field for parameters. - (pop_fcall): free the `vname' field if it's an array. - (func_call): pass in the `parmlist' field to call of push_args(). - (r_get_lhs): for Node_subscript, change error message to use + (r_tree_eval): Don't set the `vname' field for parameters. + (pop_fcall): Free the `vname' field if it's an array. + (func_call): Pass in the `parmlist' field to call of push_args(). + (r_get_lhs): For Node_subscript, change error message to use the `vname' field. - (stopme): new do-nothing function for use with debugging code + (stopme): New do-nothing function for use with debugging code and setting breakpoints. Thu Dec 4 15:18:17 1997 Arnold D. Robbins - * awk.y: fixed several lint checks and moved some into + * awk.y: Fixed several lint checks and moved some into test for do_lint_old. - * eval.c (fmt_index): add value of bad format spec to + * eval.c (fmt_index): Add value of bad format spec to error message. Tue Nov 18 22:19:02 1997 Arnold D. Robbins - * Makefile.in (install): strip the installed binary. + * Makefile.in (install): Strip the installed binary. From Anatoly A. Orehovsky (tolik@mpeks.tomsk.su). Sun Nov 16 22:12:39 1997 Arnold D. Robbins - * array.c (in_array, assoc_lookup): add symbol->vname to + * array.c (in_array, assoc_lookup): Add symbol->vname to fatal calls for scalar in array context. Wed Nov 12 22:18:33 1997 Arnold D. Robbins - * awk.h [ISASCII]: on all IS* macros, add cast to unsigned char. - [TOUPPER, TOLOWER]: new macros using unsigned char. - * awk.y: change to use of IS* vs. is* macros. - * builtin.c (nondec2awknum): change to use of IS* vs. is* macros, + * awk.h [ISASCII]: On all IS* macros, add cast to unsigned char. + [TOUPPER, TOLOWER]: New macros using unsigned char. + * awk.y: Change to use of IS* vs. is* macros. + * builtin.c (nondec2awknum): Change to use of IS* vs. is* macros, change casts for casetable[] from int to unsigned char. use new TOLOWER, TOUPPER macros - * dfa.c [ISASCII]: on all IS* macros, add cast to unsigned char. - (lex): change isdigit to ISDIGIT. - [TOUPPER, TOLOWER]: new macros using unsigned char, now used. - * eval.c (fmt_ok): change to use of IS* vs. is* macros. - * field.c (sc_parse_field): change to use of IS* vs. is* macros, + * dfa.c [ISASCII]: On all IS* macros, add cast to unsigned char. + (lex): Change isdigit to ISDIGIT. + [TOUPPER, TOLOWER]: New macros using unsigned char, now used. + * eval.c (fmt_ok): Change to use of IS* vs. is* macros. + * field.c (sc_parse_field): Change to use of IS* vs. is* macros, change casts for casetable[] from int to unsigned char. - (set_FS): change to use of IS* vs. is* macros. - * io.c (get_a_record): change to use of IS* vs. is* macros, + (set_FS): Change to use of IS* vs. is* macros. + * io.c (get_a_record): Change to use of IS* vs. is* macros, change casts for casetable[] from int to unsigned char. - * main.c (main): change to use of IS* vs. is* macros. - * node.c (r_force_number, parse_escape): change to use of IS* vs. + * main.c (main): Change to use of IS* vs. is* macros. + * node.c (r_force_number, parse_escape): Change to use of IS* vs. is* macros. - * re.c (make_regexp): change to use of IS* vs. is* macros. - * regex.c [ISASCII]: on all IS* macros, add cast to unsigned char. + * re.c (make_regexp): Change to use of IS* vs. is* macros. + * regex.c [ISASCII]: On all IS* macros, add cast to unsigned char. Sun Oct 19 12:36:47 1997 Arnold D. Robbins @@ -4877,17 +5654,17 @@ Thu Oct 9 19:28:39 1997 Arnold D. Robbins - * custom.h [SEQUENT]: removed; not needed any more since the + * custom.h [SEQUENT]: Removed; not needed any more since the mmap code was ripped out. Wed Oct 8 17:22:03 1997 Arnold D. Robbins - * configure.in: remove check for madvise; don't need it any more + * configure.in: Remove check for madvise; don't need it any more after nuking use of mmap. Tue Oct 7 11:14:21 1997 Arnold D. Robbins - * eval.c (flags2str): made the code table driven. Shortened a lot. + * eval.c (flags2str): Made the code table driven. Shortened a lot. Tue Sep 30 20:59:17 1997 Arnold D. Robbins @@ -4897,59 +5674,62 @@ Wed Sep 24 20:47:59 1997 Arnold D. Robbins - * custom.h [TANDEM]: new changes. Finishes up Tandem + * custom.h [TANDEM]: New changes. Finishes up Tandem integration. Mon Sep 22 00:42:34 1997 Arnold D. Robbins - * custom.h [__be_os]: remove BROKEN_TOKEN definition. - dfa.c, dfa.h: change `token' to `dfa_token' to avoid BeOS + * custom.h [__be_os]: Remove BROKEN_TOKEN definition. + * dfa.c, dfa.h: Change `token' to `dfa_token' to avoid BeOS compile problems. Thu Aug 7 22:35:17 1997 Arnold D. Robbins - * Changes for BeOS from mc@whoever.com - awk.h (strncasecmp): bracket prototype. - custom.h [__be_os]: new stuff. - dfa.h, dfa.c [BROKEN_TOK]: new ifdefs to use dfa_token, not token. + Changes for BeOS from mc@whoever.com + + * awk.h (strncasecmp): Bracket prototype. + custom.h [__be_os]: New stuff. + dfa.h, dfa.c [BROKEN_TOK]: New ifdefs to use dfa_token, not token. Fri Aug 1 13:32:49 1997 Arnold D. Robbins - * Tandem changes: - awk.h [TANDEM]: misc additions, as needed. - io.c (get_a_record): changes for fixed length records; not used + Tandem changes: + + * awk.h [TANDEM]: Misc additions, as needed. + * io.c (get_a_record): Changes for fixed length records; not used on other systems. - main.c (MRL): new variable, TANDEM specific. - (main): update handling -mr option for TANDEM. - (load_environ): comment out whole routine if TANDEM. - missing.c [TANDEM]: new includes. - gawkmisc.c [TANDEM]: include `tmiscc'. + * main.c (MRL): New variable, TANDEM specific. + (main): Update handling -mr option for TANDEM. + (load_environ): Comment out whole routine if TANDEM. + missing.c [TANDEM]: New includes. + gawkmisc.c [TANDEM]: Include `tmiscc'. Wed Jul 30 19:53:52 1997 Arnold D. Robbins - * Close-on-exec changes: - awk.h: (os_close_on_exec, os_isdir): new functions. - gawkmisc.c: add include fcntl.h. - configure.in [AC_CHECK_HEADERS]: add fcntl.h. - io.c (devopen, iop_open): change to use os_isdir(), not S_IFDIR(). - (redirect, devopen, iop_open, gawk_popen): change all calls to + Close-on-exec changes: + + * awk.h: (os_close_on_exec, os_isdir): New functions. + * gawkmisc.c: Add include fcntl.h. + * configure.in [AC_CHECK_HEADERS]: Add fcntl.h. + * io.c (devopen, iop_open): Change to use os_isdir(), not S_IFDIR(). + (redirect, devopen, iop_open, gawk_popen): Change all calls to fcntl() to os_close_on_exec(). Tue Jul 29 11:09:45 1997 Arnold D. Robbins - * eval.c (set_BINMODE): fixed check for digits to use isdigit() + * eval.c (set_BINMODE): Fixed check for digits to use isdigit() instead of looping over digits and using strchr(). Duh. Sat Jul 26 22:52:08 1997 Arnold D. Robbins - * eval.c (set_BINMODE): fix so that `-v BINMODE=w' works. - * node.c (r_force_number): add decl of strtod(); makes things + * eval.c (set_BINMODE): Fix so that `-v BINMODE=w' works. + * node.c (r_force_number): Add decl of strtod(); makes things work on MIPS. - * Makefile.in (install-strip): new target. + * Makefile.in (install-strip): New target. Fri Jul 18 13:28:05 1997 Arnold D. Robbins - * io.c (redirect, devopen, iop_open, gawk_popen): set the + * io.c (redirect, devopen, iop_open, gawk_popen): Set the close-on-exec flag on all files and pipes opened for I/O. Keeps children run via system() or other pipes from running out of file descriptors. @@ -4962,7 +5742,7 @@ Tue Jul 8 06:46:32 1997 Arnold D. Robbins - * dfa.c: changes from pjr@jet.UK (Paul J Rippin) from an old + * dfa.c: Changes from pjr@jet.UK (Paul J Rippin) from an old bug report against 2.14.0 that speed up initialization and rewrite the inner loop into readable code. @@ -4973,83 +5753,86 @@ Sun Jun 29 14:17:37 1997 Arnold D. Robbins - * awk.y (exp): fixed warning about `x = /foo/'. + * awk.y (exp): Fixed warning about `x = /foo/'. Wed Jun 25 09:07:57 1997 Arnold D. Robbins - * PORTS: removed from distribution. - * Makefile.in (MISC): removed PORTS. + * PORTS: Removed from distribution. + * Makefile.in (MISC): Removed PORTS. Sun Jun 22 11:52:57 1997 Arnold D. Robbins - * BINMODE changes - awk.h (Node_BINMODE): added. - (struct redirect): added mode field to save for io.c:close_one(). - (BINMODE, BINMODE_node, set_BINMODE): add declarations. - awk.y (isnoeffect): add Node_BINMODE. - eval.c (nodetypes): add Node_BINMODE string. - (r_tree_eval, r_get_lhs): add cases for Node_BINMODE. - (set_BINMODE): new function. - io.c (binmode): new function. - (nextfile, redirect, gawk_popen): add calls to binmode(). - main.c (BINMODE, BINMODE_node): add decls. - (main): add call to setmode() if BINMODE is set. - (varinit): add entry for BINMODE. + BINMODE changes. + + * awk.h (Node_BINMODE): Added. + (struct redirect): Added mode field to save for io.c:close_one(). + (BINMODE, BINMODE_node, set_BINMODE): Add declarations. + * awk.y (isnoeffect): Add Node_BINMODE. + * eval.c (nodetypes): Add Node_BINMODE string. + (r_tree_eval, r_get_lhs): Add cases for Node_BINMODE. + (set_BINMODE): New function. + * io.c (binmode): New function. + (nextfile, redirect, gawk_popen): Add calls to binmode(). + * main.c (BINMODE, BINMODE_node): Add decls. + (main): Add call to setmode() if BINMODE is set. + (varinit): Add entry for BINMODE. Wed Jun 4 21:52:25 1997 Arnold D. Robbins - * configure.in [AC_FUNC_MMAP]: removed call. - * awk.h [struct iobuf]: removed IOP_MMAPED flag and `getrec' member. - * io.c: removed all mmap related code. + * configure.in [AC_FUNC_MMAP]: Removed call. + * awk.h [struct iobuf]: Removed IOP_MMAPED flag and `getrec' member. + * io.c: Removed all mmap related code. Sun Apr 27 16:23:56 1997 Arnold D. Robbins - * aclocal.m4 [GAWK_AC_FUNC_MKTIME]: new macro. - * configure.in (GAWK_AC_FUNC_MKTIME): call it. + * aclocal.m4 [GAWK_AC_FUNC_MKTIME]: New macro. + * configure.in (GAWK_AC_FUNC_MKTIME): Call it. Thu Apr 24 23:25:06 1997 Arnold D. Robbins - * io.c (devopen): remove stat test for /dev/foo files. Finally. + * io.c (devopen): Remove stat test for /dev/foo files. Finally. Fri Jul 26 09:23:15 1996 Arnold D. Robbins - * Changes to add an abort statement, a la tawk - awk.h (Node_K_abort): new enum value for NODETYPE. - main.c (aborting): new flag variable. - (main): add logic to handle aborting. - eval.c (interpret): add case for Node_K_abort. - io.c (do_input): if aborting, break loop. - awk.y (tokentab): add entry for "abort" keyword - (PRODUCTIONS): add production for LEX_ABORT. + Changes to add an abort statement, a la tawk. + + * awk.h (Node_K_abort): New enum value for NODETYPE. + * main.c (aborting): New flag variable. + (main): Add logic to handle aborting. + * eval.c (interpret): Add case for Node_K_abort. + * io.c (do_input): If aborting, break loop. + * awk.y (tokentab): Add entry for "abort" keyword + (PRODUCTIONS): Add production for LEX_ABORT. Wed Jul 24 12:49:52 1996 Arnold D. Robbins - * First cut at changes for i18n. - awk.h (do_intl): declare new flag variable. - [INTLSTR]: new flag def. - (m_tree_eval): fix definitions for INTLSTR. - (force_string): fix definitions for INTLSTR. - awk.y (yylex): add _"..." for international strings. - (dumpintlstr): new function. - main.c (do_intl): define new flag variable. - (optab): add "gen-po" entry. - (main): if do_intl, exit, don't run the program. - (gawkoption): add "gen-po" entry. - node.c (r_force_string): call gettext if flags indicate INTLSTR. + First cut at changes for i18n. + + * awk.h (do_intl): Declare new flag variable. + [INTLSTR]: New flag def. + (m_tree_eval): Fix definitions for INTLSTR. + (force_string): Fix definitions for INTLSTR. + * awk.y (yylex): Add _"..." for international strings. + (dumpintlstr): New function. + * main.c (do_intl): Define new flag variable. + (optab): Add "gen-po" entry. + (main): If do_intl, exit, don't run the program. + (gawkoption): Add "gen-po" entry. + * node.c (r_force_string): Call gettext if flags indicate INTLSTR. Thu Mar 14 06:29:42 1996 Arnold D. Robbins - * awk.h (do_mktime): added declaration of new function. - * builtin.c (do_mktime): new function. - * awk.y (tokentab): added "mktime" to list of gawk extensions. - * missing.c [HAVE_MKTIME]: added include of mktime.c if needed. + * awk.h (do_mktime): Added declaration of new function. + * builtin.c (do_mktime): New function. + * awk.y (tokentab): Added "mktime" to list of gawk extensions. + * missing.c [HAVE_MKTIME]: Added include of mktime.c if needed. Mon Feb 26 22:32:19 1996 Arnold D. Robbins - * io.c (pidopen, useropen): added warnings to use PROCINFO[], + * io.c (pidopen, useropen): Added warnings to use PROCINFO[], not special files. - * main.c (load_procinfo): new function. - * awk.y (variable): added call to load_procinfo() function. + * main.c (load_procinfo): New function. + * awk.y (variable): Added call to load_procinfo() function. Mon Aug 7 15:23:00 2000 Arnold D. Robbins @@ -5057,11 +5840,11 @@ Thu Aug 3 17:47:53 2000 Greg McGary - * regex.c: patches for gcc bounded pointer handling. + * regex.c: Patches for gcc bounded pointer handling. Thu Aug 3 13:09:09 2000 Arnold D. Robbins - * array.c (in_array, do_delete): fix tests for index equality + * array.c (in_array, do_delete): Fix tests for index equality when searching through the array to work correctly when index is "". @@ -5073,7 +5856,7 @@ instead of char *; reputedly fixed in V6.1). * eval.c (C): New macro. - [casetable]: Use it to add explicit casts for the character + [casetable]: Use it to add explicit casts for the character values outside the range of 0 to 127. * missing/strncasecmp.c [C, charmap]: Likewise. @@ -5083,13 +5866,14 @@ Efficiency hack: turn `for (iggy in foo) delete foo[iggy]' into moral equivalent of `delete foo'. - * array.c (do_delete_loop): new routine. - * awk.h [NODETYPE]: new Node_K_delete_loop value. + + * array.c (do_delete_loop): New routine. + * awk.h [NODETYPE]: New Node_K_delete_loop value. Add declaration of do_delete_loop. * awk.y [LEX_FOR]: Fix code to recognize special case. - * eval.c (nodetypes): new entry for Node_K_delete_loop. - (interpret): add case for Node_K_delete_loop, add more - diagnostic info in default (cant_happen) case. + * eval.c (nodetypes): New entry for Node_K_delete_loop. + (interpret): Add case for Node_K_delete_loop, add more + diagnostic info in default (cant_happen) case. Tue Jul 11 22:15:10 2000 Pat Rankin @@ -5098,9 +5882,9 @@ Tue Jul 11 14:08:23 2000 Arnold D. Robbins - * array.c (do_delete): switch to string comparison, not + * array.c (do_delete): Switch to string comparison, not cmp_nodes. - (assoc_find): add call to force_string on subscript. + (assoc_find): Add call to force_string on subscript. * eval.c (interpret): Case Node_K_arrayfor: check for Node_array_ref and fetch original_array. Yowser. @@ -5116,7 +5900,7 @@ Wed Jun 14 13:03:45 2000 Arnold D. Robbins - * field.c (set_record): manage a private buffer for $0. + * field.c (set_record): Manage a private buffer for $0. Keeps things safe in case `getline var' rearranges the IOBUF's contents that $0 is still pointing into. @@ -5160,7 +5944,7 @@ Mon May 22 17:29:43 2000 Arnold D. Robbins - * Makefile.in (clean): get `*/core' too. + * Makefile.in (clean): Get `*/core' too. Sun May 7 16:33:05 2000 Arnold D. Robbins @@ -5170,17 +5954,17 @@ Tue May 2 09:54:29 2000 Arnold D. Robbins Fix referencing freed memory as shown by test/arynocls.* tests. - * awk.h [Node_array_ref]: new node type. - [orig_array]: new macro element in NODE structure. - * field.c (do_split): handle case for Node_array_ref, fetch + * awk.h [Node_array_ref]: New node type. + [orig_array]: New macro element in NODE structure. + * field.c (do_split): Handle case for Node_array_ref, fetch the original array. - * array.c (in_array, do_delete): ditto. - * eval.c (nodetypes[]): add Node_array_ref string. - (r_tree_eval): handle case for Node_array_ref. - (push_args): push arrays as Node_array_ref, and pass them on. - (pop_fcall): don't unref lnode if it's an array when releasing + * array.c (in_array, do_delete): Ditto. + * eval.c (nodetypes[]): Add Node_array_ref string. + (r_tree_eval): Handle case for Node_array_ref. + (push_args): Push arrays as Node_array_ref, and pass them on. + (pop_fcall): Don't unref lnode if it's an array when releasing local arguments. Check for both Node_array and Node_array_ref. - (r_get_lhs): choke on Node_array_ref as for Node_array. + (r_get_lhs): Choke on Node_array_ref as for Node_array. For Node_subscript, handle Node_array_ref. Tue May 2 09:52:12 2000 Bruno Haible @@ -5212,7 +5996,7 @@ Tue Feb 1 18:41:40 2000 Arnold D. Robbins - * eval.c (op_assign): reget the rval after regetting + * eval.c (op_assign): Reget the rval after regetting the left hand side. See test/opasnslf.awk for why. Thu Jan 27 18:06:31 2000 Arnold D. Robbins @@ -5241,7 +6025,7 @@ Thu Dec 2 13:08:18 1999 Arnold D. Robbins - * builtin.c (do_compl): test `d' for negative inside the do_lint + * builtin.c (do_compl): Test `d' for negative inside the do_lint test, not uval. Ooops. Fri Nov 26 10:58:36 1999 Arnold D. Robbins @@ -5252,7 +6036,7 @@ Tue Nov 23 11:58:53 1999 Arnold D. Robbins - * regex.c (SYNTAX): cast argument to `unsigned char' instead of + * regex.c (SYNTAX): Cast argument to `unsigned char' instead of &-ing with 0xFF. Hopefully somewhat more portable, ala 21 Nov 99 changes to awk.y. @@ -5264,22 +6048,22 @@ Sun Nov 21 20:33:35 1999 Arnold D. Robbins - * awk.h (nextc): remove declaration, don't need it here. + * awk.h (nextc): Remove declaration, don't need it here. awk.y (nextc): Cast values to unsigned char so that latin-1 characters in strings don't turn themselves into EOF. Most notably y-umlaut, which is decimal 255. Mon Nov 1 20:00:25 1999 Arnold D. Robbins - * regex.c (init_syntax_once): move below definition of + * regex.c (init_syntax_once): Move below definition of ISALNUM etc., then use ISALNUM to init the table, so that the word ops will work if i18n'ed. (SYNTAX): And subscript with 0xFF for Latin-1 characters. Mon Oct 25 18:37:13 1999 Arnold D. Robbins - * awk.h, main.c, io.c: undo previous changes (22 Oct 1999). - * main.c (main): move call to `init_fields()' to before + * awk.h, main.c, io.c: Undo previous changes (22 Oct 1999). + * main.c (main): Move call to `init_fields()' to before arg parsing. This allows `-v NF=blah' to work ok. Fri Oct 22 17:43:40 1999 Arnold D. Robbins @@ -5287,8 +6071,8 @@ * main.c (arg_assign): Add new arg, `initing' for icky special casing of -v of special variables. Use it to check for NF. May need to add other cases later. - (pre_assign): change call arg_assign, passing initing=TRUE; - io.c (nextfile): change call arg_assign, passing initing=FALSE; + (pre_assign): Change call arg_assign, passing initing=TRUE; + io.c (nextfile): Change call arg_assign, passing initing=FALSE; awk.h: Change prototype for arg_assign. Tue Oct 19 16:06:48 1999 Paul Eggert @@ -5298,7 +6082,7 @@ Wed Oct 6 17:47:47 1999 Arnold D. Robbins - * main.c (arg_assign): return NULL on bad variable. Allows + * main.c (arg_assign): Return NULL on bad variable. Allows things like `./3x=stuff' to work as a filename. Thu Sep 23 21:35:46 1999 Paul Eggert @@ -5317,31 +6101,31 @@ a private copy of each index. Balloons memory usage for no good reason that I can see. Just use dupnode in all cases. - * configure.in: check for $srcdir/.developing adds extra + * configure.in: Check for $srcdir/.developing adds extra defines for my testing/debugging use. Yes, hack alert. Sun Aug 1 11:02:02 1999 Arnold D. Robbins - * node.c (dupnode): turn off FIELD when copying nodes. - * array.c (do_adump, assoc_dump): new functions for array debugging. - * awk.y (tokentab): conditionally add "adump" function for debugging. - * awk.h: delcare new functions. + * node.c (dupnode): Turn off FIELD when copying nodes. + * array.c (do_adump, assoc_dump): New functions for array debugging. + * awk.y (tokentab): Conditionally add "adump" function for debugging. + * awk.h: Delcare new functions. Thu Jul 29 23:26:40 1999 Arnold D. Robbins From wsanchez@apple.com: - * Makefile.in (install-strip): new target, coding stds. compatibility. + * Makefile.in (install-strip): New target, coding stds. compatibility. * config.guess, config.sub: Add MacOS X recognition. Thu Jul 29 19:09:19 1999 Arnold D. Robbins - * awk.y (func_install): make `function foo(foo)' a fatal error. - eval.c (r_tree_eval): diagnose use of a function name as a + * awk.y (func_install): Make `function foo(foo)' a fatal error. + eval.c (r_tree_eval): Diagnose use of a function name as a variable inside the function. Sun Jul 4 16:53:14 1999 Arnold D. Robbins - * eval.c (eval_condition): add extra braces to avoid + * eval.c (eval_condition): Add extra braces to avoid gcc warning. I'm not going to bother for the library code like dfa and regex. @@ -5351,11 +6135,11 @@ Wed Jun 30 16:10:11 1999 Arnold D. Robbins - * awk.h: add include of , and comment about config.h + * awk.h: Add include of , and comment about config.h having to be included before any system headers. Otherwise, with egcs-2.91.66 and later on Linux systems, and possibly others, things break badly, due to the LFS macros. - * awk.y, builtin.c, eval.c, field.c, io.c: removed include + * awk.y, builtin.c, eval.c, field.c, io.c: Removed include of assert.h Wed Jun 9 11:39:19 1999 Paul Eggert @@ -5377,7 +6161,7 @@ * acconfig.h (_FILE_OFFSET_BITS, _LARGEFILE_SOURCE, _LARGE_FILES): New macros. - * Makefile.in (MISC): add config.guess and config.sub so they get + * Makefile.in (MISC): Add config.guess and config.sub so they get included in the distribution. Wed Jun 9 11:29:29 1999 Paul Eggert @@ -5401,35 +6185,35 @@ Tue May 25 16:32:37 1999 Arnold D. Robbins - * builtin.c (format_tree): more smarts for weird cases, such as + * builtin.c (format_tree): More smarts for weird cases, such as zero precisions and zero values used with the `#' flag. Thanks to Andreas Schwab (schwab@gnu.org) for pointing these out. Wed May 19 14:02:54 1999 Arnold D. Robbins - * io.c (do_close): move test for `close(FILENAME)' to after + * io.c (do_close): Move test for `close(FILENAME)' to after loop through all open redirections. Fixes problems in obscure cases with redirections in END rules. Sun May 16 14:08:39 1999 Arnold D. Robbins - * awk.y (yylex): fix group of characters including ',' to + * awk.y (yylex): Fix group of characters including ',' to set want_assign = FALSE. Fixes bizarre parsing problems in function call lists, for example. - * io.c (get_a_record): repair logic for single-leading-newline + * io.c (get_a_record): Repair logic for single-leading-newline case. Tue May 11 16:48:11 1999 Arnold D. Robbins - * aclocal.m4 (GAWK_AC_AIX_TWEAK): new macro. - * configure.in: call it - * Makefile.in: (awklib/all): pass CFLAGS on to sub-make so + * aclocal.m4 (GAWK_AC_AIX_TWEAK): New macro. + * configure.in: Call it + * Makefile.in: (awklib/all): Pass CFLAGS on to sub-make so that password programs will get AIX magic defines. Avoids having to tweak program code for those in doc/gawk.texi. Mon May 3 16:56:23 1999 Arnold D. Robbins - * array.c (do_delete): don't free_temp(subs) until after all + * array.c (do_delete): Don't free_temp(subs) until after all references to it are finished. Mon May 3 13:41:16 1999 Arnold D. Robbins @@ -5444,13 +6228,13 @@ Wed Apr 28 12:27:49 1999 Arnold D. Robbins - * configure.in: more HP stuff: fix the manual alloca code so that + * configure.in: More HP stuff: fix the manual alloca code so that gawk will compile and link on HP systems. See the comments. Sun Apr 25 13:39:16 1999 Arnold D. Robbins - * Makefile.in (gawk): add $(CFLAGS) to linking step. - * configure.in: correctly do AC_FUNC_GETPGRP on HP systems too. + * Makefile.in (gawk): Add $(CFLAGS) to linking step. + * configure.in: Correctly do AC_FUNC_GETPGRP on HP systems too. Tue Apr 13 20:21:00 1999 Arnold D. Robbins @@ -5458,14 +6242,14 @@ Tue Apr 13 19:02:20 1999 Arnold D. Robbins - * io.c (useropen, pidopen): add casts to int on arguments to + * io.c (useropen, pidopen): Add casts to int on arguments to silence gcc warnings. - * regex.c (regcomp,regexec,regfree): add ifdef for APPLE. + * regex.c (regcomp,regexec,regfree): Add ifdef for APPLE. Thu Feb 4 10:38:02 1999 Arnold D. Robbins - * custom.h: hacks for BeOS. Not documented in the manual right now. - * configure.in: hacks for BeOS. Check for HP-UX and define C_ALLOCA + * custom.h: Hacks for BeOS. Not documented in the manual right now. + * configure.in: Hacks for BeOS. Check for HP-UX and define C_ALLOCA if not using gcc. I wish they'd just fix bison already. Sun Dec 20 16:57:38 1998 Arnold D. Robbins @@ -5491,7 +6275,7 @@ Sun Nov 1 15:24:52 1998 Arnold D. Robbins - * builtin.c (format_tree): improve handling of zero-fill + * builtin.c (format_tree): Improve handling of zero-fill when a precision is present. See test/zeroflag.awk. Wed Oct 28 20:40:17 1998 Arnold D. Robbins @@ -5503,9 +6287,9 @@ Sun Oct 18 21:27:24 1998 Arnold D. Robbins - * awk.y (append_right): bug fix, if `list' or `new' are NULL, + * awk.y (append_right): Bug fix, if `list' or `new' are NULL, return `list', so that things don't break too badly. - * regex.c (re_compile_fastmap): remove unused variable `num_regs'. + * regex.c (re_compile_fastmap): Remove unused variable `num_regs'. Thu Oct 8 19:36:57 1998 Arnold D. Robbins @@ -5519,36 +6303,36 @@ Mon Apr 27 11:31:32 1998 Arnold D. Robbins - * main.c (usage): fix the email address for the bug list. - (copyleft): update the copyright year. + * main.c (usage): Fix the email address for the bug list. + (copyleft): Update the copyright year. Mon Mar 23 21:22:32 1998 Arnold D. Robbins - * eval.c (r_get_lhs): make sure that values of type + * eval.c (r_get_lhs): Make sure that values of type Node_param_list don't have the FUNC flag set. This means we don't allow the use of a function name as a variable or array from within the function. Sun Mar 22 19:12:32 1998 Paul Eggert - * aclocal.m4 (GAWK_AC_LARGE_FILES): new macro that checks for + * aclocal.m4 (GAWK_AC_LARGE_FILES): New macro that checks for large file support, and updates CPPFLAGS, LDFLAGS, LIBS as needed. - * configure.in: call GAWK_AC_LARGE_FILES. + * configure.in: Call GAWK_AC_LARGE_FILES. * Makefile.in (CPPFLAGS, LDFLAGS): Let autoconf configure. (COMPFLAGS): Add $(CPPFLAGS). Mon Mar 16 14:06:41 1998 Arnold D. Robbins - * field.c (using_FIELDWIDTHS): new macro. - (using_fieldwidths): use new macro. - (do_split): in case for FS_DFLT, also check that + * field.c (using_FIELDWIDTHS): New macro. + (using_fieldwidths): Use new macro. + (do_split): In case for FS_DFLT, also check that we're not using FIELDWIDTHS. Otherwise, split() would use FIELDWIDTHS, not current value of FS. Oops. Sun Nov 16 20:08:59 1997 Arnold D. Robbins - * builtin.c (sub_common): fix for count of matches in gsub + * builtin.c (sub_common): Fix for count of matches in gsub from Geert.Debyser@esat.kuleuven.ac.be. Wed Oct 15 03:38:12 1997 Arnold D. Robbins @@ -5561,35 +6345,35 @@ Sun Oct 5 11:56:52 1997 Arnold D. Robbins - * configure.in: if ISC add -D_SYSV3 to CFLAGS, per email from + * configure.in: If ISC add -D_SYSV3 to CFLAGS, per email from Mario Vanoni (vanonim@dial.eunet.ch). Fri Sep 26 00:57:49 1997 Arnold D. Robbins - * awk.y (append_right): return if either list is NULL. Prevents + * awk.y (append_right): Return if either list is NULL. Prevents syntax errors from causing core dumps. Wed Sep 17 15:34:15 1997 Arnold D. Robbins - * field.c (rebuild_record): set things up so that all fields point + * field.c (rebuild_record): Set things up so that all fields point into the new record and release any changed fields without causing memory leaks. Avoids problems when fields are extended with the value of $0 or other fields and then $0 is assigned to. Mon Sep 15 16:12:55 1997 Arnold D. Robbins - * builtin.c (do_print): when testing for NUMBER, make sure + * builtin.c (do_print): When testing for NUMBER, make sure it's not a string too. Thanks to Michael Brennan for clarifying the semantics. Sun Sep 14 19:55:12 1997 Arnold D. Robbins - * node.c (format_val): always format values ourselves: avoids + * node.c (format_val): Always format values ourselves: avoids problems if OFMT is bizarre, like %s. Sun Sep 14 00:08:53 1997 Arnold D. Robbins - * io.c (get_a_record): replace all occurrences of the test + * io.c (get_a_record): Replace all occurrences of the test `grRS == FALSE' with `RS_is_null' which makes ` RS = "\0" ' actually work, is clearer code, and actually makes use of the `RS_is_null' variable! @@ -5601,21 +6385,21 @@ Wed Aug 6 21:04:37 1997 Arnold D. Robbins - * io.c (VMS et al gawk_popen): use pclose, not fclose, if + * io.c (VMS et al gawk_popen): Use pclose, not fclose, if iop_alloc fails. Wed Jul 30 19:53:52 1997 Arnold D. Robbins - * awk.y [variable]: fix case for subscript if $3 == NULL. + * awk.y [variable]: Fix case for subscript if $3 == NULL. Sun Jul 27 22:47:30 1997 Arnold D. Robbins - * awk.y (get_src_buf): don't close file if it's stdin. + * awk.y (get_src_buf): Don't close file if it's stdin. Sun Jul 27 22:47:15 1997 Pat Rankin - * io.c (#if VMS: vmsrtl_fileno): new routine. - (#if VMS: fileno): new macro substituted for stdio one. + * io.c (#if VMS: vmsrtl_fileno): New routine. + (#if VMS: fileno): New macro substituted for stdio one. Thu Jul 17 20:05:59 1997 Arnold D. Robbins @@ -5629,8 +6413,8 @@ CHAR_SET_SIZE is not defined, though used in regcomp. It should be taken out of #ifdef SYNTAX_TABLE. Fix from bug group, from Akim Demaille, demaille@inf.enst.fr. - * awk.h (isnondecimal): make test a little smarter. - builtin.c (nondec2awknum): add bailout for decimal numbers, e.g. + * awk.h (isnondecimal): Make test a little smarter. + * builtin.c (nondec2awknum): Add bailout for decimal numbers, e.g. `00.1'. Fix from Larry Schwimmer . Thu Jun 19 19:00:40 1997 Arnold D. Robbins @@ -5652,79 +6436,79 @@ Wed May 14 08:06:08 1997 Arnold D. Robbins - * io.c (do_close): add lint warning if closing something that + * io.c (do_close): Add lint warning if closing something that isn't open. Tue May 13 12:14:12 1997 Arnold D. Robbins - * random.c, builtin.c: remove __GLIBC__ tests, since it breaks + * random.c, builtin.c: Remove __GLIBC__ tests, since it breaks `make test'. I prefer consistency across platforms. - * Makefile.in (gawk): undid April 25 changes and added comment. + * Makefile.in (gawk): Undid April 25 changes and added comment. Putting COMPLAGS in breaks with -g on VMS POSIX. Sun May 11 14:48:04 1997 Darrell Hankerson - * io.c [MSC_VER]: add cases for WIN32. - * regex.c [MSC_VER]: add cases for WIN32. + * io.c [MSC_VER]: Add cases for WIN32. + * regex.c [MSC_VER]: Add cases for WIN32. Sun May 11 07:04:01 1997 Arnold D. Robbins - * builtin.c (do_print): in the loop that evaluates each expression + * builtin.c (do_print): In the loop that evaluates each expression to be printed, do a dupnode to avoid bizarre output. Thanks to Michal for finding this problem. - * awk.y (yylex): fix scanning of hexadecimal constants. + * awk.y (yylex): Fix scanning of hexadecimal constants. Wed May 7 15:09:25 1997 Arnold D. Robbins - * io.c (get_a_record): fix casetable indexing with cast to int. + * io.c (get_a_record): Fix casetable indexing with cast to int. Keeps Michal happy. Tue May 6 16:40:19 1997 Arnold D. Robbins - * eval.c (func_call): removed unneeded variables. + * eval.c (func_call): Removed unneeded variables. Mon May 5 21:17:37 1997 Pat Rankin - * missing/strftime.c [case 'v', VMS_EXT]: for VMS date format, two + * missing/strftime.c [case 'v', VMS_EXT]: For VMS date format, two digit day of month should not be zero padded on the 1st through the 9th. Mon May 5 06:33:47 1997 Arnold D. Robbins - * regex.h, regex.c: merge with current GLIBC version. + * regex.h, regex.c: Merge with current GLIBC version. Mon May 5 06:33:47 1997 Pat Rankin - * io.c (nextfile): move the check for null return from iop_open + * io.c (nextfile): Move the check for null return from iop_open in the normal case and add one for the "no args" case. Fri Apr 25 16:52:33 1997 Arnold D. Robbins - * array.c (grow_table): add a bunch more large primes so arrays + * array.c (grow_table): Add a bunch more large primes so arrays can get really big. Thanks to christos@deshaw.com. - * all files: remove ifdef'ed out code and update copyrights. - * Makefile.in (gawk): add $(COMPFLAGS) to command line. - * eval.c (flags2str): added case for FIELD. + * all files: Remove ifdef'ed out code and update copyrights. + * Makefile.in (gawk): Add $(COMPFLAGS) to command line. + * eval.c (flags2str): Added case for FIELD. Thu Apr 24 22:39:23 1997 Arnold D. Robbins - * COPYING: changed to current official version from FSF. - * regex.c: merge with GLIBC version. - * awk.h [_GNU_SOURCE]: bracket definition inside ifdef. - (NODE.source_line): move name member out of `x' union and + * COPYING: Changed to current official version from FSF. + * regex.c: Merge with GLIBC version. + * awk.h [_GNU_SOURCE]: Bracket definition inside ifdef. + (NODE.source_line): Move name member out of `x' union and into `nodep'; avoids problems doing diagnostics. - (nondec2num): put decl into #if BITOPS || NONDECDATA + (nondec2num): Put decl into #if BITOPS || NONDECDATA * posix/gawkmisc.c, missing/system.c, missing/strtod.c, - missing/strerror.c: move to generic GPL statement at top. - * builtin.c (nondec2num): put into #if BITOPS || NONDECDATA + missing/strerror.c: Move to generic GPL statement at top. + * builtin.c (nondec2num): Put into #if BITOPS || NONDECDATA Wed Apr 23 22:14:14 1997 Arnold D. Robbins - * dfa.c: misc changes for really pedantic SGI compilers. - * builtin.c: bracket defs of random() etc for GLIBC. - * random.c: bracket whole file for GLIBC. - * configure.in: extra goop for GETPGRP test for VMS POSIX. - * custom.h [VMS]: remove hard definition of GETPGRP_VOID. + * dfa.c: Misc changes for really pedantic SGI compilers. + * builtin.c: Bracket defs of random() etc for GLIBC. + * random.c: Bracket whole file for GLIBC. + * configure.in: Extra goop for GETPGRP test for VMS POSIX. + * custom.h [VMS]: Remove hard definition of GETPGRP_VOID. Fri Apr 18 07:55:47 1997 Arnold D. Robbins @@ -5733,26 +6517,26 @@ Tue Apr 15 21:35:45 1997 Arnold D. Robbins NEW UNDOCUMENTED FEATURE. USE THE SOURCE LUKE! - * acconfig.h [NONDECDATA]: new macro. - * awk.h: add decl of do_strtonum. - * awk.y (tokentab): add entry for strtonum function. - * builtin.c (do_strtonum): new function. - * configure.in (non-decimal-data): new --enable-* option. - * node.c (r_force_number): change to allow non-decimal data inside + * acconfig.h [NONDECDATA]: New macro. + * awk.h: Add decl of do_strtonum. + * awk.y (tokentab): Add entry for strtonum function. + * builtin.c (do_strtonum): New function. + * configure.in (non-decimal-data): New --enable-* option. + * node.c (r_force_number): Change to allow non-decimal data inside ifdef NONDECDATA. Tue Apr 15 06:32:50 1997 Pat Rankin - * missing/strftime.c (malloc, realloc, getenv, strchr): only + * missing/strftime.c (malloc, realloc, getenv, strchr): Only declare these when STDC_HEADERS is not defined. - : include these when STDC_HEADERS is defined. - * awk.h (freenode, tree_eval, m_tree_eval): reorganize definitions. - * alloca.c (malloc): if malloc is already defined as a macro, + : Include these when STDC_HEADERS is defined. + * awk.h (freenode, tree_eval, m_tree_eval): Reorganize definitions. + * alloca.c (malloc): If malloc is already defined as a macro, presumeably by config.h, don't define or declare it. Wed Apr 9 22:45:27 1997 Arnold D. Robbins - * Makefile.in [COMPFLAGS]: per suggestion from Karl Berry, put + * Makefile.in [COMPFLAGS]: Per suggestion from Karl Berry, put $(CFLAGS) last. Tue Apr 8 23:54:46 1997 Arnold D. Robbins @@ -5764,14 +6548,14 @@ Mon Apr 7 18:22:37 1997 Arnold D. Robbins * awk.h: Add decls of new routines do_compl() and set_loc(). - * awk.y (tokentab): add entry for "compl" function. - * builtin.c (do_compl): new function to do ones complement. - (do_substr): rationalized yet again, now notices negative start + * awk.y (tokentab): Add entry for "compl" function. + * builtin.c (do_compl): New function to do ones complement. + (do_substr): Rationalized yet again, now notices negative start and length parameters. - * eval.c (push_args): fix if call_list gets realloc'ed in the + * eval.c (push_args): Fix if call_list gets realloc'ed in the middle of things. Avoids crash for deeply nested function calls. - * main.c (catch_sig): add call to set_loc(). - * msg.c (set_loc, srcfile, srcline): new function and private + * main.c (catch_sig): Add call to set_loc(). + * msg.c (set_loc, srcfile, srcline): New function and private variables to help out in tracing down source of error messages. Fri Mar 28 08:42:27 1997 Arnold D. Robbins @@ -5783,68 +6567,68 @@ Thu Mar 27 08:48:57 1997 Arnold D. Robbins - * custom.h [_SEQUENT_]: undef HAVE_MMAP. + * custom.h [_SEQUENT_]: Undef HAVE_MMAP. Wed Mar 26 09:08:16 1997 Arnold D. Robbins - * io.c (iop_alloc): fix definition to make it static. + * io.c (iop_alloc): Fix definition to make it static. Mon Mar 24 23:09:07 1997 Arnold D. Robbins - * field.c (init_fields, etc..): more clean up use of Null_field + * field.c (init_fields, etc..): More clean up use of Null_field and the various flags. - * node.c (unref): if a field, free the node itself. Fixes + * node.c (unref): If a field, free the node itself. Fixes memory leak problems. Sun Mar 23 22:51:09 1997 Arnold D. Robbins - * awk.h [FIELD]: new flag for node->flags field. - * builtin.c (sub_common): if FIELD is set, dup the string. - * field.c (init_fields): set up a new Null_field global var. + * awk.h [FIELD]: New flag for node->flags field. + * builtin.c (sub_common): If FIELD is set, dup the string. + * field.c (init_fields): Set up a new Null_field global var. (init_fields, set_field, set_record) use the FIELD flag. - (getfield): use Null_field instead of private variable. - * io.c (wait_any): comment out calls to pclose and iop_close, + (getfield): Use Null_field instead of private variable. + * io.c (wait_any): Comment out calls to pclose and iop_close, caused weird race conditions. See test/pipeio1.awk. Thanks to Darrell Hankerson for tracing this one down. Tue Mar 18 20:57:18 1997 Arnold D. Robbins - * dfa.c (inboth): free templist; plugs memory leak. + * dfa.c (inboth): Free templist; plugs memory leak. * field.c (init_fields, grow_fields_arr, set_field, rebuild_record, - set_record): remove PERM flag from entries in fields_arr[]. Fixes + set_record): Remove PERM flag from entries in fields_arr[]. Fixes nasty memory leak. Tue Mar 18 06:33:00 1997 Arnold D. Robbins - * awk.y (dup_parms): robustified against parameter errors. + * awk.y (dup_parms): Robustified against parameter errors. Sun Mar 16 21:31:40 1997 Arnold D. Robbins NEW UNDOCUMENTED FEATURE. USE THE SOURCE LUKE! - * acconfig.h [BITOPS]: new macro. If set, do octal & hex and bit ops. - * awk.h [isnondecimal]: new macro, and decl of new functions. - * awk.y (yylex): add recognition of octal and hex constants. - * builtin.c (do_and, do_or, do_xor, do_lshift, do_rshift): new + * acconfig.h [BITOPS]: New macro. If set, do octal & hex and bit ops. + * awk.h [isnondecimal]: New macro, and decl of new functions. + * awk.y (yylex): Add recognition of octal and hex constants. + * builtin.c (do_and, do_or, do_xor, do_lshift, do_rshift): New functions that do bit operations. - (nondec2awknum): new function to convert octal or hex to double. + (nondec2awknum): New function to convert octal or hex to double. * configure.in: Add AC_ARG_ENABLE for bit operations. - * node.c (r_force_number): add octal and hex conversion. + * node.c (r_force_number): Add octal and hex conversion. Sun Mar 16 21:28:56 1997 Arnold D. Robbins - * awk.h [IOP_NOFREE_OBJ]: new macro. - * io.c (iop_open, iop_alloc): add new third parameter, which is + * awk.h [IOP_NOFREE_OBJ]: New macro. + * io.c (iop_open, iop_alloc): Add new third parameter, which is either NULL, meaning allocate a new IOP, or the address of one already allocated. Have a static one in the `nextfile' routine, and use the IOP_NOFREE_OBJ flag for it. All of this keeps us from reading freed memory. The `swaplns' test fails otherwise. - (iop_close): if IOP_NOFREE_OBJ is set, don't free the IOBUF. + (iop_close): If IOP_NOFREE_OBJ is set, don't free the IOBUF. Wed Feb 26 06:21:02 1997 Arnold D. Robbins * eval.c (in_function, pop_fcall_stack, pop_fcall, push_args): - new functions. These manage "frames" of awk function call arguments. + New functions. These manage "frames" of awk function call arguments. The problem is that a `next' or a `nextfile' from a function leaks memory. These changes allow us to free up that memory. (interpret): for Node_K_next and Node_K_nextfile, check if in @@ -5852,29 +6636,30 @@ Fri Feb 21 06:23:19 1997 Arnold D. Robbins - * Misc changes from Katsuyuki Okabe : - * builtin.c (do_substr): change a %d to %ld in warning message. - * eval.c (op_assign): fix format string for warning about %=. + Misc changes from Katsuyuki Okabe : + + * builtin.c (do_substr): Change a %d to %ld in warning message. + * eval.c (op_assign): Fix format string for warning about %=. Wed Feb 19 23:29:02 1997 Arnold D. Robbins - * main.c (main): add do_intervals to condition that causes + * main.c (main): Add do_intervals to condition that causes resetup() to be called again. Makes the --re-interval option actually work. What a concept. Fri Feb 14 09:47:31 1997 Arnold D. Robbins - * io.c [#include "awk.h"]: undef HAVE_MMAP to just use the old code. + * io.c [#include "awk.h"]: Undef HAVE_MMAP to just use the old code. Something is causing a file descriptor leak, and this is getting to be just too much hair. I reserve the right to rip out the mmap code entirely at a future date. Tue Feb 11 06:28:29 1997 Arnold D. Robbins - * io.c (iop_alloc): for an mmap'ed file, close the file descriptor, + * io.c (iop_alloc): For an mmap'ed file, close the file descriptor, and then touch each page to get a private copy. Fixes nasty case of truncating our input file. - (iop_close): don't call close on mmap'ed file. + (iop_close): Don't call close on mmap'ed file. Wed Feb 5 17:59:04 1997 Arnold D. Robbins @@ -5886,34 +6671,34 @@ Sun Jan 26 22:58:29 1997 Arnold D. Robbins - * getopt.h, getopt.c, getopt1.c: replaced with new versions from + * getopt.h, getopt.c, getopt1.c: Replaced with new versions from GLIBC 2. Sun Jan 19 23:37:03 1997 Arnold D. Robbins - * eval.c (nodetype2str): not static, for debugging. - (flags2str) new function: for debugging. - * field.c (get_field): add new var that is like Nnull_string but + * eval.c (nodetype2str): Not static, for debugging. + (flags2str): New function for debugging. + * field.c (get_field): Add new var that is like Nnull_string but does not have numeric attributes, so that new fields are strings. - (set_record): turn off PERM flag before unrefing fields and field 0. - * array.c (in_array): always evaluate subscript, could have + (set_record): Turn off PERM flag before unrefing fields and field 0. + * array.c (in_array): Always evaluate subscript, could have side effects. - * builtin.c (do_strftime): way increase size of buffer to make sure + * builtin.c (do_strftime): Way increase size of buffer to make sure we don't have overflow problem. Keeps Paul Eggert happy. - * custom.h [__amigaos__]: define fork to vfork. From Fred Fish. - * dfa.c: move include of config.h to top, for RSXNT. From Kai + * custom.h [__amigaos__]: Define fork to vfork. From Fred Fish. + * dfa.c: Move include of config.h to top, for RSXNT. From Kai Uwe Rommel. - (ISALPHA, etc): change from Jacob Engelbrecht (jaen@novo.dk) - to better handle non-ascii environments. - * gawkmisc.c: remove amigados case, posix should now work fine. - * amiga/*: nuked per previous entry. - * Makefile.in: removed all references to amiga + (ISALPHA, etc): Change from Jacob Engelbrecht (jaen@novo.dk) + to better handle non-ASCII environments. + * gawkmisc.c: Remove amigados case, posix should now work fine. + * amiga/*: Nuked per previous entry. + * Makefile.in: Removed all references to amiga * io.c [HAVE_SYS_PARAM_H]: Add #undef RE_DUP_MAX to avoid spurious conflict with regex.h. - (flush_io): remove amiga ifdefs, not needed anymore. - (spec_setup): set getrec field for special files. Fix from + (flush_io): Remove amiga ifdefs, not needed anymore. + (spec_setup): Set getrec field for special files. Fix from Mark Gray (markgray@pdt.net). - * node.c (more_nodes): fix to get the last entry in the array. + * node.c (more_nodes): Fix to get the last entry in the array. Wed Jan 8 17:42:37 1997 Andreas Schwab @@ -5932,9 +6717,9 @@ Wed Dec 25 11:17:32 1996 Arnold D. Robbins - * Makefile.in (install, uninstall): use $(srcdir)/patchlevel.h. + * Makefile.in (install, uninstall): Use $(srcdir)/patchlevel.h. Thanks to Richard Levitte, LeViMS@stacken.kth.se. - (install): remove chmod command; let $(INSTALL_PROGRAM) use -m. + (install): Remove chmod command; let $(INSTALL_PROGRAM) use -m. Mon Dec 23 20:36:59 1996 Pat Rankin @@ -5942,9 +6727,9 @@ Fri Dec 20 08:59:55 1996 Arnold D. Robbins - * getopt.c, getopt1.c: comment out the `#if defined (_LIBC) || + * getopt.c, getopt1.c: Comment out the `#if defined (_LIBC) || !defined (__GNU_LIBRARY__)' and `#endif' to force use of this - getopt, even on systems like linux. This will be handled + getopt, even on systems like Linux. This will be handled better in 3.1 / glibc 2. Thu Dec 19 22:52:39 1996 Arnold D. Robbins @@ -5955,7 +6740,7 @@ Wed Dec 18 22:42:10 1996 Darrel Hankerson - * getopt.c (_getopt_internal): if 'W' and ';', if optind == argc, + * getopt.c (_getopt_internal): If 'W' and ';', if optind == argc, return c, don't fall through. Wed Dec 18 10:09:44 1996 Arnold D. Robbins @@ -5967,7 +6752,7 @@ Tue Dec 17 22:23:16 1996 Arnold D. Robbins - * builtin.c (do_strftime): fix case if format string is "". + * builtin.c (do_strftime): Fix case if format string is "". Also fix it if format is not "" but result of strftime is "". See comments in code. @@ -5977,13 +6762,13 @@ Tue Dec 10 22:39:41 1996 Arnold D. Robbins - * Makefile.in (dist): add dependency on `info'. Remove line that + * Makefile.in (dist): Add dependency on `info'. Remove line that does makeinfo. - (install): use $(LN) not $(LN_S) to link gawk gawk-version. + (install): Use $(LN) not $(LN_S) to link gawk gawk-version. Sun Dec 8 07:53:44 1996 Arnold D. Robbins - * Makefile.in (gawk): took COMPFLAGS out of link line for help + * Makefile.in (gawk): Took COMPFLAGS out of link line for help on VMS posix. Shouldn't (I hope) affect anything else. Thu Nov 28 11:52:24 1996 Arnold D. Robbins @@ -5998,22 +6783,22 @@ Sun Nov 24 22:16:26 1996 Arnold D. Robbins - * builtin.c (do_printf): if no args, fatal error. Return silently + * builtin.c (do_printf): If no args, fatal error. Return silently if --traditional. Thu Nov 7 20:54:43 1996 Arnold D. Robbins - * io.c (inrec): make sure EOF hasn't already happened before + * io.c (inrec): Make sure EOF hasn't already happened before trying to read; prevents accessing freed buffer. Thanks to Michal Jaegermann. - * Makefile.in [AWKSRC]: add random.h. - random.h: new file, redefines names of the `random' functions. - random.c, builtin.c: add include of random.h. + * Makefile.in [AWKSRC]: Add random.h. + * random.h: New file, redefines names of the `random' functions. + * random.c, builtin.c: Add include of random.h. Thu Nov 7 09:06:21 1996 Arnold D. Robbins - * awk.y (snode): undo 4 Oct change, put do_split code back. - field.c (do_split): restore old code; add test for CONST, so + * awk.y (snode): Undo 4 Oct change, put do_split code back. + * field.c (do_split): Restore old code; add test for CONST, so that re_parse_field is used if third arg to split is a regexp constant. @@ -6025,20 +6810,20 @@ Sun Nov 3 11:23:21 1996 Arnold D. Robbins - * field.c (def_parse_field): add \n to list of acceptable white space. - (posix_def_parse_field): new routine, just like def_parse_field(), + * field.c (def_parse_field): Add \n to list of acceptable white space. + (posix_def_parse_field): New routine, just like def_parse_field(), but only allows space and tab as separators. - (do_split, set_FS): make appropriate choice between the two + (do_split, set_FS): Make appropriate choice between the two *def_parse_field() routines. Fri Oct 25 10:13:06 1996 Arnold D. Robbins - * configure.in: remove test for random. - * Makefile.in: add random.c to list of files always compiled. - * missing.c: remove HAVE_RANDOM test. - * builtin.c: remove ifdef's for HAVE_RANDOM. - [GAWK_RAND_MAX]: use constant we know works with our random(). - * random.c: new file - moved from missing/ directory. + * configure.in: Remove test for random. + * Makefile.in: Add random.c to list of files always compiled. + * missing.c: Remove HAVE_RANDOM test. + * builtin.c: Remove ifdef's for HAVE_RANDOM. + [GAWK_RAND_MAX]: Use constant we know works with our random(). + * random.c: New file - moved from missing/ directory. Wed Oct 23 19:46:01 1996 Pat Rankin @@ -6052,41 +6837,41 @@ Tue Oct 22 08:49:20 1996 Arnold D. Robbins - * main.c (copyleft): update copyright date to 1996. - too many files to list: update copyright date to 1996. + * main.c (copyleft): Update copyright date to 1996. + * Too many files to list: Update copyright date to 1996. Sun Oct 20 12:21:09 1996 Arnold D. Robbins - * awk.y, dfa.c, eval.c, io.c, re.c: added various FIXME comments. + * awk.y, dfa.c, eval.c, io.c, re.c: Added various FIXME comments. Sat Oct 19 22:06:42 1996 Arnold D. Robbins - * eval.c (nodetype2str): make static, add prototype. - * field.c (sc_parse_field): cast array subscripts to int to + * eval.c (nodetype2str): Make static, add prototype. + * field.c (sc_parse_field): Cast array subscripts to int to shut up gcc warnings. - * gawkmisc.c: add prototype for xmalloc. - * awk.h: add prototype for getredirect. - * builtin.c (do_fflush): remove extern decl of getredirect. - * io.c (get_a_record, mmap_get_record): change decl of rs to int, + * gawkmisc.c: Add prototype for xmalloc. + * awk.h: Add prototype for getredirect. + * builtin.c (do_fflush): Remove extern decl of getredirect. + * io.c (get_a_record, mmap_get_record): Change decl of rs to int, to shut up gcc warnings. - * awk.y (isassignable): add a default to switch to quiet gcc. - * getopt.c (_getopt_internal): give default value to `indfound'. + * awk.y (isassignable): Add a default to switch to quiet gcc. + * getopt.c (_getopt_internal): Give default value to `indfound'. Fri Oct 18 09:00:49 1996 Arnold D. Robbins - * regex.h [RE_SYNTAX_AWK]: add RE_CONTEXT_INDEP_ANCHORS. + * regex.h [RE_SYNTAX_AWK]: Add RE_CONTEXT_INDEP_ANCHORS. Thu Oct 17 22:32:55 1996 Arnold D. Robbins - * aclocal.m4 [AM_SANITY_CHECK_CC]: added. - * configure.in: use it. + * aclocal.m4 [AM_SANITY_CHECK_CC]: Added. + * configure.in: Use it. Thu Oct 17 21:43:25 1996 Arnold D. Robbins - * configure.in: add checks for locale.h and setlocale(). - awk.h: include locale.h and define out setlocale() if not available. - main.c (main): call setlocale(). - builtin.c (do_tolower, do_toupper): use unsigned char pointers, + * configure.in: Add checks for locale.h and setlocale(). + * awk.h: Include locale.h and define out setlocale() if not available. + * main.c (main): Call setlocale(). + * builtin.c (do_tolower, do_toupper): Use unsigned char pointers, to get other charsets right in different locales. Wed Oct 16 21:32:53 1996 Arnold D. Robbins @@ -6097,9 +6882,9 @@ Wed Oct 16 21:22:08 1996 Arnold D. Robbins - * Makefile.in [MISC]: removed TAGS and tags - (local-distclean): added TAGS and tags - (maintainer-clean): removed TAGS and tags + * Makefile.in [MISC]: Removed TAGS and tags. + (local-distclean): Added TAGS and tags. + (maintainer-clean): Removed TAGS and tags. Wed Oct 16 12:28:43 1996 Arnold D. Robbins @@ -6108,28 +6893,27 @@ Sun Oct 6 22:19:45 1996 Arnold D. Robbins - * regex.c: updated to Emacs 19.34b base. + * regex.c: Updated to Emacs 19.34b base. Sun Oct 6 21:57:34 1996 Arnold D. Robbins - * re.c (make_regexp): fixed to handle \8 and \9 in the middle + * re.c (make_regexp): Fixed to handle \8 and \9 in the middle of a regexp. Fri Oct 4 10:26:16 1996 Arnold D. Robbins - * awk.y (snode): remove case for do_split; always making the + * awk.y (snode): Remove case for do_split; always making the third arg a Node_regex is wrong. - field.c (do_split): rationalized to distinguish `/ /' from `" "'. + * field.c (do_split): Rationalized to distinguish `/ /' from `" "'. Generally fixed up. * node.c (parse_escape): Allow single digit \x escapes. 1996-10-02 Paul Eggert - * builtin.c (format_tree): - Fix bug in %d and %i format: NaNs, and values - in the range LONG_MAX+1 .. ULONG_MAX, were mishandled. - Don't assume that double values <= -1 are converted to unsigned - long in the expected way; the C Standard doesn't guarantee this. + * builtin.c (format_tree): Fix bug in %d and %i format: NaNs, and + values in the range LONG_MAX+1 .. ULONG_MAX, were mishandled. + Don't assume that double values <= -1 are converted to unsigned + long in the expected way; the C Standard doesn't guarantee this. 1996-10-02 Paul Eggert @@ -6141,37 +6925,37 @@ by a ';' then search through the long opts table. This makes `-W foo=bar' same as `--foo=bar'. * main.c (main): 'W' now prints an error message. - (gawk_option): deleted the routine. + (gawk_option): Deleted the routine. Sun Sep 29 23:04:54 1996 Arnold D. Robbins - * builtin.c (sub_common): fix several bugs with gsub when + * builtin.c (sub_common): Fix several bugs with gsub when matching null strings. See test/gsubtest.awk. Fri Sep 20 17:35:54 1996 Pat Rankin - * alloca.c (NULL): don't define if has already done so. + * alloca.c (NULL): Don't define if has already done so. Fri Sep 20 11:54:31 1996 Arnold D. Robbins - * builtin.c (do_print): evaluate all the expressions first and + * builtin.c (do_print): Evaluate all the expressions first and then print them. Avoids surprising behavior. See test/prtoeval.awk for an example. Tue Sep 10 06:21:40 1996 Arnold D. Robbins - * awk.h [FUNC]: new flag, marks a Node_parameter_list as really + * awk.h [FUNC]: New flag, marks a Node_parameter_list as really being the function name; allows more checking in awk.y. - * awk.y (isassignable): now takes a NODE * instead of a type, to + * awk.y (isassignable): Now takes a NODE * instead of a type, to check if a function parameter is marked FUNC, then it's the function name, which is not assignable. Fix call from snode(). - (function_prologue): mark function name as FUNC. - (yyerror): don't call exit() anymore; gawk will now report + (function_prologue): Mark function name as FUNC. + (yyerror): Don't call exit() anymore; gawk will now report all syntax errors. Sun Sep 1 19:36:30 1996 Arnold D. Robbins - * field.c (rebuild_record): after building new field 0, go through + * field.c (rebuild_record): After building new field 0, go through all old fields, and if they used to point into the old one, have them point into the new one. Then turn off PERM flag before unref-ing field 0. @@ -6183,62 +6967,62 @@ Wed Aug 28 22:06:33 1996 Arnold D. Robbins - * main.c (usage): add email addresses for bug reporting, per + * main.c (usage): Add email addresses for bug reporting, per change in GNU Coding Standards from RMS. Sun Aug 11 23:13:22 1996 Arnold D. Robbins - * Makefile.in (install): correct use of $(INSTALL_PROGRAM). + * Makefile.in (install): Correct use of $(INSTALL_PROGRAM). Thu Aug 8 23:29:43 1996 Arnold D. Robbins - * parse.y (isassignable): new function, checks in type can + * parse.y (isassignable): New function, checks in type can be assigned to. - (snode): changed checking for 3rd arg of gsub to be more + (snode): Changed checking for 3rd arg of gsub to be more general, supersedes earlier change. Thu Aug 8 13:58:26 1996 Arnold D. Robbins * parse.y (snode): If third arg to sub or gsub is builtin function, complain, since can't substitute into result. - * eval.c (r_get_lhs): diagnose Node_builtin as an error, instead + * eval.c (r_get_lhs): Diagnose Node_builtin as an error, instead of falling through into default case and using cant_happen(). Thu Aug 1 07:13:14 1996 Arnold D. Robbins - * regex.h [RE_DEBUG]: new macro. - [RE_SYNTAX_GNU_AWK]: add RE_DEBUG. - [RE_SYNTAX_POSIX_AWK]: add RE_INTERVALS. - * regex.c (re_set_syntax): add #ifdef DEBUG code to turn on `debug' + * regex.h [RE_DEBUG]: New macro. + [RE_SYNTAX_GNU_AWK]: Add RE_DEBUG. + [RE_SYNTAX_POSIX_AWK]: Add RE_INTERVALS. + * regex.c (re_set_syntax): Add #ifdef DEBUG code to turn on `debug' flag if RE_DEBUG set, and turn off debug if not set and debug was on. - * main.c (main): remove `do_intervals = TRUE' from `if (do_posix)', + * main.c (main): Remove `do_intervals = TRUE' from `if (do_posix)', it's now handled in the definition of RE_SYNTAX_POSIX_AWK. Mon Jul 29 17:49:07 1996 Pat Rankin - * io.c (O_ACCMODE): define it if doesn't. + * io.c (O_ACCMODE): Define it if doesn't. Mon Jul 29 12:02:48 1996 Arnold D. Robbins - * eval.c (set_IGNORECASE): made somewhat smarter. gawk -v IGNORECASE=0 + * eval.c (set_IGNORECASE): Made somewhat smarter. gawk -v IGNORECASE=0 was acting the same as -v IGNORECASE=1. Thanks to Darrell Hankerson for the bug report. Fri Jul 26 12:04:43 1996 Arnold D. Robbins - * awk.h (format_val): add declaration of new routine. - * node.c (format_val): new routine, abstracts old guts of + * awk.h (format_val): Add declaration of new routine. + * node.c (format_val): New routine, abstracts old guts of r_forcestring; accepts format string and index as additional params. - (r_force_string): changed to call format_val. - * builtin.c (do_print): don't tree_eval the tree twice in case + (r_force_string): Changed to call format_val. + * builtin.c (do_print): Don't tree_eval the tree twice in case OFMTidx != CONVFMTidx; doing so could cause side effects (from bug report by Tobias Rettstadt, xassp@ipds.uni-kiel.de). Instead, call format_val. Mon Jul 22 21:59:15 1996 Arnold D. Robbins - * io.c (iop_close): change check for "is $0 in the input buffer" + * io.c (iop_close): Change check for "is $0 in the input buffer" to use `< (iop->buf + iop->secsiz + iop->size)' instead of `< iop->end'. The latter is bogus if EOF has been hit on the file. Fix from Darrel Hankerson based on bug report by @@ -6246,14 +7030,14 @@ Thu Jul 18 19:43:20 1996 Arnold D. Robbins - * builtin.c (sub_common): backed out change of Feb 14 in favor of: + * builtin.c (sub_common): Backed out change of Feb 14 in favor of: (do_gensub): Changed to use make_string and then to |= TEMP flag, based on bug report and patch from Katsuyuki Okabe, hgc02147@niftyserve.or.jp. Thu Jul 18 19:23:53 1996 Arnold D. Robbins - * custom.h: added ifdef for QNX, based on bug report from + * custom.h: Added ifdef for QNX, based on bug report from Michael Hunter, mphunter@qnx.com. Mon Jul 15 09:31:01 1996 Arnold D. Robbins @@ -6265,69 +7049,69 @@ Sun Jul 14 18:40:26 1996 Arnold D. Robbins - * configure.in: added call to AC_CHECK_LIB(m, fmod), since + * configure.in: Added call to AC_CHECK_LIB(m, fmod), since apparently some systems have fmod in the math library. - Portability: the Holy Grail. Sigh. + Portability: The Holy Grail. Sigh. Sun Jul 14 18:08:01 1996 Arnold D. Robbins - * awk.h: add Jim Meyerings ISASCII etc hacks for ctype macros. - * builtin.c (do_toupper, do_tolower, sub_common): changed to use + * awk.h: Add Jim Meyerings ISASCII etc hacks for ctype macros. + * builtin.c (do_toupper, do_tolower, sub_common): Changed to use upper-case versions of ctype macros. - * main.c (main): ditto. - * node.c (r_force_number, parse_escape): ditto. + * main.c (main): Ditto. + * node.c (r_force_number, parse_escape): Ditto. Sun Jul 14 06:34:18 1996 Arnold D. Robbins - * field.c (set_record): made it always do the PERM flag. + * field.c (set_record): Made it always do the PERM flag. Fixes cases where $0 is assigned to, e.g. by gsub, keeps the fields valid. - (get_field): removed the call to reset_record in + (get_field): Removed the call to reset_record in case where ! field0_valid. We want to leave the fields alone if they've been changed. Thu Jul 11 23:04:20 1996 Arnold D. Robbins - * io.c (devopen): change tests of (flag & O_fooONLY) to + * io.c (devopen): Change tests of (flag & O_fooONLY) to (flag & O_ACCMODE) == O_fooONLY. Per (long standing) bug report from Chapman Flack. - (close_redir): change final conditional to just (status != 0) + (close_redir): Change final conditional to just (status != 0) so that ERRNO always set; the warning had its own `if (do_lint)' anyway. - * eval.c (do_split): force type of array to be Node_var_array + * eval.c (do_split): Force type of array to be Node_var_array instead of Node_var. Per (long standing) bug report from Chapman Flack. Thu Jul 11 22:17:14 1996 Arnold D. Robbins - * Makefile.in (install): added symlink of gawk to awk if + * Makefile.in (install): Added symlink of gawk to awk if no awk in $(bindir). - (LN_S): new variable for symlinking. - (uninstall): remove awk if it's the same gawk. + (LN_S): New variable for symlinking. + (uninstall): Remove awk if it's the same gawk. * Configure.in: Added call to AC_PROG_LN_S for Makefile.in. Sun Jul 7 15:47:13 1996 Arnold D. Robbins - * main.c (main): made `--posix' turn on interval expressions. + * main.c (main): Made `--posix' turn on interval expressions. Gawk now matches its documentation. (What a concept!) Wed Jul 3 15:02:48 1996 Arnold D. Robbins - * regex.h, regex.c: upgraded to changes from Emacs 19.31. + * regex.h, regex.c: Upgraded to changes from Emacs 19.31. Fri May 17 08:46:07 1996 Arnold D. Robbins - * io.c (get_a_record): added `continued' flag. Fix from + * io.c (get_a_record): Added `continued' flag. Fix from Darrell Hankerson for when RS = "\n|something". Wed May 15 02:34:55 1996 Arnold D. Robbins - * Makefile.in (awklib/all): now depends on gawk, fixes problem + * Makefile.in (awklib/all): Now depends on gawk, fixes problem with parallel make. Tue May 14 15:02:52 1996 Arnold D. Robbins - * builtin.c (format_tree): fix handling of '*' to deal with + * builtin.c (format_tree): Fix handling of '*' to deal with negative value for fieldwidth -- make positive and turn on left justify. Per bug report from Michael Brennan. @@ -6338,27 +7122,27 @@ Sun May 5 10:11:52 1996 Arnold D. Robbins - * io.c (redirect): call flush_io() before creating a new output pipe, + * io.c (redirect): Call flush_io() before creating a new output pipe, per bug report from Brian Kernighan (bwk@research.bell-labs.com). Fri Mar 15 06:38:33 1996 Arnold D. Robbins - * Makefile.in (install): use $(INSTALL_PROGRAM), not $(INSTALL). - (local-distclean): add `*~' to list of files to be removed. - (CFLAGS): now contains just @CFLAGS@. - (COMPFLAGS): replaces use of CFLAGS, has CFLAGS plus all the + * Makefile.in (install): Use $(INSTALL_PROGRAM), not $(INSTALL). + (local-distclean): Add `*~' to list of files to be removed. + (CFLAGS): Now contains just @CFLAGS@. + (COMPFLAGS): Replaces use of CFLAGS, has CFLAGS plus all the other stuff. Wed Mar 13 14:19:38 1996 Arnold D. Robbins - * io.c (mmap_get_record): fixed to not place sentinel at end + * io.c (mmap_get_record): Fixed to not place sentinel at end of mmap'ed object. Won't work if file is exact multiple of disk block size. See comments in code for more info. Thanks to Rick Adams (rick@uunet.uu.net) for help in testing. Sun Mar 10 22:50:23 1996 Arnold D. Robbins - * io.c (do_close): notice if we were called as `close(FILENAME)' + * io.c (do_close): Notice if we were called as `close(FILENAME)' and arrange to close the current input file. This turns out to be easy to do, just call `nextfile(TRUE)'. Based on bug report from Pascal A. Dupuis, . @@ -6374,58 +7158,58 @@ * field.c (set_NF): If NF is decremented, clear fields between NF and parse_high_water, otherwise if NF incremented, clear fields between parse_high_water and NF. - * eval.c (nodetype2str): new function, used for diagnostics. - eval.c (interpret): use nodetype2str when finding invalid node. + * eval.c (nodetype2str): New function, used for diagnostics. + (interpret): Use nodetype2str when finding invalid node. Mon Mar 4 09:02:28 1996 Arnold D. Robbins - * builtin.c (do_toupper, do_tolower): use isascii along with + * builtin.c (do_toupper, do_tolower): Use isascii along with isupper/islower before changing case, in case characters have the high bit set. This is a hack. Mon Feb 26 22:24:44 1996 Arnold D. Robbins - * builtin.c (sub_common): if no match, and called from gensub, + * builtin.c (sub_common): If no match, and called from gensub, don't free the temporary string, since the tmp_number then writes over it. Sun Feb 25 23:13:01 1996 Arnold D. Robbins - * builtin.c (format_tree): fixed %c to treat user input as + * builtin.c (format_tree): Fixed %c to treat user input as numeric also by adding test for MAYBE_NUM. Tue Feb 20 12:25:50 1996 Arnold D. Robbins * configure.in: Added AC_FUNC_MMAP call and add madvise to list of functions to look for. - * awk.h [IOP_ISMAPPED]: new flag value for mmap support and new + * awk.h [IOP_ISMAPPED]: New flag value for mmap support and new `getrec' structure member in struct iobuf. - * io.c (iop_alloc, iop_close): changed to map/unmap input file + * io.c (iop_alloc, iop_close): Changed to map/unmap input file into memory if possible. - (mmap_get_record): new function to actually retrieve the + (mmap_get_record): New function to actually retrieve the record from mmaped file. Thu Feb 1 08:56:46 1996 Arnold D. Robbins - * builtin.c (do_substr): fixed lint message to use indx+1 when + * builtin.c (do_substr): Fixed lint message to use indx+1 when start position is past end of string. Sun Jan 28 07:00:56 1996 Arnold D. Robbins - * builtin.c (do_substr): rationalized handling of missing length + * builtin.c (do_substr): Rationalized handling of missing length argument, as well as various accompanying lint warnings. Previous code was slightly bogus. Talk about your Day 1 bugs. Thu Jan 25 14:09:11 1996 Arnold D. Robbins - * builtin.c (do_substr): if length exceeds length of actual + * builtin.c (do_substr): If length exceeds length of actual string, do computation of needed substring length *after* the lint warning. Wed Jan 24 10:06:16 1996 Arnold D. Robbins * Makefile.in (gawk): Add $(CFLAGS) to link line. - (Makefile): target depends on the Makefile.in files. + (Makefile): Target depends on the Makefile.in files. (OTHERS): Added TAGS and tags to the distribution. (local-distclean): New rule. (distclean): Use it. @@ -6436,15 +7220,15 @@ Mon Jan 22 13:16:37 1996 Arnold D. Robbins - * main.c (usage): takes new fp parameter which is either + * main.c (usage): Takes new fp parameter which is either stdout for `--help' (per the GNU Coding Standards) or stderr if an error occurs. Fix all calls. - (version): prints to stdout per the coding stds. - (copyleft): prints to stdout now, not stderr, and exits. + (version): Prints to stdout per the coding stds. + (copyleft): Prints to stdout now, not stderr, and exits. Fri Jan 19 08:10:29 1996 Arnold D. Robbins - * regex.h [RE_GNU_AWK]: added RE_CONTEXT_INDEP_OPS to set of + * regex.h [RE_GNU_AWK]: Added RE_CONTEXT_INDEP_OPS to set of bits we turn off for regular operation. Breaks things like /^+[0-9]+/ to match a literal `+' at the beginning of, say, a phone number. @@ -6461,8 +7245,8 @@ Mon Aug 28 23:04:30 1995 Arnold D. Robbins * awk.h updated for NeXT - bracket TRUE/FALSE - * io.c (get_a_record): removed shadowing of 'start' in - * Makefile.in and doc/Makefile.in: fixed to use gawk.1 and gawk.texi, + * io.c (get_a_record): Removed shadowing of 'start' in + * Makefile.in and doc/Makefile.in: Fixed to use gawk.1 and gawk.texi, instead of gawk.1.in and gawk.texi.in. Mon Aug 25 11:04:30 1995 Arnold D. Robbins diff -urN gawk-3.1.5/FUTURES gawk-3.1.6/FUTURES --- gawk-3.1.5/FUTURES 2005-05-11 18:28:11.000000000 +0300 +++ gawk-3.1.6/FUTURES 2007-01-23 20:30:21.000000000 +0200 @@ -1,3 +1,9 @@ + Copyright (C) 2005, 2006 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. + This file lists future projects and enhancements for gawk. Items are listed in roughly the order they will be done for a given release. This file is mainly for use by the developers to help keep themselves on track, please @@ -40,13 +46,15 @@ Make POSIX 2001 behavior the default for sub/gsub. + Add IPv6 support. + + Add an optional base to strtonum, allowing 2-36. + Simplify awk.h. Consider moving var_value info into Node_var itself to reduce memory usage. - Add IPv6 support. - Look at ISO C 99 printf features. Consider integrating Fred Fish's DBUG library into gawk. diff -urN gawk-3.1.5/INSTALL gawk-3.1.6/INSTALL --- gawk-3.1.5/INSTALL 2005-05-11 18:28:11.000000000 +0300 +++ gawk-3.1.6/INSTALL 2007-01-12 12:20:37.000000000 +0200 @@ -1,8 +1,8 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free -Software Foundation, Inc. +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. @@ -10,7 +10,10 @@ Basic Installation ================== -These are generic installation instructions. +Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -23,9 +26,9 @@ It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is +the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale -cache files.) +cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail @@ -35,20 +38,17 @@ may remove or edit it. The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. + `./configure' to configure the package for your system. - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. 2. Type `make' to compile the package. @@ -78,7 +78,7 @@ by setting variables in the command line or in the environment. Here is an example: - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. @@ -87,31 +87,29 @@ You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the +own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. Installation Names ================== -By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PREFIX'. +By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PREFIX', the package will -use PREFIX as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular @@ -159,7 +157,7 @@ need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should -use the `--target=TYPE' option to select the type of system they will +use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a @@ -190,12 +188,12 @@ ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). Here is a another example: +overridden in the site shell script). - /bin/bash ./configure CONFIG_SHELL=/bin/bash +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: -Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent -configuration-related scripts to be executed by `/bin/bash'. + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== diff -urN gawk-3.1.5/LIMITATIONS gawk-3.1.6/LIMITATIONS --- gawk-3.1.5/LIMITATIONS 2005-05-11 18:28:11.000000000 +0300 +++ gawk-3.1.6/LIMITATIONS 2006-08-28 21:16:36.000000000 +0300 @@ -1,3 +1,9 @@ + Copyright (C) 2005, 2006 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. + This file describes limits of gawk on a Unix system (although it is variable even then). Non-Unix systems may have other limits. diff -urN gawk-3.1.5/Makefile.am gawk-3.1.6/Makefile.am --- gawk-3.1.5/Makefile.am 2005-05-11 18:28:11.000000000 +0300 +++ gawk-3.1.6/Makefile.am 2007-10-14 23:19:49.000000000 +0200 @@ -1,14 +1,14 @@ # # Makefile.am --- automake input file for gawk # -# Copyright (C) 2000-2005 the Free Software Foundation, Inc. +# Copyright (C) 2000-2007 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. # # GAWK is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # GAWK is distributed in the hope that it will be useful, @@ -24,7 +24,7 @@ ## process this file with automake to produce Makefile.in # Automatic de-ANSI-fication if needed, make .bz2 files also. -AUTOMAKE_OPTIONS = ansi2knr dist-bzip2 +AUTOMAKE_OPTIONS = dist-bzip2 # This undocumented variable insures that aclocal runs # correctly after changing configure.ac @@ -88,6 +88,7 @@ dfa.h \ ext.c \ field.c \ + floatcomp.c \ gawkmisc.c \ getopt.c \ getopt.h \ @@ -128,15 +129,11 @@ # Get rid of core files when cleaning CLEANFILES = core core.* -MAINTAINERCLEANFILES = version.c awkgram.c +MAINTAINERCLEANFILES = version.c # We want hard links for install-exec-hook, below LN= ln -SUFFIXES = .i -.c.i: - $(COMPILE) -E $< > $@ - # First, add a link from gawk to gawk-X.Y.Z. # Same for pgawk. # @@ -166,18 +163,27 @@ # FIXME: most of this rule should go away upon switching to libtool. dist-hook: cd $(distdir)/extension ; rm -f *.o *.so + cd $(distdir) ; find . -type d -name CVS | xargs rm -fr # Special rules for individual files awkgram.c: awkgram.y $(YACC) $(AM_YFLAGS) $(YFLAGS) $< - awk -f $(srcdir)/bisonfix.awk y.tab.c > $*.c && rm y.tab.c + $(AWK) -f $(srcdir)/bisonfix.awk y.tab.c > $*.c && rm y.tab.c if test -f y.tab.h; then \ if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \ else :; fi +version.c: config.status version.in + $(SHELL) ./config.status --file=version.c:version.in + # This is for my development & testing. efence: gawk $(CC) $(LDFLAGS) -o gawk $$(ls *.o | grep -v '_p.o$$') $(LIBS) -lefence -diffout: - @$(MAKE) -C test $@ +diffout valgrind-scan: + @cd test && $(MAKE) $(AM_MAKEFLAGS) $@ + +valgrind: + cd test; rm -f log.[0-9]*; \ + make check AWK="valgrind --log-file=log ../gawk"; \ + make valgrind-scan diff -urN gawk-3.1.5/Makefile.in gawk-3.1.6/Makefile.in --- gawk-3.1.5/Makefile.in 2005-07-26 21:44:03.000000000 +0300 +++ gawk-3.1.6/Makefile.in 2007-10-22 08:52:01.000000000 +0200 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.5 from Makefile.am. +# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,14 +17,14 @@ # # Makefile.am --- automake input file for gawk # -# Copyright (C) 2000-2005 the Free Software Foundation, Inc. +# Copyright (C) 2000-2007 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. # # GAWK is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # GAWK is distributed in the hope that it will be useful, @@ -37,16 +37,10 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # -SOURCES = $(gawk_SOURCES) $(pgawk_SOURCES) - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -60,55 +54,52 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -ANSI2KNR = @ANSI2KNR@ bin_PROGRAMS = gawk$(EXEEXT) pgawk$(EXEEXT) +subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/configh.in \ - $(srcdir)/version.in $(top_srcdir)/configure ABOUT-NLS AUTHORS \ - COPYING ChangeLog INSTALL NEWS ansi2knr.1 ansi2knr.c awkgram.c \ - config.guess config.rpath config.sub depcomp install-sh \ - missing mkinstalldirs ylwrap -subdir = . + $(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \ + INSTALL NEWS awkgram.c config.guess config.rpath config.sub \ + depcomp install-sh missing mkinstalldirs ylwrap ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes_h.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/socket.m4 \ - $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/strtod.m4 \ + $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intmax_t.m4 \ + $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/isc-posix.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno configure.status.lineno + configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = version.c +CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) -am__objects_1 = array$U.$(OBJEXT) awkgram$U.$(OBJEXT) \ - builtin$U.$(OBJEXT) dfa$U.$(OBJEXT) ext$U.$(OBJEXT) \ - field$U.$(OBJEXT) gawkmisc$U.$(OBJEXT) getopt$U.$(OBJEXT) \ - getopt1$U.$(OBJEXT) io$U.$(OBJEXT) main$U.$(OBJEXT) \ - msg$U.$(OBJEXT) node$U.$(OBJEXT) random$U.$(OBJEXT) \ - re$U.$(OBJEXT) regex$U.$(OBJEXT) replace$U.$(OBJEXT) \ - version$U.$(OBJEXT) -am_gawk_OBJECTS = $(am__objects_1) eval$U.$(OBJEXT) \ - profile$U.$(OBJEXT) +am__objects_1 = array.$(OBJEXT) awkgram.$(OBJEXT) builtin.$(OBJEXT) \ + dfa.$(OBJEXT) ext.$(OBJEXT) field.$(OBJEXT) \ + floatcomp.$(OBJEXT) gawkmisc.$(OBJEXT) getopt.$(OBJEXT) \ + getopt1.$(OBJEXT) io.$(OBJEXT) main.$(OBJEXT) msg.$(OBJEXT) \ + node.$(OBJEXT) random.$(OBJEXT) re.$(OBJEXT) regex.$(OBJEXT) \ + replace.$(OBJEXT) version.$(OBJEXT) +am_gawk_OBJECTS = $(am__objects_1) eval.$(OBJEXT) profile.$(OBJEXT) gawk_OBJECTS = $(am_gawk_OBJECTS) gawk_LDADD = $(LDADD) am__DEPENDENCIES_1 = gawk_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -am_pgawk_OBJECTS = $(am__objects_1) eval_p$U.$(OBJEXT) \ - profile_p$U.$(OBJEXT) +am_pgawk_OBJECTS = $(am__objects_1) eval_p.$(OBJEXT) \ + profile_p.$(OBJEXT) pgawk_OBJECTS = $(am_pgawk_OBJECTS) pgawk_LDADD = $(LDADD) pgawk_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I. +DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -121,10 +112,13 @@ DIST_SOURCES = $(gawk_SOURCES) $(pgawk_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -143,8 +137,6 @@ # Directory for gawk's data files. Automake supplies datadir. pkgdatadir = $(datadir)/awk ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -164,6 +156,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -180,8 +175,9 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ -MKINSTALLDIRS = @MKINSTALLDIRS@ +MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ @@ -201,12 +197,14 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ YACC = @YACC@ +YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -218,31 +216,42 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ # Automatic de-ANSI-fication if needed, make .bz2 files also. -AUTOMAKE_OPTIONS = ansi2knr dist-bzip2 +AUTOMAKE_OPTIONS = dist-bzip2 # This undocumented variable insures that aclocal runs # correctly after changing configure.ac @@ -305,6 +314,7 @@ dfa.h \ ext.c \ field.c \ + floatcomp.c \ gawkmisc.c \ getopt.c \ getopt.h \ @@ -338,16 +348,15 @@ # Get rid of core files when cleaning CLEANFILES = core core.* -MAINTAINERCLEANFILES = version.c awkgram.c +MAINTAINERCLEANFILES = version.c # We want hard links for install-exec-hook, below LN = ln -SUFFIXES = .i all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -.SUFFIXES: .i .c .o .obj .y +.SUFFIXES: .c .o .obj .y am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @@ -385,7 +394,7 @@ config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ - $(MAKE) stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/configh.in $(top_builddir)/config.status @@ -398,11 +407,9 @@ distclean-hdr: -rm -f config.h stamp-h1 -version.c: $(top_builddir)/config.status $(srcdir)/version.in - cd $(top_builddir) && $(SHELL) ./config.status $@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ @@ -425,116 +432,57 @@ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) gawk$(EXEEXT): $(gawk_OBJECTS) $(gawk_DEPENDENCIES) @rm -f gawk$(EXEEXT) - $(LINK) $(gawk_LDFLAGS) $(gawk_OBJECTS) $(gawk_LDADD) $(LIBS) + $(LINK) $(gawk_OBJECTS) $(gawk_LDADD) $(LIBS) pgawk$(EXEEXT): $(pgawk_OBJECTS) $(pgawk_DEPENDENCIES) @rm -f pgawk$(EXEEXT) - $(LINK) $(pgawk_LDFLAGS) $(pgawk_OBJECTS) $(pgawk_LDADD) $(LIBS) + $(LINK) $(pgawk_OBJECTS) $(pgawk_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c -ansi2knr: ansi2knr.$(OBJEXT) - $(LINK) ansi2knr.$(OBJEXT) $(LIBS) -ansi2knr.$(OBJEXT): $(CONFIG_HEADER) - -clean-krextra: - -rm -f ansi2knr - -mostlyclean-kr: - -test "$U" = "" || rm -f *_.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array$U.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/awkgram$U.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/builtin$U.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfa$U.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval$U.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval_p$U.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ext$U.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/field$U.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gawkmisc$U.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt$U.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1$U.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io$U.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main$U.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg$U.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/node$U.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/profile$U.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/profile_p$U.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random$U.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/re$U.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex$U.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/replace$U.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version$U.Po@am__quote@ + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/awkgram.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/builtin.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfa.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval_p.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ext.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/field.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/floatcomp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gawkmisc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/node.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/profile.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/profile_p.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/re.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/replace.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` -array_.c: array.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/array.c; then echo $(srcdir)/array.c; else echo array.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -awkgram_.c: awkgram.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/awkgram.c; then echo $(srcdir)/awkgram.c; else echo awkgram.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -builtin_.c: builtin.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/builtin.c; then echo $(srcdir)/builtin.c; else echo builtin.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -dfa_.c: dfa.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dfa.c; then echo $(srcdir)/dfa.c; else echo dfa.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -eval_.c: eval.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/eval.c; then echo $(srcdir)/eval.c; else echo eval.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -eval_p_.c: eval_p.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/eval_p.c; then echo $(srcdir)/eval_p.c; else echo eval_p.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -ext_.c: ext.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ext.c; then echo $(srcdir)/ext.c; else echo ext.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -field_.c: field.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/field.c; then echo $(srcdir)/field.c; else echo field.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -gawkmisc_.c: gawkmisc.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/gawkmisc.c; then echo $(srcdir)/gawkmisc.c; else echo gawkmisc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -getopt_.c: getopt.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt.c; then echo $(srcdir)/getopt.c; else echo getopt.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -getopt1_.c: getopt1.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt1.c; then echo $(srcdir)/getopt1.c; else echo getopt1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -io_.c: io.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/io.c; then echo $(srcdir)/io.c; else echo io.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -main_.c: main.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/main.c; then echo $(srcdir)/main.c; else echo main.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -msg_.c: msg.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/msg.c; then echo $(srcdir)/msg.c; else echo msg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -node_.c: node.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/node.c; then echo $(srcdir)/node.c; else echo node.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -profile_.c: profile.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/profile.c; then echo $(srcdir)/profile.c; else echo profile.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -profile_p_.c: profile_p.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/profile_p.c; then echo $(srcdir)/profile_p.c; else echo profile_p.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -random_.c: random.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/random.c; then echo $(srcdir)/random.c; else echo random.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -re_.c: re.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/re.c; then echo $(srcdir)/re.c; else echo re.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -regex_.c: regex.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/regex.c; then echo $(srcdir)/regex.c; else echo regex.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -replace_.c: replace.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/replace.c; then echo $(srcdir)/replace.c; else echo replace.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -version_.c: version.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/version.c; then echo $(srcdir)/version.c; else echo version.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -array_.$(OBJEXT) awkgram_.$(OBJEXT) builtin_.$(OBJEXT) dfa_.$(OBJEXT) \ -eval_.$(OBJEXT) eval_p_.$(OBJEXT) ext_.$(OBJEXT) field_.$(OBJEXT) \ -gawkmisc_.$(OBJEXT) getopt_.$(OBJEXT) getopt1_.$(OBJEXT) io_.$(OBJEXT) \ -main_.$(OBJEXT) msg_.$(OBJEXT) node_.$(OBJEXT) profile_.$(OBJEXT) \ -profile_p_.$(OBJEXT) random_.$(OBJEXT) re_.$(OBJEXT) regex_.$(OBJEXT) \ -replace_.$(OBJEXT) version_.$(OBJEXT) : $(ANSI2KNR) .y.c: - $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) -uninstall-info-am: + $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -567,8 +515,7 @@ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: +$(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ @@ -670,24 +617,22 @@ distdir: $(DISTFILES) $(am__remove_distdir) - mkdir $(distdir) - $(mkdir_p) $(distdir)/. $(distdir)/m4 $(distdir)/po - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + test -d $(distdir) || mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ @@ -701,7 +646,7 @@ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ @@ -709,6 +654,8 @@ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ @@ -719,7 +666,7 @@ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz @@ -794,7 +741,7 @@ $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ @@ -816,11 +763,11 @@ check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-recursive -all-am: Makefile $(ANSI2KNR) $(PROGRAMS) config.h +all-am: Makefile $(PROGRAMS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive @@ -851,7 +798,7 @@ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive -clean-am: clean-binPROGRAMS clean-generic clean-krextra mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) @@ -872,14 +819,22 @@ install-data-am: +install-dvi: install-dvi-recursive + install-exec-am: install-binPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook +install-html: install-html-recursive + install-info: install-info-recursive install-man: +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -891,7 +846,7 @@ mostlyclean: mostlyclean-recursive -mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr +mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-recursive @@ -901,30 +856,29 @@ ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-info-am +uninstall-am: uninstall-binPROGRAMS -uninstall-info: uninstall-info-recursive +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-exec-am install-strip -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ - check-am check-local clean clean-binPROGRAMS clean-generic \ - clean-krextra clean-recursive ctags ctags-recursive dist \ +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am check-local clean \ + clean-binPROGRAMS clean-generic ctags ctags-recursive dist \ dist-all dist-bzip2 dist-gzip dist-hook dist-shar dist-tarZ \ dist-zip distcheck distclean distclean-compile \ - distclean-generic distclean-hdr distclean-recursive \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-exec \ - install-exec-am install-exec-hook install-info install-info-am \ - install-man install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-kr mostlyclean-recursive pdf pdf-am ps ps-am tags \ - tags-recursive uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-info-am + distclean-generic distclean-hdr distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-binPROGRAMS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-exec-hook install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS -.c.i: - $(COMPILE) -E $< > $@ # First, add a link from gawk to gawk-X.Y.Z. # Same for pgawk. @@ -955,21 +909,30 @@ # FIXME: most of this rule should go away upon switching to libtool. dist-hook: cd $(distdir)/extension ; rm -f *.o *.so + cd $(distdir) ; find . -type d -name CVS | xargs rm -fr # Special rules for individual files awkgram.c: awkgram.y $(YACC) $(AM_YFLAGS) $(YFLAGS) $< - awk -f $(srcdir)/bisonfix.awk y.tab.c > $*.c && rm y.tab.c + $(AWK) -f $(srcdir)/bisonfix.awk y.tab.c > $*.c && rm y.tab.c if test -f y.tab.h; then \ if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \ else :; fi +version.c: config.status version.in + $(SHELL) ./config.status --file=version.c:version.in + # This is for my development & testing. efence: gawk $(CC) $(LDFLAGS) -o gawk $$(ls *.o | grep -v '_p.o$$') $(LIBS) -lefence -diffout: - @$(MAKE) -C test $@ +diffout valgrind-scan: + @cd test && $(MAKE) $(AM_MAKEFLAGS) $@ + +valgrind: + cd test; rm -f log.[0-9]*; \ + make check AWK="valgrind --log-file=log ../gawk"; \ + make valgrind-scan # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -urN gawk-3.1.5/NEWS gawk-3.1.6/NEWS --- gawk-3.1.5/NEWS 2005-07-26 21:32:22.000000000 +0300 +++ gawk-3.1.6/NEWS 2007-09-25 07:58:23.000000000 +0200 @@ -1,3 +1,87 @@ + Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, + 2005, 2006, 2007 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. + +Changes from 3.1.5 to 3.1.6 +--------------------------- + +1. `gawk 'program' /non/existant/file' no longer core dumps. + +2. Too many people the world over have complained about gawk's use of the + locale's decimal point for parsing input data instead of the traditional + period. So, even though gawk was being nicely standards-compliant, in + a Triumph For The Users, gawk now only uses the locale's decimal point + if --posix is supplied or if POSIXLY_CORRECT is set. It is the sincere + hope that this change will eliminate this FAQ from being asked. + +3. `gawk -v BINMODE=1 ...' works again. + +4. Internal file names like `/dev/user' now work again. (Note that these + file names are obsolete and will go away eventually.) + +5. Problems with wide strings in non "C" locales have been straightened + out everywhere. (At least, we think so.) + +6. Use of `ansi2knr' is no longer supported. Please use an ANSI C compiler. + +7. Updated to Autoconf 2.61, Automake 1.10, and Gettext 0.16.1. + +8. The getopt* and regex* files were synchronized with current GLIBC CVS. + See the ChangeLog for the versions and minor edits made. + +9. There are additional --lint-old warnings. + +10. Gawk now uses getaddrinfo(3) to look up names and IP addresses. This + allows the use of an IPv6 format address and paves the way for + eventual addition of `/inet6/...' and `/inet4/...' hostnames. + +11. We believe gawk to now be valgrind clean. At least when run against + the test suite. + +12. A number of issues dealing with the formatting and printing of very + large numbers in integer formats have been dealt with and fixed. + +13. Gawk now converts "+inf", "-inf", "+nan" and "-nan" into the corresponding + magic IEEE floating point values. Only those strings (case independent) + work. With --posix, gawk calls the system strtod directly. You asked + for it, you got it, you deal with it. + +14. Defining YYDEBUG enables the -D command line option. + +15. Gawk should now work out of the box on Tandem NSK/OSS systems. + +16. Lint messages rationalized: many more of the messages are now printed + only once, instead of every time they are encountered. + +17. The strftime() function now accepts an optional third argument, which + if non-zero or non-null, indicates that the time should be formatted + as UTC instead of as local time. + +18. The precedence of concatenation and `| getline' (in something like + "echo " "date" | getline stuff) has been reverted to the earlier + behavior and now once again matches Unix awk. + +19. New configure time flag --disable-directories-fatal which causes + gawk to silently skip directories on the command line. This behavior + is also enabled for --traditional, since it's what Unix awk does. + +20. A new option, --use-lc-numeric, forces use of the locale's decimal + point without the rest of the draconian restrictions imposed by + --posix. This softens somewhat the stance taken in item #2. + +21. Everything relevant has been updated to the GPL 3. + +22. Array growth should be faster now, at no cost in space. + +23. Lots more tests. + +24. One new translation. + +25. Various bugs fixed, see the ChangeLog for details. + Changes from 3.1.4 to 3.1.5 --------------------------- diff -urN gawk-3.1.5/POSIX.STD gawk-3.1.6/POSIX.STD --- gawk-3.1.5/POSIX.STD 2005-05-11 18:28:11.000000000 +0300 +++ gawk-3.1.6/POSIX.STD 2007-10-22 09:05:31.000000000 +0200 @@ -1,3 +1,66 @@ + Copyright (C) 1992, 1995, 1998, 2001, 2006, 2007 + Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. +-------------------------------------------------------------------------- +Mon May 7 14:38:32 IDT 2007 +============================ + +Thanks to Andrew Schorr for some of the wording here. + + +The Open Group awk specification says that a string value shall +be converted to a numeric value using the ISO C standard atof() +function. The awk spec is here: + + http://www.opengroup.org/onlinepubs/009695399/utilities/awk.html + +And the ISO C standard says that atof() shall work the same way +as strtod(), and strtod() must recognize the IEEE special values +for NaN (not-a-number) and Infinity. + + +As a result, more than one gawk user has come to the conclusion that +gawk is not standard compliant since it does not support converting +these special values. + +Similar reasoning has led other users to conclude that gawk must also +support input data in the format of C99-style hexadecimal floating point +numbers. + +I, Arnold Robbins, the gawk maintainer, feel that while these interpretations +of the standard can be made, they are _unintended_ side effects of the +change in the POSIX standard to refer to the ISO C99 standard everywhere. + +With resepct to hexadecimal floating point, historically, AWK has always +supported the input of only decimal numbers. Adding such a facility is +likely to break many programs, very badly, and is a very big departure +from historical practice. + +With respect to "NaN" and "Inf" values, many people point out that Unix +awk and mawk "support the standard" and print such values in their output. +This is _accidental_ support, since these programs are relying on the +system library version of strtod/atof to do the work. If compiled on a +system without such library support, those programs do NOT support the +special IEEE values. + +These special interpretations introduce a large departure from existing +practice: + + # Thanks to Brian Kernighan for this great example + $ nawk 'BEGIN { print "Nancy Reagan" + 0 }' + nan + +This is just plain wrong. String values with no leading digits must +continue to convert to numeric zero. + +The POSIX people have been asked to clarify these issues, and not recently, +but have not, to my knowledge, done so. Further discussion is provided +in the node "POSIX Floating Point Problems" in the gawk manual. + +---------- Stuff below this line is of historical interest only ---------- March 2001: It looks like the revised 1003.2 standard will actually follow the diff -urN gawk-3.1.5/PROBLEMS gawk-3.1.6/PROBLEMS --- gawk-3.1.5/PROBLEMS 2005-05-11 18:28:11.000000000 +0300 +++ gawk-3.1.6/PROBLEMS 2006-08-28 21:16:36.000000000 +0300 @@ -1,3 +1,9 @@ + Copyright (C) 2005, 2006 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. + This is a list of known problems in gawk 3.1. I don't know when this will be fixed, if ever. See also FUTURES and the gawk.texi doc for other things that need doing. diff -urN gawk-3.1.5/README gawk-3.1.6/README --- gawk-3.1.5/README 2005-07-26 21:39:08.000000000 +0300 +++ gawk-3.1.6/README 2007-06-04 01:10:57.000000000 +0300 @@ -1,17 +1,22 @@ + Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. + README: -This is GNU Awk 3.1.5. It is upwardly compatible with the Bell Labs +This is GNU Awk 3.1.6. It is upwardly compatible with the Bell Labs research version of awk. It is almost completely compliant with the -1993 POSIX 1003.2 standard for awk. (See the note below about POSIX.) +2004 POSIX 1003.1 standard for awk. (See the note below about POSIX.) This is a bug fix release. See NEWS and ChangeLog for details. Work to be done is described briefly in the FUTURES file. Changes in this version are summarized in the NEWS file. Please read the LIMITATIONS file. -Read the file POSIX.STD for a discussion of how the standard says -comparisons should be done vs. how they really should be done and how -gawk does them. +Read the file POSIX.STD for a discussion of issues where the standard +says one thing but gawk does something different. To format the documentation with TeX, use at least version 2000-10-27.17 of texinfo.tex. There is a usable copy of texinfo.tex in the doc directory. @@ -32,8 +37,8 @@ If you have a Windows32, MS-DOS or OS/2 system, use the stuff in the `pc' directory. Similarly, there is a separate directory for VMS. -Ports for the Atari and Tandem are supplied, but they are unsupported. -Thus, their code appears in the `unsupported' directory. +Ports for the Atari and old Tandem systems are supplied, but they are +unsupported. Thus, their code appears in the `unsupported' directory. Appendix B of ``GAWK: Effective Awk Programming'' discusses configuration in detail. The configuration process is based on GNU Autoconf and @@ -82,7 +87,7 @@ MS-DOS: Scott Deifik - scottd@amgen.com + scottd.mail@sbcglobal.net Darrel Hankerson hankedr@mail.auburn.edu @@ -97,6 +102,11 @@ Tandem: Stephen Davies scldad@sdc.com.au + (Original Tandem port) + + Ralf Wildenhues + + POSIX-compliant Tandem systems VMS: Pat Rankin diff -urN gawk-3.1.5/README_d/OBSOLETE/README.FIRST gawk-3.1.6/README_d/OBSOLETE/README.FIRST --- gawk-3.1.5/README_d/OBSOLETE/README.FIRST 2005-05-11 18:28:11.000000000 +0300 +++ gawk-3.1.6/README_d/OBSOLETE/README.FIRST 2007-06-11 05:37:48.000000000 +0300 @@ -18,4 +18,4 @@ file, I will yell at you. Arnold Robbins -arnold@gnu.org +arnold@skeeve.com diff -urN gawk-3.1.5/README_d/OBSOLETE/README.linux gawk-3.1.6/README_d/OBSOLETE/README.linux --- gawk-3.1.5/README_d/OBSOLETE/README.linux 2005-05-11 18:28:11.000000000 +0300 +++ gawk-3.1.6/README_d/OBSOLETE/README.linux 2007-06-11 05:38:42.000000000 +0300 @@ -10,7 +10,7 @@ post-4.1 RedHat Linux. Arnold Robbins -arnold@gnu.org +arnold@skeeve.com Sun Aug 3 15:07:06 EDT 1997 @@ -18,4 +18,4 @@ completely interprets the special file names internally. Arnold Robbins -arnold@gnu.org +arnold@skeeve.com diff -urN gawk-3.1.5/README_d/OBSOLETE/README.sco gawk-3.1.6/README_d/OBSOLETE/README.sco --- gawk-3.1.5/README_d/OBSOLETE/README.sco 2005-05-11 18:28:11.000000000 +0300 +++ gawk-3.1.6/README_d/OBSOLETE/README.sco 2007-06-11 05:39:08.000000000 +0300 @@ -19,13 +19,12 @@ done your homework. Arnold Robbins -arnold@gnu.org +arnold@skeeve.com --------------------------- Date: 14 Oct 1997 12:17 +0000 From: Leigh Hebblethwaite To: bug-gnu-utils@prep.ai.mit.edu -To: arnold@gnu.org I've just built gawk 3.0.3 on my system and have experienced a problem with the routine pipeio2.awk in the test suite. However the problem diff -urN gawk-3.1.5/README_d/OBSOLETE/README.sony gawk-3.1.6/README_d/OBSOLETE/README.sony --- gawk-3.1.5/README_d/OBSOLETE/README.sony 2005-05-11 18:28:11.000000000 +0300 +++ gawk-3.1.6/README_d/OBSOLETE/README.sony 2007-06-11 05:39:31.000000000 +0300 @@ -9,4 +9,4 @@ has. See the README.ultrix file for details. Arnold Robbins -arnold@gnu.org +arnold@skeeve.com diff -urN gawk-3.1.5/README_d/OBSOLETE/README.yacc gawk-3.1.6/README_d/OBSOLETE/README.yacc --- gawk-3.1.5/README_d/OBSOLETE/README.yacc 2005-05-11 18:28:11.000000000 +0300 +++ gawk-3.1.6/README_d/OBSOLETE/README.yacc 2007-06-11 05:40:13.000000000 +0300 @@ -7,4 +7,4 @@ The problem goes away if you use either bison or Berkeley yacc. Arnold Robbins -arnold@gnu.org +arnold@skeeve.com diff -urN gawk-3.1.5/README_d/README.macos gawk-3.1.6/README_d/README.macos --- gawk-3.1.5/README_d/README.macos 2005-07-04 09:56:57.000000000 +0300 +++ gawk-3.1.6/README_d/README.macos 2007-06-11 05:37:32.000000000 +0300 @@ -1,3 +1,8 @@ +Mon Jun 11 05:37:03 IDT 2007 +============================ + +The notes below no longer seem to apply. + Mon Jul 4 09:55:22 IDT 2005 ============================ @@ -10,7 +15,6 @@ Happily, the default is for the multibyte support to be enabled, so all the tests pass by defualt. -The notes below no longer seem to apply. Sun Dec 3 18:11:09 IST 2000 ============================ @@ -25,4 +29,4 @@ done your homework. Arnold Robbins -arnold@gnu.org +arnold@skeeve.com diff -urN gawk-3.1.5/README_d/README.pc gawk-3.1.6/README_d/README.pc --- gawk-3.1.5/README_d/README.pc 2005-05-11 18:28:11.000000000 +0300 +++ gawk-3.1.6/README_d/README.pc 2006-08-24 19:22:40.000000000 +0300 @@ -364,7 +364,7 @@ If you have any problems with the DOS or OS/2 versions of Gawk, please send bug reports (along with the version and compiler used) to - Scott Deifik, scottd@amgen.com (DOS versions) + Scott Deifik, scottd.mail@sbcglobal.net (DOS versions) or gawk-maintainer@unixos2.org (OS/2 version) Darrel Hankerson, hankedr@mail.auburn.edu diff -urN gawk-3.1.5/README_d/README.sgi gawk-3.1.6/README_d/README.sgi --- gawk-3.1.5/README_d/README.sgi 2005-05-11 18:28:11.000000000 +0300 +++ gawk-3.1.6/README_d/README.sgi 2007-06-11 05:39:16.000000000 +0300 @@ -17,4 +17,4 @@ your homework! Arnold Robbins -arnold@gnu.org +arnold@skeeve.com diff -urN gawk-3.1.5/README_d/README.solaris gawk-3.1.6/README_d/README.solaris --- gawk-3.1.5/README_d/README.solaris 2005-05-11 18:28:11.000000000 +0300 +++ gawk-3.1.6/README_d/README.solaris 2007-06-11 05:39:28.000000000 +0300 @@ -37,7 +37,7 @@ This has been fixed in 3.1.0 with the bisonfix.sed script. Arnold Robbins -arnold@gnu.org +arnold@skeeve.com Solaris Problem #2: =================== @@ -51,7 +51,7 @@ IMHO this is Sun's problem, not mine. Arnold Robbins -arnold@gnu.org +arnold@skeeve.com Solution (a) to Problem #2: =========================== @@ -92,7 +92,7 @@ # IMHO this is Sun's problem, not mine. # # Arnold Robbins -# arnold@gnu.org +# arnold@skeeve.com # # Double check your settings with ulimit; I suspect that this is # your problem. diff -urN gawk-3.1.5/README_d/README.sunos4 gawk-3.1.6/README_d/README.sunos4 --- gawk-3.1.5/README_d/README.sunos4 2005-05-11 18:28:11.000000000 +0300 +++ gawk-3.1.6/README_d/README.sunos4 2007-06-11 05:39:49.000000000 +0300 @@ -8,7 +8,7 @@ fuss at you! Arnold Robbins -arnold@gnu.org +arnold@skeeve.com Tue Jan 30 07:01:39 EST 1996 diff -urN gawk-3.1.5/README_d/README.tests gawk-3.1.6/README_d/README.tests --- gawk-3.1.5/README_d/README.tests 2005-05-11 18:28:11.000000000 +0300 +++ gawk-3.1.6/README_d/README.tests 2007-06-11 05:39:59.000000000 +0300 @@ -1,6 +1,5 @@ Date: Sat, 22 Apr 2000 06:07:06 -0600 (MDT) From: "Nelson H. F. Beebe" -To: arnold@gnu.org Cc: beebe@math.utah.edu, sysstaff@math.utah.edu, othmer@math.utah.edu Subject: gawk-3.0.4 and a GNU/Linux gotcha diff -urN gawk-3.1.5/aclocal.m4 gawk-3.1.6/aclocal.m4 --- gawk-3.1.5/aclocal.m4 2005-07-26 21:43:58.000000000 +0300 +++ gawk-3.1.6/aclocal.m4 2007-10-22 08:51:54.000000000 +0200 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.9.5 -*- Autoconf -*- +# generated automatically by aclocal 1.10 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. +# 2005, 2006 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,7 +11,12 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +m4_if(m4_PACKAGE_VERSION, [2.61],, +[m4_fatal([this file was generated for autoconf 2.61. +You have another version of autoconf. If you want to use that, +you should regenerate the build system entirely.], [63])]) + +# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -21,14 +26,29 @@ # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.10' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.10], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- -# Call AM_AUTOMAKE_VERSION so it can be traced. +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.5])]) +[AM_AUTOMAKE_VERSION([1.10])dnl +_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- @@ -83,39 +103,16 @@ am_aux_dir=`cd $ac_aux_dir && pwd` ]) - -# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# This was merged into AC_PROG_CC in Autoconf. - -AU_DEFUN([AM_PROG_CC_STDC], -[AC_PROG_CC -AC_DIAGNOSE([obsolete], [$0: - your code should no longer depend upon `am_cv_prog_cc_stdc', but upon - `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when - you adjust the code. You can also remove the above call to - AC_PROG_CC if you already called it elsewhere.]) -am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc -]) -AU_DEFUN([fp_PROG_CC_STDC]) - # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 7 +# serial 8 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -124,8 +121,10 @@ [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE]) -AC_SUBST([$1_FALSE]) +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl if $2; then $1_TRUE= $1_FALSE='#' @@ -139,15 +138,14 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 +# serial 9 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -175,6 +173,7 @@ ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) @@ -240,6 +239,7 @@ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then @@ -292,7 +292,8 @@ AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- @@ -317,8 +318,9 @@ # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue @@ -365,8 +367,8 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -389,16 +391,20 @@ # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.58])dnl +[AC_PREREQ([2.60])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi fi # test whether we have cygpath @@ -418,6 +424,9 @@ AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl @@ -453,6 +462,10 @@ [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) @@ -488,7 +501,7 @@ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"$am_aux_dir/install-sh"} +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. @@ -566,14 +579,14 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 5 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -589,6 +602,7 @@ # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then @@ -599,7 +613,7 @@ fi ]) -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -607,60 +621,23 @@ # AM_PROG_MKDIR_P # --------------- -# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. -# -# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories -# created by `make install' are always world readable, even if the -# installer happens to have an overly restrictive umask (e.g. 077). -# This was a mistake. There are at least two reasons why we must not -# use `-m 0755': -# - it causes special bits like SGID to be ignored, -# - it may be too restrictive (some setups expect 775 directories). -# -# Do not use -m 0755 and let people choose whatever they expect by -# setting umask. -# -# We cannot accept any implementation of `mkdir' that recognizes `-p'. -# Some implementations (such as Solaris 8's) are not thread-safe: if a -# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' -# concurrently, both version can detect that a/ is missing, but only -# one can create it and the other will error out. Consequently we -# restrict ourselves to GNU make (using the --version option ensures -# this.) +# Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], -[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi -AC_SUBST([mkdir_p])]) +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) # Helper functions for option handling. -*- Autoconf -*- @@ -695,14 +672,14 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005 +# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 5 AC_DEFUN([AM_C_PROTOTYPES], [AC_REQUIRE([AC_C_PROTOTYPES]) @@ -713,9 +690,10 @@ fi # Ensure some checks needed by ansi2knr itself. AC_REQUIRE([AC_HEADER_STDC]) -AC_CHECK_HEADERS(string.h) -AC_SUBST(U)dnl -AC_SUBST(ANSI2KNR)dnl +AC_CHECK_HEADERS([string.h]) +AC_SUBST([U])dnl +AC_SUBST([ANSI2KNR])dnl +_AM_SUBST_NOTMAKE([ANSI2KNR])dnl ]) AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) @@ -797,9 +775,21 @@ if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. @@ -897,10 +887,13 @@ ]) # _AM_PROG_TAR m4_include([m4/arch.m4]) +m4_include([m4/codeset.m4]) m4_include([m4/gettext.m4]) m4_include([m4/iconv.m4]) m4_include([m4/intmax_t.m4]) m4_include([m4/inttypes_h.m4]) +m4_include([m4/isc-posix.m4]) +m4_include([m4/lcmessage.m4]) m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) @@ -910,6 +903,5 @@ m4_include([m4/progtest.m4]) m4_include([m4/socket.m4]) m4_include([m4/stdint_h.m4]) -m4_include([m4/strtod.m4]) m4_include([m4/uintmax_t.m4]) m4_include([m4/ulonglong.m4]) diff -urN gawk-3.1.5/array.c gawk-3.1.6/array.c --- gawk-3.1.5/array.c 2005-07-26 21:07:43.000000000 +0300 +++ gawk-3.1.6/array.c 2007-09-22 22:08:36.000000000 +0200 @@ -3,14 +3,14 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2005 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2007 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. * * GAWK is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * GAWK is distributed in the hope that it will be useful, @@ -45,11 +45,11 @@ static NODE *assoc_find P((NODE *symbol, NODE *subs, unsigned long hash1)); static void grow_table P((NODE *symbol)); -static unsigned long gst_hash_string P((const char *str, size_t len, unsigned long hsize)); +static unsigned long gst_hash_string P((const char *str, size_t len, unsigned long hsize, size_t *code)); static unsigned long scramble P((unsigned long x)); -static unsigned long awk_hash P((const char *s, size_t len, unsigned long hsize)); +static unsigned long awk_hash P((const char *s, size_t len, unsigned long hsize, size_t *code)); -unsigned long (*hash)P((const char *s, size_t len, unsigned long hsize)) = awk_hash; +unsigned long (*hash)P((const char *s, size_t len, unsigned long hsize, size_t *code)) = awk_hash; /* array_init --- possibly temporary function for experimentation purposes */ @@ -326,10 +326,10 @@ symbol->flags &= ~ARRAYMAXED; } -/* hash --- calculate the hash function of the string in subs */ +/* awk_hash --- calculate the hash function of the string in subs */ static unsigned long -awk_hash(register const char *s, register size_t len, unsigned long hsize) +awk_hash(register const char *s, register size_t len, unsigned long hsize, size_t *code) { register unsigned long h = 0; @@ -407,6 +407,8 @@ } } #endif /* ! VAXC */ + if (code != NULL) + *code = h; if (h >= hsize) h %= hsize; @@ -462,7 +464,7 @@ free_temp(subs); return NULL; } - hash1 = hash(subs->stptr, subs->stlen, (unsigned long) symbol->array_size); + hash1 = hash(subs->stptr, subs->stlen, (unsigned long) symbol->array_size, NULL); ret = assoc_find(symbol, subs, hash1); free_temp(subs); if (ret) @@ -485,6 +487,7 @@ { register unsigned long hash1; register NODE *bucket; + size_t code; assert(symbol->type == Node_var_array); @@ -495,10 +498,10 @@ symbol->flags &= ~ARRAYMAXED; grow_table(symbol); hash1 = hash(subs->stptr, subs->stlen, - (unsigned long) symbol->array_size); + (unsigned long) symbol->array_size, & code); } else { hash1 = hash(subs->stptr, subs->stlen, - (unsigned long) symbol->array_size); + (unsigned long) symbol->array_size, & code); bucket = assoc_find(symbol, subs, hash1); if (bucket != NULL) { free_temp(subs); @@ -523,8 +526,7 @@ && (symbol->table_size / symbol->array_size) > AVG_CHAIN_MAX) { grow_table(symbol); /* have to recompute hash value for new size */ - hash1 = hash(subs->stptr, subs->stlen, - (unsigned long) symbol->array_size); + hash1 = code % (unsigned long) symbol->array_size; } getnode(bucket); @@ -557,6 +559,7 @@ bucket->ahvalue = Nnull_string; bucket->ahnext = symbol->var_array[hash1]; + bucket->ahcode = code; symbol->var_array[hash1] = bucket; return &(bucket->ahvalue); } @@ -591,7 +594,7 @@ if (symbol->var_array != NULL) { hash1 = hash(subs->stptr, subs->stlen, - (unsigned long) symbol->array_size); + (unsigned long) symbol->array_size, NULL); last = NULL; for (bucket = symbol->var_array[hash1]; bucket != NULL; last = bucket, bucket = bucket->ahnext) { @@ -739,8 +742,7 @@ for (chain = old[k]; chain != NULL; chain = next) { next = chain->ahnext; - hash1 = hash(chain->ahname_str, - chain->ahname_len, newsize); + hash1 = chain->ahcode % newsize; /* remove from old list, add to new */ chain->ahnext = new[hash1]; @@ -992,6 +994,8 @@ char buf[100]; for (; list != NULL; list = next) { + size_t code; + next = list->ahnext; /* make an int out of i++ */ @@ -1005,7 +1009,8 @@ /* find the bucket where it belongs */ hash1 = hash(list->ahname_str, list->ahname_len, - symbol->array_size); + symbol->array_size, & code); + list->ahcode = code; /* link the node into the chain at that bucket */ list->ahnext = symbol->var_array[hash1]; @@ -1173,7 +1178,7 @@ */ static unsigned long -gst_hash_string(const char *str, size_t len, unsigned long hsize) +gst_hash_string(const char *str, size_t len, unsigned long hsize, size_t *code) { unsigned long hashVal = 1497032417; /* arbitrary value */ unsigned long ret; @@ -1185,6 +1190,10 @@ } ret = scramble(hashVal); + + if (code != NULL) + *code = ret; + if (ret >= hsize) ret %= hsize; diff -urN gawk-3.1.5/awk.h gawk-3.1.6/awk.h --- gawk-3.1.5/awk.h 2005-07-26 21:07:43.000000000 +0300 +++ gawk-3.1.6/awk.h 2007-09-30 21:50:43.000000000 +0200 @@ -3,14 +3,14 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2005 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2007 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. * * GAWK is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * GAWK is distributed in the hope that it will be useful, @@ -41,6 +41,10 @@ #define _GNU_SOURCE 1 /* enable GNU extensions */ #endif /* _GNU_SOURCE */ +#if defined(_TANDEM_SOURCE) && ! defined(_SCO_DS) +#define _XOPEN_SOURCE_EXTENDED 1 +#endif + #include #include #ifdef HAVE_LIMITS_H @@ -60,6 +64,7 @@ #endif #if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__ +#define CAN_USE_STDARG_H 1 #include #else #include @@ -88,6 +93,20 @@ #include #endif +#undef CHARBITS +#undef INTBITS +#if HAVE_INTTYPES_H +# include +#endif +#if HAVE_STDINT_H +# include +#endif + +#if defined(_MSC_VER) +/* for read()/close() in use replace.c */ +#include +#endif + /* ----------------- System dependencies (with more includes) -----------*/ /* This section is the messiest one in the file, not a lot that can be done */ @@ -193,6 +212,14 @@ #include #endif /* HAVE_UNISTD_H */ +#ifdef VMS +#include "vms/redirect.h" +#endif /*VMS*/ + +#ifdef atarist +#include "unsupported/atari/redirect.h" +#endif + #ifndef HAVE_VPRINTF /* if you don't have vprintf, try this and cross your fingers. */ #ifdef HAVE_DOPRNT @@ -203,6 +230,11 @@ #endif /* not HAVE_DOPRNT */ #endif /* HAVE_VPRINTF */ +#ifndef HAVE_SNPRINTF +/* will use replacement version */ +extern int snprintf P((char *restrict buf, size_t len, const char *restrict fmt, ...)); +#endif + #ifndef HAVE_SETLOCALE #define setlocale(locale, val) /* nothing */ #endif /* HAVE_SETLOCALE */ @@ -211,14 +243,6 @@ this is a hack but it gives us the right semantics */ #define lintwarn (*(set_loc(__FILE__, __LINE__),lintfunc)) -#ifdef VMS -#include "vms/redirect.h" -#endif /*VMS*/ - -#ifdef atarist -#include "unsupported/atari/redirect.h" -#endif - #define GNU_REGEX #ifdef GNU_REGEX #include "regex.h" @@ -241,7 +265,7 @@ #define RE_NO_BOL 2 /* for RS, not allowed to match ^ in regexp */ /* Stuff for losing systems. */ -#ifdef STRTOD_NOT_C89 +#if !defined(HAVE_STRTOD) extern double gawk_strtod(); #define strtod gawk_strtod #endif @@ -509,6 +533,7 @@ size_t length; struct exp_node *value; long ref; + size_t code; } hash; #define hnext sub.hash.next #define hname sub.hash.name @@ -520,6 +545,7 @@ #define ahname_len sub.hash.length #define ahvalue sub.hash.value #define ahname_ref sub.hash.ref +#define ahcode sub.hash.code } sub; NODETYPE type; unsigned short flags; @@ -741,6 +767,7 @@ extern int do_non_decimal_data; extern int do_dump_vars; extern int do_tidy_mem; +extern int use_lc_numeric; extern int in_begin_rule; extern int in_end_rule; extern int whiny_users; @@ -962,7 +989,7 @@ extern NODE *do_adump P((NODE *tree)); extern NODE *do_asort P((NODE *tree)); extern NODE *do_asorti P((NODE *tree)); -extern unsigned long (*hash)P((const char *s, size_t len, unsigned long hsize)); +extern unsigned long (*hash)P((const char *s, size_t len, unsigned long hsize, size_t *code)); /* awkgram.c */ extern char *tokexpand P((void)); extern NODE *node P((NODE *left, NODETYPE op, NODE *right)); @@ -1084,12 +1111,16 @@ extern size_t optimal_bufsize P((int fd, struct stat *sbuf)); extern int ispath P((const char *file)); extern int isdirpunct P((int c)); -#if defined(_MSC_VER) && !defined(_WIN32) + +#if HAVE_MEMCPY_ULONG extern char *memcpy_ulong P((char *dest, const char *src, unsigned long l)); -extern void *memset_ulong P((void *dest, int val, unsigned long l)); #define memcpy memcpy_ulong +#endif +#if HAVE_MEMSET_ULONG +extern void *memset_ulong P((void *dest, int val, unsigned long l)); #define memset memset_ulong #endif + /* io.c */ extern void register_open_hook P((void *(*open_func)(IOBUF *))); extern void set_FNR P((void)); @@ -1166,6 +1197,9 @@ #define force_wstring(n) str2wstr(n, NULL) extern const wchar_t *wstrstr P((const wchar_t *haystack, size_t hs_len, const wchar_t *needle, size_t needle_len)); extern const wchar_t *wcasestrstr P((const wchar_t *haystack, size_t hs_len, const wchar_t *needle, size_t needle_len)); +extern void free_wstr P((NODE *n)); +#else +#define free_wstr(NODE) /* empty */ #endif /* re.c */ extern Regexp *make_regexp P((const char *s, size_t len, int ignorecase, int dfa)); @@ -1181,6 +1215,20 @@ extern int remaybelong P((const char *text, size_t len)); extern int isnondecimal P((const char *str, int use_locale)); +/* floatcomp.c */ +#ifdef VMS /* VMS linker weirdness? */ +#define Ceil gawk_ceil +#define Floor gawk_floor +#endif + +extern AWKNUM Floor P((AWKNUM n)); +extern AWKNUM Ceil P((AWKNUM n)); +#ifdef HAVE_UINTMAX_T +extern uintmax_t adjust_uint P((uintmax_t n)); +#else +#define adjust_uint(n) (n) +#endif + /* strncasecmp.c */ #ifndef BROKEN_STRNCASECMP extern int strcasecmp P((const char *s1, const char *s2)); diff -urN gawk-3.1.5/awkgram.y gawk-3.1.6/awkgram.y --- gawk-3.1.5/awkgram.y 2005-07-26 21:07:43.000000000 +0300 +++ gawk-3.1.6/awkgram.y 2007-09-22 22:08:36.000000000 +0200 @@ -3,14 +3,14 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2005 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2007 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. * * GAWK is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * GAWK is distributed in the hope that it will be useful, @@ -30,10 +30,14 @@ #include "awk.h" +#if defined(__STDC__) && __STDC__ < 1 /* VMS weirdness, maybe elsewhere */ +#define signed /**/ +#endif + #define CAN_FREE TRUE #define DONT_FREE FALSE -#if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__ +#ifdef CAN_USE_STDARG_H static void yyerror(const char *m, ...) ATTRIBUTE_PRINTF_1; #else static void yyerror(); /* va_alist */ @@ -64,6 +68,9 @@ static void func_use P((const char *name, enum defref how)); static void check_funcs P((void)); +static ssize_t read_one_line P((int fd, void *buffer, size_t count)); +static int one_line_close P((int fd)); + static int want_regexp; /* lexical scanning kludge */ static int can_return; /* parsing kludge */ static int begin_or_end_rule = FALSE; /* parsing kludge */ @@ -118,15 +125,15 @@ %type function_prologue pattern action variable param_list %type exp common_exp -%type simp_exp non_post_simp_exp +%type simp_exp simp_exp_nc non_post_simp_exp %type expression_list opt_expression_list print_expression_list %type statements statement if_statement switch_body case_statements case_statement case_value opt_param_list %type simple_stmt opt_simple_stmt %type opt_exp opt_variable regexp -%type input_redir output_redir +%type input_redir output_redir field_spec %type print %type assign_operator a_relop relop_or_less -%type func_name +%type func_name opt_incdec %type lex_builtin %token FUNC_CALL NAME REGEXP @@ -242,11 +249,19 @@ } | LEX_BEGIN { + static int begin_seen = 0; + if (do_lint_old && ++begin_seen == 2) + warning(_("old awk does not support multiple `BEGIN' or `END' rules")); + begin_or_end_rule = TRUE; $$ = append_pattern(&begin_block, (NODE *) NULL); } | LEX_END { + static int end_seen = 0; + if (do_lint_old && ++end_seen == 2) + warning(_("old awk does not support multiple `BEGIN' or `END' rules")); + begin_or_end_rule = parsing_end_rule = TRUE; $$ = append_pattern(&end_block, (NODE *) NULL); } @@ -444,6 +459,8 @@ } | LEX_NEXTFILE statement_term { + static short warned = FALSE; + if (do_traditional) { /* * can't use yyerror, since may have overshot @@ -452,8 +469,10 @@ errcount++; error(_("`nextfile' is a gawk extension")); } - if (do_lint) + if (do_lint && ! warned) { + warned = TRUE; lintwarn(_("`nextfile' is a gawk extension")); + } if (begin_or_end_rule) { /* same thing */ errcount++; @@ -502,7 +521,7 @@ && $3->lnode->lnode->type == Node_val && $3->lnode->lnode->numbr == 0.0)) ) { - static int warned = FALSE; + static short warned = FALSE; $$ = node(NULL, Node_K_print_rec, $4); @@ -521,8 +540,12 @@ { $$ = node(variable($2, CAN_FREE, Node_var_array), Node_K_delete, $4); } | LEX_DELETE NAME { - if (do_lint) + static short warned = FALSE; + + if (do_lint && ! warned) { + warned = TRUE; lintwarn(_("`delete array' is a gawk extension")); + } if (do_traditional) { /* * can't use yyerror, since may have overshot @@ -535,9 +558,16 @@ } | LEX_DELETE '(' NAME ')' { - /* this is for tawk compatibility. maybe the warnings should always be done. */ - if (do_lint) + /* + * this is for tawk compatibility. maybe the warnings + * should always be done. + */ + static short warned = FALSE; + + if (do_lint && ! warned) { + warned = TRUE; lintwarn(_("`delete(array)' is a non-portable tawk extension")); + } if (do_traditional) { /* * can't use yyerror, since may have overshot @@ -805,7 +835,11 @@ $$ = node($1, $2, mk_rexp($3)); } | exp LEX_IN NAME - { $$ = node(variable($3, CAN_FREE, Node_var_array), Node_in_array, $1); } + { + if (do_lint_old) + warning(_("old awk does not support the keyword `in' except after `for'")); + $$ = node(variable($3, CAN_FREE, Node_var_array), Node_in_array, $1); + } | exp a_relop exp %prec RELOP { if (do_lint && $3->type == Node_regex) @@ -840,19 +874,9 @@ ; common_exp - : regexp + : simp_exp { $$ = $1; } - | '!' regexp %prec UNARY - { - $$ = node(node(make_number(0.0), - Node_field_spec, - (NODE *) NULL), - Node_nomatch, - $2); - } - | '(' expression_list r_paren LEX_IN NAME - { $$ = node(variable($5, CAN_FREE, Node_var_array), Node_in_array, $2); } - | simp_exp + | simp_exp_nc { $$ = $1; } | common_exp simp_exp %prec CONCAT_OP { $$ = node($1, Node_concat, $2); } @@ -879,19 +903,46 @@ lintwarn(_("non-redirected `getline' undefined inside END action")); $$ = node($2, Node_K_getline, $3); } - | simp_exp IO_IN LEX_GETLINE opt_variable - { - $$ = node($4, Node_K_getline, - node($1, $2, (NODE *) NULL)); - } | variable INCREMENT { $$ = node($1, Node_postincrement, (NODE *) NULL); } | variable DECREMENT { $$ = node($1, Node_postdecrement, (NODE *) NULL); } + | '(' expression_list r_paren LEX_IN NAME + { + if (do_lint_old) { + warning(_("old awk does not support the keyword `in' except after `for'")); + warning(_("old awk does not support multidimensional arrays")); + } + $$ = node(variable($5, CAN_FREE, Node_var_array), Node_in_array, $2); + } + ; + +/* Expressions containing "| getline" lose the ability to be on the + right-hand side of a concatenation. */ +simp_exp_nc + : common_exp IO_IN LEX_GETLINE opt_variable + { + $$ = node($4, Node_K_getline, + node($1, $2, (NODE *) NULL)); + } + | simp_exp_nc '^' simp_exp + { $$ = node($1, Node_exp, $3); } + | simp_exp_nc '*' simp_exp + { $$ = node($1, Node_times, $3); } + | simp_exp_nc '/' simp_exp + { $$ = node($1, Node_quotient, $3); } + | simp_exp_nc '%' simp_exp + { $$ = node($1, Node_mod, $3); } + | simp_exp_nc '+' simp_exp + { $$ = node($1, Node_plus, $3); } + | simp_exp_nc '-' simp_exp + { $$ = node($1, Node_minus, $3); } ; non_post_simp_exp - : '!' simp_exp %prec UNARY + : regexp + { $$ = $1; } + | '!' simp_exp %prec UNARY { $$ = node($2, Node_not, (NODE *) NULL); } | '(' exp r_paren { $$ = $2; } @@ -902,11 +953,17 @@ { $$ = snode($3, Node_builtin, (int) $1); } | LEX_LENGTH { - if (do_lint) + static short warned1 = FALSE, warned2 = FALSE; + + if (do_lint && ! warned1) { + warned1 = TRUE; lintwarn(_("call of `length' without parentheses is not portable")); + } $$ = snode((NODE *) NULL, Node_builtin, (int) $1); - if (do_posix) + if (do_posix && ! warned2) { + warned2 = TRUE; warning(_("call of `length' without parentheses is deprecated by POSIX")); + } } | FUNC_CALL '(' opt_expression_list r_paren { @@ -958,9 +1015,10 @@ { NODE *n; - if ((n = lookup($1)) != NULL && ! isarray(n)) + if ((n = lookup($1)) != NULL && ! isarray(n)) { yyerror(_("use of non-array as array")); - else if ($3 == NULL) { + $$ = node(variable($1, CAN_FREE, Node_var_array), Node_subscript, $3); + } else if ($3 == NULL) { fatal(_("invalid subscript expression")); } else if ($3->rnode == NULL) { $$ = node(variable($1, CAN_FREE, Node_var_array), Node_subscript, $3->lnode); @@ -968,8 +1026,7 @@ } else $$ = node(variable($1, CAN_FREE, Node_var_array), Node_subscript, $3); } - | '$' non_post_simp_exp - { $$ = node($2, Node_field_spec, (NODE *) NULL); } + | field_spec { $$ = $1; } /* #if 0 | lex_builtin @@ -978,6 +1035,27 @@ */ ; +field_spec + : '$' non_post_simp_exp opt_incdec + { + NODE *n = node($2, Node_field_spec, (NODE *) NULL); + if ($3 != NULL) { + if ($3[0] == '+') + $$ = node(n, Node_postincrement, (NODE *) NULL); + else + $$ = node(n, Node_postdecrement, (NODE *) NULL); + } else { + $$ = n; + } + } + ; + +opt_incdec + : INCREMENT { $$ = "+"; } + | DECREMENT { $$ = "-"; } + | /* empty */ { $$ = NULL; } + ; + l_brace : '{' opt_nls ; @@ -1088,7 +1166,7 @@ #if defined(GAWKDEBUG) || defined(ARRAYDEBUG) /* || ... */ {"stopme", Node_builtin, LEX_BUILTIN, GAWKX|A(0), stopme}, #endif -{"strftime", Node_builtin, LEX_BUILTIN, GAWKX|A(0)|A(1)|A(2), do_strftime}, +{"strftime", Node_builtin, LEX_BUILTIN, GAWKX|A(0)|A(1)|A(2)|A(3), do_strftime}, {"strtonum", Node_builtin, LEX_BUILTIN, GAWKX|A(1), do_strtonum}, {"sub", Node_builtin, LEX_BUILTIN, NOT_OLD|A(2)|A(3), do_sub}, {"substr", Node_builtin, LEX_BUILTIN, A(2)|A(3), do_substr}, @@ -1144,7 +1222,7 @@ */ static void -#if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__ +#ifdef CAN_USE_STDARG_H yyerror(const char *m, ...) #else /* VARARGS0 */ @@ -1199,7 +1277,7 @@ *bp = save; -#if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__ +#ifdef CAN_USE_STDARG_H va_start(args, m); if (mesg == NULL) mesg = m; @@ -1240,6 +1318,14 @@ static size_t buflen = 0; static int fd; + /* + * No argument prototype on readfunc on purpose, + * avoids problems with some ancient systems where + * the types of arguments to read() aren't up to date. + */ + static ssize_t (*readfunc)() = 0; + static int (*closefunc)P((int fd)) = NULL; + int n; register char *scan; int newfile; @@ -1248,6 +1334,19 @@ int l; char *readloc; + if (readfunc == NULL) { + char *cp = getenv("AWKREADFUNC"); + + /* If necessary, one day, test value for different functions. */ + if (cp == NULL) { + readfunc = read; + closefunc = close; + } else { + readfunc = read_one_line; + closefunc = one_line_close; + } + } + again: newfile = FALSE; if (nextfile > numfiles) @@ -1260,7 +1359,7 @@ * gawk '' /path/name * Sigh. */ - static int warned = FALSE; + static short warned = FALSE; if (do_lint && ! warned) { warned = TRUE; @@ -1272,6 +1371,7 @@ if (srcfiles[nextfile].val[l-1] == '\n') { /* has terminating newline, can use it directly */ sourceline = 1; + source = NULL; lexptr = lexptr_begin = srcfiles[nextfile].val; /* fall through to pointer adjustment and return, below */ } else { @@ -1293,6 +1393,8 @@ buf[++l] = '\0'; /* set vars and return */ + sourceline = 0; + source = NULL; lexptr = lexptr_begin = buf; } lexend = lexptr + l; @@ -1366,12 +1468,33 @@ } } - if (scan <= buf) { + /* + * This condition can be read as follows: IF + * 1. The beginning of the line is at the beginning of the + * buffer (no newline was found: scan <= buf) + * AND: + * 2. The start of valid lexical data is into the buffer + * (lexptr_begin > buf) + * OR: + * 3. We have scanned past the end of the last data read + * (lexptr == lexend) + * AND: + * 4. There's no room left in the buffer + * (lexptr_offset >= buflen - 2) + * + * If all that's true, grow the buffer to add more to + * the current line. + */ + + if (scan <= buf + && (lexptr_begin > buf + || (lexptr == lexend + && lexptr_offset >= buflen - 2))) { /* have to grow the buffer */ buflen *= 2; erealloc(buf, char *, buflen, "get_src_buf"); - } else { - /* shift things down */ + } else if (scan > buf) { + /* Line starts in middle of the buffer, shift things down. */ memmove(buf, scan, lexend - scan); /* * make offsets relative to start of line, @@ -1392,13 +1515,13 @@ } /* add more data to buffer */ - n = read(fd, readloc, readcount); + n = (*readfunc)(fd, readloc, readcount); if (n == -1) fatal(_("can't read sourcefile `%s' (%s)"), source, strerror(errno)); if (n == 0) { if (newfile) { - static int warned = FALSE; + static short warned = FALSE; if (do_lint && ! warned) { warned = TRUE; @@ -1406,7 +1529,7 @@ } } if (fd != fileno(stdin)) /* safety */ - close(fd); + (*closefunc)(fd); samefile = FALSE; nextfile++; goto again; @@ -1585,7 +1708,8 @@ int mid; static int did_newline = FALSE; char *tokkey; - static int lasttok = 0, eof_warned = FALSE; + static int lasttok = 0; + static short eof_warned = FALSE; int inhex = FALSE; int intlstr = FALSE; @@ -1757,9 +1881,13 @@ while ((c = nextc()) == ' ' || c == '\t' || c == '\r') continue; if (c == '#') { - if (do_lint) + static short warned = FALSE; + + if (do_lint && ! warned) { + warned = TRUE; lintwarn( _("use of `\\ #...' line continuation is not portable")); + } while ((c = nextc()) != '\n') if (c == EOF) break; @@ -2399,7 +2527,8 @@ r->subnode = subn; if (r->builtin == do_sprintf) { count_args(r); - r->lnode->printf_count = r->printf_count; /* hack */ + if (r->lnode != NULL) /* r->lnode set from subn. guard against syntax errors & check it's valid */ + r->lnode->printf_count = r->printf_count; /* hack */ } return r; } @@ -2519,7 +2648,7 @@ var_count++; len = strlen(name); - bucket = hash(name, len, (unsigned long) HASHSIZE); + bucket = hash(name, len, (unsigned long) HASHSIZE, NULL); getnode(hp); hp->type = Node_hashnode; hp->hnext = variables[bucket]; @@ -2540,7 +2669,7 @@ register size_t len; len = strlen(name); - for (bucket = variables[hash(name, len, (unsigned long) HASHSIZE)]; + for (bucket = variables[hash(name, len, (unsigned long) HASHSIZE, NULL)]; bucket != NULL; bucket = bucket->hnext) if (bucket->hlength == len && STREQN(bucket->hname, name, len)) return bucket->hvalue; @@ -2921,7 +3050,7 @@ name = np->param; len = strlen(name); - save = &(variables[hash(name, len, (unsigned long) HASHSIZE)]); + save = &(variables[hash(name, len, (unsigned long) HASHSIZE, NULL)]); for (bucket = *save; bucket != NULL; bucket = bucket->hnext) { if (len == bucket->hlength && STREQN(bucket->hname, name, len)) { var_count--; @@ -2982,7 +3111,7 @@ int ind; len = strlen(name); - ind = hash(name, len, HASHSIZE); + ind = hash(name, len, HASHSIZE, NULL); for (fp = ftable[ind]; fp != NULL; fp = fp->next) { if (strcmp(fp->name, name) == 0) { @@ -3371,3 +3500,49 @@ } return -1; } + +/* + * This provides a private version of functions that act like VMS's + * variable-length record filesystem, where there was a bug on + * certain source files. + */ + +static FILE *fp = NULL; + +/* read_one_line --- return one input line at a time. mainly for debugging. */ + +static ssize_t +read_one_line(int fd, void *buffer, size_t count) +{ + char buf[BUFSIZ]; + + /* Minor potential memory leak here. Too bad. */ + if (fp == NULL) { + fp = fdopen(fd, "r"); + if (fp == NULL) { + fprintf(stderr, "ugh. fdopen: %s\n", strerror(errno)); + exit(1); + } + } + + if (fgets(buf, sizeof buf, fp) == NULL) + return 0; + + memcpy(buffer, buf, strlen(buf)); + return strlen(buf); +} + +/* one_line_close --- close the open file being read with read_one_line() */ + +static int +one_line_close(int fd) +{ + int ret; + + if (fp == NULL || fd != fileno(fp)) + fatal("debugging read/close screwed up!"); + + ret = fclose(fp); + fp = NULL; + return ret; +} diff -urN gawk-3.1.5/awklib/ChangeLog gawk-3.1.6/awklib/ChangeLog --- gawk-3.1.5/awklib/ChangeLog 2005-07-26 21:46:39.000000000 +0300 +++ gawk-3.1.6/awklib/ChangeLog 2007-10-22 08:50:39.000000000 +0200 @@ -1,3 +1,24 @@ +Mon Oct 22 08:49:05 2007 Arnold D. Robbins + + * Release 3.1.6: Release tar file made. + +2007-05-25 Andreas Schwab + + * Makefile.am: Add missing dependencies on stamp-eg. + +Wed Mar 14 13:22:52 2007 Andrew J. Schorr + + * Makefile.am (AWKPROG): New macro to set locale sanely. + (stamp-eg): Use it instead of $AWK to do the extractions. + +Wed Mar 14 13:16:28 2007 Arnold D. Robbins + + * Makefile.am (clean-local): Remove `eg.old' also. + +Sat Jan 13 21:17:33 2007 Ralf Wildenhues + + * Makefile.am (stamp-eg): Allow rebuilding from a VPATH build. + Tue Jul 26 21:46:16 2005 Arnold D. Robbins * Release 3.1.5: Release tar file made. diff -urN gawk-3.1.5/awklib/Makefile.am gawk-3.1.6/awklib/Makefile.am --- gawk-3.1.5/awklib/Makefile.am 2005-06-20 23:20:02.000000000 +0300 +++ gawk-3.1.6/awklib/Makefile.am 2007-08-11 22:39:49.000000000 +0300 @@ -1,14 +1,14 @@ # # awklib/Makefile.am --- automake input file for gawk # -# Copyright (C) 1995-2005 the Free Software Foundation, Inc. +# Copyright (C) 1995-2006 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. # # GAWK is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # GAWK is distributed in the hope that it will be useful, @@ -23,7 +23,10 @@ ## process this file with automake to produce Makefile.in -EXTRA_DIST = ChangeLog extract.awk eg stamp-eg +EXTRA_DIST = ChangeLog extract.awk eg $(srcdir)/stamp-eg +# With some locales, the script extract.awk fails. +# So we fix the locale to some sensible value. +AWKPROG = LC_ALL=C LANG=C ../gawk$(EXEEXT) # Get config.h from the build directory and custom.h from the source directory. AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) @@ -37,7 +40,7 @@ nodist_grcat_SOURCES = grcat.c nodist_pwcat_SOURCES = pwcat.c -all: stamp-eg $(AUXPROGS) igawk $(AUXAWK) +all: $(srcdir)/stamp-eg $(AUXPROGS) igawk $(AUXAWK) install-exec-hook: $(AUXAWK) $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) @@ -53,12 +56,27 @@ clean-local: rm -f $(AUXAWK) igawk *.exe + rm -fr eg.old -stamp-eg: $(srcdir)/../doc/gawk.texi $(srcdir)/../doc/gawkinet.texi - rm -fr eg stamp-eg - $(AWK) -f $(srcdir)/extract.awk $(srcdir)/../doc/gawk.texi $(srcdir)/../doc/gawkinet.texi - @echo 'some makes are stupid and will not check a directory' > stamp-eg - @echo 'against a file, so this file is a place holder. gack.' >> stamp-eg +$(srcdir)/stamp-eg: $(srcdir)/../doc/gawk.texi $(srcdir)/../doc/gawkinet.texi + cd $(srcdir) && \ + mv eg eg.old && \ + rm -fr stamp-eg && \ + $(AWKPROG) -f extract.awk ../doc/gawk.texi ../doc/gawkinet.texi + @echo 'some makes are stupid and will not check a directory' > $(srcdir)/stamp-eg + @echo 'against a file, so this file is a place holder. gack.' >> $(srcdir)/stamp-eg + cd $(srcdir) && \ + if [ -d eg.old ] && [ -d eg.old/CVS ] ; then \ + mv eg.old/CVS eg ; \ + mv eg.old/data/CVS eg/data ; \ + mv eg.old/lib/CVS eg/lib ; \ + mv eg.old/misc/CVS eg/misc ; \ + mv eg.old/network/CVS eg/network ; \ + mv eg.old/prog/CVS eg/prog ; \ + rm -fr eg.old ; fi + +$(srcdir)/eg/lib/pwcat.c $(srcdir)/eg/lib/grcat.c $(srcdir)/eg/prog/igawk.sh \ +$(srcdir)/eg/lib/passwdawk.in $(srcdir)/eg/lib/groupawk.in: stamp-eg; @: pwcat$(EXEEXT): $(srcdir)/eg/lib/pwcat.c $(COMPILE) $(srcdir)/eg/lib/pwcat.c $(LDFLAGS) -o $@ diff -urN gawk-3.1.5/awklib/Makefile.in gawk-3.1.6/awklib/Makefile.in --- gawk-3.1.5/awklib/Makefile.in 2005-07-26 21:44:01.000000000 +0300 +++ gawk-3.1.6/awklib/Makefile.in 2007-10-22 08:52:00.000000000 +0200 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.5 from Makefile.am. +# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,14 +17,14 @@ # # awklib/Makefile.am --- automake input file for gawk # -# Copyright (C) 1995-2005 the Free Software Foundation, Inc. +# Copyright (C) 1995-2006 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. # # GAWK is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # GAWK is distributed in the hope that it will be useful, @@ -38,16 +38,10 @@ # -SOURCES = $(nodist_grcat_SOURCES) $(nodist_pwcat_SOURCES) - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -66,13 +60,14 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes_h.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/socket.m4 \ - $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/strtod.m4 \ + $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intmax_t.m4 \ + $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/isc-posix.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -91,7 +86,7 @@ pwcat_LDADD = $(LDADD) binSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -105,8 +100,6 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkgdatadir = $(datadir)/awk ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -126,6 +119,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -142,8 +138,9 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ -MKINSTALLDIRS = @MKINSTALLDIRS@ +MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ @@ -163,12 +160,14 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ YACC = @YACC@ +YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -180,29 +179,43 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -EXTRA_DIST = ChangeLog extract.awk eg stamp-eg +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = ChangeLog extract.awk eg $(srcdir)/stamp-eg +# With some locales, the script extract.awk fails. +# So we fix the locale to some sensible value. +AWKPROG = LC_ALL=C LANG=C ../gawk$(EXEEXT) # Get config.h from the build directory and custom.h from the source directory. AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) @@ -246,7 +259,7 @@ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-pkglibexecPROGRAMS: $(pkglibexec_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(pkglibexecdir)" || $(mkdir_p) "$(DESTDIR)$(pkglibexecdir)" + test -z "$(pkglibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibexecdir)" @list='$(pkglibexec_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ @@ -269,7 +282,7 @@ -test -z "$(pkglibexec_PROGRAMS)" || rm -f $(pkglibexec_PROGRAMS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ @@ -297,19 +310,18 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwcat.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` -uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -360,22 +372,21 @@ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ @@ -391,7 +402,7 @@ all-am: Makefile $(PROGRAMS) $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -440,14 +451,22 @@ install-data-am: +install-dvi: install-dvi-am + install-exec-am: install-binSCRIPTS install-pkglibexecPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook +install-html: install-html-am + install-info: install-info-am install-man: +install-pdf: install-pdf-am + +install-ps: install-ps-am + installcheck-am: maintainer-clean: maintainer-clean-am @@ -467,24 +486,28 @@ ps-am: -uninstall-am: uninstall-binSCRIPTS uninstall-info-am uninstall-local \ +uninstall-am: uninstall-binSCRIPTS uninstall-local \ uninstall-pkglibexecPROGRAMS +.MAKE: install-am install-exec-am install-strip + .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-local clean-pkglibexecPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ - install-binSCRIPTS install-data install-data-am install-exec \ - install-exec-am install-exec-hook install-info install-info-am \ - install-man install-pkglibexecPROGRAMS install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-binSCRIPTS uninstall-info-am \ + install-binSCRIPTS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-exec-hook \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am \ + install-pkglibexecPROGRAMS install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-binSCRIPTS \ uninstall-local uninstall-pkglibexecPROGRAMS -all: stamp-eg $(AUXPROGS) igawk $(AUXAWK) +all: $(srcdir)/stamp-eg $(AUXPROGS) igawk $(AUXAWK) install-exec-hook: $(AUXAWK) $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) @@ -500,12 +523,27 @@ clean-local: rm -f $(AUXAWK) igawk *.exe + rm -fr eg.old + +$(srcdir)/stamp-eg: $(srcdir)/../doc/gawk.texi $(srcdir)/../doc/gawkinet.texi + cd $(srcdir) && \ + mv eg eg.old && \ + rm -fr stamp-eg && \ + $(AWKPROG) -f extract.awk ../doc/gawk.texi ../doc/gawkinet.texi + @echo 'some makes are stupid and will not check a directory' > $(srcdir)/stamp-eg + @echo 'against a file, so this file is a place holder. gack.' >> $(srcdir)/stamp-eg + cd $(srcdir) && \ + if [ -d eg.old ] && [ -d eg.old/CVS ] ; then \ + mv eg.old/CVS eg ; \ + mv eg.old/data/CVS eg/data ; \ + mv eg.old/lib/CVS eg/lib ; \ + mv eg.old/misc/CVS eg/misc ; \ + mv eg.old/network/CVS eg/network ; \ + mv eg.old/prog/CVS eg/prog ; \ + rm -fr eg.old ; fi -stamp-eg: $(srcdir)/../doc/gawk.texi $(srcdir)/../doc/gawkinet.texi - rm -fr eg stamp-eg - $(AWK) -f $(srcdir)/extract.awk $(srcdir)/../doc/gawk.texi $(srcdir)/../doc/gawkinet.texi - @echo 'some makes are stupid and will not check a directory' > stamp-eg - @echo 'against a file, so this file is a place holder. gack.' >> stamp-eg +$(srcdir)/eg/lib/pwcat.c $(srcdir)/eg/lib/grcat.c $(srcdir)/eg/prog/igawk.sh \ +$(srcdir)/eg/lib/passwdawk.in $(srcdir)/eg/lib/groupawk.in: stamp-eg; @: pwcat$(EXEEXT): $(srcdir)/eg/lib/pwcat.c $(COMPILE) $(srcdir)/eg/lib/pwcat.c $(LDFLAGS) -o $@ diff -urN gawk-3.1.5/bisonfix.awk gawk-3.1.6/bisonfix.awk --- gawk-3.1.5/bisonfix.awk 2005-05-11 18:28:14.000000000 +0300 +++ gawk-3.1.6/bisonfix.awk 2007-08-11 22:39:48.000000000 +0300 @@ -7,7 +7,7 @@ # # GAWK is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # GAWK is distributed in the hope that it will be useful, diff -urN gawk-3.1.5/builtin.c gawk-3.1.6/builtin.c --- gawk-3.1.5/builtin.c 2005-07-26 21:07:43.000000000 +0300 +++ gawk-3.1.6/builtin.c 2007-09-30 21:57:05.000000000 +0200 @@ -3,14 +3,14 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2005 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2007 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. * * GAWK is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * GAWK is distributed in the hope that it will be useful, @@ -28,14 +28,6 @@ #if defined(HAVE_FCNTL_H) #include #endif -#undef CHARBITS -#undef INTBITS -#if HAVE_INTTYPES_H -# include -#endif -#if HAVE_STDINT_H -# include -#endif #include #include "random.h" @@ -73,22 +65,7 @@ static NODE *sub_common P((NODE *tree, long how_many, int backdigs)); -/* Assume IEEE-754 arithmetic on pre-C89 hosts. */ -#ifndef FLT_RADIX -#define FLT_RADIX 2 -#endif -#ifndef FLT_MANT_DIG -#define FLT_MANT_DIG 24 -#endif -#ifndef DBL_MANT_DIG -#define DBL_MANT_DIG 53 -#endif - #ifdef _CRAY -/* Work around a problem in conversion of doubles to exact integers. */ -#define Floor(n) floor((n) * (1.0 + DBL_EPSILON)) -#define Ceil(n) ceil((n) * (1.0 + DBL_EPSILON)) - /* Force the standard C compiler to use the library math functions. */ extern double exp(double); double (*Exp)() = exp; @@ -96,9 +73,6 @@ extern double log(double); double (*Log)() = log; #define log(x) (*Log)(x) -#else -#define Floor(n) floor(n) -#define Ceil(n) ceil(n) #endif #define DEFAULT_G_PRECISION 6 @@ -464,12 +438,15 @@ if (tree->lnode->type == Node_var_array || tree->lnode->type == Node_array_ref) { NODE *array_var = tree->lnode; + static short warned = FALSE; if (array_var->type == Node_array_ref) array_var = array_var->orig_array; - if (do_lint) + if (do_lint && ! warned) { + warned = TRUE; lintwarn(_("`length(array)' is a gawk extension")); + } if (do_posix) goto normal; /* will die as fatal error */ @@ -558,12 +535,13 @@ } /* Is there space for something L big in the buffer? */ -#define chksize(l) if ((l) > ofre) { \ +#define chksize(l) if ((l) >= ofre) { \ size_t olen = obufout - obuf; \ - erealloc(obuf, char *, osiz * 2, "format_tree"); \ + size_t delta = osiz+l-ofre; \ + erealloc(obuf, char *, osiz + delta, "format_tree"); \ obufout = obuf + olen; \ - ofre += osiz; \ - osiz *= 2; \ + ofre += delta; \ + osiz += delta; \ } static NODE **the_args = 0; @@ -593,8 +571,21 @@ uintmax_t uval; int sgn; int base = 0; - char cpbuf[30]; /* if we have numbers bigger than 30 */ - char *cend = &cpbuf[30];/* chars, we lose, but seems unlikely */ + /* + * Although this is an array, the elements serve two different + * purposes. The first element is the general buffer meant + * to hold the entire result string. The second one is a + * temporary buffer for large floating point values. They + * could just as easily be separate variables, and the + * code might arguably be clearer. + */ + struct { + char *buf; + size_t bufsize; + char stackbuf[30]; + } cpbufs[2]; +#define cpbuf cpbufs[0].buf + char *cend = &cpbufs[0].stackbuf[sizeof(cpbufs[0].stackbuf)]; char *cp; const char *fill; AWKNUM tmpval; @@ -603,6 +594,7 @@ int zero_flag = FALSE; int quote_flag = FALSE; int ii, jj; + char *chp; static const char sp[] = " "; static const char zero_string[] = "0"; static const char lchbuf[] = "0123456789abcdef"; @@ -614,6 +606,34 @@ osiz = INITIAL_OUT_SIZE; ofre = osiz - 2; + { + size_t k; + for (k = 0; k < sizeof(cpbufs)/sizeof(cpbufs[0]); k++) { + cpbufs[k].bufsize = sizeof(cpbufs[k].stackbuf); + cpbufs[k].buf = cpbufs[k].stackbuf; + } + } + + /* + * The point of this goop is to grow the buffer + * holding the converted number, so that large + * values don't overflow a fixed length buffer. + */ +#define PREPEND(CH) do { \ + if (cp == cpbufs[0].buf) { \ + char *prev = cpbufs[0].buf; \ + emalloc(cpbufs[0].buf, char *, 2*cpbufs[0].bufsize, \ + "format_tree"); \ + memcpy((cp = cpbufs[0].buf+cpbufs[0].bufsize), prev, \ + cpbufs[0].bufsize); \ + cpbufs[0].bufsize *= 2; \ + if (prev != cpbufs[0].stackbuf) \ + free(prev); \ + cend = cpbufs[0].buf+cpbufs[0].bufsize; \ + } \ + *--cp = (CH); \ +} while(0) + /* * Icky problem. If the args make a nested call to printf/sprintf, * we end up clobbering the static variable `the_args'. Not good. @@ -704,6 +724,7 @@ have_prec = FALSE; signchar = FALSE; zero_flag = FALSE; + quote_flag = FALSE; lj = alt = big = bigbig = small = FALSE; fill = sp; cp = cend; @@ -861,7 +882,7 @@ if (big) break; else { - static int warned = FALSE; + static short warned = FALSE; if (do_lint && ! warned) { lintwarn(_("`l' is meaningless in awk formats; ignored")); @@ -876,7 +897,7 @@ if (bigbig) break; else { - static int warned = FALSE; + static short warned = FALSE; if (do_lint && ! warned) { lintwarn(_("`L' is meaningless in awk formats; ignored")); @@ -891,7 +912,7 @@ if (small) break; else { - static int warned = FALSE; + static short warned = FALSE; if (do_lint && ! warned) { lintwarn(_("`h' is meaningless in awk formats; ignored")); @@ -946,6 +967,15 @@ need_format = FALSE; parse_next_arg(); tmpval = force_number(arg); + /* + * Check for Nan or Inf (without using isfinite(), + * since that may not be available on all platforms) + */ + if ((tmpval != tmpval) || + ((2*tmpval == tmpval) && (tmpval != 0))) + goto out_of_range; + else + tmpval = double_to_int(tmpval); /* * ``The result of converting a zero value with a @@ -955,25 +985,45 @@ goto pr_tail; if (tmpval < 0) { - if (tmpval < INTMAX_MIN) - goto out_of_range; + tmpval = -tmpval; sgn = TRUE; - uval = - (uintmax_t) (intmax_t) tmpval; } else { - /* Use !, so that NaNs are out of range. */ - if (! (tmpval <= UINTMAX_MAX)) - goto out_of_range; + if (tmpval == -0.0) + /* avoid printing -0 */ + tmpval = 0.0; sgn = FALSE; - uval = (uintmax_t) tmpval; } + /* + * Use snprintf return value to tell if there + * is enough room in the buffer or not. + */ + while ((i = snprintf(cpbufs[1].buf, + cpbufs[1].bufsize, "%.0f", + tmpval)) >= + cpbufs[1].bufsize) { + if (cpbufs[1].buf == cpbufs[1].stackbuf) + cpbufs[1].buf = NULL; + if (i > 0) { + cpbufs[1].bufsize += ((i > cpbufs[1].bufsize) ? + i : cpbufs[1].bufsize); + } + else + cpbufs[1].bufsize *= 2; + assert(cpbufs[1].bufsize > 0); + erealloc(cpbufs[1].buf, char *, + cpbufs[1].bufsize, "format_tree"); + } + if (i < 1) + goto out_of_range; + chp = &cpbufs[1].buf[i-1]; ii = jj = 0; do { - *--cp = (char) ('0' + uval % 10); - uval /= 10; + PREPEND(*chp); + chp--; i--; #if defined(HAVE_LOCALE_H) if (quote_flag && loc.grouping[ii] && ++jj == loc.grouping[ii]) { - if (uval) /* only add if more digits coming */ - *--cp = loc.thousands_sep[0]; /* XXX - assumption it's one char */ + if (i) /* only add if more digits coming */ + PREPEND(loc.thousands_sep[0]); /* XXX - assumption it's one char */ if (loc.grouping[ii+1] == 0) jj = 0; /* keep using current val in loc.grouping[ii] */ else if (loc.grouping[ii+1] == CHAR_MAX) @@ -984,18 +1034,18 @@ } } #endif - } while (uval > 0); + } while (i > 0); /* add more output digits to match the precision */ if (have_prec) { while (cend - cp < prec) - *--cp = '0'; + PREPEND('0'); } if (sgn) - *--cp = '-'; + PREPEND('-'); else if (signchar) - *--cp = signchar; + PREPEND(signchar); /* * When to fill with zeroes is of course not simple. * First: No zero fill if left-justifying. @@ -1047,14 +1097,14 @@ goto pr_tail; if (tmpval < 0) { - if (tmpval < INTMAX_MIN) - goto out_of_range; uval = (uintmax_t) (intmax_t) tmpval; - } else { - /* Use !, so that NaNs are out of range. */ - if (! (tmpval <= UINTMAX_MAX)) + if ((AWKNUM)(intmax_t)uval != + double_to_int(tmpval)) goto out_of_range; + } else { uval = (uintmax_t) tmpval; + if ((AWKNUM)uval != double_to_int(tmpval)) + goto out_of_range; } /* * When to fill with zeroes is of course not simple. @@ -1071,12 +1121,12 @@ ii = jj = 0; do { - *--cp = chbuf[uval % base]; + PREPEND(chbuf[uval % base]); uval /= base; #if defined(HAVE_LOCALE_H) if (base == 10 && quote_flag && loc.grouping[ii] && ++jj == loc.grouping[ii]) { if (uval) /* only add if more digits coming */ - *--cp = loc.thousands_sep[0]; /* XXX --- assumption it's one char */ + PREPEND(loc.thousands_sep[0]); /* XXX --- assumption it's one char */ if (loc.grouping[ii+1] == 0) jj = 0; /* keep using current val in loc.grouping[ii] */ else if (loc.grouping[ii+1] == CHAR_MAX) @@ -1092,20 +1142,20 @@ /* add more output digits to match the precision */ if (have_prec) { while (cend - cp < prec) - *--cp = '0'; + PREPEND('0'); } if (alt && tmpval != 0) { if (base == 16) { - *--cp = cs1; - *--cp = '0'; + PREPEND(cs1); + PREPEND('0'); if (fill != sp) { bchunk(cp, 2); cp += 2; fw -= 2; } } else if (base == 8) - *--cp = '0'; + PREPEND('0'); } base = 0; if (prec > fw) @@ -1130,7 +1180,7 @@ /* out of range - emergency use of %g format */ if (do_lint) lintwarn(_("[s]printf: value %g is out of range for `%%%c' format"), - tmpval, cs1); + (double) tmpval, cs1); cs1 = 'g'; goto format_float; @@ -1175,15 +1225,32 @@ *cp++ = cs1; *cp = '\0'; #ifndef GFMT_WORKAROUND - (void) sprintf(obufout, cpbuf, - (int) fw, (int) prec, (double) tmpval); +#if defined(LC_NUMERIC) + if (quote_flag && ! use_lc_numeric) + setlocale(LC_NUMERIC, ""); +#endif + { + int n; + while ((n = snprintf(obufout, ofre, cpbuf, + (int) fw, (int) prec, + (double) tmpval)) >= ofre) + chksize(n) + } +#if defined(LC_NUMERIC) + if (quote_flag && ! use_lc_numeric) + setlocale(LC_NUMERIC, "C"); +#endif #else /* GFMT_WORKAROUND */ if (cs1 == 'g' || cs1 == 'G') sgfmt(obufout, cpbuf, (int) alt, (int) fw, (int) prec, (double) tmpval); - else - (void) sprintf(obufout, cpbuf, - (int) fw, (int) prec, (double) tmpval); + else { + int n; + while ((n = snprintf(obufout, ofre, cpbuf, + (int) fw, (int) prec, + (double) tmpval)) >= ofre) + chksize(n) + } #endif /* GFMT_WORKAROUND */ len = strlen(obufout); ofre -= len; @@ -1193,11 +1260,13 @@ default: break; } - if (toofew) + if (toofew) { + free(obuf); /* silence valgrind */ fatal("%s\n\t`%s'\n\t%*s%s", _("not enough arguments to satisfy format string"), fmt_string, (int) (s1 - fmt_string - 1), "", _("^ ran out for this one")); + } } if (do_lint) { if (need_format) @@ -1221,6 +1290,15 @@ args_size = save_args_size; } + { + size_t k; + size_t count = sizeof(cpbufs)/sizeof(cpbufs[0]); + for (k = 0; k < count; k++) { + if (cpbufs[k].buf != cpbufs[k].stackbuf) + free(cpbufs[k].buf); + } + } + return r; } @@ -1454,7 +1532,7 @@ NODE * do_strftime(NODE *tree) { - NODE *t1, *t2, *ret; + NODE *t1, *t2, *t3, *ret; struct tm *tm; time_t fclock; char *bufp; @@ -1464,13 +1542,15 @@ static const char def_format[] = "%a %b %d %H:%M:%S %Z %Y"; const char *format; int formatlen; + int do_gmt; /* set defaults first */ format = def_format; /* traditional date format */ formatlen = strlen(format); (void) time(&fclock); /* current time of day */ + do_gmt = FALSE; - t1 = t2 = NULL; + t1 = t2 = t3 = NULL; if (tree != NULL) { /* have args */ if (tree->lnode != NULL) { NODE *tmp = tree_eval(tree->lnode); @@ -1493,10 +1573,24 @@ lintwarn(_("strftime: received non-numeric second argument")); fclock = (time_t) force_number(t2); free_temp(t2); + + if (tree->rnode->rnode != NULL) { + tree = tree->rnode->rnode; + t3 = tree_eval(tree->lnode); + if ((t3->flags & (NUMCUR|NUMBER)) != 0) + do_gmt = (t3->numbr != 0); + else + do_gmt = (t3->stlen > 0); + + free_temp(t3); + } } } - tm = localtime(&fclock); + if (do_gmt) + tm = gmtime(&fclock); + else + tm = localtime(&fclock); bufp = buf; bufsize = sizeof(buf); @@ -1731,7 +1825,7 @@ } #ifdef MBS_SUPPORT -/* wide_tolower_toupper --- lower- or uppercase a multibute string */ +/* wide_tolower_toupper --- lower- or uppercase a multibyte string */ typedef int (*isw_func)(wint_t); typedef wint_t (*tow_func)(wint_t); @@ -1761,7 +1855,7 @@ */ osiz = t1->stlen + 2 + (gawk_mb_cur_max - 1); ofre = osiz - 2; - emalloc(obuf, char *, osiz, "wide_tolower_toupper"); + emalloc(obuf, unsigned char *, osiz, "wide_tolower_toupper"); memset(&mbs, 0, sizeof(mbstate_t)); cp = (unsigned char *)t1->stptr; @@ -1772,7 +1866,7 @@ size_t olen = cp2 - obuf; ofre += osiz; osiz *= 2; - erealloc(obuf, char *, osiz, "wide_tolower_toupper"); + erealloc(obuf, unsigned char *, osiz, "wide_tolower_toupper"); cp2 = obuf + olen; } prev_mbs = mbs; @@ -1809,7 +1903,7 @@ ofre--; } } - t2 = make_str_node(obuf, cp2 - obuf, ALREADY_MALLOCED); + t2 = make_str_node((char *) obuf, cp2 - obuf, ALREADY_MALLOCED); t2->flags |= TEMP; return t2; } @@ -2020,7 +2114,7 @@ rlength = REEND(rp, t1->stptr) - RESTART(rp, t1->stptr); /* byte length */ #ifdef MBS_SUPPORT - if (gawk_mb_cur_max > 1) { + if (rlength > 0 && gawk_mb_cur_max > 1) { t1 = str2wstr(t1, & wc_indices); rlength = wc_indices[rstart + rlength - 1] - wc_indices[rstart] + 1; rstart = wc_indices[rstart]; @@ -2046,7 +2140,7 @@ subpat_start = s; subpat_len = len = SUBPATEND(rp, t1->stptr, ii) - s; #ifdef MBS_SUPPORT - if (gawk_mb_cur_max > 1) { + if (len > 0 && gawk_mb_cur_max > 1) { subpat_start = wc_indices[s]; subpat_len = wc_indices[s + len - 1] - subpat_start + 1; } @@ -2089,9 +2183,9 @@ } free(buf); - if (wc_indices != NULL) - free(wc_indices); } + if (wc_indices != NULL) + free(wc_indices); } else { /* match failed */ rstart = 0; rlength = -1; @@ -2462,6 +2556,8 @@ free(t->stptr); t->stptr = buf; t->stlen = textlen; + free_wstr(t); + t->flags &= ~(NUMCUR|NUMBER); free_temp(s); if (matches > 0 && lhs) { @@ -2471,7 +2567,6 @@ } if (after_assign != NULL) (*after_assign)(); - t->flags &= ~(NUMCUR|NUMBER); } if (mb_indices != NULL) free(mb_indices); @@ -2645,56 +2740,12 @@ } #endif /* GFMT_WORKAROUND */ -/* - * The number of base-FLT_RADIX digits in an AWKNUM fraction, assuming - * that AWKNUM is not long double. - */ -#define AWKSMALL_MANT_DIG \ - (sizeof (AWKNUM) == sizeof (double) ? DBL_MANT_DIG : FLT_MANT_DIG) - -/* - * The number of base-FLT_DIGIT digits in an AWKNUM fraction, even if - * AWKNUM is long double. Don't mention 'long double' unless - * LDBL_MANT_DIG is defined, for the sake of ancient compilers that - * lack 'long double'. - */ -#ifdef LDBL_MANT_DIG -#define AWKNUM_MANT_DIG \ - (sizeof (AWKNUM) == sizeof (long double) ? LDBL_MANT_DIG : AWKSMALL_MANT_DIG) -#else -#define AWKNUM_MANT_DIG AWKSMALL_MANT_DIG -#endif - -/* - * The number of bits in an AWKNUM fraction, assuming FLT_RADIX is - * either 2 or 16. IEEE and VAX formats use radix 2, and IBM - * mainframe format uses radix 16; we know of no other radices in - * practical use. - */ -#if FLT_RADIX != 2 && FLT_RADIX != 16 -Please port the following code to your weird host; -#endif -#define AWKNUM_FRACTION_BITS (AWKNUM_MANT_DIG * (FLT_RADIX == 2 ? 1 : 4)) - /* tmp_integer - Convert an integer to a temporary number node. */ static NODE * tmp_integer(uintmax_t n) { -#ifdef HAVE_UINTMAX_T -/* #ifndef LDBL_MANT_DIG */ - /* - * If uintmax_t is so wide that AWKNUM cannot represent all its - * values, strip leading nonzero bits of integers that are so large - * that they cannot be represented exactly as AWKNUMs, so that their - * low order bits are represented exactly, without rounding errors. - * This is more desirable in practice, since it means the user sees - * integers that are the same width as the AWKNUM fractions. - */ - if (AWKNUM_FRACTION_BITS < CHAR_BIT * sizeof n) - n &= ((uintmax_t) 1 << AWKNUM_FRACTION_BITS) - 1; -/* #endif */ /* LDBL_MANT_DIG */ -#endif /* HAVE_UINTMAX_T */ + n = adjust_uint(n); return tmp_number((AWKNUM) n); } @@ -2922,7 +2973,7 @@ if ((tmp->flags & (NUMBER|NUMCUR)) != 0) d = (AWKNUM) force_number(tmp); - else if (isnondecimal(tmp->stptr, TRUE)) + else if (isnondecimal(tmp->stptr, use_lc_numeric)) d = nondec2awknum(tmp->stptr, tmp->stlen); else d = (AWKNUM) force_number(tmp); @@ -3013,7 +3064,7 @@ /* do_dcgettext, do_dcngettext --- handle i18n translations */ -#if ENABLE_NLS && HAVE_LC_MESSAGES && HAVE_DCGETTEXT +#if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT static int localecategory_from_argument(NODE *tree) @@ -3100,7 +3151,7 @@ NODE *tmp, *t1, *t2; char *string; char *the_result; -#if ENABLE_NLS && HAVE_LC_MESSAGES && HAVE_DCGETTEXT +#if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT int lc_cat; char *domain; #endif /* ENABLE_NLS */ @@ -3110,7 +3161,7 @@ string = t1->stptr; t2 = NULL; -#if ENABLE_NLS && HAVE_LC_MESSAGES && HAVE_DCGETTEXT +#if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT tree = tree->rnode; /* second argument */ if (tree != NULL) { tmp = tree->lnode; @@ -3142,7 +3193,7 @@ char *string1, *string2; unsigned long number; char *the_result; -#if ENABLE_NLS && HAVE_LC_MESSAGES && HAVE_DCGETTEXT +#if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT int lc_cat; char *domain; #endif /* ENABLE_NLS */ @@ -3159,7 +3210,7 @@ number = (unsigned long) double_to_int(force_number(tree_eval(tmp))); t3 = NULL; -#if ENABLE_NLS && HAVE_LC_MESSAGES && HAVE_DCGETTEXT +#if ENABLE_NLS && defined(LC_MESSAGES) && HAVE_DCGETTEXT tree = tree->rnode->rnode->rnode; /* fourth argument */ if (tree != NULL) { tmp = tree->lnode; diff -urN gawk-3.1.5/config.guess gawk-3.1.6/config.guess --- gawk-3.1.5/config.guess 2005-05-11 18:28:14.000000000 +0300 +++ gawk-3.1.6/config.guess 2007-08-11 22:39:49.000000000 +0300 @@ -1,13 +1,14 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. -timestamp='2005-02-10' +timestamp='2006-07-02' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -17,13 +18,15 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. + # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. @@ -66,11 +69,11 @@ while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -104,7 +107,7 @@ trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -123,7 +126,7 @@ ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ;' +esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) @@ -196,55 +199,23 @@ # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" - exit 0 ;; - amd64:OpenBSD:*:*) - echo x86_64-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - cats:OpenBSD:*:*) - echo arm-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - luna88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - macppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvmeppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mips64-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit 0 ;; + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; macppc:MirBSD:*:*) - echo powerppc-unknown-mirbsd${UNAME_RELEASE} - exit 0 ;; + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -297,40 +268,43 @@ # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; + exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix - exit 0 ;; + exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 - exit 0 ;; + exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 - exit 0;; + exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; + exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos - exit 0 ;; + exit ;; *:OS/390:*:*) echo i370-ibm-openedition - exit 0 ;; + exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe - exit 0 ;; + exit ;; *:OS400:*:*) echo powerpc-ibm-os400 - exit 0 ;; + exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp - exit 0;; + exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then @@ -338,32 +312,32 @@ else echo pyramid-pyramid-bsd fi - exit 0 ;; + exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 - exit 0 ;; + exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 - exit 0 ;; + exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7 && exit 0 ;; + sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) @@ -372,10 +346,10 @@ esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; + exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 @@ -387,10 +361,10 @@ echo sparc-sun-sunos${UNAME_RELEASE} ;; esac - exit 0 ;; + exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -401,40 +375,40 @@ # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} - exit 0 ;; + exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; + exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 - exit 0 ;; + exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; + exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -458,32 +432,33 @@ exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c \ - && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; + exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax - exit 0 ;; + exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix - exit 0 ;; + exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 - exit 0 ;; + exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 - exit 0 ;; + exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` @@ -499,29 +474,29 @@ else echo i586-dg-dgux${UNAME_RELEASE} fi - exit 0 ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 - exit 0 ;; + exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 - exit 0 ;; + exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd - exit 0 ;; + exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; + exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix - exit 0 ;; + exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` @@ -529,7 +504,7 @@ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build @@ -544,14 +519,18 @@ exit(0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo rs6000-ibm-aix3.2.5 + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi - exit 0 ;; + exit ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then @@ -565,28 +544,28 @@ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:*:*) echo rs6000-ibm-aix - exit 0 ;; + exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 - exit 0 ;; + exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 + exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx - exit 0 ;; + exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 - exit 0 ;; + exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd - exit 0 ;; + exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 - exit 0 ;; + exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in @@ -648,9 +627,19 @@ esac if [ ${HP_ARCH} = "hppa2.0w" ] then - # avoid double evaluation of $set_cc_for_build - test -n "$CC_FOR_BUILD" || eval $set_cc_for_build - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else @@ -658,11 +647,11 @@ fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -690,161 +679,179 @@ exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 - exit 0 ;; + exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd - exit 0 ;; + exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd - exit 0 ;; + exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix - exit 0 ;; + exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf - exit 0 ;; + exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf - exit 0 ;; + exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi - exit 0 ;; + exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites - exit 0 ;; + exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit 0 ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit 0 ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit 0 ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit 0 ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; + case ${UNAME_MACHINE} in + pc98) + echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; + exit ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; - x86:Interix*:[34]*) - echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' - exit 0 ;; + exit ;; + x86:Interix*:[3456]*) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + EM64T:Interix*:[3456]*) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks - exit 0 ;; + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix - exit 0 ;; + exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; - amd64:CYGWIN*:*:*) + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin - exit 0 ;; + exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin - exit 0 ;; + exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; + exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit 0 ;; + exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix - exit 0 ;; + exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu - exit 0 ;; + exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu - exit 0 ;; + exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu - exit 0 ;; + exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -861,8 +868,12 @@ #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build @@ -880,15 +891,22 @@ #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^CPU/{ + s: ::g + p + }'`" + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu - exit 0 ;; + exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu - exit 0 ;; + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -902,7 +920,7 @@ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit 0 ;; + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -910,25 +928,28 @@ PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac - exit 0 ;; + exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu - exit 0 ;; + exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux - exit 0 ;; + exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu - exit 0 ;; + exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent @@ -946,15 +967,15 @@ ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; + exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 ;; + exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit 0 ;; + exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build @@ -971,7 +992,7 @@ LIBC=gnulibc1 # endif #else - #ifdef __INTEL_COMPILER + #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout @@ -981,16 +1002,23 @@ LIBC=dietlibc #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' + /^LIBC/{ + s: ::g + p + }'`" + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 - exit 0 ;; + exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... @@ -998,27 +1026,27 @@ # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; + exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; + exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; - i*86:syllable:*:*) + exit ;; + i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable - exit 0 ;; + exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; + exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then @@ -1026,15 +1054,16 @@ else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi - exit 0 ;; - i*86:*:5:[78]*) + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi - exit 0 ;; + exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv - exit 0 ;; + exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv - exit 0 ;; + exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix - exit 0 ;; + exit ;; M68*:*:R3V[5678]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; + && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 - exit 0 ;; + exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; + exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` @@ -1126,69 +1155,72 @@ else echo ns32k-sni-sysv fi - exit 0 ;; + exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 - exit 0 ;; + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 - exit 0 ;; + exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 - exit 0 ;; + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos - exit 0 ;; + exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; + exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 - exit 0 ;; + exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi - exit 0 ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos - exit 0 ;; + exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos - exit 0 ;; + exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos - exit 0 ;; + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in - *86) UNAME_PROCESSOR=i686 ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit 0 ;; + exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then @@ -1196,25 +1228,25 @@ UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit 0 ;; + exit ;; *:QNX:*:4*) echo i386-pc-qnx - exit 0 ;; + exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} - exit 0 ;; + exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} - exit 0 ;; + exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux - exit 0 ;; + exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv - exit 0 ;; + exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 @@ -1225,41 +1257,47 @@ UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 - exit 0 ;; + exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 - exit 0 ;; + exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex - exit 0 ;; + exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 - exit 0 ;; + exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 - exit 0 ;; + exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 - exit 0 ;; + exit ;; *:ITS:*:*) echo pdp10-unknown-its - exit 0 ;; + exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} - exit 0 ;; + exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; + exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms && exit 0 ;; - I*) echo ia64-dec-vms && exit 0 ;; - V*) echo vax-dec-vms && exit 0 ;; + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix - exit 0 ;; + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1291,7 +1329,7 @@ #endif #if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); + printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) @@ -1380,11 +1418,12 @@ } EOF -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) @@ -1393,22 +1432,22 @@ case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd - exit 0 ;; + exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; c34*) echo c34-convex-bsd - exit 0 ;; + exit ;; c38*) echo c38-convex-bsd - exit 0 ;; + exit ;; c4*) echo c4-convex-bsd - exit 0 ;; + exit ;; esac fi @@ -1419,7 +1458,9 @@ the operating system you are using. It is advised that you download the most up to date version of the config scripts from - ftp://ftp.gnu.org/pub/gnu/config/ + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess +and + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub If the version you run ($0) is already up to date, please send the following data and any information you think might be diff -urN gawk-3.1.5/config.rpath gawk-3.1.6/config.rpath --- gawk-3.1.5/config.rpath 2005-05-11 18:28:14.000000000 +0300 +++ gawk-3.1.6/config.rpath 2007-01-12 12:20:46.000000000 +0200 @@ -2,7 +2,7 @@ # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # -# Copyright 1996-2005 Free Software Foundation, Inc. +# Copyright 1996-2006 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # @@ -25,7 +25,7 @@ # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. -# All known linkers require a `.a' archive for static linking (except M$VC, +# All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so @@ -35,7 +35,17 @@ host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -cc_basename=`echo "$CC" | sed -e 's%^.*/%%'` +# Code taken from libtool.m4's _LT_CC_BASENAME. + +for cc_temp in $CC""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. @@ -48,7 +58,7 @@ wl='-Wl,' ;; darwin*) - case "$cc_basename" in + case $cc_basename in xlc*) wl='-Wl,' ;; @@ -78,6 +88,13 @@ como) wl='-lopt=' ;; + *) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + wl='-Wl,' + ;; + esac + ;; esac ;; osf3* | osf4* | osf5*) @@ -120,6 +137,10 @@ with_gnu_ld=no fi ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; openbsd*) with_gnu_ld=no ;; @@ -127,6 +148,12 @@ ld_shlibs=yes if test "$with_gnu_ld" = yes; then + # Set some defaults for GNU ld with shared library support. These + # are reset later if shared libraries are not supported. Putting them + # here allows them to be overridden if necessary. + # Unlike libtool, we use -rpath here, not --rpath, since the documented + # option of GNU ld is called -rpath, not --rpath. + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken @@ -162,9 +189,20 @@ ld_shlibs=no fi ;; + interix3*) + hardcode_direct=no + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + linux*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; netbsd*) ;; - solaris* | sysv5*) + solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then @@ -173,16 +211,23 @@ ld_shlibs=no fi ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) + case `$LD -v 2>&1` in + *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) + ld_shlibs=no + ;; + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' + else + ld_shlibs=no + fi + ;; + esac + ;; sunos4*) hardcode_direct=yes ;; - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - : - else - ld_shlibs=no - fi - ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : @@ -191,10 +236,8 @@ fi ;; esac - if test "$ld_shlibs" = yes; then - # Unlike libtool, we use -rpath here, not --rpath, since the documented - # option of GNU ld is called -rpath, not --rpath. - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + if test "$ld_shlibs" = no; then + hardcode_libdir_flag_spec= fi else case "$host_os" in @@ -225,6 +268,7 @@ break fi done + ;; esac fi hardcode_direct=yes @@ -244,6 +288,7 @@ hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi + ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. @@ -291,7 +336,7 @@ if test "$GCC" = yes ; then : else - case "$cc_basename" in + case $cc_basename in xlc*) ;; *) @@ -326,24 +371,25 @@ # but as the default location of the library. hardcode_minus_L=yes ;; - hpux10* | hpux11*) + hpux10*) if test "$with_gnu_ld" = no; then - case "$host_cpu" in - hppa*64*) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=no - ;; - ia64*) - hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + fi + ;; + hpux11*) + if test "$with_gnu_ld" = no; then + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + case $host_cpu in + hppa*64*|ia64*) hardcode_direct=no - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes ;; *) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. @@ -397,8 +443,6 @@ fi hardcode_libdir_separator=: ;; - sco3.2v5*) - ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; @@ -427,14 +471,11 @@ ld_shlibs=yes fi ;; - sysv4.2uw2*) - hardcode_direct=yes - hardcode_minus_L=no - ;; - sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) ;; - sysv5*) - hardcode_libdir_flag_spec= + sysv5* | sco3.2v5* | sco5v6*) + hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' + hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' @@ -471,12 +512,12 @@ ;; kfreebsd*-gnu) ;; - freebsd*) + freebsd* | dragonfly*) ;; gnu*) ;; hpux9* | hpux10* | hpux11*) - case "$host_cpu" in + case $host_cpu in ia64*) shrext=.so ;; @@ -488,6 +529,8 @@ ;; esac ;; + interix3*) + ;; irix5* | irix6* | nonstopux*) case "$host_os" in irix5* | nonstopux*) @@ -523,16 +566,16 @@ ;; osf3* | osf4* | osf5*) ;; - sco3.2v5*) - ;; solaris*) ;; sunos4*) ;; - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + sysv4 | sysv4.3*) ;; sysv4*MP*) ;; + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) + ;; uts4*) ;; esac diff -urN gawk-3.1.5/config.sub gawk-3.1.6/config.sub --- gawk-3.1.5/config.sub 2005-05-11 18:28:14.000000000 +0300 +++ gawk-3.1.6/config.sub 2007-08-11 22:39:49.000000000 +0300 @@ -1,9 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, +# Inc. -timestamp='2005-02-10' +timestamp='2006-09-20' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -11,7 +12,7 @@ # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, @@ -21,14 +22,15 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. - +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. + # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # @@ -83,11 +85,11 @@ while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -99,7 +101,7 @@ *local*) # First pass through any local machine types. echo $1 - exit 0;; + exit ;; * ) break ;; @@ -118,8 +120,9 @@ # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ - kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -170,6 +173,10 @@ -hiux*) os=-hiuxwe2 ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -186,6 +193,10 @@ # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -230,14 +241,16 @@ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -246,6 +259,7 @@ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ @@ -254,20 +268,24 @@ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | mt \ | msp430 \ + | nios | nios2 \ | ns16k | ns32k \ - | openrisc | or32 \ + | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | score \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ - | strongarm \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ - | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; @@ -278,6 +296,9 @@ ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; + ms1) + basic_machine=mt-unknown + ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -297,8 +318,8 @@ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* \ - | bs2000-* \ + | avr-* | avr32-* \ + | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ @@ -308,7 +329,7 @@ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ - | m32r-* | m32rle-* \ + | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ @@ -319,6 +340,7 @@ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ @@ -327,23 +349,26 @@ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ + | mt-* \ | msp430-* \ + | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) @@ -683,6 +708,9 @@ basic_machine=i386-pc os=-msdos ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; mvs) basic_machine=i370-ibm os=-mvs @@ -758,9 +786,8 @@ basic_machine=hppa1.1-oki os=-proelf ;; - or32 | or32-*) + openrisc | openrisc-*) basic_machine=or32-unknown - os=-coff ;; os400) basic_machine=powerpc-ibm @@ -791,6 +818,12 @@ pc532 | pc532-*) basic_machine=ns32k-pc532 ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; @@ -847,6 +880,10 @@ basic_machine=i586-unknown os=-pw32 ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -873,6 +910,10 @@ sb1el) basic_machine=mipsisa64sb1el-unknown ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; sei) basic_machine=mips-sei os=-seiux @@ -1086,13 +1127,10 @@ we32k) basic_machine=we32k-att ;; - sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sh64) - basic_machine=sh64-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b) + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) @@ -1165,20 +1203,23 @@ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1196,7 +1237,7 @@ os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) @@ -1330,6 +1371,12 @@ # system, and we'll never get to this point. case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; *-acorn) os=-riscix1.2 ;; @@ -1339,9 +1386,9 @@ arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; + c4x-* | tic4x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 @@ -1385,6 +1432,9 @@ *-be) os=-beos ;; + *-haiku) + os=-haiku + ;; *-ibm) os=-aix ;; @@ -1556,7 +1606,7 @@ esac echo $basic_machine$os -exit 0 +exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff -urN gawk-3.1.5/configh.in gawk-3.1.6/configh.in --- gawk-3.1.5/configh.in 2005-07-26 21:44:16.000000000 +0300 +++ gawk-3.1.6/configh.in 2007-10-22 08:52:38.000000000 +0200 @@ -20,6 +20,12 @@ /* Define to 1 if you have the `alarm' function. */ #undef HAVE_ALARM +/* Define to 1 if you have the header file. */ +#undef HAVE_ARPA_INET_H + +/* Define to 1 if you have the `atexit' function. */ +#undef HAVE_ATEXIT + /* Define to 1 if you have the `btowc' function. */ #undef HAVE_BTOWC @@ -35,6 +41,10 @@ */ #undef HAVE_DCGETTEXT +/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't. + */ +#undef HAVE_DECL_TZNAME + /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT @@ -44,6 +54,9 @@ /* Define to 1 if you have the `fmod' function. */ #undef HAVE_FMOD +/* have getaddrinfo */ +#undef HAVE_GETADDRINFO + /* Define to 1 if you have the `getgrent' function. */ #undef HAVE_GETGRENT @@ -81,8 +94,11 @@ /* Define to 1 if you have the `iswupper' function. */ #undef HAVE_ISWUPPER -/* Define to 1 if you have the `dl' library (-ldl). */ -#undef HAVE_LIBDL +/* Define if you have and nl_langinfo(CODESET). */ +#undef HAVE_LANGINFO_CODESET + +/* Define if your file defines LC_MESSAGES. */ +#undef HAVE_LC_MESSAGES /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H @@ -99,6 +115,9 @@ /* Define if you have the 'long long' type. */ #undef HAVE_LONG_LONG +/* Define to 1 if the system has the type `long long int'. */ +#undef HAVE_LONG_LONG_INT + /* Define to 1 if you have the `mbrlen' function. */ #undef HAVE_MBRLEN @@ -114,6 +133,9 @@ /* Define to 1 if you have the `memcpy' function. */ #undef HAVE_MEMCPY +/* Define to 1 if you have the `memcpy_ulong' function. */ +#undef HAVE_MEMCPY_ULONG + /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE @@ -123,6 +145,12 @@ /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET +/* Define to 1 if you have the `memset_ulong' function. */ +#undef HAVE_MEMSET_ULONG + +/* Define to 1 if you have the `mkstemp' function. */ +#undef HAVE_MKSTEMP + /* we have the mktime function */ #undef HAVE_MKTIME @@ -144,12 +172,18 @@ /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF +/* newer systems define this type here */ +#undef HAVE_SOCKADDR_STORAGE + /* we have sockets on this system */ #undef HAVE_SOCKETS /* Define to 1 if you have the header file. */ #undef HAVE_STDARG_H +/* Define to 1 if you have the header file. */ +#undef HAVE_STDDEF_H + /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H @@ -224,6 +258,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_TERMIOS_H +/* Define to 1 if you have the `tmpfile' function. */ +#undef HAVE_TMPFILE + /* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use `HAVE_STRUCT_TM_TM_ZONE' instead. */ #undef HAVE_TM_ZONE @@ -250,6 +287,9 @@ /* Define if you have the 'unsigned long long' type. */ #undef HAVE_UNSIGNED_LONG_LONG +/* Define to 1 if the system has the type `unsigned long long int'. */ +#undef HAVE_UNSIGNED_LONG_LONG_INT + /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF @@ -274,6 +314,9 @@ /* systems should define this type here */ #undef HAVE_WINT_T +/* disable fatal errors on directories */ +#undef NO_DIRECTORY_FATAL + /* disable lint checks */ #undef NO_LINT @@ -304,10 +347,10 @@ /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE -/* The size of a `unsigned int', as computed by sizeof. */ +/* The size of `unsigned int', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_INT -/* The size of a `unsigned long', as computed by sizeof. */ +/* The size of `unsigned long', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_LONG /* return type of sprintf */ @@ -316,9 +359,6 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS -/* strtod doesn't have C89 semantics */ -#undef STRTOD_NOT_C89 - /* some systems define this type here */ #undef TIME_T_IN_SYS_TYPES_H @@ -344,6 +384,11 @@ /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif + /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES @@ -362,6 +407,17 @@ # undef __CHAR_UNSIGNED__ #endif +/* Enable extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif + /* Define like PROTOTYPES; this can be used by system headers. */ #undef __PROTOTYPES @@ -387,7 +443,7 @@ supported. Do not define if restrict is supported directly. */ #undef restrict -/* Define to `unsigned' if does not define. */ +/* Define to `unsigned int' if does not define. */ #undef size_t /* type to use in place of socklen_t if not defined */ diff -urN gawk-3.1.5/configure gawk-3.1.6/configure --- gawk-3.1.5/configure 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.6/configure 2007-10-22 08:52:03.000000000 +0200 @@ -0,0 +1,14257 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.61 for GNU Awk 3.1.6. +# +# Report bugs to . +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME='GNU Awk' +PACKAGE_TARNAME='gawk' +PACKAGE_VERSION='3.1.6' +PACKAGE_STRING='GNU Awk 3.1.6' +PACKAGE_BUGREPORT='bug-gawk@gnu.org' + +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +gt_needs= +ac_header_list= +ac_func_list= +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +am__isrc +CYGPATH_W +PACKAGE +VERSION +ACLOCAL +AUTOCONF +AUTOMAKE +AUTOHEADER +MAKEINFO +install_sh +STRIP +INSTALL_STRIP_PROGRAM +mkdir_p +AWK +SET_MAKE +am__leading_dot +AMTAR +am__tar +am__untar +GREP +EGREP +YACC +YFLAGS +LN_S +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +DEPDIR +am__include +am__quote +AMDEP_TRUE +AMDEP_FALSE +AMDEPBACKSLASH +CCDEPMODE +am__fastdepCC_TRUE +am__fastdepCC_FALSE +CPP +RANLIB +U +ANSI2KNR +USE_NLS +MSGFMT +GMSGFMT +MSGFMT_015 +GMSGFMT_015 +XGETTEXT +XGETTEXT_015 +MSGMERGE +build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +INTL_MACOSX_LIBS +LIBICONV +LTLIBICONV +INTLLIBS +LIBINTL +LTLIBINTL +POSUB +LIBOBJS +SOCKET_LIBS +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +YACC +YFLAGS +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures GNU Awk 3.1.6 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/gawk] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of GNU Awk 3.1.6:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-portals Enable /p as path prefix for portals + --disable-lint Disable gawk lint checking + --enable-switch Enable switch statements for awk programs + --disable-directories-fatal Disable fatal errors on directories + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --disable-largefile omit support for large files + --disable-nls do not use Native Language Support + --disable-rpath do not hardcode runtime library paths + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-whiny-user-strftime Force use of included version of strftime for deficient systems + --with-gnu-ld assume the C compiler uses GNU ld default=no + --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib + --without-libiconv-prefix don't search for libiconv in includedir and libdir + --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib + --without-libintl-prefix don't search for libintl in includedir and libdir + +Some influential environment variables: + YACC The `Yet Another C Compiler' implementation to use. Defaults to + the first program found out of: `bison -y', `byacc', `yacc'. + YFLAGS The list of arguments that will be passed by default to $YACC. + This script will default YFLAGS to the empty string to avoid a + default value of `-d' given by some make applications. + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +GNU Awk configure 3.1.6 +generated by GNU Autoconf 2.61 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by GNU Awk $as_me 3.1.6, which was +generated by GNU Autoconf 2.61. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" +fi +shift +for ac_site_file +do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +gt_needs="$gt_needs " +ac_header_list="$ac_header_list sys/time.h" +ac_header_list="$ac_header_list unistd.h" +ac_func_list="$ac_func_list alarm" +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +# This is a hack. Different versions of install on different systems +# are just too different. Chuck it and use install-sh. +# +# If the user supplies $INSTALL, figure they know what they're doing. +# +# With Autoconf 2.5x, this needs to come very early on, but *after* +# the INIT macro. Sigh. + +if test "x$INSTALL" = "x" +then + INSTALL="$srcdir/install-sh -c" + export INSTALL +fi + + +am__api_version='1.10' + +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm -f conftest.sed + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 +echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done +done +IFS=$as_save_IFS + +fi + + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi +fi +{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +echo "${ECHO_T}$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SET_MAKE= +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='gawk' + VERSION='3.1.6' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' + + + + + + + +# Check whether --enable-portals was given. +if test "${enable_portals+set}" = set; then + enableval=$enable_portals; if test "$enableval" = yes + then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PORTALS 1 +_ACEOF + + fi + +fi + + +# Check whether --with-whiny-user-strftime was given. +if test "${with_whiny_user_strftime+set}" = set; then + withval=$with_whiny_user_strftime; if test "$withval" = yes + then + +cat >>confdefs.h <<\_ACEOF +#define USE_INCLUDED_STRFTIME 1 +_ACEOF + + fi + +fi + +# Check whether --enable-lint was given. +if test "${enable_lint+set}" = set; then + enableval=$enable_lint; if test "$enableval" = no + then + +cat >>confdefs.h <<\_ACEOF +#define NO_LINT 1 +_ACEOF + + fi + +fi + +# Check whether --enable-switch was given. +if test "${enable_switch+set}" = set; then + enableval=$enable_switch; if test "$enableval" = yes + then + +cat >>confdefs.h <<\_ACEOF +#define ALLOW_SWITCH 1 +_ACEOF + + fi + +fi + +# Check whether --enable-directories-fatal was given. +if test "${enable_directories_fatal+set}" = set; then + enableval=$enable_directories_fatal; if test "$enableval" = no + then + +cat >>confdefs.h <<\_ACEOF +#define NO_DIRECTORY_FATAL 1 +_ACEOF + + fi + +fi + + +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +for ac_prog in 'bison -y' byacc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_YACC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_YACC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +YACC=$ac_cv_prog_YACC +if test -n "$YACC"; then + { echo "$as_me:$LINENO: result: $YACC" >&5 +echo "${ECHO_T}$YACC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" + +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO: checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext + +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } + +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +{ echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +depcc="$CC" am_compiler_list= + +{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_RANLIB" = x; then + RANLIB=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + RANLIB=$ac_ct_RANLIB + fi +else + RANLIB="$ac_cv_prog_RANLIB" +fi + + + + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SET_MAKE= +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + + +# This is mainly for my use during testing and development. +# Yes, it's a bit of a hack. +{ echo "$as_me:$LINENO: checking for special development options" >&5 +echo $ECHO_N "checking for special development options... $ECHO_C" >&6; } +if test -f $srcdir/.developing +then + # add other debug flags as appropriate, save GAWKDEBUG for emergencies + CFLAGS="$CFLAGS -DARRAYDEBUG -DYYDEBUG" + if grep dbug $srcdir/.developing + then + CFLAGS="$CFLAGS -DDBUG" + LIBS="$LIBS dbug/libdbug.a" + fi + # turn on compiler warnings if we're doing development + if test "$GCC" = yes + then + CFLAGS="$CFLAGS -Wall -fno-builtin" + fi + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + + +cat >>confdefs.h <<\_ACEOF +#define _GNU_SOURCE 1 +_ACEOF + + + + + +{ echo "$as_me:$LINENO: checking for AIX" >&5 +echo $ECHO_N "checking for AIX... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef _AIX + yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +cat >>confdefs.h <<\_ACEOF +#define _ALL_SOURCE 1 +_ACEOF + +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +rm -f conftest* + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +if test "${ac_cv_header_minix_config_h+set}" = set; then + { echo "$as_me:$LINENO: checking for minix/config.h" >&5 +echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; } +if test "${ac_cv_header_minix_config_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 +echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking minix/config.h usability" >&5 +echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking minix/config.h presence" >&5 +echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-gawk@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for minix/config.h" >&5 +echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; } +if test "${ac_cv_header_minix_config_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_minix_config_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 +echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; } + +fi +if test $ac_cv_header_minix_config_h = yes; then + MINIX=yes +else + MINIX= +fi + + +if test "$MINIX" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define _POSIX_SOURCE 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _POSIX_1_SOURCE 2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _MINIX 1 +_ACEOF + +fi + + + + + + + + + + + + { echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 +echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6; } +if test "${ac_cv_safe_to_define___extensions__+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +# define __EXTENSIONS__ 1 + $ac_includes_default +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_safe_to_define___extensions__=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_safe_to_define___extensions__=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 +echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6; } + test $ac_cv_safe_to_define___extensions__ = yes && + cat >>confdefs.h <<\_ACEOF +#define __EXTENSIONS__ 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _POSIX_PTHREAD_SEMANTICS 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _TANDEM_SOURCE 1 +_ACEOF + + + + { echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5 +echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6; } +if test "${ac_cv_lib_cposix_strerror+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcposix $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char strerror (); +int +main () +{ +return strerror (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_cposix_strerror=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_cposix_strerror=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5 +echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6; } +if test $ac_cv_lib_cposix_strerror = yes; then + LIBS="$LIBS -lcposix" +fi + + + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 +echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_largefile_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_largefile_CC=' -n32'; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 +echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_file_offset_bits+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_file_offset_bits=no; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_file_offset_bits=64; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 +echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -f conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 +echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; } +if test "${ac_cv_sys_large_files+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_large_files=no; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_sys_large_files=1; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 +echo "${ECHO_T}$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -f conftest* + fi +fi + + +{ echo "$as_me:$LINENO: checking for AIX compilation hacks" >&5 +echo $ECHO_N "checking for AIX compilation hacks... $ECHO_C" >&6; } +if test "${gawk_cv_aix_hack+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +if test -d /lpp +then + CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED=1 -DGAWK_AIX=1" + gawk_cv_aix_hack=yes +else + gawk_cv_aix_hack=no +fi + +fi +{ echo "$as_me:$LINENO: result: ${gawk_cv_aix_hack}" >&5 +echo "${ECHO_T}${gawk_cv_aix_hack}" >&6; } + + +{ echo "$as_me:$LINENO: checking for Linux/Alpha compilation hacks" >&5 +echo $ECHO_N "checking for Linux/Alpha compilation hacks... $ECHO_C" >&6; } +if test "${gawk_cv_linux_alpha_hack+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +if test "Linux" = "`uname`" && test "alpha" = "`uname -m`" +then + # this isn't necessarily always true, + # the vendor's compiler is also often found + if test "$GCC" = yes + then + CFLAGS="$CFLAGS -mieee" + gawk_cv_linux_alpha_hack=yes + else + gawk_cv_linux_alpha_hack=no + fi +else + gawk_cv_linux_alpha_hack=no +fi + +fi +{ echo "$as_me:$LINENO: result: ${gawk_cv_linux_alpha_hack}" >&5 +echo "${ECHO_T}${gawk_cv_linux_alpha_hack}" >&6; } + + +if test "$ISC" = 1 # will be set by test for ISC +then + CFLAGS="$CFLAGS -D_SYSV3" +fi + +{ echo "$as_me:$LINENO: checking for function prototypes" >&5 +echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; } +if test "$ac_cv_prog_cc_c89" != no; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define PROTOTYPES 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define __PROTOTYPES 1 +_ACEOF + +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +if test "$ac_cv_prog_cc_stdc" != no; then + U= ANSI2KNR= +else + U=_ ANSI2KNR=./ansi2knr +fi +# Ensure some checks needed by ansi2knr itself. + + +for ac_header in string.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-gawk@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +case `(uname) 2> /dev/null` in +*CYGWIN*) + with_libiconv_prefix=no + with_libintl_prefix=no + ;; +*) + ;; +esac + + + { echo "$as_me:$LINENO: checking whether NLS is requested" >&5 +echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6; } + # Check whether --enable-nls was given. +if test "${enable_nls+set}" = set; then + enableval=$enable_nls; USE_NLS=$enableval +else + USE_NLS=yes +fi + + { echo "$as_me:$LINENO: result: $USE_NLS" >&5 +echo "${ECHO_T}$USE_NLS" >&6; } + + + + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_MSGFMT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case "$MSGFMT" in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test "$MSGFMT" != ":"; then + { echo "$as_me:$LINENO: result: $MSGFMT" >&5 +echo "${ECHO_T}$MSGFMT" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_GMSGFMT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GMSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT=$ac_cv_path_GMSGFMT +if test -n "$GMSGFMT"; then + { echo "$as_me:$LINENO: result: $GMSGFMT" >&5 +echo "${ECHO_T}$GMSGFMT" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + + case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; + *) MSGFMT_015=$MSGFMT ;; + esac + + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; + *) GMSGFMT_015=$GMSGFMT ;; + esac + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_XGETTEXT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case "$XGETTEXT" in + [\\/]* | ?:[\\/]*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test "$XGETTEXT" != ":"; then + { echo "$as_me:$LINENO: result: $XGETTEXT" >&5 +echo "${ECHO_T}$XGETTEXT" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + rm -f messages.po + + case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; + *) XGETTEXT_015=$XGETTEXT ;; + esac + + + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Find out how to test for executable files. Don't use a zero-byte file, +# as systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + ac_executable_p="test -x" +else + ac_executable_p="test -f" +fi +rm -f conf$$.file + +# Extract the first word of "msgmerge", so it can be a program name with args. +set dummy msgmerge; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_MSGMERGE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case "$MSGMERGE" in + [\\/]* | ?:[\\/]*) + ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. + ;; + *) + ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$ac_save_IFS" + test -z "$ac_dir" && ac_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then + echo "$as_me: trying $ac_dir/$ac_word..." >&5 + if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then + ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" + break 2 + fi + fi + done + done + IFS="$ac_save_IFS" + test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" + ;; +esac +fi +MSGMERGE="$ac_cv_path_MSGMERGE" +if test "$MSGMERGE" != ":"; then + { echo "$as_me:$LINENO: result: $MSGMERGE" >&5 +echo "${ECHO_T}$MSGMERGE" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$localedir" || localedir='${datadir}/locale' + + + ac_config_commands="$ac_config_commands po-directories" + + + + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6; } +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6; } +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + +# Check whether --with-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +# Prepare PATH_SEPARATOR. +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + { echo "$as_me:$LINENO: checking for ld used by GCC" >&5 +echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; } + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + { echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } +else + { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } +fi +if test "${acl_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in + *GNU* | *'with BFD'*) + test "$with_gnu_ld" != no && break ;; + *) + test "$with_gnu_ld" != yes && break ;; + esac + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$acl_cv_path_LD" +if test -n "$LD"; then + { echo "$as_me:$LINENO: result: $LD" >&5 +echo "${ECHO_T}$LD" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } +if test "${acl_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$acl_cv_prog_gnu_ld + + + + + { echo "$as_me:$LINENO: checking for shared library run path origin" >&5 +echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6; } +if test "${acl_cv_rpath+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + +fi +{ echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 +echo "${ECHO_T}$acl_cv_rpath" >&6; } + wl="$acl_cv_wl" + libext="$acl_cv_libext" + shlibext="$acl_cv_shlibext" + hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + hardcode_direct="$acl_cv_hardcode_direct" + hardcode_minus_L="$acl_cv_hardcode_minus_L" + # Check whether --enable-rpath was given. +if test "${enable_rpath+set}" = set; then + enableval=$enable_rpath; : +else + enable_rpath=yes +fi + + + + acl_libdirstem=lib + searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib64 ) acl_libdirstem=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + fi + + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libiconv-prefix was given. +if test "${with_libiconv_prefix+set}" = set; then + withval=$with_libiconv_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi + +fi + + LIBICONV= + LTLIBICONV= + INCICONV= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='iconv ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + if test $use_additional = yes; then + if test -n "$shlibext" \ + && { test -f "$additional_libdir/lib$name.$shlibext" \ + || { test "$shlibext" = dll \ + && test -f "$additional_libdir/lib$name.dll.a"; }; }; then + found_dir="$additional_libdir" + if test -f "$additional_libdir/lib$name.$shlibext"; then + found_so="$additional_libdir/lib$name.$shlibext" + else + found_so="$additional_libdir/lib$name.dll.a" + fi + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + else + if test -f "$additional_libdir/lib$name.$libext"; then + found_dir="$additional_libdir" + found_a="$additional_libdir/lib$name.$libext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$shlibext" \ + && { test -f "$dir/lib$name.$shlibext" \ + || { test "$shlibext" = dll \ + && test -f "$dir/lib$name.dll.a"; }; }; then + found_dir="$dir" + if test -f "$dir/lib$name.$shlibext"; then + found_so="$dir/lib$name.$shlibext" + else + found_so="$dir/lib$name.dll.a" + fi + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + else + if test -f "$dir/lib$name.$libext"; then + found_dir="$dir" + found_a="$dir/lib$name.$libext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$hardcode_direct" = yes; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" + fi + if test "$hardcode_minus_L" != no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" + ;; + esac + done + fi + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" + done + fi + + + + + + + + + + + + + + + + + + + + + + + + + + { echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5 +echo $ECHO_N "checking for CFPreferencesCopyAppValue... $ECHO_C" >&6; } +if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +CFPreferencesCopyAppValue(NULL, NULL) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + gt_cv_func_CFPreferencesCopyAppValue=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gt_cv_func_CFPreferencesCopyAppValue=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 +echo "${ECHO_T}$gt_cv_func_CFPreferencesCopyAppValue" >&6; } + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CFPREFERENCESCOPYAPPVALUE 1 +_ACEOF + + fi + { echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5 +echo $ECHO_N "checking for CFLocaleCopyCurrent... $ECHO_C" >&6; } +if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +CFLocaleCopyCurrent(); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + gt_cv_func_CFLocaleCopyCurrent=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gt_cv_func_CFLocaleCopyCurrent=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" +fi +{ echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 +echo "${ECHO_T}$gt_cv_func_CFLocaleCopyCurrent" >&6; } + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CFLOCALECOPYCURRENT 1 +_ACEOF + + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + + + + + + + LIBINTL= + LTLIBINTL= + POSUB= + + case " $gt_needs " in + *" need-formatstring-macros "*) gt_api_version=3 ;; + *" need-ngettext "*) gt_api_version=2 ;; + *) gt_api_version=1 ;; + esac + gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" + gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" + + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + + + if test $gt_api_version -ge 3; then + gt_revision_test_code=' +#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +' + else + gt_revision_test_code= + fi + if test $gt_api_version -ge 2; then + gt_expression_test_code=' + * ngettext ("", "", 0)' + else + gt_expression_test_code= + fi + + { echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5 +echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6; } +if { as_var=$gt_func_gnugettext_libc; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings; +int +main () +{ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$gt_func_gnugettext_libc=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$gt_func_gnugettext_libc=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$gt_func_gnugettext_libc'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then + + + + + + am_save_CPPFLAGS="$CPPFLAGS" + + for element in $INCICONV; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + + { echo "$as_me:$LINENO: checking for iconv" >&5 +echo $ECHO_N "checking for iconv... $ECHO_C" >&6; } +if test "${am_cv_func_iconv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + am_cv_func_iconv=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + am_cv_lib_iconv=yes + am_cv_func_iconv=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" + fi + +fi +{ echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 +echo "${ECHO_T}$am_cv_func_iconv" >&6; } + if test "$am_cv_func_iconv" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ICONV 1 +_ACEOF + + fi + if test "$am_cv_lib_iconv" = yes; then + { echo "$as_me:$LINENO: checking how to link with libiconv" >&5 +echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: result: $LIBICONV" >&5 +echo "${ECHO_T}$LIBICONV" >&6; } + else + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libintl-prefix was given. +if test "${with_libintl_prefix+set}" = set; then + withval=$with_libintl_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/$acl_libdirstem" + fi + fi + +fi + + LIBINTL= + LTLIBINTL= + INCINTL= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='intl ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + if test $use_additional = yes; then + if test -n "$shlibext" \ + && { test -f "$additional_libdir/lib$name.$shlibext" \ + || { test "$shlibext" = dll \ + && test -f "$additional_libdir/lib$name.dll.a"; }; }; then + found_dir="$additional_libdir" + if test -f "$additional_libdir/lib$name.$shlibext"; then + found_so="$additional_libdir/lib$name.$shlibext" + else + found_so="$additional_libdir/lib$name.dll.a" + fi + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + else + if test -f "$additional_libdir/lib$name.$libext"; then + found_dir="$additional_libdir" + found_a="$additional_libdir/lib$name.$libext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$shlibext" \ + && { test -f "$dir/lib$name.$shlibext" \ + || { test "$shlibext" = dll \ + && test -f "$dir/lib$name.dll.a"; }; }; then + found_dir="$dir" + if test -f "$dir/lib$name.$shlibext"; then + found_so="$dir/lib$name.$shlibext" + else + found_so="$dir/lib$name.dll.a" + fi + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + else + if test -f "$dir/lib$name.$libext"; then + found_dir="$dir" + found_a="$dir/lib$name.$libext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$hardcode_direct" = yes; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" + fi + if test "$hardcode_minus_L" != no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" + ;; + esac + done + fi + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" + done + fi + + { echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5 +echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6; } +if { as_var=$gt_func_gnugettext_libintl; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +int +main () +{ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$gt_func_gnugettext_libintl=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$gt_func_gnugettext_libintl=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +$gt_revision_test_code +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (const char *); +int +main () +{ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=yes" + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS" +fi +ac_res=`eval echo '${'$gt_func_gnugettext_libintl'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + fi + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ + || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ + && test "$PACKAGE" != gettext-runtime \ + && test "$PACKAGE" != gettext-tools; }; then + gt_use_preinstalled_gnugettext=yes + else + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + + + if test -n "$INTL_MACOSX_LIBS"; then + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" + LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" + fi + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_NLS 1 +_ACEOF + + else + USE_NLS=no + fi + fi + + { echo "$as_me:$LINENO: checking whether to use NLS" >&5 +echo $ECHO_N "checking whether to use NLS... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: result: $USE_NLS" >&5 +echo "${ECHO_T}$USE_NLS" >&6; } + if test "$USE_NLS" = "yes"; then + { echo "$as_me:$LINENO: checking where the gettext function comes from" >&5 +echo $ECHO_N "checking where the gettext function comes from... $ECHO_C" >&6; } + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + gt_source="external libintl" + else + gt_source="libc" + fi + else + gt_source="included intl directory" + fi + { echo "$as_me:$LINENO: result: $gt_source" >&5 +echo "${ECHO_T}$gt_source" >&6; } + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then + { echo "$as_me:$LINENO: checking how to link with libintl" >&5 +echo $ECHO_N "checking how to link with libintl... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: result: $LIBINTL" >&5 +echo "${ECHO_T}$LIBINTL" >&6; } + + for element in $INCINTL; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + fi + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETTEXT 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DCGETTEXT 1 +_ACEOF + + fi + + POSUB=po + fi + + + + INTLLIBS="$LIBINTL" + + + + + + + + + { echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 +echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; } +if test "${am_cv_langinfo_codeset+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +char* cs = nl_langinfo(CODESET); return !cs; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + am_cv_langinfo_codeset=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + am_cv_langinfo_codeset=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 +echo "${ECHO_T}$am_cv_langinfo_codeset" >&6; } + if test $am_cv_langinfo_codeset = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LANGINFO_CODESET 1 +_ACEOF + + fi + + + { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 +echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; } +if test "${gt_cv_val_LC_MESSAGES+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +return LC_MESSAGES + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + gt_cv_val_LC_MESSAGES=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gt_cv_val_LC_MESSAGES=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $gt_cv_val_LC_MESSAGES" >&5 +echo "${ECHO_T}$gt_cv_val_LC_MESSAGES" >&6; } + if test $gt_cv_val_LC_MESSAGES = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LC_MESSAGES 1 +_ACEOF + + fi + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_stdc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; } +if test "${ac_cv_header_sys_wait_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#ifndef WEXITSTATUS +# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) +#endif +#ifndef WIFEXITED +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif + +int +main () +{ + int s; + wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_sys_wait_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_sys_wait_h=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +if test $ac_cv_header_sys_wait_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_WAIT_H 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } +if test "${ac_cv_header_time+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include + +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_time=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_time=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6; } +if test $ac_cv_header_time = yes; then + +cat >>confdefs.h <<\_ACEOF +#define TIME_WITH_SYS_TIME 1 +_ACEOF + +fi + + + + + + + + + + + + + + + + + + + + + +for ac_header in arpa/inet.h fcntl.h limits.h locale.h libintl.h mcheck.h \ + netdb.h netinet/in.h signum.h stdarg.h stddef.h string.h \ + sys/param.h sys/socket.h sys/time.h unistd.h \ + termios.h stropts.h wchar.h wctype.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-gawk@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +if test "$ac_cv_header_string_h" = yes +then + +for ac_header in memory.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-gawk@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +else + +for ac_header in strings.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-gawk@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +fi + +{ echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } +if test "${ac_cv_type_pid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef pid_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_pid_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_pid_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } +if test $ac_cv_type_pid_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } +if test "${ac_cv_type_signal+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +return *(signal (0, 0)) (0) == 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_signal=int +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_signal=void +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +echo "${ECHO_T}$ac_cv_type_signal" >&6; } + +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE $ac_cv_type_signal +_ACEOF + + +{ echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef size_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_size_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_size_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6; } +if test $ac_cv_type_size_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } +if test "${ac_cv_type_uid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1; then + ac_cv_type_uid_t=yes +else + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } +if test $ac_cv_type_uid_t = no; then + +cat >>confdefs.h <<\_ACEOF +#define uid_t int +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define gid_t int +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 +echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6; } +if test "${ac_cv_type_getgroups+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_type_getgroups=cross +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Thanks to Mike Rendell for this test. */ +$ac_includes_default +#define NGID 256 +#undef MAX +#define MAX(x, y) ((x) > (y) ? (x) : (y)) + +int +main () +{ + gid_t gidset[NGID]; + int i, n; + union { gid_t gval; long int lval; } val; + + val.lval = -1; + for (i = 0; i < NGID; i++) + gidset[i] = val.gval; + n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, + gidset); + /* Exit non-zero if getgroups seems to require an array of ints. This + happens when gid_t is short int but getgroups modifies an array + of ints. */ + return n > 0 && gidset[n] != val.gval; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_getgroups=gid_t +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_type_getgroups=int +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +if test $ac_cv_type_getgroups = cross; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then + ac_cv_type_getgroups=gid_t +else + ac_cv_type_getgroups=int +fi +rm -f conftest* + +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 +echo "${ECHO_T}$ac_cv_type_getgroups" >&6; } + +cat >>confdefs.h <<_ACEOF +#define GETGROUPS_T $ac_cv_type_getgroups +_ACEOF + + + + { echo "$as_me:$LINENO: checking for long long int" >&5 +echo $ECHO_N "checking for long long int... $ECHO_C" >&6; } +if test "${ac_cv_type_long_long_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +long long int ll = 9223372036854775807ll; + long long int nll = -9223372036854775807LL; + typedef int a[((-9223372036854775807LL < 0 + && 0 < 9223372036854775807ll) + ? 1 : -1)]; + int i = 63; +int +main () +{ +long long int llmax = 9223372036854775807ll; + return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) + | (llmax / ll) | (llmax % ll)); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_type_long_long_int=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_long_long_int=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5 +echo "${ECHO_T}$ac_cv_type_long_long_int" >&6; } + if test $ac_cv_type_long_long_int = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LONG_LONG_INT 1 +_ACEOF + + fi + + + + ac_cv_type_long_long=$ac_cv_type_long_long_int + if test $ac_cv_type_long_long = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LONG_LONG 1 +_ACEOF + + fi + + + { echo "$as_me:$LINENO: checking for unsigned long long int" >&5 +echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6; } +if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +unsigned long long int ull = 18446744073709551615ULL; + typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1 + ? 1 : -1)]; + int i = 63; +int +main () +{ +unsigned long long int ullmax = 18446744073709551615ull; + return (ull << 63 | ull >> 63 | ull << i | ull >> i + | ullmax / ull | ullmax % ull); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_type_unsigned_long_long_int=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_unsigned_long_long_int=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5 +echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6; } + if test $ac_cv_type_unsigned_long_long_int = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UNSIGNED_LONG_LONG_INT 1 +_ACEOF + + fi + + + + ac_cv_type_unsigned_long_long=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_unsigned_long_long = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UNSIGNED_LONG_LONG 1 +_ACEOF + + fi + + + { echo "$as_me:$LINENO: checking for inttypes.h" >&5 +echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6; } +if test "${gl_cv_header_inttypes_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +uintmax_t i = (uintmax_t) -1; return !i; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + gl_cv_header_inttypes_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_header_inttypes_h=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $gl_cv_header_inttypes_h" >&5 +echo "${ECHO_T}$gl_cv_header_inttypes_h" >&6; } + if test $gl_cv_header_inttypes_h = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_INTTYPES_H_WITH_UINTMAX 1 +_ACEOF + + fi + + + { echo "$as_me:$LINENO: checking for stdint.h" >&5 +echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6; } +if test "${gl_cv_header_stdint_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +uintmax_t i = (uintmax_t) -1; return !i; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + gl_cv_header_stdint_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + gl_cv_header_stdint_h=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $gl_cv_header_stdint_h" >&5 +echo "${ECHO_T}$gl_cv_header_stdint_h" >&6; } + if test $gl_cv_header_stdint_h = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STDINT_H_WITH_UINTMAX 1 +_ACEOF + + fi + + + + + if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then + + test $ac_cv_type_long_long = yes \ + && ac_type='long long' \ + || ac_type='long' + +cat >>confdefs.h <<_ACEOF +#define intmax_t $ac_type +_ACEOF + + else + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INTMAX_T 1 +_ACEOF + + fi + + + + + if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then + + test $ac_cv_type_unsigned_long_long = yes \ + && ac_type='unsigned long long' \ + || ac_type='unsigned long' + +cat >>confdefs.h <<_ACEOF +#define uintmax_t $ac_type +_ACEOF + + else + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UINTMAX_T 1 +_ACEOF + + fi + +{ echo "$as_me:$LINENO: checking for ssize_t" >&5 +echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; } +if test "${ac_cv_type_ssize_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef ssize_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_ssize_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_ssize_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 +echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; } +if test $ac_cv_type_ssize_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define ssize_t int +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for unsigned int" >&5 +echo $ECHO_N "checking for unsigned int... $ECHO_C" >&6; } +if test "${ac_cv_type_unsigned_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef unsigned int ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_unsigned_int=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_unsigned_int=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_int" >&5 +echo "${ECHO_T}$ac_cv_type_unsigned_int" >&6; } + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of unsigned int" >&5 +echo $ECHO_N "checking size of unsigned int... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_unsigned_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef unsigned int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef unsigned int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef unsigned int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef unsigned int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef unsigned int ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_unsigned_int=$ac_lo;; +'') if test "$ac_cv_type_unsigned_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned int) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (unsigned int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_unsigned_int=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef unsigned int ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_unsigned_int=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_unsigned_int" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned int) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (unsigned int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_unsigned_int=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_unsigned_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int +_ACEOF + + +{ echo "$as_me:$LINENO: checking for unsigned long" >&5 +echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6; } +if test "${ac_cv_type_unsigned_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef unsigned long ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_unsigned_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_unsigned_long=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5 +echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6; } + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ echo "$as_me:$LINENO: checking size of unsigned long" >&5 +echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6; } +if test "${ac_cv_sizeof_unsigned_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef unsigned long ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef unsigned long ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef unsigned long ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef unsigned long ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef unsigned long ac__type_sizeof_; +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_unsigned_long=$ac_lo;; +'') if test "$ac_cv_type_unsigned_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (unsigned long) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_unsigned_long=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + typedef unsigned long ac__type_sizeof_; +static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } +static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (ac__type_sizeof_))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%ld\n", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (ac__type_sizeof_)))) + return 1; + fprintf (f, "%lu\n", i); + } + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_unsigned_long=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_unsigned_long" = yes; then + { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long) +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (unsigned long) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } + else + ac_cv_sizeof_unsigned_long=0 + fi +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long +_ACEOF + + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "int.*sprintf" >/dev/null 2>&1; then + +cat >>confdefs.h <<\_ACEOF +#define SPRINTF_RET int +_ACEOF + +else + cat >>confdefs.h <<\_ACEOF +#define SPRINTF_RET char * +_ACEOF + +fi +rm -f conftest* + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ + + time_t foo; + foo = 0; + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + +cat >>confdefs.h <<\_ACEOF +#define TIME_T_IN_SYS_TYPES_H 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ + + wctype_t foo; + foo = 0; + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_WCTYPE_T 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ + + wint_t foo; + foo = 0; + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_WINT_T 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ + + struct sockaddr_storage foo; + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SOCKADDR_STORAGE 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + + + + + { echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; } +if test "${ac_cv_type_socklen_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +typedef socklen_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_socklen_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_socklen_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 +echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; } +if test $ac_cv_type_socklen_t = yes; then + : +else + + { echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5 +echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6; } + if test "${rsync_cv_socklen_t_equiv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + # Systems have either "struct sockaddr *" or + # "void *" as the second argument to getpeername + rsync_cv_socklen_t_equiv= + for arg2 in "struct sockaddr" void; do + for t in int size_t unsigned long "unsigned long"; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include + + int getpeername (int, $arg2 *, $t *); + +int +main () +{ + + $t len; + getpeername(0,0,&len); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + + rsync_cv_socklen_t_equiv="$t" + break + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + done + + if test "x$rsync_cv_socklen_t_equiv" = x; then + rsync_cv_socklen_t_equiv=int + fi + +fi + + { echo "$as_me:$LINENO: result: $rsync_cv_socklen_t_equiv" >&5 +echo "${ECHO_T}$rsync_cv_socklen_t_equiv" >&6; } + +cat >>confdefs.h <<_ACEOF +#define socklen_t $rsync_cv_socklen_t_equiv +_ACEOF + +fi + + + + +for ac_func in vprintf +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +{ echo "$as_me:$LINENO: checking for _doprnt" >&5 +echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6; } +if test "${ac_cv_func__doprnt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define _doprnt to an innocuous variant, in case declares _doprnt. + For example, HP-UX 11i declares gettimeofday. */ +#define _doprnt innocuous__doprnt + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char _doprnt (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef _doprnt + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char _doprnt (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub__doprnt || defined __stub____doprnt +choke me +#endif + +int +main () +{ +return _doprnt (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func__doprnt=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func__doprnt=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 +echo "${ECHO_T}$ac_cv_func__doprnt" >&6; } +if test $ac_cv_func__doprnt = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DOPRNT 1 +_ACEOF + +fi + +fi +done + + + + + + +for ac_header in $ac_header_list +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-gawk@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + + +for ac_func in $ac_func_list +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + + + + + + + + + + + + + +{ echo "$as_me:$LINENO: checking for working mktime" >&5 +echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; } +if test "${ac_cv_func_working_mktime+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_working_mktime=no +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Test program from Paul Eggert and Tony Leneis. */ +#ifdef TIME_WITH_SYS_TIME +# include +# include +#else +# ifdef HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif + +#include + +#ifdef HAVE_UNISTD_H +# include +#endif + +#ifndef HAVE_ALARM +# define alarm(X) /* empty */ +#endif + +/* Work around redefinition to rpl_putenv by other config tests. */ +#undef putenv + +static time_t time_t_max; +static time_t time_t_min; + +/* Values we'll use to set the TZ environment variable. */ +static char *tz_strings[] = { + (char *) 0, "TZ=GMT0", "TZ=JST-9", + "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" +}; +#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) + +/* Return 0 if mktime fails to convert a date in the spring-forward gap. + Based on a problem report from Andreas Jaeger. */ +static int +spring_forward_gap () +{ + /* glibc (up to about 1998-10-07) failed this test. */ + struct tm tm; + + /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" + instead of "TZ=America/Vancouver" in order to detect the bug even + on systems that don't support the Olson extension, or don't have the + full zoneinfo tables installed. */ + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + + tm.tm_year = 98; + tm.tm_mon = 3; + tm.tm_mday = 5; + tm.tm_hour = 2; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; + return mktime (&tm) != (time_t) -1; +} + +static int +mktime_test1 (now) + time_t now; +{ + struct tm *lt; + return ! (lt = localtime (&now)) || mktime (lt) == now; +} + +static int +mktime_test (now) + time_t now; +{ + return (mktime_test1 (now) + && mktime_test1 ((time_t) (time_t_max - now)) + && mktime_test1 ((time_t) (time_t_min + now))); +} + +static int +irix_6_4_bug () +{ + /* Based on code from Ariel Faigon. */ + struct tm tm; + tm.tm_year = 96; + tm.tm_mon = 3; + tm.tm_mday = 0; + tm.tm_hour = 0; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; + mktime (&tm); + return tm.tm_mon == 2 && tm.tm_mday == 31; +} + +static int +bigtime_test (j) + int j; +{ + struct tm tm; + time_t now; + tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; + now = mktime (&tm); + if (now != (time_t) -1) + { + struct tm *lt = localtime (&now); + if (! (lt + && lt->tm_year == tm.tm_year + && lt->tm_mon == tm.tm_mon + && lt->tm_mday == tm.tm_mday + && lt->tm_hour == tm.tm_hour + && lt->tm_min == tm.tm_min + && lt->tm_sec == tm.tm_sec + && lt->tm_yday == tm.tm_yday + && lt->tm_wday == tm.tm_wday + && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) + == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) + return 0; + } + return 1; +} + +static int +year_2050_test () +{ + /* The correct answer for 2050-02-01 00:00:00 in Pacific time, + ignoring leap seconds. */ + unsigned long int answer = 2527315200UL; + + struct tm tm; + time_t t; + tm.tm_year = 2050 - 1900; + tm.tm_mon = 2 - 1; + tm.tm_mday = 1; + tm.tm_hour = tm.tm_min = tm.tm_sec = 0; + tm.tm_isdst = -1; + + /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" + instead of "TZ=America/Vancouver" in order to detect the bug even + on systems that don't support the Olson extension, or don't have the + full zoneinfo tables installed. */ + putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + + t = mktime (&tm); + + /* Check that the result is either a failure, or close enough + to the correct answer that we can assume the discrepancy is + due to leap seconds. */ + return (t == (time_t) -1 + || (0 < t && answer - 120 <= t && t <= answer + 120)); +} + +int +main () +{ + time_t t, delta; + int i, j; + + /* This test makes some buggy mktime implementations loop. + Give up after 60 seconds; a mktime slower than that + isn't worth using anyway. */ + alarm (60); + + for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2) + continue; + time_t_max--; + if ((time_t) -1 < 0) + for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2) + continue; + delta = time_t_max / 997; /* a suitable prime number */ + for (i = 0; i < N_STRINGS; i++) + { + if (tz_strings[i]) + putenv (tz_strings[i]); + + for (t = 0; t <= time_t_max - delta; t += delta) + if (! mktime_test (t)) + return 1; + if (! (mktime_test ((time_t) 1) + && mktime_test ((time_t) (60 * 60)) + && mktime_test ((time_t) (60 * 60 * 24)))) + return 1; + + for (j = 1; 0 < j; j *= 2) + if (! bigtime_test (j)) + return 1; + if (! bigtime_test (j - 1)) + return 1; + } + return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_working_mktime=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_working_mktime=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5 +echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; } +if test $ac_cv_func_working_mktime = no; then + case " $LIBOBJS " in + *" mktime.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS mktime.$ac_objext" + ;; +esac + +fi + +case "$ac_cv_func_working_mktime" in +yes) +cat >>confdefs.h <<\_ACEOF +#define HAVE_MKTIME 1 +_ACEOF + + ;; +esac + +{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; } +if test "${ac_cv_func_getaddrinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define getaddrinfo to an innocuous variant, in case declares getaddrinfo. + For example, HP-UX 11i declares gettimeofday. */ +#define getaddrinfo innocuous_getaddrinfo + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char getaddrinfo (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef getaddrinfo + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getaddrinfo (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_getaddrinfo || defined __stub___getaddrinfo +choke me +#endif + +int +main () +{ +return getaddrinfo (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_getaddrinfo=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_getaddrinfo=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6; } +if test $ac_cv_func_getaddrinfo = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETADDRINFO 1 +_ACEOF + +else + { echo "$as_me:$LINENO: checking for getaddrinfo in -lsocket" >&5 +echo $ECHO_N "checking for getaddrinfo in -lsocket... $ECHO_C" >&6; } +if test "${ac_cv_lib_socket_getaddrinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char getaddrinfo (); +int +main () +{ +return getaddrinfo (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_socket_getaddrinfo=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_socket_getaddrinfo=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_getaddrinfo" >&6; } +if test $ac_cv_lib_socket_getaddrinfo = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETADDRINFO 1 +_ACEOF + +fi + +fi + + + +{ echo "$as_me:$LINENO: checking for fmod in -lm" >&5 +echo $ECHO_N "checking for fmod in -lm... $ECHO_C" >&6; } +if test "${ac_cv_lib_m_fmod+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char fmod (); +int +main () +{ +return fmod (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_m_fmod=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_m_fmod=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_fmod" >&5 +echo "${ECHO_T}$ac_cv_lib_m_fmod" >&6; } +if test $ac_cv_lib_m_fmod = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" + +fi + + +# Need the check for mkstemp and tmpfile for missing_d/snprintf.c. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +for ac_func in atexit btowc fmod getgrent getgroups grantpt \ + isascii iswctype iswlower iswupper mbrlen \ + memcmp memcpy memcpy_ulong memmove memset \ + memset_ulong mkstemp setlocale snprintf strchr \ + strerror strftime strncasecmp strtod strtoul \ + system tmpfile towlower towupper tzset wcrtomb \ + wcscoll wcscoll wctype +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + { echo "$as_me:$LINENO: checking whether mbrtowc and mbstate_t are properly declared" >&5 +echo $ECHO_N "checking whether mbrtowc and mbstate_t are properly declared... $ECHO_C" >&6; } +if test "${ac_cv_func_mbrtowc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +wchar_t wc; + char const s[] = ""; + size_t n = 1; + mbstate_t state; + return ! (sizeof state && (mbrtowc) (&wc, s, n, &state)); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_mbrtowc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_mbrtowc=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_mbrtowc" >&5 +echo "${ECHO_T}$ac_cv_func_mbrtowc" >&6; } + if test $ac_cv_func_mbrtowc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MBRTOWC 1 +_ACEOF + + fi + + +if test "${ac_cv_header_dlfcn_h+set}" = set; then + { echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } +if test "${ac_cv_header_dlfcn_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 +echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 +echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: dlfcn.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: dlfcn.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------- ## +## Report this to bug-gawk@gnu.org ## +## ------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; } +if test "${ac_cv_header_dlfcn_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_dlfcn_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; } + +fi +if test $ac_cv_header_dlfcn_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define DYNAMIC 1 +_ACEOF + + if test "$GCC" = yes + then + # Add others here as appropriate, + # one day use GNU libtool. + if uname | $EGREP -i 'linux|freebsd|cygwin' > /dev/null + then + LDFLAGS="$LDFLAGS -export-dynamic" + fi + fi + + # Check this separately. Some systems have dlopen + # in libc. Notably freebsd and cygwin. + # HP-NSK has it in zrldsrl + { echo "$as_me:$LINENO: checking for library containing dlopen" >&5 +echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6; } +if test "${ac_cv_search_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_func_search_save_LIBS=$LIBS +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dl zrldsrl; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_search_dlopen=$ac_res +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_dlopen+set}" = set; then + break +fi +done +if test "${ac_cv_search_dlopen+set}" = set; then + : +else + ac_cv_search_dlopen=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5 +echo "${ECHO_T}$ac_cv_search_dlopen" >&6; } +ac_res=$ac_cv_search_dlopen +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + +fi + + + +case `(uname) 2> /dev/null` in +*VMS*|*BeOS*|*OS/2*|*MS-DOS*) + +cat >>confdefs.h <<\_ACEOF +#define GETPGRP_VOID 1 +_ACEOF + + ;; +*) { echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5 +echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; } +if test "${ac_cv_func_getpgrp_void+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Use it with a single arg. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +getpgrp (0); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_func_getpgrp_void=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_getpgrp_void=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5 +echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; } +if test $ac_cv_func_getpgrp_void = yes; then + +cat >>confdefs.h <<\_ACEOF +#define GETPGRP_VOID 1 +_ACEOF + +fi + + ;; +esac + +{ echo "$as_me:$LINENO: checking for printf %F format" >&5 +echo $ECHO_N "checking for printf %F format... $ECHO_C" >&6; } +if test "$cross_compiling" = yes; then + has_f_format=no +else + cat >conftest.$ac_ext <<_ACEOF + +#include + +int main() +{ + char buf[100]; + + sprintf(buf, "%F", 123.45); + + if (strcmp(buf, "123.450000") == 0) + return 0; + else + return 1; +} + +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + has_f_format=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +has_f_format=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + +if test "$has_f_format" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define PRINTF_HAS_F_FORMAT 1 +_ACEOF + +fi +{ echo "$as_me:$LINENO: result: $has_f_format" >&5 +echo "${ECHO_T}$has_f_format" >&6; } + + +gawk_have_sockets=no +# Check for system-dependent location of socket libraries + +SOCKET_LIBS= +if test "$ISC" = yes; then + SOCKET_LIBS="-lnsl_s -linet" +else + # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X + # libraries were built with DECnet support. And karl@cs.umb.edu says + # the Alpha needs dnet_stub (dnet does not exist). + # + # ADR: Is this needed just for sockets??? +# AC_CHECK_LIB(dnet, dnet_ntoa, [SOCKET_LIBS="$SOCKET_LIBS -ldnet"]) +# if test $ac_cv_lib_dnet_ntoa = no; then +# AC_CHECK_LIB(dnet_stub, dnet_ntoa, +# [SOCKET_LIBS="$SOCKET_LIBS -ldnet_stub"]) +# fi + + # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, + # to get the SysV transport functions. + # chad@anasazi.com says the Pyramid MIS-ES running DC/OSx (SVR4) + # needs -lnsl. + # The nsl library prevents programs from opening the X display + # on Irix 5.2, according to dickey@clark.net. + { echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; } +if test "${ac_cv_func_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define gethostbyname to an innocuous variant, in case declares gethostbyname. + For example, HP-UX 11i declares gettimeofday. */ +#define gethostbyname innocuous_gethostbyname + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char gethostbyname (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef gethostbyname + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_gethostbyname || defined __stub___gethostbyname +choke me +#endif + +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_gethostbyname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; } + + if test $ac_cv_func_gethostbyname = no; then + { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; } +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_nsl_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_nsl_gethostbyname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; } +if test $ac_cv_lib_nsl_gethostbyname = yes; then + SOCKET_LIBS="$SOCKET_LIBS -lnsl" +fi + + fi + + # lieder@skyler.mavd.honeywell.com says without -lsocket, + # socket/setsockopt and other routines are undefined under SCO ODT + # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary + # on later versions), says simon@lia.di.epfl.ch: it contains + # gethostby* variants that don't use the nameserver (or something). + # -lsocket must be given before -lnsl if both are needed. + # We assume that if connect needs -lnsl, so does gethostbyname. + { echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6; } +if test "${ac_cv_func_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define connect to an innocuous variant, in case declares connect. + For example, HP-UX 11i declares gettimeofday. */ +#define connect innocuous_connect + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char connect (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef connect + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char connect (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_connect || defined __stub___connect +choke me +#endif + +int +main () +{ +return connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_func_connect=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_func_connect=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6; } + + if test $ac_cv_func_connect = no; then + { echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 +echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6; } +if test "${ac_cv_lib_socket_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $SOCKET_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char connect (); +int +main () +{ +return connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_socket_connect=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_socket_connect=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6; } +if test $ac_cv_lib_socket_connect = yes; then + SOCKET_LIBS="-lsocket $SOCKET_LIBS" + gawk_have_sockets=yes +fi + + else + gawk_have_sockets=yes + fi +fi + +if test "${gawk_have_sockets}" = "yes" +then + { echo "$as_me:$LINENO: checking where to find the socket library calls" >&5 +echo $ECHO_N "checking where to find the socket library calls... $ECHO_C" >&6; } + case "${SOCKET_LIBS}" in + ?*) gawk_lib_loc="${SOCKET_LIBS}" ;; + *) gawk_lib_loc="the standard library" ;; + esac + { echo "$as_me:$LINENO: result: ${gawk_lib_loc}" >&5 +echo "${ECHO_T}${gawk_lib_loc}" >&6; } + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SOCKETS 1 +_ACEOF + +fi + + +{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } +if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (ac_aggr.st_blksize) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_blksize=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static struct stat ac_aggr; +if (sizeof ac_aggr.st_blksize) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_stat_st_blksize=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_stat_st_blksize=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } +if test $ac_cv_member_struct_stat_st_blksize = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ST_BLKSIZE 1 +_ACEOF + +fi + + +{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } +if test "${ac_cv_header_time+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include + +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_time=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_time=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6; } +if test $ac_cv_header_time = yes; then + +cat >>confdefs.h <<\_ACEOF +#define TIME_WITH_SYS_TIME 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } +if test "${ac_cv_struct_tm+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +struct tm tm; + int *p = &tm.tm_sec; + return !p; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_struct_tm=time.h +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_struct_tm=sys/time.h +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6; } +if test $ac_cv_struct_tm = sys/time.h; then + +cat >>confdefs.h <<\_ACEOF +#define TM_IN_SYS_TIME 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; } +if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include <$ac_cv_struct_tm> + + +int +main () +{ +static struct tm ac_aggr; +if (ac_aggr.tm_zone) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_tm_tm_zone=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include <$ac_cv_struct_tm> + + +int +main () +{ +static struct tm ac_aggr; +if (sizeof ac_aggr.tm_zone) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_member_struct_tm_tm_zone=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_tm_tm_zone=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; } +if test $ac_cv_member_struct_tm_tm_zone = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_TM_TM_ZONE 1 +_ACEOF + + +fi + +if test "$ac_cv_member_struct_tm_tm_zone" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TM_ZONE 1 +_ACEOF + +else + { echo "$as_me:$LINENO: checking whether tzname is declared" >&5 +echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; } +if test "${ac_cv_have_decl_tzname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef tzname + (void) tzname; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl_tzname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl_tzname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5 +echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; } +if test $ac_cv_have_decl_tzname = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME 0 +_ACEOF + + +fi + + + { echo "$as_me:$LINENO: checking for tzname" >&5 +echo $ECHO_N "checking for tzname... $ECHO_C" >&6; } +if test "${ac_cv_var_tzname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if !HAVE_DECL_TZNAME +extern char *tzname[]; +#endif + +int +main () +{ +return tzname[0][0]; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_var_tzname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_var_tzname=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +echo "${ECHO_T}$ac_cv_var_tzname" >&6; } + if test $ac_cv_var_tzname = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TZNAME 1 +_ACEOF + + fi +fi + + + +{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5 +echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; } +if test "${ac_cv_c_char_unsigned+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((char) -1) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_char_unsigned=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_char_unsigned=yes +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 +echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; } +if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then + cat >>confdefs.h <<\_ACEOF +#define __CHAR_UNSIGNED__ 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset cs; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *pcpcc; + char **ppc; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + pcpcc = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++pcpcc; + ppc = (char**) pcpcc; + pcpcc = (char const *const *) ppc; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + if (s) return 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + if (!foo) return 0; + } + return !cs[0] && !zero.x; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_const=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_const=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6; } +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5 +echo $ECHO_N "checking for C/C++ restrict keyword... $ECHO_C" >&6; } +if test "${ac_cv_c_restrict+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_restrict=no + # Try the official restrict keyword, then gcc's __restrict, and + # the less common variants. + for ac_kw in restrict __restrict __restrict__ _Restrict; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +typedef int * int_ptr; + int foo (int_ptr $ac_kw ip) { + return ip[0]; + } +int +main () +{ +int s[1]; + int * $ac_kw t = s; + t[0] = 0; + return foo(t) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_restrict=$ac_kw +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_restrict" != no && break + done + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5 +echo "${ECHO_T}$ac_cv_c_restrict" >&6; } + case $ac_cv_c_restrict in + restrict) ;; + no) +cat >>confdefs.h <<\_ACEOF +#define restrict +_ACEOF + ;; + *) cat >>confdefs.h <<_ACEOF +#define restrict $ac_cv_c_restrict +_ACEOF + ;; + esac + +{ echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6; } +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_inline=$ac_kw +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6; } + + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + +{ echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5 +echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6; } +if test "${ac_cv_c_stringize+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define x(y) #y + +char *s = x(teststring); +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "#teststring" >/dev/null 2>&1; then + ac_cv_c_stringize=no +else + ac_cv_c_stringize=yes +fi +rm -f conftest* + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5 +echo "${ECHO_T}$ac_cv_c_stringize" >&6; } +if test $ac_cv_c_stringize = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STRINGIZE 1 +_ACEOF + +fi + + +ac_config_headers="$ac_config_headers config.h:configh.in" + + + + +ac_config_files="$ac_config_files Makefile awklib/Makefile doc/Makefile po/Makefile.in test/Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by GNU Awk $as_me 3.1.6, which was +generated by GNU Autoconf 2.61. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +GNU Awk config.status 3.1.6 +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2006 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" +# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it + # from automake < 1.5. + eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:configh.in" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "awklib/Makefile") CONFIG_FILES="$CONFIG_FILES awklib/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; + "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; + + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# +# Set up the sed scripts for CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +am__isrc!$am__isrc$ac_delim +CYGPATH_W!$CYGPATH_W$ac_delim +PACKAGE!$PACKAGE$ac_delim +VERSION!$VERSION$ac_delim +ACLOCAL!$ACLOCAL$ac_delim +AUTOCONF!$AUTOCONF$ac_delim +AUTOMAKE!$AUTOMAKE$ac_delim +AUTOHEADER!$AUTOHEADER$ac_delim +MAKEINFO!$MAKEINFO$ac_delim +install_sh!$install_sh$ac_delim +STRIP!$STRIP$ac_delim +INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim +mkdir_p!$mkdir_p$ac_delim +AWK!$AWK$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +am__leading_dot!$am__leading_dot$ac_delim +AMTAR!$AMTAR$ac_delim +am__tar!$am__tar$ac_delim +am__untar!$am__untar$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +YACC!$YACC$ac_delim +YFLAGS!$YFLAGS$ac_delim +LN_S!$LN_S$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +DEPDIR!$DEPDIR$ac_delim +am__include!$am__include$ac_delim +am__quote!$am__quote$ac_delim +AMDEP_TRUE!$AMDEP_TRUE$ac_delim +AMDEP_FALSE!$AMDEP_FALSE$ac_delim +AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim +CCDEPMODE!$CCDEPMODE$ac_delim +am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim +am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim +CPP!$CPP$ac_delim +RANLIB!$RANLIB$ac_delim +U!$U$ac_delim +ANSI2KNR!$ANSI2KNR$ac_delim +USE_NLS!$USE_NLS$ac_delim +MSGFMT!$MSGFMT$ac_delim +GMSGFMT!$GMSGFMT$ac_delim +MSGFMT_015!$MSGFMT_015$ac_delim +GMSGFMT_015!$GMSGFMT_015$ac_delim +XGETTEXT!$XGETTEXT$ac_delim +XGETTEXT_015!$XGETTEXT_015$ac_delim +MSGMERGE!$MSGMERGE$ac_delim +build!$build$ac_delim +build_cpu!$build_cpu$ac_delim +build_vendor!$build_vendor$ac_delim +build_os!$build_os$ac_delim +host!$host$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +CEOF$ac_eof +_ACEOF + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +host_cpu!$host_cpu$ac_delim +host_vendor!$host_vendor$ac_delim +host_os!$host_os$ac_delim +INTL_MACOSX_LIBS!$INTL_MACOSX_LIBS$ac_delim +LIBICONV!$LIBICONV$ac_delim +LTLIBICONV!$LTLIBICONV$ac_delim +INTLLIBS!$INTLLIBS$ac_delim +LIBINTL!$LIBINTL$ac_delim +LTLIBINTL!$LTLIBINTL$ac_delim +POSUB!$POSUB$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +SOCKET_LIBS!$SOCKET_LIBS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 13; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; + :H) + # + # CONFIG_HEADER + # +_ACEOF + +# Transform confdefs.h into a sed script `conftest.defines', that +# substitutes the proper values into config.h.in to produce config.h. +rm -f conftest.defines conftest.tail +# First, append a space to every undef/define line, to ease matching. +echo 's/$/ /' >conftest.defines +# Then, protect against being on the right side of a sed subst, or in +# an unquoted here document, in config.status. If some macros were +# called several times there might be several #defines for the same +# symbol, which is useless. But do not sort them, since the last +# AC_DEFINE must be honored. +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where +# NAME is the cpp macro being defined, VALUE is the value it is being given. +# PARAMS is the parameter list in the macro definition--in most cases, it's +# just an empty string. +ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' +ac_dB='\\)[ (].*,\\1define\\2' +ac_dC=' ' +ac_dD=' ,' + +uniq confdefs.h | + sed -n ' + t rset + :rset + s/^[ ]*#[ ]*define[ ][ ]*// + t ok + d + :ok + s/[\\&,]/\\&/g + s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p + s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p + ' >>conftest.defines + +# Remove the space that was appended to ease matching. +# Then replace #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +# (The regexp can be short, since the line contains either #define or #undef.) +echo 's/ $// +s,^[ #]*u.*,/* & */,' >>conftest.defines + +# Break up conftest.defines: +ac_max_sed_lines=50 + +# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" +# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" +# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" +# et cetera. +ac_in='$ac_file_inputs' +ac_out='"$tmp/out1"' +ac_nxt='"$tmp/out2"' + +while : +do + # Write a here document: + cat >>$CONFIG_STATUS <<_ACEOF + # First, check the format of the line: + cat >"\$tmp/defines.sed" <<\\CEOF +/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def +/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def +b +:def +_ACEOF + sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS + ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in + sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail + grep . conftest.tail >/dev/null || break + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines conftest.tail + +echo "ac_result=$ac_in" >>$CONFIG_STATUS +cat >>$CONFIG_STATUS <<\_ACEOF + if test x"$ac_file" != x-; then + echo "/* $configure_input */" >"$tmp/config.h" + cat "$ac_result" >>"$tmp/config.h" + if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f $ac_file + mv "$tmp/config.h" $ac_file + fi + else + echo "/* $configure_input */" + cat "$ac_result" + fi + rm -f "$tmp/out12" +# Compute $ac_file's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $ac_file | $ac_file:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || +$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X$ac_file : 'X\(//\)[^/]' \| \ + X$ac_file : 'X\(//\)$' \| \ + X$ac_file : 'X\(/\)' \| . 2>/dev/null || +echo X$ac_file | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + "po-directories":C) + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + # Treat a directory as a PO directory if and only if it has a + # POTFILES.in file. This allows packages to have multiple PO + # directories under different names or in different locations. + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + POMAKEFILEDEPS="POTFILES.in" + # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$OBSOLETE_ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assigment from automake < 1.5. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" + else + # The set of available languages was given in configure.in. + # Hide the ALL_LINGUAS assigment from automake < 1.5. + eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + fi + # Compute POFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) + # Compute UPDATEPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) + # Compute DUMMYPOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) + # Compute GMOFILES + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + UPDATEPOFILES= + DUMMYPOFILES= + GMOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done ;; + + esac +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + diff -urN gawk-3.1.5/configure.ac gawk-3.1.6/configure.ac --- gawk-3.1.5/configure.ac 2005-07-26 21:43:51.000000000 +0300 +++ gawk-3.1.6/configure.ac 2007-10-22 08:51:06.000000000 +0200 @@ -1,14 +1,14 @@ dnl dnl configure.ac --- autoconf input file for gawk dnl -dnl Copyright (C) 1995-2005 the Free Software Foundation, Inc. +dnl Copyright (C) 1995-2007 the Free Software Foundation, Inc. dnl dnl This file is part of GAWK, the GNU implementation of the dnl AWK Programming Language. dnl dnl GAWK is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2 of the License, or +dnl the Free Software Foundation; either version 3 of the License, or dnl (at your option) any later version. dnl dnl GAWK is distributed in the hope that it will be useful, @@ -23,7 +23,7 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([GNU Awk], 3.1.5, bug-gawk@gnu.org, gawk) +AC_INIT([GNU Awk], 3.1.6, bug-gawk@gnu.org, gawk) # This is a hack. Different versions of install on different systems # are just too different. Chuck it and use install-sh. @@ -39,8 +39,9 @@ export INSTALL fi -AC_PREREQ(2.59) -AM_INIT_AUTOMAKE +AC_PREREQ(2.61) +AM_INIT_AUTOMAKE([1.10]) + dnl Additional argument stuff AC_ARG_ENABLE(portals, [ --enable-portals Enable /p as path prefix for portals], @@ -68,6 +69,12 @@ AC_DEFINE(ALLOW_SWITCH, 1, [switch statements are enabled in awk programs]) fi ) +AC_ARG_ENABLE([directories-fatal], [ --disable-directories-fatal Disable fatal errors on directories], + if test "$enableval" = no + then + AC_DEFINE(NO_DIRECTORY_FATAL, 1, [disable fatal errors on directories]) + fi +) dnl checks for programs AC_PROG_EGREP @@ -90,7 +97,7 @@ if test -f $srcdir/.developing then # add other debug flags as appropriate, save GAWKDEBUG for emergencies - CFLAGS="$CFLAGS -DARRAYDEBUG" + CFLAGS="$CFLAGS -DARRAYDEBUG -DYYDEBUG" if grep dbug $srcdir/.developing then CFLAGS="$CFLAGS -DDBUG" @@ -99,7 +106,7 @@ # turn on compiler warnings if we're doing development if test "$GCC" = yes then - CFLAGS="$CFLAGS -Wall" + CFLAGS="$CFLAGS -Wall -fno-builtin" fi AC_MSG_RESULT([yes]) else @@ -109,9 +116,8 @@ AC_SUBST(CFLAGS) dnl checks for systems -AC_AIX +AC_USE_SYSTEM_EXTENSIONS AC_ISC_POSIX -AC_MINIX AC_SYS_LARGEFILE GAWK_AC_AIX_TWEAK GAWK_AC_LINUX_ALPHA @@ -122,8 +128,7 @@ CFLAGS="$CFLAGS -D_SYSV3" fi -dnl check for C compiler for automake -AM_PROG_CC_STDC +dnl check for C compiler for automake. Needed for dfa.h. AM_C_PROTOTYPES dnl Cygwin doesn't like to get libs with full paths @@ -139,14 +144,16 @@ dnl initialize GNU gettext AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION([0.14.4]) +AM_GNU_GETTEXT_VERSION([0.16.1]) +AM_LANGINFO_CODESET +gt_LC_MESSAGES dnl checks for header files AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_HEADER_TIME -AC_CHECK_HEADERS(fcntl.h limits.h locale.h libintl.h mcheck.h \ - netdb.h netinet/in.h signum.h stdarg.h string.h \ +AC_CHECK_HEADERS(arpa/inet.h fcntl.h limits.h locale.h libintl.h mcheck.h \ + netdb.h netinet/in.h signum.h stdarg.h stddef.h string.h \ sys/param.h sys/socket.h sys/time.h unistd.h \ termios.h stropts.h wchar.h wctype.h) @@ -191,6 +198,12 @@ foo = 0; ], AC_DEFINE(HAVE_WINT_T, 1, [systems should define this type here])) +dnl check for sockaddr_storage +AC_TRY_COMPILE([#include +#include ],[ + struct sockaddr_storage foo; +], + AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [newer systems define this type here])) dnl Borrwed from rsync, thanks to to Jim Meyering. @@ -244,20 +257,27 @@ dnl checks for functions AC_FUNC_VPRINTF -GAWK_AC_FUNC_STRTOD_C89 AC_FUNC_MKTIME case "$ac_cv_func_working_mktime" in yes) AC_DEFINE(HAVE_MKTIME, 1, [we have the mktime function]) ;; esac +AC_CHECK_FUNC(getaddrinfo, [AC_DEFINE(HAVE_GETADDRINFO, 1, [have getaddrinfo])], + [AC_CHECK_LIB(socket, getaddrinfo, + [AC_DEFINE(HAVE_GETADDRINFO, 1, + [have getaddrinfo])])]) + AC_CHECK_LIB(m, fmod) -AC_CHECK_FUNCS(fmod getgrent getgroups grantpt iswctype mbrlen \ - memcmp memcpy memmove memset setlocale snprintf strchr \ - strerror strftime strncasecmp strtod strtoul system tzset \ - isascii btowc \ - iswlower iswupper towlower towupper \ - wcrtomb wcscoll wcscoll wctype) + +# Need the check for mkstemp and tmpfile for missing_d/snprintf.c. +AC_CHECK_FUNCS(atexit btowc fmod getgrent getgroups grantpt \ + isascii iswctype iswlower iswupper mbrlen \ + memcmp memcpy memcpy_ulong memmove memset \ + memset_ulong mkstemp setlocale snprintf strchr \ + strerror strftime strncasecmp strtod strtoul \ + system tmpfile towlower towupper tzset wcrtomb \ + wcscoll wcscoll wctype) dnl this check is for both mbrtowc and the mbstate_t type, which is good AC_FUNC_MBRTOWC @@ -277,7 +297,8 @@ # Check this separately. Some systems have dlopen # in libc. Notably freebsd and cygwin. - AC_CHECK_LIB(dl, dlopen) + # HP-NSK has it in zrldsrl + AC_SEARCH_LIBS(dlopen, dl zrldsrl) ]) dnl check for how to use getpgrp @@ -341,30 +362,5 @@ awklib/Makefile doc/Makefile po/Makefile.in - test/Makefile - [version.c:version.in]) - -dnl This is a significant and rather ugly hack. We want to keep -dnl version.c from being removed upon `make distclean'. -dnl We put the `$$' on the front for old systems with 14-char filenames. - -dnl At this point, `configure' has finished creating `config.status' which -dnl actually does all the checking and configuring. `config.status' is run -dnl by the AC_OUTPUT macro below. This step comes in between the two: it -dnl adds code to `config.status'. Doing it there ensures that this step -dnl happens *every* time `config.status' is run, such as when `make' decides -dnl to update something. Fun, fun, fun. - -dnl Be careful of multiple levels of shell quoting! - -dnl The trailing newline in the sed command is needed for Mac OS X. Sigh. - -AC_CONFIG_COMMANDS_POST([sed '$i\ - echo $as_me: fixing Makefile to keep version.c\ - sed "/CONFIG_CLEAN_FILES/s/version.c//" < Makefile > $$.Makefile\ - mv $$.Makefile Makefile - ' < $CONFIG_STATUS > $$.gawk-hack - mv $$.gawk-hack $CONFIG_STATUS]) - - + test/Makefile) AC_OUTPUT diff -urN gawk-3.1.5/custom.h gawk-3.1.6/custom.h --- gawk-3.1.5/custom.h 2005-05-11 18:28:14.000000000 +0300 +++ gawk-3.1.6/custom.h 2007-08-11 22:39:49.000000000 +0300 @@ -18,7 +18,7 @@ * * GAWK is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * GAWK is distributed in the hope that it will be useful, diff -urN gawk-3.1.5/depcomp gawk-3.1.6/depcomp --- gawk-3.1.5/depcomp 2005-05-11 18:28:14.000000000 +0300 +++ gawk-3.1.6/depcomp 2007-01-12 12:20:47.000000000 +0200 @@ -1,9 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2005-02-09.22 +scriptversion=2006-10-15.18 -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software +# Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -91,7 +92,20 @@ ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. - "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" stat=$? if test $stat -eq 0; then : else @@ -276,6 +290,46 @@ rm -f "$tmpdepfile" ;; +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add `dependent.h:' lines. + sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. @@ -288,13 +342,13 @@ if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a - # static library. This mecanism is used in libtool 1.4 series to + # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in in $dir.libs/$base.o.d and + # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is @@ -467,7 +521,8 @@ done "$@" -E | - sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" diff -urN gawk-3.1.5/dfa.c gawk-3.1.6/dfa.c --- gawk-3.1.5/dfa.c 2005-07-26 21:07:43.000000000 +0300 +++ gawk-3.1.6/dfa.c 2007-09-03 06:30:12.000000000 +0300 @@ -1,9 +1,10 @@ /* dfa.c - deterministic extended regexp routines for GNU - Copyright 1988, 1998, 2000, 2002, 2004, 2005 Free Software Foundation, Inc. + Copyright 1988, 1998, 2000, 2002, 2004, 2005, 2007 + Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) + the Free Software Foundation; either version 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -13,7 +14,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ + Foundation, Inc., + 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA */ /* Written June, 1988 by Mike Haertel Modified July, 1988 by Arthur David Olson to assist BMG speedups */ @@ -624,7 +626,7 @@ work_mbc->coll_elems[work_mbc->ncoll_elems++] = elem; } } - wc = wc1 = WEOF; + wc1 = wc = WEOF; } else /* We treat '[' as a normal character here. */ @@ -982,6 +984,9 @@ if (c != '}') dfaerror(_("malformed repeat count")); laststart = 0; +#ifdef GAWK + dfa->broken = (minrep == maxrep && minrep == 0); +#endif return lasttok = REPMN; case '|': @@ -1373,7 +1378,14 @@ int i; for (i = 0; i < ntokens; ++i) - addtok(dfa->tokens[tindex + i]); + { + addtok(dfa->tokens[tindex + i]); +#ifdef MBS_SUPPORT + /* Update index into multibyte csets. */ + if (MB_CUR_MAX > 1 && dfa->tokens[tindex + i] == MBCSET) + dfa->multibyte_prop[dfa->tindex - 1] = dfa->multibyte_prop[tindex + i]; +#endif + } } static void @@ -1602,8 +1614,8 @@ d->states[i].constraint = 0; d->states[i].first_end = 0; #ifdef MBS_SUPPORT - if (MB_CUR_MAX > 1) - d->states[i].mbps.nelem = 0; + d->states[i].mbps.nelem = 0; + d->states[i].mbps.elems = NULL; #endif for (j = 0; j < s->nelem; ++j) if (d->tokens[s->elems[j].index] < 0) @@ -2890,7 +2902,8 @@ { remain_bytes = mbrtowc(inputwcs + i, begin + i, end - begin - i + 1, &mbs); - if (remain_bytes <= 1) + if (remain_bytes < 1 + || (remain_bytes == 1 && inputwcs[i] == (wchar_t)begin[i])) { remain_bytes = 0; inputwcs[i] = (wchar_t)begin[i]; @@ -2978,12 +2991,12 @@ unsigned char const *nextp; nextp = p; s = transit_state(d, s, &nextp); - p = (unsigned char *)nextp; + p = (unsigned char *)nextp; /* Trans table might be updated. */ trans = d->trans; - } - else + } + else #endif /* MBS_SUPPORT */ s = d->fails[s][*p++]; continue; @@ -3054,13 +3067,16 @@ d->fails = 0; d->newlines = 0; d->success = 0; +#ifdef GAWK + d->broken = 0; +#endif } /* Parse and analyze a single string of the given length. */ void dfacomp (char const *s, size_t len, struct dfa *d, int searchflag) { - if (case_fold) /* dummy folding in service of dfamust() */ + if (case_fold && len) /* dummy folding in service of dfamust() */ { char *lcopy; int i; @@ -3136,8 +3152,13 @@ } #endif /* MBS_SUPPORT */ - for (i = 0; i < d->sindex; ++i) + for (i = 0; i < d->sindex; ++i) { free((ptr_t) d->states[i].elems.elems); +#ifdef MBS_SUPPORT + if (d->states[i].mbps.nelem > 0) + free((ptr_t) d->states[i].mbps.elems); +#endif /* MBS_SUPPORT */ + } free((ptr_t) d->states); for (i = 0; i < d->tindex; ++i) if (d->follows[i].elems) diff -urN gawk-3.1.5/dfa.h gawk-3.1.6/dfa.h --- gawk-3.1.5/dfa.h 2005-05-11 18:28:14.000000000 +0300 +++ gawk-3.1.6/dfa.h 2007-09-03 06:30:12.000000000 +0300 @@ -3,7 +3,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) + the Free Software Foundation; either version 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -13,7 +13,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ + Foundation, Inc., + 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA */ /* Written June, 1988 by Mike Haertel */ @@ -373,6 +374,10 @@ struct dfamust *musts; /* List of strings, at least one of which is known to appear in any r.e. matching the dfa. */ +#ifdef GAWK + int broken; /* True if using a feature where there + are bugs and gawk should use regex. */ +#endif }; /* Some macros for user access to dfa internals. */ diff -urN gawk-3.1.5/doc/ChangeLog gawk-3.1.6/doc/ChangeLog --- gawk-3.1.5/doc/ChangeLog 2005-07-26 21:46:43.000000000 +0300 +++ gawk-3.1.6/doc/ChangeLog 2007-10-22 08:49:49.000000000 +0200 @@ -1,3 +1,148 @@ +Mon Oct 22 08:49:05 2007 Arnold D. Robbins + + * Release 3.1.6: Release tar file made. + +Fri Oct 19 04:13:33 2007 Arnold D. Robbins + + * gawk.1: Add length(array) to list of extensions at end. + Revise date. + +Thu Oct 18 08:40:59 2007 Arnold D. Robbins + + * texinfo.tex: Updated to version from Texinfo 4.11. + +Sun Oct 14 20:37:59 2007 Arnold D. Robbins + + * awkcard.in: Fix version numbers and copyright info, minor + cleanups to format nicely. + +Sun Sep 30 22:30:05 2007 Arnold D. Robbins + + * gawk.texi (Conversion): Add table describing locale decimal + point versus period. + +Sat Sep 8 23:53:46 2007 Arnold D. Robbins + + * gawk.texi: A number of minor fixes based on suggestions + from Jack Kelley . + +Sat Aug 11 22:46:14 2007 Arnold D. Robbins + + * gawk.texi (Copying): Move to GPL 3. + +Wed May 30 17:11:19 2007 Arnold D. Robbins + + * Makefile.am (CLEANFILES): Added, so that even "make distclean" + will do the right thing. + (clean): Removed, let automake to do it. + +Tue May 29 22:49:16 2007 Arnold D. Robbins + + * gawk.texi: Document --use-lc-numeric. Document that some + VMS systems come with an old version of gawk. + +Mon May 28 08:21:51 2007 Arnold D. Robbins + + * gawk.1, awkcard.in: Document --use-lc-numeric. + +Tue May 15 13:27:38 2007 Arnold D. Robbins + + * gawk.texi, gawk.1: Documented --disable-directories-fatal + configure option. + +Wed May 9 21:50:44 2007 Arnold D. Robbins + + * gawk.1: Reviewed and updated, minor typos fixed. + * awkcard.in: Added mention of %F. + +Wed May 2 19:55:02 2007 Arnold D. Robbins + + * gawk.texi: Cleaned up discussion of string concatenation + where needed, including a note about the mixed treatment + of `"echo " "date" | getline'. Sigh. + +Sun Apr 29 13:33:27 2007 Arnold D. Robbins + + * gawk.texi (Time Functions): Update description of strftime + for third utc-flag argument. Other minor fixes. + * gawk.1, awkcard.in: Same. + +Tue Apr 3 22:47:40 2007 Arnold D. Robbins + + * gawk.texi (New Ports): Update list of files for all of + regex that should not be messed with lightly. + +Wed Mar 21 09:02:53 2007 Arnold D. Robbins + + * gawk.texi: Removed last vestiges of arnold@gnu.org + email address. + +Wed Mar 7 13:06:31 2007 Arnold D. Robbins + + * gawk.texi (Getopt Function): Add a note that user level + code must clear out ARGV from 1 to Optind. + Thanks to Matthew.Hall1@VerizonWireless.com, from mail + dated Tue, 02 Aug 2005 09:04:37 -0700. + +Wed Mar 7 08:48:02 2007 Arnold D. Robbins + + * gawk.texi: Fix my personal email address. Sheesh. + Thanks again to Sahak Petrosyan . + +Tue Mar 6 09:13:38 2007 Arnold D. Robbins + + * gawk.texi: Fix link to online version of the manual. + Thanks to Sahak Petrosyan . + +Wed Feb 14 19:40:33 2007 Arnold D. Robbins + + * gawk.texi: Add discussion of magic values for Inf, NaN, + and hexadecimal floating point in appendix on numbers. + Other minor updates for date, trademarks, etc. + +Sun Jan 21 12:59:33 2007 "Ennio-(Sr)" + + * gawk.1: Add note that locale settings can influence the + choice of decimal point character. + +Sat Jan 13 22:43:39 2007 Ralf Wildenhues + + * gawk.texi: Fix some typos. + * gawkinet.texi: Likewise. + +Sat Jan 13 21:25:28 2007 Ralf Wildenhues + + * awkcard.in: next is POSIX. + * gawk.texi: V7/SVR3.1: Mention assignable `$0', `var in index' + as expression. Specify `FS' limitation. + +Fri Jan 12 12:28:51 2007 Arnold D. Robbins + + * texinfo.tex: Updated upon move to current autotools. + +Thu Jan 4 19:56:45 2007 Arnold D. Robbins + + * gawk.1: Applied patch from Eric Raymond to stop his stupid + automated email kvetching about the wonders of docbook. + +2006-07-29 Paul Eggert + + * gawk.texi: Document that `$$0++--' isn't valid even though it + is unambiguous according to the Awk grammar. This is in response + to Open Group XCU ERN 86 + . + +Fri Oct 21 12:50:19 2005 Arnold D. Robbins + + Better support for PDF, thanks to Marty Leisner + for the prodding. + + * Makefile.am: Add lflashlight.pdf, rflashlight.pdf, statist.pdf + to EXTRADIST and add gawk.pdf and gawkinet.pdf to list of files + to remove for `clean'. + * lflashlight.pdf, rflashlight.pdf, statist.pdf: New files, created + with `epstopdf foo.eps > foo.pdf'. + Tue Jul 26 21:46:16 2005 Arnold D. Robbins * Release 3.1.5: Release tar file made. @@ -331,7 +476,7 @@ install it directly. Wed Jun 30 16:14:36 1999 Arnold D. Robbins - + * Release 3.0.4: Release tar file made. This time for sure. Wed Oct 7 21:59:33 1998 Arnold D. Robbins diff -urN gawk-3.1.5/doc/Makefile.am gawk-3.1.6/doc/Makefile.am --- gawk-3.1.5/doc/Makefile.am 2005-07-26 21:20:13.000000000 +0300 +++ gawk-3.1.6/doc/Makefile.am 2007-08-11 22:39:49.000000000 +0300 @@ -1,14 +1,15 @@ # # doc/Makefile.am --- automake input file for gawk # -# Copyright (C) 2000, 2001, 2002, 2004, 2005 the Free Software Foundation, Inc. +# Copyright (C) 2000, 2001, 2002, 2004, 2005, 2007 +# the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. # # GAWK is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # GAWK is distributed in the hope that it will be useful, @@ -31,7 +32,11 @@ awkcard.in awkforai.txt texinfo.tex cardfonts \ macros colors no.colors $(man_MANS) \ lflashlight.eps rflashlight.eps \ - statist.jpg statist.eps + lflashlight.pdf rflashlight.pdf \ + statist.jpg statist.eps statist.pdf + +# Get rid of generated files when cleaning +CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf MAKEINFO = @MAKEINFO@ --no-split --force @@ -90,6 +95,3 @@ awkcard.nc: $(CARDFILES) $(TROFF) $(CARDSRC_N) | $(SEDME) | cat $(srcdir)/setter.outline - > awkcard.ps && touch awkcard.nc - -clean: - rm -f *.ps *~ awkcard.nc awkcard.tr *.html diff -urN gawk-3.1.5/doc/Makefile.in gawk-3.1.6/doc/Makefile.in --- gawk-3.1.5/doc/Makefile.in 2005-07-26 21:44:02.000000000 +0300 +++ gawk-3.1.6/doc/Makefile.in 2007-10-22 08:52:01.000000000 +0200 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.5 from Makefile.am. +# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,14 +17,15 @@ # # doc/Makefile.am --- automake input file for gawk # -# Copyright (C) 2000, 2001, 2002, 2004, 2005 the Free Software Foundation, Inc. +# Copyright (C) 2000, 2001, 2002, 2004, 2005, 2007 +# the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. # # GAWK is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # GAWK is distributed in the hope that it will be useful, @@ -36,15 +37,11 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -63,13 +60,14 @@ texinfo.tex ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ - $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ - $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes_h.m4 \ - $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ - $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/socket.m4 \ - $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/strtod.m4 \ + $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intmax_t.m4 \ + $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/isc-posix.m4 \ + $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \ $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -92,13 +90,17 @@ AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) DVIPS = dvips am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -118,6 +120,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -134,8 +139,9 @@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ --no-split --force -MKINSTALLDIRS = @MKINSTALLDIRS@ +MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ @@ -155,12 +161,14 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ YACC = @YACC@ +YFLAGS = @YFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -172,36 +180,51 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ info_TEXINFOS = gawk.texi gawkinet.texi man_MANS = gawk.1 igawk.1 EXTRA_DIST = ChangeLog README.card ad.block setter.outline \ awkcard.in awkforai.txt texinfo.tex cardfonts \ macros colors no.colors $(man_MANS) \ lflashlight.eps rflashlight.eps \ - statist.jpg statist.eps + lflashlight.pdf rflashlight.pdf \ + statist.jpg statist.eps statist.pdf + +# Get rid of generated files when cleaning +CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf TROFF = groff -t -Tps -U SEDME = sed -e "s/^level0 restore/level0 restore flashme 100 72 moveto (Copyright `date '+%m-%d-%y %T'`, FSF, Inc. (all)) show/" \ -e "s/^\/level0 save def/\/level0 save def 30 -48 translate/" @@ -262,9 +285,11 @@ restore=: && backupdir="$(am__leading_dot)am$$$$" && \ am__cwd=`pwd` && cd $(srcdir) && \ rm -rf $$backupdir && mkdir $$backupdir && \ - for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ - if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ - done; \ + if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ + for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ + if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ + done; \ + else :; fi && \ cd "$$am__cwd"; \ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $@ $<; \ @@ -310,11 +335,29 @@ gawkinet.pdf: gawkinet.texi gawkinet.html: gawkinet.texi .dvi.ps: + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(DVIPS) -o $@ $< +uninstall-dvi-am: + @$(NORMAL_UNINSTALL) + @list='$(DVIS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ + rm -f "$(DESTDIR)$(dvidir)/$$f"; \ + done + +uninstall-html-am: + @$(NORMAL_UNINSTALL) + @list='$(HTMLS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ + rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ + done + uninstall-info-am: @$(PRE_UNINSTALL) - @if (install-info --version && \ + @if test -d '$(DESTDIR)$(infodir)' && \ + (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ @@ -328,12 +371,28 @@ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ - (if cd "$(DESTDIR)$(infodir)"; then \ + (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ else :; fi); \ done +uninstall-pdf-am: + @$(NORMAL_UNINSTALL) + @list='$(PDFS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ + done + +uninstall-ps-am: + @$(NORMAL_UNINSTALL) + @list='$(PSS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ + rm -f "$(DESTDIR)$(psdir)/$$f"; \ + done + dist-info: $(INFO_DEPS) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; \ @@ -342,10 +401,13 @@ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ - for file in $$d/$$base*; do \ - relfile=`expr "$$file" : "$$d/\(.*\)"`; \ - test -f $(distdir)/$$relfile || \ - cp -p $$file $(distdir)/$$relfile; \ + base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ + for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ + if test -f $$file; then \ + relfile=`expr "$$file" : "$$d/\(.*\)"`; \ + test -f $(distdir)/$$relfile || \ + cp -p $$file $(distdir)/$$relfile; \ + else :; fi; \ done; \ done @@ -366,7 +428,7 @@ done install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" + test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ @@ -417,22 +479,21 @@ distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ @@ -451,7 +512,7 @@ all-am: Makefile $(INFO_DEPS) $(MANS) installdirs: for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -470,6 +531,7 @@ mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -477,6 +539,8 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + clean-am: clean-generic mostlyclean-am distclean: distclean-am @@ -499,13 +563,42 @@ @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook +install-dvi: install-dvi-am + +install-dvi-am: $(DVIS) + @$(NORMAL_INSTALL) + test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" + @list='$(DVIS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(dvidir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(dvidir)/$$f"; \ + done install-exec-am: +install-html: install-html-am + +install-html-am: $(HTMLS) + @$(NORMAL_INSTALL) + test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" + @list='$(HTMLS)'; for p in $$list; do \ + if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + if test -d "$$d$$p"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ + $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ + echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \ + else \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \ + fi; \ + done install-info: install-info-am install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) - test -z "$(infodir)" || $(mkdir_p) "$(DESTDIR)$(infodir)" + test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; \ for file in $$list; do \ @@ -535,6 +628,28 @@ else : ; fi install-man: install-man1 +install-pdf: install-pdf-am + +install-pdf-am: $(PDFS) + @$(NORMAL_INSTALL) + test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" + @list='$(PDFS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \ + done +install-ps: install-ps-am + +install-ps-am: $(PSS) + @$(NORMAL_INSTALL) + test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" + @list='$(PSS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(psdir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(psdir)/$$f"; \ + done installcheck-am: maintainer-clean: maintainer-clean-am @@ -554,22 +669,28 @@ ps-am: $(PSS) -uninstall-am: uninstall-info-am uninstall-man +uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ + uninstall-man uninstall-pdf-am uninstall-ps-am @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook uninstall-man: uninstall-man1 +.MAKE: install-am install-data-am install-strip uninstall-am + .PHONY: all all-am check check-am clean clean-generic dist-info \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ - install-data-hook install-exec install-exec-am install-info \ - install-info-am install-man install-man1 install-strip \ + install-data-hook install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-man1 install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-aminfo maintainer-clean-generic mostlyclean \ mostlyclean-aminfo mostlyclean-generic pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-hook uninstall-info-am \ - uninstall-man uninstall-man1 + uninstall uninstall-am uninstall-dvi-am uninstall-hook \ + uninstall-html-am uninstall-info-am uninstall-man \ + uninstall-man1 uninstall-pdf-am uninstall-ps-am # Link gawk.1 to pgawk.1 @@ -604,9 +725,6 @@ awkcard.nc: $(CARDFILES) $(TROFF) $(CARDSRC_N) | $(SEDME) | cat $(srcdir)/setter.outline - > awkcard.ps && touch awkcard.nc - -clean: - rm -f *.ps *~ awkcard.nc awkcard.tr *.html # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -urN gawk-3.1.5/doc/awkcard.in gawk-3.1.6/doc/awkcard.in --- gawk-3.1.5/doc/awkcard.in 2005-06-26 16:40:54.000000000 +0300 +++ gawk-3.1.6/doc/awkcard.in 2007-10-14 23:18:21.000000000 +0200 @@ -1,7 +1,7 @@ .\" AWK Reference Card --- Arnold Robbins, arnold@skeeve.com .\" .\" Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, -.\" 2003, 2004, 2005 Free Software Foundation, Inc. +.\" 2003, 2004, 2005, 2007 Free Software Foundation, Inc. .\" .\" Permission is granted to make and distribute verbatim copies of .\" this reference card provided the copyright notice and this permission @@ -100,8 +100,8 @@ \*(CD .SL .nf -\*(FRCopyright \(co 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -Free Software Foundation, Inc. +\*(FRCopyright \(co 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +2005, 2007 Free Software Foundation, Inc. .nf .BT @@ -223,11 +223,10 @@ .\" --- Command Line Arguments (gawk) .ES .fi -\*(CDThe following options are specific to \*(GK. -You may also use ``\*(FC\-W \*(FIoption\*(FR'' -for full POSIX compliance. -Long options may abbreviated as long as the abbreviation +\*(CDLong options may abbreviated as long as the abbreviation remains unique. +You may use ``\*(FC\-W \*(FIoption\*(FR'' +for full POSIX compliance. .sp .5 .ig .\" This option is left undocumented, on purpose. @@ -355,21 +354,28 @@ ls l lw(2.2i). \*(FC\-\^\-source '\*(FItext\*(FC'\*(FR -%use \*(FItext\*(FR as AWK program source code. +%T{ +use \*(FItext\*(FR as AWK program source code. \*(FC\-\^\-version\*(FR%T{ print version information on \*(FCstdout\fP and exit zero. T} +.T& +ls +l lw(2.2i). +\*(FC\-\^\-use\-lc\-numeric +%T{ +force use of the locale's decimal point character when parsing input data. +T} .TE .sp .5 .fi In compatibility mode, any other options are flagged as invalid, but are otherwise ignored. -In normal operation, as long as program text has been supplied, unknown +Normally, if there is program text, unknown options options are passed on to the AWK program in \*(FCARGV\*(FR -for processing. This is most useful for running AWK -programs via the \*(FC#!\*(FR executable interpreter mechanism.\*(CB +for processing.\*(CB .EB "\s+2\f(HBCOMMAND LINE ARGUMENTS (\*(GK\f(HB)\*(FR\s0" .BT @@ -1168,7 +1174,7 @@ .br co-process pipe into \*(FCgetline\*(FR; set \*(FIv\*(FR. .ti -.2i -\*(FCnext\fP +\*(CD\*(FCnext\fP .br stop processing the current input record. Read next input record and @@ -1297,6 +1303,8 @@ \*(FC%E\fP like \*(FC%e\fP, but use \*(FCE\fP instead of \*(FCe\*(FR \*(FC%f\fP a floating point number of the form \*(FC[\-]ddd.dddddd\*(FR +\*(FC%F\fP like \*(FC%f\fP, but use capital letters for infinity and + not-a-number values. \*(FC%g\fP use \*(FC%e\fP or \*(FC%f\fP, whichever is shorter, with nonsignificant zeros suppressed \*(FC%G\fP like \*(FC%g\fP, but use \*(FC%E\fP instead of \*(FC%e\*(FR @@ -1672,12 +1680,15 @@ The \*(FIdatespec\fP is a string of the form \*(FC"\*(FIYYYY MM DD HH MM SS[ DST]\*(FC"\*(FR. .ti -.2i -\*(FCstrftime(\*(FR[\*(FIformat \*(FR[\*(FC, \*(FItimestamp\*(FR]]\*(FC)\*(FR +\*(FCstrftime(\*(FR[\*(FIformat \*(FR[\*(FC, \*(FItimestamp\*(FR[\*(FC, \*(FIutc-flag\*(FR]]]\*(FC)\*(FR .br formats \*(FItimestamp\fP according to the specification in \*(FIformat\*(FR. The \*(FItimestamp\fP should be of the same form as returned by \*(FCsystime()\*(FR. +If \*(FIutc-flag\*(FR +is present and is non-zero or non-null, the result +is in UTC, otherwise the result is in local time. If \*(FItimestamp\fP is missing, the current time of day is used. If \*(FIformat\fP is missing, a default format equivalent to the output of \*(FIdate\*(FR(1) is used. @@ -1902,7 +1913,7 @@ .ES .nf \*(CDHost: \*(FCftp.gnu.org\*(FR -File: \*(FC/gnu/gawk/gawk-3.1.5.tar.gz\fP +File: \*(FC/gnu/gawk/gawk-3.1.6.tar.gz\fP .in +.2i .fi GNU \*(AK (\*(GK). There may be a later version. @@ -1929,8 +1940,8 @@ .\" --- Copying Permissions .ES .fi -\*(CDCopyright \(co 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. +\*(CDCopyright \(co 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +2007 Free Software Foundation, Inc. .sp .5 Permission is granted to make and distribute verbatim copies of this reference card provided the copyright notice and this permission notice diff -urN gawk-3.1.5/doc/gawk.1 gawk-3.1.6/doc/gawk.1 --- gawk-3.1.5/doc/gawk.1 2005-06-26 16:42:14.000000000 +0300 +++ gawk-3.1.6/doc/gawk.1 2007-10-19 04:13:28.000000000 +0200 @@ -3,6 +3,14 @@ .ds AN \s-1ANSI\s+1 .ds GN \s-1GNU\s+1 .ds AK \s-1AWK\s+1 +.de EX +.nf +.ft CW +.. +.de EE +.ft R +.fi +.. .ds EP \fIGAWK: Effective AWK Programming\fP .if !\n(.g \{\ . if !\w|\*(lq| \{\ @@ -14,7 +22,7 @@ . if \w'\(rq' .ds rq "\(rq . \} .\} -.TH GAWK 1 "June 26 2005" "Free Software Foundation" "Utility Commands" +.TH GAWK 1 "Oct 19 2007" "Free Software Foundation" "Utility Commands" .SH NAME gawk \- pattern scanning and processing language .SH SYNOPSIS @@ -53,7 +61,7 @@ .I Gawk is the \*(GN Project's implementation of the \*(AK programming language. It conforms to the definition of the language in -the \*(PX 1003.2 Command Language And Utilities Standard. +the \*(PX 1003.1 Standard. This version in turn is based on the description in .IR "The AWK Programming Language" , by Aho, Kernighan, and Weinberger, @@ -94,7 +102,7 @@ .PP .I Gawk options may be either traditional \*(PX one letter options, -or \*(GN style long options. \*(PX options start with a single \*(lq\-\*(rq, +or \*(GN-style long options. \*(PX options start with a single \*(lq\-\*(rq, while long options start with \*(lq\-\^\-\*(rq. Long options are provided for both \*(GN-specific features and for \*(PX-mandated features. @@ -119,7 +127,7 @@ .SH OPTIONS .PP .I Gawk -accepts the following options, listed alphabetically. +accepts the following options, listed by frequency. .TP .PD 0 .BI \-F " fs" @@ -174,7 +182,8 @@ .B r flag sets the maximum record size. These two flags and the .B \-m -option are from the Bell Laboratories research version of \*(UX +option are from an earlier version of the Bell Laboratories +research version of \*(UX .IR awk . They are ignored by .IR gawk , @@ -233,7 +242,7 @@ is provided, .I gawk uses a file named -.I awkvars.out +.B awkvars.out in the current directory. .sp .5 Having a list of all the global variables is a good way to look for @@ -446,6 +455,25 @@ in shell scripts. .TP .PD 0 +.B "\-W use\-lc\-numeric" +.TP +.PD +.B \-\^\-use\-lc\-numeric +This forces +.I gawk +to use the locale's decimal point character when parsing input data. +Although the POSIX standard requires this behavior, and +.I gawk +does so when +.B \-\^\-posix +is in effect, the default is to follow traditional behavior and use a +period as the decimal point, even in locales where the period is not the +decimal point character. This option overrides the default behavior, +without the full draconian strictness of the +.B \-\^\-posix +option. +.TP +.PD 0 .B "\-W version" .TP .PD @@ -467,7 +495,7 @@ .B \-\^\- Signal the end of options. This is useful to allow further arguments to the \*(AK program itself to start with a \*(lq\-\*(rq. -This is mainly for consistency with the argument parsing convention used +This provides consistency with the argument parsing convention used by most other \*(PX programs. .PP In compatibility mode, @@ -588,7 +616,7 @@ depending upon how they are used. \*(AK also has one dimensional arrays; arrays with multiple dimensions may be simulated. Several pre-defined variables are set as a program -runs; these will be described as needed and summarized below. +runs; these are described as needed and summarized below. .SS Records Normally, records are separated by newline characters. You can control how records are separated by assigning values to the built-in variable @@ -636,10 +664,10 @@ .B FS is a single space, fields are separated by runs of spaces and/or tabs and/or newlines. -(But see the discussion of -.BR \-\^\-posix , +(But see the section +.BR "POSIX COMPATIBILITY" , below). -.B NOTE: +.BR NOTE : The value of .B IGNORECASE (see below) also affects how fields are split when @@ -828,7 +856,7 @@ .B sub() built-in functions all ignore case when doing regular expression operations. -.B NOTE: +.BR NOTE : Array subscripting is .I not affected. @@ -858,7 +886,7 @@ facilities such as .BR isalpha() , and -.BR tolupper() . +.BR toupper() . .TP .B LINT Provides dynamic control of the @@ -1003,11 +1031,7 @@ .PP The special operator .B in -may be used in an -.B if -or -.B while -statement to see if an array has an index consisting of a particular +may be used to test if an array has an index consisting of a particular value. .PP .RS @@ -1040,7 +1064,7 @@ Variables and fields may be (floating point) numbers, or strings, or both. How the value of a variable is interpreted depends upon its context. If used in -a numeric expression, it will be treated as a number, if used as a string +a numeric expression, it will be treated as a number; if used as a string it will be treated as a string. .PP To force a variable to be treated as a number, add 0 to it; to force it @@ -1073,6 +1097,16 @@ .B b has a string value of \fB"12"\fR and not \fB"12.00"\fR. .PP +When operating in POSIX mode (such as with the +.B \-\^\-posix +command line option), +beware that locale settings may interfere with the way +decimal numbers are treated: the decimal separator of the numbers you +are feeding to +.I gawk +must conform to what your locale would expect, be it +a comma (,) or a period (.). +.PP .I Gawk performs comparisons as follows: If two variables are numeric, they are compared numerically. @@ -1081,13 +1115,6 @@ Otherwise, the numeric value is converted to a string and a string comparison is performed. Two strings are compared, of course, as strings. -Note that the POSIX standard applies the concept of -\*(lqnumeric string\*(rq everywhere, even to string constants. -However, this is -clearly incorrect, and -.I gawk -does not do this. -(Fortunately, this is fixed in the next version of the standard.) .PP Note that string constants, such as \fB"57"\fP, are .I not @@ -1335,7 +1362,7 @@ character list, matches any of the characters .IR abc.\|.\|. . .TP -.BI [^ abc.\|.\|. ] +\fB[^\fIabc.\|.\|.\fB]\fR negated character list, matches any character except .IR abc.\|.\|. . .TP @@ -1429,7 +1456,7 @@ are also valid in regular expressions. .PP .I "Character classes" -are a new feature introduced in the \*(PX standard. +are a feature introduced in the \*(PX standard. A character class is a special notation for describing lists of characters that have a specific attribute, but where the actual characters themselves can vary from country to country and/or @@ -1495,7 +1522,8 @@ With the \*(PX character classes, you can write .BR /[[:alnum:]]/ , and this matches -the alphabetic and numeric characters in your character set. +the alphabetic and numeric characters in your character set, +no matter what it is. .PP Two additional special sequences can appear in character lists. These apply to non-\s-1ASCII\s+1 character sets, which can have single symbols @@ -1505,7 +1533,7 @@ character, as well as several characters that are equivalent for .IR collating , or sorting, purposes. (E.g., in French, a plain \*(lqe\*(rq -and a grave-accented e\` are equivalent.) +and a grave-accented \*(lqe\h'-\w:e:u'\`\*(rq are equivalent.) .TP Collating Symbols A collating symbol is a multi-character collating element enclosed in @@ -1637,6 +1665,13 @@ .I space String concatenation. .TP +.B "| |&" +Piped I/O for +.BR getline , +.BR print , +and +.BR printf . +.TP .PD 0 .B "< >" .TP @@ -1649,7 +1684,7 @@ .TP .B "~ !~" Regular expression match, negated match. -.B NOTE: +.BR NOTE : Do not use a constant regular expression .RB ( /foo/ ) on the left-hand side of a @@ -1780,6 +1815,10 @@ Co-processes are a .I gawk extension. +.RI ( command +can also be a socket. See the subsection +.BR "Special File Names" , +below.) .TP .B next Stop processing the current input record. The next input record @@ -1856,14 +1895,17 @@ .BR printf . .TP .BI "print .\|.\|. >>" " file" -appends output to the +Appends output to the .IR file . .TP .BI "print .\|.\|. |" " command" -writes on a pipe. +Writes on a pipe. .TP .BI "print .\|.\|. |&" " command" -sends data to a co-process. +Sends data to a co-process or socket. +(See also the subsection +.BR "Special File Names" , +below.) .PP The .BR getline @@ -1872,8 +1914,8 @@ .B ERRNO contains a string describing the problem. .PP -.B NOTE: -If using a pipe or co-process to +.BR NOTE : +If using a pipe, co-process, or socket to .BR getline , or from .B print @@ -1883,8 +1925,8 @@ .I must use .B close() -to create new instances of the command. -\*(AK does not automatically close pipes or co-processes when +to create new instances of the command or socket. +\*(AK does not automatically close pipes, sockets, or co-processes when they return EOF. .SS The \fIprintf\fP\^ Statement .PP @@ -1907,7 +1949,7 @@ .BR "%d" "," " %i" A decimal number (the integer part). .TP -.B %e , " %E" +.BR %e , " %E" A floating point number of the form .BR [\-]d.dddddde[+\^\-]dd . The @@ -1917,11 +1959,22 @@ instead of .BR e . .TP -.B %f +.BR %f , " %F" A floating point number of the form .BR [\-]ddd.dddddd . +If the system library supports it, +.B %F +is available as well. This is like +.BR %f , +but uses capital letters for special \*(lqnot a number\*(rq +and \*(lqinfinity\*(rq values. If +.B %F +is not available, +.I gawk +uses +.BR %f . .TP -.B %g , " %G" +.BR %g , " %G" Use .B %e or @@ -1944,7 +1997,7 @@ .B %s A character string. .TP -.B %x , " %X" +.BR %x , " %X" An unsigned hexadecimal number (an integer). The .B %X @@ -1965,7 +2018,7 @@ integer, .I gawk switches to the -.B %g +.B %0f format specifier. If .B \-\^\-lint is provided on the command line @@ -2023,8 +2076,9 @@ For .BR %e , .BR %E , +.B %f and -.BR %f , +.BR %F , the result always contains a decimal point. For @@ -2053,8 +2107,9 @@ For the .BR %e , .BR %E , +.B %f and -.BR %f +.BR %F , formats, this specifies the number of digits you want printed to the right of the decimal point. For the @@ -2275,7 +2330,7 @@ are sorted using .IR gawk\^ "'s" normal rules for -comparing values, and the indexes of the +comparing values, and the indices of the sorted values of .I s are replaced with sequential @@ -2288,7 +2343,7 @@ .IR d , and then .I d -is sorted, leaving the indexes of the +is sorted, leaving the indices of the source array .I s unchanged. @@ -2530,6 +2585,16 @@ .I str translated to their corresponding upper-case counterparts. Non-alphabetic characters are left unchanged. +.PP +As of version 3.1.5, +.I gawk +is multibyte aware. This means that +.BR index() , +.BR length() , +.B substr() +and +.B match() +all work in terms of characters, not bytes. .SS Time Functions Since one of the primary uses of \*(AK programs is processing log files that contain time stamp information, @@ -2574,11 +2639,15 @@ .B mktime() returns \-1. .TP -\fBstrftime(\fR[\fIformat \fR[\fB, \fItimestamp\fR]]\fB)\fR +\fBstrftime(\fR[\fIformat \fR[\fB, \fItimestamp\fR[\fB, \fIutc-flag\fR]]]\fB)\fR Formats .I timestamp according to the specification in .IR format. +If +.I utc-flag +is present and is non-zero or non-null, the result +is in UTC, otherwise the result is in local time. The .I timestamp should be of the same form as returned by @@ -2595,14 +2664,6 @@ .B strftime() function in \*(AN C for the format conversions that are guaranteed to be available. -A public-domain version of -.IR strftime (3) -and a man page for it come with -.IR gawk ; -if that version was used to build -.IR gawk , -then all of the conversions described in that man page are available to -.IR gawk. .TP .B systime() Returns the current time of day as the number of seconds since the Epoch @@ -2613,7 +2674,7 @@ the following bit manipulation functions are available. They work by converting double-precision floating point values to -.B "unsigned long" +.B uintmax_t integers, doing the operation, and then converting the result back to floating point. The functions are: @@ -2771,7 +2832,7 @@ The left parenthesis in a function call is required to immediately follow the function name, without any intervening white space. -This is to avoid a syntactic ambiguity with the concatenation operator. +This avoids a syntactic ambiguity with the concatenation operator. This restriction does not apply to the built-in functions listed above. .PP Functions may call each other and may be recursive. @@ -2819,7 +2880,7 @@ .ft B This function is provided and documented in \*(EP, but everything about this feature is likely to change -in the next release. +eventually. We STRONGLY recommend that you do not use this feature for anything that you aren't willing to redo. .ft R @@ -2834,7 +2895,9 @@ .B \-\^\-profile option. It then continues to run. .B SIGHUP -causes it to dump the profile and function call stack and then exit. +causes +.I pgawk +to dump the profile and function call stack and then exit. .SH EXAMPLES .nf Print and sort the login names of all users: @@ -2907,10 +2970,11 @@ .B TEXTDOMAIN variable to set the text domain to a name associated with your program. .sp -.ti +5n -.ft B +.RS +.EX BEGIN { TEXTDOMAIN = "myprog" } -.ft R +.EE +.RE .sp This allows .I gawk @@ -2942,9 +3006,9 @@ file for your program. .TP 5. -Provide appropriate translations, and build and install a corresponding +Provide appropriate translations, and build and install the corresponding .B \&.mo -file. +files. .PP The internationalization features are described in full detail in \*(EP. .SH POSIX COMPATIBILITY @@ -3080,7 +3144,9 @@ .I gawk with the .B \-\^\-traditional -option. +or +.B \-\^\-posix +options. .PP The following features of .I gawk @@ -3186,6 +3252,10 @@ .B printf and .BR sprintf() . +.TP +\(bu +The ability to pass an array to +.BR length() . .\" New keywords or changes to keywords .TP \(bu @@ -3258,7 +3328,7 @@ is set to the tab character. Note that typing .B "gawk \-F\et \&.\|.\|." -simply causes the shell to quote the \*(lqt,\*(rq, and does not pass +simply causes the shell to quote the \*(lqt,\*(rq and does not pass \*(lq\et\*(rq to the .B \-F option. @@ -3310,6 +3380,15 @@ \fB}\fR .fi .RE +.PP +If +.I gawk +is configured with the +.B \-\^\-disable\-directories-fatal +option, then it will silently skip directories named on the command line. +Otherwise, it will do so only if invoked with the +.B \-\^\-traditional +option. .SH ENVIRONMENT VARIABLES The .B AWKPATH @@ -3350,6 +3429,8 @@ .PP \*(EP, Edition 3.0, published by the Free Software Foundation, 2001. +The current version of this document is available online at +.BR http://www.gnu.org/software/gawk/manual . .SH BUGS The .B \-F @@ -3385,13 +3466,16 @@ Scott Deifik is the current DOS maintainer. Pat Rankin did the port to VMS, and Michal Jaegermann did the port to the Atari ST. The port to OS/2 was done by Kai Uwe Rommel, with contributions and -help from Darrel Hankerson. Fred Fish supplied support for the Amiga, -Stephen Davies provided the Tandem port, +help from Darrel Hankerson. +Juan M.\& Guerrero now maintains the OS/2 port. +Fred Fish supplied support for the Amiga, and Martin Brown provided the BeOS port. +Stephen Davies provided the original Tandem port, and +Matthew Woehlke provided changes for Tandem's POSIX-compliant systems. .SH VERSION INFORMATION This man page documents .IR gawk , -version 3.1.5. +version 3.1.6. .SH BUG REPORTS If you find a bug in .IR gawk , @@ -3404,12 +3488,18 @@ what C compiler you used to compile it, and a test program and data that are as small as possible for reproducing the problem. .PP -Before sending a bug report, please do two things. First, verify that +Before sending a bug report, please do the following things. First, verify that you have the latest version of .IR gawk . Many bugs (usually subtle ones) are fixed at each release, and if yours is out of date, the problem may already have been solved. -Second, please read this man page and the reference manual carefully to +Second, please see if setting the environment variable +.B LC_ALL +to +.B LC_ALL=C +causes things to behave as you expect. If so, it's a locale issue, +and may or may not really be a bug. +Finally, please read this man page and the reference manual carefully to be sure that what you think is a bug really is, instead of just a quirk in the language. .PP @@ -3435,7 +3525,8 @@ We thank him. .SH COPYING PERMISSIONS Copyright \(co 1989, 1991, 1992, 1993, 1994, 1995, 1996, -1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2007 +Free Software Foundation, Inc. .PP Permission is granted to make and distribute verbatim copies of this manual page provided the copyright notice and this permission diff -urN gawk-3.1.5/doc/gawk.texi gawk-3.1.6/doc/gawk.texi --- gawk-3.1.5/doc/gawk.texi 2005-07-25 22:28:03.000000000 +0300 +++ gawk-3.1.6/doc/gawk.texi 2007-09-30 22:27:45.000000000 +0200 @@ -20,9 +20,9 @@ @c applies to and all the info about who's publishing this edition @c These apply across the board. -@set UPDATE-MONTH June, 2005 +@set UPDATE-MONTH October, 2007 @set VERSION 3.1 -@set PATCHLEVEL 5 +@set PATCHLEVEL 6 @set FSF @@ -110,7 +110,7 @@ @end iftex @copying -Copyright @copyright{} 1989, 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +Copyright @copyright{} 1989, 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. @sp 2 This is Edition @value{EDITION} of @cite{@value{TITLE}: @value{SUBTITLE}}, @@ -171,13 +171,15 @@ So there. @sp 2 UNIX is a registered trademark of The Open Group in the United States and other countries. @* +Linux is a registered trademark of Linus Torvalds in the United States and other countries. @* Microsoft, MS and MS-DOS are registered trademarks, and Windows is a trademark of Microsoft Corporation in the United States and other countries. @* Atari, 520ST, 1040ST, TT, STE, Mega and Falcon are registered trademarks or trademarks of Atari Corporation. @* -DEC, Digital, OpenVMS, ULTRIX and VMS are trademarks of Digital Equipment -Corporation. @* +Once upon a time, +DEC, Digital, OpenVMS, ULTRIX and VMS were trademarks of Digital Equipment +Corporation. Now they belong to Hewlett-Packard Corporation. @* @end ignore ``To boldly go where no man has gone before'' is a Registered Trademark of Paramount Pictures Corporation. @* @@ -281,7 +283,7 @@ operating systems. * Notes:: Notes about @command{gawk} extensions and possible future work. -* Basic Concepts:: A very quick intoduction to programming +* Basic Concepts:: A very quick introduction to programming concepts. * Glossary:: An explanation of some unfamiliar terms. * Copying:: Your right to copy and distribute @@ -406,6 +408,8 @@ * Typing and Comparison:: How variables acquire types and how this affects comparison of numbers and strings with @samp{<}, etc. +* Variable Typing:: String type versus numeric type. +* Comparison Operators:: The comparison operators. * Boolean Ops:: Combining comparison expressions using boolean operators @samp{||} (``or''), @samp{&&} (``and'') and @samp{!} (``not''). @@ -601,6 +605,7 @@ * VMS Installation Details:: How to install @command{gawk} under VMS. * VMS Running:: How to run @command{gawk} under VMS. * VMS POSIX:: Alternate instructions for VMS POSIX. +* VMS Old Gawk:: An old version comes with some VMS systems. * Unsupported:: Systems whose ports are no longer supported. * Atari Installation:: Installing @command{gawk} on the Atari ST. @@ -630,6 +635,10 @@ * Basic High Level:: The high level view. * Basic Data Typing:: A very quick intro to data types. * Floating Point Issues:: Stuff to know about floating-point numbers. +* String Conversion Precision:: The String Value Can Lie. +* Unexpected Results:: Floating Point Numbers Are Not + Abstract Numbers. +* POSIX Floating Point Problems:: Standards Versus Existing Practice. @end detailmenu @end menu @@ -930,7 +939,7 @@ @node Names @section A Rose by Any Other Name -@cindex @command{awk}, new vs. old +@cindex @command{awk}, new vs.@: old The @command{awk} language has evolved over the years. Full details are provided in @ref{Language History}. The language described in this @value{DOCUMENT} @@ -1218,7 +1227,7 @@ To find out more about the FSF and the GNU Project online, see @uref{http://www.gnu.org, the GNU Project's home page}. This @value{DOCUMENT} may also be read from -@uref{http://www.gnu.org/manual/gawk/, their web site}. +@uref{http://www.gnu.org/software/gawk/manual/, their web site}. A shell, an editor (Emacs), highly portable optimizing C, C++, and Objective-C compilers, a symbolic debugger and dozens of large and @@ -1559,7 +1568,7 @@ the end of the input files. @cindex @command{awk}, uses for -@cindex programming languages@comma{} data-driven vs. procedural +@cindex programming languages@comma{} data-driven vs.@: procedural @cindex @command{awk} programs Programs in @command{awk} are different from programs in most other languages, because @command{awk} programs are @dfn{data-driven}; that is, you describe @@ -1926,8 +1935,8 @@ when reading it at a later time. @cindex quoting -@cindex single quote (@code{'}), vs. apostrophe -@cindex @code{'} (single quote), vs. apostrophe +@cindex single quote (@code{'}), vs.@: apostrophe +@cindex @code{'} (single quote), vs.@: apostrophe @strong{Caution:} As mentioned in @ref{One-shot}, you can enclose small to medium programs in single quotes, in order to keep @@ -2692,7 +2701,7 @@ retargetable assembler for eight-bit microprocessors (@pxref{Glossary}, for more information), and a microcode assembler for a special-purpose Prolog computer. More recently, @command{gawk} was used for writing a Wiki -clone.@footnote{@uref{http://www.awk-scripting.de/cgi/wiki.cgi/yawk/, Yet Another Wiki Clone}.} +clone.@footnote{@uref{http://www.awk-scripting.de/cgi-bin/wiki.cgi/yawk/, Yet Another Wiki Clone}.} While the original @command{awk}'s capabilities were strained by tasks of such complexity, modern versions are more capable. Even the Bell Labs version of @command{awk} has fewer predefined limits, and those @@ -3561,6 +3570,7 @@ are the POSIX character classes (@code{[[:alnum:]]}, etc.). Characters described by octal and hexadecimal escape sequences are treated literally, even if they represent regexp metacharacters. +Also, @command{gawk} silently skips directories named on the command line. @item @code{--re-interval} Allow interval expressions in regexps, even if @option{--traditional} @@ -3663,7 +3673,7 @@ ASCII characters, which also provides a number of characters suitable for use with European languages. -As of @command{gawk} 3.1.4, the case equivalencies are fully +As of @command{gawk} 3.1.4, the case equivalences are fully locale-aware. They are based on the C @code{} facilities, such as @code{isalpha()} and @code{toupper()}. @@ -3751,7 +3761,7 @@ on the right. This is true of any string-valued expression (such as @code{digits_regexp}, shown previously), not just string constants. -@cindex regexp constants, slashes vs. quotes +@cindex regexp constants, slashes vs.@: quotes @cindex @code{\} (backslash), regexp constants @cindex backslash (@code{\}), regexp constants @cindex @code{"} (double quote), regexp constants @@ -3767,9 +3777,9 @@ second one so that the string actually contains the two characters @samp{\} and @samp{*}. -@cindex troubleshooting, regexp constants vs. string constants -@cindex regexp constants, vs. string constants -@cindex string constants, vs. regexp constants +@cindex troubleshooting, regexp constants vs.@: string constants +@cindex regexp constants, vs.@: string constants +@cindex string constants, vs.@: regexp constants Given that you can use both regexp and string constants to describe regular expressions, which should you use? The answer is ``regexp constants,'' for several reasons: @@ -3828,6 +3838,7 @@ @node Locales @section Where You Are Makes A Difference +@cindex locale, definition of Modern systems support the notion of @dfn{locales}: a way to tell the system about the local character set and language. The current @@ -3852,6 +3863,7 @@ locale setting (and thus you may not see it on your system). There are two fixes. The first is to use the POSIX character class @samp{[[:upper:]]}, instead of @samp{[A-Z]}. +(This is preferred, since then your program will work everywhere.) The second is to change the locale setting in the environment, before running @command{gawk}, by using the shell statements: @@ -3873,10 +3885,14 @@ or use a POSIX character class such as @samp{[[:punct:]]}.) For the normal case of @samp{RS = "\n"}, the locale is largely irrelevant. -For other single byte record separators, using @samp{LC_ALL=C} will give you -much better performance when reading records. Otherwise, @command{gawk} has -to make several function calls, @emph{per input character} to find the record -terminator. +For other single-character record separators, using @samp{LC_ALL=C} +will give you much better performance when reading records. Otherwise, +@command{gawk} has to make several function calls, @emph{per input +character} to find the record terminator. + +Finally, the locale affects the value of the decimal point character +used when @command{gawk} parses input data. This is discussed in +detail in @ref{Conversion}. @node Reading Files @chapter Reading Input Files @@ -4840,7 +4856,7 @@ separator occurs when processing the Unix system password file. On many Unix systems, each user has a separate entry in the system password file, one line per user. The information in these lines is separated -by colons. The first field is the user's logon name and the second is +by colons. The first field is the user's login name and the second is the user's (encrypted or shadow) password. A password file entry might look like this: @@ -5161,7 +5177,7 @@ separate the fields in the record. One way to do this is to divide each of the lines into fields in the normal manner. This happens by default as the result of a special feature. When @code{RS} is set to the empty -string, @emph{and} @code{FS} is a set to a single character, +string, @emph{and} @code{FS} is set to a single character, the newline character @emph{always} acts as a field separator. This is in addition to whatever field separations result from @code{FS}.@footnote{When @code{FS} is the null string (@code{""}) @@ -5185,7 +5201,7 @@ Another way to separate fields is to put each field on a separate line: to do this, just set the variable @code{FS} to the string @code{"\n"}. (This single -character seperator matches a single newline.) +character separator matches a single newline.) A practical example of a @value{DF} organized this way might be a mailing list, where each entry is separated by blank lines. Consider a mailing list in a file named @file{addresses}, which looks like this: @@ -5259,7 +5275,9 @@ successive occurrences delimit empty records. @item RS == "" -Records are separated by runs of blank lines. The newline character +Records are separated by runs of blank lines. +When @code{FS} is a single character, then +the newline character always serves as a field separator, in addition to whatever value @code{FS} may have. Leading and trailing newlines in a file are ignored. @@ -5347,7 +5365,6 @@ print m > "/dev/stderr" exit @} - t = -1 u = index($0, "*/") @} # substr expression will be "" if */ @@ -5358,7 +5375,7 @@ @} @end example -This @command{awk} program deletes all C-style comments (@samp{/* @dots{} +This @command{awk} program deletes C-style comments (@samp{/* @dots{} */}) from the input. By replacing the @samp{print $0} with other statements, you could perform more complicated processing on the decommented input, such as searching for matches of a regular @@ -5601,6 +5618,20 @@ write it as @samp{(@w{"echo "} "date") | getline} if you want your program to be portable to other @command{awk} implementations. +@quotation NOTE +Unfortunately, @command{gawk} has not been consistent in its treatment +of a construct like @samp{@w{"echo "} "date" | getline}. Up to and including +@value{PVERSION} 3.1.1 of @command{gawk}, it was treated as +@samp{@w{("echo "} "date") | getline}. +(This how Unix @command{awk} behaves.) +From 3.1.2 through 3.1.5, it was treated as +@samp{@w{"echo "} ("date" | getline)}. +(This is how @command{mawk} behaves.) +Starting with @value{PVERSION} 3.1.6, the earlier behavior was reinstated. +In short, @emph{always} use explicit parentheses, and then you won't +have to worry. +@end quotation + @node Getline/Variable/Pipe @subsection Using @code{getline} into a Variable from a Pipe @cindex variables, @code{getline} command into@comma{} using @@ -5648,7 +5679,7 @@ On occasion, you might want to send data to another program for processing and then read the results back. -@command{gawk} allows you start a @dfn{coprocess}, with which two-way +@command{gawk} allows you to start a @dfn{coprocess}, with which two-way communications are possible. This is done with the @samp{|&} operator. Typically, you write data to the coprocess first and then @@ -6179,7 +6210,7 @@ infinity are formatted as @samp{-inf} or @samp{-infinity}, and positive infinity as -@samp{inf} and @samp{-infinity}. +@samp{inf} and @samp{infinity}. The special ``not a number'' value formats as @samp{-nan} or @samp{nan}. @item %F @@ -6187,7 +6218,7 @@ using uppercase letters. The @code{%F} format is a POSIX extension to ISO C; not all systems -support. On those that don't, @command{gawk} uses @code{%f} instead. +support it. On those that don't, @command{gawk} uses @code{%f} instead. @item %g@r{,} %G These print a number in either scientific notation or in floating-point @@ -6220,7 +6251,7 @@ @cindex @command{gawk}, format-control characters @quotation NOTE When using the integer format-control letters for values that are -outside the range of the widest C integer type, @command{gawk} switches to the +outside the range of the widest C integer type, @command{gawk} switches to the @samp{%g} format specifier. If @option{--lint} is provided on the command line (@pxref{Options}), @command{gawk} warns about this. Other versions of @command{awk} may print invalid @@ -6313,19 +6344,19 @@ value to print. @item ' -A single quote or apostrohe character is a POSIX extension to ISO C. +A single quote or apostrophe character is a POSIX extension to ISO C. It indicates that the integer part of a floating point value, or the entire part of an integer decimal value, should have a thousands-separator character in it. This only works in locales that support such characters. For example: @example -$ @kbd{cat thousands.awk} @i{Show source program} +$ @kbd{cat thousands.awk} @i{Show source program} @print{} BEGIN @{ printf "%'d\n", 1234567 @} -$ @kbd{LC_ALL=C gawk -f thousands.awk} @i{Run it in "C" locale} -@print{} 1234567 -$ @kbd{LC_ALL=en_US.UTF-8 gawk -f thousands.awk} @i{Run in US English UTF locale} -@print{} 1,234,567 +$ @kbd{LC_ALL=C gawk -f thousands.awk} +@print{} 1234567 @i{Results in "C" locale} +$ @kbd{LC_ALL=en_US.UTF-8 gawk -f thousands.awk} +@print{} 1,234,567 @i{Results in US English UTF locale} @end example @noindent @@ -6334,7 +6365,7 @@ @quotation NOTE The @samp{'} flag is a nice feature, but its use complicates things: it -now becomes difficult to use it in command-line programs. For information +becomes difficult to use it in command-line programs. For information on appropriate quoting tricks, see @ref{Quoting}. @end quotation @@ -6654,7 +6685,8 @@ This example also illustrates the use of a variable to represent a @var{file} or @var{command}---it is not necessary to always use a string constant. Using a variable is generally a good idea, -because @command{awk} requires that the string value be spelled identically +because (if you mean to refer to that same file or command) +@command{awk} requires that the string value be spelled identically every time. @cindex coprocesses @@ -6671,6 +6703,8 @@ This feature is a @command{gawk} extension, and is not available in POSIX @command{awk}. +@xref{Getline/Coprocess}, +for a brief discussion. @xref{Two-way I/O}, for a more complete discussion. @end table @@ -6696,7 +6730,10 @@ This is indeed how redirections must be used from the shell. But in @command{awk}, it isn't necessary. In this kind of case, a program should use @samp{>} for all the @code{print} statements, since the output file -is only opened once. +is only opened once. (It happens that if you mix @samp{>} and @samp{>>} +that output is produced in the expected order. However, mixing the operators +for the same file is definitely poor style, and is confusing to readers +of your program.) @cindex differences in @command{awk} and @command{gawk}, implementation limitations @cindex implementation issues@comma{} @command{gawk}, limits @@ -7767,8 +7804,8 @@ @cindex POSIX @command{awk}, @code{OFMT} variable and @cindex @code{OFMT} variable -@cindex portability, new @command{awk} vs. old @command{awk} -@cindex @command{awk}, new vs. old, @code{OFMT} variable +@cindex portability, new @command{awk} vs.@: old @command{awk} +@cindex @command{awk}, new vs.@: old, @code{OFMT} variable Prior to the POSIX standard, @command{awk} used the value of @code{OFMT} for converting numbers to strings. @code{OFMT} specifies the output format to use when printing numbers with @code{print}. @@ -7783,23 +7820,22 @@ @xref{Print}, for more information on the @code{print} statement. -Finally, once again, where you are can matter when it comes to -converting between numbers and strings. In -@ref{Locales}, we mentioned that the -local character set and language (the locale) can affect how @command{gawk} matches -characters. The locale also affects numeric formats. In particular, for @command{awk} -programs, it affects the decimal point character. The @code{"C"} locale, and most -English-language locales, use the period character (@samp{.}) as the decimal point. -However, many (if not most) European and non-English locales use the comma (@samp{,}) -as the decimal point character. +And, once again, where you are can matter when it comes to converting +between numbers and strings. In @ref{Locales}, we mentioned that +the local character set and language (the locale) can affect how +@command{gawk} matches characters. The locale also affects numeric +formats. In particular, for @command{awk} programs, it affects the +decimal point character. The @code{"C"} locale, and most English-language +locales, use the period character (@samp{.}) as the decimal point. +However, many (if not most) European and non-English locales use the comma +(@samp{,}) as the decimal point character. The POSIX standard says that @command{awk} always uses the period as the decimal point when reading the @command{awk} program source code, and for command-line variable assignments (@pxref{Other Arguments}). However, when interpreting input data, for @code{print} and @code{printf} output, and for number to string conversion, the local decimal point character is used. -As of @value{PVERSION} 3.1.3, @command{gawk} fully complies with this aspect -of the standard. Here are some examples indicating the difference in behavior, +Here are some examples indicating the difference in behavior, on a GNU/Linux system: @example @@ -7819,6 +7855,37 @@ treats @samp{4,321} as @samp{4}, while in the Danish locale, it's treated as the full number, @samp{4.321}. +For @value{PVERSION} 3.1.3 through 3.1.5, @command{gawk} fully complied +with this aspect of the standard. However, many users in non-English +locales complained about this behavior, since their data used a period +as the decimal point. Beginning in @value{PVERSION} 3.1.6, the default +behavior was restored to use a period as the decimal point character. +You can use the @option{--use-lc-numeric} option (@pxref{Options}) +to force @command{gawk} to use the locale's decimal point character. +(@command{gawk} also uses the locale's decimal point character when in +POSIX mode, either via @option{--posix}, or the @env{POSIXLY_CORRECT} +environment variable.) + +The following table describes the cases in which the locale's decimal +point character is used and when a period is used. Some of these +features have not been described yet. + +@float Table,table-locale-affects +@caption{Locale Decimal Point versus A Period} +@multitable @columnfractions .15 .20 .45 +@headitem Feature @tab Default @tab @option{--posix} or @option{--use-lc-numeric} +@item @samp{%'g} @tab Use locale @tab Use locale +@item @samp{%g} @tab Use period @tab Use locale +@item Input @tab Use period @tab Use locale +@item @samp{strtonum} @tab Use period @tab Use locale +@end multitable +@end float + +Finally, modern day formal standards and IEEE standard floating point +representation can have an unusual but important effect on the way +@command{gawk} converts some special string values to numbers. The details +are presented in @ref{POSIX Floating Point Problems}. + @node Arithmetic Ops @section Arithmetic Operators @cindex arithmetic operators @@ -7969,9 +8036,9 @@ @cindex troubleshooting, string concatenation Because string concatenation does not have an explicit operator, it is often necessary to insure that it happens at the right time by using -parentheses to enclose the items to concatenate. For example, the -following code fragment does not concatenate @code{file} and @code{name} -as you might expect: +parentheses to enclose the items to concatenate. For example, +you might expect that the +following code fragment concatenates @code{file} and @code{name}: @example file = "file" @@ -7980,6 +8047,9 @@ @end example @noindent +This produces a syntax error with Unix @command{awk}.@footnote{It happens +that @command{gawk} and @command{mawk} ``get it right,'' but you should +not rely on this.} It is necessary to use the following: @example @@ -8013,7 +8083,7 @@ @ignore > To: bug-gnu-utils@@gnu.org -> CC: arnold@gnu.org +> CC: arnold@@gnu.org > Subject: gawk 3.0.4 bug with {print -12 " " -24} > From: Russell Schulz > Date: Tue, 8 Feb 2000 19:56:08 -0700 @@ -8500,6 +8570,16 @@ Unlike other programming languages, @command{awk} variables do not have a fixed type. Instead, they can be either a number or a string, depending upon the value that is assigned to them. +We look now at how variables are typed, and how @command{awk} +compares variables. + +@menu +* Variable Typing:: String type versus numeric type. +* Comparison Operators:: The comparison operators. +@end menu + +@node Variable Typing +@subsection String Type Versus Numeric Type @cindex numeric, strings @cindex strings, numeric @@ -8544,9 +8624,9 @@ @example BEGIN @{ - a = 12.345 - b = a " is a cute number" - print b + a = 12.345 + b = a " is a cute number" + print b @} @end example @@ -8615,17 +8695,49 @@ The basic idea is that user input that looks numeric---and @emph{only} user input---should be treated as numeric, even though it is actually made of characters and is therefore also a string. -Thus, for example, the string constant @w{@code{" +3.14"}} -is a string, even though it looks numeric, -and is @emph{never} treated as number for comparison +Thus, for example, the string constant @w{@code{" +3.14"}}, +when it appears in program source code, +is a string---even though it looks numeric---and +is @emph{never} treated as number for comparison purposes. In short, when one operand is a ``pure'' string, such as a string constant, then a string comparison is performed. Otherwise, a -numeric comparison is performed.@footnote{The POSIX standard is under -revision. The revised standard's rules for typing and comparison are +numeric comparison is performed.@footnote{The POSIX standard has +been revised. The revised standard's rules for typing and comparison are the same as just described for @command{gawk}.} +This point bears additional emphasis: All user input is made of characters, +and so is first and foremost of @var{string} type; input strings +that look numeric are additionally given the @var{strnum} attribute. +Thus, the six-character input string @w{@samp{ +3.14}} receives the +@var{strnum} attribute. In contrast, the eight-character literal +@w{@code{" +3.14"}} appearing in program text is a string constant. +The following examples print @samp{1} when the comparison between +the two different constants is true, @samp{0} otherwise: + +@example +$ echo ' +3.14' | gawk '@{ print $0 == " +3.14" @}' @i{True} +@print{} 1 +$ echo ' +3.14' | gawk '@{ print $0 == "+3.14" @}' @i{False} +@print{} 0 +$ echo ' +3.14' | gawk '@{ print $0 == "3.14" @}' @i{False} +@print{} 0 +$ echo ' +3.14' | gawk '@{ print $0 == 3.14 @}' @i{True} +@print{} 1 +$ echo ' +3.14' | gawk '@{ print $1 == " +3.14" @}' @i{False} +@print{} 0 +$ echo ' +3.14' | gawk '@{ print $1 == "+3.14" @}' @i{True} +@print{} 1 +$ echo ' +3.14' | gawk '@{ print $1 == "3.14" @}' @i{False} +@print{} 0 +$ echo ' +3.14' | gawk '@{ print $1 == 3.14 @}' @i{True} +@print{} 1 +@end example + +@node Comparison Operators +@subsection Comparison Operators + @dfn{Comparison expressions} compare strings or numbers for relationships such as equality. They are written using @dfn{relational operators}, which are a superset of those in C. @@ -8726,9 +8838,9 @@ @print{} false @end example -@cindex comparison expressions, string vs. regexp -@c @cindex string comparison vs. regexp comparison -@c @cindex regexp comparison vs. string comparison +@cindex comparison expressions, string vs.@: regexp +@c @cindex string comparison vs.@: regexp comparison +@c @cindex regexp comparison vs.@: string comparison @noindent the result is @samp{false} because both @code{$1} and @code{$2} are user input. They are numeric strings---therefore both have @@ -8906,7 +9018,9 @@ first field is @samp{START}, the value of @code{interested} is toggled to true, using @samp{!}. The next rule prints lines as long as @code{interested} is true. When a line is seen whose first field is -@samp{END}, @code{interested} is toggled back to false. +@samp{END}, @code{interested} is toggled back to false.@footnote{This +program has a bug; it prints lines starting with @samp{END}. How +would you fix it?} @ignore Scott Deifik points out that this program isn't robust against @@ -9047,8 +9161,7 @@ Like every other expression, the function call has a value, which is computed by the function based on the arguments you give it. In this example, the value of @samp{sqrt(@var{argument})} is the square root of -@var{argument}. A function can also have side effects, such as assigning -values to certain variables or doing I/O. +@var{argument}. The following program reads numbers, one number per line, and prints the square root of each one: @@ -9063,6 +9176,34 @@ @kbd{@value{CTL}-d} @end example +A function can also have side effects, such as assigning +values to certain variables or doing I/O. +This program shows how the @samp{match} function +(@pxref{String Functions}) +changes the variables @code{RSTART} and @code{RLENGTH}: + +@example +@{ + if (match($1, $2)) + print RSTART, RLENGTH + else + print "no match" +@} +@end example + +@noindent +Here is a sample run: + +@example +$ awk -f matchit.awk +aaccdd c+ +@print{} 3 2 +foo bar +@print{} no match +abcdefg e +@print{} 5 1 +@end example + @node Precedence @section Operator Precedence (How Operators Nest) @c STARTOFRANGE prec @@ -9093,14 +9234,20 @@ Thus, @samp{a - b + c} groups as @samp{(a - b) + c} and @samp{a = b = c} groups as @samp{a = (b = c)}. -The precedence of prefix unary operators does not matter as long as only -unary operators are involved, because there is only one way to interpret +Normally the precedence of prefix unary operators does not matter, +because there is only one way to interpret them: innermost first. Thus, @samp{$++i} means @samp{$(++i)} and @samp{++$x} means @samp{++($x)}. However, when another operator follows the operand, then the precedence of the unary operators can matter. @samp{$x^2} means @samp{($x)^2}, but @samp{-x^2} means @samp{-(x^2)}, because @samp{-} has lower precedence than @samp{^}, whereas @samp{$} has higher precedence. +Also, operators cannot be combined in a way that violates the +precedence rules; for example, @samp{$$0++--} is not a valid +expression because the first @samp{$} has higher precedence than the +@samp{++}; to avoid the problem the expression can be rewritten as +@samp{$($0++)--}. + This table presents @command{awk}'s operators, in order of highest to lowest precedence: @@ -9144,7 +9291,7 @@ @cindex @code{%} (percent sign), @code{%} operator @cindex percent sign (@code{%}), @code{%} operator @item * / % -Multiplication, division, modulus. +Multiplication, division, remainder. @cindex @code{+} (plus sign), @code{+} operator @cindex plus sign (@code{+}), @code{+} operator @@ -11168,9 +11315,9 @@ verbose = 1 else if (ARGV[i] == "-d") debug = 1 - else if (ARGV[i] ~ /^-?/) @{ + else if (ARGV[i] ~ /^-./) @{ e = sprintf("%s: unrecognized option -- %c", - ARGV[0], substr(ARGV[i], 1, ,1)) + ARGV[0], substr(ARGV[i], 2, 1)) print e > "/dev/stderr" @} else break @@ -12699,7 +12846,7 @@ default is to use and alter @code{$0}.@footnote{Note that this means that the record will first be regenerated using the value of @code{OFS} if any fields have been changed, and that the fields will be updated -after the substituion, even if the operation is a ``no-op'' such +after the substitution, even if the operation is a ``no-op'' such as @samp{sub(/^/, "")}.} For example: @@ -13112,7 +13259,7 @@ @ref{table-sub-proposed}. @float Table,table-sub-proposed -@caption{Propsosed rules for sub and backslash} +@caption{Proposed rules for sub and backslash} @tex \vbox{\bigskip % This table has lots of &'s and \'s, so unspecialize them. @@ -13425,7 +13572,7 @@ @c fakenode --- for prepinfo @subheading Advanced Notes: Interactive Versus Noninteractive Buffering @cindex advanced features, buffering -@cindex buffering, interactive vs. noninteractive +@cindex buffering, interactive vs.@: noninteractive As a side point, buffering issues can be even more confusing, depending upon whether your program is @dfn{interactive}, i.e., communicating @@ -13598,12 +13745,15 @@ If @var{datespec} does not contain enough elements or if the resulting time is out of range, @code{mktime} returns @minus{}1. -@item strftime(@r{[}@var{format} @r{[}, @var{timestamp}@r{]]}) +@item strftime(@r{[}@var{format} @r{[}, @var{timestamp} @r{[}, @var{utc-flag}@r{]]]}) @c STARTOFRANGE strf @cindex @code{strftime} function (@command{gawk}) This function returns a string. It is similar to the function of the same name in ISO C. The time specified by @var{timestamp} is used to produce a string, based on the contents of the @var{format} string. +If @var{utc-flag} is present and is either non-zero or non-null, the value +is formatted as UTC (Coordinated Universal Time, formerly GMT or Greenwich +Mean Time). Otherwise, the value is formatted for the local time zone. The @var{timestamp} is in the same format as the value returned by the @code{systime} function. If no @var{timestamp} argument is supplied, @command{gawk} uses the current time of day as the timestamp. @@ -13805,8 +13955,9 @@ locale, which is an environment that is typical of what most C programmers are used to. -A public-domain C version of @code{strftime} is supplied with @command{gawk} -for systems that are not yet fully standards-compliant. +For systems that are not yet fully standards-compliant, +@command{gawk} supplies a copy of +@code{strftime} from the GNU C Library. It supports all of the just listed format specifications. If that version is used to compile @command{gawk} (@pxref{Installation}), @@ -13821,6 +13972,7 @@ The hour (12-hour clock) as a decimal number (1--12). Single-digit numbers are padded with a space. +@ignore @item %N The ``Emperor/Era'' name. Equivalent to @code{%C}. @@ -13828,12 +13980,15 @@ @item %o The ``Emperor/Era'' year. Equivalent to @code{%y}. +@end ignore @item %s The time as a decimal timestamp in seconds since the epoch. +@ignore @item %v The date in VMS format (e.g., @samp{20-JUN-1991}). +@end ignore @end table @c ENDOFRANGE strf @@ -15241,7 +15396,7 @@ at runtime, it cannot change the argument order in the call to @code{printf}. -To solve this problem, @code{printf} format specificiers may have +To solve this problem, @code{printf} format specifiers may have an additional optional element, which we call a @dfn{positional specifier}. For example: @@ -15281,7 +15436,7 @@ @quotation NOTE When using @samp{*} with a positional specifier, the @samp{*} comes first, then the integer position, and then the @samp{$}. -This is somewhat counterintutive. +This is somewhat counterintuitive. @end quotation @cindex @code{printf} statement, positional specifiers, mixing with regular formats @@ -16130,9 +16285,11 @@ the total by four. However, @samp{3 + 5 * 4} has no parentheses, and means @samp{3 + (5 * 4)}. +@ignore @item All string concatenations are parenthesized too. (This could be made a bit smarter.) +@end ignore @item Parentheses are used around the arguments to @code{print} @@ -16241,6 +16398,8 @@ @c ENDOFRANGE awkp @c ENDOFRANGE proawk + + @node Invoking Gawk @chapter Running @command{awk} and @command{gawk} @@ -16525,6 +16684,12 @@ With an optional argument of @samp{invalid}, only warnings about things that are actually invalid are issued. (This is not fully implemented yet.) +Some warnings are only printed once, even if the dubious constructs they warn +about occur multiple times in your @command{awk} program. Thus, when eliminating +problems pointed out by @option{--lint}, you should take care to search for all +occurrences of each inappropriate construct. As @command{awk} programs are +usually short, doing so is not burdensome. + @item -W lint-old @itemx --lint-old @cindex @code{--lint-old} option @@ -16596,6 +16761,12 @@ of @code{FS} to be a single TAB character (@pxref{Field Separators}). +@cindex locale decimal point character +@cindex decimal point character, locale specific +@item +The locale's decimal point character is used for parsing input +data (@pxref{Locales}). + @cindex @code{fflush} function@comma{} unsupported @item The @code{fflush} built-in function is not supported @@ -16647,6 +16818,12 @@ when you have library functions that you want to use from your command-line programs (@pxref{AWKPATH Variable}). +@item -W use-lc-numeric +@itemx --use-lc-numeric +@cindex @code{--use-lc-numeric} option +This option forces the use of the locale's decimal point character +when parsing numeric input data (@pxref{Locales}). + @item -W version @itemx --version @cindex @code{--version} option @@ -16700,8 +16877,8 @@ uses the first non-option command-line argument as the text of the program source code. -@cindex @code{POSIXLY_CORRECT} environment variable -@cindex lint checking, @code{POSIXLY_CORRECT} environment variable +@cindex @env{POSIXLY_CORRECT} environment variable +@cindex lint checking, @env{POSIXLY_CORRECT} environment variable @cindex POSIX mode If the environment variable @env{POSIXLY_CORRECT} exists, then @command{gawk} behaves in strict POSIX mode, exactly as if @@ -16720,7 +16897,7 @@ export POSIXLY_CORRECT @end example -@cindex @command{csh} utility, @code{POSIXLY_CORRECT} environment variable +@cindex @command{csh} utility, @env{POSIXLY_CORRECT} environment variable For a @command{csh}-compatible shell,@footnote{Not recommended.} you would add this line to the @file{.login} file in your home directory: @@ -16729,7 +16906,7 @@ setenv POSIXLY_CORRECT true @end example -@cindex portability, @code{POSIXLY_CORRECT} environment variable +@cindex portability, @env{POSIXLY_CORRECT} environment variable Having @env{POSIXLY_CORRECT} set is not recommended for daily use, but it is good for testing the portability of your programs to other environments. @@ -17302,7 +17479,7 @@ @cindex @code{nextfile} user-defined function This initial version has a subtle problem. -If the same @value{DF} is listed @emph{twice} on the commandline, +If the same @value{DF} is listed @emph{twice} on the command line, one right after the other or even with just a variable assignment between them, this code skips right through the file a second time, even though @@ -17318,7 +17495,7 @@ @ignore @c file eg/lib/nextfile.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # May, 1993 @c endfile @@ -17462,7 +17639,7 @@ the correct numeric value for each hexadecimal digit. Finally, if the string matches the (rather complicated) regex for a -regular decimal integer or floating-point numer, the computation +regular decimal integer or floating-point number, the computation @samp{ret = str + 0} lets @command{awk} convert the value to a number. @@ -17524,7 +17701,7 @@ @c file eg/lib/assert.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # May, 1993 @c endfile @@ -17631,7 +17808,7 @@ @ignore @c file eg/lib/round.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # August, 1996 @c endfile @@ -17661,10 +17838,11 @@ return ival @} @} +@c endfile +@c don't include test harness in the file that gets installed # test harness @{ print $0, round($0) @} -@c endfile @end example @node Cliff Random Function @@ -17675,7 +17853,7 @@ @cindex functions, library, Cliff random numbers The Cliff random number -generator@footnote{@uref{http://mathworld.wolfram.com/CliffRandomNumberGenerator.hmtl}} +generator@footnote{@uref{http://mathworld.wolfram.com/CliffRandomNumberGenerator.html}} is a very simple random number generator that ``passes the noise sphere test for randomness by showing no structure.'' It is easily programmed, in less than 10 lines of @command{awk} code: @@ -17688,7 +17866,7 @@ @ignore @c file eg/lib/cliff_rand.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # December 2000 @c endfile @@ -17742,7 +17920,7 @@ @ignore @c file eg/lib/ord.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # 16 January, 1992 # 20 July, 1992, revised @@ -17860,7 +18038,7 @@ @ignore @c file eg/lib/join.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # May 1993 @c endfile @@ -17918,7 +18096,7 @@ @ignore @c file eg/lib/gettime.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain, May 1993 +# Arnold Robbins, arnold@@skeeve.com, Public Domain, May 1993 # @c endfile @end ignore @@ -18044,7 +18222,7 @@ # that each take the name of the file being started or # finished, respectively. @c # -@c # Arnold Robbins, arnold@@gnu.org, Public Domain +@c # Arnold Robbins, arnold@@skeeve.com, Public Domain @c # January 1992 FILENAME != _oldfilename \ @@ -18097,7 +18275,7 @@ @ignore @c file eg/lib/ftrans.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # November 1992 @c endfile @@ -18141,7 +18319,7 @@ @ignore @c file eg/lib/rewind.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # September 2000 @c endfile @@ -18204,7 +18382,7 @@ @ignore @c file eg/lib/readable.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # October 2000 @c endfile @@ -18258,7 +18436,7 @@ @ignore @c file eg/lib/zerofile.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # June 2003 @c endfile @@ -18358,7 +18536,7 @@ @ignore @c file eg/lib/noassign.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # October 1999 @c endfile @@ -18533,7 +18711,7 @@ @ignore @c file eg/lib/getopt.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # # Initial version: March, 1991 # Revised: May, 1993 @@ -18739,6 +18917,15 @@ In both runs, the first @option{--} terminates the arguments to @command{awk}, so that it does not try to interpret the @option{-a}, etc., as its own options. + +@quotation NOTE +After @code{getopt} is through, it is the responsibility of the user level +code to +clear out all the elements of @code{ARGV} from 1 to @code{Optind}, +so that @command{awk} does not try to process the command-line options +as @value{FN}s. +@end quotation + Several of the sample programs presented in @ref{Sample Programs}, use @code{getopt} to process their arguments. @@ -18811,7 +18998,7 @@ @ignore @c file eg/lib/pwcat.c /* - * Arnold Robbins, arnold@@gnu.org, May 1993 + * Arnold Robbins, arnold@@skeeve.com, May 1993 * Public Domain */ @@ -18940,7 +19127,7 @@ @ignore @c file eg/lib/passwdawk.in # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # May 1993 # Revised October 2000 @@ -19161,7 +19348,7 @@ @ignore @c file eg/lib/grcat.c /* - * Arnold Robbins, arnold@@gnu.org, May 1993 + * Arnold Robbins, arnold@@skeeve.com, May 1993 * Public Domain */ @@ -19232,7 +19419,7 @@ we cast it to @code{long} for all cases.) @item Group Member List -A comma-separated list of usernames. These users are members of the group. +A comma-separated list of user names. These users are members of the group. Modern Unix systems allow users to be members of several groups simultaneously. If your system does, then there are elements @code{"group1"} through @code{"group@var{N}"} in @code{PROCINFO} @@ -19252,7 +19439,7 @@ The group's numeric group ID number; this number should be unique within the file. @item Group member list @tab -A comma-separated list of usernames. These users are members of the group. +A comma-separated list of user names. These users are members of the group. Modern Unix systems allow users to be members of several groups simultaneously. If your system does, then there are elements @code{"group1"} through @code{"group@var{N}"} in @code{PROCINFO} @@ -19286,7 +19473,7 @@ @ignore @c file eg/lib/groupawk.in # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # May 1993 # Revised October 2000 @@ -19362,7 +19549,7 @@ The group information is stored is several associative arrays. The arrays are indexed by group name (@code{@w{_gr_byname}}), by group ID number (@code{@w{_gr_bygid}}), and by position in the database (@code{@w{_gr_bycount}}). -There is an additional array indexed by username (@code{@w{_gr_groupsbyuser}}), +There is an additional array indexed by user name (@code{@w{_gr_groupsbyuser}}), which is a space-separated list of groups to which each user belongs. Unlike the user database, it is possible to have multiple records in the @@ -19375,7 +19562,7 @@ @end example For this reason, @code{_gr_init} looks to see if a group name or -group ID number is already seen. If it is, then the usernames are +group ID number is already seen. If it is, then the user names are simply concatenated onto the previous list of users. (There is actually a subtle problem with the code just presented. Suppose that the first time there were no names. This code adds the names with @@ -19423,7 +19610,7 @@ @cindex @code{getgruser} function (C library) The @code{getgruser} function does not have a C counterpart. It takes a -username and returns the list of groups that have the user as a member: +user name and returns the list of groups that have the user as a member: @cindex @code{getgruser} function, user-defined @example @@ -19645,7 +19832,7 @@ @ignore @c file eg/prog/cut.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # May 1993 @c endfile @@ -19735,7 +19922,9 @@ a single space (@code{@w{" "}}) for the value of @code{FS} is incorrect---@command{awk} would separate fields with runs of spaces, tabs, and/or newlines, and we want them to be separated with individual -spaces. Also, note that after @code{getopt} is through, we have to +spaces. Also remember that after @code{getopt} is through +(as described in @ref{Getopt Function}), +we have to clear out all the elements of @code{ARGV} from 1 to @code{Optind}, so that @command{awk} does not try to process the command-line options as @value{FN}s. @@ -19983,7 +20172,7 @@ @ignore @c file eg/prog/egrep.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # May 1993 @c endfile @@ -20252,7 +20441,7 @@ @ignore @c file eg/prog/id.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # May 1993 # Revised February 1996 @@ -20390,7 +20579,7 @@ @ignore @c file eg/prog/split.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # May 1993 @c endfile @@ -20532,7 +20721,7 @@ @ignore @c file eg/prog/tee.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # May 1993 # Revised December 1995 @@ -20697,7 +20886,7 @@ @ignore @c file eg/prog/uniq.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # May 1993 @c endfile @@ -20935,7 +21124,7 @@ @ignore @c file eg/prog/wc.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # May 1993 @c endfile @end ignore @@ -21126,7 +21315,7 @@ @ignore @c file eg/prog/dupword.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # December 1991 # Revised October 2000 @@ -21192,7 +21381,7 @@ @ignore @c file eg/prog/alarm.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # May 1993 @c endfile @@ -21391,7 +21580,7 @@ @ignore @c file eg/prog/translate.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # August 1989 @c endfile @@ -21523,7 +21712,7 @@ @ignore @c file eg/prog/labels.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # June 1992 @c endfile @end ignore @@ -21751,7 +21940,7 @@ @ignore @c file eg/prog/histsort.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # May 1993 @c endfile @@ -21901,7 +22090,7 @@ @ignore @c file eg/prog/extract.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # May 1993 # Revised September 2000 @@ -22087,7 +22276,7 @@ @ignore @c file eg/prog/awksed.awk # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # August 1995 @c endfile @@ -22318,7 +22507,7 @@ @ignore @c file eg/prog/igawk.sh # -# Arnold Robbins, arnold@@gnu.org, Public Domain +# Arnold Robbins, arnold@@skeeve.com, Public Domain # July 1993 @c endfile @@ -22330,7 +22519,7 @@ shift fi -# A literal newline, so that program text is formmatted correctly +# A literal newline, so that program text is formatted correctly n=' ' @@ -22769,10 +22958,17 @@ and @code{SUBSEP} built-in variables (@pxref{Built-in Variables}). @item +Assignable @code{$0}. + +@item The conditional expression using the ternary operator @samp{?:} (@pxref{Conditional Exp}). @item +The expression @samp{@var{index} in @var{array}} outside of @samp{for} +statements (@pxref{Reference to Elements}). + +@item The exponentiation operator @samp{^} (@pxref{Arithmetic Ops}) and its assignment operator form @samp{^=} (@pxref{Assignment Ops}). @@ -22785,7 +22981,8 @@ Regexps as the value of @code{FS} (@pxref{Field Separators}) and as the third argument to the @code{split} function -(@pxref{String Functions}). +(@pxref{String Functions}), rather than using only the first character +of @code{FS}. @item Dynamic regexps as operands of the @samp{~} and @samp{!~} operators @@ -22931,6 +23128,10 @@ (@pxref{Field Separators}). @item +The locale's decimal point character is used for parsing input +data (@pxref{Locales}). + +@item The @code{fflush} built-in function is not supported (@pxref{I/O Functions}). @end itemize @@ -23012,7 +23213,7 @@ @appendixsec Extensions in @command{gawk} Not in POSIX @command{awk} @ignore -I've tried to follow this general order, esp. for the 3.0 and 3.1 sections: +I've tried to follow this general order, esp.@: for the 3.0 and 3.1 sections: variables special files language changes (e.g., hex constants) @@ -23296,11 +23497,21 @@ (@pxref{Profiling}). @item +The @option{--use-lc-numeric} option to force @command{gawk} +to use the locale's decimal point for parsing input data +(@pxref{Conversion}). + +@item The @option{--enable-portals} configuration option to enable special treatment of pathnames that begin with @file{/p} as BSD portals (@pxref{Portal Files}). @item +The @option{--disable-directories-fatal} configuration option which +causes @command{gawk} to silently skip directories named on the +command line (@pxref{Additional Configuration Options}). + +@item The use of GNU Automake to help in standardizing the configuration process (@pxref{Quick Installation}). @@ -23334,7 +23545,7 @@ (@pxref{Gory Details}). @item -The @option{--exec} option, for use in CGI scripts. +The @option{--exec} option, for use in CGI scripts (@pxref{Options}). @item @@ -23342,6 +23553,11 @@ and return the number of elements in the array (@pxref{String Functions}). +@item +The @code{strftime} function acquired a third argument to +enable printing times as UTC +(@pxref{Time Functions}). + @end itemize @c XXX ADD MORE STUFF HERE @@ -23481,7 +23697,9 @@ @item @cindex Davies, Stephen Stephen Davies -provided the port to Tandem systems and its documentation. +provided the initial port to Tandem systems and its documentation. +Matthew Woehlke provided improvements for Tandem's POSIX-compliant +systems. @item @cindex Brown, Martin @@ -23498,7 +23716,8 @@ @cindex Broder, Alan J.@: Alan J.@: Broder provided the initial version of the @code{asort} function -as well as the code for the new optional third argument to the @code{match} function. +as well as the code for the new optional third argument to the +@code{match} function. @item @cindex Buening, Andreas @@ -23942,6 +24161,11 @@ Disable all message-translation facilities. This is usually not desirable, but it may bring you some slight performance improvement. + +@cindex @code{--disable-directories-fatal} configuration option +@cindex configuration option, @code{--disable-directories-fatal} +@item --disable-directories-fatal +Causes @command{gawk} to silently skip directories named on the command line. @end table As of version 3.1.5, the @option{--with-included-gettext} configuration @@ -24084,7 +24308,7 @@ If these steps do not work, please send in a bug report (@pxref{Bugs}). -@c Rewritten by Scott Deifik +@c Rewritten by Scott Deifik @c and Darrel Hankerson @node PC Installation @@ -24508,6 +24732,7 @@ * VMS Installation Details:: How to install @command{gawk} under VMS. * VMS Running:: How to run @command{gawk} under VMS. * VMS POSIX:: Alternate instructions for VMS POSIX. +* VMS Old Gawk:: An old version comes with some VMS systems. @end menu @node VMS Compilation @@ -24674,6 +24899,21 @@ the normal VMS port of @command{gawk}, no special command-line manipulation is needed in the VMS POSIX environment. +@node VMS Old Gawk +@appendixsubsubsec Some VMS Systems Have An Old Version of @command{gawk} + +@c Thanks to "gerard labadie" + +Some versions of VMS have an old version of @command{gawk}. To access it, +define a symbol, as follows: + +@example +$ @kbd{gawk :== $ sys$common:[syshlp.examples.tcpip.snmp]gawk.exe} +@end example + +This is apparently @value{PVERSION} 2.15.6, which is quite old. We +recommend compiling and using the current version. + @node Unsupported @appendixsec Unsupported Operating System Ports @@ -24891,7 +25131,7 @@ You can get this information with the command @samp{gawk --version}. Using this address automatically sends a carbon copy of your mail to me. If necessary, I can be reached directly at -@email{arnold@@gnu.org}. The bug reporting address is preferred since the +@email{arnold@@skeeve.com}. The bug reporting address is preferred since the email list is archived at the GNU Project. @emph{All email should be in English, since that is my native language.} @@ -24930,7 +25170,7 @@ @cindex Deifik, Scott @cindex Hankerson, Darrel @item MS-DOS -Scott Deifik, @email{scottd@@amgen.com} and +Scott Deifik, @email{scottd.mail@@sbcglobal.net} and Darrel Hankerson, @email{hankedr@@mail.auburn.edu}. @cindex Grigera, Juan @@ -24959,7 +25199,7 @@ @cindex Deifik, Scott @cindex Hankerson, Darrel -@item MS-DOS @tab Scott Deifik, @email{scottd@@amgen.com} and +@item MS-DOS @tab Scott Deifik, @email{scottd.mail@@sbcglobal.net} and Darrel Hankerson, @email{hankedr@@mail.auburn.edu}. @cindex Grigera, Juan @@ -24997,7 +25237,7 @@ Michael Brennan @end quotation -There are three other freely available @command{awk} implementations. +There are a number of other freely available @command{awk} implementations. This @value{SECTION} briefly describes where to get them: @table @asis @@ -25124,6 +25364,27 @@ or @uref{http://www.math.utah.edu/pub/pawk/pawk-20020210.tar.gz}. +@cindex OpenSolaris +@cindex Solaris, POSIX compliant @command{awk} +@item The OpenSolaris POSIX @command{awk} +The version of @command{awk} in @file{/usr/xpg4/bin} on Solaris is +POSIX compliant. It is based on the @command{awk} from Mortice Kern +Systems for PCs. The source code can be downloaded from +the OpenSolaris web site.@footnote{@uref{http://www.opensolaris.org}} +This author was able to make it compile and work under GNU/Linux +with 1--2 hours of work. Making it more generally portable (using +GNU Autoconf and/or Automake) would take more work, and this +has not been done, at least to our knowledge. + +@cindex @command{jawk} +@cindex Java implementation of @command{awk} +@item @command{jawk} +This is an interpreter for @command{awk} written in Java. It claims +to be a full interpreter, although because it uses Java facilities +for I/O and for regexp matching, the language it supports is different +from POSIX @command{awk}. More information is available on the +project's home page.@footnote{@uref{http://jawk.sourceforge.net}}. + @end table @c ENDOFRANGE gligawk @c ENDOFRANGE ingawk @@ -25406,9 +25667,10 @@ people at the Free Software Foundation. Thus, you should not change them unless it is for a very good reason; i.e., changes are not out of the question, but changes to these files are scrutinized extra carefully. -The files are @file{getopt.h}, @file{getopt.c}, -@file{getopt1.c}, @file{regex.h}, @file{regex.c}, @file{dfa.h}, -@file{dfa.c}, @file{install-sh}, and @file{mkinstalldirs}. +The files are @file{getopt.h}, @file{getopt.c}, @file{getopt1.c}, +@file{regex.h}, @file{regex.c}, @file{regcomp.c}, @file{regex_internal.c}, +@file{regex_internal.h}, @file{regexec.c}, @file{dfa.h}, @file{dfa.c}, +@file{install-sh}, and @file{mkinstalldirs}. @item Be willing to continue to maintain the port. @@ -25503,7 +25765,7 @@ @strong{Caution:} If you have written your own dynamic extensions, be sure to recompile them for each new @command{gawk} release. There is no guarantee of binary compatibility between different -releases, no will there ever be such a guarantee. +releases, nor will there ever be such a guarantee. @menu * Internals:: A brief look at some @command{gawk} internals. @@ -26822,6 +27084,16 @@ This is worth reading if you are interested in the details, but it does require a background in computer science. +@menu +* String Conversion Precision:: The String Value Can Lie. +* Unexpected Results:: Floating Point Numbers Are Not + Abstract Numbers. +* POSIX Floating Point Problems:: Standards Versus Existing Practice. +@end menu + +@node String Conversion Precision +@appendixsubsec The String Value Can Lie + Internally, @command{awk} keeps both the numeric value (double-precision floating-point) and the string value for a variable. Separately, @command{awk} keeps @@ -26875,6 +27147,9 @@ value exactly.@footnote{Pathological cases can require up to 752 digits (!), but we doubt that you need to worry about this.} +@node Unexpected Results +@appendixsubsec Floating Point Numbers Are Not Abstract Numbers + @cindex floating-point Unlike numbers in the abstract sense (such as what you studied in high school or college math), numbers stored in computers are limited in certain ways. @@ -26927,6 +27202,101 @@ It helps to keep this in mind should you process numeric data that contains negative zero values; the fact that the zero is negative is noted and can affect comparisons. + +@node POSIX Floating Point Problems +@appendixsubsec Standards Versus Existing Practice + +Historically, @command{awk} has converted any non-numeric looking string +to the numeric value zero, when required. Furthermore, the original +definition of the language and the original POSIX standards specified that +@command{awk} only understands decimal numbers (base 10), and not octal +(base 8) or hexadecimal numbers (base 16). + +As of this writing (February, 2007), changes in the language of the +current POSIX standard can be interpreted to imply that @command{awk} +should support additional features. These features are: + +@itemize @bullet +@item +Interpretation of floating point data values specified in hexadecimal +notation (@samp{0xDEADBEEF}). (Note: data values, @emph{not} +source code constants.) + +@item +Support for the special IEEE 754 floating point values ``Not A Number'' +(NaN), positive Infinity (``inf'') and negative Infinity (``@minus{}inf''). +In particular, the format for these values is as specified by the ISO C99 +standard, which ignores case and can allow machine-dependent additional +characters after the @samp{nan} and allow either @samp{inf} or @samp{infinity}. +@end itemize + +The first problem is that both of these are clear changes to historical +practice: + +@itemize @bullet +@item +The @command{gawk} maintainer feels that hexadecimal floating +point values, in particular, is ugly, and was never intended by the +original designers to be part of the language. + +@item +Allowing completely alphabetic strings to have valid numeric +values is also a very severe departure from historical practice. +@end itemize + +The second problem is that the @code{gawk} maintainer feels that this +interpretation of the standard, which requires a certain amount of +``language lawyering'' to arrive at in the first place, was not intended +by the standard developers, either. In other words, ``we see how you +got where you are, but we don't think that that's where you want to be.'' + +Nevertheless, on systems that support IEEE floating point, it seems +reasonable to provide @emph{some} way to support NaN and Infinity values. +The solution implemented in @command{gawk}, as of version 3.1.6, is +as follows: + +@enumerate 1 +@item +With the @option{--posix} command-line option, @command{gawk} becomes +``hands off.'' String values are passed directly to the system library's +@code{strtod()} function, and if it successfuly returns a numeric value, +that is what's used. By definition, the results are not portable across +different systems.@footnote{You asked for it, you got it.} +They are also a little surprising: + +@example +$ @kbd{echo nanny | gawk --posix '@{ print $1 + 0 @}'} +@print{} nan +$ @kbd{echo 0xDeadBeef | gawk --posix '@{ print $1 + 0 @}'} +@print{} 3735928559 +@end example + +@item +Without @option{--posix}, @command{gawk} interprets the four strings +@samp{+inf}, +@samp{-inf}, +@samp{+nan}, +and +@samp{-nan} +specially, producing the corresponding special numeric values. +The leading sign acts a signal to @command{gawk} (and the user) +that the value is really numeric. Hexadecimal floating point is +not supported (unless you also use @option{--non-decimal-data}, +which is @emph{not} recommended). For example: + +@example +$ @kbd{echo nanny | gawk '@{ print $1 + 0 @}'} +@print{} 0 +$ @kbd{echo +nan | gawk '@{ print $1 + 0 @}'} +@print{} nan +$ @kbd{echo 0xDeadBeef | gawk '@{ print $1 + 0 @}'} +@print{} 0 +@end example + +@command{gawk} does ignore case distinction in the four special values. +Thus @samp{+nan} and @samp{+NaN} are the same. +@end enumerate + @c ENDOFRANGE procon @node Glossary @@ -27380,6 +27750,13 @@ @code{func}, and @code{exit}. +If @command{gawk} was configured with the @option{--enable-switch} +option (@pxref{Switch Statement}), then +@code{switch}, +@code{case}, +and +@code{default} +are also keywords. @cindex LGPL (Lesser General Public License) @cindex Lesser General Public License (LGPL) @@ -27619,406 +27996,729 @@ record or a string. @end table +@c The GNU General Public License. @node Copying @unnumbered GNU General Public License -@center Version 2, June 1991 +@center Version 3, 29 June 2007 + +@c This file is intended to be included within another document, +@c hence no sectioning command or @node. @display -Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc. -51 Franklin Street, Fifth Floor, Boston, MA 02111, USA +Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{http://fsf.org/} -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. @end display @c fakenode --- for prepinfo -@unnumberedsec Preamble +@heading Preamble + +The GNU General Public License is a free, copyleft license for +software and other kinds of works. - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software---to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. +The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom +to share and change all versions of a program---to make sure it remains +free software for all its users. We, the Free Software Foundation, +use the GNU General Public License for most of our software; it +applies also to any other work released this way by its authors. You +can apply it to your programs, too. - When we speak of free software, we are referring to freedom, not +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + +To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you +have certain responsibilities if you distribute copies of the +software, or if you modify it: responsibilities to respect the freedom +of others. + +For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, +receive or can get the source code. And you must show them these +terms so they know their rights. + +Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + +For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will