uclibc-git-20140626.patch 4.6 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948519495195051951519525195351954519555195651957519585195951960519615196251963519645196551966519675196851969519705197151972519735197451975519765197751978519795198051981519825198351984519855198651987519885198951990519915199251993519945199551996519975199851999520005200152002520035200452005520065200752008520095201052011520125201352014520155201652017520185201952020520215202252023520245202552026520275202852029520305203152032520335203452035520365203752038520395204052041520425204352044520455204652047520485204952050520515205252053520545205552056520575205852059520605206152062520635206452065520665206752068520695207052071520725207352074520755207652077520785207952080520815208252083520845208552086520875208852089520905209152092520935209452095520965209752098520995210052101521025210352104521055210652107521085210952110521115211252113521145211552116521175211852119521205212152122521235212452125521265212752128521295213052131521325213352134521355213652137521385213952140521415214252143521445214552146521475214852149521505215152152521535215452155521565215752158521595216052161521625216352164521655216652167521685216952170521715217252173521745217552176521775217852179521805218152182521835218452185521865218752188521895219052191521925219352194521955219652197521985219952200522015220252203522045220552206522075220852209522105221152212522135221452215522165221752218522195222052221522225222352224522255222652227522285222952230522315223252233522345223552236522375223852239522405224152242522435224452245522465224752248522495225052251522525225352254522555225652257522585225952260522615226252263522645226552266522675226852269522705227152272522735227452275522765227752278522795228052281522825228352284522855228652287522885228952290522915229252293522945229552296522975229852299523005230152302523035230452305523065230752308523095231052311523125231352314523155231652317523185231952320523215232252323523245232552326523275232852329523305233152332523335233452335523365233752338523395234052341523425234352344523455234652347523485234952350523515235252353523545235552356523575235852359523605236152362523635236452365523665236752368523695237052371523725237352374523755237652377523785237952380523815238252383523845238552386523875238852389523905239152392523935239452395523965239752398523995240052401524025240352404524055240652407524085240952410524115241252413524145241552416524175241852419524205242152422524235242452425524265242752428524295243052431524325243352434524355243652437524385243952440524415244252443524445244552446524475244852449524505245152452524535245452455524565245752458524595246052461524625246352464524655246652467524685246952470524715247252473524745247552476524775247852479524805248152482524835248452485524865248752488524895249052491524925249352494524955249652497524985249952500525015250252503525045250552506525075250852509525105251152512525135251452515525165251752518525195252052521525225252352524525255252652527525285252952530525315253252533525345253552536525375253852539525405254152542525435254452545525465254752548525495255052551525525255352554525555255652557525585255952560525615256252563525645256552566525675256852569525705257152572525735257452575525765257752578525795258052581525825258352584525855258652587525885258952590525915259252593525945259552596525975259852599526005260152602526035260452605526065260752608526095261052611526125261352614526155261652617526185261952620526215262252623526245262552626526275262852629526305263152632526335263452635526365263752638526395264052641526425264352644526455264652647526485264952650526515265252653526545265552656526575265852659526605266152662526635266452665526665266752668526695267052671526725267352674526755267652677526785267952680526815268252683526845268552686526875268852689526905269152692526935269452695526965269752698526995270052701527025270352704527055270652707527085270952710527115271252713527145271552716527175271852719527205272152722527235272452725527265272752728527295273052731527325273352734527355273652737527385273952740527415274252743527445274552746527475274852749527505275152752527535275452755527565275752758527595276052761527625276352764527655276652767527685276952770527715277252773527745277552776527775277852779527805278152782527835278452785527865278752788527895279052791527925279352794527955279652797527985279952800528015280252803528045280552806528075280852809528105281152812528135281452815528165281752818528195282052821528225282352824528255282652827528285282952830528315283252833528345283552836528375283852839528405284152842528435284452845528465284752848528495285052851528525285352854528555285652857528585285952860528615286252863528645286552866528675286852869528705287152872528735287452875528765287752878528795288052881528825288352884528855288652887528885288952890528915289252893528945289552896528975289852899529005290152902529035290452905529065290752908529095291052911529125291352914529155291652917529185291952920529215292252923529245292552926529275292852929529305293152932529335293452935529365293752938529395294052941529425294352944529455294652947529485294952950529515295252953529545295552956529575295852959529605296152962529635296452965529665296752968529695297052971529725297352974529755297652977529785297952980529815298252983529845298552986529875298852989529905299152992529935299452995529965299752998529995300053001530025300353004530055300653007530085300953010530115301253013530145301553016530175301853019530205302153022530235302453025530265302753028530295303053031530325303353034530355303653037530385303953040530415304253043530445304553046530475304853049530505305153052530535305453055530565305753058530595306053061530625306353064530655306653067530685306953070530715307253073530745307553076530775307853079530805308153082530835308453085530865308753088530895309053091530925309353094530955309653097530985309953100531015310253103531045310553106531075310853109531105311153112531135311453115531165311753118531195312053121531225312353124531255312653127531285312953130531315313253133531345313553136531375313853139531405314153142531435314453145531465314753148531495315053151531525315353154531555315653157531585315953160531615316253163531645316553166531675316853169531705317153172531735317453175531765317753178531795318053181531825318353184531855318653187531885318953190531915319253193531945319553196531975319853199532005320153202532035320453205532065320753208532095321053211532125321353214532155321653217532185321953220532215322253223532245322553226532275322853229532305323153232532335323453235532365323753238532395324053241532425324353244532455324653247532485324953250532515325253253532545325553256532575325853259532605326153262532635326453265532665326753268532695327053271532725327353274532755327653277532785327953280532815328253283532845328553286532875328853289532905329153292532935329453295532965329753298532995330053301533025330353304533055330653307533085330953310533115331253313533145331553316533175331853319533205332153322533235332453325533265332753328533295333053331533325333353334533355333653337533385333953340533415334253343533445334553346533475334853349533505335153352533535335453355533565335753358533595336053361533625336353364533655336653367533685336953370533715337253373533745337553376533775337853379533805338153382533835338453385533865338753388533895339053391533925339353394533955339653397533985339953400534015340253403534045340553406534075340853409534105341153412534135341453415534165341753418534195342053421534225342353424534255342653427534285342953430534315343253433534345343553436534375343853439534405344153442534435344453445534465344753448534495345053451534525345353454534555345653457534585345953460534615346253463534645346553466534675346853469534705347153472534735347453475534765347753478534795348053481534825348353484534855348653487534885348953490534915349253493534945349553496534975349853499535005350153502535035350453505535065350753508535095351053511535125351353514535155351653517535185351953520535215352253523535245352553526535275352853529535305353153532535335353453535535365353753538535395354053541535425354353544535455354653547535485354953550535515355253553535545355553556535575355853559535605356153562535635356453565535665356753568535695357053571535725357353574535755357653577535785357953580535815358253583535845358553586535875358853589535905359153592535935359453595535965359753598535995360053601536025360353604536055360653607536085360953610536115361253613536145361553616536175361853619536205362153622536235362453625536265362753628536295363053631536325363353634536355363653637536385363953640536415364253643536445364553646536475364853649536505365153652536535365453655536565365753658536595366053661536625366353664536655366653667536685366953670536715367253673536745367553676536775367853679536805368153682536835368453685536865368753688536895369053691536925369353694536955369653697536985369953700537015370253703537045370553706537075370853709537105371153712537135371453715537165371753718537195372053721537225372353724537255372653727537285372953730537315373253733537345373553736537375373853739537405374153742537435374453745537465374753748537495375053751537525375353754537555375653757537585375953760537615376253763537645376553766537675376853769537705377153772537735377453775537765377753778537795378053781537825378353784537855378653787537885378953790537915379253793537945379553796537975379853799538005380153802538035380453805538065380753808538095381053811538125381353814538155381653817538185381953820538215382253823538245382553826538275382853829538305383153832538335383453835538365383753838538395384053841538425384353844538455384653847538485384953850538515385253853538545385553856538575385853859538605386153862538635386453865538665386753868538695387053871538725387353874538755387653877538785387953880538815388253883538845388553886538875388853889538905389153892538935389453895538965389753898538995390053901539025390353904539055390653907539085390953910539115391253913539145391553916539175391853919539205392153922539235392453925539265392753928539295393053931539325393353934539355393653937539385393953940539415394253943539445394553946539475394853949539505395153952539535395453955539565395753958539595396053961539625396353964539655396653967539685396953970539715397253973539745397553976539775397853979539805398153982539835398453985539865398753988539895399053991539925399353994539955399653997539985399954000540015400254003540045400554006540075400854009540105401154012540135401454015540165401754018540195402054021540225402354024540255402654027540285402954030540315403254033540345403554036540375403854039540405404154042540435404454045540465404754048540495405054051540525405354054540555405654057540585405954060540615406254063540645406554066540675406854069540705407154072540735407454075540765407754078540795408054081540825408354084540855408654087540885408954090540915409254093540945409554096540975409854099541005410154102541035410454105541065410754108541095411054111541125411354114541155411654117541185411954120541215412254123541245412554126541275412854129541305413154132541335413454135541365413754138541395414054141541425414354144541455414654147541485414954150541515415254153541545415554156541575415854159541605416154162541635416454165541665416754168541695417054171541725417354174541755417654177541785417954180541815418254183541845418554186541875418854189541905419154192541935419454195541965419754198541995420054201542025420354204542055420654207542085420954210542115421254213542145421554216542175421854219542205422154222542235422454225542265422754228542295423054231542325423354234542355423654237542385423954240542415424254243542445424554246542475424854249542505425154252542535425454255542565425754258542595426054261542625426354264542655426654267542685426954270542715427254273542745427554276542775427854279542805428154282542835428454285542865428754288542895429054291542925429354294542955429654297542985429954300543015430254303543045430554306543075430854309543105431154312543135431454315543165431754318543195432054321543225432354324543255432654327543285432954330543315433254333543345433554336543375433854339543405434154342543435434454345543465434754348543495435054351543525435354354543555435654357543585435954360543615436254363543645436554366543675436854369543705437154372543735437454375543765437754378543795438054381543825438354384543855438654387543885438954390543915439254393543945439554396543975439854399544005440154402544035440454405544065440754408544095441054411544125441354414544155441654417544185441954420544215442254423544245442554426544275442854429544305443154432544335443454435544365443754438544395444054441544425444354444544455444654447544485444954450544515445254453544545445554456544575445854459544605446154462544635446454465544665446754468544695447054471544725447354474544755447654477544785447954480544815448254483544845448554486544875448854489544905449154492544935449454495544965449754498544995450054501545025450354504545055450654507545085450954510545115451254513545145451554516545175451854519545205452154522545235452454525545265452754528545295453054531545325453354534545355453654537545385453954540545415454254543545445454554546545475454854549545505455154552545535455454555545565455754558545595456054561545625456354564545655456654567545685456954570545715457254573545745457554576545775457854579545805458154582545835458454585545865458754588545895459054591545925459354594545955459654597545985459954600546015460254603546045460554606546075460854609546105461154612546135461454615546165461754618546195462054621546225462354624546255462654627546285462954630546315463254633546345463554636546375463854639546405464154642546435464454645546465464754648546495465054651546525465354654546555465654657546585465954660546615466254663546645466554666546675466854669546705467154672546735467454675546765467754678546795468054681546825468354684546855468654687546885468954690546915469254693546945469554696546975469854699547005470154702547035470454705547065470754708547095471054711547125471354714547155471654717547185471954720547215472254723547245472554726547275472854729547305473154732547335473454735547365473754738547395474054741547425474354744547455474654747547485474954750547515475254753547545475554756547575475854759547605476154762547635476454765547665476754768547695477054771547725477354774547755477654777547785477954780547815478254783547845478554786547875478854789547905479154792547935479454795547965479754798547995480054801548025480354804548055480654807548085480954810548115481254813548145481554816548175481854819548205482154822548235482454825548265482754828548295483054831548325483354834548355483654837548385483954840548415484254843548445484554846548475484854849548505485154852548535485454855548565485754858548595486054861548625486354864548655486654867548685486954870548715487254873548745487554876548775487854879548805488154882548835488454885548865488754888548895489054891548925489354894548955489654897548985489954900549015490254903549045490554906549075490854909549105491154912549135491454915549165491754918549195492054921549225492354924549255492654927549285492954930549315493254933549345493554936549375493854939549405494154942549435494454945549465494754948549495495054951549525495354954549555495654957549585495954960549615496254963549645496554966549675496854969549705497154972549735497454975549765497754978549795498054981549825498354984549855498654987549885498954990549915499254993549945499554996549975499854999550005500155002550035500455005550065500755008550095501055011550125501355014550155501655017550185501955020550215502255023550245502555026550275502855029550305503155032550335503455035550365503755038550395504055041550425504355044550455504655047550485504955050550515505255053550545505555056550575505855059550605506155062550635506455065550665506755068550695507055071550725507355074550755507655077550785507955080550815508255083550845508555086550875508855089550905509155092550935509455095550965509755098550995510055101551025510355104551055510655107551085510955110551115511255113551145511555116551175511855119551205512155122551235512455125551265512755128551295513055131551325513355134551355513655137551385513955140551415514255143551445514555146551475514855149551505515155152551535515455155551565515755158551595516055161551625516355164551655516655167551685516955170551715517255173551745517555176551775517855179551805518155182551835518455185551865518755188551895519055191551925519355194551955519655197551985519955200552015520255203552045520555206552075520855209552105521155212552135521455215552165521755218552195522055221552225522355224552255522655227552285522955230552315523255233552345523555236552375523855239552405524155242552435524455245552465524755248552495525055251552525525355254552555525655257552585525955260552615526255263552645526555266552675526855269552705527155272552735527455275552765527755278552795528055281552825528355284552855528655287552885528955290552915529255293552945529555296552975529855299553005530155302553035530455305553065530755308553095531055311553125531355314553155531655317553185531955320553215532255323553245532555326553275532855329553305533155332553335533455335553365533755338553395534055341553425534355344553455534655347553485534955350553515535255353553545535555356553575535855359553605536155362553635536455365553665536755368553695537055371553725537355374553755537655377553785537955380553815538255383553845538555386553875538855389553905539155392553935539455395553965539755398553995540055401554025540355404554055540655407554085540955410554115541255413554145541555416554175541855419554205542155422554235542455425554265542755428554295543055431554325543355434554355543655437554385543955440554415544255443554445544555446554475544855449554505545155452554535545455455554565545755458554595546055461554625546355464554655546655467554685546955470554715547255473554745547555476554775547855479554805548155482554835548455485554865548755488554895549055491554925549355494554955549655497554985549955500555015550255503555045550555506555075550855509555105551155512555135551455515555165551755518555195552055521555225552355524555255552655527555285552955530555315553255533555345553555536555375553855539555405554155542555435554455545555465554755548555495555055551555525555355554555555555655557555585555955560555615556255563555645556555566555675556855569555705557155572555735557455575555765557755578555795558055581555825558355584555855558655587555885558955590555915559255593555945559555596555975559855599556005560155602556035560455605556065560755608556095561055611556125561355614556155561655617556185561955620556215562255623556245562555626556275562855629556305563155632556335563455635556365563755638556395564055641556425564355644556455564655647556485564955650556515565255653556545565555656556575565855659556605566155662556635566455665556665566755668556695567055671556725567355674556755567655677556785567955680556815568255683556845568555686556875568855689556905569155692556935569455695556965569755698556995570055701557025570355704557055570655707557085570955710557115571255713557145571555716557175571855719557205572155722557235572455725557265572755728557295573055731557325573355734557355573655737557385573955740557415574255743557445574555746557475574855749557505575155752557535575455755557565575755758557595576055761557625576355764557655576655767557685576955770557715577255773557745577555776557775577855779557805578155782557835578455785557865578755788557895579055791557925579355794557955579655797557985579955800558015580255803558045580555806558075580855809558105581155812558135581455815558165581755818558195582055821558225582355824558255582655827558285582955830558315583255833558345583555836558375583855839558405584155842558435584455845558465584755848558495585055851558525585355854558555585655857558585585955860558615586255863558645586555866558675586855869558705587155872558735587455875558765587755878558795588055881558825588355884558855588655887558885588955890558915589255893558945589555896558975589855899559005590155902559035590455905559065590755908559095591055911559125591355914559155591655917559185591955920559215592255923559245592555926559275592855929559305593155932559335593455935559365593755938559395594055941559425594355944559455594655947559485594955950559515595255953559545595555956559575595855959559605596155962559635596455965559665596755968559695597055971559725597355974559755597655977559785597955980559815598255983559845598555986559875598855989559905599155992559935599455995559965599755998559995600056001560025600356004560055600656007560085600956010560115601256013560145601556016560175601856019560205602156022560235602456025560265602756028560295603056031560325603356034560355603656037560385603956040560415604256043560445604556046560475604856049560505605156052560535605456055560565605756058560595606056061560625606356064560655606656067560685606956070560715607256073560745607556076560775607856079560805608156082560835608456085560865608756088560895609056091560925609356094560955609656097560985609956100561015610256103561045610556106561075610856109561105611156112561135611456115561165611756118561195612056121561225612356124561255612656127561285612956130561315613256133561345613556136561375613856139561405614156142561435614456145561465614756148561495615056151561525615356154561555615656157561585615956160561615616256163561645616556166561675616856169561705617156172561735617456175561765617756178561795618056181561825618356184561855618656187561885618956190561915619256193561945619556196561975619856199562005620156202562035620456205562065620756208562095621056211562125621356214562155621656217562185621956220562215622256223562245622556226562275622856229562305623156232562335623456235562365623756238562395624056241562425624356244562455624656247562485624956250562515625256253562545625556256562575625856259562605626156262562635626456265562665626756268562695627056271562725627356274562755627656277562785627956280562815628256283562845628556286562875628856289562905629156292562935629456295562965629756298562995630056301563025630356304563055630656307563085630956310563115631256313563145631556316563175631856319563205632156322563235632456325563265632756328563295633056331563325633356334563355633656337563385633956340563415634256343563445634556346563475634856349563505635156352563535635456355563565635756358563595636056361563625636356364563655636656367563685636956370563715637256373563745637556376563775637856379563805638156382563835638456385563865638756388563895639056391563925639356394563955639656397563985639956400564015640256403564045640556406564075640856409564105641156412564135641456415564165641756418564195642056421564225642356424564255642656427564285642956430564315643256433564345643556436564375643856439564405644156442564435644456445564465644756448564495645056451564525645356454564555645656457564585645956460564615646256463564645646556466564675646856469564705647156472564735647456475564765647756478564795648056481564825648356484564855648656487564885648956490564915649256493564945649556496564975649856499565005650156502565035650456505565065650756508565095651056511565125651356514565155651656517565185651956520565215652256523565245652556526565275652856529565305653156532565335653456535565365653756538565395654056541565425654356544565455654656547565485654956550565515655256553565545655556556565575655856559565605656156562565635656456565565665656756568565695657056571565725657356574565755657656577565785657956580565815658256583565845658556586565875658856589565905659156592565935659456595565965659756598565995660056601566025660356604566055660656607566085660956610566115661256613566145661556616566175661856619566205662156622566235662456625566265662756628566295663056631566325663356634566355663656637566385663956640566415664256643566445664556646566475664856649566505665156652566535665456655566565665756658566595666056661566625666356664566655666656667566685666956670566715667256673566745667556676566775667856679566805668156682566835668456685566865668756688566895669056691566925669356694566955669656697566985669956700567015670256703567045670556706567075670856709567105671156712567135671456715567165671756718567195672056721567225672356724567255672656727567285672956730567315673256733567345673556736567375673856739567405674156742567435674456745567465674756748567495675056751567525675356754567555675656757567585675956760567615676256763567645676556766567675676856769567705677156772567735677456775567765677756778567795678056781567825678356784567855678656787567885678956790567915679256793567945679556796567975679856799568005680156802568035680456805568065680756808568095681056811568125681356814568155681656817568185681956820568215682256823568245682556826568275682856829568305683156832568335683456835568365683756838568395684056841568425684356844568455684656847568485684956850568515685256853568545685556856568575685856859568605686156862568635686456865568665686756868568695687056871568725687356874568755687656877568785687956880568815688256883568845688556886568875688856889568905689156892568935689456895568965689756898568995690056901569025690356904569055690656907569085690956910569115691256913569145691556916569175691856919569205692156922569235692456925569265692756928569295693056931569325693356934569355693656937569385693956940569415694256943569445694556946569475694856949569505695156952569535695456955569565695756958569595696056961569625696356964569655696656967569685696956970569715697256973569745697556976569775697856979569805698156982569835698456985569865698756988569895699056991569925699356994569955699656997569985699957000570015700257003570045700557006570075700857009570105701157012570135701457015570165701757018570195702057021570225702357024570255702657027570285702957030570315703257033570345703557036570375703857039570405704157042570435704457045570465704757048570495705057051570525705357054570555705657057570585705957060570615706257063570645706557066570675706857069570705707157072570735707457075570765707757078570795708057081570825708357084570855708657087570885708957090570915709257093570945709557096570975709857099571005710157102571035710457105571065710757108571095711057111571125711357114571155711657117571185711957120571215712257123571245712557126571275712857129571305713157132571335713457135571365713757138571395714057141571425714357144571455714657147571485714957150571515715257153571545715557156571575715857159571605716157162571635716457165571665716757168571695717057171571725717357174571755717657177571785717957180571815718257183571845718557186571875718857189571905719157192571935719457195571965719757198571995720057201572025720357204572055720657207572085720957210572115721257213572145721557216572175721857219572205722157222572235722457225572265722757228572295723057231572325723357234572355723657237572385723957240572415724257243572445724557246572475724857249572505725157252572535725457255572565725757258572595726057261572625726357264572655726657267572685726957270572715727257273572745727557276572775727857279572805728157282572835728457285572865728757288572895729057291572925729357294572955729657297572985729957300573015730257303573045730557306573075730857309573105731157312573135731457315573165731757318573195732057321573225732357324573255732657327573285732957330573315733257333573345733557336573375733857339573405734157342573435734457345573465734757348573495735057351573525735357354573555735657357573585735957360573615736257363573645736557366573675736857369573705737157372573735737457375573765737757378573795738057381573825738357384573855738657387573885738957390573915739257393573945739557396573975739857399574005740157402574035740457405574065740757408574095741057411574125741357414574155741657417574185741957420574215742257423574245742557426574275742857429574305743157432574335743457435574365743757438574395744057441574425744357444574455744657447574485744957450574515745257453574545745557456574575745857459574605746157462574635746457465574665746757468574695747057471574725747357474574755747657477574785747957480574815748257483574845748557486574875748857489574905749157492574935749457495574965749757498574995750057501575025750357504575055750657507575085750957510575115751257513575145751557516575175751857519575205752157522575235752457525575265752757528575295753057531575325753357534575355753657537575385753957540575415754257543575445754557546575475754857549575505755157552575535755457555575565755757558575595756057561575625756357564575655756657567575685756957570575715757257573575745757557576575775757857579575805758157582575835758457585575865758757588575895759057591575925759357594575955759657597575985759957600576015760257603576045760557606576075760857609576105761157612576135761457615576165761757618576195762057621576225762357624576255762657627576285762957630576315763257633576345763557636576375763857639576405764157642576435764457645576465764757648576495765057651576525765357654576555765657657576585765957660576615766257663576645766557666576675766857669576705767157672576735767457675576765767757678576795768057681576825768357684576855768657687576885768957690576915769257693576945769557696576975769857699577005770157702577035770457705577065770757708577095771057711577125771357714577155771657717577185771957720577215772257723577245772557726577275772857729577305773157732577335773457735577365773757738577395774057741577425774357744577455774657747577485774957750577515775257753577545775557756577575775857759577605776157762577635776457765577665776757768577695777057771577725777357774577755777657777577785777957780577815778257783577845778557786577875778857789577905779157792577935779457795577965779757798577995780057801578025780357804578055780657807578085780957810578115781257813578145781557816578175781857819578205782157822578235782457825578265782757828578295783057831578325783357834578355783657837578385783957840578415784257843578445784557846578475784857849578505785157852578535785457855578565785757858578595786057861578625786357864578655786657867578685786957870578715787257873578745787557876578775787857879578805788157882578835788457885578865788757888578895789057891578925789357894578955789657897578985789957900579015790257903579045790557906579075790857909579105791157912579135791457915579165791757918579195792057921579225792357924579255792657927579285792957930579315793257933579345793557936579375793857939579405794157942579435794457945579465794757948579495795057951579525795357954579555795657957579585795957960579615796257963579645796557966579675796857969579705797157972579735797457975579765797757978579795798057981579825798357984579855798657987579885798957990579915799257993579945799557996579975799857999580005800158002580035800458005580065800758008580095801058011580125801358014580155801658017580185801958020580215802258023580245802558026580275802858029580305803158032580335803458035580365803758038580395804058041580425804358044580455804658047580485804958050580515805258053580545805558056580575805858059580605806158062580635806458065580665806758068580695807058071580725807358074580755807658077580785807958080580815808258083580845808558086580875808858089580905809158092580935809458095580965809758098580995810058101581025810358104581055810658107581085810958110581115811258113581145811558116581175811858119581205812158122581235812458125581265812758128581295813058131581325813358134581355813658137581385813958140581415814258143581445814558146581475814858149581505815158152581535815458155581565815758158581595816058161581625816358164581655816658167581685816958170581715817258173581745817558176581775817858179581805818158182581835818458185581865818758188581895819058191581925819358194581955819658197581985819958200582015820258203582045820558206582075820858209582105821158212582135821458215582165821758218582195822058221582225822358224582255822658227582285822958230582315823258233582345823558236582375823858239582405824158242582435824458245582465824758248582495825058251582525825358254582555825658257582585825958260582615826258263582645826558266582675826858269582705827158272582735827458275582765827758278582795828058281582825828358284582855828658287582885828958290582915829258293582945829558296582975829858299583005830158302583035830458305583065830758308583095831058311583125831358314583155831658317583185831958320583215832258323583245832558326583275832858329583305833158332583335833458335583365833758338583395834058341583425834358344583455834658347583485834958350583515835258353583545835558356583575835858359583605836158362583635836458365583665836758368583695837058371583725837358374583755837658377583785837958380583815838258383583845838558386583875838858389583905839158392583935839458395583965839758398583995840058401584025840358404584055840658407584085840958410584115841258413584145841558416584175841858419584205842158422584235842458425584265842758428584295843058431584325843358434584355843658437584385843958440584415844258443584445844558446584475844858449584505845158452584535845458455584565845758458584595846058461584625846358464584655846658467584685846958470584715847258473584745847558476584775847858479584805848158482584835848458485584865848758488584895849058491584925849358494584955849658497584985849958500585015850258503585045850558506585075850858509585105851158512585135851458515585165851758518585195852058521585225852358524585255852658527585285852958530585315853258533585345853558536585375853858539585405854158542585435854458545585465854758548585495855058551585525855358554585555855658557585585855958560585615856258563585645856558566585675856858569585705857158572585735857458575585765857758578585795858058581585825858358584585855858658587585885858958590585915859258593585945859558596585975859858599586005860158602586035860458605586065860758608586095861058611586125861358614586155861658617586185861958620586215862258623586245862558626586275862858629586305863158632586335863458635586365863758638586395864058641586425864358644586455864658647586485864958650586515865258653586545865558656586575865858659586605866158662586635866458665586665866758668586695867058671586725867358674586755867658677586785867958680586815868258683586845868558686586875868858689586905869158692586935869458695586965869758698586995870058701587025870358704587055870658707587085870958710587115871258713587145871558716587175871858719587205872158722587235872458725587265872758728587295873058731587325873358734587355873658737587385873958740587415874258743587445874558746587475874858749587505875158752587535875458755587565875758758587595876058761587625876358764587655876658767587685876958770587715877258773587745877558776587775877858779587805878158782587835878458785587865878758788587895879058791587925879358794587955879658797587985879958800588015880258803588045880558806588075880858809588105881158812588135881458815588165881758818588195882058821588225882358824588255882658827588285882958830588315883258833588345883558836588375883858839588405884158842588435884458845588465884758848588495885058851588525885358854588555885658857588585885958860588615886258863588645886558866588675886858869588705887158872588735887458875588765887758878588795888058881588825888358884588855888658887588885888958890588915889258893588945889558896588975889858899589005890158902589035890458905589065890758908589095891058911589125891358914589155891658917589185891958920589215892258923589245892558926589275892858929589305893158932589335893458935589365893758938589395894058941589425894358944589455894658947589485894958950589515895258953589545895558956589575895858959589605896158962589635896458965589665896758968589695897058971589725897358974589755897658977589785897958980589815898258983589845898558986589875898858989589905899158992589935899458995589965899758998589995900059001590025900359004590055900659007590085900959010590115901259013590145901559016590175901859019590205902159022590235902459025590265902759028590295903059031590325903359034590355903659037590385903959040590415904259043590445904559046590475904859049590505905159052590535905459055590565905759058590595906059061590625906359064590655906659067590685906959070590715907259073590745907559076590775907859079590805908159082590835908459085590865908759088590895909059091590925909359094590955909659097590985909959100591015910259103591045910559106591075910859109591105911159112591135911459115591165911759118591195912059121591225912359124591255912659127591285912959130591315913259133591345913559136591375913859139591405914159142591435914459145591465914759148591495915059151591525915359154591555915659157591585915959160591615916259163591645916559166591675916859169591705917159172591735917459175591765917759178591795918059181591825918359184591855918659187591885918959190591915919259193591945919559196591975919859199592005920159202592035920459205592065920759208592095921059211592125921359214592155921659217592185921959220592215922259223592245922559226592275922859229592305923159232592335923459235592365923759238592395924059241592425924359244592455924659247592485924959250592515925259253592545925559256592575925859259592605926159262592635926459265592665926759268592695927059271592725927359274592755927659277592785927959280592815928259283592845928559286592875928859289592905929159292592935929459295592965929759298592995930059301593025930359304593055930659307593085930959310593115931259313593145931559316593175931859319593205932159322593235932459325593265932759328593295933059331593325933359334593355933659337593385933959340593415934259343593445934559346593475934859349593505935159352593535935459355593565935759358593595936059361593625936359364593655936659367593685936959370593715937259373593745937559376593775937859379593805938159382593835938459385593865938759388593895939059391593925939359394593955939659397593985939959400594015940259403594045940559406594075940859409594105941159412594135941459415594165941759418594195942059421594225942359424594255942659427594285942959430594315943259433594345943559436594375943859439594405944159442594435944459445594465944759448594495945059451594525945359454594555945659457594585945959460594615946259463594645946559466594675946859469594705947159472594735947459475594765947759478594795948059481594825948359484594855948659487594885948959490594915949259493594945949559496594975949859499595005950159502595035950459505595065950759508595095951059511595125951359514595155951659517595185951959520595215952259523595245952559526595275952859529595305953159532595335953459535595365953759538595395954059541595425954359544595455954659547595485954959550595515955259553595545955559556595575955859559595605956159562595635956459565595665956759568595695957059571595725957359574595755957659577595785957959580595815958259583595845958559586595875958859589595905959159592595935959459595595965959759598595995960059601596025960359604596055960659607596085960959610596115961259613596145961559616596175961859619596205962159622596235962459625596265962759628596295963059631596325963359634596355963659637596385963959640596415964259643596445964559646596475964859649596505965159652596535965459655596565965759658596595966059661596625966359664596655966659667596685966959670596715967259673596745967559676596775967859679596805968159682596835968459685596865968759688596895969059691596925969359694596955969659697596985969959700597015970259703597045970559706597075970859709597105971159712597135971459715597165971759718597195972059721597225972359724597255972659727597285972959730597315973259733597345973559736597375973859739597405974159742597435974459745597465974759748597495975059751597525975359754597555975659757597585975959760597615976259763597645976559766597675976859769597705977159772597735977459775597765977759778597795978059781597825978359784597855978659787597885978959790597915979259793597945979559796597975979859799598005980159802598035980459805598065980759808598095981059811598125981359814598155981659817598185981959820598215982259823598245982559826598275982859829598305983159832598335983459835598365983759838598395984059841598425984359844598455984659847598485984959850598515985259853598545985559856598575985859859598605986159862598635986459865598665986759868598695987059871598725987359874598755987659877598785987959880598815988259883598845988559886598875988859889598905989159892598935989459895598965989759898598995990059901599025990359904599055990659907599085990959910599115991259913599145991559916599175991859919599205992159922599235992459925599265992759928599295993059931599325993359934599355993659937599385993959940599415994259943599445994559946599475994859949599505995159952599535995459955599565995759958599595996059961599625996359964599655996659967599685996959970599715997259973599745997559976599775997859979599805998159982599835998459985599865998759988599895999059991599925999359994599955999659997599985999960000600016000260003600046000560006600076000860009600106001160012600136001460015600166001760018600196002060021600226002360024600256002660027600286002960030600316003260033600346003560036600376003860039600406004160042600436004460045600466004760048600496005060051600526005360054600556005660057600586005960060600616006260063600646006560066600676006860069600706007160072600736007460075600766007760078600796008060081600826008360084600856008660087600886008960090600916009260093600946009560096600976009860099601006010160102601036010460105601066010760108601096011060111601126011360114601156011660117601186011960120601216012260123601246012560126601276012860129601306013160132601336013460135601366013760138601396014060141601426014360144601456014660147601486014960150601516015260153601546015560156601576015860159601606016160162601636016460165601666016760168601696017060171601726017360174601756017660177601786017960180601816018260183601846018560186601876018860189601906019160192601936019460195601966019760198601996020060201602026020360204602056020660207602086020960210602116021260213602146021560216602176021860219602206022160222602236022460225602266022760228602296023060231602326023360234602356023660237602386023960240602416024260243602446024560246602476024860249602506025160252602536025460255602566025760258602596026060261602626026360264602656026660267602686026960270602716027260273602746027560276602776027860279602806028160282602836028460285602866028760288602896029060291602926029360294602956029660297602986029960300603016030260303603046030560306603076030860309603106031160312603136031460315603166031760318603196032060321603226032360324603256032660327603286032960330603316033260333603346033560336603376033860339603406034160342603436034460345603466034760348603496035060351603526035360354603556035660357603586035960360603616036260363603646036560366603676036860369603706037160372603736037460375603766037760378603796038060381603826038360384603856038660387603886038960390603916039260393603946039560396603976039860399604006040160402604036040460405604066040760408604096041060411604126041360414604156041660417604186041960420604216042260423604246042560426604276042860429604306043160432604336043460435604366043760438604396044060441604426044360444604456044660447604486044960450604516045260453604546045560456604576045860459604606046160462604636046460465604666046760468604696047060471604726047360474604756047660477604786047960480604816048260483604846048560486604876048860489604906049160492604936049460495604966049760498604996050060501605026050360504605056050660507605086050960510605116051260513605146051560516605176051860519605206052160522605236052460525605266052760528605296053060531605326053360534605356053660537605386053960540605416054260543605446054560546605476054860549605506055160552605536055460555605566055760558605596056060561605626056360564605656056660567605686056960570605716057260573605746057560576605776057860579605806058160582605836058460585605866058760588605896059060591605926059360594605956059660597605986059960600606016060260603606046060560606606076060860609606106061160612606136061460615606166061760618606196062060621606226062360624606256062660627606286062960630606316063260633606346063560636606376063860639606406064160642606436064460645606466064760648606496065060651606526065360654606556065660657606586065960660606616066260663606646066560666606676066860669606706067160672606736067460675606766067760678606796068060681606826068360684606856068660687606886068960690606916069260693606946069560696606976069860699607006070160702607036070460705607066070760708607096071060711607126071360714607156071660717607186071960720607216072260723607246072560726607276072860729607306073160732607336073460735607366073760738607396074060741607426074360744607456074660747607486074960750607516075260753607546075560756607576075860759607606076160762607636076460765607666076760768607696077060771607726077360774607756077660777607786077960780607816078260783607846078560786607876078860789607906079160792607936079460795607966079760798607996080060801608026080360804608056080660807608086080960810608116081260813608146081560816608176081860819608206082160822608236082460825608266082760828608296083060831608326083360834608356083660837608386083960840608416084260843608446084560846608476084860849608506085160852608536085460855608566085760858608596086060861608626086360864608656086660867608686086960870608716087260873608746087560876608776087860879608806088160882608836088460885608866088760888608896089060891608926089360894608956089660897608986089960900609016090260903609046090560906609076090860909609106091160912609136091460915609166091760918609196092060921609226092360924609256092660927609286092960930609316093260933609346093560936609376093860939609406094160942609436094460945609466094760948609496095060951609526095360954609556095660957609586095960960609616096260963609646096560966609676096860969609706097160972609736097460975609766097760978609796098060981609826098360984609856098660987609886098960990609916099260993609946099560996609976099860999610006100161002610036100461005610066100761008610096101061011610126101361014610156101661017610186101961020610216102261023610246102561026610276102861029610306103161032610336103461035610366103761038610396104061041610426104361044610456104661047610486104961050610516105261053610546105561056610576105861059610606106161062610636106461065610666106761068610696107061071610726107361074610756107661077610786107961080610816108261083610846108561086610876108861089610906109161092610936109461095610966109761098610996110061101611026110361104611056110661107611086110961110611116111261113611146111561116611176111861119611206112161122611236112461125611266112761128611296113061131611326113361134611356113661137611386113961140611416114261143611446114561146611476114861149611506115161152611536115461155611566115761158611596116061161611626116361164611656116661167611686116961170611716117261173611746117561176611776117861179611806118161182611836118461185611866118761188611896119061191611926119361194611956119661197611986119961200612016120261203612046120561206612076120861209612106121161212612136121461215612166121761218612196122061221612226122361224612256122661227612286122961230612316123261233612346123561236612376123861239612406124161242612436124461245612466124761248612496125061251612526125361254612556125661257612586125961260612616126261263612646126561266612676126861269612706127161272612736127461275612766127761278612796128061281612826128361284612856128661287612886128961290612916129261293612946129561296612976129861299613006130161302613036130461305613066130761308613096131061311613126131361314613156131661317613186131961320613216132261323613246132561326613276132861329613306133161332613336133461335613366133761338613396134061341613426134361344613456134661347613486134961350613516135261353613546135561356613576135861359613606136161362613636136461365613666136761368613696137061371613726137361374613756137661377613786137961380613816138261383613846138561386613876138861389613906139161392613936139461395613966139761398613996140061401614026140361404614056140661407614086140961410614116141261413614146141561416614176141861419614206142161422614236142461425614266142761428614296143061431614326143361434614356143661437614386143961440614416144261443614446144561446614476144861449614506145161452614536145461455614566145761458614596146061461614626146361464614656146661467614686146961470614716147261473614746147561476614776147861479614806148161482614836148461485614866148761488614896149061491614926149361494614956149661497614986149961500615016150261503615046150561506615076150861509615106151161512615136151461515615166151761518615196152061521615226152361524615256152661527615286152961530615316153261533615346153561536615376153861539615406154161542615436154461545615466154761548615496155061551615526155361554615556155661557615586155961560615616156261563615646156561566615676156861569615706157161572615736157461575615766157761578615796158061581615826158361584615856158661587615886158961590615916159261593615946159561596615976159861599616006160161602616036160461605616066160761608616096161061611616126161361614616156161661617616186161961620616216162261623616246162561626616276162861629616306163161632616336163461635616366163761638616396164061641616426164361644616456164661647616486164961650616516165261653616546165561656616576165861659616606166161662616636166461665616666166761668616696167061671616726167361674616756167661677616786167961680616816168261683616846168561686616876168861689616906169161692616936169461695616966169761698616996170061701617026170361704617056170661707617086170961710617116171261713617146171561716617176171861719617206172161722617236172461725617266172761728617296173061731617326173361734617356173661737617386173961740617416174261743617446174561746617476174861749617506175161752617536175461755617566175761758617596176061761617626176361764617656176661767617686176961770617716177261773617746177561776617776177861779617806178161782617836178461785617866178761788617896179061791617926179361794617956179661797617986179961800618016180261803618046180561806618076180861809618106181161812618136181461815618166181761818618196182061821618226182361824618256182661827618286182961830618316183261833618346183561836618376183861839618406184161842618436184461845618466184761848618496185061851618526185361854618556185661857618586185961860618616186261863618646186561866618676186861869618706187161872618736187461875618766187761878618796188061881618826188361884618856188661887618886188961890618916189261893618946189561896618976189861899619006190161902619036190461905619066190761908619096191061911619126191361914619156191661917619186191961920619216192261923619246192561926619276192861929619306193161932619336193461935619366193761938619396194061941619426194361944619456194661947619486194961950619516195261953619546195561956619576195861959619606196161962619636196461965619666196761968619696197061971619726197361974619756197661977619786197961980619816198261983619846198561986619876198861989619906199161992619936199461995619966199761998619996200062001620026200362004620056200662007620086200962010620116201262013620146201562016620176201862019620206202162022620236202462025620266202762028620296203062031620326203362034620356203662037620386203962040620416204262043620446204562046620476204862049620506205162052620536205462055620566205762058620596206062061620626206362064620656206662067620686206962070620716207262073620746207562076620776207862079620806208162082620836208462085620866208762088620896209062091620926209362094620956209662097620986209962100621016210262103621046210562106621076210862109621106211162112621136211462115621166211762118621196212062121621226212362124621256212662127621286212962130621316213262133621346213562136621376213862139621406214162142621436214462145621466214762148621496215062151621526215362154621556215662157621586215962160621616216262163621646216562166621676216862169621706217162172621736217462175621766217762178621796218062181621826218362184621856218662187621886218962190621916219262193621946219562196621976219862199622006220162202622036220462205622066220762208622096221062211622126221362214622156221662217622186221962220622216222262223622246222562226622276222862229622306223162232622336223462235622366223762238622396224062241622426224362244622456224662247622486224962250622516225262253622546225562256622576225862259622606226162262622636226462265622666226762268622696227062271622726227362274622756227662277622786227962280622816228262283622846228562286622876228862289622906229162292622936229462295622966229762298622996230062301623026230362304623056230662307623086230962310623116231262313623146231562316623176231862319623206232162322623236232462325623266232762328623296233062331623326233362334623356233662337623386233962340623416234262343623446234562346623476234862349623506235162352623536235462355623566235762358623596236062361623626236362364623656236662367623686236962370623716237262373623746237562376623776237862379623806238162382623836238462385623866238762388623896239062391623926239362394623956239662397623986239962400624016240262403624046240562406624076240862409624106241162412624136241462415624166241762418624196242062421624226242362424624256242662427624286242962430624316243262433624346243562436624376243862439624406244162442624436244462445624466244762448624496245062451624526245362454624556245662457624586245962460624616246262463624646246562466624676246862469624706247162472624736247462475624766247762478624796248062481624826248362484624856248662487624886248962490624916249262493624946249562496624976249862499625006250162502625036250462505625066250762508625096251062511625126251362514625156251662517625186251962520625216252262523625246252562526625276252862529625306253162532625336253462535625366253762538625396254062541625426254362544625456254662547625486254962550625516255262553625546255562556625576255862559625606256162562625636256462565625666256762568625696257062571625726257362574625756257662577625786257962580625816258262583625846258562586625876258862589625906259162592625936259462595625966259762598625996260062601626026260362604626056260662607626086260962610626116261262613626146261562616626176261862619626206262162622626236262462625626266262762628626296263062631626326263362634626356263662637626386263962640626416264262643626446264562646626476264862649626506265162652626536265462655626566265762658626596266062661626626266362664626656266662667626686266962670626716267262673626746267562676626776267862679626806268162682626836268462685626866268762688626896269062691626926269362694626956269662697626986269962700627016270262703627046270562706627076270862709627106271162712627136271462715627166271762718627196272062721627226272362724627256272662727627286272962730627316273262733627346273562736627376273862739627406274162742627436274462745627466274762748627496275062751627526275362754627556275662757627586275962760627616276262763627646276562766627676276862769627706277162772627736277462775627766277762778627796278062781627826278362784627856278662787627886278962790627916279262793627946279562796627976279862799628006280162802628036280462805628066280762808628096281062811628126281362814628156281662817628186281962820628216282262823628246282562826628276282862829628306283162832628336283462835628366283762838628396284062841628426284362844628456284662847628486284962850628516285262853628546285562856628576285862859628606286162862628636286462865628666286762868628696287062871628726287362874628756287662877628786287962880628816288262883628846288562886628876288862889628906289162892628936289462895628966289762898628996290062901629026290362904629056290662907629086290962910629116291262913629146291562916629176291862919629206292162922629236292462925629266292762928629296293062931629326293362934629356293662937629386293962940629416294262943629446294562946629476294862949629506295162952629536295462955629566295762958629596296062961629626296362964629656296662967629686296962970629716297262973629746297562976629776297862979629806298162982629836298462985629866298762988629896299062991629926299362994629956299662997629986299963000630016300263003630046300563006630076300863009630106301163012630136301463015630166301763018630196302063021630226302363024630256302663027630286302963030630316303263033630346303563036630376303863039630406304163042630436304463045630466304763048630496305063051630526305363054630556305663057630586305963060630616306263063630646306563066630676306863069630706307163072630736307463075630766307763078630796308063081630826308363084630856308663087630886308963090630916309263093630946309563096630976309863099631006310163102631036310463105631066310763108631096311063111631126311363114631156311663117631186311963120631216312263123631246312563126631276312863129631306313163132631336313463135631366313763138631396314063141631426314363144631456314663147631486314963150631516315263153631546315563156631576315863159631606316163162631636316463165631666316763168631696317063171631726317363174631756317663177631786317963180631816318263183631846318563186631876318863189631906319163192631936319463195631966319763198631996320063201632026320363204632056320663207632086320963210632116321263213632146321563216632176321863219632206322163222632236322463225632266322763228632296323063231632326323363234632356323663237632386323963240632416324263243632446324563246632476324863249632506325163252632536325463255632566325763258632596326063261632626326363264632656326663267632686326963270632716327263273632746327563276632776327863279632806328163282632836328463285632866328763288632896329063291632926329363294632956329663297632986329963300633016330263303633046330563306633076330863309633106331163312633136331463315633166331763318633196332063321633226332363324633256332663327633286332963330633316333263333633346333563336633376333863339633406334163342633436334463345633466334763348633496335063351633526335363354633556335663357633586335963360633616336263363633646336563366633676336863369633706337163372633736337463375633766337763378633796338063381633826338363384633856338663387633886338963390633916339263393633946339563396633976339863399634006340163402634036340463405634066340763408634096341063411634126341363414634156341663417634186341963420634216342263423634246342563426634276342863429634306343163432634336343463435634366343763438634396344063441634426344363444634456344663447634486344963450634516345263453634546345563456634576345863459634606346163462634636346463465634666346763468634696347063471634726347363474634756347663477634786347963480634816348263483634846348563486634876348863489634906349163492634936349463495634966349763498634996350063501635026350363504635056350663507635086350963510635116351263513635146351563516635176351863519635206352163522635236352463525635266352763528635296353063531635326353363534635356353663537635386353963540635416354263543635446354563546635476354863549635506355163552635536355463555635566355763558635596356063561635626356363564635656356663567635686356963570635716357263573635746357563576635776357863579635806358163582635836358463585635866358763588635896359063591635926359363594635956359663597635986359963600636016360263603636046360563606636076360863609636106361163612636136361463615636166361763618636196362063621636226362363624636256362663627636286362963630636316363263633636346363563636636376363863639636406364163642636436364463645636466364763648636496365063651636526365363654636556365663657636586365963660636616366263663636646366563666636676366863669636706367163672636736367463675636766367763678636796368063681636826368363684636856368663687636886368963690636916369263693636946369563696636976369863699637006370163702637036370463705637066370763708637096371063711637126371363714637156371663717637186371963720637216372263723637246372563726637276372863729637306373163732637336373463735637366373763738637396374063741637426374363744637456374663747637486374963750637516375263753637546375563756637576375863759637606376163762637636376463765637666376763768637696377063771637726377363774637756377663777637786377963780637816378263783637846378563786637876378863789637906379163792637936379463795637966379763798637996380063801638026380363804638056380663807638086380963810638116381263813638146381563816638176381863819638206382163822638236382463825638266382763828638296383063831638326383363834638356383663837638386383963840638416384263843638446384563846638476384863849638506385163852638536385463855638566385763858638596386063861638626386363864638656386663867638686386963870638716387263873638746387563876638776387863879638806388163882638836388463885638866388763888638896389063891638926389363894638956389663897638986389963900639016390263903639046390563906639076390863909639106391163912639136391463915639166391763918639196392063921639226392363924639256392663927639286392963930639316393263933639346393563936639376393863939639406394163942639436394463945639466394763948639496395063951639526395363954639556395663957639586395963960639616396263963639646396563966639676396863969639706397163972639736397463975639766397763978639796398063981639826398363984639856398663987639886398963990639916399263993639946399563996639976399863999640006400164002640036400464005640066400764008640096401064011640126401364014640156401664017640186401964020640216402264023640246402564026640276402864029640306403164032640336403464035640366403764038640396404064041640426404364044640456404664047640486404964050640516405264053640546405564056640576405864059640606406164062640636406464065640666406764068640696407064071640726407364074640756407664077640786407964080640816408264083640846408564086640876408864089640906409164092640936409464095640966409764098640996410064101641026410364104641056410664107641086410964110641116411264113641146411564116641176411864119641206412164122641236412464125641266412764128641296413064131641326413364134641356413664137641386413964140641416414264143641446414564146641476414864149641506415164152641536415464155641566415764158641596416064161641626416364164641656416664167641686416964170641716417264173641746417564176641776417864179641806418164182641836418464185641866418764188641896419064191641926419364194641956419664197641986419964200642016420264203642046420564206642076420864209642106421164212642136421464215642166421764218642196422064221642226422364224642256422664227642286422964230642316423264233642346423564236642376423864239642406424164242642436424464245642466424764248642496425064251642526425364254642556425664257642586425964260642616426264263642646426564266642676426864269642706427164272642736427464275642766427764278642796428064281642826428364284642856428664287642886428964290642916429264293642946429564296642976429864299643006430164302643036430464305643066430764308643096431064311643126431364314643156431664317643186431964320643216432264323643246432564326643276432864329643306433164332643336433464335643366433764338643396434064341643426434364344643456434664347643486434964350643516435264353643546435564356643576435864359643606436164362643636436464365643666436764368643696437064371643726437364374643756437664377643786437964380643816438264383643846438564386643876438864389643906439164392643936439464395643966439764398643996440064401644026440364404644056440664407644086440964410644116441264413644146441564416644176441864419644206442164422644236442464425644266442764428644296443064431644326443364434644356443664437644386443964440644416444264443644446444564446644476444864449644506445164452644536445464455644566445764458644596446064461644626446364464644656446664467644686446964470644716447264473644746447564476644776447864479644806448164482644836448464485644866448764488644896449064491644926449364494644956449664497644986449964500645016450264503645046450564506645076450864509645106451164512645136451464515645166451764518645196452064521645226452364524645256452664527645286452964530645316453264533645346453564536645376453864539645406454164542645436454464545645466454764548645496455064551645526455364554645556455664557645586455964560645616456264563645646456564566645676456864569645706457164572645736457464575645766457764578645796458064581645826458364584645856458664587645886458964590645916459264593645946459564596645976459864599646006460164602646036460464605646066460764608646096461064611646126461364614646156461664617646186461964620646216462264623646246462564626646276462864629646306463164632646336463464635646366463764638646396464064641646426464364644646456464664647646486464964650646516465264653646546465564656646576465864659646606466164662646636466464665646666466764668646696467064671646726467364674646756467664677646786467964680646816468264683646846468564686646876468864689646906469164692646936469464695646966469764698646996470064701647026470364704647056470664707647086470964710647116471264713647146471564716647176471864719647206472164722647236472464725647266472764728647296473064731647326473364734647356473664737647386473964740647416474264743647446474564746647476474864749647506475164752647536475464755647566475764758647596476064761647626476364764647656476664767647686476964770647716477264773647746477564776647776477864779647806478164782647836478464785647866478764788647896479064791647926479364794647956479664797647986479964800648016480264803648046480564806648076480864809648106481164812648136481464815648166481764818648196482064821648226482364824648256482664827648286482964830648316483264833648346483564836648376483864839648406484164842648436484464845648466484764848648496485064851648526485364854648556485664857648586485964860648616486264863648646486564866648676486864869648706487164872648736487464875648766487764878648796488064881648826488364884648856488664887648886488964890648916489264893648946489564896648976489864899649006490164902649036490464905649066490764908649096491064911649126491364914649156491664917649186491964920649216492264923649246492564926649276492864929649306493164932649336493464935649366493764938649396494064941649426494364944649456494664947649486494964950649516495264953649546495564956649576495864959649606496164962649636496464965649666496764968649696497064971649726497364974649756497664977649786497964980649816498264983649846498564986649876498864989649906499164992649936499464995649966499764998649996500065001650026500365004650056500665007650086500965010650116501265013650146501565016650176501865019650206502165022650236502465025650266502765028650296503065031650326503365034650356503665037650386503965040650416504265043650446504565046650476504865049650506505165052650536505465055650566505765058650596506065061650626506365064650656506665067650686506965070650716507265073650746507565076650776507865079650806508165082650836508465085650866508765088650896509065091650926509365094650956509665097650986509965100651016510265103651046510565106651076510865109651106511165112651136511465115651166511765118651196512065121651226512365124651256512665127651286512965130651316513265133651346513565136651376513865139651406514165142651436514465145651466514765148651496515065151651526515365154651556515665157651586515965160651616516265163651646516565166651676516865169651706517165172651736517465175651766517765178651796518065181651826518365184651856518665187651886518965190651916519265193651946519565196651976519865199652006520165202652036520465205652066520765208652096521065211652126521365214652156521665217652186521965220652216522265223652246522565226652276522865229652306523165232652336523465235652366523765238652396524065241652426524365244652456524665247652486524965250652516525265253652546525565256652576525865259652606526165262652636526465265652666526765268652696527065271652726527365274652756527665277652786527965280652816528265283652846528565286652876528865289652906529165292652936529465295652966529765298652996530065301653026530365304653056530665307653086530965310653116531265313653146531565316653176531865319653206532165322653236532465325653266532765328653296533065331653326533365334653356533665337653386533965340653416534265343653446534565346653476534865349653506535165352653536535465355653566535765358653596536065361653626536365364653656536665367653686536965370653716537265373653746537565376653776537865379653806538165382653836538465385653866538765388653896539065391653926539365394653956539665397653986539965400654016540265403654046540565406654076540865409654106541165412654136541465415654166541765418654196542065421654226542365424654256542665427654286542965430654316543265433654346543565436654376543865439654406544165442654436544465445654466544765448654496545065451654526545365454654556545665457654586545965460654616546265463654646546565466654676546865469654706547165472654736547465475654766547765478654796548065481654826548365484654856548665487654886548965490654916549265493654946549565496654976549865499655006550165502655036550465505655066550765508655096551065511655126551365514655156551665517655186551965520655216552265523655246552565526655276552865529655306553165532655336553465535655366553765538655396554065541655426554365544655456554665547655486554965550655516555265553655546555565556655576555865559655606556165562655636556465565655666556765568655696557065571655726557365574655756557665577655786557965580655816558265583655846558565586655876558865589655906559165592655936559465595655966559765598655996560065601656026560365604656056560665607656086560965610656116561265613656146561565616656176561865619656206562165622656236562465625656266562765628656296563065631656326563365634656356563665637656386563965640656416564265643656446564565646656476564865649656506565165652656536565465655656566565765658656596566065661656626566365664656656566665667656686566965670656716567265673656746567565676656776567865679656806568165682656836568465685656866568765688656896569065691656926569365694656956569665697656986569965700657016570265703657046570565706657076570865709657106571165712657136571465715657166571765718657196572065721657226572365724657256572665727657286572965730657316573265733657346573565736657376573865739657406574165742657436574465745657466574765748657496575065751657526575365754657556575665757657586575965760657616576265763657646576565766657676576865769657706577165772657736577465775657766577765778657796578065781657826578365784657856578665787657886578965790657916579265793657946579565796657976579865799658006580165802658036580465805658066580765808658096581065811658126581365814658156581665817658186581965820658216582265823658246582565826658276582865829658306583165832658336583465835658366583765838658396584065841658426584365844658456584665847658486584965850658516585265853658546585565856658576585865859658606586165862658636586465865658666586765868658696587065871658726587365874658756587665877658786587965880658816588265883658846588565886658876588865889658906589165892658936589465895658966589765898658996590065901659026590365904659056590665907659086590965910659116591265913659146591565916659176591865919659206592165922659236592465925659266592765928659296593065931659326593365934659356593665937659386593965940659416594265943659446594565946659476594865949659506595165952659536595465955659566595765958659596596065961659626596365964659656596665967659686596965970659716597265973659746597565976659776597865979659806598165982659836598465985659866598765988659896599065991659926599365994659956599665997659986599966000660016600266003660046600566006660076600866009660106601166012660136601466015660166601766018660196602066021660226602366024660256602666027660286602966030660316603266033660346603566036660376603866039660406604166042660436604466045660466604766048660496605066051660526605366054660556605666057660586605966060660616606266063660646606566066660676606866069660706607166072660736607466075660766607766078660796608066081660826608366084660856608666087660886608966090660916609266093660946609566096660976609866099661006610166102661036610466105661066610766108661096611066111661126611366114661156611666117661186611966120661216612266123661246612566126661276612866129661306613166132661336613466135661366613766138661396614066141661426614366144661456614666147661486614966150661516615266153661546615566156661576615866159661606616166162661636616466165661666616766168661696617066171661726617366174661756617666177661786617966180661816618266183661846618566186661876618866189661906619166192661936619466195661966619766198661996620066201662026620366204662056620666207662086620966210662116621266213662146621566216662176621866219662206622166222662236622466225662266622766228662296623066231662326623366234662356623666237662386623966240662416624266243662446624566246662476624866249662506625166252662536625466255662566625766258662596626066261662626626366264662656626666267662686626966270662716627266273662746627566276662776627866279662806628166282662836628466285662866628766288662896629066291662926629366294662956629666297662986629966300663016630266303663046630566306663076630866309663106631166312663136631466315663166631766318663196632066321663226632366324663256632666327663286632966330663316633266333663346633566336663376633866339663406634166342663436634466345663466634766348663496635066351663526635366354663556635666357663586635966360663616636266363663646636566366663676636866369663706637166372663736637466375663766637766378663796638066381663826638366384663856638666387663886638966390663916639266393663946639566396663976639866399664006640166402664036640466405664066640766408664096641066411664126641366414664156641666417664186641966420664216642266423664246642566426664276642866429664306643166432664336643466435664366643766438664396644066441664426644366444664456644666447664486644966450664516645266453664546645566456664576645866459664606646166462664636646466465664666646766468664696647066471664726647366474664756647666477664786647966480664816648266483664846648566486664876648866489664906649166492664936649466495664966649766498664996650066501665026650366504665056650666507665086650966510665116651266513665146651566516665176651866519665206652166522665236652466525665266652766528665296653066531665326653366534665356653666537665386653966540665416654266543665446654566546665476654866549665506655166552665536655466555665566655766558665596656066561665626656366564665656656666567665686656966570665716657266573665746657566576665776657866579665806658166582665836658466585665866658766588665896659066591665926659366594665956659666597665986659966600666016660266603666046660566606666076660866609666106661166612666136661466615666166661766618666196662066621666226662366624666256662666627666286662966630666316663266633666346663566636666376663866639666406664166642666436664466645666466664766648666496665066651666526665366654666556665666657666586665966660666616666266663666646666566666666676666866669666706667166672666736667466675666766667766678666796668066681666826668366684666856668666687666886668966690666916669266693666946669566696666976669866699667006670166702667036670466705667066670766708667096671066711667126671366714667156671666717667186671966720667216672266723667246672566726667276672866729667306673166732667336673466735667366673766738667396674066741667426674366744667456674666747667486674966750667516675266753667546675566756667576675866759667606676166762667636676466765667666676766768667696677066771667726677366774667756677666777667786677966780667816678266783667846678566786667876678866789667906679166792667936679466795667966679766798667996680066801668026680366804668056680666807668086680966810668116681266813668146681566816668176681866819668206682166822668236682466825668266682766828668296683066831668326683366834668356683666837668386683966840668416684266843668446684566846668476684866849668506685166852668536685466855668566685766858668596686066861668626686366864668656686666867668686686966870668716687266873668746687566876668776687866879668806688166882668836688466885668866688766888668896689066891668926689366894668956689666897668986689966900669016690266903669046690566906669076690866909669106691166912669136691466915669166691766918669196692066921669226692366924669256692666927669286692966930669316693266933669346693566936669376693866939669406694166942669436694466945669466694766948669496695066951669526695366954669556695666957669586695966960669616696266963669646696566966669676696866969669706697166972669736697466975669766697766978669796698066981669826698366984669856698666987669886698966990669916699266993669946699566996669976699866999670006700167002670036700467005670066700767008670096701067011670126701367014670156701667017670186701967020670216702267023670246702567026670276702867029670306703167032670336703467035670366703767038670396704067041670426704367044670456704667047670486704967050670516705267053670546705567056670576705867059670606706167062670636706467065670666706767068670696707067071670726707367074670756707667077670786707967080670816708267083670846708567086670876708867089670906709167092670936709467095670966709767098670996710067101671026710367104671056710667107671086710967110671116711267113671146711567116671176711867119671206712167122671236712467125671266712767128671296713067131671326713367134671356713667137671386713967140671416714267143671446714567146671476714867149671506715167152671536715467155671566715767158671596716067161671626716367164671656716667167671686716967170671716717267173671746717567176671776717867179671806718167182671836718467185671866718767188671896719067191671926719367194671956719667197671986719967200672016720267203672046720567206672076720867209672106721167212672136721467215672166721767218672196722067221672226722367224672256722667227672286722967230672316723267233672346723567236672376723867239672406724167242672436724467245672466724767248672496725067251672526725367254672556725667257672586725967260672616726267263672646726567266672676726867269672706727167272672736727467275672766727767278672796728067281672826728367284672856728667287672886728967290672916729267293672946729567296672976729867299673006730167302673036730467305673066730767308673096731067311673126731367314673156731667317673186731967320673216732267323673246732567326673276732867329673306733167332673336733467335673366733767338673396734067341673426734367344673456734667347673486734967350673516735267353673546735567356673576735867359673606736167362673636736467365673666736767368673696737067371673726737367374673756737667377673786737967380673816738267383673846738567386673876738867389673906739167392673936739467395673966739767398673996740067401674026740367404674056740667407674086740967410674116741267413674146741567416674176741867419674206742167422674236742467425674266742767428674296743067431674326743367434674356743667437674386743967440674416744267443674446744567446674476744867449674506745167452674536745467455674566745767458674596746067461674626746367464674656746667467674686746967470674716747267473674746747567476674776747867479674806748167482674836748467485674866748767488674896749067491674926749367494674956749667497674986749967500675016750267503675046750567506675076750867509675106751167512675136751467515675166751767518675196752067521675226752367524675256752667527675286752967530675316753267533675346753567536675376753867539675406754167542675436754467545675466754767548675496755067551675526755367554675556755667557675586755967560675616756267563675646756567566675676756867569675706757167572675736757467575675766757767578675796758067581675826758367584675856758667587675886758967590675916759267593675946759567596675976759867599676006760167602676036760467605676066760767608676096761067611676126761367614676156761667617676186761967620676216762267623676246762567626676276762867629676306763167632676336763467635676366763767638676396764067641676426764367644676456764667647676486764967650676516765267653676546765567656676576765867659676606766167662676636766467665676666766767668676696767067671676726767367674676756767667677676786767967680676816768267683676846768567686676876768867689676906769167692676936769467695676966769767698676996770067701677026770367704677056770667707677086770967710677116771267713677146771567716677176771867719677206772167722677236772467725677266772767728677296773067731677326773367734677356773667737677386773967740677416774267743677446774567746677476774867749677506775167752677536775467755677566775767758677596776067761677626776367764677656776667767677686776967770677716777267773677746777567776677776777867779677806778167782677836778467785677866778767788677896779067791677926779367794677956779667797677986779967800678016780267803678046780567806678076780867809678106781167812678136781467815678166781767818678196782067821678226782367824678256782667827678286782967830678316783267833678346783567836678376783867839678406784167842678436784467845678466784767848678496785067851678526785367854678556785667857678586785967860678616786267863678646786567866678676786867869678706787167872678736787467875678766787767878678796788067881678826788367884678856788667887678886788967890678916789267893678946789567896678976789867899679006790167902679036790467905679066790767908679096791067911679126791367914679156791667917679186791967920679216792267923679246792567926679276792867929679306793167932679336793467935679366793767938679396794067941679426794367944679456794667947679486794967950679516795267953679546795567956679576795867959679606796167962679636796467965679666796767968679696797067971679726797367974679756797667977679786797967980679816798267983679846798567986679876798867989679906799167992679936799467995679966799767998679996800068001680026800368004680056800668007680086800968010680116801268013680146801568016680176801868019680206802168022680236802468025680266802768028680296803068031680326803368034680356803668037680386803968040680416804268043680446804568046680476804868049680506805168052680536805468055680566805768058680596806068061680626806368064680656806668067680686806968070680716807268073680746807568076680776807868079680806808168082680836808468085680866808768088680896809068091680926809368094680956809668097680986809968100681016810268103681046810568106681076810868109681106811168112681136811468115681166811768118681196812068121681226812368124681256812668127681286812968130681316813268133681346813568136681376813868139681406814168142681436814468145681466814768148681496815068151681526815368154681556815668157681586815968160681616816268163681646816568166681676816868169681706817168172681736817468175681766817768178681796818068181681826818368184681856818668187681886818968190681916819268193681946819568196681976819868199682006820168202682036820468205682066820768208682096821068211682126821368214682156821668217682186821968220682216822268223682246822568226682276822868229682306823168232682336823468235682366823768238682396824068241682426824368244682456824668247682486824968250682516825268253682546825568256682576825868259682606826168262682636826468265682666826768268682696827068271682726827368274682756827668277682786827968280682816828268283682846828568286682876828868289682906829168292682936829468295682966829768298682996830068301683026830368304683056830668307683086830968310683116831268313683146831568316683176831868319683206832168322683236832468325683266832768328683296833068331683326833368334683356833668337683386833968340683416834268343683446834568346683476834868349683506835168352683536835468355683566835768358683596836068361683626836368364683656836668367683686836968370683716837268373683746837568376683776837868379683806838168382683836838468385683866838768388683896839068391683926839368394683956839668397683986839968400684016840268403684046840568406684076840868409684106841168412684136841468415684166841768418684196842068421684226842368424684256842668427684286842968430684316843268433684346843568436684376843868439684406844168442684436844468445684466844768448684496845068451684526845368454684556845668457684586845968460684616846268463684646846568466684676846868469684706847168472684736847468475684766847768478684796848068481684826848368484684856848668487684886848968490684916849268493684946849568496684976849868499685006850168502685036850468505685066850768508685096851068511685126851368514685156851668517685186851968520685216852268523685246852568526685276852868529685306853168532685336853468535685366853768538685396854068541685426854368544685456854668547685486854968550685516855268553685546855568556685576855868559685606856168562685636856468565685666856768568685696857068571685726857368574685756857668577685786857968580685816858268583685846858568586685876858868589685906859168592685936859468595685966859768598685996860068601686026860368604686056860668607686086860968610686116861268613686146861568616686176861868619686206862168622686236862468625686266862768628686296863068631686326863368634686356863668637686386863968640686416864268643686446864568646686476864868649686506865168652686536865468655686566865768658686596866068661686626866368664686656866668667686686866968670686716867268673686746867568676686776867868679686806868168682686836868468685686866868768688686896869068691686926869368694686956869668697686986869968700687016870268703687046870568706687076870868709687106871168712687136871468715687166871768718687196872068721687226872368724687256872668727687286872968730687316873268733687346873568736687376873868739687406874168742687436874468745687466874768748687496875068751687526875368754687556875668757687586875968760687616876268763687646876568766687676876868769687706877168772687736877468775687766877768778687796878068781687826878368784687856878668787687886878968790687916879268793687946879568796687976879868799688006880168802688036880468805688066880768808688096881068811688126881368814688156881668817688186881968820688216882268823688246882568826688276882868829688306883168832688336883468835688366883768838688396884068841688426884368844688456884668847688486884968850688516885268853688546885568856688576885868859688606886168862688636886468865688666886768868688696887068871688726887368874688756887668877688786887968880688816888268883688846888568886688876888868889688906889168892688936889468895688966889768898688996890068901689026890368904689056890668907689086890968910689116891268913689146891568916689176891868919689206892168922689236892468925689266892768928689296893068931689326893368934689356893668937689386893968940689416894268943689446894568946689476894868949689506895168952689536895468955689566895768958689596896068961689626896368964689656896668967689686896968970689716897268973689746897568976689776897868979689806898168982689836898468985689866898768988689896899068991689926899368994689956899668997689986899969000690016900269003690046900569006690076900869009690106901169012690136901469015690166901769018690196902069021690226902369024690256902669027690286902969030690316903269033690346903569036690376903869039690406904169042690436904469045690466904769048690496905069051690526905369054690556905669057690586905969060690616906269063690646906569066690676906869069690706907169072690736907469075690766907769078690796908069081690826908369084690856908669087690886908969090690916909269093690946909569096690976909869099691006910169102691036910469105691066910769108691096911069111691126911369114691156911669117691186911969120691216912269123691246912569126691276912869129691306913169132691336913469135691366913769138691396914069141691426914369144691456914669147691486914969150691516915269153691546915569156691576915869159691606916169162691636916469165691666916769168691696917069171691726917369174691756917669177691786917969180691816918269183691846918569186691876918869189691906919169192691936919469195691966919769198691996920069201692026920369204692056920669207692086920969210692116921269213692146921569216692176921869219692206922169222692236922469225692266922769228692296923069231692326923369234692356923669237692386923969240692416924269243692446924569246692476924869249692506925169252692536925469255692566925769258692596926069261692626926369264692656926669267692686926969270692716927269273692746927569276692776927869279692806928169282692836928469285692866928769288692896929069291692926929369294692956929669297692986929969300693016930269303693046930569306693076930869309693106931169312693136931469315693166931769318693196932069321693226932369324693256932669327693286932969330693316933269333693346933569336693376933869339693406934169342693436934469345693466934769348693496935069351693526935369354693556935669357693586935969360693616936269363693646936569366693676936869369693706937169372693736937469375693766937769378693796938069381693826938369384693856938669387693886938969390693916939269393693946939569396693976939869399694006940169402694036940469405694066940769408694096941069411694126941369414694156941669417694186941969420694216942269423694246942569426694276942869429694306943169432694336943469435694366943769438694396944069441694426944369444694456944669447694486944969450694516945269453694546945569456694576945869459694606946169462694636946469465694666946769468694696947069471694726947369474694756947669477694786947969480694816948269483694846948569486694876948869489694906949169492694936949469495694966949769498694996950069501695026950369504695056950669507695086950969510695116951269513695146951569516695176951869519695206952169522695236952469525695266952769528695296953069531695326953369534695356953669537695386953969540695416954269543695446954569546695476954869549695506955169552695536955469555695566955769558695596956069561695626956369564695656956669567695686956969570695716957269573695746957569576695776957869579695806958169582695836958469585695866958769588695896959069591695926959369594695956959669597695986959969600696016960269603696046960569606696076960869609696106961169612696136961469615696166961769618696196962069621696226962369624696256962669627696286962969630696316963269633696346963569636696376963869639696406964169642696436964469645696466964769648696496965069651696526965369654696556965669657696586965969660696616966269663696646966569666696676966869669696706967169672696736967469675696766967769678696796968069681696826968369684696856968669687696886968969690696916969269693696946969569696696976969869699697006970169702697036970469705697066970769708697096971069711697126971369714697156971669717697186971969720697216972269723697246972569726697276972869729697306973169732697336973469735697366973769738697396974069741697426974369744697456974669747697486974969750697516975269753697546975569756697576975869759697606976169762697636976469765697666976769768697696977069771697726977369774697756977669777697786977969780697816978269783697846978569786697876978869789697906979169792697936979469795697966979769798697996980069801698026980369804698056980669807698086980969810698116981269813698146981569816698176981869819698206982169822698236982469825698266982769828698296983069831698326983369834698356983669837698386983969840698416984269843698446984569846698476984869849698506985169852698536985469855698566985769858698596986069861698626986369864698656986669867698686986969870698716987269873698746987569876698776987869879698806988169882698836988469885698866988769888698896989069891698926989369894698956989669897698986989969900699016990269903699046990569906699076990869909699106991169912699136991469915699166991769918699196992069921699226992369924699256992669927699286992969930699316993269933699346993569936699376993869939699406994169942699436994469945699466994769948699496995069951699526995369954699556995669957699586995969960699616996269963699646996569966699676996869969699706997169972699736997469975699766997769978699796998069981699826998369984699856998669987699886998969990699916999269993699946999569996699976999869999700007000170002700037000470005700067000770008700097001070011700127001370014700157001670017700187001970020700217002270023700247002570026700277002870029700307003170032700337003470035700367003770038700397004070041700427004370044700457004670047700487004970050700517005270053700547005570056700577005870059700607006170062700637006470065700667006770068700697007070071700727007370074700757007670077700787007970080700817008270083700847008570086700877008870089700907009170092700937009470095700967009770098700997010070101701027010370104701057010670107701087010970110701117011270113701147011570116701177011870119701207012170122701237012470125701267012770128701297013070131701327013370134701357013670137701387013970140701417014270143701447014570146701477014870149701507015170152701537015470155701567015770158701597016070161701627016370164701657016670167701687016970170701717017270173701747017570176701777017870179701807018170182701837018470185701867018770188701897019070191701927019370194701957019670197701987019970200702017020270203702047020570206702077020870209702107021170212702137021470215702167021770218702197022070221702227022370224702257022670227702287022970230702317023270233702347023570236702377023870239702407024170242702437024470245702467024770248702497025070251702527025370254702557025670257702587025970260702617026270263702647026570266702677026870269702707027170272702737027470275702767027770278702797028070281702827028370284702857028670287702887028970290702917029270293702947029570296702977029870299703007030170302703037030470305703067030770308703097031070311703127031370314703157031670317703187031970320703217032270323703247032570326703277032870329703307033170332703337033470335703367033770338703397034070341703427034370344703457034670347703487034970350703517035270353703547035570356703577035870359703607036170362703637036470365703667036770368703697037070371703727037370374703757037670377703787037970380703817038270383703847038570386703877038870389703907039170392703937039470395703967039770398703997040070401704027040370404704057040670407704087040970410704117041270413704147041570416704177041870419704207042170422704237042470425704267042770428704297043070431704327043370434704357043670437704387043970440704417044270443704447044570446704477044870449704507045170452704537045470455704567045770458704597046070461704627046370464704657046670467704687046970470704717047270473704747047570476704777047870479704807048170482704837048470485704867048770488704897049070491704927049370494704957049670497704987049970500705017050270503705047050570506705077050870509705107051170512705137051470515705167051770518705197052070521705227052370524705257052670527705287052970530705317053270533705347053570536705377053870539705407054170542705437054470545705467054770548705497055070551705527055370554705557055670557705587055970560705617056270563705647056570566705677056870569705707057170572705737057470575705767057770578705797058070581705827058370584705857058670587705887058970590705917059270593705947059570596705977059870599706007060170602706037060470605706067060770608706097061070611706127061370614706157061670617706187061970620706217062270623706247062570626706277062870629706307063170632706337063470635706367063770638706397064070641706427064370644706457064670647706487064970650706517065270653706547065570656706577065870659706607066170662706637066470665706667066770668706697067070671706727067370674706757067670677706787067970680706817068270683706847068570686706877068870689706907069170692706937069470695706967069770698706997070070701707027070370704707057070670707707087070970710707117071270713707147071570716707177071870719707207072170722707237072470725707267072770728707297073070731707327073370734707357073670737707387073970740707417074270743707447074570746707477074870749707507075170752707537075470755707567075770758707597076070761707627076370764707657076670767707687076970770707717077270773707747077570776707777077870779707807078170782707837078470785707867078770788707897079070791707927079370794707957079670797707987079970800708017080270803708047080570806708077080870809708107081170812708137081470815708167081770818708197082070821708227082370824708257082670827708287082970830708317083270833708347083570836708377083870839708407084170842708437084470845708467084770848708497085070851708527085370854708557085670857708587085970860708617086270863708647086570866708677086870869708707087170872708737087470875708767087770878708797088070881708827088370884708857088670887708887088970890708917089270893708947089570896708977089870899709007090170902709037090470905709067090770908709097091070911709127091370914709157091670917709187091970920709217092270923709247092570926709277092870929709307093170932709337093470935709367093770938709397094070941709427094370944709457094670947709487094970950709517095270953709547095570956709577095870959709607096170962709637096470965709667096770968709697097070971709727097370974709757097670977709787097970980709817098270983709847098570986709877098870989709907099170992709937099470995709967099770998709997100071001710027100371004710057100671007710087100971010710117101271013710147101571016710177101871019710207102171022710237102471025710267102771028710297103071031710327103371034710357103671037710387103971040710417104271043710447104571046710477104871049710507105171052710537105471055710567105771058710597106071061710627106371064710657106671067710687106971070710717107271073710747107571076710777107871079710807108171082710837108471085710867108771088710897109071091710927109371094710957109671097710987109971100711017110271103711047110571106711077110871109711107111171112711137111471115711167111771118711197112071121711227112371124711257112671127711287112971130711317113271133711347113571136711377113871139711407114171142711437114471145711467114771148711497115071151711527115371154711557115671157711587115971160711617116271163711647116571166711677116871169711707117171172711737117471175711767117771178711797118071181711827118371184711857118671187711887118971190711917119271193711947119571196711977119871199712007120171202712037120471205712067120771208712097121071211712127121371214712157121671217712187121971220712217122271223712247122571226712277122871229712307123171232712337123471235712367123771238712397124071241712427124371244712457124671247712487124971250712517125271253712547125571256712577125871259712607126171262712637126471265712667126771268712697127071271712727127371274712757127671277712787127971280712817128271283712847128571286712877128871289712907129171292712937129471295712967129771298712997130071301713027130371304713057130671307713087130971310713117131271313713147131571316713177131871319713207132171322713237132471325713267132771328713297133071331713327133371334713357133671337713387133971340713417134271343713447134571346713477134871349713507135171352713537135471355713567135771358713597136071361713627136371364713657136671367713687136971370713717137271373713747137571376713777137871379713807138171382713837138471385713867138771388713897139071391713927139371394713957139671397713987139971400714017140271403714047140571406714077140871409714107141171412714137141471415714167141771418714197142071421714227142371424714257142671427714287142971430714317143271433714347143571436714377143871439714407144171442714437144471445714467144771448714497145071451714527145371454714557145671457714587145971460714617146271463714647146571466714677146871469714707147171472714737147471475714767147771478714797148071481714827148371484714857148671487714887148971490714917149271493714947149571496714977149871499715007150171502715037150471505715067150771508715097151071511715127151371514715157151671517715187151971520715217152271523715247152571526715277152871529715307153171532715337153471535715367153771538715397154071541715427154371544715457154671547715487154971550715517155271553715547155571556715577155871559715607156171562715637156471565715667156771568715697157071571715727157371574715757157671577715787157971580715817158271583715847158571586715877158871589715907159171592715937159471595715967159771598715997160071601716027160371604716057160671607716087160971610716117161271613716147161571616716177161871619716207162171622716237162471625716267162771628716297163071631716327163371634716357163671637716387163971640716417164271643716447164571646716477164871649716507165171652716537165471655716567165771658716597166071661716627166371664716657166671667716687166971670716717167271673716747167571676716777167871679716807168171682716837168471685716867168771688716897169071691716927169371694716957169671697716987169971700717017170271703717047170571706717077170871709717107171171712717137171471715717167171771718717197172071721717227172371724717257172671727717287172971730717317173271733717347173571736717377173871739717407174171742717437174471745717467174771748717497175071751717527175371754717557175671757717587175971760717617176271763717647176571766717677176871769717707177171772717737177471775717767177771778717797178071781717827178371784717857178671787717887178971790717917179271793717947179571796717977179871799718007180171802718037180471805718067180771808718097181071811718127181371814718157181671817718187181971820718217182271823718247182571826718277182871829718307183171832718337183471835718367183771838718397184071841718427184371844718457184671847718487184971850718517185271853718547185571856718577185871859718607186171862718637186471865718667186771868718697187071871718727187371874718757187671877718787187971880718817188271883718847188571886718877188871889718907189171892718937189471895718967189771898718997190071901719027190371904719057190671907719087190971910719117191271913719147191571916719177191871919719207192171922719237192471925719267192771928719297193071931719327193371934719357193671937719387193971940719417194271943719447194571946719477194871949719507195171952719537195471955719567195771958719597196071961719627196371964719657196671967719687196971970719717197271973719747197571976719777197871979719807198171982719837198471985719867198771988719897199071991719927199371994719957199671997719987199972000720017200272003720047200572006720077200872009720107201172012720137201472015720167201772018720197202072021720227202372024720257202672027720287202972030720317203272033720347203572036720377203872039720407204172042720437204472045720467204772048720497205072051720527205372054720557205672057720587205972060720617206272063720647206572066720677206872069720707207172072720737207472075720767207772078720797208072081720827208372084720857208672087720887208972090720917209272093720947209572096720977209872099721007210172102721037210472105721067210772108721097211072111721127211372114721157211672117721187211972120721217212272123721247212572126721277212872129721307213172132721337213472135721367213772138721397214072141721427214372144721457214672147721487214972150721517215272153721547215572156721577215872159721607216172162721637216472165721667216772168721697217072171721727217372174721757217672177721787217972180721817218272183721847218572186721877218872189721907219172192721937219472195721967219772198721997220072201722027220372204722057220672207722087220972210722117221272213722147221572216722177221872219722207222172222722237222472225722267222772228722297223072231722327223372234722357223672237722387223972240722417224272243722447224572246722477224872249722507225172252722537225472255722567225772258722597226072261722627226372264722657226672267722687226972270722717227272273722747227572276722777227872279722807228172282722837228472285722867228772288722897229072291722927229372294722957229672297722987229972300723017230272303723047230572306723077230872309723107231172312723137231472315723167231772318723197232072321723227232372324723257232672327723287232972330723317233272333723347233572336723377233872339723407234172342723437234472345723467234772348723497235072351723527235372354723557235672357723587235972360723617236272363723647236572366723677236872369723707237172372723737237472375723767237772378723797238072381723827238372384723857238672387723887238972390723917239272393723947239572396723977239872399724007240172402724037240472405724067240772408724097241072411724127241372414724157241672417724187241972420724217242272423724247242572426724277242872429724307243172432724337243472435724367243772438724397244072441724427244372444724457244672447724487244972450724517245272453724547245572456724577245872459724607246172462724637246472465724667246772468724697247072471724727247372474724757247672477724787247972480724817248272483724847248572486724877248872489724907249172492724937249472495724967249772498724997250072501725027250372504725057250672507725087250972510725117251272513725147251572516725177251872519725207252172522725237252472525725267252772528725297253072531725327253372534725357253672537725387253972540725417254272543725447254572546725477254872549725507255172552725537255472555725567255772558725597256072561725627256372564725657256672567725687256972570725717257272573725747257572576725777257872579725807258172582725837258472585725867258772588725897259072591725927259372594725957259672597725987259972600726017260272603726047260572606726077260872609726107261172612726137261472615726167261772618726197262072621726227262372624726257262672627726287262972630726317263272633726347263572636726377263872639726407264172642726437264472645726467264772648726497265072651726527265372654726557265672657726587265972660726617266272663726647266572666726677266872669726707267172672726737267472675726767267772678726797268072681726827268372684726857268672687726887268972690726917269272693726947269572696726977269872699727007270172702727037270472705727067270772708727097271072711727127271372714727157271672717727187271972720727217272272723727247272572726727277272872729727307273172732727337273472735727367273772738727397274072741727427274372744727457274672747727487274972750727517275272753727547275572756727577275872759727607276172762727637276472765727667276772768727697277072771727727277372774727757277672777727787277972780727817278272783727847278572786727877278872789727907279172792727937279472795727967279772798727997280072801728027280372804728057280672807728087280972810728117281272813728147281572816728177281872819728207282172822728237282472825728267282772828728297283072831728327283372834728357283672837728387283972840728417284272843728447284572846728477284872849728507285172852728537285472855728567285772858728597286072861728627286372864728657286672867728687286972870728717287272873728747287572876728777287872879728807288172882728837288472885728867288772888728897289072891728927289372894728957289672897728987289972900729017290272903729047290572906729077290872909729107291172912729137291472915729167291772918729197292072921729227292372924729257292672927729287292972930729317293272933729347293572936729377293872939729407294172942729437294472945729467294772948729497295072951729527295372954729557295672957729587295972960729617296272963729647296572966729677296872969729707297172972729737297472975729767297772978729797298072981729827298372984729857298672987729887298972990729917299272993729947299572996729977299872999730007300173002730037300473005730067300773008730097301073011730127301373014730157301673017730187301973020730217302273023730247302573026730277302873029730307303173032730337303473035730367303773038730397304073041730427304373044730457304673047730487304973050730517305273053730547305573056730577305873059730607306173062730637306473065730667306773068730697307073071730727307373074730757307673077730787307973080730817308273083730847308573086730877308873089730907309173092730937309473095730967309773098730997310073101731027310373104731057310673107731087310973110731117311273113731147311573116731177311873119731207312173122731237312473125731267312773128731297313073131731327313373134731357313673137731387313973140731417314273143731447314573146731477314873149731507315173152731537315473155731567315773158731597316073161731627316373164731657316673167731687316973170731717317273173731747317573176731777317873179731807318173182731837318473185731867318773188731897319073191731927319373194731957319673197731987319973200732017320273203732047320573206732077320873209732107321173212732137321473215732167321773218732197322073221732227322373224732257322673227732287322973230732317323273233732347323573236732377323873239732407324173242732437324473245732467324773248732497325073251732527325373254732557325673257732587325973260732617326273263732647326573266732677326873269732707327173272732737327473275732767327773278732797328073281732827328373284732857328673287732887328973290732917329273293732947329573296732977329873299733007330173302733037330473305733067330773308733097331073311733127331373314733157331673317733187331973320733217332273323733247332573326733277332873329733307333173332733337333473335733367333773338733397334073341733427334373344733457334673347733487334973350733517335273353733547335573356733577335873359733607336173362733637336473365733667336773368733697337073371733727337373374733757337673377733787337973380733817338273383733847338573386733877338873389733907339173392733937339473395733967339773398733997340073401734027340373404734057340673407734087340973410734117341273413734147341573416734177341873419734207342173422734237342473425734267342773428734297343073431734327343373434734357343673437734387343973440734417344273443734447344573446734477344873449734507345173452734537345473455734567345773458734597346073461734627346373464734657346673467734687346973470734717347273473734747347573476734777347873479734807348173482734837348473485734867348773488734897349073491734927349373494734957349673497734987349973500735017350273503735047350573506735077350873509735107351173512735137351473515735167351773518735197352073521735227352373524735257352673527735287352973530735317353273533735347353573536735377353873539735407354173542735437354473545735467354773548735497355073551735527355373554735557355673557735587355973560735617356273563735647356573566735677356873569735707357173572735737357473575735767357773578735797358073581735827358373584735857358673587735887358973590735917359273593735947359573596735977359873599736007360173602736037360473605736067360773608736097361073611736127361373614736157361673617736187361973620736217362273623736247362573626736277362873629736307363173632736337363473635736367363773638736397364073641736427364373644736457364673647736487364973650736517365273653736547365573656736577365873659736607366173662736637366473665736667366773668736697367073671736727367373674736757367673677736787367973680736817368273683736847368573686736877368873689736907369173692736937369473695736967369773698736997370073701737027370373704737057370673707737087370973710737117371273713737147371573716737177371873719737207372173722737237372473725737267372773728737297373073731737327373373734737357373673737737387373973740737417374273743737447374573746737477374873749737507375173752737537375473755737567375773758737597376073761737627376373764737657376673767737687376973770737717377273773737747377573776737777377873779737807378173782737837378473785737867378773788737897379073791737927379373794737957379673797737987379973800738017380273803738047380573806738077380873809738107381173812738137381473815738167381773818738197382073821738227382373824738257382673827738287382973830738317383273833738347383573836738377383873839738407384173842738437384473845738467384773848738497385073851738527385373854738557385673857738587385973860738617386273863738647386573866738677386873869738707387173872738737387473875738767387773878738797388073881738827388373884738857388673887738887388973890738917389273893738947389573896738977389873899739007390173902739037390473905739067390773908739097391073911739127391373914739157391673917739187391973920739217392273923739247392573926739277392873929739307393173932739337393473935739367393773938739397394073941739427394373944739457394673947739487394973950739517395273953739547395573956739577395873959739607396173962739637396473965739667396773968739697397073971739727397373974739757397673977739787397973980739817398273983739847398573986739877398873989739907399173992739937399473995739967399773998739997400074001740027400374004740057400674007740087400974010740117401274013740147401574016740177401874019740207402174022740237402474025740267402774028740297403074031740327403374034740357403674037740387403974040740417404274043740447404574046740477404874049740507405174052740537405474055740567405774058740597406074061740627406374064740657406674067740687406974070740717407274073740747407574076740777407874079740807408174082740837408474085740867408774088740897409074091740927409374094740957409674097740987409974100741017410274103741047410574106741077410874109741107411174112741137411474115741167411774118741197412074121741227412374124741257412674127741287412974130741317413274133741347413574136741377413874139741407414174142741437414474145741467414774148741497415074151741527415374154741557415674157741587415974160741617416274163741647416574166741677416874169741707417174172741737417474175741767417774178741797418074181741827418374184741857418674187741887418974190741917419274193741947419574196741977419874199742007420174202742037420474205742067420774208742097421074211742127421374214742157421674217742187421974220742217422274223742247422574226742277422874229742307423174232742337423474235742367423774238742397424074241742427424374244742457424674247742487424974250742517425274253742547425574256742577425874259742607426174262742637426474265742667426774268742697427074271742727427374274742757427674277742787427974280742817428274283742847428574286742877428874289742907429174292742937429474295742967429774298742997430074301743027430374304743057430674307743087430974310743117431274313743147431574316743177431874319743207432174322743237432474325743267432774328743297433074331743327433374334743357433674337743387433974340743417434274343743447434574346743477434874349743507435174352743537435474355743567435774358743597436074361743627436374364743657436674367743687436974370743717437274373743747437574376743777437874379743807438174382743837438474385743867438774388743897439074391743927439374394743957439674397743987439974400744017440274403744047440574406744077440874409744107441174412744137441474415744167441774418744197442074421744227442374424744257442674427744287442974430744317443274433744347443574436744377443874439744407444174442744437444474445744467444774448744497445074451744527445374454744557445674457744587445974460744617446274463744647446574466744677446874469744707447174472744737447474475744767447774478744797448074481744827448374484744857448674487744887448974490744917449274493744947449574496744977449874499745007450174502745037450474505745067450774508745097451074511745127451374514745157451674517745187451974520745217452274523745247452574526745277452874529745307453174532745337453474535745367453774538745397454074541745427454374544745457454674547745487454974550745517455274553745547455574556745577455874559745607456174562745637456474565745667456774568745697457074571745727457374574745757457674577745787457974580745817458274583745847458574586745877458874589745907459174592745937459474595745967459774598745997460074601746027460374604746057460674607746087460974610746117461274613746147461574616746177461874619746207462174622746237462474625746267462774628746297463074631746327463374634746357463674637746387463974640746417464274643746447464574646746477464874649746507465174652746537465474655746567465774658746597466074661746627466374664746657466674667746687466974670746717467274673746747467574676746777467874679746807468174682746837468474685746867468774688746897469074691746927469374694746957469674697746987469974700747017470274703747047470574706747077470874709747107471174712747137471474715747167471774718747197472074721747227472374724747257472674727747287472974730747317473274733747347473574736747377473874739747407474174742747437474474745747467474774748747497475074751747527475374754747557475674757747587475974760747617476274763747647476574766747677476874769747707477174772747737477474775747767477774778747797478074781747827478374784747857478674787747887478974790747917479274793747947479574796747977479874799748007480174802748037480474805748067480774808748097481074811748127481374814748157481674817748187481974820748217482274823748247482574826748277482874829748307483174832748337483474835748367483774838748397484074841748427484374844748457484674847748487484974850748517485274853748547485574856748577485874859748607486174862748637486474865748667486774868748697487074871748727487374874748757487674877748787487974880748817488274883748847488574886748877488874889748907489174892748937489474895748967489774898748997490074901749027490374904749057490674907749087490974910749117491274913749147491574916749177491874919749207492174922749237492474925749267492774928749297493074931749327493374934749357493674937749387493974940749417494274943749447494574946749477494874949749507495174952749537495474955749567495774958749597496074961749627496374964749657496674967749687496974970749717497274973749747497574976749777497874979749807498174982749837498474985749867498774988749897499074991749927499374994749957499674997749987499975000750017500275003750047500575006750077500875009750107501175012750137501475015750167501775018750197502075021750227502375024750257502675027750287502975030750317503275033750347503575036750377503875039750407504175042750437504475045750467504775048750497505075051750527505375054750557505675057750587505975060750617506275063750647506575066750677506875069750707507175072750737507475075750767507775078750797508075081750827508375084750857508675087750887508975090750917509275093750947509575096750977509875099751007510175102751037510475105751067510775108751097511075111751127511375114751157511675117751187511975120751217512275123751247512575126751277512875129751307513175132751337513475135751367513775138751397514075141751427514375144751457514675147751487514975150751517515275153751547515575156751577515875159751607516175162751637516475165751667516775168751697517075171751727517375174751757517675177751787517975180751817518275183751847518575186751877518875189751907519175192751937519475195751967519775198751997520075201752027520375204752057520675207752087520975210752117521275213752147521575216752177521875219752207522175222752237522475225752267522775228752297523075231752327523375234752357523675237752387523975240752417524275243752447524575246752477524875249752507525175252752537525475255752567525775258752597526075261752627526375264752657526675267752687526975270752717527275273752747527575276752777527875279752807528175282752837528475285752867528775288752897529075291752927529375294752957529675297752987529975300753017530275303753047530575306753077530875309753107531175312753137531475315753167531775318753197532075321753227532375324753257532675327753287532975330753317533275333753347533575336753377533875339753407534175342753437534475345753467534775348753497535075351753527535375354753557535675357753587535975360753617536275363753647536575366753677536875369753707537175372753737537475375753767537775378753797538075381753827538375384753857538675387753887538975390753917539275393753947539575396753977539875399754007540175402754037540475405754067540775408754097541075411754127541375414754157541675417754187541975420754217542275423754247542575426754277542875429754307543175432754337543475435754367543775438754397544075441754427544375444754457544675447754487544975450754517545275453754547545575456754577545875459754607546175462754637546475465754667546775468754697547075471754727547375474754757547675477754787547975480754817548275483754847548575486754877548875489754907549175492754937549475495754967549775498754997550075501755027550375504755057550675507755087550975510755117551275513755147551575516755177551875519755207552175522755237552475525755267552775528755297553075531755327553375534755357553675537755387553975540755417554275543755447554575546755477554875549755507555175552755537555475555755567555775558755597556075561755627556375564755657556675567755687556975570755717557275573755747557575576755777557875579755807558175582755837558475585755867558775588755897559075591755927559375594755957559675597755987559975600756017560275603756047560575606756077560875609756107561175612756137561475615756167561775618756197562075621756227562375624756257562675627756287562975630756317563275633756347563575636756377563875639756407564175642756437564475645756467564775648756497565075651756527565375654756557565675657756587565975660756617566275663756647566575666756677566875669756707567175672756737567475675756767567775678756797568075681756827568375684756857568675687756887568975690756917569275693756947569575696756977569875699757007570175702757037570475705757067570775708757097571075711757127571375714757157571675717757187571975720757217572275723757247572575726757277572875729757307573175732757337573475735757367573775738757397574075741757427574375744757457574675747757487574975750757517575275753757547575575756757577575875759757607576175762757637576475765757667576775768757697577075771757727577375774757757577675777757787577975780757817578275783757847578575786757877578875789757907579175792757937579475795757967579775798757997580075801758027580375804758057580675807758087580975810758117581275813758147581575816758177581875819758207582175822758237582475825758267582775828758297583075831758327583375834758357583675837758387583975840758417584275843758447584575846758477584875849758507585175852758537585475855758567585775858758597586075861758627586375864758657586675867758687586975870758717587275873758747587575876758777587875879758807588175882758837588475885758867588775888758897589075891758927589375894758957589675897758987589975900759017590275903759047590575906759077590875909759107591175912759137591475915759167591775918759197592075921759227592375924759257592675927759287592975930759317593275933759347593575936759377593875939759407594175942759437594475945759467594775948759497595075951759527595375954759557595675957759587595975960759617596275963759647596575966759677596875969759707597175972759737597475975759767597775978759797598075981759827598375984759857598675987759887598975990759917599275993759947599575996759977599875999760007600176002760037600476005760067600776008760097601076011760127601376014760157601676017760187601976020760217602276023760247602576026760277602876029760307603176032760337603476035760367603776038760397604076041760427604376044760457604676047760487604976050760517605276053760547605576056760577605876059760607606176062760637606476065760667606776068760697607076071760727607376074760757607676077760787607976080760817608276083760847608576086760877608876089760907609176092760937609476095760967609776098760997610076101761027610376104761057610676107761087610976110761117611276113761147611576116761177611876119761207612176122761237612476125761267612776128761297613076131761327613376134761357613676137761387613976140761417614276143761447614576146761477614876149761507615176152761537615476155761567615776158761597616076161761627616376164761657616676167761687616976170761717617276173761747617576176761777617876179761807618176182761837618476185761867618776188761897619076191761927619376194761957619676197761987619976200762017620276203762047620576206762077620876209762107621176212762137621476215762167621776218762197622076221762227622376224762257622676227762287622976230762317623276233762347623576236762377623876239762407624176242762437624476245762467624776248762497625076251762527625376254762557625676257762587625976260762617626276263762647626576266762677626876269762707627176272762737627476275762767627776278762797628076281762827628376284762857628676287762887628976290762917629276293762947629576296762977629876299763007630176302763037630476305763067630776308763097631076311763127631376314763157631676317763187631976320763217632276323763247632576326763277632876329763307633176332763337633476335763367633776338763397634076341763427634376344763457634676347763487634976350763517635276353763547635576356763577635876359763607636176362763637636476365763667636776368763697637076371763727637376374763757637676377763787637976380763817638276383763847638576386763877638876389763907639176392763937639476395763967639776398763997640076401764027640376404764057640676407764087640976410764117641276413764147641576416764177641876419764207642176422764237642476425764267642776428764297643076431764327643376434764357643676437764387643976440764417644276443764447644576446764477644876449764507645176452764537645476455764567645776458764597646076461764627646376464764657646676467764687646976470764717647276473764747647576476764777647876479764807648176482764837648476485764867648776488764897649076491764927649376494764957649676497764987649976500765017650276503765047650576506765077650876509765107651176512765137651476515765167651776518765197652076521765227652376524765257652676527765287652976530765317653276533765347653576536765377653876539765407654176542765437654476545765467654776548765497655076551765527655376554765557655676557765587655976560765617656276563765647656576566765677656876569765707657176572765737657476575765767657776578765797658076581765827658376584765857658676587765887658976590765917659276593765947659576596765977659876599766007660176602766037660476605766067660776608766097661076611766127661376614766157661676617766187661976620766217662276623766247662576626766277662876629766307663176632766337663476635766367663776638766397664076641766427664376644766457664676647766487664976650766517665276653766547665576656766577665876659766607666176662766637666476665766667666776668766697667076671766727667376674766757667676677766787667976680766817668276683766847668576686766877668876689766907669176692766937669476695766967669776698766997670076701767027670376704767057670676707767087670976710767117671276713767147671576716767177671876719767207672176722767237672476725767267672776728767297673076731767327673376734767357673676737767387673976740767417674276743767447674576746767477674876749767507675176752767537675476755767567675776758767597676076761767627676376764767657676676767767687676976770767717677276773767747677576776767777677876779767807678176782767837678476785767867678776788767897679076791767927679376794767957679676797767987679976800768017680276803768047680576806768077680876809768107681176812768137681476815768167681776818768197682076821768227682376824768257682676827768287682976830768317683276833768347683576836768377683876839768407684176842768437684476845768467684776848768497685076851768527685376854768557685676857768587685976860768617686276863768647686576866768677686876869768707687176872768737687476875768767687776878768797688076881768827688376884768857688676887768887688976890768917689276893768947689576896768977689876899769007690176902769037690476905769067690776908769097691076911769127691376914769157691676917769187691976920769217692276923769247692576926769277692876929769307693176932769337693476935769367693776938769397694076941769427694376944769457694676947769487694976950769517695276953769547695576956769577695876959769607696176962769637696476965769667696776968769697697076971769727697376974769757697676977769787697976980769817698276983769847698576986769877698876989769907699176992769937699476995769967699776998769997700077001770027700377004770057700677007770087700977010770117701277013770147701577016770177701877019770207702177022770237702477025770267702777028770297703077031770327703377034770357703677037770387703977040770417704277043770447704577046770477704877049770507705177052770537705477055770567705777058770597706077061770627706377064770657706677067770687706977070770717707277073770747707577076770777707877079770807708177082770837708477085770867708777088770897709077091770927709377094770957709677097770987709977100771017710277103771047710577106771077710877109771107711177112771137711477115771167711777118771197712077121771227712377124771257712677127771287712977130771317713277133771347713577136771377713877139771407714177142771437714477145771467714777148771497715077151771527715377154771557715677157771587715977160771617716277163771647716577166771677716877169771707717177172771737717477175771767717777178771797718077181771827718377184771857718677187771887718977190771917719277193771947719577196771977719877199772007720177202772037720477205772067720777208772097721077211772127721377214772157721677217772187721977220772217722277223772247722577226772277722877229772307723177232772337723477235772367723777238772397724077241772427724377244772457724677247772487724977250772517725277253772547725577256772577725877259772607726177262772637726477265772667726777268772697727077271772727727377274772757727677277772787727977280772817728277283772847728577286772877728877289772907729177292772937729477295772967729777298772997730077301773027730377304773057730677307773087730977310773117731277313773147731577316773177731877319773207732177322773237732477325773267732777328773297733077331773327733377334773357733677337773387733977340773417734277343773447734577346773477734877349773507735177352773537735477355773567735777358773597736077361773627736377364773657736677367773687736977370773717737277373773747737577376773777737877379773807738177382773837738477385773867738777388773897739077391773927739377394773957739677397773987739977400774017740277403774047740577406774077740877409774107741177412774137741477415774167741777418774197742077421774227742377424774257742677427774287742977430774317743277433774347743577436774377743877439774407744177442774437744477445774467744777448774497745077451774527745377454774557745677457774587745977460774617746277463774647746577466774677746877469774707747177472774737747477475774767747777478774797748077481774827748377484774857748677487774887748977490774917749277493774947749577496774977749877499775007750177502775037750477505775067750777508775097751077511775127751377514775157751677517775187751977520775217752277523775247752577526775277752877529775307753177532775337753477535775367753777538775397754077541775427754377544775457754677547775487754977550775517755277553775547755577556775577755877559775607756177562775637756477565775667756777568775697757077571775727757377574775757757677577775787757977580775817758277583775847758577586775877758877589775907759177592775937759477595775967759777598775997760077601776027760377604776057760677607776087760977610776117761277613776147761577616776177761877619776207762177622776237762477625776267762777628776297763077631776327763377634776357763677637776387763977640776417764277643776447764577646776477764877649776507765177652776537765477655776567765777658776597766077661776627766377664776657766677667776687766977670776717767277673776747767577676776777767877679776807768177682776837768477685776867768777688776897769077691776927769377694776957769677697776987769977700777017770277703777047770577706777077770877709777107771177712777137771477715777167771777718777197772077721777227772377724777257772677727777287772977730777317773277733777347773577736777377773877739777407774177742777437774477745777467774777748777497775077751777527775377754777557775677757777587775977760777617776277763777647776577766777677776877769777707777177772777737777477775777767777777778777797778077781777827778377784777857778677787777887778977790777917779277793777947779577796777977779877799778007780177802778037780477805778067780777808778097781077811778127781377814778157781677817778187781977820778217782277823778247782577826778277782877829778307783177832778337783477835778367783777838778397784077841778427784377844778457784677847778487784977850778517785277853778547785577856778577785877859778607786177862778637786477865778667786777868778697787077871778727787377874778757787677877778787787977880778817788277883778847788577886778877788877889778907789177892778937789477895778967789777898778997790077901779027790377904779057790677907779087790977910779117791277913779147791577916779177791877919779207792177922779237792477925779267792777928779297793077931779327793377934779357793677937779387793977940779417794277943779447794577946779477794877949779507795177952779537795477955779567795777958779597796077961779627796377964779657796677967779687796977970779717797277973779747797577976779777797877979779807798177982779837798477985779867798777988779897799077991779927799377994779957799677997779987799978000780017800278003780047800578006780077800878009780107801178012780137801478015780167801778018780197802078021780227802378024780257802678027780287802978030780317803278033780347803578036780377803878039780407804178042780437804478045780467804778048780497805078051780527805378054780557805678057780587805978060780617806278063780647806578066780677806878069780707807178072780737807478075780767807778078780797808078081780827808378084780857808678087780887808978090780917809278093780947809578096780977809878099781007810178102781037810478105781067810778108781097811078111781127811378114781157811678117781187811978120781217812278123781247812578126781277812878129781307813178132781337813478135781367813778138781397814078141781427814378144781457814678147781487814978150781517815278153781547815578156781577815878159781607816178162781637816478165781667816778168781697817078171781727817378174781757817678177781787817978180781817818278183781847818578186781877818878189781907819178192781937819478195781967819778198781997820078201782027820378204782057820678207782087820978210782117821278213782147821578216782177821878219782207822178222782237822478225782267822778228782297823078231782327823378234782357823678237782387823978240782417824278243782447824578246782477824878249782507825178252782537825478255782567825778258782597826078261782627826378264782657826678267782687826978270782717827278273782747827578276782777827878279782807828178282782837828478285782867828778288782897829078291782927829378294782957829678297782987829978300783017830278303783047830578306783077830878309783107831178312783137831478315783167831778318783197832078321783227832378324783257832678327783287832978330783317833278333783347833578336783377833878339783407834178342783437834478345783467834778348783497835078351783527835378354783557835678357783587835978360783617836278363783647836578366783677836878369783707837178372783737837478375783767837778378783797838078381783827838378384783857838678387783887838978390783917839278393783947839578396783977839878399784007840178402784037840478405784067840778408784097841078411784127841378414784157841678417784187841978420784217842278423784247842578426784277842878429784307843178432784337843478435784367843778438784397844078441784427844378444784457844678447784487844978450784517845278453784547845578456784577845878459784607846178462784637846478465784667846778468784697847078471784727847378474784757847678477784787847978480784817848278483784847848578486784877848878489784907849178492784937849478495784967849778498784997850078501785027850378504785057850678507785087850978510785117851278513785147851578516785177851878519785207852178522785237852478525785267852778528785297853078531785327853378534785357853678537785387853978540785417854278543785447854578546785477854878549785507855178552785537855478555785567855778558785597856078561785627856378564785657856678567785687856978570785717857278573785747857578576785777857878579785807858178582785837858478585785867858778588785897859078591785927859378594785957859678597785987859978600786017860278603786047860578606786077860878609786107861178612786137861478615786167861778618786197862078621786227862378624786257862678627786287862978630786317863278633786347863578636786377863878639786407864178642786437864478645786467864778648786497865078651786527865378654786557865678657786587865978660786617866278663786647866578666786677866878669786707867178672786737867478675786767867778678786797868078681786827868378684786857868678687786887868978690786917869278693786947869578696786977869878699787007870178702787037870478705787067870778708787097871078711787127871378714787157871678717787187871978720787217872278723787247872578726787277872878729787307873178732787337873478735787367873778738787397874078741787427874378744787457874678747787487874978750787517875278753787547875578756787577875878759787607876178762787637876478765787667876778768787697877078771787727877378774787757877678777787787877978780787817878278783787847878578786787877878878789787907879178792787937879478795787967879778798787997880078801788027880378804788057880678807788087880978810788117881278813788147881578816788177881878819788207882178822788237882478825788267882778828788297883078831788327883378834788357883678837788387883978840788417884278843788447884578846788477884878849788507885178852788537885478855788567885778858788597886078861788627886378864788657886678867788687886978870788717887278873788747887578876788777887878879788807888178882788837888478885788867888778888788897889078891788927889378894788957889678897788987889978900789017890278903789047890578906789077890878909789107891178912789137891478915789167891778918789197892078921789227892378924789257892678927789287892978930789317893278933789347893578936789377893878939789407894178942789437894478945789467894778948789497895078951789527895378954789557895678957789587895978960789617896278963789647896578966789677896878969789707897178972789737897478975789767897778978789797898078981789827898378984789857898678987789887898978990789917899278993789947899578996789977899878999790007900179002790037900479005790067900779008790097901079011790127901379014790157901679017790187901979020790217902279023790247902579026790277902879029790307903179032790337903479035790367903779038790397904079041790427904379044790457904679047790487904979050790517905279053790547905579056790577905879059790607906179062790637906479065790667906779068790697907079071790727907379074790757907679077790787907979080790817908279083790847908579086790877908879089790907909179092790937909479095790967909779098790997910079101791027910379104791057910679107791087910979110791117911279113791147911579116791177911879119791207912179122791237912479125791267912779128791297913079131791327913379134791357913679137791387913979140791417914279143791447914579146791477914879149791507915179152791537915479155791567915779158791597916079161791627916379164791657916679167791687916979170791717917279173791747917579176791777917879179791807918179182791837918479185791867918779188791897919079191791927919379194791957919679197791987919979200792017920279203792047920579206792077920879209792107921179212792137921479215792167921779218792197922079221792227922379224792257922679227792287922979230792317923279233792347923579236792377923879239792407924179242792437924479245792467924779248792497925079251792527925379254792557925679257792587925979260792617926279263792647926579266792677926879269792707927179272792737927479275792767927779278792797928079281792827928379284792857928679287792887928979290792917929279293792947929579296792977929879299793007930179302793037930479305793067930779308793097931079311793127931379314793157931679317793187931979320793217932279323793247932579326793277932879329793307933179332793337933479335793367933779338793397934079341793427934379344793457934679347793487934979350793517935279353793547935579356793577935879359793607936179362793637936479365793667936779368793697937079371793727937379374793757937679377793787937979380793817938279383793847938579386793877938879389793907939179392793937939479395793967939779398793997940079401794027940379404794057940679407794087940979410794117941279413794147941579416794177941879419794207942179422794237942479425794267942779428794297943079431794327943379434794357943679437794387943979440794417944279443794447944579446794477944879449794507945179452794537945479455794567945779458794597946079461794627946379464794657946679467794687946979470794717947279473794747947579476794777947879479794807948179482794837948479485794867948779488794897949079491794927949379494794957949679497794987949979500795017950279503795047950579506795077950879509795107951179512795137951479515795167951779518795197952079521795227952379524795257952679527795287952979530795317953279533795347953579536795377953879539795407954179542795437954479545795467954779548795497955079551795527955379554795557955679557795587955979560795617956279563795647956579566795677956879569795707957179572795737957479575795767957779578795797958079581795827958379584795857958679587795887958979590795917959279593795947959579596795977959879599796007960179602796037960479605796067960779608796097961079611796127961379614796157961679617796187961979620796217962279623796247962579626796277962879629796307963179632796337963479635796367963779638796397964079641796427964379644796457964679647796487964979650796517965279653796547965579656796577965879659796607966179662796637966479665796667966779668796697967079671796727967379674796757967679677796787967979680796817968279683796847968579686796877968879689796907969179692796937969479695796967969779698796997970079701797027970379704797057970679707797087970979710797117971279713797147971579716797177971879719797207972179722797237972479725797267972779728797297973079731797327973379734797357973679737797387973979740797417974279743797447974579746797477974879749797507975179752797537975479755797567975779758797597976079761797627976379764797657976679767797687976979770797717977279773797747977579776797777977879779797807978179782797837978479785797867978779788797897979079791797927979379794797957979679797797987979979800798017980279803798047980579806798077980879809798107981179812798137981479815798167981779818798197982079821798227982379824798257982679827798287982979830798317983279833798347983579836798377983879839798407984179842798437984479845798467984779848798497985079851798527985379854798557985679857798587985979860798617986279863798647986579866798677986879869798707987179872798737987479875798767987779878798797988079881798827988379884798857988679887798887988979890798917989279893798947989579896798977989879899799007990179902799037990479905799067990779908799097991079911799127991379914799157991679917799187991979920799217992279923799247992579926799277992879929799307993179932799337993479935799367993779938799397994079941799427994379944799457994679947799487994979950799517995279953799547995579956799577995879959799607996179962799637996479965799667996779968799697997079971799727997379974799757997679977799787997979980799817998279983799847998579986799877998879989799907999179992799937999479995799967999779998799998000080001800028000380004800058000680007800088000980010800118001280013800148001580016800178001880019800208002180022800238002480025800268002780028800298003080031800328003380034800358003680037800388003980040800418004280043800448004580046800478004880049800508005180052800538005480055800568005780058800598006080061800628006380064800658006680067800688006980070800718007280073800748007580076800778007880079800808008180082800838008480085800868008780088800898009080091800928009380094800958009680097800988009980100801018010280103801048010580106801078010880109801108011180112801138011480115801168011780118801198012080121801228012380124801258012680127801288012980130801318013280133801348013580136801378013880139801408014180142801438014480145801468014780148801498015080151801528015380154801558015680157801588015980160801618016280163801648016580166801678016880169801708017180172801738017480175801768017780178801798018080181801828018380184801858018680187801888018980190801918019280193801948019580196801978019880199802008020180202802038020480205802068020780208802098021080211802128021380214802158021680217802188021980220802218022280223802248022580226802278022880229802308023180232802338023480235802368023780238802398024080241802428024380244802458024680247802488024980250802518025280253802548025580256802578025880259802608026180262802638026480265802668026780268802698027080271802728027380274802758027680277802788027980280802818028280283802848028580286802878028880289802908029180292802938029480295802968029780298802998030080301803028030380304803058030680307803088030980310803118031280313803148031580316803178031880319803208032180322803238032480325803268032780328803298033080331803328033380334803358033680337803388033980340803418034280343803448034580346803478034880349803508035180352803538035480355803568035780358803598036080361803628036380364803658036680367803688036980370803718037280373803748037580376803778037880379803808038180382803838038480385803868038780388803898039080391803928039380394803958039680397803988039980400804018040280403804048040580406804078040880409804108041180412804138041480415804168041780418804198042080421804228042380424804258042680427804288042980430804318043280433804348043580436804378043880439804408044180442804438044480445804468044780448804498045080451804528045380454804558045680457804588045980460804618046280463804648046580466804678046880469804708047180472804738047480475804768047780478804798048080481804828048380484804858048680487804888048980490804918049280493804948049580496804978049880499805008050180502805038050480505805068050780508805098051080511805128051380514805158051680517805188051980520805218052280523805248052580526805278052880529805308053180532805338053480535805368053780538805398054080541805428054380544805458054680547805488054980550805518055280553805548055580556805578055880559805608056180562805638056480565805668056780568805698057080571805728057380574805758057680577805788057980580805818058280583805848058580586805878058880589805908059180592805938059480595805968059780598805998060080601806028060380604806058060680607806088060980610806118061280613806148061580616806178061880619806208062180622806238062480625806268062780628806298063080631806328063380634806358063680637806388063980640806418064280643806448064580646806478064880649806508065180652806538065480655806568065780658806598066080661806628066380664806658066680667806688066980670806718067280673806748067580676806778067880679806808068180682806838068480685806868068780688806898069080691806928069380694806958069680697806988069980700807018070280703807048070580706807078070880709807108071180712807138071480715807168071780718807198072080721807228072380724807258072680727807288072980730807318073280733807348073580736807378073880739807408074180742807438074480745807468074780748807498075080751807528075380754807558075680757807588075980760807618076280763807648076580766807678076880769807708077180772807738077480775807768077780778807798078080781807828078380784807858078680787807888078980790807918079280793807948079580796807978079880799808008080180802808038080480805808068080780808808098081080811808128081380814808158081680817808188081980820808218082280823808248082580826808278082880829808308083180832808338083480835808368083780838808398084080841808428084380844808458084680847808488084980850808518085280853808548085580856808578085880859808608086180862808638086480865808668086780868808698087080871808728087380874808758087680877808788087980880808818088280883808848088580886808878088880889808908089180892808938089480895808968089780898808998090080901809028090380904809058090680907809088090980910809118091280913809148091580916809178091880919809208092180922809238092480925809268092780928809298093080931809328093380934809358093680937809388093980940809418094280943809448094580946809478094880949809508095180952809538095480955809568095780958809598096080961809628096380964809658096680967809688096980970809718097280973809748097580976809778097880979809808098180982809838098480985809868098780988809898099080991809928099380994809958099680997809988099981000810018100281003810048100581006810078100881009810108101181012810138101481015810168101781018810198102081021810228102381024810258102681027810288102981030810318103281033810348103581036810378103881039810408104181042810438104481045810468104781048810498105081051810528105381054810558105681057810588105981060810618106281063810648106581066810678106881069810708107181072810738107481075810768107781078810798108081081810828108381084810858108681087810888108981090810918109281093810948109581096810978109881099811008110181102811038110481105811068110781108811098111081111811128111381114811158111681117811188111981120811218112281123811248112581126811278112881129811308113181132811338113481135811368113781138811398114081141811428114381144811458114681147811488114981150811518115281153811548115581156811578115881159811608116181162811638116481165811668116781168811698117081171811728117381174811758117681177811788117981180811818118281183811848118581186811878118881189811908119181192811938119481195811968119781198811998120081201812028120381204812058120681207812088120981210812118121281213812148121581216812178121881219812208122181222812238122481225812268122781228812298123081231812328123381234812358123681237812388123981240812418124281243812448124581246812478124881249812508125181252812538125481255812568125781258812598126081261812628126381264812658126681267812688126981270812718127281273812748127581276812778127881279812808128181282812838128481285812868128781288812898129081291812928129381294812958129681297812988129981300813018130281303813048130581306813078130881309813108131181312813138131481315813168131781318813198132081321813228132381324813258132681327813288132981330813318133281333813348133581336813378133881339813408134181342813438134481345813468134781348813498135081351813528135381354813558135681357813588135981360813618136281363813648136581366813678136881369813708137181372813738137481375813768137781378813798138081381813828138381384813858138681387813888138981390813918139281393813948139581396813978139881399814008140181402814038140481405814068140781408814098141081411814128141381414814158141681417814188141981420814218142281423814248142581426814278142881429814308143181432814338143481435814368143781438814398144081441814428144381444814458144681447814488144981450814518145281453814548145581456814578145881459814608146181462814638146481465814668146781468814698147081471814728147381474814758147681477814788147981480814818148281483814848148581486814878148881489814908149181492814938149481495814968149781498814998150081501815028150381504815058150681507815088150981510815118151281513815148151581516815178151881519815208152181522815238152481525815268152781528815298153081531815328153381534815358153681537815388153981540815418154281543815448154581546815478154881549815508155181552815538155481555815568155781558815598156081561815628156381564815658156681567815688156981570815718157281573815748157581576815778157881579815808158181582815838158481585815868158781588815898159081591815928159381594815958159681597815988159981600816018160281603816048160581606816078160881609816108161181612816138161481615816168161781618816198162081621816228162381624816258162681627816288162981630816318163281633816348163581636816378163881639816408164181642816438164481645816468164781648816498165081651816528165381654816558165681657816588165981660816618166281663816648166581666816678166881669816708167181672816738167481675816768167781678816798168081681816828168381684816858168681687816888168981690816918169281693816948169581696816978169881699817008170181702817038170481705817068170781708817098171081711817128171381714817158171681717817188171981720817218172281723817248172581726817278172881729817308173181732817338173481735817368173781738817398174081741817428174381744817458174681747817488174981750817518175281753817548175581756817578175881759817608176181762817638176481765817668176781768817698177081771817728177381774817758177681777817788177981780817818178281783817848178581786817878178881789817908179181792817938179481795817968179781798817998180081801818028180381804818058180681807818088180981810818118181281813818148181581816818178181881819818208182181822818238182481825818268182781828818298183081831818328183381834818358183681837818388183981840818418184281843818448184581846818478184881849818508185181852818538185481855818568185781858818598186081861818628186381864818658186681867818688186981870818718187281873818748187581876818778187881879818808188181882818838188481885818868188781888818898189081891818928189381894818958189681897818988189981900819018190281903819048190581906819078190881909819108191181912819138191481915819168191781918819198192081921819228192381924819258192681927819288192981930819318193281933819348193581936819378193881939819408194181942819438194481945819468194781948819498195081951819528195381954819558195681957819588195981960819618196281963819648196581966819678196881969819708197181972819738197481975819768197781978819798198081981819828198381984819858198681987819888198981990819918199281993819948199581996819978199881999820008200182002820038200482005820068200782008820098201082011820128201382014820158201682017820188201982020820218202282023820248202582026820278202882029820308203182032820338203482035820368203782038820398204082041820428204382044820458204682047820488204982050820518205282053820548205582056820578205882059820608206182062820638206482065820668206782068820698207082071820728207382074820758207682077820788207982080820818208282083820848208582086820878208882089820908209182092820938209482095820968209782098820998210082101821028210382104821058210682107821088210982110821118211282113821148211582116821178211882119821208212182122821238212482125821268212782128821298213082131821328213382134821358213682137821388213982140821418214282143821448214582146821478214882149821508215182152821538215482155821568215782158821598216082161821628216382164821658216682167821688216982170821718217282173821748217582176821778217882179821808218182182821838218482185821868218782188821898219082191821928219382194821958219682197821988219982200822018220282203822048220582206822078220882209822108221182212822138221482215822168221782218822198222082221822228222382224822258222682227822288222982230822318223282233822348223582236822378223882239822408224182242822438224482245822468224782248822498225082251822528225382254822558225682257822588225982260822618226282263822648226582266822678226882269822708227182272822738227482275822768227782278822798228082281822828228382284822858228682287822888228982290822918229282293822948229582296822978229882299823008230182302823038230482305823068230782308823098231082311823128231382314823158231682317823188231982320823218232282323823248232582326823278232882329823308233182332823338233482335823368233782338823398234082341823428234382344823458234682347823488234982350823518235282353823548235582356823578235882359823608236182362823638236482365823668236782368823698237082371823728237382374823758237682377823788237982380823818238282383823848238582386823878238882389823908239182392823938239482395823968239782398823998240082401824028240382404824058240682407824088240982410824118241282413824148241582416824178241882419824208242182422824238242482425824268242782428824298243082431824328243382434824358243682437824388243982440824418244282443824448244582446824478244882449824508245182452824538245482455824568245782458824598246082461824628246382464824658246682467824688246982470824718247282473824748247582476824778247882479824808248182482824838248482485824868248782488824898249082491824928249382494824958249682497824988249982500825018250282503825048250582506825078250882509825108251182512825138251482515825168251782518825198252082521825228252382524825258252682527825288252982530825318253282533825348253582536825378253882539825408254182542825438254482545825468254782548825498255082551825528255382554825558255682557825588255982560825618256282563825648256582566825678256882569825708257182572825738257482575825768257782578825798258082581825828258382584825858258682587825888258982590825918259282593825948259582596825978259882599826008260182602826038260482605826068260782608826098261082611826128261382614826158261682617826188261982620826218262282623826248262582626826278262882629826308263182632826338263482635826368263782638826398264082641826428264382644826458264682647826488264982650826518265282653826548265582656826578265882659826608266182662826638266482665826668266782668826698267082671826728267382674826758267682677826788267982680826818268282683826848268582686826878268882689826908269182692826938269482695826968269782698826998270082701827028270382704827058270682707827088270982710827118271282713827148271582716827178271882719827208272182722827238272482725827268272782728827298273082731827328273382734827358273682737827388273982740827418274282743827448274582746827478274882749827508275182752827538275482755827568275782758827598276082761827628276382764827658276682767827688276982770827718277282773827748277582776827778277882779827808278182782827838278482785827868278782788827898279082791827928279382794827958279682797827988279982800828018280282803828048280582806828078280882809828108281182812828138281482815828168281782818828198282082821828228282382824828258282682827828288282982830828318283282833828348283582836828378283882839828408284182842828438284482845828468284782848828498285082851828528285382854828558285682857828588285982860828618286282863828648286582866828678286882869828708287182872828738287482875828768287782878828798288082881828828288382884828858288682887828888288982890828918289282893828948289582896828978289882899829008290182902829038290482905829068290782908829098291082911829128291382914829158291682917829188291982920829218292282923829248292582926829278292882929829308293182932829338293482935829368293782938829398294082941829428294382944829458294682947829488294982950829518295282953829548295582956829578295882959829608296182962829638296482965829668296782968829698297082971829728297382974829758297682977829788297982980829818298282983829848298582986829878298882989829908299182992829938299482995829968299782998829998300083001830028300383004830058300683007830088300983010830118301283013830148301583016830178301883019830208302183022830238302483025830268302783028830298303083031830328303383034830358303683037830388303983040830418304283043830448304583046830478304883049830508305183052830538305483055830568305783058830598306083061830628306383064830658306683067830688306983070830718307283073830748307583076830778307883079830808308183082830838308483085830868308783088830898309083091830928309383094830958309683097830988309983100831018310283103831048310583106831078310883109831108311183112831138311483115831168311783118831198312083121831228312383124831258312683127831288312983130831318313283133831348313583136831378313883139831408314183142831438314483145831468314783148831498315083151831528315383154831558315683157831588315983160831618316283163831648316583166831678316883169831708317183172831738317483175831768317783178831798318083181831828318383184831858318683187831888318983190831918319283193831948319583196831978319883199832008320183202832038320483205832068320783208832098321083211832128321383214832158321683217832188321983220832218322283223832248322583226832278322883229832308323183232832338323483235832368323783238832398324083241832428324383244832458324683247832488324983250832518325283253832548325583256832578325883259832608326183262832638326483265832668326783268832698327083271832728327383274832758327683277832788327983280832818328283283832848328583286832878328883289832908329183292832938329483295832968329783298832998330083301833028330383304833058330683307833088330983310833118331283313833148331583316833178331883319833208332183322833238332483325833268332783328833298333083331833328333383334833358333683337833388333983340833418334283343833448334583346833478334883349833508335183352833538335483355833568335783358833598336083361833628336383364833658336683367833688336983370833718337283373833748337583376833778337883379833808338183382833838338483385833868338783388833898339083391833928339383394833958339683397833988339983400834018340283403834048340583406834078340883409834108341183412834138341483415834168341783418834198342083421834228342383424834258342683427834288342983430834318343283433834348343583436834378343883439834408344183442834438344483445834468344783448834498345083451834528345383454834558345683457834588345983460834618346283463834648346583466834678346883469834708347183472834738347483475834768347783478834798348083481834828348383484834858348683487834888348983490834918349283493834948349583496834978349883499835008350183502835038350483505835068350783508835098351083511835128351383514835158351683517835188351983520835218352283523835248352583526835278352883529835308353183532835338353483535835368353783538835398354083541835428354383544835458354683547835488354983550835518355283553835548355583556835578355883559835608356183562835638356483565835668356783568835698357083571835728357383574835758357683577835788357983580835818358283583835848358583586835878358883589835908359183592835938359483595835968359783598835998360083601836028360383604836058360683607836088360983610836118361283613836148361583616836178361883619836208362183622836238362483625836268362783628836298363083631836328363383634836358363683637836388363983640836418364283643836448364583646836478364883649836508365183652836538365483655836568365783658836598366083661836628366383664836658366683667836688366983670836718367283673836748367583676836778367883679836808368183682836838368483685836868368783688836898369083691836928369383694836958369683697836988369983700837018370283703837048370583706837078370883709837108371183712837138371483715837168371783718837198372083721837228372383724837258372683727837288372983730837318373283733837348373583736837378373883739837408374183742837438374483745837468374783748837498375083751837528375383754837558375683757837588375983760837618376283763837648376583766837678376883769837708377183772837738377483775837768377783778837798378083781837828378383784837858378683787837888378983790837918379283793837948379583796837978379883799838008380183802838038380483805838068380783808838098381083811838128381383814838158381683817838188381983820838218382283823838248382583826838278382883829838308383183832838338383483835838368383783838838398384083841838428384383844838458384683847838488384983850838518385283853838548385583856838578385883859838608386183862838638386483865838668386783868838698387083871838728387383874838758387683877838788387983880838818388283883838848388583886838878388883889838908389183892838938389483895838968389783898838998390083901839028390383904839058390683907839088390983910839118391283913839148391583916839178391883919839208392183922839238392483925839268392783928839298393083931839328393383934839358393683937839388393983940839418394283943839448394583946839478394883949839508395183952839538395483955839568395783958839598396083961839628396383964839658396683967839688396983970839718397283973839748397583976839778397883979839808398183982839838398483985839868398783988839898399083991839928399383994839958399683997839988399984000840018400284003840048400584006840078400884009840108401184012840138401484015840168401784018840198402084021840228402384024840258402684027840288402984030840318403284033840348403584036840378403884039840408404184042840438404484045840468404784048840498405084051840528405384054840558405684057840588405984060840618406284063840648406584066840678406884069840708407184072840738407484075840768407784078840798408084081840828408384084840858408684087840888408984090840918409284093840948409584096840978409884099841008410184102841038410484105841068410784108841098411084111841128411384114841158411684117841188411984120841218412284123841248412584126841278412884129841308413184132841338413484135841368413784138841398414084141841428414384144841458414684147841488414984150841518415284153841548415584156841578415884159841608416184162841638416484165841668416784168841698417084171841728417384174841758417684177841788417984180841818418284183841848418584186841878418884189841908419184192841938419484195841968419784198841998420084201842028420384204842058420684207842088420984210842118421284213842148421584216842178421884219842208422184222842238422484225842268422784228842298423084231842328423384234842358423684237842388423984240842418424284243842448424584246842478424884249842508425184252842538425484255842568425784258842598426084261842628426384264842658426684267842688426984270842718427284273842748427584276842778427884279842808428184282842838428484285842868428784288842898429084291842928429384294842958429684297842988429984300843018430284303843048430584306843078430884309843108431184312843138431484315843168431784318843198432084321843228432384324843258432684327843288432984330843318433284333843348433584336843378433884339843408434184342843438434484345843468434784348843498435084351843528435384354843558435684357843588435984360843618436284363843648436584366843678436884369843708437184372843738437484375843768437784378843798438084381843828438384384843858438684387843888438984390843918439284393843948439584396843978439884399844008440184402844038440484405844068440784408844098441084411844128441384414844158441684417844188441984420844218442284423844248442584426844278442884429844308443184432844338443484435844368443784438844398444084441844428444384444844458444684447844488444984450844518445284453844548445584456844578445884459844608446184462844638446484465844668446784468844698447084471844728447384474844758447684477844788447984480844818448284483844848448584486844878448884489844908449184492844938449484495844968449784498844998450084501845028450384504845058450684507845088450984510845118451284513845148451584516845178451884519845208452184522845238452484525845268452784528845298453084531845328453384534845358453684537845388453984540845418454284543845448454584546845478454884549845508455184552845538455484555845568455784558845598456084561845628456384564845658456684567845688456984570845718457284573845748457584576845778457884579845808458184582845838458484585845868458784588845898459084591845928459384594845958459684597845988459984600846018460284603846048460584606846078460884609846108461184612846138461484615846168461784618846198462084621846228462384624846258462684627846288462984630846318463284633846348463584636846378463884639846408464184642846438464484645846468464784648846498465084651846528465384654846558465684657846588465984660846618466284663846648466584666846678466884669846708467184672846738467484675846768467784678846798468084681846828468384684846858468684687846888468984690846918469284693846948469584696846978469884699847008470184702847038470484705847068470784708847098471084711847128471384714847158471684717847188471984720847218472284723847248472584726847278472884729847308473184732847338473484735847368473784738847398474084741847428474384744847458474684747847488474984750847518475284753847548475584756847578475884759847608476184762847638476484765847668476784768847698477084771847728477384774847758477684777847788477984780847818478284783847848478584786847878478884789847908479184792847938479484795847968479784798847998480084801848028480384804848058480684807848088480984810848118481284813848148481584816848178481884819848208482184822848238482484825848268482784828848298483084831848328483384834848358483684837848388483984840848418484284843848448484584846848478484884849848508485184852848538485484855848568485784858848598486084861848628486384864848658486684867848688486984870848718487284873848748487584876848778487884879848808488184882848838488484885848868488784888848898489084891848928489384894848958489684897848988489984900849018490284903849048490584906849078490884909849108491184912849138491484915849168491784918849198492084921849228492384924849258492684927849288492984930849318493284933849348493584936849378493884939849408494184942849438494484945849468494784948849498495084951849528495384954849558495684957849588495984960849618496284963849648496584966849678496884969849708497184972849738497484975849768497784978849798498084981849828498384984849858498684987849888498984990849918499284993849948499584996849978499884999850008500185002850038500485005850068500785008850098501085011850128501385014850158501685017850188501985020850218502285023850248502585026850278502885029850308503185032850338503485035850368503785038850398504085041850428504385044850458504685047850488504985050850518505285053850548505585056850578505885059850608506185062850638506485065850668506785068850698507085071850728507385074850758507685077850788507985080850818508285083850848508585086850878508885089850908509185092850938509485095850968509785098850998510085101851028510385104851058510685107851088510985110851118511285113851148511585116851178511885119851208512185122851238512485125851268512785128851298513085131851328513385134851358513685137851388513985140851418514285143851448514585146851478514885149851508515185152851538515485155851568515785158851598516085161851628516385164851658516685167851688516985170851718517285173851748517585176851778517885179851808518185182851838518485185851868518785188851898519085191851928519385194851958519685197851988519985200852018520285203852048520585206852078520885209852108521185212852138521485215852168521785218852198522085221852228522385224852258522685227852288522985230852318523285233852348523585236852378523885239852408524185242852438524485245852468524785248852498525085251852528525385254852558525685257852588525985260852618526285263852648526585266852678526885269852708527185272852738527485275852768527785278852798528085281852828528385284852858528685287852888528985290852918529285293852948529585296852978529885299853008530185302853038530485305853068530785308853098531085311853128531385314853158531685317853188531985320853218532285323853248532585326853278532885329853308533185332853338533485335853368533785338853398534085341853428534385344853458534685347853488534985350853518535285353853548535585356853578535885359853608536185362853638536485365853668536785368853698537085371853728537385374853758537685377853788537985380853818538285383853848538585386853878538885389853908539185392853938539485395853968539785398853998540085401854028540385404854058540685407854088540985410854118541285413854148541585416854178541885419854208542185422854238542485425854268542785428854298543085431854328543385434854358543685437854388543985440854418544285443854448544585446854478544885449854508545185452854538545485455854568545785458854598546085461854628546385464854658546685467854688546985470854718547285473854748547585476854778547885479854808548185482854838548485485854868548785488854898549085491854928549385494854958549685497854988549985500855018550285503855048550585506855078550885509855108551185512855138551485515855168551785518855198552085521855228552385524855258552685527855288552985530855318553285533855348553585536855378553885539855408554185542855438554485545855468554785548855498555085551855528555385554855558555685557855588555985560855618556285563855648556585566855678556885569855708557185572855738557485575855768557785578855798558085581855828558385584855858558685587855888558985590855918559285593855948559585596855978559885599856008560185602856038560485605856068560785608856098561085611856128561385614856158561685617856188561985620856218562285623856248562585626856278562885629856308563185632856338563485635856368563785638856398564085641856428564385644856458564685647856488564985650856518565285653856548565585656856578565885659856608566185662856638566485665856668566785668856698567085671856728567385674856758567685677856788567985680856818568285683856848568585686856878568885689856908569185692856938569485695856968569785698856998570085701857028570385704857058570685707857088570985710857118571285713857148571585716857178571885719857208572185722857238572485725857268572785728857298573085731857328573385734857358573685737857388573985740857418574285743857448574585746857478574885749857508575185752857538575485755857568575785758857598576085761857628576385764857658576685767857688576985770857718577285773857748577585776857778577885779857808578185782857838578485785857868578785788857898579085791857928579385794857958579685797857988579985800858018580285803858048580585806858078580885809858108581185812858138581485815858168581785818858198582085821858228582385824858258582685827858288582985830858318583285833858348583585836858378583885839858408584185842858438584485845858468584785848858498585085851858528585385854858558585685857858588585985860858618586285863858648586585866858678586885869858708587185872858738587485875858768587785878858798588085881858828588385884858858588685887858888588985890858918589285893858948589585896858978589885899859008590185902859038590485905859068590785908859098591085911859128591385914859158591685917859188591985920859218592285923859248592585926859278592885929859308593185932859338593485935859368593785938859398594085941859428594385944859458594685947859488594985950859518595285953859548595585956859578595885959859608596185962859638596485965859668596785968859698597085971859728597385974859758597685977859788597985980859818598285983859848598585986859878598885989859908599185992859938599485995859968599785998859998600086001860028600386004860058600686007860088600986010860118601286013860148601586016860178601886019860208602186022860238602486025860268602786028860298603086031860328603386034860358603686037860388603986040860418604286043860448604586046860478604886049860508605186052860538605486055860568605786058860598606086061860628606386064860658606686067860688606986070860718607286073860748607586076860778607886079860808608186082860838608486085860868608786088860898609086091860928609386094860958609686097860988609986100861018610286103861048610586106861078610886109861108611186112861138611486115861168611786118861198612086121861228612386124861258612686127861288612986130861318613286133861348613586136861378613886139861408614186142861438614486145861468614786148861498615086151861528615386154861558615686157861588615986160861618616286163861648616586166861678616886169861708617186172861738617486175861768617786178861798618086181861828618386184861858618686187861888618986190861918619286193861948619586196861978619886199862008620186202862038620486205862068620786208862098621086211862128621386214862158621686217862188621986220862218622286223862248622586226862278622886229862308623186232862338623486235862368623786238862398624086241862428624386244862458624686247862488624986250862518625286253862548625586256862578625886259862608626186262862638626486265862668626786268862698627086271862728627386274862758627686277862788627986280862818628286283862848628586286862878628886289862908629186292862938629486295862968629786298862998630086301863028630386304863058630686307863088630986310863118631286313863148631586316863178631886319863208632186322863238632486325863268632786328863298633086331863328633386334863358633686337863388633986340863418634286343863448634586346863478634886349863508635186352863538635486355863568635786358863598636086361863628636386364863658636686367863688636986370863718637286373863748637586376863778637886379863808638186382863838638486385863868638786388863898639086391863928639386394863958639686397863988639986400864018640286403864048640586406864078640886409864108641186412864138641486415864168641786418864198642086421864228642386424864258642686427864288642986430864318643286433864348643586436864378643886439864408644186442864438644486445864468644786448864498645086451864528645386454864558645686457864588645986460864618646286463864648646586466864678646886469864708647186472864738647486475864768647786478864798648086481864828648386484864858648686487864888648986490864918649286493864948649586496864978649886499865008650186502865038650486505865068650786508865098651086511865128651386514865158651686517865188651986520865218652286523865248652586526865278652886529865308653186532865338653486535865368653786538865398654086541865428654386544865458654686547865488654986550865518655286553865548655586556865578655886559865608656186562865638656486565865668656786568865698657086571865728657386574865758657686577865788657986580865818658286583865848658586586865878658886589865908659186592865938659486595865968659786598865998660086601866028660386604866058660686607866088660986610866118661286613866148661586616866178661886619866208662186622866238662486625866268662786628866298663086631866328663386634866358663686637866388663986640866418664286643866448664586646866478664886649866508665186652866538665486655866568665786658866598666086661866628666386664866658666686667866688666986670866718667286673866748667586676866778667886679866808668186682866838668486685866868668786688866898669086691866928669386694866958669686697866988669986700867018670286703867048670586706867078670886709867108671186712867138671486715867168671786718867198672086721867228672386724867258672686727867288672986730867318673286733867348673586736867378673886739867408674186742867438674486745867468674786748867498675086751867528675386754867558675686757867588675986760867618676286763867648676586766867678676886769867708677186772867738677486775867768677786778867798678086781867828678386784867858678686787867888678986790867918679286793867948679586796867978679886799868008680186802868038680486805868068680786808868098681086811868128681386814868158681686817868188681986820868218682286823868248682586826868278682886829868308683186832868338683486835868368683786838868398684086841868428684386844868458684686847868488684986850868518685286853868548685586856868578685886859868608686186862868638686486865868668686786868868698687086871868728687386874868758687686877868788687986880868818688286883868848688586886868878688886889868908689186892868938689486895868968689786898868998690086901869028690386904869058690686907869088690986910869118691286913869148691586916869178691886919869208692186922869238692486925869268692786928869298693086931869328693386934869358693686937869388693986940869418694286943869448694586946869478694886949869508695186952869538695486955869568695786958869598696086961869628696386964869658696686967869688696986970869718697286973869748697586976869778697886979869808698186982869838698486985869868698786988869898699086991869928699386994869958699686997869988699987000870018700287003870048700587006870078700887009870108701187012870138701487015870168701787018870198702087021870228702387024870258702687027870288702987030870318703287033870348703587036870378703887039870408704187042870438704487045870468704787048870498705087051870528705387054870558705687057870588705987060870618706287063870648706587066870678706887069870708707187072870738707487075870768707787078870798708087081870828708387084870858708687087870888708987090870918709287093870948709587096870978709887099871008710187102871038710487105871068710787108871098711087111871128711387114871158711687117871188711987120871218712287123871248712587126871278712887129871308713187132871338713487135871368713787138871398714087141871428714387144871458714687147871488714987150871518715287153871548715587156871578715887159871608716187162871638716487165871668716787168871698717087171871728717387174871758717687177871788717987180871818718287183871848718587186871878718887189871908719187192871938719487195871968719787198871998720087201872028720387204872058720687207872088720987210872118721287213872148721587216872178721887219872208722187222872238722487225872268722787228872298723087231872328723387234872358723687237872388723987240872418724287243872448724587246872478724887249872508725187252872538725487255872568725787258872598726087261872628726387264872658726687267872688726987270872718727287273872748727587276872778727887279872808728187282872838728487285872868728787288872898729087291872928729387294872958729687297872988729987300873018730287303873048730587306873078730887309873108731187312873138731487315873168731787318873198732087321873228732387324873258732687327873288732987330873318733287333873348733587336873378733887339873408734187342873438734487345873468734787348873498735087351873528735387354873558735687357873588735987360873618736287363873648736587366873678736887369873708737187372873738737487375873768737787378873798738087381873828738387384873858738687387873888738987390873918739287393873948739587396873978739887399874008740187402874038740487405874068740787408874098741087411874128741387414874158741687417874188741987420874218742287423874248742587426874278742887429874308743187432874338743487435874368743787438874398744087441874428744387444874458744687447874488744987450874518745287453874548745587456874578745887459874608746187462874638746487465874668746787468874698747087471874728747387474874758747687477874788747987480874818748287483874848748587486874878748887489874908749187492874938749487495874968749787498874998750087501875028750387504875058750687507875088750987510875118751287513875148751587516875178751887519875208752187522875238752487525875268752787528875298753087531875328753387534875358753687537875388753987540875418754287543875448754587546875478754887549875508755187552875538755487555875568755787558875598756087561875628756387564875658756687567875688756987570875718757287573875748757587576875778757887579875808758187582875838758487585875868758787588875898759087591875928759387594875958759687597875988759987600876018760287603876048760587606876078760887609876108761187612876138761487615876168761787618876198762087621876228762387624876258762687627876288762987630876318763287633876348763587636876378763887639876408764187642876438764487645876468764787648876498765087651876528765387654876558765687657876588765987660876618766287663876648766587666876678766887669876708767187672876738767487675876768767787678876798768087681876828768387684876858768687687876888768987690876918769287693876948769587696876978769887699877008770187702877038770487705877068770787708877098771087711877128771387714877158771687717877188771987720877218772287723877248772587726877278772887729877308773187732877338773487735877368773787738877398774087741877428774387744877458774687747877488774987750877518775287753877548775587756877578775887759877608776187762877638776487765877668776787768877698777087771877728777387774877758777687777877788777987780877818778287783877848778587786877878778887789877908779187792877938779487795877968779787798877998780087801878028780387804878058780687807878088780987810878118781287813878148781587816878178781887819878208782187822878238782487825878268782787828878298783087831878328783387834878358783687837878388783987840878418784287843878448784587846878478784887849878508785187852878538785487855878568785787858878598786087861878628786387864878658786687867878688786987870878718787287873878748787587876878778787887879878808788187882878838788487885878868788787888878898789087891878928789387894878958789687897878988789987900879018790287903879048790587906879078790887909879108791187912879138791487915879168791787918879198792087921879228792387924879258792687927879288792987930879318793287933879348793587936879378793887939879408794187942879438794487945879468794787948879498795087951879528795387954879558795687957879588795987960879618796287963879648796587966879678796887969879708797187972879738797487975879768797787978879798798087981879828798387984879858798687987879888798987990879918799287993879948799587996879978799887999880008800188002880038800488005880068800788008880098801088011880128801388014880158801688017880188801988020880218802288023880248802588026880278802888029880308803188032880338803488035880368803788038880398804088041880428804388044880458804688047880488804988050880518805288053880548805588056880578805888059880608806188062880638806488065880668806788068880698807088071880728807388074880758807688077880788807988080880818808288083880848808588086880878808888089880908809188092880938809488095880968809788098880998810088101881028810388104881058810688107881088810988110881118811288113881148811588116881178811888119881208812188122881238812488125881268812788128881298813088131881328813388134881358813688137881388813988140881418814288143881448814588146881478814888149881508815188152881538815488155881568815788158881598816088161881628816388164881658816688167881688816988170881718817288173881748817588176881778817888179881808818188182881838818488185881868818788188881898819088191881928819388194881958819688197881988819988200882018820288203882048820588206882078820888209882108821188212882138821488215882168821788218882198822088221882228822388224882258822688227882288822988230882318823288233882348823588236882378823888239882408824188242882438824488245882468824788248882498825088251882528825388254882558825688257882588825988260882618826288263882648826588266882678826888269882708827188272882738827488275882768827788278882798828088281882828828388284882858828688287882888828988290882918829288293882948829588296882978829888299883008830188302883038830488305883068830788308883098831088311883128831388314883158831688317883188831988320883218832288323883248832588326883278832888329883308833188332883338833488335883368833788338883398834088341883428834388344883458834688347883488834988350883518835288353883548835588356883578835888359883608836188362883638836488365883668836788368883698837088371883728837388374883758837688377883788837988380883818838288383883848838588386883878838888389883908839188392883938839488395883968839788398883998840088401884028840388404884058840688407884088840988410884118841288413884148841588416884178841888419884208842188422884238842488425884268842788428884298843088431884328843388434884358843688437884388843988440884418844288443884448844588446884478844888449884508845188452884538845488455884568845788458884598846088461884628846388464884658846688467884688846988470884718847288473884748847588476884778847888479884808848188482884838848488485884868848788488884898849088491884928849388494884958849688497884988849988500885018850288503885048850588506885078850888509885108851188512885138851488515885168851788518885198852088521885228852388524885258852688527885288852988530885318853288533885348853588536885378853888539885408854188542885438854488545885468854788548885498855088551885528855388554885558855688557885588855988560885618856288563885648856588566885678856888569885708857188572885738857488575885768857788578885798858088581885828858388584885858858688587885888858988590885918859288593885948859588596885978859888599886008860188602886038860488605886068860788608886098861088611886128861388614886158861688617886188861988620886218862288623886248862588626886278862888629886308863188632886338863488635886368863788638886398864088641886428864388644886458864688647886488864988650886518865288653886548865588656886578865888659886608866188662886638866488665886668866788668886698867088671886728867388674886758867688677886788867988680886818868288683886848868588686886878868888689886908869188692886938869488695886968869788698886998870088701887028870388704887058870688707887088870988710887118871288713887148871588716887178871888719887208872188722887238872488725887268872788728887298873088731887328873388734887358873688737887388873988740887418874288743887448874588746887478874888749887508875188752887538875488755887568875788758887598876088761887628876388764887658876688767887688876988770887718877288773887748877588776887778877888779887808878188782887838878488785887868878788788887898879088791887928879388794887958879688797887988879988800888018880288803888048880588806888078880888809888108881188812888138881488815888168881788818888198882088821888228882388824888258882688827888288882988830888318883288833888348883588836888378883888839888408884188842888438884488845888468884788848888498885088851888528885388854888558885688857888588885988860888618886288863888648886588866888678886888869888708887188872888738887488875888768887788878888798888088881888828888388884888858888688887888888888988890888918889288893888948889588896888978889888899889008890188902889038890488905889068890788908889098891088911889128891388914889158891688917889188891988920889218892288923889248892588926889278892888929889308893188932889338893488935889368893788938889398894088941889428894388944889458894688947889488894988950889518895288953889548895588956889578895888959889608896188962889638896488965889668896788968889698897088971889728897388974889758897688977889788897988980889818898288983889848898588986889878898888989889908899188992889938899488995889968899788998889998900089001890028900389004890058900689007890088900989010890118901289013890148901589016890178901889019890208902189022890238902489025890268902789028890298903089031890328903389034890358903689037890388903989040890418904289043890448904589046890478904889049890508905189052890538905489055890568905789058890598906089061890628906389064890658906689067890688906989070890718907289073890748907589076890778907889079890808908189082890838908489085890868908789088890898909089091890928909389094890958909689097890988909989100891018910289103891048910589106891078910889109891108911189112891138911489115891168911789118891198912089121891228912389124891258912689127891288912989130891318913289133891348913589136891378913889139891408914189142891438914489145891468914789148891498915089151891528915389154891558915689157891588915989160891618916289163891648916589166891678916889169891708917189172891738917489175891768917789178891798918089181891828918389184891858918689187891888918989190891918919289193891948919589196891978919889199892008920189202892038920489205892068920789208892098921089211892128921389214892158921689217892188921989220892218922289223892248922589226892278922889229892308923189232892338923489235892368923789238892398924089241892428924389244892458924689247892488924989250892518925289253892548925589256892578925889259892608926189262892638926489265892668926789268892698927089271892728927389274892758927689277892788927989280892818928289283892848928589286892878928889289892908929189292892938929489295892968929789298892998930089301893028930389304893058930689307893088930989310893118931289313893148931589316893178931889319893208932189322893238932489325893268932789328893298933089331893328933389334893358933689337893388933989340893418934289343893448934589346893478934889349893508935189352893538935489355893568935789358893598936089361893628936389364893658936689367893688936989370893718937289373893748937589376893778937889379893808938189382893838938489385893868938789388893898939089391893928939389394893958939689397893988939989400894018940289403894048940589406894078940889409894108941189412894138941489415894168941789418894198942089421894228942389424894258942689427894288942989430894318943289433894348943589436894378943889439894408944189442894438944489445894468944789448894498945089451894528945389454894558945689457894588945989460894618946289463894648946589466894678946889469894708947189472894738947489475894768947789478894798948089481894828948389484894858948689487894888948989490894918949289493894948949589496894978949889499895008950189502895038950489505895068950789508895098951089511895128951389514895158951689517895188951989520895218952289523895248952589526895278952889529895308953189532895338953489535895368953789538895398954089541895428954389544895458954689547895488954989550895518955289553895548955589556895578955889559895608956189562895638956489565895668956789568895698957089571895728957389574895758957689577895788957989580895818958289583895848958589586895878958889589895908959189592895938959489595895968959789598895998960089601896028960389604896058960689607896088960989610896118961289613896148961589616896178961889619896208962189622896238962489625896268962789628896298963089631896328963389634896358963689637896388963989640896418964289643896448964589646896478964889649896508965189652896538965489655896568965789658896598966089661896628966389664896658966689667896688966989670896718967289673896748967589676896778967889679896808968189682896838968489685896868968789688896898969089691896928969389694896958969689697896988969989700897018970289703897048970589706897078970889709897108971189712897138971489715897168971789718897198972089721897228972389724897258972689727897288972989730897318973289733897348973589736897378973889739897408974189742897438974489745897468974789748897498975089751897528975389754897558975689757897588975989760897618976289763897648976589766897678976889769897708977189772897738977489775897768977789778897798978089781897828978389784897858978689787897888978989790897918979289793897948979589796897978979889799898008980189802898038980489805898068980789808898098981089811898128981389814898158981689817898188981989820898218982289823898248982589826898278982889829898308983189832898338983489835898368983789838898398984089841898428984389844898458984689847898488984989850898518985289853898548985589856898578985889859898608986189862898638986489865898668986789868898698987089871898728987389874898758987689877898788987989880898818988289883898848988589886898878988889889898908989189892898938989489895898968989789898898998990089901899028990389904899058990689907899088990989910899118991289913899148991589916899178991889919899208992189922899238992489925899268992789928899298993089931899328993389934899358993689937899388993989940899418994289943899448994589946899478994889949899508995189952899538995489955899568995789958899598996089961899628996389964899658996689967899688996989970899718997289973899748997589976899778997889979899808998189982899838998489985899868998789988899898999089991899928999389994899958999689997899988999990000900019000290003900049000590006900079000890009900109001190012900139001490015900169001790018900199002090021900229002390024900259002690027900289002990030900319003290033900349003590036900379003890039900409004190042900439004490045900469004790048900499005090051900529005390054900559005690057900589005990060900619006290063900649006590066900679006890069900709007190072900739007490075900769007790078900799008090081900829008390084900859008690087900889008990090900919009290093900949009590096900979009890099901009010190102901039010490105901069010790108901099011090111901129011390114901159011690117901189011990120901219012290123901249012590126901279012890129901309013190132901339013490135901369013790138901399014090141901429014390144901459014690147901489014990150901519015290153901549015590156901579015890159901609016190162901639016490165901669016790168901699017090171901729017390174901759017690177901789017990180901819018290183901849018590186901879018890189901909019190192901939019490195901969019790198901999020090201902029020390204902059020690207902089020990210902119021290213902149021590216902179021890219902209022190222902239022490225902269022790228902299023090231902329023390234902359023690237902389023990240902419024290243902449024590246902479024890249902509025190252902539025490255902569025790258902599026090261902629026390264902659026690267902689026990270902719027290273902749027590276902779027890279902809028190282902839028490285902869028790288902899029090291902929029390294902959029690297902989029990300903019030290303903049030590306903079030890309903109031190312903139031490315903169031790318903199032090321903229032390324903259032690327903289032990330903319033290333903349033590336903379033890339903409034190342903439034490345903469034790348903499035090351903529035390354903559035690357903589035990360903619036290363903649036590366903679036890369903709037190372903739037490375903769037790378903799038090381903829038390384903859038690387903889038990390903919039290393903949039590396903979039890399904009040190402904039040490405904069040790408904099041090411904129041390414904159041690417904189041990420904219042290423904249042590426904279042890429904309043190432904339043490435904369043790438904399044090441904429044390444904459044690447904489044990450904519045290453904549045590456904579045890459904609046190462904639046490465904669046790468904699047090471904729047390474904759047690477904789047990480904819048290483904849048590486904879048890489904909049190492904939049490495904969049790498904999050090501905029050390504905059050690507905089050990510905119051290513905149051590516905179051890519905209052190522905239052490525905269052790528905299053090531905329053390534905359053690537905389053990540905419054290543905449054590546905479054890549905509055190552905539055490555905569055790558905599056090561905629056390564905659056690567905689056990570905719057290573905749057590576905779057890579905809058190582905839058490585905869058790588905899059090591905929059390594905959059690597905989059990600906019060290603906049060590606906079060890609906109061190612906139061490615906169061790618906199062090621906229062390624906259062690627906289062990630906319063290633906349063590636906379063890639906409064190642906439064490645906469064790648906499065090651906529065390654906559065690657906589065990660906619066290663906649066590666906679066890669906709067190672906739067490675906769067790678906799068090681906829068390684906859068690687906889068990690906919069290693906949069590696906979069890699907009070190702907039070490705907069070790708907099071090711907129071390714907159071690717907189071990720907219072290723907249072590726907279072890729907309073190732907339073490735907369073790738907399074090741907429074390744907459074690747907489074990750907519075290753907549075590756907579075890759907609076190762907639076490765907669076790768907699077090771907729077390774907759077690777907789077990780907819078290783907849078590786907879078890789907909079190792907939079490795907969079790798907999080090801908029080390804908059080690807908089080990810908119081290813908149081590816908179081890819908209082190822908239082490825908269082790828908299083090831908329083390834908359083690837908389083990840908419084290843908449084590846908479084890849908509085190852908539085490855908569085790858908599086090861908629086390864908659086690867908689086990870908719087290873908749087590876908779087890879908809088190882908839088490885908869088790888908899089090891908929089390894908959089690897908989089990900909019090290903909049090590906909079090890909909109091190912909139091490915909169091790918909199092090921909229092390924909259092690927909289092990930909319093290933909349093590936909379093890939909409094190942909439094490945909469094790948909499095090951909529095390954909559095690957909589095990960909619096290963909649096590966909679096890969909709097190972909739097490975909769097790978909799098090981909829098390984909859098690987909889098990990909919099290993909949099590996909979099890999910009100191002910039100491005910069100791008910099101091011910129101391014910159101691017910189101991020910219102291023910249102591026910279102891029910309103191032910339103491035910369103791038910399104091041910429104391044910459104691047910489104991050910519105291053910549105591056910579105891059910609106191062910639106491065910669106791068910699107091071910729107391074910759107691077910789107991080910819108291083910849108591086910879108891089910909109191092910939109491095910969109791098910999110091101911029110391104911059110691107911089110991110911119111291113911149111591116911179111891119911209112191122911239112491125911269112791128911299113091131911329113391134911359113691137911389113991140911419114291143911449114591146911479114891149911509115191152911539115491155911569115791158911599116091161911629116391164911659116691167911689116991170911719117291173911749117591176911779117891179911809118191182911839118491185911869118791188911899119091191911929119391194911959119691197911989119991200912019120291203912049120591206912079120891209912109121191212912139121491215912169121791218912199122091221912229122391224912259122691227912289122991230912319123291233912349123591236912379123891239912409124191242912439124491245912469124791248912499125091251912529125391254912559125691257912589125991260912619126291263912649126591266912679126891269912709127191272912739127491275912769127791278912799128091281912829128391284912859128691287912889128991290912919129291293912949129591296912979129891299913009130191302913039130491305913069130791308913099131091311913129131391314913159131691317913189131991320913219132291323913249132591326913279132891329913309133191332913339133491335913369133791338913399134091341913429134391344913459134691347913489134991350913519135291353913549135591356913579135891359913609136191362913639136491365913669136791368913699137091371913729137391374913759137691377913789137991380913819138291383913849138591386913879138891389913909139191392913939139491395913969139791398913999140091401914029140391404914059140691407914089140991410914119141291413914149141591416914179141891419914209142191422914239142491425914269142791428914299143091431914329143391434914359143691437914389143991440914419144291443914449144591446914479144891449914509145191452914539145491455914569145791458914599146091461914629146391464914659146691467914689146991470914719147291473914749147591476914779147891479914809148191482914839148491485914869148791488914899149091491914929149391494914959149691497914989149991500915019150291503915049150591506915079150891509915109151191512915139151491515915169151791518915199152091521915229152391524915259152691527915289152991530915319153291533915349153591536915379153891539915409154191542915439154491545915469154791548915499155091551915529155391554915559155691557915589155991560915619156291563915649156591566915679156891569915709157191572915739157491575915769157791578915799158091581915829158391584915859158691587915889158991590915919159291593915949159591596915979159891599916009160191602916039160491605916069160791608916099161091611916129161391614916159161691617916189161991620916219162291623916249162591626916279162891629916309163191632916339163491635916369163791638916399164091641916429164391644916459164691647916489164991650916519165291653916549165591656916579165891659916609166191662916639166491665916669166791668916699167091671916729167391674916759167691677916789167991680916819168291683916849168591686916879168891689916909169191692916939169491695916969169791698916999170091701917029170391704917059170691707917089170991710917119171291713917149171591716917179171891719917209172191722917239172491725917269172791728917299173091731917329173391734917359173691737917389173991740917419174291743917449174591746917479174891749917509175191752917539175491755917569175791758917599176091761917629176391764917659176691767917689176991770917719177291773917749177591776917779177891779917809178191782917839178491785917869178791788917899179091791917929179391794917959179691797917989179991800918019180291803918049180591806918079180891809918109181191812918139181491815918169181791818918199182091821918229182391824918259182691827918289182991830918319183291833918349183591836918379183891839918409184191842918439184491845918469184791848918499185091851918529185391854918559185691857918589185991860918619186291863918649186591866918679186891869918709187191872918739187491875918769187791878918799188091881918829188391884918859188691887918889188991890918919189291893918949189591896918979189891899919009190191902919039190491905919069190791908919099191091911919129191391914919159191691917919189191991920919219192291923919249192591926919279192891929919309193191932919339193491935919369193791938919399194091941919429194391944919459194691947919489194991950919519195291953919549195591956919579195891959919609196191962919639196491965919669196791968919699197091971919729197391974919759197691977919789197991980919819198291983919849198591986919879198891989919909199191992919939199491995919969199791998919999200092001920029200392004920059200692007920089200992010920119201292013920149201592016920179201892019920209202192022920239202492025920269202792028920299203092031920329203392034920359203692037920389203992040920419204292043920449204592046920479204892049920509205192052920539205492055920569205792058920599206092061920629206392064920659206692067920689206992070920719207292073920749207592076920779207892079920809208192082920839208492085920869208792088920899209092091920929209392094920959209692097920989209992100921019210292103921049210592106921079210892109921109211192112921139211492115921169211792118921199212092121921229212392124921259212692127921289212992130921319213292133921349213592136921379213892139921409214192142921439214492145921469214792148921499215092151921529215392154921559215692157921589215992160921619216292163921649216592166921679216892169921709217192172921739217492175921769217792178921799218092181921829218392184921859218692187921889218992190921919219292193921949219592196921979219892199922009220192202922039220492205922069220792208922099221092211922129221392214922159221692217922189221992220922219222292223922249222592226922279222892229922309223192232922339223492235922369223792238922399224092241922429224392244922459224692247922489224992250922519225292253922549225592256922579225892259922609226192262922639226492265922669226792268922699227092271922729227392274922759227692277922789227992280922819228292283922849228592286922879228892289922909229192292922939229492295922969229792298922999230092301923029230392304923059230692307923089230992310923119231292313923149231592316923179231892319923209232192322923239232492325923269232792328923299233092331923329233392334923359233692337923389233992340923419234292343923449234592346923479234892349923509235192352923539235492355923569235792358923599236092361923629236392364923659236692367923689236992370923719237292373923749237592376923779237892379923809238192382923839238492385923869238792388923899239092391923929239392394923959239692397923989239992400924019240292403924049240592406924079240892409924109241192412924139241492415924169241792418924199242092421924229242392424924259242692427924289242992430924319243292433924349243592436924379243892439924409244192442924439244492445924469244792448924499245092451924529245392454924559245692457924589245992460924619246292463924649246592466924679246892469924709247192472924739247492475924769247792478924799248092481924829248392484924859248692487924889248992490924919249292493924949249592496924979249892499925009250192502925039250492505925069250792508925099251092511925129251392514925159251692517925189251992520925219252292523925249252592526925279252892529925309253192532925339253492535925369253792538925399254092541925429254392544925459254692547925489254992550925519255292553925549255592556925579255892559925609256192562925639256492565925669256792568925699257092571925729257392574925759257692577925789257992580925819258292583925849258592586925879258892589925909259192592925939259492595925969259792598925999260092601926029260392604926059260692607926089260992610926119261292613926149261592616926179261892619926209262192622926239262492625926269262792628926299263092631926329263392634926359263692637926389263992640926419264292643926449264592646926479264892649926509265192652926539265492655926569265792658926599266092661926629266392664926659266692667926689266992670926719267292673926749267592676926779267892679926809268192682926839268492685926869268792688926899269092691926929269392694926959269692697926989269992700927019270292703927049270592706927079270892709927109271192712927139271492715927169271792718927199272092721927229272392724927259272692727927289272992730927319273292733927349273592736927379273892739927409274192742927439274492745927469274792748927499275092751927529275392754927559275692757927589275992760927619276292763927649276592766927679276892769927709277192772927739277492775927769277792778927799278092781927829278392784927859278692787927889278992790927919279292793927949279592796927979279892799928009280192802928039280492805928069280792808928099281092811928129281392814928159281692817928189281992820928219282292823928249282592826928279282892829928309283192832928339283492835928369283792838928399284092841928429284392844928459284692847928489284992850928519285292853928549285592856928579285892859928609286192862928639286492865928669286792868928699287092871928729287392874928759287692877928789287992880928819288292883928849288592886928879288892889928909289192892928939289492895928969289792898928999290092901929029290392904929059290692907929089290992910929119291292913929149291592916929179291892919929209292192922929239292492925929269292792928929299293092931929329293392934929359293692937929389293992940929419294292943929449294592946929479294892949929509295192952929539295492955929569295792958929599296092961929629296392964929659296692967929689296992970929719297292973929749297592976929779297892979929809298192982929839298492985929869298792988929899299092991929929299392994929959299692997929989299993000930019300293003930049300593006930079300893009930109301193012930139301493015930169301793018930199302093021930229302393024930259302693027930289302993030930319303293033930349303593036930379303893039930409304193042930439304493045930469304793048930499305093051930529305393054930559305693057930589305993060930619306293063930649306593066930679306893069930709307193072930739307493075930769307793078930799308093081930829308393084930859308693087930889308993090930919309293093930949309593096930979309893099931009310193102931039310493105931069310793108931099311093111931129311393114931159311693117931189311993120931219312293123931249312593126931279312893129931309313193132931339313493135931369313793138931399314093141931429314393144931459314693147931489314993150931519315293153931549315593156931579315893159931609316193162931639316493165931669316793168931699317093171931729317393174931759317693177931789317993180931819318293183931849318593186931879318893189931909319193192931939319493195931969319793198931999320093201932029320393204932059320693207932089320993210932119321293213932149321593216932179321893219932209322193222932239322493225932269322793228932299323093231932329323393234932359323693237932389323993240932419324293243932449324593246932479324893249932509325193252932539325493255932569325793258932599326093261932629326393264932659326693267932689326993270932719327293273932749327593276932779327893279932809328193282932839328493285932869328793288932899329093291932929329393294932959329693297932989329993300933019330293303933049330593306933079330893309933109331193312933139331493315933169331793318933199332093321933229332393324933259332693327933289332993330933319333293333933349333593336933379333893339933409334193342933439334493345933469334793348933499335093351933529335393354933559335693357933589335993360933619336293363933649336593366933679336893369933709337193372933739337493375933769337793378933799338093381933829338393384933859338693387933889338993390933919339293393933949339593396933979339893399934009340193402934039340493405934069340793408934099341093411934129341393414934159341693417934189341993420934219342293423934249342593426934279342893429934309343193432934339343493435934369343793438934399344093441934429344393444934459344693447934489344993450934519345293453934549345593456934579345893459934609346193462934639346493465934669346793468934699347093471934729347393474934759347693477934789347993480934819348293483934849348593486934879348893489934909349193492934939349493495934969349793498934999350093501935029350393504935059350693507935089350993510935119351293513935149351593516935179351893519935209352193522935239352493525935269352793528935299353093531935329353393534935359353693537935389353993540935419354293543935449354593546935479354893549935509355193552935539355493555935569355793558935599356093561935629356393564935659356693567935689356993570935719357293573935749357593576935779357893579935809358193582935839358493585935869358793588935899359093591935929359393594935959359693597935989359993600936019360293603936049360593606936079360893609936109361193612936139361493615936169361793618936199362093621936229362393624936259362693627936289362993630936319363293633936349363593636936379363893639936409364193642936439364493645936469364793648936499365093651936529365393654936559365693657936589365993660936619366293663936649366593666936679366893669936709367193672936739367493675936769367793678936799368093681936829368393684936859368693687936889368993690936919369293693936949369593696936979369893699937009370193702937039370493705937069370793708937099371093711937129371393714937159371693717937189371993720937219372293723937249372593726937279372893729937309373193732937339373493735937369373793738937399374093741937429374393744937459374693747937489374993750937519375293753937549375593756937579375893759937609376193762937639376493765937669376793768937699377093771937729377393774937759377693777937789377993780937819378293783937849378593786937879378893789937909379193792937939379493795937969379793798937999380093801938029380393804938059380693807938089380993810938119381293813938149381593816938179381893819938209382193822938239382493825938269382793828938299383093831938329383393834938359383693837938389383993840938419384293843938449384593846938479384893849938509385193852938539385493855938569385793858938599386093861938629386393864938659386693867938689386993870938719387293873938749387593876938779387893879938809388193882938839388493885938869388793888938899389093891938929389393894938959389693897938989389993900939019390293903939049390593906939079390893909939109391193912939139391493915939169391793918939199392093921939229392393924939259392693927939289392993930939319393293933939349393593936939379393893939939409394193942939439394493945939469394793948939499395093951939529395393954939559395693957939589395993960939619396293963939649396593966939679396893969939709397193972939739397493975939769397793978939799398093981939829398393984939859398693987939889398993990939919399293993939949399593996939979399893999940009400194002940039400494005940069400794008940099401094011940129401394014940159401694017940189401994020940219402294023940249402594026940279402894029940309403194032940339403494035940369403794038940399404094041940429404394044940459404694047940489404994050940519405294053940549405594056940579405894059940609406194062940639406494065940669406794068940699407094071940729407394074940759407694077940789407994080940819408294083940849408594086940879408894089940909409194092940939409494095940969409794098940999410094101941029410394104941059410694107941089410994110941119411294113941149411594116941179411894119941209412194122941239412494125941269412794128941299413094131941329413394134941359413694137941389413994140941419414294143941449414594146941479414894149941509415194152941539415494155941569415794158941599416094161941629416394164941659416694167941689416994170941719417294173941749417594176941779417894179941809418194182941839418494185941869418794188941899419094191941929419394194941959419694197941989419994200942019420294203942049420594206942079420894209942109421194212942139421494215942169421794218942199422094221942229422394224942259422694227942289422994230942319423294233942349423594236942379423894239942409424194242942439424494245942469424794248942499425094251942529425394254942559425694257942589425994260942619426294263942649426594266942679426894269942709427194272942739427494275942769427794278942799428094281942829428394284942859428694287942889428994290942919429294293942949429594296942979429894299943009430194302943039430494305943069430794308943099431094311943129431394314943159431694317943189431994320943219432294323943249432594326943279432894329943309433194332943339433494335943369433794338943399434094341943429434394344943459434694347943489434994350943519435294353943549435594356943579435894359943609436194362943639436494365943669436794368943699437094371943729437394374943759437694377943789437994380943819438294383943849438594386943879438894389943909439194392943939439494395943969439794398943999440094401944029440394404944059440694407944089440994410944119441294413944149441594416944179441894419944209442194422944239442494425944269442794428944299443094431944329443394434944359443694437944389443994440944419444294443944449444594446944479444894449944509445194452944539445494455944569445794458944599446094461944629446394464944659446694467944689446994470944719447294473944749447594476944779447894479944809448194482944839448494485944869448794488944899449094491944929449394494944959449694497944989449994500945019450294503945049450594506945079450894509945109451194512945139451494515945169451794518945199452094521945229452394524945259452694527945289452994530945319453294533945349453594536945379453894539945409454194542945439454494545945469454794548945499455094551945529455394554945559455694557945589455994560945619456294563945649456594566945679456894569945709457194572945739457494575945769457794578945799458094581945829458394584945859458694587945889458994590945919459294593945949459594596945979459894599946009460194602946039460494605946069460794608946099461094611946129461394614946159461694617946189461994620946219462294623946249462594626946279462894629946309463194632946339463494635946369463794638946399464094641946429464394644946459464694647946489464994650946519465294653946549465594656946579465894659946609466194662946639466494665946669466794668946699467094671946729467394674946759467694677946789467994680946819468294683946849468594686946879468894689946909469194692946939469494695946969469794698946999470094701947029470394704947059470694707947089470994710947119471294713947149471594716947179471894719947209472194722947239472494725947269472794728947299473094731947329473394734947359473694737947389473994740947419474294743947449474594746947479474894749947509475194752947539475494755947569475794758947599476094761947629476394764947659476694767947689476994770947719477294773947749477594776947779477894779947809478194782947839478494785947869478794788947899479094791947929479394794947959479694797947989479994800948019480294803948049480594806948079480894809948109481194812948139481494815948169481794818948199482094821948229482394824948259482694827948289482994830948319483294833948349483594836948379483894839948409484194842948439484494845948469484794848948499485094851948529485394854948559485694857948589485994860948619486294863948649486594866948679486894869948709487194872948739487494875948769487794878948799488094881948829488394884948859488694887948889488994890948919489294893948949489594896948979489894899949009490194902949039490494905949069490794908949099491094911949129491394914949159491694917949189491994920949219492294923949249492594926949279492894929949309493194932949339493494935949369493794938949399494094941949429494394944949459494694947949489494994950949519495294953949549495594956949579495894959949609496194962949639496494965949669496794968949699497094971949729497394974949759497694977949789497994980949819498294983949849498594986949879498894989949909499194992949939499494995949969499794998949999500095001950029500395004950059500695007950089500995010950119501295013950149501595016950179501895019950209502195022950239502495025950269502795028950299503095031950329503395034950359503695037950389503995040950419504295043950449504595046950479504895049950509505195052950539505495055950569505795058950599506095061950629506395064950659506695067950689506995070950719507295073950749507595076950779507895079950809508195082950839508495085950869508795088950899509095091950929509395094950959509695097950989509995100951019510295103951049510595106951079510895109951109511195112951139511495115951169511795118951199512095121951229512395124951259512695127951289512995130951319513295133951349513595136951379513895139951409514195142951439514495145951469514795148951499515095151951529515395154951559515695157951589515995160951619516295163951649516595166951679516895169951709517195172951739517495175951769517795178951799518095181951829518395184951859518695187951889518995190951919519295193951949519595196951979519895199952009520195202952039520495205952069520795208952099521095211952129521395214952159521695217952189521995220952219522295223952249522595226952279522895229952309523195232952339523495235952369523795238952399524095241952429524395244952459524695247952489524995250952519525295253952549525595256952579525895259952609526195262952639526495265952669526795268952699527095271952729527395274952759527695277952789527995280952819528295283952849528595286952879528895289952909529195292952939529495295952969529795298952999530095301953029530395304953059530695307953089530995310953119531295313953149531595316953179531895319953209532195322953239532495325953269532795328953299533095331953329533395334953359533695337953389533995340953419534295343953449534595346953479534895349953509535195352953539535495355953569535795358953599536095361953629536395364953659536695367953689536995370953719537295373953749537595376953779537895379953809538195382953839538495385953869538795388953899539095391953929539395394953959539695397953989539995400954019540295403954049540595406954079540895409954109541195412954139541495415954169541795418954199542095421954229542395424954259542695427954289542995430954319543295433954349543595436954379543895439954409544195442954439544495445954469544795448954499545095451954529545395454954559545695457954589545995460954619546295463954649546595466954679546895469954709547195472954739547495475954769547795478954799548095481954829548395484954859548695487954889548995490954919549295493954949549595496954979549895499955009550195502955039550495505955069550795508955099551095511955129551395514955159551695517955189551995520955219552295523955249552595526955279552895529955309553195532955339553495535955369553795538955399554095541955429554395544955459554695547955489554995550955519555295553955549555595556955579555895559955609556195562955639556495565955669556795568955699557095571955729557395574955759557695577955789557995580955819558295583955849558595586955879558895589955909559195592955939559495595955969559795598955999560095601956029560395604956059560695607956089560995610956119561295613956149561595616956179561895619956209562195622956239562495625956269562795628956299563095631956329563395634956359563695637956389563995640956419564295643956449564595646956479564895649956509565195652956539565495655956569565795658956599566095661956629566395664956659566695667956689566995670956719567295673956749567595676956779567895679956809568195682956839568495685956869568795688956899569095691956929569395694956959569695697956989569995700957019570295703957049570595706957079570895709957109571195712957139571495715957169571795718957199572095721957229572395724957259572695727957289572995730957319573295733957349573595736957379573895739957409574195742957439574495745957469574795748957499575095751957529575395754957559575695757957589575995760957619576295763957649576595766957679576895769957709577195772957739577495775957769577795778957799578095781957829578395784957859578695787957889578995790957919579295793957949579595796957979579895799958009580195802958039580495805958069580795808958099581095811958129581395814958159581695817958189581995820958219582295823958249582595826958279582895829958309583195832958339583495835958369583795838958399584095841958429584395844958459584695847958489584995850958519585295853958549585595856958579585895859958609586195862958639586495865958669586795868958699587095871958729587395874958759587695877958789587995880958819588295883958849588595886958879588895889958909589195892958939589495895958969589795898958999590095901959029590395904959059590695907959089590995910959119591295913959149591595916959179591895919959209592195922959239592495925959269592795928959299593095931959329593395934959359593695937959389593995940959419594295943959449594595946959479594895949959509595195952959539595495955959569595795958959599596095961959629596395964959659596695967959689596995970959719597295973959749597595976959779597895979959809598195982959839598495985959869598795988959899599095991959929599395994959959599695997959989599996000960019600296003960049600596006960079600896009960109601196012960139601496015960169601796018960199602096021960229602396024960259602696027960289602996030960319603296033960349603596036960379603896039960409604196042960439604496045960469604796048960499605096051960529605396054960559605696057960589605996060960619606296063960649606596066960679606896069960709607196072960739607496075960769607796078960799608096081960829608396084960859608696087960889608996090960919609296093960949609596096960979609896099961009610196102961039610496105961069610796108961099611096111961129611396114961159611696117961189611996120961219612296123961249612596126961279612896129961309613196132961339613496135961369613796138961399614096141961429614396144961459614696147961489614996150961519615296153961549615596156961579615896159961609616196162961639616496165961669616796168961699617096171961729617396174961759617696177961789617996180961819618296183961849618596186961879618896189961909619196192961939619496195961969619796198961999620096201962029620396204962059620696207962089620996210962119621296213962149621596216962179621896219962209622196222962239622496225962269622796228962299623096231962329623396234962359623696237962389623996240962419624296243962449624596246962479624896249962509625196252962539625496255962569625796258962599626096261962629626396264962659626696267962689626996270962719627296273962749627596276962779627896279962809628196282962839628496285962869628796288962899629096291962929629396294962959629696297962989629996300963019630296303963049630596306963079630896309963109631196312963139631496315963169631796318963199632096321963229632396324963259632696327963289632996330963319633296333963349633596336963379633896339963409634196342963439634496345963469634796348963499635096351963529635396354963559635696357963589635996360963619636296363963649636596366963679636896369963709637196372963739637496375963769637796378963799638096381963829638396384963859638696387963889638996390963919639296393963949639596396963979639896399964009640196402964039640496405964069640796408964099641096411964129641396414964159641696417964189641996420964219642296423964249642596426964279642896429964309643196432964339643496435964369643796438964399644096441964429644396444964459644696447964489644996450964519645296453964549645596456964579645896459964609646196462964639646496465964669646796468964699647096471964729647396474964759647696477964789647996480964819648296483964849648596486964879648896489964909649196492964939649496495964969649796498964999650096501965029650396504965059650696507965089650996510965119651296513965149651596516965179651896519965209652196522965239652496525965269652796528965299653096531965329653396534965359653696537965389653996540965419654296543965449654596546965479654896549965509655196552965539655496555965569655796558965599656096561965629656396564965659656696567965689656996570965719657296573965749657596576965779657896579965809658196582965839658496585965869658796588965899659096591965929659396594965959659696597965989659996600966019660296603966049660596606966079660896609966109661196612966139661496615966169661796618966199662096621966229662396624966259662696627966289662996630966319663296633966349663596636966379663896639966409664196642966439664496645966469664796648966499665096651966529665396654966559665696657966589665996660966619666296663966649666596666966679666896669966709667196672966739667496675966769667796678966799668096681966829668396684966859668696687966889668996690966919669296693966949669596696966979669896699967009670196702967039670496705967069670796708967099671096711967129671396714967159671696717967189671996720967219672296723967249672596726967279672896729967309673196732967339673496735967369673796738967399674096741967429674396744967459674696747967489674996750967519675296753967549675596756967579675896759967609676196762967639676496765967669676796768967699677096771967729677396774967759677696777967789677996780967819678296783967849678596786967879678896789967909679196792967939679496795967969679796798967999680096801968029680396804968059680696807968089680996810968119681296813968149681596816968179681896819968209682196822968239682496825968269682796828968299683096831968329683396834968359683696837968389683996840968419684296843968449684596846968479684896849968509685196852968539685496855968569685796858968599686096861968629686396864968659686696867968689686996870968719687296873968749687596876968779687896879968809688196882968839688496885968869688796888968899689096891968929689396894968959689696897968989689996900969019690296903969049690596906969079690896909969109691196912969139691496915969169691796918969199692096921969229692396924969259692696927969289692996930969319693296933969349693596936969379693896939969409694196942969439694496945969469694796948969499695096951969529695396954969559695696957969589695996960969619696296963969649696596966969679696896969969709697196972969739697496975969769697796978969799698096981969829698396984969859698696987969889698996990969919699296993969949699596996969979699896999970009700197002970039700497005970069700797008970099701097011970129701397014970159701697017970189701997020970219702297023970249702597026970279702897029970309703197032970339703497035970369703797038970399704097041970429704397044970459704697047970489704997050970519705297053970549705597056970579705897059970609706197062970639706497065970669706797068970699707097071970729707397074970759707697077970789707997080970819708297083970849708597086970879708897089970909709197092970939709497095970969709797098970999710097101971029710397104971059710697107971089710997110971119711297113971149711597116971179711897119971209712197122971239712497125971269712797128971299713097131971329713397134971359713697137971389713997140971419714297143971449714597146971479714897149971509715197152971539715497155971569715797158971599716097161971629716397164971659716697167971689716997170971719717297173971749717597176971779717897179971809718197182971839718497185971869718797188971899719097191971929719397194971959719697197971989719997200972019720297203972049720597206972079720897209972109721197212972139721497215972169721797218972199722097221972229722397224972259722697227972289722997230972319723297233972349723597236972379723897239972409724197242972439724497245972469724797248972499725097251972529725397254972559725697257972589725997260972619726297263972649726597266972679726897269972709727197272972739727497275972769727797278972799728097281972829728397284972859728697287972889728997290972919729297293972949729597296972979729897299973009730197302973039730497305973069730797308973099731097311973129731397314973159731697317973189731997320973219732297323973249732597326973279732897329973309733197332973339733497335973369733797338973399734097341973429734397344973459734697347973489734997350973519735297353973549735597356973579735897359973609736197362973639736497365973669736797368973699737097371973729737397374973759737697377973789737997380973819738297383973849738597386973879738897389973909739197392973939739497395973969739797398973999740097401974029740397404974059740697407974089740997410974119741297413974149741597416974179741897419974209742197422974239742497425974269742797428974299743097431974329743397434974359743697437974389743997440974419744297443974449744597446974479744897449974509745197452974539745497455974569745797458974599746097461974629746397464974659746697467974689746997470974719747297473974749747597476974779747897479974809748197482974839748497485974869748797488974899749097491974929749397494974959749697497974989749997500975019750297503975049750597506975079750897509975109751197512975139751497515975169751797518975199752097521975229752397524975259752697527975289752997530975319753297533975349753597536975379753897539975409754197542975439754497545975469754797548975499755097551975529755397554975559755697557975589755997560975619756297563975649756597566975679756897569975709757197572975739757497575975769757797578975799758097581975829758397584975859758697587975889758997590975919759297593975949759597596975979759897599976009760197602976039760497605976069760797608976099761097611976129761397614976159761697617976189761997620976219762297623976249762597626976279762897629976309763197632976339763497635976369763797638976399764097641976429764397644976459764697647976489764997650976519765297653976549765597656976579765897659976609766197662976639766497665976669766797668976699767097671976729767397674976759767697677976789767997680976819768297683976849768597686976879768897689976909769197692976939769497695976969769797698976999770097701977029770397704977059770697707977089770997710977119771297713977149771597716977179771897719977209772197722977239772497725977269772797728977299773097731977329773397734977359773697737977389773997740977419774297743977449774597746977479774897749977509775197752977539775497755977569775797758977599776097761977629776397764977659776697767977689776997770977719777297773977749777597776977779777897779977809778197782977839778497785977869778797788977899779097791977929779397794977959779697797977989779997800978019780297803978049780597806978079780897809978109781197812978139781497815978169781797818978199782097821978229782397824978259782697827978289782997830978319783297833978349783597836978379783897839978409784197842978439784497845978469784797848978499785097851978529785397854978559785697857978589785997860978619786297863978649786597866978679786897869978709787197872978739787497875978769787797878978799788097881978829788397884978859788697887978889788997890978919789297893978949789597896978979789897899979009790197902979039790497905979069790797908979099791097911979129791397914979159791697917979189791997920979219792297923979249792597926979279792897929979309793197932979339793497935979369793797938979399794097941979429794397944979459794697947979489794997950979519795297953979549795597956979579795897959979609796197962979639796497965979669796797968979699797097971979729797397974979759797697977979789797997980979819798297983979849798597986979879798897989979909799197992979939799497995979969799797998979999800098001980029800398004980059800698007980089800998010980119801298013980149801598016980179801898019980209802198022980239802498025980269802798028980299803098031980329803398034980359803698037980389803998040980419804298043980449804598046980479804898049980509805198052980539805498055980569805798058980599806098061980629806398064980659806698067980689806998070980719807298073980749807598076980779807898079980809808198082980839808498085980869808798088980899809098091980929809398094980959809698097980989809998100981019810298103981049810598106981079810898109981109811198112981139811498115981169811798118981199812098121981229812398124981259812698127981289812998130981319813298133981349813598136981379813898139981409814198142981439814498145981469814798148981499815098151981529815398154981559815698157981589815998160981619816298163981649816598166981679816898169981709817198172981739817498175981769817798178981799818098181981829818398184981859818698187981889818998190981919819298193981949819598196981979819898199982009820198202982039820498205982069820798208982099821098211982129821398214982159821698217982189821998220982219822298223982249822598226982279822898229982309823198232982339823498235982369823798238982399824098241982429824398244982459824698247982489824998250982519825298253982549825598256982579825898259982609826198262982639826498265982669826798268982699827098271982729827398274982759827698277982789827998280982819828298283982849828598286982879828898289982909829198292982939829498295982969829798298982999830098301983029830398304983059830698307983089830998310983119831298313983149831598316983179831898319983209832198322983239832498325983269832798328983299833098331983329833398334983359833698337983389833998340983419834298343983449834598346983479834898349983509835198352983539835498355983569835798358983599836098361983629836398364983659836698367983689836998370983719837298373983749837598376983779837898379983809838198382983839838498385983869838798388983899839098391983929839398394983959839698397983989839998400984019840298403984049840598406984079840898409984109841198412984139841498415984169841798418984199842098421984229842398424984259842698427984289842998430984319843298433984349843598436984379843898439984409844198442984439844498445984469844798448984499845098451984529845398454984559845698457984589845998460984619846298463984649846598466984679846898469984709847198472984739847498475984769847798478984799848098481984829848398484984859848698487984889848998490984919849298493984949849598496984979849898499985009850198502985039850498505985069850798508985099851098511985129851398514985159851698517985189851998520985219852298523985249852598526985279852898529985309853198532985339853498535985369853798538985399854098541985429854398544985459854698547985489854998550985519855298553985549855598556985579855898559985609856198562985639856498565985669856798568985699857098571985729857398574985759857698577985789857998580985819858298583985849858598586985879858898589985909859198592985939859498595985969859798598985999860098601986029860398604986059860698607986089860998610986119861298613986149861598616986179861898619986209862198622986239862498625986269862798628986299863098631986329863398634986359863698637986389863998640986419864298643986449864598646986479864898649986509865198652986539865498655986569865798658986599866098661986629866398664986659866698667986689866998670986719867298673986749867598676986779867898679986809868198682986839868498685986869868798688986899869098691986929869398694986959869698697986989869998700987019870298703987049870598706987079870898709987109871198712987139871498715987169871798718987199872098721987229872398724987259872698727987289872998730987319873298733987349873598736987379873898739987409874198742987439874498745987469874798748987499875098751987529875398754987559875698757987589875998760987619876298763987649876598766987679876898769987709877198772987739877498775987769877798778987799878098781987829878398784987859878698787987889878998790987919879298793987949879598796987979879898799988009880198802988039880498805988069880798808988099881098811988129881398814988159881698817988189881998820988219882298823988249882598826988279882898829988309883198832988339883498835988369883798838988399884098841988429884398844988459884698847988489884998850988519885298853988549885598856988579885898859988609886198862988639886498865988669886798868988699887098871988729887398874988759887698877988789887998880988819888298883988849888598886988879888898889988909889198892988939889498895988969889798898988999890098901989029890398904989059890698907989089890998910989119891298913989149891598916989179891898919989209892198922989239892498925989269892798928989299893098931989329893398934989359893698937989389893998940989419894298943989449894598946989479894898949989509895198952989539895498955989569895798958989599896098961989629896398964989659896698967989689896998970989719897298973989749897598976989779897898979989809898198982989839898498985989869898798988989899899098991989929899398994989959899698997989989899999000990019900299003990049900599006990079900899009990109901199012990139901499015990169901799018990199902099021990229902399024990259902699027990289902999030990319903299033990349903599036990379903899039990409904199042990439904499045990469904799048990499905099051990529905399054990559905699057990589905999060990619906299063990649906599066990679906899069990709907199072990739907499075990769907799078990799908099081990829908399084990859908699087990889908999090990919909299093990949909599096990979909899099991009910199102991039910499105991069910799108991099911099111991129911399114991159911699117991189911999120991219912299123991249912599126991279912899129991309913199132991339913499135991369913799138991399914099141991429914399144991459914699147991489914999150991519915299153991549915599156991579915899159991609916199162991639916499165991669916799168991699917099171991729917399174991759917699177991789917999180991819918299183991849918599186991879918899189991909919199192991939919499195991969919799198991999920099201992029920399204992059920699207992089920999210992119921299213992149921599216992179921899219992209922199222992239922499225992269922799228992299923099231992329923399234992359923699237992389923999240992419924299243992449924599246992479924899249992509925199252992539925499255992569925799258992599926099261992629926399264992659926699267992689926999270992719927299273992749927599276992779927899279992809928199282992839928499285992869928799288992899929099291992929929399294992959929699297992989929999300993019930299303993049930599306993079930899309993109931199312993139931499315993169931799318993199932099321993229932399324993259932699327993289932999330993319933299333993349933599336993379933899339993409934199342993439934499345993469934799348993499935099351993529935399354993559935699357993589935999360993619936299363993649936599366993679936899369993709937199372993739937499375993769937799378993799938099381993829938399384993859938699387993889938999390993919939299393993949939599396993979939899399994009940199402994039940499405994069940799408994099941099411994129941399414994159941699417994189941999420994219942299423994249942599426994279942899429994309943199432994339943499435994369943799438994399944099441994429944399444994459944699447994489944999450994519945299453994549945599456994579945899459994609946199462994639946499465994669946799468994699947099471994729947399474994759947699477994789947999480994819948299483994849948599486994879948899489994909949199492994939949499495994969949799498994999950099501995029950399504995059950699507995089950999510995119951299513995149951599516995179951899519995209952199522995239952499525995269952799528995299953099531995329953399534995359953699537995389953999540995419954299543995449954599546995479954899549995509955199552995539955499555995569955799558995599956099561995629956399564995659956699567995689956999570995719957299573995749957599576995779957899579995809958199582995839958499585995869958799588995899959099591995929959399594995959959699597995989959999600996019960299603996049960599606996079960899609996109961199612996139961499615996169961799618996199962099621996229962399624996259962699627996289962999630996319963299633996349963599636996379963899639996409964199642996439964499645996469964799648996499965099651996529965399654996559965699657996589965999660996619966299663996649966599666996679966899669996709967199672996739967499675996769967799678996799968099681996829968399684996859968699687996889968999690996919969299693996949969599696996979969899699997009970199702997039970499705997069970799708997099971099711997129971399714997159971699717997189971999720997219972299723997249972599726997279972899729997309973199732997339973499735997369973799738997399974099741997429974399744997459974699747997489974999750997519975299753997549975599756997579975899759997609976199762997639976499765997669976799768997699977099771997729977399774997759977699777997789977999780997819978299783997849978599786997879978899789997909979199792997939979499795997969979799798997999980099801998029980399804998059980699807998089980999810998119981299813998149981599816998179981899819998209982199822998239982499825998269982799828998299983099831998329983399834998359983699837998389983999840998419984299843998449984599846998479984899849998509985199852998539985499855998569985799858998599986099861998629986399864998659986699867998689986999870998719987299873998749987599876998779987899879998809988199882998839988499885998869988799888998899989099891998929989399894998959989699897998989989999900999019990299903999049990599906999079990899909999109991199912999139991499915999169991799918999199992099921999229992399924999259992699927999289992999930999319993299933999349993599936999379993899939999409994199942999439994499945999469994799948999499995099951999529995399954999559995699957999589995999960999619996299963999649996599966999679996899969999709997199972999739997499975999769997799978999799998099981999829998399984999859998699987999889998999990999919999299993999949999599996999979999899999100000100001100002100003100004100005100006100007100008100009100010100011100012100013100014100015100016100017100018100019100020100021100022100023100024100025100026100027100028100029100030100031100032100033100034100035100036100037100038100039100040100041100042100043100044100045100046100047100048100049100050100051100052100053100054100055100056100057100058100059100060100061100062100063100064100065100066100067100068100069100070100071100072100073100074100075100076100077100078100079100080100081100082100083100084100085100086100087100088100089100090100091100092100093100094100095100096100097100098100099100100100101100102100103100104100105100106100107100108100109100110100111100112100113100114100115100116100117100118100119100120100121100122100123100124100125100126100127100128100129100130100131100132100133100134100135100136100137100138100139100140100141100142100143100144100145100146100147100148100149100150100151100152100153100154100155100156100157100158100159100160100161100162100163100164100165100166100167100168100169100170100171100172100173100174100175100176100177100178100179100180100181100182100183100184100185100186100187100188100189100190100191100192100193100194100195100196100197100198100199100200100201100202100203100204100205100206100207100208100209100210100211100212100213100214100215100216100217100218100219100220100221100222100223100224100225100226100227100228100229100230100231100232100233100234100235100236100237100238100239100240100241100242100243100244100245100246100247100248100249100250100251100252100253100254100255100256100257100258100259100260100261100262100263100264100265100266100267100268100269100270100271100272100273100274100275100276100277100278100279100280100281100282100283100284100285100286100287100288100289100290100291100292100293100294100295100296100297100298100299100300100301100302100303100304100305100306100307100308100309100310100311100312100313100314100315100316100317100318100319100320100321100322100323100324100325100326100327100328100329100330100331100332100333100334100335100336100337100338100339100340100341100342100343100344100345100346100347100348100349100350100351100352100353100354100355100356100357100358100359100360100361100362100363100364100365100366100367100368100369100370100371100372100373100374100375100376100377100378100379100380100381100382100383100384100385100386100387100388100389100390100391100392100393100394100395100396100397100398100399100400100401100402100403100404100405100406100407100408100409100410100411100412100413100414100415100416100417100418100419100420100421100422100423100424100425100426100427100428100429100430100431100432100433100434100435100436100437100438100439100440100441100442100443100444100445100446100447100448100449100450100451100452100453100454100455100456100457100458100459100460100461100462100463100464100465100466100467100468100469100470100471100472100473100474100475100476100477100478100479100480100481100482100483100484100485100486100487100488100489100490100491100492100493100494100495100496100497100498100499100500100501100502100503100504100505100506100507100508100509100510100511100512100513100514100515100516100517100518100519100520100521100522100523100524100525100526100527100528100529100530100531100532100533100534100535100536100537100538100539100540100541100542100543100544100545100546100547100548100549100550100551100552100553100554100555100556100557100558100559100560100561100562100563100564100565100566100567100568100569100570100571100572100573100574100575100576100577100578100579100580100581100582100583100584100585100586100587100588100589100590100591100592100593100594100595100596100597100598100599100600100601100602100603100604100605100606100607100608100609100610100611100612100613100614100615100616100617100618100619100620100621100622100623100624100625100626100627100628100629100630100631100632100633100634100635100636100637100638100639100640100641100642100643100644100645100646100647100648100649100650100651100652100653100654100655100656100657100658100659100660100661100662100663100664100665100666100667100668100669100670100671100672100673100674100675100676100677100678100679100680100681100682100683100684100685100686100687100688100689100690100691100692100693100694100695100696100697100698100699100700100701100702100703100704100705100706100707100708100709100710100711100712100713100714100715100716100717100718100719100720100721100722100723100724100725100726100727100728100729100730100731100732100733100734100735100736100737100738100739100740100741100742100743100744100745100746100747100748100749100750100751100752100753100754100755100756100757100758100759100760100761100762100763100764100765100766100767100768100769100770100771100772100773100774100775100776100777100778100779100780100781100782100783100784100785100786100787100788100789100790100791100792100793100794100795100796100797100798100799100800100801100802100803100804100805100806100807100808100809100810100811100812100813100814100815100816100817100818100819100820100821100822100823100824100825100826100827100828100829100830100831100832100833100834100835100836100837100838100839100840100841100842100843100844100845100846100847100848100849100850100851100852100853100854100855100856100857100858100859100860100861100862100863100864100865100866100867100868100869100870100871100872100873100874100875100876100877100878100879100880100881100882100883100884100885100886100887100888100889100890100891100892100893100894100895100896100897100898100899100900100901100902100903100904100905100906100907100908100909100910100911100912100913100914100915100916100917100918100919100920100921100922100923100924100925100926100927100928100929100930100931100932100933100934100935100936100937100938100939100940100941100942100943100944100945100946100947100948100949100950100951100952100953100954100955100956100957100958100959100960100961100962100963100964100965100966100967100968100969100970100971100972100973100974100975100976100977100978100979100980100981100982100983100984100985100986100987100988100989100990100991100992100993100994100995100996100997100998100999101000101001101002101003101004101005101006101007101008101009101010101011101012101013101014101015101016101017101018101019101020101021101022101023101024101025101026101027101028101029101030101031101032101033101034101035101036101037101038101039101040101041101042101043101044101045101046101047101048101049101050101051101052101053101054101055101056101057101058101059101060101061101062101063101064101065101066101067101068101069101070101071101072101073101074101075101076101077101078101079101080101081101082101083101084101085101086101087101088101089101090101091101092101093101094101095101096101097101098101099101100101101101102101103101104101105101106101107101108101109101110101111101112101113101114101115101116101117101118101119101120101121101122101123101124101125101126101127101128101129101130101131101132101133101134101135101136101137101138101139101140101141101142101143101144101145101146101147101148101149101150101151101152101153101154101155101156101157101158101159101160101161101162101163101164101165101166101167101168101169101170101171101172101173101174101175101176101177101178101179101180101181101182101183101184101185101186101187101188101189101190101191101192101193101194101195101196101197101198101199101200101201101202101203101204101205101206101207101208101209101210101211101212101213101214101215101216101217101218101219101220101221101222101223101224101225101226101227101228101229101230101231101232101233101234101235101236101237101238101239101240101241101242101243101244101245101246101247101248101249101250101251101252101253101254101255101256101257101258101259101260101261101262101263101264101265101266101267101268101269101270101271101272101273101274101275101276101277101278101279101280101281101282101283101284101285101286101287101288101289101290101291101292101293101294101295101296101297101298101299101300101301101302101303101304101305101306101307101308101309101310101311101312101313101314101315101316101317101318101319101320101321101322101323101324101325101326101327101328101329101330101331101332101333101334101335101336101337101338101339101340101341101342101343101344101345101346101347101348101349101350101351101352101353101354101355101356101357101358101359101360101361101362101363101364101365101366101367101368101369101370101371101372101373101374101375101376101377101378101379101380101381101382101383101384101385101386101387101388101389101390101391101392101393101394101395101396101397101398101399101400101401101402101403101404101405101406101407101408101409101410101411101412101413101414101415101416101417101418101419101420101421101422101423101424101425101426101427101428101429101430101431101432101433101434101435101436101437101438101439101440101441101442101443101444101445101446101447101448101449101450101451101452101453101454101455101456101457101458101459101460101461101462101463101464101465101466101467101468101469101470101471101472101473101474101475101476101477101478101479101480101481101482101483101484101485101486101487101488101489101490101491101492101493101494101495101496101497101498101499101500101501101502101503101504101505101506101507101508101509101510101511101512101513101514101515101516101517101518101519101520101521101522101523101524101525101526101527101528101529101530101531101532101533101534101535101536101537101538101539101540101541101542101543101544101545101546101547101548101549101550101551101552101553101554101555101556101557101558101559101560101561101562101563101564101565101566101567101568101569101570101571101572101573101574101575101576101577101578101579101580101581101582101583101584101585101586101587101588101589101590101591101592101593101594101595101596101597101598101599101600101601101602101603101604101605101606101607101608101609101610101611101612101613101614101615101616101617101618101619101620101621101622101623101624101625101626101627101628101629101630101631101632101633101634101635101636101637101638101639101640101641101642101643101644101645101646101647101648101649101650101651101652101653101654101655101656101657101658101659101660101661101662101663101664101665101666101667101668101669101670101671101672101673101674101675101676101677101678101679101680101681101682101683101684101685101686101687101688101689101690101691101692101693101694101695101696101697101698101699101700101701101702101703101704101705101706101707101708101709101710101711101712101713101714101715101716101717101718101719101720101721101722101723101724101725101726101727101728101729101730101731101732101733101734101735101736101737101738101739101740101741101742101743101744101745101746101747101748101749101750101751101752101753101754101755101756101757101758101759101760101761101762101763101764101765101766101767101768101769101770101771101772101773101774101775101776101777101778101779101780101781101782101783101784101785101786101787101788101789101790101791101792101793101794101795101796101797101798101799101800101801101802101803101804101805101806101807101808101809101810101811101812101813101814101815101816101817101818101819101820101821101822101823101824101825101826101827101828101829101830101831101832101833101834101835101836101837101838101839101840101841101842101843101844101845101846101847101848101849101850101851101852101853101854101855101856101857101858101859101860101861101862101863101864101865101866101867101868101869101870101871101872101873101874101875101876101877101878101879101880101881101882101883101884101885101886101887101888101889101890101891101892101893101894101895101896101897101898101899101900101901101902101903101904101905101906101907101908101909101910101911101912101913101914101915101916101917101918101919101920101921101922101923101924101925101926101927101928101929101930101931101932101933101934101935101936101937101938101939101940101941101942101943101944101945101946101947101948101949101950101951101952101953101954101955101956101957101958101959101960101961101962101963101964101965101966101967101968101969101970101971101972101973101974101975101976101977101978101979101980101981101982101983101984101985101986101987101988101989101990101991101992101993101994101995101996101997101998101999102000102001102002102003102004102005102006102007102008102009102010102011102012102013102014102015102016102017102018102019102020102021102022102023102024102025102026102027102028102029102030102031102032102033102034102035102036102037102038102039102040102041102042102043102044102045102046102047102048102049102050102051102052102053102054102055102056102057102058102059102060102061102062102063102064102065102066102067102068102069102070102071102072102073102074102075102076102077102078102079102080102081102082102083102084102085102086102087102088102089102090102091102092102093102094102095102096102097102098102099102100102101102102102103102104102105102106102107102108102109102110102111102112102113102114102115102116102117102118102119102120102121102122102123102124102125102126102127102128102129102130102131102132102133102134102135102136102137102138102139102140102141102142102143102144102145102146102147102148102149102150102151102152102153102154102155102156102157102158102159102160102161102162102163102164102165102166102167102168102169102170102171102172102173102174102175102176102177102178102179102180102181102182102183102184102185102186102187102188102189102190102191102192102193102194102195102196102197102198102199102200102201102202102203102204102205102206102207102208102209102210102211102212102213102214102215102216102217102218102219102220102221102222102223102224102225102226102227102228102229102230102231102232102233102234102235102236102237102238102239102240102241102242102243102244102245102246102247102248102249102250102251102252102253102254102255102256102257102258102259102260102261102262102263102264102265102266102267102268102269102270102271102272102273102274102275102276102277102278102279102280102281102282102283102284102285102286102287102288102289102290102291102292102293102294102295102296102297102298102299102300102301102302102303102304102305102306102307102308102309102310102311102312102313102314102315102316102317102318102319102320102321102322102323102324102325102326102327102328102329102330102331102332102333102334102335102336102337102338102339102340102341102342102343102344102345102346102347102348102349102350102351102352102353102354102355102356102357102358102359102360102361102362102363102364102365102366102367102368102369102370102371102372102373102374102375102376102377102378102379102380102381102382102383102384102385102386102387102388102389102390102391102392102393102394102395102396102397102398102399102400102401102402102403102404102405102406102407102408102409102410102411102412102413102414102415102416102417102418102419102420102421102422102423102424102425102426102427102428102429102430102431102432102433102434102435102436102437102438102439102440102441102442102443102444102445102446102447102448102449102450102451102452102453102454102455102456102457102458102459102460102461102462102463102464102465102466102467102468102469102470102471102472102473102474102475102476102477102478102479102480102481102482102483102484102485102486102487102488102489102490102491102492102493102494102495102496102497102498102499102500102501102502102503102504102505102506102507102508102509102510102511102512102513102514102515102516102517102518102519102520102521102522102523102524102525102526102527102528102529102530102531102532102533102534102535102536102537102538102539102540102541102542102543102544102545102546102547102548102549102550102551102552102553102554102555102556102557102558102559102560102561102562102563102564102565102566102567102568102569102570102571102572102573102574102575102576102577102578102579102580102581102582102583102584102585102586102587102588102589102590102591102592102593102594102595102596102597102598102599102600102601102602102603102604102605102606102607102608102609102610102611102612102613102614102615102616102617102618102619102620102621102622102623102624102625102626102627102628102629102630102631102632102633102634102635102636102637102638102639102640102641102642102643102644102645102646102647102648102649102650102651102652102653102654102655102656102657102658102659102660102661102662102663102664102665102666102667102668102669102670102671102672102673102674102675102676102677102678102679102680102681102682102683102684102685102686102687102688102689102690102691102692102693102694102695102696102697102698102699102700102701102702102703102704102705102706102707102708102709102710102711102712102713102714102715102716102717102718102719102720102721102722102723102724102725102726102727102728102729102730102731102732102733102734102735102736102737102738102739102740102741102742102743102744102745102746102747102748102749102750102751102752102753102754102755102756102757102758102759102760102761102762102763102764102765102766102767102768102769102770102771102772102773102774102775102776102777102778102779102780102781102782102783102784102785102786102787102788102789102790102791102792102793102794102795102796102797102798102799102800102801102802102803102804102805102806102807102808102809102810102811102812102813102814102815102816102817102818102819102820102821102822102823102824102825102826102827102828102829102830102831102832102833102834102835102836102837102838102839102840102841102842102843102844102845102846102847102848102849102850102851102852102853102854102855102856102857102858102859102860102861102862102863102864102865102866102867102868102869102870102871102872102873102874102875102876102877102878102879102880102881102882102883102884102885102886102887102888102889102890102891102892102893102894102895102896102897102898102899102900102901102902102903102904102905102906102907102908102909102910102911102912102913102914102915102916102917102918102919102920102921102922102923102924102925102926102927102928102929102930102931102932102933102934102935102936102937102938102939102940102941102942102943102944102945102946102947102948102949102950102951102952102953102954102955102956102957102958102959102960102961102962102963102964102965102966102967102968102969102970102971102972102973102974102975102976102977102978102979102980102981102982102983102984102985102986102987102988102989102990102991102992102993102994102995102996102997102998102999103000103001103002103003103004103005103006103007103008103009103010103011103012103013103014103015103016103017103018103019103020103021103022103023103024103025103026103027103028103029103030103031103032103033103034103035103036103037103038103039103040103041103042103043103044103045103046103047103048103049103050103051103052103053103054103055103056103057103058103059103060103061103062103063103064103065103066103067103068103069103070103071103072103073103074103075103076103077103078103079103080103081103082103083103084103085103086103087103088103089103090103091103092103093103094103095103096103097103098103099103100103101103102103103103104103105103106103107103108103109103110103111103112103113103114103115103116103117103118103119103120103121103122103123103124103125103126103127103128103129103130103131103132103133103134103135103136103137103138103139103140103141103142103143103144103145103146103147103148103149103150103151103152103153103154103155103156103157103158103159103160103161103162103163103164103165103166103167103168103169103170103171103172103173103174103175103176103177103178103179103180103181103182103183103184103185103186103187103188103189103190103191103192103193103194103195103196103197103198103199103200103201103202103203103204103205103206103207103208103209103210103211103212103213103214103215103216103217103218103219103220103221103222103223103224103225103226103227103228103229103230103231103232103233103234103235103236103237103238103239103240103241103242103243103244103245103246103247103248103249103250103251103252103253103254103255103256103257103258103259103260103261103262103263103264103265103266103267103268103269103270103271103272103273103274103275103276103277103278103279103280103281103282103283103284103285103286103287103288103289103290103291103292103293103294103295103296103297103298103299103300103301103302103303103304103305103306103307103308103309103310103311103312103313103314103315103316103317103318103319103320103321103322103323103324103325103326103327103328103329103330103331103332103333103334103335103336103337103338103339103340103341103342103343103344103345103346103347103348103349103350103351103352103353103354103355103356103357103358103359103360103361103362103363103364103365103366103367103368103369103370103371103372103373103374103375103376103377103378103379103380103381103382103383103384103385103386103387103388103389103390103391103392103393103394103395103396103397103398103399103400103401103402103403103404103405103406103407103408103409103410103411103412103413103414103415103416103417103418103419103420103421103422103423103424103425103426103427103428103429103430103431103432103433103434103435103436103437103438103439103440103441103442103443103444103445103446103447103448103449103450103451103452103453103454103455103456103457103458103459103460103461103462103463103464103465103466103467103468103469103470103471103472103473103474103475103476103477103478103479103480103481103482103483103484103485103486103487103488103489103490103491103492103493103494103495103496103497103498103499103500103501103502103503103504103505103506103507103508103509103510103511103512103513103514103515103516103517103518103519103520103521103522103523103524103525103526103527103528103529103530103531103532103533103534103535103536103537103538103539103540103541103542103543103544103545103546103547103548103549103550103551103552103553103554103555103556103557103558103559103560103561103562103563103564103565103566103567103568103569103570103571103572103573103574103575103576103577103578103579103580103581103582103583103584103585103586103587103588103589103590103591103592103593103594103595103596103597103598103599103600103601103602103603103604103605103606103607103608103609103610103611103612103613103614103615103616103617103618103619103620103621103622103623103624103625103626103627103628103629103630103631103632103633103634103635103636103637103638103639103640103641103642103643103644103645103646103647103648103649103650103651103652103653103654103655103656103657103658103659103660103661103662103663103664103665103666103667103668103669103670103671103672103673103674103675103676103677103678103679103680103681103682103683103684103685103686103687103688103689103690103691103692103693103694103695103696103697103698103699103700103701103702103703103704103705103706103707103708103709103710103711103712103713103714103715103716103717103718103719103720103721103722103723103724103725103726103727103728103729103730103731103732103733103734103735103736103737103738103739103740103741103742103743103744103745103746103747103748103749103750103751103752103753103754103755103756103757103758103759103760103761103762103763103764103765103766103767103768103769103770103771103772103773103774103775103776103777103778103779103780103781103782103783103784103785103786103787103788103789103790103791103792103793103794103795103796103797103798103799103800103801103802103803103804103805103806103807103808103809103810103811103812103813103814103815103816103817103818103819103820103821103822103823103824103825103826103827103828103829103830103831103832103833103834103835103836103837103838103839103840103841103842103843103844103845103846103847103848103849103850103851103852103853103854103855103856103857103858103859103860103861103862103863103864103865103866103867103868103869103870103871103872103873103874103875103876103877103878103879103880103881103882103883103884103885103886103887103888103889103890103891103892103893103894103895103896103897103898103899103900103901103902103903103904103905103906103907103908103909103910103911103912103913103914103915103916103917103918103919103920103921103922103923103924103925103926103927103928103929103930103931103932103933103934103935103936103937103938103939103940103941103942103943103944103945103946103947103948103949103950103951103952103953103954103955103956103957103958103959103960103961103962103963103964103965103966103967103968103969103970103971103972103973103974103975103976103977103978103979103980103981103982103983103984103985103986103987103988103989103990103991103992103993103994103995103996103997103998103999104000104001104002104003104004104005104006104007104008104009104010104011104012104013104014104015104016104017104018104019104020104021104022104023104024104025104026104027104028104029104030104031104032104033104034104035104036104037104038104039104040104041104042104043104044104045104046104047104048104049104050104051104052104053104054104055104056104057104058104059104060104061104062104063104064104065104066104067104068104069104070104071104072104073104074104075104076104077104078104079104080104081104082104083104084104085104086104087104088104089104090104091104092104093104094104095104096104097104098104099104100104101104102104103104104104105104106104107104108104109104110104111104112104113104114104115104116104117104118104119104120104121104122104123104124104125104126104127104128104129104130104131104132104133104134104135104136104137104138104139104140104141104142104143104144104145104146104147104148104149104150104151104152104153104154104155104156104157104158104159104160104161104162104163104164104165104166104167104168104169104170104171104172104173104174104175104176104177104178104179104180104181104182104183104184104185104186104187104188104189104190104191104192104193104194104195104196104197104198104199104200104201104202104203104204104205104206104207104208104209104210104211104212104213104214104215104216104217104218104219104220104221104222104223104224104225104226104227104228104229104230104231104232104233104234104235104236104237104238104239104240104241104242104243104244104245104246104247104248104249104250104251104252104253104254104255104256104257104258104259104260104261104262104263104264104265104266104267104268104269104270104271104272104273104274104275104276104277104278104279104280104281104282104283104284104285104286104287104288104289104290104291104292104293104294104295104296104297104298104299104300104301104302104303104304104305104306104307104308104309104310104311104312104313104314104315104316104317104318104319104320104321104322104323104324104325104326104327104328104329104330104331104332104333104334104335104336104337104338104339104340104341104342104343104344104345104346104347104348104349104350104351104352104353104354104355104356104357104358104359104360104361104362104363104364104365104366104367104368104369104370104371104372104373104374104375104376104377104378104379104380104381104382104383104384104385104386104387104388104389104390104391104392104393104394104395104396104397104398104399104400104401104402104403104404104405104406104407104408104409104410104411104412104413104414104415104416104417104418104419104420104421104422104423104424104425104426104427104428104429104430104431104432104433104434104435104436104437104438104439104440104441104442104443104444104445104446104447104448104449104450104451104452104453104454104455104456104457104458104459104460104461104462104463104464104465104466104467104468104469104470104471104472104473104474104475104476104477104478104479104480104481104482104483104484104485104486104487104488104489104490104491104492104493104494104495104496104497104498104499104500104501104502104503104504104505104506104507104508104509104510104511104512104513104514104515104516104517104518104519104520104521104522104523104524104525104526104527104528104529104530104531104532104533104534104535104536104537104538104539104540104541104542104543104544104545104546104547104548104549104550104551104552104553104554104555104556104557104558104559104560104561104562104563104564104565104566104567104568104569104570104571104572104573104574104575104576104577104578104579104580104581104582104583104584104585104586104587104588104589104590104591104592104593104594104595104596104597104598104599104600104601104602104603104604104605104606104607104608104609104610104611104612104613104614104615104616104617104618104619104620104621104622104623104624104625104626104627104628104629104630104631104632104633104634104635104636104637104638104639104640104641104642104643104644104645104646104647104648104649104650104651104652104653104654104655104656104657104658104659104660104661104662104663104664104665104666104667104668104669104670104671104672104673104674104675104676104677104678104679104680104681104682104683104684104685104686104687104688104689104690104691104692104693104694104695104696104697104698104699104700104701104702104703104704104705104706104707104708104709104710104711104712104713104714104715104716104717104718104719104720104721104722104723104724104725104726104727104728104729104730104731104732104733104734104735104736104737104738104739104740104741104742104743104744104745104746104747104748104749104750104751104752104753104754104755104756104757104758104759104760104761104762104763104764104765104766104767104768104769104770104771104772104773104774104775104776104777104778104779104780104781104782104783104784104785104786104787104788104789104790104791104792104793104794104795104796104797104798104799104800104801104802104803104804104805104806104807104808104809104810104811104812104813104814104815104816104817104818104819104820104821104822104823104824104825104826104827104828104829104830104831104832104833104834104835104836104837104838104839104840104841104842104843104844104845104846104847104848104849104850104851104852104853104854104855104856104857104858104859104860104861104862104863104864104865104866104867104868104869104870104871104872104873104874104875104876104877104878104879104880104881104882104883104884104885104886104887104888104889104890104891104892104893104894104895104896104897104898104899104900104901104902104903104904104905104906104907104908104909104910104911104912104913104914104915104916104917104918104919104920104921104922104923104924104925104926104927104928104929104930104931104932104933104934104935104936104937104938104939104940104941104942104943104944104945104946104947104948104949104950104951104952104953104954104955104956104957104958104959104960104961104962104963104964104965104966104967104968104969104970104971104972104973104974104975104976104977104978104979104980104981104982104983104984104985104986104987104988104989104990104991104992104993104994104995104996104997104998104999105000105001105002105003105004105005105006105007105008105009105010105011105012105013105014105015105016105017105018105019105020105021105022105023105024105025105026105027105028105029105030105031105032105033105034105035105036105037105038105039105040105041105042105043105044105045105046105047105048105049105050105051105052105053105054105055105056105057105058105059105060105061105062105063105064105065105066105067105068105069105070105071105072105073105074105075105076105077105078105079105080105081105082105083105084105085105086105087105088105089105090105091105092105093105094105095105096105097105098105099105100105101105102105103105104105105105106105107105108105109105110105111105112105113105114105115105116105117105118105119105120105121105122105123105124105125105126105127105128105129105130105131105132105133105134105135105136105137105138105139105140105141105142105143105144105145105146105147105148105149105150105151105152105153105154105155105156105157105158105159105160105161105162105163105164105165105166105167105168105169105170105171105172105173105174105175105176105177105178105179105180105181105182105183105184105185105186105187105188105189105190105191105192105193105194105195105196105197105198105199105200105201105202105203105204105205105206105207105208105209105210105211105212105213105214105215105216105217105218105219105220105221105222105223105224105225105226105227105228105229105230105231105232105233105234105235105236105237105238105239105240105241105242105243105244105245105246105247105248105249105250105251105252105253105254105255105256105257105258105259105260105261105262105263105264105265105266105267105268105269105270105271105272105273105274105275105276105277105278105279105280105281105282105283105284105285105286105287105288105289105290105291105292105293105294105295105296105297105298105299105300105301105302105303105304105305105306105307105308105309105310105311105312105313105314105315105316105317105318105319105320105321105322105323105324105325105326105327105328105329105330105331105332105333105334105335105336105337105338105339105340105341105342105343105344105345105346105347105348105349105350105351105352105353105354105355105356105357105358105359105360105361105362105363105364105365105366105367105368105369105370105371105372105373105374105375105376105377105378105379105380105381105382105383105384105385105386105387105388105389105390105391105392105393105394105395105396105397105398105399105400105401105402105403105404105405105406105407105408105409105410105411105412105413105414105415105416105417105418105419105420105421105422105423105424105425105426105427105428105429105430105431105432105433105434105435105436105437105438105439105440105441105442105443105444105445105446105447105448105449105450105451105452105453105454105455105456105457105458105459105460105461105462105463105464105465105466105467105468105469105470105471105472105473105474105475105476105477105478105479105480105481105482105483105484105485105486105487105488105489105490105491105492105493105494105495105496105497105498105499105500105501105502105503105504105505105506105507105508105509105510105511105512105513105514105515105516105517105518105519105520105521105522105523105524105525105526105527105528105529105530105531105532105533105534105535105536105537105538105539105540105541105542105543105544105545105546105547105548105549105550105551105552105553105554105555105556105557105558105559105560105561105562105563105564105565105566105567105568105569105570105571105572105573105574105575105576105577105578105579105580105581105582105583105584105585105586105587105588105589105590105591105592105593105594105595105596105597105598105599105600105601105602105603105604105605105606105607105608105609105610105611105612105613105614105615105616105617105618105619105620105621105622105623105624105625105626105627105628105629105630105631105632105633105634105635105636105637105638105639105640105641105642105643105644105645105646105647105648105649105650105651105652105653105654105655105656105657105658105659105660105661105662105663105664105665105666105667105668105669105670105671105672105673105674105675105676105677105678105679105680105681105682105683105684105685105686105687105688105689105690105691105692105693105694105695105696105697105698105699105700105701105702105703105704105705105706105707105708105709105710105711105712105713105714105715105716105717105718105719105720105721105722105723105724105725105726105727105728105729105730105731105732105733105734105735105736105737105738105739105740105741105742105743105744105745105746105747105748105749105750105751105752105753105754105755105756105757105758105759105760105761105762105763105764105765105766105767105768105769105770105771105772105773105774105775105776105777105778105779105780105781105782105783105784105785105786105787105788105789105790105791105792105793105794105795105796105797105798105799105800105801105802105803105804105805105806105807105808105809105810105811105812105813105814105815105816105817105818105819105820105821105822105823105824105825105826105827105828105829105830105831105832105833105834105835105836105837105838105839105840105841105842105843105844105845105846105847105848105849105850105851105852105853105854105855105856105857105858105859105860105861105862105863105864105865105866105867105868105869105870105871105872105873105874105875105876105877105878105879105880105881105882105883105884105885105886105887105888105889105890105891105892105893105894105895105896105897105898105899105900105901105902105903105904105905105906105907105908105909105910105911105912105913105914105915105916105917105918105919105920105921105922105923105924105925105926105927105928105929105930105931105932105933105934105935105936105937105938105939105940105941105942105943105944105945105946105947105948105949105950105951105952105953105954105955105956105957105958105959105960105961105962105963105964105965105966105967105968105969105970105971105972105973105974105975105976105977105978105979105980105981105982105983105984105985105986105987105988105989105990105991105992105993105994105995105996105997105998105999106000106001106002106003106004106005106006106007106008106009106010106011106012106013106014106015106016106017106018106019106020106021106022106023106024106025106026106027106028106029106030106031106032106033106034106035106036106037106038106039106040106041106042106043106044106045106046106047106048106049106050106051106052106053106054106055106056106057106058106059106060106061106062106063106064106065106066106067106068106069106070106071106072106073106074106075106076106077106078106079106080106081106082106083106084106085106086106087106088106089106090106091106092106093106094106095106096106097106098106099106100106101106102106103106104106105106106106107106108106109106110106111106112106113106114106115106116106117106118106119106120106121106122106123106124106125106126106127106128106129106130106131106132106133106134106135106136106137106138106139106140106141106142106143106144106145106146106147106148106149106150106151106152106153106154106155106156106157106158106159106160106161106162106163106164106165106166106167106168106169106170106171106172106173106174106175106176106177106178106179106180106181106182106183106184106185106186106187106188106189106190106191106192106193106194106195106196106197106198106199106200106201106202106203106204106205106206106207106208106209106210106211106212106213106214106215106216106217106218106219106220106221106222106223106224106225106226106227106228106229106230106231106232106233106234106235106236106237106238106239106240106241106242106243106244106245106246106247106248106249106250106251106252106253106254106255106256106257106258106259106260106261106262106263106264106265106266106267106268106269106270106271106272106273106274106275106276106277106278106279106280106281106282106283106284106285106286106287106288106289106290106291106292106293106294106295106296106297106298106299106300106301106302106303106304106305106306106307106308106309106310106311106312106313106314106315106316106317106318106319106320106321106322106323106324106325106326106327106328106329106330106331106332106333106334106335106336106337106338106339106340106341106342106343106344106345106346106347106348106349106350106351106352106353106354106355106356106357106358106359106360106361106362106363106364106365106366106367106368106369106370106371106372106373106374106375106376106377106378106379106380106381106382106383106384106385106386106387106388106389106390106391106392106393106394106395106396106397106398106399106400106401106402106403106404106405106406106407106408106409106410106411106412106413106414106415106416106417106418106419106420106421106422106423106424106425106426106427106428106429106430106431106432106433106434106435106436106437106438106439106440106441106442106443106444106445106446106447106448106449106450106451106452106453106454106455106456106457106458106459106460106461106462106463106464106465106466106467106468106469106470106471106472106473106474106475106476106477106478106479106480106481106482106483106484106485106486106487106488106489106490106491106492106493106494106495106496106497106498106499106500106501106502106503106504106505106506106507106508106509106510106511106512106513106514106515106516106517106518106519106520106521106522106523106524106525106526106527106528106529106530106531106532106533106534106535106536106537106538106539106540106541106542106543106544106545106546106547106548106549106550106551106552106553106554106555106556106557106558106559106560106561106562106563106564106565106566106567106568106569106570106571106572106573106574106575106576106577106578106579106580106581106582106583106584106585106586106587106588106589106590106591106592106593106594106595106596106597106598106599106600106601106602106603106604106605106606106607106608106609106610106611106612106613106614106615106616106617106618106619106620106621106622106623106624106625106626106627106628106629106630106631106632106633106634106635106636106637106638106639106640106641106642106643106644106645106646106647106648106649106650106651106652106653106654106655106656106657106658106659106660106661106662106663106664106665106666106667106668106669106670106671106672106673106674106675106676106677106678106679106680106681106682106683106684106685106686106687106688106689106690106691106692106693106694106695106696106697106698106699106700106701106702106703106704106705106706106707106708106709106710106711106712106713106714106715106716106717106718106719106720106721106722106723106724106725106726106727106728106729106730106731106732106733106734106735106736106737106738106739106740106741106742106743106744106745106746106747106748106749106750106751106752106753106754106755106756106757106758106759106760106761106762106763106764106765106766106767106768106769106770106771106772106773106774106775106776106777106778106779106780106781106782106783106784106785106786106787106788106789106790106791106792106793106794106795106796106797106798106799106800106801106802106803106804106805106806106807106808106809106810106811106812106813106814106815106816106817106818106819106820106821106822106823106824106825106826106827106828106829106830106831106832106833106834106835106836106837106838106839106840106841106842106843106844106845106846106847106848106849106850106851106852106853106854106855106856106857106858106859106860106861106862106863106864106865106866106867106868106869106870106871106872106873106874106875106876106877106878106879106880106881106882106883106884106885106886106887106888106889106890106891106892106893106894106895106896106897106898106899106900106901106902106903106904106905106906106907106908106909106910106911106912106913106914106915106916106917106918106919106920106921106922106923106924106925106926106927106928106929106930106931106932106933106934106935106936106937106938106939106940106941106942106943106944106945106946106947106948106949106950106951106952106953106954106955106956106957106958106959106960106961106962106963106964106965106966106967106968106969106970106971106972106973106974106975106976106977106978106979106980106981106982106983106984106985106986106987106988106989106990106991106992106993106994106995106996106997106998106999107000107001107002107003107004107005107006107007107008107009107010107011107012107013107014107015107016107017107018107019107020107021107022107023107024107025107026107027107028107029107030107031107032107033107034107035107036107037107038107039107040107041107042107043107044107045107046107047107048107049107050107051107052107053107054107055107056107057107058107059107060107061107062107063107064107065107066107067107068107069107070107071107072107073107074107075107076107077107078107079107080107081107082107083107084107085107086107087107088107089107090107091107092107093107094107095107096107097107098107099107100107101107102107103107104107105107106107107107108107109107110107111107112107113107114107115107116107117107118107119107120107121107122107123107124107125107126107127107128107129107130107131107132107133107134107135107136107137107138107139107140107141107142107143107144107145107146107147107148107149107150107151107152107153107154107155107156107157107158107159107160107161107162107163107164107165107166107167107168107169107170107171107172107173107174107175107176107177107178107179107180107181107182107183107184107185107186107187107188107189107190107191107192107193107194107195107196107197107198107199107200107201107202107203107204107205107206107207107208107209107210107211107212107213107214107215107216107217107218107219107220107221107222107223107224107225107226107227107228107229107230107231107232107233107234107235107236107237107238107239107240107241107242107243107244107245107246107247107248107249107250107251107252107253107254107255107256107257107258107259107260107261107262107263107264107265107266107267107268107269107270107271107272107273107274107275107276107277107278107279107280107281107282107283107284107285107286107287107288107289107290107291107292107293107294107295107296107297107298107299107300107301107302107303107304107305107306107307107308107309107310107311107312107313107314107315107316107317107318107319107320107321107322107323107324107325107326107327107328107329107330107331107332107333107334107335107336107337107338107339107340107341107342107343107344107345107346107347107348107349107350107351107352107353107354107355107356107357107358107359107360107361107362107363107364107365107366107367107368107369107370107371107372107373107374107375107376107377107378107379107380107381107382107383107384107385107386107387107388107389107390107391107392107393107394107395107396107397107398107399107400107401107402107403107404107405107406107407107408107409107410107411107412107413107414107415107416107417107418107419107420107421107422107423107424107425107426107427107428107429107430107431107432107433107434107435107436107437107438107439107440107441107442107443107444107445107446107447107448107449107450107451107452107453107454107455107456107457107458107459107460107461107462107463107464107465107466107467107468107469107470107471107472107473107474107475107476107477107478107479107480107481107482107483107484107485107486107487107488107489107490107491107492107493107494107495107496107497107498107499107500107501107502107503107504107505107506107507107508107509107510107511107512107513107514107515107516107517107518107519107520107521107522107523107524107525107526107527107528107529107530107531107532107533107534107535107536107537107538107539107540107541107542107543107544107545107546107547107548107549107550107551107552107553107554107555107556107557107558107559107560107561107562107563107564107565107566107567107568107569107570107571107572107573107574107575107576107577107578107579107580107581107582107583107584107585107586107587107588107589107590107591107592107593107594107595107596107597107598107599107600107601107602107603107604107605107606107607107608107609107610107611107612107613107614107615107616107617107618107619107620107621107622107623107624107625107626107627107628107629107630107631107632107633107634107635107636107637107638107639107640107641107642107643107644107645107646107647107648107649107650107651107652107653107654107655107656107657107658107659107660107661107662107663107664107665107666107667107668107669107670107671107672107673107674107675107676107677107678107679107680107681107682107683107684107685107686107687107688107689107690107691107692107693107694107695107696107697107698107699107700107701107702107703107704107705107706107707107708107709107710107711107712107713107714107715107716107717107718107719107720107721107722107723107724107725107726107727107728107729107730107731107732107733107734107735107736107737107738107739107740107741107742107743107744107745107746107747107748107749107750107751107752107753107754107755107756107757107758107759107760107761107762107763107764107765107766107767107768107769107770107771107772107773107774107775107776107777107778107779107780107781107782107783107784107785107786107787107788107789107790107791107792107793107794107795107796107797107798107799107800107801107802107803107804107805107806107807107808107809107810107811107812107813107814107815107816107817107818107819107820107821107822107823107824107825107826107827107828107829107830107831107832107833107834107835107836107837107838107839107840107841107842107843107844107845107846107847107848107849107850107851107852107853107854107855107856107857107858107859107860107861107862107863107864107865107866107867107868107869107870107871107872107873107874107875107876107877107878107879107880107881107882107883107884107885107886107887107888107889107890107891107892107893107894107895107896107897107898107899107900107901107902107903107904107905107906107907107908107909107910107911107912107913107914107915107916107917107918107919107920107921107922107923107924107925107926107927107928107929107930107931107932107933107934107935107936107937107938107939107940107941107942107943107944107945107946107947107948107949107950107951107952107953107954107955107956107957107958107959107960107961107962107963107964107965107966107967107968107969107970107971107972107973107974107975107976107977107978107979107980107981107982107983107984107985107986107987107988107989107990107991107992107993107994107995107996107997107998107999108000108001108002108003108004108005108006108007108008108009108010108011108012108013108014108015108016108017108018108019108020108021108022108023108024108025108026108027108028108029108030108031108032108033108034108035108036108037108038108039108040108041108042108043108044108045108046108047108048108049108050108051108052108053108054108055108056108057108058108059108060108061108062108063108064108065108066108067108068108069108070108071108072108073108074108075108076108077108078108079108080108081108082108083108084108085108086108087108088108089108090108091108092108093108094108095108096108097108098108099108100108101108102108103108104108105108106108107108108108109108110108111108112108113108114108115108116108117108118108119108120108121108122108123108124108125108126108127108128108129108130108131108132108133108134108135108136108137108138108139108140108141108142108143108144108145108146108147108148108149108150108151108152108153108154108155108156108157108158108159108160108161108162108163108164108165108166108167108168108169108170108171108172108173108174108175108176108177108178108179108180108181108182108183108184108185108186108187108188108189108190108191108192108193108194108195108196108197108198108199108200108201108202108203108204108205108206108207108208108209108210108211108212108213108214108215108216108217108218108219108220108221108222108223108224108225108226108227108228108229108230108231108232108233108234108235108236108237108238108239108240108241108242108243108244108245108246108247108248108249108250108251108252108253108254108255108256108257108258108259108260108261108262108263108264108265108266108267108268108269108270108271108272108273108274108275108276108277108278108279108280108281108282108283108284108285108286108287108288108289108290108291108292108293108294108295108296108297108298108299108300108301108302108303108304108305108306108307108308108309108310108311108312108313108314108315108316108317108318108319108320108321108322108323108324108325108326108327108328108329108330108331108332108333108334108335108336108337108338108339108340108341108342108343108344108345108346108347108348108349108350108351108352108353108354108355108356108357108358108359108360108361108362108363108364108365108366108367108368108369108370108371108372108373108374108375108376108377108378108379108380108381108382108383108384108385108386108387108388108389108390108391108392108393108394108395108396108397108398108399108400108401108402108403108404108405108406108407108408108409108410108411108412108413108414108415108416108417108418108419108420108421108422108423108424108425108426108427108428108429108430108431108432108433108434108435108436108437108438108439108440108441108442108443108444108445108446108447108448108449108450108451108452108453108454108455108456108457108458108459108460108461108462108463108464108465108466108467108468108469108470108471108472108473108474108475108476108477108478108479108480108481108482108483108484108485108486108487108488108489108490108491108492108493108494108495108496108497108498108499108500108501108502108503108504108505108506108507108508108509108510108511108512108513108514108515108516108517108518108519108520108521108522108523108524108525108526108527108528108529108530108531108532108533108534108535108536108537108538108539108540108541108542108543108544108545108546108547108548108549108550108551108552108553108554108555108556108557108558108559108560108561108562108563108564108565108566108567108568108569108570108571108572108573108574108575108576108577108578108579108580108581108582108583108584108585108586108587108588108589108590108591108592108593108594108595108596108597108598108599108600108601108602108603108604108605108606108607108608108609108610108611108612108613108614108615108616108617108618108619108620108621108622108623108624108625108626108627108628108629108630108631108632108633108634108635108636108637108638108639108640108641108642108643108644108645108646108647108648108649108650108651108652108653108654108655108656108657108658108659108660108661108662108663108664108665108666108667108668108669108670108671108672108673108674108675108676108677108678108679108680108681108682108683108684108685108686108687108688108689108690108691108692108693108694108695108696108697108698108699108700108701108702108703108704108705108706108707108708108709108710108711108712108713108714108715108716108717108718108719108720108721108722108723108724108725108726108727108728108729108730108731108732108733108734108735108736108737108738108739108740108741108742108743108744108745108746108747108748108749108750108751108752108753108754108755108756108757108758108759108760108761108762108763108764108765108766108767108768108769108770108771108772108773108774108775108776108777108778108779108780108781108782108783108784108785108786108787108788108789108790108791108792108793108794108795108796108797108798108799108800108801108802108803108804108805108806108807108808108809108810108811108812108813108814108815108816108817108818108819108820108821108822108823108824108825108826108827108828108829108830108831108832108833108834108835108836108837108838108839108840108841108842108843108844108845108846108847108848108849108850108851108852108853108854108855108856108857108858108859108860108861108862108863108864108865108866108867108868108869108870108871108872108873108874108875108876108877108878108879108880108881108882108883108884108885108886108887108888108889108890108891108892108893108894108895108896108897108898108899108900108901108902108903108904108905108906108907108908108909108910108911108912108913108914108915108916108917108918108919108920108921108922108923108924108925108926108927108928108929108930108931108932108933108934108935108936108937108938108939108940108941108942108943108944108945108946108947108948108949108950108951108952108953108954108955108956108957108958108959108960108961108962108963108964108965108966108967108968108969108970108971108972108973108974108975108976108977108978108979108980108981108982108983108984108985108986108987108988108989108990108991108992108993108994108995108996108997108998108999109000109001109002109003109004109005109006109007109008109009109010109011109012109013109014109015109016109017109018109019109020109021109022109023109024109025109026109027109028109029109030109031109032109033109034109035109036109037109038109039109040109041109042109043109044109045109046109047109048109049109050109051109052109053109054109055109056109057109058109059109060109061109062109063109064109065109066109067109068109069109070109071109072109073109074109075109076109077109078109079109080109081109082109083109084109085109086109087109088109089109090109091109092109093109094109095109096109097109098109099109100109101109102109103109104109105109106109107109108109109109110109111109112109113109114109115109116109117109118109119109120109121109122109123109124109125109126109127109128109129109130109131109132109133109134109135109136109137109138109139109140109141109142109143109144109145109146109147109148109149109150109151109152109153109154109155109156109157109158109159109160109161109162109163109164109165109166109167109168109169109170109171109172109173109174109175109176109177109178109179109180109181109182109183109184109185109186109187109188109189109190109191109192109193109194109195109196109197109198109199109200109201109202109203109204109205109206109207109208109209109210109211109212109213109214109215109216109217109218109219109220109221109222109223109224109225109226109227109228109229109230109231109232109233109234109235109236109237109238109239109240109241109242109243109244109245109246109247109248109249109250109251109252109253109254109255109256109257109258109259109260109261109262109263109264109265109266109267109268109269109270109271109272109273109274109275109276109277109278109279109280109281109282109283109284109285109286109287109288109289109290109291109292109293109294109295109296109297109298109299109300109301109302109303109304109305109306109307109308109309109310109311109312109313109314109315109316109317109318109319109320109321109322109323109324109325109326109327109328109329109330109331109332109333109334109335109336109337109338109339109340109341109342109343109344109345109346109347109348109349109350109351109352109353109354109355109356109357109358109359109360109361109362109363109364109365109366109367109368109369109370109371109372109373109374109375109376109377109378109379109380109381109382109383109384109385109386109387109388109389109390109391109392109393109394109395109396109397109398109399109400109401109402109403109404109405109406109407109408109409109410109411109412109413109414109415109416109417109418109419109420109421109422109423109424109425109426109427109428109429109430109431109432109433109434109435109436109437109438109439109440109441109442109443109444109445109446109447109448109449109450109451109452109453109454109455109456109457109458109459109460109461109462109463109464109465109466109467109468109469109470109471109472109473109474109475109476109477109478109479109480109481109482109483109484109485109486109487109488109489109490109491109492109493109494109495109496109497109498109499109500109501109502109503109504109505109506109507109508109509109510109511109512109513109514109515109516109517109518109519109520109521109522109523109524109525109526109527109528109529109530109531109532109533109534109535109536109537109538109539109540109541109542109543109544109545109546109547109548109549109550109551109552109553109554109555109556109557109558109559109560109561109562109563109564109565109566109567109568109569109570109571109572109573109574109575109576109577109578109579109580109581109582109583109584109585109586109587109588109589109590109591109592109593109594109595109596109597109598109599109600109601109602109603109604109605109606109607109608109609109610109611109612109613109614109615109616109617109618109619109620109621109622109623109624109625109626109627109628109629109630109631109632109633109634109635109636109637109638109639109640109641109642109643109644109645109646109647109648109649109650109651109652109653109654109655109656109657109658109659109660109661109662109663109664109665109666109667109668109669109670109671109672109673109674109675109676109677109678109679109680109681109682109683109684109685109686109687109688109689109690109691109692109693109694109695109696109697109698109699109700109701109702109703109704109705109706109707109708109709109710109711109712109713109714109715109716109717109718109719109720109721109722109723109724109725109726109727109728109729109730109731109732109733109734109735109736109737109738109739109740109741109742109743109744109745109746109747109748109749109750109751109752109753109754109755109756109757109758109759109760109761109762109763109764109765109766109767109768109769109770109771109772109773109774109775109776109777109778109779109780109781109782109783109784109785109786109787109788109789109790109791109792109793109794109795109796109797109798109799109800109801109802109803109804109805109806109807109808109809109810109811109812109813109814109815109816109817109818109819109820109821109822109823109824109825109826109827109828109829109830109831109832109833109834109835109836109837109838109839109840109841109842109843109844109845109846109847109848109849109850109851109852109853109854109855109856109857109858109859109860109861109862109863109864109865109866109867109868109869109870109871109872109873109874109875109876109877109878109879109880109881109882109883109884109885109886109887109888109889109890109891109892109893109894109895109896109897109898109899109900109901109902109903109904109905109906109907109908109909109910109911109912109913109914109915109916109917109918109919109920109921109922109923109924109925109926109927109928109929109930109931109932109933109934109935109936109937109938109939109940109941109942109943109944109945109946109947109948109949109950109951109952109953109954109955109956109957109958109959109960109961109962109963109964109965109966109967109968109969109970109971109972109973109974109975109976109977109978109979109980109981109982109983109984109985109986109987109988109989109990109991109992109993109994109995109996109997109998109999110000110001110002110003110004110005110006110007110008110009110010110011110012110013110014110015110016110017110018110019110020110021110022110023110024110025110026110027110028110029110030110031110032110033110034110035110036110037110038110039110040110041110042110043110044110045110046110047110048110049110050110051110052110053110054110055110056110057110058110059110060110061110062110063110064110065110066110067110068110069110070110071110072110073110074110075110076110077110078110079110080110081110082110083110084110085110086110087110088110089110090110091110092110093110094110095110096110097110098110099110100110101110102110103110104110105110106110107110108110109110110110111110112110113110114110115110116110117110118110119110120110121110122110123110124110125110126110127110128110129110130110131110132110133110134110135110136110137110138110139110140110141110142110143110144110145110146110147110148110149110150110151110152110153110154110155110156110157110158110159110160110161110162110163110164110165110166110167110168110169110170110171110172110173110174110175110176110177110178110179110180110181110182110183110184110185110186110187110188110189110190110191110192110193110194110195110196110197110198110199110200110201110202110203110204110205110206110207110208110209110210110211110212110213110214110215110216110217110218110219110220110221110222110223110224110225110226110227110228110229110230110231110232110233110234110235110236110237110238110239110240110241110242110243110244110245110246110247110248110249110250110251110252110253110254110255110256110257110258110259110260110261110262110263110264110265110266110267110268110269110270110271110272110273110274110275110276110277110278110279110280110281110282110283110284110285110286110287110288110289110290110291110292110293110294110295110296110297110298110299110300110301110302110303110304110305110306110307110308110309110310110311110312110313110314110315110316110317110318110319110320110321110322110323110324110325110326110327110328110329110330110331110332110333110334110335110336110337110338110339110340110341110342110343110344110345110346110347110348110349110350110351110352110353110354110355110356110357110358110359110360110361110362110363110364110365110366110367110368110369110370110371110372110373110374110375110376110377110378110379110380110381110382110383110384110385110386110387110388110389110390110391110392110393110394110395110396110397110398110399110400110401110402110403110404110405110406110407110408110409110410110411110412110413110414110415110416110417110418110419110420110421110422110423110424110425110426110427110428110429110430110431110432110433110434110435110436110437110438110439110440110441110442110443110444110445110446110447110448110449110450110451110452110453110454110455110456110457110458110459110460110461110462110463110464110465110466110467110468110469110470110471110472110473110474110475110476110477110478110479110480110481110482110483110484110485110486110487110488110489110490110491110492110493110494110495110496110497110498110499110500110501110502110503110504110505110506110507110508110509110510110511110512110513110514110515110516110517110518110519110520110521110522110523110524110525110526110527110528110529110530110531110532110533110534110535110536110537110538110539110540110541110542110543110544110545110546110547110548110549110550110551110552110553110554110555110556110557110558110559110560110561110562110563110564110565110566110567110568110569110570110571110572110573110574110575110576110577110578110579110580110581110582110583110584110585110586110587110588110589110590110591110592110593110594110595110596110597110598110599110600110601110602110603110604110605110606110607110608110609110610110611110612110613110614110615110616110617110618110619110620110621110622110623110624110625110626110627110628110629110630110631110632110633110634110635110636110637110638110639110640110641110642110643110644110645110646110647110648110649110650110651110652110653110654110655110656110657110658110659110660110661110662110663110664110665110666110667110668110669110670110671110672110673110674110675110676110677110678110679110680110681110682110683110684110685110686110687110688110689110690110691110692110693110694110695110696110697110698110699110700110701110702110703110704110705110706110707110708110709110710110711110712110713110714110715110716110717110718110719110720110721110722110723110724110725110726110727110728110729110730110731110732110733110734110735110736110737110738110739110740110741110742110743110744110745110746110747110748110749110750110751110752110753110754110755110756110757110758110759110760110761110762110763110764110765110766110767110768110769110770110771110772110773110774110775110776110777110778110779110780110781110782110783110784110785110786110787110788110789110790110791110792110793110794110795110796110797110798110799110800110801110802110803110804110805110806110807110808110809110810110811110812110813110814110815110816110817110818110819110820110821110822110823110824110825110826110827110828110829110830110831110832110833110834110835110836110837110838110839110840110841110842110843110844110845110846110847110848110849110850110851110852110853110854110855110856110857110858110859110860110861110862110863110864110865110866110867110868110869110870110871110872110873110874110875110876110877110878110879110880110881110882110883110884110885110886110887110888110889110890110891110892110893110894110895110896110897110898110899110900110901110902110903110904110905110906110907110908110909110910110911110912110913110914110915110916110917110918110919110920110921110922110923110924110925110926110927110928110929110930110931110932110933110934110935110936110937110938110939110940110941110942110943110944110945110946110947110948110949110950110951110952110953110954110955110956110957110958110959110960110961110962110963110964110965110966110967110968110969110970110971110972110973110974110975110976110977110978110979110980110981110982110983110984110985110986110987110988110989110990110991110992110993110994110995110996110997110998110999111000111001111002111003111004111005111006111007111008111009111010111011111012111013111014111015111016111017111018111019111020111021111022111023111024111025111026111027111028111029111030111031111032111033111034111035111036111037111038111039111040111041111042111043111044111045111046111047111048111049111050111051111052111053111054111055111056111057111058111059111060111061111062111063111064111065111066111067111068111069111070111071111072111073111074111075111076111077111078111079111080111081111082111083111084111085111086111087111088111089111090111091111092111093111094111095111096111097111098111099111100111101111102111103111104111105111106111107111108111109111110111111111112111113111114111115111116111117111118111119111120111121111122111123111124111125111126111127111128111129111130111131111132111133111134111135111136111137111138111139111140111141111142111143111144111145111146111147111148111149111150111151111152111153111154111155111156111157111158111159111160111161111162111163111164111165111166111167111168111169111170111171111172111173111174111175111176111177111178111179111180111181111182111183111184111185111186111187111188111189111190111191111192111193111194111195111196111197111198111199111200111201111202111203111204111205111206111207111208111209111210111211111212111213111214111215111216111217111218111219111220111221111222111223111224111225111226111227111228111229111230111231111232111233111234111235111236111237111238111239111240111241111242111243111244111245111246111247111248111249111250111251111252111253111254111255111256111257111258111259111260111261111262111263111264111265111266111267111268111269111270111271111272111273111274111275111276111277111278111279111280111281111282111283111284111285111286111287111288111289111290111291111292111293111294111295111296111297111298111299111300111301111302111303111304111305111306111307111308111309111310111311111312111313111314111315111316111317111318111319111320111321111322111323111324111325111326111327111328111329111330111331111332111333111334111335111336111337111338111339111340111341111342111343111344111345111346111347111348111349111350111351111352111353111354111355111356111357111358111359111360111361111362111363111364111365111366111367111368111369111370111371111372111373111374111375111376111377111378111379111380111381111382111383111384111385111386111387111388111389111390111391111392111393111394111395111396111397111398111399111400111401111402111403111404111405111406111407111408111409111410111411111412111413111414111415111416111417111418111419111420111421111422111423111424111425111426111427111428111429111430111431111432111433111434111435111436111437111438111439111440111441111442111443111444111445111446111447111448111449111450111451111452111453111454111455111456111457111458111459111460111461111462111463111464111465111466111467111468111469111470111471111472111473111474111475111476111477111478111479111480111481111482111483111484111485111486111487111488111489111490111491111492111493111494111495111496111497111498111499111500111501111502111503111504111505111506111507111508111509111510111511111512111513111514111515111516111517111518111519111520111521111522111523111524111525111526111527111528111529111530111531111532111533111534111535111536111537111538111539111540111541111542111543111544111545111546111547111548111549111550111551111552111553111554111555111556111557111558111559111560111561111562111563111564111565111566111567111568111569111570111571111572111573111574111575111576111577111578111579111580111581111582111583111584111585111586111587111588111589111590111591111592111593111594111595111596111597111598111599111600111601111602111603111604111605111606111607111608111609111610111611111612111613111614111615111616111617111618111619111620111621111622111623111624111625111626111627111628111629111630111631111632111633111634111635111636111637111638111639111640111641111642111643111644111645111646111647111648111649111650111651111652111653111654111655111656111657111658111659111660111661111662111663111664111665111666111667111668111669111670111671111672111673111674111675111676111677111678111679111680111681111682111683111684111685111686111687111688111689111690111691111692111693111694111695111696111697111698111699111700111701111702111703111704111705111706111707111708111709111710111711111712111713111714111715111716111717111718111719111720111721111722111723111724111725111726111727111728111729111730111731111732111733111734111735111736111737111738111739111740111741111742111743111744111745111746111747111748111749111750111751111752111753111754111755111756111757111758111759111760111761111762111763111764111765111766111767111768111769111770111771111772111773111774111775111776111777111778111779111780111781111782111783111784111785111786111787111788111789111790111791111792111793111794111795111796111797111798111799111800111801111802111803111804111805111806111807111808111809111810111811111812111813111814111815111816111817111818111819111820111821111822111823111824111825111826111827111828111829111830111831111832111833111834111835111836111837111838111839111840111841111842111843111844111845111846111847111848111849111850111851111852111853111854111855111856111857111858111859111860111861111862111863111864111865111866111867111868111869111870111871111872111873111874111875111876111877111878111879111880111881111882111883111884111885111886111887111888111889111890111891111892111893111894111895111896111897111898111899111900111901111902111903111904111905111906111907111908111909111910111911111912111913111914111915111916111917111918111919111920111921111922111923111924111925111926111927111928111929111930111931111932111933111934111935111936111937111938111939111940111941111942111943111944111945111946111947111948111949111950111951111952111953111954111955111956111957111958111959111960111961111962111963111964111965111966111967111968111969111970111971111972111973111974111975111976111977111978111979111980111981111982111983111984111985111986111987111988111989111990111991111992111993111994111995111996111997111998111999112000112001112002112003112004112005112006112007112008112009112010112011112012112013112014112015112016112017112018112019112020112021112022112023112024112025112026112027112028112029112030112031112032112033112034112035112036112037112038112039112040112041112042112043112044112045112046112047112048112049112050112051112052112053112054112055112056112057112058112059112060112061112062112063112064112065112066112067112068112069112070112071112072112073112074112075112076112077112078112079112080112081112082112083112084112085112086112087112088112089112090112091112092112093112094112095112096112097112098112099112100112101112102112103112104112105112106112107112108112109112110112111112112112113112114112115112116112117112118112119112120112121112122112123112124112125112126112127112128112129112130112131112132112133112134112135112136112137112138112139112140112141112142112143112144112145112146112147112148112149112150112151112152112153112154112155112156112157112158112159112160112161112162112163112164112165112166112167112168112169112170112171112172112173112174112175112176112177112178112179112180112181112182112183112184112185112186112187112188112189112190112191112192112193112194112195112196112197112198112199112200112201112202112203112204112205112206112207112208112209112210112211112212112213112214112215112216112217112218112219112220112221112222112223112224112225112226112227112228112229112230112231112232112233112234112235112236112237112238112239112240112241112242112243112244112245112246112247112248112249112250112251112252112253112254112255112256112257112258112259112260112261112262112263112264112265112266112267112268112269112270112271112272112273112274112275112276112277112278112279112280112281112282112283112284112285112286112287112288112289112290112291112292112293112294112295112296112297112298112299112300112301112302112303112304112305112306112307112308112309112310112311112312112313112314112315112316112317112318112319112320112321112322112323112324112325112326112327112328112329112330112331112332112333112334112335112336112337112338112339112340112341112342112343112344112345112346112347112348112349112350112351112352112353112354112355112356112357112358112359112360112361112362112363112364112365112366112367112368112369112370112371112372112373112374112375112376112377112378112379112380112381112382112383112384112385112386112387112388112389112390112391112392112393112394112395112396112397112398112399112400112401112402112403112404112405112406112407112408112409112410112411112412112413112414112415112416112417112418112419112420112421112422112423112424112425112426112427112428112429112430112431112432112433112434112435112436112437112438112439112440112441112442112443112444112445112446112447112448112449112450112451112452112453112454112455112456112457112458112459112460112461112462112463112464112465112466112467112468112469112470112471112472112473112474112475112476112477112478112479112480112481112482112483112484112485112486112487112488112489112490112491112492112493112494112495112496112497112498112499112500112501112502112503112504112505112506112507112508112509112510112511112512112513112514112515112516112517112518112519112520112521112522112523112524112525112526112527112528112529112530112531112532112533112534112535112536112537112538112539112540112541112542112543112544112545112546112547112548112549112550112551112552112553112554112555112556112557112558112559112560112561112562112563112564112565112566112567112568112569112570112571112572112573112574112575112576112577112578112579112580112581112582112583112584112585112586112587112588112589112590112591112592112593112594112595112596112597112598112599112600112601112602112603112604112605112606112607112608112609112610112611112612112613112614112615112616112617112618112619112620112621112622112623112624112625112626112627112628112629112630112631112632112633112634112635112636112637112638112639112640112641112642112643112644112645112646112647112648112649112650112651112652112653112654112655112656112657112658112659112660112661112662112663112664112665112666112667112668112669112670112671112672112673112674112675112676112677112678112679112680112681112682112683112684112685112686112687112688112689112690112691112692112693112694112695112696112697112698112699112700112701112702112703112704112705112706112707112708112709112710112711112712112713112714112715112716112717112718112719112720112721112722112723112724112725112726112727112728112729112730112731112732112733112734112735112736112737112738112739112740112741112742112743112744112745112746112747112748112749112750112751112752112753112754112755112756112757112758112759112760112761112762112763112764112765112766112767112768112769112770112771112772112773112774112775112776112777112778112779112780112781112782112783112784112785112786112787112788112789112790112791112792112793112794112795112796112797112798112799112800112801112802112803112804112805112806112807112808112809112810112811112812112813112814112815112816112817112818112819112820112821112822112823112824112825112826112827112828112829112830112831112832112833112834112835112836112837112838112839112840112841112842112843112844112845112846112847112848112849112850112851112852112853112854112855112856112857112858112859112860112861112862112863112864112865112866112867112868112869112870112871112872112873112874112875112876112877112878112879112880112881112882112883112884112885112886112887112888112889112890112891112892112893112894112895112896112897112898112899112900112901112902112903112904112905112906112907112908112909112910112911112912112913112914112915112916112917112918112919112920112921112922112923112924112925112926112927112928112929112930112931112932112933112934112935112936112937112938112939112940112941112942112943112944112945112946112947112948112949112950112951112952112953112954112955112956112957112958112959112960112961112962112963112964112965112966112967112968112969112970112971112972112973112974112975112976112977112978112979112980112981112982112983112984112985112986112987112988112989112990112991112992112993112994112995112996112997112998112999113000113001113002113003113004113005113006113007113008113009113010113011113012113013113014113015113016113017113018113019113020113021113022113023113024113025113026113027113028113029113030113031113032113033113034113035113036113037113038113039113040113041113042113043113044113045113046113047113048113049113050113051113052113053113054113055113056113057113058113059113060113061113062113063113064113065113066113067113068113069113070113071113072113073113074113075113076113077113078113079113080113081113082113083113084113085113086113087113088113089113090113091113092113093113094113095113096113097113098113099113100113101113102113103113104113105113106113107113108113109113110113111113112113113113114113115113116113117113118113119113120113121113122113123113124113125113126113127113128113129113130113131113132113133113134113135113136113137113138113139113140113141113142113143113144113145113146113147113148113149113150113151113152113153113154113155113156113157113158113159113160113161113162113163113164113165113166113167113168113169113170113171113172113173113174113175113176113177113178113179113180113181113182113183113184113185113186113187113188113189113190113191113192113193113194113195113196113197113198113199113200113201113202113203113204113205113206113207113208113209113210113211113212113213113214113215113216113217113218113219113220113221113222113223113224113225113226113227113228113229113230113231113232113233113234113235113236113237113238113239113240113241113242113243113244113245113246113247113248113249113250113251113252113253113254113255113256113257113258113259113260113261113262113263113264113265113266113267113268113269113270113271113272113273113274113275113276113277113278113279113280113281113282113283113284113285113286113287113288113289113290113291113292113293113294113295113296113297113298113299113300113301113302113303113304113305113306113307113308113309113310113311113312113313113314113315113316113317113318113319113320113321113322113323113324113325113326113327113328113329113330113331113332113333113334113335113336113337113338113339113340113341113342113343113344113345113346113347113348113349113350113351113352113353113354113355113356113357113358113359113360113361113362113363113364113365113366113367113368113369113370113371113372113373113374113375113376113377113378113379113380113381113382113383113384113385113386113387113388113389113390113391113392113393113394113395113396113397113398113399113400113401113402113403113404113405113406113407113408113409113410113411113412113413113414113415113416113417113418113419113420113421113422113423113424113425113426113427113428113429113430113431113432113433113434113435113436113437113438113439113440113441113442113443113444113445113446113447113448113449113450113451113452113453113454113455113456113457113458113459113460113461113462113463113464113465113466113467113468113469113470113471113472113473113474113475113476113477113478113479113480113481113482113483113484113485113486113487113488113489113490113491113492113493113494113495113496113497113498113499113500113501113502113503113504113505113506113507113508113509113510113511113512113513113514113515113516113517113518113519113520113521113522113523113524113525113526113527113528113529113530113531113532113533113534113535113536113537113538113539113540113541113542113543113544113545113546113547113548113549113550113551113552113553113554113555113556113557113558113559113560113561113562113563113564113565113566113567113568113569113570113571113572113573113574113575113576113577113578113579113580113581113582113583113584113585113586113587113588113589113590113591113592113593113594113595113596113597113598113599113600113601113602113603113604113605113606113607113608113609113610113611113612113613113614113615113616113617113618113619113620113621113622113623113624113625113626113627113628113629113630113631113632113633113634113635113636113637113638113639113640113641113642113643113644113645113646113647113648113649113650113651113652113653113654113655113656113657113658113659113660113661113662113663113664113665113666113667113668113669113670113671113672113673113674113675113676113677113678113679113680113681113682113683113684113685113686113687113688113689113690113691113692113693113694113695113696113697113698113699113700113701113702113703113704113705113706113707113708113709113710113711113712113713113714113715113716113717113718113719113720113721113722113723113724113725113726113727113728113729113730113731113732113733113734113735113736113737113738113739113740113741113742113743113744113745113746113747113748113749113750113751113752113753113754113755113756113757113758113759113760113761113762113763113764113765113766113767113768113769113770113771113772113773113774113775113776113777113778113779113780113781113782113783113784113785113786113787113788113789113790113791113792113793113794113795113796113797113798113799113800113801113802113803113804113805113806113807113808113809113810113811113812113813113814113815113816113817113818113819113820113821113822113823113824113825113826113827113828113829113830113831113832113833113834113835113836113837113838113839113840113841113842113843113844113845113846113847113848113849113850113851113852113853113854113855113856113857113858113859113860113861113862113863113864113865113866113867113868113869113870113871113872113873113874113875113876113877113878113879113880113881113882113883113884113885113886113887113888113889113890113891113892113893113894113895113896113897113898113899113900113901113902113903113904113905113906113907113908113909113910113911113912113913113914113915113916113917113918113919113920113921113922113923113924113925113926113927113928113929113930113931113932113933113934113935113936113937113938113939113940113941113942113943113944113945113946113947113948113949113950113951113952113953113954113955113956113957113958113959113960113961113962113963113964113965113966113967113968113969113970113971113972113973113974113975113976113977113978113979113980113981113982113983113984113985113986113987113988113989113990113991113992113993113994113995113996113997113998113999114000114001114002114003114004114005114006114007114008114009114010114011114012114013114014114015114016114017114018114019114020114021114022114023114024114025114026114027114028114029114030114031114032114033114034114035114036114037114038114039114040114041114042114043114044114045114046114047114048114049114050114051114052114053114054114055114056114057114058114059114060114061114062114063114064114065114066114067114068114069114070114071114072114073114074114075114076114077114078114079114080114081114082114083114084114085114086114087114088114089114090114091114092114093114094114095114096114097114098114099114100114101114102114103114104114105114106114107114108114109114110114111114112114113114114114115114116114117114118114119114120114121114122114123114124114125114126114127114128114129114130114131114132114133114134114135114136114137114138114139114140114141114142114143114144114145114146114147114148114149114150114151114152114153114154114155114156114157114158114159114160114161114162114163114164114165114166114167114168114169114170114171114172114173114174114175114176114177114178114179114180114181114182114183114184114185114186114187114188114189114190114191114192114193114194114195114196114197114198114199114200114201114202114203114204114205114206114207114208114209114210114211114212114213114214114215114216114217114218114219114220114221114222114223114224114225114226114227114228114229114230114231114232114233114234114235114236114237114238114239114240114241114242114243114244114245114246114247114248114249114250114251114252114253114254114255114256114257114258114259114260114261114262114263114264114265114266114267114268114269114270114271114272114273114274114275114276114277114278114279114280114281114282114283114284114285114286114287114288114289114290114291114292114293114294114295114296114297114298114299114300114301114302114303114304114305114306114307114308114309114310114311114312114313114314114315114316114317114318114319114320114321114322114323114324114325114326114327114328114329114330114331114332114333114334114335114336114337114338114339114340114341114342114343114344114345114346114347114348114349114350114351114352114353114354114355114356114357114358114359114360114361114362114363114364114365114366114367114368114369114370114371114372114373114374114375114376114377114378114379114380114381114382114383114384114385114386114387114388114389114390114391114392114393114394114395114396114397114398114399114400114401114402114403114404114405114406114407114408114409114410114411114412114413114414114415114416114417114418114419114420114421114422114423114424114425114426114427114428114429114430114431114432114433114434114435114436114437114438114439114440114441114442114443114444114445114446114447114448114449114450114451114452114453114454114455114456114457114458114459114460114461114462114463114464114465114466114467114468114469114470114471114472114473114474114475114476114477114478114479114480114481114482114483114484114485114486114487114488114489114490114491114492114493114494114495114496114497114498114499114500114501114502114503114504114505114506114507114508114509114510114511114512114513114514114515114516114517114518114519114520114521114522114523114524114525114526114527114528114529114530114531114532114533114534114535114536114537114538114539114540114541114542114543114544114545114546114547114548114549114550114551114552114553114554114555114556114557114558114559114560114561114562114563114564114565114566114567114568114569114570114571114572114573114574114575114576114577114578114579114580114581114582114583114584114585114586114587114588114589114590114591114592114593114594114595114596114597114598114599114600114601114602114603114604114605114606114607114608114609114610114611114612114613114614114615114616114617114618114619114620114621114622114623114624114625114626114627114628114629114630114631114632114633114634114635114636114637114638114639114640114641114642114643114644114645114646114647114648114649114650114651114652114653114654114655114656114657114658114659114660114661114662114663114664114665114666114667114668114669114670114671114672114673114674114675114676114677114678114679114680114681114682114683114684114685114686114687114688114689114690114691114692114693114694114695114696114697114698114699114700114701114702114703114704114705114706114707114708114709114710114711114712114713114714114715114716114717114718114719114720114721114722114723114724114725114726114727114728114729114730114731114732114733114734114735114736114737114738114739114740114741114742114743114744114745114746114747114748114749114750114751114752114753114754114755114756114757114758114759114760114761114762114763114764114765114766114767114768114769114770114771114772114773114774114775114776114777114778114779114780114781114782114783114784114785114786114787114788114789114790114791114792114793114794114795114796114797114798114799114800114801114802114803114804114805114806114807114808114809114810114811114812114813114814114815114816114817114818114819114820114821114822114823114824114825114826114827114828114829114830114831114832114833114834114835114836114837114838114839114840114841114842114843114844114845114846114847114848114849114850114851114852114853114854114855114856114857114858114859114860114861114862114863114864114865114866114867114868114869114870114871114872114873114874114875114876114877114878114879114880114881114882114883114884114885114886114887114888114889114890114891114892114893114894114895114896114897114898114899114900114901114902114903114904114905114906114907114908114909114910114911114912114913114914114915114916114917114918114919114920114921114922114923114924114925114926114927114928114929114930114931114932114933114934114935114936114937114938114939114940114941114942114943114944114945114946114947114948114949114950114951114952114953114954114955114956114957114958114959114960114961114962114963114964114965114966114967114968114969114970114971114972114973114974114975114976114977114978114979114980114981114982114983114984114985114986114987114988114989114990114991114992114993114994114995114996114997114998114999115000115001115002115003115004115005115006115007115008115009115010115011115012115013115014115015115016115017115018115019115020115021115022115023115024115025115026115027115028115029115030115031115032115033115034115035115036115037115038115039115040115041115042115043115044115045115046115047115048115049115050115051115052115053115054115055115056115057115058115059115060115061115062115063115064115065115066115067115068115069115070115071115072115073115074115075115076115077115078115079115080115081115082115083115084115085115086115087115088115089115090115091115092115093115094115095115096115097115098115099115100115101115102115103115104115105115106115107115108115109115110115111115112115113115114115115115116115117115118115119115120115121115122115123115124115125115126115127115128115129115130115131115132115133115134115135115136115137115138115139115140115141115142115143115144115145115146115147115148115149115150115151115152115153115154115155115156115157115158115159115160115161115162115163115164115165115166115167115168115169115170115171115172115173115174115175115176115177115178115179115180115181115182115183115184115185115186115187115188115189115190115191115192115193115194115195115196115197115198115199115200115201115202115203115204115205115206115207115208115209115210115211115212115213115214115215115216115217115218115219115220115221115222115223115224115225115226115227115228115229115230115231115232115233115234115235115236115237115238115239115240115241115242115243115244115245115246115247115248115249115250115251115252115253115254115255115256115257115258115259115260115261115262115263115264115265115266115267115268115269115270115271115272115273115274115275115276115277115278115279115280115281115282115283115284115285115286115287115288115289115290115291115292115293115294115295115296115297115298115299115300115301115302115303115304115305115306115307115308115309115310115311115312115313115314115315115316115317115318115319115320115321115322115323115324115325115326115327115328115329115330115331115332115333115334115335115336115337115338115339115340115341115342115343115344115345115346115347115348115349115350115351115352115353115354115355115356115357115358115359115360115361115362115363115364115365115366115367115368115369115370115371115372115373115374115375115376115377115378115379115380115381115382115383115384115385115386115387115388115389115390115391115392115393115394115395115396115397115398115399115400115401115402115403115404115405115406115407115408115409115410115411115412115413115414115415115416115417115418115419115420115421115422115423115424115425115426115427115428115429115430115431115432115433115434115435115436115437115438115439115440115441115442115443115444115445115446115447115448115449115450115451115452115453115454115455115456115457115458115459115460115461115462115463115464115465115466115467115468115469115470115471115472115473115474115475115476115477115478115479115480115481115482115483115484115485115486115487115488115489115490115491115492115493115494115495115496115497115498115499115500115501115502115503115504115505115506115507115508115509115510115511115512115513115514115515115516115517115518115519115520115521115522115523115524115525115526115527115528115529115530115531115532115533115534115535115536115537115538115539115540115541115542115543115544115545115546115547115548115549115550115551115552115553115554115555115556115557115558115559115560115561115562115563115564115565115566115567115568115569115570115571115572115573115574115575115576115577115578115579115580115581115582115583115584115585115586115587115588115589115590115591115592115593115594115595115596115597115598115599115600115601115602115603115604115605115606115607115608115609115610115611115612115613115614115615115616115617115618115619115620115621115622115623115624115625115626115627115628115629115630115631115632115633115634115635115636115637115638115639115640115641115642115643115644115645115646115647115648115649115650115651115652115653115654115655115656115657115658115659115660115661115662115663115664115665115666115667115668115669115670115671115672115673115674115675115676115677115678115679115680115681115682115683115684115685115686115687115688115689115690115691115692115693115694115695115696115697115698115699115700115701115702115703115704115705115706115707115708115709115710115711115712115713115714115715115716115717115718115719115720115721115722115723115724115725115726115727115728115729115730115731115732115733115734115735115736115737115738115739115740115741115742115743115744115745115746115747115748115749115750115751115752115753115754115755115756115757115758115759115760115761115762115763115764115765115766115767115768115769115770115771115772115773115774115775115776115777115778115779115780115781115782115783115784115785115786115787115788115789115790115791115792115793115794115795115796115797115798115799115800115801115802115803115804115805115806115807115808115809115810115811115812115813115814115815115816115817115818115819115820115821115822115823115824115825115826115827115828115829115830115831115832115833115834115835115836115837115838115839115840115841115842115843115844115845115846115847115848115849115850115851115852115853115854115855115856115857115858115859115860115861115862115863115864115865115866115867115868115869115870115871115872115873115874115875115876115877115878115879115880115881115882115883115884115885115886115887115888115889115890115891115892115893115894115895115896115897115898115899115900115901115902115903115904115905115906115907115908115909115910115911115912115913115914115915115916115917115918115919115920115921115922115923115924115925115926115927115928115929115930115931115932115933115934115935115936115937115938115939115940115941115942115943115944115945115946115947115948115949115950115951115952115953115954115955115956115957115958115959115960115961115962115963115964115965115966115967115968115969115970115971115972115973115974115975115976115977115978115979115980115981115982115983115984115985115986115987115988115989115990115991115992115993115994115995115996115997115998115999116000116001116002116003116004116005116006116007116008116009116010116011116012116013116014116015116016116017116018116019116020116021116022116023116024116025116026116027116028116029116030116031116032116033116034116035116036116037116038116039116040116041116042116043116044116045116046116047116048116049116050116051116052116053116054116055116056116057116058116059116060116061116062116063116064116065116066116067116068116069116070116071116072116073116074116075116076116077116078116079116080116081116082116083116084116085116086116087116088116089116090116091116092116093116094116095116096116097116098116099116100116101116102116103116104116105116106116107116108116109116110116111116112116113116114116115116116116117116118116119116120116121116122116123116124116125116126116127116128116129116130116131116132116133116134116135116136116137116138116139116140116141116142116143116144116145116146116147116148116149116150116151116152116153116154116155116156116157116158116159116160116161116162116163116164116165116166116167116168116169116170116171116172116173116174116175116176116177116178116179116180116181116182116183116184116185116186116187116188116189116190116191116192116193116194116195116196116197116198116199116200116201116202116203116204116205116206116207116208116209116210116211116212116213116214116215116216116217116218116219116220116221116222116223116224116225116226116227116228116229116230116231116232116233116234116235116236116237116238116239116240116241116242116243116244116245116246116247116248116249116250116251116252116253116254116255116256116257116258116259116260116261116262116263116264116265116266116267116268116269116270116271116272116273116274116275116276116277116278116279116280116281116282116283116284116285116286116287116288116289116290116291116292116293116294116295116296116297116298116299116300116301116302116303116304116305116306116307116308116309116310116311116312116313116314116315116316116317116318116319116320116321116322116323116324116325116326116327116328116329116330116331116332116333116334116335116336116337116338116339116340116341116342116343116344116345116346116347116348116349116350116351116352116353116354116355116356116357116358116359116360116361116362116363116364116365116366116367116368116369116370116371116372116373116374116375116376116377116378116379116380116381116382116383116384116385116386116387116388116389116390116391116392116393116394116395116396116397116398116399116400116401116402116403116404116405116406116407116408116409116410116411116412116413116414116415116416116417116418116419116420116421116422116423116424116425116426116427116428116429116430116431116432116433116434116435116436116437116438116439116440116441116442116443116444116445116446116447116448116449116450116451116452116453116454116455116456116457116458116459116460116461116462116463116464116465116466116467116468116469116470116471116472116473116474116475116476116477116478116479116480116481116482116483116484116485116486116487116488116489116490116491116492116493116494116495116496116497116498116499116500116501116502116503116504116505116506116507116508116509116510116511116512116513116514116515116516116517116518116519116520116521116522116523116524116525116526116527116528116529116530116531116532116533116534116535116536116537116538116539116540116541116542116543116544116545116546116547116548116549116550116551116552116553116554116555116556116557116558116559116560116561116562116563116564116565116566116567116568116569116570116571116572116573116574116575116576116577116578116579116580116581116582116583116584116585116586116587116588116589116590116591116592116593116594116595116596116597116598116599116600116601116602116603116604116605116606116607116608116609116610116611116612116613116614116615116616116617116618116619116620116621116622116623116624116625116626116627116628116629116630116631116632116633116634116635116636116637116638116639116640116641116642116643116644116645116646116647116648116649116650116651116652116653116654116655116656116657116658116659116660116661116662116663116664116665116666116667116668116669116670116671116672116673116674116675116676116677116678116679116680116681116682116683116684116685116686116687116688116689116690116691116692116693116694116695116696116697116698116699116700116701116702116703116704116705116706116707116708116709116710116711116712116713116714116715116716116717116718116719116720116721116722116723116724116725116726116727116728116729116730116731116732116733116734116735116736116737116738116739116740116741116742116743116744116745116746116747116748116749116750116751116752116753116754116755116756116757116758116759116760116761116762116763116764116765116766116767116768116769116770116771116772116773116774116775116776116777116778116779116780116781116782116783116784116785116786116787116788116789116790116791116792116793116794116795116796116797116798116799116800116801116802116803116804116805116806116807116808116809116810116811116812116813116814116815116816116817116818116819116820116821116822116823116824116825116826116827116828116829116830116831116832116833116834116835116836116837116838116839116840116841116842116843116844116845116846116847116848116849116850116851116852116853116854116855116856116857116858116859116860116861116862116863116864116865116866116867116868116869116870116871116872116873116874116875116876116877116878116879116880116881116882116883116884116885116886116887116888116889116890116891116892116893116894116895116896116897116898116899116900116901116902116903116904116905116906116907116908116909116910116911116912116913116914116915116916116917116918116919116920116921116922116923116924116925116926116927116928116929116930116931116932116933116934116935116936116937116938116939116940116941116942116943116944116945116946116947116948116949116950116951116952116953116954116955116956116957116958116959116960116961116962116963116964116965116966116967116968116969116970116971116972116973116974116975116976116977116978116979116980116981116982116983116984116985116986116987116988116989116990116991116992116993116994116995116996116997116998116999117000117001117002117003117004117005117006117007117008117009117010117011117012117013117014117015117016117017117018117019117020117021117022117023117024117025117026117027117028117029117030117031117032117033117034117035117036117037117038117039117040117041117042117043117044117045117046117047117048117049117050117051117052117053117054117055117056117057117058117059117060117061117062117063117064117065117066117067117068117069117070117071117072117073117074117075117076117077117078117079117080117081117082117083117084117085117086117087117088117089117090117091117092117093117094117095117096117097117098117099117100117101117102117103117104117105117106117107117108117109117110117111117112117113117114117115117116117117117118117119117120117121117122117123117124117125117126117127117128117129117130117131117132117133117134117135117136117137117138117139117140117141117142117143117144117145117146117147117148117149117150117151117152117153117154117155117156117157117158117159117160117161117162117163117164117165117166117167117168117169117170117171117172117173117174117175117176117177117178117179117180117181117182117183117184117185117186117187117188117189117190117191117192117193117194117195117196117197117198117199117200117201117202117203117204117205117206117207117208117209117210117211117212117213117214117215117216117217117218117219117220117221117222117223117224117225117226117227117228117229117230117231117232117233117234117235117236117237117238117239117240117241117242117243117244117245117246117247117248117249117250117251117252117253117254117255117256117257117258117259117260117261117262117263117264117265117266117267117268117269117270117271117272117273117274117275117276117277117278117279117280117281117282117283117284117285117286117287117288117289117290117291117292117293117294117295117296117297117298117299117300117301117302117303117304117305117306117307117308117309117310117311117312117313117314117315117316117317117318117319117320117321117322117323117324117325117326117327117328117329117330117331117332117333117334117335117336117337117338117339117340117341117342117343117344117345117346117347117348117349117350117351117352117353117354117355117356117357117358117359117360117361117362117363117364117365117366117367117368117369117370117371117372117373117374117375117376117377117378117379117380117381117382117383117384117385117386117387117388117389117390117391117392117393117394117395117396117397117398117399117400117401117402117403117404117405117406117407117408117409117410117411117412117413117414117415117416117417117418117419117420117421117422117423117424117425117426117427117428117429117430117431117432117433117434117435117436117437117438117439117440117441117442117443117444117445117446117447117448117449117450117451117452117453117454117455117456117457117458117459117460117461117462117463117464117465117466117467117468117469117470117471117472117473117474117475117476117477117478117479117480117481117482117483117484117485117486117487117488117489117490117491117492117493117494117495117496117497117498117499117500117501117502117503117504117505117506117507117508117509117510117511117512117513117514117515117516117517117518117519117520117521117522117523117524117525117526117527117528117529117530117531117532117533117534117535117536117537117538117539117540117541117542117543117544117545117546117547117548117549117550117551117552117553117554117555117556117557117558117559117560117561117562117563117564117565117566117567117568117569117570117571117572117573117574117575117576117577117578117579117580117581117582117583117584117585117586117587117588117589117590117591117592117593117594117595117596117597117598117599117600117601117602117603117604117605117606117607117608117609117610117611117612117613117614117615117616117617117618117619117620117621117622117623117624117625117626117627117628117629117630117631117632117633117634117635117636117637117638117639117640117641117642117643117644117645117646117647117648117649117650117651117652117653117654117655117656117657117658117659117660117661117662117663117664117665117666117667117668117669117670117671117672117673117674117675117676117677117678117679117680117681117682117683117684117685117686117687117688117689117690117691117692117693117694117695117696117697117698117699117700117701117702117703117704117705117706117707117708117709117710117711117712117713117714117715117716117717117718117719117720117721117722117723117724117725117726117727117728117729117730117731117732117733117734117735117736117737117738117739117740117741117742117743117744117745117746117747117748117749117750117751117752117753117754117755117756117757117758117759117760117761117762117763117764117765117766117767117768117769117770117771117772117773117774117775117776117777117778117779117780117781117782117783117784117785117786117787117788117789117790117791117792117793117794117795117796117797117798117799117800117801117802117803117804117805117806117807117808117809117810117811117812117813117814117815117816117817117818117819117820117821117822117823117824117825117826117827117828117829117830117831117832117833117834117835117836117837117838117839117840117841117842117843117844117845117846117847117848117849117850117851117852117853117854117855117856117857117858117859117860117861117862117863117864117865117866117867117868117869117870117871117872117873117874117875117876117877117878117879117880117881117882117883117884117885117886117887117888117889117890117891117892117893117894117895117896117897117898117899117900117901117902117903117904117905117906117907117908117909117910117911117912117913117914117915117916117917117918117919117920117921117922117923117924117925117926117927117928117929117930117931117932117933117934117935117936117937117938117939117940117941117942117943117944117945117946117947117948117949117950117951117952117953117954117955117956117957117958117959117960117961117962117963117964117965117966117967117968117969117970117971117972117973117974117975117976117977117978117979117980117981117982117983117984117985117986117987117988117989117990117991117992117993117994117995117996117997117998117999118000118001118002118003118004118005118006118007118008118009118010118011118012118013118014118015118016118017118018118019118020118021118022118023118024118025118026118027118028118029118030118031118032118033118034118035118036118037118038118039118040118041118042118043118044118045118046118047118048118049118050118051118052118053118054118055118056118057118058118059118060118061118062118063118064118065118066118067118068118069118070118071118072118073118074118075118076118077118078118079118080118081118082118083118084118085118086118087118088118089118090118091118092118093118094118095118096118097118098118099118100118101118102118103118104118105118106118107118108118109118110118111118112118113118114118115118116118117118118118119118120118121118122118123118124118125118126118127118128118129118130118131118132118133118134118135118136118137118138118139118140118141118142118143118144118145118146118147118148118149118150118151118152118153118154118155118156118157118158118159118160118161118162118163118164118165118166118167118168118169118170118171118172118173118174118175118176118177118178118179118180118181118182118183118184118185118186118187118188118189118190118191118192118193118194118195118196118197118198118199118200118201118202118203118204118205118206118207118208118209118210118211118212118213118214118215118216118217118218118219118220118221118222118223118224118225118226118227118228118229118230118231118232118233118234118235118236118237118238118239118240118241118242118243118244118245118246118247118248118249118250118251118252118253118254118255118256118257118258118259118260118261118262118263118264118265118266118267118268118269118270118271118272118273118274118275118276118277118278118279118280118281118282118283118284118285118286118287118288118289118290118291118292118293118294118295118296118297118298118299118300118301118302118303118304118305118306118307118308118309118310118311118312118313118314118315118316118317118318118319118320118321118322118323118324118325118326118327118328118329118330118331118332118333118334118335118336118337118338118339118340118341118342118343118344118345118346118347118348118349118350118351118352118353118354118355118356118357118358118359118360118361118362118363118364118365118366118367118368118369118370118371118372118373118374118375118376118377118378118379118380118381118382118383118384118385118386118387118388118389118390118391118392118393118394118395118396118397118398118399118400118401118402118403118404118405118406118407118408118409118410118411118412118413118414118415118416118417118418118419118420118421118422118423118424118425118426118427118428118429118430118431118432118433118434118435118436118437118438118439118440118441118442118443118444118445118446118447118448118449118450118451118452118453118454118455118456118457118458118459118460118461118462118463118464118465118466118467118468118469118470118471118472118473118474118475118476118477118478118479118480118481118482118483118484118485118486118487118488118489118490118491118492118493118494118495118496118497118498118499118500118501118502118503118504118505118506118507118508118509118510118511118512118513118514118515118516118517118518118519118520118521118522118523118524118525118526118527118528118529118530118531118532118533118534118535118536118537118538118539118540118541118542118543118544118545118546118547118548118549118550118551118552118553118554118555118556118557118558118559118560118561118562118563118564118565118566118567118568118569118570118571118572118573118574118575118576118577118578118579118580118581118582118583118584118585118586118587118588118589118590118591118592118593118594118595118596118597118598118599118600118601118602118603118604118605118606118607118608118609118610118611118612118613118614118615118616118617118618118619118620118621118622118623118624118625118626118627118628118629118630118631118632118633118634118635118636118637118638118639118640118641118642118643118644118645118646118647118648118649118650118651118652118653118654118655118656118657118658118659118660118661118662118663118664118665118666118667118668118669118670118671118672118673118674118675118676118677118678118679118680118681118682118683118684118685118686118687118688118689118690118691118692118693118694118695118696118697118698118699118700118701118702118703118704118705118706118707118708118709118710118711118712118713118714118715118716118717118718118719118720118721118722118723118724118725118726118727118728118729118730118731118732118733118734118735118736118737118738118739118740118741118742118743118744118745118746118747118748118749118750118751118752118753118754118755118756118757118758118759118760118761118762118763118764118765118766118767118768118769118770118771118772118773118774118775118776118777118778118779118780118781118782118783118784118785118786118787118788118789118790118791118792118793118794118795118796118797118798118799118800118801118802118803118804118805118806118807118808118809118810118811118812118813118814118815118816118817118818118819118820118821118822118823118824118825118826118827118828118829118830118831118832118833118834118835118836118837118838118839118840118841118842118843118844118845118846118847118848118849118850118851118852118853118854118855118856118857118858118859118860118861118862118863118864118865118866118867118868118869118870118871118872118873118874118875118876118877118878118879118880118881118882118883118884118885118886118887118888118889118890118891118892118893118894118895118896118897118898118899118900118901118902118903118904118905118906118907118908118909118910118911118912118913118914118915118916118917118918118919118920118921118922118923118924118925118926118927118928118929118930118931118932118933118934118935118936118937118938118939118940118941118942118943118944118945118946118947118948118949118950118951118952118953118954118955118956118957118958118959118960118961118962118963118964118965118966118967118968118969118970118971118972118973118974118975118976118977118978118979118980118981118982118983118984118985118986118987118988118989118990118991118992118993118994118995118996118997118998118999119000119001119002119003119004119005119006119007119008119009119010119011119012119013119014119015119016119017119018119019119020119021119022119023119024119025119026119027119028119029119030119031119032119033119034119035119036119037119038119039119040119041119042119043119044119045119046119047119048119049119050119051119052119053119054119055119056119057119058119059119060119061119062119063119064119065119066119067119068119069119070119071119072119073119074119075119076119077119078119079119080119081119082119083119084119085119086119087119088119089119090119091119092119093119094119095119096119097119098119099119100119101119102119103119104119105119106119107119108119109119110119111119112119113119114119115119116119117119118119119119120119121119122119123119124119125119126119127119128119129119130119131119132119133119134119135119136119137119138119139119140119141119142119143119144119145119146119147119148119149119150119151119152119153119154119155119156119157119158119159119160119161119162119163119164119165119166119167119168119169119170119171119172119173119174119175119176119177119178119179119180119181119182119183119184119185119186119187119188119189119190119191119192119193119194119195119196119197119198119199119200119201119202119203119204119205119206119207119208119209119210119211119212119213119214119215119216119217119218119219119220119221119222119223119224119225119226119227119228119229119230119231119232119233119234119235119236119237119238119239119240119241119242119243119244119245119246119247119248119249119250119251119252119253119254119255119256119257119258119259119260119261119262119263119264119265119266119267119268119269119270119271119272119273119274119275119276119277119278119279119280119281119282119283119284119285119286119287119288119289119290119291119292119293119294119295119296119297119298119299119300119301119302119303119304119305119306119307119308119309119310119311119312119313119314119315119316119317119318119319119320119321119322119323119324119325119326119327119328119329119330119331119332119333119334119335119336119337119338119339119340119341119342119343119344119345119346119347119348119349119350119351119352119353119354119355119356119357119358119359119360119361119362119363119364119365119366119367119368119369119370119371119372119373119374119375119376119377119378119379119380119381119382119383119384119385119386119387119388119389119390119391119392119393119394119395119396119397119398119399119400119401119402119403119404119405119406119407119408119409119410119411119412119413119414119415119416119417119418119419119420119421119422119423119424119425119426119427119428119429119430119431119432119433119434119435119436119437119438119439119440119441119442119443119444119445119446119447119448119449119450119451119452119453119454119455119456119457119458119459119460119461119462119463119464119465119466119467119468119469119470119471119472119473119474119475119476119477119478119479119480119481119482119483119484119485119486119487119488119489119490119491119492119493119494119495119496119497119498119499119500119501119502119503119504119505119506119507119508119509119510119511119512119513119514119515119516119517119518119519119520119521119522119523119524119525119526119527119528119529119530119531119532119533119534119535119536119537119538119539119540119541119542119543119544119545119546119547119548119549119550119551119552119553119554119555119556119557119558119559119560119561119562119563119564119565119566119567119568119569119570119571119572119573119574119575119576119577119578119579119580119581119582119583119584119585119586119587119588119589119590119591119592119593119594119595119596119597119598119599119600119601119602119603119604119605119606119607119608119609119610119611119612119613119614119615119616119617119618119619119620119621119622119623119624119625119626119627119628119629119630119631119632119633119634119635119636119637119638119639119640119641119642119643119644119645119646119647119648119649119650119651119652119653119654119655119656119657119658119659119660119661119662119663119664119665119666119667119668119669119670119671119672119673119674119675119676119677119678119679119680119681119682119683119684119685119686119687119688119689119690119691119692119693119694119695119696119697119698119699119700119701119702119703119704119705119706119707119708119709119710119711119712119713119714119715119716119717119718119719119720119721119722119723119724119725119726119727119728119729119730119731119732119733119734119735119736119737119738119739119740119741119742119743119744119745119746119747119748119749119750119751119752119753119754119755119756119757119758119759119760119761119762119763119764119765119766119767119768119769119770119771119772119773119774119775119776119777119778119779119780119781119782119783119784119785119786119787119788119789119790119791119792119793119794119795119796119797119798119799119800119801119802119803119804119805119806119807119808119809119810119811119812119813119814119815119816119817119818119819119820119821119822119823119824119825119826119827119828119829119830119831119832119833119834119835119836119837119838119839119840119841119842119843119844119845119846119847119848119849119850119851119852119853119854119855119856119857119858119859119860119861119862119863119864119865119866119867119868119869119870119871119872119873119874119875119876119877119878119879119880119881119882119883119884119885119886119887119888119889119890119891119892119893119894119895119896119897119898119899119900119901119902119903119904119905119906119907119908119909119910119911119912119913119914119915119916119917119918119919119920119921119922119923119924119925119926119927119928119929119930119931119932119933119934119935119936119937119938119939119940119941119942119943119944119945119946119947119948119949119950119951119952119953119954119955119956119957119958119959119960119961119962119963119964119965119966119967119968119969119970119971119972119973119974119975119976119977119978119979119980119981119982119983119984119985119986119987119988119989119990119991119992119993119994119995119996119997119998119999120000120001120002120003120004120005120006120007120008120009120010120011120012120013120014120015120016120017120018120019120020120021120022120023120024120025120026120027120028120029120030120031120032120033120034120035120036120037120038120039120040120041120042120043120044120045120046120047120048120049120050120051120052120053120054120055120056120057120058120059120060120061120062120063120064120065120066120067120068120069120070120071120072120073120074120075120076120077120078120079120080120081120082120083120084120085120086120087120088120089120090120091120092120093120094120095120096120097120098120099120100120101120102120103120104120105120106120107120108120109120110120111120112120113120114120115120116120117120118120119120120120121120122120123120124120125120126120127120128120129120130120131120132120133120134120135120136120137120138120139120140120141120142120143120144120145120146120147120148120149120150120151120152120153120154120155120156120157120158120159120160120161120162120163120164120165120166120167120168120169120170120171120172120173120174120175120176120177120178120179120180120181120182120183120184120185120186120187120188120189120190120191120192120193120194120195120196120197120198120199120200120201120202120203120204120205120206120207120208120209120210120211120212120213120214120215120216120217120218120219120220120221120222120223120224120225120226120227120228120229120230120231120232120233120234120235120236120237120238120239120240120241120242120243120244120245120246120247120248120249120250120251120252120253120254120255120256120257120258120259120260120261120262120263120264120265120266120267120268120269120270120271120272120273120274120275120276120277120278120279120280120281120282120283120284120285120286120287120288120289120290120291120292120293120294120295120296120297120298120299120300120301120302120303120304120305120306120307120308120309120310120311120312120313120314120315120316120317120318120319120320120321120322120323120324120325120326120327120328120329120330120331120332120333120334120335120336120337120338120339120340120341120342120343120344120345120346120347120348120349120350120351120352120353120354120355120356120357120358120359120360120361120362120363120364120365120366120367120368120369120370120371120372120373120374120375120376120377120378120379120380120381120382120383120384120385120386120387120388120389120390120391120392120393120394120395120396120397120398120399120400120401120402120403120404120405120406120407120408120409120410120411120412120413120414120415120416120417120418120419120420120421120422120423120424120425120426120427120428120429120430120431120432120433120434120435120436120437120438120439120440120441120442120443120444120445120446120447120448120449120450120451120452120453120454120455120456120457120458120459120460120461120462120463120464120465120466120467120468120469120470120471120472120473120474120475120476120477120478120479120480120481120482120483120484120485120486120487120488120489120490120491120492120493120494120495120496120497120498120499120500120501120502120503120504120505120506120507120508120509120510120511120512120513120514120515120516120517120518120519120520120521120522120523120524120525120526120527120528120529120530120531120532120533120534120535120536120537120538120539120540120541120542120543120544120545120546120547120548120549120550120551120552120553120554120555120556120557120558120559120560120561120562120563120564120565120566120567120568120569120570120571120572120573120574120575120576120577120578120579120580120581120582120583120584120585120586120587120588120589120590120591120592120593120594120595120596120597120598120599120600120601120602120603120604120605120606120607120608120609120610120611120612120613120614120615120616120617120618120619120620120621120622120623120624120625120626120627120628120629120630120631120632120633120634120635120636120637120638120639120640120641120642120643120644120645120646120647120648120649120650120651120652120653120654120655120656120657120658120659120660120661120662120663120664120665120666120667120668120669120670120671120672120673120674120675120676120677120678120679120680120681120682120683120684120685120686120687120688120689120690120691120692120693120694120695120696120697120698120699120700120701120702120703120704120705120706120707120708120709120710120711120712120713120714120715120716120717120718120719120720120721120722120723120724120725120726120727120728120729120730120731120732120733120734120735120736120737120738120739120740120741120742120743120744120745120746120747120748120749120750120751120752120753120754120755120756120757120758120759120760120761120762120763120764120765120766120767120768120769120770120771120772120773120774120775120776120777120778120779120780120781120782120783120784120785120786120787120788120789120790120791120792120793120794120795120796120797120798120799120800120801120802120803120804120805120806120807120808120809120810120811120812120813120814120815120816120817120818120819120820120821120822120823120824120825120826120827120828120829120830120831120832120833120834120835120836120837120838120839120840120841120842120843120844120845120846120847120848120849120850120851120852120853120854120855120856120857120858120859120860120861120862120863120864120865120866120867120868120869120870120871120872120873120874120875120876120877120878120879120880120881120882120883120884120885120886120887120888120889120890120891120892120893120894120895120896120897120898120899120900120901120902120903120904120905120906120907120908120909120910120911120912120913120914120915120916120917120918120919120920120921120922120923120924120925120926120927120928120929120930120931120932120933120934120935120936120937120938120939120940120941120942120943120944120945120946120947120948120949120950120951120952120953120954120955120956120957120958120959120960120961120962120963120964120965120966120967120968120969120970120971120972120973120974120975120976120977120978120979120980120981120982120983120984120985120986120987120988120989120990120991120992120993120994120995120996120997120998120999121000121001121002121003121004121005121006121007121008121009121010121011121012121013121014121015121016121017121018121019121020121021121022121023121024121025121026121027121028121029121030121031121032121033121034121035121036121037121038121039121040121041121042121043121044121045121046121047121048121049121050121051121052121053121054121055121056121057121058121059121060121061121062121063121064121065121066121067121068121069121070121071121072121073121074121075121076121077121078121079121080121081121082121083121084121085121086121087121088121089121090121091121092121093121094121095121096121097121098121099121100121101121102121103121104121105121106121107121108121109121110121111121112121113121114121115121116121117121118121119121120121121121122121123121124121125121126121127121128121129121130121131121132121133121134121135121136121137121138121139121140121141121142121143121144121145121146121147121148121149121150121151121152121153121154121155121156121157121158121159121160121161121162121163121164121165121166121167121168121169121170121171121172121173121174121175121176121177121178121179121180121181121182121183121184121185121186121187121188121189121190121191121192121193121194121195121196121197121198121199121200121201121202121203121204121205121206121207121208121209121210121211121212121213121214121215121216121217121218121219121220121221121222121223121224121225121226121227121228121229121230121231121232121233121234121235121236121237121238121239121240121241121242121243121244121245121246121247121248121249121250121251121252121253121254121255121256121257121258121259121260121261121262121263121264121265121266121267121268121269121270121271121272121273121274121275121276121277121278121279121280121281121282121283121284121285121286121287121288121289121290121291121292121293121294121295121296121297121298121299121300121301121302121303121304121305121306121307121308121309121310121311121312121313121314121315121316121317121318121319121320121321121322121323121324121325121326121327121328121329121330121331121332121333121334121335121336121337121338121339121340121341121342121343121344121345121346121347121348121349121350121351121352121353121354121355121356121357121358121359121360121361121362121363121364121365121366121367121368121369121370121371121372121373121374121375121376121377121378121379121380121381121382121383121384121385121386121387121388121389121390121391121392121393121394121395121396121397121398121399121400121401121402121403121404121405121406121407121408121409121410121411121412121413121414121415121416121417121418121419121420121421121422121423121424121425121426121427121428121429121430121431121432121433121434121435121436121437121438121439121440121441121442121443121444121445121446121447121448121449121450121451121452121453121454121455121456121457121458121459121460121461121462121463121464121465121466121467121468121469121470121471121472121473121474121475121476121477121478121479121480121481121482121483121484121485121486121487121488121489121490121491121492121493121494121495121496121497121498121499121500121501121502121503121504121505121506121507121508121509121510121511121512121513121514121515121516121517121518121519121520121521121522121523121524121525121526121527121528121529121530121531121532121533121534121535121536121537121538121539121540121541121542121543121544121545121546121547121548121549121550121551121552121553121554121555121556121557121558121559121560121561121562121563121564121565121566121567121568121569121570121571121572121573121574121575121576121577121578121579121580121581121582121583121584121585121586121587121588121589121590121591121592121593121594121595121596121597121598121599121600121601121602121603121604121605121606121607121608121609121610121611121612121613121614121615121616121617121618121619121620121621121622121623121624121625121626121627121628121629121630121631121632121633121634121635121636121637121638121639121640121641121642121643121644121645121646121647121648121649121650121651121652121653121654121655121656121657121658121659121660121661121662121663121664121665121666121667121668121669121670121671121672121673121674121675121676121677121678121679121680121681121682121683121684121685121686121687121688121689121690121691121692121693121694121695121696121697121698121699121700121701121702121703121704121705121706121707121708121709121710121711121712121713121714121715121716121717121718121719121720121721121722121723121724121725121726121727121728121729121730121731121732121733121734121735121736121737121738121739121740121741121742121743121744121745121746121747121748121749121750121751121752121753121754121755121756121757121758121759121760121761121762121763121764121765121766121767121768121769121770121771121772121773121774121775121776121777121778121779121780121781121782121783121784121785121786121787121788121789121790121791121792121793121794121795121796121797121798121799121800121801121802121803121804121805121806121807121808121809121810121811121812121813121814121815121816121817121818121819121820121821121822121823121824121825121826121827121828121829121830121831121832121833121834121835121836121837121838121839121840121841121842121843121844121845121846121847121848121849121850121851121852121853121854121855121856121857121858121859121860121861121862121863121864121865121866121867121868121869121870121871121872121873121874121875121876121877121878121879121880121881121882121883121884121885121886121887121888121889121890121891121892121893121894121895121896121897121898121899121900121901121902121903121904121905121906121907121908121909121910121911121912121913121914121915121916121917121918121919121920121921121922121923121924121925121926121927121928121929121930121931121932121933121934121935121936121937121938121939121940121941121942121943121944121945121946121947121948121949121950121951121952121953121954121955121956121957121958121959121960121961121962121963121964121965121966121967121968121969121970121971121972121973121974121975121976121977121978121979121980121981121982121983121984121985121986121987121988121989121990121991121992121993121994121995121996121997121998121999122000122001122002122003122004122005122006122007122008122009122010122011122012122013122014122015122016122017122018122019122020122021122022122023122024122025122026122027122028122029122030122031122032122033122034122035122036122037122038122039122040122041122042122043122044122045122046122047122048122049122050122051122052122053122054122055122056122057122058122059122060122061122062122063122064122065122066122067122068122069122070122071122072122073122074122075122076122077122078122079122080122081122082122083122084122085122086122087122088122089122090122091122092122093122094122095122096122097122098122099122100122101122102122103122104122105122106122107122108122109122110122111122112122113122114122115122116122117122118122119122120122121122122122123122124122125122126122127122128122129122130122131122132122133122134122135122136122137122138122139122140122141122142122143122144122145122146122147122148122149122150122151122152122153122154122155122156122157122158122159122160122161122162122163122164122165122166122167122168122169122170122171122172122173122174122175122176122177122178122179122180122181122182122183122184122185122186122187122188122189122190122191122192122193122194122195122196122197122198122199122200122201122202122203122204122205122206122207122208122209122210122211122212122213122214122215122216122217122218122219122220122221122222122223122224122225122226122227122228122229122230122231122232122233122234122235122236122237122238122239122240122241122242122243122244122245122246122247122248122249122250122251122252122253122254122255122256122257122258122259122260122261122262122263122264122265122266122267122268122269122270122271122272122273122274122275122276122277122278122279122280122281122282122283122284122285122286122287122288122289122290122291122292122293122294122295122296122297122298122299122300122301122302122303122304122305122306122307122308122309122310122311122312122313122314122315122316122317122318122319122320122321122322122323122324122325122326122327122328122329122330122331122332122333122334122335122336122337122338122339122340122341122342122343122344122345122346122347122348122349122350122351122352122353122354122355122356122357122358122359122360122361122362122363122364122365122366122367122368122369122370122371122372122373122374122375122376122377122378122379122380122381122382122383122384122385122386122387122388122389122390122391122392122393122394122395122396122397122398122399122400122401122402122403122404122405122406122407122408122409122410122411122412122413122414122415122416122417122418122419122420122421122422122423122424122425122426122427122428122429122430122431122432122433122434122435122436122437122438122439122440122441122442122443122444122445122446122447122448122449122450122451122452122453122454122455122456122457122458122459122460122461122462122463122464122465122466122467122468122469122470122471122472122473122474122475122476122477122478122479122480122481122482122483122484122485122486122487122488122489122490122491122492122493122494122495122496122497122498122499122500122501122502122503122504122505122506122507122508122509122510122511122512122513122514122515122516122517122518122519122520122521122522122523122524122525122526122527122528122529122530122531122532122533122534122535122536122537122538122539122540122541122542122543122544122545122546122547122548122549122550122551122552122553122554122555122556122557122558122559122560122561122562122563122564122565122566122567122568122569122570122571122572122573122574122575122576122577122578122579122580122581122582122583122584122585122586122587122588122589122590122591122592122593122594122595122596122597122598122599122600122601122602122603122604122605122606122607122608122609122610122611122612122613122614122615122616122617122618122619122620122621122622122623122624122625122626122627122628122629122630122631122632122633122634122635122636122637122638122639122640122641122642122643122644122645122646122647122648122649122650122651122652122653122654122655122656122657122658122659122660122661122662122663122664122665122666122667122668122669122670122671122672122673122674122675122676122677122678122679122680122681122682122683122684122685122686122687122688122689122690122691122692122693122694122695122696122697122698122699122700122701122702122703122704122705122706122707122708122709122710122711122712122713122714122715122716122717122718122719122720122721122722122723122724122725122726122727122728122729122730122731122732122733122734122735122736122737122738122739122740122741122742122743122744122745122746122747122748122749122750122751122752122753122754122755122756122757122758122759122760122761122762122763122764122765122766122767122768122769122770122771122772122773122774122775122776122777122778122779122780122781122782122783122784122785122786122787122788122789122790122791122792122793122794122795122796122797122798122799122800122801122802122803122804122805122806122807122808122809122810122811122812122813122814122815122816122817122818122819122820122821122822122823122824122825122826122827122828122829122830122831122832122833122834122835122836122837122838122839122840122841122842122843122844122845122846122847122848122849122850122851122852122853122854122855122856122857122858122859122860122861122862122863122864122865122866122867122868122869122870122871122872122873122874122875122876122877122878122879122880122881122882122883122884122885122886122887122888122889122890122891122892122893122894122895122896122897122898122899122900122901122902122903122904122905122906122907122908122909122910122911122912122913122914122915122916122917122918122919122920122921122922122923122924122925122926122927122928122929122930122931122932122933122934122935122936122937122938122939122940122941122942122943122944122945122946122947122948122949122950122951122952122953122954122955122956122957122958122959122960122961122962122963122964122965122966122967122968122969122970122971122972122973122974122975122976122977122978122979122980122981122982122983122984122985122986122987122988122989122990122991122992122993122994122995122996122997122998122999123000123001123002123003123004123005123006123007123008123009123010123011123012123013123014123015123016123017123018123019123020123021123022123023123024123025123026123027123028123029123030123031123032123033123034123035123036123037123038123039123040123041123042123043123044123045123046123047123048123049123050123051123052123053123054123055123056123057123058123059123060123061123062123063123064123065123066123067123068123069123070123071123072123073123074123075123076123077123078123079123080123081123082123083123084123085123086123087123088123089123090123091123092123093123094123095123096123097123098123099123100123101123102123103123104123105123106123107123108123109123110123111123112123113123114123115123116123117123118123119123120123121123122123123123124123125123126123127123128123129123130123131123132123133123134123135123136123137123138123139123140123141123142123143123144123145123146123147123148123149123150123151123152123153123154123155123156123157123158123159123160123161123162123163123164123165123166123167123168123169123170123171123172123173123174123175123176123177123178123179123180123181123182123183123184123185123186123187123188123189123190123191123192123193123194123195123196123197123198123199123200123201123202123203123204123205123206123207123208123209123210123211123212123213123214123215123216123217123218123219123220123221123222123223123224123225123226123227123228123229123230123231123232123233123234123235123236123237123238123239123240123241123242123243123244123245123246123247123248123249123250123251123252123253123254123255123256123257123258123259123260123261123262123263123264123265123266123267123268123269123270123271123272123273123274123275123276123277123278123279123280123281123282123283123284123285123286123287123288123289123290123291123292123293123294123295123296123297123298123299123300123301123302123303123304123305123306123307123308123309123310123311123312123313123314123315123316123317123318123319123320123321123322123323123324123325123326123327123328123329123330123331123332123333123334123335123336123337123338123339123340123341123342123343123344123345123346123347123348123349123350123351123352123353123354123355123356123357123358123359123360123361123362123363123364123365123366123367123368123369123370123371123372123373123374123375123376123377123378123379123380123381123382123383123384123385123386123387123388123389123390123391123392123393123394123395123396123397123398123399123400123401123402123403123404123405123406123407123408123409123410123411123412123413123414123415123416123417123418123419123420123421123422123423123424123425123426123427123428123429123430123431123432123433123434123435123436123437123438123439123440123441123442123443123444123445123446123447123448123449123450123451123452123453123454123455123456123457123458123459123460123461123462123463123464123465123466123467123468123469123470123471123472123473123474123475123476123477123478123479123480123481123482123483123484123485123486123487123488123489123490123491123492123493123494123495123496123497123498123499123500123501123502123503123504123505123506123507123508123509123510123511123512123513123514123515123516123517123518123519123520123521123522123523123524123525123526123527123528123529123530123531123532123533123534123535123536123537123538123539123540123541123542123543123544123545123546123547123548123549123550123551123552123553123554123555123556123557123558123559123560123561123562123563123564123565123566123567123568123569123570123571123572123573123574123575123576123577123578123579123580123581123582123583123584123585123586123587123588123589123590123591123592123593123594123595123596123597123598123599123600123601123602123603123604123605123606123607123608123609123610123611123612123613123614123615123616123617123618123619123620123621123622123623123624123625123626123627123628123629123630123631123632123633123634123635123636123637123638123639123640123641123642123643123644123645123646123647123648123649123650123651123652123653123654123655123656123657123658123659123660123661123662123663123664123665123666123667123668123669123670123671123672123673123674123675123676123677123678123679123680123681123682123683123684123685123686123687123688123689123690123691123692123693123694123695123696123697123698123699123700123701123702123703123704123705123706123707123708123709123710123711123712123713123714123715123716123717123718123719123720123721123722123723123724123725123726123727123728123729123730123731123732123733123734123735123736123737123738123739123740123741123742123743123744123745123746123747123748123749123750123751123752123753123754123755123756123757123758123759123760123761123762123763123764123765123766123767123768123769123770123771123772123773123774123775123776123777123778123779123780123781123782123783123784123785123786123787123788123789123790123791123792123793123794123795123796123797123798123799123800123801123802123803123804123805123806123807123808123809123810123811123812123813123814123815123816123817123818123819123820123821123822123823123824123825123826123827123828123829123830123831123832123833123834123835123836123837123838123839123840123841123842123843123844123845123846123847123848123849123850123851123852123853123854123855123856123857123858123859123860123861123862123863123864123865123866123867123868123869123870123871123872123873123874123875123876123877123878123879123880123881123882123883123884123885123886123887123888123889123890123891123892123893123894123895123896123897123898123899123900123901123902123903123904123905123906123907123908123909123910123911123912123913123914123915123916123917123918123919123920123921123922123923123924123925123926123927123928123929123930123931123932123933123934123935123936123937123938123939123940123941123942123943123944123945123946123947123948123949123950123951123952123953123954123955123956123957123958123959123960123961123962123963123964123965123966123967123968123969123970123971123972123973123974123975123976123977123978123979123980123981123982123983123984123985123986123987123988123989123990123991123992123993123994123995123996123997123998123999124000124001124002124003124004124005124006124007124008124009124010124011124012124013124014124015124016124017124018124019124020124021124022124023124024124025124026124027124028124029124030124031124032124033124034124035124036124037124038124039124040124041124042124043124044124045124046124047124048124049124050124051124052124053124054124055124056124057124058124059124060124061124062124063124064124065124066124067124068124069124070124071124072124073124074124075124076124077124078124079124080124081124082124083124084124085124086124087124088124089124090124091124092124093124094124095124096124097124098124099124100124101124102124103124104124105124106124107124108124109124110124111124112124113124114124115124116124117124118124119124120124121124122124123124124124125124126124127124128124129124130124131124132124133124134124135124136124137124138124139124140124141124142124143124144124145124146124147124148124149124150124151124152124153124154124155124156124157124158124159124160124161124162124163124164124165124166124167124168124169124170124171124172124173124174124175124176124177124178124179124180124181124182124183124184124185124186124187124188124189124190124191124192124193124194124195124196124197124198124199124200124201124202124203124204124205124206124207124208124209124210124211124212124213124214124215124216124217124218124219124220124221124222124223124224124225124226124227124228124229124230124231124232124233124234124235124236124237124238124239124240124241124242124243124244124245124246124247124248124249124250124251124252124253124254124255124256124257124258124259124260124261124262124263124264124265124266124267124268124269124270124271124272124273124274124275124276124277124278124279124280124281124282124283124284124285124286124287124288124289124290124291124292124293124294124295124296124297124298124299124300124301124302124303124304124305124306124307124308124309124310124311124312124313124314124315124316124317124318124319124320124321124322124323124324124325124326124327124328124329124330124331124332124333124334124335124336124337124338124339124340124341124342124343124344124345124346124347124348124349124350124351124352124353124354124355124356124357124358124359124360124361124362124363124364124365124366124367124368124369124370124371124372124373124374124375124376124377124378124379124380124381124382124383124384124385124386124387124388124389124390124391124392124393124394124395124396124397124398124399124400124401124402124403124404124405124406124407124408124409124410124411124412124413124414124415124416124417124418124419124420124421124422124423124424124425124426124427124428124429124430124431124432124433124434124435124436124437124438124439124440124441124442124443124444124445124446124447124448124449124450124451124452124453124454124455124456124457124458124459124460124461124462124463124464124465124466124467124468124469124470124471124472124473124474124475124476124477124478124479124480124481124482124483124484124485124486124487124488124489124490124491124492124493124494124495124496124497124498124499124500124501124502124503124504124505124506124507124508124509124510124511124512124513124514124515124516124517124518124519124520124521124522124523124524124525124526124527124528124529124530124531124532124533124534124535124536124537124538124539124540124541124542124543124544124545124546124547124548124549124550124551124552124553124554124555124556124557124558124559124560124561124562124563124564124565124566124567124568124569124570124571124572124573124574124575124576124577124578124579124580124581124582124583124584124585124586124587124588124589124590124591124592124593124594124595124596124597124598124599124600124601124602124603124604124605124606124607124608124609124610124611124612124613124614124615124616124617124618124619124620124621124622124623124624124625124626124627124628124629124630124631124632124633124634124635124636124637124638124639124640124641124642124643124644124645124646124647124648124649124650124651124652124653124654124655124656124657124658124659124660124661124662124663124664124665124666124667124668124669124670124671124672124673124674124675124676124677124678124679124680124681124682124683124684124685124686124687124688124689124690124691124692124693124694124695124696124697124698124699124700124701124702124703124704124705124706124707124708124709124710124711124712124713124714124715124716124717124718124719124720124721124722124723124724124725124726124727124728124729124730124731124732124733124734124735124736124737124738124739124740124741124742124743124744124745124746124747124748124749124750124751124752124753124754124755124756124757124758124759124760124761124762124763124764124765124766124767124768124769124770124771124772124773124774124775124776124777124778124779124780124781124782124783124784124785124786124787124788124789124790124791124792124793124794124795124796124797124798124799124800124801124802124803124804124805124806124807124808124809124810124811124812124813124814124815124816124817124818124819124820124821124822124823124824124825124826124827124828124829124830124831124832124833124834124835124836124837124838124839124840124841124842124843124844124845124846124847124848124849124850124851124852124853124854124855124856124857124858124859124860124861124862124863124864124865124866124867124868124869124870124871124872124873124874124875124876124877124878124879124880124881124882124883124884124885124886124887124888124889124890124891124892124893124894124895124896124897124898124899124900124901124902124903124904124905124906124907124908124909124910124911124912124913124914124915124916124917124918124919124920124921124922124923124924124925124926124927124928124929124930124931124932124933124934124935124936124937124938124939124940124941124942124943124944124945124946124947124948124949124950124951124952124953124954124955124956124957124958124959124960124961124962124963124964124965124966124967124968124969124970124971124972124973124974124975124976124977124978124979124980124981124982124983124984124985124986124987124988124989124990124991124992124993124994124995124996124997124998124999125000125001125002125003125004125005125006125007125008125009125010125011125012125013125014125015125016125017125018125019125020125021125022125023125024125025125026125027125028125029125030125031125032125033125034125035125036125037125038125039125040125041125042125043125044125045125046125047125048125049125050125051125052125053125054125055125056125057125058125059125060125061125062125063125064125065125066125067125068125069125070125071125072125073125074125075125076125077125078125079125080125081125082125083125084125085125086125087125088125089125090125091125092125093125094125095125096125097125098125099125100125101125102125103125104125105125106125107125108125109125110125111125112125113125114125115125116125117125118125119125120125121125122125123125124125125125126125127125128125129125130125131125132125133125134125135125136125137125138125139125140125141125142125143125144125145125146125147125148125149125150125151125152125153125154125155125156125157125158125159125160125161125162125163125164125165125166125167125168125169125170125171125172125173125174125175125176125177125178125179125180125181125182125183125184125185125186125187125188125189125190125191125192125193125194125195125196125197125198125199125200125201125202125203125204125205125206125207125208125209125210125211125212125213125214125215125216125217125218125219125220125221125222125223125224125225125226125227125228125229125230125231125232125233125234125235125236125237125238125239125240125241125242125243125244125245125246125247125248125249125250125251125252125253125254125255125256125257125258125259125260125261125262125263125264125265125266125267125268125269125270125271125272125273125274125275125276125277125278125279125280125281125282125283125284125285125286125287125288125289125290125291125292125293125294125295125296125297125298125299125300125301125302125303125304125305125306125307125308125309125310125311125312125313125314125315125316125317125318125319125320125321125322125323125324125325125326125327125328125329125330125331125332125333125334125335125336125337125338125339125340125341125342125343125344125345125346125347125348125349125350125351125352125353125354125355125356125357125358125359125360125361125362125363125364125365125366125367125368125369125370125371125372125373125374125375125376125377125378125379125380125381125382125383125384125385125386125387125388125389125390125391125392125393125394125395125396125397125398125399125400125401125402125403125404125405125406125407125408125409125410125411125412125413125414125415125416125417125418125419125420125421125422125423125424125425125426125427125428125429125430125431125432125433125434125435125436125437125438125439125440125441125442125443125444125445125446125447125448125449125450125451125452125453125454125455125456125457125458125459125460125461125462125463125464125465125466125467125468125469125470125471125472125473125474125475125476125477125478125479125480125481125482125483125484125485125486125487125488125489125490125491125492125493125494125495125496125497125498125499125500125501125502125503125504125505125506125507125508125509125510125511125512125513125514125515125516125517125518125519125520125521125522125523125524125525125526125527125528125529125530125531125532125533125534125535125536125537125538125539125540125541125542125543125544125545125546125547125548125549125550125551125552125553125554125555125556125557125558125559125560125561125562125563125564125565125566125567125568125569125570125571125572125573125574125575125576125577125578125579125580125581125582125583125584125585125586125587125588125589125590125591125592125593125594125595125596125597125598125599125600125601125602125603125604125605125606125607125608125609125610125611125612125613125614125615125616125617125618125619125620125621125622125623125624125625125626125627125628125629125630125631125632125633125634125635125636125637125638125639125640125641125642125643125644125645125646125647125648125649125650125651125652125653125654125655125656125657125658125659125660125661125662125663125664125665125666125667125668125669125670125671125672125673125674125675125676125677125678125679125680125681125682125683125684125685125686125687125688125689125690125691125692125693125694125695125696125697125698125699125700125701125702125703125704125705125706125707125708125709125710125711125712125713125714125715125716125717125718125719125720125721125722125723125724125725125726125727125728125729125730125731125732125733125734125735125736125737125738125739125740125741125742125743125744125745125746125747125748125749125750125751125752125753125754125755125756125757125758125759125760125761125762125763125764125765125766125767125768125769125770125771125772125773125774125775125776125777125778125779125780125781125782125783125784125785125786125787125788125789125790125791125792125793125794125795125796125797125798125799125800125801125802125803125804125805125806125807125808125809125810125811125812125813125814125815125816125817125818125819125820125821125822125823125824125825125826125827125828125829125830125831125832125833125834125835125836125837125838125839125840125841125842125843125844125845125846125847125848125849125850125851125852125853125854125855125856125857125858125859125860125861125862125863125864125865125866125867125868125869125870125871125872125873125874125875125876125877125878125879125880125881125882125883125884125885125886125887125888125889125890125891125892125893125894125895125896125897125898125899125900125901125902125903125904125905125906125907125908125909125910125911125912125913125914125915125916125917125918125919125920125921125922125923125924125925125926125927125928125929125930125931125932125933125934125935125936125937125938125939125940125941125942125943125944125945125946125947125948125949125950125951125952125953125954125955125956125957125958125959125960125961125962125963125964125965125966125967125968125969125970125971125972125973125974125975125976125977125978125979125980125981125982125983125984125985125986125987125988125989125990125991125992125993125994125995125996125997125998125999126000126001126002126003126004126005126006126007126008126009126010126011126012126013126014126015126016126017126018126019126020126021126022126023126024126025126026126027126028126029126030126031126032126033126034126035126036126037126038126039126040126041126042126043126044126045126046126047126048126049126050126051126052126053126054126055126056126057126058126059126060126061126062126063126064126065126066126067126068126069126070126071126072126073126074126075126076126077126078126079126080126081126082126083126084126085126086126087126088126089126090126091126092126093126094126095126096126097126098126099126100126101126102126103126104126105126106126107126108126109126110126111126112126113126114126115126116126117126118126119126120126121126122126123126124126125126126126127126128126129126130126131126132126133126134126135126136126137126138126139126140126141126142126143126144126145126146126147126148126149126150126151126152126153126154126155126156126157126158126159126160126161126162126163126164126165126166126167126168126169126170126171126172126173126174126175126176126177126178126179126180126181126182126183126184126185126186126187126188126189126190126191126192126193126194126195126196126197126198126199126200126201126202126203126204126205126206126207126208126209126210126211126212126213126214126215126216126217126218126219126220126221126222126223126224126225126226126227126228126229126230126231126232126233126234126235126236126237126238126239126240126241126242126243126244126245126246126247126248126249126250126251126252126253126254126255126256126257126258126259126260126261126262126263126264126265126266126267126268126269126270126271126272126273126274126275126276126277126278126279126280126281126282126283126284126285126286126287126288126289126290126291126292126293126294126295126296126297126298126299126300126301126302126303126304126305126306126307126308126309126310126311126312126313126314126315126316126317126318126319126320126321126322126323126324126325126326126327126328126329126330126331126332126333126334126335126336126337126338126339126340126341126342126343126344126345126346126347126348126349126350126351126352126353126354126355126356126357126358126359126360126361126362126363126364126365126366126367126368126369126370126371126372126373126374126375126376126377126378126379126380126381126382126383126384126385126386126387126388126389126390126391126392126393126394126395126396126397126398126399126400126401126402126403126404126405126406126407126408126409126410126411126412126413126414126415126416126417126418126419126420126421126422126423126424126425126426126427126428126429126430126431126432126433126434126435126436126437126438126439126440126441126442126443126444126445126446126447126448126449126450126451126452126453126454126455126456126457126458126459126460126461126462126463126464126465126466126467126468126469126470126471126472126473126474126475126476126477126478126479126480126481126482126483126484126485126486126487126488126489126490126491126492126493126494126495126496126497126498126499126500126501126502126503126504126505126506126507126508126509126510126511126512126513126514126515126516126517126518126519126520126521126522126523126524126525126526126527126528126529126530126531126532126533126534126535126536126537126538126539126540126541126542126543126544126545126546126547126548126549126550126551126552126553126554126555126556126557126558126559126560126561126562126563126564126565126566126567126568126569126570126571126572126573126574126575126576126577126578126579126580126581126582126583126584126585126586126587126588126589126590126591126592126593126594126595126596126597126598126599126600126601126602126603126604126605126606126607126608126609126610126611126612126613126614126615126616126617126618126619126620126621126622126623126624126625126626126627126628126629126630126631126632126633126634126635126636126637126638126639126640126641126642126643126644126645126646126647126648126649126650126651126652126653126654126655126656126657126658126659126660126661126662126663126664126665126666126667126668126669126670126671126672126673126674126675126676126677126678126679126680126681126682126683126684126685126686126687126688126689126690126691126692126693126694126695126696126697126698126699126700126701126702126703126704126705126706126707126708126709126710126711126712126713126714126715126716126717126718126719126720126721126722126723126724126725126726126727126728126729126730126731126732126733126734126735126736126737126738126739126740126741126742126743126744126745126746126747126748126749126750126751126752126753126754126755126756126757126758126759126760126761126762126763126764126765126766126767126768126769126770126771126772126773126774126775126776126777126778126779126780126781126782126783126784126785126786126787126788126789126790126791126792126793126794126795126796126797126798126799126800126801126802126803126804126805126806126807126808126809126810126811126812126813126814126815126816126817126818126819126820126821126822126823126824126825126826126827126828126829126830126831126832126833126834126835126836126837126838126839126840126841126842126843126844126845126846126847126848126849126850126851126852126853126854126855126856126857126858126859126860126861126862126863126864126865126866126867126868126869126870126871126872126873126874126875126876126877126878126879126880126881126882126883126884126885126886126887126888126889126890126891126892126893126894126895126896126897126898126899126900126901126902126903126904126905126906126907126908126909126910126911126912126913126914126915126916126917126918126919126920126921126922126923126924126925126926126927126928126929126930126931126932126933126934126935126936126937126938126939126940126941126942126943126944126945126946126947126948126949126950126951126952126953126954126955126956126957126958126959126960126961126962126963126964126965126966126967126968126969126970126971126972126973126974126975126976126977126978126979126980126981126982126983126984126985126986126987126988126989126990126991126992126993126994126995126996126997126998126999127000127001127002127003127004127005127006127007127008127009127010127011127012127013127014127015127016127017127018127019127020127021127022127023127024127025127026127027127028127029127030127031127032127033127034127035127036127037127038127039127040127041127042127043127044127045127046127047127048127049127050127051127052127053127054127055127056127057127058127059127060127061127062127063127064127065127066127067127068127069127070127071127072127073127074127075127076127077127078127079127080127081127082127083127084127085127086127087127088127089127090127091127092127093127094127095127096127097127098127099127100127101127102127103127104127105127106127107127108127109127110127111127112127113127114127115127116127117127118127119127120127121127122127123127124127125127126127127127128127129127130127131127132127133127134127135127136127137127138127139127140127141127142127143127144127145127146127147127148127149127150127151127152127153127154127155127156127157127158127159127160127161127162127163127164127165127166127167127168127169127170127171127172127173127174127175127176127177127178127179127180127181127182127183127184127185127186127187127188127189127190127191127192127193127194127195127196127197127198127199127200127201127202127203127204127205127206127207127208127209127210127211127212127213127214127215127216127217127218127219127220127221127222127223127224127225127226127227127228127229127230127231127232127233127234127235127236127237127238127239127240127241127242127243127244127245127246127247127248127249127250127251127252127253127254127255127256127257127258127259127260127261127262127263127264127265127266127267127268127269127270127271127272127273127274127275127276127277127278127279127280127281127282127283127284127285127286127287127288127289127290127291127292127293127294127295127296127297127298127299127300127301127302127303127304127305127306127307127308127309127310127311127312127313127314127315127316127317127318127319127320127321127322127323127324127325127326127327127328127329127330127331127332127333127334127335127336127337127338127339127340127341127342127343127344127345127346127347127348127349127350127351127352127353127354127355127356127357127358127359127360127361127362127363127364127365127366127367127368127369127370127371127372127373127374127375127376127377127378127379127380127381127382127383127384127385127386127387127388127389127390127391127392127393127394127395127396127397127398127399127400127401127402127403127404127405127406127407127408127409127410127411127412127413127414127415127416127417127418127419127420127421127422127423127424127425127426127427127428127429127430127431127432127433127434127435127436127437127438127439127440127441127442127443127444127445127446127447127448127449127450127451127452127453127454127455127456127457127458127459127460127461127462127463127464127465127466127467127468127469127470127471127472127473127474127475127476127477127478127479127480127481127482127483127484127485127486127487127488127489127490127491127492127493127494127495127496127497127498127499127500127501127502127503127504127505127506127507127508127509127510127511127512127513127514127515127516127517127518127519127520127521127522127523127524127525127526127527127528127529127530127531127532127533127534127535127536127537127538127539127540127541127542127543127544127545127546127547127548127549127550127551127552127553127554127555127556127557127558127559127560127561127562127563127564127565127566127567127568127569127570127571127572127573127574127575127576127577127578127579127580127581127582127583127584127585127586127587127588127589127590127591127592127593127594127595127596127597127598127599127600127601127602127603127604127605127606127607127608127609127610127611127612127613127614127615127616127617127618127619127620127621127622127623127624127625127626127627127628127629127630127631127632127633127634127635127636127637127638127639127640127641127642127643127644127645127646127647127648127649127650127651127652127653127654127655127656127657127658127659127660127661127662127663127664127665127666127667127668127669127670127671127672127673127674127675127676127677127678127679127680127681127682127683127684127685127686127687127688127689127690127691127692127693127694127695127696127697127698127699127700127701127702127703127704127705127706127707127708127709127710127711127712127713127714127715127716127717127718127719127720127721127722127723127724127725127726127727127728127729127730127731127732127733127734127735127736127737127738127739127740127741127742127743127744127745127746127747127748127749127750127751127752127753127754127755127756127757127758127759127760127761127762127763127764127765127766127767127768127769127770127771127772127773127774127775127776127777127778127779127780127781127782127783127784127785127786127787127788127789127790127791127792127793127794127795127796127797127798127799127800127801127802127803127804127805127806127807127808127809127810127811127812127813127814127815127816127817127818127819127820127821127822127823127824127825127826127827127828127829127830127831127832127833127834127835127836127837127838127839127840127841127842127843127844127845127846127847127848127849127850127851127852127853127854127855127856127857127858127859127860127861127862127863127864127865127866127867127868127869127870127871127872127873127874127875127876127877127878127879127880127881127882127883127884127885127886127887127888127889127890127891127892127893127894127895127896127897127898127899127900127901127902127903127904127905127906127907127908127909127910127911127912127913127914127915127916127917127918127919127920127921127922127923127924127925127926127927127928127929127930127931127932127933127934127935127936127937127938127939127940127941127942127943127944127945127946127947127948127949127950127951127952127953127954127955127956127957127958127959127960127961127962127963127964127965127966127967127968127969127970127971127972127973127974127975127976127977127978127979127980127981127982127983127984127985127986127987127988127989127990127991127992127993127994127995127996127997127998127999128000128001128002128003128004128005128006128007128008128009128010128011128012128013128014128015128016128017128018128019128020128021128022128023128024128025128026128027128028128029128030128031128032128033128034128035128036128037128038128039128040128041128042128043128044128045128046128047128048128049128050128051128052128053128054128055128056128057128058128059128060128061128062128063128064128065128066128067128068128069128070128071128072128073128074128075128076128077128078128079128080128081128082128083128084128085128086128087128088128089128090128091128092128093128094128095128096128097128098128099128100128101128102128103128104128105128106128107128108128109128110128111128112128113128114128115128116128117128118128119128120128121128122128123128124128125128126128127128128128129128130128131128132128133128134128135128136128137128138128139128140128141128142128143128144128145128146128147128148128149128150128151128152128153128154128155128156128157128158128159128160128161128162128163128164128165128166128167128168128169128170128171128172128173128174128175128176128177128178128179128180128181128182128183128184128185128186128187128188128189128190128191128192128193128194128195128196128197128198128199128200128201128202128203128204128205128206128207128208128209128210128211128212128213128214128215128216128217128218128219128220128221128222128223128224128225128226128227128228128229128230128231128232128233128234128235128236128237128238128239128240128241128242128243128244128245128246128247128248128249128250128251128252128253128254128255128256128257128258128259128260128261128262128263128264128265128266128267128268128269128270128271128272128273128274128275128276128277128278128279128280128281128282128283128284128285128286128287128288128289128290128291128292128293128294128295128296128297128298128299128300128301128302128303128304128305128306128307128308128309128310128311128312128313128314128315128316128317128318128319128320128321128322128323128324128325128326128327128328128329128330128331128332128333128334128335128336128337128338128339128340128341128342128343128344128345128346128347128348128349128350128351128352128353128354128355128356128357128358128359128360128361128362128363128364128365128366128367128368128369128370128371128372128373128374128375128376128377128378128379128380128381128382128383128384128385128386128387128388128389128390128391128392128393128394128395128396128397128398128399128400128401128402128403128404128405128406128407128408128409128410128411128412128413128414128415128416128417128418128419128420128421128422128423128424128425128426128427128428128429128430128431128432128433128434128435128436128437128438128439128440128441128442128443128444128445128446128447128448128449128450128451128452128453128454128455128456128457128458128459128460128461128462128463128464128465128466128467128468128469128470128471128472128473128474128475128476128477128478128479128480128481128482128483128484128485128486128487128488128489128490128491128492128493128494128495128496128497128498128499128500128501128502128503128504128505128506128507128508128509128510128511128512128513128514128515128516128517128518128519128520128521128522128523128524128525128526128527128528128529128530128531128532128533128534128535128536128537128538128539128540128541128542128543128544128545128546128547128548128549128550128551128552128553128554128555128556128557128558128559128560128561128562128563128564128565128566128567128568128569128570128571128572128573128574128575128576128577128578128579128580128581128582128583128584128585128586128587128588128589128590128591128592128593128594128595128596128597128598128599128600128601128602128603128604128605128606128607128608128609128610128611128612128613128614128615128616128617128618128619128620128621128622128623128624128625128626128627128628128629128630128631128632128633128634128635128636128637128638128639128640128641128642128643128644128645128646128647128648128649128650128651128652128653128654128655128656128657128658128659128660128661128662128663128664128665128666128667128668128669128670128671128672128673128674128675128676128677128678128679128680128681128682128683128684128685128686128687128688128689128690128691128692128693128694128695128696128697128698128699128700128701128702128703128704128705128706128707128708128709128710128711128712128713128714128715128716128717128718128719128720128721128722128723128724128725128726128727128728128729128730128731128732128733128734128735128736128737128738128739128740128741128742128743128744128745128746128747128748128749128750128751128752128753128754128755128756128757128758128759128760128761128762128763128764128765128766128767128768128769128770128771128772128773128774128775128776128777128778128779128780128781128782128783128784128785128786128787128788128789128790128791128792128793128794128795128796128797128798128799128800128801128802128803128804128805128806128807128808128809128810128811128812128813128814128815128816128817128818128819128820128821128822128823128824128825128826128827128828128829128830128831128832128833128834128835128836128837128838128839128840128841128842128843128844128845128846128847128848128849128850128851128852128853128854128855128856128857128858128859128860128861128862128863128864128865128866128867128868128869128870128871128872128873128874128875128876128877128878128879128880128881128882128883128884128885128886128887128888128889128890128891128892128893128894128895128896128897128898128899128900128901128902128903128904128905128906128907128908128909128910128911128912128913128914128915128916128917128918128919128920128921128922128923128924128925128926128927128928128929128930128931128932128933128934128935128936128937128938128939128940128941128942128943128944128945128946128947128948128949128950128951128952128953128954128955128956128957128958128959128960128961128962128963128964128965128966128967128968128969128970128971128972128973128974128975128976128977128978128979128980128981128982128983128984128985128986128987128988128989128990128991128992128993128994128995128996128997128998128999129000129001129002129003129004129005129006129007129008129009129010129011129012129013129014129015129016129017129018129019129020129021129022129023129024129025129026129027129028129029129030129031129032129033129034129035129036129037129038129039129040129041129042129043129044129045129046129047129048129049129050129051129052129053129054129055129056129057129058129059129060129061129062129063129064129065129066129067129068129069129070129071129072129073129074129075129076129077129078129079129080129081129082129083129084129085129086129087129088129089129090129091129092129093129094129095129096129097129098129099129100129101129102129103129104129105129106129107129108129109129110129111129112129113129114129115129116129117129118129119129120129121129122129123129124129125129126129127129128129129129130129131129132129133129134129135129136129137129138129139129140129141129142129143129144129145129146129147129148129149129150129151129152129153129154129155129156129157129158129159129160129161129162129163129164129165129166129167129168129169129170129171129172129173129174129175129176129177129178129179129180129181129182129183129184129185129186129187129188129189129190129191129192129193129194129195129196129197129198129199129200129201129202129203129204129205129206129207129208129209129210129211129212129213129214129215129216129217129218129219129220129221129222129223129224129225129226129227129228129229129230129231129232129233129234129235129236129237129238129239129240129241129242129243129244129245129246129247129248129249129250129251129252129253129254129255129256129257129258129259129260129261129262129263129264129265129266129267129268129269129270129271129272129273129274129275129276129277129278129279129280129281129282129283129284129285129286129287129288129289129290129291129292129293129294129295129296129297129298129299129300129301129302129303129304129305129306129307129308129309129310129311129312129313129314129315129316129317129318129319129320129321129322129323129324129325129326129327129328129329129330129331129332129333129334129335129336129337129338129339129340129341129342129343129344129345129346129347129348129349129350129351129352129353129354129355129356129357129358129359129360129361129362129363129364129365129366129367129368129369129370129371129372129373129374129375129376129377129378129379129380129381129382129383129384129385129386129387129388129389129390129391129392129393129394129395129396129397129398129399129400129401129402129403129404129405129406129407129408129409129410129411129412129413129414129415129416129417129418129419129420129421129422129423129424129425129426129427129428129429129430129431129432129433129434129435129436129437129438129439129440129441129442129443129444129445129446129447129448129449129450129451129452129453129454129455129456129457129458129459129460129461129462129463129464129465129466129467129468129469129470129471129472129473129474129475129476129477129478129479129480129481129482129483129484129485129486129487129488129489129490129491129492129493129494129495129496129497129498129499129500129501129502129503129504129505129506129507129508129509129510129511129512129513129514129515129516129517129518129519129520129521129522129523129524129525129526129527129528129529129530129531129532129533129534129535129536129537129538129539129540129541129542129543129544129545129546129547129548129549129550129551129552129553129554129555129556129557129558129559129560129561129562129563129564129565129566129567129568129569129570129571129572129573129574129575129576129577129578129579129580129581129582129583129584129585129586129587129588129589129590129591129592129593129594129595129596129597129598129599129600129601129602129603129604129605129606129607129608129609129610129611129612129613129614129615129616129617129618129619129620129621129622129623129624129625129626129627129628129629129630129631129632129633129634129635129636129637129638129639129640129641129642129643129644129645129646129647129648129649129650129651129652129653129654129655129656129657129658129659129660129661129662129663129664129665129666129667129668129669129670129671129672129673129674129675129676129677129678129679129680129681129682129683129684129685129686129687129688129689129690129691129692129693129694129695129696129697129698129699129700129701129702129703129704129705129706129707129708129709129710129711129712129713129714129715129716129717129718129719129720129721129722129723129724129725129726129727129728129729129730129731129732129733129734129735129736129737129738129739129740129741129742129743129744129745129746129747129748129749129750129751129752129753129754129755129756129757129758129759129760129761129762129763129764129765129766129767129768129769129770129771129772129773129774129775129776129777129778129779129780129781129782129783129784129785129786129787129788129789129790129791129792129793129794129795129796129797129798129799129800129801129802129803129804129805129806129807129808129809129810129811129812129813129814129815129816129817129818129819129820129821129822129823129824129825129826129827129828129829129830129831129832129833129834129835129836129837129838129839129840129841129842129843129844129845129846129847129848129849129850129851129852129853129854129855129856129857129858129859129860129861129862129863129864129865129866129867129868129869129870129871129872129873129874129875129876129877129878129879129880129881129882129883129884129885129886129887129888129889129890129891129892129893129894129895129896129897129898129899129900129901129902129903129904129905129906129907129908129909129910129911129912129913129914129915129916129917129918129919129920129921129922129923129924129925129926129927129928129929129930129931129932129933129934129935129936129937129938129939129940129941129942129943129944129945129946129947129948129949129950129951129952129953129954129955129956129957129958129959129960129961129962129963129964129965129966129967129968129969129970129971129972129973129974129975129976129977129978129979129980129981129982129983129984129985129986129987129988129989129990129991129992129993129994129995129996129997129998129999130000130001130002130003130004130005130006130007130008130009130010130011130012130013130014130015130016130017130018130019130020130021130022130023130024130025130026130027130028130029130030130031130032130033130034130035130036130037130038130039130040130041130042130043130044130045130046130047130048130049130050130051130052130053130054130055130056130057130058130059130060130061130062130063130064130065130066130067130068130069130070130071130072130073130074130075130076130077130078130079130080130081130082130083130084130085130086130087130088130089130090130091130092130093130094130095130096130097130098130099130100130101130102130103130104130105130106130107130108130109130110130111130112130113130114130115130116130117130118130119130120130121130122130123130124130125130126130127130128130129130130130131130132130133130134130135130136130137130138130139130140130141130142130143130144130145130146130147130148130149130150130151130152130153130154130155130156130157130158130159130160130161130162130163130164130165130166130167130168130169130170130171130172130173130174130175130176130177130178130179130180130181130182130183130184130185130186130187130188130189130190130191130192130193130194130195130196130197130198130199130200130201130202130203130204130205130206130207130208130209130210130211130212130213130214130215130216130217130218130219130220130221130222130223130224130225130226130227130228130229130230130231130232130233130234130235130236130237130238130239130240130241130242130243130244130245130246130247130248130249130250130251130252130253130254130255130256130257130258130259130260130261130262130263130264130265130266130267130268130269130270130271130272130273130274130275130276130277130278130279130280130281130282130283130284130285130286130287130288130289130290130291130292130293130294130295130296130297130298130299130300130301130302130303130304130305130306130307130308130309130310130311130312130313130314130315130316130317130318130319130320130321130322130323130324130325130326130327130328130329130330130331130332130333130334130335130336130337130338130339130340130341130342130343130344130345130346130347130348130349130350130351130352130353130354130355130356130357130358130359130360130361130362130363130364130365130366130367130368130369130370130371130372130373130374130375130376130377130378130379130380130381130382130383130384130385130386130387130388130389130390130391130392130393130394130395130396130397130398130399130400130401130402130403130404130405130406130407130408130409130410130411130412130413130414130415130416130417130418130419130420130421130422130423130424130425130426130427130428130429130430130431130432130433130434130435130436130437130438130439130440130441130442130443130444130445130446130447130448130449130450130451130452130453130454130455130456130457130458130459130460130461130462130463130464130465130466130467130468130469130470130471130472130473130474130475130476130477130478130479130480130481130482130483130484130485130486130487130488130489130490130491130492130493130494130495130496130497130498130499130500130501130502130503130504130505130506130507130508130509130510130511130512130513130514130515130516130517130518130519130520130521130522130523130524130525130526130527130528130529130530130531130532130533130534130535130536130537130538130539130540130541130542130543130544130545130546130547130548130549130550130551130552130553130554130555130556130557130558130559130560130561130562130563130564130565130566130567130568130569130570130571130572130573130574130575130576130577130578130579130580130581130582130583130584130585130586130587130588130589130590130591130592130593130594130595130596130597130598130599130600130601130602130603130604130605130606130607130608130609130610130611130612130613130614130615130616130617130618130619130620130621130622130623130624130625130626130627130628130629130630130631130632130633130634130635130636130637130638130639130640130641130642130643130644130645130646130647130648130649130650130651130652130653130654130655130656130657130658130659130660130661130662130663130664130665130666130667130668130669130670130671130672130673130674130675130676130677130678130679130680130681130682130683130684130685130686130687130688130689130690130691130692130693130694130695130696130697130698130699130700130701130702130703130704130705130706130707130708130709130710130711130712130713130714130715130716130717130718130719130720130721130722130723130724130725130726130727130728130729130730130731130732130733130734130735130736130737130738130739130740130741130742130743130744130745130746130747130748130749130750130751130752130753130754130755130756130757130758130759130760130761130762130763130764130765130766130767130768130769130770130771130772130773130774130775130776130777130778130779130780130781130782130783130784130785130786130787130788130789130790130791130792130793130794130795130796130797130798130799130800130801130802130803130804130805130806130807130808130809130810130811130812130813130814130815130816130817130818130819130820130821130822130823130824130825130826130827130828130829130830130831130832130833130834130835130836130837130838130839130840130841130842130843130844130845130846130847130848130849130850130851130852130853130854130855130856130857130858130859130860130861130862130863130864130865130866130867130868130869130870130871130872130873130874130875130876130877130878130879130880130881130882130883130884130885130886130887130888130889130890130891130892130893130894130895130896130897130898130899130900130901130902130903130904130905130906130907130908130909130910130911130912130913130914130915130916130917130918130919130920130921130922130923130924130925130926130927130928130929130930130931130932130933130934130935130936130937130938130939130940130941130942130943130944130945130946130947130948130949130950130951130952130953130954130955130956130957130958130959130960130961130962130963130964130965130966130967130968130969130970130971130972130973130974130975130976130977130978130979130980130981130982130983130984130985130986130987130988130989130990130991130992130993130994130995130996130997130998130999131000131001131002131003131004131005131006131007131008131009131010131011131012131013131014131015131016131017131018131019131020131021131022131023131024131025131026131027131028131029131030131031131032131033131034131035131036131037131038131039131040131041131042131043131044131045131046131047131048131049131050131051131052131053131054131055131056131057131058131059131060131061131062131063131064131065131066131067131068131069131070131071131072131073131074131075131076131077131078131079131080131081131082131083131084131085131086131087131088131089131090131091131092131093131094131095131096131097131098131099131100131101131102131103131104131105131106131107131108131109131110131111131112131113131114131115131116131117131118131119131120131121131122131123131124131125131126131127131128131129131130131131131132131133131134131135131136131137131138131139131140131141131142131143131144131145131146131147131148131149131150131151131152131153131154131155131156131157131158131159131160131161131162131163131164131165131166131167131168131169131170131171131172131173131174131175131176131177131178131179131180131181131182131183131184131185131186131187131188131189131190131191131192131193131194131195131196131197131198131199131200131201131202131203131204131205131206131207131208131209131210131211131212131213131214131215131216131217131218131219131220131221131222131223131224131225131226131227131228131229131230131231131232131233131234131235131236131237131238131239131240131241131242131243131244131245131246131247131248131249131250131251131252131253131254131255131256131257131258131259131260131261131262131263131264131265131266131267131268131269131270131271131272131273131274131275131276131277131278131279131280131281131282131283131284131285131286131287131288131289131290131291131292131293131294131295131296131297131298131299131300131301131302131303131304131305131306131307131308131309131310131311131312131313131314131315131316131317131318131319131320131321131322131323131324131325131326131327131328131329131330131331131332131333131334131335131336131337131338131339131340131341131342131343131344131345131346131347131348131349131350131351131352131353131354131355131356131357131358131359131360131361131362131363131364131365131366131367131368131369131370131371131372131373131374131375131376131377131378131379131380131381131382131383131384131385131386131387131388131389131390131391131392131393131394131395131396131397131398131399131400131401131402131403131404131405131406131407131408131409131410131411131412131413131414131415131416131417131418131419131420131421131422131423131424131425131426131427131428131429131430131431131432131433131434131435131436131437131438131439131440131441131442131443131444131445131446131447131448131449131450131451131452131453131454131455131456131457131458131459131460131461131462131463131464131465131466131467131468131469131470131471131472131473131474131475131476131477131478131479131480131481131482131483131484131485131486131487131488131489131490131491131492131493131494131495131496131497131498131499131500131501131502131503131504131505131506131507131508131509131510131511131512131513131514131515131516131517131518131519131520131521131522131523131524131525131526131527131528131529131530131531131532131533131534131535131536131537131538131539131540131541131542131543131544131545131546131547131548131549131550131551131552131553131554131555131556131557131558131559131560131561131562131563131564131565131566131567131568131569131570131571131572131573131574131575131576131577131578131579131580131581131582131583131584131585131586131587131588131589131590131591131592131593131594131595131596131597131598131599131600131601131602131603131604131605131606131607131608131609131610131611131612131613131614131615131616131617131618131619131620131621131622131623131624131625131626131627131628131629131630131631131632131633131634131635131636131637131638131639131640131641131642131643131644131645131646131647131648131649131650131651131652131653131654131655131656131657131658131659131660131661131662131663131664131665131666131667131668131669131670131671131672131673131674131675131676131677131678131679131680131681131682131683131684131685131686131687131688131689131690131691131692131693131694131695131696131697131698131699131700131701131702131703131704131705131706131707131708131709131710131711131712131713131714131715131716131717131718131719131720131721131722131723131724131725131726131727131728131729131730131731131732131733131734131735131736131737131738131739131740131741131742131743131744131745131746131747131748131749131750131751131752131753131754131755131756131757131758131759131760131761131762131763131764131765131766131767131768131769131770131771131772131773131774131775131776131777131778131779131780131781131782131783131784131785131786131787131788131789131790131791131792131793131794131795131796131797131798131799131800131801131802131803131804131805131806131807131808131809131810131811131812131813131814131815131816131817131818131819131820131821131822131823131824131825131826131827131828131829131830131831131832131833131834131835131836131837131838131839131840131841131842131843131844131845131846131847131848131849131850131851131852131853131854131855131856131857131858131859131860131861131862131863131864131865131866131867131868131869131870131871131872131873131874131875131876131877131878131879131880131881131882131883131884131885131886131887131888131889131890131891131892131893131894131895131896131897131898131899131900131901131902131903131904131905131906131907131908131909131910131911131912131913131914131915131916131917131918131919131920131921131922131923131924131925131926131927131928131929131930131931131932131933131934131935131936131937131938131939131940131941131942131943131944131945131946131947131948131949131950131951131952131953131954131955131956131957131958131959131960131961131962131963131964131965131966131967131968131969131970131971131972131973131974131975131976131977131978131979131980131981131982131983131984131985131986131987131988131989131990131991131992131993131994131995131996131997131998131999132000132001132002132003132004132005132006132007132008132009132010132011132012132013132014132015132016132017132018132019132020132021132022132023132024132025132026132027132028132029132030132031132032132033132034132035132036132037132038132039132040132041132042132043132044132045132046132047132048132049132050132051132052132053132054132055132056132057132058132059132060132061132062132063132064132065132066132067132068132069132070132071132072132073132074132075132076132077132078132079132080132081132082132083132084132085132086132087132088132089132090132091132092132093132094132095132096132097132098132099132100132101132102132103132104132105132106132107132108132109132110132111132112132113132114132115132116132117132118132119132120132121132122132123132124132125132126132127132128132129132130132131132132132133132134132135132136132137132138132139132140132141132142132143132144132145132146132147132148132149132150132151132152132153132154132155132156132157132158132159132160132161132162132163132164132165132166132167132168132169132170132171132172132173132174132175132176132177132178132179132180132181132182132183132184132185132186132187132188132189132190132191132192132193132194132195132196132197132198132199132200132201132202132203132204132205132206132207132208132209132210132211132212132213132214132215132216132217132218132219132220132221132222132223132224132225132226132227132228132229132230132231132232132233132234132235132236132237132238132239132240132241132242132243132244132245132246132247132248132249132250132251132252132253132254132255132256132257132258132259132260132261132262132263132264132265132266132267132268132269132270132271132272132273132274132275132276132277132278132279132280132281132282132283132284132285132286132287132288132289132290132291132292132293132294132295132296132297132298132299132300132301132302132303132304132305132306132307132308132309132310132311132312132313132314132315132316132317132318132319132320132321132322132323132324132325132326132327132328132329132330132331132332132333132334132335132336132337132338132339132340132341132342132343132344132345132346132347132348132349132350132351132352132353132354132355132356132357132358132359132360132361132362132363132364132365132366132367132368132369132370132371132372132373132374132375132376132377132378132379132380132381132382132383132384132385132386132387132388132389132390132391132392132393132394132395132396132397132398132399132400132401132402132403132404132405132406132407132408132409132410132411132412132413132414132415132416132417132418132419132420132421132422132423132424132425132426132427132428132429132430132431132432132433132434132435132436132437132438132439132440132441132442132443132444132445132446132447132448132449132450132451132452132453132454132455132456132457132458132459132460132461132462132463132464132465132466132467132468132469132470132471132472132473132474132475132476132477132478132479132480132481132482132483132484132485132486132487132488132489132490132491132492132493132494132495132496132497132498132499132500132501132502132503132504132505132506132507132508132509132510132511132512132513132514132515132516132517132518132519132520132521132522132523132524132525132526132527132528132529132530132531132532132533132534132535132536132537132538132539132540132541132542132543132544132545132546132547132548132549132550132551132552132553132554132555132556132557132558132559132560132561132562132563132564132565132566132567132568132569132570132571132572132573132574132575132576132577132578132579132580132581132582132583132584132585132586132587132588132589132590132591132592132593132594132595132596132597132598132599132600132601132602132603132604132605132606132607132608132609132610132611132612132613132614132615132616132617132618132619132620132621132622132623132624132625132626132627132628132629132630132631132632132633132634132635132636132637132638132639132640132641132642132643132644132645132646132647132648132649132650132651132652132653132654132655132656132657132658132659132660132661132662132663132664132665132666132667132668132669132670132671132672132673132674132675132676132677132678132679132680132681132682132683132684132685132686132687132688132689132690132691132692132693132694132695132696132697132698132699132700132701132702132703132704132705132706132707132708132709132710132711132712132713132714132715132716132717132718132719132720132721132722132723132724132725132726132727132728132729132730132731132732132733132734132735132736132737132738132739132740132741132742132743132744132745132746132747132748132749132750132751132752132753132754132755132756132757132758132759132760132761132762132763132764132765132766132767132768132769132770132771132772132773132774132775132776132777132778132779132780132781132782132783132784132785132786132787132788132789132790132791132792132793132794132795132796132797132798132799132800132801132802132803132804132805132806132807132808132809132810132811132812132813132814132815132816132817132818132819132820132821132822132823132824132825132826132827132828132829132830132831132832132833132834132835132836132837132838132839132840132841132842132843132844132845132846132847132848132849132850132851132852132853132854132855132856132857132858132859132860132861132862132863132864132865132866132867132868132869132870132871132872132873132874132875132876132877132878132879132880132881132882132883132884132885132886132887132888132889132890132891132892132893132894132895132896132897132898132899132900132901132902132903132904132905132906132907132908132909132910132911132912132913132914132915132916132917132918132919132920132921132922132923132924132925132926132927132928132929132930132931132932132933132934132935132936132937132938132939132940132941132942132943132944132945132946132947132948132949132950132951132952132953132954132955132956132957132958132959132960132961132962132963132964132965132966132967132968132969132970132971132972132973132974132975132976132977132978132979132980132981132982132983132984132985132986132987132988132989132990132991132992132993132994132995132996132997132998132999133000133001133002133003133004133005133006133007133008133009133010133011133012133013133014133015133016133017133018133019133020133021133022133023133024133025133026133027133028133029133030133031133032133033133034133035133036133037133038133039133040133041133042133043133044133045133046133047133048133049133050133051133052133053133054133055133056133057133058133059133060133061133062133063133064133065133066133067133068133069133070133071133072133073133074133075133076133077133078133079133080133081133082133083133084133085133086133087133088133089133090133091133092133093133094133095133096133097133098133099133100133101133102133103133104133105133106133107133108133109133110133111133112133113133114133115133116133117133118133119133120133121133122133123133124133125133126133127133128133129133130133131133132133133133134133135133136133137133138133139133140133141133142133143133144133145133146133147133148133149133150133151133152133153133154133155133156133157133158133159133160133161133162133163133164133165133166133167133168133169133170133171133172133173133174133175133176133177133178133179133180133181133182133183133184133185133186133187133188133189133190133191133192133193133194133195133196133197133198133199133200133201133202133203133204133205133206133207133208133209133210133211133212133213133214133215133216133217133218133219133220133221133222133223133224133225133226133227133228133229133230133231133232133233133234133235133236133237133238133239133240133241133242133243133244133245133246133247133248133249133250133251133252133253133254133255133256133257133258133259133260133261133262133263133264133265133266133267133268133269133270133271133272133273133274133275133276133277133278133279133280133281133282133283133284133285133286133287133288133289133290133291133292133293133294133295133296133297133298133299133300133301133302133303133304133305133306133307133308133309133310133311133312133313133314133315133316133317133318133319133320133321133322133323133324133325133326133327133328133329133330133331133332133333133334133335133336133337133338133339133340133341133342133343133344133345133346133347133348133349133350133351133352133353133354133355133356133357133358133359133360133361133362133363133364133365133366133367133368133369133370133371133372133373133374133375133376133377133378133379133380133381133382133383133384133385133386133387133388133389133390133391133392133393133394133395133396133397133398133399133400133401133402133403133404133405133406133407133408133409133410133411133412133413133414133415133416133417133418133419133420133421133422133423133424133425133426133427133428133429133430133431133432133433133434133435133436133437133438133439133440133441133442133443133444133445133446133447133448133449133450133451133452133453133454133455133456133457133458133459133460133461133462133463133464133465133466133467133468133469133470133471133472133473133474133475133476133477133478133479133480133481133482133483133484133485133486133487133488133489133490133491133492133493133494133495133496133497133498133499133500133501133502133503133504133505133506133507133508133509133510133511133512133513133514133515133516133517133518133519133520133521133522133523133524133525133526133527133528133529133530133531133532133533133534133535133536133537133538133539133540133541133542133543133544133545133546133547133548133549133550133551133552133553133554133555133556133557133558133559133560133561133562133563133564133565133566133567133568133569133570133571133572133573133574133575133576133577133578133579133580133581133582133583133584133585133586133587133588133589133590133591133592133593133594133595133596133597133598133599133600133601133602133603133604133605133606133607133608133609133610133611133612133613133614133615133616133617133618133619133620133621133622133623133624133625133626133627133628133629133630133631133632133633133634133635133636133637133638133639133640133641133642133643133644133645133646133647133648133649133650133651133652133653133654133655133656133657133658133659133660133661133662133663133664133665133666133667133668133669133670133671133672133673133674133675133676133677133678133679133680133681133682133683133684133685133686133687133688133689133690133691133692133693133694133695133696133697133698133699133700133701133702133703133704133705133706133707133708133709133710133711133712133713133714133715133716133717133718133719133720133721133722133723133724133725133726133727133728133729133730133731133732133733133734133735133736133737133738133739133740133741133742133743133744133745133746133747133748133749133750133751133752133753133754133755133756133757133758133759133760133761133762133763133764133765133766133767133768133769133770133771133772133773133774133775133776133777133778133779133780133781133782133783133784133785133786133787133788133789133790133791133792133793133794133795133796133797133798133799133800133801133802133803133804133805133806133807133808133809133810133811133812133813133814133815133816133817133818133819133820133821133822133823133824133825133826133827133828133829133830133831133832133833133834133835133836133837133838133839133840133841133842133843133844133845133846133847133848133849133850133851133852133853133854133855133856133857133858133859133860133861133862133863133864133865133866133867133868133869133870133871133872133873133874133875133876133877133878133879133880133881133882133883133884133885133886133887133888133889133890133891133892133893133894133895133896133897133898133899133900133901133902133903133904133905133906133907133908133909133910133911133912133913133914133915133916133917133918133919133920133921133922133923133924133925133926133927133928133929133930133931133932133933133934133935133936133937133938133939133940133941133942133943133944133945133946133947133948133949133950133951133952133953133954133955133956133957133958133959133960133961133962133963133964133965133966133967133968133969133970133971133972133973133974133975133976133977133978133979133980133981133982133983133984133985133986133987133988133989133990133991133992133993133994133995133996133997133998133999134000134001134002134003134004134005134006134007134008134009134010134011134012134013134014134015134016134017134018134019134020134021134022134023134024134025134026134027134028134029134030134031134032134033134034134035134036134037134038134039134040134041134042134043134044134045134046134047134048134049134050134051134052134053134054134055134056134057134058134059134060134061134062134063134064134065134066134067134068134069134070134071134072134073134074134075134076134077134078134079134080134081134082134083134084134085134086134087134088134089134090134091134092134093134094134095134096134097134098134099134100134101134102134103134104134105134106134107134108134109134110134111134112134113134114134115134116134117134118134119134120134121134122134123134124134125134126134127134128134129134130134131134132134133134134134135134136134137134138134139134140134141134142134143134144134145134146134147134148134149134150134151134152134153134154134155134156134157134158134159134160134161134162134163134164134165134166134167134168134169134170134171134172134173134174134175134176134177134178134179134180134181134182134183134184134185134186134187134188134189134190134191134192134193134194134195134196134197134198134199134200134201134202134203134204134205134206134207134208134209134210134211134212134213134214134215134216134217134218134219134220134221134222134223134224134225134226134227134228134229134230134231134232134233134234134235134236134237134238134239134240134241134242134243134244134245134246134247134248134249134250134251134252134253134254134255134256134257134258134259134260134261134262134263134264134265134266134267134268134269134270134271134272134273134274134275134276134277134278134279134280134281134282134283134284134285134286134287134288134289134290134291134292134293134294134295134296134297134298134299134300134301134302134303134304134305134306134307134308134309134310134311134312134313134314134315134316134317134318134319134320134321134322134323134324134325134326134327134328134329134330134331134332134333134334134335134336134337134338134339134340134341134342134343134344134345134346134347134348134349134350134351134352134353134354134355134356134357134358134359134360134361134362134363134364134365134366134367134368134369134370134371134372134373134374134375134376134377134378134379134380134381134382134383134384134385134386134387134388134389134390134391134392134393134394134395134396134397134398134399134400134401134402134403134404134405134406134407134408134409134410134411134412134413134414134415134416134417134418134419134420134421134422134423134424134425134426134427134428134429134430134431134432134433134434134435134436134437134438134439134440134441134442134443134444134445134446134447134448134449134450134451134452134453134454134455134456134457134458134459134460134461134462134463134464134465134466134467134468134469134470134471134472134473134474134475134476134477134478134479134480134481134482134483134484134485134486134487134488134489134490134491134492134493134494134495134496134497134498134499134500134501134502134503134504134505134506134507134508134509134510134511134512134513134514134515134516134517134518134519134520134521134522134523134524134525134526134527134528134529134530134531134532134533134534134535134536134537134538134539134540134541134542134543134544134545134546134547134548134549134550134551134552134553134554134555134556134557134558134559134560134561134562134563134564134565134566134567134568134569134570134571134572134573134574134575134576134577134578134579134580134581134582134583134584134585134586134587134588134589134590134591134592134593134594134595134596134597134598134599134600134601134602134603134604134605134606134607134608134609134610134611134612134613134614134615134616134617134618134619134620134621134622134623134624134625134626134627134628134629134630134631134632134633134634134635134636134637134638134639134640134641134642134643134644134645134646134647134648134649134650134651134652134653134654134655134656134657134658134659134660134661134662134663134664134665134666134667134668134669134670134671134672134673134674134675134676134677134678134679134680134681134682134683134684134685134686134687134688134689134690134691134692134693134694134695134696134697134698134699134700134701134702134703134704134705134706134707134708134709134710134711134712134713134714134715134716134717134718134719134720134721134722134723134724134725134726134727134728134729134730134731134732134733134734134735134736134737134738134739134740134741134742134743134744134745134746134747134748134749134750134751134752134753134754134755134756134757134758134759134760134761134762134763134764134765134766134767134768134769134770134771134772134773134774134775134776134777134778134779134780134781134782134783134784134785134786134787134788134789134790134791134792134793134794134795134796134797134798134799134800134801134802134803134804134805134806134807134808134809134810134811134812134813134814134815134816134817134818134819134820134821134822134823134824134825134826134827134828134829134830134831134832134833134834134835134836134837134838134839134840134841134842134843134844134845134846134847134848134849134850134851134852134853134854134855134856134857134858134859134860134861134862134863134864134865134866134867134868134869134870134871134872134873134874134875134876134877134878134879134880134881134882134883134884134885134886134887134888134889134890134891134892134893134894134895134896134897134898134899134900134901134902134903134904134905134906134907134908134909134910134911134912134913134914134915134916134917134918134919134920134921134922134923134924134925134926134927134928134929134930134931134932134933134934134935134936134937134938134939134940134941134942134943134944134945134946134947134948134949134950134951134952134953134954134955134956134957134958134959134960134961134962134963134964134965134966134967134968134969134970134971134972134973134974134975134976134977134978134979134980134981134982134983134984134985134986134987134988134989134990134991134992134993134994134995134996134997134998134999135000135001135002135003135004135005135006135007135008135009135010135011135012135013135014135015135016135017135018135019135020135021135022135023135024135025135026135027135028135029135030135031135032135033135034135035135036135037135038135039135040135041135042135043135044135045135046135047135048135049135050135051135052135053135054135055135056135057135058135059135060135061135062135063135064135065135066135067135068135069135070135071135072135073135074135075135076135077135078135079135080135081135082135083135084135085135086135087135088135089135090135091135092135093135094135095135096135097135098135099135100135101135102135103135104135105135106135107135108135109135110135111135112135113135114135115135116135117135118135119135120135121135122135123135124135125135126135127135128135129135130135131135132135133135134135135135136135137135138135139135140135141135142135143135144135145135146135147135148135149135150135151135152135153135154135155135156135157135158135159135160135161135162135163135164135165135166135167135168135169135170135171135172135173135174135175135176135177135178135179135180135181135182135183135184135185135186135187135188135189135190135191135192135193135194135195135196135197135198135199135200135201135202135203135204135205135206135207135208135209135210135211135212135213135214135215135216135217135218135219135220135221135222135223135224135225135226135227135228135229135230135231135232135233135234135235135236135237135238135239135240135241135242135243135244135245135246135247135248135249135250135251135252135253135254135255135256135257135258135259135260135261135262135263135264135265135266135267135268135269135270135271135272135273135274135275135276135277135278135279135280135281135282135283135284135285135286135287135288135289135290135291135292135293135294135295135296135297135298135299135300135301135302135303135304135305135306135307135308135309135310135311135312135313135314135315135316135317135318135319135320135321135322135323135324135325135326135327135328135329135330135331135332135333135334135335135336135337135338135339135340135341135342135343135344135345135346135347135348135349135350135351135352135353135354135355135356135357135358135359135360135361135362135363135364135365135366135367135368135369135370135371135372135373135374135375135376135377135378135379135380135381135382135383135384135385135386135387135388135389135390135391135392135393135394135395135396135397135398135399135400135401135402135403135404135405135406135407135408135409135410135411135412135413135414135415135416135417135418135419135420135421135422135423135424135425135426135427135428135429135430135431135432135433135434135435135436135437135438135439135440135441135442135443135444135445135446135447135448135449135450135451135452135453135454135455135456135457135458135459135460135461135462135463135464135465135466135467135468135469135470135471135472135473135474135475135476135477135478135479135480135481135482135483135484135485135486135487135488135489135490135491135492135493135494135495135496135497135498135499135500135501135502135503135504135505135506135507135508135509135510135511135512135513135514135515135516135517135518135519135520135521135522135523135524135525135526135527135528135529135530135531135532135533135534135535135536135537135538135539135540135541135542135543135544135545135546135547135548135549135550135551135552135553135554135555135556135557135558135559135560135561135562135563135564135565135566135567135568135569135570135571135572135573135574135575135576135577135578135579135580135581135582135583135584135585135586135587135588135589135590135591135592135593135594135595135596135597135598135599135600135601135602135603135604135605135606135607135608135609135610135611135612135613135614135615135616135617135618135619135620135621135622135623135624135625135626135627135628135629135630135631135632135633135634135635135636135637135638135639135640135641135642135643135644135645135646135647135648135649135650135651135652135653135654135655135656135657135658135659135660135661135662135663135664135665135666135667135668135669135670135671135672135673135674135675135676135677135678135679135680135681135682135683135684135685135686135687135688135689135690135691135692135693135694135695135696135697135698135699135700135701135702135703135704135705135706135707135708135709135710135711135712135713135714135715135716135717135718135719135720135721135722135723135724135725135726135727135728135729135730135731135732135733135734135735135736135737135738135739135740135741135742135743135744135745135746135747135748135749135750135751135752135753135754135755135756135757135758135759135760135761135762135763135764135765135766135767135768135769135770135771135772135773135774135775135776135777135778135779135780135781135782135783135784135785135786135787135788135789135790135791135792135793135794135795135796135797135798135799135800135801135802135803135804135805135806135807135808135809135810135811135812135813135814135815135816135817135818135819135820135821135822135823135824135825135826135827135828135829135830135831135832135833135834135835135836135837135838135839135840135841135842135843135844135845135846135847135848135849135850135851135852135853135854135855135856135857135858135859135860135861135862135863135864135865135866135867135868135869135870135871135872135873135874135875135876135877135878135879135880135881135882135883135884135885135886135887135888135889135890135891135892135893135894135895135896135897135898135899135900135901135902135903135904135905135906135907135908135909135910135911135912135913135914135915135916135917135918135919135920135921135922135923135924135925135926135927135928135929135930135931135932135933135934135935135936135937135938135939135940135941135942135943135944135945135946135947135948135949135950135951135952135953135954135955135956135957135958135959135960135961135962135963135964135965135966135967135968135969135970135971135972135973135974135975135976135977135978135979135980135981135982135983135984135985135986135987135988135989135990135991135992135993135994135995135996135997135998135999136000136001136002136003136004136005136006136007136008136009136010136011136012136013136014136015136016136017136018136019136020136021136022136023136024136025136026136027136028136029136030136031136032136033136034136035136036136037136038136039136040136041136042136043136044136045136046136047136048136049136050136051136052136053136054136055136056136057136058136059136060136061136062136063136064136065136066136067136068136069136070136071136072136073136074136075136076136077136078136079136080136081136082136083136084136085136086136087136088136089136090136091136092136093136094136095136096136097136098136099136100136101136102136103136104136105136106136107136108136109136110136111136112136113136114136115136116136117136118136119136120136121136122136123136124136125136126136127136128136129136130136131136132136133136134136135136136136137136138136139136140136141136142136143136144136145136146136147136148136149136150136151136152136153136154136155136156136157136158136159136160136161136162136163136164136165136166136167136168136169136170136171136172136173136174136175136176136177136178136179136180136181136182136183136184136185136186136187136188136189136190136191136192136193136194136195136196136197136198136199136200136201136202136203136204136205136206136207136208136209136210136211136212136213136214136215136216136217136218136219136220136221136222136223136224136225136226136227136228136229136230136231136232136233136234136235136236136237136238136239136240136241136242136243136244136245136246136247136248136249136250136251136252136253136254136255136256136257136258136259136260136261136262136263136264136265136266136267136268136269136270136271136272136273136274136275136276136277136278136279136280136281136282136283136284136285136286136287136288136289136290136291136292136293136294136295136296136297136298136299136300136301136302136303136304136305136306136307136308136309136310136311136312136313136314136315136316136317136318136319136320136321136322136323136324136325136326136327136328136329136330136331136332136333136334136335136336136337136338136339136340136341136342136343136344136345136346136347136348136349136350136351136352136353136354136355136356136357136358136359136360136361136362136363136364136365136366136367136368136369136370136371136372136373136374136375136376136377136378136379136380136381136382136383136384136385136386136387136388136389136390136391136392136393136394136395136396136397136398136399136400136401136402136403136404136405136406136407136408136409136410136411136412136413136414136415136416136417136418136419136420136421136422136423136424136425136426136427136428136429136430136431136432136433136434136435136436136437136438136439136440136441136442136443136444136445136446136447136448136449136450136451136452136453136454136455136456136457136458136459136460136461136462136463136464136465136466136467136468136469136470136471136472136473136474136475136476136477136478136479136480136481136482136483136484136485136486136487136488136489136490136491136492136493136494136495136496136497136498136499136500136501136502136503136504136505136506136507136508136509136510136511136512136513136514136515136516136517136518136519136520136521136522136523136524136525136526136527136528136529136530136531136532136533136534136535136536136537136538136539136540136541136542136543136544136545136546136547136548136549136550136551136552136553136554136555136556136557136558136559136560136561136562136563136564136565136566136567136568136569136570136571136572136573136574136575136576136577136578136579136580136581136582136583136584136585136586136587136588136589136590136591136592136593136594136595136596136597136598136599136600136601136602136603136604136605136606136607136608136609136610136611136612136613136614136615136616136617136618136619136620136621136622136623136624136625136626136627136628136629136630136631136632136633136634136635136636136637136638136639136640136641136642136643136644136645136646136647136648136649136650136651136652136653136654136655136656136657136658136659136660136661136662136663136664136665136666136667136668136669136670136671136672136673136674136675136676136677136678136679136680136681136682136683136684136685136686136687136688136689136690136691136692136693136694136695136696136697136698136699136700136701136702136703136704136705136706136707136708136709136710136711136712136713136714136715136716136717136718136719136720136721136722136723136724136725136726136727136728136729136730136731136732136733136734136735136736136737136738136739136740136741136742136743136744136745136746136747136748136749136750136751136752136753136754136755136756136757136758136759136760136761136762136763136764136765136766136767136768136769136770136771136772136773136774136775136776136777136778136779136780136781136782136783136784136785136786136787136788136789136790136791136792136793136794136795136796136797136798136799136800136801136802136803136804136805136806136807136808136809136810136811136812136813136814136815136816136817136818136819136820136821136822136823136824136825136826136827136828136829136830136831136832136833136834136835136836136837136838136839136840136841136842136843136844136845136846136847136848136849136850136851136852136853136854136855136856136857136858136859136860136861136862136863136864136865136866136867136868136869136870136871136872136873136874136875136876136877136878136879136880136881136882136883136884136885136886136887136888136889136890136891136892136893136894136895136896136897136898136899136900136901136902136903136904136905136906136907136908136909136910136911136912136913136914136915136916136917136918136919136920136921136922136923136924136925136926136927136928136929136930136931136932136933136934136935136936136937136938136939136940136941136942136943136944136945136946136947136948136949136950136951136952136953136954136955136956136957136958136959136960136961136962136963136964136965136966136967136968136969136970136971136972136973136974136975136976136977136978136979136980136981136982136983136984136985136986136987136988136989136990136991136992136993136994136995136996136997136998136999137000137001137002137003137004137005137006137007137008137009137010137011137012137013137014137015137016137017137018137019137020137021137022137023137024137025137026137027137028137029137030137031137032137033137034137035137036137037137038137039137040137041137042137043137044137045137046137047137048137049137050137051137052137053137054137055137056137057137058137059137060137061137062137063137064137065137066137067137068137069137070137071137072137073137074137075137076137077137078137079137080137081137082137083137084137085137086137087137088137089137090137091137092137093137094137095137096137097137098137099137100137101137102137103137104137105137106137107137108137109137110137111137112137113137114137115137116137117137118137119137120137121137122137123137124137125137126137127137128137129137130137131137132137133137134137135137136137137137138137139137140137141137142137143137144137145137146137147137148137149137150137151137152137153137154137155137156137157137158137159137160137161137162137163137164137165137166137167137168137169137170137171137172137173137174137175137176137177137178137179137180137181137182137183137184137185137186137187137188137189137190137191137192137193137194137195137196137197137198137199137200137201137202137203137204137205137206137207137208137209137210137211137212137213137214137215137216137217137218137219137220137221137222137223137224137225137226137227137228137229137230137231137232137233137234137235137236137237137238137239137240137241137242137243137244137245137246137247137248137249137250137251137252137253137254137255137256137257137258137259137260137261137262137263137264137265137266137267137268137269137270137271137272137273137274137275137276137277137278137279137280137281137282137283137284137285137286137287137288137289137290137291137292137293137294137295137296137297137298137299137300137301137302137303137304137305137306137307137308137309137310137311137312137313137314137315137316137317137318137319137320137321137322137323137324137325137326137327137328137329137330137331137332137333137334137335137336137337137338137339137340137341137342137343137344137345137346137347137348137349137350137351137352137353137354137355137356137357137358137359137360137361137362137363137364137365137366137367137368137369137370137371137372137373137374137375137376137377137378137379137380137381137382137383137384137385137386137387137388137389137390137391137392137393137394137395137396137397137398137399137400137401137402137403137404137405137406137407137408137409137410137411137412137413137414137415137416137417137418137419137420137421137422137423137424137425137426137427137428137429137430137431137432137433137434137435137436137437137438137439137440137441137442137443137444137445137446137447137448137449137450137451137452137453137454137455137456137457137458137459137460137461137462137463137464137465137466137467137468137469137470137471137472137473137474137475137476137477137478137479137480137481137482137483137484137485137486137487137488137489137490137491137492137493137494137495137496137497137498137499137500137501137502137503137504137505137506137507137508137509137510137511137512137513137514137515137516137517137518137519137520137521137522137523137524137525137526137527137528137529137530137531137532137533137534137535137536137537137538137539137540137541137542137543137544137545137546137547137548137549137550137551137552137553137554137555137556137557137558137559137560137561137562137563137564137565137566137567137568137569137570137571137572137573137574137575137576137577137578137579137580137581137582137583137584137585137586137587137588137589137590137591137592137593137594137595137596137597137598137599137600137601137602137603137604137605137606137607137608137609137610137611137612137613137614137615137616137617137618137619137620137621137622137623137624137625137626137627137628137629137630137631137632137633137634137635137636137637137638137639137640137641137642137643137644137645137646137647137648137649137650137651137652137653137654137655137656137657137658137659137660137661137662137663137664137665137666137667137668137669137670137671137672137673137674137675137676137677137678137679137680137681137682137683137684137685137686137687137688137689137690137691137692137693137694137695137696137697137698137699137700137701137702137703137704137705137706137707137708137709137710137711137712137713137714137715137716137717137718137719137720137721137722137723137724137725137726137727137728137729137730137731137732137733137734137735137736137737137738137739137740137741137742137743137744137745137746137747137748137749137750137751137752137753137754137755137756137757
  1. diff -Nur uClibc-0.9.33.2/Changelog uClibc-git/Changelog
  2. --- uClibc-0.9.33.2/Changelog 2012-05-15 09:20:09.000000000 +0200
  3. +++ uClibc-git/Changelog 1970-01-01 01:00:00.000000000 +0100
  4. @@ -1,804 +0,0 @@
  5. -0.9.31 not yet released
  6. -
  7. - Upgrade notices from previous versions.
  8. - o On x86_64 the format of /var/run/utmp changed compared to previous
  9. - versions. To retain compatibility with glibc we now define
  10. - __WORDSIZE_COMPAT32. If you are certain that you will never use
  11. - glibc nor run in i386 mode on your x86_64 installation, you can
  12. - remove this definition from wordsize.h.
  13. - Otherwise you have to delete /var/run/utmp on x86_64 hosts when
  14. - upgrading to 0.9.31
  15. - o The SHARED_LIB_LOADER_PREFIX was renamed to a single path
  16. - component called MULTILIB_DIR and defaults to 'lib'.
  17. -
  18. -0.9.27 12 January 2005
  19. -
  20. - This has been a long time in the making... Release highlights:
  21. - o New stdio implementation
  22. - o New optimized string functions
  23. - o Major improvements to the shared lib loader
  24. - o Shared libraries work properly on powerpc
  25. - o Debugging works on mips
  26. - o New architectures: frv, nios, nios2, bfin
  27. - o Linux 2.6.x kernel support
  28. - o Lots and lots of bug fixes
  29. -
  30. - This release is NOT binary compatible with uClibc 0.9.26 or any earlier
  31. - release, so be prepared to recompile your software if you are still using
  32. - an old version of uClibc.
  33. -
  34. - -Erik
  35. -
  36. -
  37. -
  38. -0.9.26 3 January 2004
  39. -
  40. - This simply adds a fix for a pthread bug that was noticed a few hours
  41. - after the previous release. Otherwise identical to 0.9.25.
  42. -
  43. - This release remains binary compatible with uClibc 0.9.21-25 as long as
  44. - you take care to avoid any configuraton changes that will break things.
  45. - We _were_ planning to break binary compatibilty in this release, but
  46. - decided to hold those changes so we could push out a bugfix release.
  47. -
  48. - We _will_ break binary compatibilty in the upcoming 0.9.27 release to
  49. - implement a few things we have been postponing. That should hopefully be
  50. - the last ABI change before we freeze the ABI for the upcoming 1.0.x
  51. - stable uClibc series.
  52. -
  53. -Release highlights:
  54. - o A trivial fix for a pthread bug
  55. - o Nothing else
  56. -
  57. - -Erik
  58. -
  59. -
  60. -
  61. -0.9.25 3 January 2004
  62. -
  63. -See Changelog.full for the complete list of who did what.
  64. -
  65. -Note:
  66. - This release remains binary compatible with uClibc 0.9.21-24 as long as
  67. - you take care to avoid any configuraton changes that will break things.
  68. - We _were_ planning to break binary compatibilty in this release, but
  69. - decided to hold those changes so we could push out a bugfix release.
  70. -
  71. - We _will_ break binary compatibilty in the upcoming 0.9.26 release to
  72. - implement a few things we have been postponing. That should hopefully be
  73. - the last ABI change before we freeze the ABI for the upcoming 1.0.x
  74. - stable uClibc series.
  75. -
  76. -Release highlights:
  77. - o Fixed a ton of problems found using the LTP and NIST test suites.
  78. - The few remaining test failures are obscure corner cases, such as
  79. - a few functions that fail (correctly) with incorrect errno values.
  80. - o Fixed a longstanding pthreads bug -- amoung other things, you no
  81. - longer need to explicitly add -lpthread for perl to work.
  82. - o Added some sh optimized string functions
  83. - o Added sh64 shared library support
  84. - o The default malloc implementation has been replaced, and will
  85. - now actually free memory when told to do so.
  86. - o Both popen() and exec*() now behave themselves per SuSv3
  87. - o Better 2.6.x kernel header support
  88. - o Added support for Position Independent Executables (PIE) on x86
  89. - o Lots of other minor cleanups
  90. -
  91. - -Erik
  92. -
  93. -
  94. -
  95. -0.9.24 15 December 2003
  96. -
  97. -See Changelog.full for the complete list of who did what.
  98. -
  99. -Note:
  100. - This release remains binary compatible with uClibc 0.9.21-23 as
  101. - long as you take care to avoid any configuraton changes that will
  102. - break things.
  103. -
  104. - We currently plan to break binary compatibilty in the upcoming 0.9.25 to
  105. - implement a few things we have been postponing, which will hopefully be
  106. - the last change....
  107. -
  108. -Release highlights:
  109. - o Fixed several silly configuration problems
  110. - o Added arm optimized string functions
  111. - o Lots of minor cleanups
  112. -
  113. - -Erik
  114. -
  115. -
  116. -
  117. -
  118. -
  119. -0.9.23 13 November 2003
  120. -
  121. -See Changelog.full for the complete list of who did what.
  122. -
  123. -Note:
  124. - This release is binary compatible with uClibc 0.9.21 and 0.9.22 as
  125. - long as you take care to avoid any configuraton changes that will
  126. - break things. Enabling or disabling things like soft-float,
  127. - locale, wide wchar support, or changing cpu type are all good
  128. - examples of things that will break binary compatibility.
  129. -
  130. -Release highlights:
  131. - o Fixed several silly configuration problems that were
  132. - present in the 0.9.22 release.
  133. - o Fixed compilation problem with soft-float support on
  134. - several architectures.
  135. - o Lots of cleanup work on the powepc shared lib loader
  136. - thanks to Joakim Tjernlund.
  137. - o Updated the debian packaging for use in a standalone uClibc
  138. - system, rather than being a subordinate library under a
  139. - glibc based system.
  140. -
  141. - -Erik
  142. -
  143. -
  144. -
  145. -
  146. -
  147. -0.9.22 8 November 2003
  148. -
  149. -See Changelog.full for the complete list of who did what.
  150. -
  151. -Note:
  152. - This release is binary compatible with the 0.9.21 release
  153. - if you take care to avoid any configuraton changes that
  154. - might break things for you (i.e. enabling or disabling things
  155. - like soft-float, locale, wide wchar support, or changing cpu
  156. - type are all good examples of binary incompatible config options).
  157. -
  158. -Release highlights:
  159. - o Added e1, microblaze, and sh64 architectures.
  160. - o Much improved soft-float support
  161. - o Rewrote the passwd and group handing functions
  162. - and implemented all SuSv3 required reentrant
  163. - versions.
  164. - o Reworked and updated the Config system. You now
  165. - get to select your target architecture with the
  166. - config system.
  167. - o Fixed pthreads for mmuless m68k systems
  168. - o Added some x86 optimized string functions.
  169. - o Lots and lots of bugs fixed.
  170. -
  171. - -Erik
  172. -
  173. -
  174. -
  175. -
  176. -
  177. -0.9.21 9 September 2003
  178. -
  179. -See Changelog.full for the complete list of who did what.
  180. -
  181. -Note:
  182. - This release is not binary compatible with earlier releases.
  183. - Sorry about that. We have never promised to provide binary
  184. - compatibility until we hit version 1.0, and even then, if
  185. - you change your configuration.
  186. -
  187. -Release highlights:
  188. - o uClibc now has full ANSI/ISO C99 locale support (except
  189. - for wcsftime() and collating items in regex).
  190. - o Added support for using pre-generated locale data, making
  191. - it easy for mere mortals to use uClibc w/locale support.
  192. - o Lots of new tuning options added to trade size
  193. - for features, allowing for smaller static binaries.
  194. - o The "dlopen()'ing libraries that depend on libraries"
  195. - problem was fixed.
  196. - o A new scanf implementation. Well tested, but
  197. - brand new so watch for obscure bugs...
  198. - o Reworked and updated the Config system, adding several
  199. - nice new features which we now use.
  200. - o Lots and lots of sundry bug fixes and cleanups.
  201. -
  202. - -Erik
  203. -
  204. -
  205. -
  206. -
  207. -
  208. -0.9.20 30 June 2003
  209. -
  210. -See Changelog.full for the complete list of who did what.
  211. -
  212. -Note:
  213. - This release remains binary compatible with 0.9.18 and 0.9.19.
  214. -
  215. -
  216. -Release highlights:
  217. - o Some ldd, profiling, and gcc wrapper updates
  218. - o Updated to support and compile with gcc 3.3
  219. - o Several needed mips updates
  220. - o Building under cygwin should now work...
  221. - o Prevent non-PIC code getting into PIC libs
  222. - o Added mmap64 support
  223. - o mmu-less systems now get a 16k default thread stack size
  224. - which is much more sane than the old 2 MB default...
  225. - o Implemented syscall() for powerpc
  226. - o Optionally struct tm extension support
  227. - o Lots of other sundry little fixes and cleanups.
  228. - o Prevent buffer overflows in the passwd and group functions.
  229. -
  230. - -Erik
  231. -
  232. -
  233. -
  234. -
  235. -
  236. -0.9.19 3 March 2003
  237. -
  238. -See Changelog.full for the complete list of who did what.
  239. -
  240. -Note:
  241. - This release remains binary compatible with 0.9.18 (except
  242. - for mips, but then mips was unusable in stock 0.9.18 anyways).
  243. -
  244. -
  245. -Release highlights:
  246. - Stefan Allius
  247. - o Some Makefile and warning fixes
  248. - David Airlie
  249. - o Fixed gcc wrapper handling of ctor/dtor stuff when used in
  250. - with and w/o the nostdinc and nostdlib options
  251. - Erik Andersen
  252. - o Fixed a number of system call kernel type/user type translation
  253. - problems that scrambled a handful of system calls.
  254. - o Fixup powerpc syscalls to eliminate warnings with gcc-3.2
  255. - o Fixed several ioctl special cases for powerpc
  256. - o Checked in forgotten mips kernel_types.h changes
  257. - o Fixed mips shared library loader bug that caused segfaults
  258. - o Major update to the pthreads library. Should improve performance.
  259. - o Fixed uClibc's shared library loader so we can properly debug
  260. - applications using pthreads (must use gdb 5.3 or newer which
  261. - was compiled using uClibc).
  262. - o Made uClibc's ldd act just the glibc provided one (i.e. relying
  263. - on the shared lib loader to do the work) when it is possible to
  264. - doi so, and only rummage about the ELF headers when we have no
  265. - other choice (such as when using 'ldd' on cross compiled stuff).
  266. - Miles Bader
  267. - o header file updates for v850 architecture
  268. - o Fixed v850 crt0.S __uClibc_main argument stack space
  269. - Jeffrey Damick
  270. - o Fixed res_init() so it properly reloads /etc/resolv.conf
  271. - Vadim Lebedev
  272. - o Fixed ARM setjmp when floating point was disabled
  273. - David McCullough
  274. - o Removed debug (-g) when building crti.o and crtn.o, as
  275. - debug would mess up the build for SH4 and probably others.
  276. - o Fixed SH setjmp when floating point was enabled
  277. -
  278. -
  279. - -Erik
  280. -
  281. -
  282. -
  283. -
  284. -
  285. -0.9.18 12 February 2003
  286. -
  287. -See Changelog.full for the complete list of who did what.
  288. -
  289. -Note:
  290. -
  291. - Once again, this release is _NOT_ binary compatible with earlier
  292. - releases. I _think this will be the last time (with the possible
  293. - exception of some future changes to our locale support...)
  294. -
  295. -
  296. -Release highlights:
  297. - Stefan Allius
  298. - o fixed a compile problem when large file support was disabled
  299. - o fixed dlib_pic.o to compile with proper flags
  300. - o fixed a shared lib loader compile warning
  301. - o Made adding libgcc functions to uClibc optional
  302. - Erik Andersen
  303. - o Fixed scandir64 to not free the wrong pieces of memory
  304. - which caused segfaults
  305. - o Fixed mismatches between kernel and libc dirent structures
  306. - o Fixed mismatches between the size of uClibc's struct dirent
  307. - and struct dirent64 so that when _FILE_OFFSET_BITS=64 we
  308. - do not lose part of the filename
  309. - o Fixed getdents64.c so the build will not break when compiling
  310. - vs a 2.0.x Linux kernel when UCLIBC_HAS_LFS is enabled
  311. - o Create stub crti.o and crtn.o files when UCLIBC_CTOR_DTOR is disabled
  312. - o Fixed licenses for a few files that erroneously were listed as GPL
  313. - but were really LGPL after discussing with authors
  314. - o sigaction for x86 had an extra and unwanted sigaction syscall
  315. - o Fixed debugging of arm binaries by adding a .note.ABI-tag section
  316. - Miles Bader
  317. - o header file updates for v850 architecture
  318. - o Fixed v850 clone syscall
  319. - Christian Krause
  320. - o Fixed pthread_cond_timedwait to properly uses rt singals
  321. - when available
  322. - Christophe Massiot
  323. - o Added mips _flush_cache syscall
  324. - David McCullough
  325. - o Added m68k brk syscall
  326. - Marshall M. Midden
  327. - o Fixed pipe implementation for mips
  328. -
  329. -
  330. - -Erik
  331. -
  332. -
  333. -
  334. -
  335. -
  336. -0.9.17 25 January 2003
  337. -
  338. -See Changelog.full for the complete list of who did what.
  339. -
  340. -Note:
  341. -
  342. - I have always reserved the right to make binary incompatible changes as
  343. - needed prior to the "1.0" release. This release is a good example of
  344. - that. A few bugs turned up that needed to be fixed and the only good way
  345. - to fix them was to change some fundamental data structure sizes. So I did
  346. - just that. As a result, this release is _NOT_ binary compatible with
  347. - earlier releases -- you will need to recompile your applications.
  348. -
  349. -
  350. -Release highlights:
  351. - Stefan Allius
  352. - o fixed a number of shared library loader bugs
  353. - o setjmp, longjmp, clone, and vfork cleanups for the SH architecture
  354. - o Don't build the config system with ncurses unless asked to
  355. - Tobias Anderberg
  356. - o cris architecture updates
  357. - Erik Andersen
  358. - o Changed 'struct stat' and 'struct stat64' so they use types that
  359. - are consistant with use elsewhere in the library. Without this,
  360. - subtle bugs would occur due to comparing signed and unsigned
  361. - types (for example, GNU tar wouldn't work)
  362. - o Fixed dlopen so it works with staticly linked apps
  363. - o Fixed sigaction on arm architecture so sa_restorer works properly
  364. - o Fixed sigaction on x86 architecture for (fixed debugging threads)
  365. - o Fixed a wide char related segfault in the regular expression code
  366. - o Powerpc pread and pwrite are now implemented correctly
  367. - o Powerpc syscall mechanism re-implemented
  368. - o Sparc architecture and syscall mechanism fixed up so things compile
  369. - o usershell reimplemented
  370. - o Fixed global destructors for staticly linked applications
  371. - o Added dynamic atexit support (needed for full C++ ctor/dtor support)
  372. - o The ldd utility now acts more like the GNU utility
  373. - o Added a stub libnsl library to make stupid configure scripts bahave
  374. - o Always build crt1.o as well as crt0.o to minimize the need to mess
  375. - with the compiler
  376. - o Rewrote powerpc crt0.S to properly handle ctors/dtors
  377. - o Removed unimplemented and legacy stuff from our header files to
  378. - make configure behave better
  379. - o Made the lib loader also support libs in /usr/X11R6/lib by default
  380. - o Config system updates
  381. - o networking function updates
  382. - o Large file support updates
  383. - o Lots of other little bug fixes and cleanups
  384. - Nick Fedchik
  385. - o Support ether_aton
  386. - Nathan Field
  387. - o Fixed pthread_mutex_lock and pthread_mutex_unlock so they
  388. - actually work as advertised on mips
  389. - o Fixed several nasty pthread bugs fixing debugging
  390. - Brett Hunt
  391. - o Fixed potential segfaults during 'make menuconfig'
  392. - Jay Kulpinski
  393. - o Fixed a subtle problem in the DNS resolver that prevented
  394. - uncompressed DNS lookup responses from working
  395. - David McCullough
  396. - o Fixed pclose error handling
  397. - David Meggy
  398. - o fixed the problem where arm binaries would crash on start
  399. - that Erik stupidly caused right before the last release.
  400. - Manuel Novoa III
  401. - o Major locale support update!
  402. - o Allow people to use pregenerated locale data instead of generating
  403. - approx 40Mb of glibc locales to get the 300+ locales currently
  404. - supported.
  405. - o locale dependent collation support
  406. - o Fixed locale support tools to work when cross-compiling
  407. - o Added the *wprintf functions
  408. - o Added the wcsto{inttype} functions
  409. - o Added iconv() and a mini iconv utility
  410. - o Added hsearch and hsearch_r
  411. - o Fixed a silly bug allowing wprintf %s to work correctly.
  412. - o Fixed fdopen when used with "a" (append).
  413. - o Fixed stdio file position handing to be sure fell() always
  414. - gives correct results
  415. - Luc Van Oostenryck
  416. - o Fixed a buffer overflow in getlogin_r
  417. - Yoshinori Sato
  418. - o Hitachi h8300 architecture update
  419. - Ronald Wahl
  420. - o Powerpc shared library relocation fixes
  421. -
  422. - -Erik
  423. -
  424. -
  425. -
  426. -0.9.16 8 November 2002
  427. -
  428. -See Changelog.full for the complete list of who did what.
  429. -
  430. -Release highlights:
  431. - o CRIS architecture and shared library support from Tobias Anderberg
  432. - o New uClibc configuration system
  433. - o shared library global constructors and destructors initialization
  434. - ordering fixed by Stefan Allius
  435. - o More SuperH architecture fixes from Stefan Allius
  436. - o uClibc now compiles with newer versions of gcc (i.e. RedHat 8.0)
  437. - o uClibc no longer requires perl to compile
  438. - o mips dlopen was fixed by Steven J. Hill
  439. - o pty and tty handling fixes
  440. - o Manuel Novoa added support for a new /etc/TZ file for globally
  441. - setting the system timezone.
  442. - o Manuel also fixed up a number of remaining wide char issues.
  443. - o Lots of other little bug fixes and cleanups
  444. -
  445. - -Erik
  446. -
  447. -
  448. -
  449. -0.9.15 27 August 2002
  450. -
  451. -This is a minor bugfix release.
  452. -
  453. -See Changelog.full for the complete list of who did what.
  454. -Release highlights:
  455. - o Eliminated the HAS_LONG_LONG option. gcc always supports
  456. - long long, and the option never excluded all long long anyways.
  457. - o ctype.h no longer allows multiple argument evaluation in
  458. - compliance with ANSI/ISO C99
  459. - o Obscure printf fixes -- one involving %o and one involving %f.
  460. - o Bugfixes for locking and reentrance in password/group functions
  461. - o Directly use kernel types for most items, eliminating needless
  462. - translation and fixing several bugs.
  463. - o Directly use kernel struct stat -- no more translating
  464. - o More superH (sh) architecture merging from Stefan Allius
  465. - o Errno values and strerror are now correct on alpha, sparc, and mips
  466. - o Fixed an obscure bug with fclose when custom streams are enabled.
  467. - o Lots of other little bug fixes and cleanups
  468. -
  469. - -Erik
  470. -
  471. -
  472. -
  473. -0.9.14 12 August 2002
  474. -
  475. -This is a minor bugfix release.
  476. -
  477. -See Changelog.full for the complete list of who did what.
  478. -Release highlights:
  479. - o Fix a compile error when RPC and Pthread support
  480. - were both enabled.
  481. - o Eliminate duplicate define warnings in wstring.c.
  482. - o Fix potentially broken preprocessor comparisons.
  483. - o Erik was an idiot and broke thread locking in exit(),
  484. - atexit() and friends. Fix that.
  485. - o Fix the gcc wrapper to use crtbeginS.o and crtendS.o when
  486. - compiling PIC code (crtbegin.o and crtend.o) otherwise.
  487. -
  488. - -Erik
  489. -
  490. -
  491. -
  492. -
  493. -0.9.13 9 August 2002
  494. -
  495. -Security Fixes
  496. - o There was an off-by-one buffer overflow in the group
  497. - handling code, fix thanks to Joseph Chiu.
  498. - o There was an integer overflow bug in calloc, per
  499. - http://online.securityfocus.com/bid/5398
  500. - o There was an integer overflow bug in the xdr_array
  501. - RPC code, per http://online.securityfocus.com/bid/5356
  502. -
  503. -See Changelog.full for the complete list of who did what.
  504. -Release highlights:
  505. - o Add full shared library support for Hitachi SuperH (sh)
  506. - thanks to Stefan Allius and Edie C. Dost
  507. - o Lots of reentrance cleanups (we should now be fully
  508. - reentrant when compiled with pthread support).
  509. - o Miles Bader implemented a new mmap based malloc which is much
  510. - smarter than the old "malloc-simple", and actually works, unlike
  511. - the old "malloc". This is now the default for mmu-less systems
  512. - and should greatly help reduce memory fragmentation and wastage.
  513. - o Reworked syscall handling for i386 and ARM, smaller and cleaner.
  514. - o Support for the syscall() function on i386 and ARM
  515. - o The uClibc g++ wrapper now automagically adds the proper include
  516. - search path and and libraries.
  517. - o Lots of shared library loader updates
  518. - o dlopen'd shred libraries not properly run destructors
  519. - when ctor/dtor support is enabled
  520. - o pread/pwrite/pread64/pwrite64 now all work as expected
  521. - o Lots and lots of other bug fixes and cleanups.
  522. -
  523. - -Erik
  524. -
  525. -
  526. -
  527. -
  528. -0.9.12 20 June 2002
  529. -
  530. -See Changelog.full for the complete list of who did what.
  531. -Release highlights:
  532. - o Add full shared library support for mips (big and little
  533. - endian), thanks to a lot of hard work from Steven J. Hill
  534. - o i960 architecture support, thanks to Martin Proulx
  535. - o An initial alpha port (works, but needs some cleanup)
  536. - o Fixes shared library support for powerpc
  537. - o Fixes for mmu-less systems
  538. - o Much improved thread locking and reentrance.
  539. - o More gcc wrapper updates. XFree86 really does link
  540. - this time around. It still didn't last time.
  541. - o Libcrypt now passes conformance tests
  542. - o Nearly complete locale supporti thanks to a lot
  543. - of hard work by Manuel Novoa III. This stuff is
  544. - _way_ smaller than glibc's
  545. - o Completely new time handling functions also by Manuel
  546. - o Lots of other bug fixes and cleanups.
  547. -
  548. - -Erik
  549. -
  550. -
  551. -
  552. -
  553. -Erik Andersen:
  554. -0.9.11 10 April 2002
  555. -
  556. -Release highlights:
  557. - o Lots of bug fixes
  558. - o Much better large file support
  559. - o Several gcc wrapper bug fixes, so things like iproute2 and
  560. - XFree86 should now link properly.
  561. - o Fixes a stdio thread locking bug that could cause random
  562. - deadlocks on s*printf calls when threading was enabled.
  563. -
  564. -Erik Andersen:
  565. - o Added a generic implementation of truncate64.c and ftruncate64.c
  566. - o Added missing creat64, glob64, mkstemp64, getrlimit64, setrlimit64
  567. - o Removed internal erroneous use of __USE_FILE_OFFSET64
  568. - o Made libpthread compile on sparc and powerpc
  569. - o Made libpthread soname and symlinks match the other libraries.
  570. - o Added finite() to the C89 math lib, since some math functions use it.
  571. - o Added missing function pointer to error.c (some apps wanted it)
  572. - o Fixed initfini build for arches where gcc tries to be sneaky
  573. - o Fixed m68k/bits/setjmp.h which I has broken in the last release.
  574. - o Fixed a buffer overflow in the dynamic library loader
  575. - o Fixed a stdio thread locking bug that could cause random
  576. - deadlocks on s*printf calls when threading was enabled.
  577. - o Implemented sqrtf(), needed for libstdc++ on arm
  578. -Miles Bader:
  579. - o Make clean fixes to not blindly wipe all symlinks
  580. - o Re-enabled clnt_perror()
  581. - o Re-implemented swab()
  582. -Dwayne Fontenot:
  583. - o Many updates to the uClibc Working Application List
  584. -Steven J. Hill:
  585. - o Many updates to the mips dynamic loader. Not yet working but
  586. - getting very close now.
  587. - o Fixed locking bug in getttyent()
  588. - o Support libpthread on mips
  589. -Richard June:
  590. - o Fixed several bugs in utmp code (pututline was only writing the
  591. - first sizeof-a-pointer bytes to the utmpfile).
  592. - o setutent() was only opening utmp readonly.
  593. -m4@brecis.COM:
  594. - o Fixed a silly typing problem with the getuid syscall.
  595. -Manuel Novoa III:
  596. - o Fixed stdio FILE read/write auto-transition bugs.
  597. - o Better stdio errno handling
  598. - o Changed setvbuf() to more closely match glibc's behavior
  599. - o Fixed getpass() to not echo passwords to the console
  600. - o Fixed locale ISblank flag.
  601. - o Fixed an arg promotion handling bug in _do_one_spec for %c reported
  602. - by Ilguiz Latypov.
  603. -Kensuke Otake:
  604. - o Implemented swab()
  605. -Yoshinori Sato:
  606. - o Fixed h8300 architecture support for pthreads and changes to
  607. - the include files
  608. -David Schleef:
  609. - o Made powerpc assembly code PIC-compatible
  610. - o Removed powerpc R_PPC_REL24 handling, since it was deceptively useless.
  611. -John Traill:
  612. - o Several types on powerpc, such as dev_t, are different than on other
  613. - architectures. John spotted this, which fixed a _ton_ of problems since
  614. - anything calling stat() was previously broken.
  615. -Jim Treadway:
  616. - o Eliminated use of alarm() from the DNS resolver by converting
  617. - it to use select instead (much cleaner).
  618. -
  619. -
  620. -
  621. -
  622. -
  623. -
  624. -
  625. -
  626. -0.9.10 21 March 2002
  627. -
  628. -Major new features:
  629. - o pthreads support (derived from glibc 2.1.3's linuxthreads library)
  630. - by Stefan Soucek and Erik Andersen
  631. - o pthreads support for MMU-less systems, by Stefan Soucek
  632. - o Complete rewrite of all stdio functions for standards compliance,
  633. - small size, pthreads support, wide/narrow stream support, large
  634. - file support, unbuffered support, etc, etc by Manuel Novoa III
  635. - o gcc wrapper reworked by Erik Andersen. Now operated correctly in
  636. - all known cases, and now wraps g++ as well for C++ support.
  637. - o constructor/destructor support, for C++ by Erik Andersen.
  638. - o Eliminated duplicate include/bits header files, by Erik Andersen.
  639. - Now all common include/bits headers are grouped together.
  640. -
  641. -
  642. -Erik Andersen:
  643. - o Lots of changes and improvements to the shared library loader
  644. - o Cleaned up a piles of bugs
  645. - o Fixed a segfault when scandir was called on empty directories.
  646. - o Several syscalls added: pread/pwrite
  647. - o Makefile/build system cleanups
  648. - o Sighandling fixes
  649. - o pthreads support (with Stefan Soucek)
  650. - o Added ldexp to the C89 math library, per POSIX
  651. - o fclose() EINTR handling is now correct per IEEE Std 1003.1-2001
  652. - o Support isblank()
  653. - o Reworked libcrypt to avoid leaking private symbols into the namespace
  654. - o Added strtof(), strtold(), updwtmp(), strptime()
  655. - o Fix ldso build for older arm cross compilers
  656. -Miles Bader:
  657. - o atexit cleanups
  658. - o fixed gcc wrapper handling of -M* options
  659. - o Fixed truncate64/ftruncate64 to restrict them to 64-bit systems,
  660. - since we can't be sure that the _syscall macros can cope with 64
  661. - bit args on 32 bit arches.
  662. - o Large File support on the v850
  663. - o Fixed v850 headers after Erik messed them up
  664. - o Eliminate include/features.h namespace pollution
  665. -M. R. Brown:
  666. - o Fixed pthread support for SH, and fixed SH vfork as well
  667. - o Fixed SH headers after Erik messed them up
  668. -Geoffrey Espin:
  669. - o Mips architecture cleanups. Now works perfectly
  670. - with busybox, vi, ash, etc...
  671. - o Merged in the random number support (rand, srand, etc) from glibc.
  672. -Thomas Fritzsche:
  673. - o Fixes DNS resolver bug from 0.9.9
  674. -Steven J. Hill:
  675. - o Fixed build to support both mips and mipsel
  676. - o Beginnings of a mips ldso port
  677. -Andrew Ip:
  678. - o Support for gnu error() functions
  679. -David McCullough:
  680. - o Coldfire platform updates: clone, setjmp
  681. - o Fixed simple malloc to work on systems with an MMU
  682. -Manuel Novoa III:
  683. - o Rewrote all stdio functions for standards compliance, small size,
  684. - pthreads support, wide/narrow stream support, large file support,
  685. - unbuffered support, etc, etc, etc.
  686. - o Rewrote the various string to int functions to be smaller, more
  687. - standards compilant, and reduce dependance on libgcc.a.
  688. -Yoshinori Sato:
  689. - o ptrace for the Hitachi h8300 fix
  690. -David Schleef:
  691. - o Debian packaging updates
  692. - o Check for proper 16-byte aliged stack pointer on powerpc
  693. -Stefan Soucek:
  694. - o pthreads support for MMU-less systems
  695. - o pthreads support (with Erik Andersen)
  696. -Brian Stafford:
  697. - o Rewrote strcasecmp() per SUSv2.
  698. -Bart Visscher:
  699. - o Added missing IPV6 support and reentrant networking function
  700. - additions so iptables now runs with IPV6 support.
  701. -
  702. -
  703. -
  704. -
  705. -
  706. -
  707. -0.9.9 February 4, 2002
  708. -
  709. -Erik Andersen:
  710. - o A bunch of doc updates. Major update to the working
  711. - apps list.
  712. - o Added a configurator script (extra/Configs/uClibc_config_fix.pl)
  713. - which can simplify configuring uClibc.
  714. - o Fixed setjmp/longjmp on x86,arm,powerpc,mips,and sparc.
  715. - Hitting ^C in ash kills client apps now, not ash.
  716. - o Reworked signal handling code so it now passes POSIX
  717. - conformance tests.
  718. - o Fixed sleep and usleep to work correctly when
  719. - interrupted by signals.
  720. - o Made getopt behave the same when staticly linking
  721. - as when dynamicly linking. It was using different
  722. - implementations depending on how apps were linked.
  723. - o Added missing inttypes.h header file
  724. - o Eliminate all C++ style comments from header files
  725. - o Support statvfs and statfs
  726. - o Support getmntent_r
  727. - o Scandir and scandir64 were calling malloc without
  728. - checking for ENOMEM
  729. - o Fixed stpcpy function declaration
  730. - o Many large file support improvements.
  731. - o Fixed fcntl to work when DOLFS is enabled
  732. - o Fixed termios code to do the Right Thing(tm)
  733. - o Allow regex to be excluded at compile time
  734. - o Implemented mempcpy
  735. - o Build ldd and readelf for the target system and for the
  736. - host system
  737. - o Fix several cases where get-needed-libgcc-objects.sh
  738. - could fail, breaking the shared uClibc library.
  739. - o Include all shared library loader objects into a
  740. - single C file, thereby reducing its size further.
  741. - o Reworked the shared library linking process to be more
  742. - flexible so that gcc and ld can more easily be built to
  743. - target uClibc library.
  744. - o Better error checking in the Makefiles. Be more pedantic
  745. - about tar, chmod, etc to avoid system dependent failures.
  746. - o We can now autodetect the target architecture
  747. - o Hide references to wchar_t so GNU autoconf
  748. - configure scripts won't get confused and try to
  749. - enable wide char support.
  750. - o Fixed stdio.h so apps can use varargs.h if they want to.
  751. - o Added brk/sbrk support for ARM, powerpc, mips, and sparc
  752. - and set them to default to the much faster brk using malloc
  753. - o Added missing syscalls: get_kernel_syms, fcntl64,
  754. - fdatasync, sched_setparam, sched_getparam,
  755. - sched_setscheduler, sched_getscheduler,
  756. - sched_get_priority_max, sched_get_priority_min,
  757. - sched_rr_get_interval, sigaltstack, sendfile,
  758. - pivot_root, sigsuspend, setfsuid, and setfsgid
  759. - o Force DOPIC be true when HAVE_SHARED is true.
  760. - o Fixed hstrerror()
  761. - o Implemented gethostent(), sethostent(), and endhostent()
  762. - o Added arch specific support so that sparc and mips actually
  763. - compile and work
  764. -Miles Bader:
  765. - o Fixes for the v850 architecture: crt0, setjmp,
  766. - arch autodetection, etc.
  767. - o Fixed `make install' to not build ldso stuff on
  768. - non-shared-library systems.
  769. -Michael E Brown:
  770. - o Allow the gcc wrapper to support setting DEVEL_PREFIX
  771. - and BUILD_DIR at runtime (no more need to recompile).
  772. -M. R. Brown and Erik Andersen:
  773. - o Fixed the SH port so it now works. Tested and shown
  774. - working on an SH4 Dreamcast system.
  775. -Kim Heino:
  776. - o Made 'make clean' remove generated bits/syscall.h
  777. -David McCullough:
  778. - o SH architecture updates. Added brk, sbrk,
  779. - o Fixed simple malloc to work on systems with an MMU
  780. - o Taught getutent to return NULL if utmp doesn't exist.
  781. - o Added insque/remque support
  782. - o Fixed DNS resolver version number so apps won't get
  783. - confused and use the wrong API.
  784. - o Added Config selectable shadow password support
  785. -Yoshinori Sato
  786. - o Contributed support for the Hitach H8/300H architecture
  787. -Cédric Schieli:
  788. - o Add support for inet_netof, inet_lnaof, inet_makeaddr
  789. - and hstrerror.
  790. -David Schleef:
  791. - o Added libstrip, a nifty script to automagically
  792. - strip unneeded content from the uClibc shared
  793. - libraries.
  794. -Martin Sieper
  795. - o Added getw() and putw()
  796. - o Added missing header files -- lastlog.h, sgtty.h,
  797. - netipx/ipx.h, sys/perm.h
  798. -Stefan Soucek:
  799. - o Add rcmd support, i.e. rsh, rlogin, etc.
  800. - o Fix rcmd to avoid alloca, which is dangerous
  801. - on mmu-less systems
  802. -spudmonkey@racsa.co.cr:
  803. - o Eliminate a buffer overflow in the shared library loader
  804. -Brian Stafford:
  805. - o Enable support for Unix98 PTYs, and add option
  806. - to disable old style PTYs.
  807. -
  808. -
  809. diff -Nur uClibc-0.9.33.2/Changelog-2010 uClibc-git/Changelog-2010
  810. --- uClibc-0.9.33.2/Changelog-2010 1970-01-01 01:00:00.000000000 +0100
  811. +++ uClibc-git/Changelog-2010 2014-07-25 20:36:04.409322131 +0200
  812. @@ -0,0 +1,804 @@
  813. +0.9.31 2 April 2010
  814. +
  815. + Upgrade notices from previous versions.
  816. + o On x86_64 the format of /var/run/utmp changed compared to previous
  817. + versions. To retain compatibility with glibc we now define
  818. + __WORDSIZE_COMPAT32. If you are certain that you will never use
  819. + glibc nor run in i386 mode on your x86_64 installation, you can
  820. + remove this definition from wordsize.h.
  821. + Otherwise you have to delete /var/run/utmp on x86_64 hosts when
  822. + upgrading to 0.9.31
  823. + o The SHARED_LIB_LOADER_PREFIX was renamed to a single path
  824. + component called MULTILIB_DIR and defaults to 'lib'.
  825. +
  826. +0.9.27 12 January 2005
  827. +
  828. + This has been a long time in the making... Release highlights:
  829. + o New stdio implementation
  830. + o New optimized string functions
  831. + o Major improvements to the shared lib loader
  832. + o Shared libraries work properly on powerpc
  833. + o Debugging works on mips
  834. + o New architectures: frv, nios, nios2, bfin
  835. + o Linux 2.6.x kernel support
  836. + o Lots and lots of bug fixes
  837. +
  838. + This release is NOT binary compatible with uClibc 0.9.26 or any earlier
  839. + release, so be prepared to recompile your software if you are still using
  840. + an old version of uClibc.
  841. +
  842. + -Erik
  843. +
  844. +
  845. +
  846. +0.9.26 3 January 2004
  847. +
  848. + This simply adds a fix for a pthread bug that was noticed a few hours
  849. + after the previous release. Otherwise identical to 0.9.25.
  850. +
  851. + This release remains binary compatible with uClibc 0.9.21-25 as long as
  852. + you take care to avoid any configuraton changes that will break things.
  853. + We _were_ planning to break binary compatibilty in this release, but
  854. + decided to hold those changes so we could push out a bugfix release.
  855. +
  856. + We _will_ break binary compatibilty in the upcoming 0.9.27 release to
  857. + implement a few things we have been postponing. That should hopefully be
  858. + the last ABI change before we freeze the ABI for the upcoming 1.0.x
  859. + stable uClibc series.
  860. +
  861. +Release highlights:
  862. + o A trivial fix for a pthread bug
  863. + o Nothing else
  864. +
  865. + -Erik
  866. +
  867. +
  868. +
  869. +0.9.25 3 January 2004
  870. +
  871. +See Changelog.full for the complete list of who did what.
  872. +
  873. +Note:
  874. + This release remains binary compatible with uClibc 0.9.21-24 as long as
  875. + you take care to avoid any configuraton changes that will break things.
  876. + We _were_ planning to break binary compatibilty in this release, but
  877. + decided to hold those changes so we could push out a bugfix release.
  878. +
  879. + We _will_ break binary compatibilty in the upcoming 0.9.26 release to
  880. + implement a few things we have been postponing. That should hopefully be
  881. + the last ABI change before we freeze the ABI for the upcoming 1.0.x
  882. + stable uClibc series.
  883. +
  884. +Release highlights:
  885. + o Fixed a ton of problems found using the LTP and NIST test suites.
  886. + The few remaining test failures are obscure corner cases, such as
  887. + a few functions that fail (correctly) with incorrect errno values.
  888. + o Fixed a longstanding pthreads bug -- amoung other things, you no
  889. + longer need to explicitly add -lpthread for perl to work.
  890. + o Added some sh optimized string functions
  891. + o Added sh64 shared library support
  892. + o The default malloc implementation has been replaced, and will
  893. + now actually free memory when told to do so.
  894. + o Both popen() and exec*() now behave themselves per SuSv3
  895. + o Better 2.6.x kernel header support
  896. + o Added support for Position Independent Executables (PIE) on x86
  897. + o Lots of other minor cleanups
  898. +
  899. + -Erik
  900. +
  901. +
  902. +
  903. +0.9.24 15 December 2003
  904. +
  905. +See Changelog.full for the complete list of who did what.
  906. +
  907. +Note:
  908. + This release remains binary compatible with uClibc 0.9.21-23 as
  909. + long as you take care to avoid any configuraton changes that will
  910. + break things.
  911. +
  912. + We currently plan to break binary compatibilty in the upcoming 0.9.25 to
  913. + implement a few things we have been postponing, which will hopefully be
  914. + the last change....
  915. +
  916. +Release highlights:
  917. + o Fixed several silly configuration problems
  918. + o Added arm optimized string functions
  919. + o Lots of minor cleanups
  920. +
  921. + -Erik
  922. +
  923. +
  924. +
  925. +
  926. +
  927. +0.9.23 13 November 2003
  928. +
  929. +See Changelog.full for the complete list of who did what.
  930. +
  931. +Note:
  932. + This release is binary compatible with uClibc 0.9.21 and 0.9.22 as
  933. + long as you take care to avoid any configuraton changes that will
  934. + break things. Enabling or disabling things like soft-float,
  935. + locale, wide wchar support, or changing cpu type are all good
  936. + examples of things that will break binary compatibility.
  937. +
  938. +Release highlights:
  939. + o Fixed several silly configuration problems that were
  940. + present in the 0.9.22 release.
  941. + o Fixed compilation problem with soft-float support on
  942. + several architectures.
  943. + o Lots of cleanup work on the powepc shared lib loader
  944. + thanks to Joakim Tjernlund.
  945. + o Updated the debian packaging for use in a standalone uClibc
  946. + system, rather than being a subordinate library under a
  947. + glibc based system.
  948. +
  949. + -Erik
  950. +
  951. +
  952. +
  953. +
  954. +
  955. +0.9.22 8 November 2003
  956. +
  957. +See Changelog.full for the complete list of who did what.
  958. +
  959. +Note:
  960. + This release is binary compatible with the 0.9.21 release
  961. + if you take care to avoid any configuraton changes that
  962. + might break things for you (i.e. enabling or disabling things
  963. + like soft-float, locale, wide wchar support, or changing cpu
  964. + type are all good examples of binary incompatible config options).
  965. +
  966. +Release highlights:
  967. + o Added e1, microblaze, and sh64 architectures.
  968. + o Much improved soft-float support
  969. + o Rewrote the passwd and group handing functions
  970. + and implemented all SuSv3 required reentrant
  971. + versions.
  972. + o Reworked and updated the Config system. You now
  973. + get to select your target architecture with the
  974. + config system.
  975. + o Fixed pthreads for mmuless m68k systems
  976. + o Added some x86 optimized string functions.
  977. + o Lots and lots of bugs fixed.
  978. +
  979. + -Erik
  980. +
  981. +
  982. +
  983. +
  984. +
  985. +0.9.21 9 September 2003
  986. +
  987. +See Changelog.full for the complete list of who did what.
  988. +
  989. +Note:
  990. + This release is not binary compatible with earlier releases.
  991. + Sorry about that. We have never promised to provide binary
  992. + compatibility until we hit version 1.0, and even then, if
  993. + you change your configuration.
  994. +
  995. +Release highlights:
  996. + o uClibc now has full ANSI/ISO C99 locale support (except
  997. + for wcsftime() and collating items in regex).
  998. + o Added support for using pre-generated locale data, making
  999. + it easy for mere mortals to use uClibc w/locale support.
  1000. + o Lots of new tuning options added to trade size
  1001. + for features, allowing for smaller static binaries.
  1002. + o The "dlopen()'ing libraries that depend on libraries"
  1003. + problem was fixed.
  1004. + o A new scanf implementation. Well tested, but
  1005. + brand new so watch for obscure bugs...
  1006. + o Reworked and updated the Config system, adding several
  1007. + nice new features which we now use.
  1008. + o Lots and lots of sundry bug fixes and cleanups.
  1009. +
  1010. + -Erik
  1011. +
  1012. +
  1013. +
  1014. +
  1015. +
  1016. +0.9.20 30 June 2003
  1017. +
  1018. +See Changelog.full for the complete list of who did what.
  1019. +
  1020. +Note:
  1021. + This release remains binary compatible with 0.9.18 and 0.9.19.
  1022. +
  1023. +
  1024. +Release highlights:
  1025. + o Some ldd, profiling, and gcc wrapper updates
  1026. + o Updated to support and compile with gcc 3.3
  1027. + o Several needed mips updates
  1028. + o Building under cygwin should now work...
  1029. + o Prevent non-PIC code getting into PIC libs
  1030. + o Added mmap64 support
  1031. + o mmu-less systems now get a 16k default thread stack size
  1032. + which is much more sane than the old 2 MB default...
  1033. + o Implemented syscall() for powerpc
  1034. + o Optionally struct tm extension support
  1035. + o Lots of other sundry little fixes and cleanups.
  1036. + o Prevent buffer overflows in the passwd and group functions.
  1037. +
  1038. + -Erik
  1039. +
  1040. +
  1041. +
  1042. +
  1043. +
  1044. +0.9.19 3 March 2003
  1045. +
  1046. +See Changelog.full for the complete list of who did what.
  1047. +
  1048. +Note:
  1049. + This release remains binary compatible with 0.9.18 (except
  1050. + for mips, but then mips was unusable in stock 0.9.18 anyways).
  1051. +
  1052. +
  1053. +Release highlights:
  1054. + Stefan Allius
  1055. + o Some Makefile and warning fixes
  1056. + David Airlie
  1057. + o Fixed gcc wrapper handling of ctor/dtor stuff when used in
  1058. + with and w/o the nostdinc and nostdlib options
  1059. + Erik Andersen
  1060. + o Fixed a number of system call kernel type/user type translation
  1061. + problems that scrambled a handful of system calls.
  1062. + o Fixup powerpc syscalls to eliminate warnings with gcc-3.2
  1063. + o Fixed several ioctl special cases for powerpc
  1064. + o Checked in forgotten mips kernel_types.h changes
  1065. + o Fixed mips shared library loader bug that caused segfaults
  1066. + o Major update to the pthreads library. Should improve performance.
  1067. + o Fixed uClibc's shared library loader so we can properly debug
  1068. + applications using pthreads (must use gdb 5.3 or newer which
  1069. + was compiled using uClibc).
  1070. + o Made uClibc's ldd act just the glibc provided one (i.e. relying
  1071. + on the shared lib loader to do the work) when it is possible to
  1072. + doi so, and only rummage about the ELF headers when we have no
  1073. + other choice (such as when using 'ldd' on cross compiled stuff).
  1074. + Miles Bader
  1075. + o header file updates for v850 architecture
  1076. + o Fixed v850 crt0.S __uClibc_main argument stack space
  1077. + Jeffrey Damick
  1078. + o Fixed res_init() so it properly reloads /etc/resolv.conf
  1079. + Vadim Lebedev
  1080. + o Fixed ARM setjmp when floating point was disabled
  1081. + David McCullough
  1082. + o Removed debug (-g) when building crti.o and crtn.o, as
  1083. + debug would mess up the build for SH4 and probably others.
  1084. + o Fixed SH setjmp when floating point was enabled
  1085. +
  1086. +
  1087. + -Erik
  1088. +
  1089. +
  1090. +
  1091. +
  1092. +
  1093. +0.9.18 12 February 2003
  1094. +
  1095. +See Changelog.full for the complete list of who did what.
  1096. +
  1097. +Note:
  1098. +
  1099. + Once again, this release is _NOT_ binary compatible with earlier
  1100. + releases. I _think this will be the last time (with the possible
  1101. + exception of some future changes to our locale support...)
  1102. +
  1103. +
  1104. +Release highlights:
  1105. + Stefan Allius
  1106. + o fixed a compile problem when large file support was disabled
  1107. + o fixed dlib_pic.o to compile with proper flags
  1108. + o fixed a shared lib loader compile warning
  1109. + o Made adding libgcc functions to uClibc optional
  1110. + Erik Andersen
  1111. + o Fixed scandir64 to not free the wrong pieces of memory
  1112. + which caused segfaults
  1113. + o Fixed mismatches between kernel and libc dirent structures
  1114. + o Fixed mismatches between the size of uClibc's struct dirent
  1115. + and struct dirent64 so that when _FILE_OFFSET_BITS=64 we
  1116. + do not lose part of the filename
  1117. + o Fixed getdents64.c so the build will not break when compiling
  1118. + vs a 2.0.x Linux kernel when UCLIBC_HAS_LFS is enabled
  1119. + o Create stub crti.o and crtn.o files when UCLIBC_CTOR_DTOR is disabled
  1120. + o Fixed licenses for a few files that erroneously were listed as GPL
  1121. + but were really LGPL after discussing with authors
  1122. + o sigaction for x86 had an extra and unwanted sigaction syscall
  1123. + o Fixed debugging of arm binaries by adding a .note.ABI-tag section
  1124. + Miles Bader
  1125. + o header file updates for v850 architecture
  1126. + o Fixed v850 clone syscall
  1127. + Christian Krause
  1128. + o Fixed pthread_cond_timedwait to properly uses rt singals
  1129. + when available
  1130. + Christophe Massiot
  1131. + o Added mips _flush_cache syscall
  1132. + David McCullough
  1133. + o Added m68k brk syscall
  1134. + Marshall M. Midden
  1135. + o Fixed pipe implementation for mips
  1136. +
  1137. +
  1138. + -Erik
  1139. +
  1140. +
  1141. +
  1142. +
  1143. +
  1144. +0.9.17 25 January 2003
  1145. +
  1146. +See Changelog.full for the complete list of who did what.
  1147. +
  1148. +Note:
  1149. +
  1150. + I have always reserved the right to make binary incompatible changes as
  1151. + needed prior to the "1.0" release. This release is a good example of
  1152. + that. A few bugs turned up that needed to be fixed and the only good way
  1153. + to fix them was to change some fundamental data structure sizes. So I did
  1154. + just that. As a result, this release is _NOT_ binary compatible with
  1155. + earlier releases -- you will need to recompile your applications.
  1156. +
  1157. +
  1158. +Release highlights:
  1159. + Stefan Allius
  1160. + o fixed a number of shared library loader bugs
  1161. + o setjmp, longjmp, clone, and vfork cleanups for the SH architecture
  1162. + o Don't build the config system with ncurses unless asked to
  1163. + Tobias Anderberg
  1164. + o cris architecture updates
  1165. + Erik Andersen
  1166. + o Changed 'struct stat' and 'struct stat64' so they use types that
  1167. + are consistant with use elsewhere in the library. Without this,
  1168. + subtle bugs would occur due to comparing signed and unsigned
  1169. + types (for example, GNU tar wouldn't work)
  1170. + o Fixed dlopen so it works with staticly linked apps
  1171. + o Fixed sigaction on arm architecture so sa_restorer works properly
  1172. + o Fixed sigaction on x86 architecture for (fixed debugging threads)
  1173. + o Fixed a wide char related segfault in the regular expression code
  1174. + o Powerpc pread and pwrite are now implemented correctly
  1175. + o Powerpc syscall mechanism re-implemented
  1176. + o Sparc architecture and syscall mechanism fixed up so things compile
  1177. + o usershell reimplemented
  1178. + o Fixed global destructors for staticly linked applications
  1179. + o Added dynamic atexit support (needed for full C++ ctor/dtor support)
  1180. + o The ldd utility now acts more like the GNU utility
  1181. + o Added a stub libnsl library to make stupid configure scripts bahave
  1182. + o Always build crt1.o as well as crt0.o to minimize the need to mess
  1183. + with the compiler
  1184. + o Rewrote powerpc crt0.S to properly handle ctors/dtors
  1185. + o Removed unimplemented and legacy stuff from our header files to
  1186. + make configure behave better
  1187. + o Made the lib loader also support libs in /usr/X11R6/lib by default
  1188. + o Config system updates
  1189. + o networking function updates
  1190. + o Large file support updates
  1191. + o Lots of other little bug fixes and cleanups
  1192. + Nick Fedchik
  1193. + o Support ether_aton
  1194. + Nathan Field
  1195. + o Fixed pthread_mutex_lock and pthread_mutex_unlock so they
  1196. + actually work as advertised on mips
  1197. + o Fixed several nasty pthread bugs fixing debugging
  1198. + Brett Hunt
  1199. + o Fixed potential segfaults during 'make menuconfig'
  1200. + Jay Kulpinski
  1201. + o Fixed a subtle problem in the DNS resolver that prevented
  1202. + uncompressed DNS lookup responses from working
  1203. + David McCullough
  1204. + o Fixed pclose error handling
  1205. + David Meggy
  1206. + o fixed the problem where arm binaries would crash on start
  1207. + that Erik stupidly caused right before the last release.
  1208. + Manuel Novoa III
  1209. + o Major locale support update!
  1210. + o Allow people to use pregenerated locale data instead of generating
  1211. + approx 40Mb of glibc locales to get the 300+ locales currently
  1212. + supported.
  1213. + o locale dependent collation support
  1214. + o Fixed locale support tools to work when cross-compiling
  1215. + o Added the *wprintf functions
  1216. + o Added the wcsto{inttype} functions
  1217. + o Added iconv() and a mini iconv utility
  1218. + o Added hsearch and hsearch_r
  1219. + o Fixed a silly bug allowing wprintf %s to work correctly.
  1220. + o Fixed fdopen when used with "a" (append).
  1221. + o Fixed stdio file position handing to be sure fell() always
  1222. + gives correct results
  1223. + Luc Van Oostenryck
  1224. + o Fixed a buffer overflow in getlogin_r
  1225. + Yoshinori Sato
  1226. + o Hitachi h8300 architecture update
  1227. + Ronald Wahl
  1228. + o Powerpc shared library relocation fixes
  1229. +
  1230. + -Erik
  1231. +
  1232. +
  1233. +
  1234. +0.9.16 8 November 2002
  1235. +
  1236. +See Changelog.full for the complete list of who did what.
  1237. +
  1238. +Release highlights:
  1239. + o CRIS architecture and shared library support from Tobias Anderberg
  1240. + o New uClibc configuration system
  1241. + o shared library global constructors and destructors initialization
  1242. + ordering fixed by Stefan Allius
  1243. + o More SuperH architecture fixes from Stefan Allius
  1244. + o uClibc now compiles with newer versions of gcc (i.e. RedHat 8.0)
  1245. + o uClibc no longer requires perl to compile
  1246. + o mips dlopen was fixed by Steven J. Hill
  1247. + o pty and tty handling fixes
  1248. + o Manuel Novoa added support for a new /etc/TZ file for globally
  1249. + setting the system timezone.
  1250. + o Manuel also fixed up a number of remaining wide char issues.
  1251. + o Lots of other little bug fixes and cleanups
  1252. +
  1253. + -Erik
  1254. +
  1255. +
  1256. +
  1257. +0.9.15 27 August 2002
  1258. +
  1259. +This is a minor bugfix release.
  1260. +
  1261. +See Changelog.full for the complete list of who did what.
  1262. +Release highlights:
  1263. + o Eliminated the HAS_LONG_LONG option. gcc always supports
  1264. + long long, and the option never excluded all long long anyways.
  1265. + o ctype.h no longer allows multiple argument evaluation in
  1266. + compliance with ANSI/ISO C99
  1267. + o Obscure printf fixes -- one involving %o and one involving %f.
  1268. + o Bugfixes for locking and reentrance in password/group functions
  1269. + o Directly use kernel types for most items, eliminating needless
  1270. + translation and fixing several bugs.
  1271. + o Directly use kernel struct stat -- no more translating
  1272. + o More superH (sh) architecture merging from Stefan Allius
  1273. + o Errno values and strerror are now correct on alpha, sparc, and mips
  1274. + o Fixed an obscure bug with fclose when custom streams are enabled.
  1275. + o Lots of other little bug fixes and cleanups
  1276. +
  1277. + -Erik
  1278. +
  1279. +
  1280. +
  1281. +0.9.14 12 August 2002
  1282. +
  1283. +This is a minor bugfix release.
  1284. +
  1285. +See Changelog.full for the complete list of who did what.
  1286. +Release highlights:
  1287. + o Fix a compile error when RPC and Pthread support
  1288. + were both enabled.
  1289. + o Eliminate duplicate define warnings in wstring.c.
  1290. + o Fix potentially broken preprocessor comparisons.
  1291. + o Erik was an idiot and broke thread locking in exit(),
  1292. + atexit() and friends. Fix that.
  1293. + o Fix the gcc wrapper to use crtbeginS.o and crtendS.o when
  1294. + compiling PIC code (crtbegin.o and crtend.o) otherwise.
  1295. +
  1296. + -Erik
  1297. +
  1298. +
  1299. +
  1300. +
  1301. +0.9.13 9 August 2002
  1302. +
  1303. +Security Fixes
  1304. + o There was an off-by-one buffer overflow in the group
  1305. + handling code, fix thanks to Joseph Chiu.
  1306. + o There was an integer overflow bug in calloc, per
  1307. + http://online.securityfocus.com/bid/5398
  1308. + o There was an integer overflow bug in the xdr_array
  1309. + RPC code, per http://online.securityfocus.com/bid/5356
  1310. +
  1311. +See Changelog.full for the complete list of who did what.
  1312. +Release highlights:
  1313. + o Add full shared library support for Hitachi SuperH (sh)
  1314. + thanks to Stefan Allius and Edie C. Dost
  1315. + o Lots of reentrance cleanups (we should now be fully
  1316. + reentrant when compiled with pthread support).
  1317. + o Miles Bader implemented a new mmap based malloc which is much
  1318. + smarter than the old "malloc-simple", and actually works, unlike
  1319. + the old "malloc". This is now the default for mmu-less systems
  1320. + and should greatly help reduce memory fragmentation and wastage.
  1321. + o Reworked syscall handling for i386 and ARM, smaller and cleaner.
  1322. + o Support for the syscall() function on i386 and ARM
  1323. + o The uClibc g++ wrapper now automagically adds the proper include
  1324. + search path and and libraries.
  1325. + o Lots of shared library loader updates
  1326. + o dlopen'd shred libraries not properly run destructors
  1327. + when ctor/dtor support is enabled
  1328. + o pread/pwrite/pread64/pwrite64 now all work as expected
  1329. + o Lots and lots of other bug fixes and cleanups.
  1330. +
  1331. + -Erik
  1332. +
  1333. +
  1334. +
  1335. +
  1336. +0.9.12 20 June 2002
  1337. +
  1338. +See Changelog.full for the complete list of who did what.
  1339. +Release highlights:
  1340. + o Add full shared library support for mips (big and little
  1341. + endian), thanks to a lot of hard work from Steven J. Hill
  1342. + o i960 architecture support, thanks to Martin Proulx
  1343. + o An initial alpha port (works, but needs some cleanup)
  1344. + o Fixes shared library support for powerpc
  1345. + o Fixes for mmu-less systems
  1346. + o Much improved thread locking and reentrance.
  1347. + o More gcc wrapper updates. XFree86 really does link
  1348. + this time around. It still didn't last time.
  1349. + o Libcrypt now passes conformance tests
  1350. + o Nearly complete locale supporti thanks to a lot
  1351. + of hard work by Manuel Novoa III. This stuff is
  1352. + _way_ smaller than glibc's
  1353. + o Completely new time handling functions also by Manuel
  1354. + o Lots of other bug fixes and cleanups.
  1355. +
  1356. + -Erik
  1357. +
  1358. +
  1359. +
  1360. +
  1361. +Erik Andersen:
  1362. +0.9.11 10 April 2002
  1363. +
  1364. +Release highlights:
  1365. + o Lots of bug fixes
  1366. + o Much better large file support
  1367. + o Several gcc wrapper bug fixes, so things like iproute2 and
  1368. + XFree86 should now link properly.
  1369. + o Fixes a stdio thread locking bug that could cause random
  1370. + deadlocks on s*printf calls when threading was enabled.
  1371. +
  1372. +Erik Andersen:
  1373. + o Added a generic implementation of truncate64.c and ftruncate64.c
  1374. + o Added missing creat64, glob64, mkstemp64, getrlimit64, setrlimit64
  1375. + o Removed internal erroneous use of __USE_FILE_OFFSET64
  1376. + o Made libpthread compile on sparc and powerpc
  1377. + o Made libpthread soname and symlinks match the other libraries.
  1378. + o Added finite() to the C89 math lib, since some math functions use it.
  1379. + o Added missing function pointer to error.c (some apps wanted it)
  1380. + o Fixed initfini build for arches where gcc tries to be sneaky
  1381. + o Fixed m68k/bits/setjmp.h which I has broken in the last release.
  1382. + o Fixed a buffer overflow in the dynamic library loader
  1383. + o Fixed a stdio thread locking bug that could cause random
  1384. + deadlocks on s*printf calls when threading was enabled.
  1385. + o Implemented sqrtf(), needed for libstdc++ on arm
  1386. +Miles Bader:
  1387. + o Make clean fixes to not blindly wipe all symlinks
  1388. + o Re-enabled clnt_perror()
  1389. + o Re-implemented swab()
  1390. +Dwayne Fontenot:
  1391. + o Many updates to the uClibc Working Application List
  1392. +Steven J. Hill:
  1393. + o Many updates to the mips dynamic loader. Not yet working but
  1394. + getting very close now.
  1395. + o Fixed locking bug in getttyent()
  1396. + o Support libpthread on mips
  1397. +Richard June:
  1398. + o Fixed several bugs in utmp code (pututline was only writing the
  1399. + first sizeof-a-pointer bytes to the utmpfile).
  1400. + o setutent() was only opening utmp readonly.
  1401. +m4@brecis.COM:
  1402. + o Fixed a silly typing problem with the getuid syscall.
  1403. +Manuel Novoa III:
  1404. + o Fixed stdio FILE read/write auto-transition bugs.
  1405. + o Better stdio errno handling
  1406. + o Changed setvbuf() to more closely match glibc's behavior
  1407. + o Fixed getpass() to not echo passwords to the console
  1408. + o Fixed locale ISblank flag.
  1409. + o Fixed an arg promotion handling bug in _do_one_spec for %c reported
  1410. + by Ilguiz Latypov.
  1411. +Kensuke Otake:
  1412. + o Implemented swab()
  1413. +Yoshinori Sato:
  1414. + o Fixed h8300 architecture support for pthreads and changes to
  1415. + the include files
  1416. +David Schleef:
  1417. + o Made powerpc assembly code PIC-compatible
  1418. + o Removed powerpc R_PPC_REL24 handling, since it was deceptively useless.
  1419. +John Traill:
  1420. + o Several types on powerpc, such as dev_t, are different than on other
  1421. + architectures. John spotted this, which fixed a _ton_ of problems since
  1422. + anything calling stat() was previously broken.
  1423. +Jim Treadway:
  1424. + o Eliminated use of alarm() from the DNS resolver by converting
  1425. + it to use select instead (much cleaner).
  1426. +
  1427. +
  1428. +
  1429. +
  1430. +
  1431. +
  1432. +
  1433. +
  1434. +0.9.10 21 March 2002
  1435. +
  1436. +Major new features:
  1437. + o pthreads support (derived from glibc 2.1.3's linuxthreads library)
  1438. + by Stefan Soucek and Erik Andersen
  1439. + o pthreads support for MMU-less systems, by Stefan Soucek
  1440. + o Complete rewrite of all stdio functions for standards compliance,
  1441. + small size, pthreads support, wide/narrow stream support, large
  1442. + file support, unbuffered support, etc, etc by Manuel Novoa III
  1443. + o gcc wrapper reworked by Erik Andersen. Now operated correctly in
  1444. + all known cases, and now wraps g++ as well for C++ support.
  1445. + o constructor/destructor support, for C++ by Erik Andersen.
  1446. + o Eliminated duplicate include/bits header files, by Erik Andersen.
  1447. + Now all common include/bits headers are grouped together.
  1448. +
  1449. +
  1450. +Erik Andersen:
  1451. + o Lots of changes and improvements to the shared library loader
  1452. + o Cleaned up a piles of bugs
  1453. + o Fixed a segfault when scandir was called on empty directories.
  1454. + o Several syscalls added: pread/pwrite
  1455. + o Makefile/build system cleanups
  1456. + o Sighandling fixes
  1457. + o pthreads support (with Stefan Soucek)
  1458. + o Added ldexp to the C89 math library, per POSIX
  1459. + o fclose() EINTR handling is now correct per IEEE Std 1003.1-2001
  1460. + o Support isblank()
  1461. + o Reworked libcrypt to avoid leaking private symbols into the namespace
  1462. + o Added strtof(), strtold(), updwtmp(), strptime()
  1463. + o Fix ldso build for older arm cross compilers
  1464. +Miles Bader:
  1465. + o atexit cleanups
  1466. + o fixed gcc wrapper handling of -M* options
  1467. + o Fixed truncate64/ftruncate64 to restrict them to 64-bit systems,
  1468. + since we can't be sure that the _syscall macros can cope with 64
  1469. + bit args on 32 bit arches.
  1470. + o Large File support on the v850
  1471. + o Fixed v850 headers after Erik messed them up
  1472. + o Eliminate include/features.h namespace pollution
  1473. +M. R. Brown:
  1474. + o Fixed pthread support for SH, and fixed SH vfork as well
  1475. + o Fixed SH headers after Erik messed them up
  1476. +Geoffrey Espin:
  1477. + o Mips architecture cleanups. Now works perfectly
  1478. + with busybox, vi, ash, etc...
  1479. + o Merged in the random number support (rand, srand, etc) from glibc.
  1480. +Thomas Fritzsche:
  1481. + o Fixes DNS resolver bug from 0.9.9
  1482. +Steven J. Hill:
  1483. + o Fixed build to support both mips and mipsel
  1484. + o Beginnings of a mips ldso port
  1485. +Andrew Ip:
  1486. + o Support for gnu error() functions
  1487. +David McCullough:
  1488. + o Coldfire platform updates: clone, setjmp
  1489. + o Fixed simple malloc to work on systems with an MMU
  1490. +Manuel Novoa III:
  1491. + o Rewrote all stdio functions for standards compliance, small size,
  1492. + pthreads support, wide/narrow stream support, large file support,
  1493. + unbuffered support, etc, etc, etc.
  1494. + o Rewrote the various string to int functions to be smaller, more
  1495. + standards compilant, and reduce dependance on libgcc.a.
  1496. +Yoshinori Sato:
  1497. + o ptrace for the Hitachi h8300 fix
  1498. +David Schleef:
  1499. + o Debian packaging updates
  1500. + o Check for proper 16-byte aliged stack pointer on powerpc
  1501. +Stefan Soucek:
  1502. + o pthreads support for MMU-less systems
  1503. + o pthreads support (with Erik Andersen)
  1504. +Brian Stafford:
  1505. + o Rewrote strcasecmp() per SUSv2.
  1506. +Bart Visscher:
  1507. + o Added missing IPV6 support and reentrant networking function
  1508. + additions so iptables now runs with IPV6 support.
  1509. +
  1510. +
  1511. +
  1512. +
  1513. +
  1514. +
  1515. +0.9.9 February 4, 2002
  1516. +
  1517. +Erik Andersen:
  1518. + o A bunch of doc updates. Major update to the working
  1519. + apps list.
  1520. + o Added a configurator script (extra/Configs/uClibc_config_fix.pl)
  1521. + which can simplify configuring uClibc.
  1522. + o Fixed setjmp/longjmp on x86,arm,powerpc,mips,and sparc.
  1523. + Hitting ^C in ash kills client apps now, not ash.
  1524. + o Reworked signal handling code so it now passes POSIX
  1525. + conformance tests.
  1526. + o Fixed sleep and usleep to work correctly when
  1527. + interrupted by signals.
  1528. + o Made getopt behave the same when staticly linking
  1529. + as when dynamicly linking. It was using different
  1530. + implementations depending on how apps were linked.
  1531. + o Added missing inttypes.h header file
  1532. + o Eliminate all C++ style comments from header files
  1533. + o Support statvfs and statfs
  1534. + o Support getmntent_r
  1535. + o Scandir and scandir64 were calling malloc without
  1536. + checking for ENOMEM
  1537. + o Fixed stpcpy function declaration
  1538. + o Many large file support improvements.
  1539. + o Fixed fcntl to work when DOLFS is enabled
  1540. + o Fixed termios code to do the Right Thing(tm)
  1541. + o Allow regex to be excluded at compile time
  1542. + o Implemented mempcpy
  1543. + o Build ldd and readelf for the target system and for the
  1544. + host system
  1545. + o Fix several cases where get-needed-libgcc-objects.sh
  1546. + could fail, breaking the shared uClibc library.
  1547. + o Include all shared library loader objects into a
  1548. + single C file, thereby reducing its size further.
  1549. + o Reworked the shared library linking process to be more
  1550. + flexible so that gcc and ld can more easily be built to
  1551. + target uClibc library.
  1552. + o Better error checking in the Makefiles. Be more pedantic
  1553. + about tar, chmod, etc to avoid system dependent failures.
  1554. + o We can now autodetect the target architecture
  1555. + o Hide references to wchar_t so GNU autoconf
  1556. + configure scripts won't get confused and try to
  1557. + enable wide char support.
  1558. + o Fixed stdio.h so apps can use varargs.h if they want to.
  1559. + o Added brk/sbrk support for ARM, powerpc, mips, and sparc
  1560. + and set them to default to the much faster brk using malloc
  1561. + o Added missing syscalls: get_kernel_syms, fcntl64,
  1562. + fdatasync, sched_setparam, sched_getparam,
  1563. + sched_setscheduler, sched_getscheduler,
  1564. + sched_get_priority_max, sched_get_priority_min,
  1565. + sched_rr_get_interval, sigaltstack, sendfile,
  1566. + pivot_root, sigsuspend, setfsuid, and setfsgid
  1567. + o Force DOPIC be true when HAVE_SHARED is true.
  1568. + o Fixed hstrerror()
  1569. + o Implemented gethostent(), sethostent(), and endhostent()
  1570. + o Added arch specific support so that sparc and mips actually
  1571. + compile and work
  1572. +Miles Bader:
  1573. + o Fixes for the v850 architecture: crt0, setjmp,
  1574. + arch autodetection, etc.
  1575. + o Fixed `make install' to not build ldso stuff on
  1576. + non-shared-library systems.
  1577. +Michael E Brown:
  1578. + o Allow the gcc wrapper to support setting DEVEL_PREFIX
  1579. + and BUILD_DIR at runtime (no more need to recompile).
  1580. +M. R. Brown and Erik Andersen:
  1581. + o Fixed the SH port so it now works. Tested and shown
  1582. + working on an SH4 Dreamcast system.
  1583. +Kim Heino:
  1584. + o Made 'make clean' remove generated bits/syscall.h
  1585. +David McCullough:
  1586. + o SH architecture updates. Added brk, sbrk,
  1587. + o Fixed simple malloc to work on systems with an MMU
  1588. + o Taught getutent to return NULL if utmp doesn't exist.
  1589. + o Added insque/remque support
  1590. + o Fixed DNS resolver version number so apps won't get
  1591. + confused and use the wrong API.
  1592. + o Added Config selectable shadow password support
  1593. +Yoshinori Sato
  1594. + o Contributed support for the Hitach H8/300H architecture
  1595. +Cédric Schieli:
  1596. + o Add support for inet_netof, inet_lnaof, inet_makeaddr
  1597. + and hstrerror.
  1598. +David Schleef:
  1599. + o Added libstrip, a nifty script to automagically
  1600. + strip unneeded content from the uClibc shared
  1601. + libraries.
  1602. +Martin Sieper
  1603. + o Added getw() and putw()
  1604. + o Added missing header files -- lastlog.h, sgtty.h,
  1605. + netipx/ipx.h, sys/perm.h
  1606. +Stefan Soucek:
  1607. + o Add rcmd support, i.e. rsh, rlogin, etc.
  1608. + o Fix rcmd to avoid alloca, which is dangerous
  1609. + on mmu-less systems
  1610. +spudmonkey@racsa.co.cr:
  1611. + o Eliminate a buffer overflow in the shared library loader
  1612. +Brian Stafford:
  1613. + o Enable support for Unix98 PTYs, and add option
  1614. + to disable old style PTYs.
  1615. +
  1616. +
  1617. diff -Nur uClibc-0.9.33.2/docs/man/arc4random.3 uClibc-git/docs/man/arc4random.3
  1618. --- uClibc-0.9.33.2/docs/man/arc4random.3 1970-01-01 01:00:00.000000000 +0100
  1619. +++ uClibc-git/docs/man/arc4random.3 2014-07-25 20:36:04.433322256 +0200
  1620. @@ -0,0 +1,110 @@
  1621. +.\" $OpenBSD: arc4random.3,v 1.19 2005/07/17 08:50:55 jaredy Exp $
  1622. +.\"
  1623. +.\" Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
  1624. +.\" All rights reserved.
  1625. +.\"
  1626. +.\" Redistribution and use in source and binary forms, with or without
  1627. +.\" modification, are permitted provided that the following conditions
  1628. +.\" are met:
  1629. +.\" 1. Redistributions of source code must retain the above copyright
  1630. +.\" notice, this list of conditions and the following disclaimer.
  1631. +.\" 2. Redistributions in binary form must reproduce the above copyright
  1632. +.\" notice, this list of conditions and the following disclaimer in the
  1633. +.\" documentation and/or other materials provided with the distribution.
  1634. +.\" 3. All advertising materials mentioning features or use of this software
  1635. +.\" must display the following acknowledgement:
  1636. +.\" This product includes software developed by Niels Provos.
  1637. +.\" 4. The name of the author may not be used to endorse or promote products
  1638. +.\" derived from this software without specific prior written permission.
  1639. +.\"
  1640. +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  1641. +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  1642. +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  1643. +.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  1644. +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  1645. +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  1646. +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  1647. +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  1648. +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  1649. +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  1650. +.\"
  1651. +.\" Manual page, using -mandoc macros
  1652. +.\"
  1653. +.Dd April 15, 1997
  1654. +.Dt ARC4RANDOM 3
  1655. +.Os
  1656. +.Sh NAME
  1657. +.Nm arc4random ,
  1658. +.Nm arc4random_stir ,
  1659. +.Nm arc4random_addrandom
  1660. +.Nd arc4 random number generator
  1661. +.Sh SYNOPSIS
  1662. +.Fd #include <stdlib.h>
  1663. +.Ft uint32_t
  1664. +.Fn arc4random "void"
  1665. +.Ft void
  1666. +.Fn arc4random_stir "void"
  1667. +.Ft void
  1668. +.Fn arc4random_addrandom "u_char *dat" "int datlen"
  1669. +.Sh DESCRIPTION
  1670. +The
  1671. +.Fn arc4random
  1672. +function provides a high quality 32-bit pseudo-random
  1673. +number very quickly.
  1674. +.Fn arc4random
  1675. +seeds itself on a regular basis from the kernel strong random number
  1676. +subsystem described in
  1677. +.Xr random 4 .
  1678. +On each call, an ARC4 generator is used to generate a new result.
  1679. +The
  1680. +.Fn arc4random
  1681. +function uses the ARC4 cipher key stream generator,
  1682. +which uses 8*8 8-bit S-Boxes.
  1683. +The S-Boxes can be in about (2**1700) states.
  1684. +.Pp
  1685. +.Fn arc4random
  1686. +fits into a middle ground not covered by other subsystems such as
  1687. +the strong, slow, and resource expensive random
  1688. +devices described in
  1689. +.Xr random 4
  1690. +versus the fast but poor quality interfaces described in
  1691. +.Xr rand 3 ,
  1692. +.Xr random 3 ,
  1693. +and
  1694. +.Xr drand48 3 .
  1695. +.Pp
  1696. +The
  1697. +.Fn arc4random_stir
  1698. +function reads data from a pseudo-random device, usually
  1699. +.Pa /dev/urandom,
  1700. +and uses it to permute the S-Boxes via
  1701. +.Fn arc4random_addrandom .
  1702. +.Pp
  1703. +There is no need to call
  1704. +.Fn arc4random_stir
  1705. +before using
  1706. +.Fn arc4random ,
  1707. +since
  1708. +.Fn arc4random
  1709. +automatically initializes itself.
  1710. +.Sh SEE ALSO
  1711. +.Xr rand 3 ,
  1712. +.Xr rand48 3 ,
  1713. +.Xr random 3
  1714. +.Sh HISTORY
  1715. +An algorithm called
  1716. +.Pa RC4
  1717. +was designed by RSA Data Security, Inc.
  1718. +It was considered a trade secret.
  1719. +Because it was a trade secret, it obviously could not be patented.
  1720. +A clone of this was posted anonymously to USENET and confirmed to
  1721. +be equivalent by several sources who had access to the original cipher.
  1722. +Because of the trade secret situation, RSA Data Security, Inc. can do
  1723. +nothing about the release of the ARC4 algorithm.
  1724. +Since
  1725. +.Pa RC4
  1726. +used to be a trade secret, the cipher is now referred to as
  1727. +.Pa ARC4 .
  1728. +.Pp
  1729. +These functions first appeared in
  1730. +.Ox 2.1 .
  1731. diff -Nur uClibc-0.9.33.2/docs/PORTING uClibc-git/docs/PORTING
  1732. --- uClibc-0.9.33.2/docs/PORTING 2012-05-15 09:20:09.000000000 +0200
  1733. +++ uClibc-git/docs/PORTING 2014-07-25 20:36:04.421322194 +0200
  1734. @@ -130,9 +130,6 @@
  1735. ====================
  1736. === Misc Cruft ===
  1737. ====================
  1738. -- utils/readelf.c - not really needed generally speaking, but might as well
  1739. - add your arch to the giant EM_* list (describe_elf_hdr)
  1740. -
  1741. - MAINTAINERS - presumably you're going to submit this code back to mainline
  1742. and since you're the only one who cares about this arch (right now), you
  1743. should add yourself to the toplevel MAINTAINERS file. do it.
  1744. diff -Nur uClibc-0.9.33.2/extra/config/check.sh uClibc-git/extra/config/check.sh
  1745. --- uClibc-0.9.33.2/extra/config/check.sh 2012-05-15 09:20:09.000000000 +0200
  1746. +++ uClibc-git/extra/config/check.sh 2014-07-25 20:36:04.853324457 +0200
  1747. @@ -1,6 +1,6 @@
  1748. #!/bin/sh
  1749. # Needed for systems without gettext
  1750. -$* -xc -o /dev/null - > /dev/null 2>&1 << EOF
  1751. +$* -x c -o /dev/null - > /dev/null 2>&1 << EOF
  1752. #include <libintl.h>
  1753. int main()
  1754. {
  1755. diff -Nur uClibc-0.9.33.2/extra/config/conf.c uClibc-git/extra/config/conf.c
  1756. --- uClibc-0.9.33.2/extra/config/conf.c 2012-05-15 09:20:09.000000000 +0200
  1757. +++ uClibc-git/extra/config/conf.c 2014-07-25 20:36:04.853324457 +0200
  1758. @@ -10,42 +10,48 @@
  1759. #include <string.h>
  1760. #include <time.h>
  1761. #include <unistd.h>
  1762. +#include <getopt.h>
  1763. #include <sys/stat.h>
  1764. #include <sys/time.h>
  1765. +#include <errno.h>
  1766. -#define LKC_DIRECT_LINK
  1767. #include "lkc.h"
  1768. static void conf(struct menu *menu);
  1769. static void check_conf(struct menu *menu);
  1770. +static void xfgets(char *str, int size, FILE *in);
  1771. -enum {
  1772. - ask_all,
  1773. - ask_new,
  1774. - ask_silent,
  1775. - set_default,
  1776. - set_yes,
  1777. - set_mod,
  1778. - set_no,
  1779. - set_random
  1780. -} input_mode = ask_all;
  1781. -char *defconfig_file;
  1782. +enum input_mode {
  1783. + oldaskconfig,
  1784. + silentoldconfig,
  1785. + oldconfig,
  1786. + allnoconfig,
  1787. + allyesconfig,
  1788. + allmodconfig,
  1789. + alldefconfig,
  1790. + randconfig,
  1791. + defconfig,
  1792. + savedefconfig,
  1793. + listnewconfig,
  1794. + olddefconfig,
  1795. +} input_mode = oldaskconfig;
  1796. static int indent = 1;
  1797. +static int tty_stdio;
  1798. static int valid_stdin = 1;
  1799. static int sync_kconfig;
  1800. static int conf_cnt;
  1801. static char line[128];
  1802. static struct menu *rootEntry;
  1803. -static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n");
  1804. -
  1805. -static const char *get_help(struct menu *menu)
  1806. +static void print_help(struct menu *menu)
  1807. {
  1808. - if (menu_has_help(menu))
  1809. - return _(menu_get_help(menu));
  1810. - else
  1811. - return nohelp_text;
  1812. + struct gstr help = str_new();
  1813. +
  1814. + menu_get_ext_help(menu, &help);
  1815. +
  1816. + printf("\n%s\n", str_get(&help));
  1817. + str_free(&help);
  1818. }
  1819. static void strip(char *str)
  1820. @@ -93,16 +99,19 @@
  1821. }
  1822. switch (input_mode) {
  1823. - case ask_new:
  1824. - case ask_silent:
  1825. + case oldconfig:
  1826. + case silentoldconfig:
  1827. if (sym_has_value(sym)) {
  1828. printf("%s\n", def);
  1829. return 0;
  1830. }
  1831. check_stdin();
  1832. - case ask_all:
  1833. + /* fall through */
  1834. + case oldaskconfig:
  1835. fflush(stdout);
  1836. - fgets(line, 128, stdin);
  1837. + xfgets(line, 128, stdin);
  1838. + if (!tty_stdio)
  1839. + printf("\n");
  1840. return 1;
  1841. default:
  1842. break;
  1843. @@ -121,7 +130,7 @@
  1844. return 1;
  1845. }
  1846. -int conf_string(struct menu *menu)
  1847. +static int conf_string(struct menu *menu)
  1848. {
  1849. struct symbol *sym = menu->sym;
  1850. const char *def;
  1851. @@ -140,10 +149,11 @@
  1852. case '?':
  1853. /* print help */
  1854. if (line[1] == '\n') {
  1855. - printf("\n%s\n", get_help(menu));
  1856. + print_help(menu);
  1857. def = NULL;
  1858. break;
  1859. }
  1860. + /* fall through */
  1861. default:
  1862. line[strlen(line)-1] = 0;
  1863. def = line;
  1864. @@ -156,14 +166,12 @@
  1865. static int conf_sym(struct menu *menu)
  1866. {
  1867. struct symbol *sym = menu->sym;
  1868. - int type;
  1869. tristate oldval, newval;
  1870. while (1) {
  1871. printf("%*s%s ", indent - 1, "", _(menu->prompt->text));
  1872. if (sym->name)
  1873. printf("(%s) ", sym->name);
  1874. - type = sym_get_type(sym);
  1875. putchar('[');
  1876. oldval = sym_get_tristate_value(sym);
  1877. switch (oldval) {
  1878. @@ -220,7 +228,7 @@
  1879. if (sym_set_tristate_value(sym, newval))
  1880. return 0;
  1881. help:
  1882. - printf("\n%s\n", get_help(menu));
  1883. + print_help(menu);
  1884. }
  1885. }
  1886. @@ -228,11 +236,9 @@
  1887. {
  1888. struct symbol *sym, *def_sym;
  1889. struct menu *child;
  1890. - int type;
  1891. bool is_new;
  1892. sym = menu->sym;
  1893. - type = sym_get_type(sym);
  1894. is_new = !sym_has_value(sym);
  1895. if (sym_is_changable(sym)) {
  1896. conf_sym(menu);
  1897. @@ -294,20 +300,21 @@
  1898. printf("?");
  1899. printf("]: ");
  1900. switch (input_mode) {
  1901. - case ask_new:
  1902. - case ask_silent:
  1903. + case oldconfig:
  1904. + case silentoldconfig:
  1905. if (!is_new) {
  1906. cnt = def;
  1907. printf("%d\n", cnt);
  1908. break;
  1909. }
  1910. check_stdin();
  1911. - case ask_all:
  1912. + /* fall through */
  1913. + case oldaskconfig:
  1914. fflush(stdout);
  1915. - fgets(line, 128, stdin);
  1916. + xfgets(line, 128, stdin);
  1917. strip(line);
  1918. if (line[0] == '?') {
  1919. - printf("\n%s\n", get_help(menu));
  1920. + print_help(menu);
  1921. continue;
  1922. }
  1923. if (!line[0])
  1924. @@ -330,8 +337,8 @@
  1925. }
  1926. if (!child)
  1927. continue;
  1928. - if (line[strlen(line) - 1] == '?') {
  1929. - printf("\n%s\n", get_help(child));
  1930. + if (line[0] && line[strlen(line) - 1] == '?') {
  1931. + print_help(child);
  1932. continue;
  1933. }
  1934. sym_set_choice_value(sym, child->sym);
  1935. @@ -360,10 +367,14 @@
  1936. switch (prop->type) {
  1937. case P_MENU:
  1938. - if (input_mode == ask_silent && rootEntry != menu) {
  1939. + if ((input_mode == silentoldconfig ||
  1940. + input_mode == listnewconfig ||
  1941. + input_mode == olddefconfig) &&
  1942. + rootEntry != menu) {
  1943. check_conf(menu);
  1944. return;
  1945. }
  1946. + /* fall through */
  1947. case P_COMMENT:
  1948. prompt = menu_get_prompt(menu);
  1949. if (prompt)
  1950. @@ -418,10 +429,16 @@
  1951. if (sym && !sym_has_value(sym)) {
  1952. if (sym_is_changable(sym) ||
  1953. (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) {
  1954. - if (!conf_cnt++)
  1955. - printf(_("*\n* Restart config...\n*\n"));
  1956. - rootEntry = menu_get_parent_menu(menu);
  1957. - conf(rootEntry);
  1958. + if (input_mode == listnewconfig) {
  1959. + if (sym->name && !sym_is_choice_value(sym)) {
  1960. + printf("%s%s\n", CONFIG_, sym->name);
  1961. + }
  1962. + } else if (input_mode != olddefconfig) {
  1963. + if (!conf_cnt++)
  1964. + printf(_("*\n* Restart config...\n*\n"));
  1965. + rootEntry = menu_get_parent_menu(menu);
  1966. + conf(rootEntry);
  1967. + }
  1968. }
  1969. }
  1970. @@ -429,90 +446,170 @@
  1971. check_conf(child);
  1972. }
  1973. +#if 00 // || !defined __UCLIBC__ || \
  1974. + (defined UCLIBC_HAS_GETOPT_LONG || defined UCLIBC_HAS_GNU_GETOPT)
  1975. +static struct option long_opts[] = {
  1976. + {"oldaskconfig", no_argument, NULL, oldaskconfig},
  1977. + {"oldconfig", no_argument, NULL, oldconfig},
  1978. + {"silentoldconfig", no_argument, NULL, silentoldconfig},
  1979. + {"defconfig", optional_argument, NULL, defconfig},
  1980. + {"savedefconfig", required_argument, NULL, savedefconfig},
  1981. + {"allnoconfig", no_argument, NULL, allnoconfig},
  1982. + {"allyesconfig", no_argument, NULL, allyesconfig},
  1983. + {"allmodconfig", no_argument, NULL, allmodconfig},
  1984. + {"alldefconfig", no_argument, NULL, alldefconfig},
  1985. + {"randconfig", no_argument, NULL, randconfig},
  1986. + {"listnewconfig", no_argument, NULL, listnewconfig},
  1987. + {"olddefconfig", no_argument, NULL, olddefconfig},
  1988. + /*
  1989. + * oldnoconfig is an alias of olddefconfig, because people already
  1990. + * are dependent on its behavior(sets new symbols to their default
  1991. + * value but not 'n') with the counter-intuitive name.
  1992. + */
  1993. + {"oldnoconfig", no_argument, NULL, olddefconfig},
  1994. + {NULL, 0, NULL, 0}
  1995. +};
  1996. +
  1997. +static void conf_usage(const char *progname)
  1998. +{
  1999. +
  2000. + printf("Usage: %s [option] <kconfig-file>\n", progname);
  2001. + printf("[option] is _one_ of the following:\n");
  2002. + printf(" --listnewconfig List new options\n");
  2003. + printf(" --oldaskconfig Start a new configuration using a line-oriented program\n");
  2004. + printf(" --oldconfig Update a configuration using a provided .config as base\n");
  2005. + printf(" --silentoldconfig Same as oldconfig, but quietly, additionally update deps\n");
  2006. + printf(" --olddefconfig Same as silentoldconfig but sets new symbols to their default value\n");
  2007. + printf(" --oldnoconfig An alias of olddefconfig\n");
  2008. + printf(" --defconfig <file> New config with default defined in <file>\n");
  2009. + printf(" --savedefconfig <file> Save the minimal current configuration to <file>\n");
  2010. + printf(" --allnoconfig New config where all options are answered with no\n");
  2011. + printf(" --allyesconfig New config where all options are answered with yes\n");
  2012. + printf(" --allmodconfig New config where all options are answered with mod\n");
  2013. + printf(" --alldefconfig New config with all symbols set to default\n");
  2014. + printf(" --randconfig New config with random answer to all options\n");
  2015. +}
  2016. +#else
  2017. +static void conf_usage(const char *progname)
  2018. +{
  2019. +
  2020. + printf("Usage: %s [option] <kconfig-file>\n", progname);
  2021. + printf("[option] is _one_ of the following:\n");
  2022. + printf(" -a, --oldaskconfig Start a new configuration using a line-oriented program\n");
  2023. + printf(" -s, --silentoldconfig Same as oldconfig, but quietly, additionally update deps\n");
  2024. + printf(" -o, --oldconfig Update a configuration using a provided .config as base\n");
  2025. + printf(" -n, --allnoconfig New config where all options are answered with no\n");
  2026. + printf(" -y, --allyesconfig New config where all options are answered with yes\n");
  2027. + printf(" -m, --allmodconfig New config where all options are answered with mod\n");
  2028. + printf(" -A, --alldefconfig New config with all symbols set to default\n");
  2029. + printf(" -r, --randconfig New config with random answer to all options\n");
  2030. + printf(" -D, --defconfig <file> New config with default defined in <file>\n");
  2031. + printf(" -S, --savedefconfig <file> Save the minimal current configuration to <file>\n");
  2032. + printf(" -l, --listnewconfig List new options\n");
  2033. + printf(" -d, --olddefconfig Same as silentoldconfig but sets new symbols to their default value\n");
  2034. + printf(" --oldnoconfig An alias of olddefconfig\n");
  2035. +
  2036. +}
  2037. +#endif
  2038. +
  2039. int main(int ac, char **av)
  2040. {
  2041. + const char *progname = av[0];
  2042. int opt;
  2043. - const char *name;
  2044. - const char *configname = conf_get_configname();
  2045. + const char *name, *defconfig_file = NULL /* gcc uninit */;
  2046. struct stat tmpstat;
  2047. setlocale(LC_ALL, "");
  2048. bindtextdomain(PACKAGE, LOCALEDIR);
  2049. textdomain(PACKAGE);
  2050. - while ((opt = getopt(ac, av, "osdD:nmyrh")) != -1) {
  2051. + tty_stdio = isatty(0) && isatty(1) && isatty(2);
  2052. +
  2053. +#if 00// !defined __UCLIBC__ || \
  2054. + (defined UCLIBC_HAS_GETOPT_LONG || defined UCLIBC_HAS_GNU_GETOPT)
  2055. + while ((opt = getopt_long(ac, av, "", long_opts, NULL)) != -1)
  2056. +#else
  2057. + char *gch = "asonymArDSld";
  2058. + while ((opt = getopt(ac, av, "asonymArD:S:ldh")) != -1)
  2059. +#endif
  2060. + {
  2061. + char *x = memchr(gch, opt, strlen(gch));
  2062. + if (x == NULL)
  2063. + opt = '?';
  2064. + else
  2065. + opt = x - gch;
  2066. + input_mode = (enum input_mode)opt;
  2067. switch (opt) {
  2068. - case 'o':
  2069. - input_mode = ask_silent;
  2070. - break;
  2071. - case 's':
  2072. - input_mode = ask_silent;
  2073. + case silentoldconfig:
  2074. sync_kconfig = 1;
  2075. break;
  2076. - case 'd':
  2077. - input_mode = set_default;
  2078. - break;
  2079. - case 'D':
  2080. - input_mode = set_default;
  2081. + case defconfig:
  2082. + case savedefconfig:
  2083. defconfig_file = optarg;
  2084. break;
  2085. - case 'n':
  2086. - input_mode = set_no;
  2087. - break;
  2088. - case 'm':
  2089. - input_mode = set_mod;
  2090. - break;
  2091. - case 'y':
  2092. - input_mode = set_yes;
  2093. - break;
  2094. - case 'r':
  2095. + case randconfig:
  2096. {
  2097. struct timeval now;
  2098. unsigned int seed;
  2099. + char *seed_env;
  2100. /*
  2101. * Use microseconds derived seed,
  2102. * compensate for systems where it may be zero
  2103. */
  2104. gettimeofday(&now, NULL);
  2105. -
  2106. seed = (unsigned int)((now.tv_sec + 1) * (now.tv_usec + 1));
  2107. - srand(seed);
  2108. - input_mode = set_random;
  2109. + seed_env = getenv("KCONFIG_SEED");
  2110. + if( seed_env && *seed_env ) {
  2111. + char *endp;
  2112. + int tmp = (int)strtol(seed_env, &endp, 0);
  2113. + if (*endp == '\0') {
  2114. + seed = tmp;
  2115. + }
  2116. + }
  2117. + fprintf( stderr, "KCONFIG_SEED=0x%X\n", seed );
  2118. + srand(seed);
  2119. break;
  2120. }
  2121. - case 'h':
  2122. - printf(_("See README for usage info\n"));
  2123. - exit(0);
  2124. + case oldaskconfig:
  2125. + case oldconfig:
  2126. + case allnoconfig:
  2127. + case allyesconfig:
  2128. + case allmodconfig:
  2129. + case alldefconfig:
  2130. + case listnewconfig:
  2131. + case olddefconfig:
  2132. break;
  2133. - default:
  2134. - fprintf(stderr, _("See README for usage info\n"));
  2135. + case '?':
  2136. + conf_usage(progname);
  2137. exit(1);
  2138. + break;
  2139. }
  2140. }
  2141. if (ac == optind) {
  2142. printf(_("%s: Kconfig file missing\n"), av[0]);
  2143. + conf_usage(progname);
  2144. exit(1);
  2145. }
  2146. name = av[optind];
  2147. conf_parse(name);
  2148. //zconfdump(stdout);
  2149. if (sync_kconfig) {
  2150. - if (stat(configname, &tmpstat)) {
  2151. + name = conf_get_configname();
  2152. + if (stat(name, &tmpstat)) {
  2153. fprintf(stderr, _("***\n"
  2154. - "*** You have not yet configured!\n"
  2155. - "*** (missing .config file)\n"
  2156. + "*** Configuration file \"%s\" not found!\n"
  2157. "***\n"
  2158. "*** Please run some configurator (e.g. \"make oldconfig\" or\n"
  2159. "*** \"make menuconfig\" or \"make xconfig\").\n"
  2160. - "***\n"));
  2161. + "***\n"), name);
  2162. exit(1);
  2163. }
  2164. }
  2165. switch (input_mode) {
  2166. - case set_default:
  2167. + case defconfig:
  2168. if (!defconfig_file)
  2169. defconfig_file = conf_get_default_confname();
  2170. if (conf_read(defconfig_file)) {
  2171. @@ -522,31 +619,46 @@
  2172. exit(1);
  2173. }
  2174. break;
  2175. - case ask_silent:
  2176. - case ask_all:
  2177. - case ask_new:
  2178. + case savedefconfig:
  2179. + case silentoldconfig:
  2180. + case oldaskconfig:
  2181. + case oldconfig:
  2182. + case listnewconfig:
  2183. + case olddefconfig:
  2184. conf_read(NULL);
  2185. break;
  2186. - case set_no:
  2187. - case set_mod:
  2188. - case set_yes:
  2189. - case set_random:
  2190. + case allnoconfig:
  2191. + case allyesconfig:
  2192. + case allmodconfig:
  2193. + case alldefconfig:
  2194. + case randconfig:
  2195. name = getenv("KCONFIG_ALLCONFIG");
  2196. - if (name && !stat(name, &tmpstat)) {
  2197. - conf_read_simple(name, S_DEF_USER);
  2198. + if (!name)
  2199. + break;
  2200. + if ((strcmp(name, "") != 0) && (strcmp(name, "1") != 0)) {
  2201. + if (conf_read_simple(name, S_DEF_USER)) {
  2202. + fprintf(stderr,
  2203. + _("*** Can't read seed configuration \"%s\"!\n"),
  2204. + name);
  2205. + exit(1);
  2206. + }
  2207. break;
  2208. }
  2209. switch (input_mode) {
  2210. - case set_no: name = "allno.config"; break;
  2211. - case set_mod: name = "allmod.config"; break;
  2212. - case set_yes: name = "allyes.config"; break;
  2213. - case set_random: name = "allrandom.config"; break;
  2214. + case allnoconfig: name = "allno.config"; break;
  2215. + case allyesconfig: name = "allyes.config"; break;
  2216. + case allmodconfig: name = "allmod.config"; break;
  2217. + case alldefconfig: name = "alldef.config"; break;
  2218. + case randconfig: name = "allrandom.config"; break;
  2219. default: break;
  2220. }
  2221. - if (!stat(name, &tmpstat))
  2222. - conf_read_simple(name, S_DEF_USER);
  2223. - else if (!stat("all.config", &tmpstat))
  2224. - conf_read_simple("all.config", S_DEF_USER);
  2225. + if (conf_read_simple(name, S_DEF_USER) &&
  2226. + conf_read_simple("all.config", S_DEF_USER)) {
  2227. + fprintf(stderr,
  2228. + _("*** KCONFIG_ALLCONFIG set, but no \"%s\" or \"all.config\" file found\n"),
  2229. + name);
  2230. + exit(1);
  2231. + }
  2232. break;
  2233. default:
  2234. break;
  2235. @@ -557,41 +669,51 @@
  2236. name = getenv("KCONFIG_NOSILENTUPDATE");
  2237. if (name && *name) {
  2238. fprintf(stderr,
  2239. - _("\n*** configuration requires explicit update.\n\n"));
  2240. + _("\n*** The configuration requires explicit update.\n\n"));
  2241. return 1;
  2242. }
  2243. }
  2244. - valid_stdin = isatty(0) && isatty(1) && isatty(2);
  2245. + valid_stdin = tty_stdio;
  2246. }
  2247. switch (input_mode) {
  2248. - case set_no:
  2249. + case allnoconfig:
  2250. conf_set_all_new_symbols(def_no);
  2251. break;
  2252. - case set_yes:
  2253. + case allyesconfig:
  2254. conf_set_all_new_symbols(def_yes);
  2255. break;
  2256. - case set_mod:
  2257. + case allmodconfig:
  2258. conf_set_all_new_symbols(def_mod);
  2259. break;
  2260. - case set_random:
  2261. - conf_set_all_new_symbols(def_random);
  2262. + case alldefconfig:
  2263. + conf_set_all_new_symbols(def_default);
  2264. + break;
  2265. + case randconfig:
  2266. + /* Really nothing to do in this loop */
  2267. + while (conf_set_all_new_symbols(def_random)) ;
  2268. break;
  2269. - case set_default:
  2270. + case defconfig:
  2271. conf_set_all_new_symbols(def_default);
  2272. break;
  2273. - case ask_new:
  2274. - case ask_all:
  2275. + case savedefconfig:
  2276. + break;
  2277. + case oldaskconfig:
  2278. rootEntry = &rootmenu;
  2279. conf(&rootmenu);
  2280. - input_mode = ask_silent;
  2281. + input_mode = silentoldconfig;
  2282. /* fall through */
  2283. - case ask_silent:
  2284. + case oldconfig:
  2285. + case listnewconfig:
  2286. + case olddefconfig:
  2287. + case silentoldconfig:
  2288. /* Update until a loop caused no more changes */
  2289. do {
  2290. conf_cnt = 0;
  2291. check_conf(&rootmenu);
  2292. - } while (conf_cnt);
  2293. + } while (conf_cnt &&
  2294. + (input_mode != listnewconfig &&
  2295. + input_mode != olddefconfig));
  2296. break;
  2297. }
  2298. @@ -607,7 +729,13 @@
  2299. fprintf(stderr, _("\n*** Error during update of the configuration.\n\n"));
  2300. return 1;
  2301. }
  2302. - } else {
  2303. + } else if (input_mode == savedefconfig) {
  2304. + if (conf_write_defconfig(defconfig_file)) {
  2305. + fprintf(stderr, _("n*** Error while saving defconfig to: %s\n\n"),
  2306. + defconfig_file);
  2307. + return 1;
  2308. + }
  2309. + } else if (input_mode != listnewconfig) {
  2310. if (conf_write(NULL)) {
  2311. fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
  2312. exit(1);
  2313. @@ -615,3 +743,12 @@
  2314. }
  2315. return 0;
  2316. }
  2317. +
  2318. +/*
  2319. + * Helper function to facilitate fgets() by Jean Sacren.
  2320. + */
  2321. +void xfgets(char *str, int size, FILE *in)
  2322. +{
  2323. + if (fgets(str, size, in) == NULL)
  2324. + fprintf(stderr, "\nError in reading or end of file.\n");
  2325. +}
  2326. diff -Nur uClibc-0.9.33.2/extra/config/confdata.c uClibc-git/extra/config/confdata.c
  2327. --- uClibc-0.9.33.2/extra/config/confdata.c 2012-05-15 09:20:09.000000000 +0200
  2328. +++ uClibc-git/extra/config/confdata.c 2014-07-25 20:36:04.853324457 +0200
  2329. @@ -5,24 +5,27 @@
  2330. #include <sys/stat.h>
  2331. #include <ctype.h>
  2332. +#include <errno.h>
  2333. #include <fcntl.h>
  2334. +#include <stdarg.h>
  2335. #include <stdio.h>
  2336. #include <stdlib.h>
  2337. #include <string.h>
  2338. #include <time.h>
  2339. #include <unistd.h>
  2340. -#include <libgen.h>
  2341. -#define LKC_DIRECT_LINK
  2342. #include "lkc.h"
  2343. static void conf_warning(const char *fmt, ...)
  2344. __attribute__ ((format (printf, 1, 2)));
  2345. +static void conf_message(const char *fmt, ...)
  2346. + __attribute__ ((format (printf, 1, 2)));
  2347. +
  2348. static const char *conf_filename;
  2349. static int conf_lineno, conf_warnings, conf_unsaved;
  2350. -const char conf_defname[] = "extra/Configs/defconfigs/$ARCH";
  2351. +const char conf_defname[] = "arch/$ARCH/defconfig";
  2352. static void conf_warning(const char *fmt, ...)
  2353. {
  2354. @@ -35,6 +38,29 @@
  2355. conf_warnings++;
  2356. }
  2357. +static void conf_default_message_callback(const char *fmt, va_list ap)
  2358. +{
  2359. + printf("#\n# ");
  2360. + vprintf(fmt, ap);
  2361. + printf("\n#\n");
  2362. +}
  2363. +
  2364. +static void (*conf_message_callback) (const char *fmt, va_list ap) =
  2365. + conf_default_message_callback;
  2366. +void conf_set_message_callback(void (*fn) (const char *fmt, va_list ap))
  2367. +{
  2368. + conf_message_callback = fn;
  2369. +}
  2370. +
  2371. +static void conf_message(const char *fmt, ...)
  2372. +{
  2373. + va_list ap;
  2374. +
  2375. + va_start(ap, fmt);
  2376. + if (conf_message_callback)
  2377. + conf_message_callback(fmt, ap);
  2378. +}
  2379. +
  2380. const char *conf_get_configname(void)
  2381. {
  2382. char *name = getenv("KCONFIG_CONFIG");
  2383. @@ -42,6 +68,13 @@
  2384. return name ? name : ".config";
  2385. }
  2386. +const char *conf_get_autoconfig_name(void)
  2387. +{
  2388. + char *name = getenv("KCONFIG_AUTOCONFIG");
  2389. +
  2390. + return name ? name : "include/config/auto.conf";
  2391. +}
  2392. +
  2393. static char *conf_expand_value(const char *in)
  2394. {
  2395. struct symbol *sym;
  2396. @@ -95,6 +128,7 @@
  2397. sym->flags |= def_flags;
  2398. break;
  2399. }
  2400. + /* fall through */
  2401. case S_BOOLEAN:
  2402. if (p[0] == 'y') {
  2403. sym->def[def].tri = yes;
  2404. @@ -107,7 +141,7 @@
  2405. break;
  2406. }
  2407. conf_warning("symbol value '%s' invalid for %s", p, sym->name);
  2408. - break;
  2409. + return 1;
  2410. case S_OTHER:
  2411. if (*p != '"') {
  2412. for (p2 = p; *p2 && !isspace(*p2); p2++)
  2413. @@ -115,6 +149,7 @@
  2414. sym->type = S_STRING;
  2415. goto done;
  2416. }
  2417. + /* fall through */
  2418. case S_STRING:
  2419. if (*p++ != '"')
  2420. break;
  2421. @@ -129,6 +164,7 @@
  2422. conf_warning("invalid string found");
  2423. return 1;
  2424. }
  2425. + /* fall through */
  2426. case S_INT:
  2427. case S_HEX:
  2428. done:
  2429. @@ -146,10 +182,66 @@
  2430. return 0;
  2431. }
  2432. +#define LINE_GROWTH 16
  2433. +static int add_byte(int c, char **lineptr, size_t slen, size_t *n)
  2434. +{
  2435. + char *nline;
  2436. + size_t new_size = slen + 1;
  2437. + if (new_size > *n) {
  2438. + new_size += LINE_GROWTH - 1;
  2439. + new_size *= 2;
  2440. + nline = realloc(*lineptr, new_size);
  2441. + if (!nline)
  2442. + return -1;
  2443. +
  2444. + *lineptr = nline;
  2445. + *n = new_size;
  2446. + }
  2447. +
  2448. + (*lineptr)[slen] = c;
  2449. +
  2450. + return 0;
  2451. +}
  2452. +
  2453. +static ssize_t compat_getline(char **lineptr, size_t *n, FILE *stream)
  2454. +{
  2455. + char *line = *lineptr;
  2456. + size_t slen = 0;
  2457. +
  2458. + for (;;) {
  2459. + int c = getc(stream);
  2460. +
  2461. + switch (c) {
  2462. + case '\n':
  2463. + if (add_byte(c, &line, slen, n) < 0)
  2464. + goto e_out;
  2465. + slen++;
  2466. + /* fall through */
  2467. + case EOF:
  2468. + if (add_byte('\0', &line, slen, n) < 0)
  2469. + goto e_out;
  2470. + *lineptr = line;
  2471. + if (slen == 0)
  2472. + return -1;
  2473. + return slen;
  2474. + default:
  2475. + if (add_byte(c, &line, slen, n) < 0)
  2476. + goto e_out;
  2477. + slen++;
  2478. + }
  2479. + }
  2480. +
  2481. +e_out:
  2482. + line[slen-1] = '\0';
  2483. + *lineptr = line;
  2484. + return -1;
  2485. +}
  2486. +
  2487. int conf_read_simple(const char *name, int def)
  2488. {
  2489. FILE *in = NULL;
  2490. - char line[1024];
  2491. + char *line = NULL;
  2492. + size_t line_asize = 0;
  2493. char *p, *p2;
  2494. struct symbol *sym;
  2495. int i, def_flags;
  2496. @@ -164,8 +256,11 @@
  2497. if (in)
  2498. goto load;
  2499. sym_add_change_count(1);
  2500. - if (!sym_defconfig_list)
  2501. + if (!sym_defconfig_list) {
  2502. + if (modules_sym)
  2503. + sym_calc_value(modules_sym);
  2504. return 1;
  2505. + }
  2506. for_all_defaults(sym_defconfig_list, prop) {
  2507. if (expr_calc_value(prop->visible.expr) == no ||
  2508. @@ -174,9 +269,8 @@
  2509. name = conf_expand_value(prop->expr->left.sym->name);
  2510. in = zconf_fopen(name);
  2511. if (in) {
  2512. - printf(_("#\n"
  2513. - "# using defaults found in %s\n"
  2514. - "#\n"), name);
  2515. + conf_message(_("using defaults found in %s"),
  2516. + name);
  2517. goto load;
  2518. }
  2519. }
  2520. @@ -202,33 +296,33 @@
  2521. case S_STRING:
  2522. if (sym->def[def].val)
  2523. free(sym->def[def].val);
  2524. + /* fall through */
  2525. default:
  2526. sym->def[def].val = NULL;
  2527. sym->def[def].tri = no;
  2528. }
  2529. }
  2530. - while (fgets(line, sizeof(line), in)) {
  2531. + while (compat_getline(&line, &line_asize, in) != -1) {
  2532. conf_lineno++;
  2533. sym = NULL;
  2534. - switch (line[0]) {
  2535. - case '#':
  2536. - if (line[1] != ' ')
  2537. + if (line[0] == '#') {
  2538. + if (memcmp(line + 2, CONFIG_, strlen(CONFIG_)))
  2539. continue;
  2540. - p = strchr(line + 2, ' ');
  2541. + p = strchr(line + 2 + strlen(CONFIG_), ' ');
  2542. if (!p)
  2543. continue;
  2544. *p++ = 0;
  2545. if (strncmp(p, "is not set", 10))
  2546. continue;
  2547. if (def == S_DEF_USER) {
  2548. - sym = sym_find(line + 2);
  2549. + sym = sym_find(line + 2 + strlen(CONFIG_));
  2550. if (!sym) {
  2551. sym_add_change_count(1);
  2552. - break;
  2553. + goto setsym;
  2554. }
  2555. } else {
  2556. - sym = sym_lookup(line + 2, 0);
  2557. + sym = sym_lookup(line + 2 + strlen(CONFIG_), 0);
  2558. if (sym->type == S_UNKNOWN)
  2559. sym->type = S_BOOLEAN;
  2560. }
  2561. @@ -244,13 +338,10 @@
  2562. default:
  2563. ;
  2564. }
  2565. - break;
  2566. - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z':
  2567. - p = strchr(line, '=');
  2568. - if (!p) {
  2569. - conf_warning("unexpected data '%s'", line);
  2570. + } else if (memcmp(line, CONFIG_, strlen(CONFIG_)) == 0) {
  2571. + p = strchr(line + strlen(CONFIG_), '=');
  2572. + if (!p)
  2573. continue;
  2574. - }
  2575. *p++ = 0;
  2576. p2 = strchr(p, '\n');
  2577. if (p2) {
  2578. @@ -259,13 +350,13 @@
  2579. *p2 = 0;
  2580. }
  2581. if (def == S_DEF_USER) {
  2582. - sym = sym_find(line);
  2583. + sym = sym_find(line + strlen(CONFIG_));
  2584. if (!sym) {
  2585. sym_add_change_count(1);
  2586. - break;
  2587. + goto setsym;
  2588. }
  2589. } else {
  2590. - sym = sym_lookup(line, 0);
  2591. + sym = sym_lookup(line + strlen(CONFIG_), 0);
  2592. if (sym->type == S_UNKNOWN)
  2593. sym->type = S_OTHER;
  2594. }
  2595. @@ -274,14 +365,12 @@
  2596. }
  2597. if (conf_set_sym_val(sym, def, def_flags, p))
  2598. continue;
  2599. - break;
  2600. - case '\r':
  2601. - case '\n':
  2602. - break;
  2603. - default:
  2604. - conf_warning("unexpected data");
  2605. + } else {
  2606. + if (line[0] != '\r' && line[0] != '\n')
  2607. + conf_warning("unexpected data");
  2608. continue;
  2609. }
  2610. +setsym:
  2611. if (sym && sym_is_choice_value(sym)) {
  2612. struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
  2613. switch (sym->def[def].tri) {
  2614. @@ -302,6 +391,7 @@
  2615. cs->def[def].tri = EXPR_OR(cs->def[def].tri, sym->def[def].tri);
  2616. }
  2617. }
  2618. + free(line);
  2619. fclose(in);
  2620. if (modules_sym)
  2621. @@ -311,10 +401,8 @@
  2622. int conf_read(const char *name)
  2623. {
  2624. - struct symbol *sym, *choice_sym;
  2625. - struct property *prop;
  2626. - struct expr *e;
  2627. - int i, flags;
  2628. + struct symbol *sym;
  2629. + int i;
  2630. sym_set_change_count(0);
  2631. @@ -324,7 +412,7 @@
  2632. for_all_symbols(i, sym) {
  2633. sym_calc_value(sym);
  2634. if (sym_is_choice(sym) || (sym->flags & SYMBOL_AUTO))
  2635. - goto sym_ok;
  2636. + continue;
  2637. if (sym_has_value(sym) && (sym->flags & SYMBOL_WRITE)) {
  2638. /* check that calculated value agrees with saved value */
  2639. switch (sym->type) {
  2640. @@ -333,29 +421,18 @@
  2641. if (sym->def[S_DEF_USER].tri != sym_get_tristate_value(sym))
  2642. break;
  2643. if (!sym_is_choice(sym))
  2644. - goto sym_ok;
  2645. + continue;
  2646. + /* fall through */
  2647. default:
  2648. if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val))
  2649. - goto sym_ok;
  2650. + continue;
  2651. break;
  2652. }
  2653. } else if (!sym_has_value(sym) && !(sym->flags & SYMBOL_WRITE))
  2654. /* no previous value and not saved */
  2655. - goto sym_ok;
  2656. + continue;
  2657. conf_unsaved++;
  2658. /* maybe print value in verbose mode... */
  2659. - sym_ok:
  2660. - if (!sym_is_choice(sym))
  2661. - continue;
  2662. - /* The choice symbol only has a set value (and thus is not new)
  2663. - * if all its visible childs have values.
  2664. - */
  2665. - prop = sym_get_choice_prop(sym);
  2666. - flags = sym->flags;
  2667. - expr_list_for_each_sym(prop->expr, e, choice_sym)
  2668. - if (choice_sym->visible != no)
  2669. - flags &= choice_sym->flags;
  2670. - sym->flags &= flags | ~SYMBOL_DEF_USER;
  2671. }
  2672. for_all_symbols(i, sym) {
  2673. @@ -388,43 +465,300 @@
  2674. return 0;
  2675. }
  2676. +/*
  2677. + * Kconfig configuration printer
  2678. + *
  2679. + * This printer is used when generating the resulting configuration after
  2680. + * kconfig invocation and `defconfig' files. Unset symbol might be omitted by
  2681. + * passing a non-NULL argument to the printer.
  2682. + *
  2683. + */
  2684. +static void
  2685. +kconfig_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg)
  2686. +{
  2687. +
  2688. + switch (sym->type) {
  2689. + case S_BOOLEAN:
  2690. + case S_TRISTATE:
  2691. + if (*value == 'n') {
  2692. + bool skip_unset = (arg != NULL);
  2693. +
  2694. + if (!skip_unset)
  2695. + fprintf(fp, "# %s%s is not set\n",
  2696. + CONFIG_, sym->name);
  2697. + return;
  2698. + }
  2699. + break;
  2700. + default:
  2701. + break;
  2702. + }
  2703. +
  2704. + fprintf(fp, "%s%s=%s\n", CONFIG_, sym->name, value);
  2705. +}
  2706. +
  2707. +static void
  2708. +kconfig_print_comment(FILE *fp, const char *value, void *arg)
  2709. +{
  2710. + const char *p = value;
  2711. + size_t l;
  2712. +
  2713. + for (;;) {
  2714. + l = strcspn(p, "\n");
  2715. + fprintf(fp, "#");
  2716. + if (l) {
  2717. + fprintf(fp, " ");
  2718. + xfwrite(p, l, 1, fp);
  2719. + p += l;
  2720. + }
  2721. + fprintf(fp, "\n");
  2722. + if (*p++ == '\0')
  2723. + break;
  2724. + }
  2725. +}
  2726. +
  2727. +static struct conf_printer kconfig_printer_cb =
  2728. +{
  2729. + .print_symbol = kconfig_print_symbol,
  2730. + .print_comment = kconfig_print_comment,
  2731. +};
  2732. +
  2733. +/*
  2734. + * Header printer
  2735. + *
  2736. + * This printer is used when generating the `include/generated/autoconf.h' file.
  2737. + */
  2738. +static void
  2739. +header_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg)
  2740. +{
  2741. +
  2742. + switch (sym->type) {
  2743. + case S_BOOLEAN:
  2744. + case S_TRISTATE: {
  2745. + const char *suffix = "";
  2746. +
  2747. + switch (*value) {
  2748. + case 'n':
  2749. + break;
  2750. + case 'm':
  2751. + suffix = "_MODULE";
  2752. + /* fall through */
  2753. + default:
  2754. + fprintf(fp, "#define %s%s%s 1\n",
  2755. + CONFIG_, sym->name, suffix);
  2756. + }
  2757. + break;
  2758. + }
  2759. + case S_HEX: {
  2760. + const char *prefix = "";
  2761. +
  2762. + if (value[0] != '0' || (value[1] != 'x' && value[1] != 'X'))
  2763. + prefix = "0x";
  2764. + fprintf(fp, "#define %s%s %s%s\n",
  2765. + CONFIG_, sym->name, prefix, value);
  2766. + break;
  2767. + }
  2768. + case S_STRING:
  2769. + case S_INT:
  2770. + fprintf(fp, "#define %s%s %s\n",
  2771. + CONFIG_, sym->name, value);
  2772. + break;
  2773. + default:
  2774. + break;
  2775. + }
  2776. +
  2777. +}
  2778. +
  2779. +static void
  2780. +header_print_comment(FILE *fp, const char *value, void *arg)
  2781. +{
  2782. + const char *p = value;
  2783. + size_t l;
  2784. +
  2785. + fprintf(fp, "/*\n");
  2786. + for (;;) {
  2787. + l = strcspn(p, "\n");
  2788. + fprintf(fp, " *");
  2789. + if (l) {
  2790. + fprintf(fp, " ");
  2791. + xfwrite(p, l, 1, fp);
  2792. + p += l;
  2793. + }
  2794. + fprintf(fp, "\n");
  2795. + if (*p++ == '\0')
  2796. + break;
  2797. + }
  2798. + fprintf(fp, " */\n");
  2799. +}
  2800. +
  2801. +static struct conf_printer header_printer_cb =
  2802. +{
  2803. + .print_symbol = header_print_symbol,
  2804. + .print_comment = header_print_comment,
  2805. +};
  2806. +
  2807. +/*
  2808. + * Tristate printer
  2809. + *
  2810. + * This printer is used when generating the `include/config/tristate.conf' file.
  2811. + */
  2812. +static void
  2813. +tristate_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg)
  2814. +{
  2815. +
  2816. + if (sym->type == S_TRISTATE && *value != 'n')
  2817. + fprintf(fp, "%s%s=%c\n", CONFIG_, sym->name, (char)toupper(*value));
  2818. +}
  2819. +
  2820. +static struct conf_printer tristate_printer_cb =
  2821. +{
  2822. + .print_symbol = tristate_print_symbol,
  2823. + .print_comment = kconfig_print_comment,
  2824. +};
  2825. +
  2826. +static void conf_write_symbol(FILE *fp, struct symbol *sym,
  2827. + struct conf_printer *printer, void *printer_arg)
  2828. +{
  2829. + const char *str;
  2830. +
  2831. + switch (sym->type) {
  2832. + case S_OTHER:
  2833. + case S_UNKNOWN:
  2834. + break;
  2835. + case S_STRING:
  2836. + str = sym_get_string_value(sym);
  2837. + str = sym_escape_string_value(str);
  2838. + printer->print_symbol(fp, sym, str, printer_arg);
  2839. + free((void *)str);
  2840. + break;
  2841. + default:
  2842. + str = sym_get_string_value(sym);
  2843. + printer->print_symbol(fp, sym, str, printer_arg);
  2844. + }
  2845. +}
  2846. +
  2847. +static void
  2848. +conf_write_heading(FILE *fp, struct conf_printer *printer, void *printer_arg)
  2849. +{
  2850. + char buf[256];
  2851. +
  2852. + snprintf(buf, sizeof(buf),
  2853. + "\n"
  2854. + "Automatically generated file; DO NOT EDIT.\n"
  2855. + "%s\n",
  2856. + rootmenu.prompt->text);
  2857. +
  2858. + printer->print_comment(fp, buf, printer_arg);
  2859. +}
  2860. +
  2861. +/*
  2862. + * Write out a minimal config.
  2863. + * All values that has default values are skipped as this is redundant.
  2864. + */
  2865. +int conf_write_defconfig(const char *filename)
  2866. +{
  2867. + struct symbol *sym;
  2868. + struct menu *menu;
  2869. + FILE *out;
  2870. +
  2871. + out = fopen(filename, "w");
  2872. + if (!out)
  2873. + return 1;
  2874. +
  2875. + sym_clear_all_valid();
  2876. +
  2877. + /* Traverse all menus to find all relevant symbols */
  2878. + menu = rootmenu.list;
  2879. +
  2880. + while (menu != NULL)
  2881. + {
  2882. + sym = menu->sym;
  2883. + if (sym == NULL) {
  2884. + if (!menu_is_visible(menu))
  2885. + goto next_menu;
  2886. + } else if (!sym_is_choice(sym)) {
  2887. + sym_calc_value(sym);
  2888. + if (!(sym->flags & SYMBOL_WRITE))
  2889. + goto next_menu;
  2890. + sym->flags &= ~SYMBOL_WRITE;
  2891. + /* If we cannot change the symbol - skip */
  2892. + if (!sym_is_changable(sym))
  2893. + goto next_menu;
  2894. + /* If symbol equals to default value - skip */
  2895. + if (strcmp(sym_get_string_value(sym), sym_get_string_default(sym)) == 0)
  2896. + goto next_menu;
  2897. +
  2898. + /*
  2899. + * If symbol is a choice value and equals to the
  2900. + * default for a choice - skip.
  2901. + * But only if value is bool and equal to "y" and
  2902. + * choice is not "optional".
  2903. + * (If choice is "optional" then all values can be "n")
  2904. + */
  2905. + if (sym_is_choice_value(sym)) {
  2906. + struct symbol *cs;
  2907. + struct symbol *ds;
  2908. +
  2909. + cs = prop_get_symbol(sym_get_choice_prop(sym));
  2910. + ds = sym_choice_default(cs);
  2911. + if (!sym_is_optional(cs) && sym == ds) {
  2912. + if ((sym->type == S_BOOLEAN) &&
  2913. + sym_get_tristate_value(sym) == yes)
  2914. + goto next_menu;
  2915. + }
  2916. + }
  2917. + conf_write_symbol(out, sym, &kconfig_printer_cb, NULL);
  2918. + }
  2919. +next_menu:
  2920. + if (menu->list != NULL) {
  2921. + menu = menu->list;
  2922. + }
  2923. + else if (menu->next != NULL) {
  2924. + menu = menu->next;
  2925. + } else {
  2926. + while ((menu = menu->parent)) {
  2927. + if (menu->next != NULL) {
  2928. + menu = menu->next;
  2929. + break;
  2930. + }
  2931. + }
  2932. + }
  2933. + }
  2934. + fclose(out);
  2935. + return 0;
  2936. +}
  2937. +
  2938. int conf_write(const char *name)
  2939. {
  2940. FILE *out;
  2941. struct symbol *sym;
  2942. struct menu *menu;
  2943. const char *basename;
  2944. - char dirname[128], tmpname[128], newname[128];
  2945. - int type, l;
  2946. const char *str;
  2947. - time_t now;
  2948. - int use_timestamp = 1;
  2949. - char *env;
  2950. + char tmpname[PATH_MAX+1], newname[PATH_MAX+1];
  2951. + char *env, *dirname = NULL;
  2952. - dirname[0] = 0;
  2953. - if (name == NULL)
  2954. - name = conf_get_configname();
  2955. if (name && name[0]) {
  2956. struct stat st;
  2957. char *slash;
  2958. if (!stat(name, &st) && S_ISDIR(st.st_mode)) {
  2959. - strcpy(dirname, name);
  2960. + dirname = strndup(name, strlen(name) + 1);
  2961. strcat(dirname, "/");
  2962. basename = conf_get_configname();
  2963. } else if ((slash = strrchr(name, '/'))) {
  2964. int size = slash - name + 1;
  2965. - memcpy(dirname, name, size);
  2966. - dirname[size] = 0;
  2967. + dirname = strndup(name, size);
  2968. if (slash[1])
  2969. basename = slash + 1;
  2970. else
  2971. basename = conf_get_configname();
  2972. } else
  2973. basename = name;
  2974. - } else
  2975. - basename = conf_get_configname();
  2976. -
  2977. + } else {
  2978. + dirname = strdup(conf_get_configname());
  2979. + basename = strdup(base_name(dirname));
  2980. + dirname = dir_name(dirname);
  2981. + }
  2982. sprintf(newname, "%s%s", dirname, basename);
  2983. env = getenv("KCONFIG_OVERWRITECONFIG");
  2984. if (!env || !*env) {
  2985. @@ -434,24 +768,11 @@
  2986. *tmpname = 0;
  2987. out = fopen(newname, "w");
  2988. }
  2989. + free(dirname);
  2990. if (!out)
  2991. return 1;
  2992. - sym = sym_lookup("VERSION", 0);
  2993. - sym_calc_value(sym);
  2994. - time(&now);
  2995. - env = getenv("KCONFIG_NOTIMESTAMP");
  2996. - if (env && *env)
  2997. - use_timestamp = 0;
  2998. -
  2999. - fprintf(out, _("#\n"
  3000. - "# Automatically generated make config: don't edit\n"
  3001. - "# Version: %s\n"
  3002. - "%s%s"
  3003. - "#\n"),
  3004. - sym_get_string_value(sym),
  3005. - use_timestamp ? "# " : "",
  3006. - use_timestamp ? ctime(&now) : "");
  3007. + conf_write_heading(out, &kconfig_printer_cb, NULL);
  3008. if (!conf_get_changed())
  3009. sym_clear_all_valid();
  3010. @@ -472,56 +793,11 @@
  3011. if (!(sym->flags & SYMBOL_WRITE))
  3012. goto next;
  3013. sym->flags &= ~SYMBOL_WRITE;
  3014. - type = sym->type;
  3015. - if (type == S_TRISTATE) {
  3016. - sym_calc_value(modules_sym);
  3017. - if (modules_sym->curr.tri == no)
  3018. - type = S_BOOLEAN;
  3019. - }
  3020. - switch (type) {
  3021. - case S_BOOLEAN:
  3022. - case S_TRISTATE:
  3023. - switch (sym_get_tristate_value(sym)) {
  3024. - case no:
  3025. - fprintf(out, "# %s is not set\n", sym->name);
  3026. - break;
  3027. - case mod:
  3028. - fprintf(out, "%s=m\n", sym->name);
  3029. - break;
  3030. - case yes:
  3031. - fprintf(out, "%s=y\n", sym->name);
  3032. - break;
  3033. - }
  3034. - break;
  3035. - case S_STRING:
  3036. - str = sym_get_string_value(sym);
  3037. - fprintf(out, "%s=\"", sym->name);
  3038. - while (1) {
  3039. - l = strcspn(str, "\"\\");
  3040. - if (l) {
  3041. - fwrite(str, l, 1, out);
  3042. - str += l;
  3043. - }
  3044. - if (!*str)
  3045. - break;
  3046. - fprintf(out, "\\%c", *str++);
  3047. - }
  3048. - fputs("\"\n", out);
  3049. - break;
  3050. - case S_HEX:
  3051. - str = sym_get_string_value(sym);
  3052. - if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
  3053. - fprintf(out, "%s=%s\n", sym->name, str);
  3054. - break;
  3055. - }
  3056. - case S_INT:
  3057. - str = sym_get_string_value(sym);
  3058. - fprintf(out, "%s=%s\n", sym->name, str);
  3059. - break;
  3060. - }
  3061. +
  3062. + conf_write_symbol(out, sym, &kconfig_printer_cb, NULL);
  3063. }
  3064. - next:
  3065. +next:
  3066. if (menu->list) {
  3067. menu = menu->list;
  3068. continue;
  3069. @@ -538,38 +814,39 @@
  3070. fclose(out);
  3071. if (*tmpname) {
  3072. - strcat(dirname, basename);
  3073. + dirname = strndup(basename, strlen(basename) + 4);
  3074. strcat(dirname, ".old");
  3075. rename(newname, dirname);
  3076. + free(dirname);
  3077. if (rename(tmpname, newname))
  3078. return 1;
  3079. }
  3080. - printf(_("#\n"
  3081. - "# configuration written to %s\n"
  3082. - "#\n"), newname);
  3083. + conf_message(_("configuration written to %s"), newname);
  3084. sym_set_change_count(0);
  3085. return 0;
  3086. }
  3087. -int conf_split_config(void)
  3088. +static int conf_split_config(void)
  3089. {
  3090. - char *name, path[128], opwd[512];
  3091. + const char *name;
  3092. + char path[PATH_MAX+1], opwd[PATH_MAX+1];
  3093. char *s, *d, c;
  3094. struct symbol *sym;
  3095. struct stat sb;
  3096. int res, i, fd;
  3097. - name = getenv("KCONFIG_AUTOCONFIG");
  3098. - if (!name)
  3099. - name = "include/config/auto.conf";
  3100. - conf_read_simple(name, S_DEF_AUTO);
  3101. -
  3102. if (getcwd(opwd, sizeof(opwd)) == NULL)
  3103. return 1;
  3104. - if (chdir(dirname(strdup(name))))
  3105. + name = conf_get_autoconfig_name();
  3106. + conf_read_simple(name, S_DEF_AUTO);
  3107. +
  3108. + strcpy(path, name);
  3109. + dir_name(path);
  3110. +
  3111. + if (chdir(path))
  3112. return 1;
  3113. res = 0;
  3114. @@ -671,126 +948,85 @@
  3115. int conf_write_autoconf(void)
  3116. {
  3117. - char opwd[512];
  3118. struct symbol *sym;
  3119. - const char *str;
  3120. - char *name;
  3121. - FILE *out, *out_h;
  3122. - time_t now;
  3123. - int i, l;
  3124. + const char *name;
  3125. + char cfg_fname[PATH_MAX+1], tristate_fname[PATH_MAX+1],
  3126. + cfgh_fname[PATH_MAX+1];
  3127. + char *dirname;
  3128. + FILE *out, *tristate, *out_h;
  3129. + int i;
  3130. - if (getcwd(opwd, sizeof(opwd)) == NULL)
  3131. - return 1;
  3132. - if (chdir(dirname(strdup(conf_get_configname()))))
  3133. - return 1;
  3134. sym_clear_all_valid();
  3135. - file_write_dep("include/config/auto.conf.cmd");
  3136. + sprintf(cfg_fname, "%s.cmd", conf_get_autoconfig_name());
  3137. + file_write_dep(cfg_fname);
  3138. if (conf_split_config())
  3139. return 1;
  3140. - out = fopen(".tmpconfig", "w");
  3141. + dirname = dir_name(strdup(conf_get_configname()));
  3142. + sprintf(cfg_fname, "%s.tmpconfig", dirname);
  3143. + sprintf(tristate_fname, "%s.tmpconfig_tristate", dirname);
  3144. + sprintf(cfgh_fname, "%s.tmpconfig.h", dirname);
  3145. + free(dirname);
  3146. +
  3147. + out = fopen(cfg_fname, "w");
  3148. if (!out)
  3149. return 1;
  3150. - out_h = fopen(".tmpconfig.h", "w");
  3151. + tristate = fopen(tristate_fname, "w");
  3152. + if (!tristate) {
  3153. + fclose(out);
  3154. + return 1;
  3155. + }
  3156. +
  3157. + out_h = fopen(cfgh_fname, "w");
  3158. if (!out_h) {
  3159. fclose(out);
  3160. + fclose(tristate);
  3161. return 1;
  3162. }
  3163. - sym = sym_lookup("VERSION", 0);
  3164. - sym_calc_value(sym);
  3165. - time(&now);
  3166. - fprintf(out, "#\n"
  3167. - "# Automatically generated make config: don't edit\n"
  3168. - "# Version: %s\n"
  3169. - "# %s"
  3170. - "#\n",
  3171. - sym_get_string_value(sym), ctime(&now));
  3172. - fprintf(out_h, "/*\n"
  3173. - " * Automatically generated C config: don't edit\n"
  3174. - " * Version: %s\n"
  3175. - " * %s"
  3176. - " */\n"
  3177. - "#define AUTOCONF_INCLUDED\n",
  3178. - sym_get_string_value(sym), ctime(&now));
  3179. + conf_write_heading(out, &kconfig_printer_cb, NULL);
  3180. +
  3181. + conf_write_heading(tristate, &tristate_printer_cb, NULL);
  3182. +
  3183. + conf_write_heading(out_h, &header_printer_cb, NULL);
  3184. for_all_symbols(i, sym) {
  3185. sym_calc_value(sym);
  3186. if (!(sym->flags & SYMBOL_WRITE) || !sym->name)
  3187. continue;
  3188. - switch (sym->type) {
  3189. - case S_BOOLEAN:
  3190. - case S_TRISTATE:
  3191. - switch (sym_get_tristate_value(sym)) {
  3192. - case no:
  3193. - break;
  3194. - case mod:
  3195. - fprintf(out, "CONFIG_%s=m\n", sym->name);
  3196. - fprintf(out_h, "#define CONFIG_%s_MODULE 1\n", sym->name);
  3197. - break;
  3198. - case yes:
  3199. - fprintf(out, "%s=y\n", sym->name);
  3200. - fprintf(out_h, "#define %s 1\n", sym->name);
  3201. - break;
  3202. - }
  3203. - break;
  3204. - case S_STRING:
  3205. - str = sym_get_string_value(sym);
  3206. - fprintf(out, "%s=\"", sym->name);
  3207. - fprintf(out_h, "#define %s \"", sym->name);
  3208. - while (1) {
  3209. - l = strcspn(str, "\"\\");
  3210. - if (l) {
  3211. - fwrite(str, l, 1, out);
  3212. - fwrite(str, l, 1, out_h);
  3213. - str += l;
  3214. - }
  3215. - if (!*str)
  3216. - break;
  3217. - fprintf(out, "\\%c", *str);
  3218. - fprintf(out_h, "\\%c", *str);
  3219. - str++;
  3220. - }
  3221. - fputs("\"\n", out);
  3222. - fputs("\"\n", out_h);
  3223. - break;
  3224. - case S_HEX:
  3225. - str = sym_get_string_value(sym);
  3226. - if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
  3227. - fprintf(out, "%s=%s\n", sym->name, str);
  3228. - fprintf(out_h, "#define %s 0x%s\n", sym->name, str);
  3229. - break;
  3230. - }
  3231. - case S_INT:
  3232. - str = sym_get_string_value(sym);
  3233. - fprintf(out, "%s=%s\n", sym->name, str);
  3234. - fprintf(out_h, "#define %s %s\n", sym->name, str);
  3235. - break;
  3236. - default:
  3237. - break;
  3238. - }
  3239. +
  3240. + /* write symbol to auto.conf, tristate and header files */
  3241. + conf_write_symbol(out, sym, &kconfig_printer_cb, (void *)1);
  3242. +
  3243. + conf_write_symbol(tristate, sym, &tristate_printer_cb, (void *)1);
  3244. +
  3245. + conf_write_symbol(out_h, sym, &header_printer_cb, NULL);
  3246. }
  3247. fclose(out);
  3248. + fclose(tristate);
  3249. fclose(out_h);
  3250. name = getenv("KCONFIG_AUTOHEADER");
  3251. if (!name)
  3252. - name = "include/config/autoconf.h";
  3253. - if (rename(".tmpconfig.h", name))
  3254. + name = "include/generated/autoconf.h";
  3255. + if (rename(cfgh_fname, name))
  3256. return 1;
  3257. - name = getenv("KCONFIG_AUTOCONFIG");
  3258. + name = getenv("KCONFIG_TRISTATE");
  3259. if (!name)
  3260. - name = "include/config/auto.conf";
  3261. + name = "include/config/tristate.conf";
  3262. + if (rename(tristate_fname, name))
  3263. + return 1;
  3264. + name = conf_get_autoconfig_name();
  3265. /*
  3266. * This must be the last step, kbuild has a dependency on auto.conf
  3267. * and this marks the successful completion of the previous steps.
  3268. */
  3269. - if (rename(".tmpconfig", name))
  3270. + if (rename(cfg_fname, name))
  3271. return 1;
  3272. - chdir(opwd);
  3273. +
  3274. return 0;
  3275. }
  3276. @@ -821,20 +1057,131 @@
  3277. conf_changed_callback = fn;
  3278. }
  3279. +static bool randomize_choice_values(struct symbol *csym)
  3280. +{
  3281. + struct property *prop;
  3282. + struct symbol *sym;
  3283. + struct expr *e;
  3284. + int cnt, def;
  3285. -void conf_set_all_new_symbols(enum conf_def_mode mode)
  3286. + /*
  3287. + * If choice is mod then we may have more items selected
  3288. + * and if no then no-one.
  3289. + * In both cases stop.
  3290. + */
  3291. + if (csym->curr.tri != yes)
  3292. + return false;
  3293. +
  3294. + prop = sym_get_choice_prop(csym);
  3295. +
  3296. + /* count entries in choice block */
  3297. + cnt = 0;
  3298. + expr_list_for_each_sym(prop->expr, e, sym)
  3299. + cnt++;
  3300. +
  3301. + /*
  3302. + * find a random value and set it to yes,
  3303. + * set the rest to no so we have only one set
  3304. + */
  3305. + def = (rand() % cnt);
  3306. +
  3307. + cnt = 0;
  3308. + expr_list_for_each_sym(prop->expr, e, sym) {
  3309. + if (def == cnt++) {
  3310. + sym->def[S_DEF_USER].tri = yes;
  3311. + csym->def[S_DEF_USER].val = sym;
  3312. + }
  3313. + else {
  3314. + sym->def[S_DEF_USER].tri = no;
  3315. + }
  3316. + sym->flags |= SYMBOL_DEF_USER;
  3317. + /* clear VALID to get value calculated */
  3318. + sym->flags &= ~SYMBOL_VALID;
  3319. + }
  3320. + csym->flags |= SYMBOL_DEF_USER;
  3321. + /* clear VALID to get value calculated */
  3322. + csym->flags &= ~(SYMBOL_VALID);
  3323. +
  3324. + return true;
  3325. +}
  3326. +
  3327. +void set_all_choice_values(struct symbol *csym)
  3328. {
  3329. - struct symbol *sym, *csym;
  3330. struct property *prop;
  3331. + struct symbol *sym;
  3332. struct expr *e;
  3333. - int i, cnt, def;
  3334. +
  3335. + prop = sym_get_choice_prop(csym);
  3336. +
  3337. + /*
  3338. + * Set all non-assinged choice values to no
  3339. + */
  3340. + expr_list_for_each_sym(prop->expr, e, sym) {
  3341. + if (!sym_has_value(sym))
  3342. + sym->def[S_DEF_USER].tri = no;
  3343. + }
  3344. + csym->flags |= SYMBOL_DEF_USER;
  3345. + /* clear VALID to get value calculated */
  3346. + csym->flags &= ~(SYMBOL_VALID | SYMBOL_NEED_SET_CHOICE_VALUES);
  3347. +}
  3348. +
  3349. +bool conf_set_all_new_symbols(enum conf_def_mode mode)
  3350. +{
  3351. + struct symbol *sym, *csym;
  3352. + int i, cnt, pby, pty, ptm; /* pby: probability of boolean = y
  3353. + * pty: probability of tristate = y
  3354. + * ptm: probability of tristate = m
  3355. + */
  3356. +
  3357. + pby = 50; pty = ptm = 33; /* can't go as the default in switch-case
  3358. + * below, otherwise gcc whines about
  3359. + * -Wmaybe-uninitialized */
  3360. + if (mode == def_random) {
  3361. + int n, p[3];
  3362. + char *env = getenv("KCONFIG_PROBABILITY");
  3363. + n = 0;
  3364. + while( env && *env ) {
  3365. + char *endp;
  3366. + int tmp = strtol( env, &endp, 10 );
  3367. + if( tmp >= 0 && tmp <= 100 ) {
  3368. + p[n++] = tmp;
  3369. + } else {
  3370. + errno = ERANGE;
  3371. + perror( "KCONFIG_PROBABILITY" );
  3372. + exit( 1 );
  3373. + }
  3374. + env = (*endp == ':') ? endp+1 : endp;
  3375. + if( n >=3 ) {
  3376. + break;
  3377. + }
  3378. + }
  3379. + switch( n ) {
  3380. + case 1:
  3381. + pby = p[0]; ptm = pby/2; pty = pby-ptm;
  3382. + break;
  3383. + case 2:
  3384. + pty = p[0]; ptm = p[1]; pby = pty + ptm;
  3385. + break;
  3386. + case 3:
  3387. + pby = p[0]; pty = p[1]; ptm = p[2];
  3388. + break;
  3389. + }
  3390. +
  3391. + if( pty+ptm > 100 ) {
  3392. + errno = ERANGE;
  3393. + perror( "KCONFIG_PROBABILITY" );
  3394. + exit( 1 );
  3395. + }
  3396. + }
  3397. + bool has_changed = false;
  3398. for_all_symbols(i, sym) {
  3399. - if (sym_has_value(sym))
  3400. + if (sym_has_value(sym) || (sym->flags & SYMBOL_VALID))
  3401. continue;
  3402. switch (sym_get_type(sym)) {
  3403. case S_BOOLEAN:
  3404. case S_TRISTATE:
  3405. + has_changed = true;
  3406. switch (mode) {
  3407. case def_yes:
  3408. sym->def[S_DEF_USER].tri = yes;
  3409. @@ -846,7 +1193,15 @@
  3410. sym->def[S_DEF_USER].tri = no;
  3411. break;
  3412. case def_random:
  3413. - sym->def[S_DEF_USER].tri = (tristate)(rand() % 3);
  3414. + sym->def[S_DEF_USER].tri = no;
  3415. + cnt = rand() % 100;
  3416. + if (sym->type == S_TRISTATE) {
  3417. + if (cnt < pty)
  3418. + sym->def[S_DEF_USER].tri = yes;
  3419. + else if (cnt < (pty+ptm))
  3420. + sym->def[S_DEF_USER].tri = mod;
  3421. + } else if (cnt < pby)
  3422. + sym->def[S_DEF_USER].tri = yes;
  3423. break;
  3424. default:
  3425. continue;
  3426. @@ -862,51 +1217,35 @@
  3427. sym_clear_all_valid();
  3428. - if (mode != def_random)
  3429. - return;
  3430. /*
  3431. * We have different type of choice blocks.
  3432. - * If curr.tri equal to mod then we can select several
  3433. + * If curr.tri equals to mod then we can select several
  3434. * choice symbols in one block.
  3435. * In this case we do nothing.
  3436. - * If curr.tri equal yes then only one symbol can be
  3437. + * If curr.tri equals yes then only one symbol can be
  3438. * selected in a choice block and we set it to yes,
  3439. * and the rest to no.
  3440. */
  3441. + if (mode != def_random) {
  3442. + for_all_symbols(i, csym) {
  3443. + if ((sym_is_choice(csym) && !sym_has_value(csym)) ||
  3444. + sym_is_choice_value(csym))
  3445. + csym->flags |= SYMBOL_NEED_SET_CHOICE_VALUES;
  3446. + }
  3447. + }
  3448. +
  3449. for_all_symbols(i, csym) {
  3450. if (sym_has_value(csym) || !sym_is_choice(csym))
  3451. continue;
  3452. sym_calc_value(csym);
  3453. -
  3454. - if (csym->curr.tri != yes)
  3455. - continue;
  3456. -
  3457. - prop = sym_get_choice_prop(csym);
  3458. -
  3459. - /* count entries in choice block */
  3460. - cnt = 0;
  3461. - expr_list_for_each_sym(prop->expr, e, sym)
  3462. - cnt++;
  3463. -
  3464. - /*
  3465. - * find a random value and set it to yes,
  3466. - * set the rest to no so we have only one set
  3467. - */
  3468. - def = (rand() % cnt);
  3469. -
  3470. - cnt = 0;
  3471. - expr_list_for_each_sym(prop->expr, e, sym) {
  3472. - if (def == cnt++) {
  3473. - sym->def[S_DEF_USER].tri = yes;
  3474. - csym->def[S_DEF_USER].val = sym;
  3475. - }
  3476. - else {
  3477. - sym->def[S_DEF_USER].tri = no;
  3478. - }
  3479. + if (mode == def_random)
  3480. + has_changed = randomize_choice_values(csym);
  3481. + else {
  3482. + set_all_choice_values(csym);
  3483. + has_changed = true;
  3484. }
  3485. - csym->flags |= SYMBOL_DEF_USER;
  3486. - /* clear VALID to get value calculated */
  3487. - csym->flags &= ~(SYMBOL_VALID);
  3488. }
  3489. +
  3490. + return has_changed;
  3491. }
  3492. diff -Nur uClibc-0.9.33.2/extra/config/expr.c uClibc-git/extra/config/expr.c
  3493. --- uClibc-0.9.33.2/extra/config/expr.c 2012-05-15 09:20:09.000000000 +0200
  3494. +++ uClibc-git/extra/config/expr.c 2014-07-25 20:36:04.853324457 +0200
  3495. @@ -7,15 +7,13 @@
  3496. #include <stdlib.h>
  3497. #include <string.h>
  3498. -#define LKC_DIRECT_LINK
  3499. #include "lkc.h"
  3500. #define DEBUG_EXPR 0
  3501. struct expr *expr_alloc_symbol(struct symbol *sym)
  3502. {
  3503. - struct expr *e = malloc(sizeof(*e));
  3504. - memset(e, 0, sizeof(*e));
  3505. + struct expr *e = xcalloc(1, sizeof(*e));
  3506. e->type = E_SYMBOL;
  3507. e->left.sym = sym;
  3508. return e;
  3509. @@ -23,8 +21,7 @@
  3510. struct expr *expr_alloc_one(enum expr_type type, struct expr *ce)
  3511. {
  3512. - struct expr *e = malloc(sizeof(*e));
  3513. - memset(e, 0, sizeof(*e));
  3514. + struct expr *e = xcalloc(1, sizeof(*e));
  3515. e->type = type;
  3516. e->left.expr = ce;
  3517. return e;
  3518. @@ -32,8 +29,7 @@
  3519. struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2)
  3520. {
  3521. - struct expr *e = malloc(sizeof(*e));
  3522. - memset(e, 0, sizeof(*e));
  3523. + struct expr *e = xcalloc(1, sizeof(*e));
  3524. e->type = type;
  3525. e->left.expr = e1;
  3526. e->right.expr = e2;
  3527. @@ -42,8 +38,7 @@
  3528. struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2)
  3529. {
  3530. - struct expr *e = malloc(sizeof(*e));
  3531. - memset(e, 0, sizeof(*e));
  3532. + struct expr *e = xcalloc(1, sizeof(*e));
  3533. e->type = type;
  3534. e->left.sym = s1;
  3535. e->right.sym = s2;
  3536. @@ -64,14 +59,14 @@
  3537. return e2 ? expr_alloc_two(E_OR, e1, e2) : e1;
  3538. }
  3539. -struct expr *expr_copy(struct expr *org)
  3540. +struct expr *expr_copy(const struct expr *org)
  3541. {
  3542. struct expr *e;
  3543. if (!org)
  3544. return NULL;
  3545. - e = malloc(sizeof(*org));
  3546. + e = xmalloc(sizeof(*org));
  3547. memcpy(e, org, sizeof(*org));
  3548. switch (org->type) {
  3549. case E_SYMBOL:
  3550. @@ -348,7 +343,7 @@
  3551. /*
  3552. * e1 || e2 -> ?
  3553. */
  3554. -struct expr *expr_join_or(struct expr *e1, struct expr *e2)
  3555. +static struct expr *expr_join_or(struct expr *e1, struct expr *e2)
  3556. {
  3557. struct expr *tmp;
  3558. struct symbol *sym1, *sym2;
  3559. @@ -412,7 +407,7 @@
  3560. return NULL;
  3561. }
  3562. -struct expr *expr_join_and(struct expr *e1, struct expr *e2)
  3563. +static struct expr *expr_join_and(struct expr *e1, struct expr *e2)
  3564. {
  3565. struct expr *tmp;
  3566. struct symbol *sym1, *sym2;
  3567. @@ -1013,6 +1008,48 @@
  3568. #endif
  3569. }
  3570. +static inline struct expr *
  3571. +expr_get_leftmost_symbol(const struct expr *e)
  3572. +{
  3573. +
  3574. + if (e == NULL)
  3575. + return NULL;
  3576. +
  3577. + while (e->type != E_SYMBOL)
  3578. + e = e->left.expr;
  3579. +
  3580. + return expr_copy(e);
  3581. +}
  3582. +
  3583. +/*
  3584. + * Given expression `e1' and `e2', returns the leaf of the longest
  3585. + * sub-expression of `e1' not containing 'e2.
  3586. + */
  3587. +struct expr *expr_simplify_unmet_dep(struct expr *e1, struct expr *e2)
  3588. +{
  3589. + struct expr *ret;
  3590. +
  3591. + switch (e1->type) {
  3592. + case E_OR:
  3593. + return expr_alloc_and(
  3594. + expr_simplify_unmet_dep(e1->left.expr, e2),
  3595. + expr_simplify_unmet_dep(e1->right.expr, e2));
  3596. + case E_AND: {
  3597. + struct expr *e;
  3598. + e = expr_alloc_and(expr_copy(e1), expr_copy(e2));
  3599. + e = expr_eliminate_dups(e);
  3600. + ret = (!expr_eq(e, e1)) ? e1 : NULL;
  3601. + expr_free(e);
  3602. + break;
  3603. + }
  3604. + default:
  3605. + ret = e1;
  3606. + break;
  3607. + }
  3608. +
  3609. + return expr_get_leftmost_symbol(ret);
  3610. +}
  3611. +
  3612. void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken)
  3613. {
  3614. if (!e) {
  3615. @@ -1087,7 +1124,7 @@
  3616. static void expr_print_file_helper(void *data, struct symbol *sym, const char *str)
  3617. {
  3618. - fwrite(str, strlen(str), 1, data);
  3619. + xfwrite(str, strlen(str), 1, data);
  3620. }
  3621. void expr_fprint(struct expr *e, FILE *out)
  3622. @@ -1097,7 +1134,32 @@
  3623. static void expr_print_gstr_helper(void *data, struct symbol *sym, const char *str)
  3624. {
  3625. - str_append((struct gstr*)data, str);
  3626. + struct gstr *gs = (struct gstr*)data;
  3627. + const char *sym_str = NULL;
  3628. +
  3629. + if (sym)
  3630. + sym_str = sym_get_string_value(sym);
  3631. +
  3632. + if (gs->max_width) {
  3633. + unsigned extra_length = strlen(str);
  3634. + const char *last_cr = strrchr(gs->s, '\n');
  3635. + unsigned last_line_length;
  3636. +
  3637. + if (sym_str)
  3638. + extra_length += 4 + strlen(sym_str);
  3639. +
  3640. + if (!last_cr)
  3641. + last_cr = gs->s;
  3642. +
  3643. + last_line_length = strlen(gs->s) - (last_cr - gs->s);
  3644. +
  3645. + if ((last_line_length + extra_length) > gs->max_width)
  3646. + str_append(gs, "\\\n");
  3647. + }
  3648. +
  3649. + str_append(gs, str);
  3650. + if (sym && sym->type != S_UNKNOWN)
  3651. + str_printf(gs, " [=%s]", sym_str);
  3652. }
  3653. void expr_gstr_print(struct expr *e, struct gstr *gs)
  3654. diff -Nur uClibc-0.9.33.2/extra/config/expr.h uClibc-git/extra/config/expr.h
  3655. --- uClibc-0.9.33.2/extra/config/expr.h 2012-05-15 09:20:09.000000000 +0200
  3656. +++ uClibc-git/extra/config/expr.h 2014-07-25 20:36:04.853324457 +0200
  3657. @@ -10,7 +10,9 @@
  3658. extern "C" {
  3659. #endif
  3660. +#include <assert.h>
  3661. #include <stdio.h>
  3662. +#include "list.h"
  3663. #ifndef __cplusplus
  3664. #include <stdbool.h>
  3665. #endif
  3666. @@ -18,14 +20,10 @@
  3667. struct file {
  3668. struct file *next;
  3669. struct file *parent;
  3670. - char *name;
  3671. + const char *name;
  3672. int lineno;
  3673. - int flags;
  3674. };
  3675. -#define FILE_BUSY 0x0001
  3676. -#define FILE_SCANNED 0x0002
  3677. -
  3678. typedef enum tristate {
  3679. no, mod, yes
  3680. } tristate;
  3681. @@ -83,10 +81,11 @@
  3682. tristate visible;
  3683. int flags;
  3684. struct property *prop;
  3685. + struct expr_value dir_dep;
  3686. struct expr_value rev_dep;
  3687. };
  3688. -#define for_all_symbols(i, sym) for (i = 0; i < 257; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER)
  3689. +#define for_all_symbols(i, sym) for (i = 0; i < SYMBOL_HASHSIZE; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER)
  3690. #define SYMBOL_CONST 0x0001 /* symbol is const */
  3691. #define SYMBOL_CHECK 0x0008 /* used during dependency checking */
  3692. @@ -107,9 +106,11 @@
  3693. #define SYMBOL_DEF3 0x40000 /* symbol.def[S_DEF_3] is valid */
  3694. #define SYMBOL_DEF4 0x80000 /* symbol.def[S_DEF_4] is valid */
  3695. +/* choice values need to be set before calculating this symbol value */
  3696. +#define SYMBOL_NEED_SET_CHOICE_VALUES 0x100000
  3697. +
  3698. #define SYMBOL_MAXLENGTH 256
  3699. -#define SYMBOL_HASHSIZE 257
  3700. -#define SYMBOL_HASHMASK 0xff
  3701. +#define SYMBOL_HASHSIZE 9973
  3702. /* A property represent the config options that can be associated
  3703. * with a config "symbol".
  3704. @@ -132,6 +133,7 @@
  3705. P_SELECT, /* select BAR */
  3706. P_RANGE, /* range 7..100 (for a symbol) */
  3707. P_ENV, /* value from environment variable */
  3708. + P_SYMBOL, /* where a symbol is defined */
  3709. };
  3710. struct property {
  3711. @@ -163,6 +165,7 @@
  3712. struct menu *list;
  3713. struct symbol *sym;
  3714. struct property *prompt;
  3715. + struct expr *visibility;
  3716. struct expr *dep;
  3717. unsigned int flags;
  3718. char *help;
  3719. @@ -174,7 +177,14 @@
  3720. #define MENU_CHANGED 0x0001
  3721. #define MENU_ROOT 0x0002
  3722. -#ifndef SWIG
  3723. +struct jump_key {
  3724. + struct list_head entries;
  3725. + size_t offset;
  3726. + struct menu *target;
  3727. + int index;
  3728. +};
  3729. +
  3730. +#define JUMP_NB 9
  3731. extern struct file *file_list;
  3732. extern struct file *current_file;
  3733. @@ -190,7 +200,7 @@
  3734. struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2);
  3735. struct expr *expr_alloc_and(struct expr *e1, struct expr *e2);
  3736. struct expr *expr_alloc_or(struct expr *e1, struct expr *e2);
  3737. -struct expr *expr_copy(struct expr *org);
  3738. +struct expr *expr_copy(const struct expr *org);
  3739. void expr_free(struct expr *e);
  3740. int expr_eq(struct expr *e1, struct expr *e2);
  3741. void expr_eliminate_eq(struct expr **ep1, struct expr **ep2);
  3742. @@ -205,6 +215,7 @@
  3743. struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2);
  3744. void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2);
  3745. struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym);
  3746. +struct expr *expr_simplify_unmet_dep(struct expr *e1, struct expr *e2);
  3747. void expr_fprint(struct expr *e, FILE *out);
  3748. struct gstr; /* forward */
  3749. @@ -219,7 +230,6 @@
  3750. {
  3751. return e && (e->type == E_SYMBOL && e->left.sym == &symbol_no);
  3752. }
  3753. -#endif
  3754. #ifdef __cplusplus
  3755. }
  3756. diff -Nur uClibc-0.9.33.2/extra/config/gconf.c uClibc-git/extra/config/gconf.c
  3757. --- uClibc-0.9.33.2/extra/config/gconf.c 2012-05-15 09:20:09.000000000 +0200
  3758. +++ uClibc-git/extra/config/gconf.c 2014-07-25 20:36:04.853324457 +0200
  3759. @@ -10,6 +10,7 @@
  3760. # include <config.h>
  3761. #endif
  3762. +#include <stdlib.h>
  3763. #include "lkc.h"
  3764. #include "images.c"
  3765. @@ -22,7 +23,6 @@
  3766. #include <string.h>
  3767. #include <unistd.h>
  3768. #include <time.h>
  3769. -#include <stdlib.h>
  3770. //#define DEBUG
  3771. @@ -30,13 +30,16 @@
  3772. SINGLE_VIEW, SPLIT_VIEW, FULL_VIEW
  3773. };
  3774. +enum {
  3775. + OPT_NORMAL, OPT_ALL, OPT_PROMPT
  3776. +};
  3777. +
  3778. static gint view_mode = FULL_VIEW;
  3779. static gboolean show_name = TRUE;
  3780. static gboolean show_range = TRUE;
  3781. static gboolean show_value = TRUE;
  3782. -static gboolean show_all = FALSE;
  3783. -static gboolean show_debug = FALSE;
  3784. static gboolean resizeable = FALSE;
  3785. +static int opt_mode = OPT_NORMAL;
  3786. GtkWidget *main_wnd = NULL;
  3787. GtkWidget *tree1_w = NULL; // left frame
  3788. @@ -76,36 +79,7 @@
  3789. /* Helping/Debugging Functions */
  3790. -
  3791. -const char *dbg_print_stype(int val)
  3792. -{
  3793. - static char buf[256];
  3794. -
  3795. - bzero(buf, 256);
  3796. -
  3797. - if (val == S_UNKNOWN)
  3798. - strcpy(buf, "unknown");
  3799. - if (val == S_BOOLEAN)
  3800. - strcpy(buf, "boolean");
  3801. - if (val == S_TRISTATE)
  3802. - strcpy(buf, "tristate");
  3803. - if (val == S_INT)
  3804. - strcpy(buf, "int");
  3805. - if (val == S_HEX)
  3806. - strcpy(buf, "hex");
  3807. - if (val == S_STRING)
  3808. - strcpy(buf, "string");
  3809. - if (val == S_OTHER)
  3810. - strcpy(buf, "other");
  3811. -
  3812. -#ifdef DEBUG
  3813. - printf("%s", buf);
  3814. -#endif
  3815. -
  3816. - return buf;
  3817. -}
  3818. -
  3819. -const char *dbg_print_flags(int val)
  3820. +const char *dbg_sym_flags(int val)
  3821. {
  3822. static char buf[256];
  3823. @@ -131,40 +105,10 @@
  3824. strcat(buf, "auto/");
  3825. buf[strlen(buf) - 1] = '\0';
  3826. -#ifdef DEBUG
  3827. - printf("%s", buf);
  3828. -#endif
  3829. return buf;
  3830. }
  3831. -const char *dbg_print_ptype(int val)
  3832. -{
  3833. - static char buf[256];
  3834. -
  3835. - bzero(buf, 256);
  3836. -
  3837. - if (val == P_UNKNOWN)
  3838. - strcpy(buf, "unknown");
  3839. - if (val == P_PROMPT)
  3840. - strcpy(buf, "prompt");
  3841. - if (val == P_COMMENT)
  3842. - strcpy(buf, "comment");
  3843. - if (val == P_MENU)
  3844. - strcpy(buf, "menu");
  3845. - if (val == P_DEFAULT)
  3846. - strcpy(buf, "default");
  3847. - if (val == P_CHOICE)
  3848. - strcpy(buf, "choice");
  3849. -
  3850. -#ifdef DEBUG
  3851. - printf("%s", buf);
  3852. -#endif
  3853. -
  3854. - return buf;
  3855. -}
  3856. -
  3857. -
  3858. void replace_button_icon(GladeXML * xml, GdkDrawable * window,
  3859. GtkStyle * style, gchar * btn_name, gchar ** xpm)
  3860. {
  3861. @@ -189,7 +133,6 @@
  3862. GladeXML *xml;
  3863. GtkWidget *widget;
  3864. GtkTextBuffer *txtbuf;
  3865. - char title[256];
  3866. GtkStyle *style;
  3867. xml = glade_xml_new(glade_file, "window1", NULL);
  3868. @@ -266,9 +209,7 @@
  3869. /*"style", PANGO_STYLE_OBLIQUE, */
  3870. NULL);
  3871. - sprintf(title, _("uClibc v%s Configuration"),
  3872. - getenv("VERSION"));
  3873. - gtk_window_set_title(GTK_WINDOW(main_wnd), title);
  3874. + gtk_window_set_title(GTK_WINDOW(main_wnd), rootmenu.prompt->text);
  3875. gtk_widget_show(main_wnd);
  3876. }
  3877. @@ -312,7 +253,7 @@
  3878. gtk_tree_view_set_model(view, model1);
  3879. gtk_tree_view_set_headers_visible(view, TRUE);
  3880. - gtk_tree_view_set_rules_hint(view, FALSE);
  3881. + gtk_tree_view_set_rules_hint(view, TRUE);
  3882. column = gtk_tree_view_column_new();
  3883. gtk_tree_view_append_column(view, column);
  3884. @@ -344,8 +285,6 @@
  3885. static void renderer_edited(GtkCellRendererText * cell,
  3886. const gchar * path_string,
  3887. const gchar * new_text, gpointer user_data);
  3888. -static void renderer_toggled(GtkCellRendererToggle * cellrenderertoggle,
  3889. - gchar * arg1, gpointer user_data);
  3890. void init_right_tree(void)
  3891. {
  3892. @@ -357,7 +296,7 @@
  3893. gtk_tree_view_set_model(view, model2);
  3894. gtk_tree_view_set_headers_visible(view, TRUE);
  3895. - gtk_tree_view_set_rules_hint(view, FALSE);
  3896. + gtk_tree_view_set_rules_hint(view, TRUE);
  3897. column = gtk_tree_view_column_new();
  3898. gtk_tree_view_append_column(view, column);
  3899. @@ -379,8 +318,6 @@
  3900. "inconsistent", COL_BTNINC,
  3901. "visible", COL_BTNVIS,
  3902. "radio", COL_BTNRAD, NULL);
  3903. - /*g_signal_connect(G_OBJECT(renderer), "toggled",
  3904. - G_CALLBACK(renderer_toggled), NULL); */
  3905. renderer = gtk_cell_renderer_text_new();
  3906. gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column),
  3907. renderer, FALSE);
  3908. @@ -456,19 +393,9 @@
  3909. GtkTextBuffer *buffer;
  3910. GtkTextIter start, end;
  3911. const char *prompt = _(menu_get_prompt(menu));
  3912. - gchar *name;
  3913. - const char *help;
  3914. -
  3915. - help = menu_get_help(menu);
  3916. -
  3917. - /* Gettextize if the help text not empty */
  3918. - if ((help != 0) && (help[0] != 0))
  3919. - help = _(help);
  3920. + struct gstr help = str_new();
  3921. - if (menu->sym && menu->sym->name)
  3922. - name = g_strdup_printf(menu->sym->name);
  3923. - else
  3924. - name = g_strdup("");
  3925. + menu_get_ext_help(menu, &help);
  3926. buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w));
  3927. gtk_text_buffer_get_bounds(buffer, &start, &end);
  3928. @@ -478,14 +405,11 @@
  3929. gtk_text_buffer_get_end_iter(buffer, &end);
  3930. gtk_text_buffer_insert_with_tags(buffer, &end, prompt, -1, tag1,
  3931. NULL);
  3932. - gtk_text_buffer_insert_at_cursor(buffer, " ", 1);
  3933. - gtk_text_buffer_get_end_iter(buffer, &end);
  3934. - gtk_text_buffer_insert_with_tags(buffer, &end, name, -1, tag1,
  3935. - NULL);
  3936. gtk_text_buffer_insert_at_cursor(buffer, "\n\n", 2);
  3937. gtk_text_buffer_get_end_iter(buffer, &end);
  3938. - gtk_text_buffer_insert_with_tags(buffer, &end, help, -1, tag2,
  3939. + gtk_text_buffer_insert_with_tags(buffer, &end, str_get(&help), -1, tag2,
  3940. NULL);
  3941. + str_free(&help);
  3942. }
  3943. @@ -710,20 +634,29 @@
  3944. void
  3945. -on_show_all_options1_activate(GtkMenuItem * menuitem, gpointer user_data)
  3946. +on_set_option_mode1_activate(GtkMenuItem *menuitem, gpointer user_data)
  3947. {
  3948. - show_all = GTK_CHECK_MENU_ITEM(menuitem)->active;
  3949. + opt_mode = OPT_NORMAL;
  3950. + gtk_tree_store_clear(tree2);
  3951. + display_tree(&rootmenu); /* instead of update_tree to speed-up */
  3952. +}
  3953. +
  3954. +void
  3955. +on_set_option_mode2_activate(GtkMenuItem *menuitem, gpointer user_data)
  3956. +{
  3957. + opt_mode = OPT_ALL;
  3958. gtk_tree_store_clear(tree2);
  3959. - display_tree(&rootmenu); // instead of update_tree to speed-up
  3960. + display_tree(&rootmenu); /* instead of update_tree to speed-up */
  3961. }
  3962. void
  3963. -on_show_debug_info1_activate(GtkMenuItem * menuitem, gpointer user_data)
  3964. +on_set_option_mode3_activate(GtkMenuItem *menuitem, gpointer user_data)
  3965. {
  3966. - show_debug = GTK_CHECK_MENU_ITEM(menuitem)->active;
  3967. - update_tree(&rootmenu, NULL);
  3968. + opt_mode = OPT_PROMPT;
  3969. + gtk_tree_store_clear(tree2);
  3970. + display_tree(&rootmenu); /* instead of update_tree to speed-up */
  3971. }
  3972. @@ -732,7 +665,6 @@
  3973. GtkWidget *dialog;
  3974. const gchar *intro_text = _(
  3975. "Welcome to gkc, the GTK+ graphical configuration tool\n"
  3976. - "for uClibc.\n"
  3977. "For each option, a blank box indicates the feature is disabled, a\n"
  3978. "check indicates it is enabled, and a dot indicates that it is to\n"
  3979. "be compiled as a module. Clicking on the box will cycle through the three states.\n"
  3980. @@ -751,7 +683,7 @@
  3981. dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd),
  3982. GTK_DIALOG_DESTROY_WITH_PARENT,
  3983. GTK_MESSAGE_INFO,
  3984. - GTK_BUTTONS_CLOSE, intro_text);
  3985. + GTK_BUTTONS_CLOSE, "%s", intro_text);
  3986. g_signal_connect_swapped(GTK_OBJECT(dialog), "response",
  3987. G_CALLBACK(gtk_widget_destroy),
  3988. GTK_OBJECT(dialog));
  3989. @@ -769,7 +701,7 @@
  3990. dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd),
  3991. GTK_DIALOG_DESTROY_WITH_PARENT,
  3992. GTK_MESSAGE_INFO,
  3993. - GTK_BUTTONS_CLOSE, about_text);
  3994. + GTK_BUTTONS_CLOSE, "%s", about_text);
  3995. g_signal_connect_swapped(GTK_OBJECT(dialog), "response",
  3996. G_CALLBACK(gtk_widget_destroy),
  3997. GTK_OBJECT(dialog));
  3998. @@ -788,7 +720,7 @@
  3999. dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd),
  4000. GTK_DIALOG_DESTROY_WITH_PARENT,
  4001. GTK_MESSAGE_INFO,
  4002. - GTK_BUTTONS_CLOSE, license_text);
  4003. + GTK_BUTTONS_CLOSE, "%s", license_text);
  4004. g_signal_connect_swapped(GTK_OBJECT(dialog), "response",
  4005. G_CALLBACK(gtk_widget_destroy),
  4006. GTK_OBJECT(dialog));
  4007. @@ -820,7 +752,6 @@
  4008. void on_single_clicked(GtkButton * button, gpointer user_data)
  4009. {
  4010. view_mode = SINGLE_VIEW;
  4011. - gtk_paned_set_position(GTK_PANED(hpaned), 0);
  4012. gtk_widget_hide(tree1_w);
  4013. current = &rootmenu;
  4014. display_tree_part();
  4015. @@ -846,7 +777,6 @@
  4016. void on_full_clicked(GtkButton * button, gpointer user_data)
  4017. {
  4018. view_mode = FULL_VIEW;
  4019. - gtk_paned_set_position(GTK_PANED(hpaned), 0);
  4020. gtk_widget_hide(tree1_w);
  4021. if (tree2)
  4022. gtk_tree_store_clear(tree2);
  4023. @@ -900,7 +830,7 @@
  4024. static void change_sym_value(struct menu *menu, gint col)
  4025. {
  4026. struct symbol *sym = menu->sym;
  4027. - tristate oldval, newval;
  4028. + tristate newval;
  4029. if (!sym)
  4030. return;
  4031. @@ -917,7 +847,6 @@
  4032. switch (sym_get_type(sym)) {
  4033. case S_BOOLEAN:
  4034. case S_TRISTATE:
  4035. - oldval = sym_get_tristate_value(sym);
  4036. if (!sym_tristate_within_range(sym, newval))
  4037. newval = yes;
  4038. sym_set_tristate_value(sym, newval);
  4039. @@ -954,35 +883,6 @@
  4040. display_tree_part(); //fixme: keep exp/coll
  4041. }
  4042. -static void renderer_toggled(GtkCellRendererToggle * cell,
  4043. - gchar * path_string, gpointer user_data)
  4044. -{
  4045. - GtkTreePath *path, *sel_path = NULL;
  4046. - GtkTreeIter iter, sel_iter;
  4047. - GtkTreeSelection *sel;
  4048. - struct menu *menu;
  4049. -
  4050. - path = gtk_tree_path_new_from_string(path_string);
  4051. - if (!gtk_tree_model_get_iter(model2, &iter, path))
  4052. - return;
  4053. -
  4054. - sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree2_w));
  4055. - if (gtk_tree_selection_get_selected(sel, NULL, &sel_iter))
  4056. - sel_path = gtk_tree_model_get_path(model2, &sel_iter);
  4057. - if (!sel_path)
  4058. - goto out1;
  4059. - if (gtk_tree_path_compare(path, sel_path))
  4060. - goto out2;
  4061. -
  4062. - gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1);
  4063. - toggle_sym_value(menu);
  4064. -
  4065. - out2:
  4066. - gtk_tree_path_free(sel_path);
  4067. - out1:
  4068. - gtk_tree_path_free(path);
  4069. -}
  4070. -
  4071. static gint column2index(GtkTreeViewColumn * column)
  4072. {
  4073. gint i;
  4074. @@ -1174,9 +1074,12 @@
  4075. row[COL_OPTION] =
  4076. g_strdup_printf("%s %s", _(menu_get_prompt(menu)),
  4077. - sym && sym_has_value(sym) ? "(NEW)" : "");
  4078. + sym && !sym_has_value(sym) ? "(NEW)" : "");
  4079. - if (show_all && !menu_is_visible(menu))
  4080. + if (opt_mode == OPT_ALL && !menu_is_visible(menu))
  4081. + row[COL_COLOR] = g_strdup("DarkGray");
  4082. + else if (opt_mode == OPT_PROMPT &&
  4083. + menu_has_prompt(menu) && !menu_is_visible(menu))
  4084. row[COL_COLOR] = g_strdup("DarkGray");
  4085. else
  4086. row[COL_COLOR] = g_strdup("Black");
  4087. @@ -1235,6 +1138,7 @@
  4088. row[COL_BTNVIS] = GINT_TO_POINTER(TRUE);
  4089. if (sym_is_choice(sym))
  4090. break;
  4091. + /* fall through */
  4092. case S_TRISTATE:
  4093. val = sym_get_tristate_value(sym);
  4094. switch (val) {
  4095. @@ -1373,7 +1277,6 @@
  4096. gboolean valid;
  4097. GtkTreeIter *sibling;
  4098. struct symbol *sym;
  4099. - struct property *prop;
  4100. struct menu *menu1, *menu2;
  4101. if (src == &rootmenu)
  4102. @@ -1382,7 +1285,6 @@
  4103. valid = gtk_tree_model_iter_children(model2, child2, dst);
  4104. for (child1 = src->list; child1; child1 = child1->next) {
  4105. - prop = child1->prompt;
  4106. sym = child1->sym;
  4107. reparse:
  4108. @@ -1399,16 +1301,20 @@
  4109. menu2 ? menu_get_prompt(menu2) : "nil");
  4110. #endif
  4111. - if (!menu_is_visible(child1) && !show_all) { // remove node
  4112. + if ((opt_mode == OPT_NORMAL && !menu_is_visible(child1)) ||
  4113. + (opt_mode == OPT_PROMPT && !menu_has_prompt(child1)) ||
  4114. + (opt_mode == OPT_ALL && !menu_get_prompt(child1))) {
  4115. +
  4116. + /* remove node */
  4117. if (gtktree_iter_find_node(dst, menu1) != NULL) {
  4118. memcpy(&tmp, child2, sizeof(GtkTreeIter));
  4119. valid = gtk_tree_model_iter_next(model2,
  4120. child2);
  4121. gtk_tree_store_remove(tree2, &tmp);
  4122. if (!valid)
  4123. - return; // next parent
  4124. + return; /* next parent */
  4125. else
  4126. - goto reparse; // next child
  4127. + goto reparse; /* next child */
  4128. } else
  4129. continue;
  4130. }
  4131. @@ -1477,17 +1383,19 @@
  4132. && (tree == tree2))
  4133. continue;
  4134. - if (menu_is_visible(child) || show_all)
  4135. + if ((opt_mode == OPT_NORMAL && menu_is_visible(child)) ||
  4136. + (opt_mode == OPT_PROMPT && menu_has_prompt(child)) ||
  4137. + (opt_mode == OPT_ALL && menu_get_prompt(child)))
  4138. place_node(child, fill_row(child));
  4139. #ifdef DEBUG
  4140. printf("%*c%s: ", indent, ' ', menu_get_prompt(child));
  4141. printf("%s", child->flags & MENU_ROOT ? "rootmenu | " : "");
  4142. - dbg_print_ptype(ptype);
  4143. + printf("%s", prop_get_type_name(ptype));
  4144. printf(" | ");
  4145. if (sym) {
  4146. - dbg_print_stype(sym->type);
  4147. + printf("%s", sym_type_name(sym->type));
  4148. printf(" | ");
  4149. - dbg_print_flags(sym->flags);
  4150. + printf("%s", dbg_sym_flags(sym->flags));
  4151. printf("\n");
  4152. } else
  4153. printf("\n");
  4154. @@ -1499,6 +1407,12 @@
  4155. if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT))
  4156. || (view_mode == FULL_VIEW)
  4157. || (view_mode == SPLIT_VIEW))*/
  4158. +
  4159. + /* Change paned position if the view is not in 'split mode' */
  4160. + if (view_mode == SINGLE_VIEW || view_mode == FULL_VIEW) {
  4161. + gtk_paned_set_position(GTK_PANED(hpaned), 0);
  4162. + }
  4163. +
  4164. if (((view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT))
  4165. || (view_mode == FULL_VIEW)
  4166. || (view_mode == SPLIT_VIEW)) {
  4167. @@ -1557,10 +1471,6 @@
  4168. char *env;
  4169. gchar *glade_file;
  4170. -#ifndef LKC_DIRECT_LINK
  4171. - kconfig_load();
  4172. -#endif
  4173. -
  4174. bindtextdomain(PACKAGE, LOCALEDIR);
  4175. bind_textdomain_codeset(PACKAGE, "UTF-8");
  4176. textdomain(PACKAGE);
  4177. @@ -1582,12 +1492,6 @@
  4178. else
  4179. glade_file = g_strconcat(g_get_current_dir(), "/", av[0], ".glade", NULL);
  4180. - /* Load the interface and connect signals */
  4181. - init_main_window(glade_file);
  4182. - init_tree_model();
  4183. - init_left_tree();
  4184. - init_right_tree();
  4185. -
  4186. /* Conf stuffs */
  4187. if (ac > 1 && av[1][0] == '-') {
  4188. switch (av[1][1]) {
  4189. @@ -1607,6 +1511,12 @@
  4190. fixup_rootmenu(&rootmenu);
  4191. conf_read(NULL);
  4192. + /* Load the interface and connect signals */
  4193. + init_main_window(glade_file);
  4194. + init_tree_model();
  4195. + init_left_tree();
  4196. + init_right_tree();
  4197. +
  4198. switch (view_mode) {
  4199. case SINGLE_VIEW:
  4200. display_tree_part();
  4201. diff -Nur uClibc-0.9.33.2/extra/config/gconf.glade uClibc-git/extra/config/gconf.glade
  4202. --- uClibc-0.9.33.2/extra/config/gconf.glade 2012-05-15 09:20:09.000000000 +0200
  4203. +++ uClibc-git/extra/config/gconf.glade 2014-07-25 20:36:04.853324457 +0200
  4204. @@ -1,11 +1,10 @@
  4205. <?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
  4206. -<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
  4207. <glade-interface>
  4208. <widget class="GtkWindow" id="window1">
  4209. <property name="visible">True</property>
  4210. - <property name="title" translatable="yes">Gtk uClibc Configurator</property>
  4211. + <property name="title" translatable="yes">Gtk uCLibc Configurator</property>
  4212. <property name="type">GTK_WINDOW_TOPLEVEL</property>
  4213. <property name="window_position">GTK_WIN_POS_NONE</property>
  4214. <property name="modal">False</property>
  4215. @@ -190,26 +189,40 @@
  4216. </child>
  4217. <child>
  4218. - <widget class="GtkCheckMenuItem" id="show_all_options1">
  4219. + <widget class="GtkRadioMenuItem" id="set_option_mode1">
  4220. + <property name="visible">True</property>
  4221. + <property name="tooltip" translatable="yes">Show normal options</property>
  4222. + <property name="label" translatable="yes">Show normal options</property>
  4223. + <property name="use_underline">True</property>
  4224. + <property name="active">True</property>
  4225. + <signal name="activate" handler="on_set_option_mode1_activate"/>
  4226. + </widget>
  4227. + </child>
  4228. +
  4229. + <child>
  4230. + <widget class="GtkRadioMenuItem" id="set_option_mode2">
  4231. <property name="visible">True</property>
  4232. <property name="tooltip" translatable="yes">Show all options</property>
  4233. <property name="label" translatable="yes">Show all _options</property>
  4234. <property name="use_underline">True</property>
  4235. <property name="active">False</property>
  4236. - <signal name="activate" handler="on_show_all_options1_activate"/>
  4237. + <property name="group">set_option_mode1</property>
  4238. + <signal name="activate" handler="on_set_option_mode2_activate"/>
  4239. </widget>
  4240. </child>
  4241. <child>
  4242. - <widget class="GtkCheckMenuItem" id="show_debug_info1">
  4243. + <widget class="GtkRadioMenuItem" id="set_option_mode3">
  4244. <property name="visible">True</property>
  4245. - <property name="tooltip" translatable="yes">Show masked options</property>
  4246. - <property name="label" translatable="yes">Show _debug info</property>
  4247. + <property name="tooltip" translatable="yes">Show all options with prompts</property>
  4248. + <property name="label" translatable="yes">Show all prompt options</property>
  4249. <property name="use_underline">True</property>
  4250. <property name="active">False</property>
  4251. - <signal name="activate" handler="on_show_debug_info1_activate"/>
  4252. + <property name="group">set_option_mode1</property>
  4253. + <signal name="activate" handler="on_set_option_mode3_activate"/>
  4254. </widget>
  4255. </child>
  4256. +
  4257. </widget>
  4258. </child>
  4259. </widget>
  4260. @@ -547,7 +560,7 @@
  4261. <property name="headers_visible">True</property>
  4262. <property name="rules_hint">False</property>
  4263. <property name="reorderable">False</property>
  4264. - <property name="enable_search">True</property>
  4265. + <property name="enable_search">False</property>
  4266. <signal name="cursor_changed" handler="on_treeview2_cursor_changed" last_modification_time="Sun, 12 Jan 2003 15:58:22 GMT"/>
  4267. <signal name="button_press_event" handler="on_treeview1_button_press_event" last_modification_time="Sun, 12 Jan 2003 16:03:52 GMT"/>
  4268. <signal name="key_press_event" handler="on_treeview2_key_press_event" last_modification_time="Sun, 12 Jan 2003 16:11:44 GMT"/>
  4269. @@ -582,7 +595,7 @@
  4270. <property name="headers_visible">True</property>
  4271. <property name="rules_hint">False</property>
  4272. <property name="reorderable">False</property>
  4273. - <property name="enable_search">True</property>
  4274. + <property name="enable_search">False</property>
  4275. <signal name="cursor_changed" handler="on_treeview2_cursor_changed" last_modification_time="Sun, 12 Jan 2003 15:57:55 GMT"/>
  4276. <signal name="button_press_event" handler="on_treeview2_button_press_event" last_modification_time="Sun, 12 Jan 2003 15:57:58 GMT"/>
  4277. <signal name="key_press_event" handler="on_treeview2_key_press_event" last_modification_time="Sun, 12 Jan 2003 15:58:01 GMT"/>
  4278. diff -Nur uClibc-0.9.33.2/extra/config/.gitignore uClibc-git/extra/config/.gitignore
  4279. --- uClibc-0.9.33.2/extra/config/.gitignore 2012-05-15 09:20:09.000000000 +0200
  4280. +++ uClibc-git/extra/config/.gitignore 2014-07-25 20:36:04.853324457 +0200
  4281. @@ -2,18 +2,21 @@
  4282. # Generated files
  4283. #
  4284. config*
  4285. -lex.*.c
  4286. +*.lex.c
  4287. *.tab.c
  4288. *.tab.h
  4289. zconf.hash.c
  4290. *.moc
  4291. -lkc_defs.h
  4292. +gconf.glade.h
  4293. +*.pot
  4294. +*.mo
  4295. #
  4296. # configuration programs
  4297. #
  4298. conf
  4299. mconf
  4300. +nconf
  4301. qconf
  4302. gconf
  4303. kxgettext
  4304. diff -Nur uClibc-0.9.33.2/extra/config/kconfig-language.txt uClibc-git/extra/config/kconfig-language.txt
  4305. --- uClibc-0.9.33.2/extra/config/kconfig-language.txt 2012-05-15 09:20:09.000000000 +0200
  4306. +++ uClibc-git/extra/config/kconfig-language.txt 2014-07-25 20:36:04.853324457 +0200
  4307. @@ -112,7 +112,13 @@
  4308. (no prompts anywhere) and for symbols with no dependencies.
  4309. That will limit the usefulness but on the other hand avoid
  4310. the illegal configurations all over.
  4311. - kconfig should one day warn about such things.
  4312. +
  4313. +- limiting menu display: "visible if" <expr>
  4314. + This attribute is only applicable to menu blocks, if the condition is
  4315. + false, the menu block is not displayed to the user (the symbols
  4316. + contained there can still be selected by other symbols, though). It is
  4317. + similar to a conditional "prompt" attribute for individual menu
  4318. + entries. Default value of "visible" is true.
  4319. - numerical ranges: "range" <symbol> <symbol> ["if" <expr>]
  4320. This allows to limit the range of possible input values for int
  4321. @@ -181,7 +187,7 @@
  4322. (7) Returns the result of max(/expr/, /expr/).
  4323. An expression can have a value of 'n', 'm' or 'y' (or 0, 1, 2
  4324. -respectively for calculations). A menu entry becomes visible when it's
  4325. +respectively for calculations). A menu entry becomes visible when its
  4326. expression evaluates to 'm' or 'y'.
  4327. There are two types of symbols: constant and non-constant symbols.
  4328. @@ -268,7 +274,7 @@
  4329. choices:
  4330. - "choice"
  4331. + "choice" [symbol]
  4332. <choice options>
  4333. <choice block>
  4334. "endchoice"
  4335. @@ -282,6 +288,10 @@
  4336. can be compiled as modules.
  4337. A choice accepts another option "optional", which allows to set the
  4338. choice to 'n' and no entry needs to be selected.
  4339. +If no [symbol] is associated with a choice, then you can not have multiple
  4340. +definitions of that choice. If a [symbol] is associated to the choice,
  4341. +then you may define the same choice (ie. with the same entries) in another
  4342. +place.
  4343. comment:
  4344. @@ -300,7 +310,8 @@
  4345. "endmenu"
  4346. This defines a menu block, see "Menu structure" above for more
  4347. -information. The only possible options are dependencies.
  4348. +information. The only possible options are dependencies and "visible"
  4349. +attributes.
  4350. if:
  4351. @@ -322,7 +333,8 @@
  4352. "mainmenu" <prompt>
  4353. This sets the config program's title bar if the config program chooses
  4354. -to use it.
  4355. +to use it. It should be placed at the top of the configuration, before any
  4356. +other statement.
  4357. Kconfig hints
  4358. @@ -376,4 +388,3 @@
  4359. depends on BAR && m
  4360. limits FOO to module (=m) or disabled (=n).
  4361. -
  4362. diff -Nur uClibc-0.9.33.2/extra/config/kconfig_load.c uClibc-git/extra/config/kconfig_load.c
  4363. --- uClibc-0.9.33.2/extra/config/kconfig_load.c 2012-05-15 09:20:09.000000000 +0200
  4364. +++ uClibc-git/extra/config/kconfig_load.c 1970-01-01 01:00:00.000000000 +0100
  4365. @@ -1,35 +0,0 @@
  4366. -#include <dlfcn.h>
  4367. -#include <stdio.h>
  4368. -#include <stdlib.h>
  4369. -
  4370. -#include "lkc.h"
  4371. -
  4372. -#define P(name,type,arg) type (*name ## _p) arg
  4373. -#include "lkc_proto.h"
  4374. -#undef P
  4375. -
  4376. -void kconfig_load(void)
  4377. -{
  4378. - void *handle;
  4379. - char *error;
  4380. -
  4381. - handle = dlopen("./libkconfig.so", RTLD_LAZY);
  4382. - if (!handle) {
  4383. - handle = dlopen("./scripts/kconfig/libkconfig.so", RTLD_LAZY);
  4384. - if (!handle) {
  4385. - fprintf(stderr, "%s\n", dlerror());
  4386. - exit(1);
  4387. - }
  4388. - }
  4389. -
  4390. -#define P(name,type,arg) \
  4391. -{ \
  4392. - name ## _p = dlsym(handle, #name); \
  4393. - if ((error = dlerror())) { \
  4394. - fprintf(stderr, "%s\n", error); \
  4395. - exit(1); \
  4396. - } \
  4397. -}
  4398. -#include "lkc_proto.h"
  4399. -#undef P
  4400. -}
  4401. Binärdateien uClibc-0.9.33.2/extra/config/kconfig-to-uclibc.patch.gz und uClibc-git/extra/config/kconfig-to-uclibc.patch.gz sind verschieden.
  4402. Binärdateien uClibc-0.9.33.2/extra/config/kconfig-to-uclibc.tar.gz und uClibc-git/extra/config/kconfig-to-uclibc.tar.gz sind verschieden.
  4403. diff -Nur uClibc-0.9.33.2/extra/config/kxgettext.c uClibc-git/extra/config/kxgettext.c
  4404. --- uClibc-0.9.33.2/extra/config/kxgettext.c 2012-05-15 09:20:09.000000000 +0200
  4405. +++ uClibc-git/extra/config/kxgettext.c 2014-07-25 20:36:04.853324457 +0200
  4406. @@ -7,7 +7,6 @@
  4407. #include <stdlib.h>
  4408. #include <string.h>
  4409. -#define LKC_DIRECT_LINK
  4410. #include "lkc.h"
  4411. static char *escape(const char* text, char *bf, int len)
  4412. @@ -43,6 +42,10 @@
  4413. ++text;
  4414. goto next;
  4415. }
  4416. + else if (*text == '\\') {
  4417. + *bfp++ = '\\';
  4418. + len--;
  4419. + }
  4420. *bfp++ = *text++;
  4421. next:
  4422. --len;
  4423. @@ -59,11 +62,11 @@
  4424. struct file_line {
  4425. struct file_line *next;
  4426. - char* file;
  4427. - int lineno;
  4428. + const char *file;
  4429. + int lineno;
  4430. };
  4431. -static struct file_line *file_line__new(char *file, int lineno)
  4432. +static struct file_line *file_line__new(const char *file, int lineno)
  4433. {
  4434. struct file_line *self = malloc(sizeof(*self));
  4435. @@ -86,7 +89,8 @@
  4436. static struct message *message__list;
  4437. -static struct message *message__new(const char *msg, char *option, char *file, int lineno)
  4438. +static struct message *message__new(const char *msg, char *option,
  4439. + const char *file, int lineno)
  4440. {
  4441. struct message *self = malloc(sizeof(*self));
  4442. @@ -126,7 +130,8 @@
  4443. return m;
  4444. }
  4445. -static int message__add_file_line(struct message *self, char *file, int lineno)
  4446. +static int message__add_file_line(struct message *self, const char *file,
  4447. + int lineno)
  4448. {
  4449. int rc = -1;
  4450. struct file_line *fl = file_line__new(file, lineno);
  4451. @@ -141,7 +146,8 @@
  4452. return rc;
  4453. }
  4454. -static int message__add(const char *msg, char *option, char *file, int lineno)
  4455. +static int message__add(const char *msg, char *option, const char *file,
  4456. + int lineno)
  4457. {
  4458. int rc = 0;
  4459. char bf[16384];
  4460. @@ -162,7 +168,7 @@
  4461. return rc;
  4462. }
  4463. -void menu_build_message_list(struct menu *menu)
  4464. +static void menu_build_message_list(struct menu *menu)
  4465. {
  4466. struct menu *child;
  4467. @@ -207,7 +213,7 @@
  4468. "msgstr \"\"\n", self->msg);
  4469. }
  4470. -void menu__xgettext(void)
  4471. +static void menu__xgettext(void)
  4472. {
  4473. struct message *m = message__list;
  4474. diff -Nur uClibc-0.9.33.2/extra/config/lex.zconf.c_shipped uClibc-git/extra/config/lex.zconf.c_shipped
  4475. --- uClibc-0.9.33.2/extra/config/lex.zconf.c_shipped 2012-05-15 09:20:09.000000000 +0200
  4476. +++ uClibc-git/extra/config/lex.zconf.c_shipped 1970-01-01 01:00:00.000000000 +0100
  4477. @@ -1,2416 +0,0 @@
  4478. -
  4479. -#line 3 "scripts/kconfig/lex.zconf.c"
  4480. -
  4481. -#define YY_INT_ALIGNED short int
  4482. -
  4483. -/* A lexical scanner generated by flex */
  4484. -
  4485. -#define yy_create_buffer zconf_create_buffer
  4486. -#define yy_delete_buffer zconf_delete_buffer
  4487. -#define yy_flex_debug zconf_flex_debug
  4488. -#define yy_init_buffer zconf_init_buffer
  4489. -#define yy_flush_buffer zconf_flush_buffer
  4490. -#define yy_load_buffer_state zconf_load_buffer_state
  4491. -#define yy_switch_to_buffer zconf_switch_to_buffer
  4492. -#define yyin zconfin
  4493. -#define yyleng zconfleng
  4494. -#define yylex zconflex
  4495. -#define yylineno zconflineno
  4496. -#define yyout zconfout
  4497. -#define yyrestart zconfrestart
  4498. -#define yytext zconftext
  4499. -#define yywrap zconfwrap
  4500. -#define yyalloc zconfalloc
  4501. -#define yyrealloc zconfrealloc
  4502. -#define yyfree zconffree
  4503. -
  4504. -#define FLEX_SCANNER
  4505. -#define YY_FLEX_MAJOR_VERSION 2
  4506. -#define YY_FLEX_MINOR_VERSION 5
  4507. -#define YY_FLEX_SUBMINOR_VERSION 35
  4508. -#if YY_FLEX_SUBMINOR_VERSION > 0
  4509. -#define FLEX_BETA
  4510. -#endif
  4511. -
  4512. -/* First, we deal with platform-specific or compiler-specific issues. */
  4513. -
  4514. -/* begin standard C headers. */
  4515. -#include <stdio.h>
  4516. -#include <string.h>
  4517. -#include <errno.h>
  4518. -#include <stdlib.h>
  4519. -
  4520. -/* end standard C headers. */
  4521. -
  4522. -/* flex integer type definitions */
  4523. -
  4524. -#ifndef FLEXINT_H
  4525. -#define FLEXINT_H
  4526. -
  4527. -/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
  4528. -
  4529. -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  4530. -
  4531. -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
  4532. - * if you want the limit (max/min) macros for int types.
  4533. - */
  4534. -#ifndef __STDC_LIMIT_MACROS
  4535. -#define __STDC_LIMIT_MACROS 1
  4536. -#endif
  4537. -
  4538. -#include <inttypes.h>
  4539. -typedef int8_t flex_int8_t;
  4540. -typedef uint8_t flex_uint8_t;
  4541. -typedef int16_t flex_int16_t;
  4542. -typedef uint16_t flex_uint16_t;
  4543. -typedef int32_t flex_int32_t;
  4544. -typedef uint32_t flex_uint32_t;
  4545. -#else
  4546. -typedef signed char flex_int8_t;
  4547. -typedef short int flex_int16_t;
  4548. -typedef int flex_int32_t;
  4549. -typedef unsigned char flex_uint8_t;
  4550. -typedef unsigned short int flex_uint16_t;
  4551. -typedef unsigned int flex_uint32_t;
  4552. -
  4553. -/* Limits of integral types. */
  4554. -#ifndef INT8_MIN
  4555. -#define INT8_MIN (-128)
  4556. -#endif
  4557. -#ifndef INT16_MIN
  4558. -#define INT16_MIN (-32767-1)
  4559. -#endif
  4560. -#ifndef INT32_MIN
  4561. -#define INT32_MIN (-2147483647-1)
  4562. -#endif
  4563. -#ifndef INT8_MAX
  4564. -#define INT8_MAX (127)
  4565. -#endif
  4566. -#ifndef INT16_MAX
  4567. -#define INT16_MAX (32767)
  4568. -#endif
  4569. -#ifndef INT32_MAX
  4570. -#define INT32_MAX (2147483647)
  4571. -#endif
  4572. -#ifndef UINT8_MAX
  4573. -#define UINT8_MAX (255U)
  4574. -#endif
  4575. -#ifndef UINT16_MAX
  4576. -#define UINT16_MAX (65535U)
  4577. -#endif
  4578. -#ifndef UINT32_MAX
  4579. -#define UINT32_MAX (4294967295U)
  4580. -#endif
  4581. -
  4582. -#endif /* ! C99 */
  4583. -
  4584. -#endif /* ! FLEXINT_H */
  4585. -
  4586. -#ifdef __cplusplus
  4587. -
  4588. -/* The "const" storage-class-modifier is valid. */
  4589. -#define YY_USE_CONST
  4590. -
  4591. -#else /* ! __cplusplus */
  4592. -
  4593. -/* C99 requires __STDC__ to be defined as 1. */
  4594. -#if defined (__STDC__)
  4595. -
  4596. -#define YY_USE_CONST
  4597. -
  4598. -#endif /* defined (__STDC__) */
  4599. -#endif /* ! __cplusplus */
  4600. -
  4601. -#ifdef YY_USE_CONST
  4602. -#define yyconst const
  4603. -#else
  4604. -#define yyconst
  4605. -#endif
  4606. -
  4607. -/* Returned upon end-of-file. */
  4608. -#define YY_NULL 0
  4609. -
  4610. -/* Promotes a possibly negative, possibly signed char to an unsigned
  4611. - * integer for use as an array index. If the signed char is negative,
  4612. - * we want to instead treat it as an 8-bit unsigned char, hence the
  4613. - * double cast.
  4614. - */
  4615. -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
  4616. -
  4617. -/* Enter a start condition. This macro really ought to take a parameter,
  4618. - * but we do it the disgusting crufty way forced on us by the ()-less
  4619. - * definition of BEGIN.
  4620. - */
  4621. -#define BEGIN (yy_start) = 1 + 2 *
  4622. -
  4623. -/* Translate the current start state into a value that can be later handed
  4624. - * to BEGIN to return to the state. The YYSTATE alias is for lex
  4625. - * compatibility.
  4626. - */
  4627. -#define YY_START (((yy_start) - 1) / 2)
  4628. -#define YYSTATE YY_START
  4629. -
  4630. -/* Action number for EOF rule of a given start state. */
  4631. -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  4632. -
  4633. -/* Special action meaning "start processing a new file". */
  4634. -#define YY_NEW_FILE zconfrestart(zconfin )
  4635. -
  4636. -#define YY_END_OF_BUFFER_CHAR 0
  4637. -
  4638. -/* Size of default input buffer. */
  4639. -#ifndef YY_BUF_SIZE
  4640. -#define YY_BUF_SIZE 16384
  4641. -#endif
  4642. -
  4643. -/* The state buf must be large enough to hold one state per character in the main buffer.
  4644. - */
  4645. -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
  4646. -
  4647. -#ifndef YY_TYPEDEF_YY_BUFFER_STATE
  4648. -#define YY_TYPEDEF_YY_BUFFER_STATE
  4649. -typedef struct yy_buffer_state *YY_BUFFER_STATE;
  4650. -#endif
  4651. -
  4652. -extern int zconfleng;
  4653. -
  4654. -extern FILE *zconfin, *zconfout;
  4655. -
  4656. -#define EOB_ACT_CONTINUE_SCAN 0
  4657. -#define EOB_ACT_END_OF_FILE 1
  4658. -#define EOB_ACT_LAST_MATCH 2
  4659. -
  4660. - #define YY_LESS_LINENO(n)
  4661. -
  4662. -/* Return all but the first "n" matched characters back to the input stream. */
  4663. -#define yyless(n) \
  4664. - do \
  4665. - { \
  4666. - /* Undo effects of setting up zconftext. */ \
  4667. - int yyless_macro_arg = (n); \
  4668. - YY_LESS_LINENO(yyless_macro_arg);\
  4669. - *yy_cp = (yy_hold_char); \
  4670. - YY_RESTORE_YY_MORE_OFFSET \
  4671. - (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
  4672. - YY_DO_BEFORE_ACTION; /* set up zconftext again */ \
  4673. - } \
  4674. - while ( 0 )
  4675. -
  4676. -#define unput(c) yyunput( c, (yytext_ptr) )
  4677. -
  4678. -#ifndef YY_TYPEDEF_YY_SIZE_T
  4679. -#define YY_TYPEDEF_YY_SIZE_T
  4680. -typedef size_t yy_size_t;
  4681. -#endif
  4682. -
  4683. -#ifndef YY_STRUCT_YY_BUFFER_STATE
  4684. -#define YY_STRUCT_YY_BUFFER_STATE
  4685. -struct yy_buffer_state
  4686. - {
  4687. - FILE *yy_input_file;
  4688. -
  4689. - char *yy_ch_buf; /* input buffer */
  4690. - char *yy_buf_pos; /* current position in input buffer */
  4691. -
  4692. - /* Size of input buffer in bytes, not including room for EOB
  4693. - * characters.
  4694. - */
  4695. - yy_size_t yy_buf_size;
  4696. -
  4697. - /* Number of characters read into yy_ch_buf, not including EOB
  4698. - * characters.
  4699. - */
  4700. - int yy_n_chars;
  4701. -
  4702. - /* Whether we "own" the buffer - i.e., we know we created it,
  4703. - * and can realloc() it to grow it, and should free() it to
  4704. - * delete it.
  4705. - */
  4706. - int yy_is_our_buffer;
  4707. -
  4708. - /* Whether this is an "interactive" input source; if so, and
  4709. - * if we're using stdio for input, then we want to use getc()
  4710. - * instead of fread(), to make sure we stop fetching input after
  4711. - * each newline.
  4712. - */
  4713. - int yy_is_interactive;
  4714. -
  4715. - /* Whether we're considered to be at the beginning of a line.
  4716. - * If so, '^' rules will be active on the next match, otherwise
  4717. - * not.
  4718. - */
  4719. - int yy_at_bol;
  4720. -
  4721. - int yy_bs_lineno; /**< The line count. */
  4722. - int yy_bs_column; /**< The column count. */
  4723. -
  4724. - /* Whether to try to fill the input buffer when we reach the
  4725. - * end of it.
  4726. - */
  4727. - int yy_fill_buffer;
  4728. -
  4729. - int yy_buffer_status;
  4730. -
  4731. -#define YY_BUFFER_NEW 0
  4732. -#define YY_BUFFER_NORMAL 1
  4733. - /* When an EOF's been seen but there's still some text to process
  4734. - * then we mark the buffer as YY_EOF_PENDING, to indicate that we
  4735. - * shouldn't try reading from the input source any more. We might
  4736. - * still have a bunch of tokens to match, though, because of
  4737. - * possible backing-up.
  4738. - *
  4739. - * When we actually see the EOF, we change the status to "new"
  4740. - * (via zconfrestart()), so that the user can continue scanning by
  4741. - * just pointing zconfin at a new input file.
  4742. - */
  4743. -#define YY_BUFFER_EOF_PENDING 2
  4744. -
  4745. - };
  4746. -#endif /* !YY_STRUCT_YY_BUFFER_STATE */
  4747. -
  4748. -/* Stack of input buffers. */
  4749. -static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
  4750. -static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
  4751. -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
  4752. -
  4753. -/* We provide macros for accessing buffer states in case in the
  4754. - * future we want to put the buffer states in a more general
  4755. - * "scanner state".
  4756. - *
  4757. - * Returns the top of the stack, or NULL.
  4758. - */
  4759. -#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
  4760. - ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
  4761. - : NULL)
  4762. -
  4763. -/* Same as previous macro, but useful when we know that the buffer stack is not
  4764. - * NULL or when we need an lvalue. For internal use only.
  4765. - */
  4766. -#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
  4767. -
  4768. -/* yy_hold_char holds the character lost when zconftext is formed. */
  4769. -static char yy_hold_char;
  4770. -static int yy_n_chars; /* number of characters read into yy_ch_buf */
  4771. -int zconfleng;
  4772. -
  4773. -/* Points to current character in buffer. */
  4774. -static char *yy_c_buf_p = (char *) 0;
  4775. -static int yy_init = 0; /* whether we need to initialize */
  4776. -static int yy_start = 0; /* start state number */
  4777. -
  4778. -/* Flag which is used to allow zconfwrap()'s to do buffer switches
  4779. - * instead of setting up a fresh zconfin. A bit of a hack ...
  4780. - */
  4781. -static int yy_did_buffer_switch_on_eof;
  4782. -
  4783. -void zconfrestart (FILE *input_file );
  4784. -void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer );
  4785. -YY_BUFFER_STATE zconf_create_buffer (FILE *file,int size );
  4786. -void zconf_delete_buffer (YY_BUFFER_STATE b );
  4787. -void zconf_flush_buffer (YY_BUFFER_STATE b );
  4788. -void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer );
  4789. -void zconfpop_buffer_state (void );
  4790. -
  4791. -static void zconfensure_buffer_stack (void );
  4792. -static void zconf_load_buffer_state (void );
  4793. -static void zconf_init_buffer (YY_BUFFER_STATE b,FILE *file );
  4794. -
  4795. -#define YY_FLUSH_BUFFER zconf_flush_buffer(YY_CURRENT_BUFFER )
  4796. -
  4797. -YY_BUFFER_STATE zconf_scan_buffer (char *base,yy_size_t size );
  4798. -YY_BUFFER_STATE zconf_scan_string (yyconst char *yy_str );
  4799. -YY_BUFFER_STATE zconf_scan_bytes (yyconst char *bytes,int len );
  4800. -
  4801. -void *zconfalloc (yy_size_t );
  4802. -void *zconfrealloc (void *,yy_size_t );
  4803. -void zconffree (void * );
  4804. -
  4805. -#define yy_new_buffer zconf_create_buffer
  4806. -
  4807. -#define yy_set_interactive(is_interactive) \
  4808. - { \
  4809. - if ( ! YY_CURRENT_BUFFER ){ \
  4810. - zconfensure_buffer_stack (); \
  4811. - YY_CURRENT_BUFFER_LVALUE = \
  4812. - zconf_create_buffer(zconfin,YY_BUF_SIZE ); \
  4813. - } \
  4814. - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
  4815. - }
  4816. -
  4817. -#define yy_set_bol(at_bol) \
  4818. - { \
  4819. - if ( ! YY_CURRENT_BUFFER ){\
  4820. - zconfensure_buffer_stack (); \
  4821. - YY_CURRENT_BUFFER_LVALUE = \
  4822. - zconf_create_buffer(zconfin,YY_BUF_SIZE ); \
  4823. - } \
  4824. - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
  4825. - }
  4826. -
  4827. -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
  4828. -
  4829. -/* Begin user sect3 */
  4830. -
  4831. -#define zconfwrap(n) 1
  4832. -#define YY_SKIP_YYWRAP
  4833. -
  4834. -typedef unsigned char YY_CHAR;
  4835. -
  4836. -FILE *zconfin = (FILE *) 0, *zconfout = (FILE *) 0;
  4837. -
  4838. -typedef int yy_state_type;
  4839. -
  4840. -extern int zconflineno;
  4841. -
  4842. -int zconflineno = 1;
  4843. -
  4844. -extern char *zconftext;
  4845. -#define yytext_ptr zconftext
  4846. -static yyconst flex_int16_t yy_nxt[][17] =
  4847. - {
  4848. - {
  4849. - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  4850. - 0, 0, 0, 0, 0, 0, 0
  4851. - },
  4852. -
  4853. - {
  4854. - 11, 12, 13, 14, 12, 12, 15, 12, 12, 12,
  4855. - 12, 12, 12, 12, 12, 12, 12
  4856. - },
  4857. -
  4858. - {
  4859. - 11, 12, 13, 14, 12, 12, 15, 12, 12, 12,
  4860. - 12, 12, 12, 12, 12, 12, 12
  4861. - },
  4862. -
  4863. - {
  4864. - 11, 16, 16, 17, 16, 16, 16, 16, 16, 16,
  4865. - 16, 16, 16, 18, 16, 16, 16
  4866. - },
  4867. -
  4868. - {
  4869. - 11, 16, 16, 17, 16, 16, 16, 16, 16, 16,
  4870. - 16, 16, 16, 18, 16, 16, 16
  4871. -
  4872. - },
  4873. -
  4874. - {
  4875. - 11, 19, 20, 21, 19, 19, 19, 19, 19, 19,
  4876. - 19, 19, 19, 19, 19, 19, 19
  4877. - },
  4878. -
  4879. - {
  4880. - 11, 19, 20, 21, 19, 19, 19, 19, 19, 19,
  4881. - 19, 19, 19, 19, 19, 19, 19
  4882. - },
  4883. -
  4884. - {
  4885. - 11, 22, 22, 23, 22, 24, 22, 22, 24, 22,
  4886. - 22, 22, 22, 22, 22, 25, 22
  4887. - },
  4888. -
  4889. - {
  4890. - 11, 22, 22, 23, 22, 24, 22, 22, 24, 22,
  4891. - 22, 22, 22, 22, 22, 25, 22
  4892. - },
  4893. -
  4894. - {
  4895. - 11, 26, 26, 27, 28, 29, 30, 31, 29, 32,
  4896. - 33, 34, 35, 35, 36, 37, 38
  4897. -
  4898. - },
  4899. -
  4900. - {
  4901. - 11, 26, 26, 27, 28, 29, 30, 31, 29, 32,
  4902. - 33, 34, 35, 35, 36, 37, 38
  4903. - },
  4904. -
  4905. - {
  4906. - -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
  4907. - -11, -11, -11, -11, -11, -11, -11
  4908. - },
  4909. -
  4910. - {
  4911. - 11, -12, -12, -12, -12, -12, -12, -12, -12, -12,
  4912. - -12, -12, -12, -12, -12, -12, -12
  4913. - },
  4914. -
  4915. - {
  4916. - 11, -13, 39, 40, -13, -13, 41, -13, -13, -13,
  4917. - -13, -13, -13, -13, -13, -13, -13
  4918. - },
  4919. -
  4920. - {
  4921. - 11, -14, -14, -14, -14, -14, -14, -14, -14, -14,
  4922. - -14, -14, -14, -14, -14, -14, -14
  4923. -
  4924. - },
  4925. -
  4926. - {
  4927. - 11, 42, 42, 43, 42, 42, 42, 42, 42, 42,
  4928. - 42, 42, 42, 42, 42, 42, 42
  4929. - },
  4930. -
  4931. - {
  4932. - 11, -16, -16, -16, -16, -16, -16, -16, -16, -16,
  4933. - -16, -16, -16, -16, -16, -16, -16
  4934. - },
  4935. -
  4936. - {
  4937. - 11, -17, -17, -17, -17, -17, -17, -17, -17, -17,
  4938. - -17, -17, -17, -17, -17, -17, -17
  4939. - },
  4940. -
  4941. - {
  4942. - 11, -18, -18, -18, -18, -18, -18, -18, -18, -18,
  4943. - -18, -18, -18, 44, -18, -18, -18
  4944. - },
  4945. -
  4946. - {
  4947. - 11, 45, 45, -19, 45, 45, 45, 45, 45, 45,
  4948. - 45, 45, 45, 45, 45, 45, 45
  4949. -
  4950. - },
  4951. -
  4952. - {
  4953. - 11, -20, 46, 47, -20, -20, -20, -20, -20, -20,
  4954. - -20, -20, -20, -20, -20, -20, -20
  4955. - },
  4956. -
  4957. - {
  4958. - 11, 48, -21, -21, 48, 48, 48, 48, 48, 48,
  4959. - 48, 48, 48, 48, 48, 48, 48
  4960. - },
  4961. -
  4962. - {
  4963. - 11, 49, 49, 50, 49, -22, 49, 49, -22, 49,
  4964. - 49, 49, 49, 49, 49, -22, 49
  4965. - },
  4966. -
  4967. - {
  4968. - 11, -23, -23, -23, -23, -23, -23, -23, -23, -23,
  4969. - -23, -23, -23, -23, -23, -23, -23
  4970. - },
  4971. -
  4972. - {
  4973. - 11, -24, -24, -24, -24, -24, -24, -24, -24, -24,
  4974. - -24, -24, -24, -24, -24, -24, -24
  4975. -
  4976. - },
  4977. -
  4978. - {
  4979. - 11, 51, 51, 52, 51, 51, 51, 51, 51, 51,
  4980. - 51, 51, 51, 51, 51, 51, 51
  4981. - },
  4982. -
  4983. - {
  4984. - 11, -26, -26, -26, -26, -26, -26, -26, -26, -26,
  4985. - -26, -26, -26, -26, -26, -26, -26
  4986. - },
  4987. -
  4988. - {
  4989. - 11, -27, -27, -27, -27, -27, -27, -27, -27, -27,
  4990. - -27, -27, -27, -27, -27, -27, -27
  4991. - },
  4992. -
  4993. - {
  4994. - 11, -28, -28, -28, -28, -28, -28, -28, -28, -28,
  4995. - -28, -28, -28, -28, 53, -28, -28
  4996. - },
  4997. -
  4998. - {
  4999. - 11, -29, -29, -29, -29, -29, -29, -29, -29, -29,
  5000. - -29, -29, -29, -29, -29, -29, -29
  5001. -
  5002. - },
  5003. -
  5004. - {
  5005. - 11, 54, 54, -30, 54, 54, 54, 54, 54, 54,
  5006. - 54, 54, 54, 54, 54, 54, 54
  5007. - },
  5008. -
  5009. - {
  5010. - 11, -31, -31, -31, -31, -31, -31, 55, -31, -31,
  5011. - -31, -31, -31, -31, -31, -31, -31
  5012. - },
  5013. -
  5014. - {
  5015. - 11, -32, -32, -32, -32, -32, -32, -32, -32, -32,
  5016. - -32, -32, -32, -32, -32, -32, -32
  5017. - },
  5018. -
  5019. - {
  5020. - 11, -33, -33, -33, -33, -33, -33, -33, -33, -33,
  5021. - -33, -33, -33, -33, -33, -33, -33
  5022. - },
  5023. -
  5024. - {
  5025. - 11, -34, -34, -34, -34, -34, -34, -34, -34, -34,
  5026. - -34, 56, 57, 57, -34, -34, -34
  5027. -
  5028. - },
  5029. -
  5030. - {
  5031. - 11, -35, -35, -35, -35, -35, -35, -35, -35, -35,
  5032. - -35, 57, 57, 57, -35, -35, -35
  5033. - },
  5034. -
  5035. - {
  5036. - 11, -36, -36, -36, -36, -36, -36, -36, -36, -36,
  5037. - -36, -36, -36, -36, -36, -36, -36
  5038. - },
  5039. -
  5040. - {
  5041. - 11, -37, -37, 58, -37, -37, -37, -37, -37, -37,
  5042. - -37, -37, -37, -37, -37, -37, -37
  5043. - },
  5044. -
  5045. - {
  5046. - 11, -38, -38, -38, -38, -38, -38, -38, -38, -38,
  5047. - -38, -38, -38, -38, -38, -38, 59
  5048. - },
  5049. -
  5050. - {
  5051. - 11, -39, 39, 40, -39, -39, 41, -39, -39, -39,
  5052. - -39, -39, -39, -39, -39, -39, -39
  5053. -
  5054. - },
  5055. -
  5056. - {
  5057. - 11, -40, -40, -40, -40, -40, -40, -40, -40, -40,
  5058. - -40, -40, -40, -40, -40, -40, -40
  5059. - },
  5060. -
  5061. - {
  5062. - 11, 42, 42, 43, 42, 42, 42, 42, 42, 42,
  5063. - 42, 42, 42, 42, 42, 42, 42
  5064. - },
  5065. -
  5066. - {
  5067. - 11, 42, 42, 43, 42, 42, 42, 42, 42, 42,
  5068. - 42, 42, 42, 42, 42, 42, 42
  5069. - },
  5070. -
  5071. - {
  5072. - 11, -43, -43, -43, -43, -43, -43, -43, -43, -43,
  5073. - -43, -43, -43, -43, -43, -43, -43
  5074. - },
  5075. -
  5076. - {
  5077. - 11, -44, -44, -44, -44, -44, -44, -44, -44, -44,
  5078. - -44, -44, -44, 44, -44, -44, -44
  5079. -
  5080. - },
  5081. -
  5082. - {
  5083. - 11, 45, 45, -45, 45, 45, 45, 45, 45, 45,
  5084. - 45, 45, 45, 45, 45, 45, 45
  5085. - },
  5086. -
  5087. - {
  5088. - 11, -46, 46, 47, -46, -46, -46, -46, -46, -46,
  5089. - -46, -46, -46, -46, -46, -46, -46
  5090. - },
  5091. -
  5092. - {
  5093. - 11, 48, -47, -47, 48, 48, 48, 48, 48, 48,
  5094. - 48, 48, 48, 48, 48, 48, 48
  5095. - },
  5096. -
  5097. - {
  5098. - 11, -48, -48, -48, -48, -48, -48, -48, -48, -48,
  5099. - -48, -48, -48, -48, -48, -48, -48
  5100. - },
  5101. -
  5102. - {
  5103. - 11, 49, 49, 50, 49, -49, 49, 49, -49, 49,
  5104. - 49, 49, 49, 49, 49, -49, 49
  5105. -
  5106. - },
  5107. -
  5108. - {
  5109. - 11, -50, -50, -50, -50, -50, -50, -50, -50, -50,
  5110. - -50, -50, -50, -50, -50, -50, -50
  5111. - },
  5112. -
  5113. - {
  5114. - 11, -51, -51, 52, -51, -51, -51, -51, -51, -51,
  5115. - -51, -51, -51, -51, -51, -51, -51
  5116. - },
  5117. -
  5118. - {
  5119. - 11, -52, -52, -52, -52, -52, -52, -52, -52, -52,
  5120. - -52, -52, -52, -52, -52, -52, -52
  5121. - },
  5122. -
  5123. - {
  5124. - 11, -53, -53, -53, -53, -53, -53, -53, -53, -53,
  5125. - -53, -53, -53, -53, -53, -53, -53
  5126. - },
  5127. -
  5128. - {
  5129. - 11, 54, 54, -54, 54, 54, 54, 54, 54, 54,
  5130. - 54, 54, 54, 54, 54, 54, 54
  5131. -
  5132. - },
  5133. -
  5134. - {
  5135. - 11, -55, -55, -55, -55, -55, -55, -55, -55, -55,
  5136. - -55, -55, -55, -55, -55, -55, -55
  5137. - },
  5138. -
  5139. - {
  5140. - 11, -56, -56, -56, -56, -56, -56, -56, -56, -56,
  5141. - -56, 60, 57, 57, -56, -56, -56
  5142. - },
  5143. -
  5144. - {
  5145. - 11, -57, -57, -57, -57, -57, -57, -57, -57, -57,
  5146. - -57, 57, 57, 57, -57, -57, -57
  5147. - },
  5148. -
  5149. - {
  5150. - 11, -58, -58, -58, -58, -58, -58, -58, -58, -58,
  5151. - -58, -58, -58, -58, -58, -58, -58
  5152. - },
  5153. -
  5154. - {
  5155. - 11, -59, -59, -59, -59, -59, -59, -59, -59, -59,
  5156. - -59, -59, -59, -59, -59, -59, -59
  5157. -
  5158. - },
  5159. -
  5160. - {
  5161. - 11, -60, -60, -60, -60, -60, -60, -60, -60, -60,
  5162. - -60, 57, 57, 57, -60, -60, -60
  5163. - },
  5164. -
  5165. - } ;
  5166. -
  5167. -static yy_state_type yy_get_previous_state (void );
  5168. -static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
  5169. -static int yy_get_next_buffer (void );
  5170. -static void yy_fatal_error (yyconst char msg[] );
  5171. -
  5172. -/* Done after the current pattern has been matched and before the
  5173. - * corresponding action - sets up zconftext.
  5174. - */
  5175. -#define YY_DO_BEFORE_ACTION \
  5176. - (yytext_ptr) = yy_bp; \
  5177. - zconfleng = (size_t) (yy_cp - yy_bp); \
  5178. - (yy_hold_char) = *yy_cp; \
  5179. - *yy_cp = '\0'; \
  5180. - (yy_c_buf_p) = yy_cp;
  5181. -
  5182. -#define YY_NUM_RULES 33
  5183. -#define YY_END_OF_BUFFER 34
  5184. -/* This struct is not used in this scanner,
  5185. - but its presence is necessary. */
  5186. -struct yy_trans_info
  5187. - {
  5188. - flex_int32_t yy_verify;
  5189. - flex_int32_t yy_nxt;
  5190. - };
  5191. -static yyconst flex_int16_t yy_accept[61] =
  5192. - { 0,
  5193. - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  5194. - 34, 5, 4, 2, 3, 7, 8, 6, 32, 29,
  5195. - 31, 24, 28, 27, 26, 22, 17, 13, 16, 20,
  5196. - 22, 11, 12, 19, 19, 14, 22, 22, 4, 2,
  5197. - 3, 3, 1, 6, 32, 29, 31, 30, 24, 23,
  5198. - 26, 25, 15, 20, 9, 19, 19, 21, 10, 18
  5199. - } ;
  5200. -
  5201. -static yyconst flex_int32_t yy_ec[256] =
  5202. - { 0,
  5203. - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
  5204. - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  5205. - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  5206. - 1, 2, 4, 5, 6, 1, 1, 7, 8, 9,
  5207. - 10, 1, 1, 1, 11, 12, 12, 13, 13, 13,
  5208. - 13, 13, 13, 13, 13, 13, 13, 1, 1, 1,
  5209. - 14, 1, 1, 1, 13, 13, 13, 13, 13, 13,
  5210. - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
  5211. - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
  5212. - 1, 15, 1, 1, 13, 1, 13, 13, 13, 13,
  5213. -
  5214. - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
  5215. - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
  5216. - 13, 13, 1, 16, 1, 1, 1, 1, 1, 1,
  5217. - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  5218. - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  5219. - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  5220. - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  5221. - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  5222. - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  5223. - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  5224. -
  5225. - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  5226. - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  5227. - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  5228. - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  5229. - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  5230. - 1, 1, 1, 1, 1
  5231. - } ;
  5232. -
  5233. -extern int zconf_flex_debug;
  5234. -int zconf_flex_debug = 0;
  5235. -
  5236. -/* The intent behind this definition is that it'll catch
  5237. - * any uses of REJECT which flex missed.
  5238. - */
  5239. -#define REJECT reject_used_but_not_detected
  5240. -#define yymore() yymore_used_but_not_detected
  5241. -#define YY_MORE_ADJ 0
  5242. -#define YY_RESTORE_YY_MORE_OFFSET
  5243. -char *zconftext;
  5244. -#define YY_NO_INPUT 1
  5245. -
  5246. -/*
  5247. - * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
  5248. - * Released under the terms of the GNU GPL v2.0.
  5249. - */
  5250. -
  5251. -#include <limits.h>
  5252. -#include <stdio.h>
  5253. -#include <stdlib.h>
  5254. -#include <string.h>
  5255. -#include <unistd.h>
  5256. -
  5257. -#define LKC_DIRECT_LINK
  5258. -#include "lkc.h"
  5259. -
  5260. -#define START_STRSIZE 16
  5261. -
  5262. -static struct {
  5263. - struct file *file;
  5264. - int lineno;
  5265. -} current_pos;
  5266. -
  5267. -static char *text;
  5268. -static int text_size, text_asize;
  5269. -
  5270. -struct buffer {
  5271. - struct buffer *parent;
  5272. - YY_BUFFER_STATE state;
  5273. -};
  5274. -
  5275. -struct buffer *current_buf;
  5276. -
  5277. -static int last_ts, first_ts;
  5278. -
  5279. -static void zconf_endhelp(void);
  5280. -static void zconf_endfile(void);
  5281. -
  5282. -void new_string(void)
  5283. -{
  5284. - text = malloc(START_STRSIZE);
  5285. - text_asize = START_STRSIZE;
  5286. - text_size = 0;
  5287. - *text = 0;
  5288. -}
  5289. -
  5290. -void append_string(const char *str, int size)
  5291. -{
  5292. - int new_size = text_size + size + 1;
  5293. - if (new_size > text_asize) {
  5294. - new_size += START_STRSIZE - 1;
  5295. - new_size &= -START_STRSIZE;
  5296. - text = realloc(text, new_size);
  5297. - text_asize = new_size;
  5298. - }
  5299. - memcpy(text + text_size, str, size);
  5300. - text_size += size;
  5301. - text[text_size] = 0;
  5302. -}
  5303. -
  5304. -void alloc_string(const char *str, int size)
  5305. -{
  5306. - text = malloc(size + 1);
  5307. - memcpy(text, str, size);
  5308. - text[size] = 0;
  5309. -}
  5310. -
  5311. -#define INITIAL 0
  5312. -#define COMMAND 1
  5313. -#define HELP 2
  5314. -#define STRING 3
  5315. -#define PARAM 4
  5316. -
  5317. -#ifndef YY_NO_UNISTD_H
  5318. -/* Special case for "unistd.h", since it is non-ANSI. We include it way
  5319. - * down here because we want the user's section 1 to have been scanned first.
  5320. - * The user has a chance to override it with an option.
  5321. - */
  5322. -#include <unistd.h>
  5323. -#endif
  5324. -
  5325. -#ifndef YY_EXTRA_TYPE
  5326. -#define YY_EXTRA_TYPE void *
  5327. -#endif
  5328. -
  5329. -static int yy_init_globals (void );
  5330. -
  5331. -/* Accessor methods to globals.
  5332. - These are made visible to non-reentrant scanners for convenience. */
  5333. -
  5334. -int zconflex_destroy (void );
  5335. -
  5336. -int zconfget_debug (void );
  5337. -
  5338. -void zconfset_debug (int debug_flag );
  5339. -
  5340. -YY_EXTRA_TYPE zconfget_extra (void );
  5341. -
  5342. -void zconfset_extra (YY_EXTRA_TYPE user_defined );
  5343. -
  5344. -FILE *zconfget_in (void );
  5345. -
  5346. -void zconfset_in (FILE * in_str );
  5347. -
  5348. -FILE *zconfget_out (void );
  5349. -
  5350. -void zconfset_out (FILE * out_str );
  5351. -
  5352. -int zconfget_leng (void );
  5353. -
  5354. -char *zconfget_text (void );
  5355. -
  5356. -int zconfget_lineno (void );
  5357. -
  5358. -void zconfset_lineno (int line_number );
  5359. -
  5360. -/* Macros after this point can all be overridden by user definitions in
  5361. - * section 1.
  5362. - */
  5363. -
  5364. -#ifndef YY_SKIP_YYWRAP
  5365. -#ifdef __cplusplus
  5366. -extern "C" int zconfwrap (void );
  5367. -#else
  5368. -extern int zconfwrap (void );
  5369. -#endif
  5370. -#endif
  5371. -
  5372. - static void yyunput (int c,char *buf_ptr );
  5373. -
  5374. -#ifndef yytext_ptr
  5375. -static void yy_flex_strncpy (char *,yyconst char *,int );
  5376. -#endif
  5377. -
  5378. -#ifdef YY_NEED_STRLEN
  5379. -static int yy_flex_strlen (yyconst char * );
  5380. -#endif
  5381. -
  5382. -#ifndef YY_NO_INPUT
  5383. -
  5384. -#ifdef __cplusplus
  5385. -static int yyinput (void );
  5386. -#else
  5387. -static int input (void );
  5388. -#endif
  5389. -
  5390. -#endif
  5391. -
  5392. -/* Amount of stuff to slurp up with each read. */
  5393. -#ifndef YY_READ_BUF_SIZE
  5394. -#define YY_READ_BUF_SIZE 8192
  5395. -#endif
  5396. -
  5397. -/* Copy whatever the last rule matched to the standard output. */
  5398. -#ifndef ECHO
  5399. -/* This used to be an fputs(), but since the string might contain NUL's,
  5400. - * we now use fwrite().
  5401. - */
  5402. -#define ECHO fwrite( zconftext, zconfleng, 1, zconfout )
  5403. -#endif
  5404. -
  5405. -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
  5406. - * is returned in "result".
  5407. - */
  5408. -#ifndef YY_INPUT
  5409. -#define YY_INPUT(buf,result,max_size) \
  5410. - errno=0; \
  5411. - while ( (result = read( fileno(zconfin), (char *) buf, max_size )) < 0 ) \
  5412. - { \
  5413. - if( errno != EINTR) \
  5414. - { \
  5415. - YY_FATAL_ERROR( "input in flex scanner failed" ); \
  5416. - break; \
  5417. - } \
  5418. - errno=0; \
  5419. - clearerr(zconfin); \
  5420. - }\
  5421. -\
  5422. -
  5423. -#endif
  5424. -
  5425. -/* No semi-colon after return; correct usage is to write "yyterminate();" -
  5426. - * we don't want an extra ';' after the "return" because that will cause
  5427. - * some compilers to complain about unreachable statements.
  5428. - */
  5429. -#ifndef yyterminate
  5430. -#define yyterminate() return YY_NULL
  5431. -#endif
  5432. -
  5433. -/* Number of entries by which start-condition stack grows. */
  5434. -#ifndef YY_START_STACK_INCR
  5435. -#define YY_START_STACK_INCR 25
  5436. -#endif
  5437. -
  5438. -/* Report a fatal error. */
  5439. -#ifndef YY_FATAL_ERROR
  5440. -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
  5441. -#endif
  5442. -
  5443. -/* end tables serialization structures and prototypes */
  5444. -
  5445. -/* Default declaration of generated scanner - a define so the user can
  5446. - * easily add parameters.
  5447. - */
  5448. -#ifndef YY_DECL
  5449. -#define YY_DECL_IS_OURS 1
  5450. -
  5451. -extern int zconflex (void);
  5452. -
  5453. -#define YY_DECL int zconflex (void)
  5454. -#endif /* !YY_DECL */
  5455. -
  5456. -/* Code executed at the beginning of each rule, after zconftext and zconfleng
  5457. - * have been set up.
  5458. - */
  5459. -#ifndef YY_USER_ACTION
  5460. -#define YY_USER_ACTION
  5461. -#endif
  5462. -
  5463. -/* Code executed at the end of each rule. */
  5464. -#ifndef YY_BREAK
  5465. -#define YY_BREAK break;
  5466. -#endif
  5467. -
  5468. -#define YY_RULE_SETUP \
  5469. - YY_USER_ACTION
  5470. -
  5471. -/** The main scanner function which does all the work.
  5472. - */
  5473. -YY_DECL
  5474. -{
  5475. - register yy_state_type yy_current_state;
  5476. - register char *yy_cp, *yy_bp;
  5477. - register int yy_act;
  5478. -
  5479. - int str = 0;
  5480. - int ts, i;
  5481. -
  5482. - if ( !(yy_init) )
  5483. - {
  5484. - (yy_init) = 1;
  5485. -
  5486. -#ifdef YY_USER_INIT
  5487. - YY_USER_INIT;
  5488. -#endif
  5489. -
  5490. - if ( ! (yy_start) )
  5491. - (yy_start) = 1; /* first start state */
  5492. -
  5493. - if ( ! zconfin )
  5494. - zconfin = stdin;
  5495. -
  5496. - if ( ! zconfout )
  5497. - zconfout = stdout;
  5498. -
  5499. - if ( ! YY_CURRENT_BUFFER ) {
  5500. - zconfensure_buffer_stack ();
  5501. - YY_CURRENT_BUFFER_LVALUE =
  5502. - zconf_create_buffer(zconfin,YY_BUF_SIZE );
  5503. - }
  5504. -
  5505. - zconf_load_buffer_state( );
  5506. - }
  5507. -
  5508. - while ( 1 ) /* loops until end-of-file is reached */
  5509. - {
  5510. - yy_cp = (yy_c_buf_p);
  5511. -
  5512. - /* Support of zconftext. */
  5513. - *yy_cp = (yy_hold_char);
  5514. -
  5515. - /* yy_bp points to the position in yy_ch_buf of the start of
  5516. - * the current run.
  5517. - */
  5518. - yy_bp = yy_cp;
  5519. -
  5520. - yy_current_state = (yy_start);
  5521. -yy_match:
  5522. - while ( (yy_current_state = yy_nxt[yy_current_state][ yy_ec[YY_SC_TO_UI(*yy_cp)] ]) > 0 )
  5523. - ++yy_cp;
  5524. -
  5525. - yy_current_state = -yy_current_state;
  5526. -
  5527. -yy_find_action:
  5528. - yy_act = yy_accept[yy_current_state];
  5529. -
  5530. - YY_DO_BEFORE_ACTION;
  5531. -
  5532. -do_action: /* This label is used only to access EOF actions. */
  5533. -
  5534. - switch ( yy_act )
  5535. - { /* beginning of action switch */
  5536. -case 1:
  5537. -/* rule 1 can match eol */
  5538. -case 2:
  5539. -/* rule 2 can match eol */
  5540. -YY_RULE_SETUP
  5541. -{
  5542. - current_file->lineno++;
  5543. - return T_EOL;
  5544. -}
  5545. - YY_BREAK
  5546. -case 3:
  5547. -YY_RULE_SETUP
  5548. -
  5549. - YY_BREAK
  5550. -case 4:
  5551. -YY_RULE_SETUP
  5552. -{
  5553. - BEGIN(COMMAND);
  5554. -}
  5555. - YY_BREAK
  5556. -case 5:
  5557. -YY_RULE_SETUP
  5558. -{
  5559. - unput(zconftext[0]);
  5560. - BEGIN(COMMAND);
  5561. -}
  5562. - YY_BREAK
  5563. -
  5564. -case 6:
  5565. -YY_RULE_SETUP
  5566. -{
  5567. - struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
  5568. - BEGIN(PARAM);
  5569. - current_pos.file = current_file;
  5570. - current_pos.lineno = current_file->lineno;
  5571. - if (id && id->flags & TF_COMMAND) {
  5572. - zconflval.id = id;
  5573. - return id->token;
  5574. - }
  5575. - alloc_string(zconftext, zconfleng);
  5576. - zconflval.string = text;
  5577. - return T_WORD;
  5578. - }
  5579. - YY_BREAK
  5580. -case 7:
  5581. -YY_RULE_SETUP
  5582. -
  5583. - YY_BREAK
  5584. -case 8:
  5585. -/* rule 8 can match eol */
  5586. -YY_RULE_SETUP
  5587. -{
  5588. - BEGIN(INITIAL);
  5589. - current_file->lineno++;
  5590. - return T_EOL;
  5591. - }
  5592. - YY_BREAK
  5593. -
  5594. -case 9:
  5595. -YY_RULE_SETUP
  5596. -return T_AND;
  5597. - YY_BREAK
  5598. -case 10:
  5599. -YY_RULE_SETUP
  5600. -return T_OR;
  5601. - YY_BREAK
  5602. -case 11:
  5603. -YY_RULE_SETUP
  5604. -return T_OPEN_PAREN;
  5605. - YY_BREAK
  5606. -case 12:
  5607. -YY_RULE_SETUP
  5608. -return T_CLOSE_PAREN;
  5609. - YY_BREAK
  5610. -case 13:
  5611. -YY_RULE_SETUP
  5612. -return T_NOT;
  5613. - YY_BREAK
  5614. -case 14:
  5615. -YY_RULE_SETUP
  5616. -return T_EQUAL;
  5617. - YY_BREAK
  5618. -case 15:
  5619. -YY_RULE_SETUP
  5620. -return T_UNEQUAL;
  5621. - YY_BREAK
  5622. -case 16:
  5623. -YY_RULE_SETUP
  5624. -{
  5625. - str = zconftext[0];
  5626. - new_string();
  5627. - BEGIN(STRING);
  5628. - }
  5629. - YY_BREAK
  5630. -case 17:
  5631. -/* rule 17 can match eol */
  5632. -YY_RULE_SETUP
  5633. -BEGIN(INITIAL); current_file->lineno++; return T_EOL;
  5634. - YY_BREAK
  5635. -case 18:
  5636. -YY_RULE_SETUP
  5637. -/* ignore */
  5638. - YY_BREAK
  5639. -case 19:
  5640. -YY_RULE_SETUP
  5641. -{
  5642. - struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
  5643. - if (id && id->flags & TF_PARAM) {
  5644. - zconflval.id = id;
  5645. - return id->token;
  5646. - }
  5647. - alloc_string(zconftext, zconfleng);
  5648. - zconflval.string = text;
  5649. - return T_WORD;
  5650. - }
  5651. - YY_BREAK
  5652. -case 20:
  5653. -YY_RULE_SETUP
  5654. -/* comment */
  5655. - YY_BREAK
  5656. -case 21:
  5657. -/* rule 21 can match eol */
  5658. -YY_RULE_SETUP
  5659. -current_file->lineno++;
  5660. - YY_BREAK
  5661. -case 22:
  5662. -YY_RULE_SETUP
  5663. -
  5664. - YY_BREAK
  5665. -case YY_STATE_EOF(PARAM):
  5666. -{
  5667. - BEGIN(INITIAL);
  5668. - }
  5669. - YY_BREAK
  5670. -
  5671. -case 23:
  5672. -/* rule 23 can match eol */
  5673. -*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */
  5674. -(yy_c_buf_p) = yy_cp -= 1;
  5675. -YY_DO_BEFORE_ACTION; /* set up zconftext again */
  5676. -YY_RULE_SETUP
  5677. -{
  5678. - append_string(zconftext, zconfleng);
  5679. - zconflval.string = text;
  5680. - return T_WORD_QUOTE;
  5681. - }
  5682. - YY_BREAK
  5683. -case 24:
  5684. -YY_RULE_SETUP
  5685. -{
  5686. - append_string(zconftext, zconfleng);
  5687. - }
  5688. - YY_BREAK
  5689. -case 25:
  5690. -/* rule 25 can match eol */
  5691. -*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */
  5692. -(yy_c_buf_p) = yy_cp -= 1;
  5693. -YY_DO_BEFORE_ACTION; /* set up zconftext again */
  5694. -YY_RULE_SETUP
  5695. -{
  5696. - append_string(zconftext + 1, zconfleng - 1);
  5697. - zconflval.string = text;
  5698. - return T_WORD_QUOTE;
  5699. - }
  5700. - YY_BREAK
  5701. -case 26:
  5702. -YY_RULE_SETUP
  5703. -{
  5704. - append_string(zconftext + 1, zconfleng - 1);
  5705. - }
  5706. - YY_BREAK
  5707. -case 27:
  5708. -YY_RULE_SETUP
  5709. -{
  5710. - if (str == zconftext[0]) {
  5711. - BEGIN(PARAM);
  5712. - zconflval.string = text;
  5713. - return T_WORD_QUOTE;
  5714. - } else
  5715. - append_string(zconftext, 1);
  5716. - }
  5717. - YY_BREAK
  5718. -case 28:
  5719. -/* rule 28 can match eol */
  5720. -YY_RULE_SETUP
  5721. -{
  5722. - printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno());
  5723. - current_file->lineno++;
  5724. - BEGIN(INITIAL);
  5725. - return T_EOL;
  5726. - }
  5727. - YY_BREAK
  5728. -case YY_STATE_EOF(STRING):
  5729. -{
  5730. - BEGIN(INITIAL);
  5731. - }
  5732. - YY_BREAK
  5733. -
  5734. -case 29:
  5735. -YY_RULE_SETUP
  5736. -{
  5737. - ts = 0;
  5738. - for (i = 0; i < zconfleng; i++) {
  5739. - if (zconftext[i] == '\t')
  5740. - ts = (ts & ~7) + 8;
  5741. - else
  5742. - ts++;
  5743. - }
  5744. - last_ts = ts;
  5745. - if (first_ts) {
  5746. - if (ts < first_ts) {
  5747. - zconf_endhelp();
  5748. - return T_HELPTEXT;
  5749. - }
  5750. - ts -= first_ts;
  5751. - while (ts > 8) {
  5752. - append_string(" ", 8);
  5753. - ts -= 8;
  5754. - }
  5755. - append_string(" ", ts);
  5756. - }
  5757. - }
  5758. - YY_BREAK
  5759. -case 30:
  5760. -/* rule 30 can match eol */
  5761. -*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */
  5762. -(yy_c_buf_p) = yy_cp -= 1;
  5763. -YY_DO_BEFORE_ACTION; /* set up zconftext again */
  5764. -YY_RULE_SETUP
  5765. -{
  5766. - current_file->lineno++;
  5767. - zconf_endhelp();
  5768. - return T_HELPTEXT;
  5769. - }
  5770. - YY_BREAK
  5771. -case 31:
  5772. -/* rule 31 can match eol */
  5773. -YY_RULE_SETUP
  5774. -{
  5775. - current_file->lineno++;
  5776. - append_string("\n", 1);
  5777. - }
  5778. - YY_BREAK
  5779. -case 32:
  5780. -YY_RULE_SETUP
  5781. -{
  5782. - while (zconfleng) {
  5783. - if ((zconftext[zconfleng-1] != ' ') && (zconftext[zconfleng-1] != '\t'))
  5784. - break;
  5785. - zconfleng--;
  5786. - }
  5787. - append_string(zconftext, zconfleng);
  5788. - if (!first_ts)
  5789. - first_ts = last_ts;
  5790. - }
  5791. - YY_BREAK
  5792. -case YY_STATE_EOF(HELP):
  5793. -{
  5794. - zconf_endhelp();
  5795. - return T_HELPTEXT;
  5796. - }
  5797. - YY_BREAK
  5798. -
  5799. -case YY_STATE_EOF(INITIAL):
  5800. -case YY_STATE_EOF(COMMAND):
  5801. -{
  5802. - if (current_file) {
  5803. - zconf_endfile();
  5804. - return T_EOL;
  5805. - }
  5806. - fclose(zconfin);
  5807. - yyterminate();
  5808. -}
  5809. - YY_BREAK
  5810. -case 33:
  5811. -YY_RULE_SETUP
  5812. -YY_FATAL_ERROR( "flex scanner jammed" );
  5813. - YY_BREAK
  5814. -
  5815. - case YY_END_OF_BUFFER:
  5816. - {
  5817. - /* Amount of text matched not including the EOB char. */
  5818. - int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
  5819. -
  5820. - /* Undo the effects of YY_DO_BEFORE_ACTION. */
  5821. - *yy_cp = (yy_hold_char);
  5822. - YY_RESTORE_YY_MORE_OFFSET
  5823. -
  5824. - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
  5825. - {
  5826. - /* We're scanning a new file or input source. It's
  5827. - * possible that this happened because the user
  5828. - * just pointed zconfin at a new source and called
  5829. - * zconflex(). If so, then we have to assure
  5830. - * consistency between YY_CURRENT_BUFFER and our
  5831. - * globals. Here is the right place to do so, because
  5832. - * this is the first action (other than possibly a
  5833. - * back-up) that will match for the new input source.
  5834. - */
  5835. - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
  5836. - YY_CURRENT_BUFFER_LVALUE->yy_input_file = zconfin;
  5837. - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
  5838. - }
  5839. -
  5840. - /* Note that here we test for yy_c_buf_p "<=" to the position
  5841. - * of the first EOB in the buffer, since yy_c_buf_p will
  5842. - * already have been incremented past the NUL character
  5843. - * (since all states make transitions on EOB to the
  5844. - * end-of-buffer state). Contrast this with the test
  5845. - * in input().
  5846. - */
  5847. - if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
  5848. - { /* This was really a NUL. */
  5849. - yy_state_type yy_next_state;
  5850. -
  5851. - (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
  5852. -
  5853. - yy_current_state = yy_get_previous_state( );
  5854. -
  5855. - /* Okay, we're now positioned to make the NUL
  5856. - * transition. We couldn't have
  5857. - * yy_get_previous_state() go ahead and do it
  5858. - * for us because it doesn't know how to deal
  5859. - * with the possibility of jamming (and we don't
  5860. - * want to build jamming into it because then it
  5861. - * will run more slowly).
  5862. - */
  5863. -
  5864. - yy_next_state = yy_try_NUL_trans( yy_current_state );
  5865. -
  5866. - yy_bp = (yytext_ptr) + YY_MORE_ADJ;
  5867. -
  5868. - if ( yy_next_state )
  5869. - {
  5870. - /* Consume the NUL. */
  5871. - yy_cp = ++(yy_c_buf_p);
  5872. - yy_current_state = yy_next_state;
  5873. - goto yy_match;
  5874. - }
  5875. -
  5876. - else
  5877. - {
  5878. - yy_cp = (yy_c_buf_p);
  5879. - goto yy_find_action;
  5880. - }
  5881. - }
  5882. -
  5883. - else switch ( yy_get_next_buffer( ) )
  5884. - {
  5885. - case EOB_ACT_END_OF_FILE:
  5886. - {
  5887. - (yy_did_buffer_switch_on_eof) = 0;
  5888. -
  5889. - if ( zconfwrap( ) )
  5890. - {
  5891. - /* Note: because we've taken care in
  5892. - * yy_get_next_buffer() to have set up
  5893. - * zconftext, we can now set up
  5894. - * yy_c_buf_p so that if some total
  5895. - * hoser (like flex itself) wants to
  5896. - * call the scanner after we return the
  5897. - * YY_NULL, it'll still work - another
  5898. - * YY_NULL will get returned.
  5899. - */
  5900. - (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
  5901. -
  5902. - yy_act = YY_STATE_EOF(YY_START);
  5903. - goto do_action;
  5904. - }
  5905. -
  5906. - else
  5907. - {
  5908. - if ( ! (yy_did_buffer_switch_on_eof) )
  5909. - YY_NEW_FILE;
  5910. - }
  5911. - break;
  5912. - }
  5913. -
  5914. - case EOB_ACT_CONTINUE_SCAN:
  5915. - (yy_c_buf_p) =
  5916. - (yytext_ptr) + yy_amount_of_matched_text;
  5917. -
  5918. - yy_current_state = yy_get_previous_state( );
  5919. -
  5920. - yy_cp = (yy_c_buf_p);
  5921. - yy_bp = (yytext_ptr) + YY_MORE_ADJ;
  5922. - goto yy_match;
  5923. -
  5924. - case EOB_ACT_LAST_MATCH:
  5925. - (yy_c_buf_p) =
  5926. - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
  5927. -
  5928. - yy_current_state = yy_get_previous_state( );
  5929. -
  5930. - yy_cp = (yy_c_buf_p);
  5931. - yy_bp = (yytext_ptr) + YY_MORE_ADJ;
  5932. - goto yy_find_action;
  5933. - }
  5934. - break;
  5935. - }
  5936. -
  5937. - default:
  5938. - YY_FATAL_ERROR(
  5939. - "fatal flex scanner internal error--no action found" );
  5940. - } /* end of action switch */
  5941. - } /* end of scanning one token */
  5942. -} /* end of zconflex */
  5943. -
  5944. -/* yy_get_next_buffer - try to read in a new buffer
  5945. - *
  5946. - * Returns a code representing an action:
  5947. - * EOB_ACT_LAST_MATCH -
  5948. - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  5949. - * EOB_ACT_END_OF_FILE - end of file
  5950. - */
  5951. -static int yy_get_next_buffer (void)
  5952. -{
  5953. - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
  5954. - register char *source = (yytext_ptr);
  5955. - register int number_to_move, i;
  5956. - int ret_val;
  5957. -
  5958. - if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
  5959. - YY_FATAL_ERROR(
  5960. - "fatal flex scanner internal error--end of buffer missed" );
  5961. -
  5962. - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
  5963. - { /* Don't try to fill the buffer, so this is an EOF. */
  5964. - if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
  5965. - {
  5966. - /* We matched a single character, the EOB, so
  5967. - * treat this as a final EOF.
  5968. - */
  5969. - return EOB_ACT_END_OF_FILE;
  5970. - }
  5971. -
  5972. - else
  5973. - {
  5974. - /* We matched some text prior to the EOB, first
  5975. - * process it.
  5976. - */
  5977. - return EOB_ACT_LAST_MATCH;
  5978. - }
  5979. - }
  5980. -
  5981. - /* Try to read more data. */
  5982. -
  5983. - /* First move last chars to start of buffer. */
  5984. - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
  5985. -
  5986. - for ( i = 0; i < number_to_move; ++i )
  5987. - *(dest++) = *(source++);
  5988. -
  5989. - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
  5990. - /* don't do the read, it's not guaranteed to return an EOF,
  5991. - * just force an EOF
  5992. - */
  5993. - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
  5994. -
  5995. - else
  5996. - {
  5997. - int num_to_read =
  5998. - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
  5999. -
  6000. - while ( num_to_read <= 0 )
  6001. - { /* Not enough room in the buffer - grow it. */
  6002. -
  6003. - /* just a shorter name for the current buffer */
  6004. - YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
  6005. -
  6006. - int yy_c_buf_p_offset =
  6007. - (int) ((yy_c_buf_p) - b->yy_ch_buf);
  6008. -
  6009. - if ( b->yy_is_our_buffer )
  6010. - {
  6011. - int new_size = b->yy_buf_size * 2;
  6012. -
  6013. - if ( new_size <= 0 )
  6014. - b->yy_buf_size += b->yy_buf_size / 8;
  6015. - else
  6016. - b->yy_buf_size *= 2;
  6017. -
  6018. - b->yy_ch_buf = (char *)
  6019. - /* Include room in for 2 EOB chars. */
  6020. - zconfrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
  6021. - }
  6022. - else
  6023. - /* Can't grow it, we don't own it. */
  6024. - b->yy_ch_buf = 0;
  6025. -
  6026. - if ( ! b->yy_ch_buf )
  6027. - YY_FATAL_ERROR(
  6028. - "fatal error - scanner input buffer overflow" );
  6029. -
  6030. - (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
  6031. -
  6032. - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
  6033. - number_to_move - 1;
  6034. -
  6035. - }
  6036. -
  6037. - if ( num_to_read > YY_READ_BUF_SIZE )
  6038. - num_to_read = YY_READ_BUF_SIZE;
  6039. -
  6040. - /* Read in more data. */
  6041. - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
  6042. - (yy_n_chars), (size_t) num_to_read );
  6043. -
  6044. - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
  6045. - }
  6046. -
  6047. - if ( (yy_n_chars) == 0 )
  6048. - {
  6049. - if ( number_to_move == YY_MORE_ADJ )
  6050. - {
  6051. - ret_val = EOB_ACT_END_OF_FILE;
  6052. - zconfrestart(zconfin );
  6053. - }
  6054. -
  6055. - else
  6056. - {
  6057. - ret_val = EOB_ACT_LAST_MATCH;
  6058. - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
  6059. - YY_BUFFER_EOF_PENDING;
  6060. - }
  6061. - }
  6062. -
  6063. - else
  6064. - ret_val = EOB_ACT_CONTINUE_SCAN;
  6065. -
  6066. - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
  6067. - /* Extend the array by 50%, plus the number we really need. */
  6068. - yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
  6069. - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) zconfrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
  6070. - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
  6071. - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
  6072. - }
  6073. -
  6074. - (yy_n_chars) += number_to_move;
  6075. - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
  6076. - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
  6077. -
  6078. - (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
  6079. -
  6080. - return ret_val;
  6081. -}
  6082. -
  6083. -/* yy_get_previous_state - get the state just before the EOB char was reached */
  6084. -
  6085. - static yy_state_type yy_get_previous_state (void)
  6086. -{
  6087. - register yy_state_type yy_current_state;
  6088. - register char *yy_cp;
  6089. -
  6090. - yy_current_state = (yy_start);
  6091. -
  6092. - for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
  6093. - {
  6094. - yy_current_state = yy_nxt[yy_current_state][(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1)];
  6095. - }
  6096. -
  6097. - return yy_current_state;
  6098. -}
  6099. -
  6100. -/* yy_try_NUL_trans - try to make a transition on the NUL character
  6101. - *
  6102. - * synopsis
  6103. - * next_state = yy_try_NUL_trans( current_state );
  6104. - */
  6105. - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
  6106. -{
  6107. - register int yy_is_jam;
  6108. -
  6109. - yy_current_state = yy_nxt[yy_current_state][1];
  6110. - yy_is_jam = (yy_current_state <= 0);
  6111. -
  6112. - return yy_is_jam ? 0 : yy_current_state;
  6113. -}
  6114. -
  6115. - static void yyunput (int c, register char * yy_bp )
  6116. -{
  6117. - register char *yy_cp;
  6118. -
  6119. - yy_cp = (yy_c_buf_p);
  6120. -
  6121. - /* undo effects of setting up zconftext */
  6122. - *yy_cp = (yy_hold_char);
  6123. -
  6124. - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
  6125. - { /* need to shift things up to make room */
  6126. - /* +2 for EOB chars. */
  6127. - register int number_to_move = (yy_n_chars) + 2;
  6128. - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
  6129. - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
  6130. - register char *source =
  6131. - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
  6132. -
  6133. - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
  6134. - *--dest = *--source;
  6135. -
  6136. - yy_cp += (int) (dest - source);
  6137. - yy_bp += (int) (dest - source);
  6138. - YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
  6139. - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
  6140. -
  6141. - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
  6142. - YY_FATAL_ERROR( "flex scanner push-back overflow" );
  6143. - }
  6144. -
  6145. - *--yy_cp = (char) c;
  6146. -
  6147. - (yytext_ptr) = yy_bp;
  6148. - (yy_hold_char) = *yy_cp;
  6149. - (yy_c_buf_p) = yy_cp;
  6150. -}
  6151. -
  6152. -#ifndef YY_NO_INPUT
  6153. -#ifdef __cplusplus
  6154. - static int yyinput (void)
  6155. -#else
  6156. - static int input (void)
  6157. -#endif
  6158. -
  6159. -{
  6160. - int c;
  6161. -
  6162. - *(yy_c_buf_p) = (yy_hold_char);
  6163. -
  6164. - if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
  6165. - {
  6166. - /* yy_c_buf_p now points to the character we want to return.
  6167. - * If this occurs *before* the EOB characters, then it's a
  6168. - * valid NUL; if not, then we've hit the end of the buffer.
  6169. - */
  6170. - if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
  6171. - /* This was really a NUL. */
  6172. - *(yy_c_buf_p) = '\0';
  6173. -
  6174. - else
  6175. - { /* need more input */
  6176. - int offset = (yy_c_buf_p) - (yytext_ptr);
  6177. - ++(yy_c_buf_p);
  6178. -
  6179. - switch ( yy_get_next_buffer( ) )
  6180. - {
  6181. - case EOB_ACT_LAST_MATCH:
  6182. - /* This happens because yy_g_n_b()
  6183. - * sees that we've accumulated a
  6184. - * token and flags that we need to
  6185. - * try matching the token before
  6186. - * proceeding. But for input(),
  6187. - * there's no matching to consider.
  6188. - * So convert the EOB_ACT_LAST_MATCH
  6189. - * to EOB_ACT_END_OF_FILE.
  6190. - */
  6191. -
  6192. - /* Reset buffer status. */
  6193. - zconfrestart(zconfin );
  6194. -
  6195. - /*FALLTHROUGH*/
  6196. -
  6197. - case EOB_ACT_END_OF_FILE:
  6198. - {
  6199. - if ( zconfwrap( ) )
  6200. - return EOF;
  6201. -
  6202. - if ( ! (yy_did_buffer_switch_on_eof) )
  6203. - YY_NEW_FILE;
  6204. -#ifdef __cplusplus
  6205. - return yyinput();
  6206. -#else
  6207. - return input();
  6208. -#endif
  6209. - }
  6210. -
  6211. - case EOB_ACT_CONTINUE_SCAN:
  6212. - (yy_c_buf_p) = (yytext_ptr) + offset;
  6213. - break;
  6214. - }
  6215. - }
  6216. - }
  6217. -
  6218. - c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
  6219. - *(yy_c_buf_p) = '\0'; /* preserve zconftext */
  6220. - (yy_hold_char) = *++(yy_c_buf_p);
  6221. -
  6222. - return c;
  6223. -}
  6224. -#endif /* ifndef YY_NO_INPUT */
  6225. -
  6226. -/** Immediately switch to a different input stream.
  6227. - * @param input_file A readable stream.
  6228. - *
  6229. - * @note This function does not reset the start condition to @c INITIAL .
  6230. - */
  6231. - void zconfrestart (FILE * input_file )
  6232. -{
  6233. -
  6234. - if ( ! YY_CURRENT_BUFFER ){
  6235. - zconfensure_buffer_stack ();
  6236. - YY_CURRENT_BUFFER_LVALUE =
  6237. - zconf_create_buffer(zconfin,YY_BUF_SIZE );
  6238. - }
  6239. -
  6240. - zconf_init_buffer(YY_CURRENT_BUFFER,input_file );
  6241. - zconf_load_buffer_state( );
  6242. -}
  6243. -
  6244. -/** Switch to a different input buffer.
  6245. - * @param new_buffer The new input buffer.
  6246. - *
  6247. - */
  6248. - void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer )
  6249. -{
  6250. -
  6251. - /* TODO. We should be able to replace this entire function body
  6252. - * with
  6253. - * zconfpop_buffer_state();
  6254. - * zconfpush_buffer_state(new_buffer);
  6255. - */
  6256. - zconfensure_buffer_stack ();
  6257. - if ( YY_CURRENT_BUFFER == new_buffer )
  6258. - return;
  6259. -
  6260. - if ( YY_CURRENT_BUFFER )
  6261. - {
  6262. - /* Flush out information for old buffer. */
  6263. - *(yy_c_buf_p) = (yy_hold_char);
  6264. - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
  6265. - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
  6266. - }
  6267. -
  6268. - YY_CURRENT_BUFFER_LVALUE = new_buffer;
  6269. - zconf_load_buffer_state( );
  6270. -
  6271. - /* We don't actually know whether we did this switch during
  6272. - * EOF (zconfwrap()) processing, but the only time this flag
  6273. - * is looked at is after zconfwrap() is called, so it's safe
  6274. - * to go ahead and always set it.
  6275. - */
  6276. - (yy_did_buffer_switch_on_eof) = 1;
  6277. -}
  6278. -
  6279. -static void zconf_load_buffer_state (void)
  6280. -{
  6281. - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
  6282. - (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
  6283. - zconfin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
  6284. - (yy_hold_char) = *(yy_c_buf_p);
  6285. -}
  6286. -
  6287. -/** Allocate and initialize an input buffer state.
  6288. - * @param file A readable stream.
  6289. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
  6290. - *
  6291. - * @return the allocated buffer state.
  6292. - */
  6293. - YY_BUFFER_STATE zconf_create_buffer (FILE * file, int size )
  6294. -{
  6295. - YY_BUFFER_STATE b;
  6296. -
  6297. - b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) );
  6298. - if ( ! b )
  6299. - YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" );
  6300. -
  6301. - b->yy_buf_size = size;
  6302. -
  6303. - /* yy_ch_buf has to be 2 characters longer than the size given because
  6304. - * we need to put in 2 end-of-buffer characters.
  6305. - */
  6306. - b->yy_ch_buf = (char *) zconfalloc(b->yy_buf_size + 2 );
  6307. - if ( ! b->yy_ch_buf )
  6308. - YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" );
  6309. -
  6310. - b->yy_is_our_buffer = 1;
  6311. -
  6312. - zconf_init_buffer(b,file );
  6313. -
  6314. - return b;
  6315. -}
  6316. -
  6317. -/** Destroy the buffer.
  6318. - * @param b a buffer created with zconf_create_buffer()
  6319. - *
  6320. - */
  6321. - void zconf_delete_buffer (YY_BUFFER_STATE b )
  6322. -{
  6323. -
  6324. - if ( ! b )
  6325. - return;
  6326. -
  6327. - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
  6328. - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
  6329. -
  6330. - if ( b->yy_is_our_buffer )
  6331. - zconffree((void *) b->yy_ch_buf );
  6332. -
  6333. - zconffree((void *) b );
  6334. -}
  6335. -
  6336. -/* Initializes or reinitializes a buffer.
  6337. - * This function is sometimes called more than once on the same buffer,
  6338. - * such as during a zconfrestart() or at EOF.
  6339. - */
  6340. - static void zconf_init_buffer (YY_BUFFER_STATE b, FILE * file )
  6341. -
  6342. -{
  6343. - int oerrno = errno;
  6344. -
  6345. - zconf_flush_buffer(b );
  6346. -
  6347. - b->yy_input_file = file;
  6348. - b->yy_fill_buffer = 1;
  6349. -
  6350. - /* If b is the current buffer, then zconf_init_buffer was _probably_
  6351. - * called from zconfrestart() or through yy_get_next_buffer.
  6352. - * In that case, we don't want to reset the lineno or column.
  6353. - */
  6354. - if (b != YY_CURRENT_BUFFER){
  6355. - b->yy_bs_lineno = 1;
  6356. - b->yy_bs_column = 0;
  6357. - }
  6358. -
  6359. - b->yy_is_interactive = 0;
  6360. -
  6361. - errno = oerrno;
  6362. -}
  6363. -
  6364. -/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
  6365. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
  6366. - *
  6367. - */
  6368. - void zconf_flush_buffer (YY_BUFFER_STATE b )
  6369. -{
  6370. - if ( ! b )
  6371. - return;
  6372. -
  6373. - b->yy_n_chars = 0;
  6374. -
  6375. - /* We always need two end-of-buffer characters. The first causes
  6376. - * a transition to the end-of-buffer state. The second causes
  6377. - * a jam in that state.
  6378. - */
  6379. - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
  6380. - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  6381. -
  6382. - b->yy_buf_pos = &b->yy_ch_buf[0];
  6383. -
  6384. - b->yy_at_bol = 1;
  6385. - b->yy_buffer_status = YY_BUFFER_NEW;
  6386. -
  6387. - if ( b == YY_CURRENT_BUFFER )
  6388. - zconf_load_buffer_state( );
  6389. -}
  6390. -
  6391. -/** Pushes the new state onto the stack. The new state becomes
  6392. - * the current state. This function will allocate the stack
  6393. - * if necessary.
  6394. - * @param new_buffer The new state.
  6395. - *
  6396. - */
  6397. -void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer )
  6398. -{
  6399. - if (new_buffer == NULL)
  6400. - return;
  6401. -
  6402. - zconfensure_buffer_stack();
  6403. -
  6404. - /* This block is copied from zconf_switch_to_buffer. */
  6405. - if ( YY_CURRENT_BUFFER )
  6406. - {
  6407. - /* Flush out information for old buffer. */
  6408. - *(yy_c_buf_p) = (yy_hold_char);
  6409. - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
  6410. - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
  6411. - }
  6412. -
  6413. - /* Only push if top exists. Otherwise, replace top. */
  6414. - if (YY_CURRENT_BUFFER)
  6415. - (yy_buffer_stack_top)++;
  6416. - YY_CURRENT_BUFFER_LVALUE = new_buffer;
  6417. -
  6418. - /* copied from zconf_switch_to_buffer. */
  6419. - zconf_load_buffer_state( );
  6420. - (yy_did_buffer_switch_on_eof) = 1;
  6421. -}
  6422. -
  6423. -/** Removes and deletes the top of the stack, if present.
  6424. - * The next element becomes the new top.
  6425. - *
  6426. - */
  6427. -void zconfpop_buffer_state (void)
  6428. -{
  6429. - if (!YY_CURRENT_BUFFER)
  6430. - return;
  6431. -
  6432. - zconf_delete_buffer(YY_CURRENT_BUFFER );
  6433. - YY_CURRENT_BUFFER_LVALUE = NULL;
  6434. - if ((yy_buffer_stack_top) > 0)
  6435. - --(yy_buffer_stack_top);
  6436. -
  6437. - if (YY_CURRENT_BUFFER) {
  6438. - zconf_load_buffer_state( );
  6439. - (yy_did_buffer_switch_on_eof) = 1;
  6440. - }
  6441. -}
  6442. -
  6443. -/* Allocates the stack if it does not exist.
  6444. - * Guarantees space for at least one push.
  6445. - */
  6446. -static void zconfensure_buffer_stack (void)
  6447. -{
  6448. - int num_to_alloc;
  6449. -
  6450. - if (!(yy_buffer_stack)) {
  6451. -
  6452. - /* First allocation is just for 2 elements, since we don't know if this
  6453. - * scanner will even need a stack. We use 2 instead of 1 to avoid an
  6454. - * immediate realloc on the next call.
  6455. - */
  6456. - num_to_alloc = 1;
  6457. - (yy_buffer_stack) = (struct yy_buffer_state**)zconfalloc
  6458. - (num_to_alloc * sizeof(struct yy_buffer_state*)
  6459. - );
  6460. - if ( ! (yy_buffer_stack) )
  6461. - YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" );
  6462. -
  6463. - memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
  6464. -
  6465. - (yy_buffer_stack_max) = num_to_alloc;
  6466. - (yy_buffer_stack_top) = 0;
  6467. - return;
  6468. - }
  6469. -
  6470. - if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
  6471. -
  6472. - /* Increase the buffer to prepare for a possible push. */
  6473. - int grow_size = 8 /* arbitrary grow size */;
  6474. -
  6475. - num_to_alloc = (yy_buffer_stack_max) + grow_size;
  6476. - (yy_buffer_stack) = (struct yy_buffer_state**)zconfrealloc
  6477. - ((yy_buffer_stack),
  6478. - num_to_alloc * sizeof(struct yy_buffer_state*)
  6479. - );
  6480. - if ( ! (yy_buffer_stack) )
  6481. - YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" );
  6482. -
  6483. - /* zero only the new slots.*/
  6484. - memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
  6485. - (yy_buffer_stack_max) = num_to_alloc;
  6486. - }
  6487. -}
  6488. -
  6489. -/** Setup the input buffer state to scan directly from a user-specified character buffer.
  6490. - * @param base the character buffer
  6491. - * @param size the size in bytes of the character buffer
  6492. - *
  6493. - * @return the newly allocated buffer state object.
  6494. - */
  6495. -YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size )
  6496. -{
  6497. - YY_BUFFER_STATE b;
  6498. -
  6499. - if ( size < 2 ||
  6500. - base[size-2] != YY_END_OF_BUFFER_CHAR ||
  6501. - base[size-1] != YY_END_OF_BUFFER_CHAR )
  6502. - /* They forgot to leave room for the EOB's. */
  6503. - return 0;
  6504. -
  6505. - b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) );
  6506. - if ( ! b )
  6507. - YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_buffer()" );
  6508. -
  6509. - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
  6510. - b->yy_buf_pos = b->yy_ch_buf = base;
  6511. - b->yy_is_our_buffer = 0;
  6512. - b->yy_input_file = 0;
  6513. - b->yy_n_chars = b->yy_buf_size;
  6514. - b->yy_is_interactive = 0;
  6515. - b->yy_at_bol = 1;
  6516. - b->yy_fill_buffer = 0;
  6517. - b->yy_buffer_status = YY_BUFFER_NEW;
  6518. -
  6519. - zconf_switch_to_buffer(b );
  6520. -
  6521. - return b;
  6522. -}
  6523. -
  6524. -/** Setup the input buffer state to scan a string. The next call to zconflex() will
  6525. - * scan from a @e copy of @a str.
  6526. - * @param yystr a NUL-terminated string to scan
  6527. - *
  6528. - * @return the newly allocated buffer state object.
  6529. - * @note If you want to scan bytes that may contain NUL values, then use
  6530. - * zconf_scan_bytes() instead.
  6531. - */
  6532. -YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr )
  6533. -{
  6534. -
  6535. - return zconf_scan_bytes(yystr,strlen(yystr) );
  6536. -}
  6537. -
  6538. -/** Setup the input buffer state to scan the given bytes. The next call to zconflex() will
  6539. - * scan from a @e copy of @a bytes.
  6540. - * @param bytes the byte buffer to scan
  6541. - * @param len the number of bytes in the buffer pointed to by @a bytes.
  6542. - *
  6543. - * @return the newly allocated buffer state object.
  6544. - */
  6545. -YY_BUFFER_STATE zconf_scan_bytes (yyconst char * yybytes, int _yybytes_len )
  6546. -{
  6547. - YY_BUFFER_STATE b;
  6548. - char *buf;
  6549. - yy_size_t n;
  6550. - int i;
  6551. -
  6552. - /* Get memory for full buffer, including space for trailing EOB's. */
  6553. - n = _yybytes_len + 2;
  6554. - buf = (char *) zconfalloc(n );
  6555. - if ( ! buf )
  6556. - YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_bytes()" );
  6557. -
  6558. - for ( i = 0; i < _yybytes_len; ++i )
  6559. - buf[i] = yybytes[i];
  6560. -
  6561. - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
  6562. -
  6563. - b = zconf_scan_buffer(buf,n );
  6564. - if ( ! b )
  6565. - YY_FATAL_ERROR( "bad buffer in zconf_scan_bytes()" );
  6566. -
  6567. - /* It's okay to grow etc. this buffer, and we should throw it
  6568. - * away when we're done.
  6569. - */
  6570. - b->yy_is_our_buffer = 1;
  6571. -
  6572. - return b;
  6573. -}
  6574. -
  6575. -#ifndef YY_EXIT_FAILURE
  6576. -#define YY_EXIT_FAILURE 2
  6577. -#endif
  6578. -
  6579. -static void yy_fatal_error (yyconst char* msg )
  6580. -{
  6581. - (void) fprintf( stderr, "%s\n", msg );
  6582. - exit( YY_EXIT_FAILURE );
  6583. -}
  6584. -
  6585. -/* Redefine yyless() so it works in section 3 code. */
  6586. -
  6587. -#undef yyless
  6588. -#define yyless(n) \
  6589. - do \
  6590. - { \
  6591. - /* Undo effects of setting up zconftext. */ \
  6592. - int yyless_macro_arg = (n); \
  6593. - YY_LESS_LINENO(yyless_macro_arg);\
  6594. - zconftext[zconfleng] = (yy_hold_char); \
  6595. - (yy_c_buf_p) = zconftext + yyless_macro_arg; \
  6596. - (yy_hold_char) = *(yy_c_buf_p); \
  6597. - *(yy_c_buf_p) = '\0'; \
  6598. - zconfleng = yyless_macro_arg; \
  6599. - } \
  6600. - while ( 0 )
  6601. -
  6602. -/* Accessor methods (get/set functions) to struct members. */
  6603. -
  6604. -/** Get the current line number.
  6605. - *
  6606. - */
  6607. -int zconfget_lineno (void)
  6608. -{
  6609. -
  6610. - return zconflineno;
  6611. -}
  6612. -
  6613. -/** Get the input stream.
  6614. - *
  6615. - */
  6616. -FILE *zconfget_in (void)
  6617. -{
  6618. - return zconfin;
  6619. -}
  6620. -
  6621. -/** Get the output stream.
  6622. - *
  6623. - */
  6624. -FILE *zconfget_out (void)
  6625. -{
  6626. - return zconfout;
  6627. -}
  6628. -
  6629. -/** Get the length of the current token.
  6630. - *
  6631. - */
  6632. -int zconfget_leng (void)
  6633. -{
  6634. - return zconfleng;
  6635. -}
  6636. -
  6637. -/** Get the current token.
  6638. - *
  6639. - */
  6640. -
  6641. -char *zconfget_text (void)
  6642. -{
  6643. - return zconftext;
  6644. -}
  6645. -
  6646. -/** Set the current line number.
  6647. - * @param line_number
  6648. - *
  6649. - */
  6650. -void zconfset_lineno (int line_number )
  6651. -{
  6652. -
  6653. - zconflineno = line_number;
  6654. -}
  6655. -
  6656. -/** Set the input stream. This does not discard the current
  6657. - * input buffer.
  6658. - * @param in_str A readable stream.
  6659. - *
  6660. - * @see zconf_switch_to_buffer
  6661. - */
  6662. -void zconfset_in (FILE * in_str )
  6663. -{
  6664. - zconfin = in_str ;
  6665. -}
  6666. -
  6667. -void zconfset_out (FILE * out_str )
  6668. -{
  6669. - zconfout = out_str ;
  6670. -}
  6671. -
  6672. -int zconfget_debug (void)
  6673. -{
  6674. - return zconf_flex_debug;
  6675. -}
  6676. -
  6677. -void zconfset_debug (int bdebug )
  6678. -{
  6679. - zconf_flex_debug = bdebug ;
  6680. -}
  6681. -
  6682. -static int yy_init_globals (void)
  6683. -{
  6684. - /* Initialization is the same as for the non-reentrant scanner.
  6685. - * This function is called from zconflex_destroy(), so don't allocate here.
  6686. - */
  6687. -
  6688. - (yy_buffer_stack) = 0;
  6689. - (yy_buffer_stack_top) = 0;
  6690. - (yy_buffer_stack_max) = 0;
  6691. - (yy_c_buf_p) = (char *) 0;
  6692. - (yy_init) = 0;
  6693. - (yy_start) = 0;
  6694. -
  6695. -/* Defined in main.c */
  6696. -#ifdef YY_STDINIT
  6697. - zconfin = stdin;
  6698. - zconfout = stdout;
  6699. -#else
  6700. - zconfin = (FILE *) 0;
  6701. - zconfout = (FILE *) 0;
  6702. -#endif
  6703. -
  6704. - /* For future reference: Set errno on error, since we are called by
  6705. - * zconflex_init()
  6706. - */
  6707. - return 0;
  6708. -}
  6709. -
  6710. -/* zconflex_destroy is for both reentrant and non-reentrant scanners. */
  6711. -int zconflex_destroy (void)
  6712. -{
  6713. -
  6714. - /* Pop the buffer stack, destroying each element. */
  6715. - while(YY_CURRENT_BUFFER){
  6716. - zconf_delete_buffer(YY_CURRENT_BUFFER );
  6717. - YY_CURRENT_BUFFER_LVALUE = NULL;
  6718. - zconfpop_buffer_state();
  6719. - }
  6720. -
  6721. - /* Destroy the stack itself. */
  6722. - zconffree((yy_buffer_stack) );
  6723. - (yy_buffer_stack) = NULL;
  6724. -
  6725. - /* Reset the globals. This is important in a non-reentrant scanner so the next time
  6726. - * zconflex() is called, initialization will occur. */
  6727. - yy_init_globals( );
  6728. -
  6729. - return 0;
  6730. -}
  6731. -
  6732. -/*
  6733. - * Internal utility routines.
  6734. - */
  6735. -
  6736. -#ifndef yytext_ptr
  6737. -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
  6738. -{
  6739. - register int i;
  6740. - for ( i = 0; i < n; ++i )
  6741. - s1[i] = s2[i];
  6742. -}
  6743. -#endif
  6744. -
  6745. -#ifdef YY_NEED_STRLEN
  6746. -static int yy_flex_strlen (yyconst char * s )
  6747. -{
  6748. - register int n;
  6749. - for ( n = 0; s[n]; ++n )
  6750. - ;
  6751. -
  6752. - return n;
  6753. -}
  6754. -#endif
  6755. -
  6756. -void *zconfalloc (yy_size_t size )
  6757. -{
  6758. - return (void *) malloc( size );
  6759. -}
  6760. -
  6761. -void *zconfrealloc (void * ptr, yy_size_t size )
  6762. -{
  6763. - /* The cast to (char *) in the following accommodates both
  6764. - * implementations that use char* generic pointers, and those
  6765. - * that use void* generic pointers. It works with the latter
  6766. - * because both ANSI C and C++ allow castless assignment from
  6767. - * any pointer type to void*, and deal with argument conversions
  6768. - * as though doing an assignment.
  6769. - */
  6770. - return (void *) realloc( (char *) ptr, size );
  6771. -}
  6772. -
  6773. -void zconffree (void * ptr )
  6774. -{
  6775. - free( (char *) ptr ); /* see zconfrealloc() for (char *) cast */
  6776. -}
  6777. -
  6778. -#define YYTABLES_NAME "yytables"
  6779. -
  6780. -void zconf_starthelp(void)
  6781. -{
  6782. - new_string();
  6783. - last_ts = first_ts = 0;
  6784. - BEGIN(HELP);
  6785. -}
  6786. -
  6787. -static void zconf_endhelp(void)
  6788. -{
  6789. - zconflval.string = text;
  6790. - BEGIN(INITIAL);
  6791. -}
  6792. -
  6793. -/*
  6794. - * Try to open specified file with following names:
  6795. - * ./name
  6796. - * $(srctree)/name
  6797. - * The latter is used when srctree is separate from objtree
  6798. - * when compiling the kernel.
  6799. - * Return NULL if file is not found.
  6800. - */
  6801. -FILE *zconf_fopen(const char *name)
  6802. -{
  6803. - char *env, fullname[PATH_MAX+1];
  6804. - FILE *f;
  6805. -
  6806. - f = fopen(name, "r");
  6807. - if (!f && name != NULL && name[0] != '/') {
  6808. - env = getenv(SRCTREE);
  6809. - if (env) {
  6810. - sprintf(fullname, "%s/%s", env, name);
  6811. - f = fopen(fullname, "r");
  6812. - }
  6813. - }
  6814. - return f;
  6815. -}
  6816. -
  6817. -void zconf_initscan(const char *name)
  6818. -{
  6819. - zconfin = zconf_fopen(name);
  6820. - if (!zconfin) {
  6821. - printf("can't find file %s\n", name);
  6822. - exit(1);
  6823. - }
  6824. -
  6825. - current_buf = malloc(sizeof(*current_buf));
  6826. - memset(current_buf, 0, sizeof(*current_buf));
  6827. -
  6828. - current_file = file_lookup(name);
  6829. - current_file->lineno = 1;
  6830. - current_file->flags = FILE_BUSY;
  6831. -}
  6832. -
  6833. -void zconf_nextfile(const char *name)
  6834. -{
  6835. - struct file *file = file_lookup(name);
  6836. - struct buffer *buf = malloc(sizeof(*buf));
  6837. - memset(buf, 0, sizeof(*buf));
  6838. -
  6839. - current_buf->state = YY_CURRENT_BUFFER;
  6840. - zconfin = zconf_fopen(name);
  6841. - if (!zconfin) {
  6842. - printf("%s:%d: can't open file \"%s\"\n", zconf_curname(), zconf_lineno(), name);
  6843. - exit(1);
  6844. - }
  6845. - zconf_switch_to_buffer(zconf_create_buffer(zconfin,YY_BUF_SIZE));
  6846. - buf->parent = current_buf;
  6847. - current_buf = buf;
  6848. -
  6849. - if (file->flags & FILE_BUSY) {
  6850. - printf("%s:%d: do not source '%s' from itself\n",
  6851. - zconf_curname(), zconf_lineno(), name);
  6852. - exit(1);
  6853. - }
  6854. - if (file->flags & FILE_SCANNED) {
  6855. - printf("%s:%d: file '%s' is already sourced from '%s'\n",
  6856. - zconf_curname(), zconf_lineno(), name,
  6857. - file->parent->name);
  6858. - exit(1);
  6859. - }
  6860. - file->flags |= FILE_BUSY;
  6861. - file->lineno = 1;
  6862. - file->parent = current_file;
  6863. - current_file = file;
  6864. -}
  6865. -
  6866. -static void zconf_endfile(void)
  6867. -{
  6868. - struct buffer *parent;
  6869. -
  6870. - current_file->flags |= FILE_SCANNED;
  6871. - current_file->flags &= ~FILE_BUSY;
  6872. - current_file = current_file->parent;
  6873. -
  6874. - parent = current_buf->parent;
  6875. - if (parent) {
  6876. - fclose(zconfin);
  6877. - zconf_delete_buffer(YY_CURRENT_BUFFER);
  6878. - zconf_switch_to_buffer(parent->state);
  6879. - }
  6880. - free(current_buf);
  6881. - current_buf = parent;
  6882. -}
  6883. -
  6884. -int zconf_lineno(void)
  6885. -{
  6886. - return current_pos.lineno;
  6887. -}
  6888. -
  6889. -char *zconf_curname(void)
  6890. -{
  6891. - return current_pos.file ? current_pos.file->name : "<none>";
  6892. -}
  6893. -
  6894. diff -Nur uClibc-0.9.33.2/extra/config/list.h uClibc-git/extra/config/list.h
  6895. --- uClibc-0.9.33.2/extra/config/list.h 1970-01-01 01:00:00.000000000 +0100
  6896. +++ uClibc-git/extra/config/list.h 2014-07-25 20:36:04.853324457 +0200
  6897. @@ -0,0 +1,131 @@
  6898. +#ifndef LIST_H
  6899. +#define LIST_H
  6900. +
  6901. +/*
  6902. + * Copied from include/linux/...
  6903. + */
  6904. +
  6905. +#undef offsetof
  6906. +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
  6907. +
  6908. +/**
  6909. + * container_of - cast a member of a structure out to the containing structure
  6910. + * @ptr: the pointer to the member.
  6911. + * @type: the type of the container struct this is embedded in.
  6912. + * @member: the name of the member within the struct.
  6913. + *
  6914. + */
  6915. +#define container_of(ptr, type, member) ({ \
  6916. + const typeof( ((type *)0)->member ) *__mptr = (ptr); \
  6917. + (type *)( (char *)__mptr - offsetof(type,member) );})
  6918. +
  6919. +
  6920. +struct list_head {
  6921. + struct list_head *next, *prev;
  6922. +};
  6923. +
  6924. +
  6925. +#define LIST_HEAD_INIT(name) { &(name), &(name) }
  6926. +
  6927. +#define LIST_HEAD(name) \
  6928. + struct list_head name = LIST_HEAD_INIT(name)
  6929. +
  6930. +/**
  6931. + * list_entry - get the struct for this entry
  6932. + * @ptr: the &struct list_head pointer.
  6933. + * @type: the type of the struct this is embedded in.
  6934. + * @member: the name of the list_struct within the struct.
  6935. + */
  6936. +#define list_entry(ptr, type, member) \
  6937. + container_of(ptr, type, member)
  6938. +
  6939. +/**
  6940. + * list_for_each_entry - iterate over list of given type
  6941. + * @pos: the type * to use as a loop cursor.
  6942. + * @head: the head for your list.
  6943. + * @member: the name of the list_struct within the struct.
  6944. + */
  6945. +#define list_for_each_entry(pos, head, member) \
  6946. + for (pos = list_entry((head)->next, typeof(*pos), member); \
  6947. + &pos->member != (head); \
  6948. + pos = list_entry(pos->member.next, typeof(*pos), member))
  6949. +
  6950. +/**
  6951. + * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry
  6952. + * @pos: the type * to use as a loop cursor.
  6953. + * @n: another type * to use as temporary storage
  6954. + * @head: the head for your list.
  6955. + * @member: the name of the list_struct within the struct.
  6956. + */
  6957. +#define list_for_each_entry_safe(pos, n, head, member) \
  6958. + for (pos = list_entry((head)->next, typeof(*pos), member), \
  6959. + n = list_entry(pos->member.next, typeof(*pos), member); \
  6960. + &pos->member != (head); \
  6961. + pos = n, n = list_entry(n->member.next, typeof(*n), member))
  6962. +
  6963. +/**
  6964. + * list_empty - tests whether a list is empty
  6965. + * @head: the list to test.
  6966. + */
  6967. +static inline int list_empty(const struct list_head *head)
  6968. +{
  6969. + return head->next == head;
  6970. +}
  6971. +
  6972. +/*
  6973. + * Insert a new entry between two known consecutive entries.
  6974. + *
  6975. + * This is only for internal list manipulation where we know
  6976. + * the prev/next entries already!
  6977. + */
  6978. +static inline void __list_add(struct list_head *_new,
  6979. + struct list_head *prev,
  6980. + struct list_head *next)
  6981. +{
  6982. + next->prev = _new;
  6983. + _new->next = next;
  6984. + _new->prev = prev;
  6985. + prev->next = _new;
  6986. +}
  6987. +
  6988. +/**
  6989. + * list_add_tail - add a new entry
  6990. + * @new: new entry to be added
  6991. + * @head: list head to add it before
  6992. + *
  6993. + * Insert a new entry before the specified head.
  6994. + * This is useful for implementing queues.
  6995. + */
  6996. +static inline void list_add_tail(struct list_head *_new, struct list_head *head)
  6997. +{
  6998. + __list_add(_new, head->prev, head);
  6999. +}
  7000. +
  7001. +/*
  7002. + * Delete a list entry by making the prev/next entries
  7003. + * point to each other.
  7004. + *
  7005. + * This is only for internal list manipulation where we know
  7006. + * the prev/next entries already!
  7007. + */
  7008. +static inline void __list_del(struct list_head *prev, struct list_head *next)
  7009. +{
  7010. + next->prev = prev;
  7011. + prev->next = next;
  7012. +}
  7013. +
  7014. +#define LIST_POISON1 ((void *) 0x00100100)
  7015. +#define LIST_POISON2 ((void *) 0x00200200)
  7016. +/**
  7017. + * list_del - deletes entry from list.
  7018. + * @entry: the element to delete from the list.
  7019. + * Note: list_empty() on entry does not return true after this, the entry is
  7020. + * in an undefined state.
  7021. + */
  7022. +static inline void list_del(struct list_head *entry)
  7023. +{
  7024. + __list_del(entry->prev, entry->next);
  7025. + entry->next = (struct list_head*)LIST_POISON1;
  7026. + entry->prev = (struct list_head*)LIST_POISON2;
  7027. +}
  7028. +#endif
  7029. diff -Nur uClibc-0.9.33.2/extra/config/lkc.h uClibc-git/extra/config/lkc.h
  7030. --- uClibc-0.9.33.2/extra/config/lkc.h 2012-05-15 09:20:09.000000000 +0200
  7031. +++ uClibc-git/extra/config/lkc.h 2014-07-25 20:36:04.853324457 +0200
  7032. @@ -14,29 +14,37 @@
  7033. static inline const char *gettext(const char *txt) { return txt; }
  7034. static inline void textdomain(const char *domainname) {}
  7035. static inline void bindtextdomain(const char *name, const char *dir) {}
  7036. +static inline char *bind_textdomain_codeset(const char *dn, char *c) { return c; }
  7037. #endif
  7038. #ifdef __cplusplus
  7039. extern "C" {
  7040. #endif
  7041. -#ifdef LKC_DIRECT_LINK
  7042. #define P(name,type,arg) extern type name arg
  7043. -#else
  7044. -#include "lkc_defs.h"
  7045. -#define P(name,type,arg) extern type (*name ## _p) arg
  7046. -#endif
  7047. #include "lkc_proto.h"
  7048. #undef P
  7049. #define SRCTREE "srctree"
  7050. +#ifndef PACKAGE
  7051. #define PACKAGE "linux"
  7052. +#endif
  7053. +
  7054. #define LOCALEDIR "/usr/share/locale"
  7055. #define _(text) gettext(text)
  7056. #define N_(text) (text)
  7057. +#ifndef CONFIG_
  7058. +#define CONFIG_ "CONFIG_"
  7059. +#endif
  7060. +static inline const char *CONFIG_prefix(void)
  7061. +{
  7062. + return getenv( "CONFIG_" ) ?: CONFIG_;
  7063. +}
  7064. +#undef CONFIG_
  7065. +#define CONFIG_ CONFIG_prefix()
  7066. #define TF_COMMAND 0x0001
  7067. #define TF_PARAM 0x0002
  7068. @@ -61,35 +69,49 @@
  7069. enum symbol_type stype;
  7070. };
  7071. +extern int zconfdebug;
  7072. +
  7073. int zconfparse(void);
  7074. void zconfdump(FILE *out);
  7075. -
  7076. -extern int zconfdebug;
  7077. void zconf_starthelp(void);
  7078. FILE *zconf_fopen(const char *name);
  7079. void zconf_initscan(const char *name);
  7080. void zconf_nextfile(const char *name);
  7081. int zconf_lineno(void);
  7082. -char *zconf_curname(void);
  7083. +const char *zconf_curname(void);
  7084. /* confdata.c */
  7085. const char *conf_get_configname(void);
  7086. +const char *conf_get_autoconfig_name(void);
  7087. char *conf_get_default_confname(void);
  7088. void sym_set_change_count(int count);
  7089. void sym_add_change_count(int count);
  7090. -void conf_set_all_new_symbols(enum conf_def_mode mode);
  7091. +bool conf_set_all_new_symbols(enum conf_def_mode mode);
  7092. +void set_all_choice_values(struct symbol *csym);
  7093. +
  7094. +struct conf_printer {
  7095. + void (*print_symbol)(FILE *, struct symbol *, const char *, void *);
  7096. + void (*print_comment)(FILE *, const char *, void *);
  7097. +};
  7098. -/* kconfig_load.c */
  7099. -void kconfig_load(void);
  7100. +/* confdata.c and expr.c */
  7101. +static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out)
  7102. +{
  7103. + assert(len != 0);
  7104. +
  7105. + if (fwrite(str, len, count, out) != count)
  7106. + fprintf(stderr, "Error in writing or end of file.\n");
  7107. +}
  7108. /* menu.c */
  7109. -void menu_init(void);
  7110. +void _menu_init(void);
  7111. void menu_warn(struct menu *menu, const char *fmt, ...);
  7112. struct menu *menu_add_menu(void);
  7113. void menu_end_menu(void);
  7114. void menu_add_entry(struct symbol *sym);
  7115. void menu_end_entry(void);
  7116. void menu_add_dep(struct expr *dep);
  7117. +void menu_add_visibility(struct expr *dep);
  7118. struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep);
  7119. struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
  7120. void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
  7121. @@ -101,10 +123,19 @@
  7122. /* util.c */
  7123. struct file *file_lookup(const char *name);
  7124. int file_write_dep(const char *name);
  7125. +void *xmalloc(size_t size);
  7126. +void *xcalloc(size_t nmemb, size_t size);
  7127. +char *dir_name(char *path);
  7128. +char *base_name(char *path);
  7129. struct gstr {
  7130. size_t len;
  7131. char *s;
  7132. + /*
  7133. + * when max_width is not zero long lines in string s (if any) get
  7134. + * wrapped not to exceed the max_width value
  7135. + */
  7136. + int max_width;
  7137. };
  7138. struct gstr str_new(void);
  7139. struct gstr str_assign(const char *s);
  7140. @@ -120,6 +151,8 @@
  7141. void sym_clear_all_valid(void);
  7142. void sym_set_all_changed(void);
  7143. void sym_set_changed(struct symbol *sym);
  7144. +struct symbol *sym_choice_default(struct symbol *sym);
  7145. +const char *sym_get_string_default(struct symbol *sym);
  7146. struct symbol *sym_check_deps(struct symbol *sym);
  7147. struct property *prop_alloc(enum prop_type type, struct symbol *sym);
  7148. struct symbol *prop_get_symbol(struct property *prop);
  7149. diff -Nur uClibc-0.9.33.2/extra/config/lkc_proto.h uClibc-git/extra/config/lkc_proto.h
  7150. --- uClibc-0.9.33.2/extra/config/lkc_proto.h 2012-05-15 09:20:09.000000000 +0200
  7151. +++ uClibc-git/extra/config/lkc_proto.h 2014-07-25 20:36:04.853324457 +0200
  7152. @@ -1,28 +1,40 @@
  7153. +#include <stdarg.h>
  7154. /* confdata.c */
  7155. P(conf_parse,void,(const char *name));
  7156. P(conf_read,int,(const char *name));
  7157. P(conf_read_simple,int,(const char *name, int));
  7158. +P(conf_write_defconfig,int,(const char *name));
  7159. P(conf_write,int,(const char *name));
  7160. P(conf_write_autoconf,int,(void));
  7161. P(conf_get_changed,bool,(void));
  7162. P(conf_set_changed_callback, void,(void (*fn)(void)));
  7163. +P(conf_set_message_callback, void,(void (*fn)(const char *fmt, va_list ap)));
  7164. /* menu.c */
  7165. P(rootmenu,struct menu,);
  7166. -P(menu_is_visible,bool,(struct menu *menu));
  7167. +P(menu_is_empty, bool, (struct menu *menu));
  7168. +P(menu_is_visible, bool, (struct menu *menu));
  7169. +P(menu_has_prompt, bool, (struct menu *menu));
  7170. P(menu_get_prompt,const char *,(struct menu *menu));
  7171. P(menu_get_root_menu,struct menu *,(struct menu *menu));
  7172. P(menu_get_parent_menu,struct menu *,(struct menu *menu));
  7173. P(menu_has_help,bool,(struct menu *menu));
  7174. P(menu_get_help,const char *,(struct menu *menu));
  7175. +P(get_symbol_str, void, (struct gstr *r, struct symbol *sym, struct list_head
  7176. + *head));
  7177. +P(get_relations_str, struct gstr, (struct symbol **sym_arr, struct list_head
  7178. + *head));
  7179. +P(menu_get_ext_help,void,(struct menu *menu, struct gstr *help));
  7180. /* symbol.c */
  7181. P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]);
  7182. P(sym_lookup,struct symbol *,(const char *name, int flags));
  7183. P(sym_find,struct symbol *,(const char *name));
  7184. +P(sym_expand_string_value,const char *,(const char *in));
  7185. +P(sym_escape_string_value, const char *,(const char *in));
  7186. P(sym_re_search,struct symbol **,(const char *pattern));
  7187. P(sym_type_name,const char *,(enum symbol_type type));
  7188. P(sym_calc_value,void,(struct symbol *sym));
  7189. diff -Nur uClibc-0.9.33.2/extra/config/lxdialog/checklist.c uClibc-git/extra/config/lxdialog/checklist.c
  7190. --- uClibc-0.9.33.2/extra/config/lxdialog/checklist.c 2012-05-15 09:20:09.000000000 +0200
  7191. +++ uClibc-git/extra/config/lxdialog/checklist.c 2014-07-25 20:36:04.861324498 +0200
  7192. @@ -31,6 +31,10 @@
  7193. static void print_item(WINDOW * win, int choice, int selected)
  7194. {
  7195. int i;
  7196. + char *list_item = malloc(list_width + 1);
  7197. +
  7198. + strncpy(list_item, item_str(), list_width - item_x);
  7199. + list_item[list_width - item_x] = '\0';
  7200. /* Clear 'residue' of last item */
  7201. wattrset(win, dlg.menubox.atr);
  7202. @@ -41,16 +45,18 @@
  7203. wmove(win, choice, check_x);
  7204. wattrset(win, selected ? dlg.check_selected.atr
  7205. : dlg.check.atr);
  7206. - wprintw(win, "(%c)", item_is_tag('X') ? 'X' : ' ');
  7207. + if (!item_is_tag(':'))
  7208. + wprintw(win, "(%c)", item_is_tag('X') ? 'X' : ' ');
  7209. wattrset(win, selected ? dlg.tag_selected.atr : dlg.tag.atr);
  7210. - mvwaddch(win, choice, item_x, item_str()[0]);
  7211. + mvwaddch(win, choice, item_x, list_item[0]);
  7212. wattrset(win, selected ? dlg.item_selected.atr : dlg.item.atr);
  7213. - waddstr(win, (char *)item_str() + 1);
  7214. + waddstr(win, list_item + 1);
  7215. if (selected) {
  7216. wmove(win, choice, check_x + 1);
  7217. wrefresh(win);
  7218. }
  7219. + free(list_item);
  7220. }
  7221. /*
  7222. @@ -126,16 +132,16 @@
  7223. }
  7224. do_resize:
  7225. - if (getmaxy(stdscr) < (height + 6))
  7226. + if (getmaxy(stdscr) < (height + CHECKLIST_HEIGTH_MIN))
  7227. return -ERRDISPLAYTOOSMALL;
  7228. - if (getmaxx(stdscr) < (width + 6))
  7229. + if (getmaxx(stdscr) < (width + CHECKLIST_WIDTH_MIN))
  7230. return -ERRDISPLAYTOOSMALL;
  7231. max_choice = MIN(list_height, item_count());
  7232. /* center dialog box on screen */
  7233. - x = (COLS - width) / 2;
  7234. - y = (LINES - height) / 2;
  7235. + x = (getmaxx(stdscr) - width) / 2;
  7236. + y = (getmaxy(stdscr) - height) / 2;
  7237. draw_shadow(stdscr, y, x, height, width);
  7238. @@ -174,6 +180,7 @@
  7239. check_x = 0;
  7240. item_foreach()
  7241. check_x = MAX(check_x, strlen(item_str()) + 4);
  7242. + check_x = MIN(check_x, list_width);
  7243. check_x = (list_width - check_x) / 2;
  7244. item_x = check_x + 4;
  7245. diff -Nur uClibc-0.9.33.2/extra/config/lxdialog/check-lxdialog.sh uClibc-git/extra/config/lxdialog/check-lxdialog.sh
  7246. --- uClibc-0.9.33.2/extra/config/lxdialog/check-lxdialog.sh 2012-05-15 09:20:09.000000000 +0200
  7247. +++ uClibc-git/extra/config/lxdialog/check-lxdialog.sh 2014-07-25 20:36:04.861324498 +0200
  7248. @@ -4,7 +4,9 @@
  7249. # What library to link
  7250. ldflags()
  7251. {
  7252. - for ext in so a dylib ; do
  7253. + pkg-config --libs ncursesw 2>/dev/null && exit
  7254. + pkg-config --libs ncurses 2>/dev/null && exit
  7255. + for ext in so a dll.a dylib ; do
  7256. for lib in ncursesw ncurses curses ; do
  7257. $cc -print-file-name=lib${lib}.${ext} | grep -q /
  7258. if [ $? -eq 0 ]; then
  7259. @@ -19,14 +21,13 @@
  7260. # Where is ncurses.h?
  7261. ccflags()
  7262. {
  7263. - if [ -f /usr/include/ncursesw/ncurses.h ]; then
  7264. - echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncurses.h>"'
  7265. - elif [ -f /usr/include/ncursesw/curses.h ]; then
  7266. - echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncursesw/curses.h>"'
  7267. + if [ -f /usr/include/ncursesw/curses.h ]; then
  7268. + echo '-I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"'
  7269. + echo ' -DNCURSES_WIDECHAR=1'
  7270. elif [ -f /usr/include/ncurses/ncurses.h ]; then
  7271. echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"'
  7272. elif [ -f /usr/include/ncurses/curses.h ]; then
  7273. - echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"'
  7274. + echo '-I/usr/include/ncurses -DCURSES_LOC="<curses.h>"'
  7275. elif [ -f /usr/include/ncurses.h ]; then
  7276. echo '-DCURSES_LOC="<ncurses.h>"'
  7277. else
  7278. @@ -40,7 +41,7 @@
  7279. # Check if we can link to ncurses
  7280. check() {
  7281. - $cc -xc - -o $tmp 2>/dev/null <<'EOF'
  7282. + $cc -x c - -o $tmp 2>/dev/null <<'EOF'
  7283. #include CURSES_LOC
  7284. main() {}
  7285. EOF
  7286. diff -Nur uClibc-0.9.33.2/extra/config/lxdialog/dialog.h uClibc-git/extra/config/lxdialog/dialog.h
  7287. --- uClibc-0.9.33.2/extra/config/lxdialog/dialog.h 2012-05-15 09:20:09.000000000 +0200
  7288. +++ uClibc-git/extra/config/lxdialog/dialog.h 2014-07-25 20:36:04.861324498 +0200
  7289. @@ -106,8 +106,14 @@
  7290. int hl; /* highlight this item */
  7291. };
  7292. +struct subtitle_list {
  7293. + struct subtitle_list *next;
  7294. + const char *text;
  7295. +};
  7296. +
  7297. struct dialog_info {
  7298. const char *backtitle;
  7299. + struct subtitle_list *subtitles;
  7300. struct dialog_color screen;
  7301. struct dialog_color shadow;
  7302. struct dialog_color dialog;
  7303. @@ -144,6 +150,7 @@
  7304. */
  7305. extern struct dialog_info dlg;
  7306. extern char dialog_input_result[];
  7307. +extern int saved_x, saved_y; /* Needed in signal handler in mconf.c */
  7308. /*
  7309. * Function prototypes
  7310. @@ -193,8 +200,23 @@
  7311. int on_key_esc(WINDOW *win);
  7312. int on_key_resize(void);
  7313. +/* minimum (re)size values */
  7314. +#define CHECKLIST_HEIGTH_MIN 6 /* For dialog_checklist() */
  7315. +#define CHECKLIST_WIDTH_MIN 6
  7316. +#define INPUTBOX_HEIGTH_MIN 2 /* For dialog_inputbox() */
  7317. +#define INPUTBOX_WIDTH_MIN 2
  7318. +#define MENUBOX_HEIGTH_MIN 15 /* For dialog_menu() */
  7319. +#define MENUBOX_WIDTH_MIN 65
  7320. +#define TEXTBOX_HEIGTH_MIN 8 /* For dialog_textbox() */
  7321. +#define TEXTBOX_WIDTH_MIN 8
  7322. +#define YESNO_HEIGTH_MIN 4 /* For dialog_yesno() */
  7323. +#define YESNO_WIDTH_MIN 4
  7324. +#define WINDOW_HEIGTH_MIN 19 /* For init_dialog() */
  7325. +#define WINDOW_WIDTH_MIN 80
  7326. +
  7327. int init_dialog(const char *backtitle);
  7328. void set_dialog_backtitle(const char *backtitle);
  7329. +void set_dialog_subtitles(struct subtitle_list *subtitles);
  7330. void end_dialog(int x, int y);
  7331. void attr_clear(WINDOW * win, int height, int width, chtype attr);
  7332. void dialog_clear(void);
  7333. @@ -209,12 +231,17 @@
  7334. int dialog_yesno(const char *title, const char *prompt, int height, int width);
  7335. int dialog_msgbox(const char *title, const char *prompt, int height,
  7336. int width, int pause);
  7337. -int dialog_textbox(const char *title, const char *file, int height, int width);
  7338. +
  7339. +
  7340. +typedef void (*update_text_fn)(char *buf, size_t start, size_t end, void
  7341. + *_data);
  7342. +int dialog_textbox(const char *title, char *tbuf, int initial_height,
  7343. + int initial_width, int *keys, int *_vscroll, int *_hscroll,
  7344. + update_text_fn update_text, void *data);
  7345. int dialog_menu(const char *title, const char *prompt,
  7346. const void *selected, int *s_scroll);
  7347. int dialog_checklist(const char *title, const char *prompt, int height,
  7348. int width, int list_height);
  7349. -extern char dialog_input_result[];
  7350. int dialog_inputbox(const char *title, const char *prompt, int height,
  7351. int width, const char *init);
  7352. diff -Nur uClibc-0.9.33.2/extra/config/lxdialog/inputbox.c uClibc-git/extra/config/lxdialog/inputbox.c
  7353. --- uClibc-0.9.33.2/extra/config/lxdialog/inputbox.c 2012-05-15 09:20:09.000000000 +0200
  7354. +++ uClibc-git/extra/config/lxdialog/inputbox.c 2014-07-25 20:36:04.861324498 +0200
  7355. @@ -45,7 +45,8 @@
  7356. const char *init)
  7357. {
  7358. int i, x, y, box_y, box_x, box_width;
  7359. - int input_x = 0, scroll = 0, key = 0, button = -1;
  7360. + int input_x = 0, key = 0, button = -1;
  7361. + int show_x, len, pos;
  7362. char *instr = dialog_input_result;
  7363. WINDOW *dialog;
  7364. @@ -55,14 +56,14 @@
  7365. strcpy(instr, init);
  7366. do_resize:
  7367. - if (getmaxy(stdscr) <= (height - 2))
  7368. + if (getmaxy(stdscr) <= (height - INPUTBOX_HEIGTH_MIN))
  7369. return -ERRDISPLAYTOOSMALL;
  7370. - if (getmaxx(stdscr) <= (width - 2))
  7371. + if (getmaxx(stdscr) <= (width - INPUTBOX_WIDTH_MIN))
  7372. return -ERRDISPLAYTOOSMALL;
  7373. /* center dialog box on screen */
  7374. - x = (COLS - width) / 2;
  7375. - y = (LINES - height) / 2;
  7376. + x = (getmaxx(stdscr) - width) / 2;
  7377. + y = (getmaxy(stdscr) - height) / 2;
  7378. draw_shadow(stdscr, y, x, height, width);
  7379. @@ -97,14 +98,17 @@
  7380. wmove(dialog, box_y, box_x);
  7381. wattrset(dialog, dlg.inputbox.atr);
  7382. - input_x = strlen(instr);
  7383. + len = strlen(instr);
  7384. + pos = len;
  7385. - if (input_x >= box_width) {
  7386. - scroll = input_x - box_width + 1;
  7387. + if (len >= box_width) {
  7388. + show_x = len - box_width + 1;
  7389. input_x = box_width - 1;
  7390. for (i = 0; i < box_width - 1; i++)
  7391. - waddch(dialog, instr[scroll + i]);
  7392. + waddch(dialog, instr[show_x + i]);
  7393. } else {
  7394. + show_x = 0;
  7395. + input_x = len;
  7396. waddstr(dialog, instr);
  7397. }
  7398. @@ -121,45 +125,104 @@
  7399. case KEY_UP:
  7400. case KEY_DOWN:
  7401. break;
  7402. - case KEY_LEFT:
  7403. - continue;
  7404. - case KEY_RIGHT:
  7405. - continue;
  7406. case KEY_BACKSPACE:
  7407. case 127:
  7408. - if (input_x || scroll) {
  7409. + if (pos) {
  7410. wattrset(dialog, dlg.inputbox.atr);
  7411. - if (!input_x) {
  7412. - scroll = scroll < box_width - 1 ? 0 : scroll - (box_width - 1);
  7413. - wmove(dialog, box_y, box_x);
  7414. - for (i = 0; i < box_width; i++)
  7415. - waddch(dialog,
  7416. - instr[scroll + input_x + i] ?
  7417. - instr[scroll + input_x + i] : ' ');
  7418. - input_x = strlen(instr) - scroll;
  7419. + if (input_x == 0) {
  7420. + show_x--;
  7421. } else
  7422. input_x--;
  7423. - instr[scroll + input_x] = '\0';
  7424. - mvwaddch(dialog, box_y, input_x + box_x, ' ');
  7425. +
  7426. + if (pos < len) {
  7427. + for (i = pos - 1; i < len; i++) {
  7428. + instr[i] = instr[i+1];
  7429. + }
  7430. + }
  7431. +
  7432. + pos--;
  7433. + len--;
  7434. + instr[len] = '\0';
  7435. + wmove(dialog, box_y, box_x);
  7436. + for (i = 0; i < box_width; i++) {
  7437. + if (!instr[show_x + i]) {
  7438. + waddch(dialog, ' ');
  7439. + break;
  7440. + }
  7441. + waddch(dialog, instr[show_x + i]);
  7442. + }
  7443. wmove(dialog, box_y, input_x + box_x);
  7444. wrefresh(dialog);
  7445. }
  7446. continue;
  7447. + case KEY_LEFT:
  7448. + if (pos > 0) {
  7449. + if (input_x > 0) {
  7450. + wmove(dialog, box_y, --input_x + box_x);
  7451. + } else if (input_x == 0) {
  7452. + show_x--;
  7453. + wmove(dialog, box_y, box_x);
  7454. + for (i = 0; i < box_width; i++) {
  7455. + if (!instr[show_x + i]) {
  7456. + waddch(dialog, ' ');
  7457. + break;
  7458. + }
  7459. + waddch(dialog, instr[show_x + i]);
  7460. + }
  7461. + wmove(dialog, box_y, box_x);
  7462. + }
  7463. + pos--;
  7464. + }
  7465. + continue;
  7466. + case KEY_RIGHT:
  7467. + if (pos < len) {
  7468. + if (input_x < box_width - 1) {
  7469. + wmove(dialog, box_y, ++input_x + box_x);
  7470. + } else if (input_x == box_width - 1) {
  7471. + show_x++;
  7472. + wmove(dialog, box_y, box_x);
  7473. + for (i = 0; i < box_width; i++) {
  7474. + if (!instr[show_x + i]) {
  7475. + waddch(dialog, ' ');
  7476. + break;
  7477. + }
  7478. + waddch(dialog, instr[show_x + i]);
  7479. + }
  7480. + wmove(dialog, box_y, input_x + box_x);
  7481. + }
  7482. + pos++;
  7483. + }
  7484. + continue;
  7485. default:
  7486. if (key < 0x100 && isprint(key)) {
  7487. - if (scroll + input_x < MAX_LEN) {
  7488. + if (len < MAX_LEN) {
  7489. wattrset(dialog, dlg.inputbox.atr);
  7490. - instr[scroll + input_x] = key;
  7491. - instr[scroll + input_x + 1] = '\0';
  7492. + if (pos < len) {
  7493. + for (i = len; i > pos; i--)
  7494. + instr[i] = instr[i-1];
  7495. + instr[pos] = key;
  7496. + } else {
  7497. + instr[len] = key;
  7498. + }
  7499. + pos++;
  7500. + len++;
  7501. + instr[len] = '\0';
  7502. +
  7503. if (input_x == box_width - 1) {
  7504. - scroll++;
  7505. - wmove(dialog, box_y, box_x);
  7506. - for (i = 0; i < box_width - 1; i++)
  7507. - waddch(dialog, instr [scroll + i]);
  7508. + show_x++;
  7509. } else {
  7510. - wmove(dialog, box_y, input_x++ + box_x);
  7511. - waddch(dialog, key);
  7512. + input_x++;
  7513. + }
  7514. +
  7515. + wmove(dialog, box_y, box_x);
  7516. + for (i = 0; i < box_width; i++) {
  7517. + if (!instr[show_x + i]) {
  7518. + waddch(dialog, ' ');
  7519. + break;
  7520. + }
  7521. + waddch(dialog, instr[show_x + i]);
  7522. }
  7523. + wmove(dialog, box_y, input_x + box_x);
  7524. wrefresh(dialog);
  7525. } else
  7526. flash(); /* Alarm user about overflow */
  7527. @@ -180,7 +243,7 @@
  7528. case KEY_LEFT:
  7529. switch (button) {
  7530. case -1:
  7531. - button = 1; /* Indicates "Cancel" button is selected */
  7532. + button = 1; /* Indicates "Help" button is selected */
  7533. print_buttons(dialog, height, width, 1);
  7534. break;
  7535. case 0:
  7536. @@ -204,7 +267,7 @@
  7537. print_buttons(dialog, height, width, 0);
  7538. break;
  7539. case 0:
  7540. - button = 1; /* Indicates "Cancel" button is selected */
  7541. + button = 1; /* Indicates "Help" button is selected */
  7542. print_buttons(dialog, height, width, 1);
  7543. break;
  7544. case 1:
  7545. diff -Nur uClibc-0.9.33.2/extra/config/lxdialog/menubox.c uClibc-git/extra/config/lxdialog/menubox.c
  7546. --- uClibc-0.9.33.2/extra/config/lxdialog/menubox.c 2012-05-15 09:20:09.000000000 +0200
  7547. +++ uClibc-git/extra/config/lxdialog/menubox.c 2014-07-25 20:36:04.861324498 +0200
  7548. @@ -154,12 +154,14 @@
  7549. */
  7550. static void print_buttons(WINDOW * win, int height, int width, int selected)
  7551. {
  7552. - int x = width / 2 - 16;
  7553. + int x = width / 2 - 28;
  7554. int y = height - 2;
  7555. print_button(win, gettext("Select"), y, x, selected == 0);
  7556. print_button(win, gettext(" Exit "), y, x + 12, selected == 1);
  7557. print_button(win, gettext(" Help "), y, x + 24, selected == 2);
  7558. + print_button(win, gettext(" Save "), y, x + 36, selected == 3);
  7559. + print_button(win, gettext(" Load "), y, x + 48, selected == 4);
  7560. wmove(win, y, x + 1 + 12 * selected);
  7561. wrefresh(win);
  7562. @@ -191,7 +193,7 @@
  7563. do_resize:
  7564. height = getmaxy(stdscr);
  7565. width = getmaxx(stdscr);
  7566. - if (height < 15 || width < 65)
  7567. + if (height < MENUBOX_HEIGTH_MIN || width < MENUBOX_WIDTH_MIN)
  7568. return -ERRDISPLAYTOOSMALL;
  7569. height -= 4;
  7570. @@ -201,8 +203,8 @@
  7571. max_choice = MIN(menu_height, item_count());
  7572. /* center dialog box on screen */
  7573. - x = (COLS - width) / 2;
  7574. - y = (LINES - height) / 2;
  7575. + x = (getmaxx(stdscr) - width) / 2;
  7576. + y = (getmaxy(stdscr) - height) / 2;
  7577. draw_shadow(stdscr, y, x, height, width);
  7578. @@ -301,10 +303,11 @@
  7579. }
  7580. }
  7581. - if (i < max_choice ||
  7582. - key == KEY_UP || key == KEY_DOWN ||
  7583. - key == '-' || key == '+' ||
  7584. - key == KEY_PPAGE || key == KEY_NPAGE) {
  7585. + if (item_count() != 0 &&
  7586. + (i < max_choice ||
  7587. + key == KEY_UP || key == KEY_DOWN ||
  7588. + key == '-' || key == '+' ||
  7589. + key == KEY_PPAGE || key == KEY_NPAGE)) {
  7590. /* Remove highligt of current item */
  7591. print_item(scroll + choice, choice, FALSE);
  7592. @@ -372,7 +375,7 @@
  7593. case TAB:
  7594. case KEY_RIGHT:
  7595. button = ((key == KEY_LEFT ? --button : ++button) < 0)
  7596. - ? 2 : (button > 2 ? 0 : button);
  7597. + ? 4 : (button > 4 ? 0 : button);
  7598. print_buttons(dialog, height, width, button);
  7599. wrefresh(menu);
  7600. @@ -383,6 +386,10 @@
  7601. case 'n':
  7602. case 'm':
  7603. case '/':
  7604. + case 'h':
  7605. + case '?':
  7606. + case 'z':
  7607. + case '\n':
  7608. /* save scroll info */
  7609. *s_scroll = scroll;
  7610. delwin(menu);
  7611. @@ -390,30 +397,26 @@
  7612. item_set(scroll + choice);
  7613. item_set_selected(1);
  7614. switch (key) {
  7615. + case 'h':
  7616. + case '?':
  7617. + return 2;
  7618. case 's':
  7619. - return 3;
  7620. case 'y':
  7621. - return 3;
  7622. + return 5;
  7623. case 'n':
  7624. - return 4;
  7625. + return 6;
  7626. case 'm':
  7627. - return 5;
  7628. + return 7;
  7629. case ' ':
  7630. - return 6;
  7631. + return 8;
  7632. case '/':
  7633. - return 7;
  7634. + return 9;
  7635. + case 'z':
  7636. + return 10;
  7637. + case '\n':
  7638. + return button;
  7639. }
  7640. return 0;
  7641. - case 'h':
  7642. - case '?':
  7643. - button = 2;
  7644. - case '\n':
  7645. - *s_scroll = scroll;
  7646. - delwin(menu);
  7647. - delwin(dialog);
  7648. - item_set(scroll + choice);
  7649. - item_set_selected(1);
  7650. - return button;
  7651. case 'e':
  7652. case 'x':
  7653. key = KEY_ESC;
  7654. diff -Nur uClibc-0.9.33.2/extra/config/lxdialog/textbox.c uClibc-git/extra/config/lxdialog/textbox.c
  7655. --- uClibc-0.9.33.2/extra/config/lxdialog/textbox.c 2012-05-15 09:20:09.000000000 +0200
  7656. +++ uClibc-git/extra/config/lxdialog/textbox.c 2014-07-25 20:36:04.861324498 +0200
  7657. @@ -22,23 +22,25 @@
  7658. #include "dialog.h"
  7659. static void back_lines(int n);
  7660. -static void print_page(WINDOW * win, int height, int width);
  7661. -static void print_line(WINDOW * win, int row, int width);
  7662. +static void print_page(WINDOW *win, int height, int width, update_text_fn
  7663. + update_text, void *data);
  7664. +static void print_line(WINDOW *win, int row, int width);
  7665. static char *get_line(void);
  7666. static void print_position(WINDOW * win);
  7667. static int hscroll;
  7668. static int begin_reached, end_reached, page_length;
  7669. -static const char *buf;
  7670. -static const char *page;
  7671. +static char *buf;
  7672. +static char *page;
  7673. /*
  7674. * refresh window content
  7675. */
  7676. static void refresh_text_box(WINDOW *dialog, WINDOW *box, int boxh, int boxw,
  7677. - int cur_y, int cur_x)
  7678. + int cur_y, int cur_x, update_text_fn update_text,
  7679. + void *data)
  7680. {
  7681. - print_page(box, boxh, boxw);
  7682. + print_page(box, boxh, boxw, update_text, data);
  7683. print_position(dialog);
  7684. wmove(dialog, cur_y, cur_x); /* Restore cursor position */
  7685. wrefresh(dialog);
  7686. @@ -47,14 +49,18 @@
  7687. /*
  7688. * Display text from a file in a dialog box.
  7689. + *
  7690. + * keys is a null-terminated array
  7691. + * update_text() may not add or remove any '\n' or '\0' in tbuf
  7692. */
  7693. -int dialog_textbox(const char *title, const char *tbuf,
  7694. - int initial_height, int initial_width)
  7695. +int dialog_textbox(const char *title, char *tbuf, int initial_height,
  7696. + int initial_width, int *keys, int *_vscroll, int *_hscroll,
  7697. + update_text_fn update_text, void *data)
  7698. {
  7699. int i, x, y, cur_x, cur_y, key = 0;
  7700. int height, width, boxh, boxw;
  7701. - int passed_end;
  7702. WINDOW *dialog, *box;
  7703. + bool done = false;
  7704. begin_reached = 1;
  7705. end_reached = 0;
  7706. @@ -63,9 +69,18 @@
  7707. buf = tbuf;
  7708. page = buf; /* page is pointer to start of page to be displayed */
  7709. + if (_vscroll && *_vscroll) {
  7710. + begin_reached = 0;
  7711. +
  7712. + for (i = 0; i < *_vscroll; i++)
  7713. + get_line();
  7714. + }
  7715. + if (_hscroll)
  7716. + hscroll = *_hscroll;
  7717. +
  7718. do_resize:
  7719. getmaxyx(stdscr, height, width);
  7720. - if (height < 8 || width < 8)
  7721. + if (height < TEXTBOX_HEIGTH_MIN || width < TEXTBOX_WIDTH_MIN)
  7722. return -ERRDISPLAYTOOSMALL;
  7723. if (initial_height != 0)
  7724. height = initial_height;
  7725. @@ -83,8 +98,8 @@
  7726. width = 0;
  7727. /* center dialog box on screen */
  7728. - x = (COLS - width) / 2;
  7729. - y = (LINES - height) / 2;
  7730. + x = (getmaxx(stdscr) - width) / 2;
  7731. + y = (getmaxy(stdscr) - height) / 2;
  7732. draw_shadow(stdscr, y, x, height, width);
  7733. @@ -120,25 +135,28 @@
  7734. /* Print first page of text */
  7735. attr_clear(box, boxh, boxw, dlg.dialog.atr);
  7736. - refresh_text_box(dialog, box, boxh, boxw, cur_y, cur_x);
  7737. + refresh_text_box(dialog, box, boxh, boxw, cur_y, cur_x, update_text,
  7738. + data);
  7739. - while ((key != KEY_ESC) && (key != '\n')) {
  7740. + while (!done) {
  7741. key = wgetch(dialog);
  7742. switch (key) {
  7743. case 'E': /* Exit */
  7744. case 'e':
  7745. case 'X':
  7746. case 'x':
  7747. - delwin(box);
  7748. - delwin(dialog);
  7749. - return 0;
  7750. + case 'q':
  7751. + case '\n':
  7752. + done = true;
  7753. + break;
  7754. case 'g': /* First page */
  7755. case KEY_HOME:
  7756. if (!begin_reached) {
  7757. begin_reached = 1;
  7758. page = buf;
  7759. refresh_text_box(dialog, box, boxh, boxw,
  7760. - cur_y, cur_x);
  7761. + cur_y, cur_x, update_text,
  7762. + data);
  7763. }
  7764. break;
  7765. case 'G': /* Last page */
  7766. @@ -148,78 +166,48 @@
  7767. /* point to last char in buf */
  7768. page = buf + strlen(buf);
  7769. back_lines(boxh);
  7770. - refresh_text_box(dialog, box, boxh, boxw,
  7771. - cur_y, cur_x);
  7772. + refresh_text_box(dialog, box, boxh, boxw, cur_y,
  7773. + cur_x, update_text, data);
  7774. break;
  7775. case 'K': /* Previous line */
  7776. case 'k':
  7777. case KEY_UP:
  7778. - if (!begin_reached) {
  7779. - back_lines(page_length + 1);
  7780. -
  7781. - /* We don't call print_page() here but use
  7782. - * scrolling to ensure faster screen update.
  7783. - * However, 'end_reached' and 'page_length'
  7784. - * should still be updated, and 'page' should
  7785. - * point to start of next page. This is done
  7786. - * by calling get_line() in the following
  7787. - * 'for' loop. */
  7788. - scrollok(box, TRUE);
  7789. - wscrl(box, -1); /* Scroll box region down one line */
  7790. - scrollok(box, FALSE);
  7791. - page_length = 0;
  7792. - passed_end = 0;
  7793. - for (i = 0; i < boxh; i++) {
  7794. - if (!i) {
  7795. - /* print first line of page */
  7796. - print_line(box, 0, boxw);
  7797. - wnoutrefresh(box);
  7798. - } else
  7799. - /* Called to update 'end_reached' and 'page' */
  7800. - get_line();
  7801. - if (!passed_end)
  7802. - page_length++;
  7803. - if (end_reached && !passed_end)
  7804. - passed_end = 1;
  7805. - }
  7806. + if (begin_reached)
  7807. + break;
  7808. - print_position(dialog);
  7809. - wmove(dialog, cur_y, cur_x); /* Restore cursor position */
  7810. - wrefresh(dialog);
  7811. - }
  7812. + back_lines(page_length + 1);
  7813. + refresh_text_box(dialog, box, boxh, boxw, cur_y,
  7814. + cur_x, update_text, data);
  7815. break;
  7816. case 'B': /* Previous page */
  7817. case 'b':
  7818. + case 'u':
  7819. case KEY_PPAGE:
  7820. if (begin_reached)
  7821. break;
  7822. back_lines(page_length + boxh);
  7823. - refresh_text_box(dialog, box, boxh, boxw,
  7824. - cur_y, cur_x);
  7825. + refresh_text_box(dialog, box, boxh, boxw, cur_y,
  7826. + cur_x, update_text, data);
  7827. break;
  7828. case 'J': /* Next line */
  7829. case 'j':
  7830. case KEY_DOWN:
  7831. - if (!end_reached) {
  7832. - begin_reached = 0;
  7833. - scrollok(box, TRUE);
  7834. - scroll(box); /* Scroll box region up one line */
  7835. - scrollok(box, FALSE);
  7836. - print_line(box, boxh - 1, boxw);
  7837. - wnoutrefresh(box);
  7838. - print_position(dialog);
  7839. - wmove(dialog, cur_y, cur_x); /* Restore cursor position */
  7840. - wrefresh(dialog);
  7841. - }
  7842. + if (end_reached)
  7843. + break;
  7844. +
  7845. + back_lines(page_length - 1);
  7846. + refresh_text_box(dialog, box, boxh, boxw, cur_y,
  7847. + cur_x, update_text, data);
  7848. break;
  7849. case KEY_NPAGE: /* Next page */
  7850. case ' ':
  7851. + case 'd':
  7852. if (end_reached)
  7853. break;
  7854. begin_reached = 0;
  7855. - refresh_text_box(dialog, box, boxh, boxw,
  7856. - cur_y, cur_x);
  7857. + refresh_text_box(dialog, box, boxh, boxw, cur_y,
  7858. + cur_x, update_text, data);
  7859. break;
  7860. case '0': /* Beginning of line */
  7861. case 'H': /* Scroll left */
  7862. @@ -234,8 +222,8 @@
  7863. hscroll--;
  7864. /* Reprint current page to scroll horizontally */
  7865. back_lines(page_length);
  7866. - refresh_text_box(dialog, box, boxh, boxw,
  7867. - cur_y, cur_x);
  7868. + refresh_text_box(dialog, box, boxh, boxw, cur_y,
  7869. + cur_x, update_text, data);
  7870. break;
  7871. case 'L': /* Scroll right */
  7872. case 'l':
  7873. @@ -245,11 +233,12 @@
  7874. hscroll++;
  7875. /* Reprint current page to scroll horizontally */
  7876. back_lines(page_length);
  7877. - refresh_text_box(dialog, box, boxh, boxw,
  7878. - cur_y, cur_x);
  7879. + refresh_text_box(dialog, box, boxh, boxw, cur_y,
  7880. + cur_x, update_text, data);
  7881. break;
  7882. case KEY_ESC:
  7883. - key = on_key_esc(dialog);
  7884. + if (on_key_esc(dialog) == KEY_ESC)
  7885. + done = true;
  7886. break;
  7887. case KEY_RESIZE:
  7888. back_lines(height);
  7889. @@ -257,11 +246,31 @@
  7890. delwin(dialog);
  7891. on_key_resize();
  7892. goto do_resize;
  7893. + default:
  7894. + for (i = 0; keys[i]; i++) {
  7895. + if (key == keys[i]) {
  7896. + done = true;
  7897. + break;
  7898. + }
  7899. + }
  7900. }
  7901. }
  7902. delwin(box);
  7903. delwin(dialog);
  7904. - return key; /* ESC pressed */
  7905. + if (_vscroll) {
  7906. + const char *s;
  7907. +
  7908. + s = buf;
  7909. + *_vscroll = 0;
  7910. + back_lines(page_length);
  7911. + while (s < page && (s = strchr(s, '\n'))) {
  7912. + (*_vscroll)++;
  7913. + s++;
  7914. + }
  7915. + }
  7916. + if (_hscroll)
  7917. + *_hscroll = hscroll;
  7918. + return key;
  7919. }
  7920. /*
  7921. @@ -298,12 +307,23 @@
  7922. }
  7923. /*
  7924. - * Print a new page of text. Called by dialog_textbox().
  7925. + * Print a new page of text.
  7926. */
  7927. -static void print_page(WINDOW * win, int height, int width)
  7928. +static void print_page(WINDOW *win, int height, int width, update_text_fn
  7929. + update_text, void *data)
  7930. {
  7931. int i, passed_end = 0;
  7932. + if (update_text) {
  7933. + char *end;
  7934. +
  7935. + for (i = 0; i < height; i++)
  7936. + get_line();
  7937. + end = page;
  7938. + back_lines(height);
  7939. + update_text(buf, page - buf, end - buf, data);
  7940. + }
  7941. +
  7942. page_length = 0;
  7943. for (i = 0; i < height; i++) {
  7944. print_line(win, i, width);
  7945. @@ -316,11 +336,10 @@
  7946. }
  7947. /*
  7948. - * Print a new line of text. Called by dialog_textbox() and print_page().
  7949. + * Print a new line of text.
  7950. */
  7951. static void print_line(WINDOW * win, int row, int width)
  7952. {
  7953. - int y, x;
  7954. char *line;
  7955. line = get_line();
  7956. @@ -329,10 +348,10 @@
  7957. waddch(win, ' ');
  7958. waddnstr(win, line, MIN(strlen(line), width - 2));
  7959. - getyx(win, y, x);
  7960. /* Clear 'residue' of previous line */
  7961. #if OLD_NCURSES
  7962. {
  7963. + int x = getcurx(win);
  7964. int i;
  7965. for (i = 0; i < width - x; i++)
  7966. waddch(win, ' ');
  7967. @@ -355,10 +374,8 @@
  7968. end_reached = 0;
  7969. while (*page != '\n') {
  7970. if (*page == '\0') {
  7971. - if (!end_reached) {
  7972. - end_reached = 1;
  7973. - break;
  7974. - }
  7975. + end_reached = 1;
  7976. + break;
  7977. } else if (i < MAX_LEN)
  7978. line[i++] = *(page++);
  7979. else {
  7980. @@ -371,7 +388,7 @@
  7981. if (i <= MAX_LEN)
  7982. line[i] = '\0';
  7983. if (!end_reached)
  7984. - page++; /* move pass '\n' */
  7985. + page++; /* move past '\n' */
  7986. return line;
  7987. }
  7988. diff -Nur uClibc-0.9.33.2/extra/config/lxdialog/util.c uClibc-git/extra/config/lxdialog/util.c
  7989. --- uClibc-0.9.33.2/extra/config/lxdialog/util.c 2012-05-15 09:20:09.000000000 +0200
  7990. +++ uClibc-git/extra/config/lxdialog/util.c 2014-07-25 20:36:04.861324498 +0200
  7991. @@ -19,8 +19,13 @@
  7992. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  7993. */
  7994. +#include <stdarg.h>
  7995. +
  7996. #include "dialog.h"
  7997. +/* Needed in signal handler in mconf.c */
  7998. +int saved_x, saved_y;
  7999. +
  8000. struct dialog_info dlg;
  8001. static void set_mono_theme(void)
  8002. @@ -249,15 +254,56 @@
  8003. void dialog_clear(void)
  8004. {
  8005. - attr_clear(stdscr, LINES, COLS, dlg.screen.atr);
  8006. + int lines, columns;
  8007. +
  8008. + lines = getmaxy(stdscr);
  8009. + columns = getmaxx(stdscr);
  8010. +
  8011. + attr_clear(stdscr, lines, columns, dlg.screen.atr);
  8012. /* Display background title if it exists ... - SLH */
  8013. if (dlg.backtitle != NULL) {
  8014. - int i;
  8015. + int i, len = 0, skip = 0;
  8016. + struct subtitle_list *pos;
  8017. wattrset(stdscr, dlg.screen.atr);
  8018. mvwaddstr(stdscr, 0, 1, (char *)dlg.backtitle);
  8019. +
  8020. + for (pos = dlg.subtitles; pos != NULL; pos = pos->next) {
  8021. + /* 3 is for the arrow and spaces */
  8022. + len += strlen(pos->text) + 3;
  8023. + }
  8024. +
  8025. wmove(stdscr, 1, 1);
  8026. - for (i = 1; i < COLS - 1; i++)
  8027. + if (len > columns - 2) {
  8028. + const char *ellipsis = "[...] ";
  8029. + waddstr(stdscr, ellipsis);
  8030. + skip = len - (columns - 2 - strlen(ellipsis));
  8031. + }
  8032. +
  8033. + for (pos = dlg.subtitles; pos != NULL; pos = pos->next) {
  8034. + if (skip == 0)
  8035. + waddch(stdscr, ACS_RARROW);
  8036. + else
  8037. + skip--;
  8038. +
  8039. + if (skip == 0)
  8040. + waddch(stdscr, ' ');
  8041. + else
  8042. + skip--;
  8043. +
  8044. + if (skip < strlen(pos->text)) {
  8045. + waddstr(stdscr, pos->text + skip);
  8046. + skip = 0;
  8047. + } else
  8048. + skip -= strlen(pos->text);
  8049. +
  8050. + if (skip == 0)
  8051. + waddch(stdscr, ' ');
  8052. + else
  8053. + skip--;
  8054. + }
  8055. +
  8056. + for (i = len + 1; i < columns - 1; i++)
  8057. waddch(stdscr, ACS_HLINE);
  8058. }
  8059. wnoutrefresh(stdscr);
  8060. @@ -271,8 +317,12 @@
  8061. int height, width;
  8062. initscr(); /* Init curses */
  8063. +
  8064. + /* Get current cursor position for signal handler in mconf.c */
  8065. + getyx(stdscr, saved_y, saved_x);
  8066. +
  8067. getmaxyx(stdscr, height, width);
  8068. - if (height < 19 || width < 80) {
  8069. + if (height < WINDOW_HEIGTH_MIN || width < WINDOW_WIDTH_MIN) {
  8070. endwin();
  8071. return -ERRDISPLAYTOOSMALL;
  8072. }
  8073. @@ -293,6 +343,11 @@
  8074. dlg.backtitle = backtitle;
  8075. }
  8076. +void set_dialog_subtitles(struct subtitle_list *subtitles)
  8077. +{
  8078. + dlg.subtitles = subtitles;
  8079. +}
  8080. +
  8081. /*
  8082. * End using dialog functions.
  8083. */
  8084. @@ -321,27 +376,19 @@
  8085. /*
  8086. * Print a string of text in a window, automatically wrap around to the
  8087. * next line if the string is too long to fit on one line. Newline
  8088. - * characters '\n' are replaced by spaces. We start on a new line
  8089. + * characters '\n' are propperly processed. We start on a new line
  8090. * if there is no room for at least 4 nonblanks following a double-space.
  8091. */
  8092. void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x)
  8093. {
  8094. int newl, cur_x, cur_y;
  8095. - int i, prompt_len, room, wlen;
  8096. - char tempstr[MAX_LEN + 1], *word, *sp, *sp2;
  8097. + int prompt_len, room, wlen;
  8098. + char tempstr[MAX_LEN + 1], *word, *sp, *sp2, *newline_separator = 0;
  8099. strcpy(tempstr, prompt);
  8100. prompt_len = strlen(tempstr);
  8101. - /*
  8102. - * Remove newlines
  8103. - */
  8104. - for (i = 0; i < prompt_len; i++) {
  8105. - if (tempstr[i] == '\n')
  8106. - tempstr[i] = ' ';
  8107. - }
  8108. -
  8109. if (prompt_len <= width - x * 2) { /* If prompt is short */
  8110. wmove(win, y, (width - prompt_len) / 2);
  8111. waddstr(win, tempstr);
  8112. @@ -351,7 +398,10 @@
  8113. newl = 1;
  8114. word = tempstr;
  8115. while (word && *word) {
  8116. - sp = strchr(word, ' ');
  8117. + sp = strpbrk(word, "\n ");
  8118. + if (sp && *sp == '\n')
  8119. + newline_separator = sp;
  8120. +
  8121. if (sp)
  8122. *sp++ = 0;
  8123. @@ -363,7 +413,7 @@
  8124. if (wlen > room ||
  8125. (newl && wlen < 4 && sp
  8126. && wlen + 1 + strlen(sp) > room
  8127. - && (!(sp2 = strchr(sp, ' '))
  8128. + && (!(sp2 = strpbrk(sp, "\n "))
  8129. || wlen + 1 + (sp2 - sp) > room))) {
  8130. cur_y++;
  8131. cur_x = x;
  8132. @@ -371,7 +421,15 @@
  8133. wmove(win, cur_y, cur_x);
  8134. waddstr(win, word);
  8135. getyx(win, cur_y, cur_x);
  8136. - cur_x++;
  8137. +
  8138. + /* Move to the next line if the word separator was a newline */
  8139. + if (newline_separator) {
  8140. + cur_y++;
  8141. + cur_x = x;
  8142. + newline_separator = 0;
  8143. + } else
  8144. + cur_x++;
  8145. +
  8146. if (sp && *sp == ' ') {
  8147. cur_x++; /* double space */
  8148. while (*++sp == ' ') ;
  8149. diff -Nur uClibc-0.9.33.2/extra/config/lxdialog/yesno.c uClibc-git/extra/config/lxdialog/yesno.c
  8150. --- uClibc-0.9.33.2/extra/config/lxdialog/yesno.c 2012-05-15 09:20:09.000000000 +0200
  8151. +++ uClibc-git/extra/config/lxdialog/yesno.c 2014-07-25 20:36:04.861324498 +0200
  8152. @@ -45,14 +45,14 @@
  8153. WINDOW *dialog;
  8154. do_resize:
  8155. - if (getmaxy(stdscr) < (height + 4))
  8156. + if (getmaxy(stdscr) < (height + YESNO_HEIGTH_MIN))
  8157. return -ERRDISPLAYTOOSMALL;
  8158. - if (getmaxx(stdscr) < (width + 4))
  8159. + if (getmaxx(stdscr) < (width + YESNO_WIDTH_MIN))
  8160. return -ERRDISPLAYTOOSMALL;
  8161. /* center dialog box on screen */
  8162. - x = (COLS - width) / 2;
  8163. - y = (LINES - height) / 2;
  8164. + x = (getmaxx(stdscr) - width) / 2;
  8165. + y = (getmaxy(stdscr) - height) / 2;
  8166. draw_shadow(stdscr, y, x, height, width);
  8167. diff -Nur uClibc-0.9.33.2/extra/config/Makefile uClibc-git/extra/config/Makefile
  8168. --- uClibc-0.9.33.2/extra/config/Makefile 2012-05-15 09:20:09.000000000 +0200
  8169. +++ uClibc-git/extra/config/Makefile 2014-07-25 20:36:04.853324457 +0200
  8170. @@ -1,16 +1,17 @@
  8171. top_srcdir ?= ../../
  8172. -include $(top_srcdir)Rules.mak
  8173. -include $(top_srcdir)Makerules
  8174. -
  8175. -# ugh
  8176. -top_srcdir:=$(shell cd $(top_srcdir) && pwd)/
  8177. ifdef O
  8178. top_builddir ?= ../../
  8179. else
  8180. top_builddir = ../../
  8181. endif
  8182. -srctree := $(top_srcdir)
  8183. +
  8184. +include $(top_srcdir)Rules.mak
  8185. +include $(top_srcdir)Makerules
  8186. +
  8187. +# ugh
  8188. +top_srcdir:=$(shell cd $(top_srcdir) && pwd)/
  8189. +
  8190. src := extra/config
  8191. obj := $(top_builddir)$(src)
  8192. @@ -18,29 +19,23 @@
  8193. generated := $(addprefix $(obj)/,$(generated:.c=.o))
  8194. include $(top_srcdir)extra/config/Makefile.kconfig
  8195. -PHONY += $(always)
  8196. -chk-lxdialog := $(top_srcdir)$(src)/lxdialog/check-lxdialog.sh
  8197. -check-lxdialog := cd $(obj) && $(CONFIG_SHELL) $(chk-lxdialog)
  8198. -HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) -c '$(check-lxdialog) -ccflags')
  8199. -HOST_LOADLIBES = $(shell $(CONFIG_SHELL) -c '$(check-lxdialog) -ldflags $(HOSTCC)')
  8200. -HOST_EXTRACFLAGS += -DLOCALE
  8201. -HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) -c '$(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS)')
  8202. +HOST_EXTRACFLAGS += -DCONFIG_='""'
  8203. # do not create temporary object in the readonly srctree
  8204. -$(obj)/dochecklxdialog:
  8205. - $(Q)cd $(obj) && $(CONFIG_SHELL) $(chk-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES)
  8206. -HOSTCFLAGS_lex.zconf.o := -I$(top_srcdir)$(src)
  8207. +$(obj)/dochecklxdialog: CONFIG_SHELL:=cd $(obj) && $(CONFIG_SHELL)
  8208. +HOSTCFLAGS_zconf.lex.o := -I$(top_srcdir)$(src)
  8209. HOSTCFLAGS_zconf.tab.o := -I$(top_srcdir)$(src)
  8210. conf-objs := $(addprefix $(obj)/,$(conf-objs))
  8211. mconf-objs := $(addprefix $(obj)/,$(mconf-objs))
  8212. +nconf-objs := $(addprefix $(obj)/,$(nconf-objs))
  8213. kxgettext-objs := $(addprefix $(obj)/,$(kxgettext-objs))
  8214. ifeq ($(findstring mconf,$(MAKECMDGOALS)),mconf)
  8215. hostprogs-y += mconf
  8216. endif
  8217. -
  8218. -#BUILD_CFLAGS-config = -W -Wall -pedantic
  8219. -#BUILD_CFLAGS-lxdialog = -W -Wall -pedantic
  8220. +ifeq ($(findstring nconf,$(MAKECMDGOALS)),nconf)
  8221. +hostprogs-y += nconf
  8222. +endif
  8223. __hostprogs := $(sort $(hostprogs-y) $(hostprogs-m))
  8224. host-csingle:= $(foreach m,$(__hostprogs),$(if $($(m)-objs),,$(m)))
  8225. @@ -48,16 +43,18 @@
  8226. $(if $($(m)-cxxobjs),,$(if $($(m)-objs),$(m))))
  8227. host-cobjs := $(sort $(foreach m,$(__hostprogs),$($(m)-objs)))
  8228. -conf mconf kxgettext: %: $(obj)/%
  8229. -$(obj)/conf $(obj)/mconf $(obj)/kxgettext: BUILD_LDFLAGS=$(HOST_LOADLIBES)
  8230. +conf mconf nconf kxgettext: %: $(obj)/%
  8231. +$(obj)/conf $(obj)/mconf $(obj)/nconf $(obj)/kxgettext: BUILD_LDFLAGS=$(HOSTLOADLIBES_$(@F))
  8232. $(obj)/conf: $(conf-objs)
  8233. $(hcompile.u)
  8234. $(obj)/mconf: $(mconf-objs)
  8235. $(hcompile.u)
  8236. +$(obj)/nconf: $(nconf-objs)
  8237. + $(hcompile.u)
  8238. $(obj)/kxgettext: $(kxgettext-objs)
  8239. $(hcompile.u)
  8240. -$(host-csingle) $(host-cmulti) $(host-cobjs): BUILD_CFLAGS=$(HOST_EXTRACFLAGS) \
  8241. +$(host-csingle) $(host-cmulti) $(host-cobjs): BUILD_CFLAGS+=$(HOST_EXTRACFLAGS) \
  8242. $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F))
  8243. host-cobjs.nogen := $(filter-out $(generated),$(host-cobjs))
  8244. @@ -68,19 +65,18 @@
  8245. $(host-cobjs.generated): $(obj)/%.o: $(obj)/%.c
  8246. $(hcompile.o)
  8247. -ifndef LKC_GENPARSER
  8248. +# we use the pre-generated always
  8249. $(obj)/%:: $(top_srcdir)$(src)/%_shipped
  8250. @$(disp_gen)
  8251. $(Q)cat $< > $@
  8252. -endif
  8253. +
  8254. CLEAN_extra/config menuconfig_clean:
  8255. $(do_rm) $(clean-files) $(lxdialog) conf $(wildcard *.o)
  8256. -distclean: clean
  8257. - $(do_rm) $(lxdialog) $(conf-objs) $(mconf-objs) \
  8258. +distclean: CLEAN_extra/config
  8259. + $(Q)$(RM) -r $(lxdialog) $(conf-objs) $(mconf-objs) $(nconf-objs) \
  8260. $(kxgettext-objs) \
  8261. $(hostprogs-y) $(qconf-cxxobjs) $(qconf-objs) $(gconf-objs) \
  8262. - .depend
  8263. - $(do_rm) -r $(top_builddir)include/config
  8264. + .depend \
  8265. + $(top_builddir)include/config $(top_builddir)include/generated
  8266. -FORCE:
  8267. -.PHONY: FORCE clean distclean $(always)
  8268. +.PHONY: clean distclean $(PHONY)
  8269. diff -Nur uClibc-0.9.33.2/extra/config/Makefile.kconfig uClibc-git/extra/config/Makefile.kconfig
  8270. --- uClibc-0.9.33.2/extra/config/Makefile.kconfig 2012-05-15 09:20:09.000000000 +0200
  8271. +++ uClibc-git/extra/config/Makefile.kconfig 2014-07-25 20:36:04.853324457 +0200
  8272. @@ -2,14 +2,18 @@
  8273. # Kernel configuration targets
  8274. # These targets are used from top-level makefile
  8275. -PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config
  8276. +PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \
  8277. + localmodconfig localyesconfig
  8278. ifdef KBUILD_KCONFIG
  8279. Kconfig := $(KBUILD_KCONFIG)
  8280. else
  8281. -Kconfig := arch/$(SRCARCH)/Kconfig
  8282. +Kconfig := Kconfig
  8283. endif
  8284. +# We need this, in case the user has it in its environment
  8285. +unexport CONFIG_
  8286. +
  8287. xconfig: $(obj)/qconf
  8288. $< $(Kconfig)
  8289. @@ -20,91 +24,121 @@
  8290. $< $(Kconfig)
  8291. config: $(obj)/conf
  8292. + $< --oldaskconfig $(Kconfig)
  8293. +
  8294. +nconfig: $(obj)/nconf
  8295. $< $(Kconfig)
  8296. oldconfig: $(obj)/conf
  8297. - $< -o $(Kconfig)
  8298. + $< --$@ $(Kconfig)
  8299. silentoldconfig: $(obj)/conf
  8300. - $< -s $(Kconfig)
  8301. + $(Q)mkdir -p include/generated
  8302. + $< --$@ $(Kconfig)
  8303. +
  8304. +localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
  8305. + $(Q)mkdir -p include/generated
  8306. + $(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config
  8307. + $(Q)if [ -f .config ]; then \
  8308. + cmp -s .tmp.config .config || \
  8309. + (mv -f .config .config.old.1; \
  8310. + mv -f .tmp.config .config; \
  8311. + $(obj)/conf --silentoldconfig $(Kconfig); \
  8312. + mv -f .config.old.1 .config.old) \
  8313. + else \
  8314. + mv -f .tmp.config .config; \
  8315. + $(obj)/conf --silentoldconfig $(Kconfig); \
  8316. + fi
  8317. + $(Q)rm -f .tmp.config
  8318. # Create new linux.pot file
  8319. # Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files
  8320. -# The symlink is used to repair a deficiency in arch/um
  8321. update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
  8322. - $(Q)echo " GEN config"
  8323. - $(Q)xgettext --default-domain=linux \
  8324. - --add-comments --keyword=_ --keyword=N_ \
  8325. - --from-code=UTF-8 \
  8326. - --files-from=scripts/kconfig/POTFILES.in \
  8327. + $(Q)echo " GEN config.pot"
  8328. + $(Q)xgettext --default-domain=linux \
  8329. + --add-comments --keyword=_ --keyword=N_ \
  8330. + --from-code=UTF-8 \
  8331. + --files-from=$(srctree)/scripts/kconfig/POTFILES.in \
  8332. + --directory=$(srctree) --directory=$(objtree) \
  8333. --output $(obj)/config.pot
  8334. $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot
  8335. - $(Q)ln -fs Kconfig.i386 arch/um/Kconfig.arch
  8336. - $(Q)(for i in `ls arch/*/Kconfig`; \
  8337. + $(Q)(for i in `ls $(srctree)/arch/*/Kconfig \
  8338. + $(srctree)/arch/*/um/Kconfig`; \
  8339. do \
  8340. - echo " GEN $$i"; \
  8341. + echo " GEN $$i"; \
  8342. $(obj)/kxgettext $$i \
  8343. >> $(obj)/config.pot; \
  8344. done )
  8345. + $(Q)echo " GEN linux.pot"
  8346. $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \
  8347. --output $(obj)/linux.pot
  8348. - $(Q)rm -f arch/um/Kconfig.arch
  8349. $(Q)rm -f $(obj)/config.pot
  8350. -PHONY += randconfig allyesconfig allnoconfig allmodconfig defconfig
  8351. +PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig
  8352. -randconfig: $(obj)/conf
  8353. - $< -r $(Kconfig)
  8354. +allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf
  8355. + $< --$@ $(Kconfig)
  8356. -allyesconfig: $(obj)/conf
  8357. - $< -y $(Kconfig)
  8358. +PHONY += listnewconfig olddefconfig oldnoconfig savedefconfig defconfig
  8359. -allnoconfig: $(obj)/conf
  8360. - $< -n $(Kconfig)
  8361. +listnewconfig olddefconfig: $(obj)/conf
  8362. + $< --$@ $(Kconfig)
  8363. -allmodconfig: $(obj)/conf
  8364. - $< -m $(Kconfig)
  8365. +# oldnoconfig is an alias of olddefconfig, because people already are dependent
  8366. +# on its behavior(sets new symbols to their default value but not 'n') with the
  8367. +# counter-intuitive name.
  8368. +oldnoconfig: $(obj)/conf
  8369. + $< --olddefconfig $(Kconfig)
  8370. +
  8371. +savedefconfig: $(obj)/conf
  8372. + $< --$@=defconfig $(Kconfig)
  8373. defconfig: $(obj)/conf
  8374. ifeq ($(KBUILD_DEFCONFIG),)
  8375. - $< -d $(Kconfig)
  8376. + $< --defconfig $(Kconfig)
  8377. else
  8378. @echo "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
  8379. - $(Q)$< -D arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
  8380. + $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
  8381. endif
  8382. %_defconfig: $(obj)/conf
  8383. - $(Q)$< -D arch/$(SRCARCH)/configs/$@ $(Kconfig)
  8384. + $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
  8385. # Help text used by make help
  8386. help:
  8387. @echo ' config - Update current config utilising a line-oriented program'
  8388. + @echo ' nconfig - Update current config utilising a ncurses menu based program'
  8389. @echo ' menuconfig - Update current config utilising a menu based program'
  8390. @echo ' xconfig - Update current config utilising a QT based front-end'
  8391. @echo ' gconfig - Update current config utilising a GTK based front-end'
  8392. @echo ' oldconfig - Update current config utilising a provided .config as base'
  8393. - @echo ' silentoldconfig - Same as oldconfig, but quietly'
  8394. - @echo ' randconfig - New config with random answer to all options'
  8395. - @echo ' defconfig - New config with default answer to all options'
  8396. - @echo ' allmodconfig - New config selecting modules when possible'
  8397. - @echo ' allyesconfig - New config where all options are accepted with yes'
  8398. + @echo ' localmodconfig - Update current config disabling modules not loaded'
  8399. + @echo ' localyesconfig - Update current config converting local mods to core'
  8400. + @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps'
  8401. + @echo ' defconfig - New config with default from ARCH supplied defconfig'
  8402. + @echo ' savedefconfig - Save current config as ./defconfig (minimal config)'
  8403. @echo ' allnoconfig - New config where all options are answered with no'
  8404. + @echo ' allyesconfig - New config where all options are accepted with yes'
  8405. + @echo ' allmodconfig - New config selecting modules when possible'
  8406. + @echo ' alldefconfig - New config with all symbols set to default'
  8407. + @echo ' randconfig - New config with random answer to all options'
  8408. + @echo ' listnewconfig - List new options'
  8409. + @echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value'
  8410. # lxdialog stuff
  8411. check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
  8412. # Use recursively expanded variables so we do not call gcc unless
  8413. # we really need to do so. (Do not call gcc as part of make mrproper)
  8414. -HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
  8415. -HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
  8416. -
  8417. -HOST_EXTRACFLAGS += -DLOCALE
  8418. -
  8419. +HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \
  8420. + -DLOCALE
  8421. # ===========================================================================
  8422. # Shared Makefile for the various kconfig executables:
  8423. # conf: Used for defconfig, oldconfig and related targets
  8424. -# mconf: Used for the mconfig target.
  8425. +# nconf: Used for the nconfig target.
  8426. +# Utilizes ncurses
  8427. +# mconf: Used for the menuconfig target
  8428. # Utilizes the lxdialog package
  8429. # qconf: Used for the xconfig target
  8430. # Based on QT which needs to be installed to compile it
  8431. @@ -116,15 +150,27 @@
  8432. lxdialog += lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o
  8433. conf-objs := conf.o zconf.tab.o
  8434. -mconf-objs := mconf.o zconf.tab.o $(lxdialog)
  8435. +mconf-objs := mconf.o zconf.tab.o $(lxdialog)
  8436. +nconf-objs := nconf.o zconf.tab.o nconf.gui.o
  8437. kxgettext-objs := kxgettext.o zconf.tab.o
  8438. +qconf-cxxobjs := qconf.o
  8439. +qconf-objs := zconf.tab.o
  8440. +gconf-objs := gconf.o zconf.tab.o
  8441. +
  8442. +hostprogs-y := conf
  8443. -hostprogs-y := conf qconf gconf kxgettext
  8444. +ifeq ($(MAKECMDGOALS),nconfig)
  8445. + hostprogs-y += nconf
  8446. +endif
  8447. ifeq ($(MAKECMDGOALS),menuconfig)
  8448. hostprogs-y += mconf
  8449. endif
  8450. +ifeq ($(MAKECMDGOALS),update-po-config)
  8451. + hostprogs-y += kxgettext
  8452. +endif
  8453. +
  8454. ifeq ($(MAKECMDGOALS),xconfig)
  8455. qconf-target := 1
  8456. endif
  8457. @@ -134,24 +180,23 @@
  8458. ifeq ($(qconf-target),1)
  8459. -qconf-cxxobjs := qconf.o
  8460. -qconf-objs := kconfig_load.o zconf.tab.o
  8461. + hostprogs-y += qconf
  8462. endif
  8463. ifeq ($(gconf-target),1)
  8464. -gconf-objs := gconf.o kconfig_load.o zconf.tab.o
  8465. + hostprogs-y += gconf
  8466. endif
  8467. -clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \
  8468. - .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
  8469. -clean-files += mconf qconf gconf
  8470. +clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck
  8471. +clean-files += zconf.tab.c zconf.lex.c zconf.hash.c gconf.glade.h
  8472. +clean-files += mconf qconf gconf nconf
  8473. clean-files += config.pot linux.pot
  8474. # Check that we have the required ncurses stuff installed for lxdialog (menuconfig)
  8475. PHONY += $(obj)/dochecklxdialog
  8476. $(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog
  8477. -#$(obj)/dochecklxdialog:
  8478. -# $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES)
  8479. +$(obj)/dochecklxdialog:
  8480. + $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)
  8481. always := dochecklxdialog
  8482. @@ -159,16 +204,24 @@
  8483. HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS))
  8484. # generated files seem to need this to find local include files
  8485. -HOSTCFLAGS_lex.zconf.o := -I$(src)
  8486. +HOSTCFLAGS_zconf.lex.o := -I$(src)
  8487. HOSTCFLAGS_zconf.tab.o := -I$(src)
  8488. -HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl
  8489. -HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK
  8490. +LEX_PREFIX_zconf := zconf
  8491. +YACC_PREFIX_zconf := zconf
  8492. +
  8493. +HOSTLOADLIBES_qconf = $(KC_QT_LIBS)
  8494. +HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS)
  8495. HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0`
  8496. HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
  8497. - -D LKC_DIRECT_LINK
  8498. + -Wno-missing-prototypes
  8499. +HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
  8500. +
  8501. +HOSTLOADLIBES_nconf = $(shell \
  8502. + pkg-config --libs menu panel ncurses 2>/dev/null \
  8503. + || echo "-lmenu -lpanel -lncurses" )
  8504. $(obj)/qconf.o: $(obj)/.tmp_qtcheck
  8505. ifeq ($(qconf-target),1)
  8506. @@ -178,40 +231,48 @@
  8507. # QT needs some extra effort...
  8508. $(obj)/.tmp_qtcheck:
  8509. @set -e; echo " CHECK qt"; dir=""; pkg=""; \
  8510. - pkg-config --exists qt 2> /dev/null && pkg=qt; \
  8511. - pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \
  8512. - if [ -n "$$pkg" ]; then \
  8513. - cflags="\$$(shell pkg-config $$pkg --cflags)"; \
  8514. - libs="\$$(shell pkg-config $$pkg --libs)"; \
  8515. - moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \
  8516. - dir="$$(pkg-config $$pkg --variable=prefix)"; \
  8517. + if ! pkg-config --exists QtCore 2> /dev/null; then \
  8518. + echo "* Unable to find the QT4 tool qmake. Trying to use QT3"; \
  8519. + pkg-config --exists qt 2> /dev/null && pkg=qt; \
  8520. + pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \
  8521. + if [ -n "$$pkg" ]; then \
  8522. + cflags="\$$(shell pkg-config $$pkg --cflags)"; \
  8523. + libs="\$$(shell pkg-config $$pkg --libs)"; \
  8524. + moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \
  8525. + dir="$$(pkg-config $$pkg --variable=prefix)"; \
  8526. + else \
  8527. + for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \
  8528. + if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \
  8529. + done; \
  8530. + if [ -z "$$dir" ]; then \
  8531. + echo >&2 "*"; \
  8532. + echo >&2 "* Unable to find any QT installation. Please make sure that"; \
  8533. + echo >&2 "* the QT4 or QT3 development package is correctly installed and"; \
  8534. + echo >&2 "* either qmake can be found or install pkg-config or set"; \
  8535. + echo >&2 "* the QTDIR environment variable to the correct location."; \
  8536. + echo >&2 "*"; \
  8537. + false; \
  8538. + fi; \
  8539. + libpath=$$dir/lib; lib=qt; osdir=""; \
  8540. + $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
  8541. + osdir=x$$($(HOSTCXX) -print-multi-os-directory); \
  8542. + test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \
  8543. + test -f $$libpath/libqt-mt.so && lib=qt-mt; \
  8544. + cflags="-I$$dir/include"; \
  8545. + libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \
  8546. + moc="$$dir/bin/moc"; \
  8547. + fi; \
  8548. + if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \
  8549. + echo "*"; \
  8550. + echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \
  8551. + echo "*"; \
  8552. + moc="/usr/bin/moc"; \
  8553. + fi; \
  8554. else \
  8555. - for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \
  8556. - if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \
  8557. - done; \
  8558. - if [ -z "$$dir" ]; then \
  8559. - echo "*"; \
  8560. - echo "* Unable to find the QT3 installation. Please make sure that"; \
  8561. - echo "* the QT3 development package is correctly installed and"; \
  8562. - echo "* either install pkg-config or set the QTDIR environment"; \
  8563. - echo "* variable to the correct location."; \
  8564. - echo "*"; \
  8565. - false; \
  8566. - fi; \
  8567. - libpath=$$dir/lib; lib=qt; osdir=""; \
  8568. - $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
  8569. - osdir=x$$($(HOSTCXX) -print-multi-os-directory); \
  8570. - test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \
  8571. - test -f $$libpath/libqt-mt.so && lib=qt-mt; \
  8572. - cflags="-I$$dir/include"; \
  8573. - libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \
  8574. - moc="$$dir/bin/moc"; \
  8575. - fi; \
  8576. - if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \
  8577. - echo "*"; \
  8578. - echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \
  8579. - echo "*"; \
  8580. - moc="/usr/bin/moc"; \
  8581. + cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \
  8582. + libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \
  8583. + moc="\$$(shell pkg-config QtCore --variable=moc_location)"; \
  8584. + [ -n "$$moc" ] || moc="\$$(shell pkg-config QtCore --variable=prefix)/bin/moc"; \
  8585. fi; \
  8586. echo "KC_QT_CFLAGS=$$cflags" > $@; \
  8587. echo "KC_QT_LIBS=$$libs" >> $@; \
  8588. @@ -229,61 +290,33 @@
  8589. if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then \
  8590. touch $@; \
  8591. else \
  8592. - echo "*"; \
  8593. - echo "* GTK+ is present but version >= 2.0.0 is required."; \
  8594. - echo "*"; \
  8595. + echo >&2 "*"; \
  8596. + echo >&2 "* GTK+ is present but version >= 2.0.0 is required."; \
  8597. + echo >&2 "*"; \
  8598. false; \
  8599. fi \
  8600. else \
  8601. - echo "*"; \
  8602. - echo "* Unable to find the GTK+ installation. Please make sure that"; \
  8603. - echo "* the GTK+ 2.0 development package is correctly installed..."; \
  8604. - echo "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; \
  8605. - echo "*"; \
  8606. + echo >&2 "*"; \
  8607. + echo >&2 "* Unable to find the GTK+ installation. Please make sure that"; \
  8608. + echo >&2 "* the GTK+ 2.0 development package is correctly installed..."; \
  8609. + echo >&2 "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; \
  8610. + echo >&2 "*"; \
  8611. false; \
  8612. fi
  8613. endif
  8614. -$(obj)/zconf.tab.o: $(obj)/lex.zconf.c $(obj)/zconf.hash.c
  8615. -
  8616. -$(obj)/kconfig_load.o: $(obj)/lkc_defs.h
  8617. +$(obj)/zconf.tab.o: $(obj)/zconf.lex.c $(obj)/zconf.hash.c
  8618. -$(obj)/qconf.o: $(obj)/qconf.moc $(obj)/lkc_defs.h
  8619. +$(obj)/qconf.o: $(obj)/qconf.moc
  8620. -$(obj)/gconf.o: $(obj)/lkc_defs.h
  8621. +quiet_cmd_moc = MOC $@
  8622. + cmd_moc = $(KC_QT_MOC) -i $< -o $@
  8623. -$(obj)/%.moc: $(src)/%.h
  8624. - $(KC_QT_MOC) -i $< -o $@
  8625. -
  8626. -$(obj)/lkc_defs.h: $(src)/lkc_proto.h
  8627. - sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
  8628. +$(obj)/%.moc: $(src)/%.h $(obj)/.tmp_qtcheck
  8629. + $(call cmd,moc)
  8630. # Extract gconf menu items for I18N support
  8631. $(obj)/gconf.glade.h: $(obj)/gconf.glade
  8632. - intltool-extract --type=gettext/glade $(obj)/gconf.glade
  8633. -
  8634. -###
  8635. -# The following requires flex/bison/gperf
  8636. -# By default we use the _shipped versions, uncomment the following line if
  8637. -# you are modifying the flex/bison src.
  8638. -# LKC_GENPARSER := 1
  8639. -
  8640. -ifdef LKC_GENPARSER
  8641. -
  8642. -$(obj)/zconf.tab.c: $(src)/zconf.y
  8643. -$(obj)/lex.zconf.c: $(src)/zconf.l
  8644. -$(obj)/zconf.hash.c: $(src)/zconf.gperf
  8645. -
  8646. -%.tab.c: %.y
  8647. - bison -l -b $* -p $(notdir $*) $<
  8648. - cp $@ $@_shipped
  8649. -
  8650. -lex.%.c: %.l
  8651. - flex -L -P$(notdir $*) -o$@ $<
  8652. - cp $@ $@_shipped
  8653. -
  8654. -%.hash.c: %.gperf
  8655. - gperf < $< > $@
  8656. - cp $@ $@_shipped
  8657. + $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
  8658. + $(obj)/gconf.glade
  8659. -endif
  8660. diff -Nur uClibc-0.9.33.2/extra/config/mconf.c uClibc-git/extra/config/mconf.c
  8661. --- uClibc-0.9.33.2/extra/config/mconf.c 2012-05-15 09:20:09.000000000 +0200
  8662. +++ uClibc-git/extra/config/mconf.c 2014-07-25 20:36:04.861324498 +0200
  8663. @@ -15,20 +15,19 @@
  8664. #include <stdarg.h>
  8665. #include <stdlib.h>
  8666. #include <string.h>
  8667. +#include <signal.h>
  8668. #include <unistd.h>
  8669. #include <locale.h>
  8670. -#define LKC_DIRECT_LINK
  8671. #include "lkc.h"
  8672. #include "lxdialog/dialog.h"
  8673. static const char mconf_readme[] = N_(
  8674. "Overview\n"
  8675. "--------\n"
  8676. -"Some features may be built directly into uClibc. Some features\n"
  8677. -"may be completely removed altogether. There are also certain\n"
  8678. -"parameters which are not really features, but must be\n"
  8679. -"entered in as decimal or hexadecimal numbers or possibly text.\n"
  8680. +"This interface let you select features and parameters for the build.\n"
  8681. +"Features can either be built-in, modularized, or ignored. Parameters\n"
  8682. +"must be entered in as decimal or hexadecimal numbers or text.\n"
  8683. "\n"
  8684. "Menu items beginning with following braces represent features that\n"
  8685. " [ ] can be built in or removed\n"
  8686. @@ -49,7 +48,7 @@
  8687. "----------\n"
  8688. "o Use the Up/Down arrow keys (cursor keys) to highlight the item\n"
  8689. " you wish to change or submenu wish to select and press <Enter>.\n"
  8690. -" Submenus are designated by \"--->\".\n"
  8691. +" Submenus are designated by \"--->\", empty ones by \"----\".\n"
  8692. "\n"
  8693. " Shortcut: Press the option's highlighted letter (hotkey).\n"
  8694. " Pressing a hotkey more than once will sequence\n"
  8695. @@ -66,13 +65,15 @@
  8696. " there is a delayed response which you may find annoying.\n"
  8697. "\n"
  8698. " Also, the <TAB> and cursor keys will cycle between <Select>,\n"
  8699. -" <Exit> and <Help>\n"
  8700. +" <Exit> and <Help>.\n"
  8701. "\n"
  8702. "o To get help with an item, use the cursor keys to highlight <Help>\n"
  8703. -" and Press <ENTER>.\n"
  8704. +" and press <ENTER>.\n"
  8705. "\n"
  8706. " Shortcut: Press <H> or <?>.\n"
  8707. "\n"
  8708. +"o To toggle the display of hidden options, press <Z>.\n"
  8709. +"\n"
  8710. "\n"
  8711. "Radiolists (Choice lists)\n"
  8712. "-----------\n"
  8713. @@ -104,10 +105,10 @@
  8714. "Text Box (Help Window)\n"
  8715. "--------\n"
  8716. "o Use the cursor keys to scroll up/down/left/right. The VI editor\n"
  8717. -" keys h,j,k,l function here as do <SPACE BAR> and <B> for those\n"
  8718. -" who are familiar with less and lynx.\n"
  8719. +" keys h,j,k,l function here as do <u>, <d>, <SPACE BAR> and <B> for \n"
  8720. +" those who are familiar with less and lynx.\n"
  8721. "\n"
  8722. -"o Press <E>, <X>, <Enter> or <Esc><Esc> to exit.\n"
  8723. +"o Press <E>, <X>, <q>, <Enter> or <Esc><Esc> to exit.\n"
  8724. "\n"
  8725. "\n"
  8726. "Alternate Configuration Files\n"
  8727. @@ -147,9 +148,9 @@
  8728. "\n"
  8729. "Optional personality available\n"
  8730. "------------------------------\n"
  8731. -"If you prefer to have all of the options listed in a single\n"
  8732. -"menu, rather than the default multimenu hierarchy, run the menuconfig\n"
  8733. -"with MENUCONFIG_MODE environment variable set to single_menu. Example:\n"
  8734. +"If you prefer to have all of the options listed in a single menu, rather\n"
  8735. +"than the default multimenu hierarchy, run the menuconfig with\n"
  8736. +"MENUCONFIG_MODE environment variable set to single_menu. Example:\n"
  8737. "\n"
  8738. "make MENUCONFIG_MODE=single_menu menuconfig\n"
  8739. "\n"
  8740. @@ -175,11 +176,11 @@
  8741. "\n"),
  8742. menu_instructions[] = N_(
  8743. "Arrow keys navigate the menu. "
  8744. - "<Enter> selects submenus --->. "
  8745. + "<Enter> selects submenus ---> (or empty submenus ----). "
  8746. "Highlighted letters are hotkeys. "
  8747. - "Pressing <Y> selectes a feature, while <N> will exclude a feature. "
  8748. + "Pressing <Y> includes, <N> excludes, <M> modularizes features. "
  8749. "Press <Esc><Esc> to exit, <?> for Help, </> for Search. "
  8750. - "Legend: [*] feature is selected [ ] feature is excluded"),
  8751. + "Legend: [*] built-in [ ] excluded <M> module < > module capable"),
  8752. radiolist_instructions[] = N_(
  8753. "Use the arrow keys to navigate this window or "
  8754. "press the hotkey of the item you wish to select "
  8755. @@ -198,8 +199,6 @@
  8756. setmod_text[] = N_(
  8757. "This feature depends on another which has been configured as a module.\n"
  8758. "As a result, this feature will be built as a module."),
  8759. -nohelp_text[] = N_(
  8760. - "There is no help available for this option.\n"),
  8761. load_config_text[] = N_(
  8762. "Enter the name of the configuration file you wish to load. "
  8763. "Accept the name shown to restore the configuration you "
  8764. @@ -210,18 +209,18 @@
  8765. "configurations available on a single machine.\n"
  8766. "\n"
  8767. "If you have saved a previous configuration in a file other than the\n"
  8768. - "default, entering the name of the file here will allow you\n"
  8769. - "to modify that configuration.\n"
  8770. + "default one, entering its name here will allow you to modify that\n"
  8771. + "configuration.\n"
  8772. "\n"
  8773. "If you are uncertain, then you have probably never used alternate\n"
  8774. - "configuration files. You should therefor leave this blank to abort.\n"),
  8775. + "configuration files. You should therefore leave this blank to abort.\n"),
  8776. save_config_text[] = N_(
  8777. "Enter a filename to which this configuration should be saved "
  8778. "as an alternate. Leave blank to abort."),
  8779. save_config_help[] = N_(
  8780. "\n"
  8781. - "For various reasons, one may wish to keep different\n"
  8782. - "configurations available on a single machine.\n"
  8783. + "For various reasons, one may wish to keep different configurations\n"
  8784. + "available on a single machine.\n"
  8785. "\n"
  8786. "Entering a file name here will allow you to later retrieve, modify\n"
  8787. "and use the current configuration as an alternate to whatever\n"
  8788. @@ -231,32 +230,39 @@
  8789. "leave this blank.\n"),
  8790. search_help[] = N_(
  8791. "\n"
  8792. - "Search for CONFIG_ symbols and display their relations.\n"
  8793. + "Search for symbols and display their relations.\n"
  8794. "Regular expressions are allowed.\n"
  8795. "Example: search for \"^FOO\"\n"
  8796. "Result:\n"
  8797. "-----------------------------------------------------------------\n"
  8798. "Symbol: FOO [=m]\n"
  8799. + "Type : tristate\n"
  8800. "Prompt: Foo bus is used to drive the bar HW\n"
  8801. - "Defined at drivers/pci/Kconfig:47\n"
  8802. - "Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n"
  8803. - "Location:\n"
  8804. - " -> Bus options (PCI, PCMCIA, EISA, MCA, ISA)\n"
  8805. - " -> PCI support (PCI [=y])\n"
  8806. - " -> PCI access mode (<choice> [=y])\n"
  8807. - "Selects: LIBCRC32\n"
  8808. - "Selected by: BAR\n"
  8809. + " Defined at drivers/pci/Kconfig:47\n"
  8810. + " Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n"
  8811. + " Location:\n"
  8812. + " -> Bus options (PCI, PCMCIA, EISA, ISA)\n"
  8813. + " -> PCI support (PCI [=y])\n"
  8814. + "(1) -> PCI access mode (<choice> [=y])\n"
  8815. + " Selects: LIBCRC32\n"
  8816. + " Selected by: BAR\n"
  8817. "-----------------------------------------------------------------\n"
  8818. + "o The line 'Type:' shows the type of the configuration option for\n"
  8819. + " this symbol (boolean, tristate, string, ...)\n"
  8820. "o The line 'Prompt:' shows the text used in the menu structure for\n"
  8821. - " this CONFIG_ symbol\n"
  8822. + " this symbol\n"
  8823. "o The 'Defined at' line tell at what file / line number the symbol\n"
  8824. " is defined\n"
  8825. "o The 'Depends on:' line tell what symbols needs to be defined for\n"
  8826. " this symbol to be visible in the menu (selectable)\n"
  8827. "o The 'Location:' lines tell where in the menu structure this symbol\n"
  8828. " is located\n"
  8829. - " A location followed by a [=y] indicate that this is a selectable\n"
  8830. - " menu item - and current value is displayed inside brackets.\n"
  8831. + " A location followed by a [=y] indicates that this is a\n"
  8832. + " selectable menu item - and the current value is displayed inside\n"
  8833. + " brackets.\n"
  8834. + " Press the key in the (#) prefix to jump directly to that\n"
  8835. + " location. You will be returned to the current search results\n"
  8836. + " after exiting this new menu.\n"
  8837. "o The 'Selects:' line tell what symbol will be automatically\n"
  8838. " selected if this symbol is selected (y or m)\n"
  8839. "o The 'Selected by' line tell what symbol has selected this symbol\n"
  8840. @@ -264,131 +270,144 @@
  8841. "Only relevant lines are shown.\n"
  8842. "\n\n"
  8843. "Search examples:\n"
  8844. - "Examples: USB => find all CONFIG_ symbols containing USB\n"
  8845. - " ^USB => find all CONFIG_ symbols starting with USB\n"
  8846. - " USB$ => find all CONFIG_ symbols ending with USB\n"
  8847. + "Examples: USB => find all symbols containing USB\n"
  8848. + " ^USB => find all symbols starting with USB\n"
  8849. + " USB$ => find all symbols ending with USB\n"
  8850. "\n");
  8851. static int indent;
  8852. static struct menu *current_menu;
  8853. static int child_count;
  8854. static int single_menu_mode;
  8855. +static int show_all_options;
  8856. +static int save_and_exit;
  8857. -static void conf(struct menu *menu);
  8858. +static void conf(struct menu *menu, struct menu *active_menu);
  8859. static void conf_choice(struct menu *menu);
  8860. static void conf_string(struct menu *menu);
  8861. static void conf_load(void);
  8862. static void conf_save(void);
  8863. +static int show_textbox_ext(const char *title, char *text, int r, int c,
  8864. + int *keys, int *vscroll, int *hscroll,
  8865. + update_text_fn update_text, void *data);
  8866. static void show_textbox(const char *title, const char *text, int r, int c);
  8867. static void show_helptext(const char *title, const char *text);
  8868. static void show_help(struct menu *menu);
  8869. -static void get_prompt_str(struct gstr *r, struct property *prop)
  8870. +static char filename[PATH_MAX+1];
  8871. +static void set_config_filename(const char *config_filename)
  8872. {
  8873. - int i, j;
  8874. - struct menu *submenu[8], *menu;
  8875. + static char menu_backtitle[PATH_MAX+128];
  8876. + int size;
  8877. - str_printf(r, _("Prompt: %s\n"), _(prop->text));
  8878. - str_printf(r, _(" Defined at %s:%d\n"), prop->menu->file->name,
  8879. - prop->menu->lineno);
  8880. - if (!expr_is_yes(prop->visible.expr)) {
  8881. - str_append(r, _(" Depends on: "));
  8882. - expr_gstr_print(prop->visible.expr, r);
  8883. - str_append(r, "\n");
  8884. - }
  8885. - menu = prop->menu->parent;
  8886. - for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent)
  8887. - submenu[i++] = menu;
  8888. - if (i > 0) {
  8889. - str_printf(r, _(" Location:\n"));
  8890. - for (j = 4; --i >= 0; j += 2) {
  8891. - menu = submenu[i];
  8892. - str_printf(r, "%*c-> %s", j, ' ', _(menu_get_prompt(menu)));
  8893. - if (menu->sym) {
  8894. - str_printf(r, " (%s [=%s])", menu->sym->name ?
  8895. - menu->sym->name : _("<choice>"),
  8896. - sym_get_string_value(menu->sym));
  8897. - }
  8898. - str_append(r, "\n");
  8899. - }
  8900. - }
  8901. + size = snprintf(menu_backtitle, sizeof(menu_backtitle),
  8902. + "%s - %s", config_filename, rootmenu.prompt->text);
  8903. + if (size >= sizeof(menu_backtitle))
  8904. + menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
  8905. + set_dialog_backtitle(menu_backtitle);
  8906. +
  8907. + size = snprintf(filename, sizeof(filename), "%s", config_filename);
  8908. + if (size >= sizeof(filename))
  8909. + filename[sizeof(filename)-1] = '\0';
  8910. }
  8911. -static void get_symbol_str(struct gstr *r, struct symbol *sym)
  8912. +struct subtitle_part {
  8913. + struct list_head entries;
  8914. + const char *text;
  8915. +};
  8916. +static LIST_HEAD(trail);
  8917. +
  8918. +static struct subtitle_list *subtitles;
  8919. +static void set_subtitle(void)
  8920. {
  8921. - bool hit;
  8922. - struct property *prop;
  8923. + struct subtitle_part *sp;
  8924. + struct subtitle_list *pos, *tmp;
  8925. - if (sym && sym->name)
  8926. - str_printf(r, "Symbol: %s [=%s]\n", sym->name,
  8927. - sym_get_string_value(sym));
  8928. - for_all_prompts(sym, prop)
  8929. - get_prompt_str(r, prop);
  8930. - hit = false;
  8931. - for_all_properties(sym, prop, P_SELECT) {
  8932. - if (!hit) {
  8933. - str_append(r, " Selects: ");
  8934. - hit = true;
  8935. - } else
  8936. - str_printf(r, " && ");
  8937. - expr_gstr_print(prop->expr, r);
  8938. + for (pos = subtitles; pos != NULL; pos = tmp) {
  8939. + tmp = pos->next;
  8940. + free(pos);
  8941. }
  8942. - if (hit)
  8943. - str_append(r, "\n");
  8944. - if (sym->rev_dep.expr) {
  8945. - str_append(r, _(" Selected by: "));
  8946. - expr_gstr_print(sym->rev_dep.expr, r);
  8947. - str_append(r, "\n");
  8948. +
  8949. + subtitles = NULL;
  8950. + list_for_each_entry(sp, &trail, entries) {
  8951. + if (sp->text) {
  8952. + if (pos) {
  8953. + pos->next = xcalloc(sizeof(*pos), 1);
  8954. + pos = pos->next;
  8955. + } else {
  8956. + subtitles = pos = xcalloc(sizeof(*pos), 1);
  8957. + }
  8958. + pos->text = sp->text;
  8959. + }
  8960. }
  8961. - str_append(r, "\n\n");
  8962. +
  8963. + set_dialog_subtitles(subtitles);
  8964. }
  8965. -static struct gstr get_relations_str(struct symbol **sym_arr)
  8966. +static void reset_subtitle(void)
  8967. {
  8968. - struct symbol *sym;
  8969. - struct gstr res = str_new();
  8970. - int i;
  8971. + struct subtitle_list *pos, *tmp;
  8972. - for (i = 0; sym_arr && (sym = sym_arr[i]); i++)
  8973. - get_symbol_str(&res, sym);
  8974. - if (!i)
  8975. - str_append(&res, _("No matches found.\n"));
  8976. - return res;
  8977. + for (pos = subtitles; pos != NULL; pos = tmp) {
  8978. + tmp = pos->next;
  8979. + free(pos);
  8980. + }
  8981. + subtitles = NULL;
  8982. + set_dialog_subtitles(subtitles);
  8983. }
  8984. -static char filename[PATH_MAX+1];
  8985. -static void set_config_filename(const char *config_filename)
  8986. -{
  8987. - static char menu_backtitle[PATH_MAX+128];
  8988. - int size;
  8989. - struct symbol *sym;
  8990. +struct search_data {
  8991. + struct list_head *head;
  8992. + struct menu **targets;
  8993. + int *keys;
  8994. +};
  8995. - sym = sym_lookup("VERSION", 0);
  8996. - sym_calc_value(sym);
  8997. - size = snprintf(menu_backtitle, sizeof(menu_backtitle),
  8998. - _("%s - uClibc v%s Configuration"),
  8999. - config_filename, sym_get_string_value(sym));
  9000. - if (size >= sizeof(menu_backtitle))
  9001. - menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
  9002. - set_dialog_backtitle(menu_backtitle);
  9003. +static void update_text(char *buf, size_t start, size_t end, void *_data)
  9004. +{
  9005. + struct search_data *data = _data;
  9006. + struct jump_key *pos;
  9007. + int k = 0;
  9008. +
  9009. + list_for_each_entry(pos, data->head, entries) {
  9010. + if (pos->offset >= start && pos->offset < end) {
  9011. + char header[4];
  9012. +
  9013. + if (k < JUMP_NB) {
  9014. + int key = '0' + (pos->index % JUMP_NB) + 1;
  9015. +
  9016. + sprintf(header, "(%c)", key);
  9017. + data->keys[k] = key;
  9018. + data->targets[k] = pos->target;
  9019. + k++;
  9020. + } else {
  9021. + sprintf(header, " ");
  9022. + }
  9023. - size = snprintf(filename, sizeof(filename), "%s", config_filename);
  9024. - if (size >= sizeof(filename))
  9025. - filename[sizeof(filename)-1] = '\0';
  9026. + memcpy(buf + pos->offset, header, sizeof(header) - 1);
  9027. + }
  9028. + }
  9029. + data->keys[k] = 0;
  9030. }
  9031. -
  9032. static void search_conf(void)
  9033. {
  9034. struct symbol **sym_arr;
  9035. struct gstr res;
  9036. + struct gstr title;
  9037. char *dialog_input;
  9038. - int dres;
  9039. + int dres, vscroll = 0, hscroll = 0;
  9040. + bool again;
  9041. + struct gstr sttext;
  9042. + struct subtitle_part stpart;
  9043. +
  9044. + title = str_new();
  9045. + str_printf( &title, _("Enter %s (sub)string or regexp to search for "
  9046. + "(with or without \"%s\")"), CONFIG_, CONFIG_);
  9047. +
  9048. again:
  9049. dialog_clear();
  9050. dres = dialog_inputbox(_("Search Configuration Parameter"),
  9051. - _("Enter CONFIG_ (sub)string to search for "
  9052. - "(with or without \"CONFIG\")"),
  9053. + str_get(&title),
  9054. 10, 75, "");
  9055. switch (dres) {
  9056. case 0:
  9057. @@ -397,19 +416,52 @@
  9058. show_helptext(_("Search Configuration"), search_help);
  9059. goto again;
  9060. default:
  9061. + str_free(&title);
  9062. return;
  9063. }
  9064. - /* strip CONFIG_ if necessary */
  9065. + /* strip the prefix if necessary */
  9066. dialog_input = dialog_input_result;
  9067. - if (strncasecmp(dialog_input_result, "CONFIG_", 7) == 0)
  9068. - dialog_input += 7;
  9069. + if (strncasecmp(dialog_input_result, CONFIG_, strlen(CONFIG_)) == 0)
  9070. + dialog_input += strlen(CONFIG_);
  9071. +
  9072. + sttext = str_new();
  9073. + str_printf(&sttext, "Search (%s)", dialog_input_result);
  9074. + stpart.text = str_get(&sttext);
  9075. + list_add_tail(&stpart.entries, &trail);
  9076. sym_arr = sym_re_search(dialog_input);
  9077. - res = get_relations_str(sym_arr);
  9078. + do {
  9079. + LIST_HEAD(head);
  9080. + struct menu *targets[JUMP_NB];
  9081. + int keys[JUMP_NB + 1], i;
  9082. + struct search_data data = {
  9083. + .head = &head,
  9084. + .targets = targets,
  9085. + .keys = keys,
  9086. + };
  9087. + struct jump_key *pos, *tmp;
  9088. +
  9089. + res = get_relations_str(sym_arr, &head);
  9090. + set_subtitle();
  9091. + dres = show_textbox_ext(_("Search Results"), (char *)
  9092. + str_get(&res), 0, 0, keys, &vscroll,
  9093. + &hscroll, &update_text, (void *)
  9094. + &data);
  9095. + again = false;
  9096. + for (i = 0; i < JUMP_NB && keys[i]; i++)
  9097. + if (dres == keys[i]) {
  9098. + conf(targets[i]->parent, targets[i]);
  9099. + again = true;
  9100. + }
  9101. + str_free(&res);
  9102. + list_for_each_entry_safe(pos, tmp, &head, entries)
  9103. + free(pos);
  9104. + } while (again);
  9105. free(sym_arr);
  9106. - show_textbox(_("Search Results"), str_get(&res), 0, 0);
  9107. - str_free(&res);
  9108. + str_free(&title);
  9109. + list_del(trail.prev);
  9110. + str_free(&sttext);
  9111. }
  9112. static void build_conf(struct menu *menu)
  9113. @@ -420,8 +472,16 @@
  9114. int type, tmp, doint = 2;
  9115. tristate val;
  9116. char ch;
  9117. + bool visible;
  9118. - if (!menu_is_visible(menu))
  9119. + /*
  9120. + * note: menu_is_visible() has side effect that it will
  9121. + * recalc the value of the symbol.
  9122. + */
  9123. + visible = menu_is_visible(menu);
  9124. + if (show_all_options && !menu_has_prompt(menu))
  9125. + return;
  9126. + else if (!show_all_options && !visible)
  9127. return;
  9128. sym = menu->sym;
  9129. @@ -438,8 +498,9 @@
  9130. menu->data ? "-->" : "++>",
  9131. indent + 1, ' ', prompt);
  9132. } else
  9133. - item_make(" %*c%s --->", indent + 1, ' ', prompt);
  9134. -
  9135. + item_make(" %*c%s %s",
  9136. + indent + 1, ' ', prompt,
  9137. + menu_is_empty(menu) ? "----" : "--->");
  9138. item_set_tag('m');
  9139. item_set_data(menu);
  9140. if (single_menu_mode && menu->data)
  9141. @@ -570,7 +631,7 @@
  9142. (sym_has_value(sym) || !sym_is_changable(sym)) ?
  9143. "" : _(" (NEW)"));
  9144. if (menu->prompt->type == P_MENU) {
  9145. - item_add_str(" --->");
  9146. + item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->");
  9147. return;
  9148. }
  9149. }
  9150. @@ -582,40 +643,40 @@
  9151. indent -= doint;
  9152. }
  9153. -static void conf(struct menu *menu)
  9154. +static void conf(struct menu *menu, struct menu *active_menu)
  9155. {
  9156. struct menu *submenu;
  9157. const char *prompt = menu_get_prompt(menu);
  9158. + struct subtitle_part stpart;
  9159. struct symbol *sym;
  9160. - struct menu *active_menu = NULL;
  9161. int res;
  9162. int s_scroll = 0;
  9163. + if (menu != &rootmenu)
  9164. + stpart.text = menu_get_prompt(menu);
  9165. + else
  9166. + stpart.text = NULL;
  9167. + list_add_tail(&stpart.entries, &trail);
  9168. +
  9169. while (1) {
  9170. item_reset();
  9171. current_menu = menu;
  9172. build_conf(menu);
  9173. if (!child_count)
  9174. break;
  9175. - if (menu == &rootmenu) {
  9176. - item_make("--- ");
  9177. - item_set_tag(':');
  9178. - item_make(_(" Load an Alternate Configuration File"));
  9179. - item_set_tag('L');
  9180. - item_make(_(" Save an Alternate Configuration File"));
  9181. - item_set_tag('S');
  9182. - }
  9183. + set_subtitle();
  9184. dialog_clear();
  9185. res = dialog_menu(prompt ? _(prompt) : _("Main Menu"),
  9186. _(menu_instructions),
  9187. active_menu, &s_scroll);
  9188. if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL)
  9189. break;
  9190. - if (!item_activate_selected())
  9191. - continue;
  9192. - if (!item_tag())
  9193. - continue;
  9194. -
  9195. + if (item_count() != 0) {
  9196. + if (!item_activate_selected())
  9197. + continue;
  9198. + if (!item_tag())
  9199. + continue;
  9200. + }
  9201. submenu = item_data();
  9202. active_menu = item_data();
  9203. if (submenu)
  9204. @@ -630,32 +691,36 @@
  9205. if (single_menu_mode)
  9206. submenu->data = (void *) (long) !submenu->data;
  9207. else
  9208. - conf(submenu);
  9209. + conf(submenu, NULL);
  9210. break;
  9211. case 't':
  9212. if (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)
  9213. conf_choice(submenu);
  9214. else if (submenu->prompt->type == P_MENU)
  9215. - conf(submenu);
  9216. + conf(submenu, NULL);
  9217. break;
  9218. case 's':
  9219. conf_string(submenu);
  9220. break;
  9221. - case 'L':
  9222. - conf_load();
  9223. - break;
  9224. - case 'S':
  9225. - conf_save();
  9226. - break;
  9227. }
  9228. break;
  9229. case 2:
  9230. if (sym)
  9231. show_help(submenu);
  9232. - else
  9233. + else {
  9234. + reset_subtitle();
  9235. show_helptext(_("README"), _(mconf_readme));
  9236. + }
  9237. break;
  9238. case 3:
  9239. + reset_subtitle();
  9240. + conf_save();
  9241. + break;
  9242. + case 4:
  9243. + reset_subtitle();
  9244. + conf_load();
  9245. + break;
  9246. + case 5:
  9247. if (item_is_tag('t')) {
  9248. if (sym_set_tristate_value(sym, yes))
  9249. break;
  9250. @@ -663,31 +728,45 @@
  9251. show_textbox(NULL, setmod_text, 6, 74);
  9252. }
  9253. break;
  9254. - case 4:
  9255. + case 6:
  9256. if (item_is_tag('t'))
  9257. sym_set_tristate_value(sym, no);
  9258. break;
  9259. - case 5:
  9260. + case 7:
  9261. if (item_is_tag('t'))
  9262. sym_set_tristate_value(sym, mod);
  9263. break;
  9264. - case 6:
  9265. + case 8:
  9266. if (item_is_tag('t'))
  9267. sym_toggle_tristate_value(sym);
  9268. else if (item_is_tag('m'))
  9269. - conf(submenu);
  9270. + conf(submenu, NULL);
  9271. break;
  9272. - case 7:
  9273. + case 9:
  9274. search_conf();
  9275. break;
  9276. + case 10:
  9277. + show_all_options = !show_all_options;
  9278. + break;
  9279. }
  9280. }
  9281. +
  9282. + list_del(trail.prev);
  9283. }
  9284. -static void show_textbox(const char *title, const char *text, int r, int c)
  9285. +static int show_textbox_ext(const char *title, char *text, int r, int c, int
  9286. + *keys, int *vscroll, int *hscroll, update_text_fn
  9287. + update_text, void *data)
  9288. {
  9289. dialog_clear();
  9290. - dialog_textbox(title, text, r, c);
  9291. + return dialog_textbox(title, text, r, c, keys, vscroll, hscroll,
  9292. + update_text, data);
  9293. +}
  9294. +
  9295. +static void show_textbox(const char *title, const char *text, int r, int c)
  9296. +{
  9297. + show_textbox_ext(title, (char *) text, r, c, (int []) {0}, NULL, NULL,
  9298. + NULL, NULL);
  9299. }
  9300. static void show_helptext(const char *title, const char *text)
  9301. @@ -695,25 +774,24 @@
  9302. show_textbox(title, text, 0, 0);
  9303. }
  9304. +static void conf_message_callback(const char *fmt, va_list ap)
  9305. +{
  9306. + char buf[PATH_MAX+1];
  9307. +
  9308. + vsnprintf(buf, sizeof(buf), fmt, ap);
  9309. + if (save_and_exit)
  9310. + printf("%s", buf);
  9311. + else
  9312. + show_textbox(NULL, buf, 6, 60);
  9313. +}
  9314. +
  9315. static void show_help(struct menu *menu)
  9316. {
  9317. struct gstr help = str_new();
  9318. - struct symbol *sym = menu->sym;
  9319. - if (menu_has_help(menu))
  9320. - {
  9321. - if (sym->name) {
  9322. - str_printf(&help, "%s:\n\n", sym->name);
  9323. - }
  9324. - str_append(&help, _(menu_get_help(menu)));
  9325. - str_append(&help, "\n");
  9326. - } else if (menu_has_help(sym->prop->menu->parent)) {
  9327. - str_append(&help, _(menu_get_help(sym->prop->menu->parent)));
  9328. - str_append(&help, "\n");
  9329. - } else {
  9330. - str_append(&help, nohelp_text);
  9331. - }
  9332. - get_symbol_str(&help, sym);
  9333. + help.max_width = getmaxx(stdscr) - 10;
  9334. + menu_get_ext_help(menu, &help);
  9335. +
  9336. show_helptext(_(menu_get_prompt(menu)), str_get(&help));
  9337. str_free(&help);
  9338. }
  9339. @@ -734,7 +812,12 @@
  9340. for (child = menu->list; child; child = child->next) {
  9341. if (!menu_is_visible(child))
  9342. continue;
  9343. - item_make("%s", _(menu_get_prompt(child)));
  9344. + if (child->sym)
  9345. + item_make("%s", _(menu_get_prompt(child)));
  9346. + else {
  9347. + item_make("*** %s ***", _(menu_get_prompt(child)));
  9348. + item_set_tag(':');
  9349. + }
  9350. item_set_data(child);
  9351. if (child->sym == active)
  9352. item_set_selected(1);
  9353. @@ -744,12 +827,17 @@
  9354. dialog_clear();
  9355. res = dialog_checklist(prompt ? _(prompt) : _("Main Menu"),
  9356. _(radiolist_instructions),
  9357. - 15, 70, 6);
  9358. + MENUBOX_HEIGTH_MIN,
  9359. + MENUBOX_WIDTH_MIN,
  9360. + CHECKLIST_HEIGTH_MIN);
  9361. selected = item_activate_selected();
  9362. switch (res) {
  9363. case 0:
  9364. if (selected) {
  9365. child = item_data();
  9366. + if (!child->sym)
  9367. + break;
  9368. +
  9369. sym_set_tristate_value(child->sym, yes);
  9370. }
  9371. return;
  9372. @@ -863,9 +951,58 @@
  9373. }
  9374. }
  9375. +static int handle_exit(void)
  9376. +{
  9377. + int res;
  9378. +
  9379. + save_and_exit = 1;
  9380. + reset_subtitle();
  9381. + dialog_clear();
  9382. + if (conf_get_changed())
  9383. + res = dialog_yesno(NULL,
  9384. + _("Do you wish to save your new configuration?\n"
  9385. + "(Press <ESC><ESC> to continue configuration.)"),
  9386. + 6, 60);
  9387. + else
  9388. + res = -1;
  9389. +
  9390. + end_dialog(saved_x, saved_y);
  9391. +
  9392. + switch (res) {
  9393. + case 0:
  9394. + if (conf_write(filename)) {
  9395. + fprintf(stderr, _("\n\n"
  9396. + "Error while writing of the configuration.\n"
  9397. + "Your configuration changes were NOT saved."
  9398. + "\n\n"));
  9399. + return 1;
  9400. + }
  9401. + /* fall through */
  9402. + case -1:
  9403. + printf(_("\n\n"
  9404. + "*** End of the configuration.\n"
  9405. + "*** Execute 'make' to start the build or try 'make help'."
  9406. + "\n\n"));
  9407. + res = 0;
  9408. + break;
  9409. + default:
  9410. + fprintf(stderr, _("\n\n"
  9411. + "Your configuration changes were NOT saved."
  9412. + "\n\n"));
  9413. + if (res != KEY_ESC)
  9414. + res = 0;
  9415. + }
  9416. +
  9417. + return res;
  9418. +}
  9419. +
  9420. +static void sig_handler(int signo)
  9421. +{
  9422. + exit(handle_exit());
  9423. +}
  9424. +
  9425. int main(int ac, char **av)
  9426. {
  9427. - int saved_x, saved_y;
  9428. char *mode;
  9429. int res;
  9430. @@ -873,6 +1010,8 @@
  9431. bindtextdomain(PACKAGE, LOCALEDIR);
  9432. textdomain(PACKAGE);
  9433. + signal(SIGINT, sig_handler);
  9434. +
  9435. conf_parse(av[1]);
  9436. conf_read(NULL);
  9437. @@ -882,7 +1021,6 @@
  9438. single_menu_mode = 1;
  9439. }
  9440. - getyx(stdscr, saved_y, saved_x);
  9441. if (init_dialog(NULL)) {
  9442. fprintf(stderr, N_("Your display is too small to run Menuconfig!\n"));
  9443. fprintf(stderr, N_("It must be at least 19 lines by 80 columns.\n"));
  9444. @@ -890,41 +1028,12 @@
  9445. }
  9446. set_config_filename(conf_get_configname());
  9447. + conf_set_message_callback(conf_message_callback);
  9448. do {
  9449. - conf(&rootmenu);
  9450. - dialog_clear();
  9451. - if (conf_get_changed())
  9452. - res = dialog_yesno(NULL,
  9453. - _("Do you wish to save your "
  9454. - "new configuration?\n"
  9455. - "<ESC><ESC> to continue."),
  9456. - 6, 60);
  9457. - else
  9458. - res = -1;
  9459. + conf(&rootmenu, NULL);
  9460. + res = handle_exit();
  9461. } while (res == KEY_ESC);
  9462. - end_dialog(saved_x, saved_y);
  9463. -
  9464. - switch (res) {
  9465. - case 0:
  9466. - if (conf_write(filename)) {
  9467. - fprintf(stderr, _("\n\n"
  9468. - "Error during writing of the configuration.\n"
  9469. - "Your configuration changes were NOT saved."
  9470. - "\n\n"));
  9471. - return 1;
  9472. - }
  9473. - case -1:
  9474. - printf(_("\n\n"
  9475. - "*** End of configuration.\n"
  9476. - "*** Execute 'make' to build or try 'make help'."
  9477. - "\n\n"));
  9478. - break;
  9479. - default:
  9480. - fprintf(stderr, _("\n\n"
  9481. - "Your configuration changes were NOT saved."
  9482. - "\n\n"));
  9483. - }
  9484. - return conf_write_autoconf();
  9485. + return res;
  9486. }
  9487. diff -Nur uClibc-0.9.33.2/extra/config/menu.c uClibc-git/extra/config/menu.c
  9488. --- uClibc-0.9.33.2/extra/config/menu.c 2012-05-15 09:20:09.000000000 +0200
  9489. +++ uClibc-git/extra/config/menu.c 2014-07-25 20:36:04.861324498 +0200
  9490. @@ -3,12 +3,15 @@
  9491. * Released under the terms of the GNU GPL v2.0.
  9492. */
  9493. +#include <ctype.h>
  9494. +#include <stdarg.h>
  9495. #include <stdlib.h>
  9496. #include <string.h>
  9497. -#define LKC_DIRECT_LINK
  9498. #include "lkc.h"
  9499. +static const char nohelp_text[] = "There is no help available for this option.";
  9500. +
  9501. struct menu rootmenu;
  9502. static struct menu **last_entry_ptr;
  9503. @@ -35,7 +38,7 @@
  9504. va_end(ap);
  9505. }
  9506. -void menu_init(void)
  9507. +void _menu_init(void)
  9508. {
  9509. current_entry = current_menu = &rootmenu;
  9510. last_entry_ptr = &rootmenu.list;
  9511. @@ -45,7 +48,7 @@
  9512. {
  9513. struct menu *menu;
  9514. - menu = malloc(sizeof(*menu));
  9515. + menu = xmalloc(sizeof(*menu));
  9516. memset(menu, 0, sizeof(*menu));
  9517. menu->sym = sym;
  9518. menu->parent = current_menu;
  9519. @@ -55,6 +58,8 @@
  9520. *last_entry_ptr = menu;
  9521. last_entry_ptr = &menu->next;
  9522. current_entry = menu;
  9523. + if (sym)
  9524. + menu_add_symbol(P_SYMBOL, sym, NULL);
  9525. }
  9526. void menu_end_entry(void)
  9527. @@ -74,7 +79,7 @@
  9528. current_menu = current_menu->parent;
  9529. }
  9530. -struct expr *menu_check_dep(struct expr *e)
  9531. +static struct expr *menu_check_dep(struct expr *e)
  9532. {
  9533. if (!e)
  9534. return e;
  9535. @@ -133,8 +138,35 @@
  9536. while (isspace(*prompt))
  9537. prompt++;
  9538. }
  9539. - if (current_entry->prompt)
  9540. + if (current_entry->prompt && current_entry != &rootmenu)
  9541. prop_warn(prop, "prompt redefined");
  9542. +
  9543. + /* Apply all upper menus' visibilities to actual prompts. */
  9544. + if(type == P_PROMPT) {
  9545. + struct menu *menu = current_entry;
  9546. +
  9547. + while ((menu = menu->parent) != NULL) {
  9548. + struct expr *dup_expr;
  9549. +
  9550. + if (!menu->visibility)
  9551. + continue;
  9552. + /*
  9553. + * Do not add a reference to the
  9554. + * menu's visibility expression but
  9555. + * use a copy of it. Otherwise the
  9556. + * expression reduction functions
  9557. + * will modify expressions that have
  9558. + * multiple references which can
  9559. + * cause unwanted side effects.
  9560. + */
  9561. + dup_expr = expr_copy(menu->visibility);
  9562. +
  9563. + prop->visible.expr
  9564. + = expr_alloc_and(prop->visible.expr,
  9565. + dup_expr);
  9566. + }
  9567. + }
  9568. +
  9569. current_entry->prompt = prop;
  9570. }
  9571. prop->text = prompt;
  9572. @@ -147,6 +179,12 @@
  9573. return menu_add_prop(type, prompt, NULL, dep);
  9574. }
  9575. +void menu_add_visibility(struct expr *expr)
  9576. +{
  9577. + current_entry->visibility = expr_alloc_and(current_entry->visibility,
  9578. + expr);
  9579. +}
  9580. +
  9581. void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep)
  9582. {
  9583. menu_add_prop(type, NULL, expr, dep);
  9584. @@ -178,13 +216,13 @@
  9585. }
  9586. }
  9587. -static int menu_range_valid_sym(struct symbol *sym, struct symbol *sym2)
  9588. +static int menu_validate_number(struct symbol *sym, struct symbol *sym2)
  9589. {
  9590. return sym2->type == S_INT || sym2->type == S_HEX ||
  9591. (sym2->type == S_UNKNOWN && sym_string_valid(sym, sym2->name));
  9592. }
  9593. -void sym_check_prop(struct symbol *sym)
  9594. +static void sym_check_prop(struct symbol *sym)
  9595. {
  9596. struct property *prop;
  9597. struct symbol *sym2;
  9598. @@ -194,8 +232,17 @@
  9599. if ((sym->type == S_STRING || sym->type == S_INT || sym->type == S_HEX) &&
  9600. prop->expr->type != E_SYMBOL)
  9601. prop_warn(prop,
  9602. - "default for config symbol '%'"
  9603. + "default for config symbol '%s'"
  9604. " must be a single symbol", sym->name);
  9605. + if (prop->expr->type != E_SYMBOL)
  9606. + break;
  9607. + sym2 = prop_get_symbol(prop);
  9608. + if (sym->type == S_HEX || sym->type == S_INT) {
  9609. + if (!menu_validate_number(sym, sym2))
  9610. + prop_warn(prop,
  9611. + "'%s': number is invalid",
  9612. + sym->name);
  9613. + }
  9614. break;
  9615. case P_SELECT:
  9616. sym2 = prop_get_symbol(prop);
  9617. @@ -215,8 +262,8 @@
  9618. if (sym->type != S_INT && sym->type != S_HEX)
  9619. prop_warn(prop, "range is only allowed "
  9620. "for int or hex symbols");
  9621. - if (!menu_range_valid_sym(sym, prop->expr->left.sym) ||
  9622. - !menu_range_valid_sym(sym, prop->expr->right.sym))
  9623. + if (!menu_validate_number(sym, prop->expr->left.sym) ||
  9624. + !menu_validate_number(sym, prop->expr->right.sym))
  9625. prop_warn(prop, "range is invalid");
  9626. break;
  9627. default:
  9628. @@ -315,6 +362,8 @@
  9629. parent->next = last_menu->next;
  9630. last_menu->next = NULL;
  9631. }
  9632. +
  9633. + sym->dir_dep.expr = expr_alloc_or(sym->dir_dep.expr, parent->dep);
  9634. }
  9635. for (menu = parent->list; menu; menu = menu->next) {
  9636. if (sym && sym_is_choice(sym) &&
  9637. @@ -387,6 +436,29 @@
  9638. }
  9639. }
  9640. +bool menu_has_prompt(struct menu *menu)
  9641. +{
  9642. + if (!menu->prompt)
  9643. + return false;
  9644. + return true;
  9645. +}
  9646. +
  9647. +/*
  9648. + * Determine if a menu is empty.
  9649. + * A menu is considered empty if it contains no or only
  9650. + * invisible entries.
  9651. + */
  9652. +bool menu_is_empty(struct menu *menu)
  9653. +{
  9654. + struct menu *child;
  9655. +
  9656. + for (child = menu->list; child; child = child->next) {
  9657. + if (menu_is_visible(child))
  9658. + return(false);
  9659. + }
  9660. + return(true);
  9661. +}
  9662. +
  9663. bool menu_is_visible(struct menu *menu)
  9664. {
  9665. struct menu *child;
  9666. @@ -395,6 +467,12 @@
  9667. if (!menu->prompt)
  9668. return false;
  9669. +
  9670. + if (menu->visibility) {
  9671. + if (expr_calc_value(menu->visibility) == no)
  9672. + return no;
  9673. + }
  9674. +
  9675. sym = menu->sym;
  9676. if (sym) {
  9677. sym_calc_value(sym);
  9678. @@ -404,12 +482,18 @@
  9679. if (visible != no)
  9680. return true;
  9681. +
  9682. if (!sym || sym_get_tristate_value(menu->sym) == no)
  9683. return false;
  9684. - for (child = menu->list; child; child = child->next)
  9685. - if (menu_is_visible(child))
  9686. + for (child = menu->list; child; child = child->next) {
  9687. + if (menu_is_visible(child)) {
  9688. + if (sym)
  9689. + sym->flags |= SYMBOL_DEF_USER;
  9690. return true;
  9691. + }
  9692. + }
  9693. +
  9694. return false;
  9695. }
  9696. @@ -451,3 +535,156 @@
  9697. else
  9698. return "";
  9699. }
  9700. +
  9701. +static void get_prompt_str(struct gstr *r, struct property *prop,
  9702. + struct list_head *head)
  9703. +{
  9704. + int i, j;
  9705. + struct menu *submenu[8], *menu, *location = NULL;
  9706. + struct jump_key *jump;
  9707. +
  9708. + str_printf(r, _("Prompt: %s\n"), _(prop->text));
  9709. + menu = prop->menu->parent;
  9710. + for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent) {
  9711. + bool accessible = menu_is_visible(menu);
  9712. +
  9713. + submenu[i++] = menu;
  9714. + if (location == NULL && accessible)
  9715. + location = menu;
  9716. + }
  9717. + if (head && location) {
  9718. + jump = xmalloc(sizeof(struct jump_key));
  9719. +
  9720. + if (menu_is_visible(prop->menu)) {
  9721. + /*
  9722. + * There is not enough room to put the hint at the
  9723. + * beginning of the "Prompt" line. Put the hint on the
  9724. + * last "Location" line even when it would belong on
  9725. + * the former.
  9726. + */
  9727. + jump->target = prop->menu;
  9728. + } else
  9729. + jump->target = location;
  9730. +
  9731. + if (list_empty(head))
  9732. + jump->index = 0;
  9733. + else
  9734. + jump->index = list_entry(head->prev, struct jump_key,
  9735. + entries)->index + 1;
  9736. +
  9737. + list_add_tail(&jump->entries, head);
  9738. + }
  9739. +
  9740. + if (i > 0) {
  9741. + str_printf(r, _(" Location:\n"));
  9742. + for (j = 4; --i >= 0; j += 2) {
  9743. + menu = submenu[i];
  9744. + if (head && location && menu == location)
  9745. + jump->offset = r->len - 1;
  9746. + str_printf(r, "%*c-> %s", j, ' ',
  9747. + _(menu_get_prompt(menu)));
  9748. + if (menu->sym) {
  9749. + str_printf(r, " (%s [=%s])", menu->sym->name ?
  9750. + menu->sym->name : _("<choice>"),
  9751. + sym_get_string_value(menu->sym));
  9752. + }
  9753. + str_append(r, "\n");
  9754. + }
  9755. + }
  9756. +}
  9757. +
  9758. +/*
  9759. + * get peoperty of type P_SYMBOL
  9760. + */
  9761. +static struct property *get_symbol_prop(struct symbol *sym)
  9762. +{
  9763. + struct property *prop = NULL;
  9764. +
  9765. + for_all_properties(sym, prop, P_SYMBOL)
  9766. + break;
  9767. + return prop;
  9768. +}
  9769. +
  9770. +/*
  9771. + * head is optional and may be NULL
  9772. + */
  9773. +void get_symbol_str(struct gstr *r, struct symbol *sym,
  9774. + struct list_head *head)
  9775. +{
  9776. + bool hit;
  9777. + struct property *prop;
  9778. +
  9779. + if (sym && sym->name) {
  9780. + str_printf(r, "Symbol: %s [=%s]\n", sym->name,
  9781. + sym_get_string_value(sym));
  9782. + str_printf(r, "Type : %s\n", sym_type_name(sym->type));
  9783. + if (sym->type == S_INT || sym->type == S_HEX) {
  9784. + prop = sym_get_range_prop(sym);
  9785. + if (prop) {
  9786. + str_printf(r, "Range : ");
  9787. + expr_gstr_print(prop->expr, r);
  9788. + str_append(r, "\n");
  9789. + }
  9790. + }
  9791. + }
  9792. + for_all_prompts(sym, prop)
  9793. + get_prompt_str(r, prop, head);
  9794. +
  9795. + prop = get_symbol_prop(sym);
  9796. + if (prop) {
  9797. + str_printf(r, _(" Defined at %s:%d\n"), prop->menu->file->name,
  9798. + prop->menu->lineno);
  9799. + if (!expr_is_yes(prop->visible.expr)) {
  9800. + str_append(r, _(" Depends on: "));
  9801. + expr_gstr_print(prop->visible.expr, r);
  9802. + str_append(r, "\n");
  9803. + }
  9804. + }
  9805. +
  9806. + hit = false;
  9807. + for_all_properties(sym, prop, P_SELECT) {
  9808. + if (!hit) {
  9809. + str_append(r, " Selects: ");
  9810. + hit = true;
  9811. + } else
  9812. + str_printf(r, " && ");
  9813. + expr_gstr_print(prop->expr, r);
  9814. + }
  9815. + if (hit)
  9816. + str_append(r, "\n");
  9817. + if (sym->rev_dep.expr) {
  9818. + str_append(r, _(" Selected by: "));
  9819. + expr_gstr_print(sym->rev_dep.expr, r);
  9820. + str_append(r, "\n");
  9821. + }
  9822. + str_append(r, "\n\n");
  9823. +}
  9824. +
  9825. +struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head)
  9826. +{
  9827. + struct symbol *sym;
  9828. + struct gstr res = str_new();
  9829. + int i;
  9830. +
  9831. + for (i = 0; sym_arr && (sym = sym_arr[i]); i++)
  9832. + get_symbol_str(&res, sym, head);
  9833. + if (!i)
  9834. + str_append(&res, _("No matches found.\n"));
  9835. + return res;
  9836. +}
  9837. +
  9838. +
  9839. +void menu_get_ext_help(struct menu *menu, struct gstr *help)
  9840. +{
  9841. + struct symbol *sym = menu->sym;
  9842. + const char *help_text = nohelp_text;
  9843. +
  9844. + if (menu_has_help(menu)) {
  9845. + if (sym->name)
  9846. + str_printf(help, "%s%s:\n\n", CONFIG_, sym->name);
  9847. + help_text = menu_get_help(menu);
  9848. + }
  9849. + str_printf(help, "%s\n", _(help_text));
  9850. + if (sym)
  9851. + get_symbol_str(help, sym, NULL);
  9852. +}
  9853. diff -Nur uClibc-0.9.33.2/extra/config/merge_config.sh uClibc-git/extra/config/merge_config.sh
  9854. --- uClibc-0.9.33.2/extra/config/merge_config.sh 1970-01-01 01:00:00.000000000 +0100
  9855. +++ uClibc-git/extra/config/merge_config.sh 2014-07-25 20:36:04.861324498 +0200
  9856. @@ -0,0 +1,150 @@
  9857. +#!/bin/sh
  9858. +# merge_config.sh - Takes a list of config fragment values, and merges
  9859. +# them one by one. Provides warnings on overridden values, and specified
  9860. +# values that did not make it to the resulting .config file (due to missed
  9861. +# dependencies or config symbol removal).
  9862. +#
  9863. +# Portions reused from kconf_check and generate_cfg:
  9864. +# http://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-tools/tree/tools/kconf_check
  9865. +# http://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-tools/tree/tools/generate_cfg
  9866. +#
  9867. +# Copyright (c) 2009-2010 Wind River Systems, Inc.
  9868. +# Copyright 2011 Linaro
  9869. +#
  9870. +# This program is free software; you can redistribute it and/or modify
  9871. +# it under the terms of the GNU General Public License version 2 as
  9872. +# published by the Free Software Foundation.
  9873. +#
  9874. +# This program is distributed in the hope that it will be useful,
  9875. +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  9876. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9877. +# See the GNU General Public License for more details.
  9878. +
  9879. +clean_up() {
  9880. + rm -f $TMP_FILE
  9881. + exit
  9882. +}
  9883. +trap clean_up HUP INT TERM
  9884. +
  9885. +usage() {
  9886. + echo "Usage: $0 [OPTIONS] [CONFIG [...]]"
  9887. + echo " -h display this help text"
  9888. + echo " -m only merge the fragments, do not execute the make command"
  9889. + echo " -n use allnoconfig instead of alldefconfig"
  9890. + echo " -r list redundant entries when merging fragments"
  9891. + echo " -O dir to put generated output files"
  9892. +}
  9893. +
  9894. +MAKE=true
  9895. +ALLTARGET=alldefconfig
  9896. +WARNREDUN=false
  9897. +OUTPUT=.
  9898. +
  9899. +while true; do
  9900. + case $1 in
  9901. + "-n")
  9902. + ALLTARGET=allnoconfig
  9903. + shift
  9904. + continue
  9905. + ;;
  9906. + "-m")
  9907. + MAKE=false
  9908. + shift
  9909. + continue
  9910. + ;;
  9911. + "-h")
  9912. + usage
  9913. + exit
  9914. + ;;
  9915. + "-r")
  9916. + WARNREDUN=true
  9917. + shift
  9918. + continue
  9919. + ;;
  9920. + "-O")
  9921. + if [ -d $2 ];then
  9922. + OUTPUT=$(echo $2 | sed 's/\/*$//')
  9923. + else
  9924. + echo "output directory $2 does not exist" 1>&2
  9925. + exit 1
  9926. + fi
  9927. + shift 2
  9928. + continue
  9929. + ;;
  9930. + *)
  9931. + break
  9932. + ;;
  9933. + esac
  9934. +done
  9935. +
  9936. +INITFILE=$1
  9937. +shift;
  9938. +
  9939. +MERGE_LIST=$*
  9940. +SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p"
  9941. +TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX)
  9942. +
  9943. +echo "Using $INITFILE as base"
  9944. +cat $INITFILE > $TMP_FILE
  9945. +
  9946. +# Merge files, printing warnings on overrided values
  9947. +for MERGE_FILE in $MERGE_LIST ; do
  9948. + echo "Merging $MERGE_FILE"
  9949. + CFG_LIST=$(sed -n "$SED_CONFIG_EXP" $MERGE_FILE)
  9950. +
  9951. + for CFG in $CFG_LIST ; do
  9952. + grep -q -w $CFG $TMP_FILE
  9953. + if [ $? -eq 0 ] ; then
  9954. + PREV_VAL=$(grep -w $CFG $TMP_FILE)
  9955. + NEW_VAL=$(grep -w $CFG $MERGE_FILE)
  9956. + if [ "x$PREV_VAL" != "x$NEW_VAL" ] ; then
  9957. + echo Value of $CFG is redefined by fragment $MERGE_FILE:
  9958. + echo Previous value: $PREV_VAL
  9959. + echo New value: $NEW_VAL
  9960. + echo
  9961. + elif [ "$WARNREDUN" = "true" ]; then
  9962. + echo Value of $CFG is redundant by fragment $MERGE_FILE:
  9963. + fi
  9964. + sed -i "/$CFG[ =]/d" $TMP_FILE
  9965. + fi
  9966. + done
  9967. + cat $MERGE_FILE >> $TMP_FILE
  9968. +done
  9969. +
  9970. +if [ "$MAKE" = "false" ]; then
  9971. + cp $TMP_FILE $OUTPUT/.config
  9972. + echo "#"
  9973. + echo "# merged configuration written to $OUTPUT/.config (needs make)"
  9974. + echo "#"
  9975. + clean_up
  9976. + exit
  9977. +fi
  9978. +
  9979. +# If we have an output dir, setup the O= argument, otherwise leave
  9980. +# it blank, since O=. will create an unnecessary ./source softlink
  9981. +OUTPUT_ARG=""
  9982. +if [ "$OUTPUT" != "." ] ; then
  9983. + OUTPUT_ARG="O=$OUTPUT"
  9984. +fi
  9985. +
  9986. +
  9987. +# Use the merged file as the starting point for:
  9988. +# alldefconfig: Fills in any missing symbols with Kconfig default
  9989. +# allnoconfig: Fills in any missing symbols with # CONFIG_* is not set
  9990. +make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
  9991. +
  9992. +
  9993. +# Check all specified config values took (might have missed-dependency issues)
  9994. +for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do
  9995. +
  9996. + REQUESTED_VAL=$(grep -w -e "$CFG" $TMP_FILE)
  9997. + ACTUAL_VAL=$(grep -w -e "$CFG" $OUTPUT/.config)
  9998. + if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then
  9999. + echo "Value requested for $CFG not in final .config"
  10000. + echo "Requested value: $REQUESTED_VAL"
  10001. + echo "Actual value: $ACTUAL_VAL"
  10002. + echo ""
  10003. + fi
  10004. +done
  10005. +
  10006. +clean_up
  10007. diff -Nur uClibc-0.9.33.2/extra/config/nconf.c uClibc-git/extra/config/nconf.c
  10008. --- uClibc-0.9.33.2/extra/config/nconf.c 1970-01-01 01:00:00.000000000 +0100
  10009. +++ uClibc-git/extra/config/nconf.c 2014-07-25 20:36:04.861324498 +0200
  10010. @@ -0,0 +1,1557 @@
  10011. +/*
  10012. + * Copyright (C) 2008 Nir Tzachar <nir.tzachar@gmail.com?
  10013. + * Released under the terms of the GNU GPL v2.0.
  10014. + *
  10015. + * Derived from menuconfig.
  10016. + *
  10017. + */
  10018. +#define _GNU_SOURCE
  10019. +#include <string.h>
  10020. +#include <stdlib.h>
  10021. +
  10022. +#include "lkc.h"
  10023. +#include "nconf.h"
  10024. +#include <ctype.h>
  10025. +
  10026. +static const char nconf_global_help[] = N_(
  10027. +"Help windows\n"
  10028. +"------------\n"
  10029. +"o Global help: Unless in a data entry window, pressing <F1> will give \n"
  10030. +" you the global help window, which you are just reading.\n"
  10031. +"\n"
  10032. +"o A short version of the global help is available by pressing <F3>.\n"
  10033. +"\n"
  10034. +"o Local help: To get help related to the current menu entry, use any\n"
  10035. +" of <?> <h>, or if in a data entry window then press <F1>.\n"
  10036. +"\n"
  10037. +"\n"
  10038. +"Menu entries\n"
  10039. +"------------\n"
  10040. +"This interface lets you select features and parameters for the \n"
  10041. +"build. Features can either be built-in, modularized, or removed.\n"
  10042. +"Parameters must be entered as text or decimal or hexadecimal numbers.\n"
  10043. +"\n"
  10044. +"Menu entries beginning with following braces represent features that\n"
  10045. +" [ ] can be built in or removed\n"
  10046. +" < > can be built in, modularized or removed\n"
  10047. +" { } can be built in or modularized, are selected by another feature\n"
  10048. +" - - are selected by another feature\n"
  10049. +" XXX cannot be selected. Symbol Info <F2> tells you why.\n"
  10050. +"*, M or whitespace inside braces means to build in, build as a module\n"
  10051. +"or to exclude the feature respectively.\n"
  10052. +"\n"
  10053. +"To change any of these features, highlight it with the movement keys\n"
  10054. +"listed below and press <y> to build it in, <m> to make it a module or\n"
  10055. +"<n> to remove it. You may press the <Space> key to cycle through the\n"
  10056. +"available options.\n"
  10057. +"\n"
  10058. +"A trailing \"--->\" designates a submenu, a trailing \"----\" an\n"
  10059. +"empty submenu.\n"
  10060. +"\n"
  10061. +"Menu navigation keys\n"
  10062. +"----------------------------------------------------------------------\n"
  10063. +"Linewise up <Up>\n"
  10064. +"Linewise down <Down>\n"
  10065. +"Pagewise up <Page Up>\n"
  10066. +"Pagewise down <Page Down>\n"
  10067. +"First entry <Home>\n"
  10068. +"Last entry <End>\n"
  10069. +"Enter a submenu <Right> <Enter>\n"
  10070. +"Go back to parent menu <Left> <Esc> <F5>\n"
  10071. +"Close a help window <Enter> <Esc> <F5>\n"
  10072. +"Close entry window, apply <Enter>\n"
  10073. +"Close entry window, forget <Esc> <F5>\n"
  10074. +"Start incremental, case-insensitive search for STRING in menu entries,\n"
  10075. +" no regex support, STRING is displayed in upper left corner\n"
  10076. +" </>STRING\n"
  10077. +" Remove last character <Backspace>\n"
  10078. +" Jump to next hit <Down>\n"
  10079. +" Jump to previous hit <Up>\n"
  10080. +"Exit menu search mode </> <Esc>\n"
  10081. +"Search for configuration variables with or without leading CONFIG_\n"
  10082. +" <F8>RegExpr<Enter>\n"
  10083. +"Verbose search help <F8><F1>\n"
  10084. +"----------------------------------------------------------------------\n"
  10085. +"\n"
  10086. +"Unless in a data entry window, key <1> may be used instead of <F1>,\n"
  10087. +"<2> instead of <F2>, etc.\n"
  10088. +"\n"
  10089. +"\n"
  10090. +"Radiolist (Choice list)\n"
  10091. +"-----------------------\n"
  10092. +"Use the movement keys listed above to select the option you wish to set\n"
  10093. +"and press <Space>.\n"
  10094. +"\n"
  10095. +"\n"
  10096. +"Data entry\n"
  10097. +"----------\n"
  10098. +"Enter the requested information and press <Enter>. Hexadecimal values\n"
  10099. +"may be entered without the \"0x\" prefix.\n"
  10100. +"\n"
  10101. +"\n"
  10102. +"Text Box (Help Window)\n"
  10103. +"----------------------\n"
  10104. +"Use movement keys as listed in table above.\n"
  10105. +"\n"
  10106. +"Press any of <Enter> <Esc> <q> <F5> <F9> to exit.\n"
  10107. +"\n"
  10108. +"\n"
  10109. +"Alternate configuration files\n"
  10110. +"-----------------------------\n"
  10111. +"nconfig supports switching between different configurations.\n"
  10112. +"Press <F6> to save your current configuration. Press <F7> and enter\n"
  10113. +"a file name to load a previously saved configuration.\n"
  10114. +"\n"
  10115. +"\n"
  10116. +"Terminal configuration\n"
  10117. +"----------------------\n"
  10118. +"If you use nconfig in a xterm window, make sure your TERM environment\n"
  10119. +"variable specifies a terminal configuration which supports at least\n"
  10120. +"16 colors. Otherwise nconfig will look rather bad.\n"
  10121. +"\n"
  10122. +"If the \"stty size\" command reports the current terminalsize correctly,\n"
  10123. +"nconfig will adapt to sizes larger than the traditional 80x25 \"standard\"\n"
  10124. +"and display longer menus properly.\n"
  10125. +"\n"
  10126. +"\n"
  10127. +"Single menu mode\n"
  10128. +"----------------\n"
  10129. +"If you prefer to have all of the menu entries listed in a single menu,\n"
  10130. +"rather than the default multimenu hierarchy, run nconfig with\n"
  10131. +"NCONFIG_MODE environment variable set to single_menu. Example:\n"
  10132. +"\n"
  10133. +"make NCONFIG_MODE=single_menu nconfig\n"
  10134. +"\n"
  10135. +"<Enter> will then unfold the appropriate category, or fold it if it\n"
  10136. +"is already unfolded. Folded menu entries will be designated by a\n"
  10137. +"leading \"++>\" and unfolded entries by a leading \"-->\".\n"
  10138. +"\n"
  10139. +"Note that this mode can eventually be a little more CPU expensive than\n"
  10140. +"the default mode, especially with a larger number of unfolded submenus.\n"
  10141. +"\n"),
  10142. +menu_no_f_instructions[] = N_(
  10143. +"Legend: [*] built-in [ ] excluded <M> module < > module capable.\n"
  10144. +"Submenus are designated by a trailing \"--->\", empty ones by \"----\".\n"
  10145. +"\n"
  10146. +"Use the following keys to navigate the menus:\n"
  10147. +"Move up or down with <Up> and <Down>.\n"
  10148. +"Enter a submenu with <Enter> or <Right>.\n"
  10149. +"Exit a submenu to its parent menu with <Esc> or <Left>.\n"
  10150. +"Pressing <y> includes, <n> excludes, <m> modularizes features.\n"
  10151. +"Pressing <Space> cycles through the available options.\n"
  10152. +"To search for menu entries press </>.\n"
  10153. +"<Esc> always leaves the current window.\n"
  10154. +"\n"
  10155. +"You do not have function keys support.\n"
  10156. +"Press <1> instead of <F1>, <2> instead of <F2>, etc.\n"
  10157. +"For verbose global help use key <1>.\n"
  10158. +"For help related to the current menu entry press <?> or <h>.\n"),
  10159. +menu_instructions[] = N_(
  10160. +"Legend: [*] built-in [ ] excluded <M> module < > module capable.\n"
  10161. +"Submenus are designated by a trailing \"--->\", empty ones by \"----\".\n"
  10162. +"\n"
  10163. +"Use the following keys to navigate the menus:\n"
  10164. +"Move up or down with <Up> or <Down>.\n"
  10165. +"Enter a submenu with <Enter> or <Right>.\n"
  10166. +"Exit a submenu to its parent menu with <Esc> or <Left>.\n"
  10167. +"Pressing <y> includes, <n> excludes, <m> modularizes features.\n"
  10168. +"Pressing <Space> cycles through the available options.\n"
  10169. +"To search for menu entries press </>.\n"
  10170. +"<Esc> always leaves the current window.\n"
  10171. +"\n"
  10172. +"Pressing <1> may be used instead of <F1>, <2> instead of <F2>, etc.\n"
  10173. +"For verbose global help press <F1>.\n"
  10174. +"For help related to the current menu entry press <?> or <h>.\n"),
  10175. +radiolist_instructions[] = N_(
  10176. +"Press <Up>, <Down>, <Home> or <End> to navigate a radiolist, select\n"
  10177. +"with <Space>.\n"
  10178. +"For help related to the current entry press <?> or <h>.\n"
  10179. +"For global help press <F1>.\n"),
  10180. +inputbox_instructions_int[] = N_(
  10181. +"Please enter a decimal value.\n"
  10182. +"Fractions will not be accepted.\n"
  10183. +"Press <Enter> to apply, <Esc> to cancel."),
  10184. +inputbox_instructions_hex[] = N_(
  10185. +"Please enter a hexadecimal value.\n"
  10186. +"Press <Enter> to apply, <Esc> to cancel."),
  10187. +inputbox_instructions_string[] = N_(
  10188. +"Please enter a string value.\n"
  10189. +"Press <Enter> to apply, <Esc> to cancel."),
  10190. +setmod_text[] = N_(
  10191. +"This feature depends on another feature which has been configured as a\n"
  10192. +"module. As a result, the current feature will be built as a module too."),
  10193. +load_config_text[] = N_(
  10194. +"Enter the name of the configuration file you wish to load.\n"
  10195. +"Accept the name shown to restore the configuration you last\n"
  10196. +"retrieved. Leave empty to abort."),
  10197. +load_config_help[] = N_(
  10198. +"For various reasons, one may wish to keep several different\n"
  10199. +"configurations available on a single machine.\n"
  10200. +"\n"
  10201. +"If you have saved a previous configuration in a file other than the\n"
  10202. +"default one, entering its name here will allow you to load and modify\n"
  10203. +"that configuration.\n"
  10204. +"\n"
  10205. +"Leave empty to abort.\n"),
  10206. +save_config_text[] = N_(
  10207. +"Enter a filename to which this configuration should be saved\n"
  10208. +"as an alternate. Leave empty to abort."),
  10209. +save_config_help[] = N_(
  10210. +"For various reasons, one may wish to keep several different\n"
  10211. +"configurations available on a single machine.\n"
  10212. +"\n"
  10213. +"Entering a file name here will allow you to later retrieve, modify\n"
  10214. +"and use the current configuration as an alternate to whatever\n"
  10215. +"configuration options you have selected at that time.\n"
  10216. +"\n"
  10217. +"Leave empty to abort.\n"),
  10218. +search_help[] = N_(
  10219. +"Search for symbols (configuration variable names CONFIG_*) and display\n"
  10220. +"their relations. Regular expressions are supported.\n"
  10221. +"Example: Search for \"^FOO\".\n"
  10222. +"Result:\n"
  10223. +"-----------------------------------------------------------------\n"
  10224. +"Symbol: FOO [ = m]\n"
  10225. +"Prompt: Foo bus is used to drive the bar HW\n"
  10226. +"Defined at drivers/pci/Kconfig:47\n"
  10227. +"Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n"
  10228. +"Location:\n"
  10229. +" -> Bus options (PCI, PCMCIA, EISA, ISA)\n"
  10230. +" -> PCI support (PCI [ = y])\n"
  10231. +" -> PCI access mode (<choice> [ = y])\n"
  10232. +"Selects: LIBCRC32\n"
  10233. +"Selected by: BAR\n"
  10234. +"-----------------------------------------------------------------\n"
  10235. +"o The line 'Prompt:' shows the text displayed for this symbol in\n"
  10236. +" the menu hierarchy.\n"
  10237. +"o The 'Defined at' line tells at what file / line number the symbol is\n"
  10238. +" defined.\n"
  10239. +"o The 'Depends on:' line lists symbols that need to be defined for\n"
  10240. +" this symbol to be visible and selectable in the menu.\n"
  10241. +"o The 'Location:' lines tell, where in the menu structure this symbol\n"
  10242. +" is located. A location followed by a [ = y] indicates that this is\n"
  10243. +" a selectable menu item, and the current value is displayed inside\n"
  10244. +" brackets.\n"
  10245. +"o The 'Selects:' line tells, what symbol will be automatically selected\n"
  10246. +" if this symbol is selected (y or m).\n"
  10247. +"o The 'Selected by' line tells what symbol has selected this symbol.\n"
  10248. +"\n"
  10249. +"Only relevant lines are shown.\n"
  10250. +"\n\n"
  10251. +"Search examples:\n"
  10252. +"USB => find all symbols containing USB\n"
  10253. +"^USB => find all symbols starting with USB\n"
  10254. +"USB$ => find all symbols ending with USB\n"
  10255. +"\n");
  10256. +
  10257. +struct mitem {
  10258. + char str[256];
  10259. + char tag;
  10260. + void *usrptr;
  10261. + int is_visible;
  10262. +};
  10263. +
  10264. +#define MAX_MENU_ITEMS 4096
  10265. +static int show_all_items;
  10266. +static int indent;
  10267. +static struct menu *current_menu;
  10268. +static int child_count;
  10269. +static int single_menu_mode;
  10270. +/* the window in which all information appears */
  10271. +static WINDOW *main_window;
  10272. +/* the largest size of the menu window */
  10273. +static int mwin_max_lines;
  10274. +static int mwin_max_cols;
  10275. +/* the window in which we show option buttons */
  10276. +static MENU *curses_menu;
  10277. +static ITEM *curses_menu_items[MAX_MENU_ITEMS];
  10278. +static struct mitem k_menu_items[MAX_MENU_ITEMS];
  10279. +static int items_num;
  10280. +static int global_exit;
  10281. +/* the currently selected button */
  10282. +const char *current_instructions = menu_instructions;
  10283. +
  10284. +static char *dialog_input_result;
  10285. +static int dialog_input_result_len;
  10286. +
  10287. +static void conf(struct menu *menu);
  10288. +static void conf_choice(struct menu *menu);
  10289. +static void conf_string(struct menu *menu);
  10290. +static void conf_load(void);
  10291. +static void conf_save(void);
  10292. +static void show_help(struct menu *menu);
  10293. +static int do_exit(void);
  10294. +static void setup_windows(void);
  10295. +static void search_conf(void);
  10296. +
  10297. +typedef void (*function_key_handler_t)(int *key, struct menu *menu);
  10298. +static void handle_f1(int *key, struct menu *current_item);
  10299. +static void handle_f2(int *key, struct menu *current_item);
  10300. +static void handle_f3(int *key, struct menu *current_item);
  10301. +static void handle_f4(int *key, struct menu *current_item);
  10302. +static void handle_f5(int *key, struct menu *current_item);
  10303. +static void handle_f6(int *key, struct menu *current_item);
  10304. +static void handle_f7(int *key, struct menu *current_item);
  10305. +static void handle_f8(int *key, struct menu *current_item);
  10306. +static void handle_f9(int *key, struct menu *current_item);
  10307. +
  10308. +struct function_keys {
  10309. + const char *key_str;
  10310. + const char *func;
  10311. + function_key key;
  10312. + function_key_handler_t handler;
  10313. +};
  10314. +
  10315. +static const int function_keys_num = 9;
  10316. +struct function_keys function_keys[] = {
  10317. + {
  10318. + .key_str = "F1",
  10319. + .func = "Help",
  10320. + .key = F_HELP,
  10321. + .handler = handle_f1,
  10322. + },
  10323. + {
  10324. + .key_str = "F2",
  10325. + .func = "SymInfo",
  10326. + .key = F_SYMBOL,
  10327. + .handler = handle_f2,
  10328. + },
  10329. + {
  10330. + .key_str = "F3",
  10331. + .func = "Help 2",
  10332. + .key = F_INSTS,
  10333. + .handler = handle_f3,
  10334. + },
  10335. + {
  10336. + .key_str = "F4",
  10337. + .func = "ShowAll",
  10338. + .key = F_CONF,
  10339. + .handler = handle_f4,
  10340. + },
  10341. + {
  10342. + .key_str = "F5",
  10343. + .func = "Back",
  10344. + .key = F_BACK,
  10345. + .handler = handle_f5,
  10346. + },
  10347. + {
  10348. + .key_str = "F6",
  10349. + .func = "Save",
  10350. + .key = F_SAVE,
  10351. + .handler = handle_f6,
  10352. + },
  10353. + {
  10354. + .key_str = "F7",
  10355. + .func = "Load",
  10356. + .key = F_LOAD,
  10357. + .handler = handle_f7,
  10358. + },
  10359. + {
  10360. + .key_str = "F8",
  10361. + .func = "SymSearch",
  10362. + .key = F_SEARCH,
  10363. + .handler = handle_f8,
  10364. + },
  10365. + {
  10366. + .key_str = "F9",
  10367. + .func = "Exit",
  10368. + .key = F_EXIT,
  10369. + .handler = handle_f9,
  10370. + },
  10371. +};
  10372. +
  10373. +static void print_function_line(void)
  10374. +{
  10375. + int i;
  10376. + int offset = 1;
  10377. + const int skip = 1;
  10378. + int lines = getmaxy(stdscr);
  10379. +
  10380. + for (i = 0; i < function_keys_num; i++) {
  10381. + (void) wattrset(main_window, attributes[FUNCTION_HIGHLIGHT]);
  10382. + mvwprintw(main_window, lines-3, offset,
  10383. + "%s",
  10384. + function_keys[i].key_str);
  10385. + (void) wattrset(main_window, attributes[FUNCTION_TEXT]);
  10386. + offset += strlen(function_keys[i].key_str);
  10387. + mvwprintw(main_window, lines-3,
  10388. + offset, "%s",
  10389. + function_keys[i].func);
  10390. + offset += strlen(function_keys[i].func) + skip;
  10391. + }
  10392. + (void) wattrset(main_window, attributes[NORMAL]);
  10393. +}
  10394. +
  10395. +/* help */
  10396. +static void handle_f1(int *key, struct menu *current_item)
  10397. +{
  10398. + show_scroll_win(main_window,
  10399. + _("Global help"), _(nconf_global_help));
  10400. + return;
  10401. +}
  10402. +
  10403. +/* symbole help */
  10404. +static void handle_f2(int *key, struct menu *current_item)
  10405. +{
  10406. + show_help(current_item);
  10407. + return;
  10408. +}
  10409. +
  10410. +/* instructions */
  10411. +static void handle_f3(int *key, struct menu *current_item)
  10412. +{
  10413. + show_scroll_win(main_window,
  10414. + _("Short help"),
  10415. + _(current_instructions));
  10416. + return;
  10417. +}
  10418. +
  10419. +/* config */
  10420. +static void handle_f4(int *key, struct menu *current_item)
  10421. +{
  10422. + int res = btn_dialog(main_window,
  10423. + _("Show all symbols?"),
  10424. + 2,
  10425. + " <Show All> ",
  10426. + "<Don't show all>");
  10427. + if (res == 0)
  10428. + show_all_items = 1;
  10429. + else if (res == 1)
  10430. + show_all_items = 0;
  10431. +
  10432. + return;
  10433. +}
  10434. +
  10435. +/* back */
  10436. +static void handle_f5(int *key, struct menu *current_item)
  10437. +{
  10438. + *key = KEY_LEFT;
  10439. + return;
  10440. +}
  10441. +
  10442. +/* save */
  10443. +static void handle_f6(int *key, struct menu *current_item)
  10444. +{
  10445. + conf_save();
  10446. + return;
  10447. +}
  10448. +
  10449. +/* load */
  10450. +static void handle_f7(int *key, struct menu *current_item)
  10451. +{
  10452. + conf_load();
  10453. + return;
  10454. +}
  10455. +
  10456. +/* search */
  10457. +static void handle_f8(int *key, struct menu *current_item)
  10458. +{
  10459. + search_conf();
  10460. + return;
  10461. +}
  10462. +
  10463. +/* exit */
  10464. +static void handle_f9(int *key, struct menu *current_item)
  10465. +{
  10466. + do_exit();
  10467. + return;
  10468. +}
  10469. +
  10470. +/* return != 0 to indicate the key was handles */
  10471. +static int process_special_keys(int *key, struct menu *menu)
  10472. +{
  10473. + int i;
  10474. +
  10475. + if (*key == KEY_RESIZE) {
  10476. + setup_windows();
  10477. + return 1;
  10478. + }
  10479. +
  10480. + for (i = 0; i < function_keys_num; i++) {
  10481. + if (*key == KEY_F(function_keys[i].key) ||
  10482. + *key == '0' + function_keys[i].key){
  10483. + function_keys[i].handler(key, menu);
  10484. + return 1;
  10485. + }
  10486. + }
  10487. +
  10488. + return 0;
  10489. +}
  10490. +
  10491. +static void clean_items(void)
  10492. +{
  10493. + int i;
  10494. + for (i = 0; curses_menu_items[i]; i++)
  10495. + free_item(curses_menu_items[i]);
  10496. + bzero(curses_menu_items, sizeof(curses_menu_items));
  10497. + bzero(k_menu_items, sizeof(k_menu_items));
  10498. + items_num = 0;
  10499. +}
  10500. +
  10501. +typedef enum {MATCH_TINKER_PATTERN_UP, MATCH_TINKER_PATTERN_DOWN,
  10502. + FIND_NEXT_MATCH_DOWN, FIND_NEXT_MATCH_UP} match_f;
  10503. +
  10504. +/* return the index of the matched item, or -1 if no such item exists */
  10505. +static int get_mext_match(const char *match_str, match_f flag)
  10506. +{
  10507. + int match_start = item_index(current_item(curses_menu));
  10508. + int index;
  10509. +
  10510. + if (flag == FIND_NEXT_MATCH_DOWN)
  10511. + ++match_start;
  10512. + else if (flag == FIND_NEXT_MATCH_UP)
  10513. + --match_start;
  10514. +
  10515. + index = match_start;
  10516. + index = (index + items_num) % items_num;
  10517. + while (true) {
  10518. + char *str = k_menu_items[index].str;
  10519. + if (strcasestr(str, match_str) != 0)
  10520. + return index;
  10521. + if (flag == FIND_NEXT_MATCH_UP ||
  10522. + flag == MATCH_TINKER_PATTERN_UP)
  10523. + --index;
  10524. + else
  10525. + ++index;
  10526. + index = (index + items_num) % items_num;
  10527. + if (index == match_start)
  10528. + return -1;
  10529. + }
  10530. +}
  10531. +
  10532. +/* Make a new item. */
  10533. +static void item_make(struct menu *menu, char tag, const char *fmt, ...)
  10534. +{
  10535. + va_list ap;
  10536. +
  10537. + if (items_num > MAX_MENU_ITEMS-1)
  10538. + return;
  10539. +
  10540. + bzero(&k_menu_items[items_num], sizeof(k_menu_items[0]));
  10541. + k_menu_items[items_num].tag = tag;
  10542. + k_menu_items[items_num].usrptr = menu;
  10543. + if (menu != NULL)
  10544. + k_menu_items[items_num].is_visible =
  10545. + menu_is_visible(menu);
  10546. + else
  10547. + k_menu_items[items_num].is_visible = 1;
  10548. +
  10549. + va_start(ap, fmt);
  10550. + vsnprintf(k_menu_items[items_num].str,
  10551. + sizeof(k_menu_items[items_num].str),
  10552. + fmt, ap);
  10553. + va_end(ap);
  10554. +
  10555. + if (!k_menu_items[items_num].is_visible)
  10556. + memcpy(k_menu_items[items_num].str, "XXX", 3);
  10557. +
  10558. + curses_menu_items[items_num] = new_item(
  10559. + k_menu_items[items_num].str,
  10560. + k_menu_items[items_num].str);
  10561. + set_item_userptr(curses_menu_items[items_num],
  10562. + &k_menu_items[items_num]);
  10563. + /*
  10564. + if (!k_menu_items[items_num].is_visible)
  10565. + item_opts_off(curses_menu_items[items_num], O_SELECTABLE);
  10566. + */
  10567. +
  10568. + items_num++;
  10569. + curses_menu_items[items_num] = NULL;
  10570. +}
  10571. +
  10572. +/* very hackish. adds a string to the last item added */
  10573. +static void item_add_str(const char *fmt, ...)
  10574. +{
  10575. + va_list ap;
  10576. + int index = items_num-1;
  10577. + char new_str[256];
  10578. + char tmp_str[256];
  10579. +
  10580. + if (index < 0)
  10581. + return;
  10582. +
  10583. + va_start(ap, fmt);
  10584. + vsnprintf(new_str, sizeof(new_str), fmt, ap);
  10585. + va_end(ap);
  10586. + snprintf(tmp_str, sizeof(tmp_str), "%s%s",
  10587. + k_menu_items[index].str, new_str);
  10588. + strncpy(k_menu_items[index].str,
  10589. + tmp_str,
  10590. + sizeof(k_menu_items[index].str));
  10591. +
  10592. + free_item(curses_menu_items[index]);
  10593. + curses_menu_items[index] = new_item(
  10594. + k_menu_items[index].str,
  10595. + k_menu_items[index].str);
  10596. + set_item_userptr(curses_menu_items[index],
  10597. + &k_menu_items[index]);
  10598. +}
  10599. +
  10600. +/* get the tag of the currently selected item */
  10601. +static char item_tag(void)
  10602. +{
  10603. + ITEM *cur;
  10604. + struct mitem *mcur;
  10605. +
  10606. + cur = current_item(curses_menu);
  10607. + if (cur == NULL)
  10608. + return 0;
  10609. + mcur = (struct mitem *) item_userptr(cur);
  10610. + return mcur->tag;
  10611. +}
  10612. +
  10613. +static int curses_item_index(void)
  10614. +{
  10615. + return item_index(current_item(curses_menu));
  10616. +}
  10617. +
  10618. +static void *item_data(void)
  10619. +{
  10620. + ITEM *cur;
  10621. + struct mitem *mcur;
  10622. +
  10623. + cur = current_item(curses_menu);
  10624. + if (!cur)
  10625. + return NULL;
  10626. + mcur = (struct mitem *) item_userptr(cur);
  10627. + return mcur->usrptr;
  10628. +
  10629. +}
  10630. +
  10631. +static int item_is_tag(char tag)
  10632. +{
  10633. + return item_tag() == tag;
  10634. +}
  10635. +
  10636. +static char filename[PATH_MAX+1];
  10637. +static char menu_backtitle[PATH_MAX+128];
  10638. +static const char *set_config_filename(const char *config_filename)
  10639. +{
  10640. + int size;
  10641. +
  10642. + size = snprintf(menu_backtitle, sizeof(menu_backtitle),
  10643. + "%s - %s", config_filename, rootmenu.prompt->text);
  10644. + if (size >= sizeof(menu_backtitle))
  10645. + menu_backtitle[sizeof(menu_backtitle)-1] = '\0';
  10646. +
  10647. + size = snprintf(filename, sizeof(filename), "%s", config_filename);
  10648. + if (size >= sizeof(filename))
  10649. + filename[sizeof(filename)-1] = '\0';
  10650. + return menu_backtitle;
  10651. +}
  10652. +
  10653. +/* return = 0 means we are successful.
  10654. + * -1 means go on doing what you were doing
  10655. + */
  10656. +static int do_exit(void)
  10657. +{
  10658. + int res;
  10659. + if (!conf_get_changed()) {
  10660. + global_exit = 1;
  10661. + return 0;
  10662. + }
  10663. + res = btn_dialog(main_window,
  10664. + _("Do you wish to save your new configuration?\n"
  10665. + "<ESC> to cancel and resume nconfig."),
  10666. + 2,
  10667. + " <save> ",
  10668. + "<don't save>");
  10669. + if (res == KEY_EXIT) {
  10670. + global_exit = 0;
  10671. + return -1;
  10672. + }
  10673. +
  10674. + /* if we got here, the user really wants to exit */
  10675. + switch (res) {
  10676. + case 0:
  10677. + res = conf_write(filename);
  10678. + if (res)
  10679. + btn_dialog(
  10680. + main_window,
  10681. + _("Error during writing of configuration.\n"
  10682. + "Your configuration changes were NOT saved."),
  10683. + 1,
  10684. + "<OK>");
  10685. + break;
  10686. + default:
  10687. + btn_dialog(
  10688. + main_window,
  10689. + _("Your configuration changes were NOT saved."),
  10690. + 1,
  10691. + "<OK>");
  10692. + break;
  10693. + }
  10694. + global_exit = 1;
  10695. + return 0;
  10696. +}
  10697. +
  10698. +
  10699. +static void search_conf(void)
  10700. +{
  10701. + struct symbol **sym_arr;
  10702. + struct gstr res;
  10703. + struct gstr title;
  10704. + char *dialog_input;
  10705. + int dres;
  10706. +
  10707. + title = str_new();
  10708. + str_printf( &title, _("Enter %s (sub)string or regexp to search for "
  10709. + "(with or without \"%s\")"), CONFIG_, CONFIG_);
  10710. +
  10711. +again:
  10712. + dres = dialog_inputbox(main_window,
  10713. + _("Search Configuration Parameter"),
  10714. + str_get(&title),
  10715. + "", &dialog_input_result, &dialog_input_result_len);
  10716. + switch (dres) {
  10717. + case 0:
  10718. + break;
  10719. + case 1:
  10720. + show_scroll_win(main_window,
  10721. + _("Search Configuration"), search_help);
  10722. + goto again;
  10723. + default:
  10724. + str_free(&title);
  10725. + return;
  10726. + }
  10727. +
  10728. + /* strip the prefix if necessary */
  10729. + dialog_input = dialog_input_result;
  10730. + if (strncasecmp(dialog_input_result, CONFIG_, strlen(CONFIG_)) == 0)
  10731. + dialog_input += strlen(CONFIG_);
  10732. +
  10733. + sym_arr = sym_re_search(dialog_input);
  10734. + res = get_relations_str(sym_arr, NULL);
  10735. + free(sym_arr);
  10736. + show_scroll_win(main_window,
  10737. + _("Search Results"), str_get(&res));
  10738. + str_free(&res);
  10739. + str_free(&title);
  10740. +}
  10741. +
  10742. +
  10743. +static void build_conf(struct menu *menu)
  10744. +{
  10745. + struct symbol *sym;
  10746. + struct property *prop;
  10747. + struct menu *child;
  10748. + int type, tmp, doint = 2;
  10749. + tristate val;
  10750. + char ch;
  10751. +
  10752. + if (!menu || (!show_all_items && !menu_is_visible(menu)))
  10753. + return;
  10754. +
  10755. + sym = menu->sym;
  10756. + prop = menu->prompt;
  10757. + if (!sym) {
  10758. + if (prop && menu != current_menu) {
  10759. + const char *prompt = menu_get_prompt(menu);
  10760. + enum prop_type ptype;
  10761. + ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
  10762. + switch (ptype) {
  10763. + case P_MENU:
  10764. + child_count++;
  10765. + prompt = _(prompt);
  10766. + if (single_menu_mode) {
  10767. + item_make(menu, 'm',
  10768. + "%s%*c%s",
  10769. + menu->data ? "-->" : "++>",
  10770. + indent + 1, ' ', prompt);
  10771. + } else
  10772. + item_make(menu, 'm',
  10773. + " %*c%s %s",
  10774. + indent + 1, ' ', prompt,
  10775. + menu_is_empty(menu) ? "----" : "--->");
  10776. +
  10777. + if (single_menu_mode && menu->data)
  10778. + goto conf_childs;
  10779. + return;
  10780. + case P_COMMENT:
  10781. + if (prompt) {
  10782. + child_count++;
  10783. + item_make(menu, ':',
  10784. + " %*c*** %s ***",
  10785. + indent + 1, ' ',
  10786. + _(prompt));
  10787. + }
  10788. + break;
  10789. + default:
  10790. + if (prompt) {
  10791. + child_count++;
  10792. + item_make(menu, ':', "---%*c%s",
  10793. + indent + 1, ' ',
  10794. + _(prompt));
  10795. + }
  10796. + }
  10797. + } else
  10798. + doint = 0;
  10799. + goto conf_childs;
  10800. + }
  10801. +
  10802. + type = sym_get_type(sym);
  10803. + if (sym_is_choice(sym)) {
  10804. + struct symbol *def_sym = sym_get_choice_value(sym);
  10805. + struct menu *def_menu = NULL;
  10806. +
  10807. + child_count++;
  10808. + for (child = menu->list; child; child = child->next) {
  10809. + if (menu_is_visible(child) && child->sym == def_sym)
  10810. + def_menu = child;
  10811. + }
  10812. +
  10813. + val = sym_get_tristate_value(sym);
  10814. + if (sym_is_changable(sym)) {
  10815. + switch (type) {
  10816. + case S_BOOLEAN:
  10817. + item_make(menu, 't', "[%c]",
  10818. + val == no ? ' ' : '*');
  10819. + break;
  10820. + case S_TRISTATE:
  10821. + switch (val) {
  10822. + case yes:
  10823. + ch = '*';
  10824. + break;
  10825. + case mod:
  10826. + ch = 'M';
  10827. + break;
  10828. + default:
  10829. + ch = ' ';
  10830. + break;
  10831. + }
  10832. + item_make(menu, 't', "<%c>", ch);
  10833. + break;
  10834. + }
  10835. + } else {
  10836. + item_make(menu, def_menu ? 't' : ':', " ");
  10837. + }
  10838. +
  10839. + item_add_str("%*c%s", indent + 1,
  10840. + ' ', _(menu_get_prompt(menu)));
  10841. + if (val == yes) {
  10842. + if (def_menu) {
  10843. + item_add_str(" (%s)",
  10844. + _(menu_get_prompt(def_menu)));
  10845. + item_add_str(" --->");
  10846. + if (def_menu->list) {
  10847. + indent += 2;
  10848. + build_conf(def_menu);
  10849. + indent -= 2;
  10850. + }
  10851. + }
  10852. + return;
  10853. + }
  10854. + } else {
  10855. + if (menu == current_menu) {
  10856. + item_make(menu, ':',
  10857. + "---%*c%s", indent + 1,
  10858. + ' ', _(menu_get_prompt(menu)));
  10859. + goto conf_childs;
  10860. + }
  10861. + child_count++;
  10862. + val = sym_get_tristate_value(sym);
  10863. + if (sym_is_choice_value(sym) && val == yes) {
  10864. + item_make(menu, ':', " ");
  10865. + } else {
  10866. + switch (type) {
  10867. + case S_BOOLEAN:
  10868. + if (sym_is_changable(sym))
  10869. + item_make(menu, 't', "[%c]",
  10870. + val == no ? ' ' : '*');
  10871. + else
  10872. + item_make(menu, 't', "-%c-",
  10873. + val == no ? ' ' : '*');
  10874. + break;
  10875. + case S_TRISTATE:
  10876. + switch (val) {
  10877. + case yes:
  10878. + ch = '*';
  10879. + break;
  10880. + case mod:
  10881. + ch = 'M';
  10882. + break;
  10883. + default:
  10884. + ch = ' ';
  10885. + break;
  10886. + }
  10887. + if (sym_is_changable(sym)) {
  10888. + if (sym->rev_dep.tri == mod)
  10889. + item_make(menu,
  10890. + 't', "{%c}", ch);
  10891. + else
  10892. + item_make(menu,
  10893. + 't', "<%c>", ch);
  10894. + } else
  10895. + item_make(menu, 't', "-%c-", ch);
  10896. + break;
  10897. + default:
  10898. + tmp = 2 + strlen(sym_get_string_value(sym));
  10899. + item_make(menu, 's', " (%s)",
  10900. + sym_get_string_value(sym));
  10901. + tmp = indent - tmp + 4;
  10902. + if (tmp < 0)
  10903. + tmp = 0;
  10904. + item_add_str("%*c%s%s", tmp, ' ',
  10905. + _(menu_get_prompt(menu)),
  10906. + (sym_has_value(sym) ||
  10907. + !sym_is_changable(sym)) ? "" :
  10908. + _(" (NEW)"));
  10909. + goto conf_childs;
  10910. + }
  10911. + }
  10912. + item_add_str("%*c%s%s", indent + 1, ' ',
  10913. + _(menu_get_prompt(menu)),
  10914. + (sym_has_value(sym) || !sym_is_changable(sym)) ?
  10915. + "" : _(" (NEW)"));
  10916. + if (menu->prompt && menu->prompt->type == P_MENU) {
  10917. + item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->");
  10918. + return;
  10919. + }
  10920. + }
  10921. +
  10922. +conf_childs:
  10923. + indent += doint;
  10924. + for (child = menu->list; child; child = child->next)
  10925. + build_conf(child);
  10926. + indent -= doint;
  10927. +}
  10928. +
  10929. +static void reset_menu(void)
  10930. +{
  10931. + unpost_menu(curses_menu);
  10932. + clean_items();
  10933. +}
  10934. +
  10935. +/* adjust the menu to show this item.
  10936. + * prefer not to scroll the menu if possible*/
  10937. +static void center_item(int selected_index, int *last_top_row)
  10938. +{
  10939. + int toprow;
  10940. +
  10941. + set_top_row(curses_menu, *last_top_row);
  10942. + toprow = top_row(curses_menu);
  10943. + if (selected_index < toprow ||
  10944. + selected_index >= toprow+mwin_max_lines) {
  10945. + toprow = max(selected_index-mwin_max_lines/2, 0);
  10946. + if (toprow >= item_count(curses_menu)-mwin_max_lines)
  10947. + toprow = item_count(curses_menu)-mwin_max_lines;
  10948. + set_top_row(curses_menu, toprow);
  10949. + }
  10950. + set_current_item(curses_menu,
  10951. + curses_menu_items[selected_index]);
  10952. + *last_top_row = toprow;
  10953. + post_menu(curses_menu);
  10954. + refresh_all_windows(main_window);
  10955. +}
  10956. +
  10957. +/* this function assumes reset_menu has been called before */
  10958. +static void show_menu(const char *prompt, const char *instructions,
  10959. + int selected_index, int *last_top_row)
  10960. +{
  10961. + int maxx, maxy;
  10962. + WINDOW *menu_window;
  10963. +
  10964. + current_instructions = instructions;
  10965. +
  10966. + clear();
  10967. + (void) wattrset(main_window, attributes[NORMAL]);
  10968. + print_in_middle(stdscr, 1, 0, getmaxx(stdscr),
  10969. + menu_backtitle,
  10970. + attributes[MAIN_HEADING]);
  10971. +
  10972. + (void) wattrset(main_window, attributes[MAIN_MENU_BOX]);
  10973. + box(main_window, 0, 0);
  10974. + (void) wattrset(main_window, attributes[MAIN_MENU_HEADING]);
  10975. + mvwprintw(main_window, 0, 3, " %s ", prompt);
  10976. + (void) wattrset(main_window, attributes[NORMAL]);
  10977. +
  10978. + set_menu_items(curses_menu, curses_menu_items);
  10979. +
  10980. + /* position the menu at the middle of the screen */
  10981. + scale_menu(curses_menu, &maxy, &maxx);
  10982. + maxx = min(maxx, mwin_max_cols-2);
  10983. + maxy = mwin_max_lines;
  10984. + menu_window = derwin(main_window,
  10985. + maxy,
  10986. + maxx,
  10987. + 2,
  10988. + (mwin_max_cols-maxx)/2);
  10989. + keypad(menu_window, TRUE);
  10990. + set_menu_win(curses_menu, menu_window);
  10991. + set_menu_sub(curses_menu, menu_window);
  10992. +
  10993. + /* must reassert this after changing items, otherwise returns to a
  10994. + * default of 16
  10995. + */
  10996. + set_menu_format(curses_menu, maxy, 1);
  10997. + center_item(selected_index, last_top_row);
  10998. + set_menu_format(curses_menu, maxy, 1);
  10999. +
  11000. + print_function_line();
  11001. +
  11002. + /* Post the menu */
  11003. + post_menu(curses_menu);
  11004. + refresh_all_windows(main_window);
  11005. +}
  11006. +
  11007. +static void adj_match_dir(match_f *match_direction)
  11008. +{
  11009. + if (*match_direction == FIND_NEXT_MATCH_DOWN)
  11010. + *match_direction =
  11011. + MATCH_TINKER_PATTERN_DOWN;
  11012. + else if (*match_direction == FIND_NEXT_MATCH_UP)
  11013. + *match_direction =
  11014. + MATCH_TINKER_PATTERN_UP;
  11015. + /* else, do no change.. */
  11016. +}
  11017. +
  11018. +struct match_state
  11019. +{
  11020. + int in_search;
  11021. + match_f match_direction;
  11022. + char pattern[256];
  11023. +};
  11024. +
  11025. +/* Return 0 means I have handled the key. In such a case, ans should hold the
  11026. + * item to center, or -1 otherwise.
  11027. + * Else return -1 .
  11028. + */
  11029. +static int do_match(int key, struct match_state *state, int *ans)
  11030. +{
  11031. + char c = (char) key;
  11032. + int terminate_search = 0;
  11033. + *ans = -1;
  11034. + if (key == '/' || (state->in_search && key == 27)) {
  11035. + move(0, 0);
  11036. + refresh();
  11037. + clrtoeol();
  11038. + state->in_search = 1-state->in_search;
  11039. + bzero(state->pattern, sizeof(state->pattern));
  11040. + state->match_direction = MATCH_TINKER_PATTERN_DOWN;
  11041. + return 0;
  11042. + } else if (!state->in_search)
  11043. + return 1;
  11044. +
  11045. + if (isalnum(c) || isgraph(c) || c == ' ') {
  11046. + state->pattern[strlen(state->pattern)] = c;
  11047. + state->pattern[strlen(state->pattern)] = '\0';
  11048. + adj_match_dir(&state->match_direction);
  11049. + *ans = get_mext_match(state->pattern,
  11050. + state->match_direction);
  11051. + } else if (key == KEY_DOWN) {
  11052. + state->match_direction = FIND_NEXT_MATCH_DOWN;
  11053. + *ans = get_mext_match(state->pattern,
  11054. + state->match_direction);
  11055. + } else if (key == KEY_UP) {
  11056. + state->match_direction = FIND_NEXT_MATCH_UP;
  11057. + *ans = get_mext_match(state->pattern,
  11058. + state->match_direction);
  11059. + } else if (key == KEY_BACKSPACE || key == 127) {
  11060. + state->pattern[strlen(state->pattern)-1] = '\0';
  11061. + adj_match_dir(&state->match_direction);
  11062. + } else
  11063. + terminate_search = 1;
  11064. +
  11065. + if (terminate_search) {
  11066. + state->in_search = 0;
  11067. + bzero(state->pattern, sizeof(state->pattern));
  11068. + move(0, 0);
  11069. + refresh();
  11070. + clrtoeol();
  11071. + return -1;
  11072. + }
  11073. + return 0;
  11074. +}
  11075. +
  11076. +static void conf(struct menu *menu)
  11077. +{
  11078. + struct menu *submenu = 0;
  11079. + const char *prompt = menu_get_prompt(menu);
  11080. + struct symbol *sym;
  11081. + int res;
  11082. + int current_index = 0;
  11083. + int last_top_row = 0;
  11084. + struct match_state match_state = {
  11085. + .in_search = 0,
  11086. + .match_direction = MATCH_TINKER_PATTERN_DOWN,
  11087. + .pattern = "",
  11088. + };
  11089. +
  11090. + while (!global_exit) {
  11091. + reset_menu();
  11092. + current_menu = menu;
  11093. + build_conf(menu);
  11094. + if (!child_count)
  11095. + break;
  11096. +
  11097. + show_menu(prompt ? _(prompt) : _("Main Menu"),
  11098. + _(menu_instructions),
  11099. + current_index, &last_top_row);
  11100. + keypad((menu_win(curses_menu)), TRUE);
  11101. + while (!global_exit) {
  11102. + if (match_state.in_search) {
  11103. + mvprintw(0, 0,
  11104. + "searching: %s", match_state.pattern);
  11105. + clrtoeol();
  11106. + }
  11107. + refresh_all_windows(main_window);
  11108. + res = wgetch(menu_win(curses_menu));
  11109. + if (!res)
  11110. + break;
  11111. + if (do_match(res, &match_state, &current_index) == 0) {
  11112. + if (current_index != -1)
  11113. + center_item(current_index,
  11114. + &last_top_row);
  11115. + continue;
  11116. + }
  11117. + if (process_special_keys(&res,
  11118. + (struct menu *) item_data()))
  11119. + break;
  11120. + switch (res) {
  11121. + case KEY_DOWN:
  11122. + menu_driver(curses_menu, REQ_DOWN_ITEM);
  11123. + break;
  11124. + case KEY_UP:
  11125. + menu_driver(curses_menu, REQ_UP_ITEM);
  11126. + break;
  11127. + case KEY_NPAGE:
  11128. + menu_driver(curses_menu, REQ_SCR_DPAGE);
  11129. + break;
  11130. + case KEY_PPAGE:
  11131. + menu_driver(curses_menu, REQ_SCR_UPAGE);
  11132. + break;
  11133. + case KEY_HOME:
  11134. + menu_driver(curses_menu, REQ_FIRST_ITEM);
  11135. + break;
  11136. + case KEY_END:
  11137. + menu_driver(curses_menu, REQ_LAST_ITEM);
  11138. + break;
  11139. + case 'h':
  11140. + case '?':
  11141. + show_help((struct menu *) item_data());
  11142. + break;
  11143. + }
  11144. + if (res == 10 || res == 27 ||
  11145. + res == 32 || res == 'n' || res == 'y' ||
  11146. + res == KEY_LEFT || res == KEY_RIGHT ||
  11147. + res == 'm')
  11148. + break;
  11149. + refresh_all_windows(main_window);
  11150. + }
  11151. +
  11152. + refresh_all_windows(main_window);
  11153. + /* if ESC or left*/
  11154. + if (res == 27 || (menu != &rootmenu && res == KEY_LEFT))
  11155. + break;
  11156. +
  11157. + /* remember location in the menu */
  11158. + last_top_row = top_row(curses_menu);
  11159. + current_index = curses_item_index();
  11160. +
  11161. + if (!item_tag())
  11162. + continue;
  11163. +
  11164. + submenu = (struct menu *) item_data();
  11165. + if (!submenu || !menu_is_visible(submenu))
  11166. + continue;
  11167. + sym = submenu->sym;
  11168. +
  11169. + switch (res) {
  11170. + case ' ':
  11171. + if (item_is_tag('t'))
  11172. + sym_toggle_tristate_value(sym);
  11173. + else if (item_is_tag('m'))
  11174. + conf(submenu);
  11175. + break;
  11176. + case KEY_RIGHT:
  11177. + case 10: /* ENTER WAS PRESSED */
  11178. + switch (item_tag()) {
  11179. + case 'm':
  11180. + if (single_menu_mode)
  11181. + submenu->data =
  11182. + (void *) (long) !submenu->data;
  11183. + else
  11184. + conf(submenu);
  11185. + break;
  11186. + case 't':
  11187. + if (sym_is_choice(sym) &&
  11188. + sym_get_tristate_value(sym) == yes)
  11189. + conf_choice(submenu);
  11190. + else if (submenu->prompt &&
  11191. + submenu->prompt->type == P_MENU)
  11192. + conf(submenu);
  11193. + else if (res == 10)
  11194. + sym_toggle_tristate_value(sym);
  11195. + break;
  11196. + case 's':
  11197. + conf_string(submenu);
  11198. + break;
  11199. + }
  11200. + break;
  11201. + case 'y':
  11202. + if (item_is_tag('t')) {
  11203. + if (sym_set_tristate_value(sym, yes))
  11204. + break;
  11205. + if (sym_set_tristate_value(sym, mod))
  11206. + btn_dialog(main_window, setmod_text, 0);
  11207. + }
  11208. + break;
  11209. + case 'n':
  11210. + if (item_is_tag('t'))
  11211. + sym_set_tristate_value(sym, no);
  11212. + break;
  11213. + case 'm':
  11214. + if (item_is_tag('t'))
  11215. + sym_set_tristate_value(sym, mod);
  11216. + break;
  11217. + }
  11218. + }
  11219. +}
  11220. +
  11221. +static void conf_message_callback(const char *fmt, va_list ap)
  11222. +{
  11223. + char buf[1024];
  11224. +
  11225. + vsnprintf(buf, sizeof(buf), fmt, ap);
  11226. + btn_dialog(main_window, buf, 1, "<OK>");
  11227. +}
  11228. +
  11229. +static void show_help(struct menu *menu)
  11230. +{
  11231. + struct gstr help;
  11232. +
  11233. + if (!menu)
  11234. + return;
  11235. +
  11236. + help = str_new();
  11237. + menu_get_ext_help(menu, &help);
  11238. + show_scroll_win(main_window, _(menu_get_prompt(menu)), str_get(&help));
  11239. + str_free(&help);
  11240. +}
  11241. +
  11242. +static void conf_choice(struct menu *menu)
  11243. +{
  11244. + const char *prompt = _(menu_get_prompt(menu));
  11245. + struct menu *child = 0;
  11246. + struct symbol *active;
  11247. + int selected_index = 0;
  11248. + int last_top_row = 0;
  11249. + int res, i = 0;
  11250. + struct match_state match_state = {
  11251. + .in_search = 0,
  11252. + .match_direction = MATCH_TINKER_PATTERN_DOWN,
  11253. + .pattern = "",
  11254. + };
  11255. +
  11256. + active = sym_get_choice_value(menu->sym);
  11257. + /* this is mostly duplicated from the conf() function. */
  11258. + while (!global_exit) {
  11259. + reset_menu();
  11260. +
  11261. + for (i = 0, child = menu->list; child; child = child->next) {
  11262. + if (!show_all_items && !menu_is_visible(child))
  11263. + continue;
  11264. +
  11265. + if (child->sym == sym_get_choice_value(menu->sym))
  11266. + item_make(child, ':', "<X> %s",
  11267. + _(menu_get_prompt(child)));
  11268. + else if (child->sym)
  11269. + item_make(child, ':', " %s",
  11270. + _(menu_get_prompt(child)));
  11271. + else
  11272. + item_make(child, ':', "*** %s ***",
  11273. + _(menu_get_prompt(child)));
  11274. +
  11275. + if (child->sym == active){
  11276. + last_top_row = top_row(curses_menu);
  11277. + selected_index = i;
  11278. + }
  11279. + i++;
  11280. + }
  11281. + show_menu(prompt ? _(prompt) : _("Choice Menu"),
  11282. + _(radiolist_instructions),
  11283. + selected_index,
  11284. + &last_top_row);
  11285. + while (!global_exit) {
  11286. + if (match_state.in_search) {
  11287. + mvprintw(0, 0, "searching: %s",
  11288. + match_state.pattern);
  11289. + clrtoeol();
  11290. + }
  11291. + refresh_all_windows(main_window);
  11292. + res = wgetch(menu_win(curses_menu));
  11293. + if (!res)
  11294. + break;
  11295. + if (do_match(res, &match_state, &selected_index) == 0) {
  11296. + if (selected_index != -1)
  11297. + center_item(selected_index,
  11298. + &last_top_row);
  11299. + continue;
  11300. + }
  11301. + if (process_special_keys(
  11302. + &res,
  11303. + (struct menu *) item_data()))
  11304. + break;
  11305. + switch (res) {
  11306. + case KEY_DOWN:
  11307. + menu_driver(curses_menu, REQ_DOWN_ITEM);
  11308. + break;
  11309. + case KEY_UP:
  11310. + menu_driver(curses_menu, REQ_UP_ITEM);
  11311. + break;
  11312. + case KEY_NPAGE:
  11313. + menu_driver(curses_menu, REQ_SCR_DPAGE);
  11314. + break;
  11315. + case KEY_PPAGE:
  11316. + menu_driver(curses_menu, REQ_SCR_UPAGE);
  11317. + break;
  11318. + case KEY_HOME:
  11319. + menu_driver(curses_menu, REQ_FIRST_ITEM);
  11320. + break;
  11321. + case KEY_END:
  11322. + menu_driver(curses_menu, REQ_LAST_ITEM);
  11323. + break;
  11324. + case 'h':
  11325. + case '?':
  11326. + show_help((struct menu *) item_data());
  11327. + break;
  11328. + }
  11329. + if (res == 10 || res == 27 || res == ' ' ||
  11330. + res == KEY_LEFT){
  11331. + break;
  11332. + }
  11333. + refresh_all_windows(main_window);
  11334. + }
  11335. + /* if ESC or left */
  11336. + if (res == 27 || res == KEY_LEFT)
  11337. + break;
  11338. +
  11339. + child = item_data();
  11340. + if (!child || !menu_is_visible(child) || !child->sym)
  11341. + continue;
  11342. + switch (res) {
  11343. + case ' ':
  11344. + case 10:
  11345. + case KEY_RIGHT:
  11346. + sym_set_tristate_value(child->sym, yes);
  11347. + return;
  11348. + case 'h':
  11349. + case '?':
  11350. + show_help(child);
  11351. + active = child->sym;
  11352. + break;
  11353. + case KEY_EXIT:
  11354. + return;
  11355. + }
  11356. + }
  11357. +}
  11358. +
  11359. +static void conf_string(struct menu *menu)
  11360. +{
  11361. + const char *prompt = menu_get_prompt(menu);
  11362. +
  11363. + while (1) {
  11364. + int res;
  11365. + const char *heading;
  11366. +
  11367. + switch (sym_get_type(menu->sym)) {
  11368. + case S_INT:
  11369. + heading = _(inputbox_instructions_int);
  11370. + break;
  11371. + case S_HEX:
  11372. + heading = _(inputbox_instructions_hex);
  11373. + break;
  11374. + case S_STRING:
  11375. + heading = _(inputbox_instructions_string);
  11376. + break;
  11377. + default:
  11378. + heading = _("Internal nconf error!");
  11379. + }
  11380. + res = dialog_inputbox(main_window,
  11381. + prompt ? _(prompt) : _("Main Menu"),
  11382. + heading,
  11383. + sym_get_string_value(menu->sym),
  11384. + &dialog_input_result,
  11385. + &dialog_input_result_len);
  11386. + switch (res) {
  11387. + case 0:
  11388. + if (sym_set_string_value(menu->sym,
  11389. + dialog_input_result))
  11390. + return;
  11391. + btn_dialog(main_window,
  11392. + _("You have made an invalid entry."), 0);
  11393. + break;
  11394. + case 1:
  11395. + show_help(menu);
  11396. + break;
  11397. + case KEY_EXIT:
  11398. + return;
  11399. + }
  11400. + }
  11401. +}
  11402. +
  11403. +static void conf_load(void)
  11404. +{
  11405. + while (1) {
  11406. + int res;
  11407. + res = dialog_inputbox(main_window,
  11408. + NULL, load_config_text,
  11409. + filename,
  11410. + &dialog_input_result,
  11411. + &dialog_input_result_len);
  11412. + switch (res) {
  11413. + case 0:
  11414. + if (!dialog_input_result[0])
  11415. + return;
  11416. + if (!conf_read(dialog_input_result)) {
  11417. + set_config_filename(dialog_input_result);
  11418. + sym_set_change_count(1);
  11419. + return;
  11420. + }
  11421. + btn_dialog(main_window, _("File does not exist!"), 0);
  11422. + break;
  11423. + case 1:
  11424. + show_scroll_win(main_window,
  11425. + _("Load Alternate Configuration"),
  11426. + load_config_help);
  11427. + break;
  11428. + case KEY_EXIT:
  11429. + return;
  11430. + }
  11431. + }
  11432. +}
  11433. +
  11434. +static void conf_save(void)
  11435. +{
  11436. + while (1) {
  11437. + int res;
  11438. + res = dialog_inputbox(main_window,
  11439. + NULL, save_config_text,
  11440. + filename,
  11441. + &dialog_input_result,
  11442. + &dialog_input_result_len);
  11443. + switch (res) {
  11444. + case 0:
  11445. + if (!dialog_input_result[0])
  11446. + return;
  11447. + res = conf_write(dialog_input_result);
  11448. + if (!res) {
  11449. + set_config_filename(dialog_input_result);
  11450. + return;
  11451. + }
  11452. + btn_dialog(main_window, _("Can't create file! "
  11453. + "Probably a nonexistent directory."),
  11454. + 1, "<OK>");
  11455. + break;
  11456. + case 1:
  11457. + show_scroll_win(main_window,
  11458. + _("Save Alternate Configuration"),
  11459. + save_config_help);
  11460. + break;
  11461. + case KEY_EXIT:
  11462. + return;
  11463. + }
  11464. + }
  11465. +}
  11466. +
  11467. +void setup_windows(void)
  11468. +{
  11469. + int lines, columns;
  11470. +
  11471. + getmaxyx(stdscr, lines, columns);
  11472. +
  11473. + if (main_window != NULL)
  11474. + delwin(main_window);
  11475. +
  11476. + /* set up the menu and menu window */
  11477. + main_window = newwin(lines-2, columns-2, 2, 1);
  11478. + keypad(main_window, TRUE);
  11479. + mwin_max_lines = lines-7;
  11480. + mwin_max_cols = columns-6;
  11481. +
  11482. + /* panels order is from bottom to top */
  11483. + new_panel(main_window);
  11484. +}
  11485. +
  11486. +int main(int ac, char **av)
  11487. +{
  11488. + int lines, columns;
  11489. + char *mode;
  11490. +
  11491. + setlocale(LC_ALL, "");
  11492. + bindtextdomain(PACKAGE, LOCALEDIR);
  11493. + textdomain(PACKAGE);
  11494. +
  11495. + conf_parse(av[1]);
  11496. + conf_read(NULL);
  11497. +
  11498. + mode = getenv("NCONFIG_MODE");
  11499. + if (mode) {
  11500. + if (!strcasecmp(mode, "single_menu"))
  11501. + single_menu_mode = 1;
  11502. + }
  11503. +
  11504. + /* Initialize curses */
  11505. + initscr();
  11506. + /* set color theme */
  11507. + set_colors();
  11508. +
  11509. + cbreak();
  11510. + noecho();
  11511. + keypad(stdscr, TRUE);
  11512. + curs_set(0);
  11513. +
  11514. + getmaxyx(stdscr, lines, columns);
  11515. + if (columns < 75 || lines < 20) {
  11516. + endwin();
  11517. + printf("Your terminal should have at "
  11518. + "least 20 lines and 75 columns\n");
  11519. + return 1;
  11520. + }
  11521. +
  11522. + notimeout(stdscr, FALSE);
  11523. +#if NCURSES_REENTRANT
  11524. + set_escdelay(1);
  11525. +#else
  11526. + ESCDELAY = 1;
  11527. +#endif
  11528. +
  11529. + /* set btns menu */
  11530. + curses_menu = new_menu(curses_menu_items);
  11531. + menu_opts_off(curses_menu, O_SHOWDESC);
  11532. + menu_opts_on(curses_menu, O_SHOWMATCH);
  11533. + menu_opts_on(curses_menu, O_ONEVALUE);
  11534. + menu_opts_on(curses_menu, O_NONCYCLIC);
  11535. + menu_opts_on(curses_menu, O_IGNORECASE);
  11536. + set_menu_mark(curses_menu, " ");
  11537. + set_menu_fore(curses_menu, attributes[MAIN_MENU_FORE]);
  11538. + set_menu_back(curses_menu, attributes[MAIN_MENU_BACK]);
  11539. + set_menu_grey(curses_menu, attributes[MAIN_MENU_GREY]);
  11540. +
  11541. + set_config_filename(conf_get_configname());
  11542. + setup_windows();
  11543. +
  11544. + /* check for KEY_FUNC(1) */
  11545. + if (has_key(KEY_F(1)) == FALSE) {
  11546. + show_scroll_win(main_window,
  11547. + _("Instructions"),
  11548. + _(menu_no_f_instructions));
  11549. + }
  11550. +
  11551. + conf_set_message_callback(conf_message_callback);
  11552. + /* do the work */
  11553. + while (!global_exit) {
  11554. + conf(&rootmenu);
  11555. + if (!global_exit && do_exit() == 0)
  11556. + break;
  11557. + }
  11558. + /* ok, we are done */
  11559. + unpost_menu(curses_menu);
  11560. + free_menu(curses_menu);
  11561. + delwin(main_window);
  11562. + clear();
  11563. + refresh();
  11564. + endwin();
  11565. + return 0;
  11566. +}
  11567. +
  11568. diff -Nur uClibc-0.9.33.2/extra/config/nconf.gui.c uClibc-git/extra/config/nconf.gui.c
  11569. --- uClibc-0.9.33.2/extra/config/nconf.gui.c 1970-01-01 01:00:00.000000000 +0100
  11570. +++ uClibc-git/extra/config/nconf.gui.c 2014-07-25 20:36:04.865324519 +0200
  11571. @@ -0,0 +1,656 @@
  11572. +/*
  11573. + * Copyright (C) 2008 Nir Tzachar <nir.tzachar@gmail.com?
  11574. + * Released under the terms of the GNU GPL v2.0.
  11575. + *
  11576. + * Derived from menuconfig.
  11577. + *
  11578. + */
  11579. +#include "nconf.h"
  11580. +
  11581. +/* a list of all the different widgets we use */
  11582. +attributes_t attributes[ATTR_MAX+1] = {0};
  11583. +
  11584. +/* available colors:
  11585. + COLOR_BLACK 0
  11586. + COLOR_RED 1
  11587. + COLOR_GREEN 2
  11588. + COLOR_YELLOW 3
  11589. + COLOR_BLUE 4
  11590. + COLOR_MAGENTA 5
  11591. + COLOR_CYAN 6
  11592. + COLOR_WHITE 7
  11593. + */
  11594. +static void set_normal_colors(void)
  11595. +{
  11596. + init_pair(NORMAL, -1, -1);
  11597. + init_pair(MAIN_HEADING, COLOR_MAGENTA, -1);
  11598. +
  11599. + /* FORE is for the selected item */
  11600. + init_pair(MAIN_MENU_FORE, -1, -1);
  11601. + /* BACK for all the rest */
  11602. + init_pair(MAIN_MENU_BACK, -1, -1);
  11603. + init_pair(MAIN_MENU_GREY, -1, -1);
  11604. + init_pair(MAIN_MENU_HEADING, COLOR_GREEN, -1);
  11605. + init_pair(MAIN_MENU_BOX, COLOR_YELLOW, -1);
  11606. +
  11607. + init_pair(SCROLLWIN_TEXT, -1, -1);
  11608. + init_pair(SCROLLWIN_HEADING, COLOR_GREEN, -1);
  11609. + init_pair(SCROLLWIN_BOX, COLOR_YELLOW, -1);
  11610. +
  11611. + init_pair(DIALOG_TEXT, -1, -1);
  11612. + init_pair(DIALOG_BOX, COLOR_YELLOW, -1);
  11613. + init_pair(DIALOG_MENU_BACK, COLOR_YELLOW, -1);
  11614. + init_pair(DIALOG_MENU_FORE, COLOR_RED, -1);
  11615. +
  11616. + init_pair(INPUT_BOX, COLOR_YELLOW, -1);
  11617. + init_pair(INPUT_HEADING, COLOR_GREEN, -1);
  11618. + init_pair(INPUT_TEXT, -1, -1);
  11619. + init_pair(INPUT_FIELD, -1, -1);
  11620. +
  11621. + init_pair(FUNCTION_HIGHLIGHT, -1, -1);
  11622. + init_pair(FUNCTION_TEXT, COLOR_YELLOW, -1);
  11623. +}
  11624. +
  11625. +/* available attributes:
  11626. + A_NORMAL Normal display (no highlight)
  11627. + A_STANDOUT Best highlighting mode of the terminal.
  11628. + A_UNDERLINE Underlining
  11629. + A_REVERSE Reverse video
  11630. + A_BLINK Blinking
  11631. + A_DIM Half bright
  11632. + A_BOLD Extra bright or bold
  11633. + A_PROTECT Protected mode
  11634. + A_INVIS Invisible or blank mode
  11635. + A_ALTCHARSET Alternate character set
  11636. + A_CHARTEXT Bit-mask to extract a character
  11637. + COLOR_PAIR(n) Color-pair number n
  11638. + */
  11639. +static void normal_color_theme(void)
  11640. +{
  11641. + /* automatically add color... */
  11642. +#define mkattr(name, attr) do { \
  11643. +attributes[name] = attr | COLOR_PAIR(name); } while (0)
  11644. + mkattr(NORMAL, NORMAL);
  11645. + mkattr(MAIN_HEADING, A_BOLD | A_UNDERLINE);
  11646. +
  11647. + mkattr(MAIN_MENU_FORE, A_REVERSE);
  11648. + mkattr(MAIN_MENU_BACK, A_NORMAL);
  11649. + mkattr(MAIN_MENU_GREY, A_NORMAL);
  11650. + mkattr(MAIN_MENU_HEADING, A_BOLD);
  11651. + mkattr(MAIN_MENU_BOX, A_NORMAL);
  11652. +
  11653. + mkattr(SCROLLWIN_TEXT, A_NORMAL);
  11654. + mkattr(SCROLLWIN_HEADING, A_BOLD);
  11655. + mkattr(SCROLLWIN_BOX, A_BOLD);
  11656. +
  11657. + mkattr(DIALOG_TEXT, A_BOLD);
  11658. + mkattr(DIALOG_BOX, A_BOLD);
  11659. + mkattr(DIALOG_MENU_FORE, A_STANDOUT);
  11660. + mkattr(DIALOG_MENU_BACK, A_NORMAL);
  11661. +
  11662. + mkattr(INPUT_BOX, A_NORMAL);
  11663. + mkattr(INPUT_HEADING, A_BOLD);
  11664. + mkattr(INPUT_TEXT, A_NORMAL);
  11665. + mkattr(INPUT_FIELD, A_UNDERLINE);
  11666. +
  11667. + mkattr(FUNCTION_HIGHLIGHT, A_BOLD);
  11668. + mkattr(FUNCTION_TEXT, A_REVERSE);
  11669. +}
  11670. +
  11671. +static void no_colors_theme(void)
  11672. +{
  11673. + /* automatically add highlight, no color */
  11674. +#define mkattrn(name, attr) { attributes[name] = attr; }
  11675. +
  11676. + mkattrn(NORMAL, NORMAL);
  11677. + mkattrn(MAIN_HEADING, A_BOLD | A_UNDERLINE);
  11678. +
  11679. + mkattrn(MAIN_MENU_FORE, A_STANDOUT);
  11680. + mkattrn(MAIN_MENU_BACK, A_NORMAL);
  11681. + mkattrn(MAIN_MENU_GREY, A_NORMAL);
  11682. + mkattrn(MAIN_MENU_HEADING, A_BOLD);
  11683. + mkattrn(MAIN_MENU_BOX, A_NORMAL);
  11684. +
  11685. + mkattrn(SCROLLWIN_TEXT, A_NORMAL);
  11686. + mkattrn(SCROLLWIN_HEADING, A_BOLD);
  11687. + mkattrn(SCROLLWIN_BOX, A_BOLD);
  11688. +
  11689. + mkattrn(DIALOG_TEXT, A_NORMAL);
  11690. + mkattrn(DIALOG_BOX, A_BOLD);
  11691. + mkattrn(DIALOG_MENU_FORE, A_STANDOUT);
  11692. + mkattrn(DIALOG_MENU_BACK, A_NORMAL);
  11693. +
  11694. + mkattrn(INPUT_BOX, A_BOLD);
  11695. + mkattrn(INPUT_HEADING, A_BOLD);
  11696. + mkattrn(INPUT_TEXT, A_NORMAL);
  11697. + mkattrn(INPUT_FIELD, A_UNDERLINE);
  11698. +
  11699. + mkattrn(FUNCTION_HIGHLIGHT, A_BOLD);
  11700. + mkattrn(FUNCTION_TEXT, A_REVERSE);
  11701. +}
  11702. +
  11703. +void set_colors()
  11704. +{
  11705. + start_color();
  11706. + use_default_colors();
  11707. + set_normal_colors();
  11708. + if (has_colors()) {
  11709. + normal_color_theme();
  11710. + } else {
  11711. + /* give defaults */
  11712. + no_colors_theme();
  11713. + }
  11714. +}
  11715. +
  11716. +
  11717. +/* this changes the windows attributes !!! */
  11718. +void print_in_middle(WINDOW *win,
  11719. + int starty,
  11720. + int startx,
  11721. + int width,
  11722. + const char *string,
  11723. + chtype color)
  11724. +{ int length, x, y;
  11725. + float temp;
  11726. +
  11727. +
  11728. + if (win == NULL)
  11729. + win = stdscr;
  11730. + getyx(win, y, x);
  11731. + if (startx != 0)
  11732. + x = startx;
  11733. + if (starty != 0)
  11734. + y = starty;
  11735. + if (width == 0)
  11736. + width = 80;
  11737. +
  11738. + length = strlen(string);
  11739. + temp = (width - length) / 2;
  11740. + x = startx + (int)temp;
  11741. + (void) wattrset(win, color);
  11742. + mvwprintw(win, y, x, "%s", string);
  11743. + refresh();
  11744. +}
  11745. +
  11746. +int get_line_no(const char *text)
  11747. +{
  11748. + int i;
  11749. + int total = 1;
  11750. +
  11751. + if (!text)
  11752. + return 0;
  11753. +
  11754. + for (i = 0; text[i] != '\0'; i++)
  11755. + if (text[i] == '\n')
  11756. + total++;
  11757. + return total;
  11758. +}
  11759. +
  11760. +const char *get_line(const char *text, int line_no)
  11761. +{
  11762. + int i;
  11763. + int lines = 0;
  11764. +
  11765. + if (!text)
  11766. + return 0;
  11767. +
  11768. + for (i = 0; text[i] != '\0' && lines < line_no; i++)
  11769. + if (text[i] == '\n')
  11770. + lines++;
  11771. + return text+i;
  11772. +}
  11773. +
  11774. +int get_line_length(const char *line)
  11775. +{
  11776. + int res = 0;
  11777. + while (*line != '\0' && *line != '\n') {
  11778. + line++;
  11779. + res++;
  11780. + }
  11781. + return res;
  11782. +}
  11783. +
  11784. +/* print all lines to the window. */
  11785. +void fill_window(WINDOW *win, const char *text)
  11786. +{
  11787. + int x, y;
  11788. + int total_lines = get_line_no(text);
  11789. + int i;
  11790. +
  11791. + getmaxyx(win, y, x);
  11792. + /* do not go over end of line */
  11793. + total_lines = min(total_lines, y);
  11794. + for (i = 0; i < total_lines; i++) {
  11795. + char tmp[x+10];
  11796. + const char *line = get_line(text, i);
  11797. + int len = get_line_length(line);
  11798. + strncpy(tmp, line, min(len, x));
  11799. + tmp[len] = '\0';
  11800. + mvwprintw(win, i, 0, "%s", tmp);
  11801. + }
  11802. +}
  11803. +
  11804. +/* get the message, and buttons.
  11805. + * each button must be a char*
  11806. + * return the selected button
  11807. + *
  11808. + * this dialog is used for 2 different things:
  11809. + * 1) show a text box, no buttons.
  11810. + * 2) show a dialog, with horizontal buttons
  11811. + */
  11812. +int btn_dialog(WINDOW *main_window, const char *msg, int btn_num, ...)
  11813. +{
  11814. + va_list ap;
  11815. + char *btn;
  11816. + int btns_width = 0;
  11817. + int msg_lines = 0;
  11818. + int msg_width = 0;
  11819. + int total_width;
  11820. + int win_rows = 0;
  11821. + WINDOW *win;
  11822. + WINDOW *msg_win;
  11823. + WINDOW *menu_win;
  11824. + MENU *menu;
  11825. + ITEM *btns[btn_num+1];
  11826. + int i, x, y;
  11827. + int res = -1;
  11828. +
  11829. +
  11830. + va_start(ap, btn_num);
  11831. + for (i = 0; i < btn_num; i++) {
  11832. + btn = va_arg(ap, char *);
  11833. + btns[i] = new_item(btn, "");
  11834. + btns_width += strlen(btn)+1;
  11835. + }
  11836. + va_end(ap);
  11837. + btns[btn_num] = NULL;
  11838. +
  11839. + /* find the widest line of msg: */
  11840. + msg_lines = get_line_no(msg);
  11841. + for (i = 0; i < msg_lines; i++) {
  11842. + const char *line = get_line(msg, i);
  11843. + int len = get_line_length(line);
  11844. + if (msg_width < len)
  11845. + msg_width = len;
  11846. + }
  11847. +
  11848. + total_width = max(msg_width, btns_width);
  11849. + /* place dialog in middle of screen */
  11850. + y = (getmaxy(stdscr)-(msg_lines+4))/2;
  11851. + x = (getmaxx(stdscr)-(total_width+4))/2;
  11852. +
  11853. +
  11854. + /* create the windows */
  11855. + if (btn_num > 0)
  11856. + win_rows = msg_lines+4;
  11857. + else
  11858. + win_rows = msg_lines+2;
  11859. +
  11860. + win = newwin(win_rows, total_width+4, y, x);
  11861. + keypad(win, TRUE);
  11862. + menu_win = derwin(win, 1, btns_width, win_rows-2,
  11863. + 1+(total_width+2-btns_width)/2);
  11864. + menu = new_menu(btns);
  11865. + msg_win = derwin(win, win_rows-2, msg_width, 1,
  11866. + 1+(total_width+2-msg_width)/2);
  11867. +
  11868. + set_menu_fore(menu, attributes[DIALOG_MENU_FORE]);
  11869. + set_menu_back(menu, attributes[DIALOG_MENU_BACK]);
  11870. +
  11871. + (void) wattrset(win, attributes[DIALOG_BOX]);
  11872. + box(win, 0, 0);
  11873. +
  11874. + /* print message */
  11875. + (void) wattrset(msg_win, attributes[DIALOG_TEXT]);
  11876. + fill_window(msg_win, msg);
  11877. +
  11878. + set_menu_win(menu, win);
  11879. + set_menu_sub(menu, menu_win);
  11880. + set_menu_format(menu, 1, btn_num);
  11881. + menu_opts_off(menu, O_SHOWDESC);
  11882. + menu_opts_off(menu, O_SHOWMATCH);
  11883. + menu_opts_on(menu, O_ONEVALUE);
  11884. + menu_opts_on(menu, O_NONCYCLIC);
  11885. + set_menu_mark(menu, "");
  11886. + post_menu(menu);
  11887. +
  11888. +
  11889. + touchwin(win);
  11890. + refresh_all_windows(main_window);
  11891. + while ((res = wgetch(win))) {
  11892. + switch (res) {
  11893. + case KEY_LEFT:
  11894. + menu_driver(menu, REQ_LEFT_ITEM);
  11895. + break;
  11896. + case KEY_RIGHT:
  11897. + menu_driver(menu, REQ_RIGHT_ITEM);
  11898. + break;
  11899. + case 10: /* ENTER */
  11900. + case 27: /* ESCAPE */
  11901. + case ' ':
  11902. + case KEY_F(F_BACK):
  11903. + case KEY_F(F_EXIT):
  11904. + break;
  11905. + }
  11906. + touchwin(win);
  11907. + refresh_all_windows(main_window);
  11908. +
  11909. + if (res == 10 || res == ' ') {
  11910. + res = item_index(current_item(menu));
  11911. + break;
  11912. + } else if (res == 27 || res == KEY_F(F_BACK) ||
  11913. + res == KEY_F(F_EXIT)) {
  11914. + res = KEY_EXIT;
  11915. + break;
  11916. + }
  11917. + }
  11918. +
  11919. + unpost_menu(menu);
  11920. + free_menu(menu);
  11921. + for (i = 0; i < btn_num; i++)
  11922. + free_item(btns[i]);
  11923. +
  11924. + delwin(win);
  11925. + return res;
  11926. +}
  11927. +
  11928. +int dialog_inputbox(WINDOW *main_window,
  11929. + const char *title, const char *prompt,
  11930. + const char *init, char **resultp, int *result_len)
  11931. +{
  11932. + int prompt_lines = 0;
  11933. + int prompt_width = 0;
  11934. + WINDOW *win;
  11935. + WINDOW *prompt_win;
  11936. + WINDOW *form_win;
  11937. + PANEL *panel;
  11938. + int i, x, y;
  11939. + int res = -1;
  11940. + int cursor_position = strlen(init);
  11941. + int cursor_form_win;
  11942. + char *result = *resultp;
  11943. +
  11944. + if (strlen(init)+1 > *result_len) {
  11945. + *result_len = strlen(init)+1;
  11946. + *resultp = result = realloc(result, *result_len);
  11947. + }
  11948. +
  11949. + /* find the widest line of msg: */
  11950. + prompt_lines = get_line_no(prompt);
  11951. + for (i = 0; i < prompt_lines; i++) {
  11952. + const char *line = get_line(prompt, i);
  11953. + int len = get_line_length(line);
  11954. + prompt_width = max(prompt_width, len);
  11955. + }
  11956. +
  11957. + if (title)
  11958. + prompt_width = max(prompt_width, strlen(title));
  11959. +
  11960. + /* place dialog in middle of screen */
  11961. + y = (getmaxy(stdscr)-(prompt_lines+4))/2;
  11962. + x = (getmaxx(stdscr)-(prompt_width+4))/2;
  11963. +
  11964. + strncpy(result, init, *result_len);
  11965. +
  11966. + /* create the windows */
  11967. + win = newwin(prompt_lines+6, prompt_width+7, y, x);
  11968. + prompt_win = derwin(win, prompt_lines+1, prompt_width, 2, 2);
  11969. + form_win = derwin(win, 1, prompt_width, prompt_lines+3, 2);
  11970. + keypad(form_win, TRUE);
  11971. +
  11972. + (void) wattrset(form_win, attributes[INPUT_FIELD]);
  11973. +
  11974. + (void) wattrset(win, attributes[INPUT_BOX]);
  11975. + box(win, 0, 0);
  11976. + (void) wattrset(win, attributes[INPUT_HEADING]);
  11977. + if (title)
  11978. + mvwprintw(win, 0, 3, "%s", title);
  11979. +
  11980. + /* print message */
  11981. + (void) wattrset(prompt_win, attributes[INPUT_TEXT]);
  11982. + fill_window(prompt_win, prompt);
  11983. +
  11984. + mvwprintw(form_win, 0, 0, "%*s", prompt_width, " ");
  11985. + cursor_form_win = min(cursor_position, prompt_width-1);
  11986. + mvwprintw(form_win, 0, 0, "%s",
  11987. + result + cursor_position-cursor_form_win);
  11988. +
  11989. + /* create panels */
  11990. + panel = new_panel(win);
  11991. +
  11992. + /* show the cursor */
  11993. + curs_set(1);
  11994. +
  11995. + touchwin(win);
  11996. + refresh_all_windows(main_window);
  11997. + while ((res = wgetch(form_win))) {
  11998. + int len = strlen(result);
  11999. + switch (res) {
  12000. + case 10: /* ENTER */
  12001. + case 27: /* ESCAPE */
  12002. + case KEY_F(F_HELP):
  12003. + case KEY_F(F_EXIT):
  12004. + case KEY_F(F_BACK):
  12005. + break;
  12006. + case 127:
  12007. + case KEY_BACKSPACE:
  12008. + if (cursor_position > 0) {
  12009. + memmove(&result[cursor_position-1],
  12010. + &result[cursor_position],
  12011. + len-cursor_position+1);
  12012. + cursor_position--;
  12013. + cursor_form_win--;
  12014. + len--;
  12015. + }
  12016. + break;
  12017. + case KEY_DC:
  12018. + if (cursor_position >= 0 && cursor_position < len) {
  12019. + memmove(&result[cursor_position],
  12020. + &result[cursor_position+1],
  12021. + len-cursor_position+1);
  12022. + len--;
  12023. + }
  12024. + break;
  12025. + case KEY_UP:
  12026. + case KEY_RIGHT:
  12027. + if (cursor_position < len) {
  12028. + cursor_position++;
  12029. + cursor_form_win++;
  12030. + }
  12031. + break;
  12032. + case KEY_DOWN:
  12033. + case KEY_LEFT:
  12034. + if (cursor_position > 0) {
  12035. + cursor_position--;
  12036. + cursor_form_win--;
  12037. + }
  12038. + break;
  12039. + case KEY_HOME:
  12040. + cursor_position = 0;
  12041. + cursor_form_win = 0;
  12042. + break;
  12043. + case KEY_END:
  12044. + cursor_position = len;
  12045. + cursor_form_win = min(cursor_position, prompt_width-1);
  12046. + break;
  12047. + default:
  12048. + if ((isgraph(res) || isspace(res))) {
  12049. + /* one for new char, one for '\0' */
  12050. + if (len+2 > *result_len) {
  12051. + *result_len = len+2;
  12052. + *resultp = result = realloc(result,
  12053. + *result_len);
  12054. + }
  12055. + /* insert the char at the proper position */
  12056. + memmove(&result[cursor_position+1],
  12057. + &result[cursor_position],
  12058. + len-cursor_position+1);
  12059. + result[cursor_position] = res;
  12060. + cursor_position++;
  12061. + cursor_form_win++;
  12062. + len++;
  12063. + } else {
  12064. + mvprintw(0, 0, "unknown key: %d\n", res);
  12065. + }
  12066. + break;
  12067. + }
  12068. + if (cursor_form_win < 0)
  12069. + cursor_form_win = 0;
  12070. + else if (cursor_form_win > prompt_width-1)
  12071. + cursor_form_win = prompt_width-1;
  12072. +
  12073. + wmove(form_win, 0, 0);
  12074. + wclrtoeol(form_win);
  12075. + mvwprintw(form_win, 0, 0, "%*s", prompt_width, " ");
  12076. + mvwprintw(form_win, 0, 0, "%s",
  12077. + result + cursor_position-cursor_form_win);
  12078. + wmove(form_win, 0, cursor_form_win);
  12079. + touchwin(win);
  12080. + refresh_all_windows(main_window);
  12081. +
  12082. + if (res == 10) {
  12083. + res = 0;
  12084. + break;
  12085. + } else if (res == 27 || res == KEY_F(F_BACK) ||
  12086. + res == KEY_F(F_EXIT)) {
  12087. + res = KEY_EXIT;
  12088. + break;
  12089. + } else if (res == KEY_F(F_HELP)) {
  12090. + res = 1;
  12091. + break;
  12092. + }
  12093. + }
  12094. +
  12095. + /* hide the cursor */
  12096. + curs_set(0);
  12097. + del_panel(panel);
  12098. + delwin(prompt_win);
  12099. + delwin(form_win);
  12100. + delwin(win);
  12101. + return res;
  12102. +}
  12103. +
  12104. +/* refresh all windows in the correct order */
  12105. +void refresh_all_windows(WINDOW *main_window)
  12106. +{
  12107. + update_panels();
  12108. + touchwin(main_window);
  12109. + refresh();
  12110. +}
  12111. +
  12112. +/* layman's scrollable window... */
  12113. +void show_scroll_win(WINDOW *main_window,
  12114. + const char *title,
  12115. + const char *text)
  12116. +{
  12117. + int res;
  12118. + int total_lines = get_line_no(text);
  12119. + int x, y, lines, columns;
  12120. + int start_x = 0, start_y = 0;
  12121. + int text_lines = 0, text_cols = 0;
  12122. + int total_cols = 0;
  12123. + int win_cols = 0;
  12124. + int win_lines = 0;
  12125. + int i = 0;
  12126. + WINDOW *win;
  12127. + WINDOW *pad;
  12128. + PANEL *panel;
  12129. +
  12130. + getmaxyx(stdscr, lines, columns);
  12131. +
  12132. + /* find the widest line of msg: */
  12133. + total_lines = get_line_no(text);
  12134. + for (i = 0; i < total_lines; i++) {
  12135. + const char *line = get_line(text, i);
  12136. + int len = get_line_length(line);
  12137. + total_cols = max(total_cols, len+2);
  12138. + }
  12139. +
  12140. + /* create the pad */
  12141. + pad = newpad(total_lines+10, total_cols+10);
  12142. + (void) wattrset(pad, attributes[SCROLLWIN_TEXT]);
  12143. + fill_window(pad, text);
  12144. +
  12145. + win_lines = min(total_lines+4, lines-2);
  12146. + win_cols = min(total_cols+2, columns-2);
  12147. + text_lines = max(win_lines-4, 0);
  12148. + text_cols = max(win_cols-2, 0);
  12149. +
  12150. + /* place window in middle of screen */
  12151. + y = (lines-win_lines)/2;
  12152. + x = (columns-win_cols)/2;
  12153. +
  12154. + win = newwin(win_lines, win_cols, y, x);
  12155. + keypad(win, TRUE);
  12156. + /* show the help in the help window, and show the help panel */
  12157. + (void) wattrset(win, attributes[SCROLLWIN_BOX]);
  12158. + box(win, 0, 0);
  12159. + (void) wattrset(win, attributes[SCROLLWIN_HEADING]);
  12160. + mvwprintw(win, 0, 3, " %s ", title);
  12161. + panel = new_panel(win);
  12162. +
  12163. + /* handle scrolling */
  12164. + do {
  12165. +
  12166. + copywin(pad, win, start_y, start_x, 2, 2, text_lines,
  12167. + text_cols, 0);
  12168. + print_in_middle(win,
  12169. + text_lines+2,
  12170. + 0,
  12171. + text_cols,
  12172. + "<OK>",
  12173. + attributes[DIALOG_MENU_FORE]);
  12174. + wrefresh(win);
  12175. +
  12176. + res = wgetch(win);
  12177. + switch (res) {
  12178. + case KEY_NPAGE:
  12179. + case ' ':
  12180. + case 'd':
  12181. + start_y += text_lines-2;
  12182. + break;
  12183. + case KEY_PPAGE:
  12184. + case 'u':
  12185. + start_y -= text_lines+2;
  12186. + break;
  12187. + case KEY_HOME:
  12188. + start_y = 0;
  12189. + break;
  12190. + case KEY_END:
  12191. + start_y = total_lines-text_lines;
  12192. + break;
  12193. + case KEY_DOWN:
  12194. + case 'j':
  12195. + start_y++;
  12196. + break;
  12197. + case KEY_UP:
  12198. + case 'k':
  12199. + start_y--;
  12200. + break;
  12201. + case KEY_LEFT:
  12202. + case 'h':
  12203. + start_x--;
  12204. + break;
  12205. + case KEY_RIGHT:
  12206. + case 'l':
  12207. + start_x++;
  12208. + break;
  12209. + }
  12210. + if (res == 10 || res == 27 || res == 'q' ||
  12211. + res == KEY_F(F_HELP) || res == KEY_F(F_BACK) ||
  12212. + res == KEY_F(F_EXIT))
  12213. + break;
  12214. + if (start_y < 0)
  12215. + start_y = 0;
  12216. + if (start_y >= total_lines-text_lines)
  12217. + start_y = total_lines-text_lines;
  12218. + if (start_x < 0)
  12219. + start_x = 0;
  12220. + if (start_x >= total_cols-text_cols)
  12221. + start_x = total_cols-text_cols;
  12222. + } while (res);
  12223. +
  12224. + del_panel(panel);
  12225. + delwin(win);
  12226. + refresh_all_windows(main_window);
  12227. +}
  12228. diff -Nur uClibc-0.9.33.2/extra/config/nconf.h uClibc-git/extra/config/nconf.h
  12229. --- uClibc-0.9.33.2/extra/config/nconf.h 1970-01-01 01:00:00.000000000 +0100
  12230. +++ uClibc-git/extra/config/nconf.h 2014-07-25 20:36:04.865324519 +0200
  12231. @@ -0,0 +1,96 @@
  12232. +/*
  12233. + * Copyright (C) 2008 Nir Tzachar <nir.tzachar@gmail.com?
  12234. + * Released under the terms of the GNU GPL v2.0.
  12235. + *
  12236. + * Derived from menuconfig.
  12237. + *
  12238. + */
  12239. +
  12240. +#include <ctype.h>
  12241. +#include <errno.h>
  12242. +#include <fcntl.h>
  12243. +#include <limits.h>
  12244. +#include <stdarg.h>
  12245. +#include <stdlib.h>
  12246. +#include <string.h>
  12247. +#include <unistd.h>
  12248. +#include <locale.h>
  12249. +#include <curses.h>
  12250. +#include <menu.h>
  12251. +#include <panel.h>
  12252. +#include <form.h>
  12253. +
  12254. +#include <stdio.h>
  12255. +#include <time.h>
  12256. +#include <sys/time.h>
  12257. +
  12258. +#include "ncurses.h"
  12259. +
  12260. +#define max(a, b) ({\
  12261. + typeof(a) _a = a;\
  12262. + typeof(b) _b = b;\
  12263. + _a > _b ? _a : _b; })
  12264. +
  12265. +#define min(a, b) ({\
  12266. + typeof(a) _a = a;\
  12267. + typeof(b) _b = b;\
  12268. + _a < _b ? _a : _b; })
  12269. +
  12270. +typedef enum {
  12271. + NORMAL = 1,
  12272. + MAIN_HEADING,
  12273. + MAIN_MENU_BOX,
  12274. + MAIN_MENU_FORE,
  12275. + MAIN_MENU_BACK,
  12276. + MAIN_MENU_GREY,
  12277. + MAIN_MENU_HEADING,
  12278. + SCROLLWIN_TEXT,
  12279. + SCROLLWIN_HEADING,
  12280. + SCROLLWIN_BOX,
  12281. + DIALOG_TEXT,
  12282. + DIALOG_MENU_FORE,
  12283. + DIALOG_MENU_BACK,
  12284. + DIALOG_BOX,
  12285. + INPUT_BOX,
  12286. + INPUT_HEADING,
  12287. + INPUT_TEXT,
  12288. + INPUT_FIELD,
  12289. + FUNCTION_TEXT,
  12290. + FUNCTION_HIGHLIGHT,
  12291. + ATTR_MAX
  12292. +} attributes_t;
  12293. +extern attributes_t attributes[];
  12294. +
  12295. +typedef enum {
  12296. + F_HELP = 1,
  12297. + F_SYMBOL = 2,
  12298. + F_INSTS = 3,
  12299. + F_CONF = 4,
  12300. + F_BACK = 5,
  12301. + F_SAVE = 6,
  12302. + F_LOAD = 7,
  12303. + F_SEARCH = 8,
  12304. + F_EXIT = 9,
  12305. +} function_key;
  12306. +
  12307. +void set_colors(void);
  12308. +
  12309. +/* this changes the windows attributes !!! */
  12310. +void print_in_middle(WINDOW *win,
  12311. + int starty,
  12312. + int startx,
  12313. + int width,
  12314. + const char *string,
  12315. + chtype color);
  12316. +int get_line_length(const char *line);
  12317. +int get_line_no(const char *text);
  12318. +const char *get_line(const char *text, int line_no);
  12319. +void fill_window(WINDOW *win, const char *text);
  12320. +int btn_dialog(WINDOW *main_window, const char *msg, int btn_num, ...);
  12321. +int dialog_inputbox(WINDOW *main_window,
  12322. + const char *title, const char *prompt,
  12323. + const char *init, char **resultp, int *result_len);
  12324. +void refresh_all_windows(WINDOW *main_window);
  12325. +void show_scroll_win(WINDOW *main_window,
  12326. + const char *title,
  12327. + const char *text);
  12328. diff -Nur uClibc-0.9.33.2/extra/config/qconf.cc uClibc-git/extra/config/qconf.cc
  12329. --- uClibc-0.9.33.2/extra/config/qconf.cc 2012-05-15 09:20:09.000000000 +0200
  12330. +++ uClibc-git/extra/config/qconf.cc 2014-07-25 20:36:04.865324519 +0200
  12331. @@ -3,24 +3,43 @@
  12332. * Released under the terms of the GNU GPL v2.0.
  12333. */
  12334. -#include <qapplication.h>
  12335. +#include <qglobal.h>
  12336. +
  12337. +#if QT_VERSION < 0x040000
  12338. +#include <stddef.h>
  12339. #include <qmainwindow.h>
  12340. +#include <qvbox.h>
  12341. +#include <qvaluelist.h>
  12342. +#include <qtextbrowser.h>
  12343. +#include <qaction.h>
  12344. +#include <qheader.h>
  12345. +#include <qfiledialog.h>
  12346. +#include <qdragobject.h>
  12347. +#include <qpopupmenu.h>
  12348. +#else
  12349. +#include <q3mainwindow.h>
  12350. +#include <q3vbox.h>
  12351. +#include <q3valuelist.h>
  12352. +#include <q3textbrowser.h>
  12353. +#include <q3action.h>
  12354. +#include <q3header.h>
  12355. +#include <q3filedialog.h>
  12356. +#include <q3dragobject.h>
  12357. +#include <q3popupmenu.h>
  12358. +#endif
  12359. +
  12360. +#include <qapplication.h>
  12361. +#include <qdesktopwidget.h>
  12362. #include <qtoolbar.h>
  12363. #include <qlayout.h>
  12364. -#include <qvbox.h>
  12365. #include <qsplitter.h>
  12366. -#include <qlistview.h>
  12367. -#include <qtextbrowser.h>
  12368. #include <qlineedit.h>
  12369. #include <qlabel.h>
  12370. #include <qpushbutton.h>
  12371. #include <qmenubar.h>
  12372. #include <qmessagebox.h>
  12373. -#include <qaction.h>
  12374. -#include <qheader.h>
  12375. -#include <qfiledialog.h>
  12376. -#include <qdragobject.h>
  12377. #include <qregexp.h>
  12378. +#include <qevent.h>
  12379. #include <stdlib.h>
  12380. @@ -38,7 +57,7 @@
  12381. static QApplication *configApp;
  12382. static ConfigSettings *configSettings;
  12383. -QAction *ConfigMainWindow::saveAction;
  12384. +Q3Action *ConfigMainWindow::saveAction;
  12385. static inline QString qgettext(const char* str)
  12386. {
  12387. @@ -53,15 +72,14 @@
  12388. /**
  12389. * Reads a list of integer values from the application settings.
  12390. */
  12391. -QValueList<int> ConfigSettings::readSizes(const QString& key, bool *ok)
  12392. +Q3ValueList<int> ConfigSettings::readSizes(const QString& key, bool *ok)
  12393. {
  12394. - QValueList<int> result;
  12395. + Q3ValueList<int> result;
  12396. QStringList entryList = readListEntry(key, ok);
  12397. - if (ok) {
  12398. - QStringList::Iterator it;
  12399. - for (it = entryList.begin(); it != entryList.end(); ++it)
  12400. - result.push_back((*it).toInt());
  12401. - }
  12402. + QStringList::Iterator it;
  12403. +
  12404. + for (it = entryList.begin(); it != entryList.end(); ++it)
  12405. + result.push_back((*it).toInt());
  12406. return result;
  12407. }
  12408. @@ -69,10 +87,10 @@
  12409. /**
  12410. * Writes a list of integer values to the application settings.
  12411. */
  12412. -bool ConfigSettings::writeSizes(const QString& key, const QValueList<int>& value)
  12413. +bool ConfigSettings::writeSizes(const QString& key, const Q3ValueList<int>& value)
  12414. {
  12415. QStringList stringList;
  12416. - QValueList<int>::ConstIterator it;
  12417. + Q3ValueList<int>::ConstIterator it;
  12418. for (it = value.begin(); it != value.end(); ++it)
  12419. stringList.push_back(QString::number(*it));
  12420. @@ -80,7 +98,6 @@
  12421. }
  12422. -#if QT_VERSION >= 300
  12423. /*
  12424. * set the new data
  12425. * TODO check the value
  12426. @@ -91,7 +108,6 @@
  12427. sym_set_string_value(menu->sym, text(dataColIdx).latin1());
  12428. listView()->updateList(this);
  12429. }
  12430. -#endif
  12431. /*
  12432. * update the displayed of a menu entry
  12433. @@ -148,7 +164,7 @@
  12434. case S_TRISTATE:
  12435. char ch;
  12436. - if (!sym_is_changable(sym) && !list->showAll) {
  12437. + if (!sym_is_changable(sym) && list->optMode == normalOpt) {
  12438. setPixmap(promptColIdx, 0);
  12439. setText(noColIdx, QString::null);
  12440. setText(modColIdx, QString::null);
  12441. @@ -195,11 +211,9 @@
  12442. data = sym_get_string_value(sym);
  12443. -#if QT_VERSION >= 300
  12444. int i = list->mapIdx(dataColIdx);
  12445. if (i >= 0)
  12446. setRenameEnabled(i, TRUE);
  12447. -#endif
  12448. setText(dataColIdx, data);
  12449. if (type == S_STRING)
  12450. prompt = QString("%1: %2").arg(prompt).arg(data);
  12451. @@ -297,10 +311,10 @@
  12452. void ConfigLineEdit::keyPressEvent(QKeyEvent* e)
  12453. {
  12454. switch (e->key()) {
  12455. - case Key_Escape:
  12456. + case Qt::Key_Escape:
  12457. break;
  12458. - case Key_Return:
  12459. - case Key_Enter:
  12460. + case Qt::Key_Return:
  12461. + case Qt::Key_Enter:
  12462. sym_set_string_value(item->menu->sym, text().latin1());
  12463. parent()->updateList(item);
  12464. break;
  12465. @@ -319,7 +333,7 @@
  12466. symbolYesPix(xpm_symbol_yes), symbolModPix(xpm_symbol_mod), symbolNoPix(xpm_symbol_no),
  12467. choiceYesPix(xpm_choice_yes), choiceNoPix(xpm_choice_no),
  12468. menuPix(xpm_menu), menuInvPix(xpm_menu_inv), menuBackPix(xpm_menuback), voidPix(xpm_void),
  12469. - showAll(false), showName(false), showRange(false), showData(false),
  12470. + showName(false), showRange(false), showData(false), optMode(normalOpt),
  12471. rootEntry(0), headerPopup(0)
  12472. {
  12473. int i;
  12474. @@ -336,10 +350,10 @@
  12475. if (name) {
  12476. configSettings->beginGroup(name);
  12477. - showAll = configSettings->readBoolEntry("/showAll", false);
  12478. showName = configSettings->readBoolEntry("/showName", false);
  12479. showRange = configSettings->readBoolEntry("/showRange", false);
  12480. showData = configSettings->readBoolEntry("/showData", false);
  12481. + optMode = (enum optionMode)configSettings->readNumEntry("/optionMode", false);
  12482. configSettings->endGroup();
  12483. connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings()));
  12484. }
  12485. @@ -351,6 +365,17 @@
  12486. reinit();
  12487. }
  12488. +bool ConfigList::menuSkip(struct menu *menu)
  12489. +{
  12490. + if (optMode == normalOpt && menu_is_visible(menu))
  12491. + return false;
  12492. + if (optMode == promptOpt && menu_has_prompt(menu))
  12493. + return false;
  12494. + if (optMode == allOpt)
  12495. + return false;
  12496. + return true;
  12497. +}
  12498. +
  12499. void ConfigList::reinit(void)
  12500. {
  12501. removeColumn(dataColIdx);
  12502. @@ -379,7 +404,7 @@
  12503. configSettings->writeEntry("/showName", showName);
  12504. configSettings->writeEntry("/showRange", showRange);
  12505. configSettings->writeEntry("/showData", showData);
  12506. - configSettings->writeEntry("/showAll", showAll);
  12507. + configSettings->writeEntry("/optionMode", (int)optMode);
  12508. configSettings->endGroup();
  12509. }
  12510. }
  12511. @@ -421,7 +446,7 @@
  12512. if (!rootEntry) {
  12513. if (mode != listMode)
  12514. goto update;
  12515. - QListViewItemIterator it(this);
  12516. + Q3ListViewItemIterator it(this);
  12517. ConfigItem* item;
  12518. for (; it.current(); ++it) {
  12519. @@ -516,11 +541,9 @@
  12520. case S_INT:
  12521. case S_HEX:
  12522. case S_STRING:
  12523. -#if QT_VERSION >= 300
  12524. if (colMap[dataColIdx] >= 0)
  12525. item->startRename(colMap[dataColIdx]);
  12526. else
  12527. -#endif
  12528. parent()->lineEdit->show(item);
  12529. break;
  12530. }
  12531. @@ -552,7 +575,7 @@
  12532. return;
  12533. setRootMenu(menu_get_parent_menu(rootEntry->parent));
  12534. - QListViewItemIterator it(this);
  12535. + Q3ListViewItemIterator it(this);
  12536. for (; (item = (ConfigItem*)it.current()); it++) {
  12537. if (item->menu == oldroot) {
  12538. setCurrentItem(item);
  12539. @@ -605,7 +628,7 @@
  12540. }
  12541. visible = menu_is_visible(child);
  12542. - if (showAll || visible) {
  12543. + if (!menuSkip(child)) {
  12544. if (!child->sym && !child->list && !child->prompt)
  12545. continue;
  12546. if (!item || item->menu != child)
  12547. @@ -634,12 +657,12 @@
  12548. void ConfigList::keyPressEvent(QKeyEvent* ev)
  12549. {
  12550. - QListViewItem* i = currentItem();
  12551. + Q3ListViewItem* i = currentItem();
  12552. ConfigItem* item;
  12553. struct menu *menu;
  12554. enum prop_type type;
  12555. - if (ev->key() == Key_Escape && mode != fullMode && mode != listMode) {
  12556. + if (ev->key() == Qt::Key_Escape && mode != fullMode && mode != listMode) {
  12557. emit parentSelected();
  12558. ev->accept();
  12559. return;
  12560. @@ -652,8 +675,8 @@
  12561. item = (ConfigItem*)i;
  12562. switch (ev->key()) {
  12563. - case Key_Return:
  12564. - case Key_Enter:
  12565. + case Qt::Key_Return:
  12566. + case Qt::Key_Enter:
  12567. if (item->goParent) {
  12568. emit parentSelected();
  12569. break;
  12570. @@ -667,16 +690,16 @@
  12571. emit menuSelected(menu);
  12572. break;
  12573. }
  12574. - case Key_Space:
  12575. + case Qt::Key_Space:
  12576. changeValue(item);
  12577. break;
  12578. - case Key_N:
  12579. + case Qt::Key_N:
  12580. setValue(item, no);
  12581. break;
  12582. - case Key_M:
  12583. + case Qt::Key_M:
  12584. setValue(item, mod);
  12585. break;
  12586. - case Key_Y:
  12587. + case Qt::Key_Y:
  12588. setValue(item, yes);
  12589. break;
  12590. default:
  12591. @@ -800,10 +823,10 @@
  12592. {
  12593. if (e->y() <= header()->geometry().bottom()) {
  12594. if (!headerPopup) {
  12595. - QAction *action;
  12596. + Q3Action *action;
  12597. - headerPopup = new QPopupMenu(this);
  12598. - action = new QAction(NULL, _("Show Name"), 0, this);
  12599. + headerPopup = new Q3PopupMenu(this);
  12600. + action = new Q3Action(NULL, _("Show Name"), 0, this);
  12601. action->setToggleAction(TRUE);
  12602. connect(action, SIGNAL(toggled(bool)),
  12603. parent(), SLOT(setShowName(bool)));
  12604. @@ -811,7 +834,7 @@
  12605. action, SLOT(setOn(bool)));
  12606. action->setOn(showName);
  12607. action->addTo(headerPopup);
  12608. - action = new QAction(NULL, _("Show Range"), 0, this);
  12609. + action = new Q3Action(NULL, _("Show Range"), 0, this);
  12610. action->setToggleAction(TRUE);
  12611. connect(action, SIGNAL(toggled(bool)),
  12612. parent(), SLOT(setShowRange(bool)));
  12613. @@ -819,7 +842,7 @@
  12614. action, SLOT(setOn(bool)));
  12615. action->setOn(showRange);
  12616. action->addTo(headerPopup);
  12617. - action = new QAction(NULL, _("Show Data"), 0, this);
  12618. + action = new Q3Action(NULL, _("Show Data"), 0, this);
  12619. action->setToggleAction(TRUE);
  12620. connect(action, SIGNAL(toggled(bool)),
  12621. parent(), SLOT(setShowData(bool)));
  12622. @@ -834,7 +857,10 @@
  12623. e->ignore();
  12624. }
  12625. -ConfigView* ConfigView::viewList;
  12626. +ConfigView*ConfigView::viewList;
  12627. +QAction *ConfigView::showNormalAction;
  12628. +QAction *ConfigView::showAllAction;
  12629. +QAction *ConfigView::showPromptAction;
  12630. ConfigView::ConfigView(QWidget* parent, const char *name)
  12631. : Parent(parent, name)
  12632. @@ -859,13 +885,16 @@
  12633. }
  12634. }
  12635. -void ConfigView::setShowAll(bool b)
  12636. +void ConfigView::setOptionMode(QAction *act)
  12637. {
  12638. - if (list->showAll != b) {
  12639. - list->showAll = b;
  12640. - list->updateListAll();
  12641. - emit showAllChanged(b);
  12642. - }
  12643. + if (act == showNormalAction)
  12644. + list->optMode = normalOpt;
  12645. + else if (act == showAllAction)
  12646. + list->optMode = allOpt;
  12647. + else
  12648. + list->optMode = promptOpt;
  12649. +
  12650. + list->updateListAll();
  12651. }
  12652. void ConfigView::setShowName(bool b)
  12653. @@ -897,7 +926,7 @@
  12654. void ConfigList::setAllOpen(bool open)
  12655. {
  12656. - QListViewItemIterator it(this);
  12657. + Q3ListViewItemIterator it(this);
  12658. for (; it.current(); it++)
  12659. it.current()->setOpen(open);
  12660. @@ -920,7 +949,7 @@
  12661. }
  12662. ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
  12663. - : Parent(parent, name), menu(0), sym(0)
  12664. + : Parent(parent, name), sym(0), _menu(0)
  12665. {
  12666. if (name) {
  12667. configSettings->beginGroup(name);
  12668. @@ -943,7 +972,7 @@
  12669. {
  12670. if (_showDebug != b) {
  12671. _showDebug = b;
  12672. - if (menu)
  12673. + if (_menu)
  12674. menuInfo();
  12675. else if (sym)
  12676. symbolInfo();
  12677. @@ -953,44 +982,16 @@
  12678. void ConfigInfoView::setInfo(struct menu *m)
  12679. {
  12680. - if (menu == m)
  12681. + if (_menu == m)
  12682. return;
  12683. - menu = m;
  12684. + _menu = m;
  12685. sym = NULL;
  12686. - if (!menu)
  12687. + if (!_menu)
  12688. clear();
  12689. else
  12690. menuInfo();
  12691. }
  12692. -void ConfigInfoView::setSource(const QString& name)
  12693. -{
  12694. - const char *p = name.latin1();
  12695. -
  12696. - menu = NULL;
  12697. - sym = NULL;
  12698. -
  12699. - switch (p[0]) {
  12700. - case 'm':
  12701. - struct menu *m;
  12702. -
  12703. - if (sscanf(p, "m%p", &m) == 1 && menu != m) {
  12704. - menu = m;
  12705. - menuInfo();
  12706. - emit menuSelected(menu);
  12707. - }
  12708. - break;
  12709. - case 's':
  12710. - struct symbol *s;
  12711. -
  12712. - if (sscanf(p, "s%p", &s) == 1 && sym != s) {
  12713. - sym = s;
  12714. - symbolInfo();
  12715. - }
  12716. - break;
  12717. - }
  12718. -}
  12719. -
  12720. void ConfigInfoView::symbolInfo(void)
  12721. {
  12722. QString str;
  12723. @@ -1012,11 +1013,11 @@
  12724. struct symbol* sym;
  12725. QString head, debug, help;
  12726. - sym = menu->sym;
  12727. + sym = _menu->sym;
  12728. if (sym) {
  12729. - if (menu->prompt) {
  12730. + if (_menu->prompt) {
  12731. head += "<big><b>";
  12732. - head += print_filter(_(menu->prompt->text));
  12733. + head += print_filter(_(_menu->prompt->text));
  12734. head += "</b></big>";
  12735. if (sym->name) {
  12736. head += " (";
  12737. @@ -1041,26 +1042,24 @@
  12738. if (showDebug())
  12739. debug = debug_info(sym);
  12740. - help = menu_get_help(menu);
  12741. - /* Gettextize if the help text not empty */
  12742. - if (help.isEmpty())
  12743. - help = print_filter(menu_get_help(menu));
  12744. - else
  12745. - help = print_filter(_(menu_get_help(menu)));
  12746. - } else if (menu->prompt) {
  12747. + struct gstr help_gstr = str_new();
  12748. + menu_get_ext_help(_menu, &help_gstr);
  12749. + help = print_filter(str_get(&help_gstr));
  12750. + str_free(&help_gstr);
  12751. + } else if (_menu->prompt) {
  12752. head += "<big><b>";
  12753. - head += print_filter(_(menu->prompt->text));
  12754. + head += print_filter(_(_menu->prompt->text));
  12755. head += "</b></big><br><br>";
  12756. if (showDebug()) {
  12757. - if (menu->prompt->visible.expr) {
  12758. + if (_menu->prompt->visible.expr) {
  12759. debug += "&nbsp;&nbsp;dep: ";
  12760. - expr_print(menu->prompt->visible.expr, expr_print_help, &debug, E_NONE);
  12761. + expr_print(_menu->prompt->visible.expr, expr_print_help, &debug, E_NONE);
  12762. debug += "<br><br>";
  12763. }
  12764. }
  12765. }
  12766. if (showDebug())
  12767. - debug += QString().sprintf("defined at %s:%d<br><br>", menu->file->name, menu->lineno);
  12768. + debug += QString().sprintf("defined at %s:%d<br><br>", _menu->file->name, _menu->lineno);
  12769. setText(head + debug + help);
  12770. }
  12771. @@ -1163,10 +1162,10 @@
  12772. *text += str2;
  12773. }
  12774. -QPopupMenu* ConfigInfoView::createPopupMenu(const QPoint& pos)
  12775. +Q3PopupMenu* ConfigInfoView::createPopupMenu(const QPoint& pos)
  12776. {
  12777. - QPopupMenu* popup = Parent::createPopupMenu(pos);
  12778. - QAction* action = new QAction(NULL, _("Show Debug Info"), 0, popup);
  12779. + Q3PopupMenu* popup = Parent::createPopupMenu(pos);
  12780. + Q3Action* action = new Q3Action(NULL, _("Show Debug Info"), 0, popup);
  12781. action->setToggleAction(TRUE);
  12782. connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool)));
  12783. connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool)));
  12784. @@ -1199,7 +1198,7 @@
  12785. layout1->addLayout(layout2);
  12786. split = new QSplitter(this);
  12787. - split->setOrientation(QSplitter::Vertical);
  12788. + split->setOrientation(Qt::Vertical);
  12789. list = new ConfigView(split, name);
  12790. list->list->mode = listMode;
  12791. info = new ConfigInfoView(split, name);
  12792. @@ -1223,7 +1222,7 @@
  12793. y = configSettings->readNumEntry("/window y", 0, &ok);
  12794. if (ok)
  12795. move(x, y);
  12796. - QValueList<int> sizes = configSettings->readSizes("/split", &ok);
  12797. + Q3ValueList<int> sizes = configSettings->readSizes("/split", &ok);
  12798. if (ok)
  12799. split->setSizes(sizes);
  12800. configSettings->endGroup();
  12801. @@ -1275,9 +1274,15 @@
  12802. int x, y, width, height;
  12803. char title[256];
  12804. - QWidget *d = configApp->desktop();
  12805. - snprintf(title, sizeof(title), _("uClibc v%s Configuration"),
  12806. - getenv("VERSION"));
  12807. + QDesktopWidget *d = configApp->desktop();
  12808. + snprintf(title, sizeof(title), "%s%s",
  12809. + rootmenu.prompt->text,
  12810. +#if QT_VERSION < 0x040000
  12811. + " (Qt3)"
  12812. +#else
  12813. + ""
  12814. +#endif
  12815. + );
  12816. setCaption(title);
  12817. width = configSettings->readNumEntry("/window width", d->width() - 64);
  12818. @@ -1290,14 +1295,14 @@
  12819. move(x, y);
  12820. split1 = new QSplitter(this);
  12821. - split1->setOrientation(QSplitter::Horizontal);
  12822. + split1->setOrientation(Qt::Horizontal);
  12823. setCentralWidget(split1);
  12824. menuView = new ConfigView(split1, "menu");
  12825. menuList = menuView->list;
  12826. split2 = new QSplitter(split1);
  12827. - split2->setOrientation(QSplitter::Vertical);
  12828. + split2->setOrientation(Qt::Vertical);
  12829. // create config tree
  12830. configView = new ConfigView(split2, "config");
  12831. @@ -1310,60 +1315,79 @@
  12832. configList->setFocus();
  12833. menu = menuBar();
  12834. - toolBar = new QToolBar("Tools", this);
  12835. + toolBar = new Q3ToolBar("Tools", this);
  12836. - backAction = new QAction("Back", QPixmap(xpm_back), _("Back"), 0, this);
  12837. + backAction = new Q3Action("Back", QPixmap(xpm_back), _("Back"), 0, this);
  12838. connect(backAction, SIGNAL(activated()), SLOT(goBack()));
  12839. backAction->setEnabled(FALSE);
  12840. - QAction *quitAction = new QAction("Quit", _("&Quit"), CTRL+Key_Q, this);
  12841. + Q3Action *quitAction = new Q3Action("Quit", _("&Quit"), Qt::CTRL + Qt::Key_Q, this);
  12842. connect(quitAction, SIGNAL(activated()), SLOT(close()));
  12843. - QAction *loadAction = new QAction("Load", QPixmap(xpm_load), _("&Load"), CTRL+Key_L, this);
  12844. + Q3Action *loadAction = new Q3Action("Load", QPixmap(xpm_load), _("&Load"), Qt::CTRL + Qt::Key_L, this);
  12845. connect(loadAction, SIGNAL(activated()), SLOT(loadConfig()));
  12846. - saveAction = new QAction("Save", QPixmap(xpm_save), _("&Save"), CTRL+Key_S, this);
  12847. + saveAction = new Q3Action("Save", QPixmap(xpm_save), _("&Save"), Qt::CTRL + Qt::Key_S, this);
  12848. connect(saveAction, SIGNAL(activated()), SLOT(saveConfig()));
  12849. conf_set_changed_callback(conf_changed);
  12850. // Set saveAction's initial state
  12851. conf_changed();
  12852. - QAction *saveAsAction = new QAction("Save As...", _("Save &As..."), 0, this);
  12853. + Q3Action *saveAsAction = new Q3Action("Save As...", _("Save &As..."), 0, this);
  12854. connect(saveAsAction, SIGNAL(activated()), SLOT(saveConfigAs()));
  12855. - QAction *searchAction = new QAction("Find", _("&Find"), CTRL+Key_F, this);
  12856. + Q3Action *searchAction = new Q3Action("Find", _("&Find"), Qt::CTRL + Qt::Key_F, this);
  12857. connect(searchAction, SIGNAL(activated()), SLOT(searchConfig()));
  12858. - QAction *singleViewAction = new QAction("Single View", QPixmap(xpm_single_view), _("Single View"), 0, this);
  12859. + Q3Action *singleViewAction = new Q3Action("Single View", QPixmap(xpm_single_view), _("Single View"), 0, this);
  12860. connect(singleViewAction, SIGNAL(activated()), SLOT(showSingleView()));
  12861. - QAction *splitViewAction = new QAction("Split View", QPixmap(xpm_split_view), _("Split View"), 0, this);
  12862. + Q3Action *splitViewAction = new Q3Action("Split View", QPixmap(xpm_split_view), _("Split View"), 0, this);
  12863. connect(splitViewAction, SIGNAL(activated()), SLOT(showSplitView()));
  12864. - QAction *fullViewAction = new QAction("Full View", QPixmap(xpm_tree_view), _("Full View"), 0, this);
  12865. + Q3Action *fullViewAction = new Q3Action("Full View", QPixmap(xpm_tree_view), _("Full View"), 0, this);
  12866. connect(fullViewAction, SIGNAL(activated()), SLOT(showFullView()));
  12867. - QAction *showNameAction = new QAction(NULL, _("Show Name"), 0, this);
  12868. + Q3Action *showNameAction = new Q3Action(NULL, _("Show Name"), 0, this);
  12869. showNameAction->setToggleAction(TRUE);
  12870. connect(showNameAction, SIGNAL(toggled(bool)), configView, SLOT(setShowName(bool)));
  12871. connect(configView, SIGNAL(showNameChanged(bool)), showNameAction, SLOT(setOn(bool)));
  12872. showNameAction->setOn(configView->showName());
  12873. - QAction *showRangeAction = new QAction(NULL, _("Show Range"), 0, this);
  12874. + Q3Action *showRangeAction = new Q3Action(NULL, _("Show Range"), 0, this);
  12875. showRangeAction->setToggleAction(TRUE);
  12876. connect(showRangeAction, SIGNAL(toggled(bool)), configView, SLOT(setShowRange(bool)));
  12877. connect(configView, SIGNAL(showRangeChanged(bool)), showRangeAction, SLOT(setOn(bool)));
  12878. showRangeAction->setOn(configList->showRange);
  12879. - QAction *showDataAction = new QAction(NULL, _("Show Data"), 0, this);
  12880. + Q3Action *showDataAction = new Q3Action(NULL, _("Show Data"), 0, this);
  12881. showDataAction->setToggleAction(TRUE);
  12882. connect(showDataAction, SIGNAL(toggled(bool)), configView, SLOT(setShowData(bool)));
  12883. connect(configView, SIGNAL(showDataChanged(bool)), showDataAction, SLOT(setOn(bool)));
  12884. showDataAction->setOn(configList->showData);
  12885. - QAction *showAllAction = new QAction(NULL, _("Show All Options"), 0, this);
  12886. - showAllAction->setToggleAction(TRUE);
  12887. - connect(showAllAction, SIGNAL(toggled(bool)), configView, SLOT(setShowAll(bool)));
  12888. - connect(showAllAction, SIGNAL(toggled(bool)), menuView, SLOT(setShowAll(bool)));
  12889. - showAllAction->setOn(configList->showAll);
  12890. - QAction *showDebugAction = new QAction(NULL, _("Show Debug Info"), 0, this);
  12891. +
  12892. + QActionGroup *optGroup = new QActionGroup(this);
  12893. + optGroup->setExclusive(TRUE);
  12894. + connect(optGroup, SIGNAL(selected(QAction *)), configView,
  12895. + SLOT(setOptionMode(QAction *)));
  12896. + connect(optGroup, SIGNAL(selected(QAction *)), menuView,
  12897. + SLOT(setOptionMode(QAction *)));
  12898. +
  12899. +#if QT_VERSION >= 0x040000
  12900. + configView->showNormalAction = new QAction(_("Show Normal Options"), optGroup);
  12901. + configView->showAllAction = new QAction(_("Show All Options"), optGroup);
  12902. + configView->showPromptAction = new QAction(_("Show Prompt Options"), optGroup);
  12903. +#else
  12904. + configView->showNormalAction = new QAction(_("Show Normal Options"), 0, optGroup);
  12905. + configView->showAllAction = new QAction(_("Show All Options"), 0, optGroup);
  12906. + configView->showPromptAction = new QAction(_("Show Prompt Options"), 0, optGroup);
  12907. +#endif
  12908. + configView->showNormalAction->setToggleAction(TRUE);
  12909. + configView->showNormalAction->setOn(configList->optMode == normalOpt);
  12910. + configView->showAllAction->setToggleAction(TRUE);
  12911. + configView->showAllAction->setOn(configList->optMode == allOpt);
  12912. + configView->showPromptAction->setToggleAction(TRUE);
  12913. + configView->showPromptAction->setOn(configList->optMode == promptOpt);
  12914. +
  12915. + Q3Action *showDebugAction = new Q3Action(NULL, _("Show Debug Info"), 0, this);
  12916. showDebugAction->setToggleAction(TRUE);
  12917. connect(showDebugAction, SIGNAL(toggled(bool)), helpText, SLOT(setShowDebug(bool)));
  12918. connect(helpText, SIGNAL(showDebugChanged(bool)), showDebugAction, SLOT(setOn(bool)));
  12919. showDebugAction->setOn(helpText->showDebug());
  12920. - QAction *showIntroAction = new QAction(NULL, _("Introduction"), 0, this);
  12921. + Q3Action *showIntroAction = new Q3Action(NULL, _("Introduction"), 0, this);
  12922. connect(showIntroAction, SIGNAL(activated()), SLOT(showIntro()));
  12923. - QAction *showAboutAction = new QAction(NULL, _("About"), 0, this);
  12924. + Q3Action *showAboutAction = new Q3Action(NULL, _("About"), 0, this);
  12925. connect(showAboutAction, SIGNAL(activated()), SLOT(showAbout()));
  12926. // init tool bar
  12927. @@ -1377,7 +1401,7 @@
  12928. fullViewAction->addTo(toolBar);
  12929. // create config menu
  12930. - QPopupMenu* config = new QPopupMenu(this);
  12931. + Q3PopupMenu* config = new Q3PopupMenu(this);
  12932. menu->insertItem(_("&File"), config);
  12933. loadAction->addTo(config);
  12934. saveAction->addTo(config);
  12935. @@ -1386,22 +1410,22 @@
  12936. quitAction->addTo(config);
  12937. // create edit menu
  12938. - QPopupMenu* editMenu = new QPopupMenu(this);
  12939. + Q3PopupMenu* editMenu = new Q3PopupMenu(this);
  12940. menu->insertItem(_("&Edit"), editMenu);
  12941. searchAction->addTo(editMenu);
  12942. // create options menu
  12943. - QPopupMenu* optionMenu = new QPopupMenu(this);
  12944. + Q3PopupMenu* optionMenu = new Q3PopupMenu(this);
  12945. menu->insertItem(_("&Option"), optionMenu);
  12946. showNameAction->addTo(optionMenu);
  12947. showRangeAction->addTo(optionMenu);
  12948. showDataAction->addTo(optionMenu);
  12949. optionMenu->insertSeparator();
  12950. - showAllAction->addTo(optionMenu);
  12951. - showDebugAction->addTo(optionMenu);
  12952. + optGroup->addTo(optionMenu);
  12953. + optionMenu->insertSeparator();
  12954. // create help menu
  12955. - QPopupMenu* helpMenu = new QPopupMenu(this);
  12956. + Q3PopupMenu* helpMenu = new Q3PopupMenu(this);
  12957. menu->insertSeparator();
  12958. menu->insertItem(_("&Help"), helpMenu);
  12959. showIntroAction->addTo(helpMenu);
  12960. @@ -1436,7 +1460,7 @@
  12961. showSplitView();
  12962. // UI setup done, restore splitter positions
  12963. - QValueList<int> sizes = configSettings->readSizes("/split1", &ok);
  12964. + Q3ValueList<int> sizes = configSettings->readSizes("/split1", &ok);
  12965. if (ok)
  12966. split1->setSizes(sizes);
  12967. @@ -1447,7 +1471,7 @@
  12968. void ConfigMainWindow::loadConfig(void)
  12969. {
  12970. - QString s = QFileDialog::getOpenFileName(".config", NULL, this);
  12971. + QString s = Q3FileDialog::getOpenFileName(conf_get_configname(), NULL, this);
  12972. if (s.isNull())
  12973. return;
  12974. if (conf_read(QFile::encodeName(s)))
  12975. @@ -1455,19 +1479,21 @@
  12976. ConfigView::updateListAll();
  12977. }
  12978. -void ConfigMainWindow::saveConfig(void)
  12979. +bool ConfigMainWindow::saveConfig(void)
  12980. {
  12981. - if (conf_write(NULL))
  12982. + if (conf_write(NULL)) {
  12983. QMessageBox::information(this, "qconf", _("Unable to save configuration!"));
  12984. + return false;
  12985. + }
  12986. + return true;
  12987. }
  12988. void ConfigMainWindow::saveConfigAs(void)
  12989. {
  12990. - QString s = QFileDialog::getSaveFileName(".config", NULL, this);
  12991. + QString s = Q3FileDialog::getSaveFileName(conf_get_configname(), NULL, this);
  12992. if (s.isNull())
  12993. return;
  12994. - if (conf_write(QFile::encodeName(s)))
  12995. - QMessageBox::information(this, "qconf", _("Unable to save configuration!"));
  12996. + saveConfig();
  12997. }
  12998. void ConfigMainWindow::searchConfig(void)
  12999. @@ -1492,7 +1518,7 @@
  13000. ConfigList* list = NULL;
  13001. ConfigItem* item;
  13002. - if (!menu_is_visible(menu) && !configView->showAll())
  13003. + if (configList->menuSkip(menu))
  13004. return;
  13005. switch (configList->mode) {
  13006. @@ -1524,6 +1550,8 @@
  13007. case fullMode:
  13008. list = configList;
  13009. break;
  13010. + default:
  13011. + break;
  13012. }
  13013. if (list) {
  13014. @@ -1618,7 +1646,11 @@
  13015. mb.setButtonText(QMessageBox::Cancel, _("Cancel Exit"));
  13016. switch (mb.exec()) {
  13017. case QMessageBox::Yes:
  13018. - conf_write(NULL);
  13019. + if (saveConfig())
  13020. + e->accept();
  13021. + else
  13022. + e->ignore();
  13023. + break;
  13024. case QMessageBox::No:
  13025. e->accept();
  13026. break;
  13027. @@ -1630,7 +1662,7 @@
  13028. void ConfigMainWindow::showIntro(void)
  13029. {
  13030. - static const QString str = _("Welcome to the qconf graphical configuration tool for uClibc.\n\n"
  13031. + static const QString str = _("Welcome to the qconf graphical configuration tool.\n\n"
  13032. "For each option, a blank box indicates the feature is disabled, a check\n"
  13033. "indicates it is enabled, and a dot indicates that it is to be compiled\n"
  13034. "as a module. Clicking on the box will cycle through the three states.\n\n"
  13035. @@ -1648,7 +1680,7 @@
  13036. void ConfigMainWindow::showAbout(void)
  13037. {
  13038. static const QString str = _("qconf is Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>.\n\n"
  13039. - "Bug reports and feature request can also be entered at https://bugs.uClibc.org/\n");
  13040. + "Bug reports and feature request can also be entered at http://bugs.uClibc.org/\n");
  13041. QMessageBox::information(this, "qconf", str);
  13042. }
  13043. @@ -1673,6 +1705,9 @@
  13044. case fullMode :
  13045. entry = "full";
  13046. break;
  13047. +
  13048. + default:
  13049. + break;
  13050. }
  13051. configSettings->writeEntry("/listMode", entry);
  13052. @@ -1718,10 +1753,6 @@
  13053. bindtextdomain(PACKAGE, LOCALEDIR);
  13054. textdomain(PACKAGE);
  13055. -#ifndef LKC_DIRECT_LINK
  13056. - kconfig_load();
  13057. -#endif
  13058. -
  13059. progname = av[0];
  13060. configApp = new QApplication(ac, av);
  13061. if (ac > 1 && av[1][0] == '-') {
  13062. diff -Nur uClibc-0.9.33.2/extra/config/qconf.h uClibc-git/extra/config/qconf.h
  13063. --- uClibc-0.9.33.2/extra/config/qconf.h 2012-05-15 09:20:09.000000000 +0200
  13064. +++ uClibc-git/extra/config/qconf.h 2014-07-25 20:36:04.865324519 +0200
  13065. @@ -3,26 +3,25 @@
  13066. * Released under the terms of the GNU GPL v2.0.
  13067. */
  13068. +#if QT_VERSION < 0x040000
  13069. #include <qlistview.h>
  13070. -#if QT_VERSION >= 300
  13071. -#include <qsettings.h>
  13072. #else
  13073. -class QSettings {
  13074. -public:
  13075. - void beginGroup(const QString& group) { }
  13076. - void endGroup(void) { }
  13077. - bool readBoolEntry(const QString& key, bool def = FALSE, bool* ok = 0) const
  13078. - { if (ok) *ok = FALSE; return def; }
  13079. - int readNumEntry(const QString& key, int def = 0, bool* ok = 0) const
  13080. - { if (ok) *ok = FALSE; return def; }
  13081. - QString readEntry(const QString& key, const QString& def = QString::null, bool* ok = 0) const
  13082. - { if (ok) *ok = FALSE; return def; }
  13083. - QStringList readListEntry(const QString& key, bool* ok = 0) const
  13084. - { if (ok) *ok = FALSE; return QStringList(); }
  13085. - template <class t>
  13086. - bool writeEntry(const QString& key, t value)
  13087. - { return TRUE; }
  13088. -};
  13089. +#include <q3listview.h>
  13090. +#endif
  13091. +#include <qsettings.h>
  13092. +
  13093. +#if QT_VERSION < 0x040000
  13094. +#define Q3ValueList QValueList
  13095. +#define Q3PopupMenu QPopupMenu
  13096. +#define Q3ListView QListView
  13097. +#define Q3ListViewItem QListViewItem
  13098. +#define Q3VBox QVBox
  13099. +#define Q3TextBrowser QTextBrowser
  13100. +#define Q3MainWindow QMainWindow
  13101. +#define Q3Action QAction
  13102. +#define Q3ToolBar QToolBar
  13103. +#define Q3ListViewItemIterator QListViewItemIterator
  13104. +#define Q3FileDialog QFileDialog
  13105. #endif
  13106. class ConfigView;
  13107. @@ -31,11 +30,10 @@
  13108. class ConfigLineEdit;
  13109. class ConfigMainWindow;
  13110. -
  13111. class ConfigSettings : public QSettings {
  13112. public:
  13113. - QValueList<int> readSizes(const QString& key, bool *ok);
  13114. - bool writeSizes(const QString& key, const QValueList<int>& value);
  13115. + Q3ValueList<int> readSizes(const QString& key, bool *ok);
  13116. + bool writeSizes(const QString& key, const Q3ValueList<int>& value);
  13117. };
  13118. enum colIdx {
  13119. @@ -44,10 +42,13 @@
  13120. enum listMode {
  13121. singleMode, menuMode, symbolMode, fullMode, listMode
  13122. };
  13123. +enum optionMode {
  13124. + normalOpt = 0, allOpt, promptOpt
  13125. +};
  13126. -class ConfigList : public QListView {
  13127. +class ConfigList : public Q3ListView {
  13128. Q_OBJECT
  13129. - typedef class QListView Parent;
  13130. + typedef class Q3ListView Parent;
  13131. public:
  13132. ConfigList(ConfigView* p, const char *name = 0);
  13133. void reinit(void);
  13134. @@ -115,6 +116,8 @@
  13135. void setAllOpen(bool open);
  13136. void setParentMenu(void);
  13137. + bool menuSkip(struct menu *);
  13138. +
  13139. template <class P>
  13140. void updateMenuList(P*, struct menu*);
  13141. @@ -124,22 +127,23 @@
  13142. QPixmap choiceYesPix, choiceNoPix;
  13143. QPixmap menuPix, menuInvPix, menuBackPix, voidPix;
  13144. - bool showAll, showName, showRange, showData;
  13145. + bool showName, showRange, showData;
  13146. enum listMode mode;
  13147. + enum optionMode optMode;
  13148. struct menu *rootEntry;
  13149. QColorGroup disabledColorGroup;
  13150. QColorGroup inactivedColorGroup;
  13151. - QPopupMenu* headerPopup;
  13152. + Q3PopupMenu* headerPopup;
  13153. private:
  13154. int colMap[colNr];
  13155. int colRevMap[colNr];
  13156. };
  13157. -class ConfigItem : public QListViewItem {
  13158. - typedef class QListViewItem Parent;
  13159. +class ConfigItem : public Q3ListViewItem {
  13160. + typedef class Q3ListViewItem Parent;
  13161. public:
  13162. - ConfigItem(QListView *parent, ConfigItem *after, struct menu *m, bool v)
  13163. + ConfigItem(Q3ListView *parent, ConfigItem *after, struct menu *m, bool v)
  13164. : Parent(parent, after), menu(m), visible(v), goParent(false)
  13165. {
  13166. init();
  13167. @@ -149,16 +153,14 @@
  13168. {
  13169. init();
  13170. }
  13171. - ConfigItem(QListView *parent, ConfigItem *after, bool v)
  13172. + ConfigItem(Q3ListView *parent, ConfigItem *after, bool v)
  13173. : Parent(parent, after), menu(0), visible(v), goParent(true)
  13174. {
  13175. init();
  13176. }
  13177. ~ConfigItem(void);
  13178. void init(void);
  13179. -#if QT_VERSION >= 300
  13180. void okRename(int col);
  13181. -#endif
  13182. void updateMenu(void);
  13183. void testUpdateMenu(bool v);
  13184. ConfigList* listView() const
  13185. @@ -213,26 +215,24 @@
  13186. ConfigItem *item;
  13187. };
  13188. -class ConfigView : public QVBox {
  13189. +class ConfigView : public Q3VBox {
  13190. Q_OBJECT
  13191. - typedef class QVBox Parent;
  13192. + typedef class Q3VBox Parent;
  13193. public:
  13194. ConfigView(QWidget* parent, const char *name = 0);
  13195. ~ConfigView(void);
  13196. static void updateList(ConfigItem* item);
  13197. static void updateListAll(void);
  13198. - bool showAll(void) const { return list->showAll; }
  13199. bool showName(void) const { return list->showName; }
  13200. bool showRange(void) const { return list->showRange; }
  13201. bool showData(void) const { return list->showData; }
  13202. public slots:
  13203. - void setShowAll(bool);
  13204. void setShowName(bool);
  13205. void setShowRange(bool);
  13206. void setShowData(bool);
  13207. + void setOptionMode(QAction *);
  13208. signals:
  13209. - void showAllChanged(bool);
  13210. void showNameChanged(bool);
  13211. void showRangeChanged(bool);
  13212. void showDataChanged(bool);
  13213. @@ -242,11 +242,15 @@
  13214. static ConfigView* viewList;
  13215. ConfigView* nextView;
  13216. +
  13217. + static QAction *showNormalAction;
  13218. + static QAction *showAllAction;
  13219. + static QAction *showPromptAction;
  13220. };
  13221. -class ConfigInfoView : public QTextBrowser {
  13222. +class ConfigInfoView : public Q3TextBrowser {
  13223. Q_OBJECT
  13224. - typedef class QTextBrowser Parent;
  13225. + typedef class Q3TextBrowser Parent;
  13226. public:
  13227. ConfigInfoView(QWidget* parent, const char *name = 0);
  13228. bool showDebug(void) const { return _showDebug; }
  13229. @@ -254,7 +258,6 @@
  13230. public slots:
  13231. void setInfo(struct menu *menu);
  13232. void saveSettings(void);
  13233. - void setSource(const QString& name);
  13234. void setShowDebug(bool);
  13235. signals:
  13236. @@ -267,11 +270,11 @@
  13237. QString debug_info(struct symbol *sym);
  13238. static QString print_filter(const QString &str);
  13239. static void expr_print_help(void *data, struct symbol *sym, const char *str);
  13240. - QPopupMenu* createPopupMenu(const QPoint& pos);
  13241. + Q3PopupMenu* createPopupMenu(const QPoint& pos);
  13242. void contentsContextMenuEvent(QContextMenuEvent *e);
  13243. struct symbol *sym;
  13244. - struct menu *menu;
  13245. + struct menu *_menu;
  13246. bool _showDebug;
  13247. };
  13248. @@ -295,10 +298,10 @@
  13249. struct symbol **result;
  13250. };
  13251. -class ConfigMainWindow : public QMainWindow {
  13252. +class ConfigMainWindow : public Q3MainWindow {
  13253. Q_OBJECT
  13254. - static QAction *saveAction;
  13255. + static Q3Action *saveAction;
  13256. static void conf_changed(void);
  13257. public:
  13258. ConfigMainWindow(void);
  13259. @@ -308,7 +311,7 @@
  13260. void listFocusChanged(void);
  13261. void goBack(void);
  13262. void loadConfig(void);
  13263. - void saveConfig(void);
  13264. + bool saveConfig(void);
  13265. void saveConfigAs(void);
  13266. void searchConfig(void);
  13267. void showSingleView(void);
  13268. @@ -327,8 +330,8 @@
  13269. ConfigView *configView;
  13270. ConfigList *configList;
  13271. ConfigInfoView *helpText;
  13272. - QToolBar *toolBar;
  13273. - QAction *backAction;
  13274. + Q3ToolBar *toolBar;
  13275. + Q3Action *backAction;
  13276. QSplitter* split1;
  13277. QSplitter* split2;
  13278. };
  13279. diff -Nur uClibc-0.9.33.2/extra/config/README.uClibc uClibc-git/extra/config/README.uClibc
  13280. --- uClibc-0.9.33.2/extra/config/README.uClibc 2012-05-15 09:20:09.000000000 +0200
  13281. +++ uClibc-git/extra/config/README.uClibc 2014-07-25 20:36:04.853324457 +0200
  13282. @@ -5,7 +5,7 @@
  13283. cd extra/config.new
  13284. cp /usr/src/linux/Documentation/kbuild/kconfig-language.txt .
  13285. mv Makefile Makefile.kconfig
  13286. - zcat ../config/kconfig-to-uclibc.patch.gz | patch -p1
  13287. + tar -O -xzf ../config/kconfig-to-uclibc.tar.gz | patch -p3
  13288. cp ../config/README.uClibc .
  13289. cp ../config/Makefile .
  13290. cd ..
  13291. diff -Nur uClibc-0.9.33.2/extra/config/streamline_config.pl uClibc-git/extra/config/streamline_config.pl
  13292. --- uClibc-0.9.33.2/extra/config/streamline_config.pl 1970-01-01 01:00:00.000000000 +0100
  13293. +++ uClibc-git/extra/config/streamline_config.pl 2014-07-25 20:36:04.865324519 +0200
  13294. @@ -0,0 +1,640 @@
  13295. +#!/usr/bin/perl -w
  13296. +#
  13297. +# Copyright 2005-2009 - Steven Rostedt
  13298. +# Licensed under the terms of the GNU GPL License version 2
  13299. +#
  13300. +# It's simple enough to figure out how this works.
  13301. +# If not, then you can ask me at stripconfig@goodmis.org
  13302. +#
  13303. +# What it does?
  13304. +#
  13305. +# If you have installed a Linux kernel from a distribution
  13306. +# that turns on way too many modules than you need, and
  13307. +# you only want the modules you use, then this program
  13308. +# is perfect for you.
  13309. +#
  13310. +# It gives you the ability to turn off all the modules that are
  13311. +# not loaded on your system.
  13312. +#
  13313. +# Howto:
  13314. +#
  13315. +# 1. Boot up the kernel that you want to stream line the config on.
  13316. +# 2. Change directory to the directory holding the source of the
  13317. +# kernel that you just booted.
  13318. +# 3. Copy the configuraton file to this directory as .config
  13319. +# 4. Have all your devices that you need modules for connected and
  13320. +# operational (make sure that their corresponding modules are loaded)
  13321. +# 5. Run this script redirecting the output to some other file
  13322. +# like config_strip.
  13323. +# 6. Back up your old config (if you want too).
  13324. +# 7. copy the config_strip file to .config
  13325. +# 8. Run "make oldconfig"
  13326. +#
  13327. +# Now your kernel is ready to be built with only the modules that
  13328. +# are loaded.
  13329. +#
  13330. +# Here's what I did with my Debian distribution.
  13331. +#
  13332. +# cd /usr/src/linux-2.6.10
  13333. +# cp /boot/config-2.6.10-1-686-smp .config
  13334. +# ~/bin/streamline_config > config_strip
  13335. +# mv .config config_sav
  13336. +# mv config_strip .config
  13337. +# make oldconfig
  13338. +#
  13339. +use strict;
  13340. +use Getopt::Long;
  13341. +
  13342. +# set the environment variable LOCALMODCONFIG_DEBUG to get
  13343. +# debug output.
  13344. +my $debugprint = 0;
  13345. +$debugprint = 1 if (defined($ENV{LOCALMODCONFIG_DEBUG}));
  13346. +
  13347. +sub dprint {
  13348. + return if (!$debugprint);
  13349. + print STDERR @_;
  13350. +}
  13351. +
  13352. +my $config = ".config";
  13353. +
  13354. +my $uname = `uname -r`;
  13355. +chomp $uname;
  13356. +
  13357. +my @searchconfigs = (
  13358. + {
  13359. + "file" => ".config",
  13360. + "exec" => "cat",
  13361. + },
  13362. + {
  13363. + "file" => "/proc/config.gz",
  13364. + "exec" => "zcat",
  13365. + },
  13366. + {
  13367. + "file" => "/boot/config-$uname",
  13368. + "exec" => "cat",
  13369. + },
  13370. + {
  13371. + "file" => "/boot/vmlinuz-$uname",
  13372. + "exec" => "scripts/extract-ikconfig",
  13373. + "test" => "scripts/extract-ikconfig",
  13374. + },
  13375. + {
  13376. + "file" => "vmlinux",
  13377. + "exec" => "scripts/extract-ikconfig",
  13378. + "test" => "scripts/extract-ikconfig",
  13379. + },
  13380. + {
  13381. + "file" => "/lib/modules/$uname/kernel/kernel/configs.ko",
  13382. + "exec" => "scripts/extract-ikconfig",
  13383. + "test" => "scripts/extract-ikconfig",
  13384. + },
  13385. + {
  13386. + "file" => "kernel/configs.ko",
  13387. + "exec" => "scripts/extract-ikconfig",
  13388. + "test" => "scripts/extract-ikconfig",
  13389. + },
  13390. + {
  13391. + "file" => "kernel/configs.o",
  13392. + "exec" => "scripts/extract-ikconfig",
  13393. + "test" => "scripts/extract-ikconfig",
  13394. + },
  13395. +);
  13396. +
  13397. +sub read_config {
  13398. + foreach my $conf (@searchconfigs) {
  13399. + my $file = $conf->{"file"};
  13400. +
  13401. + next if ( ! -f "$file");
  13402. +
  13403. + if (defined($conf->{"test"})) {
  13404. + `$conf->{"test"} $conf->{"file"} 2>/dev/null`;
  13405. + next if ($?);
  13406. + }
  13407. +
  13408. + my $exec = $conf->{"exec"};
  13409. +
  13410. + print STDERR "using config: '$file'\n";
  13411. +
  13412. + open(my $infile, '-|', "$exec $file") || die "Failed to run $exec $file";
  13413. + my @x = <$infile>;
  13414. + close $infile;
  13415. + return @x;
  13416. + }
  13417. + die "No config file found";
  13418. +}
  13419. +
  13420. +my @config_file = read_config;
  13421. +
  13422. +# Parse options
  13423. +my $localmodconfig = 0;
  13424. +my $localyesconfig = 0;
  13425. +
  13426. +GetOptions("localmodconfig" => \$localmodconfig,
  13427. + "localyesconfig" => \$localyesconfig);
  13428. +
  13429. +# Get the build source and top level Kconfig file (passed in)
  13430. +my $ksource = ($ARGV[0] ? $ARGV[0] : '.');
  13431. +my $kconfig = $ARGV[1];
  13432. +my $lsmod_file = $ENV{'LSMOD'};
  13433. +
  13434. +my @makefiles = `find $ksource -name Makefile 2>/dev/null`;
  13435. +chomp @makefiles;
  13436. +
  13437. +my %depends;
  13438. +my %selects;
  13439. +my %prompts;
  13440. +my %objects;
  13441. +my $var;
  13442. +my $iflevel = 0;
  13443. +my @ifdeps;
  13444. +
  13445. +# prevent recursion
  13446. +my %read_kconfigs;
  13447. +
  13448. +sub read_kconfig {
  13449. + my ($kconfig) = @_;
  13450. +
  13451. + my $state = "NONE";
  13452. + my $config;
  13453. +
  13454. + my $cont = 0;
  13455. + my $line;
  13456. +
  13457. + my $source = "$ksource/$kconfig";
  13458. + my $last_source = "";
  13459. +
  13460. + # Check for any environment variables used
  13461. + while ($source =~ /\$(\w+)/ && $last_source ne $source) {
  13462. + my $env = $1;
  13463. + $last_source = $source;
  13464. + $source =~ s/\$$env/$ENV{$env}/;
  13465. + }
  13466. +
  13467. + open(my $kinfile, '<', $source) || die "Can't open $kconfig";
  13468. + while (<$kinfile>) {
  13469. + chomp;
  13470. +
  13471. + # Make sure that lines ending with \ continue
  13472. + if ($cont) {
  13473. + $_ = $line . " " . $_;
  13474. + }
  13475. +
  13476. + if (s/\\$//) {
  13477. + $cont = 1;
  13478. + $line = $_;
  13479. + next;
  13480. + }
  13481. +
  13482. + $cont = 0;
  13483. +
  13484. + # collect any Kconfig sources
  13485. + if (/^source\s*"(.*)"/) {
  13486. + my $kconfig = $1;
  13487. + # prevent reading twice.
  13488. + if (!defined($read_kconfigs{$kconfig})) {
  13489. + $read_kconfigs{$kconfig} = 1;
  13490. + read_kconfig($kconfig);
  13491. + }
  13492. + next;
  13493. + }
  13494. +
  13495. + # configs found
  13496. + if (/^\s*(menu)?config\s+(\S+)\s*$/) {
  13497. + $state = "NEW";
  13498. + $config = $2;
  13499. +
  13500. + # Add depends for 'if' nesting
  13501. + for (my $i = 0; $i < $iflevel; $i++) {
  13502. + if ($i) {
  13503. + $depends{$config} .= " " . $ifdeps[$i];
  13504. + } else {
  13505. + $depends{$config} = $ifdeps[$i];
  13506. + }
  13507. + $state = "DEP";
  13508. + }
  13509. +
  13510. + # collect the depends for the config
  13511. + } elsif ($state eq "NEW" && /^\s*depends\s+on\s+(.*)$/) {
  13512. + $state = "DEP";
  13513. + $depends{$config} = $1;
  13514. + } elsif ($state eq "DEP" && /^\s*depends\s+on\s+(.*)$/) {
  13515. + $depends{$config} .= " " . $1;
  13516. +
  13517. + # Get the configs that select this config
  13518. + } elsif ($state ne "NONE" && /^\s*select\s+(\S+)/) {
  13519. + my $conf = $1;
  13520. + if (defined($selects{$conf})) {
  13521. + $selects{$conf} .= " " . $config;
  13522. + } else {
  13523. + $selects{$conf} = $config;
  13524. + }
  13525. +
  13526. + # configs without prompts must be selected
  13527. + } elsif ($state ne "NONE" && /^\s*tristate\s\S/) {
  13528. + # note if the config has a prompt
  13529. + $prompts{$config} = 1;
  13530. +
  13531. + # Check for if statements
  13532. + } elsif (/^if\s+(.*\S)\s*$/) {
  13533. + my $deps = $1;
  13534. + # remove beginning and ending non text
  13535. + $deps =~ s/^[^a-zA-Z0-9_]*//;
  13536. + $deps =~ s/[^a-zA-Z0-9_]*$//;
  13537. +
  13538. + my @deps = split /[^a-zA-Z0-9_]+/, $deps;
  13539. +
  13540. + $ifdeps[$iflevel++] = join ':', @deps;
  13541. +
  13542. + } elsif (/^endif/) {
  13543. +
  13544. + $iflevel-- if ($iflevel);
  13545. +
  13546. + # stop on "help"
  13547. + } elsif (/^\s*help\s*$/) {
  13548. + $state = "NONE";
  13549. + }
  13550. + }
  13551. + close($kinfile);
  13552. +}
  13553. +
  13554. +if ($kconfig) {
  13555. + read_kconfig($kconfig);
  13556. +}
  13557. +
  13558. +# Makefiles can use variables to define their dependencies
  13559. +sub convert_vars {
  13560. + my ($line, %vars) = @_;
  13561. +
  13562. + my $process = "";
  13563. +
  13564. + while ($line =~ s/^(.*?)(\$\((.*?)\))//) {
  13565. + my $start = $1;
  13566. + my $variable = $2;
  13567. + my $var = $3;
  13568. +
  13569. + if (defined($vars{$var})) {
  13570. + $process .= $start . $vars{$var};
  13571. + } else {
  13572. + $process .= $start . $variable;
  13573. + }
  13574. + }
  13575. +
  13576. + $process .= $line;
  13577. +
  13578. + return $process;
  13579. +}
  13580. +
  13581. +# Read all Makefiles to map the configs to the objects
  13582. +foreach my $makefile (@makefiles) {
  13583. +
  13584. + my $line = "";
  13585. + my %make_vars;
  13586. +
  13587. + open(my $infile, '<', $makefile) || die "Can't open $makefile";
  13588. + while (<$infile>) {
  13589. + # if this line ends with a backslash, continue
  13590. + chomp;
  13591. + if (/^(.*)\\$/) {
  13592. + $line .= $1;
  13593. + next;
  13594. + }
  13595. +
  13596. + $line .= $_;
  13597. + $_ = $line;
  13598. + $line = "";
  13599. +
  13600. + my $objs;
  13601. +
  13602. + # Convert variables in a line (could define configs)
  13603. + $_ = convert_vars($_, %make_vars);
  13604. +
  13605. + # collect objects after obj-$(CONFIG_FOO_BAR)
  13606. + if (/obj-\$\((CONFIG_[^\)]*)\)\s*[+:]?=\s*(.*)/) {
  13607. + $var = $1;
  13608. + $objs = $2;
  13609. +
  13610. + # check if variables are set
  13611. + } elsif (/^\s*(\S+)\s*[:]?=\s*(.*\S)/) {
  13612. + $make_vars{$1} = $2;
  13613. + }
  13614. + if (defined($objs)) {
  13615. + foreach my $obj (split /\s+/,$objs) {
  13616. + $obj =~ s/-/_/g;
  13617. + if ($obj =~ /(.*)\.o$/) {
  13618. + # Objects may be enabled by more than one config.
  13619. + # Store configs in an array.
  13620. + my @arr;
  13621. +
  13622. + if (defined($objects{$1})) {
  13623. + @arr = @{$objects{$1}};
  13624. + }
  13625. +
  13626. + $arr[$#arr+1] = $var;
  13627. +
  13628. + # The objects have a hash mapping to a reference
  13629. + # of an array of configs.
  13630. + $objects{$1} = \@arr;
  13631. + }
  13632. + }
  13633. + }
  13634. + }
  13635. + close($infile);
  13636. +}
  13637. +
  13638. +my %modules;
  13639. +my $linfile;
  13640. +
  13641. +if (defined($lsmod_file)) {
  13642. + if ( ! -f $lsmod_file) {
  13643. + if ( -f $ENV{'objtree'}."/".$lsmod_file) {
  13644. + $lsmod_file = $ENV{'objtree'}."/".$lsmod_file;
  13645. + } else {
  13646. + die "$lsmod_file not found";
  13647. + }
  13648. + }
  13649. +
  13650. + my $otype = ( -x $lsmod_file) ? '-|' : '<';
  13651. + open($linfile, $otype, $lsmod_file);
  13652. +
  13653. +} else {
  13654. +
  13655. + # see what modules are loaded on this system
  13656. + my $lsmod;
  13657. +
  13658. + foreach my $dir ( ("/sbin", "/bin", "/usr/sbin", "/usr/bin") ) {
  13659. + if ( -x "$dir/lsmod" ) {
  13660. + $lsmod = "$dir/lsmod";
  13661. + last;
  13662. + }
  13663. +}
  13664. + if (!defined($lsmod)) {
  13665. + # try just the path
  13666. + $lsmod = "lsmod";
  13667. + }
  13668. +
  13669. + open($linfile, '-|', $lsmod) || die "Can not call lsmod with $lsmod";
  13670. +}
  13671. +
  13672. +while (<$linfile>) {
  13673. + next if (/^Module/); # Skip the first line.
  13674. + if (/^(\S+)/) {
  13675. + $modules{$1} = 1;
  13676. + }
  13677. +}
  13678. +close ($linfile);
  13679. +
  13680. +# add to the configs hash all configs that are needed to enable
  13681. +# a loaded module. This is a direct obj-${CONFIG_FOO} += bar.o
  13682. +# where we know we need bar.o so we add FOO to the list.
  13683. +my %configs;
  13684. +foreach my $module (keys(%modules)) {
  13685. + if (defined($objects{$module})) {
  13686. + my @arr = @{$objects{$module}};
  13687. + foreach my $conf (@arr) {
  13688. + $configs{$conf} = $module;
  13689. + dprint "$conf added by direct ($module)\n";
  13690. + if ($debugprint) {
  13691. + my $c=$conf;
  13692. + $c =~ s/^CONFIG_//;
  13693. + if (defined($depends{$c})) {
  13694. + dprint " deps = $depends{$c}\n";
  13695. + } else {
  13696. + dprint " no deps\n";
  13697. + }
  13698. + }
  13699. + }
  13700. + } else {
  13701. + # Most likely, someone has a custom (binary?) module loaded.
  13702. + print STDERR "$module config not found!!\n";
  13703. + }
  13704. +}
  13705. +
  13706. +# Read the current config, and see what is enabled. We want to
  13707. +# ignore configs that we would not enable anyway.
  13708. +
  13709. +my %orig_configs;
  13710. +my $valid = "A-Za-z_0-9";
  13711. +
  13712. +foreach my $line (@config_file) {
  13713. + $_ = $line;
  13714. +
  13715. + if (/(CONFIG_[$valid]*)=(m|y)/) {
  13716. + $orig_configs{$1} = $2;
  13717. + }
  13718. +}
  13719. +
  13720. +my $repeat = 1;
  13721. +
  13722. +my $depconfig;
  13723. +
  13724. +#
  13725. +# Note, we do not care about operands (like: &&, ||, !) we want to add any
  13726. +# config that is in the depend list of another config. This script does
  13727. +# not enable configs that are not already enabled. If we come across a
  13728. +# config A that depends on !B, we can still add B to the list of depends
  13729. +# to keep on. If A was on in the original config, B would not have been
  13730. +# and B would not be turned on by this script.
  13731. +#
  13732. +sub parse_config_depends
  13733. +{
  13734. + my ($p) = @_;
  13735. +
  13736. + while ($p =~ /[$valid]/) {
  13737. +
  13738. + if ($p =~ /^[^$valid]*([$valid]+)/) {
  13739. + my $conf = "CONFIG_" . $1;
  13740. +
  13741. + $p =~ s/^[^$valid]*[$valid]+//;
  13742. +
  13743. + # We only need to process if the depend config is a module
  13744. + if (!defined($orig_configs{$conf}) || !$orig_configs{conf} eq "m") {
  13745. + next;
  13746. + }
  13747. +
  13748. + if (!defined($configs{$conf})) {
  13749. + # We must make sure that this config has its
  13750. + # dependencies met.
  13751. + $repeat = 1; # do again
  13752. + dprint "$conf selected by depend $depconfig\n";
  13753. + $configs{$conf} = 1;
  13754. + }
  13755. + } else {
  13756. + die "this should never happen";
  13757. + }
  13758. + }
  13759. +}
  13760. +
  13761. +# Select is treated a bit differently than depends. We call this
  13762. +# when a config has no prompt and requires another config to be
  13763. +# selected. We use to just select all configs that selected this
  13764. +# config, but found that that can balloon into enabling hundreds
  13765. +# of configs that we do not care about.
  13766. +#
  13767. +# The idea is we look at all the configs that select it. If one
  13768. +# is already in our list of configs to enable, then there's nothing
  13769. +# else to do. If there isn't, we pick the first config that was
  13770. +# enabled in the orignal config and use that.
  13771. +sub parse_config_selects
  13772. +{
  13773. + my ($config, $p) = @_;
  13774. +
  13775. + my $next_config;
  13776. +
  13777. + while ($p =~ /[$valid]/) {
  13778. +
  13779. + if ($p =~ /^[^$valid]*([$valid]+)/) {
  13780. + my $conf = "CONFIG_" . $1;
  13781. +
  13782. + $p =~ s/^[^$valid]*[$valid]+//;
  13783. +
  13784. + # Make sure that this config exists in the current .config file
  13785. + if (!defined($orig_configs{$conf})) {
  13786. + dprint "$conf not set for $config select\n";
  13787. + next;
  13788. + }
  13789. +
  13790. + # Check if something other than a module selects this config
  13791. + if (defined($orig_configs{$conf}) && $orig_configs{$conf} ne "m") {
  13792. + dprint "$conf (non module) selects config, we are good\n";
  13793. + # we are good with this
  13794. + return;
  13795. + }
  13796. + if (defined($configs{$conf})) {
  13797. + dprint "$conf selects $config so we are good\n";
  13798. + # A set config selects this config, we are good
  13799. + return;
  13800. + }
  13801. + # Set this config to be selected
  13802. + if (!defined($next_config)) {
  13803. + $next_config = $conf;
  13804. + }
  13805. + } else {
  13806. + die "this should never happen";
  13807. + }
  13808. + }
  13809. +
  13810. + # If no possible config selected this, then something happened.
  13811. + if (!defined($next_config)) {
  13812. + print STDERR "WARNING: $config is required, but nothing in the\n";
  13813. + print STDERR " current config selects it.\n";
  13814. + return;
  13815. + }
  13816. +
  13817. + # If we are here, then we found no config that is set and
  13818. + # selects this config. Repeat.
  13819. + $repeat = 1;
  13820. + # Make this config need to be selected
  13821. + $configs{$next_config} = 1;
  13822. + dprint "$next_config selected by select $config\n";
  13823. +}
  13824. +
  13825. +my %process_selects;
  13826. +
  13827. +# loop through all configs, select their dependencies.
  13828. +sub loop_depend {
  13829. + $repeat = 1;
  13830. +
  13831. + while ($repeat) {
  13832. + $repeat = 0;
  13833. +
  13834. + forloop:
  13835. + foreach my $config (keys %configs) {
  13836. +
  13837. + # If this config is not a module, we do not need to process it
  13838. + if (defined($orig_configs{$config}) && $orig_configs{$config} ne "m") {
  13839. + next forloop;
  13840. + }
  13841. +
  13842. + $config =~ s/^CONFIG_//;
  13843. + $depconfig = $config;
  13844. +
  13845. + if (defined($depends{$config})) {
  13846. + # This config has dependencies. Make sure they are also included
  13847. + parse_config_depends $depends{$config};
  13848. + }
  13849. +
  13850. + # If the config has no prompt, then we need to check if a config
  13851. + # that is enabled selected it. Or if we need to enable one.
  13852. + if (!defined($prompts{$config}) && defined($selects{$config})) {
  13853. + $process_selects{$config} = 1;
  13854. + }
  13855. + }
  13856. + }
  13857. +}
  13858. +
  13859. +sub loop_select {
  13860. +
  13861. + foreach my $config (keys %process_selects) {
  13862. + $config =~ s/^CONFIG_//;
  13863. +
  13864. + dprint "Process select $config\n";
  13865. +
  13866. + # config has no prompt and must be selected.
  13867. + parse_config_selects $config, $selects{$config};
  13868. + }
  13869. +}
  13870. +
  13871. +while ($repeat) {
  13872. + # Get the first set of configs and their dependencies.
  13873. + loop_depend;
  13874. +
  13875. + $repeat = 0;
  13876. +
  13877. + # Now we need to see if we have to check selects;
  13878. + loop_select;
  13879. +}
  13880. +
  13881. +my %setconfigs;
  13882. +
  13883. +# Finally, read the .config file and turn off any module enabled that
  13884. +# we could not find a reason to keep enabled.
  13885. +foreach my $line (@config_file) {
  13886. + $_ = $line;
  13887. +
  13888. + if (/CONFIG_IKCONFIG/) {
  13889. + if (/# CONFIG_IKCONFIG is not set/) {
  13890. + # enable IKCONFIG at least as a module
  13891. + print "CONFIG_IKCONFIG=m\n";
  13892. + # don't ask about PROC
  13893. + print "# CONFIG_IKCONFIG_PROC is not set\n";
  13894. + } else {
  13895. + print;
  13896. + }
  13897. + next;
  13898. + }
  13899. +
  13900. + if (/^(CONFIG.*)=(m|y)/) {
  13901. + if (defined($configs{$1})) {
  13902. + if ($localyesconfig) {
  13903. + $setconfigs{$1} = 'y';
  13904. + print "$1=y\n";
  13905. + next;
  13906. + } else {
  13907. + $setconfigs{$1} = $2;
  13908. + }
  13909. + } elsif ($2 eq "m") {
  13910. + print "# $1 is not set\n";
  13911. + next;
  13912. + }
  13913. + }
  13914. + print;
  13915. +}
  13916. +
  13917. +# Integrity check, make sure all modules that we want enabled do
  13918. +# indeed have their configs set.
  13919. +loop:
  13920. +foreach my $module (keys(%modules)) {
  13921. + if (defined($objects{$module})) {
  13922. + my @arr = @{$objects{$module}};
  13923. + foreach my $conf (@arr) {
  13924. + if (defined($setconfigs{$conf})) {
  13925. + next loop;
  13926. + }
  13927. + }
  13928. + print STDERR "module $module did not have configs";
  13929. + foreach my $conf (@arr) {
  13930. + print STDERR " " , $conf;
  13931. + }
  13932. + print STDERR "\n";
  13933. + }
  13934. +}
  13935. diff -Nur uClibc-0.9.33.2/extra/config/symbol.c uClibc-git/extra/config/symbol.c
  13936. --- uClibc-0.9.33.2/extra/config/symbol.c 2012-05-15 09:20:09.000000000 +0200
  13937. +++ uClibc-git/extra/config/symbol.c 2014-07-25 20:36:04.865324519 +0200
  13938. @@ -7,8 +7,8 @@
  13939. #include <stdlib.h>
  13940. #include <string.h>
  13941. #include <regex.h>
  13942. +#include <sys/utsname.h>
  13943. -#define LKC_DIRECT_LINK
  13944. #include "lkc.h"
  13945. struct symbol symbol_yes = {
  13946. @@ -35,7 +35,7 @@
  13947. struct expr *sym_env_list;
  13948. -void sym_add_default(struct symbol *sym, const char *def)
  13949. +static void sym_add_default(struct symbol *sym, const char *def)
  13950. {
  13951. struct property *prop = prop_alloc(P_DEFAULT, sym);
  13952. @@ -45,20 +45,19 @@
  13953. void sym_init(void)
  13954. {
  13955. struct symbol *sym;
  13956. - char *p;
  13957. + struct utsname uts;
  13958. static bool inited = false;
  13959. if (inited)
  13960. return;
  13961. inited = true;
  13962. - p = getenv("VERSION");
  13963. - if (p) {
  13964. - sym = sym_lookup("VERSION", 0);
  13965. - sym->type = S_STRING;
  13966. - sym->flags |= SYMBOL_AUTO;
  13967. - sym_add_default(sym, p);
  13968. - }
  13969. + uname(&uts);
  13970. +
  13971. + sym = sym_lookup("UNAME_RELEASE", 0);
  13972. + sym->type = S_STRING;
  13973. + sym->flags |= SYMBOL_AUTO;
  13974. + sym_add_default(sym, uts.release);
  13975. }
  13976. enum symbol_type sym_get_type(struct symbol *sym)
  13977. @@ -125,7 +124,7 @@
  13978. return NULL;
  13979. }
  13980. -struct property *sym_get_range_prop(struct symbol *sym)
  13981. +static struct property *sym_get_range_prop(struct symbol *sym)
  13982. {
  13983. struct property *prop;
  13984. @@ -137,7 +136,7 @@
  13985. return NULL;
  13986. }
  13987. -static int sym_get_range_val(struct symbol *sym, int base)
  13988. +static long sym_get_range_val(struct symbol *sym, int base)
  13989. {
  13990. sym_calc_value(sym);
  13991. switch (sym->type) {
  13992. @@ -156,7 +155,7 @@
  13993. static void sym_validate_range(struct symbol *sym)
  13994. {
  13995. struct property *prop;
  13996. - int base, val, val2;
  13997. + long base, val, val2;
  13998. char str[64];
  13999. switch (sym->type) {
  14000. @@ -180,9 +179,9 @@
  14001. return;
  14002. }
  14003. if (sym->type == S_INT)
  14004. - sprintf(str, "%d", val2);
  14005. + sprintf(str, "%ld", val2);
  14006. else
  14007. - sprintf(str, "0x%x", val2);
  14008. + sprintf(str, "0x%lx", val2);
  14009. sym->curr.val = strdup(str);
  14010. }
  14011. @@ -205,6 +204,16 @@
  14012. }
  14013. if (sym_is_choice_value(sym))
  14014. return;
  14015. + /* defaulting to "yes" if no explicit "depends on" are given */
  14016. + tri = yes;
  14017. + if (sym->dir_dep.expr)
  14018. + tri = expr_calc_value(sym->dir_dep.expr);
  14019. + if (tri == mod)
  14020. + tri = yes;
  14021. + if (sym->dir_dep.tri != tri) {
  14022. + sym->dir_dep.tri = tri;
  14023. + sym_set_changed(sym);
  14024. + }
  14025. tri = no;
  14026. if (sym->rev_dep.expr)
  14027. tri = expr_calc_value(sym->rev_dep.expr);
  14028. @@ -216,42 +225,68 @@
  14029. }
  14030. }
  14031. -static struct symbol *sym_calc_choice(struct symbol *sym)
  14032. +/*
  14033. + * Find the default symbol for a choice.
  14034. + * First try the default values for the choice symbol
  14035. + * Next locate the first visible choice value
  14036. + * Return NULL if none was found
  14037. + */
  14038. +struct symbol *sym_choice_default(struct symbol *sym)
  14039. {
  14040. struct symbol *def_sym;
  14041. struct property *prop;
  14042. struct expr *e;
  14043. - /* is the user choice visible? */
  14044. - def_sym = sym->def[S_DEF_USER].val;
  14045. - if (def_sym) {
  14046. - sym_calc_visibility(def_sym);
  14047. - if (def_sym->visible != no)
  14048. - return def_sym;
  14049. - }
  14050. -
  14051. /* any of the defaults visible? */
  14052. for_all_defaults(sym, prop) {
  14053. prop->visible.tri = expr_calc_value(prop->visible.expr);
  14054. if (prop->visible.tri == no)
  14055. continue;
  14056. def_sym = prop_get_symbol(prop);
  14057. - sym_calc_visibility(def_sym);
  14058. if (def_sym->visible != no)
  14059. return def_sym;
  14060. }
  14061. /* just get the first visible value */
  14062. prop = sym_get_choice_prop(sym);
  14063. + expr_list_for_each_sym(prop->expr, e, def_sym)
  14064. + if (def_sym->visible != no)
  14065. + return def_sym;
  14066. +
  14067. + /* failed to locate any defaults */
  14068. + return NULL;
  14069. +}
  14070. +
  14071. +static struct symbol *sym_calc_choice(struct symbol *sym)
  14072. +{
  14073. + struct symbol *def_sym;
  14074. + struct property *prop;
  14075. + struct expr *e;
  14076. + int flags;
  14077. +
  14078. + /* first calculate all choice values' visibilities */
  14079. + flags = sym->flags;
  14080. + prop = sym_get_choice_prop(sym);
  14081. expr_list_for_each_sym(prop->expr, e, def_sym) {
  14082. sym_calc_visibility(def_sym);
  14083. if (def_sym->visible != no)
  14084. - return def_sym;
  14085. + flags &= def_sym->flags;
  14086. }
  14087. - /* no choice? reset tristate value */
  14088. - sym->curr.tri = no;
  14089. - return NULL;
  14090. + sym->flags &= flags | ~SYMBOL_DEF_USER;
  14091. +
  14092. + /* is the user choice visible? */
  14093. + def_sym = sym->def[S_DEF_USER].val;
  14094. + if (def_sym && def_sym->visible != no)
  14095. + return def_sym;
  14096. +
  14097. + def_sym = sym_choice_default(sym);
  14098. +
  14099. + if (def_sym == NULL)
  14100. + /* no choice? reset tristate value */
  14101. + sym->curr.tri = no;
  14102. +
  14103. + return def_sym;
  14104. }
  14105. void sym_calc_value(struct symbol *sym)
  14106. @@ -265,6 +300,14 @@
  14107. if (sym->flags & SYMBOL_VALID)
  14108. return;
  14109. +
  14110. + if (sym_is_choice_value(sym) &&
  14111. + sym->flags & SYMBOL_NEED_SET_CHOICE_VALUES) {
  14112. + sym->flags &= ~SYMBOL_NEED_SET_CHOICE_VALUES;
  14113. + prop = sym_get_choice_prop(sym);
  14114. + sym_calc_value(prop_get_symbol(prop));
  14115. + }
  14116. +
  14117. sym->flags |= SYMBOL_VALID;
  14118. oldval = sym->curr;
  14119. @@ -321,6 +364,18 @@
  14120. }
  14121. }
  14122. calc_newval:
  14123. + if (sym->dir_dep.tri == no && sym->rev_dep.tri != no) {
  14124. + struct expr *e;
  14125. + e = expr_simplify_unmet_dep(sym->rev_dep.expr,
  14126. + sym->dir_dep.expr);
  14127. + fprintf(stderr, "warning: (");
  14128. + expr_fprint(e, stderr);
  14129. + fprintf(stderr, ") selects %s which has unmet direct dependencies (",
  14130. + sym->name);
  14131. + expr_fprint(sym->dir_dep.expr, stderr);
  14132. + fprintf(stderr, ")\n");
  14133. + expr_free(e);
  14134. + }
  14135. newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri);
  14136. }
  14137. if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN)
  14138. @@ -365,18 +420,22 @@
  14139. if (sym_is_choice(sym)) {
  14140. struct symbol *choice_sym;
  14141. - int flags = sym->flags & (SYMBOL_CHANGED | SYMBOL_WRITE);
  14142. prop = sym_get_choice_prop(sym);
  14143. expr_list_for_each_sym(prop->expr, e, choice_sym) {
  14144. - choice_sym->flags |= flags;
  14145. - if (flags & SYMBOL_CHANGED)
  14146. + if ((sym->flags & SYMBOL_WRITE) &&
  14147. + choice_sym->visible != no)
  14148. + choice_sym->flags |= SYMBOL_WRITE;
  14149. + if (sym->flags & SYMBOL_CHANGED)
  14150. sym_set_changed(choice_sym);
  14151. }
  14152. }
  14153. if (sym->flags & SYMBOL_AUTO)
  14154. sym->flags &= ~SYMBOL_WRITE;
  14155. +
  14156. + if (sym->flags & SYMBOL_NEED_SET_CHOICE_VALUES)
  14157. + set_all_choice_values(sym);
  14158. }
  14159. void sym_clear_all_valid(void)
  14160. @@ -535,7 +594,7 @@
  14161. bool sym_string_within_range(struct symbol *sym, const char *str)
  14162. {
  14163. struct property *prop;
  14164. - int val;
  14165. + long val;
  14166. switch (sym->type) {
  14167. case S_STRING:
  14168. @@ -608,11 +667,11 @@
  14169. size = strlen(newval) + 1;
  14170. if (sym->type == S_HEX && (newval[0] != '0' || (newval[1] != 'x' && newval[1] != 'X'))) {
  14171. size += 2;
  14172. - sym->def[S_DEF_USER].val = val = malloc(size);
  14173. + sym->def[S_DEF_USER].val = val = xmalloc(size);
  14174. *val++ = '0';
  14175. *val++ = 'x';
  14176. } else if (!oldval || strcmp(oldval, newval))
  14177. - sym->def[S_DEF_USER].val = val = malloc(size);
  14178. + sym->def[S_DEF_USER].val = val = xmalloc(size);
  14179. else
  14180. return true;
  14181. @@ -623,6 +682,80 @@
  14182. return true;
  14183. }
  14184. +/*
  14185. + * Find the default value associated to a symbol.
  14186. + * For tristate symbol handle the modules=n case
  14187. + * in which case "m" becomes "y".
  14188. + * If the symbol does not have any default then fallback
  14189. + * to the fixed default values.
  14190. + */
  14191. +const char *sym_get_string_default(struct symbol *sym)
  14192. +{
  14193. + struct property *prop;
  14194. + struct symbol *ds;
  14195. + const char *str;
  14196. + tristate val;
  14197. +
  14198. + sym_calc_visibility(sym);
  14199. + sym_calc_value(modules_sym);
  14200. + val = symbol_no.curr.tri;
  14201. + str = symbol_empty.curr.val;
  14202. +
  14203. + /* If symbol has a default value look it up */
  14204. + prop = sym_get_default_prop(sym);
  14205. + if (prop != NULL) {
  14206. + switch (sym->type) {
  14207. + case S_BOOLEAN:
  14208. + case S_TRISTATE:
  14209. + /* The visibility may limit the value from yes => mod */
  14210. + val = EXPR_AND(expr_calc_value(prop->expr), prop->visible.tri);
  14211. + break;
  14212. + default:
  14213. + /*
  14214. + * The following fails to handle the situation
  14215. + * where a default value is further limited by
  14216. + * the valid range.
  14217. + */
  14218. + ds = prop_get_symbol(prop);
  14219. + if (ds != NULL) {
  14220. + sym_calc_value(ds);
  14221. + str = (const char *)ds->curr.val;
  14222. + }
  14223. + }
  14224. + }
  14225. +
  14226. + /* Handle select statements */
  14227. + val = EXPR_OR(val, sym->rev_dep.tri);
  14228. +
  14229. + /* transpose mod to yes if modules are not enabled */
  14230. + if (val == mod)
  14231. + if (!sym_is_choice_value(sym) && modules_sym->curr.tri == no)
  14232. + val = yes;
  14233. +
  14234. + /* transpose mod to yes if type is bool */
  14235. + if (sym->type == S_BOOLEAN && val == mod)
  14236. + val = yes;
  14237. +
  14238. + switch (sym->type) {
  14239. + case S_BOOLEAN:
  14240. + case S_TRISTATE:
  14241. + switch (val) {
  14242. + case no: return "n";
  14243. + case mod: return "m";
  14244. + case yes: return "y";
  14245. + }
  14246. + case S_INT:
  14247. + case S_HEX:
  14248. + return str;
  14249. + case S_STRING:
  14250. + return str;
  14251. + case S_OTHER:
  14252. + case S_UNKNOWN:
  14253. + break;
  14254. + }
  14255. + return "";
  14256. +}
  14257. +
  14258. const char *sym_get_string_value(struct symbol *sym)
  14259. {
  14260. tristate val;
  14261. @@ -635,7 +768,8 @@
  14262. case no:
  14263. return "n";
  14264. case mod:
  14265. - return "m";
  14266. + sym_calc_value(modules_sym);
  14267. + return (modules_sym->curr.tri == no) ? "n" : "m";
  14268. case yes:
  14269. return "y";
  14270. }
  14271. @@ -651,12 +785,20 @@
  14272. return sym->visible > sym->rev_dep.tri;
  14273. }
  14274. +static unsigned strhash(const char *s)
  14275. +{
  14276. + /* fnv32 hash */
  14277. + unsigned hash = 2166136261U;
  14278. + for (; *s; s++)
  14279. + hash = (hash ^ *s) * 0x01000193;
  14280. + return hash;
  14281. +}
  14282. +
  14283. struct symbol *sym_lookup(const char *name, int flags)
  14284. {
  14285. struct symbol *symbol;
  14286. - const char *ptr;
  14287. char *new_name;
  14288. - int hash = 0;
  14289. + int hash;
  14290. if (name) {
  14291. if (name[0] && !name[1]) {
  14292. @@ -666,12 +808,11 @@
  14293. case 'n': return &symbol_no;
  14294. }
  14295. }
  14296. - for (ptr = name; *ptr; ptr++)
  14297. - hash += *ptr;
  14298. - hash &= 0xff;
  14299. + hash = strhash(name) % SYMBOL_HASHSIZE;
  14300. for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) {
  14301. - if (!strcmp(symbol->name, name) &&
  14302. + if (symbol->name &&
  14303. + !strcmp(symbol->name, name) &&
  14304. (flags ? symbol->flags & flags
  14305. : !(symbol->flags & (SYMBOL_CONST|SYMBOL_CHOICE))))
  14306. return symbol;
  14307. @@ -679,10 +820,10 @@
  14308. new_name = strdup(name);
  14309. } else {
  14310. new_name = NULL;
  14311. - hash = 256;
  14312. + hash = 0;
  14313. }
  14314. - symbol = malloc(sizeof(*symbol));
  14315. + symbol = xmalloc(sizeof(*symbol));
  14316. memset(symbol, 0, sizeof(*symbol));
  14317. symbol->name = new_name;
  14318. symbol->type = S_UNKNOWN;
  14319. @@ -697,7 +838,6 @@
  14320. struct symbol *sym_find(const char *name)
  14321. {
  14322. struct symbol *symbol = NULL;
  14323. - const char *ptr;
  14324. int hash = 0;
  14325. if (!name)
  14326. @@ -710,12 +850,11 @@
  14327. case 'n': return &symbol_no;
  14328. }
  14329. }
  14330. - for (ptr = name; *ptr; ptr++)
  14331. - hash += *ptr;
  14332. - hash &= 0xff;
  14333. + hash = strhash(name) % SYMBOL_HASHSIZE;
  14334. for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) {
  14335. - if (!strcmp(symbol->name, name) &&
  14336. + if (symbol->name &&
  14337. + !strcmp(symbol->name, name) &&
  14338. !(symbol->flags & SYMBOL_CONST))
  14339. break;
  14340. }
  14341. @@ -723,42 +862,301 @@
  14342. return symbol;
  14343. }
  14344. +/*
  14345. + * Expand symbol's names embedded in the string given in argument. Symbols'
  14346. + * name to be expanded shall be prefixed by a '$'. Unknown symbol expands to
  14347. + * the empty string.
  14348. + */
  14349. +const char *sym_expand_string_value(const char *in)
  14350. +{
  14351. + const char *src;
  14352. + char *res;
  14353. + size_t reslen;
  14354. +
  14355. + reslen = strlen(in) + 1;
  14356. + res = xmalloc(reslen);
  14357. + res[0] = '\0';
  14358. +
  14359. + while ((src = strchr(in, '$'))) {
  14360. + char *p, name[SYMBOL_MAXLENGTH];
  14361. + const char *symval = "";
  14362. + struct symbol *sym;
  14363. + size_t newlen;
  14364. +
  14365. + strncat(res, in, src - in);
  14366. + src++;
  14367. +
  14368. + p = name;
  14369. + while (isalnum(*src) || *src == '_')
  14370. + *p++ = *src++;
  14371. + *p = '\0';
  14372. +
  14373. + sym = sym_find(name);
  14374. + if (sym != NULL) {
  14375. + sym_calc_value(sym);
  14376. + symval = sym_get_string_value(sym);
  14377. + }
  14378. +
  14379. + newlen = strlen(res) + strlen(symval) + strlen(src) + 1;
  14380. + if (newlen > reslen) {
  14381. + reslen = newlen;
  14382. + res = realloc(res, reslen);
  14383. + }
  14384. +
  14385. + strcat(res, symval);
  14386. + in = src;
  14387. + }
  14388. + strcat(res, in);
  14389. +
  14390. + return res;
  14391. +}
  14392. +
  14393. +const char *sym_escape_string_value(const char *in)
  14394. +{
  14395. + const char *p;
  14396. + size_t reslen;
  14397. + char *res;
  14398. + size_t l;
  14399. +
  14400. + reslen = strlen(in) + strlen("\"\"") + 1;
  14401. +
  14402. + p = in;
  14403. + for (;;) {
  14404. + l = strcspn(p, "\"\\");
  14405. + p += l;
  14406. +
  14407. + if (p[0] == '\0')
  14408. + break;
  14409. +
  14410. + reslen++;
  14411. + p++;
  14412. + }
  14413. +
  14414. + res = xmalloc(reslen);
  14415. + res[0] = '\0';
  14416. +
  14417. + strcat(res, "\"");
  14418. +
  14419. + p = in;
  14420. + for (;;) {
  14421. + l = strcspn(p, "\"\\");
  14422. + strncat(res, p, l);
  14423. + p += l;
  14424. +
  14425. + if (p[0] == '\0')
  14426. + break;
  14427. +
  14428. + strcat(res, "\\");
  14429. + strncat(res, p++, 1);
  14430. + }
  14431. +
  14432. + strcat(res, "\"");
  14433. + return res;
  14434. +}
  14435. +
  14436. +struct sym_match {
  14437. + struct symbol *sym;
  14438. + off_t so, eo;
  14439. +};
  14440. +
  14441. +/* Compare matched symbols as thus:
  14442. + * - first, symbols that match exactly
  14443. + * - then, alphabetical sort
  14444. + */
  14445. +static int sym_rel_comp( const void *sym1, const void *sym2 )
  14446. +{
  14447. + struct sym_match *s1 = *(struct sym_match **)sym1;
  14448. + struct sym_match *s2 = *(struct sym_match **)sym2;
  14449. + int l1, l2;
  14450. +
  14451. + /* Exact match:
  14452. + * - if matched length on symbol s1 is the length of that symbol,
  14453. + * then this symbol should come first;
  14454. + * - if matched length on symbol s2 is the length of that symbol,
  14455. + * then this symbol should come first.
  14456. + * Note: since the search can be a regexp, both symbols may match
  14457. + * exactly; if this is the case, we can't decide which comes first,
  14458. + * and we fallback to sorting alphabetically.
  14459. + */
  14460. + l1 = s1->eo - s1->so;
  14461. + l2 = s2->eo - s2->so;
  14462. + if (l1 == strlen(s1->sym->name) && l2 != strlen(s2->sym->name))
  14463. + return -1;
  14464. + if (l1 != strlen(s1->sym->name) && l2 == strlen(s2->sym->name))
  14465. + return 1;
  14466. +
  14467. + /* As a fallback, sort symbols alphabetically */
  14468. + return strcmp(s1->sym->name, s2->sym->name);
  14469. +}
  14470. +
  14471. struct symbol **sym_re_search(const char *pattern)
  14472. {
  14473. struct symbol *sym, **sym_arr = NULL;
  14474. + struct sym_match **sym_match_arr = NULL;
  14475. int i, cnt, size;
  14476. regex_t re;
  14477. + regmatch_t match[1];
  14478. cnt = size = 0;
  14479. /* Skip if empty */
  14480. if (strlen(pattern) == 0)
  14481. return NULL;
  14482. - if (regcomp(&re, pattern, REG_EXTENDED|REG_NOSUB|REG_ICASE))
  14483. + if (regcomp(&re, pattern, REG_EXTENDED|REG_ICASE))
  14484. return NULL;
  14485. for_all_symbols(i, sym) {
  14486. + struct sym_match *tmp_sym_match;
  14487. if (sym->flags & SYMBOL_CONST || !sym->name)
  14488. continue;
  14489. - if (regexec(&re, sym->name, 0, NULL, 0))
  14490. + if (regexec(&re, sym->name, 1, match, 0))
  14491. continue;
  14492. if (cnt + 1 >= size) {
  14493. - void *tmp = sym_arr;
  14494. + void *tmp;
  14495. size += 16;
  14496. - sym_arr = realloc(sym_arr, size * sizeof(struct symbol *));
  14497. - if (!sym_arr) {
  14498. - free(tmp);
  14499. - return NULL;
  14500. + tmp = realloc(sym_match_arr, size * sizeof(struct sym_match *));
  14501. + if (!tmp) {
  14502. + goto sym_re_search_free;
  14503. }
  14504. + sym_match_arr = tmp;
  14505. }
  14506. - sym_arr[cnt++] = sym;
  14507. - }
  14508. - if (sym_arr)
  14509. + sym_calc_value(sym);
  14510. + tmp_sym_match = (struct sym_match*)malloc(sizeof(struct sym_match));
  14511. + if (!tmp_sym_match)
  14512. + goto sym_re_search_free;
  14513. + tmp_sym_match->sym = sym;
  14514. + /* As regexec return 0, we know we have a match, so
  14515. + * we can use match[0].rm_[se]o without further checks
  14516. + */
  14517. + tmp_sym_match->so = match[0].rm_so;
  14518. + tmp_sym_match->eo = match[0].rm_eo;
  14519. + sym_match_arr[cnt++] = tmp_sym_match;
  14520. + }
  14521. + if (sym_match_arr) {
  14522. + qsort(sym_match_arr, cnt, sizeof(struct sym_match*), sym_rel_comp);
  14523. + sym_arr = malloc((cnt+1) * sizeof(struct symbol));
  14524. + if (!sym_arr)
  14525. + goto sym_re_search_free;
  14526. + for (i = 0; i < cnt; i++)
  14527. + sym_arr[i] = sym_match_arr[i]->sym;
  14528. sym_arr[cnt] = NULL;
  14529. + }
  14530. +sym_re_search_free:
  14531. + if (sym_match_arr) {
  14532. + for (i = 0; i < cnt; i++)
  14533. + free(sym_match_arr[i]);
  14534. + free(sym_match_arr);
  14535. + }
  14536. regfree(&re);
  14537. return sym_arr;
  14538. }
  14539. +/*
  14540. + * When we check for recursive dependencies we use a stack to save
  14541. + * current state so we can print out relevant info to user.
  14542. + * The entries are located on the call stack so no need to free memory.
  14543. + * Note inser() remove() must always match to properly clear the stack.
  14544. + */
  14545. +static struct dep_stack {
  14546. + struct dep_stack *prev, *next;
  14547. + struct symbol *sym;
  14548. + struct property *prop;
  14549. + struct expr *expr;
  14550. +} *check_top;
  14551. +
  14552. +static void dep_stack_insert(struct dep_stack *stack, struct symbol *sym)
  14553. +{
  14554. + memset(stack, 0, sizeof(*stack));
  14555. + if (check_top)
  14556. + check_top->next = stack;
  14557. + stack->prev = check_top;
  14558. + stack->sym = sym;
  14559. + check_top = stack;
  14560. +}
  14561. +
  14562. +static void dep_stack_remove(void)
  14563. +{
  14564. + check_top = check_top->prev;
  14565. + if (check_top)
  14566. + check_top->next = NULL;
  14567. +}
  14568. +
  14569. +/*
  14570. + * Called when we have detected a recursive dependency.
  14571. + * check_top point to the top of the stact so we use
  14572. + * the ->prev pointer to locate the bottom of the stack.
  14573. + */
  14574. +static void sym_check_print_recursive(struct symbol *last_sym)
  14575. +{
  14576. + struct dep_stack *stack;
  14577. + struct symbol *sym, *next_sym;
  14578. + struct menu *menu = NULL;
  14579. + struct property *prop;
  14580. + struct dep_stack cv_stack;
  14581. +
  14582. + if (sym_is_choice_value(last_sym)) {
  14583. + dep_stack_insert(&cv_stack, last_sym);
  14584. + last_sym = prop_get_symbol(sym_get_choice_prop(last_sym));
  14585. + }
  14586. +
  14587. + for (stack = check_top; stack != NULL; stack = stack->prev)
  14588. + if (stack->sym == last_sym)
  14589. + break;
  14590. + if (!stack) {
  14591. + fprintf(stderr, "unexpected recursive dependency error\n");
  14592. + return;
  14593. + }
  14594. +
  14595. + for (; stack; stack = stack->next) {
  14596. + sym = stack->sym;
  14597. + next_sym = stack->next ? stack->next->sym : last_sym;
  14598. + prop = stack->prop;
  14599. + if (prop == NULL)
  14600. + prop = stack->sym->prop;
  14601. +
  14602. + /* for choice values find the menu entry (used below) */
  14603. + if (sym_is_choice(sym) || sym_is_choice_value(sym)) {
  14604. + for (prop = sym->prop; prop; prop = prop->next) {
  14605. + menu = prop->menu;
  14606. + if (prop->menu)
  14607. + break;
  14608. + }
  14609. + }
  14610. + if (stack->sym == last_sym)
  14611. + fprintf(stderr, "%s:%d:error: recursive dependency detected!\n",
  14612. + prop->file->name, prop->lineno);
  14613. + if (stack->expr) {
  14614. + fprintf(stderr, "%s:%d:\tsymbol %s %s value contains %s\n",
  14615. + prop->file->name, prop->lineno,
  14616. + sym->name ? sym->name : "<choice>",
  14617. + prop_get_type_name(prop->type),
  14618. + next_sym->name ? next_sym->name : "<choice>");
  14619. + } else if (stack->prop) {
  14620. + fprintf(stderr, "%s:%d:\tsymbol %s depends on %s\n",
  14621. + prop->file->name, prop->lineno,
  14622. + sym->name ? sym->name : "<choice>",
  14623. + next_sym->name ? next_sym->name : "<choice>");
  14624. + } else if (sym_is_choice(sym)) {
  14625. + fprintf(stderr, "%s:%d:\tchoice %s contains symbol %s\n",
  14626. + menu->file->name, menu->lineno,
  14627. + sym->name ? sym->name : "<choice>",
  14628. + next_sym->name ? next_sym->name : "<choice>");
  14629. + } else if (sym_is_choice_value(sym)) {
  14630. + fprintf(stderr, "%s:%d:\tsymbol %s is part of choice %s\n",
  14631. + menu->file->name, menu->lineno,
  14632. + sym->name ? sym->name : "<choice>",
  14633. + next_sym->name ? next_sym->name : "<choice>");
  14634. + } else {
  14635. + fprintf(stderr, "%s:%d:\tsymbol %s is selected by %s\n",
  14636. + prop->file->name, prop->lineno,
  14637. + sym->name ? sym->name : "<choice>",
  14638. + next_sym->name ? next_sym->name : "<choice>");
  14639. + }
  14640. + }
  14641. +
  14642. + if (check_top == &cv_stack)
  14643. + dep_stack_remove();
  14644. +}
  14645. static struct symbol *sym_check_expr_deps(struct expr *e)
  14646. {
  14647. @@ -795,24 +1193,33 @@
  14648. {
  14649. struct symbol *sym2;
  14650. struct property *prop;
  14651. + struct dep_stack stack;
  14652. +
  14653. + dep_stack_insert(&stack, sym);
  14654. sym2 = sym_check_expr_deps(sym->rev_dep.expr);
  14655. if (sym2)
  14656. - return sym2;
  14657. + goto out;
  14658. for (prop = sym->prop; prop; prop = prop->next) {
  14659. if (prop->type == P_CHOICE || prop->type == P_SELECT)
  14660. continue;
  14661. + stack.prop = prop;
  14662. sym2 = sym_check_expr_deps(prop->visible.expr);
  14663. if (sym2)
  14664. break;
  14665. if (prop->type != P_DEFAULT || sym_is_choice(sym))
  14666. continue;
  14667. + stack.expr = prop->expr;
  14668. sym2 = sym_check_expr_deps(prop->expr);
  14669. if (sym2)
  14670. break;
  14671. + stack.expr = NULL;
  14672. }
  14673. +out:
  14674. + dep_stack_remove();
  14675. +
  14676. return sym2;
  14677. }
  14678. @@ -821,6 +1228,9 @@
  14679. struct symbol *sym, *sym2;
  14680. struct property *prop;
  14681. struct expr *e;
  14682. + struct dep_stack stack;
  14683. +
  14684. + dep_stack_insert(&stack, choice);
  14685. prop = sym_get_choice_prop(choice);
  14686. expr_list_for_each_sym(prop->expr, e, sym)
  14687. @@ -834,10 +1244,8 @@
  14688. expr_list_for_each_sym(prop->expr, e, sym) {
  14689. sym2 = sym_check_sym_deps(sym);
  14690. - if (sym2) {
  14691. - fprintf(stderr, " -> %s", sym->name);
  14692. + if (sym2)
  14693. break;
  14694. - }
  14695. }
  14696. out:
  14697. expr_list_for_each_sym(prop->expr, e, sym)
  14698. @@ -847,6 +1255,8 @@
  14699. prop_get_symbol(sym_get_choice_prop(sym2)) == choice)
  14700. sym2 = choice;
  14701. + dep_stack_remove();
  14702. +
  14703. return sym2;
  14704. }
  14705. @@ -856,18 +1266,20 @@
  14706. struct property *prop;
  14707. if (sym->flags & SYMBOL_CHECK) {
  14708. - fprintf(stderr, "%s:%d:error: found recursive dependency: %s",
  14709. - sym->prop->file->name, sym->prop->lineno,
  14710. - sym->name ? sym->name : "<choice>");
  14711. + sym_check_print_recursive(sym);
  14712. return sym;
  14713. }
  14714. if (sym->flags & SYMBOL_CHECKED)
  14715. return NULL;
  14716. if (sym_is_choice_value(sym)) {
  14717. + struct dep_stack stack;
  14718. +
  14719. /* for choice groups start the check with main choice symbol */
  14720. + dep_stack_insert(&stack, sym);
  14721. prop = sym_get_choice_prop(sym);
  14722. sym2 = sym_check_deps(prop_get_symbol(prop));
  14723. + dep_stack_remove();
  14724. } else if (sym_is_choice(sym)) {
  14725. sym2 = sym_check_choice_deps(sym);
  14726. } else {
  14727. @@ -876,14 +1288,8 @@
  14728. sym->flags &= ~SYMBOL_CHECK;
  14729. }
  14730. - if (sym2) {
  14731. - fprintf(stderr, " -> %s", sym->name ? sym->name : "<choice>");
  14732. - if (sym2 == sym) {
  14733. - fprintf(stderr, "\n");
  14734. - zconfnerrs++;
  14735. - sym2 = NULL;
  14736. - }
  14737. - }
  14738. + if (sym2 && sym2 == sym)
  14739. + sym2 = NULL;
  14740. return sym2;
  14741. }
  14742. @@ -893,7 +1299,7 @@
  14743. struct property *prop;
  14744. struct property **propp;
  14745. - prop = malloc(sizeof(*prop));
  14746. + prop = xmalloc(sizeof(*prop));
  14747. memset(prop, 0, sizeof(*prop));
  14748. prop->type = type;
  14749. prop->sym = sym;
  14750. @@ -937,13 +1343,15 @@
  14751. return "select";
  14752. case P_RANGE:
  14753. return "range";
  14754. + case P_SYMBOL:
  14755. + return "symbol";
  14756. case P_UNKNOWN:
  14757. break;
  14758. }
  14759. return "unknown";
  14760. }
  14761. -void prop_add_env(const char *env)
  14762. +static void prop_add_env(const char *env)
  14763. {
  14764. struct symbol *sym, *sym2;
  14765. struct property *prop;
  14766. diff -Nur uClibc-0.9.33.2/extra/config/util.c uClibc-git/extra/config/util.c
  14767. --- uClibc-0.9.33.2/extra/config/util.c 2012-05-15 09:20:09.000000000 +0200
  14768. +++ uClibc-git/extra/config/util.c 2014-07-25 20:36:04.865324519 +0200
  14769. @@ -5,6 +5,8 @@
  14770. * Released under the terms of the GNU GPL v2.0.
  14771. */
  14772. +#include <stdarg.h>
  14773. +#include <stdlib.h>
  14774. #include <string.h>
  14775. #include "lkc.h"
  14776. @@ -12,15 +14,18 @@
  14777. struct file *file_lookup(const char *name)
  14778. {
  14779. struct file *file;
  14780. + const char *file_name = sym_expand_string_value(name);
  14781. for (file = file_list; file; file = file->next) {
  14782. - if (!strcmp(name, file->name))
  14783. + if (!strcmp(name, file->name)) {
  14784. + free((void *)file_name);
  14785. return file;
  14786. + }
  14787. }
  14788. - file = malloc(sizeof(*file));
  14789. + file = xmalloc(sizeof(*file));
  14790. memset(file, 0, sizeof(*file));
  14791. - file->name = strdup(name);
  14792. + file->name = file_name;
  14793. file->next = file_list;
  14794. file_list = file;
  14795. return file;
  14796. @@ -32,11 +37,15 @@
  14797. struct symbol *sym, *env_sym;
  14798. struct expr *e;
  14799. struct file *file;
  14800. + char tmpf[PATH_MAX+1];
  14801. FILE *out;
  14802. if (!name)
  14803. name = ".kconfig.d";
  14804. - out = fopen("..config.tmp", "w");
  14805. + strcpy(tmpf, name);
  14806. + dir_name(tmpf);
  14807. + strcat(tmpf, "..config.tmp");
  14808. + out = fopen(tmpf, "w");
  14809. if (!out)
  14810. return 1;
  14811. fprintf(out, "deps_config := \\\n");
  14812. @@ -46,8 +55,8 @@
  14813. else
  14814. fprintf(out, "\t%s\n", file->name);
  14815. }
  14816. - fprintf(out, "\ninclude/config/auto.conf: \\\n"
  14817. - "\t$(deps_config)\n\n");
  14818. + fprintf(out, "\n%s: \\\n"
  14819. + "\t$(deps_config)\n\n", conf_get_autoconfig_name());
  14820. expr_list_for_each_sym(sym_env_list, e, sym) {
  14821. struct property *prop;
  14822. @@ -61,23 +70,24 @@
  14823. if (!value)
  14824. value = "";
  14825. fprintf(out, "ifneq \"$(%s)\" \"%s\"\n", env_sym->name, value);
  14826. - fprintf(out, "include/config/auto.conf: FORCE\n");
  14827. + fprintf(out, "%s: FORCE\n", conf_get_autoconfig_name());
  14828. fprintf(out, "endif\n");
  14829. }
  14830. fprintf(out, "\n$(deps_config): ;\n");
  14831. fclose(out);
  14832. - rename("..config.tmp", name);
  14833. + rename(tmpf, name);
  14834. return 0;
  14835. }
  14836. -/* Allocate initial growable sting */
  14837. +/* Allocate initial growable string */
  14838. struct gstr str_new(void)
  14839. {
  14840. struct gstr gs;
  14841. - gs.s = malloc(sizeof(char) * 64);
  14842. + gs.s = xmalloc(sizeof(char) * 64);
  14843. gs.len = 64;
  14844. + gs.max_width = 0;
  14845. strcpy(gs.s, "\0");
  14846. return gs;
  14847. }
  14848. @@ -88,6 +98,7 @@
  14849. struct gstr gs;
  14850. gs.s = strdup(s);
  14851. gs.len = strlen(s) + 1;
  14852. + gs.max_width = 0;
  14853. return gs;
  14854. }
  14855. @@ -131,3 +142,40 @@
  14856. return gs->s;
  14857. }
  14858. +void *xmalloc(size_t size)
  14859. +{
  14860. + void *p = malloc(size);
  14861. + if (p)
  14862. + return p;
  14863. + fprintf(stderr, "Out of memory.\n");
  14864. + exit(1);
  14865. +}
  14866. +
  14867. +void *xcalloc(size_t nmemb, size_t size)
  14868. +{
  14869. + void *p = calloc(nmemb, size);
  14870. + if (p)
  14871. + return p;
  14872. + fprintf(stderr, "Out of memory.\n");
  14873. + exit(1);
  14874. +}
  14875. +
  14876. +/* basename, dirname - parse pathname components */
  14877. +char *dir_name(char *path)
  14878. +{
  14879. + char *slash = strrchr(path, '/');
  14880. + int size = 0;
  14881. + if (slash)
  14882. + size = slash - path + 1;
  14883. + path[size] = 0;
  14884. + return path;
  14885. +}
  14886. +char *base_name(char *path)
  14887. +{
  14888. + char *slash = strrchr(path, '/');
  14889. + if (slash)
  14890. + path += slash - path + 1;
  14891. + return path;
  14892. +
  14893. +}
  14894. +
  14895. diff -Nur uClibc-0.9.33.2/extra/config/zconf.gperf uClibc-git/extra/config/zconf.gperf
  14896. --- uClibc-0.9.33.2/extra/config/zconf.gperf 2012-05-15 09:20:09.000000000 +0200
  14897. +++ uClibc-git/extra/config/zconf.gperf 2014-07-25 20:36:04.865324519 +0200
  14898. @@ -9,6 +9,8 @@
  14899. struct kconf_id;
  14900. +static const struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
  14901. +
  14902. %%
  14903. mainmenu, T_MAINMENU, TF_COMMAND
  14904. menu, T_MENU, TF_COMMAND
  14905. @@ -36,6 +38,7 @@
  14906. string, T_TYPE, TF_COMMAND, S_STRING
  14907. select, T_SELECT, TF_COMMAND
  14908. range, T_RANGE, TF_COMMAND
  14909. +visible, T_VISIBLE, TF_COMMAND
  14910. option, T_OPTION, TF_COMMAND
  14911. on, T_ON, TF_PARAM
  14912. modules, T_OPT_MODULES, TF_OPTION
  14913. diff -Nur uClibc-0.9.33.2/extra/config/zconf.hash.c_shipped uClibc-git/extra/config/zconf.hash.c_shipped
  14914. --- uClibc-0.9.33.2/extra/config/zconf.hash.c_shipped 2012-05-15 09:20:09.000000000 +0200
  14915. +++ uClibc-git/extra/config/zconf.hash.c_shipped 2014-07-25 20:36:04.865324519 +0200
  14916. @@ -1,6 +1,5 @@
  14917. -/* ANSI-C code produced by gperf version 3.0.3 */
  14918. -/* Command-line: gperf */
  14919. -/* Computed positions: -k'1,3' */
  14920. +/* ANSI-C code produced by gperf version 3.0.4 */
  14921. +/* Command-line: gperf -t --output-file scripts/kconfig/zconf.hash.c_shipped -a -C -E -g -k '1,3,$' -p -t scripts/kconfig/zconf.gperf */
  14922. #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
  14923. && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
  14924. @@ -29,8 +28,11 @@
  14925. #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
  14926. #endif
  14927. +#line 10 "scripts/kconfig/zconf.gperf"
  14928. struct kconf_id;
  14929. -/* maximum key range = 47, duplicates = 0 */
  14930. +
  14931. +static const struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
  14932. +/* maximum key range = 71, duplicates = 0 */
  14933. #ifdef __GNUC__
  14934. __inline
  14935. @@ -42,34 +44,34 @@
  14936. static unsigned int
  14937. kconf_id_hash (register const char *str, register unsigned int len)
  14938. {
  14939. - static unsigned char asso_values[] =
  14940. + static const unsigned char asso_values[] =
  14941. {
  14942. - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  14943. - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  14944. - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  14945. - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  14946. - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  14947. - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  14948. - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  14949. - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  14950. - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  14951. - 49, 49, 49, 49, 49, 49, 49, 49, 11, 5,
  14952. - 0, 0, 5, 49, 5, 20, 49, 49, 5, 20,
  14953. - 5, 0, 30, 49, 0, 15, 0, 10, 0, 49,
  14954. - 25, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  14955. - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  14956. - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  14957. - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  14958. - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  14959. - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  14960. - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  14961. - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  14962. - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  14963. - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  14964. - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  14965. - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  14966. - 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
  14967. - 49, 49, 49, 49, 49, 49
  14968. + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
  14969. + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
  14970. + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
  14971. + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
  14972. + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
  14973. + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
  14974. + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
  14975. + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
  14976. + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
  14977. + 73, 73, 73, 73, 73, 73, 73, 73, 25, 25,
  14978. + 0, 0, 0, 5, 0, 0, 73, 73, 5, 0,
  14979. + 10, 5, 45, 73, 20, 20, 0, 15, 15, 73,
  14980. + 20, 73, 73, 73, 73, 73, 73, 73, 73, 73,
  14981. + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
  14982. + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
  14983. + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
  14984. + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
  14985. + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
  14986. + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
  14987. + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
  14988. + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
  14989. + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
  14990. + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
  14991. + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
  14992. + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
  14993. + 73, 73, 73, 73, 73, 73
  14994. };
  14995. register int hval = len;
  14996. @@ -83,137 +85,183 @@
  14997. hval += asso_values[(unsigned char)str[0]];
  14998. break;
  14999. }
  15000. - return hval;
  15001. + return hval + asso_values[(unsigned char)str[len - 1]];
  15002. }
  15003. struct kconf_id_strings_t
  15004. {
  15005. - char kconf_id_strings_str2[sizeof("on")];
  15006. - char kconf_id_strings_str3[sizeof("env")];
  15007. + char kconf_id_strings_str2[sizeof("if")];
  15008. + char kconf_id_strings_str3[sizeof("int")];
  15009. char kconf_id_strings_str5[sizeof("endif")];
  15010. - char kconf_id_strings_str6[sizeof("option")];
  15011. - char kconf_id_strings_str7[sizeof("endmenu")];
  15012. - char kconf_id_strings_str8[sizeof("optional")];
  15013. + char kconf_id_strings_str7[sizeof("default")];
  15014. + char kconf_id_strings_str8[sizeof("tristate")];
  15015. char kconf_id_strings_str9[sizeof("endchoice")];
  15016. - char kconf_id_strings_str10[sizeof("range")];
  15017. - char kconf_id_strings_str11[sizeof("choice")];
  15018. - char kconf_id_strings_str12[sizeof("default")];
  15019. + char kconf_id_strings_str12[sizeof("def_tristate")];
  15020. char kconf_id_strings_str13[sizeof("def_bool")];
  15021. - char kconf_id_strings_str14[sizeof("help")];
  15022. - char kconf_id_strings_str15[sizeof("bool")];
  15023. - char kconf_id_strings_str16[sizeof("config")];
  15024. - char kconf_id_strings_str17[sizeof("def_tristate")];
  15025. - char kconf_id_strings_str18[sizeof("boolean")];
  15026. - char kconf_id_strings_str19[sizeof("defconfig_list")];
  15027. - char kconf_id_strings_str21[sizeof("string")];
  15028. - char kconf_id_strings_str22[sizeof("if")];
  15029. - char kconf_id_strings_str23[sizeof("int")];
  15030. - char kconf_id_strings_str26[sizeof("select")];
  15031. + char kconf_id_strings_str14[sizeof("defconfig_list")];
  15032. + char kconf_id_strings_str17[sizeof("on")];
  15033. + char kconf_id_strings_str18[sizeof("optional")];
  15034. + char kconf_id_strings_str21[sizeof("option")];
  15035. + char kconf_id_strings_str22[sizeof("endmenu")];
  15036. + char kconf_id_strings_str23[sizeof("mainmenu")];
  15037. + char kconf_id_strings_str25[sizeof("menuconfig")];
  15038. char kconf_id_strings_str27[sizeof("modules")];
  15039. - char kconf_id_strings_str28[sizeof("tristate")];
  15040. char kconf_id_strings_str29[sizeof("menu")];
  15041. - char kconf_id_strings_str31[sizeof("source")];
  15042. + char kconf_id_strings_str31[sizeof("select")];
  15043. char kconf_id_strings_str32[sizeof("comment")];
  15044. - char kconf_id_strings_str33[sizeof("hex")];
  15045. - char kconf_id_strings_str35[sizeof("menuconfig")];
  15046. - char kconf_id_strings_str36[sizeof("prompt")];
  15047. - char kconf_id_strings_str37[sizeof("depends")];
  15048. - char kconf_id_strings_str48[sizeof("mainmenu")];
  15049. + char kconf_id_strings_str33[sizeof("env")];
  15050. + char kconf_id_strings_str35[sizeof("range")];
  15051. + char kconf_id_strings_str36[sizeof("choice")];
  15052. + char kconf_id_strings_str39[sizeof("bool")];
  15053. + char kconf_id_strings_str41[sizeof("source")];
  15054. + char kconf_id_strings_str42[sizeof("visible")];
  15055. + char kconf_id_strings_str43[sizeof("hex")];
  15056. + char kconf_id_strings_str46[sizeof("config")];
  15057. + char kconf_id_strings_str47[sizeof("boolean")];
  15058. + char kconf_id_strings_str51[sizeof("string")];
  15059. + char kconf_id_strings_str54[sizeof("help")];
  15060. + char kconf_id_strings_str56[sizeof("prompt")];
  15061. + char kconf_id_strings_str72[sizeof("depends")];
  15062. };
  15063. -static struct kconf_id_strings_t kconf_id_strings_contents =
  15064. +static const struct kconf_id_strings_t kconf_id_strings_contents =
  15065. {
  15066. - "on",
  15067. - "env",
  15068. + "if",
  15069. + "int",
  15070. "endif",
  15071. + "default",
  15072. + "tristate",
  15073. + "endchoice",
  15074. + "def_tristate",
  15075. + "def_bool",
  15076. + "defconfig_list",
  15077. + "on",
  15078. + "optional",
  15079. "option",
  15080. "endmenu",
  15081. - "optional",
  15082. - "endchoice",
  15083. + "mainmenu",
  15084. + "menuconfig",
  15085. + "modules",
  15086. + "menu",
  15087. + "select",
  15088. + "comment",
  15089. + "env",
  15090. "range",
  15091. "choice",
  15092. - "default",
  15093. - "def_bool",
  15094. - "help",
  15095. "bool",
  15096. + "source",
  15097. + "visible",
  15098. + "hex",
  15099. "config",
  15100. - "def_tristate",
  15101. "boolean",
  15102. - "defconfig_list",
  15103. "string",
  15104. - "if",
  15105. - "int",
  15106. - "select",
  15107. - "modules",
  15108. - "tristate",
  15109. - "menu",
  15110. - "source",
  15111. - "comment",
  15112. - "hex",
  15113. - "menuconfig",
  15114. + "help",
  15115. "prompt",
  15116. - "depends",
  15117. - "mainmenu"
  15118. + "depends"
  15119. };
  15120. #define kconf_id_strings ((const char *) &kconf_id_strings_contents)
  15121. #ifdef __GNUC__
  15122. __inline
  15123. -#ifdef __GNUC_STDC_INLINE__
  15124. +#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
  15125. __attribute__ ((__gnu_inline__))
  15126. #endif
  15127. #endif
  15128. -struct kconf_id *
  15129. +const struct kconf_id *
  15130. kconf_id_lookup (register const char *str, register unsigned int len)
  15131. {
  15132. enum
  15133. {
  15134. - TOTAL_KEYWORDS = 31,
  15135. + TOTAL_KEYWORDS = 32,
  15136. MIN_WORD_LENGTH = 2,
  15137. MAX_WORD_LENGTH = 14,
  15138. MIN_HASH_VALUE = 2,
  15139. - MAX_HASH_VALUE = 48
  15140. + MAX_HASH_VALUE = 72
  15141. };
  15142. - static struct kconf_id wordlist[] =
  15143. + static const struct kconf_id wordlist[] =
  15144. {
  15145. {-1}, {-1},
  15146. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_ON, TF_PARAM},
  15147. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3, T_OPT_ENV, TF_OPTION},
  15148. +#line 25 "scripts/kconfig/zconf.gperf"
  15149. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_IF, TF_COMMAND|TF_PARAM},
  15150. +#line 36 "scripts/kconfig/zconf.gperf"
  15151. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3, T_TYPE, TF_COMMAND, S_INT},
  15152. {-1},
  15153. +#line 26 "scripts/kconfig/zconf.gperf"
  15154. {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str5, T_ENDIF, TF_COMMAND},
  15155. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str6, T_OPTION, TF_COMMAND},
  15156. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_ENDMENU, TF_COMMAND},
  15157. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_OPTIONAL, TF_COMMAND},
  15158. + {-1},
  15159. +#line 29 "scripts/kconfig/zconf.gperf"
  15160. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_DEFAULT, TF_COMMAND, S_UNKNOWN},
  15161. +#line 31 "scripts/kconfig/zconf.gperf"
  15162. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_TYPE, TF_COMMAND, S_TRISTATE},
  15163. +#line 20 "scripts/kconfig/zconf.gperf"
  15164. {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str9, T_ENDCHOICE, TF_COMMAND},
  15165. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str10, T_RANGE, TF_COMMAND},
  15166. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str11, T_CHOICE, TF_COMMAND},
  15167. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_UNKNOWN},
  15168. + {-1}, {-1},
  15169. +#line 32 "scripts/kconfig/zconf.gperf"
  15170. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_TRISTATE},
  15171. +#line 35 "scripts/kconfig/zconf.gperf"
  15172. {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN},
  15173. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_HELP, TF_COMMAND},
  15174. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str15, T_TYPE, TF_COMMAND, S_BOOLEAN},
  15175. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str16, T_CONFIG, TF_COMMAND},
  15176. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_DEFAULT, TF_COMMAND, S_TRISTATE},
  15177. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_TYPE, TF_COMMAND, S_BOOLEAN},
  15178. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str19, T_OPT_DEFCONFIG_LIST,TF_OPTION},
  15179. - {-1},
  15180. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_TYPE, TF_COMMAND, S_STRING},
  15181. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_IF, TF_COMMAND|TF_PARAM},
  15182. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_TYPE, TF_COMMAND, S_INT},
  15183. +#line 45 "scripts/kconfig/zconf.gperf"
  15184. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_OPT_DEFCONFIG_LIST,TF_OPTION},
  15185. + {-1}, {-1},
  15186. +#line 43 "scripts/kconfig/zconf.gperf"
  15187. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_ON, TF_PARAM},
  15188. +#line 28 "scripts/kconfig/zconf.gperf"
  15189. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_OPTIONAL, TF_COMMAND},
  15190. {-1}, {-1},
  15191. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str26, T_SELECT, TF_COMMAND},
  15192. +#line 42 "scripts/kconfig/zconf.gperf"
  15193. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_OPTION, TF_COMMAND},
  15194. +#line 17 "scripts/kconfig/zconf.gperf"
  15195. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ENDMENU, TF_COMMAND},
  15196. +#line 15 "scripts/kconfig/zconf.gperf"
  15197. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_MAINMENU, TF_COMMAND},
  15198. + {-1},
  15199. +#line 23 "scripts/kconfig/zconf.gperf"
  15200. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str25, T_MENUCONFIG, TF_COMMAND},
  15201. + {-1},
  15202. +#line 44 "scripts/kconfig/zconf.gperf"
  15203. {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION},
  15204. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str28, T_TYPE, TF_COMMAND, S_TRISTATE},
  15205. + {-1},
  15206. +#line 16 "scripts/kconfig/zconf.gperf"
  15207. {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND},
  15208. {-1},
  15209. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_SOURCE, TF_COMMAND},
  15210. +#line 39 "scripts/kconfig/zconf.gperf"
  15211. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_SELECT, TF_COMMAND},
  15212. +#line 21 "scripts/kconfig/zconf.gperf"
  15213. {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND},
  15214. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_TYPE, TF_COMMAND, S_HEX},
  15215. +#line 46 "scripts/kconfig/zconf.gperf"
  15216. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_OPT_ENV, TF_OPTION},
  15217. {-1},
  15218. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_MENUCONFIG, TF_COMMAND},
  15219. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_PROMPT, TF_COMMAND},
  15220. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str37, T_DEPENDS, TF_COMMAND},
  15221. - {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
  15222. +#line 40 "scripts/kconfig/zconf.gperf"
  15223. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_RANGE, TF_COMMAND},
  15224. +#line 19 "scripts/kconfig/zconf.gperf"
  15225. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_CHOICE, TF_COMMAND},
  15226. + {-1}, {-1},
  15227. +#line 33 "scripts/kconfig/zconf.gperf"
  15228. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str39, T_TYPE, TF_COMMAND, S_BOOLEAN},
  15229. + {-1},
  15230. +#line 18 "scripts/kconfig/zconf.gperf"
  15231. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_SOURCE, TF_COMMAND},
  15232. +#line 41 "scripts/kconfig/zconf.gperf"
  15233. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_VISIBLE, TF_COMMAND},
  15234. +#line 37 "scripts/kconfig/zconf.gperf"
  15235. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str43, T_TYPE, TF_COMMAND, S_HEX},
  15236. + {-1}, {-1},
  15237. +#line 22 "scripts/kconfig/zconf.gperf"
  15238. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_CONFIG, TF_COMMAND},
  15239. +#line 34 "scripts/kconfig/zconf.gperf"
  15240. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str47, T_TYPE, TF_COMMAND, S_BOOLEAN},
  15241. + {-1}, {-1}, {-1},
  15242. +#line 38 "scripts/kconfig/zconf.gperf"
  15243. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51, T_TYPE, TF_COMMAND, S_STRING},
  15244. + {-1}, {-1},
  15245. +#line 24 "scripts/kconfig/zconf.gperf"
  15246. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str54, T_HELP, TF_COMMAND},
  15247. {-1},
  15248. - {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str48, T_MAINMENU, TF_COMMAND}
  15249. +#line 30 "scripts/kconfig/zconf.gperf"
  15250. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str56, T_PROMPT, TF_COMMAND},
  15251. + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
  15252. + {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
  15253. +#line 27 "scripts/kconfig/zconf.gperf"
  15254. + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str72, T_DEPENDS, TF_COMMAND}
  15255. };
  15256. if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
  15257. @@ -234,4 +282,5 @@
  15258. }
  15259. return 0;
  15260. }
  15261. +#line 47 "scripts/kconfig/zconf.gperf"
  15262. diff -Nur uClibc-0.9.33.2/extra/config/zconf.l uClibc-git/extra/config/zconf.l
  15263. --- uClibc-0.9.33.2/extra/config/zconf.l 2012-05-15 09:20:09.000000000 +0200
  15264. +++ uClibc-git/extra/config/zconf.l 2014-07-25 20:36:04.865324519 +0200
  15265. @@ -1,5 +1,5 @@
  15266. -%option backup nostdinit noyywrap never-interactive full ecs
  15267. -%option 8bit backup nodefault perf-report perf-report
  15268. +%option nostdinit noyywrap never-interactive full ecs
  15269. +%option 8bit nodefault perf-report perf-report
  15270. %option noinput
  15271. %x COMMAND HELP STRING PARAM
  15272. %{
  15273. @@ -14,7 +14,6 @@
  15274. #include <string.h>
  15275. #include <unistd.h>
  15276. -#define LKC_DIRECT_LINK
  15277. #include "lkc.h"
  15278. #define START_STRSIZE 16
  15279. @@ -39,15 +38,15 @@
  15280. static void zconf_endhelp(void);
  15281. static void zconf_endfile(void);
  15282. -void new_string(void)
  15283. +static void new_string(void)
  15284. {
  15285. - text = malloc(START_STRSIZE);
  15286. + text = xmalloc(START_STRSIZE);
  15287. text_asize = START_STRSIZE;
  15288. text_size = 0;
  15289. *text = 0;
  15290. }
  15291. -void append_string(const char *str, int size)
  15292. +static void append_string(const char *str, int size)
  15293. {
  15294. int new_size = text_size + size + 1;
  15295. if (new_size > text_asize) {
  15296. @@ -61,9 +60,9 @@
  15297. text[text_size] = 0;
  15298. }
  15299. -void alloc_string(const char *str, int size)
  15300. +static void alloc_string(const char *str, int size)
  15301. {
  15302. - text = malloc(size + 1);
  15303. + text = xmalloc(size + 1);
  15304. memcpy(text, str, size);
  15305. text[size] = 0;
  15306. }
  15307. @@ -96,7 +95,7 @@
  15308. <COMMAND>{
  15309. {n}+ {
  15310. - struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
  15311. + const struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
  15312. BEGIN(PARAM);
  15313. current_pos.file = current_file;
  15314. current_pos.lineno = current_file->lineno;
  15315. @@ -132,7 +131,7 @@
  15316. \n BEGIN(INITIAL); current_file->lineno++; return T_EOL;
  15317. --- /* ignore */
  15318. ({n}|[-/.])+ {
  15319. - struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
  15320. + const struct kconf_id *id = kconf_id_lookup(yytext, yyleng);
  15321. if (id && id->flags & TF_PARAM) {
  15322. zconflval.id = id;
  15323. return id->token;
  15324. @@ -289,42 +288,50 @@
  15325. exit(1);
  15326. }
  15327. - current_buf = malloc(sizeof(*current_buf));
  15328. + current_buf = xmalloc(sizeof(*current_buf));
  15329. memset(current_buf, 0, sizeof(*current_buf));
  15330. current_file = file_lookup(name);
  15331. current_file->lineno = 1;
  15332. - current_file->flags = FILE_BUSY;
  15333. }
  15334. void zconf_nextfile(const char *name)
  15335. {
  15336. + struct file *iter;
  15337. struct file *file = file_lookup(name);
  15338. - struct buffer *buf = malloc(sizeof(*buf));
  15339. + struct buffer *buf = xmalloc(sizeof(*buf));
  15340. memset(buf, 0, sizeof(*buf));
  15341. current_buf->state = YY_CURRENT_BUFFER;
  15342. - yyin = zconf_fopen(name);
  15343. + yyin = zconf_fopen(file->name);
  15344. if (!yyin) {
  15345. - printf("%s:%d: can't open file \"%s\"\n", zconf_curname(), zconf_lineno(), name);
  15346. + printf("%s:%d: can't open file \"%s\"\n",
  15347. + zconf_curname(), zconf_lineno(), file->name);
  15348. exit(1);
  15349. }
  15350. yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
  15351. buf->parent = current_buf;
  15352. current_buf = buf;
  15353. - if (file->flags & FILE_BUSY) {
  15354. - printf("%s:%d: do not source '%s' from itself\n",
  15355. - zconf_curname(), zconf_lineno(), name);
  15356. - exit(1);
  15357. - }
  15358. - if (file->flags & FILE_SCANNED) {
  15359. - printf("%s:%d: file '%s' is already sourced from '%s'\n",
  15360. - zconf_curname(), zconf_lineno(), name,
  15361. - file->parent->name);
  15362. - exit(1);
  15363. + for (iter = current_file->parent; iter; iter = iter->parent ) {
  15364. + if (!strcmp(current_file->name,iter->name) ) {
  15365. + printf("%s:%d: recursive inclusion detected. "
  15366. + "Inclusion path:\n current file : '%s'\n",
  15367. + zconf_curname(), zconf_lineno(),
  15368. + zconf_curname());
  15369. + iter = current_file->parent;
  15370. + while (iter && \
  15371. + strcmp(iter->name,current_file->name)) {
  15372. + printf(" included from: '%s:%d'\n",
  15373. + iter->name, iter->lineno-1);
  15374. + iter = iter->parent;
  15375. + }
  15376. + if (iter)
  15377. + printf(" included from: '%s:%d'\n",
  15378. + iter->name, iter->lineno+1);
  15379. + exit(1);
  15380. + }
  15381. }
  15382. - file->flags |= FILE_BUSY;
  15383. file->lineno = 1;
  15384. file->parent = current_file;
  15385. current_file = file;
  15386. @@ -334,8 +341,6 @@
  15387. {
  15388. struct buffer *parent;
  15389. - current_file->flags |= FILE_SCANNED;
  15390. - current_file->flags &= ~FILE_BUSY;
  15391. current_file = current_file->parent;
  15392. parent = current_buf->parent;
  15393. @@ -353,7 +358,7 @@
  15394. return current_pos.lineno;
  15395. }
  15396. -char *zconf_curname(void)
  15397. +const char *zconf_curname(void)
  15398. {
  15399. return current_pos.file ? current_pos.file->name : "<none>";
  15400. }
  15401. diff -Nur uClibc-0.9.33.2/extra/config/zconf.lex.c_shipped uClibc-git/extra/config/zconf.lex.c_shipped
  15402. --- uClibc-0.9.33.2/extra/config/zconf.lex.c_shipped 1970-01-01 01:00:00.000000000 +0100
  15403. +++ uClibc-git/extra/config/zconf.lex.c_shipped 2014-07-25 20:36:04.865324519 +0200
  15404. @@ -0,0 +1,2420 @@
  15405. +
  15406. +#line 3 "scripts/kconfig/zconf.lex.c_shipped"
  15407. +
  15408. +#define YY_INT_ALIGNED short int
  15409. +
  15410. +/* A lexical scanner generated by flex */
  15411. +
  15412. +#define yy_create_buffer zconf_create_buffer
  15413. +#define yy_delete_buffer zconf_delete_buffer
  15414. +#define yy_flex_debug zconf_flex_debug
  15415. +#define yy_init_buffer zconf_init_buffer
  15416. +#define yy_flush_buffer zconf_flush_buffer
  15417. +#define yy_load_buffer_state zconf_load_buffer_state
  15418. +#define yy_switch_to_buffer zconf_switch_to_buffer
  15419. +#define yyin zconfin
  15420. +#define yyleng zconfleng
  15421. +#define yylex zconflex
  15422. +#define yylineno zconflineno
  15423. +#define yyout zconfout
  15424. +#define yyrestart zconfrestart
  15425. +#define yytext zconftext
  15426. +#define yywrap zconfwrap
  15427. +#define yyalloc zconfalloc
  15428. +#define yyrealloc zconfrealloc
  15429. +#define yyfree zconffree
  15430. +
  15431. +#define FLEX_SCANNER
  15432. +#define YY_FLEX_MAJOR_VERSION 2
  15433. +#define YY_FLEX_MINOR_VERSION 5
  15434. +#define YY_FLEX_SUBMINOR_VERSION 35
  15435. +#if YY_FLEX_SUBMINOR_VERSION > 0
  15436. +#define FLEX_BETA
  15437. +#endif
  15438. +
  15439. +/* First, we deal with platform-specific or compiler-specific issues. */
  15440. +
  15441. +/* begin standard C headers. */
  15442. +#include <stdio.h>
  15443. +#include <string.h>
  15444. +#include <errno.h>
  15445. +#include <stdlib.h>
  15446. +
  15447. +/* end standard C headers. */
  15448. +
  15449. +/* flex integer type definitions */
  15450. +
  15451. +#ifndef FLEXINT_H
  15452. +#define FLEXINT_H
  15453. +
  15454. +/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
  15455. +
  15456. +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  15457. +
  15458. +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
  15459. + * if you want the limit (max/min) macros for int types.
  15460. + */
  15461. +#ifndef __STDC_LIMIT_MACROS
  15462. +#define __STDC_LIMIT_MACROS 1
  15463. +#endif
  15464. +
  15465. +#include <inttypes.h>
  15466. +typedef int8_t flex_int8_t;
  15467. +typedef uint8_t flex_uint8_t;
  15468. +typedef int16_t flex_int16_t;
  15469. +typedef uint16_t flex_uint16_t;
  15470. +typedef int32_t flex_int32_t;
  15471. +typedef uint32_t flex_uint32_t;
  15472. +#else
  15473. +typedef signed char flex_int8_t;
  15474. +typedef short int flex_int16_t;
  15475. +typedef int flex_int32_t;
  15476. +typedef unsigned char flex_uint8_t;
  15477. +typedef unsigned short int flex_uint16_t;
  15478. +typedef unsigned int flex_uint32_t;
  15479. +#endif /* ! C99 */
  15480. +
  15481. +/* Limits of integral types. */
  15482. +#ifndef INT8_MIN
  15483. +#define INT8_MIN (-128)
  15484. +#endif
  15485. +#ifndef INT16_MIN
  15486. +#define INT16_MIN (-32767-1)
  15487. +#endif
  15488. +#ifndef INT32_MIN
  15489. +#define INT32_MIN (-2147483647-1)
  15490. +#endif
  15491. +#ifndef INT8_MAX
  15492. +#define INT8_MAX (127)
  15493. +#endif
  15494. +#ifndef INT16_MAX
  15495. +#define INT16_MAX (32767)
  15496. +#endif
  15497. +#ifndef INT32_MAX
  15498. +#define INT32_MAX (2147483647)
  15499. +#endif
  15500. +#ifndef UINT8_MAX
  15501. +#define UINT8_MAX (255U)
  15502. +#endif
  15503. +#ifndef UINT16_MAX
  15504. +#define UINT16_MAX (65535U)
  15505. +#endif
  15506. +#ifndef UINT32_MAX
  15507. +#define UINT32_MAX (4294967295U)
  15508. +#endif
  15509. +
  15510. +#endif /* ! FLEXINT_H */
  15511. +
  15512. +#ifdef __cplusplus
  15513. +
  15514. +/* The "const" storage-class-modifier is valid. */
  15515. +#define YY_USE_CONST
  15516. +
  15517. +#else /* ! __cplusplus */
  15518. +
  15519. +/* C99 requires __STDC__ to be defined as 1. */
  15520. +#if defined (__STDC__)
  15521. +
  15522. +#define YY_USE_CONST
  15523. +
  15524. +#endif /* defined (__STDC__) */
  15525. +#endif /* ! __cplusplus */
  15526. +
  15527. +#ifdef YY_USE_CONST
  15528. +#define yyconst const
  15529. +#else
  15530. +#define yyconst
  15531. +#endif
  15532. +
  15533. +/* Returned upon end-of-file. */
  15534. +#define YY_NULL 0
  15535. +
  15536. +/* Promotes a possibly negative, possibly signed char to an unsigned
  15537. + * integer for use as an array index. If the signed char is negative,
  15538. + * we want to instead treat it as an 8-bit unsigned char, hence the
  15539. + * double cast.
  15540. + */
  15541. +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
  15542. +
  15543. +/* Enter a start condition. This macro really ought to take a parameter,
  15544. + * but we do it the disgusting crufty way forced on us by the ()-less
  15545. + * definition of BEGIN.
  15546. + */
  15547. +#define BEGIN (yy_start) = 1 + 2 *
  15548. +
  15549. +/* Translate the current start state into a value that can be later handed
  15550. + * to BEGIN to return to the state. The YYSTATE alias is for lex
  15551. + * compatibility.
  15552. + */
  15553. +#define YY_START (((yy_start) - 1) / 2)
  15554. +#define YYSTATE YY_START
  15555. +
  15556. +/* Action number for EOF rule of a given start state. */
  15557. +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  15558. +
  15559. +/* Special action meaning "start processing a new file". */
  15560. +#define YY_NEW_FILE zconfrestart(zconfin )
  15561. +
  15562. +#define YY_END_OF_BUFFER_CHAR 0
  15563. +
  15564. +/* Size of default input buffer. */
  15565. +#ifndef YY_BUF_SIZE
  15566. +#define YY_BUF_SIZE 16384
  15567. +#endif
  15568. +
  15569. +/* The state buf must be large enough to hold one state per character in the main buffer.
  15570. + */
  15571. +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
  15572. +
  15573. +#ifndef YY_TYPEDEF_YY_BUFFER_STATE
  15574. +#define YY_TYPEDEF_YY_BUFFER_STATE
  15575. +typedef struct yy_buffer_state *YY_BUFFER_STATE;
  15576. +#endif
  15577. +
  15578. +extern int zconfleng;
  15579. +
  15580. +extern FILE *zconfin, *zconfout;
  15581. +
  15582. +#define EOB_ACT_CONTINUE_SCAN 0
  15583. +#define EOB_ACT_END_OF_FILE 1
  15584. +#define EOB_ACT_LAST_MATCH 2
  15585. +
  15586. + #define YY_LESS_LINENO(n)
  15587. +
  15588. +/* Return all but the first "n" matched characters back to the input stream. */
  15589. +#define yyless(n) \
  15590. + do \
  15591. + { \
  15592. + /* Undo effects of setting up zconftext. */ \
  15593. + int yyless_macro_arg = (n); \
  15594. + YY_LESS_LINENO(yyless_macro_arg);\
  15595. + *yy_cp = (yy_hold_char); \
  15596. + YY_RESTORE_YY_MORE_OFFSET \
  15597. + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
  15598. + YY_DO_BEFORE_ACTION; /* set up zconftext again */ \
  15599. + } \
  15600. + while ( 0 )
  15601. +
  15602. +#define unput(c) yyunput( c, (yytext_ptr) )
  15603. +
  15604. +#ifndef YY_TYPEDEF_YY_SIZE_T
  15605. +#define YY_TYPEDEF_YY_SIZE_T
  15606. +typedef size_t yy_size_t;
  15607. +#endif
  15608. +
  15609. +#ifndef YY_STRUCT_YY_BUFFER_STATE
  15610. +#define YY_STRUCT_YY_BUFFER_STATE
  15611. +struct yy_buffer_state
  15612. + {
  15613. + FILE *yy_input_file;
  15614. +
  15615. + char *yy_ch_buf; /* input buffer */
  15616. + char *yy_buf_pos; /* current position in input buffer */
  15617. +
  15618. + /* Size of input buffer in bytes, not including room for EOB
  15619. + * characters.
  15620. + */
  15621. + yy_size_t yy_buf_size;
  15622. +
  15623. + /* Number of characters read into yy_ch_buf, not including EOB
  15624. + * characters.
  15625. + */
  15626. + int yy_n_chars;
  15627. +
  15628. + /* Whether we "own" the buffer - i.e., we know we created it,
  15629. + * and can realloc() it to grow it, and should free() it to
  15630. + * delete it.
  15631. + */
  15632. + int yy_is_our_buffer;
  15633. +
  15634. + /* Whether this is an "interactive" input source; if so, and
  15635. + * if we're using stdio for input, then we want to use getc()
  15636. + * instead of fread(), to make sure we stop fetching input after
  15637. + * each newline.
  15638. + */
  15639. + int yy_is_interactive;
  15640. +
  15641. + /* Whether we're considered to be at the beginning of a line.
  15642. + * If so, '^' rules will be active on the next match, otherwise
  15643. + * not.
  15644. + */
  15645. + int yy_at_bol;
  15646. +
  15647. + int yy_bs_lineno; /**< The line count. */
  15648. + int yy_bs_column; /**< The column count. */
  15649. +
  15650. + /* Whether to try to fill the input buffer when we reach the
  15651. + * end of it.
  15652. + */
  15653. + int yy_fill_buffer;
  15654. +
  15655. + int yy_buffer_status;
  15656. +
  15657. +#define YY_BUFFER_NEW 0
  15658. +#define YY_BUFFER_NORMAL 1
  15659. + /* When an EOF's been seen but there's still some text to process
  15660. + * then we mark the buffer as YY_EOF_PENDING, to indicate that we
  15661. + * shouldn't try reading from the input source any more. We might
  15662. + * still have a bunch of tokens to match, though, because of
  15663. + * possible backing-up.
  15664. + *
  15665. + * When we actually see the EOF, we change the status to "new"
  15666. + * (via zconfrestart()), so that the user can continue scanning by
  15667. + * just pointing zconfin at a new input file.
  15668. + */
  15669. +#define YY_BUFFER_EOF_PENDING 2
  15670. +
  15671. + };
  15672. +#endif /* !YY_STRUCT_YY_BUFFER_STATE */
  15673. +
  15674. +/* Stack of input buffers. */
  15675. +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
  15676. +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
  15677. +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
  15678. +
  15679. +/* We provide macros for accessing buffer states in case in the
  15680. + * future we want to put the buffer states in a more general
  15681. + * "scanner state".
  15682. + *
  15683. + * Returns the top of the stack, or NULL.
  15684. + */
  15685. +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
  15686. + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
  15687. + : NULL)
  15688. +
  15689. +/* Same as previous macro, but useful when we know that the buffer stack is not
  15690. + * NULL or when we need an lvalue. For internal use only.
  15691. + */
  15692. +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
  15693. +
  15694. +/* yy_hold_char holds the character lost when zconftext is formed. */
  15695. +static char yy_hold_char;
  15696. +static int yy_n_chars; /* number of characters read into yy_ch_buf */
  15697. +int zconfleng;
  15698. +
  15699. +/* Points to current character in buffer. */
  15700. +static char *yy_c_buf_p = (char *) 0;
  15701. +static int yy_init = 0; /* whether we need to initialize */
  15702. +static int yy_start = 0; /* start state number */
  15703. +
  15704. +/* Flag which is used to allow zconfwrap()'s to do buffer switches
  15705. + * instead of setting up a fresh zconfin. A bit of a hack ...
  15706. + */
  15707. +static int yy_did_buffer_switch_on_eof;
  15708. +
  15709. +void zconfrestart (FILE *input_file );
  15710. +void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer );
  15711. +YY_BUFFER_STATE zconf_create_buffer (FILE *file,int size );
  15712. +void zconf_delete_buffer (YY_BUFFER_STATE b );
  15713. +void zconf_flush_buffer (YY_BUFFER_STATE b );
  15714. +void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer );
  15715. +void zconfpop_buffer_state (void );
  15716. +
  15717. +static void zconfensure_buffer_stack (void );
  15718. +static void zconf_load_buffer_state (void );
  15719. +static void zconf_init_buffer (YY_BUFFER_STATE b,FILE *file );
  15720. +
  15721. +#define YY_FLUSH_BUFFER zconf_flush_buffer(YY_CURRENT_BUFFER )
  15722. +
  15723. +YY_BUFFER_STATE zconf_scan_buffer (char *base,yy_size_t size );
  15724. +YY_BUFFER_STATE zconf_scan_string (yyconst char *yy_str );
  15725. +YY_BUFFER_STATE zconf_scan_bytes (yyconst char *bytes,int len );
  15726. +
  15727. +void *zconfalloc (yy_size_t );
  15728. +void *zconfrealloc (void *,yy_size_t );
  15729. +void zconffree (void * );
  15730. +
  15731. +#define yy_new_buffer zconf_create_buffer
  15732. +
  15733. +#define yy_set_interactive(is_interactive) \
  15734. + { \
  15735. + if ( ! YY_CURRENT_BUFFER ){ \
  15736. + zconfensure_buffer_stack (); \
  15737. + YY_CURRENT_BUFFER_LVALUE = \
  15738. + zconf_create_buffer(zconfin,YY_BUF_SIZE ); \
  15739. + } \
  15740. + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
  15741. + }
  15742. +
  15743. +#define yy_set_bol(at_bol) \
  15744. + { \
  15745. + if ( ! YY_CURRENT_BUFFER ){\
  15746. + zconfensure_buffer_stack (); \
  15747. + YY_CURRENT_BUFFER_LVALUE = \
  15748. + zconf_create_buffer(zconfin,YY_BUF_SIZE ); \
  15749. + } \
  15750. + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
  15751. + }
  15752. +
  15753. +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
  15754. +
  15755. +/* Begin user sect3 */
  15756. +
  15757. +#define zconfwrap(n) 1
  15758. +#define YY_SKIP_YYWRAP
  15759. +
  15760. +typedef unsigned char YY_CHAR;
  15761. +
  15762. +FILE *zconfin = (FILE *) 0, *zconfout = (FILE *) 0;
  15763. +
  15764. +typedef int yy_state_type;
  15765. +
  15766. +extern int zconflineno;
  15767. +
  15768. +int zconflineno = 1;
  15769. +
  15770. +extern char *zconftext;
  15771. +#define yytext_ptr zconftext
  15772. +static yyconst flex_int16_t yy_nxt[][17] =
  15773. + {
  15774. + {
  15775. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  15776. + 0, 0, 0, 0, 0, 0, 0
  15777. + },
  15778. +
  15779. + {
  15780. + 11, 12, 13, 14, 12, 12, 15, 12, 12, 12,
  15781. + 12, 12, 12, 12, 12, 12, 12
  15782. + },
  15783. +
  15784. + {
  15785. + 11, 12, 13, 14, 12, 12, 15, 12, 12, 12,
  15786. + 12, 12, 12, 12, 12, 12, 12
  15787. + },
  15788. +
  15789. + {
  15790. + 11, 16, 16, 17, 16, 16, 16, 16, 16, 16,
  15791. + 16, 16, 16, 18, 16, 16, 16
  15792. + },
  15793. +
  15794. + {
  15795. + 11, 16, 16, 17, 16, 16, 16, 16, 16, 16,
  15796. + 16, 16, 16, 18, 16, 16, 16
  15797. +
  15798. + },
  15799. +
  15800. + {
  15801. + 11, 19, 20, 21, 19, 19, 19, 19, 19, 19,
  15802. + 19, 19, 19, 19, 19, 19, 19
  15803. + },
  15804. +
  15805. + {
  15806. + 11, 19, 20, 21, 19, 19, 19, 19, 19, 19,
  15807. + 19, 19, 19, 19, 19, 19, 19
  15808. + },
  15809. +
  15810. + {
  15811. + 11, 22, 22, 23, 22, 24, 22, 22, 24, 22,
  15812. + 22, 22, 22, 22, 22, 25, 22
  15813. + },
  15814. +
  15815. + {
  15816. + 11, 22, 22, 23, 22, 24, 22, 22, 24, 22,
  15817. + 22, 22, 22, 22, 22, 25, 22
  15818. + },
  15819. +
  15820. + {
  15821. + 11, 26, 26, 27, 28, 29, 30, 31, 29, 32,
  15822. + 33, 34, 35, 35, 36, 37, 38
  15823. +
  15824. + },
  15825. +
  15826. + {
  15827. + 11, 26, 26, 27, 28, 29, 30, 31, 29, 32,
  15828. + 33, 34, 35, 35, 36, 37, 38
  15829. + },
  15830. +
  15831. + {
  15832. + -11, -11, -11, -11, -11, -11, -11, -11, -11, -11,
  15833. + -11, -11, -11, -11, -11, -11, -11
  15834. + },
  15835. +
  15836. + {
  15837. + 11, -12, -12, -12, -12, -12, -12, -12, -12, -12,
  15838. + -12, -12, -12, -12, -12, -12, -12
  15839. + },
  15840. +
  15841. + {
  15842. + 11, -13, 39, 40, -13, -13, 41, -13, -13, -13,
  15843. + -13, -13, -13, -13, -13, -13, -13
  15844. + },
  15845. +
  15846. + {
  15847. + 11, -14, -14, -14, -14, -14, -14, -14, -14, -14,
  15848. + -14, -14, -14, -14, -14, -14, -14
  15849. +
  15850. + },
  15851. +
  15852. + {
  15853. + 11, 42, 42, 43, 42, 42, 42, 42, 42, 42,
  15854. + 42, 42, 42, 42, 42, 42, 42
  15855. + },
  15856. +
  15857. + {
  15858. + 11, -16, -16, -16, -16, -16, -16, -16, -16, -16,
  15859. + -16, -16, -16, -16, -16, -16, -16
  15860. + },
  15861. +
  15862. + {
  15863. + 11, -17, -17, -17, -17, -17, -17, -17, -17, -17,
  15864. + -17, -17, -17, -17, -17, -17, -17
  15865. + },
  15866. +
  15867. + {
  15868. + 11, -18, -18, -18, -18, -18, -18, -18, -18, -18,
  15869. + -18, -18, -18, 44, -18, -18, -18
  15870. + },
  15871. +
  15872. + {
  15873. + 11, 45, 45, -19, 45, 45, 45, 45, 45, 45,
  15874. + 45, 45, 45, 45, 45, 45, 45
  15875. +
  15876. + },
  15877. +
  15878. + {
  15879. + 11, -20, 46, 47, -20, -20, -20, -20, -20, -20,
  15880. + -20, -20, -20, -20, -20, -20, -20
  15881. + },
  15882. +
  15883. + {
  15884. + 11, 48, -21, -21, 48, 48, 48, 48, 48, 48,
  15885. + 48, 48, 48, 48, 48, 48, 48
  15886. + },
  15887. +
  15888. + {
  15889. + 11, 49, 49, 50, 49, -22, 49, 49, -22, 49,
  15890. + 49, 49, 49, 49, 49, -22, 49
  15891. + },
  15892. +
  15893. + {
  15894. + 11, -23, -23, -23, -23, -23, -23, -23, -23, -23,
  15895. + -23, -23, -23, -23, -23, -23, -23
  15896. + },
  15897. +
  15898. + {
  15899. + 11, -24, -24, -24, -24, -24, -24, -24, -24, -24,
  15900. + -24, -24, -24, -24, -24, -24, -24
  15901. +
  15902. + },
  15903. +
  15904. + {
  15905. + 11, 51, 51, 52, 51, 51, 51, 51, 51, 51,
  15906. + 51, 51, 51, 51, 51, 51, 51
  15907. + },
  15908. +
  15909. + {
  15910. + 11, -26, -26, -26, -26, -26, -26, -26, -26, -26,
  15911. + -26, -26, -26, -26, -26, -26, -26
  15912. + },
  15913. +
  15914. + {
  15915. + 11, -27, -27, -27, -27, -27, -27, -27, -27, -27,
  15916. + -27, -27, -27, -27, -27, -27, -27
  15917. + },
  15918. +
  15919. + {
  15920. + 11, -28, -28, -28, -28, -28, -28, -28, -28, -28,
  15921. + -28, -28, -28, -28, 53, -28, -28
  15922. + },
  15923. +
  15924. + {
  15925. + 11, -29, -29, -29, -29, -29, -29, -29, -29, -29,
  15926. + -29, -29, -29, -29, -29, -29, -29
  15927. +
  15928. + },
  15929. +
  15930. + {
  15931. + 11, 54, 54, -30, 54, 54, 54, 54, 54, 54,
  15932. + 54, 54, 54, 54, 54, 54, 54
  15933. + },
  15934. +
  15935. + {
  15936. + 11, -31, -31, -31, -31, -31, -31, 55, -31, -31,
  15937. + -31, -31, -31, -31, -31, -31, -31
  15938. + },
  15939. +
  15940. + {
  15941. + 11, -32, -32, -32, -32, -32, -32, -32, -32, -32,
  15942. + -32, -32, -32, -32, -32, -32, -32
  15943. + },
  15944. +
  15945. + {
  15946. + 11, -33, -33, -33, -33, -33, -33, -33, -33, -33,
  15947. + -33, -33, -33, -33, -33, -33, -33
  15948. + },
  15949. +
  15950. + {
  15951. + 11, -34, -34, -34, -34, -34, -34, -34, -34, -34,
  15952. + -34, 56, 57, 57, -34, -34, -34
  15953. +
  15954. + },
  15955. +
  15956. + {
  15957. + 11, -35, -35, -35, -35, -35, -35, -35, -35, -35,
  15958. + -35, 57, 57, 57, -35, -35, -35
  15959. + },
  15960. +
  15961. + {
  15962. + 11, -36, -36, -36, -36, -36, -36, -36, -36, -36,
  15963. + -36, -36, -36, -36, -36, -36, -36
  15964. + },
  15965. +
  15966. + {
  15967. + 11, -37, -37, 58, -37, -37, -37, -37, -37, -37,
  15968. + -37, -37, -37, -37, -37, -37, -37
  15969. + },
  15970. +
  15971. + {
  15972. + 11, -38, -38, -38, -38, -38, -38, -38, -38, -38,
  15973. + -38, -38, -38, -38, -38, -38, 59
  15974. + },
  15975. +
  15976. + {
  15977. + 11, -39, 39, 40, -39, -39, 41, -39, -39, -39,
  15978. + -39, -39, -39, -39, -39, -39, -39
  15979. +
  15980. + },
  15981. +
  15982. + {
  15983. + 11, -40, -40, -40, -40, -40, -40, -40, -40, -40,
  15984. + -40, -40, -40, -40, -40, -40, -40
  15985. + },
  15986. +
  15987. + {
  15988. + 11, 42, 42, 43, 42, 42, 42, 42, 42, 42,
  15989. + 42, 42, 42, 42, 42, 42, 42
  15990. + },
  15991. +
  15992. + {
  15993. + 11, 42, 42, 43, 42, 42, 42, 42, 42, 42,
  15994. + 42, 42, 42, 42, 42, 42, 42
  15995. + },
  15996. +
  15997. + {
  15998. + 11, -43, -43, -43, -43, -43, -43, -43, -43, -43,
  15999. + -43, -43, -43, -43, -43, -43, -43
  16000. + },
  16001. +
  16002. + {
  16003. + 11, -44, -44, -44, -44, -44, -44, -44, -44, -44,
  16004. + -44, -44, -44, 44, -44, -44, -44
  16005. +
  16006. + },
  16007. +
  16008. + {
  16009. + 11, 45, 45, -45, 45, 45, 45, 45, 45, 45,
  16010. + 45, 45, 45, 45, 45, 45, 45
  16011. + },
  16012. +
  16013. + {
  16014. + 11, -46, 46, 47, -46, -46, -46, -46, -46, -46,
  16015. + -46, -46, -46, -46, -46, -46, -46
  16016. + },
  16017. +
  16018. + {
  16019. + 11, 48, -47, -47, 48, 48, 48, 48, 48, 48,
  16020. + 48, 48, 48, 48, 48, 48, 48
  16021. + },
  16022. +
  16023. + {
  16024. + 11, -48, -48, -48, -48, -48, -48, -48, -48, -48,
  16025. + -48, -48, -48, -48, -48, -48, -48
  16026. + },
  16027. +
  16028. + {
  16029. + 11, 49, 49, 50, 49, -49, 49, 49, -49, 49,
  16030. + 49, 49, 49, 49, 49, -49, 49
  16031. +
  16032. + },
  16033. +
  16034. + {
  16035. + 11, -50, -50, -50, -50, -50, -50, -50, -50, -50,
  16036. + -50, -50, -50, -50, -50, -50, -50
  16037. + },
  16038. +
  16039. + {
  16040. + 11, -51, -51, 52, -51, -51, -51, -51, -51, -51,
  16041. + -51, -51, -51, -51, -51, -51, -51
  16042. + },
  16043. +
  16044. + {
  16045. + 11, -52, -52, -52, -52, -52, -52, -52, -52, -52,
  16046. + -52, -52, -52, -52, -52, -52, -52
  16047. + },
  16048. +
  16049. + {
  16050. + 11, -53, -53, -53, -53, -53, -53, -53, -53, -53,
  16051. + -53, -53, -53, -53, -53, -53, -53
  16052. + },
  16053. +
  16054. + {
  16055. + 11, 54, 54, -54, 54, 54, 54, 54, 54, 54,
  16056. + 54, 54, 54, 54, 54, 54, 54
  16057. +
  16058. + },
  16059. +
  16060. + {
  16061. + 11, -55, -55, -55, -55, -55, -55, -55, -55, -55,
  16062. + -55, -55, -55, -55, -55, -55, -55
  16063. + },
  16064. +
  16065. + {
  16066. + 11, -56, -56, -56, -56, -56, -56, -56, -56, -56,
  16067. + -56, 60, 57, 57, -56, -56, -56
  16068. + },
  16069. +
  16070. + {
  16071. + 11, -57, -57, -57, -57, -57, -57, -57, -57, -57,
  16072. + -57, 57, 57, 57, -57, -57, -57
  16073. + },
  16074. +
  16075. + {
  16076. + 11, -58, -58, -58, -58, -58, -58, -58, -58, -58,
  16077. + -58, -58, -58, -58, -58, -58, -58
  16078. + },
  16079. +
  16080. + {
  16081. + 11, -59, -59, -59, -59, -59, -59, -59, -59, -59,
  16082. + -59, -59, -59, -59, -59, -59, -59
  16083. +
  16084. + },
  16085. +
  16086. + {
  16087. + 11, -60, -60, -60, -60, -60, -60, -60, -60, -60,
  16088. + -60, 57, 57, 57, -60, -60, -60
  16089. + },
  16090. +
  16091. + } ;
  16092. +
  16093. +static yy_state_type yy_get_previous_state (void );
  16094. +static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
  16095. +static int yy_get_next_buffer (void );
  16096. +static void yy_fatal_error (yyconst char msg[] );
  16097. +
  16098. +/* Done after the current pattern has been matched and before the
  16099. + * corresponding action - sets up zconftext.
  16100. + */
  16101. +#define YY_DO_BEFORE_ACTION \
  16102. + (yytext_ptr) = yy_bp; \
  16103. + zconfleng = (size_t) (yy_cp - yy_bp); \
  16104. + (yy_hold_char) = *yy_cp; \
  16105. + *yy_cp = '\0'; \
  16106. + (yy_c_buf_p) = yy_cp;
  16107. +
  16108. +#define YY_NUM_RULES 33
  16109. +#define YY_END_OF_BUFFER 34
  16110. +/* This struct is not used in this scanner,
  16111. + but its presence is necessary. */
  16112. +struct yy_trans_info
  16113. + {
  16114. + flex_int32_t yy_verify;
  16115. + flex_int32_t yy_nxt;
  16116. + };
  16117. +static yyconst flex_int16_t yy_accept[61] =
  16118. + { 0,
  16119. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  16120. + 34, 5, 4, 2, 3, 7, 8, 6, 32, 29,
  16121. + 31, 24, 28, 27, 26, 22, 17, 13, 16, 20,
  16122. + 22, 11, 12, 19, 19, 14, 22, 22, 4, 2,
  16123. + 3, 3, 1, 6, 32, 29, 31, 30, 24, 23,
  16124. + 26, 25, 15, 20, 9, 19, 19, 21, 10, 18
  16125. + } ;
  16126. +
  16127. +static yyconst flex_int32_t yy_ec[256] =
  16128. + { 0,
  16129. + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
  16130. + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  16131. + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  16132. + 1, 2, 4, 5, 6, 1, 1, 7, 8, 9,
  16133. + 10, 1, 1, 1, 11, 12, 12, 13, 13, 13,
  16134. + 13, 13, 13, 13, 13, 13, 13, 1, 1, 1,
  16135. + 14, 1, 1, 1, 13, 13, 13, 13, 13, 13,
  16136. + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
  16137. + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
  16138. + 1, 15, 1, 1, 13, 1, 13, 13, 13, 13,
  16139. +
  16140. + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
  16141. + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
  16142. + 13, 13, 1, 16, 1, 1, 1, 1, 1, 1,
  16143. + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  16144. + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  16145. + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  16146. + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  16147. + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  16148. + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  16149. + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  16150. +
  16151. + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  16152. + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  16153. + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  16154. + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  16155. + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  16156. + 1, 1, 1, 1, 1
  16157. + } ;
  16158. +
  16159. +extern int zconf_flex_debug;
  16160. +int zconf_flex_debug = 0;
  16161. +
  16162. +/* The intent behind this definition is that it'll catch
  16163. + * any uses of REJECT which flex missed.
  16164. + */
  16165. +#define REJECT reject_used_but_not_detected
  16166. +#define yymore() yymore_used_but_not_detected
  16167. +#define YY_MORE_ADJ 0
  16168. +#define YY_RESTORE_YY_MORE_OFFSET
  16169. +char *zconftext;
  16170. +#define YY_NO_INPUT 1
  16171. +
  16172. +/*
  16173. + * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
  16174. + * Released under the terms of the GNU GPL v2.0.
  16175. + */
  16176. +
  16177. +#include <limits.h>
  16178. +#include <stdio.h>
  16179. +#include <stdlib.h>
  16180. +#include <string.h>
  16181. +#include <unistd.h>
  16182. +
  16183. +#include "lkc.h"
  16184. +
  16185. +#define START_STRSIZE 16
  16186. +
  16187. +static struct {
  16188. + struct file *file;
  16189. + int lineno;
  16190. +} current_pos;
  16191. +
  16192. +static char *text;
  16193. +static int text_size, text_asize;
  16194. +
  16195. +struct buffer {
  16196. + struct buffer *parent;
  16197. + YY_BUFFER_STATE state;
  16198. +};
  16199. +
  16200. +struct buffer *current_buf;
  16201. +
  16202. +static int last_ts, first_ts;
  16203. +
  16204. +static void zconf_endhelp(void);
  16205. +static void zconf_endfile(void);
  16206. +
  16207. +static void new_string(void)
  16208. +{
  16209. + text = xmalloc(START_STRSIZE);
  16210. + text_asize = START_STRSIZE;
  16211. + text_size = 0;
  16212. + *text = 0;
  16213. +}
  16214. +
  16215. +static void append_string(const char *str, int size)
  16216. +{
  16217. + int new_size = text_size + size + 1;
  16218. + if (new_size > text_asize) {
  16219. + new_size += START_STRSIZE - 1;
  16220. + new_size &= -START_STRSIZE;
  16221. + text = realloc(text, new_size);
  16222. + text_asize = new_size;
  16223. + }
  16224. + memcpy(text + text_size, str, size);
  16225. + text_size += size;
  16226. + text[text_size] = 0;
  16227. +}
  16228. +
  16229. +static void alloc_string(const char *str, int size)
  16230. +{
  16231. + text = xmalloc(size + 1);
  16232. + memcpy(text, str, size);
  16233. + text[size] = 0;
  16234. +}
  16235. +
  16236. +#define INITIAL 0
  16237. +#define COMMAND 1
  16238. +#define HELP 2
  16239. +#define STRING 3
  16240. +#define PARAM 4
  16241. +
  16242. +#ifndef YY_NO_UNISTD_H
  16243. +/* Special case for "unistd.h", since it is non-ANSI. We include it way
  16244. + * down here because we want the user's section 1 to have been scanned first.
  16245. + * The user has a chance to override it with an option.
  16246. + */
  16247. +#include <unistd.h>
  16248. +#endif
  16249. +
  16250. +#ifndef YY_EXTRA_TYPE
  16251. +#define YY_EXTRA_TYPE void *
  16252. +#endif
  16253. +
  16254. +static int yy_init_globals (void );
  16255. +
  16256. +/* Accessor methods to globals.
  16257. + These are made visible to non-reentrant scanners for convenience. */
  16258. +
  16259. +int zconflex_destroy (void );
  16260. +
  16261. +int zconfget_debug (void );
  16262. +
  16263. +void zconfset_debug (int debug_flag );
  16264. +
  16265. +YY_EXTRA_TYPE zconfget_extra (void );
  16266. +
  16267. +void zconfset_extra (YY_EXTRA_TYPE user_defined );
  16268. +
  16269. +FILE *zconfget_in (void );
  16270. +
  16271. +void zconfset_in (FILE * in_str );
  16272. +
  16273. +FILE *zconfget_out (void );
  16274. +
  16275. +void zconfset_out (FILE * out_str );
  16276. +
  16277. +int zconfget_leng (void );
  16278. +
  16279. +char *zconfget_text (void );
  16280. +
  16281. +int zconfget_lineno (void );
  16282. +
  16283. +void zconfset_lineno (int line_number );
  16284. +
  16285. +/* Macros after this point can all be overridden by user definitions in
  16286. + * section 1.
  16287. + */
  16288. +
  16289. +#ifndef YY_SKIP_YYWRAP
  16290. +#ifdef __cplusplus
  16291. +extern "C" int zconfwrap (void );
  16292. +#else
  16293. +extern int zconfwrap (void );
  16294. +#endif
  16295. +#endif
  16296. +
  16297. + static void yyunput (int c,char *buf_ptr );
  16298. +
  16299. +#ifndef yytext_ptr
  16300. +static void yy_flex_strncpy (char *,yyconst char *,int );
  16301. +#endif
  16302. +
  16303. +#ifdef YY_NEED_STRLEN
  16304. +static int yy_flex_strlen (yyconst char * );
  16305. +#endif
  16306. +
  16307. +#ifndef YY_NO_INPUT
  16308. +
  16309. +#ifdef __cplusplus
  16310. +static int yyinput (void );
  16311. +#else
  16312. +static int input (void );
  16313. +#endif
  16314. +
  16315. +#endif
  16316. +
  16317. +/* Amount of stuff to slurp up with each read. */
  16318. +#ifndef YY_READ_BUF_SIZE
  16319. +#define YY_READ_BUF_SIZE 8192
  16320. +#endif
  16321. +
  16322. +/* Copy whatever the last rule matched to the standard output. */
  16323. +#ifndef ECHO
  16324. +/* This used to be an fputs(), but since the string might contain NUL's,
  16325. + * we now use fwrite().
  16326. + */
  16327. +#define ECHO do { if (fwrite( zconftext, zconfleng, 1, zconfout )) {} } while (0)
  16328. +#endif
  16329. +
  16330. +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
  16331. + * is returned in "result".
  16332. + */
  16333. +#ifndef YY_INPUT
  16334. +#define YY_INPUT(buf,result,max_size) \
  16335. + errno=0; \
  16336. + while ( (result = read( fileno(zconfin), (char *) buf, max_size )) < 0 ) \
  16337. + { \
  16338. + if( errno != EINTR) \
  16339. + { \
  16340. + YY_FATAL_ERROR( "input in flex scanner failed" ); \
  16341. + break; \
  16342. + } \
  16343. + errno=0; \
  16344. + clearerr(zconfin); \
  16345. + }\
  16346. +\
  16347. +
  16348. +#endif
  16349. +
  16350. +/* No semi-colon after return; correct usage is to write "yyterminate();" -
  16351. + * we don't want an extra ';' after the "return" because that will cause
  16352. + * some compilers to complain about unreachable statements.
  16353. + */
  16354. +#ifndef yyterminate
  16355. +#define yyterminate() return YY_NULL
  16356. +#endif
  16357. +
  16358. +/* Number of entries by which start-condition stack grows. */
  16359. +#ifndef YY_START_STACK_INCR
  16360. +#define YY_START_STACK_INCR 25
  16361. +#endif
  16362. +
  16363. +/* Report a fatal error. */
  16364. +#ifndef YY_FATAL_ERROR
  16365. +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
  16366. +#endif
  16367. +
  16368. +/* end tables serialization structures and prototypes */
  16369. +
  16370. +/* Default declaration of generated scanner - a define so the user can
  16371. + * easily add parameters.
  16372. + */
  16373. +#ifndef YY_DECL
  16374. +#define YY_DECL_IS_OURS 1
  16375. +
  16376. +extern int zconflex (void);
  16377. +
  16378. +#define YY_DECL int zconflex (void)
  16379. +#endif /* !YY_DECL */
  16380. +
  16381. +/* Code executed at the beginning of each rule, after zconftext and zconfleng
  16382. + * have been set up.
  16383. + */
  16384. +#ifndef YY_USER_ACTION
  16385. +#define YY_USER_ACTION
  16386. +#endif
  16387. +
  16388. +/* Code executed at the end of each rule. */
  16389. +#ifndef YY_BREAK
  16390. +#define YY_BREAK break;
  16391. +#endif
  16392. +
  16393. +#define YY_RULE_SETUP \
  16394. + YY_USER_ACTION
  16395. +
  16396. +/** The main scanner function which does all the work.
  16397. + */
  16398. +YY_DECL
  16399. +{
  16400. + register yy_state_type yy_current_state;
  16401. + register char *yy_cp, *yy_bp;
  16402. + register int yy_act;
  16403. +
  16404. + int str = 0;
  16405. + int ts, i;
  16406. +
  16407. + if ( !(yy_init) )
  16408. + {
  16409. + (yy_init) = 1;
  16410. +
  16411. +#ifdef YY_USER_INIT
  16412. + YY_USER_INIT;
  16413. +#endif
  16414. +
  16415. + if ( ! (yy_start) )
  16416. + (yy_start) = 1; /* first start state */
  16417. +
  16418. + if ( ! zconfin )
  16419. + zconfin = stdin;
  16420. +
  16421. + if ( ! zconfout )
  16422. + zconfout = stdout;
  16423. +
  16424. + if ( ! YY_CURRENT_BUFFER ) {
  16425. + zconfensure_buffer_stack ();
  16426. + YY_CURRENT_BUFFER_LVALUE =
  16427. + zconf_create_buffer(zconfin,YY_BUF_SIZE );
  16428. + }
  16429. +
  16430. + zconf_load_buffer_state( );
  16431. + }
  16432. +
  16433. + while ( 1 ) /* loops until end-of-file is reached */
  16434. + {
  16435. + yy_cp = (yy_c_buf_p);
  16436. +
  16437. + /* Support of zconftext. */
  16438. + *yy_cp = (yy_hold_char);
  16439. +
  16440. + /* yy_bp points to the position in yy_ch_buf of the start of
  16441. + * the current run.
  16442. + */
  16443. + yy_bp = yy_cp;
  16444. +
  16445. + yy_current_state = (yy_start);
  16446. +yy_match:
  16447. + while ( (yy_current_state = yy_nxt[yy_current_state][ yy_ec[YY_SC_TO_UI(*yy_cp)] ]) > 0 )
  16448. + ++yy_cp;
  16449. +
  16450. + yy_current_state = -yy_current_state;
  16451. +
  16452. +yy_find_action:
  16453. + yy_act = yy_accept[yy_current_state];
  16454. +
  16455. + YY_DO_BEFORE_ACTION;
  16456. +
  16457. +do_action: /* This label is used only to access EOF actions. */
  16458. +
  16459. + switch ( yy_act )
  16460. + { /* beginning of action switch */
  16461. +case 1:
  16462. +/* rule 1 can match eol */
  16463. +case 2:
  16464. +/* rule 2 can match eol */
  16465. +YY_RULE_SETUP
  16466. +{
  16467. + current_file->lineno++;
  16468. + return T_EOL;
  16469. +}
  16470. + YY_BREAK
  16471. +case 3:
  16472. +YY_RULE_SETUP
  16473. +
  16474. + YY_BREAK
  16475. +case 4:
  16476. +YY_RULE_SETUP
  16477. +{
  16478. + BEGIN(COMMAND);
  16479. +}
  16480. + YY_BREAK
  16481. +case 5:
  16482. +YY_RULE_SETUP
  16483. +{
  16484. + unput(zconftext[0]);
  16485. + BEGIN(COMMAND);
  16486. +}
  16487. + YY_BREAK
  16488. +
  16489. +case 6:
  16490. +YY_RULE_SETUP
  16491. +{
  16492. + const struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
  16493. + BEGIN(PARAM);
  16494. + current_pos.file = current_file;
  16495. + current_pos.lineno = current_file->lineno;
  16496. + if (id && id->flags & TF_COMMAND) {
  16497. + zconflval.id = id;
  16498. + return id->token;
  16499. + }
  16500. + alloc_string(zconftext, zconfleng);
  16501. + zconflval.string = text;
  16502. + return T_WORD;
  16503. + }
  16504. + YY_BREAK
  16505. +case 7:
  16506. +YY_RULE_SETUP
  16507. +
  16508. + YY_BREAK
  16509. +case 8:
  16510. +/* rule 8 can match eol */
  16511. +YY_RULE_SETUP
  16512. +{
  16513. + BEGIN(INITIAL);
  16514. + current_file->lineno++;
  16515. + return T_EOL;
  16516. + }
  16517. + YY_BREAK
  16518. +
  16519. +case 9:
  16520. +YY_RULE_SETUP
  16521. +return T_AND;
  16522. + YY_BREAK
  16523. +case 10:
  16524. +YY_RULE_SETUP
  16525. +return T_OR;
  16526. + YY_BREAK
  16527. +case 11:
  16528. +YY_RULE_SETUP
  16529. +return T_OPEN_PAREN;
  16530. + YY_BREAK
  16531. +case 12:
  16532. +YY_RULE_SETUP
  16533. +return T_CLOSE_PAREN;
  16534. + YY_BREAK
  16535. +case 13:
  16536. +YY_RULE_SETUP
  16537. +return T_NOT;
  16538. + YY_BREAK
  16539. +case 14:
  16540. +YY_RULE_SETUP
  16541. +return T_EQUAL;
  16542. + YY_BREAK
  16543. +case 15:
  16544. +YY_RULE_SETUP
  16545. +return T_UNEQUAL;
  16546. + YY_BREAK
  16547. +case 16:
  16548. +YY_RULE_SETUP
  16549. +{
  16550. + str = zconftext[0];
  16551. + new_string();
  16552. + BEGIN(STRING);
  16553. + }
  16554. + YY_BREAK
  16555. +case 17:
  16556. +/* rule 17 can match eol */
  16557. +YY_RULE_SETUP
  16558. +BEGIN(INITIAL); current_file->lineno++; return T_EOL;
  16559. + YY_BREAK
  16560. +case 18:
  16561. +YY_RULE_SETUP
  16562. +/* ignore */
  16563. + YY_BREAK
  16564. +case 19:
  16565. +YY_RULE_SETUP
  16566. +{
  16567. + const struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng);
  16568. + if (id && id->flags & TF_PARAM) {
  16569. + zconflval.id = id;
  16570. + return id->token;
  16571. + }
  16572. + alloc_string(zconftext, zconfleng);
  16573. + zconflval.string = text;
  16574. + return T_WORD;
  16575. + }
  16576. + YY_BREAK
  16577. +case 20:
  16578. +YY_RULE_SETUP
  16579. +/* comment */
  16580. + YY_BREAK
  16581. +case 21:
  16582. +/* rule 21 can match eol */
  16583. +YY_RULE_SETUP
  16584. +current_file->lineno++;
  16585. + YY_BREAK
  16586. +case 22:
  16587. +YY_RULE_SETUP
  16588. +
  16589. + YY_BREAK
  16590. +case YY_STATE_EOF(PARAM):
  16591. +{
  16592. + BEGIN(INITIAL);
  16593. + }
  16594. + YY_BREAK
  16595. +
  16596. +case 23:
  16597. +/* rule 23 can match eol */
  16598. +*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */
  16599. +(yy_c_buf_p) = yy_cp -= 1;
  16600. +YY_DO_BEFORE_ACTION; /* set up zconftext again */
  16601. +YY_RULE_SETUP
  16602. +{
  16603. + append_string(zconftext, zconfleng);
  16604. + zconflval.string = text;
  16605. + return T_WORD_QUOTE;
  16606. + }
  16607. + YY_BREAK
  16608. +case 24:
  16609. +YY_RULE_SETUP
  16610. +{
  16611. + append_string(zconftext, zconfleng);
  16612. + }
  16613. + YY_BREAK
  16614. +case 25:
  16615. +/* rule 25 can match eol */
  16616. +*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */
  16617. +(yy_c_buf_p) = yy_cp -= 1;
  16618. +YY_DO_BEFORE_ACTION; /* set up zconftext again */
  16619. +YY_RULE_SETUP
  16620. +{
  16621. + append_string(zconftext + 1, zconfleng - 1);
  16622. + zconflval.string = text;
  16623. + return T_WORD_QUOTE;
  16624. + }
  16625. + YY_BREAK
  16626. +case 26:
  16627. +YY_RULE_SETUP
  16628. +{
  16629. + append_string(zconftext + 1, zconfleng - 1);
  16630. + }
  16631. + YY_BREAK
  16632. +case 27:
  16633. +YY_RULE_SETUP
  16634. +{
  16635. + if (str == zconftext[0]) {
  16636. + BEGIN(PARAM);
  16637. + zconflval.string = text;
  16638. + return T_WORD_QUOTE;
  16639. + } else
  16640. + append_string(zconftext, 1);
  16641. + }
  16642. + YY_BREAK
  16643. +case 28:
  16644. +/* rule 28 can match eol */
  16645. +YY_RULE_SETUP
  16646. +{
  16647. + printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno());
  16648. + current_file->lineno++;
  16649. + BEGIN(INITIAL);
  16650. + return T_EOL;
  16651. + }
  16652. + YY_BREAK
  16653. +case YY_STATE_EOF(STRING):
  16654. +{
  16655. + BEGIN(INITIAL);
  16656. + }
  16657. + YY_BREAK
  16658. +
  16659. +case 29:
  16660. +YY_RULE_SETUP
  16661. +{
  16662. + ts = 0;
  16663. + for (i = 0; i < zconfleng; i++) {
  16664. + if (zconftext[i] == '\t')
  16665. + ts = (ts & ~7) + 8;
  16666. + else
  16667. + ts++;
  16668. + }
  16669. + last_ts = ts;
  16670. + if (first_ts) {
  16671. + if (ts < first_ts) {
  16672. + zconf_endhelp();
  16673. + return T_HELPTEXT;
  16674. + }
  16675. + ts -= first_ts;
  16676. + while (ts > 8) {
  16677. + append_string(" ", 8);
  16678. + ts -= 8;
  16679. + }
  16680. + append_string(" ", ts);
  16681. + }
  16682. + }
  16683. + YY_BREAK
  16684. +case 30:
  16685. +/* rule 30 can match eol */
  16686. +*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */
  16687. +(yy_c_buf_p) = yy_cp -= 1;
  16688. +YY_DO_BEFORE_ACTION; /* set up zconftext again */
  16689. +YY_RULE_SETUP
  16690. +{
  16691. + current_file->lineno++;
  16692. + zconf_endhelp();
  16693. + return T_HELPTEXT;
  16694. + }
  16695. + YY_BREAK
  16696. +case 31:
  16697. +/* rule 31 can match eol */
  16698. +YY_RULE_SETUP
  16699. +{
  16700. + current_file->lineno++;
  16701. + append_string("\n", 1);
  16702. + }
  16703. + YY_BREAK
  16704. +case 32:
  16705. +YY_RULE_SETUP
  16706. +{
  16707. + while (zconfleng) {
  16708. + if ((zconftext[zconfleng-1] != ' ') && (zconftext[zconfleng-1] != '\t'))
  16709. + break;
  16710. + zconfleng--;
  16711. + }
  16712. + append_string(zconftext, zconfleng);
  16713. + if (!first_ts)
  16714. + first_ts = last_ts;
  16715. + }
  16716. + YY_BREAK
  16717. +case YY_STATE_EOF(HELP):
  16718. +{
  16719. + zconf_endhelp();
  16720. + return T_HELPTEXT;
  16721. + }
  16722. + YY_BREAK
  16723. +
  16724. +case YY_STATE_EOF(INITIAL):
  16725. +case YY_STATE_EOF(COMMAND):
  16726. +{
  16727. + if (current_file) {
  16728. + zconf_endfile();
  16729. + return T_EOL;
  16730. + }
  16731. + fclose(zconfin);
  16732. + yyterminate();
  16733. +}
  16734. + YY_BREAK
  16735. +case 33:
  16736. +YY_RULE_SETUP
  16737. +YY_FATAL_ERROR( "flex scanner jammed" );
  16738. + YY_BREAK
  16739. +
  16740. + case YY_END_OF_BUFFER:
  16741. + {
  16742. + /* Amount of text matched not including the EOB char. */
  16743. + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
  16744. +
  16745. + /* Undo the effects of YY_DO_BEFORE_ACTION. */
  16746. + *yy_cp = (yy_hold_char);
  16747. + YY_RESTORE_YY_MORE_OFFSET
  16748. +
  16749. + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
  16750. + {
  16751. + /* We're scanning a new file or input source. It's
  16752. + * possible that this happened because the user
  16753. + * just pointed zconfin at a new source and called
  16754. + * zconflex(). If so, then we have to assure
  16755. + * consistency between YY_CURRENT_BUFFER and our
  16756. + * globals. Here is the right place to do so, because
  16757. + * this is the first action (other than possibly a
  16758. + * back-up) that will match for the new input source.
  16759. + */
  16760. + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
  16761. + YY_CURRENT_BUFFER_LVALUE->yy_input_file = zconfin;
  16762. + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
  16763. + }
  16764. +
  16765. + /* Note that here we test for yy_c_buf_p "<=" to the position
  16766. + * of the first EOB in the buffer, since yy_c_buf_p will
  16767. + * already have been incremented past the NUL character
  16768. + * (since all states make transitions on EOB to the
  16769. + * end-of-buffer state). Contrast this with the test
  16770. + * in input().
  16771. + */
  16772. + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
  16773. + { /* This was really a NUL. */
  16774. + yy_state_type yy_next_state;
  16775. +
  16776. + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
  16777. +
  16778. + yy_current_state = yy_get_previous_state( );
  16779. +
  16780. + /* Okay, we're now positioned to make the NUL
  16781. + * transition. We couldn't have
  16782. + * yy_get_previous_state() go ahead and do it
  16783. + * for us because it doesn't know how to deal
  16784. + * with the possibility of jamming (and we don't
  16785. + * want to build jamming into it because then it
  16786. + * will run more slowly).
  16787. + */
  16788. +
  16789. + yy_next_state = yy_try_NUL_trans( yy_current_state );
  16790. +
  16791. + yy_bp = (yytext_ptr) + YY_MORE_ADJ;
  16792. +
  16793. + if ( yy_next_state )
  16794. + {
  16795. + /* Consume the NUL. */
  16796. + yy_cp = ++(yy_c_buf_p);
  16797. + yy_current_state = yy_next_state;
  16798. + goto yy_match;
  16799. + }
  16800. +
  16801. + else
  16802. + {
  16803. + yy_cp = (yy_c_buf_p);
  16804. + goto yy_find_action;
  16805. + }
  16806. + }
  16807. +
  16808. + else switch ( yy_get_next_buffer( ) )
  16809. + {
  16810. + case EOB_ACT_END_OF_FILE:
  16811. + {
  16812. + (yy_did_buffer_switch_on_eof) = 0;
  16813. +
  16814. + if ( zconfwrap( ) )
  16815. + {
  16816. + /* Note: because we've taken care in
  16817. + * yy_get_next_buffer() to have set up
  16818. + * zconftext, we can now set up
  16819. + * yy_c_buf_p so that if some total
  16820. + * hoser (like flex itself) wants to
  16821. + * call the scanner after we return the
  16822. + * YY_NULL, it'll still work - another
  16823. + * YY_NULL will get returned.
  16824. + */
  16825. + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
  16826. +
  16827. + yy_act = YY_STATE_EOF(YY_START);
  16828. + goto do_action;
  16829. + }
  16830. +
  16831. + else
  16832. + {
  16833. + if ( ! (yy_did_buffer_switch_on_eof) )
  16834. + YY_NEW_FILE;
  16835. + }
  16836. + break;
  16837. + }
  16838. +
  16839. + case EOB_ACT_CONTINUE_SCAN:
  16840. + (yy_c_buf_p) =
  16841. + (yytext_ptr) + yy_amount_of_matched_text;
  16842. +
  16843. + yy_current_state = yy_get_previous_state( );
  16844. +
  16845. + yy_cp = (yy_c_buf_p);
  16846. + yy_bp = (yytext_ptr) + YY_MORE_ADJ;
  16847. + goto yy_match;
  16848. +
  16849. + case EOB_ACT_LAST_MATCH:
  16850. + (yy_c_buf_p) =
  16851. + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
  16852. +
  16853. + yy_current_state = yy_get_previous_state( );
  16854. +
  16855. + yy_cp = (yy_c_buf_p);
  16856. + yy_bp = (yytext_ptr) + YY_MORE_ADJ;
  16857. + goto yy_find_action;
  16858. + }
  16859. + break;
  16860. + }
  16861. +
  16862. + default:
  16863. + YY_FATAL_ERROR(
  16864. + "fatal flex scanner internal error--no action found" );
  16865. + } /* end of action switch */
  16866. + } /* end of scanning one token */
  16867. +} /* end of zconflex */
  16868. +
  16869. +/* yy_get_next_buffer - try to read in a new buffer
  16870. + *
  16871. + * Returns a code representing an action:
  16872. + * EOB_ACT_LAST_MATCH -
  16873. + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  16874. + * EOB_ACT_END_OF_FILE - end of file
  16875. + */
  16876. +static int yy_get_next_buffer (void)
  16877. +{
  16878. + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
  16879. + register char *source = (yytext_ptr);
  16880. + register int number_to_move, i;
  16881. + int ret_val;
  16882. +
  16883. + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
  16884. + YY_FATAL_ERROR(
  16885. + "fatal flex scanner internal error--end of buffer missed" );
  16886. +
  16887. + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
  16888. + { /* Don't try to fill the buffer, so this is an EOF. */
  16889. + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
  16890. + {
  16891. + /* We matched a single character, the EOB, so
  16892. + * treat this as a final EOF.
  16893. + */
  16894. + return EOB_ACT_END_OF_FILE;
  16895. + }
  16896. +
  16897. + else
  16898. + {
  16899. + /* We matched some text prior to the EOB, first
  16900. + * process it.
  16901. + */
  16902. + return EOB_ACT_LAST_MATCH;
  16903. + }
  16904. + }
  16905. +
  16906. + /* Try to read more data. */
  16907. +
  16908. + /* First move last chars to start of buffer. */
  16909. + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
  16910. +
  16911. + for ( i = 0; i < number_to_move; ++i )
  16912. + *(dest++) = *(source++);
  16913. +
  16914. + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
  16915. + /* don't do the read, it's not guaranteed to return an EOF,
  16916. + * just force an EOF
  16917. + */
  16918. + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
  16919. +
  16920. + else
  16921. + {
  16922. + int num_to_read =
  16923. + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
  16924. +
  16925. + while ( num_to_read <= 0 )
  16926. + { /* Not enough room in the buffer - grow it. */
  16927. +
  16928. + /* just a shorter name for the current buffer */
  16929. + YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
  16930. +
  16931. + int yy_c_buf_p_offset =
  16932. + (int) ((yy_c_buf_p) - b->yy_ch_buf);
  16933. +
  16934. + if ( b->yy_is_our_buffer )
  16935. + {
  16936. + int new_size = b->yy_buf_size * 2;
  16937. +
  16938. + if ( new_size <= 0 )
  16939. + b->yy_buf_size += b->yy_buf_size / 8;
  16940. + else
  16941. + b->yy_buf_size *= 2;
  16942. +
  16943. + b->yy_ch_buf = (char *)
  16944. + /* Include room in for 2 EOB chars. */
  16945. + zconfrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
  16946. + }
  16947. + else
  16948. + /* Can't grow it, we don't own it. */
  16949. + b->yy_ch_buf = 0;
  16950. +
  16951. + if ( ! b->yy_ch_buf )
  16952. + YY_FATAL_ERROR(
  16953. + "fatal error - scanner input buffer overflow" );
  16954. +
  16955. + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
  16956. +
  16957. + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
  16958. + number_to_move - 1;
  16959. +
  16960. + }
  16961. +
  16962. + if ( num_to_read > YY_READ_BUF_SIZE )
  16963. + num_to_read = YY_READ_BUF_SIZE;
  16964. +
  16965. + /* Read in more data. */
  16966. + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
  16967. + (yy_n_chars), (size_t) num_to_read );
  16968. +
  16969. + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
  16970. + }
  16971. +
  16972. + if ( (yy_n_chars) == 0 )
  16973. + {
  16974. + if ( number_to_move == YY_MORE_ADJ )
  16975. + {
  16976. + ret_val = EOB_ACT_END_OF_FILE;
  16977. + zconfrestart(zconfin );
  16978. + }
  16979. +
  16980. + else
  16981. + {
  16982. + ret_val = EOB_ACT_LAST_MATCH;
  16983. + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
  16984. + YY_BUFFER_EOF_PENDING;
  16985. + }
  16986. + }
  16987. +
  16988. + else
  16989. + ret_val = EOB_ACT_CONTINUE_SCAN;
  16990. +
  16991. + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
  16992. + /* Extend the array by 50%, plus the number we really need. */
  16993. + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
  16994. + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) zconfrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
  16995. + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
  16996. + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
  16997. + }
  16998. +
  16999. + (yy_n_chars) += number_to_move;
  17000. + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
  17001. + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
  17002. +
  17003. + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
  17004. +
  17005. + return ret_val;
  17006. +}
  17007. +
  17008. +/* yy_get_previous_state - get the state just before the EOB char was reached */
  17009. +
  17010. + static yy_state_type yy_get_previous_state (void)
  17011. +{
  17012. + register yy_state_type yy_current_state;
  17013. + register char *yy_cp;
  17014. +
  17015. + yy_current_state = (yy_start);
  17016. +
  17017. + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
  17018. + {
  17019. + yy_current_state = yy_nxt[yy_current_state][(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1)];
  17020. + }
  17021. +
  17022. + return yy_current_state;
  17023. +}
  17024. +
  17025. +/* yy_try_NUL_trans - try to make a transition on the NUL character
  17026. + *
  17027. + * synopsis
  17028. + * next_state = yy_try_NUL_trans( current_state );
  17029. + */
  17030. + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
  17031. +{
  17032. + register int yy_is_jam;
  17033. +
  17034. + yy_current_state = yy_nxt[yy_current_state][1];
  17035. + yy_is_jam = (yy_current_state <= 0);
  17036. +
  17037. + return yy_is_jam ? 0 : yy_current_state;
  17038. +}
  17039. +
  17040. + static void yyunput (int c, register char * yy_bp )
  17041. +{
  17042. + register char *yy_cp;
  17043. +
  17044. + yy_cp = (yy_c_buf_p);
  17045. +
  17046. + /* undo effects of setting up zconftext */
  17047. + *yy_cp = (yy_hold_char);
  17048. +
  17049. + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
  17050. + { /* need to shift things up to make room */
  17051. + /* +2 for EOB chars. */
  17052. + register int number_to_move = (yy_n_chars) + 2;
  17053. + register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
  17054. + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
  17055. + register char *source =
  17056. + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
  17057. +
  17058. + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
  17059. + *--dest = *--source;
  17060. +
  17061. + yy_cp += (int) (dest - source);
  17062. + yy_bp += (int) (dest - source);
  17063. + YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
  17064. + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
  17065. +
  17066. + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
  17067. + YY_FATAL_ERROR( "flex scanner push-back overflow" );
  17068. + }
  17069. +
  17070. + *--yy_cp = (char) c;
  17071. +
  17072. + (yytext_ptr) = yy_bp;
  17073. + (yy_hold_char) = *yy_cp;
  17074. + (yy_c_buf_p) = yy_cp;
  17075. +}
  17076. +
  17077. +#ifndef YY_NO_INPUT
  17078. +#ifdef __cplusplus
  17079. + static int yyinput (void)
  17080. +#else
  17081. + static int input (void)
  17082. +#endif
  17083. +
  17084. +{
  17085. + int c;
  17086. +
  17087. + *(yy_c_buf_p) = (yy_hold_char);
  17088. +
  17089. + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
  17090. + {
  17091. + /* yy_c_buf_p now points to the character we want to return.
  17092. + * If this occurs *before* the EOB characters, then it's a
  17093. + * valid NUL; if not, then we've hit the end of the buffer.
  17094. + */
  17095. + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
  17096. + /* This was really a NUL. */
  17097. + *(yy_c_buf_p) = '\0';
  17098. +
  17099. + else
  17100. + { /* need more input */
  17101. + int offset = (yy_c_buf_p) - (yytext_ptr);
  17102. + ++(yy_c_buf_p);
  17103. +
  17104. + switch ( yy_get_next_buffer( ) )
  17105. + {
  17106. + case EOB_ACT_LAST_MATCH:
  17107. + /* This happens because yy_g_n_b()
  17108. + * sees that we've accumulated a
  17109. + * token and flags that we need to
  17110. + * try matching the token before
  17111. + * proceeding. But for input(),
  17112. + * there's no matching to consider.
  17113. + * So convert the EOB_ACT_LAST_MATCH
  17114. + * to EOB_ACT_END_OF_FILE.
  17115. + */
  17116. +
  17117. + /* Reset buffer status. */
  17118. + zconfrestart(zconfin );
  17119. +
  17120. + /*FALLTHROUGH*/
  17121. +
  17122. + case EOB_ACT_END_OF_FILE:
  17123. + {
  17124. + if ( zconfwrap( ) )
  17125. + return EOF;
  17126. +
  17127. + if ( ! (yy_did_buffer_switch_on_eof) )
  17128. + YY_NEW_FILE;
  17129. +#ifdef __cplusplus
  17130. + return yyinput();
  17131. +#else
  17132. + return input();
  17133. +#endif
  17134. + }
  17135. +
  17136. + case EOB_ACT_CONTINUE_SCAN:
  17137. + (yy_c_buf_p) = (yytext_ptr) + offset;
  17138. + break;
  17139. + }
  17140. + }
  17141. + }
  17142. +
  17143. + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
  17144. + *(yy_c_buf_p) = '\0'; /* preserve zconftext */
  17145. + (yy_hold_char) = *++(yy_c_buf_p);
  17146. +
  17147. + return c;
  17148. +}
  17149. +#endif /* ifndef YY_NO_INPUT */
  17150. +
  17151. +/** Immediately switch to a different input stream.
  17152. + * @param input_file A readable stream.
  17153. + *
  17154. + * @note This function does not reset the start condition to @c INITIAL .
  17155. + */
  17156. + void zconfrestart (FILE * input_file )
  17157. +{
  17158. +
  17159. + if ( ! YY_CURRENT_BUFFER ){
  17160. + zconfensure_buffer_stack ();
  17161. + YY_CURRENT_BUFFER_LVALUE =
  17162. + zconf_create_buffer(zconfin,YY_BUF_SIZE );
  17163. + }
  17164. +
  17165. + zconf_init_buffer(YY_CURRENT_BUFFER,input_file );
  17166. + zconf_load_buffer_state( );
  17167. +}
  17168. +
  17169. +/** Switch to a different input buffer.
  17170. + * @param new_buffer The new input buffer.
  17171. + *
  17172. + */
  17173. + void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer )
  17174. +{
  17175. +
  17176. + /* TODO. We should be able to replace this entire function body
  17177. + * with
  17178. + * zconfpop_buffer_state();
  17179. + * zconfpush_buffer_state(new_buffer);
  17180. + */
  17181. + zconfensure_buffer_stack ();
  17182. + if ( YY_CURRENT_BUFFER == new_buffer )
  17183. + return;
  17184. +
  17185. + if ( YY_CURRENT_BUFFER )
  17186. + {
  17187. + /* Flush out information for old buffer. */
  17188. + *(yy_c_buf_p) = (yy_hold_char);
  17189. + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
  17190. + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
  17191. + }
  17192. +
  17193. + YY_CURRENT_BUFFER_LVALUE = new_buffer;
  17194. + zconf_load_buffer_state( );
  17195. +
  17196. + /* We don't actually know whether we did this switch during
  17197. + * EOF (zconfwrap()) processing, but the only time this flag
  17198. + * is looked at is after zconfwrap() is called, so it's safe
  17199. + * to go ahead and always set it.
  17200. + */
  17201. + (yy_did_buffer_switch_on_eof) = 1;
  17202. +}
  17203. +
  17204. +static void zconf_load_buffer_state (void)
  17205. +{
  17206. + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
  17207. + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
  17208. + zconfin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
  17209. + (yy_hold_char) = *(yy_c_buf_p);
  17210. +}
  17211. +
  17212. +/** Allocate and initialize an input buffer state.
  17213. + * @param file A readable stream.
  17214. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
  17215. + *
  17216. + * @return the allocated buffer state.
  17217. + */
  17218. + YY_BUFFER_STATE zconf_create_buffer (FILE * file, int size )
  17219. +{
  17220. + YY_BUFFER_STATE b;
  17221. +
  17222. + b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) );
  17223. + if ( ! b )
  17224. + YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" );
  17225. +
  17226. + b->yy_buf_size = size;
  17227. +
  17228. + /* yy_ch_buf has to be 2 characters longer than the size given because
  17229. + * we need to put in 2 end-of-buffer characters.
  17230. + */
  17231. + b->yy_ch_buf = (char *) zconfalloc(b->yy_buf_size + 2 );
  17232. + if ( ! b->yy_ch_buf )
  17233. + YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" );
  17234. +
  17235. + b->yy_is_our_buffer = 1;
  17236. +
  17237. + zconf_init_buffer(b,file );
  17238. +
  17239. + return b;
  17240. +}
  17241. +
  17242. +/** Destroy the buffer.
  17243. + * @param b a buffer created with zconf_create_buffer()
  17244. + *
  17245. + */
  17246. + void zconf_delete_buffer (YY_BUFFER_STATE b )
  17247. +{
  17248. +
  17249. + if ( ! b )
  17250. + return;
  17251. +
  17252. + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
  17253. + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
  17254. +
  17255. + if ( b->yy_is_our_buffer )
  17256. + zconffree((void *) b->yy_ch_buf );
  17257. +
  17258. + zconffree((void *) b );
  17259. +}
  17260. +
  17261. +/* Initializes or reinitializes a buffer.
  17262. + * This function is sometimes called more than once on the same buffer,
  17263. + * such as during a zconfrestart() or at EOF.
  17264. + */
  17265. + static void zconf_init_buffer (YY_BUFFER_STATE b, FILE * file )
  17266. +
  17267. +{
  17268. + int oerrno = errno;
  17269. +
  17270. + zconf_flush_buffer(b );
  17271. +
  17272. + b->yy_input_file = file;
  17273. + b->yy_fill_buffer = 1;
  17274. +
  17275. + /* If b is the current buffer, then zconf_init_buffer was _probably_
  17276. + * called from zconfrestart() or through yy_get_next_buffer.
  17277. + * In that case, we don't want to reset the lineno or column.
  17278. + */
  17279. + if (b != YY_CURRENT_BUFFER){
  17280. + b->yy_bs_lineno = 1;
  17281. + b->yy_bs_column = 0;
  17282. + }
  17283. +
  17284. + b->yy_is_interactive = 0;
  17285. +
  17286. + errno = oerrno;
  17287. +}
  17288. +
  17289. +/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
  17290. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
  17291. + *
  17292. + */
  17293. + void zconf_flush_buffer (YY_BUFFER_STATE b )
  17294. +{
  17295. + if ( ! b )
  17296. + return;
  17297. +
  17298. + b->yy_n_chars = 0;
  17299. +
  17300. + /* We always need two end-of-buffer characters. The first causes
  17301. + * a transition to the end-of-buffer state. The second causes
  17302. + * a jam in that state.
  17303. + */
  17304. + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
  17305. + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  17306. +
  17307. + b->yy_buf_pos = &b->yy_ch_buf[0];
  17308. +
  17309. + b->yy_at_bol = 1;
  17310. + b->yy_buffer_status = YY_BUFFER_NEW;
  17311. +
  17312. + if ( b == YY_CURRENT_BUFFER )
  17313. + zconf_load_buffer_state( );
  17314. +}
  17315. +
  17316. +/** Pushes the new state onto the stack. The new state becomes
  17317. + * the current state. This function will allocate the stack
  17318. + * if necessary.
  17319. + * @param new_buffer The new state.
  17320. + *
  17321. + */
  17322. +void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer )
  17323. +{
  17324. + if (new_buffer == NULL)
  17325. + return;
  17326. +
  17327. + zconfensure_buffer_stack();
  17328. +
  17329. + /* This block is copied from zconf_switch_to_buffer. */
  17330. + if ( YY_CURRENT_BUFFER )
  17331. + {
  17332. + /* Flush out information for old buffer. */
  17333. + *(yy_c_buf_p) = (yy_hold_char);
  17334. + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
  17335. + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
  17336. + }
  17337. +
  17338. + /* Only push if top exists. Otherwise, replace top. */
  17339. + if (YY_CURRENT_BUFFER)
  17340. + (yy_buffer_stack_top)++;
  17341. + YY_CURRENT_BUFFER_LVALUE = new_buffer;
  17342. +
  17343. + /* copied from zconf_switch_to_buffer. */
  17344. + zconf_load_buffer_state( );
  17345. + (yy_did_buffer_switch_on_eof) = 1;
  17346. +}
  17347. +
  17348. +/** Removes and deletes the top of the stack, if present.
  17349. + * The next element becomes the new top.
  17350. + *
  17351. + */
  17352. +void zconfpop_buffer_state (void)
  17353. +{
  17354. + if (!YY_CURRENT_BUFFER)
  17355. + return;
  17356. +
  17357. + zconf_delete_buffer(YY_CURRENT_BUFFER );
  17358. + YY_CURRENT_BUFFER_LVALUE = NULL;
  17359. + if ((yy_buffer_stack_top) > 0)
  17360. + --(yy_buffer_stack_top);
  17361. +
  17362. + if (YY_CURRENT_BUFFER) {
  17363. + zconf_load_buffer_state( );
  17364. + (yy_did_buffer_switch_on_eof) = 1;
  17365. + }
  17366. +}
  17367. +
  17368. +/* Allocates the stack if it does not exist.
  17369. + * Guarantees space for at least one push.
  17370. + */
  17371. +static void zconfensure_buffer_stack (void)
  17372. +{
  17373. + int num_to_alloc;
  17374. +
  17375. + if (!(yy_buffer_stack)) {
  17376. +
  17377. + /* First allocation is just for 2 elements, since we don't know if this
  17378. + * scanner will even need a stack. We use 2 instead of 1 to avoid an
  17379. + * immediate realloc on the next call.
  17380. + */
  17381. + num_to_alloc = 1;
  17382. + (yy_buffer_stack) = (struct yy_buffer_state**)zconfalloc
  17383. + (num_to_alloc * sizeof(struct yy_buffer_state*)
  17384. + );
  17385. + if ( ! (yy_buffer_stack) )
  17386. + YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" );
  17387. +
  17388. + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
  17389. +
  17390. + (yy_buffer_stack_max) = num_to_alloc;
  17391. + (yy_buffer_stack_top) = 0;
  17392. + return;
  17393. + }
  17394. +
  17395. + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
  17396. +
  17397. + /* Increase the buffer to prepare for a possible push. */
  17398. + int grow_size = 8 /* arbitrary grow size */;
  17399. +
  17400. + num_to_alloc = (yy_buffer_stack_max) + grow_size;
  17401. + (yy_buffer_stack) = (struct yy_buffer_state**)zconfrealloc
  17402. + ((yy_buffer_stack),
  17403. + num_to_alloc * sizeof(struct yy_buffer_state*)
  17404. + );
  17405. + if ( ! (yy_buffer_stack) )
  17406. + YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" );
  17407. +
  17408. + /* zero only the new slots.*/
  17409. + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
  17410. + (yy_buffer_stack_max) = num_to_alloc;
  17411. + }
  17412. +}
  17413. +
  17414. +/** Setup the input buffer state to scan directly from a user-specified character buffer.
  17415. + * @param base the character buffer
  17416. + * @param size the size in bytes of the character buffer
  17417. + *
  17418. + * @return the newly allocated buffer state object.
  17419. + */
  17420. +YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size )
  17421. +{
  17422. + YY_BUFFER_STATE b;
  17423. +
  17424. + if ( size < 2 ||
  17425. + base[size-2] != YY_END_OF_BUFFER_CHAR ||
  17426. + base[size-1] != YY_END_OF_BUFFER_CHAR )
  17427. + /* They forgot to leave room for the EOB's. */
  17428. + return 0;
  17429. +
  17430. + b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) );
  17431. + if ( ! b )
  17432. + YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_buffer()" );
  17433. +
  17434. + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
  17435. + b->yy_buf_pos = b->yy_ch_buf = base;
  17436. + b->yy_is_our_buffer = 0;
  17437. + b->yy_input_file = 0;
  17438. + b->yy_n_chars = b->yy_buf_size;
  17439. + b->yy_is_interactive = 0;
  17440. + b->yy_at_bol = 1;
  17441. + b->yy_fill_buffer = 0;
  17442. + b->yy_buffer_status = YY_BUFFER_NEW;
  17443. +
  17444. + zconf_switch_to_buffer(b );
  17445. +
  17446. + return b;
  17447. +}
  17448. +
  17449. +/** Setup the input buffer state to scan a string. The next call to zconflex() will
  17450. + * scan from a @e copy of @a str.
  17451. + * @param yystr a NUL-terminated string to scan
  17452. + *
  17453. + * @return the newly allocated buffer state object.
  17454. + * @note If you want to scan bytes that may contain NUL values, then use
  17455. + * zconf_scan_bytes() instead.
  17456. + */
  17457. +YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr )
  17458. +{
  17459. +
  17460. + return zconf_scan_bytes(yystr,strlen(yystr) );
  17461. +}
  17462. +
  17463. +/** Setup the input buffer state to scan the given bytes. The next call to zconflex() will
  17464. + * scan from a @e copy of @a bytes.
  17465. + * @param bytes the byte buffer to scan
  17466. + * @param len the number of bytes in the buffer pointed to by @a bytes.
  17467. + *
  17468. + * @return the newly allocated buffer state object.
  17469. + */
  17470. +YY_BUFFER_STATE zconf_scan_bytes (yyconst char * yybytes, int _yybytes_len )
  17471. +{
  17472. + YY_BUFFER_STATE b;
  17473. + char *buf;
  17474. + yy_size_t n;
  17475. + int i;
  17476. +
  17477. + /* Get memory for full buffer, including space for trailing EOB's. */
  17478. + n = _yybytes_len + 2;
  17479. + buf = (char *) zconfalloc(n );
  17480. + if ( ! buf )
  17481. + YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_bytes()" );
  17482. +
  17483. + for ( i = 0; i < _yybytes_len; ++i )
  17484. + buf[i] = yybytes[i];
  17485. +
  17486. + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
  17487. +
  17488. + b = zconf_scan_buffer(buf,n );
  17489. + if ( ! b )
  17490. + YY_FATAL_ERROR( "bad buffer in zconf_scan_bytes()" );
  17491. +
  17492. + /* It's okay to grow etc. this buffer, and we should throw it
  17493. + * away when we're done.
  17494. + */
  17495. + b->yy_is_our_buffer = 1;
  17496. +
  17497. + return b;
  17498. +}
  17499. +
  17500. +#ifndef YY_EXIT_FAILURE
  17501. +#define YY_EXIT_FAILURE 2
  17502. +#endif
  17503. +
  17504. +static void yy_fatal_error (yyconst char* msg )
  17505. +{
  17506. + (void) fprintf( stderr, "%s\n", msg );
  17507. + exit( YY_EXIT_FAILURE );
  17508. +}
  17509. +
  17510. +/* Redefine yyless() so it works in section 3 code. */
  17511. +
  17512. +#undef yyless
  17513. +#define yyless(n) \
  17514. + do \
  17515. + { \
  17516. + /* Undo effects of setting up zconftext. */ \
  17517. + int yyless_macro_arg = (n); \
  17518. + YY_LESS_LINENO(yyless_macro_arg);\
  17519. + zconftext[zconfleng] = (yy_hold_char); \
  17520. + (yy_c_buf_p) = zconftext + yyless_macro_arg; \
  17521. + (yy_hold_char) = *(yy_c_buf_p); \
  17522. + *(yy_c_buf_p) = '\0'; \
  17523. + zconfleng = yyless_macro_arg; \
  17524. + } \
  17525. + while ( 0 )
  17526. +
  17527. +/* Accessor methods (get/set functions) to struct members. */
  17528. +
  17529. +/** Get the current line number.
  17530. + *
  17531. + */
  17532. +int zconfget_lineno (void)
  17533. +{
  17534. +
  17535. + return zconflineno;
  17536. +}
  17537. +
  17538. +/** Get the input stream.
  17539. + *
  17540. + */
  17541. +FILE *zconfget_in (void)
  17542. +{
  17543. + return zconfin;
  17544. +}
  17545. +
  17546. +/** Get the output stream.
  17547. + *
  17548. + */
  17549. +FILE *zconfget_out (void)
  17550. +{
  17551. + return zconfout;
  17552. +}
  17553. +
  17554. +/** Get the length of the current token.
  17555. + *
  17556. + */
  17557. +int zconfget_leng (void)
  17558. +{
  17559. + return zconfleng;
  17560. +}
  17561. +
  17562. +/** Get the current token.
  17563. + *
  17564. + */
  17565. +
  17566. +char *zconfget_text (void)
  17567. +{
  17568. + return zconftext;
  17569. +}
  17570. +
  17571. +/** Set the current line number.
  17572. + * @param line_number
  17573. + *
  17574. + */
  17575. +void zconfset_lineno (int line_number )
  17576. +{
  17577. +
  17578. + zconflineno = line_number;
  17579. +}
  17580. +
  17581. +/** Set the input stream. This does not discard the current
  17582. + * input buffer.
  17583. + * @param in_str A readable stream.
  17584. + *
  17585. + * @see zconf_switch_to_buffer
  17586. + */
  17587. +void zconfset_in (FILE * in_str )
  17588. +{
  17589. + zconfin = in_str ;
  17590. +}
  17591. +
  17592. +void zconfset_out (FILE * out_str )
  17593. +{
  17594. + zconfout = out_str ;
  17595. +}
  17596. +
  17597. +int zconfget_debug (void)
  17598. +{
  17599. + return zconf_flex_debug;
  17600. +}
  17601. +
  17602. +void zconfset_debug (int bdebug )
  17603. +{
  17604. + zconf_flex_debug = bdebug ;
  17605. +}
  17606. +
  17607. +static int yy_init_globals (void)
  17608. +{
  17609. + /* Initialization is the same as for the non-reentrant scanner.
  17610. + * This function is called from zconflex_destroy(), so don't allocate here.
  17611. + */
  17612. +
  17613. + (yy_buffer_stack) = 0;
  17614. + (yy_buffer_stack_top) = 0;
  17615. + (yy_buffer_stack_max) = 0;
  17616. + (yy_c_buf_p) = (char *) 0;
  17617. + (yy_init) = 0;
  17618. + (yy_start) = 0;
  17619. +
  17620. +/* Defined in main.c */
  17621. +#ifdef YY_STDINIT
  17622. + zconfin = stdin;
  17623. + zconfout = stdout;
  17624. +#else
  17625. + zconfin = (FILE *) 0;
  17626. + zconfout = (FILE *) 0;
  17627. +#endif
  17628. +
  17629. + /* For future reference: Set errno on error, since we are called by
  17630. + * zconflex_init()
  17631. + */
  17632. + return 0;
  17633. +}
  17634. +
  17635. +/* zconflex_destroy is for both reentrant and non-reentrant scanners. */
  17636. +int zconflex_destroy (void)
  17637. +{
  17638. +
  17639. + /* Pop the buffer stack, destroying each element. */
  17640. + while(YY_CURRENT_BUFFER){
  17641. + zconf_delete_buffer(YY_CURRENT_BUFFER );
  17642. + YY_CURRENT_BUFFER_LVALUE = NULL;
  17643. + zconfpop_buffer_state();
  17644. + }
  17645. +
  17646. + /* Destroy the stack itself. */
  17647. + zconffree((yy_buffer_stack) );
  17648. + (yy_buffer_stack) = NULL;
  17649. +
  17650. + /* Reset the globals. This is important in a non-reentrant scanner so the next time
  17651. + * zconflex() is called, initialization will occur. */
  17652. + yy_init_globals( );
  17653. +
  17654. + return 0;
  17655. +}
  17656. +
  17657. +/*
  17658. + * Internal utility routines.
  17659. + */
  17660. +
  17661. +#ifndef yytext_ptr
  17662. +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
  17663. +{
  17664. + register int i;
  17665. + for ( i = 0; i < n; ++i )
  17666. + s1[i] = s2[i];
  17667. +}
  17668. +#endif
  17669. +
  17670. +#ifdef YY_NEED_STRLEN
  17671. +static int yy_flex_strlen (yyconst char * s )
  17672. +{
  17673. + register int n;
  17674. + for ( n = 0; s[n]; ++n )
  17675. + ;
  17676. +
  17677. + return n;
  17678. +}
  17679. +#endif
  17680. +
  17681. +void *zconfalloc (yy_size_t size )
  17682. +{
  17683. + return (void *) malloc( size );
  17684. +}
  17685. +
  17686. +void *zconfrealloc (void * ptr, yy_size_t size )
  17687. +{
  17688. + /* The cast to (char *) in the following accommodates both
  17689. + * implementations that use char* generic pointers, and those
  17690. + * that use void* generic pointers. It works with the latter
  17691. + * because both ANSI C and C++ allow castless assignment from
  17692. + * any pointer type to void*, and deal with argument conversions
  17693. + * as though doing an assignment.
  17694. + */
  17695. + return (void *) realloc( (char *) ptr, size );
  17696. +}
  17697. +
  17698. +void zconffree (void * ptr )
  17699. +{
  17700. + free( (char *) ptr ); /* see zconfrealloc() for (char *) cast */
  17701. +}
  17702. +
  17703. +#define YYTABLES_NAME "yytables"
  17704. +
  17705. +void zconf_starthelp(void)
  17706. +{
  17707. + new_string();
  17708. + last_ts = first_ts = 0;
  17709. + BEGIN(HELP);
  17710. +}
  17711. +
  17712. +static void zconf_endhelp(void)
  17713. +{
  17714. + zconflval.string = text;
  17715. + BEGIN(INITIAL);
  17716. +}
  17717. +
  17718. +/*
  17719. + * Try to open specified file with following names:
  17720. + * ./name
  17721. + * $(srctree)/name
  17722. + * The latter is used when srctree is separate from objtree
  17723. + * when compiling the kernel.
  17724. + * Return NULL if file is not found.
  17725. + */
  17726. +FILE *zconf_fopen(const char *name)
  17727. +{
  17728. + char *env, fullname[PATH_MAX+1];
  17729. + FILE *f;
  17730. +
  17731. + f = fopen(name, "r");
  17732. + if (!f && name != NULL && name[0] != '/') {
  17733. + env = getenv(SRCTREE);
  17734. + if (env) {
  17735. + sprintf(fullname, "%s/%s", env, name);
  17736. + f = fopen(fullname, "r");
  17737. + }
  17738. + }
  17739. + return f;
  17740. +}
  17741. +
  17742. +void zconf_initscan(const char *name)
  17743. +{
  17744. + zconfin = zconf_fopen(name);
  17745. + if (!zconfin) {
  17746. + printf("can't find file %s\n", name);
  17747. + exit(1);
  17748. + }
  17749. +
  17750. + current_buf = xmalloc(sizeof(*current_buf));
  17751. + memset(current_buf, 0, sizeof(*current_buf));
  17752. +
  17753. + current_file = file_lookup(name);
  17754. + current_file->lineno = 1;
  17755. +}
  17756. +
  17757. +void zconf_nextfile(const char *name)
  17758. +{
  17759. + struct file *iter;
  17760. + struct file *file = file_lookup(name);
  17761. + struct buffer *buf = xmalloc(sizeof(*buf));
  17762. + memset(buf, 0, sizeof(*buf));
  17763. +
  17764. + current_buf->state = YY_CURRENT_BUFFER;
  17765. + zconfin = zconf_fopen(file->name);
  17766. + if (!zconfin) {
  17767. + printf("%s:%d: can't open file \"%s\"\n",
  17768. + zconf_curname(), zconf_lineno(), file->name);
  17769. + exit(1);
  17770. + }
  17771. + zconf_switch_to_buffer(zconf_create_buffer(zconfin,YY_BUF_SIZE));
  17772. + buf->parent = current_buf;
  17773. + current_buf = buf;
  17774. +
  17775. + for (iter = current_file->parent; iter; iter = iter->parent ) {
  17776. + if (!strcmp(current_file->name,iter->name) ) {
  17777. + printf("%s:%d: recursive inclusion detected. "
  17778. + "Inclusion path:\n current file : '%s'\n",
  17779. + zconf_curname(), zconf_lineno(),
  17780. + zconf_curname());
  17781. + iter = current_file->parent;
  17782. + while (iter && \
  17783. + strcmp(iter->name,current_file->name)) {
  17784. + printf(" included from: '%s:%d'\n",
  17785. + iter->name, iter->lineno-1);
  17786. + iter = iter->parent;
  17787. + }
  17788. + if (iter)
  17789. + printf(" included from: '%s:%d'\n",
  17790. + iter->name, iter->lineno+1);
  17791. + exit(1);
  17792. + }
  17793. + }
  17794. + file->lineno = 1;
  17795. + file->parent = current_file;
  17796. + current_file = file;
  17797. +}
  17798. +
  17799. +static void zconf_endfile(void)
  17800. +{
  17801. + struct buffer *parent;
  17802. +
  17803. + current_file = current_file->parent;
  17804. +
  17805. + parent = current_buf->parent;
  17806. + if (parent) {
  17807. + fclose(zconfin);
  17808. + zconf_delete_buffer(YY_CURRENT_BUFFER);
  17809. + zconf_switch_to_buffer(parent->state);
  17810. + }
  17811. + free(current_buf);
  17812. + current_buf = parent;
  17813. +}
  17814. +
  17815. +int zconf_lineno(void)
  17816. +{
  17817. + return current_pos.lineno;
  17818. +}
  17819. +
  17820. +const char *zconf_curname(void)
  17821. +{
  17822. + return current_pos.file ? current_pos.file->name : "<none>";
  17823. +}
  17824. +
  17825. diff -Nur uClibc-0.9.33.2/extra/config/zconf.tab.c_shipped uClibc-git/extra/config/zconf.tab.c_shipped
  17826. --- uClibc-0.9.33.2/extra/config/zconf.tab.c_shipped 2012-05-15 09:20:09.000000000 +0200
  17827. +++ uClibc-git/extra/config/zconf.tab.c_shipped 2014-07-25 20:36:04.865324519 +0200
  17828. @@ -1,24 +1,22 @@
  17829. -/* A Bison parser, made by GNU Bison 2.3. */
  17830. +/* A Bison parser, made by GNU Bison 2.4.3. */
  17831. /* Skeleton implementation for Bison's Yacc-like parsers in C
  17832. -
  17833. - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
  17834. - Free Software Foundation, Inc.
  17835. -
  17836. - This program is free software; you can redistribute it and/or modify
  17837. +
  17838. + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
  17839. + 2009, 2010 Free Software Foundation, Inc.
  17840. +
  17841. + This program is free software: you can redistribute it and/or modify
  17842. it under the terms of the GNU General Public License as published by
  17843. - the Free Software Foundation; either version 2, or (at your option)
  17844. - any later version.
  17845. -
  17846. + the Free Software Foundation, either version 3 of the License, or
  17847. + (at your option) any later version.
  17848. +
  17849. This program is distributed in the hope that it will be useful,
  17850. but WITHOUT ANY WARRANTY; without even the implied warranty of
  17851. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17852. GNU General Public License for more details.
  17853. -
  17854. +
  17855. You should have received a copy of the GNU General Public License
  17856. - along with this program; if not, write to the Free Software
  17857. - Foundation, Inc., 51 Franklin Street, Fifth Floor,
  17858. - Boston, MA 02110-1301, USA. */
  17859. + along with this program. If not, see <http://www.gnu.org/licenses/>. */
  17860. /* As a special exception, you may create a larger work that contains
  17861. part or all of the Bison parser skeleton and distribute that work
  17862. @@ -29,7 +27,7 @@
  17863. special exception, which will cause the skeleton and the resulting
  17864. Bison output files to be licensed under the GNU General Public
  17865. License without this special exception.
  17866. -
  17867. +
  17868. This special exception was added by the Free Software Foundation in
  17869. version 2.2 of Bison. */
  17870. @@ -47,7 +45,7 @@
  17871. #define YYBISON 1
  17872. /* Bison version. */
  17873. -#define YYBISON_VERSION "2.3"
  17874. +#define YYBISON_VERSION "2.4.3"
  17875. /* Skeleton name. */
  17876. #define YYSKELETON_NAME "yacc.c"
  17877. @@ -55,94 +53,23 @@
  17878. /* Pure parsers. */
  17879. #define YYPURE 0
  17880. +/* Push parsers. */
  17881. +#define YYPUSH 0
  17882. +
  17883. +/* Pull parsers. */
  17884. +#define YYPULL 1
  17885. +
  17886. /* Using locations. */
  17887. #define YYLSP_NEEDED 0
  17888. /* Substitute the variable and function names. */
  17889. -#define yyparse zconfparse
  17890. -#define yylex zconflex
  17891. -#define yyerror zconferror
  17892. -#define yylval zconflval
  17893. -#define yychar zconfchar
  17894. -#define yydebug zconfdebug
  17895. -#define yynerrs zconfnerrs
  17896. -
  17897. -
  17898. -/* Tokens. */
  17899. -#ifndef YYTOKENTYPE
  17900. -# define YYTOKENTYPE
  17901. - /* Put the tokens into the symbol table, so that GDB and other debuggers
  17902. - know about them. */
  17903. - enum yytokentype {
  17904. - T_MAINMENU = 258,
  17905. - T_MENU = 259,
  17906. - T_ENDMENU = 260,
  17907. - T_SOURCE = 261,
  17908. - T_CHOICE = 262,
  17909. - T_ENDCHOICE = 263,
  17910. - T_COMMENT = 264,
  17911. - T_CONFIG = 265,
  17912. - T_MENUCONFIG = 266,
  17913. - T_HELP = 267,
  17914. - T_HELPTEXT = 268,
  17915. - T_IF = 269,
  17916. - T_ENDIF = 270,
  17917. - T_DEPENDS = 271,
  17918. - T_OPTIONAL = 272,
  17919. - T_PROMPT = 273,
  17920. - T_TYPE = 274,
  17921. - T_DEFAULT = 275,
  17922. - T_SELECT = 276,
  17923. - T_RANGE = 277,
  17924. - T_OPTION = 278,
  17925. - T_ON = 279,
  17926. - T_WORD = 280,
  17927. - T_WORD_QUOTE = 281,
  17928. - T_UNEQUAL = 282,
  17929. - T_CLOSE_PAREN = 283,
  17930. - T_OPEN_PAREN = 284,
  17931. - T_EOL = 285,
  17932. - T_OR = 286,
  17933. - T_AND = 287,
  17934. - T_EQUAL = 288,
  17935. - T_NOT = 289
  17936. - };
  17937. -#endif
  17938. -/* Tokens. */
  17939. -#define T_MAINMENU 258
  17940. -#define T_MENU 259
  17941. -#define T_ENDMENU 260
  17942. -#define T_SOURCE 261
  17943. -#define T_CHOICE 262
  17944. -#define T_ENDCHOICE 263
  17945. -#define T_COMMENT 264
  17946. -#define T_CONFIG 265
  17947. -#define T_MENUCONFIG 266
  17948. -#define T_HELP 267
  17949. -#define T_HELPTEXT 268
  17950. -#define T_IF 269
  17951. -#define T_ENDIF 270
  17952. -#define T_DEPENDS 271
  17953. -#define T_OPTIONAL 272
  17954. -#define T_PROMPT 273
  17955. -#define T_TYPE 274
  17956. -#define T_DEFAULT 275
  17957. -#define T_SELECT 276
  17958. -#define T_RANGE 277
  17959. -#define T_OPTION 278
  17960. -#define T_ON 279
  17961. -#define T_WORD 280
  17962. -#define T_WORD_QUOTE 281
  17963. -#define T_UNEQUAL 282
  17964. -#define T_CLOSE_PAREN 283
  17965. -#define T_OPEN_PAREN 284
  17966. -#define T_EOL 285
  17967. -#define T_OR 286
  17968. -#define T_AND 287
  17969. -#define T_EQUAL 288
  17970. -#define T_NOT 289
  17971. -
  17972. -
  17973. +#define yyparse zconfparse
  17974. +#define yylex zconflex
  17975. +#define yyerror zconferror
  17976. +#define yylval zconflval
  17977. +#define yychar zconfchar
  17978. +#define yydebug zconfdebug
  17979. +#define yynerrs zconfnerrs
  17980. /* Copy the first part of user declarations. */
  17981. @@ -160,11 +87,8 @@
  17982. #include <string.h>
  17983. #include <stdbool.h>
  17984. -#define LKC_DIRECT_LINK
  17985. #include "lkc.h"
  17986. -#include "zconf.hash.c"
  17987. -
  17988. #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
  17989. #define PRINTD 0x0001
  17990. @@ -176,21 +100,18 @@
  17991. static void zconfprint(const char *err, ...);
  17992. static void zconf_error(const char *err, ...);
  17993. static void zconferror(const char *err);
  17994. -static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken);
  17995. +static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken);
  17996. -struct symbol *symbol_hash[257];
  17997. +struct symbol *symbol_hash[SYMBOL_HASHSIZE];
  17998. static struct menu *current_menu, *current_entry;
  17999. -#define YYDEBUG 0
  18000. -#if YYDEBUG
  18001. -#define YYERROR_VERBOSE
  18002. -#endif
  18003. +
  18004. /* Enabling traces. */
  18005. #ifndef YYDEBUG
  18006. -# define YYDEBUG 0
  18007. +# define YYDEBUG 1
  18008. #endif
  18009. /* Enabling verbose error messages. */
  18010. @@ -206,31 +127,78 @@
  18011. # define YYTOKEN_TABLE 0
  18012. #endif
  18013. +
  18014. +/* Tokens. */
  18015. +#ifndef YYTOKENTYPE
  18016. +# define YYTOKENTYPE
  18017. + /* Put the tokens into the symbol table, so that GDB and other debuggers
  18018. + know about them. */
  18019. + enum yytokentype {
  18020. + T_MAINMENU = 258,
  18021. + T_MENU = 259,
  18022. + T_ENDMENU = 260,
  18023. + T_SOURCE = 261,
  18024. + T_CHOICE = 262,
  18025. + T_ENDCHOICE = 263,
  18026. + T_COMMENT = 264,
  18027. + T_CONFIG = 265,
  18028. + T_MENUCONFIG = 266,
  18029. + T_HELP = 267,
  18030. + T_HELPTEXT = 268,
  18031. + T_IF = 269,
  18032. + T_ENDIF = 270,
  18033. + T_DEPENDS = 271,
  18034. + T_OPTIONAL = 272,
  18035. + T_PROMPT = 273,
  18036. + T_TYPE = 274,
  18037. + T_DEFAULT = 275,
  18038. + T_SELECT = 276,
  18039. + T_RANGE = 277,
  18040. + T_VISIBLE = 278,
  18041. + T_OPTION = 279,
  18042. + T_ON = 280,
  18043. + T_WORD = 281,
  18044. + T_WORD_QUOTE = 282,
  18045. + T_UNEQUAL = 283,
  18046. + T_CLOSE_PAREN = 284,
  18047. + T_OPEN_PAREN = 285,
  18048. + T_EOL = 286,
  18049. + T_OR = 287,
  18050. + T_AND = 288,
  18051. + T_EQUAL = 289,
  18052. + T_NOT = 290
  18053. + };
  18054. +#endif
  18055. +
  18056. +
  18057. +
  18058. #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
  18059. typedef union YYSTYPE
  18060. -
  18061. {
  18062. +
  18063. +
  18064. char *string;
  18065. struct file *file;
  18066. struct symbol *symbol;
  18067. struct expr *expr;
  18068. struct menu *menu;
  18069. - struct kconf_id *id;
  18070. -}
  18071. -/* Line 187 of yacc.c. */
  18072. + const struct kconf_id *id;
  18073. +
  18074. +
  18075. - YYSTYPE;
  18076. +} YYSTYPE;
  18077. +# define YYSTYPE_IS_TRIVIAL 1
  18078. # define yystype YYSTYPE /* obsolescent; will be withdrawn */
  18079. # define YYSTYPE_IS_DECLARED 1
  18080. -# define YYSTYPE_IS_TRIVIAL 1
  18081. #endif
  18082. -
  18083. /* Copy the second part of user declarations. */
  18084. -/* Line 216 of yacc.c. */
  18085. +/* Include zconf.hash.c here so it can see the token constants. */
  18086. +#include "zconf.hash.c"
  18087. +
  18088. #ifdef short
  18089. @@ -281,7 +249,7 @@
  18090. #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
  18091. #ifndef YY_
  18092. -# if YYENABLE_NLS
  18093. +# if defined YYENABLE_NLS && YYENABLE_NLS
  18094. # if ENABLE_NLS
  18095. # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
  18096. # define YY_(msgid) dgettext ("bison-runtime", msgid)
  18097. @@ -306,14 +274,14 @@
  18098. #if (defined __STDC__ || defined __C99__FUNC__ \
  18099. || defined __cplusplus || defined _MSC_VER)
  18100. static int
  18101. -YYID (int i)
  18102. +YYID (int yyi)
  18103. #else
  18104. static int
  18105. -YYID (i)
  18106. - int i;
  18107. +YYID (yyi)
  18108. + int yyi;
  18109. #endif
  18110. {
  18111. - return i;
  18112. + return yyi;
  18113. }
  18114. #endif
  18115. @@ -394,9 +362,9 @@
  18116. /* A type that is properly aligned for any stack member. */
  18117. union yyalloc
  18118. {
  18119. - yytype_int16 yyss;
  18120. - YYSTYPE yyvs;
  18121. - };
  18122. + yytype_int16 yyss_alloc;
  18123. + YYSTYPE yyvs_alloc;
  18124. +};
  18125. /* The size of the maximum gap between one aligned stack and the next. */
  18126. # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
  18127. @@ -430,12 +398,12 @@
  18128. elements in the stack, and YYPTR gives the new location of the
  18129. stack. Advance YYPTR to a properly aligned location for the next
  18130. stack. */
  18131. -# define YYSTACK_RELOCATE(Stack) \
  18132. +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
  18133. do \
  18134. { \
  18135. YYSIZE_T yynewbytes; \
  18136. - YYCOPY (&yyptr->Stack, Stack, yysize); \
  18137. - Stack = &yyptr->Stack; \
  18138. + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
  18139. + Stack = &yyptr->Stack_alloc; \
  18140. yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
  18141. yyptr += yynewbytes / sizeof (*yyptr); \
  18142. } \
  18143. @@ -444,22 +412,22 @@
  18144. #endif
  18145. /* YYFINAL -- State number of the termination state. */
  18146. -#define YYFINAL 3
  18147. +#define YYFINAL 11
  18148. /* YYLAST -- Last index in YYTABLE. */
  18149. -#define YYLAST 259
  18150. +#define YYLAST 290
  18151. /* YYNTOKENS -- Number of terminals. */
  18152. -#define YYNTOKENS 35
  18153. +#define YYNTOKENS 36
  18154. /* YYNNTS -- Number of nonterminals. */
  18155. -#define YYNNTS 46
  18156. +#define YYNNTS 50
  18157. /* YYNRULES -- Number of rules. */
  18158. -#define YYNRULES 110
  18159. +#define YYNRULES 118
  18160. /* YYNRULES -- Number of states. */
  18161. -#define YYNSTATES 180
  18162. +#define YYNSTATES 191
  18163. /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
  18164. #define YYUNDEFTOK 2
  18165. -#define YYMAXUTOK 289
  18166. +#define YYMAXUTOK 290
  18167. #define YYTRANSLATE(YYX) \
  18168. ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
  18169. @@ -495,7 +463,8 @@
  18170. 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
  18171. 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
  18172. 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
  18173. - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34
  18174. + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
  18175. + 35
  18176. };
  18177. #if YYDEBUG
  18178. @@ -503,73 +472,75 @@
  18179. YYRHS. */
  18180. static const yytype_uint16 yyprhs[] =
  18181. {
  18182. - 0, 0, 3, 5, 6, 9, 12, 15, 20, 23,
  18183. - 28, 33, 37, 39, 41, 43, 45, 47, 49, 51,
  18184. - 53, 55, 57, 59, 61, 63, 67, 70, 74, 77,
  18185. - 81, 84, 85, 88, 91, 94, 97, 100, 103, 107,
  18186. - 112, 117, 122, 128, 132, 133, 137, 138, 141, 145,
  18187. - 148, 150, 154, 155, 158, 161, 164, 167, 170, 175,
  18188. - 179, 182, 187, 188, 191, 195, 197, 201, 202, 205,
  18189. - 208, 211, 215, 218, 220, 224, 225, 228, 231, 234,
  18190. - 238, 242, 245, 248, 251, 252, 255, 258, 261, 266,
  18191. - 267, 270, 272, 274, 277, 280, 283, 285, 288, 289,
  18192. - 292, 294, 298, 302, 306, 309, 313, 317, 319, 321,
  18193. - 322
  18194. + 0, 0, 3, 6, 8, 11, 13, 14, 17, 20,
  18195. + 23, 26, 31, 36, 40, 42, 44, 46, 48, 50,
  18196. + 52, 54, 56, 58, 60, 62, 64, 66, 68, 72,
  18197. + 75, 79, 82, 86, 89, 90, 93, 96, 99, 102,
  18198. + 105, 108, 112, 117, 122, 127, 133, 137, 138, 142,
  18199. + 143, 146, 150, 153, 155, 159, 160, 163, 166, 169,
  18200. + 172, 175, 180, 184, 187, 192, 193, 196, 200, 202,
  18201. + 206, 207, 210, 213, 216, 220, 224, 228, 230, 234,
  18202. + 235, 238, 241, 244, 248, 252, 255, 258, 261, 262,
  18203. + 265, 268, 271, 276, 277, 280, 283, 286, 287, 290,
  18204. + 292, 294, 297, 300, 303, 305, 308, 309, 312, 314,
  18205. + 318, 322, 326, 329, 333, 337, 339, 341, 342
  18206. };
  18207. /* YYRHS -- A `-1'-separated list of the rules' RHS. */
  18208. static const yytype_int8 yyrhs[] =
  18209. {
  18210. - 36, 0, -1, 37, -1, -1, 37, 39, -1, 37,
  18211. - 53, -1, 37, 64, -1, 37, 3, 74, 76, -1,
  18212. - 37, 75, -1, 37, 25, 1, 30, -1, 37, 38,
  18213. - 1, 30, -1, 37, 1, 30, -1, 16, -1, 18,
  18214. - -1, 19, -1, 21, -1, 17, -1, 22, -1, 20,
  18215. - -1, 30, -1, 59, -1, 68, -1, 42, -1, 44,
  18216. - -1, 66, -1, 25, 1, 30, -1, 1, 30, -1,
  18217. - 10, 25, 30, -1, 41, 45, -1, 11, 25, 30,
  18218. - -1, 43, 45, -1, -1, 45, 46, -1, 45, 47,
  18219. - -1, 45, 72, -1, 45, 70, -1, 45, 40, -1,
  18220. - 45, 30, -1, 19, 73, 30, -1, 18, 74, 77,
  18221. - 30, -1, 20, 78, 77, 30, -1, 21, 25, 77,
  18222. - 30, -1, 22, 79, 79, 77, 30, -1, 23, 48,
  18223. - 30, -1, -1, 48, 25, 49, -1, -1, 33, 74,
  18224. - -1, 7, 80, 30, -1, 50, 54, -1, 75, -1,
  18225. - 51, 56, 52, -1, -1, 54, 55, -1, 54, 72,
  18226. - -1, 54, 70, -1, 54, 30, -1, 54, 40, -1,
  18227. - 18, 74, 77, 30, -1, 19, 73, 30, -1, 17,
  18228. - 30, -1, 20, 25, 77, 30, -1, -1, 56, 39,
  18229. - -1, 14, 78, 76, -1, 75, -1, 57, 60, 58,
  18230. - -1, -1, 60, 39, -1, 60, 64, -1, 60, 53,
  18231. - -1, 4, 74, 30, -1, 61, 71, -1, 75, -1,
  18232. - 62, 65, 63, -1, -1, 65, 39, -1, 65, 64,
  18233. - -1, 65, 53, -1, 6, 74, 30, -1, 9, 74,
  18234. - 30, -1, 67, 71, -1, 12, 30, -1, 69, 13,
  18235. - -1, -1, 71, 72, -1, 71, 30, -1, 71, 40,
  18236. - -1, 16, 24, 78, 30, -1, -1, 74, 77, -1,
  18237. - 25, -1, 26, -1, 5, 30, -1, 8, 30, -1,
  18238. - 15, 30, -1, 30, -1, 76, 30, -1, -1, 14,
  18239. - 78, -1, 79, -1, 79, 33, 79, -1, 79, 27,
  18240. - 79, -1, 29, 78, 28, -1, 34, 78, -1, 78,
  18241. - 31, 78, -1, 78, 32, 78, -1, 25, -1, 26,
  18242. - -1, -1, 25, -1
  18243. + 37, 0, -1, 81, 38, -1, 38, -1, 63, 39,
  18244. + -1, 39, -1, -1, 39, 41, -1, 39, 55, -1,
  18245. + 39, 67, -1, 39, 80, -1, 39, 26, 1, 31,
  18246. + -1, 39, 40, 1, 31, -1, 39, 1, 31, -1,
  18247. + 16, -1, 18, -1, 19, -1, 21, -1, 17, -1,
  18248. + 22, -1, 20, -1, 23, -1, 31, -1, 61, -1,
  18249. + 71, -1, 44, -1, 46, -1, 69, -1, 26, 1,
  18250. + 31, -1, 1, 31, -1, 10, 26, 31, -1, 43,
  18251. + 47, -1, 11, 26, 31, -1, 45, 47, -1, -1,
  18252. + 47, 48, -1, 47, 49, -1, 47, 75, -1, 47,
  18253. + 73, -1, 47, 42, -1, 47, 31, -1, 19, 78,
  18254. + 31, -1, 18, 79, 82, 31, -1, 20, 83, 82,
  18255. + 31, -1, 21, 26, 82, 31, -1, 22, 84, 84,
  18256. + 82, 31, -1, 24, 50, 31, -1, -1, 50, 26,
  18257. + 51, -1, -1, 34, 79, -1, 7, 85, 31, -1,
  18258. + 52, 56, -1, 80, -1, 53, 58, 54, -1, -1,
  18259. + 56, 57, -1, 56, 75, -1, 56, 73, -1, 56,
  18260. + 31, -1, 56, 42, -1, 18, 79, 82, 31, -1,
  18261. + 19, 78, 31, -1, 17, 31, -1, 20, 26, 82,
  18262. + 31, -1, -1, 58, 41, -1, 14, 83, 81, -1,
  18263. + 80, -1, 59, 62, 60, -1, -1, 62, 41, -1,
  18264. + 62, 67, -1, 62, 55, -1, 3, 79, 81, -1,
  18265. + 4, 79, 31, -1, 64, 76, 74, -1, 80, -1,
  18266. + 65, 68, 66, -1, -1, 68, 41, -1, 68, 67,
  18267. + -1, 68, 55, -1, 6, 79, 31, -1, 9, 79,
  18268. + 31, -1, 70, 74, -1, 12, 31, -1, 72, 13,
  18269. + -1, -1, 74, 75, -1, 74, 31, -1, 74, 42,
  18270. + -1, 16, 25, 83, 31, -1, -1, 76, 77, -1,
  18271. + 76, 31, -1, 23, 82, -1, -1, 79, 82, -1,
  18272. + 26, -1, 27, -1, 5, 31, -1, 8, 31, -1,
  18273. + 15, 31, -1, 31, -1, 81, 31, -1, -1, 14,
  18274. + 83, -1, 84, -1, 84, 34, 84, -1, 84, 28,
  18275. + 84, -1, 30, 83, 29, -1, 35, 83, -1, 83,
  18276. + 32, 83, -1, 83, 33, 83, -1, 26, -1, 27,
  18277. + -1, -1, 26, -1
  18278. };
  18279. /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
  18280. static const yytype_uint16 yyrline[] =
  18281. {
  18282. - 0, 104, 104, 106, 108, 109, 110, 111, 112, 113,
  18283. - 114, 118, 122, 122, 122, 122, 122, 122, 122, 126,
  18284. - 127, 128, 129, 130, 131, 135, 136, 142, 150, 156,
  18285. - 164, 174, 176, 177, 178, 179, 180, 181, 184, 192,
  18286. - 198, 208, 214, 220, 223, 225, 236, 237, 242, 251,
  18287. - 256, 264, 267, 269, 270, 271, 272, 273, 276, 282,
  18288. - 293, 299, 309, 311, 316, 324, 332, 335, 337, 338,
  18289. - 339, 344, 351, 356, 364, 367, 369, 370, 371, 374,
  18290. - 382, 389, 396, 402, 409, 411, 412, 413, 416, 424,
  18291. - 426, 431, 432, 435, 436, 437, 441, 442, 445, 446,
  18292. - 449, 450, 451, 452, 453, 454, 455, 458, 459, 462,
  18293. - 463
  18294. + 0, 104, 104, 104, 106, 106, 108, 110, 111, 112,
  18295. + 113, 114, 115, 119, 123, 123, 123, 123, 123, 123,
  18296. + 123, 123, 127, 128, 129, 130, 131, 132, 136, 137,
  18297. + 143, 151, 157, 165, 175, 177, 178, 179, 180, 181,
  18298. + 182, 185, 193, 199, 209, 215, 221, 224, 226, 237,
  18299. + 238, 243, 252, 257, 265, 268, 270, 271, 272, 273,
  18300. + 274, 277, 283, 294, 300, 310, 312, 317, 325, 333,
  18301. + 336, 338, 339, 340, 345, 352, 359, 364, 372, 375,
  18302. + 377, 378, 379, 382, 390, 397, 404, 410, 417, 419,
  18303. + 420, 421, 424, 432, 434, 435, 438, 445, 447, 452,
  18304. + 453, 456, 457, 458, 462, 463, 466, 467, 470, 471,
  18305. + 472, 473, 474, 475, 476, 479, 480, 483, 484
  18306. };
  18307. #endif
  18308. @@ -582,19 +553,19 @@
  18309. "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG",
  18310. "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS",
  18311. "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", "T_SELECT", "T_RANGE",
  18312. - "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL",
  18313. + "T_VISIBLE", "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL",
  18314. "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", "T_EQUAL",
  18315. - "T_NOT", "$accept", "input", "stmt_list", "option_name", "common_stmt",
  18316. - "option_error", "config_entry_start", "config_stmt",
  18317. + "T_NOT", "$accept", "input", "start", "stmt_list", "option_name",
  18318. + "common_stmt", "option_error", "config_entry_start", "config_stmt",
  18319. "menuconfig_entry_start", "menuconfig_stmt", "config_option_list",
  18320. "config_option", "symbol_option", "symbol_option_list",
  18321. "symbol_option_arg", "choice", "choice_entry", "choice_end",
  18322. "choice_stmt", "choice_option_list", "choice_option", "choice_block",
  18323. - "if_entry", "if_end", "if_stmt", "if_block", "menu", "menu_entry",
  18324. - "menu_end", "menu_stmt", "menu_block", "source_stmt", "comment",
  18325. - "comment_stmt", "help_start", "help", "depends_list", "depends",
  18326. - "prompt_stmt_opt", "prompt", "end", "nl", "if_expr", "expr", "symbol",
  18327. - "word_opt", 0
  18328. + "if_entry", "if_end", "if_stmt", "if_block", "mainmenu_stmt", "menu",
  18329. + "menu_entry", "menu_end", "menu_stmt", "menu_block", "source_stmt",
  18330. + "comment", "comment_stmt", "help_start", "help", "depends_list",
  18331. + "depends", "visibility_list", "visible", "prompt_stmt_opt", "prompt",
  18332. + "end", "nl", "if_expr", "expr", "symbol", "word_opt", 0
  18333. };
  18334. #endif
  18335. @@ -606,42 +577,42 @@
  18336. 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
  18337. 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
  18338. 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
  18339. - 285, 286, 287, 288, 289
  18340. + 285, 286, 287, 288, 289, 290
  18341. };
  18342. # endif
  18343. /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
  18344. static const yytype_uint8 yyr1[] =
  18345. {
  18346. - 0, 35, 36, 37, 37, 37, 37, 37, 37, 37,
  18347. - 37, 37, 38, 38, 38, 38, 38, 38, 38, 39,
  18348. - 39, 39, 39, 39, 39, 40, 40, 41, 42, 43,
  18349. - 44, 45, 45, 45, 45, 45, 45, 45, 46, 46,
  18350. - 46, 46, 46, 47, 48, 48, 49, 49, 50, 51,
  18351. - 52, 53, 54, 54, 54, 54, 54, 54, 55, 55,
  18352. - 55, 55, 56, 56, 57, 58, 59, 60, 60, 60,
  18353. - 60, 61, 62, 63, 64, 65, 65, 65, 65, 66,
  18354. - 67, 68, 69, 70, 71, 71, 71, 71, 72, 73,
  18355. - 73, 74, 74, 75, 75, 75, 76, 76, 77, 77,
  18356. - 78, 78, 78, 78, 78, 78, 78, 79, 79, 80,
  18357. - 80
  18358. + 0, 36, 37, 37, 38, 38, 39, 39, 39, 39,
  18359. + 39, 39, 39, 39, 40, 40, 40, 40, 40, 40,
  18360. + 40, 40, 41, 41, 41, 41, 41, 41, 42, 42,
  18361. + 43, 44, 45, 46, 47, 47, 47, 47, 47, 47,
  18362. + 47, 48, 48, 48, 48, 48, 49, 50, 50, 51,
  18363. + 51, 52, 53, 54, 55, 56, 56, 56, 56, 56,
  18364. + 56, 57, 57, 57, 57, 58, 58, 59, 60, 61,
  18365. + 62, 62, 62, 62, 63, 64, 65, 66, 67, 68,
  18366. + 68, 68, 68, 69, 70, 71, 72, 73, 74, 74,
  18367. + 74, 74, 75, 76, 76, 76, 77, 78, 78, 79,
  18368. + 79, 80, 80, 80, 81, 81, 82, 82, 83, 83,
  18369. + 83, 83, 83, 83, 83, 84, 84, 85, 85
  18370. };
  18371. /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
  18372. static const yytype_uint8 yyr2[] =
  18373. {
  18374. - 0, 2, 1, 0, 2, 2, 2, 4, 2, 4,
  18375. - 4, 3, 1, 1, 1, 1, 1, 1, 1, 1,
  18376. - 1, 1, 1, 1, 1, 3, 2, 3, 2, 3,
  18377. - 2, 0, 2, 2, 2, 2, 2, 2, 3, 4,
  18378. - 4, 4, 5, 3, 0, 3, 0, 2, 3, 2,
  18379. - 1, 3, 0, 2, 2, 2, 2, 2, 4, 3,
  18380. - 2, 4, 0, 2, 3, 1, 3, 0, 2, 2,
  18381. - 2, 3, 2, 1, 3, 0, 2, 2, 2, 3,
  18382. - 3, 2, 2, 2, 0, 2, 2, 2, 4, 0,
  18383. - 2, 1, 1, 2, 2, 2, 1, 2, 0, 2,
  18384. - 1, 3, 3, 3, 2, 3, 3, 1, 1, 0,
  18385. - 1
  18386. + 0, 2, 2, 1, 2, 1, 0, 2, 2, 2,
  18387. + 2, 4, 4, 3, 1, 1, 1, 1, 1, 1,
  18388. + 1, 1, 1, 1, 1, 1, 1, 1, 3, 2,
  18389. + 3, 2, 3, 2, 0, 2, 2, 2, 2, 2,
  18390. + 2, 3, 4, 4, 4, 5, 3, 0, 3, 0,
  18391. + 2, 3, 2, 1, 3, 0, 2, 2, 2, 2,
  18392. + 2, 4, 3, 2, 4, 0, 2, 3, 1, 3,
  18393. + 0, 2, 2, 2, 3, 3, 3, 1, 3, 0,
  18394. + 2, 2, 2, 3, 3, 2, 2, 2, 0, 2,
  18395. + 2, 2, 4, 0, 2, 2, 2, 0, 2, 1,
  18396. + 1, 2, 2, 2, 1, 2, 0, 2, 1, 3,
  18397. + 3, 3, 2, 3, 3, 1, 1, 0, 1
  18398. };
  18399. /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
  18400. @@ -649,158 +620,172 @@
  18401. means the default is an error. */
  18402. static const yytype_uint8 yydefact[] =
  18403. {
  18404. - 3, 0, 0, 1, 0, 0, 0, 0, 0, 109,
  18405. - 0, 0, 0, 0, 0, 0, 12, 16, 13, 14,
  18406. - 18, 15, 17, 0, 19, 0, 4, 31, 22, 31,
  18407. - 23, 52, 62, 5, 67, 20, 84, 75, 6, 24,
  18408. - 84, 21, 8, 11, 91, 92, 0, 0, 93, 0,
  18409. - 110, 0, 94, 0, 0, 0, 107, 108, 0, 0,
  18410. - 0, 100, 95, 0, 0, 0, 0, 0, 0, 0,
  18411. - 0, 0, 0, 96, 7, 71, 79, 48, 80, 27,
  18412. - 29, 0, 104, 0, 0, 64, 0, 0, 9, 10,
  18413. - 0, 0, 0, 0, 89, 0, 0, 0, 44, 0,
  18414. - 37, 36, 32, 33, 0, 35, 34, 0, 0, 89,
  18415. - 0, 56, 57, 53, 55, 54, 63, 51, 50, 68,
  18416. - 70, 66, 69, 65, 86, 87, 85, 76, 78, 74,
  18417. - 77, 73, 97, 103, 105, 106, 102, 101, 26, 82,
  18418. - 0, 98, 0, 98, 98, 98, 0, 0, 0, 83,
  18419. - 60, 98, 0, 98, 0, 0, 0, 38, 90, 0,
  18420. - 0, 98, 46, 43, 25, 0, 59, 0, 88, 99,
  18421. - 39, 40, 41, 0, 0, 45, 58, 61, 42, 47
  18422. + 6, 0, 104, 0, 3, 0, 6, 6, 99, 100,
  18423. + 0, 1, 0, 0, 0, 0, 117, 0, 0, 0,
  18424. + 0, 0, 0, 14, 18, 15, 16, 20, 17, 19,
  18425. + 21, 0, 22, 0, 7, 34, 25, 34, 26, 55,
  18426. + 65, 8, 70, 23, 93, 79, 9, 27, 88, 24,
  18427. + 10, 0, 105, 2, 74, 13, 0, 101, 0, 118,
  18428. + 0, 102, 0, 0, 0, 115, 116, 0, 0, 0,
  18429. + 108, 103, 0, 0, 0, 0, 0, 0, 0, 88,
  18430. + 0, 0, 75, 83, 51, 84, 30, 32, 0, 112,
  18431. + 0, 0, 67, 0, 0, 11, 12, 0, 0, 0,
  18432. + 0, 97, 0, 0, 0, 47, 0, 40, 39, 35,
  18433. + 36, 0, 38, 37, 0, 0, 97, 0, 59, 60,
  18434. + 56, 58, 57, 66, 54, 53, 71, 73, 69, 72,
  18435. + 68, 106, 95, 0, 94, 80, 82, 78, 81, 77,
  18436. + 90, 91, 89, 111, 113, 114, 110, 109, 29, 86,
  18437. + 0, 106, 0, 106, 106, 106, 0, 0, 0, 87,
  18438. + 63, 106, 0, 106, 0, 96, 0, 0, 41, 98,
  18439. + 0, 0, 106, 49, 46, 28, 0, 62, 0, 107,
  18440. + 92, 42, 43, 44, 0, 0, 48, 61, 64, 45,
  18441. + 50
  18442. };
  18443. /* YYDEFGOTO[NTERM-NUM]. */
  18444. static const yytype_int16 yydefgoto[] =
  18445. {
  18446. - -1, 1, 2, 25, 26, 101, 27, 28, 29, 30,
  18447. - 65, 102, 103, 147, 175, 31, 32, 117, 33, 67,
  18448. - 113, 68, 34, 121, 35, 69, 36, 37, 129, 38,
  18449. - 71, 39, 40, 41, 104, 105, 70, 106, 142, 143,
  18450. - 42, 74, 156, 60, 61, 51
  18451. + -1, 3, 4, 5, 33, 34, 108, 35, 36, 37,
  18452. + 38, 74, 109, 110, 157, 186, 39, 40, 124, 41,
  18453. + 76, 120, 77, 42, 128, 43, 78, 6, 44, 45,
  18454. + 137, 46, 80, 47, 48, 49, 111, 112, 81, 113,
  18455. + 79, 134, 152, 153, 50, 7, 165, 69, 70, 60
  18456. };
  18457. /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
  18458. STATE-NUM. */
  18459. -#define YYPACT_NINF -80
  18460. +#define YYPACT_NINF -90
  18461. static const yytype_int16 yypact[] =
  18462. {
  18463. - -80, 2, 132, -80, -13, -1, -1, -2, -1, 9,
  18464. - 33, -1, 27, 40, -3, 38, -80, -80, -80, -80,
  18465. - -80, -80, -80, 71, -80, 77, -80, -80, -80, -80,
  18466. - -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
  18467. - -80, -80, -80, -80, -80, -80, 57, 61, -80, 63,
  18468. - -80, 76, -80, 87, 101, 133, -80, -80, -3, -3,
  18469. - 195, -6, -80, 136, 149, 39, 104, 65, 150, 5,
  18470. - 194, 5, 167, -80, 176, -80, -80, -80, -80, -80,
  18471. - -80, 68, -80, -3, -3, 176, 72, 72, -80, -80,
  18472. - 177, 187, 78, -1, -1, -3, 196, 72, -80, 222,
  18473. - -80, -80, -80, -80, 221, -80, -80, 205, -1, -1,
  18474. - 211, -80, -80, -80, -80, -80, -80, -80, -80, -80,
  18475. - -80, -80, -80, -80, -80, -80, -80, -80, -80, -80,
  18476. - -80, -80, -80, -80, 206, -80, -80, -80, -80, -80,
  18477. - -3, 223, 209, 223, 197, 223, 72, 7, 210, -80,
  18478. - -80, 223, 212, 223, 201, -3, 213, -80, -80, 214,
  18479. - 215, 223, 208, -80, -80, 216, -80, 217, -80, 113,
  18480. - -80, -80, -80, 218, -1, -80, -80, -80, -80, -80
  18481. + 4, 42, -90, 96, -90, 111, -90, 15, -90, -90,
  18482. + 75, -90, 82, 42, 104, 42, 110, 107, 42, 115,
  18483. + 125, -4, 121, -90, -90, -90, -90, -90, -90, -90,
  18484. + -90, 162, -90, 163, -90, -90, -90, -90, -90, -90,
  18485. + -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
  18486. + -90, 139, -90, -90, 138, -90, 142, -90, 143, -90,
  18487. + 152, -90, 164, 167, 168, -90, -90, -4, -4, 77,
  18488. + -18, -90, 177, 185, 33, 71, 195, 247, 236, -2,
  18489. + 236, 171, -90, -90, -90, -90, -90, -90, 41, -90,
  18490. + -4, -4, 138, 97, 97, -90, -90, 186, 187, 194,
  18491. + 42, 42, -4, 196, 97, -90, 219, -90, -90, -90,
  18492. + -90, 210, -90, -90, 204, 42, 42, 199, -90, -90,
  18493. + -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
  18494. + -90, 222, -90, 223, -90, -90, -90, -90, -90, -90,
  18495. + -90, -90, -90, -90, 215, -90, -90, -90, -90, -90,
  18496. + -4, 222, 228, 222, -5, 222, 97, 35, 229, -90,
  18497. + -90, 222, 232, 222, -4, -90, 135, 233, -90, -90,
  18498. + 234, 235, 222, 240, -90, -90, 237, -90, 239, -13,
  18499. + -90, -90, -90, -90, 244, 42, -90, -90, -90, -90,
  18500. + -90
  18501. };
  18502. /* YYPGOTO[NTERM-NUM]. */
  18503. static const yytype_int16 yypgoto[] =
  18504. {
  18505. - -80, -80, -80, -80, 122, -34, -80, -80, -80, -80,
  18506. - 220, -80, -80, -80, -80, -80, -80, -80, 59, -80,
  18507. - -80, -80, -80, -80, -80, -80, -80, -80, -80, 125,
  18508. - -80, -80, -80, -80, -80, 183, 219, 22, 142, -5,
  18509. - 147, 192, 69, -54, -79, -80
  18510. + -90, -90, 269, 271, -90, 23, -70, -90, -90, -90,
  18511. + -90, 243, -90, -90, -90, -90, -90, -90, -90, -48,
  18512. + -90, -90, -90, -90, -90, -90, -90, -90, -90, -90,
  18513. + -90, -20, -90, -90, -90, -90, -90, 206, 205, -68,
  18514. + -90, -90, 169, -1, 27, -7, 118, -66, -89, -90
  18515. };
  18516. /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
  18517. positive, shift that token. If negative, reduce the rule which
  18518. number is the opposite. If zero, do what YYDEFACT says.
  18519. If YYTABLE_NINF, syntax error. */
  18520. -#define YYTABLE_NINF -82
  18521. +#define YYTABLE_NINF -86
  18522. static const yytype_int16 yytable[] =
  18523. {
  18524. - 46, 47, 3, 49, 81, 82, 53, 136, 137, 6,
  18525. - 7, 8, 9, 10, 11, 12, 13, 43, 146, 14,
  18526. - 15, 86, 56, 57, 44, 45, 58, 87, 48, 134,
  18527. - 135, 59, 162, 112, 50, 24, 125, 163, 125, -28,
  18528. - 90, 144, -28, -28, -28, -28, -28, -28, -28, -28,
  18529. - -28, 91, 54, -28, -28, 92, -28, 93, 94, 95,
  18530. - 96, 97, 98, 52, 99, 55, 90, 161, 62, 100,
  18531. - -49, -49, 63, -49, -49, -49, -49, 91, 64, -49,
  18532. - -49, 92, 107, 108, 109, 110, 154, 73, 141, 115,
  18533. - 99, 75, 126, 76, 126, 111, 133, 56, 57, 83,
  18534. - 84, 169, 140, 151, -30, 90, 77, -30, -30, -30,
  18535. - -30, -30, -30, -30, -30, -30, 91, 78, -30, -30,
  18536. - 92, -30, 93, 94, 95, 96, 97, 98, 120, 99,
  18537. - 128, 79, -2, 4, 100, 5, 6, 7, 8, 9,
  18538. - 10, 11, 12, 13, 83, 84, 14, 15, 16, 17,
  18539. - 18, 19, 20, 21, 22, 7, 8, 23, 10, 11,
  18540. - 12, 13, 24, 80, 14, 15, 88, -81, 90, 179,
  18541. - -81, -81, -81, -81, -81, -81, -81, -81, -81, 89,
  18542. - 24, -81, -81, 92, -81, -81, -81, -81, -81, -81,
  18543. - 116, 119, 99, 127, 122, 90, 130, 124, -72, -72,
  18544. - -72, -72, -72, -72, -72, -72, 132, 138, -72, -72,
  18545. - 92, 155, 158, 159, 160, 118, 123, 139, 131, 99,
  18546. - 165, 145, 167, 148, 124, 73, 83, 84, 83, 84,
  18547. - 173, 168, 83, 84, 149, 150, 153, 155, 84, 157,
  18548. - 164, 174, 166, 170, 171, 172, 176, 177, 178, 66,
  18549. - 114, 152, 85, 0, 0, 0, 0, 0, 0, 72
  18550. + 10, 88, 89, 54, 146, 147, 119, 1, 122, 164,
  18551. + 93, 141, 56, 142, 58, 156, 94, 62, 1, 90,
  18552. + 91, 131, 65, 66, 144, 145, 67, 90, 91, 132,
  18553. + 127, 68, 136, -31, 97, 2, 154, -31, -31, -31,
  18554. + -31, -31, -31, -31, -31, 98, 52, -31, -31, 99,
  18555. + -31, 100, 101, 102, 103, 104, -31, 105, 129, 106,
  18556. + 138, 173, 92, 141, 107, 142, 174, 172, 8, 9,
  18557. + 143, -33, 97, 90, 91, -33, -33, -33, -33, -33,
  18558. + -33, -33, -33, 98, 166, -33, -33, 99, -33, 100,
  18559. + 101, 102, 103, 104, -33, 105, 11, 106, 179, 151,
  18560. + 123, 126, 107, 135, 125, 130, 2, 139, 2, 90,
  18561. + 91, -5, 12, 55, 161, 13, 14, 15, 16, 17,
  18562. + 18, 19, 20, 65, 66, 21, 22, 23, 24, 25,
  18563. + 26, 27, 28, 29, 30, 57, 59, 31, 61, -4,
  18564. + 12, 63, 32, 13, 14, 15, 16, 17, 18, 19,
  18565. + 20, 64, 71, 21, 22, 23, 24, 25, 26, 27,
  18566. + 28, 29, 30, 72, 73, 31, 180, 90, 91, 52,
  18567. + 32, -85, 97, 82, 83, -85, -85, -85, -85, -85,
  18568. + -85, -85, -85, 84, 190, -85, -85, 99, -85, -85,
  18569. + -85, -85, -85, -85, -85, 85, 97, 106, 86, 87,
  18570. + -52, -52, 140, -52, -52, -52, -52, 98, 95, -52,
  18571. + -52, 99, 114, 115, 116, 117, 96, 148, 149, 150,
  18572. + 158, 106, 155, 159, 97, 163, 118, -76, -76, -76,
  18573. + -76, -76, -76, -76, -76, 160, 164, -76, -76, 99,
  18574. + 13, 14, 15, 16, 17, 18, 19, 20, 91, 106,
  18575. + 21, 22, 14, 15, 140, 17, 18, 19, 20, 168,
  18576. + 175, 21, 22, 177, 181, 182, 183, 32, 187, 167,
  18577. + 188, 169, 170, 171, 185, 189, 53, 51, 32, 176,
  18578. + 75, 178, 121, 0, 133, 162, 0, 0, 0, 0,
  18579. + 184
  18580. };
  18581. static const yytype_int16 yycheck[] =
  18582. {
  18583. - 5, 6, 0, 8, 58, 59, 11, 86, 87, 4,
  18584. - 5, 6, 7, 8, 9, 10, 11, 30, 97, 14,
  18585. - 15, 27, 25, 26, 25, 26, 29, 33, 30, 83,
  18586. - 84, 34, 25, 67, 25, 30, 70, 30, 72, 0,
  18587. - 1, 95, 3, 4, 5, 6, 7, 8, 9, 10,
  18588. - 11, 12, 25, 14, 15, 16, 17, 18, 19, 20,
  18589. - 21, 22, 23, 30, 25, 25, 1, 146, 30, 30,
  18590. - 5, 6, 1, 8, 9, 10, 11, 12, 1, 14,
  18591. - 15, 16, 17, 18, 19, 20, 140, 30, 93, 67,
  18592. - 25, 30, 70, 30, 72, 30, 28, 25, 26, 31,
  18593. - 32, 155, 24, 108, 0, 1, 30, 3, 4, 5,
  18594. - 6, 7, 8, 9, 10, 11, 12, 30, 14, 15,
  18595. - 16, 17, 18, 19, 20, 21, 22, 23, 69, 25,
  18596. - 71, 30, 0, 1, 30, 3, 4, 5, 6, 7,
  18597. - 8, 9, 10, 11, 31, 32, 14, 15, 16, 17,
  18598. - 18, 19, 20, 21, 22, 5, 6, 25, 8, 9,
  18599. - 10, 11, 30, 30, 14, 15, 30, 0, 1, 174,
  18600. - 3, 4, 5, 6, 7, 8, 9, 10, 11, 30,
  18601. - 30, 14, 15, 16, 17, 18, 19, 20, 21, 22,
  18602. - 68, 69, 25, 71, 69, 1, 71, 30, 4, 5,
  18603. - 6, 7, 8, 9, 10, 11, 30, 30, 14, 15,
  18604. - 16, 14, 143, 144, 145, 68, 69, 30, 71, 25,
  18605. - 151, 25, 153, 1, 30, 30, 31, 32, 31, 32,
  18606. - 161, 30, 31, 32, 13, 30, 25, 14, 32, 30,
  18607. - 30, 33, 30, 30, 30, 30, 30, 30, 30, 29,
  18608. - 67, 109, 60, -1, -1, -1, -1, -1, -1, 40
  18609. + 1, 67, 68, 10, 93, 94, 76, 3, 76, 14,
  18610. + 28, 81, 13, 81, 15, 104, 34, 18, 3, 32,
  18611. + 33, 23, 26, 27, 90, 91, 30, 32, 33, 31,
  18612. + 78, 35, 80, 0, 1, 31, 102, 4, 5, 6,
  18613. + 7, 8, 9, 10, 11, 12, 31, 14, 15, 16,
  18614. + 17, 18, 19, 20, 21, 22, 23, 24, 78, 26,
  18615. + 80, 26, 69, 133, 31, 133, 31, 156, 26, 27,
  18616. + 29, 0, 1, 32, 33, 4, 5, 6, 7, 8,
  18617. + 9, 10, 11, 12, 150, 14, 15, 16, 17, 18,
  18618. + 19, 20, 21, 22, 23, 24, 0, 26, 164, 100,
  18619. + 77, 78, 31, 80, 77, 78, 31, 80, 31, 32,
  18620. + 33, 0, 1, 31, 115, 4, 5, 6, 7, 8,
  18621. + 9, 10, 11, 26, 27, 14, 15, 16, 17, 18,
  18622. + 19, 20, 21, 22, 23, 31, 26, 26, 31, 0,
  18623. + 1, 26, 31, 4, 5, 6, 7, 8, 9, 10,
  18624. + 11, 26, 31, 14, 15, 16, 17, 18, 19, 20,
  18625. + 21, 22, 23, 1, 1, 26, 31, 32, 33, 31,
  18626. + 31, 0, 1, 31, 31, 4, 5, 6, 7, 8,
  18627. + 9, 10, 11, 31, 185, 14, 15, 16, 17, 18,
  18628. + 19, 20, 21, 22, 23, 31, 1, 26, 31, 31,
  18629. + 5, 6, 31, 8, 9, 10, 11, 12, 31, 14,
  18630. + 15, 16, 17, 18, 19, 20, 31, 31, 31, 25,
  18631. + 1, 26, 26, 13, 1, 26, 31, 4, 5, 6,
  18632. + 7, 8, 9, 10, 11, 31, 14, 14, 15, 16,
  18633. + 4, 5, 6, 7, 8, 9, 10, 11, 33, 26,
  18634. + 14, 15, 5, 6, 31, 8, 9, 10, 11, 31,
  18635. + 31, 14, 15, 31, 31, 31, 31, 31, 31, 151,
  18636. + 31, 153, 154, 155, 34, 31, 7, 6, 31, 161,
  18637. + 37, 163, 76, -1, 79, 116, -1, -1, -1, -1,
  18638. + 172
  18639. };
  18640. /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
  18641. symbol of state STATE-NUM. */
  18642. static const yytype_uint8 yystos[] =
  18643. {
  18644. - 0, 36, 37, 0, 1, 3, 4, 5, 6, 7,
  18645. - 8, 9, 10, 11, 14, 15, 16, 17, 18, 19,
  18646. - 20, 21, 22, 25, 30, 38, 39, 41, 42, 43,
  18647. - 44, 50, 51, 53, 57, 59, 61, 62, 64, 66,
  18648. - 67, 68, 75, 30, 25, 26, 74, 74, 30, 74,
  18649. - 25, 80, 30, 74, 25, 25, 25, 26, 29, 34,
  18650. - 78, 79, 30, 1, 1, 45, 45, 54, 56, 60,
  18651. - 71, 65, 71, 30, 76, 30, 30, 30, 30, 30,
  18652. - 30, 78, 78, 31, 32, 76, 27, 33, 30, 30,
  18653. - 1, 12, 16, 18, 19, 20, 21, 22, 23, 25,
  18654. - 30, 40, 46, 47, 69, 70, 72, 17, 18, 19,
  18655. - 20, 30, 40, 55, 70, 72, 39, 52, 75, 39,
  18656. - 53, 58, 64, 75, 30, 40, 72, 39, 53, 63,
  18657. - 64, 75, 30, 28, 78, 78, 79, 79, 30, 30,
  18658. - 24, 74, 73, 74, 78, 25, 79, 48, 1, 13,
  18659. - 30, 74, 73, 25, 78, 14, 77, 30, 77, 77,
  18660. - 77, 79, 25, 30, 30, 77, 30, 77, 30, 78,
  18661. - 30, 30, 30, 77, 33, 49, 30, 30, 30, 74
  18662. + 0, 3, 31, 37, 38, 39, 63, 81, 26, 27,
  18663. + 79, 0, 1, 4, 5, 6, 7, 8, 9, 10,
  18664. + 11, 14, 15, 16, 17, 18, 19, 20, 21, 22,
  18665. + 23, 26, 31, 40, 41, 43, 44, 45, 46, 52,
  18666. + 53, 55, 59, 61, 64, 65, 67, 69, 70, 71,
  18667. + 80, 39, 31, 38, 81, 31, 79, 31, 79, 26,
  18668. + 85, 31, 79, 26, 26, 26, 27, 30, 35, 83,
  18669. + 84, 31, 1, 1, 47, 47, 56, 58, 62, 76,
  18670. + 68, 74, 31, 31, 31, 31, 31, 31, 83, 83,
  18671. + 32, 33, 81, 28, 34, 31, 31, 1, 12, 16,
  18672. + 18, 19, 20, 21, 22, 24, 26, 31, 42, 48,
  18673. + 49, 72, 73, 75, 17, 18, 19, 20, 31, 42,
  18674. + 57, 73, 75, 41, 54, 80, 41, 55, 60, 67,
  18675. + 80, 23, 31, 74, 77, 41, 55, 66, 67, 80,
  18676. + 31, 42, 75, 29, 83, 83, 84, 84, 31, 31,
  18677. + 25, 79, 78, 79, 83, 26, 84, 50, 1, 13,
  18678. + 31, 79, 78, 26, 14, 82, 83, 82, 31, 82,
  18679. + 82, 82, 84, 26, 31, 31, 82, 31, 82, 83,
  18680. + 31, 31, 31, 31, 82, 34, 51, 31, 31, 31,
  18681. + 79
  18682. };
  18683. #define yyerrok (yyerrstatus = 0)
  18684. @@ -815,9 +800,18 @@
  18685. /* Like YYERROR except do call yyerror. This remains here temporarily
  18686. to ease the transition to the new meaning of YYERROR, for GCC.
  18687. - Once GCC version 2 has supplanted version 1, this can go. */
  18688. + Once GCC version 2 has supplanted version 1, this can go. However,
  18689. + YYFAIL appears to be in use. Nevertheless, it is formally deprecated
  18690. + in Bison 2.4.2's NEWS entry, where a plan to phase it out is
  18691. + discussed. */
  18692. #define YYFAIL goto yyerrlab
  18693. +#if defined YYFAIL
  18694. + /* This is here to suppress warnings from the GCC cpp's
  18695. + -Wunused-macros. Normally we don't worry about that warning, but
  18696. + some users do, and we want to make it easy for users to remove
  18697. + YYFAIL uses, which will produce warnings from Bison 2.5. */
  18698. +#endif
  18699. #define YYRECOVERING() (!!yyerrstatus)
  18700. @@ -874,7 +868,7 @@
  18701. we won't break user code: when these are the locations we know. */
  18702. #ifndef YY_LOCATION_PRINT
  18703. -# if YYLTYPE_IS_TRIVIAL
  18704. +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
  18705. # define YY_LOCATION_PRINT(File, Loc) \
  18706. fprintf (File, "%d.%d-%d.%d", \
  18707. (Loc).first_line, (Loc).first_column, \
  18708. @@ -985,17 +979,20 @@
  18709. #if (defined __STDC__ || defined __C99__FUNC__ \
  18710. || defined __cplusplus || defined _MSC_VER)
  18711. static void
  18712. -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
  18713. +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
  18714. #else
  18715. static void
  18716. -yy_stack_print (bottom, top)
  18717. - yytype_int16 *bottom;
  18718. - yytype_int16 *top;
  18719. +yy_stack_print (yybottom, yytop)
  18720. + yytype_int16 *yybottom;
  18721. + yytype_int16 *yytop;
  18722. #endif
  18723. {
  18724. YYFPRINTF (stderr, "Stack now");
  18725. - for (; bottom <= top; ++bottom)
  18726. - YYFPRINTF (stderr, " %d", *bottom);
  18727. + for (; yybottom <= yytop; yybottom++)
  18728. + {
  18729. + int yybot = *yybottom;
  18730. + YYFPRINTF (stderr, " %d", yybot);
  18731. + }
  18732. YYFPRINTF (stderr, "\n");
  18733. }
  18734. @@ -1029,11 +1026,11 @@
  18735. /* The symbols being reduced. */
  18736. for (yyi = 0; yyi < yynrhs; yyi++)
  18737. {
  18738. - fprintf (stderr, " $%d = ", yyi + 1);
  18739. + YYFPRINTF (stderr, " $%d = ", yyi + 1);
  18740. yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
  18741. &(yyvsp[(yyi + 1) - (yynrhs)])
  18742. );
  18743. - fprintf (stderr, "\n");
  18744. + YYFPRINTF (stderr, "\n");
  18745. }
  18746. }
  18747. @@ -1308,7 +1305,7 @@
  18748. switch (yytype)
  18749. {
  18750. - case 51: /* "choice_entry" */
  18751. + case 53: /* "choice_entry" */
  18752. {
  18753. fprintf(stderr, "%s:%d: missing end statement for this entry\n",
  18754. @@ -1318,7 +1315,7 @@
  18755. };
  18756. break;
  18757. - case 57: /* "if_entry" */
  18758. + case 59: /* "if_entry" */
  18759. {
  18760. fprintf(stderr, "%s:%d: missing end statement for this entry\n",
  18761. @@ -1328,7 +1325,7 @@
  18762. };
  18763. break;
  18764. - case 62: /* "menu_entry" */
  18765. + case 65: /* "menu_entry" */
  18766. {
  18767. fprintf(stderr, "%s:%d: missing end statement for this entry\n",
  18768. @@ -1343,10 +1340,8 @@
  18769. break;
  18770. }
  18771. }
  18772. -
  18773. /* Prevent warnings from -Wmissing-prototypes. */
  18774. -
  18775. #ifdef YYPARSE_PARAM
  18776. #if defined __STDC__ || defined __cplusplus
  18777. int yyparse (void *YYPARSE_PARAM);
  18778. @@ -1362,11 +1357,10 @@
  18779. #endif /* ! YYPARSE_PARAM */
  18780. -
  18781. -/* The look-ahead symbol. */
  18782. +/* The lookahead symbol. */
  18783. int yychar;
  18784. -/* The semantic value of the look-ahead symbol. */
  18785. +/* The semantic value of the lookahead symbol. */
  18786. YYSTYPE yylval;
  18787. /* Number of syntax errors so far. */
  18788. @@ -1374,9 +1368,9 @@
  18789. -/*----------.
  18790. -| yyparse. |
  18791. -`----------*/
  18792. +/*-------------------------.
  18793. +| yyparse or yypush_parse. |
  18794. +`-------------------------*/
  18795. #ifdef YYPARSE_PARAM
  18796. #if (defined __STDC__ || defined __C99__FUNC__ \
  18797. @@ -1400,14 +1394,39 @@
  18798. #endif
  18799. #endif
  18800. {
  18801. -
  18802. - int yystate;
  18803. +
  18804. +
  18805. + int yystate;
  18806. + /* Number of tokens to shift before error messages enabled. */
  18807. + int yyerrstatus;
  18808. +
  18809. + /* The stacks and their tools:
  18810. + `yyss': related to states.
  18811. + `yyvs': related to semantic values.
  18812. +
  18813. + Refer to the stacks thru separate pointers, to allow yyoverflow
  18814. + to reallocate them elsewhere. */
  18815. +
  18816. + /* The state stack. */
  18817. + yytype_int16 yyssa[YYINITDEPTH];
  18818. + yytype_int16 *yyss;
  18819. + yytype_int16 *yyssp;
  18820. +
  18821. + /* The semantic value stack. */
  18822. + YYSTYPE yyvsa[YYINITDEPTH];
  18823. + YYSTYPE *yyvs;
  18824. + YYSTYPE *yyvsp;
  18825. +
  18826. + YYSIZE_T yystacksize;
  18827. +
  18828. int yyn;
  18829. int yyresult;
  18830. - /* Number of tokens to shift before error messages enabled. */
  18831. - int yyerrstatus;
  18832. - /* Look-ahead token as an internal (translated) token number. */
  18833. - int yytoken = 0;
  18834. + /* Lookahead token as an internal (translated) token number. */
  18835. + int yytoken;
  18836. + /* The variables used to return semantic value and location from the
  18837. + action routines. */
  18838. + YYSTYPE yyval;
  18839. +
  18840. #if YYERROR_VERBOSE
  18841. /* Buffer for error messages, and its allocated size. */
  18842. char yymsgbuf[128];
  18843. @@ -1415,51 +1434,28 @@
  18844. YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
  18845. #endif
  18846. - /* Three stacks and their tools:
  18847. - `yyss': related to states,
  18848. - `yyvs': related to semantic values,
  18849. - `yyls': related to locations.
  18850. -
  18851. - Refer to the stacks thru separate pointers, to allow yyoverflow
  18852. - to reallocate them elsewhere. */
  18853. -
  18854. - /* The state stack. */
  18855. - yytype_int16 yyssa[YYINITDEPTH];
  18856. - yytype_int16 *yyss = yyssa;
  18857. - yytype_int16 *yyssp;
  18858. -
  18859. - /* The semantic value stack. */
  18860. - YYSTYPE yyvsa[YYINITDEPTH];
  18861. - YYSTYPE *yyvs = yyvsa;
  18862. - YYSTYPE *yyvsp;
  18863. -
  18864. -
  18865. -
  18866. #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
  18867. - YYSIZE_T yystacksize = YYINITDEPTH;
  18868. -
  18869. - /* The variables used to return semantic value and location from the
  18870. - action routines. */
  18871. - YYSTYPE yyval;
  18872. -
  18873. -
  18874. /* The number of symbols on the RHS of the reduced rule.
  18875. Keep to zero when no symbol should be popped. */
  18876. int yylen = 0;
  18877. + yytoken = 0;
  18878. + yyss = yyssa;
  18879. + yyvs = yyvsa;
  18880. + yystacksize = YYINITDEPTH;
  18881. +
  18882. YYDPRINTF ((stderr, "Starting parse\n"));
  18883. yystate = 0;
  18884. yyerrstatus = 0;
  18885. yynerrs = 0;
  18886. - yychar = YYEMPTY; /* Cause a token to be read. */
  18887. + yychar = YYEMPTY; /* Cause a token to be read. */
  18888. /* Initialize stack pointers.
  18889. Waste one element of value and location stack
  18890. so that they stay on the same level as the state stack.
  18891. The wasted elements are never initialized. */
  18892. -
  18893. yyssp = yyss;
  18894. yyvsp = yyvs;
  18895. @@ -1489,7 +1485,6 @@
  18896. YYSTYPE *yyvs1 = yyvs;
  18897. yytype_int16 *yyss1 = yyss;
  18898. -
  18899. /* Each stack pointer address is followed by the size of the
  18900. data in use in that stack, in bytes. This used to be a
  18901. conditional around just the two extra args, but that might
  18902. @@ -1497,7 +1492,6 @@
  18903. yyoverflow (YY_("memory exhausted"),
  18904. &yyss1, yysize * sizeof (*yyssp),
  18905. &yyvs1, yysize * sizeof (*yyvsp),
  18906. -
  18907. &yystacksize);
  18908. yyss = yyss1;
  18909. @@ -1520,9 +1514,8 @@
  18910. (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
  18911. if (! yyptr)
  18912. goto yyexhaustedlab;
  18913. - YYSTACK_RELOCATE (yyss);
  18914. - YYSTACK_RELOCATE (yyvs);
  18915. -
  18916. + YYSTACK_RELOCATE (yyss_alloc, yyss);
  18917. + YYSTACK_RELOCATE (yyvs_alloc, yyvs);
  18918. # undef YYSTACK_RELOCATE
  18919. if (yyss1 != yyssa)
  18920. YYSTACK_FREE (yyss1);
  18921. @@ -1533,7 +1526,6 @@
  18922. yyssp = yyss + yysize - 1;
  18923. yyvsp = yyvs + yysize - 1;
  18924. -
  18925. YYDPRINTF ((stderr, "Stack size increased to %lu\n",
  18926. (unsigned long int) yystacksize));
  18927. @@ -1543,6 +1535,9 @@
  18928. YYDPRINTF ((stderr, "Entering state %d\n", yystate));
  18929. + if (yystate == YYFINAL)
  18930. + YYACCEPT;
  18931. +
  18932. goto yybackup;
  18933. /*-----------.
  18934. @@ -1551,16 +1546,16 @@
  18935. yybackup:
  18936. /* Do appropriate processing given the current state. Read a
  18937. - look-ahead token if we need one and don't already have one. */
  18938. + lookahead token if we need one and don't already have one. */
  18939. - /* First try to decide what to do without reference to look-ahead token. */
  18940. + /* First try to decide what to do without reference to lookahead token. */
  18941. yyn = yypact[yystate];
  18942. if (yyn == YYPACT_NINF)
  18943. goto yydefault;
  18944. - /* Not known => get a look-ahead token if don't already have one. */
  18945. + /* Not known => get a lookahead token if don't already have one. */
  18946. - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
  18947. + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
  18948. if (yychar == YYEMPTY)
  18949. {
  18950. YYDPRINTF ((stderr, "Reading a token: "));
  18951. @@ -1592,20 +1587,16 @@
  18952. goto yyreduce;
  18953. }
  18954. - if (yyn == YYFINAL)
  18955. - YYACCEPT;
  18956. -
  18957. /* Count tokens shifted since error; after three, turn off error
  18958. status. */
  18959. if (yyerrstatus)
  18960. yyerrstatus--;
  18961. - /* Shift the look-ahead token. */
  18962. + /* Shift the lookahead token. */
  18963. YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
  18964. - /* Discard the shifted token unless it is eof. */
  18965. - if (yychar != YYEOF)
  18966. - yychar = YYEMPTY;
  18967. + /* Discard the shifted token. */
  18968. + yychar = YYEMPTY;
  18969. yystate = yyn;
  18970. *++yyvsp = yylval;
  18971. @@ -1644,39 +1635,39 @@
  18972. YY_REDUCE_PRINT (yyn);
  18973. switch (yyn)
  18974. {
  18975. - case 8:
  18976. + case 10:
  18977. { zconf_error("unexpected end statement"); ;}
  18978. break;
  18979. - case 9:
  18980. + case 11:
  18981. { zconf_error("unknown statement \"%s\"", (yyvsp[(2) - (4)].string)); ;}
  18982. break;
  18983. - case 10:
  18984. + case 12:
  18985. {
  18986. zconf_error("unexpected option \"%s\"", kconf_id_strings + (yyvsp[(2) - (4)].id)->name);
  18987. ;}
  18988. break;
  18989. - case 11:
  18990. + case 13:
  18991. { zconf_error("invalid statement"); ;}
  18992. break;
  18993. - case 25:
  18994. + case 28:
  18995. { zconf_error("unknown option \"%s\"", (yyvsp[(1) - (3)].string)); ;}
  18996. break;
  18997. - case 26:
  18998. + case 29:
  18999. { zconf_error("invalid option"); ;}
  19000. break;
  19001. - case 27:
  19002. + case 30:
  19003. {
  19004. struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0);
  19005. @@ -1686,7 +1677,7 @@
  19006. ;}
  19007. break;
  19008. - case 28:
  19009. + case 31:
  19010. {
  19011. menu_end_entry();
  19012. @@ -1694,7 +1685,7 @@
  19013. ;}
  19014. break;
  19015. - case 29:
  19016. + case 32:
  19017. {
  19018. struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0);
  19019. @@ -1704,7 +1695,7 @@
  19020. ;}
  19021. break;
  19022. - case 30:
  19023. + case 33:
  19024. {
  19025. if (current_entry->prompt)
  19026. @@ -1716,7 +1707,7 @@
  19027. ;}
  19028. break;
  19029. - case 38:
  19030. + case 41:
  19031. {
  19032. menu_set_type((yyvsp[(1) - (3)].id)->stype);
  19033. @@ -1726,7 +1717,7 @@
  19034. ;}
  19035. break;
  19036. - case 39:
  19037. + case 42:
  19038. {
  19039. menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr));
  19040. @@ -1734,7 +1725,7 @@
  19041. ;}
  19042. break;
  19043. - case 40:
  19044. + case 43:
  19045. {
  19046. menu_add_expr(P_DEFAULT, (yyvsp[(2) - (4)].expr), (yyvsp[(3) - (4)].expr));
  19047. @@ -1746,7 +1737,7 @@
  19048. ;}
  19049. break;
  19050. - case 41:
  19051. + case 44:
  19052. {
  19053. menu_add_symbol(P_SELECT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr));
  19054. @@ -1754,7 +1745,7 @@
  19055. ;}
  19056. break;
  19057. - case 42:
  19058. + case 45:
  19059. {
  19060. menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[(2) - (5)].symbol), (yyvsp[(3) - (5)].symbol)), (yyvsp[(4) - (5)].expr));
  19061. @@ -1762,10 +1753,10 @@
  19062. ;}
  19063. break;
  19064. - case 45:
  19065. + case 48:
  19066. {
  19067. - struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string)));
  19068. + const struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string)));
  19069. if (id && id->flags & TF_OPTION)
  19070. menu_add_option(id->token, (yyvsp[(3) - (3)].string));
  19071. else
  19072. @@ -1774,17 +1765,17 @@
  19073. ;}
  19074. break;
  19075. - case 46:
  19076. + case 49:
  19077. { (yyval.string) = NULL; ;}
  19078. break;
  19079. - case 47:
  19080. + case 50:
  19081. { (yyval.string) = (yyvsp[(2) - (2)].string); ;}
  19082. break;
  19083. - case 48:
  19084. + case 51:
  19085. {
  19086. struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), SYMBOL_CHOICE);
  19087. @@ -1795,14 +1786,14 @@
  19088. ;}
  19089. break;
  19090. - case 49:
  19091. + case 52:
  19092. {
  19093. (yyval.menu) = menu_add_menu();
  19094. ;}
  19095. break;
  19096. - case 50:
  19097. + case 53:
  19098. {
  19099. if (zconf_endtoken((yyvsp[(1) - (1)].id), T_CHOICE, T_ENDCHOICE)) {
  19100. @@ -1812,7 +1803,7 @@
  19101. ;}
  19102. break;
  19103. - case 58:
  19104. + case 61:
  19105. {
  19106. menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr));
  19107. @@ -1820,7 +1811,7 @@
  19108. ;}
  19109. break;
  19110. - case 59:
  19111. + case 62:
  19112. {
  19113. if ((yyvsp[(1) - (3)].id)->stype == S_BOOLEAN || (yyvsp[(1) - (3)].id)->stype == S_TRISTATE) {
  19114. @@ -1833,7 +1824,7 @@
  19115. ;}
  19116. break;
  19117. - case 60:
  19118. + case 63:
  19119. {
  19120. current_entry->sym->flags |= SYMBOL_OPTIONAL;
  19121. @@ -1841,7 +1832,7 @@
  19122. ;}
  19123. break;
  19124. - case 61:
  19125. + case 64:
  19126. {
  19127. if ((yyvsp[(1) - (4)].id)->stype == S_UNKNOWN) {
  19128. @@ -1853,7 +1844,7 @@
  19129. ;}
  19130. break;
  19131. - case 64:
  19132. + case 67:
  19133. {
  19134. printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno());
  19135. @@ -1863,7 +1854,7 @@
  19136. ;}
  19137. break;
  19138. - case 65:
  19139. + case 68:
  19140. {
  19141. if (zconf_endtoken((yyvsp[(1) - (1)].id), T_IF, T_ENDIF)) {
  19142. @@ -1873,7 +1864,14 @@
  19143. ;}
  19144. break;
  19145. - case 71:
  19146. + case 74:
  19147. +
  19148. + {
  19149. + menu_add_prompt(P_MENU, (yyvsp[(2) - (3)].string), NULL);
  19150. +;}
  19151. + break;
  19152. +
  19153. + case 75:
  19154. {
  19155. menu_add_entry(NULL);
  19156. @@ -1882,14 +1880,14 @@
  19157. ;}
  19158. break;
  19159. - case 72:
  19160. + case 76:
  19161. {
  19162. (yyval.menu) = menu_add_menu();
  19163. ;}
  19164. break;
  19165. - case 73:
  19166. + case 77:
  19167. {
  19168. if (zconf_endtoken((yyvsp[(1) - (1)].id), T_MENU, T_ENDMENU)) {
  19169. @@ -1899,7 +1897,7 @@
  19170. ;}
  19171. break;
  19172. - case 79:
  19173. + case 83:
  19174. {
  19175. printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string));
  19176. @@ -1907,7 +1905,7 @@
  19177. ;}
  19178. break;
  19179. - case 80:
  19180. + case 84:
  19181. {
  19182. menu_add_entry(NULL);
  19183. @@ -1916,14 +1914,14 @@
  19184. ;}
  19185. break;
  19186. - case 81:
  19187. + case 85:
  19188. {
  19189. menu_end_entry();
  19190. ;}
  19191. break;
  19192. - case 82:
  19193. + case 86:
  19194. {
  19195. printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno());
  19196. @@ -1931,14 +1929,14 @@
  19197. ;}
  19198. break;
  19199. - case 83:
  19200. + case 87:
  19201. {
  19202. current_entry->help = (yyvsp[(2) - (2)].string);
  19203. ;}
  19204. break;
  19205. - case 88:
  19206. + case 92:
  19207. {
  19208. menu_add_dep((yyvsp[(3) - (4)].expr));
  19209. @@ -1946,90 +1944,96 @@
  19210. ;}
  19211. break;
  19212. - case 90:
  19213. + case 96:
  19214. +
  19215. + {
  19216. + menu_add_visibility((yyvsp[(2) - (2)].expr));
  19217. +;}
  19218. + break;
  19219. +
  19220. + case 98:
  19221. {
  19222. menu_add_prompt(P_PROMPT, (yyvsp[(1) - (2)].string), (yyvsp[(2) - (2)].expr));
  19223. ;}
  19224. break;
  19225. - case 93:
  19226. + case 101:
  19227. { (yyval.id) = (yyvsp[(1) - (2)].id); ;}
  19228. break;
  19229. - case 94:
  19230. + case 102:
  19231. { (yyval.id) = (yyvsp[(1) - (2)].id); ;}
  19232. break;
  19233. - case 95:
  19234. + case 103:
  19235. { (yyval.id) = (yyvsp[(1) - (2)].id); ;}
  19236. break;
  19237. - case 98:
  19238. + case 106:
  19239. { (yyval.expr) = NULL; ;}
  19240. break;
  19241. - case 99:
  19242. + case 107:
  19243. { (yyval.expr) = (yyvsp[(2) - (2)].expr); ;}
  19244. break;
  19245. - case 100:
  19246. + case 108:
  19247. { (yyval.expr) = expr_alloc_symbol((yyvsp[(1) - (1)].symbol)); ;}
  19248. break;
  19249. - case 101:
  19250. + case 109:
  19251. { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;}
  19252. break;
  19253. - case 102:
  19254. + case 110:
  19255. { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); ;}
  19256. break;
  19257. - case 103:
  19258. + case 111:
  19259. { (yyval.expr) = (yyvsp[(2) - (3)].expr); ;}
  19260. break;
  19261. - case 104:
  19262. + case 112:
  19263. { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[(2) - (2)].expr)); ;}
  19264. break;
  19265. - case 105:
  19266. + case 113:
  19267. { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;}
  19268. break;
  19269. - case 106:
  19270. + case 114:
  19271. { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;}
  19272. break;
  19273. - case 107:
  19274. + case 115:
  19275. { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), 0); free((yyvsp[(1) - (1)].string)); ;}
  19276. break;
  19277. - case 108:
  19278. + case 116:
  19279. { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), SYMBOL_CONST); free((yyvsp[(1) - (1)].string)); ;}
  19280. break;
  19281. - case 109:
  19282. + case 117:
  19283. { (yyval.string) = NULL; ;}
  19284. break;
  19285. -/* Line 1267 of yacc.c. */
  19286. default: break;
  19287. }
  19288. @@ -2041,7 +2045,6 @@
  19289. *++yyvsp = yyval;
  19290. -
  19291. /* Now `shift' the result of the reduction. Determine what state
  19292. that goes to, based on the state we popped back to and the rule
  19293. number reduced by. */
  19294. @@ -2106,7 +2109,7 @@
  19295. if (yyerrstatus == 3)
  19296. {
  19297. - /* If just tried and failed to reuse look-ahead token after an
  19298. + /* If just tried and failed to reuse lookahead token after an
  19299. error, discard it. */
  19300. if (yychar <= YYEOF)
  19301. @@ -2123,7 +2126,7 @@
  19302. }
  19303. }
  19304. - /* Else will try to reuse look-ahead token after shifting the error
  19305. + /* Else will try to reuse lookahead token after shifting the error
  19306. token. */
  19307. goto yyerrlab1;
  19308. @@ -2180,9 +2183,6 @@
  19309. YY_STACK_PRINT (yyss, yyssp);
  19310. }
  19311. - if (yyn == YYFINAL)
  19312. - YYACCEPT;
  19313. -
  19314. *++yyvsp = yylval;
  19315. @@ -2207,7 +2207,7 @@
  19316. yyresult = 1;
  19317. goto yyreturn;
  19318. -#ifndef yyoverflow
  19319. +#if !defined(yyoverflow) || YYERROR_VERBOSE
  19320. /*-------------------------------------------------.
  19321. | yyexhaustedlab -- memory exhaustion comes here. |
  19322. `-------------------------------------------------*/
  19323. @@ -2218,7 +2218,7 @@
  19324. #endif
  19325. yyreturn:
  19326. - if (yychar != YYEOF && yychar != YYEMPTY)
  19327. + if (yychar != YYEMPTY)
  19328. yydestruct ("Cleanup: discarding lookahead",
  19329. yytoken, &yylval);
  19330. /* Do not reclaim the symbols of the rule which action triggered
  19331. @@ -2255,16 +2255,14 @@
  19332. zconf_initscan(name);
  19333. sym_init();
  19334. - menu_init();
  19335. + _menu_init();
  19336. modules_sym = sym_lookup(NULL, 0);
  19337. modules_sym->type = S_BOOLEAN;
  19338. modules_sym->flags |= SYMBOL_AUTO;
  19339. rootmenu.prompt = menu_add_prompt(P_MENU, "uClibc Configuration", NULL);
  19340. -#if YYDEBUG
  19341. if (getenv("ZCONF_DEBUG"))
  19342. zconfdebug = 1;
  19343. -#endif
  19344. zconfparse();
  19345. if (zconfnerrs)
  19346. exit(1);
  19347. @@ -2274,6 +2272,10 @@
  19348. prop = prop_alloc(P_DEFAULT, modules_sym);
  19349. prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0));
  19350. }
  19351. +
  19352. + rootmenu.prompt->text = _(rootmenu.prompt->text);
  19353. + rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text);
  19354. +
  19355. menu_finalize(&rootmenu);
  19356. for_all_symbols(i, sym) {
  19357. if (sym_check_deps(sym))
  19358. @@ -2284,7 +2286,7 @@
  19359. sym_set_change_count(1);
  19360. }
  19361. -const char *zconf_tokenname(int token)
  19362. +static const char *zconf_tokenname(int token)
  19363. {
  19364. switch (token) {
  19365. case T_MENU: return "menu";
  19366. @@ -2294,11 +2296,12 @@
  19367. case T_IF: return "if";
  19368. case T_ENDIF: return "endif";
  19369. case T_DEPENDS: return "depends";
  19370. + case T_VISIBLE: return "visible";
  19371. }
  19372. return "<token>";
  19373. }
  19374. -static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken)
  19375. +static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken)
  19376. {
  19377. if (id->token != endtoken) {
  19378. zconf_error("unexpected '%s' within %s block",
  19379. @@ -2343,12 +2346,10 @@
  19380. static void zconferror(const char *err)
  19381. {
  19382. -#if YYDEBUG
  19383. fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err);
  19384. -#endif
  19385. }
  19386. -void print_quoted_string(FILE *out, const char *str)
  19387. +static void print_quoted_string(FILE *out, const char *str)
  19388. {
  19389. const char *p;
  19390. int len;
  19391. @@ -2365,15 +2366,15 @@
  19392. putc('"', out);
  19393. }
  19394. -void print_symbol(FILE *out, struct menu *menu)
  19395. +static void print_symbol(FILE *out, struct menu *menu)
  19396. {
  19397. struct symbol *sym = menu->sym;
  19398. struct property *prop;
  19399. if (sym_is_choice(sym))
  19400. - fprintf(out, "choice\n");
  19401. + fprintf(out, "\nchoice\n");
  19402. else
  19403. - fprintf(out, "config %s\n", sym->name);
  19404. + fprintf(out, "\nconfig %s\n", sym->name);
  19405. switch (sym->type) {
  19406. case S_BOOLEAN:
  19407. fputs(" boolean\n", out);
  19408. @@ -2419,6 +2420,21 @@
  19409. case P_CHOICE:
  19410. fputs(" #choice value\n", out);
  19411. break;
  19412. + case P_SELECT:
  19413. + fputs( " select ", out);
  19414. + expr_fprint(prop->expr, out);
  19415. + fputc('\n', out);
  19416. + break;
  19417. + case P_RANGE:
  19418. + fputs( " range ", out);
  19419. + expr_fprint(prop->expr, out);
  19420. + fputc('\n', out);
  19421. + break;
  19422. + case P_MENU:
  19423. + fputs( " menu ", out);
  19424. + print_quoted_string(out, prop->text);
  19425. + fputc('\n', out);
  19426. + break;
  19427. default:
  19428. fprintf(out, " unknown prop %d!\n", prop->type);
  19429. break;
  19430. @@ -2430,7 +2446,6 @@
  19431. menu->help[len] = 0;
  19432. fprintf(out, " help\n%s\n", menu->help);
  19433. }
  19434. - fputc('\n', out);
  19435. }
  19436. void zconfdump(FILE *out)
  19437. @@ -2463,7 +2478,6 @@
  19438. expr_fprint(prop->visible.expr, out);
  19439. fputc('\n', out);
  19440. }
  19441. - fputs("\n", out);
  19442. }
  19443. if (menu->list)
  19444. @@ -2481,7 +2495,7 @@
  19445. }
  19446. }
  19447. -#include "lex.zconf.c"
  19448. +#include "zconf.lex.c"
  19449. #include "util.c"
  19450. #include "confdata.c"
  19451. #include "expr.c"
  19452. diff -Nur uClibc-0.9.33.2/extra/config/zconf.y uClibc-git/extra/config/zconf.y
  19453. --- uClibc-0.9.33.2/extra/config/zconf.y 2012-05-15 09:20:09.000000000 +0200
  19454. +++ uClibc-git/extra/config/zconf.y 2014-07-25 20:36:04.865324519 +0200
  19455. @@ -11,11 +11,8 @@
  19456. #include <string.h>
  19457. #include <stdbool.h>
  19458. -#define LKC_DIRECT_LINK
  19459. #include "lkc.h"
  19460. -#include "zconf.hash.c"
  19461. -
  19462. #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
  19463. #define PRINTD 0x0001
  19464. @@ -27,18 +24,14 @@
  19465. static void zconfprint(const char *err, ...);
  19466. static void zconf_error(const char *err, ...);
  19467. static void zconferror(const char *err);
  19468. -static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken);
  19469. +static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken);
  19470. -struct symbol *symbol_hash[257];
  19471. +struct symbol *symbol_hash[SYMBOL_HASHSIZE];
  19472. static struct menu *current_menu, *current_entry;
  19473. -#define YYDEBUG 0
  19474. -#if YYDEBUG
  19475. -#define YYERROR_VERBOSE
  19476. -#endif
  19477. %}
  19478. -%expect 26
  19479. +%expect 30
  19480. %union
  19481. {
  19482. @@ -47,7 +40,7 @@
  19483. struct symbol *symbol;
  19484. struct expr *expr;
  19485. struct menu *menu;
  19486. - struct kconf_id *id;
  19487. + const struct kconf_id *id;
  19488. }
  19489. %token <id>T_MAINMENU
  19490. @@ -70,6 +63,7 @@
  19491. %token <id>T_DEFAULT
  19492. %token <id>T_SELECT
  19493. %token <id>T_RANGE
  19494. +%token <id>T_VISIBLE
  19495. %token <id>T_OPTION
  19496. %token <id>T_ON
  19497. %token <string> T_WORD
  19498. @@ -100,15 +94,21 @@
  19499. menu_end_menu();
  19500. } if_entry menu_entry choice_entry
  19501. +%{
  19502. +/* Include zconf.hash.c here so it can see the token constants. */
  19503. +#include "zconf.hash.c"
  19504. +%}
  19505. +
  19506. %%
  19507. -input: stmt_list;
  19508. +input: nl start | start;
  19509. +
  19510. +start: mainmenu_stmt stmt_list | stmt_list;
  19511. stmt_list:
  19512. /* empty */
  19513. | stmt_list common_stmt
  19514. | stmt_list choice_stmt
  19515. | stmt_list menu_stmt
  19516. - | stmt_list T_MAINMENU prompt nl
  19517. | stmt_list end { zconf_error("unexpected end statement"); }
  19518. | stmt_list T_WORD error T_EOL { zconf_error("unknown statement \"%s\"", $2); }
  19519. | stmt_list option_name error T_EOL
  19520. @@ -119,7 +119,7 @@
  19521. ;
  19522. option_name:
  19523. - T_DEPENDS | T_PROMPT | T_TYPE | T_SELECT | T_OPTIONAL | T_RANGE | T_DEFAULT
  19524. + T_DEPENDS | T_PROMPT | T_TYPE | T_SELECT | T_OPTIONAL | T_RANGE | T_DEFAULT | T_VISIBLE
  19525. ;
  19526. common_stmt:
  19527. @@ -224,7 +224,7 @@
  19528. /* empty */
  19529. | symbol_option_list T_WORD symbol_option_arg
  19530. {
  19531. - struct kconf_id *id = kconf_id_lookup($2, strlen($2));
  19532. + const struct kconf_id *id = kconf_id_lookup($2, strlen($2));
  19533. if (id && id->flags & TF_OPTION)
  19534. menu_add_option(id->token, $3);
  19535. else
  19536. @@ -339,6 +339,13 @@
  19537. | if_block choice_stmt
  19538. ;
  19539. +/* mainmenu entry */
  19540. +
  19541. +mainmenu_stmt: T_MAINMENU prompt nl
  19542. +{
  19543. + menu_add_prompt(P_MENU, $2, NULL);
  19544. +};
  19545. +
  19546. /* menu entry */
  19547. menu: T_MENU prompt T_EOL
  19548. @@ -348,7 +355,7 @@
  19549. printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno());
  19550. };
  19551. -menu_entry: menu depends_list
  19552. +menu_entry: menu visibility_list depends_list
  19553. {
  19554. $$ = menu_add_menu();
  19555. };
  19556. @@ -419,6 +426,19 @@
  19557. printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno());
  19558. };
  19559. +/* visibility option */
  19560. +
  19561. +visibility_list:
  19562. + /* empty */
  19563. + | visibility_list visible
  19564. + | visibility_list T_EOL
  19565. +;
  19566. +
  19567. +visible: T_VISIBLE if_expr
  19568. +{
  19569. + menu_add_visibility($2);
  19570. +};
  19571. +
  19572. /* prompt statement */
  19573. prompt_stmt_opt:
  19574. @@ -472,16 +492,14 @@
  19575. zconf_initscan(name);
  19576. sym_init();
  19577. - menu_init();
  19578. + _menu_init();
  19579. modules_sym = sym_lookup(NULL, 0);
  19580. modules_sym->type = S_BOOLEAN;
  19581. modules_sym->flags |= SYMBOL_AUTO;
  19582. rootmenu.prompt = menu_add_prompt(P_MENU, "uClibc Configuration", NULL);
  19583. -#if YYDEBUG
  19584. if (getenv("ZCONF_DEBUG"))
  19585. zconfdebug = 1;
  19586. -#endif
  19587. zconfparse();
  19588. if (zconfnerrs)
  19589. exit(1);
  19590. @@ -491,6 +509,10 @@
  19591. prop = prop_alloc(P_DEFAULT, modules_sym);
  19592. prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0));
  19593. }
  19594. +
  19595. + rootmenu.prompt->text = _(rootmenu.prompt->text);
  19596. + rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text);
  19597. +
  19598. menu_finalize(&rootmenu);
  19599. for_all_symbols(i, sym) {
  19600. if (sym_check_deps(sym))
  19601. @@ -501,7 +523,7 @@
  19602. sym_set_change_count(1);
  19603. }
  19604. -const char *zconf_tokenname(int token)
  19605. +static const char *zconf_tokenname(int token)
  19606. {
  19607. switch (token) {
  19608. case T_MENU: return "menu";
  19609. @@ -511,11 +533,12 @@
  19610. case T_IF: return "if";
  19611. case T_ENDIF: return "endif";
  19612. case T_DEPENDS: return "depends";
  19613. + case T_VISIBLE: return "visible";
  19614. }
  19615. return "<token>";
  19616. }
  19617. -static bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken)
  19618. +static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken)
  19619. {
  19620. if (id->token != endtoken) {
  19621. zconf_error("unexpected '%s' within %s block",
  19622. @@ -560,12 +583,10 @@
  19623. static void zconferror(const char *err)
  19624. {
  19625. -#if YYDEBUG
  19626. fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err);
  19627. -#endif
  19628. }
  19629. -void print_quoted_string(FILE *out, const char *str)
  19630. +static void print_quoted_string(FILE *out, const char *str)
  19631. {
  19632. const char *p;
  19633. int len;
  19634. @@ -582,15 +603,15 @@
  19635. putc('"', out);
  19636. }
  19637. -void print_symbol(FILE *out, struct menu *menu)
  19638. +static void print_symbol(FILE *out, struct menu *menu)
  19639. {
  19640. struct symbol *sym = menu->sym;
  19641. struct property *prop;
  19642. if (sym_is_choice(sym))
  19643. - fprintf(out, "choice\n");
  19644. + fprintf(out, "\nchoice\n");
  19645. else
  19646. - fprintf(out, "config %s\n", sym->name);
  19647. + fprintf(out, "\nconfig %s\n", sym->name);
  19648. switch (sym->type) {
  19649. case S_BOOLEAN:
  19650. fputs(" boolean\n", out);
  19651. @@ -636,6 +657,21 @@
  19652. case P_CHOICE:
  19653. fputs(" #choice value\n", out);
  19654. break;
  19655. + case P_SELECT:
  19656. + fputs( " select ", out);
  19657. + expr_fprint(prop->expr, out);
  19658. + fputc('\n', out);
  19659. + break;
  19660. + case P_RANGE:
  19661. + fputs( " range ", out);
  19662. + expr_fprint(prop->expr, out);
  19663. + fputc('\n', out);
  19664. + break;
  19665. + case P_MENU:
  19666. + fputs( " menu ", out);
  19667. + print_quoted_string(out, prop->text);
  19668. + fputc('\n', out);
  19669. + break;
  19670. default:
  19671. fprintf(out, " unknown prop %d!\n", prop->type);
  19672. break;
  19673. @@ -647,7 +683,6 @@
  19674. menu->help[len] = 0;
  19675. fprintf(out, " help\n%s\n", menu->help);
  19676. }
  19677. - fputc('\n', out);
  19678. }
  19679. void zconfdump(FILE *out)
  19680. @@ -680,7 +715,6 @@
  19681. expr_fprint(prop->visible.expr, out);
  19682. fputc('\n', out);
  19683. }
  19684. - fputs("\n", out);
  19685. }
  19686. if (menu->list)
  19687. @@ -698,7 +732,7 @@
  19688. }
  19689. }
  19690. -#include "lex.zconf.c"
  19691. +#include "zconf.lex.c"
  19692. #include "util.c"
  19693. #include "confdata.c"
  19694. #include "expr.c"
  19695. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.alpha uClibc-git/extra/Configs/Config.alpha
  19696. --- uClibc-0.9.33.2/extra/Configs/Config.alpha 2012-05-15 09:20:09.000000000 +0200
  19697. +++ uClibc-git/extra/Configs/Config.alpha 2014-07-25 20:36:04.449322340 +0200
  19698. @@ -13,4 +13,5 @@
  19699. select ARCH_LITTLE_ENDIAN
  19700. select ARCH_HAS_MMU
  19701. select ARCH_HAS_NO_LDSO
  19702. + select ARCH_HAS_DEPRECATED_SYSCALLS
  19703. select UCLIBC_HAS_LFS
  19704. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.arc uClibc-git/extra/Configs/Config.arc
  19705. --- uClibc-0.9.33.2/extra/Configs/Config.arc 1970-01-01 01:00:00.000000000 +0100
  19706. +++ uClibc-git/extra/Configs/Config.arc 2014-07-25 20:36:04.449322340 +0200
  19707. @@ -0,0 +1,23 @@
  19708. +#
  19709. +# For a description of the syntax of this configuration file,
  19710. +# see extra/config/Kconfig-language.txt
  19711. +#
  19712. +config TARGET_ARCH
  19713. + default "arc"
  19714. +
  19715. +config FORCE_OPTIONS_FOR_ARCH
  19716. + bool
  19717. + default y
  19718. + select ARCH_ANY_ENDIAN
  19719. +
  19720. +choice
  19721. + prompt "Target Processor Type"
  19722. + default CONFIG_ARC_CPU_700
  19723. +
  19724. +config CONFIG_ARC_CPU_700
  19725. + bool "ARC700"
  19726. + select ARCH_HAS_MMU
  19727. + help
  19728. + ARCompact ISA based ARC CPU
  19729. +
  19730. +endchoice
  19731. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.arm uClibc-git/extra/Configs/Config.arm
  19732. --- uClibc-0.9.33.2/extra/Configs/Config.arm 2012-05-15 09:20:09.000000000 +0200
  19733. +++ uClibc-git/extra/Configs/Config.arm 2014-07-25 20:36:04.449322340 +0200
  19734. @@ -11,6 +11,8 @@
  19735. bool
  19736. default y
  19737. select ARCH_ANY_ENDIAN
  19738. + select ARCH_HAS_UCONTEXT
  19739. + select ARCH_HAS_DEPRECATED_SYSCALLS
  19740. config CONFIG_ARM_EABI
  19741. bool "Build for EABI"
  19742. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.avr32 uClibc-git/extra/Configs/Config.avr32
  19743. --- uClibc-0.9.33.2/extra/Configs/Config.avr32 2012-05-15 09:20:09.000000000 +0200
  19744. +++ uClibc-git/extra/Configs/Config.avr32 2014-07-25 20:36:04.449322340 +0200
  19745. @@ -11,6 +11,7 @@
  19746. bool
  19747. default y
  19748. select ARCH_BIG_ENDIAN
  19749. + select ARCH_HAS_DEPRECATED_SYSCALLS
  19750. select FORCE_SHAREABLE_TEXT_SEGMENTS
  19751. choice
  19752. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.bfin uClibc-git/extra/Configs/Config.bfin
  19753. --- uClibc-0.9.33.2/extra/Configs/Config.bfin 2012-05-15 09:20:09.000000000 +0200
  19754. +++ uClibc-git/extra/Configs/Config.bfin 2014-07-25 20:36:04.449322340 +0200
  19755. @@ -12,3 +12,4 @@
  19756. default y
  19757. select ARCH_LITTLE_ENDIAN
  19758. select ARCH_HAS_NO_MMU
  19759. + select ARCH_HAS_DEPRECATED_SYSCALLS
  19760. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.cris uClibc-git/extra/Configs/Config.cris
  19761. --- uClibc-0.9.33.2/extra/Configs/Config.cris 2012-05-15 09:20:09.000000000 +0200
  19762. +++ uClibc-git/extra/Configs/Config.cris 2014-07-25 20:36:04.449322340 +0200
  19763. @@ -11,6 +11,7 @@
  19764. bool
  19765. default y
  19766. select ARCH_LITTLE_ENDIAN
  19767. + select ARCH_HAS_DEPRECATED_SYSCALLS
  19768. choice
  19769. prompt "Target Architecture Type"
  19770. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.e1 uClibc-git/extra/Configs/Config.e1
  19771. --- uClibc-0.9.33.2/extra/Configs/Config.e1 2012-05-15 09:20:09.000000000 +0200
  19772. +++ uClibc-git/extra/Configs/Config.e1 2014-07-25 20:36:04.449322340 +0200
  19773. @@ -13,3 +13,4 @@
  19774. select ARCH_BIG_ENDIAN
  19775. select ARCH_HAS_NO_MMU
  19776. select ARCH_HAS_NO_SHARED
  19777. + select ARCH_HAS_DEPRECATED_SYSCALLS
  19778. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.frv uClibc-git/extra/Configs/Config.frv
  19779. --- uClibc-0.9.33.2/extra/Configs/Config.frv 2012-05-15 09:20:09.000000000 +0200
  19780. +++ uClibc-git/extra/Configs/Config.frv 2014-07-25 20:36:04.449322340 +0200
  19781. @@ -13,3 +13,4 @@
  19782. select ARCH_BIG_ENDIAN
  19783. select UCLIBC_HAS_FPU
  19784. select ARCH_HAS_NO_MMU
  19785. + select ARCH_HAS_DEPRECATED_SYSCALLS
  19786. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.h8300 uClibc-git/extra/Configs/Config.h8300
  19787. --- uClibc-0.9.33.2/extra/Configs/Config.h8300 2012-05-15 09:20:09.000000000 +0200
  19788. +++ uClibc-git/extra/Configs/Config.h8300 2014-07-25 20:36:04.449322340 +0200
  19789. @@ -12,6 +12,7 @@
  19790. default y
  19791. select ARCH_ANY_ENDIAN
  19792. select ARCH_HAS_NO_MMU
  19793. + select ARCH_HAS_DEPRECATED_SYSCALLS
  19794. choice
  19795. prompt "Target Processor"
  19796. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.hppa uClibc-git/extra/Configs/Config.hppa
  19797. --- uClibc-0.9.33.2/extra/Configs/Config.hppa 2012-05-15 09:20:09.000000000 +0200
  19798. +++ uClibc-git/extra/Configs/Config.hppa 2014-07-25 20:36:04.449322340 +0200
  19799. @@ -15,3 +15,4 @@
  19800. select HAS_NO_THREADS
  19801. select ARCH_HAS_NO_LDSO
  19802. select HAVE_NO_SSP
  19803. + select ARCH_HAS_DEPRECATED_SYSCALLS
  19804. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.i386 uClibc-git/extra/Configs/Config.i386
  19805. --- uClibc-0.9.33.2/extra/Configs/Config.i386 2012-05-15 09:20:09.000000000 +0200
  19806. +++ uClibc-git/extra/Configs/Config.i386 2014-07-25 20:36:04.449322340 +0200
  19807. @@ -12,44 +12,17 @@
  19808. default y
  19809. select ARCH_LITTLE_ENDIAN
  19810. select ARCH_HAS_MMU
  19811. + select ARCH_HAS_UCONTEXT
  19812. + select ARCH_HAS_DEPRECATED_SYSCALLS
  19813. choice
  19814. prompt "Target x86 Processor Family"
  19815. - default CONFIG_486
  19816. + default CONFIG_686
  19817. help
  19818. This is the processor type of your CPU. This information is used for
  19819. - optimizing purposes. To build a library that will run on all x86 CPU
  19820. - types (albeit not optimally fast), you can specify "386" here. If
  19821. - you pick anything other than "386", there is no guarantee that uClibc
  19822. - will even run on anything other than the selected processor type.
  19823. -
  19824. - Here are the settings recommended for greatest speed:
  19825. - - "Generic 386" select this if your compiler is already setup to
  19826. - optimize things properly.
  19827. - - "386" for the AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX, Cyrix/TI
  19828. - 486DLC/DLC2, UMC 486SX-S and NexGen Nx586. Only "386" kernels
  19829. - will run on a 386 class machine.
  19830. - - "486" for the AMD/Cyrix/IBM/Intel 486DX/DX2/DX4 or
  19831. - SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S.
  19832. - - "586" for Intel Pentium and other generic Pentium CPUs
  19833. - - "Pentium-MMX" for the Intel Pentium MMX.
  19834. - - "Pentium-Pro" for the Intel Pentium Pro/Celeron/Pentium II.
  19835. - - "Pentium-III" for the Intel Pentium III
  19836. - and Celerons based on the Coppermine core.
  19837. - - "Pentium-4" for the Intel Pentium 4.
  19838. - - "K6" for the AMD K6, K6-II and K6-III (aka K6-3D).
  19839. - - "Athlon" for the AMD K7 family (Athlon/Duron/Thunderbird).
  19840. - - "Elan" for the AMD Elan.
  19841. - - "Crusoe" for the Transmeta Crusoe series.
  19842. - - "Winchip-C6" for original IDT Winchip.
  19843. - - "Winchip-2/Winchip-2A/Winchip-3" for IDT Winchip CPUs
  19844. - - "CyrixIII/VIA C3" for VIA Cyrix III or VIA C3.
  19845. - - "VIA C3-2 Nehemiah" model 9 and above.
  19846. -
  19847. - If you don't know what to do, choose "386".
  19848. -
  19849. -config CONFIG_GENERIC_386
  19850. - bool "Generic 386"
  19851. + selecting different handcoded optimization functions. Nowadays, most
  19852. + people have an i686 CPU. If you don't, you most likely know what this
  19853. + means and can pick the right one for your processor.
  19854. config CONFIG_386
  19855. bool "386"
  19856. @@ -58,45 +31,9 @@
  19857. bool "486"
  19858. config CONFIG_586
  19859. - bool "Pentium/586/K5/5x86/6x86/6x86MX"
  19860. -
  19861. -config CONFIG_586MMX
  19862. - bool "Pentium-MMX"
  19863. + bool "586"
  19864. config CONFIG_686
  19865. - bool "Pentium-Pro"
  19866. -
  19867. -config CONFIG_PENTIUMII
  19868. - bool "Celeron/Pentium-II"
  19869. -
  19870. -config CONFIG_PENTIUMIII
  19871. - bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon"
  19872. -
  19873. -config CONFIG_PENTIUM4
  19874. - bool "Pentium-4/Celeron(P4-based)/Xeon"
  19875. -
  19876. -config CONFIG_K6
  19877. - bool "K6/K6-II/K6-III"
  19878. -
  19879. -config CONFIG_K7
  19880. - bool "Athlon/Duron/K7"
  19881. -
  19882. -config CONFIG_ELAN
  19883. - bool "Elan"
  19884. -
  19885. -config CONFIG_CRUSOE
  19886. - bool "Crusoe"
  19887. -
  19888. -config CONFIG_WINCHIPC6
  19889. - bool "Winchip-C6"
  19890. -
  19891. -config CONFIG_WINCHIP2
  19892. - bool "Winchip-2/Winchip-2A/Winchip-3"
  19893. -
  19894. -config CONFIG_CYRIXIII
  19895. - bool "CyrixIII/VIA-C3"
  19896. -
  19897. -config CONFIG_NEHEMIAH
  19898. - bool "VIA C3-2 (Nehemiah)"
  19899. + bool "686"
  19900. endchoice
  19901. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.i960 uClibc-git/extra/Configs/Config.i960
  19902. --- uClibc-0.9.33.2/extra/Configs/Config.i960 2012-05-15 09:20:09.000000000 +0200
  19903. +++ uClibc-git/extra/Configs/Config.i960 2014-07-25 20:36:04.449322340 +0200
  19904. @@ -13,3 +13,4 @@
  19905. select ARCH_LITTLE_ENDIAN
  19906. select ARCH_HAS_NO_MMU
  19907. select HAS_NO_THREADS
  19908. + select ARCH_HAS_DEPRECATED_SYSCALLS
  19909. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.ia64 uClibc-git/extra/Configs/Config.ia64
  19910. --- uClibc-0.9.33.2/extra/Configs/Config.ia64 2012-05-15 09:20:09.000000000 +0200
  19911. +++ uClibc-git/extra/Configs/Config.ia64 2014-07-25 20:36:04.449322340 +0200
  19912. @@ -13,3 +13,4 @@
  19913. select ARCH_LITTLE_ENDIAN
  19914. select ARCH_HAS_MMU
  19915. select ARCH_HAS_NO_LDSO
  19916. + select ARCH_HAS_DEPRECATED_SYSCALLS
  19917. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.in uClibc-git/extra/Configs/Config.in
  19918. --- uClibc-0.9.33.2/extra/Configs/Config.in 2012-05-15 09:20:09.000000000 +0200
  19919. +++ uClibc-git/extra/Configs/Config.in 2014-07-25 20:36:04.449322340 +0200
  19920. @@ -3,15 +3,20 @@
  19921. # see extra/config/Kconfig-language.txt
  19922. #
  19923. -mainmenu "uClibc C Library Configuration"
  19924. +mainmenu "uClibc $VERSION C Library Configuration"
  19925. config DESIRED_TARGET_ARCH
  19926. string
  19927. option env="ARCH"
  19928. +config VERSION
  19929. + string
  19930. + option env="VERSION"
  19931. +
  19932. choice
  19933. prompt "Target Architecture"
  19934. default TARGET_alpha if DESIRED_TARGET_ARCH = "alpha"
  19935. + default TARGET_arc if DESIRED_TARGET_ARCH = "arc"
  19936. default TARGET_arm if DESIRED_TARGET_ARCH = "arm"
  19937. default TARGET_avr32 if DESIRED_TARGET_ARCH = "avr32"
  19938. default TARGET_bfin if DESIRED_TARGET_ARCH = "bfin"
  19939. @@ -24,6 +29,7 @@
  19940. default TARGET_i960 if DESIRED_TARGET_ARCH = "i960"
  19941. default TARGET_ia64 if DESIRED_TARGET_ARCH = "ia64"
  19942. default TARGET_m68k if DESIRED_TARGET_ARCH = "m68k"
  19943. + default TARGET_metag if DESIRED_TARGET_ARCH = "metag"
  19944. default TARGET_microblaze if DESIRED_TARGET_ARCH = "microblaze"
  19945. default TARGET_mips if DESIRED_TARGET_ARCH = "mips"
  19946. default TARGET_nios if DESIRED_TARGET_ARCH = "nios"
  19947. @@ -42,6 +48,9 @@
  19948. config TARGET_alpha
  19949. bool "alpha"
  19950. +config TARGET_arc
  19951. + bool "arc"
  19952. +
  19953. config TARGET_arm
  19954. bool "arm"
  19955. @@ -81,6 +90,9 @@
  19956. config TARGET_m68k
  19957. bool "m68k"
  19958. +config TARGET_metag
  19959. + bool "metag"
  19960. +
  19961. config TARGET_microblaze
  19962. bool "microblaze"
  19963. @@ -174,6 +186,10 @@
  19964. source "extra/Configs/Config.m68k"
  19965. endif
  19966. +if TARGET_metag
  19967. +source "extra/Configs/Config.metag"
  19968. +endif
  19969. +
  19970. if TARGET_nios
  19971. source "extra/Configs/Config.nios"
  19972. endif
  19973. @@ -226,15 +242,19 @@
  19974. source "extra/Configs/Config.c6x"
  19975. endif
  19976. +if TARGET_arc
  19977. +source "extra/Configs/Config.arc"
  19978. +endif
  19979. +
  19980. config TARGET_SUBARCH
  19981. string
  19982. default "e500" if CONFIG_E500
  19983. default "classic" if CONFIG_CLASSIC
  19984. default "sh4" if CONFIG_SH4
  19985. - default "" if CONFIG_GENERIC_386 || CONFIG_386
  19986. + default "" if CONFIG_386
  19987. default "i486" if CONFIG_486
  19988. - default "i586" if CONFIG_586 || CONFIG_586MMX
  19989. - default "i686" if TARGET_ARCH = "i386"
  19990. + default "i586" if CONFIG_586
  19991. + default "i686" if CONFIG_686
  19992. default ""
  19993. source "extra/Configs/Config.in.arch"
  19994. @@ -261,6 +281,9 @@
  19995. bool
  19996. select ARCH_HAS_NO_SHARED
  19997. +config ARCH_HAS_UCONTEXT
  19998. + bool
  19999. +
  20000. config HAVE_SHARED
  20001. bool "Enable shared libraries"
  20002. depends on !ARCH_HAS_NO_SHARED
  20003. @@ -395,6 +418,13 @@
  20004. Usage of RUNPATH tags is not too common, so disabling this feature
  20005. should be safe for most people.
  20006. +config LDSO_SAFE_RUNPATH
  20007. + bool "Allow only RUNPATH beginning with /"
  20008. + depends on LDSO_RUNPATH
  20009. + default y
  20010. + help
  20011. + Allow only absolute path in RPATH/RUNPATH.
  20012. +
  20013. config LDSO_SEARCH_INTERP_PATH
  20014. bool "Add ldso path to lib search path"
  20015. depends on HAVE_SHARED
  20016. @@ -423,7 +453,6 @@
  20017. config LDSO_NO_CLEANUP
  20018. bool "Disable automatic unloading of dynamically loaded shared objects"
  20019. depends on HAVE_SHARED
  20020. - default n
  20021. help
  20022. If you need complete allocation traces when debugging memory leaks
  20023. using Valgrind in a process that dynamically loads shared objects,
  20024. @@ -491,6 +520,7 @@
  20025. config LINUXTHREADS_NEW
  20026. bool "slightly newer version of linuxthreads"
  20027. + depends on ARCH_HAS_DEPRECATED_SYSCALLS
  20028. help
  20029. The new version has not been tested much, and lacks ports for arches
  20030. which glibc does not support (like bfin/frv/etc...), but is based on
  20031. @@ -501,6 +531,7 @@
  20032. bool "Native POSIX Threading (NPTL)"
  20033. select UCLIBC_HAS_TLS
  20034. select UCLIBC_HAS_STDIO_FUTEXES
  20035. + select UCLIBC_HAS_REALTIME
  20036. # i386 has no lowlevellock support (yet) as opposed to i486 onward
  20037. depends on !CONFIG_386
  20038. help
  20039. @@ -629,6 +660,15 @@
  20040. does not detect glibc style returning-a-valid-pointer-for-malloc(0)
  20041. behavior). Most people can safely answer N.
  20042. +config UCLIBC_HAS_OBSTACK
  20043. + bool "Obstack Support (gnu extension)"
  20044. + help
  20045. + When this option is enabled, uClibc will provide support for obstacks.
  20046. + An obstack is a structure in which memory can be dynamically allocated
  20047. + as a 'stack of objects'. Many programs need this GNU extention and
  20048. + you should say Y if you are using any. Otherwise, say N to save some
  20049. + space.
  20050. +
  20051. config UCLIBC_DYNAMIC_ATEXIT
  20052. bool "Dynamic atexit() Support"
  20053. default y
  20054. @@ -650,6 +690,16 @@
  20055. Enable this option if you want to update from 0.9.28 to git/0.9.29,
  20056. else you will be missing atexit() until you rebuild all apps.
  20057. +config UCLIBC_SUSV2_LEGACY
  20058. + bool "Enable SuSv2 LEGACY functions"
  20059. + help
  20060. + Enable this option if you want to have SuSv2 LEGACY functions
  20061. + Currently applies to:
  20062. +
  20063. + valloc
  20064. +
  20065. + WARNING! ABI incompatibility.
  20066. +
  20067. config UCLIBC_SUSV3_LEGACY
  20068. bool "Enable SuSv3 LEGACY functions"
  20069. #vfork,
  20070. @@ -670,6 +720,19 @@
  20071. WARNING! ABI incompatibility.
  20072. +config UCLIBC_HAS_CONTEXT_FUNCS
  20073. + bool "Use obsolescent context control functions"
  20074. + depends on UCLIBC_SUSV3_LEGACY && ARCH_HAS_UCONTEXT
  20075. + help
  20076. + Add into library the SuSv3 obsolescent functions used for context
  20077. + control. The setcontext family allows the implementation in C of
  20078. + advanced control flow patterns such as iterators, fibers, and
  20079. + coroutines. They may be viewed as an advanced version of
  20080. + setjmp/longjmp; whereas the latter allows only a single non-local jump
  20081. + up the stack, setcontext allows the creation of multiple cooperative
  20082. + threads of control, each with its own stack.
  20083. + These functions are: setcontext, getcontext, makecontext, swapcontext.
  20084. +
  20085. config UCLIBC_SUSV3_LEGACY_MACROS
  20086. bool "Enable SuSv3 LEGACY macros"
  20087. help
  20088. @@ -737,7 +800,6 @@
  20089. config UCLIBC_HAS___PROGNAME
  20090. bool "Support for __progname"
  20091. default y
  20092. - depends on UCLIBC_HAS_PROGRAM_INVOCATION_NAME
  20093. help
  20094. Some packages (like openssh) like to peek into internal libc
  20095. symbols to make their output a bit more user friendly.
  20096. @@ -1320,6 +1382,12 @@
  20097. In particular, the following functions will be added to the
  20098. library:
  20099. + ns_skiprr, ns_initparse, ns_parserr, ns_msg_getflag,
  20100. + res_mkquery, res_init, res_ninit, res_close, res_nclose
  20101. + res_query, res_search, res_querydomain,
  20102. + dn_expand, dn_comp,
  20103. + ns_name_uncompress, ns_name_ntop, ns_name_pton, ns_name_unpack,
  20104. + ns_name_pack, ns_name_compress, ns_name_skip, dn_skipname,
  20105. ns_get16, ns_get32, ns_put16, ns_put32
  20106. config UCLIBC_HAS_LIBRESOLV_STUB
  20107. @@ -1462,7 +1530,7 @@
  20108. config UCLIBC_PREGENERATED_LOCALE_DATA
  20109. bool "Use Pre-generated Locale Data"
  20110. - depends on UCLIBC_HAS_LOCALE
  20111. + depends on UCLIBC_HAS_LOCALE && !TARGET_metag
  20112. help
  20113. Use pre-built locale data.
  20114. @@ -1590,19 +1658,6 @@
  20115. Most people will answer 9.
  20116. -
  20117. -config UCLIBC_HAS_SCANF_GLIBC_A_FLAG
  20118. - bool "Support glibc's 'a' flag for scanf string conversions (not implemented)"
  20119. - help
  20120. - NOTE!!! Currently Not Implemented!!! Just A Place Holder!! NOTE!!!
  20121. - NOTE!!! Conflicts with an ANSI/ISO C99 scanf flag!! NOTE!!!
  20122. -
  20123. - Answer Y to enable support for glibc's 'a' flag for the scanf string
  20124. - conversions '%s', '%[', '%ls', '%l[', and '%S'. This is used to
  20125. - auto-allocate sufficient memory to hold the data retrieved.
  20126. -
  20127. - Most people will answer N.
  20128. -
  20129. choice
  20130. prompt "Stdio buffer size"
  20131. default UCLIBC_HAS_STDIO_BUFSIZ_4096
  20132. @@ -2093,6 +2148,16 @@
  20133. Most people will answer N.
  20134. +config ARC4RANDOM_USES_NODEV
  20135. + bool "Do not use /dev/urandom with arc4random()"
  20136. + depends on UCLIBC_HAS_ARC4RANDOM
  20137. + help
  20138. + Answer Y to use gettimeofday(2) and getpid(2) exclusively for
  20139. + arc4random(). This is not a bad idea for a diskless system, but
  20140. + it uses a lot of syscalls to stir each array element.
  20141. +
  20142. + Most people will answer N.
  20143. +
  20144. config HAVE_NO_SSP
  20145. bool
  20146. @@ -2145,8 +2210,8 @@
  20147. choice
  20148. prompt "Propolice protection blocking signal"
  20149. depends on UCLIBC_HAS_SSP
  20150. - default PROPOLICE_BLOCK_ABRT if ! DODEBUG
  20151. - default PROPOLICE_BLOCK_SEGV if DODEBUG
  20152. + depends on DODEBUG
  20153. + default PROPOLICE_BLOCK_SEGV
  20154. help
  20155. "abort" use SIGABRT to block offending programs.
  20156. This is the default implementation.
  20157. @@ -2340,6 +2405,7 @@
  20158. config UCLIBC_MALLOC_DEBUGGING
  20159. bool "Build malloc with debugging support"
  20160. depends on MALLOC || MALLOC_STANDARD
  20161. + select DOASSERTS
  20162. help
  20163. Answer Y here to compile extra debugging support code into malloc.
  20164. Malloc debugging output may then be enabled at runtime using the
  20165. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.in.arch uClibc-git/extra/Configs/Config.in.arch
  20166. --- uClibc-0.9.33.2/extra/Configs/Config.in.arch 2012-05-15 09:20:09.000000000 +0200
  20167. +++ uClibc-git/extra/Configs/Config.in.arch 2014-07-25 20:36:04.449322340 +0200
  20168. @@ -10,9 +10,6 @@
  20169. if !ARCH_USE_MMU
  20170. choice
  20171. prompt "Target File Format"
  20172. -config UCLIBC_FORMAT_ELF
  20173. - bool "ELF"
  20174. - depends on ARCH_USE_MMU
  20175. config UCLIBC_FORMAT_FDPIC_ELF
  20176. bool "FDPIC ELF"
  20177. depends on !ARCH_USE_MMU && (TARGET_bfin || TARGET_frv)
  20178. @@ -42,6 +39,14 @@
  20179. comment "Using ELF file format"
  20180. endif
  20181. +config ARCH_HAS_DEPRECATED_SYSCALLS
  20182. + bool
  20183. + help
  20184. + New architectures do not support deprecated system calls. However,
  20185. + these system calls are needed to build linuxthreads (old and new) so
  20186. + this symbol controls whether there is support for these threading libraries
  20187. + or not.
  20188. +
  20189. config UCLIBC_SHARED_FLAT_ID
  20190. int "Shared library ID"
  20191. default 1
  20192. @@ -152,7 +157,6 @@
  20193. config DO_C99_MATH
  20194. bool "Enable full C99 math library support"
  20195. depends on UCLIBC_HAS_FLOATS
  20196. - default n
  20197. help
  20198. If you want the uClibc math library to contain the full set C99
  20199. math library features, then answer Y. If you leave this set to
  20200. @@ -166,7 +170,6 @@
  20201. config DO_XSI_MATH
  20202. bool "Enable XSI math extensions to the ISO C standard (bessel)"
  20203. depends on UCLIBC_HAS_FLOATS
  20204. - default n
  20205. help
  20206. X/Open System Interfaces extensions to ISO C math functions
  20207. (differential equation functions):
  20208. @@ -177,7 +180,6 @@
  20209. config UCLIBC_HAS_FENV
  20210. bool "Enable C99 Floating-point environment"
  20211. depends on UCLIBC_HAS_FLOATS
  20212. - default n
  20213. help
  20214. If you want the uClibc math library to contain the C99 floating
  20215. point environment, rounding and exception handling functions then
  20216. @@ -198,7 +200,7 @@
  20217. config KERNEL_HEADERS
  20218. string "Linux kernel header location"
  20219. - default "/usr/include"
  20220. + default ""
  20221. help
  20222. The kernel source you use to compile with should be the same
  20223. as the Linux kernel you run your apps on. uClibc doesn't even
  20224. @@ -209,6 +211,8 @@
  20225. but then run on Linux 2.0.x, lchown will be compiled into uClibc,
  20226. but won't work at all. You have been warned.
  20227. + If you don't set this, we'll assume the toolchain can find them.
  20228. +
  20229. config UCLIBC_UCLINUX_BROKEN_MUNMAP
  20230. bool
  20231. depends on !ARCH_USE_MMU
  20232. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.m68k uClibc-git/extra/Configs/Config.m68k
  20233. --- uClibc-0.9.33.2/extra/Configs/Config.m68k 2012-05-15 09:20:09.000000000 +0200
  20234. +++ uClibc-git/extra/Configs/Config.m68k 2014-07-25 20:36:04.449322340 +0200
  20235. @@ -11,3 +11,4 @@
  20236. bool
  20237. default y
  20238. select ARCH_BIG_ENDIAN
  20239. + select ARCH_HAS_DEPRECATED_SYSCALLS
  20240. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.metag uClibc-git/extra/Configs/Config.metag
  20241. --- uClibc-0.9.33.2/extra/Configs/Config.metag 1970-01-01 01:00:00.000000000 +0100
  20242. +++ uClibc-git/extra/Configs/Config.metag 2014-07-25 20:36:04.449322340 +0200
  20243. @@ -0,0 +1,32 @@
  20244. +#
  20245. +# For a description of the syntax of this configuration file,
  20246. +# see extra/config/Kconfig-language.txt
  20247. +#
  20248. +# Copyright (C) 2013, Imagination Technologies Ltd.
  20249. +#
  20250. +# Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  20251. +#
  20252. +
  20253. +config TARGET_ARCH
  20254. + default "metag"
  20255. +
  20256. +config FORCE_OPTIONS_FOR_ARCH
  20257. + bool
  20258. + default y
  20259. + select ARCH_LITTLE_ENDIAN
  20260. + select ARCH_HAS_MMU
  20261. +
  20262. +choice
  20263. + prompt "Target Processor Type"
  20264. + default CONFIG_META_2_1
  20265. + help
  20266. + This is the processor type of your CPU. This information is used for
  20267. + optimizing purposes.
  20268. +
  20269. +config CONFIG_META_1_2
  20270. + bool "Meta 1.2"
  20271. +
  20272. +config CONFIG_META_2_1
  20273. + bool "Meta 2.1"
  20274. +
  20275. +endchoice
  20276. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.microblaze uClibc-git/extra/Configs/Config.microblaze
  20277. --- uClibc-0.9.33.2/extra/Configs/Config.microblaze 2012-05-15 09:20:09.000000000 +0200
  20278. +++ uClibc-git/extra/Configs/Config.microblaze 2014-07-25 20:36:04.449322340 +0200
  20279. @@ -6,3 +6,8 @@
  20280. config TARGET_ARCH
  20281. string
  20282. default "microblaze"
  20283. +
  20284. +config FORCE_OPTIONS_FOR_ARCH
  20285. + bool
  20286. + default y
  20287. + select ARCH_HAS_DEPRECATED_SYSCALLS
  20288. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.mips uClibc-git/extra/Configs/Config.mips
  20289. --- uClibc-0.9.33.2/extra/Configs/Config.mips 2012-05-15 09:20:09.000000000 +0200
  20290. +++ uClibc-git/extra/Configs/Config.mips 2014-07-25 20:36:04.449322340 +0200
  20291. @@ -11,6 +11,8 @@
  20292. bool
  20293. default y
  20294. select ARCH_ANY_ENDIAN
  20295. + select ARCH_HAS_UCONTEXT
  20296. + select ARCH_HAS_DEPRECATED_SYSCALLS
  20297. choice
  20298. prompt "Target ABI"
  20299. @@ -70,4 +72,7 @@
  20300. config CONFIG_MIPS_ISA_MIPS64
  20301. bool "MIPS64"
  20302. +config CONFIG_MIPS_ISA_MIPS64R2
  20303. + bool "MIPS64r2"
  20304. +
  20305. endchoice
  20306. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.nios uClibc-git/extra/Configs/Config.nios
  20307. --- uClibc-0.9.33.2/extra/Configs/Config.nios 2012-05-15 09:20:09.000000000 +0200
  20308. +++ uClibc-git/extra/Configs/Config.nios 2014-07-25 20:36:04.449322340 +0200
  20309. @@ -13,4 +13,5 @@
  20310. select ARCH_LITTLE_ENDIAN
  20311. select ARCH_HAS_NO_MMU
  20312. select ARCH_HAS_NO_LDSO
  20313. + select ARCH_HAS_DEPRECATED_SYSCALLS
  20314. select HAVE_NO_PIC
  20315. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.nios2 uClibc-git/extra/Configs/Config.nios2
  20316. --- uClibc-0.9.33.2/extra/Configs/Config.nios2 2012-05-15 09:20:09.000000000 +0200
  20317. +++ uClibc-git/extra/Configs/Config.nios2 2014-07-25 20:36:04.449322340 +0200
  20318. @@ -13,4 +13,5 @@
  20319. select ARCH_LITTLE_ENDIAN
  20320. select ARCH_HAS_NO_MMU
  20321. select ARCH_HAS_NO_LDSO
  20322. + select ARCH_HAS_DEPRECATED_SYSCALLS
  20323. select HAVE_NO_PIC
  20324. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.powerpc uClibc-git/extra/Configs/Config.powerpc
  20325. --- uClibc-0.9.33.2/extra/Configs/Config.powerpc 2012-05-15 09:20:09.000000000 +0200
  20326. +++ uClibc-git/extra/Configs/Config.powerpc 2014-07-25 20:36:04.449322340 +0200
  20327. @@ -12,6 +12,7 @@
  20328. default y
  20329. select ARCH_BIG_ENDIAN
  20330. select ARCH_HAS_MMU
  20331. + select ARCH_HAS_DEPRECATED_SYSCALLS
  20332. choice
  20333. prompt "Target Processor Type"
  20334. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.sh uClibc-git/extra/Configs/Config.sh
  20335. --- uClibc-0.9.33.2/extra/Configs/Config.sh 2012-05-15 09:20:09.000000000 +0200
  20336. +++ uClibc-git/extra/Configs/Config.sh 2014-07-25 20:36:04.449322340 +0200
  20337. @@ -11,6 +11,7 @@
  20338. bool
  20339. default y
  20340. select ARCH_ANY_ENDIAN
  20341. + select ARCH_HAS_DEPRECATED_SYSCALLS
  20342. choice
  20343. prompt "Target Processor Type"
  20344. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.sh64 uClibc-git/extra/Configs/Config.sh64
  20345. --- uClibc-0.9.33.2/extra/Configs/Config.sh64 2012-05-15 09:20:09.000000000 +0200
  20346. +++ uClibc-git/extra/Configs/Config.sh64 2014-07-25 20:36:04.449322340 +0200
  20347. @@ -11,6 +11,7 @@
  20348. bool
  20349. default y
  20350. select ARCH_ANY_ENDIAN
  20351. + select ARCH_HAS_DEPRECATED_SYSCALLS
  20352. choice
  20353. prompt "Target Processor Type"
  20354. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.sparc uClibc-git/extra/Configs/Config.sparc
  20355. --- uClibc-0.9.33.2/extra/Configs/Config.sparc 2012-05-15 09:20:09.000000000 +0200
  20356. +++ uClibc-git/extra/Configs/Config.sparc 2014-07-25 20:36:04.449322340 +0200
  20357. @@ -11,6 +11,7 @@
  20358. bool
  20359. default y
  20360. select ARCH_BIG_ENDIAN
  20361. + select ARCH_HAS_DEPRECATED_SYSCALLS
  20362. choice
  20363. prompt "Target Processor Type"
  20364. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.v850 uClibc-git/extra/Configs/Config.v850
  20365. --- uClibc-0.9.33.2/extra/Configs/Config.v850 2012-05-15 09:20:09.000000000 +0200
  20366. +++ uClibc-git/extra/Configs/Config.v850 2014-07-25 20:36:04.449322340 +0200
  20367. @@ -12,4 +12,5 @@
  20368. default y
  20369. select ARCH_LITTLE_ENDIAN
  20370. select ARCH_HAS_NO_MMU
  20371. + select ARCH_HAS_DEPRECATED_SYSCALLS
  20372. select HAVE_NO_PIC
  20373. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.vax uClibc-git/extra/Configs/Config.vax
  20374. --- uClibc-0.9.33.2/extra/Configs/Config.vax 2012-05-15 09:20:09.000000000 +0200
  20375. +++ uClibc-git/extra/Configs/Config.vax 2014-07-25 20:36:04.449322340 +0200
  20376. @@ -12,3 +12,4 @@
  20377. default y
  20378. select ARCH_LITTLE_ENDIAN
  20379. select ARCH_HAS_NO_LDSO
  20380. + select ARCH_HAS_DEPRECATED_SYSCALLS
  20381. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.x86_64 uClibc-git/extra/Configs/Config.x86_64
  20382. --- uClibc-0.9.33.2/extra/Configs/Config.x86_64 2012-05-15 09:20:09.000000000 +0200
  20383. +++ uClibc-git/extra/Configs/Config.x86_64 2014-07-25 20:36:04.449322340 +0200
  20384. @@ -12,3 +12,5 @@
  20385. default y
  20386. select ARCH_LITTLE_ENDIAN
  20387. select ARCH_HAS_MMU
  20388. + select ARCH_HAS_UCONTEXT
  20389. + select ARCH_HAS_DEPRECATED_SYSCALLS
  20390. diff -Nur uClibc-0.9.33.2/extra/Configs/Config.xtensa uClibc-git/extra/Configs/Config.xtensa
  20391. --- uClibc-0.9.33.2/extra/Configs/Config.xtensa 2012-05-15 09:20:09.000000000 +0200
  20392. +++ uClibc-git/extra/Configs/Config.xtensa 2014-07-25 20:36:04.449322340 +0200
  20393. @@ -6,3 +6,8 @@
  20394. config TARGET_ARCH
  20395. string
  20396. default "xtensa"
  20397. +
  20398. +config FORCE_OPTIONS_FOR_ARCH
  20399. + bool
  20400. + default y
  20401. + select ARCH_HAS_DEPRECATED_SYSCALLS
  20402. diff -Nur uClibc-0.9.33.2/extra/Configs/defconfigs/arc/defconfig uClibc-git/extra/Configs/defconfigs/arc/defconfig
  20403. --- uClibc-0.9.33.2/extra/Configs/defconfigs/arc/defconfig 1970-01-01 01:00:00.000000000 +0100
  20404. +++ uClibc-git/extra/Configs/defconfigs/arc/defconfig 2014-07-25 20:36:04.477322487 +0200
  20405. @@ -0,0 +1,28 @@
  20406. +ARCH_WANTS_LITTLE_ENDIAN=y
  20407. +# UCLIBC_HAS_FPU is not set
  20408. +DO_C99_MATH=y
  20409. +KERNEL_HEADERS="%KERNEL_HEADERS%"
  20410. +# DOPIC is not set
  20411. +# LDSO_CACHE_SUPPORT is not set
  20412. +LDSO_RUNPATH=y
  20413. +# LDSO_SAFE_RUNPATH is not set
  20414. +LINUXTHREADS_OLD=y
  20415. +PTHREADS_DEBUG_SUPPORT=y
  20416. +UCLIBC_SUSV2_LEGACY=y
  20417. +UCLIBC_SUSV3_LEGACY=y
  20418. +UCLIBC_SUSV4_LEGACY=y
  20419. +UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y
  20420. +UCLIBC_SV4_DEPRECATED=y
  20421. +UCLIBC_HAS_RPC=y
  20422. +UCLIBC_HAS_FULL_RPC=y
  20423. +UCLIBC_HAS_RESOLVER_SUPPORT=y
  20424. +UCLIBC_HAS_LIBRESOLV_STUB=y
  20425. +UCLIBC_HAS_LOCALE=y
  20426. +UCLIBC_HAS_NFTW=y
  20427. +UCLIBC_HAS_FTW=y
  20428. +RUNTIME_PREFIX="%RUNTIME_PREFIX%"
  20429. +DEVEL_PREFIX="%DEVEL_PREFIX%"
  20430. +CROSS_COMPILER_PREFIX="arc-linux-uclibc-"
  20431. +# DOSTRIP is not set
  20432. +SUPPORT_LD_DEBUG=y
  20433. +UCLIBC_HAS_BACKTRACE=y
  20434. diff -Nur uClibc-0.9.33.2/extra/Configs/defconfigs/arc/tb10x_defconfig uClibc-git/extra/Configs/defconfigs/arc/tb10x_defconfig
  20435. --- uClibc-0.9.33.2/extra/Configs/defconfigs/arc/tb10x_defconfig 1970-01-01 01:00:00.000000000 +0100
  20436. +++ uClibc-git/extra/Configs/defconfigs/arc/tb10x_defconfig 2014-07-25 20:36:04.481322508 +0200
  20437. @@ -0,0 +1,37 @@
  20438. +ARCH_WANTS_LITTLE_ENDIAN=y
  20439. +# UCLIBC_HAS_FPU is not set
  20440. +DO_C99_MATH=y
  20441. +KERNEL_HEADERS="%KERNEL_HEADERS%"
  20442. +# DOPIC is not set
  20443. +# LDSO_CACHE_SUPPORT is not set
  20444. +LDSO_RUNPATH=y
  20445. +# LDSO_SAFE_RUNPATH is not set
  20446. +LINUXTHREADS_OLD=y
  20447. +PTHREADS_DEBUG_SUPPORT=y
  20448. +MALLOC_GLIBC_COMPAT=y
  20449. +UCLIBC_SUSV3_LEGACY=y
  20450. +UCLIBC_SUSV4_LEGACY=y
  20451. +UCLIBC_HAS_GETPT=y
  20452. +UCLIBC_HAS_LIBUTIL=y
  20453. +UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y
  20454. +UCLIBC_SV4_DEPRECATED=y
  20455. +UCLIBC_HAS_IPV6=y
  20456. +UCLIBC_HAS_RPC=y
  20457. +UCLIBC_HAS_FULL_RPC=y
  20458. +UCLIBC_HAS_REENTRANT_RPC=y
  20459. +UCLIBC_HAS_RESOLVER_SUPPORT=y
  20460. +UCLIBC_HAS_LIBRESOLV_STUB=y
  20461. +UCLIBC_HAS_LIBNSL_STUB=y
  20462. +UCLIBC_HAS_CTYPE_CHECKED=y
  20463. +UCLIBC_HAS_LOCALE=y
  20464. +UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
  20465. +UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE=y
  20466. +UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
  20467. +UCLIBC_HAS_PRINTF_M_SPEC=y
  20468. +UCLIBC_HAS_NFTW=y
  20469. +UCLIBC_HAS_FTW=y
  20470. +RUNTIME_PREFIX="%RUNTIME_PREFIX%"
  20471. +DEVEL_PREFIX="%DEVEL_PREFIX%"
  20472. +CROSS_COMPILER_PREFIX="arc-linux-uclibc-"
  20473. +# DOSTRIP is not set
  20474. +SUPPORT_LD_DEBUG=y
  20475. diff -Nur uClibc-0.9.33.2/extra/Configs/defconfigs/metag/defconfig uClibc-git/extra/Configs/defconfigs/metag/defconfig
  20476. --- uClibc-0.9.33.2/extra/Configs/defconfigs/metag/defconfig 1970-01-01 01:00:00.000000000 +0100
  20477. +++ uClibc-git/extra/Configs/defconfigs/metag/defconfig 2014-07-25 20:36:04.665323472 +0200
  20478. @@ -0,0 +1 @@
  20479. +TARGET_metag=y
  20480. diff -Nur uClibc-0.9.33.2/extra/locale/gen_wc8bit.c uClibc-git/extra/locale/gen_wc8bit.c
  20481. --- uClibc-0.9.33.2/extra/locale/gen_wc8bit.c 2012-05-15 09:20:09.000000000 +0200
  20482. +++ uClibc-git/extra/locale/gen_wc8bit.c 2014-07-25 20:36:04.921324813 +0200
  20483. @@ -182,7 +182,11 @@
  20484. printf("\tunsigned char idx8c2wc[%d];\n", C2WC_IDX_LEN);
  20485. printf("\tunsigned char idx8wc2c[%d];\n", II_LEN);
  20486. #endif
  20487. +#ifndef __metag__
  20488. printf("} __codeset_8_bit_t;\n\n");
  20489. +#else
  20490. + printf("} __attribute__((__packed__)) __codeset_8_bit_t;\n\n");
  20491. +#endif /* __metag__ */
  20492. printf("#ifdef WANT_DATA\n\n");
  20493. printf("static const __codeset_8_bit_t codeset_8_bit[%d] = {\n", argc-1);
  20494. diff -Nur uClibc-0.9.33.2/extra/locale/Makefile.in uClibc-git/extra/locale/Makefile.in
  20495. --- uClibc-0.9.33.2/extra/locale/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  20496. +++ uClibc-git/extra/locale/Makefile.in 2014-07-25 20:36:04.893324666 +0200
  20497. @@ -111,16 +111,10 @@
  20498. $(Q)echo "$(CURDIR)/$(locale_DIR)/charmaps/ISO-8859-1.pairs" >> $@
  20499. else
  20500. $(Q)set -e; \
  20501. - tmp=`mktemp $@.XXXXXX 2>/dev/null || true`; \
  20502. - [ -z "$$tmp" ] && tmp='$@.new'; \
  20503. find $(CURDIR)/$(locale_DIR)/charmaps/ -name '*.pairs' | \
  20504. - sort > $$tmp; \
  20505. - [ -s $$tmp ]; \
  20506. - if cmp $@ $$tmp >/dev/null 2>&1; then \
  20507. - $(RM) $$tmp; \
  20508. - else \
  20509. - mv -f $$tmp $@; \
  20510. - fi
  20511. + sort > $@.new; \
  20512. + [ -s $@.new ]; \
  20513. + cmp -s $@ $@.new && $(RM) $@.new || mv -f $@.new $@
  20514. endif
  20515. # the lines beginning w/ '#-' are mandatory
  20516. diff -Nur uClibc-0.9.33.2/extra/locale/programs/locale.c uClibc-git/extra/locale/programs/locale.c
  20517. --- uClibc-0.9.33.2/extra/locale/programs/locale.c 2012-05-15 09:20:09.000000000 +0200
  20518. +++ uClibc-git/extra/locale/programs/locale.c 2014-07-25 20:36:04.933324875 +0200
  20519. @@ -31,7 +31,7 @@
  20520. unsigned char lc_messages_row;
  20521. } locale_entry;
  20522. -/* Need to include this before locale.h and xlocale.h! */
  20523. +/* Need to include this before locale.h! */
  20524. #include <bits/uClibc_locale.h>
  20525. #undef CODESET_LIST
  20526. diff -Nur uClibc-0.9.33.2/extra/scripts/gen_bits_syscall_h.sh uClibc-git/extra/scripts/gen_bits_syscall_h.sh
  20527. --- uClibc-0.9.33.2/extra/scripts/gen_bits_syscall_h.sh 2012-05-15 09:20:09.000000000 +0200
  20528. +++ uClibc-git/extra/scripts/gen_bits_syscall_h.sh 2014-07-25 20:36:04.945324938 +0200
  20529. @@ -8,14 +8,18 @@
  20530. # June 27, 2001 Manuel Novoa III
  20531. #
  20532. -# This script expects top_builddir and CC (as used in the Makefiles) to be set
  20533. -# in the environment, and outputs the appropriate
  20534. -# $top_builddir/include/bits/sysnum.h # corresponding to
  20535. -# $top_builddir/include/asm/unistd.h to stdout.
  20536. +# This script expects CC (as used in the Makefiles) to be set
  20537. +# in the environment, and outputs the appropriate bits/sysnum.h #
  20538. +# corresponding to asm/unistd.h to stdout.
  20539. #
  20540. # Warning!!! This does _no_ error checking!!!
  20541. -INCLUDE_OPTS="-nostdinc -I${KERNEL_HEADERS}"
  20542. +if [ "${KERNEL_HEADERS:-/}" != "/" ] ; then
  20543. + INCLUDE_OPTS="-nostdinc -I${KERNEL_HEADERS}"
  20544. +else
  20545. + # Let the toolchain use its configure paths.
  20546. + INCLUDE_OPTS=
  20547. +fi
  20548. case $CC in
  20549. *icc*) CC_SYSNUM_ARGS="-dM" ;;
  20550. @@ -25,22 +29,31 @@
  20551. ( echo "#include <asm/unistd.h>";
  20552. echo "#include <asm/unistd.h>" |
  20553. $CC -E $CC_SYSNUM_ARGS $INCLUDE_OPTS - |
  20554. - sed -ne 's/^[ ]*#define[ ]*\(__ARM_NR_\|__NR_\)\([A-Za-z0-9_]*\).*/UCLIBC\1\2 \1\2/gp' \
  20555. - -e 's/^[ ]*#undef[ ]*\(__ARM_NR_\|__NR_\)\([A-Za-z0-9_]*\).*/UNDEFUCLIBC\1\2 \1\2/gp' # needed to strip out any kernel-internal defines
  20556. + sed -n -r \
  20557. + -e 's/^[ ]*#define[ ]*(__ARM_NR_|__NR_)([A-Za-z0-9_]*).*/UCLIBC\1\2 \1\2/gp' \
  20558. + -e 's/^[ ]*#undef[ ]*(__ARM_NR_|__NR_)([A-Za-z0-9_]*).*/UNDEFUCLIBC\1\2 \1\2/gp' # needed to strip out any kernel-internal defines
  20559. ) |
  20560. $CC -E $INCLUDE_OPTS - |
  20561. -( echo "/* WARNING!!! AUTO-GENERATED FILE!!! DO NOT EDIT!!! */" ;
  20562. - echo ;
  20563. - echo "#ifndef _BITS_SYSNUM_H" ;
  20564. - echo "#define _BITS_SYSNUM_H" ;
  20565. - echo ;
  20566. - echo "#ifndef _SYSCALL_H" ;
  20567. - echo "# error \"Never use <bits/sysnum.h> directly; include <sys/syscall.h> instead.\"" ;
  20568. - echo "#endif" ; echo ;
  20569. - sed -ne 's/^UCLIBC\(__ARM_NR_\|__NR_\)\([A-Za-z0-9_]*\) *\(.*\)/#undef \1\2\
  20570. +(
  20571. + cat <<-EOF
  20572. +/* WARNING!!! AUTO-GENERATED FILE!!! DO NOT EDIT!!! */
  20573. +/* See $0 for more information. */
  20574. +
  20575. +#ifndef _BITS_SYSNUM_H
  20576. +#define _BITS_SYSNUM_H
  20577. +
  20578. +#ifndef _SYSCALL_H
  20579. +# error "Never use <bits/sysnum.h> directly; include <sys/syscall.h> instead."
  20580. +#endif
  20581. +
  20582. +EOF
  20583. + sed -n -r -e 's/^UCLIBC(__ARM_NR_|__NR_)([A-Za-z0-9_]*) *(.*)/#undef \1\2\
  20584. #define \1\2 \3\
  20585. #define SYS_\2 \1\2/gp' \
  20586. - -e 's/^UNDEFUCLIBC\(__ARM_NR_\|__NR_\)\([A-Za-z0-9_]*\).*/#undef \1\2/gp'
  20587. - echo ;
  20588. - echo "#endif" ;
  20589. + -e 's/^UNDEFUCLIBC(__ARM_NR_|__NR_)([A-Za-z0-9_]*).*/#undef \1\2\
  20590. +#undef SYS_\2/gp'
  20591. + cat <<-EOF
  20592. +
  20593. +#endif
  20594. +EOF
  20595. )
  20596. diff -Nur uClibc-0.9.33.2/extra/scripts/getent uClibc-git/extra/scripts/getent
  20597. --- uClibc-0.9.33.2/extra/scripts/getent 2012-05-15 09:20:09.000000000 +0200
  20598. +++ uClibc-git/extra/scripts/getent 2014-07-25 20:36:04.945324938 +0200
  20599. @@ -1,5 +1,4 @@
  20600. #!/bin/sh
  20601. -# $Header: /var/cvs/uClibc/extra/scripts/getent,v 1.2 2005/02/02 14:18:01 solar Exp $
  20602. #
  20603. # Closely (not perfectly) emulate the behavior of glibc's getent utility
  20604. #
  20605. @@ -9,7 +8,8 @@
  20606. # case-insensitive matches not supported (ethers; others?)
  20607. # may return false-positives (hosts,protocols,rpc,services,ethers)
  20608. -export PATH="${PATH}:/bin:/usr/bin"
  20609. +[ -z "$PATH" ] && PATH="/bin:/usr/bin" || PATH="${PATH}:/bin:/usr/bin"
  20610. +export PATH
  20611. file="/etc/$1"
  20612. case $1 in
  20613. diff -Nur uClibc-0.9.33.2/extra/scripts/install_headers.sh uClibc-git/extra/scripts/install_headers.sh
  20614. --- uClibc-0.9.33.2/extra/scripts/install_headers.sh 2012-05-15 09:20:09.000000000 +0200
  20615. +++ uClibc-git/extra/scripts/install_headers.sh 2014-07-25 20:36:04.945324938 +0200
  20616. @@ -32,10 +32,9 @@
  20617. exit 1
  20618. fi
  20619. -
  20620. # Sanitize and copy uclibc headers
  20621. (
  20622. -# We must cd, or else we'll prepend "${srcdir}" to filenames!
  20623. +# We must cd, or else we will prepend "${srcdir}" to filenames!
  20624. cd "${srcdir}" || exit 1
  20625. find . ! -name '.' -a ! -path '*/.*' | sed -e 's/^\.\///' -e '/^config\//d' \
  20626. -e '/^config$/d'
  20627. @@ -51,18 +50,20 @@
  20628. # Do not install libc-XXXX.h files
  20629. continue
  20630. fi
  20631. - # NB: unifdef exits with 1 if output is not
  20632. - # exactly the same as input. That's ok.
  20633. # Do not abort the script if unifdef "fails"!
  20634. # NB2: careful with sed command arguments, they contain tab character
  20635. "$top_builddir/extra/scripts/unifdef" \
  20636. + -B \
  20637. + -t \
  20638. + -x 2 \
  20639. + -f "$top_builddir/include/generated/unifdef_config.h" \
  20640. -U_LIBC \
  20641. -U__UCLIBC_GEN_LOCALE \
  20642. -U__NO_CTYPE \
  20643. "${srcdir}/$filename" \
  20644. | sed -e '/^rtld_hidden_proto[ ]*([a-zA-Z0-9_]*)$/d' \
  20645. | sed -e '/^lib\(c\|m\|resolv\|dl\|intl\|rt\|nsl\|util\|crypt\|pthread\)_hidden_proto[ ]*([a-zA-Z0-9_]*)$/d' \
  20646. - >"${dstdir}/$filename"
  20647. + > "${dstdir}/$filename"
  20648. done
  20649. )
  20650. diff -Nur uClibc-0.9.33.2/extra/scripts/relinfo.pl uClibc-git/extra/scripts/relinfo.pl
  20651. --- uClibc-0.9.33.2/extra/scripts/relinfo.pl 2012-05-15 09:20:09.000000000 +0200
  20652. +++ uClibc-git/extra/scripts/relinfo.pl 2014-07-25 20:36:04.949324959 +0200
  20653. @@ -1,5 +1,5 @@
  20654. #! /usr/bin/perl
  20655. -eval "exec /usr/bin/perl -S $0 $*"
  20656. +eval "exec /usr/bin/env perl -w -S $0 $@"
  20657. if 0;
  20658. # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Red Hat, Inc.
  20659. # Written by Ulrich Drepper <drepper@redhat.com>, 2000.
  20660. @@ -14,8 +14,7 @@
  20661. # GNU General Public License for more details.
  20662. #
  20663. # You should have received a copy of the GNU General Public License
  20664. -# along with this program; if not, write to the Free Software Foundation,
  20665. -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  20666. +# along with this program; if not, see <http://www.gnu.org/licenses/>.
  20667. for ($cnt = 0; $cnt <= $#ARGV; ++$cnt) {
  20668. $relent = 0;
  20669. diff -Nur uClibc-0.9.33.2/extra/scripts/unifdef.c uClibc-git/extra/scripts/unifdef.c
  20670. --- uClibc-0.9.33.2/extra/scripts/unifdef.c 2012-05-15 09:20:09.000000000 +0200
  20671. +++ uClibc-git/extra/scripts/unifdef.c 2014-07-25 20:36:04.949324959 +0200
  20672. @@ -1,13 +1,5 @@
  20673. /*
  20674. - * Copyright (c) 2002 - 2005 Tony Finch <dot@dotat.at>. All rights reserved.
  20675. - *
  20676. - * This code is derived from software contributed to Berkeley by Dave Yost.
  20677. - * It was rewritten to support ANSI C by Tony Finch. The original version of
  20678. - * unifdef carried the following copyright notice. None of its code remains
  20679. - * in this version (though some of the names remain).
  20680. - *
  20681. - * Copyright (c) 1985, 1993
  20682. - * The Regents of the University of California. All rights reserved.
  20683. + * Copyright (c) 2002 - 2014 Tony Finch <dot@dotat.at>
  20684. *
  20685. * Redistribution and use in source and binary forms, with or without
  20686. * modification, are permitted provided that the following conditions
  20687. @@ -31,27 +23,15 @@
  20688. * SUCH DAMAGE.
  20689. */
  20690. -#include <sys/cdefs.h>
  20691. -
  20692. -#ifndef lint
  20693. -#if 0
  20694. -static const char copyright[] =
  20695. -"@(#) Copyright (c) 1985, 1993\n\
  20696. - The Regents of the University of California. All rights reserved.\n";
  20697. -#endif
  20698. -#ifdef __IDSTRING
  20699. -__IDSTRING(Berkeley, "@(#)unifdef.c 8.1 (Berkeley) 6/6/93");
  20700. -__IDSTRING(NetBSD, "$NetBSD: unifdef.c,v 1.8 2000/07/03 02:51:36 matt Exp $");
  20701. -__IDSTRING(dotat, "$dotat: things/unifdef.c,v 1.171 2005/03/08 12:38:48 fanf2 Exp $");
  20702. -#endif
  20703. -#endif /* not lint */
  20704. -#ifdef __FBSDID
  20705. -__FBSDID("$FreeBSD: /repoman/r/ncvs/src/usr.bin/unifdef/unifdef.c,v 1.20 2005/05/21 09:55:09 ru Exp $");
  20706. -#endif
  20707. -
  20708. /*
  20709. * unifdef - remove ifdef'ed lines
  20710. *
  20711. + * This code was derived from software contributed to Berkeley by Dave Yost.
  20712. + * It was rewritten to support ANSI C by Tony Finch. The original version
  20713. + * of unifdef carried the 4-clause BSD copyright licence. None of its code
  20714. + * remains in this version (though some of the names remain) so it now
  20715. + * carries a more liberal licence.
  20716. + *
  20717. * Wishlist:
  20718. * provide an option which will append the name of the
  20719. * appropriate symbol after #else's and #endif's
  20720. @@ -59,26 +39,17 @@
  20721. * #else's and #endif's to see that they match their
  20722. * corresponding #ifdef or #ifndef
  20723. *
  20724. - * The first two items above require better buffer handling, which would
  20725. - * also make it possible to handle all "dodgy" directives correctly.
  20726. + * These require better buffer handling, which would also make
  20727. + * it possible to handle all "dodgy" directives correctly.
  20728. */
  20729. -#include <errno.h>
  20730. -#include <ctype.h>
  20731. -#include <stdarg.h>
  20732. -#include <stdbool.h>
  20733. -#include <stdio.h>
  20734. -#include <stdlib.h>
  20735. -#include <string.h>
  20736. -#include <unistd.h>
  20737. -
  20738. -/* Avoid err.h since uClibc can disable these things */
  20739. -#define vwarnx(fmt, args) ({ fprintf(stderr, "unifdef: "); vfprintf(stderr, fmt, args); fprintf(stderr, "\n"); })
  20740. -#define warnx(fmt, args...) fprintf(stderr, "unifdef: " fmt "\n", ## args)
  20741. -#define errx(exit_code, fmt, args...) ({ warnx(fmt, ## args); exit(exit_code); })
  20742. -#define err(exit_code, fmt, args...) errx(exit_code, fmt ": %s", ## args, strerror(errno))
  20743. +#include "unifdef.h"
  20744. -size_t strlcpy(char *dst, const char *src, size_t siz);
  20745. +static const char copyright[] =
  20746. + #include "version.h"
  20747. + "@(#) $Author: Tony Finch (dot@dotat.at) $\n"
  20748. + "@(#) $URL: http://dotat.at/prog/unifdef $\n"
  20749. +;
  20750. /* types of input lines: */
  20751. typedef enum {
  20752. @@ -96,6 +67,7 @@
  20753. LT_DODGY_LAST = LT_DODGY + LT_ENDIF,
  20754. LT_PLAIN, /* ordinary line */
  20755. LT_EOF, /* end of file */
  20756. + LT_ERROR, /* unevaluable #if */
  20757. LT_COUNT
  20758. } Linetype;
  20759. @@ -106,9 +78,12 @@
  20760. "DODGY IF", "DODGY TRUE", "DODGY FALSE",
  20761. "DODGY ELIF", "DODGY ELTRUE", "DODGY ELFALSE",
  20762. "DODGY ELSE", "DODGY ENDIF",
  20763. - "PLAIN", "EOF"
  20764. + "PLAIN", "EOF", "ERROR"
  20765. };
  20766. +#define linetype_if2elif(lt) ((Linetype)(lt - LT_IF + LT_ELIF))
  20767. +#define linetype_2dodgy(lt) ((Linetype)(lt + LT_DODGY))
  20768. +
  20769. /* state of #if processing */
  20770. typedef enum {
  20771. IS_OUTSIDE,
  20772. @@ -162,7 +137,7 @@
  20773. */
  20774. #define MAXDEPTH 64 /* maximum #if nesting */
  20775. #define MAXLINE 4096 /* maximum length of line */
  20776. -#define MAXSYMS 4096 /* maximum number of symbols */
  20777. +#define MAXSYMS 16384 /* maximum number of symbols */
  20778. /*
  20779. * Sometimes when editing a keyword the replacement text is longer, so
  20780. @@ -174,13 +149,17 @@
  20781. * Globals.
  20782. */
  20783. +static bool compblank; /* -B: compress blank lines */
  20784. +static bool lnblank; /* -b: blank deleted lines */
  20785. static bool complement; /* -c: do the complement */
  20786. static bool debugging; /* -d: debugging reports */
  20787. +static bool inplace; /* -m: modify in place */
  20788. static bool iocccok; /* -e: fewer IOCCC errors */
  20789. +static bool strictlogic; /* -K: keep ambiguous #ifs */
  20790. static bool killconsts; /* -k: eval constant #ifs */
  20791. -static bool lnblank; /* -l: blank deleted lines */
  20792. static bool lnnum; /* -n: add #line directives */
  20793. static bool symlist; /* -s: output symbol list */
  20794. +static bool symdepth; /* -S: output symbol depth */
  20795. static bool text; /* -t: this is a text file */
  20796. static const char *symname[MAXSYMS]; /* symbol name */
  20797. @@ -191,10 +170,28 @@
  20798. static FILE *input; /* input file pointer */
  20799. static const char *filename; /* input file name */
  20800. static int linenum; /* current line number */
  20801. +static const char *linefile; /* file name for #line */
  20802. +static FILE *output; /* output file pointer */
  20803. +static const char *ofilename; /* output file name */
  20804. +static const char *backext; /* backup extension */
  20805. +static char *tempname; /* avoid splatting input */
  20806. static char tline[MAXLINE+EDITSLOP];/* input buffer plus space */
  20807. static char *keyword; /* used for editing #elif's */
  20808. +/*
  20809. + * When processing a file, the output's newline style will match the
  20810. + * input's, and unifdef correctly handles CRLF or LF endings whatever
  20811. + * the platform's native style. The stdio streams are opened in binary
  20812. + * mode to accommodate platforms whose native newline style is CRLF.
  20813. + * When the output isn't a processed input file (when it is error /
  20814. + * debug / diagnostic messages) then unifdef uses native line endings.
  20815. + */
  20816. +
  20817. +static const char *newline; /* input file format */
  20818. +static const char newline_unix[] = "\n";
  20819. +static const char newline_crlf[] = "\r\n";
  20820. +
  20821. static Comment_state incomment; /* comment parser state */
  20822. static Line_state linestate; /* #if line parser state */
  20823. static Ifstate ifstate[MAXDEPTH]; /* #if processor state */
  20824. @@ -202,31 +199,53 @@
  20825. static int stifline[MAXDEPTH]; /* start of current #if */
  20826. static int depth; /* current #if nesting */
  20827. static int delcount; /* count of deleted lines */
  20828. -static bool keepthis; /* don't delete constant #if */
  20829. +static unsigned blankcount; /* count of blank lines */
  20830. +static unsigned blankmax; /* maximum recent blankcount */
  20831. +static bool constexpr; /* constant #if expression */
  20832. +static bool zerosyms; /* to format symdepth output */
  20833. +static bool firstsym; /* ditto */
  20834. +static int exitmode; /* exit status mode */
  20835. static int exitstat; /* program exit status */
  20836. +static bool altered; /* was this file modified? */
  20837. -static void addsym(bool, bool, char *);
  20838. +static void addsym1(bool, bool, char *);
  20839. +static void addsym2(bool, const char *, const char *);
  20840. +static char *astrcat(const char *, const char *);
  20841. +static void cleantemp(void);
  20842. +static void closeio(void);
  20843. static void debug(const char *, ...);
  20844. +static void debugsym(const char *, int);
  20845. +static bool defundef(void);
  20846. +static void defundefile(const char *);
  20847. static void done(void);
  20848. static void error(const char *);
  20849. -static int findsym(const char *);
  20850. +static int findsym(const char **);
  20851. static void flushline(bool);
  20852. -static Linetype get_line(void);
  20853. +static void hashline(void);
  20854. +static void help(void);
  20855. static Linetype ifeval(const char **);
  20856. static void ignoreoff(void);
  20857. static void ignoreon(void);
  20858. +static void indirectsym(void);
  20859. static void keywordedit(const char *);
  20860. +static const char *matchsym(const char *, const char *);
  20861. static void nest(void);
  20862. +static Linetype parseline(void);
  20863. static void process(void);
  20864. +static void processinout(const char *, const char *);
  20865. +static const char *skipargs(const char *);
  20866. static const char *skipcomment(const char *);
  20867. +static const char *skiphash(void);
  20868. +static const char *skipline(const char *);
  20869. static const char *skipsym(const char *);
  20870. static void state(Ifstate);
  20871. -static int strlcmp(const char *, const char *, size_t);
  20872. static void unnest(void);
  20873. static void usage(void);
  20874. +static void version(void);
  20875. +static const char *xstrdup(const char *, const char *);
  20876. -#define endsym(c) (!isalpha((unsigned char)c) && !isdigit((unsigned char)c) && c != '_')
  20877. +#define endsym(c) (!isalnum((unsigned char)c) && c != '_')
  20878. /*
  20879. * The main program.
  20880. @@ -236,7 +255,7 @@
  20881. {
  20882. int opt;
  20883. - while ((opt = getopt(argc, argv, "i:D:U:I:cdeklnst")) != -1)
  20884. + while ((opt = getopt(argc, argv, "i:D:U:f:I:M:o:x:bBcdehKklmnsStV")) != -1)
  20885. switch (opt) {
  20886. case 'i': /* treat stuff controlled by these symbols as text */
  20887. /*
  20888. @@ -246,20 +265,26 @@
  20889. */
  20890. opt = *optarg++;
  20891. if (opt == 'D')
  20892. - addsym(true, true, optarg);
  20893. + addsym1(true, true, optarg);
  20894. else if (opt == 'U')
  20895. - addsym(true, false, optarg);
  20896. + addsym1(true, false, optarg);
  20897. else
  20898. usage();
  20899. break;
  20900. case 'D': /* define a symbol */
  20901. - addsym(false, true, optarg);
  20902. + addsym1(false, true, optarg);
  20903. break;
  20904. case 'U': /* undef a symbol */
  20905. - addsym(false, false, optarg);
  20906. + addsym1(false, false, optarg);
  20907. break;
  20908. - case 'I':
  20909. - /* no-op for compatibility with cpp */
  20910. + case 'I': /* no-op for compatibility with cpp */
  20911. + break;
  20912. + case 'b': /* blank deleted lines instead of omitting them */
  20913. + case 'l': /* backwards compatibility */
  20914. + lnblank = true;
  20915. + break;
  20916. + case 'B': /* compress blank lines around removed section */
  20917. + compblank = true;
  20918. break;
  20919. case 'c': /* treat -D as -U and vice versa */
  20920. complement = true;
  20921. @@ -270,50 +295,214 @@
  20922. case 'e': /* fewer errors from dodgy lines */
  20923. iocccok = true;
  20924. break;
  20925. + case 'f': /* definitions file */
  20926. + defundefile(optarg);
  20927. + break;
  20928. + case 'h':
  20929. + help();
  20930. + break;
  20931. + case 'K': /* keep ambiguous #ifs */
  20932. + strictlogic = true;
  20933. + break;
  20934. case 'k': /* process constant #ifs */
  20935. killconsts = true;
  20936. break;
  20937. - case 'l': /* blank deleted lines instead of omitting them */
  20938. - lnblank = true;
  20939. + case 'm': /* modify in place */
  20940. + inplace = true;
  20941. + break;
  20942. + case 'M': /* modify in place and keep backup */
  20943. + inplace = true;
  20944. + backext = optarg;
  20945. break;
  20946. case 'n': /* add #line directive after deleted lines */
  20947. lnnum = true;
  20948. break;
  20949. + case 'o': /* output to a file */
  20950. + ofilename = optarg;
  20951. + break;
  20952. case 's': /* only output list of symbols that control #ifs */
  20953. symlist = true;
  20954. break;
  20955. + case 'S': /* list symbols with their nesting depth */
  20956. + symlist = symdepth = true;
  20957. + break;
  20958. case 't': /* don't parse C comments */
  20959. text = true;
  20960. break;
  20961. + case 'V':
  20962. + version();
  20963. + break;
  20964. + case 'x':
  20965. + exitmode = atoi(optarg);
  20966. + if(exitmode < 0 || exitmode > 2)
  20967. + usage();
  20968. + break;
  20969. default:
  20970. usage();
  20971. }
  20972. argc -= optind;
  20973. argv += optind;
  20974. - if (argc > 1) {
  20975. - errx(2, "can only do one file");
  20976. - } else if (argc == 1 && strcmp(*argv, "-") != 0) {
  20977. - filename = *argv;
  20978. - input = fopen(filename, "r");
  20979. - if (input == NULL)
  20980. - err(2, "can't open %s", filename);
  20981. - } else {
  20982. + if (compblank && lnblank)
  20983. + errx(2, "-B and -b are mutually exclusive");
  20984. + if (symlist && (ofilename != NULL || inplace || argc > 1))
  20985. + errx(2, "-s only works with one input file");
  20986. + if (argc > 1 && ofilename != NULL)
  20987. + errx(2, "-o cannot be used with multiple input files");
  20988. + if (argc > 1 && !inplace)
  20989. + errx(2, "multiple input files require -m or -M");
  20990. + if (argc == 0)
  20991. + argc = 1;
  20992. + if (argc == 1 && !inplace && ofilename == NULL)
  20993. + ofilename = "-";
  20994. + indirectsym();
  20995. +
  20996. + atexit(cleantemp);
  20997. + if (ofilename != NULL)
  20998. + processinout(*argv, ofilename);
  20999. + else while (argc-- > 0) {
  21000. + processinout(*argv, *argv);
  21001. + argv++;
  21002. + }
  21003. + switch(exitmode) {
  21004. + case(0): exit(exitstat);
  21005. + case(1): exit(!exitstat);
  21006. + case(2): exit(0);
  21007. + default: abort(); /* bug */
  21008. + }
  21009. +}
  21010. +
  21011. +/*
  21012. + * File logistics.
  21013. + */
  21014. +static void
  21015. +processinout(const char *ifn, const char *ofn)
  21016. +{
  21017. + struct stat st;
  21018. +
  21019. + if (ifn == NULL || strcmp(ifn, "-") == 0) {
  21020. filename = "[stdin]";
  21021. - input = stdin;
  21022. + linefile = NULL;
  21023. + input = fbinmode(stdin);
  21024. + } else {
  21025. + filename = ifn;
  21026. + linefile = ifn;
  21027. + input = fopen(ifn, "rb");
  21028. + if (input == NULL)
  21029. + err(2, "can't open %s", ifn);
  21030. + }
  21031. + if (strcmp(ofn, "-") == 0) {
  21032. + output = fbinmode(stdout);
  21033. + process();
  21034. + return;
  21035. }
  21036. + if (stat(ofn, &st) < 0) {
  21037. + output = fopen(ofn, "wb");
  21038. + if (output == NULL)
  21039. + err(2, "can't create %s", ofn);
  21040. + process();
  21041. + return;
  21042. + }
  21043. +
  21044. + tempname = astrcat(ofn, ".XXXXXX");
  21045. + output = mktempmode(tempname, st.st_mode);
  21046. + if (output == NULL)
  21047. + err(2, "can't create %s", tempname);
  21048. +
  21049. process();
  21050. - debug("bug at line %d", __LINE__);
  21051. - abort(); /* bug */
  21052. +
  21053. + if (backext != NULL) {
  21054. + char *backname = astrcat(ofn, backext);
  21055. + if (rename(ofn, backname) < 0)
  21056. + err(2, "can't rename \"%s\" to \"%s\"", ofn, backname);
  21057. + free(backname);
  21058. + }
  21059. + /* leave file unmodified if unifdef made no changes */
  21060. + if (!altered && backext == NULL) {
  21061. + if (remove(tempname) < 0)
  21062. + warn("can't remove \"%s\"", tempname);
  21063. + } else if (replace(tempname, ofn) < 0)
  21064. + err(2, "can't rename \"%s\" to \"%s\"", tempname, ofn);
  21065. + free(tempname);
  21066. + tempname = NULL;
  21067. +}
  21068. +
  21069. +/*
  21070. + * For cleaning up if there is an error.
  21071. + */
  21072. +static void
  21073. +cleantemp(void)
  21074. +{
  21075. + if (tempname != NULL)
  21076. + remove(tempname);
  21077. +}
  21078. +
  21079. +/*
  21080. + * Self-identification functions.
  21081. + */
  21082. +
  21083. +static void
  21084. +version(void)
  21085. +{
  21086. + const char *c = copyright;
  21087. + for (;;) {
  21088. + while (*++c != '$')
  21089. + if (*c == '\0')
  21090. + exit(0);
  21091. + while (*++c != '$')
  21092. + putc(*c, stderr);
  21093. + putc('\n', stderr);
  21094. + }
  21095. +}
  21096. +
  21097. +static void
  21098. +synopsis(FILE *fp)
  21099. +{
  21100. + fprintf(fp,
  21101. + "usage: unifdef [-bBcdehKkmnsStV] [-x{012}] [-Mext] [-opath] \\\n"
  21102. + " [-[i]Dsym[=val]] [-[i]Usym] [-fpath] ... [file] ...\n");
  21103. }
  21104. static void
  21105. usage(void)
  21106. {
  21107. - fprintf(stderr, "usage: unifdef [-cdeklnst] [-Ipath]"
  21108. - " [-Dsym[=val]] [-Usym] [-iDsym[=val]] [-iUsym] ... [file]\n");
  21109. + synopsis(stderr);
  21110. exit(2);
  21111. }
  21112. +static void
  21113. +help(void)
  21114. +{
  21115. + synopsis(stdout);
  21116. + printf(
  21117. + " -Dsym=val define preprocessor symbol with given value\n"
  21118. + " -Dsym define preprocessor symbol with value 1\n"
  21119. + " -Usym preprocessor symbol is undefined\n"
  21120. + " -iDsym=val \\ ignore C strings and comments\n"
  21121. + " -iDsym ) in sections controlled by these\n"
  21122. + " -iUsym / preprocessor symbols\n"
  21123. + " -fpath file containing #define and #undef directives\n"
  21124. + " -b blank lines instead of deleting them\n"
  21125. + " -B compress blank lines around deleted section\n"
  21126. + " -c complement (invert) keep vs. delete\n"
  21127. + " -d debugging mode\n"
  21128. + " -e ignore multiline preprocessor directives\n"
  21129. + " -h print help\n"
  21130. + " -Ipath extra include file path (ignored)\n"
  21131. + " -K disable && and || short-circuiting\n"
  21132. + " -k process constant #if expressions\n"
  21133. + " -Mext modify in place and keep backups\n"
  21134. + " -m modify input files in place\n"
  21135. + " -n add #line directives to output\n"
  21136. + " -opath output file name\n"
  21137. + " -S list #if control symbols with nesting\n"
  21138. + " -s list #if control symbols\n"
  21139. + " -t ignore C strings and comments\n"
  21140. + " -V print version\n"
  21141. + " -x{012} exit status mode\n"
  21142. + );
  21143. + exit(0);
  21144. +}
  21145. +
  21146. /*
  21147. * A state transition function alters the global #if processing state
  21148. * in a particular way. The table below is indexed by the current
  21149. @@ -327,7 +516,8 @@
  21150. * When we have processed a group that starts off with a known-false
  21151. * #if/#elif sequence (which has therefore been deleted) followed by a
  21152. * #elif that we don't understand and therefore must keep, we edit the
  21153. - * latter into a #if to keep the nesting correct.
  21154. + * latter into a #if to keep the nesting correct. We use memcpy() to
  21155. + * overwrite the 4 byte token "elif" with "if " without a '\0' byte.
  21156. *
  21157. * When we find a true #elif in a group, the following block will
  21158. * always be kept and the rest of the sequence after the next #elif or
  21159. @@ -380,75 +570,66 @@
  21160. static void Idrop (void) { Fdrop(); ignoreon(); }
  21161. static void Itrue (void) { Ftrue(); ignoreon(); }
  21162. static void Ifalse(void) { Ffalse(); ignoreon(); }
  21163. -/* edit this line */
  21164. -static void Mpass (void) { strncpy(keyword, "if ", 4); Pelif(); }
  21165. -static void Mtrue (void) { keywordedit("else\n"); state(IS_TRUE_MIDDLE); }
  21166. -static void Melif (void) { keywordedit("endif\n"); state(IS_FALSE_TRAILER); }
  21167. -static void Melse (void) { keywordedit("endif\n"); state(IS_FALSE_ELSE); }
  21168. +/* modify this line */
  21169. +static void Mpass (void) { memcpy(keyword, "if ", 4); Pelif(); }
  21170. +static void Mtrue (void) { keywordedit("else"); state(IS_TRUE_MIDDLE); }
  21171. +static void Melif (void) { keywordedit("endif"); state(IS_FALSE_TRAILER); }
  21172. +static void Melse (void) { keywordedit("endif"); state(IS_FALSE_ELSE); }
  21173. static state_fn * const trans_table[IS_COUNT][LT_COUNT] = {
  21174. /* IS_OUTSIDE */
  21175. { Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Eendif,
  21176. Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Eendif,
  21177. - print, done },
  21178. + print, done, abort },
  21179. /* IS_FALSE_PREFIX */
  21180. { Idrop, Idrop, Fdrop, Fdrop, Fdrop, Mpass, Strue, Sfalse,Selse, Dendif,
  21181. Idrop, Idrop, Fdrop, Fdrop, Fdrop, Mpass, Eioccc,Eioccc,Eioccc,Eioccc,
  21182. - drop, Eeof },
  21183. + drop, Eeof, abort },
  21184. /* IS_TRUE_PREFIX */
  21185. { Itrue, Ifalse,Fpass, Ftrue, Ffalse,Dfalse,Dfalse,Dfalse,Delse, Dendif,
  21186. Oiffy, Oiffy, Fpass, Oif, Oif, Eioccc,Eioccc,Eioccc,Eioccc,Eioccc,
  21187. - print, Eeof },
  21188. + print, Eeof, abort },
  21189. /* IS_PASS_MIDDLE */
  21190. { Itrue, Ifalse,Fpass, Ftrue, Ffalse,Pelif, Mtrue, Delif, Pelse, Pendif,
  21191. Oiffy, Oiffy, Fpass, Oif, Oif, Pelif, Oelif, Oelif, Pelse, Pendif,
  21192. - print, Eeof },
  21193. + print, Eeof, abort },
  21194. /* IS_FALSE_MIDDLE */
  21195. { Idrop, Idrop, Fdrop, Fdrop, Fdrop, Pelif, Mtrue, Delif, Pelse, Pendif,
  21196. Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eioccc,Eioccc,Eioccc,Eioccc,Eioccc,
  21197. - drop, Eeof },
  21198. + drop, Eeof, abort },
  21199. /* IS_TRUE_MIDDLE */
  21200. { Itrue, Ifalse,Fpass, Ftrue, Ffalse,Melif, Melif, Melif, Melse, Pendif,
  21201. Oiffy, Oiffy, Fpass, Oif, Oif, Eioccc,Eioccc,Eioccc,Eioccc,Pendif,
  21202. - print, Eeof },
  21203. + print, Eeof, abort },
  21204. /* IS_PASS_ELSE */
  21205. { Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Pendif,
  21206. Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Pendif,
  21207. - print, Eeof },
  21208. + print, Eeof, abort },
  21209. /* IS_FALSE_ELSE */
  21210. { Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eelif, Eelif, Eelif, Eelse, Dendif,
  21211. Idrop, Idrop, Fdrop, Fdrop, Fdrop, Eelif, Eelif, Eelif, Eelse, Eioccc,
  21212. - drop, Eeof },
  21213. + drop, Eeof, abort },
  21214. /* IS_TRUE_ELSE */
  21215. { Itrue, Ifalse,Fpass, Ftrue, Ffalse,Eelif, Eelif, Eelif, Eelse, Dendif,
  21216. Oiffy, Oiffy, Fpass, Oif, Oif, Eelif, Eelif, Eelif, Eelse, Eioccc,
  21217. - print, Eeof },
  21218. + print, Eeof, abort },
  21219. /* IS_FALSE_TRAILER */
  21220. { Idrop, Idrop, Fdrop, Fdrop, Fdrop, Dfalse,Dfalse,Dfalse,Delse, Dendif,
  21221. Idrop, Idrop, Fdrop, Fdrop, Fdrop, Dfalse,Dfalse,Dfalse,Delse, Eioccc,
  21222. - drop, Eeof }
  21223. + drop, Eeof, abort }
  21224. /*TRUEI FALSEI IF TRUE FALSE ELIF ELTRUE ELFALSE ELSE ENDIF
  21225. TRUEI FALSEI IF TRUE FALSE ELIF ELTRUE ELFALSE ELSE ENDIF (DODGY)
  21226. - PLAIN EOF */
  21227. + PLAIN EOF ERROR */
  21228. };
  21229. /*
  21230. * State machine utility functions
  21231. */
  21232. static void
  21233. -done(void)
  21234. -{
  21235. - if (incomment)
  21236. - error("EOF in comment");
  21237. - exit(exitstat);
  21238. -}
  21239. -static void
  21240. ignoreoff(void)
  21241. {
  21242. - if (depth == 0) {
  21243. - debug("bug at line %d", __LINE__);
  21244. + if (depth == 0)
  21245. abort(); /* bug */
  21246. - }
  21247. ignoring[depth] = ignoring[depth-1];
  21248. }
  21249. static void
  21250. @@ -459,31 +640,26 @@
  21251. static void
  21252. keywordedit(const char *replacement)
  21253. {
  21254. - size_t size = tline + sizeof(tline) - keyword;
  21255. - char *dst = keyword;
  21256. - const char *src = replacement;
  21257. - if (size != 0) {
  21258. - while ((--size != 0) && (*src != '\0'))
  21259. - *dst++ = *src++;
  21260. - *dst = '\0';
  21261. - }
  21262. + snprintf(keyword, tline + sizeof(tline) - keyword,
  21263. + "%s%s", replacement, newline);
  21264. + altered = true;
  21265. print();
  21266. }
  21267. static void
  21268. nest(void)
  21269. {
  21270. - depth += 1;
  21271. - if (depth >= MAXDEPTH)
  21272. + if (depth > MAXDEPTH-1)
  21273. + abort(); /* bug */
  21274. + if (depth == MAXDEPTH-1)
  21275. error("Too many levels of nesting");
  21276. + depth += 1;
  21277. stifline[depth] = linenum;
  21278. }
  21279. static void
  21280. unnest(void)
  21281. {
  21282. - if (depth == 0) {
  21283. - debug("bug at line %d", __LINE__);
  21284. + if (depth == 0)
  21285. abort(); /* bug */
  21286. - }
  21287. depth -= 1;
  21288. }
  21289. static void
  21290. @@ -493,7 +669,20 @@
  21291. }
  21292. /*
  21293. + * The last state transition function. When this is called,
  21294. + * lineval == LT_EOF, so the process() loop will terminate.
  21295. + */
  21296. +static void
  21297. +done(void)
  21298. +{
  21299. + if (incomment)
  21300. + error("EOF in comment");
  21301. + closeio();
  21302. +}
  21303. +
  21304. +/*
  21305. * Write a line to the output or not, according to command line options.
  21306. + * If writing fails, closeio() will print the error and exit.
  21307. */
  21308. static void
  21309. flushline(bool keep)
  21310. @@ -501,16 +690,58 @@
  21311. if (symlist)
  21312. return;
  21313. if (keep ^ complement) {
  21314. - if (lnnum && delcount > 0)
  21315. - printf("#line %d\n", linenum);
  21316. - fputs(tline, stdout);
  21317. - delcount = 0;
  21318. + bool blankline = tline[strspn(tline, " \t\r\n")] == '\0';
  21319. + if (blankline && compblank && blankcount != blankmax) {
  21320. + delcount += 1;
  21321. + blankcount += 1;
  21322. + } else {
  21323. + if (lnnum && delcount > 0)
  21324. + hashline();
  21325. + if (fputs(tline, output) == EOF)
  21326. + closeio();
  21327. + delcount = 0;
  21328. + blankmax = blankcount = blankline ? blankcount + 1 : 0;
  21329. + }
  21330. } else {
  21331. - if (lnblank)
  21332. - putc('\n', stdout);
  21333. - exitstat = 1;
  21334. + if (lnblank && fputs(newline, output) == EOF)
  21335. + closeio();
  21336. + altered = true;
  21337. delcount += 1;
  21338. + blankcount = 0;
  21339. }
  21340. + if (debugging && fflush(output) == EOF)
  21341. + closeio();
  21342. +}
  21343. +
  21344. +/*
  21345. + * Format of #line directives depends on whether we know the input filename.
  21346. + */
  21347. +static void
  21348. +hashline(void)
  21349. +{
  21350. + int e;
  21351. +
  21352. + if (linefile == NULL)
  21353. + e = fprintf(output, "#line %d%s", linenum, newline);
  21354. + else
  21355. + e = fprintf(output, "#line %d \"%s\"%s",
  21356. + linenum, linefile, newline);
  21357. + if (e < 0)
  21358. + closeio();
  21359. +}
  21360. +
  21361. +/*
  21362. + * Flush the output and handle errors.
  21363. + */
  21364. +static void
  21365. +closeio(void)
  21366. +{
  21367. + /* Tidy up after findsym(). */
  21368. + if (symdepth && !zerosyms)
  21369. + printf("\n");
  21370. + if (output != NULL && (ferror(output) || fclose(output) == EOF))
  21371. + err(2, "%s: can't write to output", filename);
  21372. + fclose(input);
  21373. }
  21374. /*
  21375. @@ -519,16 +750,22 @@
  21376. static void
  21377. process(void)
  21378. {
  21379. - Linetype lineval;
  21380. -
  21381. - for (;;) {
  21382. - linenum++;
  21383. - lineval = get_line();
  21384. + Linetype lineval = LT_PLAIN;
  21385. + /* When compressing blank lines, act as if the file
  21386. + is preceded by a large number of blank lines. */
  21387. + blankmax = blankcount = 1000;
  21388. + zerosyms = true;
  21389. + newline = NULL;
  21390. + linenum = 0;
  21391. + altered = false;
  21392. + while (lineval != LT_EOF) {
  21393. + lineval = parseline();
  21394. trans_table[ifstate[depth]][lineval]();
  21395. - debug("process %s -> %s depth %d",
  21396. - linetype_name[lineval],
  21397. + debug("process line %d %s -> %s depth %d",
  21398. + linenum, linetype_name[lineval],
  21399. ifstate_name[ifstate[depth]], depth);
  21400. }
  21401. + exitstat |= altered;
  21402. }
  21403. /*
  21404. @@ -537,104 +774,131 @@
  21405. * help from skipcomment().
  21406. */
  21407. static Linetype
  21408. -get_line(void)
  21409. +parseline(void)
  21410. {
  21411. const char *cp;
  21412. int cursym;
  21413. - int kwlen;
  21414. Linetype retval;
  21415. Comment_state wascomment;
  21416. - if (fgets(tline, MAXLINE, input) == NULL)
  21417. - return (LT_EOF);
  21418. - retval = LT_PLAIN;
  21419. wascomment = incomment;
  21420. - cp = skipcomment(tline);
  21421. - if (linestate == LS_START) {
  21422. - if (*cp == '#') {
  21423. - linestate = LS_HASH;
  21424. - cp = skipcomment(cp + 1);
  21425. - } else if (*cp != '\0')
  21426. - linestate = LS_DIRTY;
  21427. + cp = skiphash();
  21428. + if (cp == NULL)
  21429. + return (LT_EOF);
  21430. + if (newline == NULL) {
  21431. + if (strrchr(tline, '\n') == strrchr(tline, '\r') + 1)
  21432. + newline = newline_crlf;
  21433. + else
  21434. + newline = newline_unix;
  21435. }
  21436. - if (!incomment && linestate == LS_HASH) {
  21437. - keyword = tline + (cp - tline);
  21438. - cp = skipsym(cp);
  21439. - kwlen = cp - keyword;
  21440. - /* no way can we deal with a continuation inside a keyword */
  21441. - if (strncmp(cp, "\\\n", 2) == 0)
  21442. - Eioccc();
  21443. - if (strlcmp("ifdef", keyword, kwlen) == 0 ||
  21444. - strlcmp("ifndef", keyword, kwlen) == 0) {
  21445. - cp = skipcomment(cp);
  21446. - if ((cursym = findsym(cp)) < 0)
  21447. - retval = LT_IF;
  21448. - else {
  21449. - retval = (keyword[2] == 'n')
  21450. - ? LT_FALSE : LT_TRUE;
  21451. - if (value[cursym] == NULL)
  21452. - retval = (retval == LT_TRUE)
  21453. - ? LT_FALSE : LT_TRUE;
  21454. - if (ignore[cursym])
  21455. - retval = (retval == LT_TRUE)
  21456. - ? LT_TRUEI : LT_FALSEI;
  21457. - }
  21458. - cp = skipsym(cp);
  21459. - } else if (strlcmp("if", keyword, kwlen) == 0)
  21460. - retval = ifeval(&cp);
  21461. - else if (strlcmp("elif", keyword, kwlen) == 0)
  21462. - retval = ifeval(&cp) - LT_IF + LT_ELIF;
  21463. - else if (strlcmp("else", keyword, kwlen) == 0)
  21464. - retval = LT_ELSE;
  21465. - else if (strlcmp("endif", keyword, kwlen) == 0)
  21466. - retval = LT_ENDIF;
  21467. + if (*cp == '\0') {
  21468. + retval = LT_PLAIN;
  21469. + goto done;
  21470. + }
  21471. + keyword = tline + (cp - tline);
  21472. + if ((cp = matchsym("ifdef", keyword)) != NULL ||
  21473. + (cp = matchsym("ifndef", keyword)) != NULL) {
  21474. + cp = skipcomment(cp);
  21475. + if ((cursym = findsym(&cp)) < 0)
  21476. + retval = LT_IF;
  21477. else {
  21478. - linestate = LS_DIRTY;
  21479. - retval = LT_PLAIN;
  21480. + retval = (keyword[2] == 'n')
  21481. + ? LT_FALSE : LT_TRUE;
  21482. + if (value[cursym] == NULL)
  21483. + retval = (retval == LT_TRUE)
  21484. + ? LT_FALSE : LT_TRUE;
  21485. + if (ignore[cursym])
  21486. + retval = (retval == LT_TRUE)
  21487. + ? LT_TRUEI : LT_FALSEI;
  21488. }
  21489. - cp = skipcomment(cp);
  21490. - if (*cp != '\0') {
  21491. + } else if ((cp = matchsym("if", keyword)) != NULL)
  21492. + retval = ifeval(&cp);
  21493. + else if ((cp = matchsym("elif", keyword)) != NULL)
  21494. + retval = linetype_if2elif(ifeval(&cp));
  21495. + else if ((cp = matchsym("else", keyword)) != NULL)
  21496. + retval = LT_ELSE;
  21497. + else if ((cp = matchsym("endif", keyword)) != NULL)
  21498. + retval = LT_ENDIF;
  21499. + else {
  21500. + cp = skipsym(keyword);
  21501. + /* no way can we deal with a continuation inside a keyword */
  21502. + if (strncmp(cp, "\\\r\n", 3) == 0 ||
  21503. + strncmp(cp, "\\\n", 2) == 0)
  21504. + Eioccc();
  21505. + cp = skipline(cp);
  21506. + retval = LT_PLAIN;
  21507. + goto done;
  21508. + }
  21509. + cp = skipcomment(cp);
  21510. + if (*cp != '\0') {
  21511. + cp = skipline(cp);
  21512. + if (retval == LT_TRUE || retval == LT_FALSE ||
  21513. + retval == LT_TRUEI || retval == LT_FALSEI)
  21514. + retval = LT_IF;
  21515. + if (retval == LT_ELTRUE || retval == LT_ELFALSE)
  21516. + retval = LT_ELIF;
  21517. + }
  21518. + /* the following can happen if the last line of the file lacks a
  21519. + newline or if there is too much whitespace in a directive */
  21520. + if (linestate == LS_HASH) {
  21521. + long len = cp - tline;
  21522. + if (fgets(tline + len, MAXLINE - len, input) == NULL) {
  21523. + if (ferror(input))
  21524. + err(2, "can't read %s", filename);
  21525. + /* append the missing newline at eof */
  21526. + strcpy(tline + len, newline);
  21527. + cp += strlen(newline);
  21528. + linestate = LS_START;
  21529. + } else {
  21530. linestate = LS_DIRTY;
  21531. - if (retval == LT_TRUE || retval == LT_FALSE ||
  21532. - retval == LT_TRUEI || retval == LT_FALSEI)
  21533. - retval = LT_IF;
  21534. - if (retval == LT_ELTRUE || retval == LT_ELFALSE)
  21535. - retval = LT_ELIF;
  21536. - }
  21537. - if (retval != LT_PLAIN && (wascomment || incomment)) {
  21538. - retval += LT_DODGY;
  21539. - if (incomment)
  21540. - linestate = LS_DIRTY;
  21541. }
  21542. - /* skipcomment should have changed the state */
  21543. -// Hmm hppens sometimes on valid files
  21544. -// if (linestate == LS_HASH) {
  21545. -// debug("bug at line %d", __LINE__);
  21546. -// abort(); /* bug */
  21547. -// }
  21548. - }
  21549. - if (linestate == LS_DIRTY) {
  21550. - while (*cp != '\0')
  21551. - cp = skipcomment(cp + 1);
  21552. }
  21553. - debug("parser %s comment %s line",
  21554. + if (retval != LT_PLAIN && (wascomment || linestate != LS_START)) {
  21555. + retval = linetype_2dodgy(retval);
  21556. + linestate = LS_DIRTY;
  21557. + }
  21558. +done:
  21559. + debug("parser line %d state %s comment %s line", linenum,
  21560. comment_name[incomment], linestate_name[linestate]);
  21561. return (retval);
  21562. }
  21563. /*
  21564. * These are the binary operators that are supported by the expression
  21565. - * evaluator. Note that if support for division is added then we also
  21566. - * need short-circuiting booleans because of divide-by-zero.
  21567. + * evaluator.
  21568. */
  21569. -static int op_lt(int a, int b) { return (a < b); }
  21570. -static int op_gt(int a, int b) { return (a > b); }
  21571. -static int op_le(int a, int b) { return (a <= b); }
  21572. -static int op_ge(int a, int b) { return (a >= b); }
  21573. -static int op_eq(int a, int b) { return (a == b); }
  21574. -static int op_ne(int a, int b) { return (a != b); }
  21575. -static int op_or(int a, int b) { return (a || b); }
  21576. -static int op_and(int a, int b) { return (a && b); }
  21577. +static Linetype op_strict(long *p, long v, Linetype at, Linetype bt) {
  21578. + if(at == LT_IF || bt == LT_IF) return (LT_IF);
  21579. + return (*p = v, v ? LT_TRUE : LT_FALSE);
  21580. +}
  21581. +static Linetype op_lt(long *p, Linetype at, long a, Linetype bt, long b) {
  21582. + return op_strict(p, a < b, at, bt);
  21583. +}
  21584. +static Linetype op_gt(long *p, Linetype at, long a, Linetype bt, long b) {
  21585. + return op_strict(p, a > b, at, bt);
  21586. +}
  21587. +static Linetype op_le(long *p, Linetype at, long a, Linetype bt, long b) {
  21588. + return op_strict(p, a <= b, at, bt);
  21589. +}
  21590. +static Linetype op_ge(long *p, Linetype at, long a, Linetype bt, long b) {
  21591. + return op_strict(p, a >= b, at, bt);
  21592. +}
  21593. +static Linetype op_eq(long *p, Linetype at, long a, Linetype bt, long b) {
  21594. + return op_strict(p, a == b, at, bt);
  21595. +}
  21596. +static Linetype op_ne(long *p, Linetype at, long a, Linetype bt, long b) {
  21597. + return op_strict(p, a != b, at, bt);
  21598. +}
  21599. +static Linetype op_or(long *p, Linetype at, long a, Linetype bt, long b) {
  21600. + if (!strictlogic && (at == LT_TRUE || bt == LT_TRUE))
  21601. + return (*p = 1, LT_TRUE);
  21602. + return op_strict(p, a || b, at, bt);
  21603. +}
  21604. +static Linetype op_and(long *p, Linetype at, long a, Linetype bt, long b) {
  21605. + if (!strictlogic && (at == LT_FALSE || bt == LT_FALSE))
  21606. + return (*p = 0, LT_FALSE);
  21607. + return op_strict(p, a && b, at, bt);
  21608. +}
  21609. /*
  21610. * An evaluation function takes three arguments, as follows: (1) a pointer to
  21611. @@ -643,12 +907,12 @@
  21612. * value of the expression; and (3) a pointer to a char* that points to the
  21613. * expression to be evaluated and that is updated to the end of the expression
  21614. * when evaluation is complete. The function returns LT_FALSE if the value of
  21615. - * the expression is zero, LT_TRUE if it is non-zero, or LT_IF if the
  21616. - * expression could not be evaluated.
  21617. + * the expression is zero, LT_TRUE if it is non-zero, LT_IF if the expression
  21618. + * depends on an unknown symbol, or LT_ERROR if there is a parse failure.
  21619. */
  21620. struct ops;
  21621. -typedef Linetype eval_fn(const struct ops *, int *, const char **);
  21622. +typedef Linetype eval_fn(const struct ops *, long *, const char **);
  21623. static eval_fn eval_table, eval_unary;
  21624. @@ -659,139 +923,139 @@
  21625. * element of the table. Innermost expressions have special non-table-driven
  21626. * handling.
  21627. */
  21628. -static const struct ops {
  21629. +struct op {
  21630. + const char *str;
  21631. + Linetype (*fn)(long *, Linetype, long, Linetype, long);
  21632. +};
  21633. +struct ops {
  21634. eval_fn *inner;
  21635. - struct op {
  21636. - const char *str;
  21637. - int short_circuit_val;
  21638. - int (*fn)(int, int);
  21639. - } op[5];
  21640. -} eval_ops[] = {
  21641. - { eval_table, { { "||", 1, op_or } } },
  21642. - { eval_table, { { "&&", 0, op_and } } },
  21643. - { eval_table, { { "==", -1, op_eq },
  21644. - { "!=", -1, op_ne } } },
  21645. - { eval_unary, { { "<=", -1, op_le },
  21646. - { ">=", -1, op_ge },
  21647. - { "<", -1, op_lt },
  21648. - { ">", -1, op_gt } } }
  21649. + struct op op[5];
  21650. +};
  21651. +static const struct ops eval_ops[] = {
  21652. + { eval_table, { { "||", op_or } } },
  21653. + { eval_table, { { "&&", op_and } } },
  21654. + { eval_table, { { "==", op_eq },
  21655. + { "!=", op_ne } } },
  21656. + { eval_unary, { { "<=", op_le },
  21657. + { ">=", op_ge },
  21658. + { "<", op_lt },
  21659. + { ">", op_gt } } }
  21660. };
  21661. +/* Current operator precedence level */
  21662. +static long prec(const struct ops *ops)
  21663. +{
  21664. + return (ops - eval_ops);
  21665. +}
  21666. +
  21667. /*
  21668. - * Function for evaluating the innermost parts of expressions, viz.
  21669. - * "!expr", "(expr)", "defined(symbol)", "defined symbol", "symbol", "number".
  21670. - * We reset the keepthis flag when we find a non-constant subexpression.
  21671. - */
  21672. -// TODO: we use LT_IF both as "I don't know whether it's false or true"
  21673. -// (example: "#if defined FOO") and when we see syntax error
  21674. -// (example: "#if (1 || 2" - no closing paren!), but this is wrong.
  21675. -// Binary && and || need to distinguish these cases in order to handle this:
  21676. -// "#if defined KNOWN_UNDEFINED && FOO" - discard
  21677. -// "#if defined KNOWN_UNDEFINED && (syntax_error_here" - do not discard!
  21678. + * Function for evaluating the innermost parts of expressions,
  21679. + * viz. !expr (expr) number defined(symbol) symbol
  21680. + * We reset the constexpr flag in the last two cases.
  21681. + */
  21682. static Linetype
  21683. -eval_unary(const struct ops *ops, int *valp, const char **cpp)
  21684. +eval_unary(const struct ops *ops, long *valp, const char **cpp)
  21685. {
  21686. const char *cp;
  21687. char *ep;
  21688. int sym;
  21689. + bool defparen;
  21690. + Linetype lt;
  21691. cp = skipcomment(*cpp);
  21692. if (*cp == '!') {
  21693. - debug("eval%d !", ops - eval_ops);
  21694. + debug("eval%d !", prec(ops));
  21695. cp++;
  21696. - if (eval_unary(ops, valp, &cp) == LT_IF) {
  21697. - *cpp = cp;
  21698. - return (LT_IF);
  21699. + lt = eval_unary(ops, valp, &cp);
  21700. + if (lt == LT_ERROR)
  21701. + return (LT_ERROR);
  21702. + if (lt != LT_IF) {
  21703. + *valp = !*valp;
  21704. + lt = *valp ? LT_TRUE : LT_FALSE;
  21705. }
  21706. - *valp = !*valp;
  21707. -
  21708. } else if (*cp == '(') {
  21709. - Linetype expr_res;
  21710. -
  21711. cp++;
  21712. - debug("eval%d (%s", ops - eval_ops, cp);
  21713. - expr_res = eval_table(eval_ops, valp, &cp);
  21714. + debug("eval%d (", prec(ops));
  21715. + lt = eval_table(eval_ops, valp, &cp);
  21716. + if (lt == LT_ERROR)
  21717. + return (LT_ERROR);
  21718. cp = skipcomment(cp);
  21719. - *cpp = cp;
  21720. if (*cp++ != ')')
  21721. - return (LT_IF);
  21722. - *cpp = cp;
  21723. - if (expr_res == LT_IF)
  21724. - return (LT_IF);
  21725. -
  21726. + return (LT_ERROR);
  21727. } else if (isdigit((unsigned char)*cp)) {
  21728. - debug("eval%d number", ops - eval_ops);
  21729. + debug("eval%d number", prec(ops));
  21730. *valp = strtol(cp, &ep, 0);
  21731. - cp = skipsym(cp);
  21732. -
  21733. - } else if (strncmp(cp, "defined", 7) == 0 && endsym(cp[7])) {
  21734. - bool parens;
  21735. -
  21736. + if (ep == cp)
  21737. + return (LT_ERROR);
  21738. + lt = *valp ? LT_TRUE : LT_FALSE;
  21739. + cp = ep;
  21740. + } else if (matchsym("defined", cp) != NULL) {
  21741. cp = skipcomment(cp+7);
  21742. - debug("eval%d defined '%s'", ops - eval_ops, cp);
  21743. - parens = (*cp == '(');
  21744. - if (parens)
  21745. + if (*cp == '(') {
  21746. cp = skipcomment(cp+1);
  21747. - sym = findsym(cp);
  21748. - cp = skipsym(cp);
  21749. + defparen = true;
  21750. + } else {
  21751. + defparen = false;
  21752. + }
  21753. + sym = findsym(&cp);
  21754. cp = skipcomment(cp);
  21755. - if (parens) {
  21756. - if (*cp != ')')
  21757. - return (LT_IF);
  21758. - cp = skipcomment(cp+1);
  21759. + if (defparen && *cp++ != ')') {
  21760. + debug("eval%d defined missing ')'", prec(ops));
  21761. + return (LT_ERROR);
  21762. }
  21763. - *cpp = cp;
  21764. if (sym < 0) {
  21765. - debug("sym not found, returning LT_IF");
  21766. - return (LT_IF);
  21767. + debug("eval%d defined unknown", prec(ops));
  21768. + lt = LT_IF;
  21769. + } else {
  21770. + debug("eval%d defined %s", prec(ops), symname[sym]);
  21771. + *valp = (value[sym] != NULL);
  21772. + lt = *valp ? LT_TRUE : LT_FALSE;
  21773. }
  21774. - *valp = (value[sym] != NULL);
  21775. - keepthis = false;
  21776. -
  21777. + constexpr = false;
  21778. } else if (!endsym(*cp)) {
  21779. - debug("eval%d symbol", ops - eval_ops);
  21780. - sym = findsym(cp);
  21781. - cp = skipsym(cp);
  21782. - *cpp = cp;
  21783. - if (sym < 0)
  21784. - return (LT_IF);
  21785. - if (value[sym] == NULL)
  21786. + debug("eval%d symbol", prec(ops));
  21787. + sym = findsym(&cp);
  21788. + if (sym < 0) {
  21789. + lt = LT_IF;
  21790. + cp = skipargs(cp);
  21791. + } else if (value[sym] == NULL) {
  21792. *valp = 0;
  21793. - else {
  21794. + lt = LT_FALSE;
  21795. + } else {
  21796. *valp = strtol(value[sym], &ep, 0);
  21797. if (*ep != '\0' || ep == value[sym])
  21798. - return (LT_IF);
  21799. + return (LT_ERROR);
  21800. + lt = *valp ? LT_TRUE : LT_FALSE;
  21801. + cp = skipargs(cp);
  21802. }
  21803. - keepthis = false;
  21804. -
  21805. + constexpr = false;
  21806. } else {
  21807. - debug("eval%d bad expr", ops - eval_ops);
  21808. - return (LT_IF);
  21809. + debug("eval%d bad expr", prec(ops));
  21810. + return (LT_ERROR);
  21811. }
  21812. *cpp = cp;
  21813. - debug("eval%d = %d", ops - eval_ops, *valp);
  21814. - return (*valp ? LT_TRUE : LT_FALSE);
  21815. + debug("eval%d = %d", prec(ops), *valp);
  21816. + return (lt);
  21817. }
  21818. /*
  21819. * Table-driven evaluation of binary operators.
  21820. */
  21821. static Linetype
  21822. -eval_table(const struct ops *ops, int *valp, const char **cpp)
  21823. +eval_table(const struct ops *ops, long *valp, const char **cpp)
  21824. {
  21825. - Linetype left_side;
  21826. const struct op *op;
  21827. const char *cp;
  21828. - int val;
  21829. + long val;
  21830. + Linetype lt, rt;
  21831. - debug("eval%d '%s'", ops - eval_ops, *cpp);
  21832. - left_side = ops->inner(ops+1, valp, cpp);
  21833. + debug("eval%d", prec(ops));
  21834. cp = *cpp;
  21835. -
  21836. + lt = ops->inner(ops+1, valp, &cp);
  21837. + if (lt == LT_ERROR)
  21838. + return (LT_ERROR);
  21839. for (;;) {
  21840. - Linetype right_side;
  21841. -
  21842. cp = skipcomment(cp);
  21843. for (op = ops->op; op->str != NULL; op++)
  21844. if (strncmp(cp, op->str, strlen(op->str)) == 0)
  21845. @@ -799,38 +1063,17 @@
  21846. if (op->str == NULL)
  21847. break;
  21848. cp += strlen(op->str);
  21849. - debug("eval%d '%s'", ops - eval_ops, op->str);
  21850. - right_side = ops->inner(ops+1, &val, &cp);
  21851. - *cpp = cp;
  21852. -
  21853. - /* If short_circuit_val is 0 or 1, we can ignore
  21854. - * right side if left size is known, and its value
  21855. - * (i.e., *valp) is 0 or !0, respectively */
  21856. - if (left_side != LT_IF && op->short_circuit_val == !!*valp) {
  21857. - debug("op->short_circuit_val:%d *valp:%d cp:'%s'",
  21858. - op->short_circuit_val, *valp, cp);
  21859. - *valp = !!*valp;
  21860. - break;
  21861. - }
  21862. - /* Same for the right side */
  21863. - if (right_side != LT_IF && op->short_circuit_val == !!val) {
  21864. - debug("op->short_circuit_val:%d val:%d cp:'%s'",
  21865. - op->short_circuit_val, val, cp);
  21866. - left_side = right_side;
  21867. - *valp = !!val;
  21868. - break;
  21869. - }
  21870. -
  21871. - if (left_side == LT_IF || right_side == LT_IF)
  21872. - return (LT_IF);
  21873. - *valp = op->fn(*valp, val);
  21874. - left_side = right_side;
  21875. + debug("eval%d %s", prec(ops), op->str);
  21876. + rt = ops->inner(ops+1, &val, &cp);
  21877. + if (rt == LT_ERROR)
  21878. + return (LT_ERROR);
  21879. + lt = op->fn(valp, lt, *valp, rt, val);
  21880. }
  21881. - debug("eval%d = %d LT_IF:%d", ops - eval_ops, *valp, (left_side == LT_IF));
  21882. - if (left_side == LT_IF)
  21883. - return (LT_IF);
  21884. - return (*valp ? LT_TRUE : LT_FALSE);
  21885. + *cpp = cp;
  21886. + debug("eval%d = %d", prec(ops), *valp);
  21887. + debug("eval%d lt = %s", prec(ops), linetype_name[lt]);
  21888. + return (lt);
  21889. }
  21890. /*
  21891. @@ -841,14 +1084,57 @@
  21892. static Linetype
  21893. ifeval(const char **cpp)
  21894. {
  21895. - int ret;
  21896. - int val;
  21897. + Linetype ret;
  21898. + long val = 0;
  21899. debug("eval %s", *cpp);
  21900. - keepthis = killconsts ? false : true;
  21901. + constexpr = killconsts ? false : true;
  21902. ret = eval_table(eval_ops, &val, cpp);
  21903. - debug("val:%d ret:%d keepthis:%d", val, ret, keepthis);
  21904. - return (keepthis ? LT_IF : ret);
  21905. + debug("eval = %d", val);
  21906. + return (constexpr ? LT_IF : ret == LT_ERROR ? LT_IF : ret);
  21907. +}
  21908. +
  21909. +/*
  21910. + * Read a line and examine its initial part to determine if it is a
  21911. + * preprocessor directive. Returns NULL on EOF, or a pointer to a
  21912. + * preprocessor directive name, or a pointer to the zero byte at the
  21913. + * end of the line.
  21914. + */
  21915. +static const char *
  21916. +skiphash(void)
  21917. +{
  21918. + const char *cp;
  21919. +
  21920. + linenum++;
  21921. + if (fgets(tline, MAXLINE, input) == NULL) {
  21922. + if (ferror(input))
  21923. + err(2, "can't read %s", filename);
  21924. + else
  21925. + return (NULL);
  21926. + }
  21927. + cp = skipcomment(tline);
  21928. + if (linestate == LS_START && *cp == '#') {
  21929. + linestate = LS_HASH;
  21930. + return (skipcomment(cp + 1));
  21931. + } else if (*cp == '\0') {
  21932. + return (cp);
  21933. + } else {
  21934. + return (skipline(cp));
  21935. + }
  21936. +}
  21937. +
  21938. +/*
  21939. + * Mark a line dirty and consume the rest of it, keeping track of the
  21940. + * lexical state.
  21941. + */
  21942. +static const char *
  21943. +skipline(const char *cp)
  21944. +{
  21945. + if (*cp != '\0')
  21946. + linestate = LS_DIRTY;
  21947. + while (*cp != '\0')
  21948. + cp = skipcomment(cp + 1);
  21949. + return (cp);
  21950. }
  21951. /*
  21952. @@ -869,11 +1155,16 @@
  21953. }
  21954. while (*cp != '\0')
  21955. /* don't reset to LS_START after a line continuation */
  21956. - if (strncmp(cp, "\\\n", 2) == 0)
  21957. + if (strncmp(cp, "\\\r\n", 3) == 0)
  21958. + cp += 3;
  21959. + else if (strncmp(cp, "\\\n", 2) == 0)
  21960. cp += 2;
  21961. else switch (incomment) {
  21962. case NO_COMMENT:
  21963. - if (strncmp(cp, "/\\\n", 3) == 0) {
  21964. + if (strncmp(cp, "/\\\r\n", 4) == 0) {
  21965. + incomment = STARTING_COMMENT;
  21966. + cp += 4;
  21967. + } else if (strncmp(cp, "/\\\n", 3) == 0) {
  21968. incomment = STARTING_COMMENT;
  21969. cp += 3;
  21970. } else if (strncmp(cp, "/*", 2) == 0) {
  21971. @@ -893,7 +1184,7 @@
  21972. } else if (strncmp(cp, "\n", 1) == 0) {
  21973. linestate = LS_START;
  21974. cp += 1;
  21975. - } else if (strchr(" \t", *cp) != NULL) {
  21976. + } else if (strchr(" \r\t", *cp) != NULL) {
  21977. cp += 1;
  21978. } else
  21979. return (cp);
  21980. @@ -925,7 +1216,10 @@
  21981. cp += 1;
  21982. continue;
  21983. case C_COMMENT:
  21984. - if (strncmp(cp, "*\\\n", 3) == 0) {
  21985. + if (strncmp(cp, "*\\\r\n", 4) == 0) {
  21986. + incomment = FINISHING_COMMENT;
  21987. + cp += 4;
  21988. + } else if (strncmp(cp, "*\\\n", 3) == 0) {
  21989. incomment = FINISHING_COMMENT;
  21990. cp += 3;
  21991. } else if (strncmp(cp, "*/", 2) == 0) {
  21992. @@ -954,13 +1248,37 @@
  21993. incomment = C_COMMENT;
  21994. continue;
  21995. default:
  21996. - debug("bug at line %d", __LINE__);
  21997. abort(); /* bug */
  21998. }
  21999. return (cp);
  22000. }
  22001. /*
  22002. + * Skip macro arguments.
  22003. + */
  22004. +static const char *
  22005. +skipargs(const char *cp)
  22006. +{
  22007. + const char *ocp = cp;
  22008. + int level = 0;
  22009. + cp = skipcomment(cp);
  22010. + if (*cp != '(')
  22011. + return (cp);
  22012. + do {
  22013. + if (*cp == '(')
  22014. + level++;
  22015. + if (*cp == ')')
  22016. + level--;
  22017. + cp = skipcomment(cp+1);
  22018. + } while (level != 0 && *cp != '\0');
  22019. + if (level == 0)
  22020. + return (cp);
  22021. + else
  22022. + /* Rewind and re-detect the syntax error later. */
  22023. + return (ocp);
  22024. +}
  22025. +
  22026. +/*
  22027. * Skip over an identifier.
  22028. */
  22029. static const char *
  22030. @@ -972,27 +1290,69 @@
  22031. }
  22032. /*
  22033. - * Look for the symbol in the symbol table. If is is found, we return
  22034. + * Skip whitespace and take a copy of any following identifier.
  22035. + */
  22036. +static const char *
  22037. +getsym(const char **cpp)
  22038. +{
  22039. + const char *cp = *cpp, *sym;
  22040. +
  22041. + cp = skipcomment(cp);
  22042. + cp = skipsym(sym = cp);
  22043. + if (cp == sym)
  22044. + return NULL;
  22045. + *cpp = cp;
  22046. + return (xstrdup(sym, cp));
  22047. +}
  22048. +
  22049. +/*
  22050. + * Check that s (a symbol) matches the start of t, and that the
  22051. + * following character in t is not a symbol character. Returns a
  22052. + * pointer to the following character in t if there is a match,
  22053. + * otherwise NULL.
  22054. + */
  22055. +static const char *
  22056. +matchsym(const char *s, const char *t)
  22057. +{
  22058. + while (*s != '\0' && *t != '\0')
  22059. + if (*s != *t)
  22060. + return (NULL);
  22061. + else
  22062. + ++s, ++t;
  22063. + if (*s == '\0' && endsym(*t))
  22064. + return(t);
  22065. + else
  22066. + return(NULL);
  22067. +}
  22068. +
  22069. +/*
  22070. + * Look for the symbol in the symbol table. If it is found, we return
  22071. * the symbol table index, else we return -1.
  22072. */
  22073. static int
  22074. -findsym(const char *str)
  22075. +findsym(const char **strp)
  22076. {
  22077. - const char *cp;
  22078. + const char *str;
  22079. int symind;
  22080. - cp = skipsym(str);
  22081. - if (cp == str)
  22082. - return (-1);
  22083. + str = *strp;
  22084. + *strp = skipsym(str);
  22085. if (symlist) {
  22086. - printf("%.*s\n", (int)(cp-str), str);
  22087. + if (*strp == str)
  22088. + return (-1);
  22089. + if (symdepth && firstsym)
  22090. + printf("%s%3d", zerosyms ? "" : "\n", depth);
  22091. + firstsym = zerosyms = false;
  22092. + printf("%s%.*s%s",
  22093. + symdepth ? " " : "",
  22094. + (int)(*strp-str), str,
  22095. + symdepth ? "" : "\n");
  22096. /* we don't care about the value of the symbol */
  22097. return (0);
  22098. }
  22099. for (symind = 0; symind < nsyms; ++symind) {
  22100. - if (strlcmp(symname[symind], str, cp-str) == 0) {
  22101. - debug("findsym %s %s", symname[symind],
  22102. - value[symind] ? value[symind] : "");
  22103. + if (matchsym(symname[symind], str) != NULL) {
  22104. + debugsym("findsym", symind);
  22105. return (symind);
  22106. }
  22107. }
  22108. @@ -1000,51 +1360,194 @@
  22109. }
  22110. /*
  22111. + * Resolve indirect symbol values to their final definitions.
  22112. + */
  22113. +static void
  22114. +indirectsym(void)
  22115. +{
  22116. + const char *cp;
  22117. + int changed, sym, ind;
  22118. +
  22119. + do {
  22120. + changed = 0;
  22121. + for (sym = 0; sym < nsyms; ++sym) {
  22122. + if (value[sym] == NULL)
  22123. + continue;
  22124. + cp = value[sym];
  22125. + ind = findsym(&cp);
  22126. + if (ind == -1 || ind == sym ||
  22127. + *cp != '\0' ||
  22128. + value[ind] == NULL ||
  22129. + value[ind] == value[sym])
  22130. + continue;
  22131. + debugsym("indir...", sym);
  22132. + value[sym] = value[ind];
  22133. + debugsym("...ectsym", sym);
  22134. + changed++;
  22135. + }
  22136. + } while (changed);
  22137. +}
  22138. +
  22139. +/*
  22140. + * Add a symbol to the symbol table, specified with the format sym=val
  22141. + */
  22142. +static void
  22143. +addsym1(bool ignorethis, bool definethis, char *symval)
  22144. +{
  22145. + const char *sym, *val;
  22146. +
  22147. + sym = symval;
  22148. + val = skipsym(sym);
  22149. + if (definethis && *val == '=') {
  22150. + symval[val - sym] = '\0';
  22151. + val = val + 1;
  22152. + } else if (*val == '\0') {
  22153. + val = definethis ? "1" : NULL;
  22154. + } else {
  22155. + usage();
  22156. + }
  22157. + addsym2(ignorethis, sym, val);
  22158. +}
  22159. +
  22160. +/*
  22161. * Add a symbol to the symbol table.
  22162. */
  22163. static void
  22164. -addsym(bool ignorethis, bool definethis, char *sym)
  22165. +addsym2(bool ignorethis, const char *sym, const char *val)
  22166. {
  22167. + const char *cp = sym;
  22168. int symind;
  22169. - char *val;
  22170. - symind = findsym(sym);
  22171. + symind = findsym(&cp);
  22172. if (symind < 0) {
  22173. if (nsyms >= MAXSYMS)
  22174. errx(2, "too many symbols");
  22175. symind = nsyms++;
  22176. }
  22177. - symname[symind] = sym;
  22178. ignore[symind] = ignorethis;
  22179. - val = sym + (skipsym(sym) - sym);
  22180. - if (definethis) {
  22181. - if (*val == '=') {
  22182. - value[symind] = val+1;
  22183. - *val = '\0';
  22184. - } else if (*val == '\0')
  22185. - value[symind] = "";
  22186. - else
  22187. - usage();
  22188. + symname[symind] = sym;
  22189. + value[symind] = val;
  22190. + debugsym("addsym", symind);
  22191. +}
  22192. +
  22193. +static void
  22194. +debugsym(const char *why, int symind)
  22195. +{
  22196. + debug("%s %s%c%s", why, symname[symind],
  22197. + value[symind] ? '=' : ' ',
  22198. + value[symind] ? value[symind] : "undef");
  22199. +}
  22200. +
  22201. +/*
  22202. + * Add symbols to the symbol table from a file containing
  22203. + * #define and #undef preprocessor directives.
  22204. + */
  22205. +static void
  22206. +defundefile(const char *fn)
  22207. +{
  22208. + filename = fn;
  22209. + input = fopen(fn, "rb");
  22210. + if (input == NULL)
  22211. + err(2, "can't open %s", fn);
  22212. + linenum = 0;
  22213. + while (defundef())
  22214. + ;
  22215. + if (ferror(input))
  22216. + err(2, "can't read %s", filename);
  22217. + else
  22218. + fclose(input);
  22219. + if (incomment)
  22220. + error("EOF in comment");
  22221. +}
  22222. +
  22223. +/*
  22224. + * Read and process one #define or #undef directive
  22225. + */
  22226. +static bool
  22227. +defundef(void)
  22228. +{
  22229. + const char *cp, *kw, *sym, *val, *end;
  22230. +
  22231. + cp = skiphash();
  22232. + if (cp == NULL)
  22233. + return (false);
  22234. + if (*cp == '\0')
  22235. + goto done;
  22236. + /* strip trailing whitespace, and do a fairly rough check to
  22237. + avoid unsupported multi-line preprocessor directives */
  22238. + end = cp + strlen(cp);
  22239. + while (end > tline && strchr(" \t\n\r", end[-1]) != NULL)
  22240. + --end;
  22241. + if (end > tline && end[-1] == '\\')
  22242. + Eioccc();
  22243. +
  22244. + kw = cp;
  22245. + if ((cp = matchsym("define", kw)) != NULL) {
  22246. + sym = getsym(&cp);
  22247. + if (sym == NULL)
  22248. + error("missing macro name in #define");
  22249. + if (*cp == '(') {
  22250. + val = "1";
  22251. + } else {
  22252. + cp = skipcomment(cp);
  22253. + val = (cp < end) ? xstrdup(cp, end) : "";
  22254. + }
  22255. + debug("#define");
  22256. + addsym2(false, sym, val);
  22257. + } else if ((cp = matchsym("undef", kw)) != NULL) {
  22258. + sym = getsym(&cp);
  22259. + if (sym == NULL)
  22260. + error("missing macro name in #undef");
  22261. + cp = skipcomment(cp);
  22262. + debug("#undef");
  22263. + addsym2(false, sym, NULL);
  22264. } else {
  22265. - if (*val != '\0')
  22266. - usage();
  22267. - value[symind] = NULL;
  22268. + error("unrecognized preprocessor directive");
  22269. }
  22270. + skipline(cp);
  22271. +done:
  22272. + debug("parser line %d state %s comment %s line", linenum,
  22273. + comment_name[incomment], linestate_name[linestate]);
  22274. + return (true);
  22275. }
  22276. /*
  22277. - * Compare s with n characters of t.
  22278. - * The same as strncmp() except that it checks that s[n] == '\0'.
  22279. + * Concatenate two strings into new memory, checking for failure.
  22280. */
  22281. -static int
  22282. -strlcmp(const char *s, const char *t, size_t n)
  22283. +static char *
  22284. +astrcat(const char *s1, const char *s2)
  22285. {
  22286. - while (n-- && *t != '\0')
  22287. - if (*s != *t)
  22288. - return ((unsigned char)*s - (unsigned char)*t);
  22289. - else
  22290. - ++s, ++t;
  22291. - return ((unsigned char)*s);
  22292. + char *s;
  22293. + int len;
  22294. + size_t size;
  22295. +
  22296. + len = snprintf(NULL, 0, "%s%s", s1, s2);
  22297. + if (len < 0)
  22298. + err(2, "snprintf");
  22299. + size = (size_t)len + 1;
  22300. + s = (char *)malloc(size);
  22301. + if (s == NULL)
  22302. + err(2, "malloc");
  22303. + snprintf(s, size, "%s%s", s1, s2);
  22304. + return (s);
  22305. +}
  22306. +
  22307. +/*
  22308. + * Duplicate a segment of a string, checking for failure.
  22309. + */
  22310. +static const char *
  22311. +xstrdup(const char *start, const char *end)
  22312. +{
  22313. + size_t n;
  22314. + char *s;
  22315. +
  22316. + if (end < start) abort(); /* bug */
  22317. + n = (size_t)(end - start) + 1;
  22318. + s = malloc(n);
  22319. + if (s == NULL)
  22320. + err(2, "malloc");
  22321. + snprintf(s, n, "%s", start);
  22322. + return (s);
  22323. }
  22324. /*
  22325. @@ -1070,5 +1573,6 @@
  22326. else
  22327. warnx("%s: %d: %s (#if line %d depth %d)",
  22328. filename, linenum, msg, stifline[depth], depth);
  22329. + closeio();
  22330. errx(2, "output may be truncated");
  22331. }
  22332. diff -Nur uClibc-0.9.33.2/extra/scripts/unifdef.h uClibc-git/extra/scripts/unifdef.h
  22333. --- uClibc-0.9.33.2/extra/scripts/unifdef.h 1970-01-01 01:00:00.000000000 +0100
  22334. +++ uClibc-git/extra/scripts/unifdef.h 2014-07-25 20:36:04.949324959 +0200
  22335. @@ -0,0 +1,57 @@
  22336. +/*
  22337. + * Copyright (c) 2012 - 2013 Tony Finch <dot@dotat.at>
  22338. + *
  22339. + * Redistribution and use in source and binary forms, with or without
  22340. + * modification, are permitted provided that the following conditions
  22341. + * are met:
  22342. + * 1. Redistributions of source code must retain the above copyright
  22343. + * notice, this list of conditions and the following disclaimer.
  22344. + * 2. Redistributions in binary form must reproduce the above copyright
  22345. + * notice, this list of conditions and the following disclaimer in the
  22346. + * documentation and/or other materials provided with the distribution.
  22347. + *
  22348. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  22349. + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  22350. + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  22351. + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  22352. + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22353. + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  22354. + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  22355. + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  22356. + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  22357. + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22358. + * SUCH DAMAGE.
  22359. + */
  22360. +
  22361. +#include <sys/stat.h>
  22362. +
  22363. +#include <ctype.h>
  22364. +#include <errno.h>
  22365. +#include <stdarg.h>
  22366. +#include <stdbool.h>
  22367. +#include <stdio.h>
  22368. +#include <stdlib.h>
  22369. +#include <string.h>
  22370. +#include <unistd.h>
  22371. +
  22372. +/* Avoid err.h since this are non-standard BSD extensions */
  22373. +#define vwarnx(fmt, args) ({ fprintf(stderr, "unifdef: "); vfprintf(stderr, fmt, args); fprintf(stderr, "\n"); })
  22374. +#define warnx(fmt, args...) fprintf(stderr, "unifdef: " fmt "\n", ## args)
  22375. +#define warn(fmt, args...) warnx(fmt ": %s", ## args, strerror(errno))
  22376. +#define errx(exit_code, fmt, args...) ({ warnx(fmt, ## args); exit(exit_code); })
  22377. +#define err(exit_code, fmt, args...) errx(exit_code, fmt ": %s", ## args, strerror(errno))
  22378. +
  22379. +/* portability stubs */
  22380. +
  22381. +#define fbinmode(fp) (fp)
  22382. +
  22383. +#define replace(old,new) rename(old,new)
  22384. +
  22385. +static FILE *
  22386. +mktempmode(char *tmp, int mode)
  22387. +{
  22388. + int fd = mkstemp(tmp);
  22389. + if (fd < 0) return (NULL);
  22390. + fchmod(fd, mode & (S_IRWXU|S_IRWXG|S_IRWXO));
  22391. + return (fdopen(fd, "wb"));
  22392. +}
  22393. diff -Nur uClibc-0.9.33.2/extra/scripts/version.h uClibc-git/extra/scripts/version.h
  22394. --- uClibc-0.9.33.2/extra/scripts/version.h 1970-01-01 01:00:00.000000000 +0100
  22395. +++ uClibc-git/extra/scripts/version.h 2014-07-25 20:36:04.949324959 +0200
  22396. @@ -0,0 +1,2 @@
  22397. +"@(#) $Version: unifdef-2.10.4.1542ea4 $\n"
  22398. +"@(#) $Date: 2014-01-07 22:32:21 +0000 $\n"
  22399. diff -Nur uClibc-0.9.33.2/.gitignore uClibc-git/.gitignore
  22400. --- uClibc-0.9.33.2/.gitignore 2012-05-15 09:20:09.000000000 +0200
  22401. +++ uClibc-git/.gitignore 2014-07-25 20:36:04.409322131 +0200
  22402. @@ -25,6 +25,7 @@
  22403. .gdb_history
  22404. .gdbinit
  22405. core
  22406. +*.c.[0-9][0-9][0-9]t.*
  22407. #
  22408. # Backups / patches
  22409. diff -Nur uClibc-0.9.33.2/include/alloca.h uClibc-git/include/alloca.h
  22410. --- uClibc-0.9.33.2/include/alloca.h 2012-05-15 09:20:09.000000000 +0200
  22411. +++ uClibc-git/include/alloca.h 2014-07-25 20:36:04.961325022 +0200
  22412. @@ -12,9 +12,8 @@
  22413. Lesser General Public License for more details.
  22414. You should have received a copy of the GNU Lesser General Public
  22415. - License along with the GNU C Library; if not, write to the Free
  22416. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  22417. - 02111-1307 USA. */
  22418. + License along with the GNU C Library; if not, see
  22419. + <http://www.gnu.org/licenses/>. */
  22420. #ifndef _ALLOCA_H
  22421. #define _ALLOCA_H 1
  22422. diff -Nur uClibc-0.9.33.2/include/ar.h uClibc-git/include/ar.h
  22423. --- uClibc-0.9.33.2/include/ar.h 2012-05-15 09:20:09.000000000 +0200
  22424. +++ uClibc-git/include/ar.h 2014-07-25 20:36:04.961325022 +0200
  22425. @@ -13,9 +13,8 @@
  22426. Lesser General Public License for more details.
  22427. You should have received a copy of the GNU Lesser General Public
  22428. - License along with the GNU C Library; if not, write to the Free
  22429. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  22430. - 02111-1307 USA. */
  22431. + License along with the GNU C Library; if not, see
  22432. + <http://www.gnu.org/licenses/>. */
  22433. #ifndef _AR_H
  22434. #define _AR_H 1
  22435. diff -Nur uClibc-0.9.33.2/include/arpa/inet.h uClibc-git/include/arpa/inet.h
  22436. --- uClibc-0.9.33.2/include/arpa/inet.h 2012-05-15 09:20:09.000000000 +0200
  22437. +++ uClibc-git/include/arpa/inet.h 2014-07-25 20:36:04.973325085 +0200
  22438. @@ -12,9 +12,8 @@
  22439. Lesser General Public License for more details.
  22440. You should have received a copy of the GNU Lesser General Public
  22441. - License along with the GNU C Library; if not, write to the Free
  22442. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  22443. - 02111-1307 USA. */
  22444. + License along with the GNU C Library; if not, see
  22445. + <http://www.gnu.org/licenses/>. */
  22446. #ifndef _ARPA_INET_H
  22447. #define _ARPA_INET_H 1
  22448. @@ -32,7 +31,7 @@
  22449. /* Convert Internet host address from numbers-and-dots notation in CP
  22450. into binary data in network byte order. */
  22451. -extern in_addr_t inet_addr (__const char *__cp) __THROW;
  22452. +extern in_addr_t inet_addr (const char *__cp) __THROW;
  22453. libc_hidden_proto(inet_addr)
  22454. /* Return the local host address part of the Internet address in IN. */
  22455. @@ -50,7 +49,7 @@
  22456. /* Extract the network number in network byte order from the address
  22457. in numbers-and-dots natation starting at CP. */
  22458. -extern in_addr_t inet_network (__const char *__cp) __THROW;
  22459. +extern in_addr_t inet_network (const char *__cp) __THROW;
  22460. libc_hidden_proto(inet_network)
  22461. /* Convert Internet number in IN to ASCII representation. The return value
  22462. @@ -60,20 +59,19 @@
  22463. #ifdef __UCLIBC__
  22464. /* Recursion-safe flavor */
  22465. extern char *inet_ntoa_r (struct in_addr __in, char *__buf) __THROW;
  22466. -libc_hidden_proto(inet_ntoa_r)
  22467. #endif
  22468. /* Convert from presentation format of an Internet number in buffer
  22469. starting at CP to the binary network format and store result for
  22470. interface type AF in buffer starting at BUF. */
  22471. -extern int inet_pton (int __af, __const char *__restrict __cp,
  22472. +extern int inet_pton (int __af, const char *__restrict __cp,
  22473. void *__restrict __buf) __THROW;
  22474. libc_hidden_proto(inet_pton)
  22475. /* Convert a Internet address in binary network format for interface
  22476. type AF in buffer starting at CP to presentation form and place
  22477. result in buffer of length LEN astarting at BUF. */
  22478. -extern __const char *inet_ntop (int __af, __const void *__restrict __cp,
  22479. +extern const char *inet_ntop (int __af, const void *__restrict __cp,
  22480. char *__restrict __buf, socklen_t __len)
  22481. __THROW;
  22482. libc_hidden_proto(inet_ntop)
  22483. @@ -83,7 +81,7 @@
  22484. #ifdef __USE_MISC
  22485. /* Convert Internet host address from numbers-and-dots notation in CP
  22486. into binary data and store the result in the structure INP. */
  22487. -extern int inet_aton (__const char *__cp, struct in_addr *__inp) __THROW;
  22488. +extern int inet_aton (const char *__cp, struct in_addr *__inp) __THROW;
  22489. libc_hidden_proto(inet_aton)
  22490. #if 0
  22491. @@ -94,24 +92,24 @@
  22492. /* Convert network number for interface type AF in buffer starting at
  22493. CP to presentation format. The result will specifiy BITS bits of
  22494. the number. */
  22495. -extern char *inet_net_ntop (int __af, __const void *__cp, int __bits,
  22496. +extern char *inet_net_ntop (int __af, const void *__cp, int __bits,
  22497. char *__buf, size_t __len) __THROW;
  22498. /* Convert network number for interface type AF from presentation in
  22499. buffer starting at CP to network format and store result int
  22500. buffer starting at BUF of size LEN. */
  22501. -extern int inet_net_pton (int __af, __const char *__cp,
  22502. +extern int inet_net_pton (int __af, const char *__cp,
  22503. void *__buf, size_t __len) __THROW;
  22504. /* Convert ASCII representation in hexadecimal form of the Internet
  22505. address to binary form and place result in buffer of length LEN
  22506. starting at BUF. */
  22507. -extern unsigned int inet_nsap_addr (__const char *__cp,
  22508. +extern unsigned int inet_nsap_addr (const char *__cp,
  22509. unsigned char *__buf, int __len) __THROW;
  22510. /* Convert internet address in binary form in LEN bytes starting at CP
  22511. a presentation form and place result in BUF. */
  22512. -extern char *inet_nsap_ntoa (int __len, __const unsigned char *__cp,
  22513. +extern char *inet_nsap_ntoa (int __len, const unsigned char *__cp,
  22514. char *__buf) __THROW;
  22515. #endif
  22516. #endif
  22517. diff -Nur uClibc-0.9.33.2/include/assert.h uClibc-git/include/assert.h
  22518. --- uClibc-0.9.33.2/include/assert.h 2012-05-15 09:20:09.000000000 +0200
  22519. +++ uClibc-git/include/assert.h 2014-07-25 20:36:04.973325085 +0200
  22520. @@ -12,9 +12,8 @@
  22521. Lesser General Public License for more details.
  22522. You should have received a copy of the GNU Lesser General Public
  22523. - License along with the GNU C Library; if not, write to the Free
  22524. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  22525. - 02111-1307 USA. */
  22526. + License along with the GNU C Library; if not, see
  22527. + <http://www.gnu.org/licenses/>. */
  22528. /*
  22529. * ISO C99 Standard: 7.2 Diagnostics <assert.h>
  22530. @@ -72,7 +71,7 @@
  22531. # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
  22532. # define __ASSERT_FUNCTION __func__
  22533. # else
  22534. -# define __ASSERT_FUNCTION ((__const char *) 0)
  22535. +# define __ASSERT_FUNCTION ((const char *) 0)
  22536. # endif
  22537. # endif
  22538. diff -Nur uClibc-0.9.33.2/include/atomic.h uClibc-git/include/atomic.h
  22539. --- uClibc-0.9.33.2/include/atomic.h 2012-05-15 09:20:09.000000000 +0200
  22540. +++ uClibc-git/include/atomic.h 2014-07-25 20:36:04.973325085 +0200
  22541. @@ -14,9 +14,8 @@
  22542. Lesser General Public License for more details.
  22543. You should have received a copy of the GNU Lesser General Public
  22544. - License along with the GNU C Library; if not, write to the Free
  22545. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  22546. - 02111-1307 USA. */
  22547. + License along with the GNU C Library; if not, see
  22548. + <http://www.gnu.org/licenses/>. */
  22549. #ifndef _ATOMIC_H
  22550. #define _ATOMIC_H 1
  22551. diff -Nur uClibc-0.9.33.2/include/byteswap.h uClibc-git/include/byteswap.h
  22552. --- uClibc-0.9.33.2/include/byteswap.h 2012-05-15 09:20:09.000000000 +0200
  22553. +++ uClibc-git/include/byteswap.h 2014-07-25 20:36:04.973325085 +0200
  22554. @@ -12,9 +12,8 @@
  22555. Lesser General Public License for more details.
  22556. You should have received a copy of the GNU Lesser General Public
  22557. - License along with the GNU C Library; if not, write to the Free
  22558. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  22559. - 02111-1307 USA. */
  22560. + License along with the GNU C Library; if not, see
  22561. + <http://www.gnu.org/licenses/>. */
  22562. #ifndef _BYTESWAP_H
  22563. #define _BYTESWAP_H 1
  22564. diff -Nur uClibc-0.9.33.2/include/cancel.h uClibc-git/include/cancel.h
  22565. --- uClibc-0.9.33.2/include/cancel.h 1970-01-01 01:00:00.000000000 +0100
  22566. +++ uClibc-git/include/cancel.h 2014-07-25 20:36:04.973325085 +0200
  22567. @@ -0,0 +1,101 @@
  22568. +/* vi: set sw=4 ts=4: */
  22569. +/*
  22570. + * Copyright (C) 2000-2011 Erik Andersen <andersen@uclibc.org>
  22571. + *
  22572. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  22573. + */
  22574. +
  22575. +#ifndef _CANCEL_H
  22576. +#define _CANCEL_H
  22577. +
  22578. +/*
  22579. + * Usage of this header:
  22580. + * 1. define a static or hidden function __NC(NAME) - expands to __NAME_nocancel
  22581. + * 2. if it is hidden, add the prototype to the appropiate header where NAME has
  22582. + * it's prototype (guarded by _LIBC)
  22583. + * 3. add a CANCELLABLE_SYSCALL(...) line at the end, this will create the function
  22584. + * NAME (as weak) with enabled cancellation for NPTL (and later for new LT), for
  22585. + * LT_OLD it will also create a strong_alias to __libc_NAME to be used in libpthread
  22586. + * 4. if you need libc_hidden_(weak|def) line, use instead lt_libc_hidden, this will
  22587. + * take care of the correct type, weak or strong depending on the THREADS type
  22588. + * 5. If the implementation can't be done using CANCELLABLE_SYSCALL (like for fcntl)
  22589. + * you need to manually add lt_strong_alias() line too, to optionally create the
  22590. + * __libc_NAME alias
  22591. + * 6. if functions are needed to implement __NC(NAME), that themselves are cancellable,
  22592. + * decide how the cancellation should be solved, two variants are possible:
  22593. + * a. use the other function as __NC(FUNC), this way you access the non-cancellable
  22594. + * variant and provide by CANCELLABLE_SYSCALL(...) the dedicated cancellation for NAME.
  22595. + * be aware, that for this case __NC(FUNC) has to be hidden (not static)
  22596. + * b. use the other function with it's name (FUNC) and add LIBC_CANCEL_HANDLED(); at
  22597. + * the end of file with a comment telling us which function took care of the cancellation
  22598. + * Note: LIBC_CANCEL_HANDLED() is noop on uClibc, glibc uses it only for tests, we use
  22599. + * it only for "documentation".
  22600. + *
  22601. + * For now the use of this file is limited to libc, will expand later to support libpthread
  22602. + * and librt as well.
  22603. + */
  22604. +
  22605. +#include <features.h>
  22606. +
  22607. +#ifndef NOT_IN_libc
  22608. +
  22609. +#define __NC(name) _NC(name)
  22610. +#define _NC(name) __##name##_nocancel
  22611. +
  22612. +#define __NC_OLD(name) _NC_OLD(name)
  22613. +#define _NC_OLD(name) __libc_##name
  22614. +
  22615. +#define __NC_PROTO(name) extern __typeof(name) __NC(name) attribute_hidden;
  22616. +#define __NC_OLD_PROTO(name) extern __typeof(name) __NC_OLD(name);
  22617. +
  22618. +#if defined __UCLIBC_HAS_THREADS__ && !defined __LINUXTHREADS_OLD__
  22619. +# define __NEW_THREADS 1
  22620. +#else
  22621. +# define SINGLE_THREAD_P 1
  22622. +#endif
  22623. +
  22624. +#ifdef __NEW_THREADS
  22625. +# include <sysdep-cancel.h>
  22626. +
  22627. +# define CANCELLABLE_SYSCALL(res_type, name, param_list, params) \
  22628. +res_type weak_function name param_list \
  22629. +{ \
  22630. + if (SINGLE_THREAD_P) \
  22631. + return __NC(name) params; \
  22632. + int oldtype = LIBC_CANCEL_ASYNC(); \
  22633. + res_type result = __NC(name) params; \
  22634. + LIBC_CANCEL_RESET(oldtype); \
  22635. + return result; \
  22636. +}
  22637. +
  22638. +# define lt_strong_alias(name)
  22639. +# define lt_libc_hidden(name) libc_hidden_def(name)
  22640. +
  22641. +#elif defined __LINUXTHREADS_OLD__
  22642. +
  22643. +# define CANCELLABLE_SYSCALL(res_type, name, param_list, params) \
  22644. +weak_alias(__NC(name),name) \
  22645. +lt_strong_alias(name)
  22646. +
  22647. +# define lt_strong_alias(name) \
  22648. +__NC_OLD_PROTO(name) \
  22649. +strong_alias(name,__NC_OLD(name))
  22650. +# define lt_libc_hidden(name) libc_hidden_weak(name)
  22651. +
  22652. +#else
  22653. +
  22654. +# define CANCELLABLE_SYSCALL(res_type, name, param_list, params) \
  22655. +strong_alias(__NC(name),name)
  22656. +
  22657. +# define lt_strong_alias(name)
  22658. +# define lt_libc_hidden(name) libc_hidden_def(name)
  22659. +
  22660. +#endif
  22661. +
  22662. +/* disable it, useless, glibc uses it only for tests */
  22663. +# undef LIBC_CANCEL_HANDLED
  22664. +# define LIBC_CANCEL_HANDLED()
  22665. +
  22666. +#endif /* NOT_IN_libc */
  22667. +
  22668. +#endif
  22669. diff -Nur uClibc-0.9.33.2/include/complex.h uClibc-git/include/complex.h
  22670. --- uClibc-0.9.33.2/include/complex.h 2012-05-15 09:20:09.000000000 +0200
  22671. +++ uClibc-git/include/complex.h 2014-07-25 20:36:04.973325085 +0200
  22672. @@ -1,4 +1,4 @@
  22673. -/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
  22674. +/* Copyright (C) 1997, 1998, 1999, 2000, 2006 Free Software Foundation, Inc.
  22675. This file is part of the GNU C Library.
  22676. The GNU C Library is free software; you can redistribute it and/or
  22677. @@ -12,9 +12,8 @@
  22678. Lesser General Public License for more details.
  22679. You should have received a copy of the GNU Lesser General Public
  22680. - License along with the GNU C Library; if not, write to the Free
  22681. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  22682. - 02111-1307 USA. */
  22683. + License along with the GNU C Library; if not, see
  22684. + <http://www.gnu.org/licenses/>. */
  22685. /*
  22686. * ISO C99: 7.3 Complex arithmetic <complex.h>
  22687. @@ -84,7 +83,8 @@
  22688. /* And the long double versions. It is non-critical to define them
  22689. here unconditionally since `long double' is required in ISO C99. */
  22690. -#if __STDC__ - 0 || __GNUC__ - 0 && defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
  22691. +#if (__STDC__ - 0 || __GNUC__ - 0) \
  22692. + && defined __UCLIBC_HAS_LONG_DOUBLE_MATH__
  22693. # ifndef _Mlong_double_
  22694. # define _Mlong_double_ long double
  22695. # endif
  22696. diff -Nur uClibc-0.9.33.2/include/cpio.h uClibc-git/include/cpio.h
  22697. --- uClibc-0.9.33.2/include/cpio.h 2012-05-15 09:20:09.000000000 +0200
  22698. +++ uClibc-git/include/cpio.h 2014-07-25 20:36:04.977325106 +0200
  22699. @@ -14,9 +14,8 @@
  22700. Lesser General Public License for more details.
  22701. You should have received a copy of the GNU Lesser General Public
  22702. - License along with the GNU C Library; if not, write to the Free
  22703. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  22704. - 02111-1307 USA. */
  22705. + License along with the GNU C Library; if not, see
  22706. + <http://www.gnu.org/licenses/>. */
  22707. #ifndef _CPIO_H
  22708. #define _CPIO_H 1
  22709. diff -Nur uClibc-0.9.33.2/include/crypt.h uClibc-git/include/crypt.h
  22710. --- uClibc-0.9.33.2/include/crypt.h 2012-05-15 09:20:09.000000000 +0200
  22711. +++ uClibc-git/include/crypt.h 2014-07-25 20:36:04.977325106 +0200
  22712. @@ -12,10 +12,8 @@
  22713. * Lesser General Public License for more details.
  22714. *
  22715. * You should have received a copy of the GNU Lesser General Public
  22716. - * License along with the GNU C Library; if not, write to the Free
  22717. - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  22718. - * 02111-1307 USA.
  22719. - *
  22720. + * License along with the GNU C Library; see the file COPYING.LIB. If
  22721. + * not, see <http://www.gnu.org/licenses/>.
  22722. */
  22723. #ifndef _CRYPT_H
  22724. diff -Nur uClibc-0.9.33.2/include/ctype.h uClibc-git/include/ctype.h
  22725. --- uClibc-0.9.33.2/include/ctype.h 2012-05-15 09:20:09.000000000 +0200
  22726. +++ uClibc-git/include/ctype.h 2014-07-25 20:36:04.977325106 +0200
  22727. @@ -13,9 +13,8 @@
  22728. Lesser General Public License for more details.
  22729. You should have received a copy of the GNU Lesser General Public
  22730. - License along with the GNU C Library; if not, write to the Free
  22731. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  22732. - 02111-1307 USA. */
  22733. + License along with the GNU C Library; if not, see
  22734. + <http://www.gnu.org/licenses/>. */
  22735. /*
  22736. * ISO C99 Standard 7.4: Character handling <ctype.h>
  22737. @@ -405,8 +404,8 @@
  22738. #endif /* __UCLIBC_HAS_CTYPE_TABLES__ */
  22739. -/* We define {__,}isascii for internal use only */
  22740. #if defined _LIBC && !defined __UCLIBC_SUSV4_LEGACY__
  22741. +/* We define {__,}isascii for internal use only */
  22742. # define __isascii(c) (((c) & ~0x7f) == 0)
  22743. # define isascii(c) __isascii (c)
  22744. #endif
  22745. diff -Nur uClibc-0.9.33.2/include/dirent.h uClibc-git/include/dirent.h
  22746. --- uClibc-0.9.33.2/include/dirent.h 2012-05-15 09:20:09.000000000 +0200
  22747. +++ uClibc-git/include/dirent.h 2014-07-25 20:36:04.977325106 +0200
  22748. @@ -1,4 +1,4 @@
  22749. -/* Copyright (C) 1991-2000, 2003-2005, 2009 Free Software Foundation, Inc.
  22750. +/* Copyright (C) 1991-2000,2003-2005,2009,2010 Free Software Foundation, Inc.
  22751. This file is part of the GNU C Library.
  22752. The GNU C Library is free software; you can redistribute it and/or
  22753. @@ -12,9 +12,8 @@
  22754. Lesser General Public License for more details.
  22755. You should have received a copy of the GNU Lesser General Public
  22756. - License along with the GNU C Library; if not, write to the Free
  22757. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  22758. - 02111-1307 USA. */
  22759. + License along with the GNU C Library; if not, see
  22760. + <http://www.gnu.org/licenses/>. */
  22761. /*
  22762. * POSIX Standard: 5.1.2 Directory Operations <dirent.h>
  22763. @@ -132,7 +131,7 @@
  22764. This function is a possible cancellation point and therefore not
  22765. marked with __THROW. */
  22766. -extern DIR *opendir (__const char *__name) __nonnull ((1));
  22767. +extern DIR *opendir (const char *__name) __nonnull ((1));
  22768. libc_hidden_proto(opendir)
  22769. #ifdef __USE_XOPEN2K8
  22770. @@ -224,7 +223,7 @@
  22771. extern long int telldir (DIR *__dirp) __THROW __nonnull ((1));
  22772. #endif
  22773. -#if defined __USE_BSD || defined __USE_MISC || defined __XOPEN_2K8
  22774. +#if defined __USE_BSD || defined __USE_MISC || defined __USE_XOPEN2K8
  22775. /* Return the file descriptor used by DIRP. */
  22776. extern int dirfd (DIR *__dirp) __THROW __nonnull ((1));
  22777. @@ -256,20 +255,20 @@
  22778. sorted using qsort with CMP, and collected in a malloc'd array in
  22779. *NAMELIST. Returns the number of entries selected, or -1 on error. */
  22780. # ifndef __USE_FILE_OFFSET64
  22781. -extern int scandir (__const char *__restrict __dir,
  22782. +extern int scandir (const char *__restrict __dir,
  22783. struct dirent ***__restrict __namelist,
  22784. - int (*__selector) (__const struct dirent *),
  22785. - int (*__cmp) (__const struct dirent **,
  22786. - __const struct dirent **))
  22787. + int (*__selector) (const struct dirent *),
  22788. + int (*__cmp) (const struct dirent **,
  22789. + const struct dirent **))
  22790. __nonnull ((1, 2));
  22791. # else
  22792. # ifdef __REDIRECT
  22793. extern int __REDIRECT (scandir,
  22794. - (__const char *__restrict __dir,
  22795. + (const char *__restrict __dir,
  22796. struct dirent ***__restrict __namelist,
  22797. - int (*__selector) (__const struct dirent *),
  22798. - int (*__cmp) (__const struct dirent **,
  22799. - __const struct dirent **)),
  22800. + int (*__selector) (const struct dirent *),
  22801. + int (*__cmp) (const struct dirent **,
  22802. + const struct dirent **)),
  22803. scandir64) __nonnull ((1, 2));
  22804. # else
  22805. # define scandir scandir64
  22806. @@ -279,24 +278,24 @@
  22807. # if defined __USE_GNU && defined __USE_LARGEFILE64
  22808. /* This function is like `scandir' but it uses the 64bit dirent structure.
  22809. Please note that the CMP function must now work with struct dirent64 **. */
  22810. -extern int scandir64 (__const char *__restrict __dir,
  22811. +extern int scandir64 (const char *__restrict __dir,
  22812. struct dirent64 ***__restrict __namelist,
  22813. - int (*__selector) (__const struct dirent64 *),
  22814. - int (*__cmp) (__const struct dirent64 **,
  22815. - __const struct dirent64 **))
  22816. + int (*__selector) (const struct dirent64 *),
  22817. + int (*__cmp) (const struct dirent64 **,
  22818. + const struct dirent64 **))
  22819. __nonnull ((1, 2));
  22820. # endif
  22821. /* Function to compare two `struct dirent's alphabetically. */
  22822. # ifndef __USE_FILE_OFFSET64
  22823. -extern int alphasort (__const struct dirent **__e1,
  22824. - __const struct dirent **__e2)
  22825. +extern int alphasort (const struct dirent **__e1,
  22826. + const struct dirent **__e2)
  22827. __THROW __attribute_pure__ __nonnull ((1, 2));
  22828. # else
  22829. # ifdef __REDIRECT
  22830. extern int __REDIRECT_NTH (alphasort,
  22831. - (__const struct dirent **__e1,
  22832. - __const struct dirent **__e2),
  22833. + (const struct dirent **__e1,
  22834. + const struct dirent **__e2),
  22835. alphasort64) __attribute_pure__ __nonnull ((1, 2));
  22836. # else
  22837. # define alphasort alphasort64
  22838. @@ -304,14 +303,14 @@
  22839. # endif
  22840. # if defined __USE_GNU && defined __USE_LARGEFILE64
  22841. -extern int alphasort64 (__const struct dirent64 **__e1,
  22842. - __const struct dirent64 **__e2)
  22843. +extern int alphasort64 (const struct dirent64 **__e1,
  22844. + const struct dirent64 **__e2)
  22845. __THROW __attribute_pure__ __nonnull ((1, 2));
  22846. # endif
  22847. #endif /* Use BSD or misc or XPG7. */
  22848. -#if defined __USE_BSD || defined __USE_MISC
  22849. +#if 0 /* defined __USE_BSD || defined __USE_MISC */
  22850. /* Read directory entries from FD into BUF, reading at most NBYTES.
  22851. Reading starts at offset *BASEP, and *BASEP is updated with the new
  22852. position after reading. Returns the number of bytes read; zero when at
  22853. @@ -344,14 +343,14 @@
  22854. #ifdef __USE_GNU
  22855. /* Function to compare two `struct dirent's by name & version. */
  22856. # ifndef __USE_FILE_OFFSET64
  22857. -extern int versionsort (__const struct dirent **__e1,
  22858. - __const struct dirent **__e2)
  22859. +extern int versionsort (const struct dirent **__e1,
  22860. + const struct dirent **__e2)
  22861. __THROW __attribute_pure__ __nonnull ((1, 2));
  22862. # else
  22863. # ifdef __REDIRECT
  22864. extern int __REDIRECT_NTH (versionsort,
  22865. - (__const struct dirent **__e1,
  22866. - __const struct dirent **__e2),
  22867. + (const struct dirent **__e1,
  22868. + const struct dirent **__e2),
  22869. versionsort64)
  22870. __attribute_pure__ __nonnull ((1, 2));
  22871. # else
  22872. @@ -360,12 +359,19 @@
  22873. # endif
  22874. # ifdef __USE_LARGEFILE64
  22875. -extern int versionsort64 (__const struct dirent64 **__e1,
  22876. - __const struct dirent64 **__e2)
  22877. +extern int versionsort64 (const struct dirent64 **__e1,
  22878. + const struct dirent64 **__e2)
  22879. __THROW __attribute_pure__ __nonnull ((1, 2));
  22880. # endif
  22881. #endif /* Use GNU. */
  22882. __END_DECLS
  22883. +#ifdef _LIBC
  22884. +extern __ssize_t __getdents(int fd, char *buf, size_t count) attribute_hidden;
  22885. +# ifdef __UCLIBC_HAS_LFS__
  22886. +extern __ssize_t __getdents64 (int fd, char *buf, size_t count) attribute_hidden;
  22887. +# endif
  22888. +#endif
  22889. +
  22890. #endif /* dirent.h */
  22891. diff -Nur uClibc-0.9.33.2/include/dlfcn.h uClibc-git/include/dlfcn.h
  22892. --- uClibc-0.9.33.2/include/dlfcn.h 2012-05-15 09:20:09.000000000 +0200
  22893. +++ uClibc-git/include/dlfcn.h 2014-07-25 20:36:04.977325106 +0200
  22894. @@ -1,6 +1,5 @@
  22895. /* User functions for run-time dynamic loading.
  22896. - Copyright (C) 1995-1999,2000,2001,2003,2004,2006
  22897. - Free Software Foundation, Inc.
  22898. + Copyright (C) 1995-2001,2003,2004,2006,2009 Free Software Foundation, Inc.
  22899. This file is part of the GNU C Library.
  22900. The GNU C Library is free software; you can redistribute it and/or
  22901. @@ -14,9 +13,8 @@
  22902. Lesser General Public License for more details.
  22903. You should have received a copy of the GNU Lesser General Public
  22904. - License along with the GNU C Library; if not, write to the Free
  22905. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  22906. - 02111-1307 USA. */
  22907. + License along with the GNU C Library; if not, see
  22908. + <http://www.gnu.org/licenses/>. */
  22909. #ifndef _DLFCN_H
  22910. #define _DLFCN_H 1
  22911. @@ -52,11 +50,12 @@
  22912. # endif
  22913. #endif
  22914. +
  22915. __BEGIN_DECLS
  22916. /* Open the shared object FILE and map it in; return a handle that can be
  22917. passed to `dlsym' to get symbol values from it. */
  22918. -extern void *dlopen (__const char *__file, int __mode) __THROW;
  22919. +extern void *dlopen (const char *__file, int __mode) __THROW;
  22920. /* Unmap and close a shared object opened by `dlopen'.
  22921. The handle cannot be used again after calling `dlclose'. */
  22922. @@ -65,17 +64,17 @@
  22923. /* Find the run-time address in the shared object HANDLE refers to
  22924. of the symbol called NAME. */
  22925. extern void *dlsym (void *__restrict __handle,
  22926. - __const char *__restrict __name) __THROW __nonnull ((2));
  22927. + const char *__restrict __name) __THROW __nonnull ((2));
  22928. #if 0 /*def __USE_GNU*/
  22929. /* Like `dlopen', but request object to be allocated in a new namespace. */
  22930. -extern void *dlmopen (Lmid_t __nsid, __const char *__file, int __mode) __THROW;
  22931. +extern void *dlmopen (Lmid_t __nsid, const char *__file, int __mode) __THROW;
  22932. /* Find the run-time address in the shared object HANDLE refers to
  22933. of the symbol called NAME with VERSION. */
  22934. extern void *dlvsym (void *__restrict __handle,
  22935. - __const char *__restrict __name,
  22936. - __const char *__restrict __version)
  22937. + const char *__restrict __name,
  22938. + const char *__restrict __version)
  22939. __THROW __nonnull ((2, 3));
  22940. #endif
  22941. @@ -90,20 +89,20 @@
  22942. `dladdr'. */
  22943. typedef struct
  22944. {
  22945. - __const char *dli_fname; /* File name of defining object. */
  22946. + const char *dli_fname; /* File name of defining object. */
  22947. void *dli_fbase; /* Load address of that object. */
  22948. - __const char *dli_sname; /* Name of nearest symbol. */
  22949. + const char *dli_sname; /* Name of nearest symbol. */
  22950. void *dli_saddr; /* Exact value of nearest symbol. */
  22951. } Dl_info;
  22952. /* Fill in *INFO with the following information about ADDRESS.
  22953. Returns 0 iff no shared object's segments contain that address. */
  22954. -extern int dladdr (__const void *__address, Dl_info *__info)
  22955. +extern int dladdr (const void *__address, Dl_info *__info)
  22956. __THROW __nonnull ((2));
  22957. #if 0 /* not supported by uClibc */
  22958. /* Same as `dladdr', but additionally sets *EXTRA_INFO according to FLAGS. */
  22959. -extern int dladdr1 (__const void *__address, Dl_info *__info,
  22960. +extern int dladdr1 (const void *__address, Dl_info *__info,
  22961. void **__extra_info, int __flags) __THROW __nonnull ((2));
  22962. /* These are the possible values for the FLAGS argument to `dladdr1'.
  22963. @@ -166,7 +165,7 @@
  22964. segment, or if the calling thread has not allocated a block for it. */
  22965. RTLD_DI_TLS_DATA = 10,
  22966. - RTLD_DI_MAX = 10,
  22967. + RTLD_DI_MAX = 10
  22968. };
  22969. @@ -186,12 +185,6 @@
  22970. unsigned int dls_cnt; /* Number of elements in `dls_serpath'. */
  22971. Dl_serpath dls_serpath[1]; /* Actually longer, dls_cnt elements. */
  22972. } Dl_serinfo;
  22973. -
  22974. -#else
  22975. -
  22976. -/* Get information about the shared objects currently loaded */
  22977. -extern int dlinfo (void);
  22978. -
  22979. #endif
  22980. #endif /* __USE_GNU */
  22981. diff -Nur uClibc-0.9.33.2/include/elf.h uClibc-git/include/elf.h
  22982. --- uClibc-0.9.33.2/include/elf.h 2012-05-15 09:20:09.000000000 +0200
  22983. +++ uClibc-git/include/elf.h 2014-07-25 20:36:04.977325106 +0200
  22984. @@ -13,9 +13,8 @@
  22985. Lesser General Public License for more details.
  22986. You should have received a copy of the GNU Lesser General Public
  22987. - License along with the GNU C Library; if not, write to the Free
  22988. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  22989. - 02111-1307 USA. */
  22990. + License along with the GNU C Library; if not, see
  22991. + <http://www.gnu.org/licenses/>. */
  22992. #ifndef _ELF_H
  22993. #define _ELF_H 1
  22994. @@ -148,8 +147,8 @@
  22995. #define ELFOSABI_SYSV 0 /* Alias. */
  22996. #define ELFOSABI_HPUX 1 /* HP-UX */
  22997. #define ELFOSABI_NETBSD 2 /* NetBSD. */
  22998. -#define ELFOSABI_LINUX 3 /* Linux. */
  22999. -#define ELFOSABI_HURD 4 /* GNU/Hurd */
  23000. +#define ELFOSABI_GNU 3 /* Object uses GNU ELF extensions. */
  23001. +#define ELFOSABI_LINUX ELFOSABI_GNU /* Compatibility alias. */
  23002. #define ELFOSABI_SOLARIS 6 /* Sun Solaris. */
  23003. #define ELFOSABI_AIX 7 /* IBM AIX. */
  23004. #define ELFOSABI_IRIX 8 /* SGI Irix. */
  23005. @@ -260,6 +259,7 @@
  23006. #define EM_PJ 91 /* picoJava */
  23007. #define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */
  23008. #define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */
  23009. +#define EM_ARCOMPACT 93 /* ARCompact ISA based Cores: ARC 700 */
  23010. #define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
  23011. #define EM_IP2K 101 /* Ubicom IP2022 micro controller */
  23012. #define EM_CR 103 /* National Semiconductor CompactRISC */
  23013. @@ -282,6 +282,9 @@
  23014. unofficial e_machine number should eventually ask registry@caldera.com for
  23015. an officially blessed number to be added to the list above. */
  23016. +/* Imagination Technologies Meta */
  23017. +#define EM_METAG 174
  23018. +
  23019. /* picoJava */
  23020. #define EM_PJ_OLD 99
  23021. @@ -3141,6 +3144,110 @@
  23022. #define R_MICROBLAZE_COPY 21 /* runtime copy */
  23023. #define R_MICROBLAZE_NUM 22
  23024. +/* Meta relocations */
  23025. +#define R_METAG_HIADDR16 0
  23026. +#define R_METAG_LOADDR16 1
  23027. +#define R_METAG_ADDR32 2
  23028. +#define R_METAG_NONE 3
  23029. +#define R_METAG_RELBRANCH 4
  23030. +#define R_METAG_GETSETOFF 5
  23031. +
  23032. +/* Backward compatability */
  23033. +#define R_METAG_REG32OP1 6
  23034. +#define R_METAG_REG32OP2 7
  23035. +#define R_METAG_REG32OP3 8
  23036. +#define R_METAG_REG16OP1 9
  23037. +#define R_METAG_REG16OP2 10
  23038. +#define R_METAG_REG16OP3 11
  23039. +#define R_METAG_REG32OP4 12
  23040. +
  23041. +#define R_METAG_HIOG 13
  23042. +#define R_METAG_LOOG 14
  23043. +
  23044. +/* GNU */
  23045. +#define R_METAG_GNU_VTINHERIT 30
  23046. +#define R_METAG_GNU_VTENTRY 31
  23047. +
  23048. +/* PIC relocations */
  23049. +#define R_METAG_HI16_GOTOFF 32
  23050. +#define R_METAG_LO16_GOTOFF 33
  23051. +#define R_METAG_GETSET_GOTOFF 34
  23052. +#define R_METAG_GETSET_GOT 35
  23053. +#define R_METAG_HI16_GOTPC 36
  23054. +#define R_METAG_LO16_GOTPC 37
  23055. +#define R_METAG_HI16_PLT 38
  23056. +#define R_METAG_LO16_PLT 39
  23057. +#define R_METAG_RELBRANCH_PLT 40
  23058. +#define R_METAG_GOTOFF 41
  23059. +#define R_METAG_PLT 42
  23060. +#define R_METAG_COPY 43
  23061. +#define R_METAG_JMP_SLOT 44
  23062. +#define R_METAG_RELATIVE 45
  23063. +#define R_METAG_GLOB_DAT 46
  23064. +
  23065. +/* TLS relocations */
  23066. +#define R_METAG_TLS_TPOFF 56
  23067. +#define R_METAG_TLS_DTPMOD 57
  23068. +#define R_METAG_TLS_DTPOFF 58
  23069. +
  23070. +/* ARCompact specific relocs */
  23071. +#define R_ARC_NONE 0x0
  23072. +#define R_ARC_8 0x1
  23073. +#define R_ARC_16 0x2
  23074. +#define R_ARC_24 0x3
  23075. +#define R_ARC_32 0x4
  23076. +#define R_ARC_B26 0x5
  23077. +#define R_ARC_B22_PCREL 0x6
  23078. +#define R_ARC_H30 0x7
  23079. +#define R_ARC_N8 0x8
  23080. +#define R_ARC_N16 0x9
  23081. +#define R_ARC_N24 0xA
  23082. +#define R_ARC_N32 0xB
  23083. +#define R_ARC_SDA 0xC
  23084. +#define R_ARC_SECTOFF 0xD
  23085. +#define R_ARC_S21H_PCREL 0xE
  23086. +#define R_ARC_S21W_PCREL 0xF
  23087. +#define R_ARC_S25H_PCREL 0x10
  23088. +#define R_ARC_S25W_PCREL 0x11
  23089. +#define R_ARC_SDA32 0x12
  23090. +#define R_ARC_SDA_LDST 0x13
  23091. +#define R_ARC_SDA_LDST1 0x14
  23092. +#define R_ARC_SDA_LDST2 0x15
  23093. +#define R_ARC_SDA16_LD 0x16
  23094. +#define R_ARC_SDA16_LD1 0x17
  23095. +#define R_ARC_SDA16_LD2 0x18
  23096. +#define R_ARC_S13_PCREL 0x19
  23097. +#define R_ARC_W 0x1A
  23098. +#define R_ARC_32_ME 0x1B
  23099. +#define R_ARC_N32_ME 0x1C
  23100. +#define R_ARC_SECTOFF_ME 0x1D
  23101. +#define R_ARC_SDA32_ME 0x1E
  23102. +#define R_ARC_W_ME 0x1F
  23103. +#define R_ARC_H30_ME 0x20
  23104. +#define R_ARC_SECTOFF_U8 0x21
  23105. +#define R_ARC_SECTOFF_S9 0x22
  23106. +#define R_AC_SECTOFF_U8 0x23
  23107. +#define R_AC_SECTOFF_U8_1 0x24
  23108. +#define R_AC_SECTOFF_U8_2 0x25
  23109. +#define R_AC_SECTOFF_S9 0x26
  23110. +#define R_AC_SECTOFF_S9_1 0x27
  23111. +#define R_AC_SECTOFF_S9_2 0x28
  23112. +#define R_ARC_SECTOFF_ME_1 0x29
  23113. +#define R_ARC_SECTOFF_ME_2 0x2A
  23114. +#define R_ARC_SECTOFF_1 0x2B
  23115. +#define R_ARC_SECTOFF_2 0x2C
  23116. +#define R_ARC_PC32 0x32
  23117. +#define R_ARC_GOTPC32 0x33
  23118. +#define R_ARC_PLT32 0x34
  23119. +#define R_ARC_COPY 0x35
  23120. +#define R_ARC_GLOB_DAT 0x36
  23121. +#define R_ARC_JMP_SLOT 0x37
  23122. +#define R_ARC_RELATIVE 0x38
  23123. +#define R_ARC_GOTOFF 0x39
  23124. +#define R_ARC_GOTPC 0x3A
  23125. +#define R_ARC_GOT32 0x3B
  23126. +#define R_ARC_NUM 0x3C
  23127. +
  23128. #ifdef __cplusplus
  23129. }
  23130. #endif
  23131. diff -Nur uClibc-0.9.33.2/include/endian.h uClibc-git/include/endian.h
  23132. --- uClibc-0.9.33.2/include/endian.h 2012-05-15 09:20:09.000000000 +0200
  23133. +++ uClibc-git/include/endian.h 2014-07-25 20:36:04.977325106 +0200
  23134. @@ -12,9 +12,8 @@
  23135. Lesser General Public License for more details.
  23136. You should have received a copy of the GNU Lesser General Public
  23137. - License along with the GNU C Library; if not, write to the Free
  23138. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  23139. - 02111-1307 USA. */
  23140. + License along with the GNU C Library; if not, see
  23141. + <http://www.gnu.org/licenses/>. */
  23142. #ifndef _ENDIAN_H
  23143. #define _ENDIAN_H 1
  23144. @@ -55,6 +54,17 @@
  23145. # define __LONG_LONG_PAIR(HI, LO) HI, LO
  23146. #endif
  23147. +#ifdef _LIBC
  23148. +# ifndef __ASSEMBLER__
  23149. +# include <stdint.h>
  23150. +# define OFF_HI(offset) (offset >> 31)
  23151. +# define OFF_LO(offset) (offset)
  23152. +# define OFF64_HI(offset) (uint32_t)(offset >> 32)
  23153. +# define OFF64_LO(offset) (uint32_t)(offset & 0xffffffff)
  23154. +# define OFF_HI_LO(offset) __LONG_LONG_PAIR(OFF_HI(offset), OFF_LO(offset))
  23155. +# define OFF64_HI_LO(offset) __LONG_LONG_PAIR(OFF64_HI(offset), OFF64_LO(offset))
  23156. +# endif
  23157. +#endif
  23158. #ifdef __USE_BSD
  23159. /* Conversion interfaces. */
  23160. diff -Nur uClibc-0.9.33.2/include/err.h uClibc-git/include/err.h
  23161. --- uClibc-0.9.33.2/include/err.h 2012-05-15 09:20:09.000000000 +0200
  23162. +++ uClibc-git/include/err.h 2014-07-25 20:36:04.977325106 +0200
  23163. @@ -13,9 +13,8 @@
  23164. Lesser General Public License for more details.
  23165. You should have received a copy of the GNU Lesser General Public
  23166. - License along with the GNU C Library; if not, write to the Free
  23167. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  23168. - 02111-1307 USA. */
  23169. + License along with the GNU C Library; if not, see
  23170. + <http://www.gnu.org/licenses/>. */
  23171. #ifndef _ERR_H
  23172. #define _ERR_H 1
  23173. @@ -32,30 +31,26 @@
  23174. /* Print "program: ", FORMAT, ": ", the standard error string for errno,
  23175. and a newline, on stderr. */
  23176. -extern void warn (__const char *__format, ...)
  23177. +extern void warn (const char *__format, ...)
  23178. __attribute__ ((__format__ (__printf__, 1, 2)));
  23179. -extern void vwarn (__const char *__format, __gnuc_va_list)
  23180. +extern void vwarn (const char *__format, __gnuc_va_list)
  23181. __attribute__ ((__format__ (__printf__, 1, 0)));
  23182. -libc_hidden_proto(vwarn)
  23183. /* Likewise, but without ": " and the standard error string. */
  23184. -extern void warnx (__const char *__format, ...)
  23185. +extern void warnx (const char *__format, ...)
  23186. __attribute__ ((__format__ (__printf__, 1, 2)));
  23187. -extern void vwarnx (__const char *__format, __gnuc_va_list)
  23188. +extern void vwarnx (const char *__format, __gnuc_va_list)
  23189. __attribute__ ((__format__ (__printf__, 1, 0)));
  23190. -libc_hidden_proto(vwarnx)
  23191. /* Likewise, and then exit with STATUS. */
  23192. -extern void err (int __status, __const char *__format, ...)
  23193. +extern void err (int __status, const char *__format, ...)
  23194. __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3)));
  23195. -extern void verr (int __status, __const char *__format, __gnuc_va_list)
  23196. +extern void verr (int __status, const char *__format, __gnuc_va_list)
  23197. __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0)));
  23198. -libc_hidden_proto(verr)
  23199. -extern void errx (int __status, __const char *__format, ...)
  23200. +extern void errx (int __status, const char *__format, ...)
  23201. __attribute__ ((__noreturn__, __format__ (__printf__, 2, 3)));
  23202. -extern void verrx (int __status, __const char *, __gnuc_va_list)
  23203. +extern void verrx (int __status, const char *, __gnuc_va_list)
  23204. __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0)));
  23205. -libc_hidden_proto(verrx)
  23206. __END_DECLS
  23207. diff -Nur uClibc-0.9.33.2/include/errno.h uClibc-git/include/errno.h
  23208. --- uClibc-0.9.33.2/include/errno.h 2012-05-15 09:20:09.000000000 +0200
  23209. +++ uClibc-git/include/errno.h 2014-07-25 20:36:04.977325106 +0200
  23210. @@ -12,9 +12,8 @@
  23211. Lesser General Public License for more details.
  23212. You should have received a copy of the GNU Lesser General Public
  23213. - License along with the GNU C Library; if not, write to the Free
  23214. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  23215. - 02111-1307 USA. */
  23216. + License along with the GNU C Library; if not, see
  23217. + <http://www.gnu.org/licenses/>. */
  23218. /*
  23219. * ISO C99 Standard: 7.5 Errors <errno.h>
  23220. @@ -47,6 +46,11 @@
  23221. extern int errno;
  23222. #endif
  23223. +#ifdef _LIBC
  23224. +# ifdef __UCLIBC_HAS___PROGNAME__
  23225. +extern const char *__progname, *__progname_full;
  23226. +# endif
  23227. +#endif
  23228. #if defined __USE_GNU && defined __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__
  23229. /* The full and simple forms of the name with which the program was
  23230. diff -Nur uClibc-0.9.33.2/include/error.h uClibc-git/include/error.h
  23231. --- uClibc-0.9.33.2/include/error.h 2012-05-15 09:20:09.000000000 +0200
  23232. +++ uClibc-git/include/error.h 2014-07-25 20:36:04.977325106 +0200
  23233. @@ -13,9 +13,8 @@
  23234. Lesser General Public License for more details.
  23235. You should have received a copy of the GNU Lesser General Public
  23236. - License along with the GNU C Library; if not, write to the Free
  23237. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  23238. - 02111-1307 USA. */
  23239. + License along with the GNU C Library; if not, see
  23240. + <http://www.gnu.org/licenses/>. */
  23241. #ifndef _ERROR_H
  23242. #define _ERROR_H 1
  23243. diff -Nur uClibc-0.9.33.2/include/execinfo.h uClibc-git/include/execinfo.h
  23244. --- uClibc-0.9.33.2/include/execinfo.h 2012-05-15 09:20:09.000000000 +0200
  23245. +++ uClibc-git/include/execinfo.h 2014-07-25 20:36:04.977325106 +0200
  23246. @@ -12,9 +12,8 @@
  23247. Lesser General Public License for more details.
  23248. You should have received a copy of the GNU Lesser General Public
  23249. - License along with the GNU C Library; if not, write to the Free
  23250. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  23251. - 02111-1307 USA. */
  23252. + License along with the GNU C Library; if not, see
  23253. + <http://www.gnu.org/licenses/>. */
  23254. #ifndef _EXECINFO_H
  23255. #define _EXECINFO_H 1
  23256. @@ -30,13 +29,13 @@
  23257. /* Return names of functions from the backtrace list in ARRAY in a newly
  23258. malloc()ed memory block. */
  23259. -extern char **backtrace_symbols (void *__const *__array, int __size)
  23260. +extern char **backtrace_symbols (void *const *__array, int __size)
  23261. __THROW __nonnull ((1));
  23262. /* This function is similar to backtrace_symbols() but it writes the result
  23263. immediately to a file. */
  23264. -extern void backtrace_symbols_fd (void *__const *__array, int __size, int __fd)
  23265. +extern void backtrace_symbols_fd (void *const *__array, int __size, int __fd)
  23266. __THROW __nonnull ((1));
  23267. __END_DECLS
  23268. diff -Nur uClibc-0.9.33.2/include/fcntl.h uClibc-git/include/fcntl.h
  23269. --- uClibc-0.9.33.2/include/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  23270. +++ uClibc-git/include/fcntl.h 2014-07-25 20:36:04.977325106 +0200
  23271. @@ -13,9 +13,8 @@
  23272. Lesser General Public License for more details.
  23273. You should have received a copy of the GNU Lesser General Public
  23274. - License along with the GNU C Library; if not, write to the Free
  23275. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  23276. - 02111-1307 USA. */
  23277. + License along with the GNU C Library; if not, see
  23278. + <http://www.gnu.org/licenses/>. */
  23279. /*
  23280. * POSIX Standard: 6.5 File Control Operations <fcntl.h>
  23281. @@ -75,7 +74,10 @@
  23282. __THROW. */
  23283. #if !defined(__USE_FILE_OFFSET64) || defined(__LP64__)
  23284. extern int fcntl (int __fd, int __cmd, ...);
  23285. +# ifdef _LIBC
  23286. +extern int __fcntl_nocancel(int, int, long) attribute_hidden;
  23287. libc_hidden_proto(fcntl)
  23288. +# endif
  23289. #else
  23290. # ifdef __REDIRECT
  23291. extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64);
  23292. @@ -85,7 +87,10 @@
  23293. #endif
  23294. #if defined(__USE_LARGEFILE64) && !defined(__LP64__)
  23295. extern int fcntl64 (int __fd, int __cmd, ...);
  23296. +# ifdef _LIBC
  23297. +extern int __fcntl64_nocancel(int, int, long) attribute_hidden;
  23298. libc_hidden_proto(fcntl64)
  23299. +# endif
  23300. #endif
  23301. /* Open FILE and return a new file descriptor for it, or -1 on error.
  23302. @@ -95,18 +100,22 @@
  23303. This function is a cancellation point and therefore not marked with
  23304. __THROW. */
  23305. #ifndef __USE_FILE_OFFSET64
  23306. -extern int open (__const char *__file, int __oflag, ...) __nonnull ((1));
  23307. +extern int open (const char *__file, int __oflag, ...) __nonnull ((1));
  23308. libc_hidden_proto(open)
  23309. +# ifdef _LIBC
  23310. +extern int __open2_nocancel(const char *, int) __nonnull ((1)) attribute_hidden;
  23311. +extern int __open_nocancel(const char *, int, mode_t) __nonnull ((1)) attribute_hidden;
  23312. +# endif
  23313. #else
  23314. # ifdef __REDIRECT
  23315. -extern int __REDIRECT (open, (__const char *__file, int __oflag, ...), open64)
  23316. +extern int __REDIRECT (open, (const char *__file, int __oflag, ...), open64)
  23317. __nonnull ((1));
  23318. # else
  23319. # define open open64
  23320. # endif
  23321. #endif
  23322. #ifdef __USE_LARGEFILE64
  23323. -extern int open64 (__const char *__file, int __oflag, ...) __nonnull ((1));
  23324. +extern int open64 (const char *__file, int __oflag, ...) __nonnull ((1));
  23325. libc_hidden_proto(open64)
  23326. #endif
  23327. @@ -121,21 +130,20 @@
  23328. This function is a cancellation point and therefore not marked with
  23329. __THROW. */
  23330. # ifndef __USE_FILE_OFFSET64
  23331. -extern int openat (int __fd, __const char *__file, int __oflag, ...)
  23332. +extern int openat (int __fd, const char *__file, int __oflag, ...)
  23333. __nonnull ((2));
  23334. libc_hidden_proto(openat)
  23335. # else
  23336. # ifdef __REDIRECT
  23337. -extern int __REDIRECT (openat, (int __fd, __const char *__file, int __oflag,
  23338. +extern int __REDIRECT (openat, (int __fd, const char *__file, int __oflag,
  23339. ...), openat64) __nonnull ((2));
  23340. # else
  23341. # define openat openat64
  23342. # endif
  23343. # endif
  23344. -extern int openat64 (int __fd, __const char *__file, int __oflag, ...)
  23345. +extern int openat64 (int __fd, const char *__file, int __oflag, ...)
  23346. __nonnull ((2));
  23347. -libc_hidden_proto(openat64)
  23348. #endif
  23349. /* Create and open FILE, with mode MODE. This takes an `int' MODE
  23350. @@ -144,17 +152,17 @@
  23351. This function is a cancellation point and therefore not marked with
  23352. __THROW. */
  23353. #ifndef __USE_FILE_OFFSET64
  23354. -extern int creat (__const char *__file, __mode_t __mode) __nonnull ((1));
  23355. +extern int creat (const char *__file, __mode_t __mode) __nonnull ((1));
  23356. #else
  23357. # ifdef __REDIRECT
  23358. -extern int __REDIRECT (creat, (__const char *__file, __mode_t __mode),
  23359. +extern int __REDIRECT (creat, (const char *__file, __mode_t __mode),
  23360. creat64) __nonnull ((1));
  23361. # else
  23362. # define creat creat64
  23363. # endif
  23364. #endif
  23365. #ifdef __USE_LARGEFILE64
  23366. -extern int creat64 (__const char *__file, __mode_t __mode) __nonnull ((1));
  23367. +extern int creat64 (const char *__file, __mode_t __mode) __nonnull ((1));
  23368. #endif
  23369. #if !defined F_LOCK && (defined __USE_MISC || (defined __USE_XOPEN_EXTENDED \
  23370. @@ -184,7 +192,6 @@
  23371. # endif
  23372. # ifdef __USE_LARGEFILE64
  23373. extern int lockf64 (int __fd, int __cmd, __off64_t __len);
  23374. -libc_hidden_proto(lockf64)
  23375. # endif
  23376. #endif
  23377. @@ -210,9 +217,7 @@
  23378. #endif
  23379. -#if 0 /* && defined __UCLIBC_HAS_ADVANCED_REALTIME__ */
  23380. -
  23381. -/* FIXME -- uClibc should probably implement these... */
  23382. +#if defined __UCLIBC_HAS_ADVANCED_REALTIME__
  23383. /* Reserve storage for the data of the file associated with FD.
  23384. @@ -234,11 +239,6 @@
  23385. # endif
  23386. #endif
  23387. -#ifdef _LIBC
  23388. -extern int __fcntl_nocancel (int fd, int cmd, ...);
  23389. -libc_hidden_proto(__fcntl_nocancel)
  23390. -#endif
  23391. -
  23392. __END_DECLS
  23393. #endif /* fcntl.h */
  23394. diff -Nur uClibc-0.9.33.2/include/features.h uClibc-git/include/features.h
  23395. --- uClibc-0.9.33.2/include/features.h 2012-05-15 09:20:09.000000000 +0200
  23396. +++ uClibc-git/include/features.h 2014-07-25 20:36:04.977325106 +0200
  23397. @@ -12,9 +12,8 @@
  23398. Lesser General Public License for more details.
  23399. You should have received a copy of the GNU Lesser General Public
  23400. - License along with the GNU C Library; if not, write to the Free
  23401. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  23402. - 02111-1307 USA. */
  23403. + License along with the GNU C Library; if not, see
  23404. + <http://www.gnu.org/licenses/>. */
  23405. #ifndef _FEATURES_H
  23406. #define _FEATURES_H 1
  23407. diff -Nur uClibc-0.9.33.2/include/fenv.h uClibc-git/include/fenv.h
  23408. --- uClibc-0.9.33.2/include/fenv.h 2012-05-15 09:20:09.000000000 +0200
  23409. +++ uClibc-git/include/fenv.h 2014-07-25 20:36:04.977325106 +0200
  23410. @@ -12,9 +12,8 @@
  23411. Lesser General Public License for more details.
  23412. You should have received a copy of the GNU Lesser General Public
  23413. - License along with the GNU C Library; if not, write to the Free
  23414. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  23415. - 02111-1307 USA. */
  23416. + License along with the GNU C Library; if not, see
  23417. + <http://www.gnu.org/licenses/>. */
  23418. /*
  23419. * ISO C99 7.6: Floating-point environment <fenv.h>
  23420. @@ -73,7 +72,7 @@
  23421. /* Set complete status for exceptions indicated by EXCEPTS according to
  23422. the representation in the object pointed to by FLAGP. */
  23423. -extern int fesetexceptflag (__const fexcept_t *__flagp, int __excepts) __THROW;
  23424. +extern int fesetexceptflag (const fexcept_t *__flagp, int __excepts) __THROW;
  23425. /* Determine which of subset of the exceptions specified by EXCEPTS are
  23426. currently set. */
  23427. @@ -102,12 +101,12 @@
  23428. /* Establish the floating-point environment represented by the object
  23429. pointed to by ENVP. */
  23430. -extern int fesetenv (__const fenv_t *__envp) __THROW;
  23431. +extern int fesetenv (const fenv_t *__envp) __THROW;
  23432. /* Save current exceptions in temporary storage, install environment
  23433. represented by object pointed to by ENVP and raise exceptions
  23434. according to saved exceptions. */
  23435. -extern int feupdateenv (__const fenv_t *__envp) __THROW;
  23436. +extern int feupdateenv (const fenv_t *__envp) __THROW;
  23437. /* Include optimization. */
  23438. diff -Nur uClibc-0.9.33.2/include/fnmatch.h uClibc-git/include/fnmatch.h
  23439. --- uClibc-0.9.33.2/include/fnmatch.h 2012-05-15 09:20:09.000000000 +0200
  23440. +++ uClibc-git/include/fnmatch.h 2014-07-25 20:36:04.977325106 +0200
  23441. @@ -12,9 +12,8 @@
  23442. Lesser General Public License for more details.
  23443. You should have received a copy of the GNU Lesser General Public
  23444. - License along with the GNU C Library; if not, write to the Free
  23445. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  23446. - 02111-1307 USA. */
  23447. + License along with the GNU C Library; if not, see
  23448. + <http://www.gnu.org/licenses/>. */
  23449. #ifndef _FNMATCH_H
  23450. #define _FNMATCH_H 1
  23451. @@ -23,14 +22,6 @@
  23452. extern "C" {
  23453. #endif
  23454. -#ifndef const
  23455. -# if (defined __STDC__ && __STDC__) || defined __cplusplus
  23456. -# define __const const
  23457. -# else
  23458. -# define __const
  23459. -# endif
  23460. -#endif
  23461. -
  23462. /* We #undef these before defining them because some losing systems
  23463. (HP-UX A.08.07 for example) define these in <unistd.h>. */
  23464. #undef FNM_PATHNAME
  23465. @@ -62,7 +53,7 @@
  23466. /* Match NAME against the filename pattern PATTERN,
  23467. returning zero if it matches, FNM_NOMATCH if not. */
  23468. -extern int fnmatch (__const char *__pattern, __const char *__name,
  23469. +extern int fnmatch (const char *__pattern, const char *__name,
  23470. int __flags);
  23471. libc_hidden_proto(fnmatch)
  23472. diff -Nur uClibc-0.9.33.2/include/ftw.h uClibc-git/include/ftw.h
  23473. --- uClibc-0.9.33.2/include/ftw.h 2012-05-15 09:20:09.000000000 +0200
  23474. +++ uClibc-git/include/ftw.h 2014-07-25 20:36:04.977325106 +0200
  23475. @@ -12,9 +12,8 @@
  23476. Lesser General Public License for more details.
  23477. You should have received a copy of the GNU Lesser General Public
  23478. - License along with the GNU C Library; if not, write to the Free
  23479. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  23480. - 02111-1307 USA. */
  23481. + License along with the GNU C Library; if not, see
  23482. + <http://www.gnu.org/licenses/>. */
  23483. /*
  23484. * X/Open Portability Guide 4.2: ftw.h
  23485. @@ -112,19 +111,19 @@
  23486. /* Convenient types for callback functions. */
  23487. -typedef int (*__ftw_func_t) (__const char *__filename,
  23488. - __const struct stat *__status, int __flag);
  23489. +typedef int (*__ftw_func_t) (const char *__filename,
  23490. + const struct stat *__status, int __flag);
  23491. #ifdef __USE_LARGEFILE64
  23492. -typedef int (*__ftw64_func_t) (__const char *__filename,
  23493. - __const struct stat64 *__status, int __flag);
  23494. +typedef int (*__ftw64_func_t) (const char *__filename,
  23495. + const struct stat64 *__status, int __flag);
  23496. #endif
  23497. #ifdef __USE_XOPEN_EXTENDED
  23498. -typedef int (*__nftw_func_t) (__const char *__filename,
  23499. - __const struct stat *__status, int __flag,
  23500. +typedef int (*__nftw_func_t) (const char *__filename,
  23501. + const struct stat *__status, int __flag,
  23502. struct FTW *__info);
  23503. # ifdef __USE_LARGEFILE64
  23504. -typedef int (*__nftw64_func_t) (__const char *__filename,
  23505. - __const struct stat64 *__status,
  23506. +typedef int (*__nftw64_func_t) (const char *__filename,
  23507. + const struct stat64 *__status,
  23508. int __flag, struct FTW *__info);
  23509. # endif
  23510. #endif
  23511. @@ -135,18 +134,18 @@
  23512. This function is a possible cancellation point and therefore not
  23513. marked with __THROW. */
  23514. # ifndef __USE_FILE_OFFSET64
  23515. -extern int ftw (__const char *__dir, __ftw_func_t __func, int __descriptors)
  23516. +extern int ftw (const char *__dir, __ftw_func_t __func, int __descriptors)
  23517. __nonnull ((1, 2));
  23518. # else
  23519. # ifdef __REDIRECT
  23520. -extern int __REDIRECT (ftw, (__const char *__dir, __ftw_func_t __func,
  23521. +extern int __REDIRECT (ftw, (const char *__dir, __ftw_func_t __func,
  23522. int __descriptors), ftw64) __nonnull ((1, 2));
  23523. # else
  23524. # define ftw ftw64
  23525. # endif
  23526. # endif
  23527. # ifdef __USE_LARGEFILE64
  23528. -extern int ftw64 (__const char *__dir, __ftw64_func_t __func,
  23529. +extern int ftw64 (const char *__dir, __ftw64_func_t __func,
  23530. int __descriptors) __nonnull ((1, 2));
  23531. # endif
  23532. #endif
  23533. @@ -158,11 +157,11 @@
  23534. This function is a possible cancellation point and therefore not
  23535. marked with __THROW. */
  23536. # ifndef __USE_FILE_OFFSET64
  23537. -extern int nftw (__const char *__dir, __nftw_func_t __func, int __descriptors,
  23538. +extern int nftw (const char *__dir, __nftw_func_t __func, int __descriptors,
  23539. int __flag) __nonnull ((1, 2));
  23540. # else
  23541. # ifdef __REDIRECT
  23542. -extern int __REDIRECT (nftw, (__const char *__dir, __nftw_func_t __func,
  23543. +extern int __REDIRECT (nftw, (const char *__dir, __nftw_func_t __func,
  23544. int __descriptors, int __flag), nftw64)
  23545. __nonnull ((1, 2));
  23546. # else
  23547. @@ -170,7 +169,7 @@
  23548. # endif
  23549. # endif
  23550. # ifdef __USE_LARGEFILE64
  23551. -extern int nftw64 (__const char *__dir, __nftw64_func_t __func,
  23552. +extern int nftw64 (const char *__dir, __nftw64_func_t __func,
  23553. int __descriptors, int __flag) __nonnull ((1, 2));
  23554. # endif
  23555. #endif
  23556. diff -Nur uClibc-0.9.33.2/include/.gitignore uClibc-git/include/.gitignore
  23557. --- uClibc-0.9.33.2/include/.gitignore 2012-05-15 09:20:09.000000000 +0200
  23558. +++ uClibc-git/include/.gitignore 2014-07-25 20:36:04.961325022 +0200
  23559. @@ -8,6 +8,7 @@
  23560. #
  23561. /bits/
  23562. /config/
  23563. +/generated/
  23564. /bfin_fixed_code.h
  23565. /bfin_l1layout.h
  23566. @@ -15,6 +16,9 @@
  23567. /dl-osinfo.h
  23568. /fpu_control.h
  23569. /hp-timing.h
  23570. +/jmpbuf-offsets.h
  23571. +/jmpbuf-unwind.h
  23572. +/not-cancel.h
  23573. /pthread.h
  23574. /semaphore.h
  23575. /thread_db.h
  23576. diff -Nur uClibc-0.9.33.2/include/glob.h uClibc-git/include/glob.h
  23577. --- uClibc-0.9.33.2/include/glob.h 2012-05-15 09:20:09.000000000 +0200
  23578. +++ uClibc-git/include/glob.h 2014-07-25 20:36:04.977325106 +0200
  23579. @@ -12,9 +12,8 @@
  23580. Lesser General Public License for more details.
  23581. You should have received a copy of the GNU Lesser General Public
  23582. - License along with the GNU C Library; if not, write to the Free
  23583. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  23584. - 02111-1307 USA. */
  23585. + License along with the GNU C Library; if not, see
  23586. + <http://www.gnu.org/licenses/>. */
  23587. #ifndef _GLOB_H
  23588. #define _GLOB_H 1
  23589. @@ -110,13 +109,13 @@
  23590. #else
  23591. void *(*gl_readdir) (void *);
  23592. #endif
  23593. - void *(*gl_opendir) (__const char *);
  23594. + void *(*gl_opendir) (const char *);
  23595. #ifdef __USE_GNU
  23596. - int (*gl_lstat) (__const char *__restrict, struct stat *__restrict);
  23597. - int (*gl_stat) (__const char *__restrict, struct stat *__restrict);
  23598. + int (*gl_lstat) (const char *__restrict, struct stat *__restrict);
  23599. + int (*gl_stat) (const char *__restrict, struct stat *__restrict);
  23600. #else
  23601. - int (*gl_lstat) (__const char *__restrict, void *__restrict);
  23602. - int (*gl_stat) (__const char *__restrict, void *__restrict);
  23603. + int (*gl_lstat) (const char *__restrict, void *__restrict);
  23604. + int (*gl_stat) (const char *__restrict, void *__restrict);
  23605. #endif
  23606. #endif
  23607. #endif /* __UCLIBC_HAS_GNU_GLOB__ */
  23608. @@ -143,13 +142,13 @@
  23609. # else
  23610. void *(*gl_readdir) (void *);
  23611. # endif
  23612. - void *(*gl_opendir) (__const char *);
  23613. + void *(*gl_opendir) (const char *);
  23614. # ifdef __USE_GNU
  23615. - int (*gl_lstat) (__const char *__restrict, struct stat64 *__restrict);
  23616. - int (*gl_stat) (__const char *__restrict, struct stat64 *__restrict);
  23617. + int (*gl_lstat) (const char *__restrict, struct stat64 *__restrict);
  23618. + int (*gl_stat) (const char *__restrict, struct stat64 *__restrict);
  23619. # else
  23620. - int (*gl_lstat) (__const char *__restrict, void *__restrict);
  23621. - int (*gl_stat) (__const char *__restrict, void *__restrict);
  23622. + int (*gl_lstat) (const char *__restrict, void *__restrict);
  23623. + int (*gl_stat) (const char *__restrict, void *__restrict);
  23624. # endif
  23625. #endif
  23626. #endif /* __UCLIBC_HAS_GNU_GLOB__ */
  23627. @@ -170,8 +169,8 @@
  23628. If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
  23629. Otherwise, `glob' returns zero. */
  23630. #if !defined __USE_FILE_OFFSET64 || __GNUC__ < 2
  23631. -extern int glob (__const char *__restrict __pattern, int __flags,
  23632. - int (*__errfunc) (__const char *, int),
  23633. +extern int glob (const char *__restrict __pattern, int __flags,
  23634. + int (*__errfunc) (const char *, int),
  23635. glob_t *__restrict __pglob) __THROW;
  23636. libc_hidden_proto(glob)
  23637. @@ -179,17 +178,17 @@
  23638. extern void globfree (glob_t *__pglob) __THROW;
  23639. libc_hidden_proto(globfree)
  23640. #else
  23641. -extern int __REDIRECT_NTH (glob, (__const char *__restrict __pattern,
  23642. +extern int __REDIRECT_NTH (glob, (const char *__restrict __pattern,
  23643. int __flags,
  23644. - int (*__errfunc) (__const char *, int),
  23645. + int (*__errfunc) (const char *, int),
  23646. glob_t *__restrict __pglob), glob64);
  23647. extern void __REDIRECT_NTH (globfree, (glob_t *__pglob), globfree64);
  23648. #endif
  23649. #ifdef __USE_LARGEFILE64
  23650. -extern int glob64 (__const char *__restrict __pattern, int __flags,
  23651. - int (*__errfunc) (__const char *, int),
  23652. +extern int glob64 (const char *__restrict __pattern, int __flags,
  23653. + int (*__errfunc) (const char *, int),
  23654. glob64_t *__restrict __pglob) __THROW;
  23655. libc_hidden_proto(glob64)
  23656. @@ -204,7 +203,7 @@
  23657. This function is not part of the interface specified by POSIX.2
  23658. but several programs want to use it. */
  23659. -extern int glob_pattern_p (__const char *__pattern, int __quote) __THROW;
  23660. +extern int glob_pattern_p (const char *__pattern, int __quote) __THROW;
  23661. libc_hidden_proto(glob_pattern_p)
  23662. #endif
  23663. diff -Nur uClibc-0.9.33.2/include/gnu-versions.h uClibc-git/include/gnu-versions.h
  23664. --- uClibc-0.9.33.2/include/gnu-versions.h 2012-05-15 09:20:09.000000000 +0200
  23665. +++ uClibc-git/include/gnu-versions.h 2014-07-25 20:36:04.977325106 +0200
  23666. @@ -13,9 +13,8 @@
  23667. Lesser General Public License for more details.
  23668. You should have received a copy of the GNU Lesser General Public
  23669. - License along with the GNU C Library; if not, write to the Free
  23670. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  23671. - 02111-1307 USA. */
  23672. + License along with the GNU C Library; if not, see
  23673. + <http://www.gnu.org/licenses/>. */
  23674. #ifndef _GNU_VERSIONS_H
  23675. #define _GNU_VERSIONS_H 1
  23676. diff -Nur uClibc-0.9.33.2/include/grp.h uClibc-git/include/grp.h
  23677. --- uClibc-0.9.33.2/include/grp.h 2012-05-15 09:20:09.000000000 +0200
  23678. +++ uClibc-git/include/grp.h 2014-07-25 20:36:04.977325106 +0200
  23679. @@ -12,9 +12,8 @@
  23680. Lesser General Public License for more details.
  23681. You should have received a copy of the GNU Lesser General Public
  23682. - License along with the GNU C Library; if not, write to the Free
  23683. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  23684. - 02111-1307 USA. */
  23685. + License along with the GNU C Library; if not, see
  23686. + <http://www.gnu.org/licenses/>. */
  23687. /*
  23688. * POSIX Standard: 9.2.1 Group Database Access <grp.h>
  23689. @@ -92,7 +91,7 @@
  23690. cancellation point. But due to similarity with an POSIX interface
  23691. or due to the implementation it is a cancellation point and
  23692. therefore not marked with __THROW. */
  23693. -extern int putgrent (__const struct group *__restrict __p,
  23694. +extern int putgrent (const struct group *__restrict __p,
  23695. FILE *__restrict __f);
  23696. #endif
  23697. @@ -106,7 +105,7 @@
  23698. This function is a possible cancellation point and therefore not
  23699. marked with __THROW. */
  23700. -extern struct group *getgrnam (__const char *__name);
  23701. +extern struct group *getgrnam (const char *__name);
  23702. #if defined __USE_POSIX || defined __USE_MISC
  23703. @@ -149,7 +148,7 @@
  23704. This function is a possible cancellation point and therefore not
  23705. marked with __THROW. */
  23706. -extern int getgrnam_r (__const char *__restrict __name,
  23707. +extern int getgrnam_r (const char *__restrict __name,
  23708. struct group *__restrict __resultbuf,
  23709. char *__restrict __buffer, size_t __buflen,
  23710. struct group **__restrict __result);
  23711. @@ -187,7 +186,7 @@
  23712. cancellation point. But due to similarity with an POSIX interface
  23713. or due to the implementation it is a cancellation point and
  23714. therefore not marked with __THROW. */
  23715. -extern int getgrouplist (__const char *__user, __gid_t __group,
  23716. +extern int getgrouplist (const char *__user, __gid_t __group,
  23717. __gid_t *__groups, int *__ngroups);
  23718. #endif
  23719. @@ -195,7 +194,7 @@
  23720. #if defined __USE_BSD
  23721. /* Set the group set for the current user to GROUPS (N of them). */
  23722. -extern int setgroups (size_t __n, __const __gid_t *__groups) __THROW;
  23723. +extern int setgroups (size_t __n, const __gid_t *__groups) __THROW;
  23724. libc_hidden_proto(setgroups)
  23725. /* Initialize the group set for the current user
  23726. @@ -206,7 +205,7 @@
  23727. cancellation point. But due to similarity with an POSIX interface
  23728. or due to the implementation it is a cancellation point and
  23729. therefore not marked with __THROW. */
  23730. -extern int initgroups (__const char *__user, __gid_t __group);
  23731. +extern int initgroups (const char *__user, __gid_t __group);
  23732. #endif /* Use BSD. */
  23733. diff -Nur uClibc-0.9.33.2/include/iconv.h uClibc-git/include/iconv.h
  23734. --- uClibc-0.9.33.2/include/iconv.h 2012-05-15 09:20:09.000000000 +0200
  23735. +++ uClibc-git/include/iconv.h 2014-07-25 20:36:04.977325106 +0200
  23736. @@ -12,9 +12,8 @@
  23737. Lesser General Public License for more details.
  23738. You should have received a copy of the GNU Lesser General Public
  23739. - License along with the GNU C Library; if not, write to the Free
  23740. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  23741. - 02111-1307 USA. */
  23742. + License along with the GNU C Library; if not, see
  23743. + <http://www.gnu.org/licenses/>. */
  23744. #ifndef _ICONV_H
  23745. #define _ICONV_H 1
  23746. @@ -39,7 +38,7 @@
  23747. This function is a possible cancellation points and therefore not
  23748. marked with __THROW. */
  23749. -extern iconv_t iconv_open (__const char *__tocode, __const char *__fromcode);
  23750. +extern iconv_t iconv_open (const char *__tocode, const char *__fromcode);
  23751. /* Convert at most *INBYTESLEFT bytes from *INBUF according to the
  23752. code conversion algorithm specified by CD and place up to
  23753. diff -Nur uClibc-0.9.33.2/include/ieee754.h uClibc-git/include/ieee754.h
  23754. --- uClibc-0.9.33.2/include/ieee754.h 2012-05-15 09:20:09.000000000 +0200
  23755. +++ uClibc-git/include/ieee754.h 2014-07-25 20:36:04.977325106 +0200
  23756. @@ -12,9 +12,8 @@
  23757. Lesser General Public License for more details.
  23758. You should have received a copy of the GNU Lesser General Public
  23759. - License along with the GNU C Library; if not, write to the Free
  23760. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  23761. - 02111-1307 USA. */
  23762. + License along with the GNU C Library; if not, see
  23763. + <http://www.gnu.org/licenses/>. */
  23764. #ifndef _IEEE754_H
  23765. diff -Nur uClibc-0.9.33.2/include/ifaddrs.h uClibc-git/include/ifaddrs.h
  23766. --- uClibc-0.9.33.2/include/ifaddrs.h 2012-05-15 09:20:09.000000000 +0200
  23767. +++ uClibc-git/include/ifaddrs.h 2014-07-25 20:36:04.977325106 +0200
  23768. @@ -13,9 +13,8 @@
  23769. Lesser General Public License for more details.
  23770. You should have received a copy of the GNU Lesser General Public
  23771. - License along with the GNU C Library; if not, write to the Free
  23772. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  23773. - 02111-1307 USA. */
  23774. + License along with the GNU C Library; if not, see
  23775. + <http://www.gnu.org/licenses/>. */
  23776. #ifndef _IFADDRS_H
  23777. #define _IFADDRS_H 1
  23778. diff -Nur uClibc-0.9.33.2/include/inttypes.h uClibc-git/include/inttypes.h
  23779. --- uClibc-0.9.33.2/include/inttypes.h 2012-05-15 09:20:09.000000000 +0200
  23780. +++ uClibc-git/include/inttypes.h 2014-07-25 20:36:04.997325210 +0200
  23781. @@ -12,9 +12,8 @@
  23782. Lesser General Public License for more details.
  23783. You should have received a copy of the GNU Lesser General Public
  23784. - License along with the GNU C Library; if not, write to the Free
  23785. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  23786. - 02111-1307 USA. */
  23787. + License along with the GNU C Library; if not, see
  23788. + <http://www.gnu.org/licenses/>. */
  23789. /*
  23790. * ISO C99: 7.8 Format conversion of integer types <inttypes.h>
  23791. @@ -304,21 +303,21 @@
  23792. __THROW __attribute__ ((__const__));
  23793. /* Like `strtol' but convert to `intmax_t'. */
  23794. -extern intmax_t strtoimax (__const char *__restrict __nptr,
  23795. +extern intmax_t strtoimax (const char *__restrict __nptr,
  23796. char **__restrict __endptr, int __base) __THROW;
  23797. /* Like `strtoul' but convert to `uintmax_t'. */
  23798. -extern uintmax_t strtoumax (__const char *__restrict __nptr,
  23799. +extern uintmax_t strtoumax (const char *__restrict __nptr,
  23800. char ** __restrict __endptr, int __base) __THROW;
  23801. #ifdef __UCLIBC_HAS_WCHAR__
  23802. /* Like `wcstol' but convert to `intmax_t'. */
  23803. -extern intmax_t wcstoimax (__const __gwchar_t *__restrict __nptr,
  23804. +extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr,
  23805. __gwchar_t **__restrict __endptr, int __base)
  23806. __THROW;
  23807. /* Like `wcstoul' but convert to `uintmax_t'. */
  23808. -extern uintmax_t wcstoumax (__const __gwchar_t *__restrict __nptr,
  23809. +extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr,
  23810. __gwchar_t ** __restrict __endptr, int __base)
  23811. __THROW;
  23812. #endif
  23813. @@ -327,44 +326,44 @@
  23814. # if __WORDSIZE == 64
  23815. -extern long int __strtol_internal (__const char *__restrict __nptr,
  23816. +extern long int __strtol_internal (const char *__restrict __nptr,
  23817. char **__restrict __endptr,
  23818. int __base, int __group)
  23819. __THROW __nonnull ((1)) __wur;
  23820. /* Like `strtol' but convert to `intmax_t'. */
  23821. __extern_inline intmax_t
  23822. -__NTH (strtoimax (__const char *__restrict nptr, char **__restrict endptr,
  23823. +__NTH (strtoimax (const char *__restrict nptr, char **__restrict endptr,
  23824. int base))
  23825. {
  23826. return __strtol_internal (nptr, endptr, base, 0);
  23827. }
  23828. -extern unsigned long int __strtoul_internal (__const char *
  23829. +extern unsigned long int __strtoul_internal (const char *
  23830. __restrict __nptr,
  23831. char ** __restrict __endptr,
  23832. int __base, int __group)
  23833. __THROW __nonnull ((1)) __wur;
  23834. /* Like `strtoul' but convert to `uintmax_t'. */
  23835. __extern_inline uintmax_t
  23836. -__NTH (strtoumax (__const char *__restrict nptr, char **__restrict endptr,
  23837. +__NTH (strtoumax (const char *__restrict nptr, char **__restrict endptr,
  23838. int base))
  23839. {
  23840. return __strtoul_internal (nptr, endptr, base, 0);
  23841. }
  23842. -extern long int __wcstol_internal (__const __gwchar_t * __restrict __nptr,
  23843. +extern long int __wcstol_internal (const __gwchar_t * __restrict __nptr,
  23844. __gwchar_t **__restrict __endptr,
  23845. int __base, int __group)
  23846. __THROW __nonnull ((1)) __wur;
  23847. /* Like `wcstol' but convert to `intmax_t'. */
  23848. __extern_inline intmax_t
  23849. -__NTH (wcstoimax (__const __gwchar_t *__restrict nptr,
  23850. +__NTH (wcstoimax (const __gwchar_t *__restrict nptr,
  23851. __gwchar_t **__restrict endptr, int base))
  23852. {
  23853. return __wcstol_internal (nptr, endptr, base, 0);
  23854. }
  23855. -extern unsigned long int __wcstoul_internal (__const __gwchar_t *
  23856. +extern unsigned long int __wcstoul_internal (const __gwchar_t *
  23857. __restrict __nptr,
  23858. __gwchar_t **
  23859. __restrict __endptr,
  23860. @@ -372,7 +371,7 @@
  23861. __THROW __nonnull ((1)) __wur;
  23862. /* Like `wcstoul' but convert to `uintmax_t'. */
  23863. __extern_inline uintmax_t
  23864. -__NTH (wcstoumax (__const __gwchar_t *__restrict nptr,
  23865. +__NTH (wcstoumax (const __gwchar_t *__restrict nptr,
  23866. __gwchar_t **__restrict endptr, int base))
  23867. {
  23868. return __wcstoul_internal (nptr, endptr, base, 0);
  23869. @@ -381,20 +380,20 @@
  23870. # else /* __WORDSIZE == 32 */
  23871. __extension__
  23872. -extern long long int __strtoll_internal (__const char *__restrict __nptr,
  23873. +extern long long int __strtoll_internal (const char *__restrict __nptr,
  23874. char **__restrict __endptr,
  23875. int __base, int __group)
  23876. __THROW __nonnull ((1)) __wur;
  23877. /* Like `strtol' but convert to `intmax_t'. */
  23878. __extern_inline intmax_t
  23879. -__NTH (strtoimax (__const char *__restrict nptr, char **__restrict endptr,
  23880. +__NTH (strtoimax (const char *__restrict nptr, char **__restrict endptr,
  23881. int base))
  23882. {
  23883. return __strtoll_internal (nptr, endptr, base, 0);
  23884. }
  23885. __extension__
  23886. -extern unsigned long long int __strtoull_internal (__const char *
  23887. +extern unsigned long long int __strtoull_internal (const char *
  23888. __restrict __nptr,
  23889. char **
  23890. __restrict __endptr,
  23891. @@ -403,21 +402,21 @@
  23892. __THROW __nonnull ((1)) __wur;
  23893. /* Like `strtoul' but convert to `uintmax_t'. */
  23894. __extern_inline uintmax_t
  23895. -__NTH (strtoumax (__const char *__restrict nptr, char **__restrict endptr,
  23896. +__NTH (strtoumax (const char *__restrict nptr, char **__restrict endptr,
  23897. int base))
  23898. {
  23899. return __strtoull_internal (nptr, endptr, base, 0);
  23900. }
  23901. __extension__
  23902. -extern long long int __wcstoll_internal (__const __gwchar_t *
  23903. +extern long long int __wcstoll_internal (const __gwchar_t *
  23904. __restrict __nptr,
  23905. __gwchar_t **__restrict __endptr,
  23906. int __base, int __group)
  23907. __THROW __nonnull ((1)) __wur;
  23908. /* Like `wcstol' but convert to `intmax_t'. */
  23909. __extern_inline intmax_t
  23910. -__NTH (wcstoimax (__const __gwchar_t *__restrict nptr,
  23911. +__NTH (wcstoimax (const __gwchar_t *__restrict nptr,
  23912. __gwchar_t **__restrict endptr, int base))
  23913. {
  23914. return __wcstoll_internal (nptr, endptr, base, 0);
  23915. @@ -425,7 +424,7 @@
  23916. __extension__
  23917. -extern unsigned long long int __wcstoull_internal (__const __gwchar_t *
  23918. +extern unsigned long long int __wcstoull_internal (const __gwchar_t *
  23919. __restrict __nptr,
  23920. __gwchar_t **
  23921. __restrict __endptr,
  23922. @@ -434,7 +433,7 @@
  23923. __THROW __nonnull ((1)) __wur;
  23924. /* Like `wcstoul' but convert to `uintmax_t'. */
  23925. __extern_inline uintmax_t
  23926. -__NTH (wcstoumax (__const __gwchar_t *__restrict nptr,
  23927. +__NTH (wcstoumax (const __gwchar_t *__restrict nptr,
  23928. __gwchar_t **__restrict endptr, int base))
  23929. {
  23930. return __wcstoull_internal (nptr, endptr, base, 0);
  23931. diff -Nur uClibc-0.9.33.2/include/langinfo.h uClibc-git/include/langinfo.h
  23932. --- uClibc-0.9.33.2/include/langinfo.h 2012-05-15 09:20:09.000000000 +0200
  23933. +++ uClibc-git/include/langinfo.h 2014-07-25 20:36:04.997325210 +0200
  23934. @@ -13,9 +13,8 @@
  23935. Lesser General Public License for more details.
  23936. You should have received a copy of the GNU Lesser General Public
  23937. - License along with the GNU C Library; if not, write to the Free
  23938. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  23939. - 02111-1307 USA. */
  23940. + License along with the GNU C Library; if not, see
  23941. + <http://www.gnu.org/licenses/>. */
  23942. #ifndef _LANGINFO_H
  23943. #define _LANGINFO_H 1
  23944. diff -Nur uClibc-0.9.33.2/include/libc-internal.h uClibc-git/include/libc-internal.h
  23945. --- uClibc-0.9.33.2/include/libc-internal.h 2012-05-15 09:20:09.000000000 +0200
  23946. +++ uClibc-git/include/libc-internal.h 2014-07-25 20:36:04.997325210 +0200
  23947. @@ -12,9 +12,8 @@
  23948. Lesser General Public License for more details.
  23949. You should have received a copy of the GNU Lesser General Public
  23950. - License along with the GNU C Library; if not, write to the Free
  23951. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  23952. - 02111-1307 USA. */
  23953. + License along with the GNU C Library; if not, see
  23954. + <http://www.gnu.org/licenses/>. */
  23955. #ifndef _LIBC_INTERNAL_H
  23956. #define _LIBC_INTERNAL_H 1
  23957. @@ -29,6 +28,9 @@
  23958. #ifdef __UCLIBC_HAS_TLS__
  23959. # define attribute_tls_model_ie __attribute__ ((tls_model ("initial-exec")))
  23960. +#else
  23961. +# define attribute_tls_model_ie
  23962. +# define __thread
  23963. #endif
  23964. /* Pull in things like __attribute_used__ */
  23965. @@ -44,12 +46,12 @@
  23966. # include <stddef.h>
  23967. /* sources are built w/ _GNU_SOURCE, this gets undefined */
  23968. -#ifdef __USE_GNU
  23969. -extern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen);
  23970. -libc_hidden_proto(__xpg_strerror_r)
  23971. -#else
  23972. +#if defined __USE_XOPEN2K && !defined __USE_GNU
  23973. extern char *__glibc_strerror_r (int __errnum, char *__buf, size_t __buflen);
  23974. libc_hidden_proto(__glibc_strerror_r)
  23975. +#else
  23976. +extern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen);
  23977. +libc_hidden_proto(__xpg_strerror_r)
  23978. #endif
  23979. /* #include <pthread.h> */
  23980. @@ -70,6 +72,10 @@
  23981. libc_hidden_proto(__chk_fail)
  23982. # endif
  23983. +# ifdef __UCLIBC_HAS_SSP__
  23984. +extern void __stack_chk_fail(void) attribute_noreturn __cold;
  23985. +# endif
  23986. +
  23987. # endif /* IS_IN_libc */
  23988. #endif /* __ASSEMBLER__ */
  23989. diff -Nur uClibc-0.9.33.2/include/libc-symbols.h uClibc-git/include/libc-symbols.h
  23990. --- uClibc-0.9.33.2/include/libc-symbols.h 2012-05-15 09:20:09.000000000 +0200
  23991. +++ uClibc-git/include/libc-symbols.h 2014-07-25 20:36:04.997325210 +0200
  23992. @@ -15,9 +15,8 @@
  23993. Lesser General Public License for more details.
  23994. You should have received a copy of the GNU Lesser General Public
  23995. - License along with the GNU C Library; if not, write to the Free
  23996. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  23997. - 02111-1307 USA. */
  23998. + License along with the GNU C Library; if not, see
  23999. + <http://www.gnu.org/licenses/>. */
  24000. #ifndef _LIBC_SYMBOLS_H
  24001. #define _LIBC_SYMBOLS_H 1
  24002. @@ -196,12 +195,12 @@
  24003. # define _strong_alias_untyped(name, aliasname) \
  24004. extern __typeof (aliasname) aliasname __attribute__ ((alias (#name)));
  24005. +# ifdef HAVE_WEAK_SYMBOLS
  24006. +
  24007. /* This comes between the return type and function name in
  24008. a function definition to make that definition weak. */
  24009. -# define weak_function __attribute__ ((weak))
  24010. -# define weak_const_function __attribute__ ((weak, __const__))
  24011. -
  24012. -# ifdef HAVE_WEAK_SYMBOLS
  24013. +# define weak_function __attribute__ ((weak))
  24014. +# define weak_const_function __attribute__ ((weak, __const__))
  24015. /* Define ALIASNAME as a weak alias for NAME.
  24016. If weak aliases are not available, this defines a strong alias. */
  24017. @@ -215,6 +214,9 @@
  24018. # else
  24019. +# define weak_function /* empty */
  24020. +# define weak_const_function __attribute__ ((__const__))
  24021. +
  24022. # define weak_alias(name, aliasname) strong_alias(name, aliasname)
  24023. # define weak_extern(symbol) /* Nothing. */
  24024. diff -Nur uClibc-0.9.33.2/include/libgen.h uClibc-git/include/libgen.h
  24025. --- uClibc-0.9.33.2/include/libgen.h 2012-05-15 09:20:09.000000000 +0200
  24026. +++ uClibc-git/include/libgen.h 2014-07-25 20:36:04.997325210 +0200
  24027. @@ -12,9 +12,8 @@
  24028. Lesser General Public License for more details.
  24029. You should have received a copy of the GNU Lesser General Public
  24030. - License along with the GNU C Library; if not, write to the Free
  24031. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24032. - 02111-1307 USA. */
  24033. + License along with the GNU C Library; if not, see
  24034. + <http://www.gnu.org/licenses/>. */
  24035. #ifndef _LIBGEN_H
  24036. #define _LIBGEN_H 1
  24037. diff -Nur uClibc-0.9.33.2/include/libintl.h uClibc-git/include/libintl.h
  24038. --- uClibc-0.9.33.2/include/libintl.h 2012-05-15 09:20:09.000000000 +0200
  24039. +++ uClibc-git/include/libintl.h 2014-07-25 20:36:04.997325210 +0200
  24040. @@ -14,15 +14,16 @@
  24041. Lesser General Public License for more details.
  24042. You should have received a copy of the GNU Lesser General Public
  24043. - License along with the GNU C Library; if not, write to the Free
  24044. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24045. - 02111-1307 USA. */
  24046. + License along with the GNU C Library; if not, see
  24047. + <http://www.gnu.org/licenses/>. */
  24048. #ifndef _LIBINTL_H
  24049. #define _LIBINTL_H 1
  24050. #include <features.h>
  24051. +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
  24052. +
  24053. /* We define an additional symbol to signal that we use the GNU
  24054. implementation of gettext. */
  24055. #define __USE_GNU_GETTEXT 1
  24056. @@ -37,46 +38,46 @@
  24057. /* Look up MSGID in the current default message catalog for the current
  24058. LC_MESSAGES locale. If not found, returns MSGID itself (the default
  24059. text). */
  24060. -extern char *gettext (__const char *__msgid)
  24061. +extern char *gettext (const char *__msgid)
  24062. __THROW __attribute_format_arg__ (1);
  24063. /* Look up MSGID in the DOMAINNAME message catalog for the current
  24064. LC_MESSAGES locale. */
  24065. -extern char *dgettext (__const char *__domainname, __const char *__msgid)
  24066. +extern char *dgettext (const char *__domainname, const char *__msgid)
  24067. __THROW __attribute_format_arg__ (2);
  24068. #if 0 /* uClibc: disabled */
  24069. -extern char *__dgettext (__const char *__domainname, __const char *__msgid)
  24070. +extern char *__dgettext (const char *__domainname, const char *__msgid)
  24071. __THROW __attribute_format_arg__ (2);
  24072. #endif
  24073. /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
  24074. locale. */
  24075. -extern char *dcgettext (__const char *__domainname,
  24076. - __const char *__msgid, int __category)
  24077. +extern char *dcgettext (const char *__domainname,
  24078. + const char *__msgid, int __category)
  24079. __THROW __attribute_format_arg__ (2);
  24080. #if 0 /* uClibc: disabled */
  24081. -extern char *__dcgettext (__const char *__domainname,
  24082. - __const char *__msgid, int __category)
  24083. +extern char *__dcgettext (const char *__domainname,
  24084. + const char *__msgid, int __category)
  24085. __THROW __attribute_format_arg__ (2);
  24086. #endif
  24087. /* Similar to `gettext' but select the plural form corresponding to the
  24088. number N. */
  24089. -extern char *ngettext (__const char *__msgid1, __const char *__msgid2,
  24090. +extern char *ngettext (const char *__msgid1, const char *__msgid2,
  24091. unsigned long int __n)
  24092. __THROW __attribute_format_arg__ (1) __attribute_format_arg__ (2);
  24093. /* Similar to `dgettext' but select the plural form corresponding to the
  24094. number N. */
  24095. -extern char *dngettext (__const char *__domainname, __const char *__msgid1,
  24096. - __const char *__msgid2, unsigned long int __n)
  24097. +extern char *dngettext (const char *__domainname, const char *__msgid1,
  24098. + const char *__msgid2, unsigned long int __n)
  24099. __THROW __attribute_format_arg__ (2) __attribute_format_arg__ (3);
  24100. /* Similar to `dcgettext' but select the plural form corresponding to the
  24101. number N. */
  24102. -extern char *dcngettext (__const char *__domainname, __const char *__msgid1,
  24103. - __const char *__msgid2, unsigned long int __n,
  24104. +extern char *dcngettext (const char *__domainname, const char *__msgid1,
  24105. + const char *__msgid2, unsigned long int __n,
  24106. int __category)
  24107. __THROW __attribute_format_arg__ (2) __attribute_format_arg__ (3);
  24108. @@ -84,17 +85,17 @@
  24109. /* Set the current default message catalog to DOMAINNAME.
  24110. If DOMAINNAME is null, return the current default.
  24111. If DOMAINNAME is "", reset to the default of "messages". */
  24112. -extern char *textdomain (__const char *__domainname) __THROW;
  24113. +extern char *textdomain (const char *__domainname) __THROW;
  24114. /* Specify that the DOMAINNAME message catalog will be found
  24115. in DIRNAME rather than in the system locale data base. */
  24116. -extern char *bindtextdomain (__const char *__domainname,
  24117. - __const char *__dirname) __THROW;
  24118. +extern char *bindtextdomain (const char *__domainname,
  24119. + const char *__dirname) __THROW;
  24120. /* Specify the character encoding in which the messages from the
  24121. DOMAINNAME message catalog will be returned. */
  24122. -extern char *bind_textdomain_codeset (__const char *__domainname,
  24123. - __const char *__codeset) __THROW;
  24124. +extern char *bind_textdomain_codeset (const char *__domainname,
  24125. + const char *__codeset) __THROW;
  24126. /* Optimized version of the function above. */
  24127. @@ -125,4 +126,15 @@
  24128. __END_DECLS
  24129. +#else
  24130. +
  24131. +#define gettext(msgid) ((const char *) (msgid))
  24132. +
  24133. +#endif /* __UCLIBC_HAS_GETTEXT_AWARENESS__ */
  24134. +
  24135. +#ifdef _LIBC
  24136. +# define _(x) gettext(x)
  24137. +# define N_(x) x
  24138. +#endif
  24139. +
  24140. #endif /* libintl.h */
  24141. diff -Nur uClibc-0.9.33.2/include/limits.h uClibc-git/include/limits.h
  24142. --- uClibc-0.9.33.2/include/limits.h 2012-05-15 09:20:09.000000000 +0200
  24143. +++ uClibc-git/include/limits.h 2014-07-25 20:36:04.997325210 +0200
  24144. @@ -13,9 +13,8 @@
  24145. Lesser General Public License for more details.
  24146. You should have received a copy of the GNU Lesser General Public
  24147. - License along with the GNU C Library; if not, write to the Free
  24148. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24149. - 02111-1307 USA. */
  24150. + License along with the GNU C Library; if not, see
  24151. + <http://www.gnu.org/licenses/>. */
  24152. /*
  24153. * ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types <limits.h>
  24154. diff -Nur uClibc-0.9.33.2/include/link.h uClibc-git/include/link.h
  24155. --- uClibc-0.9.33.2/include/link.h 2012-05-15 09:20:09.000000000 +0200
  24156. +++ uClibc-git/include/link.h 2014-07-25 20:36:04.997325210 +0200
  24157. @@ -14,9 +14,8 @@
  24158. Lesser General Public License for more details.
  24159. You should have received a copy of the GNU Lesser General Public
  24160. - License along with the GNU C Library; if not, write to the Free
  24161. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24162. - 02111-1307 USA. */
  24163. + License along with the GNU C Library; if not, see
  24164. + <http://www.gnu.org/licenses/>. */
  24165. #ifndef _LINK_H
  24166. #define _LINK_H 1
  24167. @@ -110,7 +109,7 @@
  24168. char *l_name; /* Absolute file name object was found in. */
  24169. ElfW(Dyn) *l_ld; /* Dynamic section of the shared object. */
  24170. struct link_map *l_next, *l_prev; /* Chain of loaded objects. */
  24171. -
  24172. +#ifdef _LIBC
  24173. #if defined(USE_TLS) && USE_TLS
  24174. /* Thread-local storage related info. */
  24175. @@ -134,6 +133,7 @@
  24176. /* Nonzero if _dl_init_static_tls should be called for this module */
  24177. unsigned int l_need_tls_init:1;
  24178. #endif
  24179. +#endif
  24180. };
  24181. #ifdef __USE_GNU
  24182. diff -Nur uClibc-0.9.33.2/include/locale.h uClibc-git/include/locale.h
  24183. --- uClibc-0.9.33.2/include/locale.h 2012-05-15 09:20:09.000000000 +0200
  24184. +++ uClibc-git/include/locale.h 2014-07-25 20:36:04.997325210 +0200
  24185. @@ -12,9 +12,8 @@
  24186. Lesser General Public License for more details.
  24187. You should have received a copy of the GNU Lesser General Public
  24188. - License along with the GNU C Library; if not, write to the Free
  24189. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24190. - 02111-1307 USA. */
  24191. + License along with the GNU C Library; if not, see
  24192. + <http://www.gnu.org/licenses/>. */
  24193. /*
  24194. * ISO C99 Standard: 7.11 Localization <locale.h>
  24195. @@ -124,7 +123,7 @@
  24196. /* Set and/or return the current locale. */
  24197. -extern char *setlocale (int __category, __const char *__locale) __THROW;
  24198. +extern char *setlocale (int __category, const char *__locale) __THROW;
  24199. /* Return the numeric/monetary information for the current locale. */
  24200. extern struct lconv *localeconv (void) __THROW;
  24201. @@ -133,7 +132,7 @@
  24202. __END_NAMESPACE_STD
  24203. -#if defined __USE_XOPEN2K8 && defined __UCLIBC_HAS_LOCALE__
  24204. +#if defined __USE_XOPEN2K8 && defined __UCLIBC_HAS_XLOCALE__
  24205. /* The concept of one static locale per category is not very well
  24206. thought out. Many applications will need to process its data using
  24207. information from several different locales. Another application is
  24208. @@ -145,19 +144,14 @@
  24209. Attention: all these functions are *not* standardized in any form.
  24210. This is a proof-of-concept implementation. */
  24211. -#ifdef __UCLIBC_HAS_XLOCALE__
  24212. /* Get locale datatype definition. */
  24213. # include <xlocale.h>
  24214. -#endif
  24215. -
  24216. -/* POSIX 2008 makes locale_t official. */
  24217. -typedef __locale_t locale_t;
  24218. /* Return a reference to a data structure representing a set of locale
  24219. datasets. Unlike for the CATEGORY parameter for `setlocale' the
  24220. CATEGORY_MASK parameter here uses a single bit for each category,
  24221. made by OR'ing together LC_*_MASK bits above. */
  24222. -extern __locale_t newlocale (int __category_mask, __const char *__locale,
  24223. +extern __locale_t newlocale (int __category_mask, const char *__locale,
  24224. __locale_t __base) __THROW;
  24225. libc_hidden_proto(newlocale)
  24226. diff -Nur uClibc-0.9.33.2/include/malloc.h uClibc-git/include/malloc.h
  24227. --- uClibc-0.9.33.2/include/malloc.h 2012-05-15 09:20:09.000000000 +0200
  24228. +++ uClibc-git/include/malloc.h 2014-07-25 20:36:04.997325210 +0200
  24229. @@ -13,9 +13,8 @@
  24230. Lesser General Public License for more details.
  24231. You should have received a copy of the GNU Lesser General Public
  24232. - License along with the GNU C Library; if not, write to the Free
  24233. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24234. - 02111-1307 USA. */
  24235. + License along with the GNU C Library; if not, see
  24236. + <http://www.gnu.org/licenses/>. */
  24237. #ifndef _MALLOC_H
  24238. #define _MALLOC_H 1
  24239. @@ -124,9 +123,12 @@
  24240. /* Allocate SIZE bytes allocated to ALIGNMENT bytes. */
  24241. extern __malloc_ptr_t memalign __MALLOC_P ((size_t __alignment, size_t __size));
  24242. +libc_hidden_proto(memalign)
  24243. +#ifdef __UCLIBC_SUSV2_LEGACY__
  24244. /* Allocate SIZE bytes on a page boundary. */
  24245. extern __malloc_ptr_t valloc __MALLOC_P ((size_t __size)) __attribute_malloc__;
  24246. +#endif
  24247. #ifdef __MALLOC_STANDARD__
  24248. diff -Nur uClibc-0.9.33.2/include/math.h uClibc-git/include/math.h
  24249. --- uClibc-0.9.33.2/include/math.h 2012-05-15 09:20:09.000000000 +0200
  24250. +++ uClibc-git/include/math.h 2014-07-25 20:36:04.997325210 +0200
  24251. @@ -14,9 +14,8 @@
  24252. Lesser General Public License for more details.
  24253. You should have received a copy of the GNU Lesser General Public
  24254. - License along with the GNU C Library; if not, write to the Free
  24255. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24256. - 02111-1307 USA. */
  24257. + License along with the GNU C Library; if not, see
  24258. + <http://www.gnu.org/licenses/>. */
  24259. /*
  24260. * ISO C99 Standard: 7.12 Mathematics <math.h>
  24261. diff -Nur uClibc-0.9.33.2/include/memory.h uClibc-git/include/memory.h
  24262. --- uClibc-0.9.33.2/include/memory.h 2012-05-15 09:20:09.000000000 +0200
  24263. +++ uClibc-git/include/memory.h 2014-07-25 20:36:04.997325210 +0200
  24264. @@ -12,9 +12,8 @@
  24265. Lesser General Public License for more details.
  24266. You should have received a copy of the GNU Lesser General Public
  24267. - License along with the GNU C Library; if not, write to the Free
  24268. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24269. - 02111-1307 USA. */
  24270. + License along with the GNU C Library; if not, see
  24271. + <http://www.gnu.org/licenses/>. */
  24272. /*
  24273. * SVID
  24274. diff -Nur uClibc-0.9.33.2/include/mntent.h uClibc-git/include/mntent.h
  24275. --- uClibc-0.9.33.2/include/mntent.h 2012-05-15 09:20:09.000000000 +0200
  24276. +++ uClibc-git/include/mntent.h 2014-07-25 20:36:04.997325210 +0200
  24277. @@ -13,9 +13,8 @@
  24278. Lesser General Public License for more details.
  24279. You should have received a copy of the GNU Lesser General Public
  24280. - License along with the GNU C Library; if not, write to the Free
  24281. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24282. - 02111-1307 USA. */
  24283. + License along with the GNU C Library; if not, see
  24284. + <http://www.gnu.org/licenses/>. */
  24285. #ifndef _MNTENT_H
  24286. #define _MNTENT_H 1
  24287. @@ -64,7 +63,7 @@
  24288. /* Prepare to begin reading and/or writing mount table entries from the
  24289. beginning of FILE. MODE is as for `fopen'. */
  24290. -extern FILE *setmntent (__const char *__file, __const char *__mode) __THROW;
  24291. +extern FILE *setmntent (const char *__file, const char *__mode) __THROW;
  24292. libc_hidden_proto(setmntent)
  24293. /* Read one mount table entry from STREAM. Returns a pointer to storage
  24294. @@ -84,7 +83,7 @@
  24295. /* Write the mount table entry described by MNT to STREAM.
  24296. Return zero on success, nonzero on failure. */
  24297. extern int addmntent (FILE *__restrict __stream,
  24298. - __const struct mntent *__restrict __mnt) __THROW;
  24299. + const struct mntent *__restrict __mnt) __THROW;
  24300. /* Close a stream opened with `setmntent'. */
  24301. extern int endmntent (FILE *__stream) __THROW;
  24302. @@ -92,8 +91,8 @@
  24303. /* Search MNT->mnt_opts for an option matching OPT.
  24304. Returns the address of the substring, or null if none found. */
  24305. -extern char *hasmntopt (__const struct mntent *__mnt,
  24306. - __const char *__opt) __THROW;
  24307. +extern char *hasmntopt (const struct mntent *__mnt,
  24308. + const char *__opt) __THROW;
  24309. __END_DECLS
  24310. diff -Nur uClibc-0.9.33.2/include/mqueue.h uClibc-git/include/mqueue.h
  24311. --- uClibc-0.9.33.2/include/mqueue.h 2012-05-15 09:20:09.000000000 +0200
  24312. +++ uClibc-git/include/mqueue.h 2014-07-25 20:36:04.997325210 +0200
  24313. @@ -12,9 +12,8 @@
  24314. Lesser General Public License for more details.
  24315. You should have received a copy of the GNU Lesser General Public
  24316. - License along with the GNU C Library; if not, write to the Free
  24317. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24318. - 02111-1307 USA. */
  24319. + License along with the GNU C Library; if not, see
  24320. + <http://www.gnu.org/licenses/>. */
  24321. #ifndef _MQUEUE_H
  24322. #define _MQUEUE_H 1
  24323. diff -Nur uClibc-0.9.33.2/include/net/ethernet.h uClibc-git/include/net/ethernet.h
  24324. --- uClibc-0.9.33.2/include/net/ethernet.h 2012-05-15 09:20:09.000000000 +0200
  24325. +++ uClibc-git/include/net/ethernet.h 2014-07-25 20:36:05.009325274 +0200
  24326. @@ -12,9 +12,8 @@
  24327. Lesser General Public License for more details.
  24328. You should have received a copy of the GNU Lesser General Public
  24329. - License along with the GNU C Library; if not, write to the Free
  24330. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24331. - 02111-1307 USA. */
  24332. + License along with the GNU C Library; if not, see
  24333. + <http://www.gnu.org/licenses/>. */
  24334. /* Based on the FreeBSD version of this file. Curiously, that file
  24335. lacks a copyright in the header. */
  24336. diff -Nur uClibc-0.9.33.2/include/net/if_arp.h uClibc-git/include/net/if_arp.h
  24337. --- uClibc-0.9.33.2/include/net/if_arp.h 2012-05-15 09:20:09.000000000 +0200
  24338. +++ uClibc-git/include/net/if_arp.h 2014-07-25 20:36:05.009325274 +0200
  24339. @@ -14,9 +14,8 @@
  24340. Lesser General Public License for more details.
  24341. You should have received a copy of the GNU Lesser General Public
  24342. - License along with the GNU C Library; if not, write to the Free
  24343. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24344. - 02111-1307 USA. */
  24345. + License along with the GNU C Library; if not, see
  24346. + <http://www.gnu.org/licenses/>. */
  24347. /* Based on the 4.4BSD and Linux version of this file. */
  24348. diff -Nur uClibc-0.9.33.2/include/net/if.h uClibc-git/include/net/if.h
  24349. --- uClibc-0.9.33.2/include/net/if.h 2012-05-15 09:20:09.000000000 +0200
  24350. +++ uClibc-git/include/net/if.h 2014-07-25 20:36:05.009325274 +0200
  24351. @@ -13,9 +13,8 @@
  24352. Lesser General Public License for more details.
  24353. You should have received a copy of the GNU Lesser General Public
  24354. - License along with the GNU C Library; if not, write to the Free
  24355. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24356. - 02111-1307 USA. */
  24357. + License along with the GNU C Library; if not, see
  24358. + <http://www.gnu.org/licenses/>. */
  24359. #ifndef _NET_IF_H
  24360. #define _NET_IF_H 1
  24361. @@ -191,7 +190,7 @@
  24362. __BEGIN_DECLS
  24363. /* Convert an interface name to an index, and vice versa. */
  24364. -extern unsigned int if_nametoindex (__const char *__ifname) __THROW;
  24365. +extern unsigned int if_nametoindex (const char *__ifname) __THROW;
  24366. libc_hidden_proto(if_nametoindex)
  24367. extern char *if_indextoname (unsigned int __ifindex, char *__ifname) __THROW;
  24368. diff -Nur uClibc-0.9.33.2/include/net/if_packet.h uClibc-git/include/net/if_packet.h
  24369. --- uClibc-0.9.33.2/include/net/if_packet.h 2012-05-15 09:20:09.000000000 +0200
  24370. +++ uClibc-git/include/net/if_packet.h 2014-07-25 20:36:05.009325274 +0200
  24371. @@ -13,9 +13,8 @@
  24372. Lesser General Public License for more details.
  24373. You should have received a copy of the GNU Lesser General Public
  24374. - License along with the GNU C Library; if not, write to the Free
  24375. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24376. - 02111-1307 USA. */
  24377. + License along with the GNU C Library; if not, see
  24378. + <http://www.gnu.org/licenses/>. */
  24379. #ifndef __IF_PACKET_H
  24380. #define __IF_PACKET_H
  24381. diff -Nur uClibc-0.9.33.2/include/net/if_shaper.h uClibc-git/include/net/if_shaper.h
  24382. --- uClibc-0.9.33.2/include/net/if_shaper.h 2012-05-15 09:20:09.000000000 +0200
  24383. +++ uClibc-git/include/net/if_shaper.h 2014-07-25 20:36:05.009325274 +0200
  24384. @@ -12,9 +12,8 @@
  24385. Lesser General Public License for more details.
  24386. You should have received a copy of the GNU Lesser General Public
  24387. - License along with the GNU C Library; if not, write to the Free
  24388. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24389. - 02111-1307 USA. */
  24390. + License along with the GNU C Library; if not, see
  24391. + <http://www.gnu.org/licenses/>. */
  24392. #ifndef _NET_IF_SHAPER_H
  24393. #define _NET_IF_SHAPER_H 1
  24394. diff -Nur uClibc-0.9.33.2/include/net/if_slip.h uClibc-git/include/net/if_slip.h
  24395. --- uClibc-0.9.33.2/include/net/if_slip.h 2012-05-15 09:20:09.000000000 +0200
  24396. +++ uClibc-git/include/net/if_slip.h 2014-07-25 20:36:05.009325274 +0200
  24397. @@ -12,9 +12,8 @@
  24398. Lesser General Public License for more details.
  24399. You should have received a copy of the GNU Lesser General Public
  24400. - License along with the GNU C Library; if not, write to the Free
  24401. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24402. - 02111-1307 USA. */
  24403. + License along with the GNU C Library; if not, see
  24404. + <http://www.gnu.org/licenses/>. */
  24405. #ifndef _NET_IF_SLIP_H
  24406. #define _NET_IF_SLIP_H 1
  24407. diff -Nur uClibc-0.9.33.2/include/net/route.h uClibc-git/include/net/route.h
  24408. --- uClibc-0.9.33.2/include/net/route.h 2012-05-15 09:20:09.000000000 +0200
  24409. +++ uClibc-git/include/net/route.h 2014-07-25 20:36:05.009325274 +0200
  24410. @@ -12,9 +12,8 @@
  24411. Lesser General Public License for more details.
  24412. You should have received a copy of the GNU Lesser General Public
  24413. - License along with the GNU C Library; if not, write to the Free
  24414. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24415. - 02111-1307 USA. */
  24416. + License along with the GNU C Library; if not, see
  24417. + <http://www.gnu.org/licenses/>. */
  24418. /* Based on the 4.4BSD and Linux version of this file. */
  24419. diff -Nur uClibc-0.9.33.2/include/netax25/ax25.h uClibc-git/include/netax25/ax25.h
  24420. --- uClibc-0.9.33.2/include/netax25/ax25.h 2012-05-15 09:20:09.000000000 +0200
  24421. +++ uClibc-git/include/netax25/ax25.h 2014-07-25 20:36:05.025325357 +0200
  24422. @@ -12,9 +12,8 @@
  24423. Lesser General Public License for more details.
  24424. You should have received a copy of the GNU Lesser General Public
  24425. - License along with the GNU C Library; if not, write to the Free
  24426. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24427. - 02111-1307 USA. */
  24428. + License along with the GNU C Library; if not, see
  24429. + <http://www.gnu.org/licenses/>. */
  24430. #ifndef _NETAX25_AX25_H
  24431. #define _NETAX25_AX25_H 1
  24432. diff -Nur uClibc-0.9.33.2/include/netdb.h uClibc-git/include/netdb.h
  24433. --- uClibc-0.9.33.2/include/netdb.h 2012-05-15 09:20:09.000000000 +0200
  24434. +++ uClibc-git/include/netdb.h 2014-07-25 20:36:05.025325357 +0200
  24435. @@ -1,4 +1,4 @@
  24436. -/* Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc.
  24437. +/* Copyright (C) 1996-2002, 2003, 2004, 2009 Free Software Foundation, Inc.
  24438. This file is part of the GNU C Library.
  24439. The GNU C Library is free software; you can redistribute it and/or
  24440. @@ -12,9 +12,8 @@
  24441. Lesser General Public License for more details.
  24442. You should have received a copy of the GNU Lesser General Public
  24443. - License along with the GNU C Library; if not, write to the Free
  24444. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24445. - 02111-1307 USA. */
  24446. + License along with the GNU C Library; if not, see
  24447. + <http://www.gnu.org/licenses/>. */
  24448. /* All data returned by the network data base library are supplied in
  24449. host order and returned in network order (suitable for use in
  24450. @@ -59,7 +58,6 @@
  24451. /* Function to get address of global `h_errno' variable. */
  24452. extern int *__h_errno_location (void) __THROW __attribute__ ((__const__));
  24453. -libc_hidden_proto(__h_errno_location)
  24454. /* Macros for accessing h_errno from inside libc. */
  24455. #ifdef _LIBC
  24456. @@ -88,8 +86,6 @@
  24457. #endif /* _LIBC */
  24458. /* Possible values left in `h_errno'. */
  24459. -#define NETDB_INTERNAL -1 /* See errno. */
  24460. -#define NETDB_SUCCESS 0 /* No problem. */
  24461. #define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found. */
  24462. #define TRY_AGAIN 2 /* Non-Authoritative Host not found,
  24463. or SERVERFAIL. */
  24464. @@ -97,7 +93,11 @@
  24465. NOTIMP. */
  24466. #define NO_DATA 4 /* Valid name, no data record of requested
  24467. type. */
  24468. -#define NO_ADDRESS NO_DATA /* No address, look for MX record. */
  24469. +#if defined __USE_MISC || defined __USE_GNU
  24470. +# define NETDB_INTERNAL -1 /* See errno. */
  24471. +# define NETDB_SUCCESS 0 /* No problem. */
  24472. +# define NO_ADDRESS NO_DATA /* No address, look for MX record. */
  24473. +#endif
  24474. #ifdef __USE_XOPEN2K
  24475. /* Highest reserved Internet port number. */
  24476. @@ -109,13 +109,15 @@
  24477. # define SCOPE_DELIMITER '%'
  24478. #endif
  24479. +#if defined __USE_MISC || defined __USE_GNU
  24480. /* Print error indicated by `h_errno' variable on standard error. STR
  24481. if non-null is printed before the error string. */
  24482. -extern void herror (__const char *__str) __THROW;
  24483. +extern void herror (const char *__str) __THROW;
  24484. libc_hidden_proto(herror)
  24485. /* Return string associated with error ERR_NUM. */
  24486. -extern __const char *hstrerror (int __err_num) __THROW;
  24487. +extern const char *hstrerror (int __err_num) __THROW;
  24488. +#endif
  24489. /* Description of data base entry for a single host. */
  24490. @@ -126,7 +128,9 @@
  24491. int h_addrtype; /* Host address type. */
  24492. int h_length; /* Length of address. */
  24493. char **h_addr_list; /* List of addresses from name server. */
  24494. -#define h_addr h_addr_list[0] /* Address, for backward compatibility. */
  24495. +#if defined __USE_MISC || defined __USE_GNU
  24496. +# define h_addr h_addr_list[0] /* Address, for backward compatibility.*/
  24497. +#endif
  24498. };
  24499. /* Open host data base files and mark them as staying open even after
  24500. @@ -154,7 +158,7 @@
  24501. This function is a possible cancellation point and therefore not
  24502. marked with __THROW. */
  24503. -extern struct hostent *gethostbyaddr (__const void *__addr, __socklen_t __len,
  24504. +extern struct hostent *gethostbyaddr (const void *__addr, __socklen_t __len,
  24505. int __type);
  24506. libc_hidden_proto(gethostbyaddr)
  24507. @@ -162,7 +166,7 @@
  24508. This function is a possible cancellation point and therefore not
  24509. marked with __THROW. */
  24510. -extern struct hostent *gethostbyname (__const char *__name);
  24511. +extern struct hostent *gethostbyname (const char *__name);
  24512. libc_hidden_proto(gethostbyname)
  24513. #ifdef __USE_MISC
  24514. @@ -174,7 +178,7 @@
  24515. cancellation point. But due to similarity with an POSIX interface
  24516. or due to the implementation it is a cancellation point and
  24517. therefore not marked with __THROW. */
  24518. -extern struct hostent *gethostbyname2 (__const char *__name, int __af);
  24519. +extern struct hostent *gethostbyname2 (const char *__name, int __af);
  24520. libc_hidden_proto(gethostbyname2)
  24521. /* Reentrant versions of the functions above. The additional
  24522. @@ -193,7 +197,7 @@
  24523. int *__restrict __h_errnop);
  24524. libc_hidden_proto(gethostent_r)
  24525. -extern int gethostbyaddr_r (__const void *__restrict __addr, __socklen_t __len,
  24526. +extern int gethostbyaddr_r (const void *__restrict __addr, __socklen_t __len,
  24527. int __type,
  24528. struct hostent *__restrict __result_buf,
  24529. char *__restrict __buf, size_t __buflen,
  24530. @@ -201,14 +205,14 @@
  24531. int *__restrict __h_errnop);
  24532. libc_hidden_proto(gethostbyaddr_r)
  24533. -extern int gethostbyname_r (__const char *__restrict __name,
  24534. +extern int gethostbyname_r (const char *__restrict __name,
  24535. struct hostent *__restrict __result_buf,
  24536. char *__restrict __buf, size_t __buflen,
  24537. struct hostent **__restrict __result,
  24538. int *__restrict __h_errnop);
  24539. libc_hidden_proto(gethostbyname_r)
  24540. -extern int gethostbyname2_r (__const char *__restrict __name, int __af,
  24541. +extern int gethostbyname2_r (const char *__restrict __name, int __af,
  24542. struct hostent *__restrict __result_buf,
  24543. char *__restrict __buf, size_t __buflen,
  24544. struct hostent **__restrict __result,
  24545. @@ -250,7 +254,7 @@
  24546. This function is a possible cancellation point and therefore not
  24547. marked with __THROW. */
  24548. -extern struct netent *getnetbyname (__const char *__name);
  24549. +extern struct netent *getnetbyname (const char *__name);
  24550. #ifdef __USE_MISC
  24551. /* Reentrant versions of the functions above. The additional
  24552. @@ -268,13 +272,15 @@
  24553. struct netent **__restrict __result,
  24554. int *__restrict __h_errnop);
  24555. libc_hidden_proto(getnetent_r)
  24556. +
  24557. extern int getnetbyaddr_r (uint32_t __net, int __type,
  24558. struct netent *__restrict __result_buf,
  24559. char *__restrict __buf, size_t __buflen,
  24560. struct netent **__restrict __result,
  24561. int *__restrict __h_errnop);
  24562. libc_hidden_proto(getnetbyaddr_r)
  24563. -extern int getnetbyname_r (__const char *__restrict __name,
  24564. +
  24565. +extern int getnetbyname_r (const char *__restrict __name,
  24566. struct netent *__restrict __result_buf,
  24567. char *__restrict __buf, size_t __buflen,
  24568. struct netent **__restrict __result,
  24569. @@ -319,15 +325,15 @@
  24570. This function is a possible cancellation point and therefore not
  24571. marked with __THROW. */
  24572. -extern struct servent *getservbyname (__const char *__name,
  24573. - __const char *__proto);
  24574. +extern struct servent *getservbyname (const char *__name,
  24575. + const char *__proto);
  24576. /* Return entry from service data base which matches port PORT and
  24577. protocol PROTO.
  24578. This function is a possible cancellation point and therefore not
  24579. marked with __THROW. */
  24580. -extern struct servent *getservbyport (int __port, __const char *__proto);
  24581. +extern struct servent *getservbyport (int __port, const char *__proto);
  24582. libc_hidden_proto(getservbyport)
  24583. @@ -344,14 +350,14 @@
  24584. struct servent **__restrict __result);
  24585. libc_hidden_proto(getservent_r)
  24586. -extern int getservbyname_r (__const char *__restrict __name,
  24587. - __const char *__restrict __proto,
  24588. +extern int getservbyname_r (const char *__restrict __name,
  24589. + const char *__restrict __proto,
  24590. struct servent *__restrict __result_buf,
  24591. char *__restrict __buf, size_t __buflen,
  24592. struct servent **__restrict __result);
  24593. libc_hidden_proto(getservbyname_r)
  24594. -extern int getservbyport_r (int __port, __const char *__restrict __proto,
  24595. +extern int getservbyport_r (int __port, const char *__restrict __proto,
  24596. struct servent *__restrict __result_buf,
  24597. char *__restrict __buf, size_t __buflen,
  24598. struct servent **__restrict __result);
  24599. @@ -393,7 +399,7 @@
  24600. This function is a possible cancellation point and therefore not
  24601. marked with __THROW. */
  24602. -extern struct protoent *getprotobyname (__const char *__name);
  24603. +extern struct protoent *getprotobyname (const char *__name);
  24604. /* Return entry from protocol data base which number is PROTO.
  24605. @@ -415,7 +421,7 @@
  24606. struct protoent **__restrict __result);
  24607. libc_hidden_proto(getprotoent_r)
  24608. -extern int getprotobyname_r (__const char *__restrict __name,
  24609. +extern int getprotobyname_r (const char *__restrict __name,
  24610. struct protoent *__restrict __result_buf,
  24611. char *__restrict __buf, size_t __buflen,
  24612. struct protoent **__restrict __result);
  24613. @@ -435,7 +441,7 @@
  24614. cancellation point. But due to similarity with an POSIX interface
  24615. or due to the implementation it is a cancellation point and
  24616. therefore not marked with __THROW. */
  24617. -extern int setnetgrent (__const char *__netgroup);
  24618. +extern int setnetgrent (const char *__netgroup);
  24619. /* Free all space allocated by previous `setnetgrent' call.
  24620. @@ -463,8 +469,8 @@
  24621. cancellation point. But due to similarity with an POSIX interface
  24622. or due to the implementation it is a cancellation point and
  24623. therefore not marked with __THROW. */
  24624. -extern int innetgr (__const char *__netgroup, __const char *__host,
  24625. - __const char *__user, __const char *domain);
  24626. +extern int innetgr (const char *__netgroup, const char *__host,
  24627. + const char *__user, const char *__domain);
  24628. /* Reentrant version of `getnetgrent' where result is placed in BUFFER.
  24629. @@ -479,12 +485,12 @@
  24630. #endif /* UCLIBC_HAS_NETGROUP */
  24631. #endif /* misc */
  24632. -
  24633. +#ifdef __UCLIBC__
  24634. /* ruserpass - remote password check.
  24635. This function also exists in glibc but is undocumented */
  24636. extern int ruserpass(const char *host, const char **aname, const char **apass);
  24637. libc_hidden_proto(ruserpass)
  24638. -
  24639. +#endif
  24640. #ifdef __USE_BSD
  24641. /* Call `rshd' at port RPORT on remote machine *AHOST to execute CMD.
  24642. @@ -499,9 +505,9 @@
  24643. or due to the implementation it is a cancellation point and
  24644. therefore not marked with __THROW. */
  24645. extern int rcmd (char **__restrict __ahost, unsigned short int __rport,
  24646. - __const char *__restrict __locuser,
  24647. - __const char *__restrict __remuser,
  24648. - __const char *__restrict __cmd, int *__restrict __fd2p);
  24649. + const char *__restrict __locuser,
  24650. + const char *__restrict __remuser,
  24651. + const char *__restrict __cmd, int *__restrict __fd2p);
  24652. #if 0
  24653. /* FIXME */
  24654. @@ -513,9 +519,9 @@
  24655. or due to the implementation it is a cancellation point and
  24656. therefore not marked with __THROW. */
  24657. extern int rcmd_af (char **__restrict __ahost, unsigned short int __rport,
  24658. - __const char *__restrict __locuser,
  24659. - __const char *__restrict __remuser,
  24660. - __const char *__restrict __cmd, int *__restrict __fd2p,
  24661. + const char *__restrict __locuser,
  24662. + const char *__restrict __remuser,
  24663. + const char *__restrict __cmd, int *__restrict __fd2p,
  24664. sa_family_t __af);
  24665. #endif
  24666. @@ -530,9 +536,9 @@
  24667. or due to the implementation it is a cancellation point and
  24668. therefore not marked with __THROW. */
  24669. extern int rexec (char **__restrict __ahost, int __rport,
  24670. - __const char *__restrict __name,
  24671. - __const char *__restrict __pass,
  24672. - __const char *__restrict __cmd, int *__restrict __fd2p);
  24673. + const char *__restrict __name,
  24674. + const char *__restrict __pass,
  24675. + const char *__restrict __cmd, int *__restrict __fd2p);
  24676. /* This is the equivalent function where the protocol can be selected
  24677. and which therefore can be used for IPv6.
  24678. @@ -542,9 +548,9 @@
  24679. or due to the implementation it is a cancellation point and
  24680. therefore not marked with __THROW. */
  24681. extern int rexec_af (char **__restrict __ahost, int __rport,
  24682. - __const char *__restrict __name,
  24683. - __const char *__restrict __pass,
  24684. - __const char *__restrict __cmd, int *__restrict __fd2p,
  24685. + const char *__restrict __name,
  24686. + const char *__restrict __pass,
  24687. + const char *__restrict __cmd, int *__restrict __fd2p,
  24688. sa_family_t __af);
  24689. libc_hidden_proto(rexec_af)
  24690. @@ -556,8 +562,8 @@
  24691. cancellation point. But due to similarity with an POSIX interface
  24692. or due to the implementation it is a cancellation point and
  24693. therefore not marked with __THROW. */
  24694. -extern int ruserok (__const char *__rhost, int __suser,
  24695. - __const char *__remuser, __const char *__locuser);
  24696. +extern int ruserok (const char *__rhost, int __suser,
  24697. + const char *__remuser, const char *__locuser);
  24698. #if 0
  24699. /* FIXME */
  24700. @@ -568,8 +574,8 @@
  24701. cancellation point. But due to similarity with an POSIX interface
  24702. or due to the implementation it is a cancellation point and
  24703. therefore not marked with __THROW. */
  24704. -extern int ruserok_af (__const char *__rhost, int __suser,
  24705. - __const char *__remuser, __const char *__locuser,
  24706. +extern int ruserok_af (const char *__rhost, int __suser,
  24707. + const char *__remuser, const char *__locuser,
  24708. sa_family_t __af);
  24709. #endif
  24710. @@ -638,15 +644,15 @@
  24711. # define EAI_NONAME -2 /* NAME or SERVICE is unknown. */
  24712. # define EAI_AGAIN -3 /* Temporary failure in name resolution. */
  24713. # define EAI_FAIL -4 /* Non-recoverable failure in name res. */
  24714. -# define EAI_NODATA -5 /* No address associated with NAME. */
  24715. # define EAI_FAMILY -6 /* `ai_family' not supported. */
  24716. # define EAI_SOCKTYPE -7 /* `ai_socktype' not supported. */
  24717. # define EAI_SERVICE -8 /* SERVICE not supported for `ai_socktype'. */
  24718. -# define EAI_ADDRFAMILY -9 /* Address family for NAME not supported. */
  24719. # define EAI_MEMORY -10 /* Memory allocation failure. */
  24720. # define EAI_SYSTEM -11 /* System error returned in `errno'. */
  24721. # define EAI_OVERFLOW -12 /* Argument buffer overflow. */
  24722. # ifdef __USE_GNU
  24723. +# define EAI_NODATA -5 /* No address associated with NAME. */
  24724. +# define EAI_ADDRFAMILY -9 /* Address family for NAME not supported. */
  24725. # define EAI_INPROGRESS -100 /* Processing request in progress. */
  24726. # define EAI_CANCELED -101 /* Request canceled. */
  24727. # define EAI_NOTCANCELED -102 /* Request not canceled. */
  24728. @@ -655,8 +661,10 @@
  24729. # define EAI_IDN_ENCODE -105 /* IDN encoding failed. */
  24730. # endif
  24731. -# define NI_MAXHOST 1025
  24732. -# define NI_MAXSERV 32
  24733. +# ifdef __USE_MISC
  24734. +# define NI_MAXHOST 1025
  24735. +# define NI_MAXSERV 32
  24736. +# endif
  24737. # define NI_NUMERICHOST 1 /* Don't try to look up hostname. */
  24738. # define NI_NUMERICSERV 2 /* Don't convert port number to name. */
  24739. @@ -676,9 +684,9 @@
  24740. This function is a possible cancellation point and therefore not
  24741. marked with __THROW. */
  24742. -extern int getaddrinfo (__const char *__restrict __name,
  24743. - __const char *__restrict __service,
  24744. - __const struct addrinfo *__restrict __req,
  24745. +extern int getaddrinfo (const char *__restrict __name,
  24746. + const char *__restrict __service,
  24747. + const struct addrinfo *__restrict __req,
  24748. struct addrinfo **__restrict __pai);
  24749. libc_hidden_proto(getaddrinfo)
  24750. @@ -687,13 +695,13 @@
  24751. libc_hidden_proto(freeaddrinfo)
  24752. /* Convert error return from getaddrinfo() to a string. */
  24753. -extern __const char *gai_strerror (int __ecode) __THROW;
  24754. +extern const char *gai_strerror (int __ecode) __THROW;
  24755. /* Translate a socket address to a location and service name.
  24756. This function is a possible cancellation point and therefore not
  24757. marked with __THROW. */
  24758. -extern int getnameinfo (__const struct sockaddr *__restrict __sa,
  24759. +extern int getnameinfo (const struct sockaddr *__restrict __sa,
  24760. socklen_t __salen, char *__restrict __host,
  24761. socklen_t __hostlen, char *__restrict __serv,
  24762. socklen_t __servlen, unsigned int __flags);
  24763. diff -Nur uClibc-0.9.33.2/include/neteconet/ec.h uClibc-git/include/neteconet/ec.h
  24764. --- uClibc-0.9.33.2/include/neteconet/ec.h 2012-05-15 09:20:09.000000000 +0200
  24765. +++ uClibc-git/include/neteconet/ec.h 2014-07-25 20:36:05.041325441 +0200
  24766. @@ -13,9 +13,8 @@
  24767. Lesser General Public License for more details.
  24768. You should have received a copy of the GNU Lesser General Public
  24769. - License along with the GNU C Library; if not, write to the Free
  24770. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24771. - 02111-1307 USA. */
  24772. + License along with the GNU C Library; if not, see
  24773. + <http://www.gnu.org/licenses/>. */
  24774. #ifndef _NETECONET_EC_H
  24775. #define _NETECONET_EC_H 1
  24776. diff -Nur uClibc-0.9.33.2/include/netinet/ether.h uClibc-git/include/netinet/ether.h
  24777. --- uClibc-0.9.33.2/include/netinet/ether.h 2012-05-15 09:20:09.000000000 +0200
  24778. +++ uClibc-git/include/netinet/ether.h 2014-07-25 20:36:05.057325525 +0200
  24779. @@ -13,9 +13,8 @@
  24780. Lesser General Public License for more details.
  24781. You should have received a copy of the GNU Lesser General Public
  24782. - License along with the GNU C Library; if not, write to the Free
  24783. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24784. - 02111-1307 USA. */
  24785. + License along with the GNU C Library; if not, see
  24786. + <http://www.gnu.org/licenses/>. */
  24787. #ifndef _NETINET_ETHER_H
  24788. #define _NETINET_ETHER_H 1
  24789. @@ -34,27 +33,27 @@
  24790. #if defined __UCLIBC_HAS_SOCKET__ || defined __UCLIBC_HAS_IPV4__ || \
  24791. defined __UCLIBC_HAS_IPV6__
  24792. /* Convert 48 bit Ethernet ADDRess to ASCII. */
  24793. -extern char *ether_ntoa (__const struct ether_addr *__addr) __THROW;
  24794. -extern char *ether_ntoa_r (__const struct ether_addr *__addr, char *__buf)
  24795. +extern char *ether_ntoa (const struct ether_addr *__addr) __THROW;
  24796. +extern char *ether_ntoa_r (const struct ether_addr *__addr, char *__buf)
  24797. __THROW;
  24798. libc_hidden_proto(ether_ntoa_r)
  24799. /* Convert ASCII string S to 48 bit Ethernet address. */
  24800. -extern struct ether_addr *ether_aton (__const char *__asc) __THROW;
  24801. -extern struct ether_addr *ether_aton_r (__const char *__asc,
  24802. +extern struct ether_addr *ether_aton (const char *__asc) __THROW;
  24803. +extern struct ether_addr *ether_aton_r (const char *__asc,
  24804. struct ether_addr *__addr) __THROW;
  24805. libc_hidden_proto(ether_aton_r)
  24806. /* Map 48 bit Ethernet number ADDR to HOSTNAME. */
  24807. -extern int ether_ntohost (char *__hostname, __const struct ether_addr *__addr)
  24808. +extern int ether_ntohost (char *__hostname, const struct ether_addr *__addr)
  24809. __THROW;
  24810. /* Map HOSTNAME to 48 bit Ethernet address. */
  24811. -extern int ether_hostton (__const char *__hostname, struct ether_addr *__addr)
  24812. +extern int ether_hostton (const char *__hostname, struct ether_addr *__addr)
  24813. __THROW;
  24814. /* Scan LINE and set ADDR and HOSTNAME. */
  24815. -extern int ether_line (__const char *__line, struct ether_addr *__addr,
  24816. +extern int ether_line (const char *__line, struct ether_addr *__addr,
  24817. char *__hostname) __THROW;
  24818. #endif
  24819. diff -Nur uClibc-0.9.33.2/include/netinet/icmp6.h uClibc-git/include/netinet/icmp6.h
  24820. --- uClibc-0.9.33.2/include/netinet/icmp6.h 2012-05-15 09:20:09.000000000 +0200
  24821. +++ uClibc-git/include/netinet/icmp6.h 2014-07-25 20:36:05.057325525 +0200
  24822. @@ -12,9 +12,8 @@
  24823. Lesser General Public License for more details.
  24824. You should have received a copy of the GNU Lesser General Public
  24825. - License along with the GNU C Library; if not, write to the Free
  24826. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24827. - 02111-1307 USA. */
  24828. + License along with the GNU C Library; if not, see
  24829. + <http://www.gnu.org/licenses/>. */
  24830. #ifndef _NETINET_ICMP6_H
  24831. #define _NETINET_ICMP6_H 1
  24832. diff -Nur uClibc-0.9.33.2/include/netinet/if_ether.h uClibc-git/include/netinet/if_ether.h
  24833. --- uClibc-0.9.33.2/include/netinet/if_ether.h 2012-05-15 09:20:09.000000000 +0200
  24834. +++ uClibc-git/include/netinet/if_ether.h 2014-07-25 20:36:05.057325525 +0200
  24835. @@ -12,9 +12,8 @@
  24836. Lesser General Public License for more details.
  24837. You should have received a copy of the GNU Lesser General Public
  24838. - License along with the GNU C Library; if not, write to the Free
  24839. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24840. - 02111-1307 USA. */
  24841. + License along with the GNU C Library; if not, see
  24842. + <http://www.gnu.org/licenses/>. */
  24843. #ifndef __NETINET_IF_ETHER_H
  24844. diff -Nur uClibc-0.9.33.2/include/netinet/if_fddi.h uClibc-git/include/netinet/if_fddi.h
  24845. --- uClibc-0.9.33.2/include/netinet/if_fddi.h 2012-05-15 09:20:09.000000000 +0200
  24846. +++ uClibc-git/include/netinet/if_fddi.h 2014-07-25 20:36:05.057325525 +0200
  24847. @@ -12,9 +12,8 @@
  24848. Lesser General Public License for more details.
  24849. You should have received a copy of the GNU Lesser General Public
  24850. - License along with the GNU C Library; if not, write to the Free
  24851. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24852. - 02111-1307 USA. */
  24853. + License along with the GNU C Library; if not, see
  24854. + <http://www.gnu.org/licenses/>. */
  24855. #ifndef _NETINET_IF_FDDI_H
  24856. #define _NETINET_IF_FDDI_H 1
  24857. diff -Nur uClibc-0.9.33.2/include/netinet/if_tr.h uClibc-git/include/netinet/if_tr.h
  24858. --- uClibc-0.9.33.2/include/netinet/if_tr.h 2012-05-15 09:20:09.000000000 +0200
  24859. +++ uClibc-git/include/netinet/if_tr.h 2014-07-25 20:36:05.057325525 +0200
  24860. @@ -12,9 +12,8 @@
  24861. Lesser General Public License for more details.
  24862. You should have received a copy of the GNU Lesser General Public
  24863. - License along with the GNU C Library; if not, write to the Free
  24864. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24865. - 02111-1307 USA. */
  24866. + License along with the GNU C Library; if not, see
  24867. + <http://www.gnu.org/licenses/>. */
  24868. #ifndef _NETINET_IF_TR_H
  24869. #define _NETINET_IF_TR_H 1
  24870. diff -Nur uClibc-0.9.33.2/include/netinet/igmp.h uClibc-git/include/netinet/igmp.h
  24871. --- uClibc-0.9.33.2/include/netinet/igmp.h 2012-05-15 09:20:09.000000000 +0200
  24872. +++ uClibc-git/include/netinet/igmp.h 2014-07-25 20:36:05.057325525 +0200
  24873. @@ -12,9 +12,8 @@
  24874. Lesser General Public License for more details.
  24875. You should have received a copy of the GNU Lesser General Public
  24876. - License along with the GNU C Library; if not, write to the Free
  24877. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24878. - 02111-1307 USA. */
  24879. + License along with the GNU C Library; if not, see
  24880. + <http://www.gnu.org/licenses/>. */
  24881. #ifndef _NETINET_IGMP_H
  24882. #define _NETINET_IGMP_H 1
  24883. diff -Nur uClibc-0.9.33.2/include/netinet/in.h uClibc-git/include/netinet/in.h
  24884. --- uClibc-0.9.33.2/include/netinet/in.h 2012-05-15 09:20:09.000000000 +0200
  24885. +++ uClibc-git/include/netinet/in.h 2014-07-25 20:36:05.057325525 +0200
  24886. @@ -13,9 +13,8 @@
  24887. Lesser General Public License for more details.
  24888. You should have received a copy of the GNU Lesser General Public
  24889. - License along with the GNU C Library; if not, write to the Free
  24890. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  24891. - 02111-1307 USA. */
  24892. + License along with the GNU C Library; if not, see
  24893. + <http://www.gnu.org/licenses/>. */
  24894. #ifndef _NETINET_IN_H
  24895. #define _NETINET_IN_H 1
  24896. @@ -415,43 +414,43 @@
  24897. #if defined __UCLIBC_HAS_IPV6__ || !defined __UCLIBC_STRICT_HEADERS__
  24898. #define IN6_IS_ADDR_UNSPECIFIED(a) \
  24899. - (((__const uint32_t *) (a))[0] == 0 \
  24900. - && ((__const uint32_t *) (a))[1] == 0 \
  24901. - && ((__const uint32_t *) (a))[2] == 0 \
  24902. - && ((__const uint32_t *) (a))[3] == 0)
  24903. + (((const uint32_t *) (a))[0] == 0 \
  24904. + && ((const uint32_t *) (a))[1] == 0 \
  24905. + && ((const uint32_t *) (a))[2] == 0 \
  24906. + && ((const uint32_t *) (a))[3] == 0)
  24907. #define IN6_IS_ADDR_LOOPBACK(a) \
  24908. - (((__const uint32_t *) (a))[0] == 0 \
  24909. - && ((__const uint32_t *) (a))[1] == 0 \
  24910. - && ((__const uint32_t *) (a))[2] == 0 \
  24911. - && ((__const uint32_t *) (a))[3] == htonl (1))
  24912. + (((const uint32_t *) (a))[0] == 0 \
  24913. + && ((const uint32_t *) (a))[1] == 0 \
  24914. + && ((const uint32_t *) (a))[2] == 0 \
  24915. + && ((const uint32_t *) (a))[3] == htonl (1))
  24916. -#define IN6_IS_ADDR_MULTICAST(a) (((__const uint8_t *) (a))[0] == 0xff)
  24917. +#define IN6_IS_ADDR_MULTICAST(a) (((const uint8_t *) (a))[0] == 0xff)
  24918. #define IN6_IS_ADDR_LINKLOCAL(a) \
  24919. - ((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) \
  24920. + ((((const uint32_t *) (a))[0] & htonl (0xffc00000)) \
  24921. == htonl (0xfe800000))
  24922. #define IN6_IS_ADDR_SITELOCAL(a) \
  24923. - ((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) \
  24924. + ((((const uint32_t *) (a))[0] & htonl (0xffc00000)) \
  24925. == htonl (0xfec00000))
  24926. #define IN6_IS_ADDR_V4MAPPED(a) \
  24927. - ((((__const uint32_t *) (a))[0] == 0) \
  24928. - && (((__const uint32_t *) (a))[1] == 0) \
  24929. - && (((__const uint32_t *) (a))[2] == htonl (0xffff)))
  24930. + ((((const uint32_t *) (a))[0] == 0) \
  24931. + && (((const uint32_t *) (a))[1] == 0) \
  24932. + && (((const uint32_t *) (a))[2] == htonl (0xffff)))
  24933. #define IN6_IS_ADDR_V4COMPAT(a) \
  24934. - ((((__const uint32_t *) (a))[0] == 0) \
  24935. - && (((__const uint32_t *) (a))[1] == 0) \
  24936. - && (((__const uint32_t *) (a))[2] == 0) \
  24937. - && (ntohl (((__const uint32_t *) (a))[3]) > 1))
  24938. + ((((const uint32_t *) (a))[0] == 0) \
  24939. + && (((const uint32_t *) (a))[1] == 0) \
  24940. + && (((const uint32_t *) (a))[2] == 0) \
  24941. + && (ntohl (((const uint32_t *) (a))[3]) > 1))
  24942. #define IN6_ARE_ADDR_EQUAL(a,b) \
  24943. - ((((__const uint32_t *) (a))[0] == ((__const uint32_t *) (b))[0]) \
  24944. - && (((__const uint32_t *) (a))[1] == ((__const uint32_t *) (b))[1]) \
  24945. - && (((__const uint32_t *) (a))[2] == ((__const uint32_t *) (b))[2]) \
  24946. - && (((__const uint32_t *) (a))[3] == ((__const uint32_t *) (b))[3]))
  24947. + ((((const uint32_t *) (a))[0] == ((const uint32_t *) (b))[0]) \
  24948. + && (((const uint32_t *) (a))[1] == ((const uint32_t *) (b))[1]) \
  24949. + && (((const uint32_t *) (a))[2] == ((const uint32_t *) (b))[2]) \
  24950. + && (((const uint32_t *) (a))[3] == ((const uint32_t *) (b))[3]))
  24951. #endif
  24952. #if defined __USE_MISC || defined __USE_GNU
  24953. @@ -470,23 +469,23 @@
  24954. #if defined __UCLIBC_HAS_IPV6__ || !defined __UCLIBC_STRICT_HEADERS__
  24955. #define IN6_IS_ADDR_MC_NODELOCAL(a) \
  24956. (IN6_IS_ADDR_MULTICAST(a) \
  24957. - && ((((__const uint8_t *) (a))[1] & 0xf) == 0x1))
  24958. + && ((((const uint8_t *) (a))[1] & 0xf) == 0x1))
  24959. #define IN6_IS_ADDR_MC_LINKLOCAL(a) \
  24960. (IN6_IS_ADDR_MULTICAST(a) \
  24961. - && ((((__const uint8_t *) (a))[1] & 0xf) == 0x2))
  24962. + && ((((const uint8_t *) (a))[1] & 0xf) == 0x2))
  24963. #define IN6_IS_ADDR_MC_SITELOCAL(a) \
  24964. (IN6_IS_ADDR_MULTICAST(a) \
  24965. - && ((((__const uint8_t *) (a))[1] & 0xf) == 0x5))
  24966. + && ((((const uint8_t *) (a))[1] & 0xf) == 0x5))
  24967. #define IN6_IS_ADDR_MC_ORGLOCAL(a) \
  24968. (IN6_IS_ADDR_MULTICAST(a) \
  24969. - && ((((__const uint8_t *) (a))[1] & 0xf) == 0x8))
  24970. + && ((((const uint8_t *) (a))[1] & 0xf) == 0x8))
  24971. #define IN6_IS_ADDR_MC_GLOBAL(a) \
  24972. (IN6_IS_ADDR_MULTICAST(a) \
  24973. - && ((((__const uint8_t *) (a))[1] & 0xf) == 0xe))
  24974. + && ((((const uint8_t *) (a))[1] & 0xf) == 0xe))
  24975. #endif
  24976. @@ -514,15 +513,15 @@
  24977. extern int inet6_option_init (void *__bp, struct cmsghdr **__cmsgp,
  24978. int __type) __THROW __attribute_deprecated__;
  24979. extern int inet6_option_append (struct cmsghdr *__cmsg,
  24980. - __const uint8_t *__typep, int __multx,
  24981. + const uint8_t *__typep, int __multx,
  24982. int __plusy) __THROW __attribute_deprecated__;
  24983. extern uint8_t *inet6_option_alloc (struct cmsghdr *__cmsg, int __datalen,
  24984. int __multx, int __plusy)
  24985. __THROW __attribute_deprecated__;
  24986. -extern int inet6_option_next (__const struct cmsghdr *__cmsg,
  24987. +extern int inet6_option_next (const struct cmsghdr *__cmsg,
  24988. uint8_t **__tptrp)
  24989. __THROW __attribute_deprecated__;
  24990. -extern int inet6_option_find (__const struct cmsghdr *__cmsg,
  24991. +extern int inet6_option_find (const struct cmsghdr *__cmsg,
  24992. uint8_t **__tptrp, int __type)
  24993. __THROW __attribute_deprecated__;
  24994. @@ -550,10 +549,10 @@
  24995. extern socklen_t inet6_rth_space (int __type, int __segments) __THROW;
  24996. extern void *inet6_rth_init (void *__bp, socklen_t __bp_len, int __type,
  24997. int __segments) __THROW;
  24998. -extern int inet6_rth_add (void *__bp, __const struct in6_addr *__addr) __THROW;
  24999. -extern int inet6_rth_reverse (__const void *__in, void *__out) __THROW;
  25000. -extern int inet6_rth_segments (__const void *__bp) __THROW;
  25001. -extern struct in6_addr *inet6_rth_getaddr (__const void *__bp, int __index)
  25002. +extern int inet6_rth_add (void *__bp, const struct in6_addr *__addr) __THROW;
  25003. +extern int inet6_rth_reverse (const void *__in, void *__out) __THROW;
  25004. +extern int inet6_rth_segments (const void *__bp) __THROW;
  25005. +extern struct in6_addr *inet6_rth_getaddr (const void *__bp, int __index)
  25006. __THROW;
  25007. # endif
  25008. # endif
  25009. @@ -572,23 +571,23 @@
  25010. extern int setipv4sourcefilter (int __s, struct in_addr __interface_addr,
  25011. struct in_addr __group, uint32_t __fmode,
  25012. uint32_t __numsrc,
  25013. - __const struct in_addr *__slist)
  25014. + const struct in_addr *__slist)
  25015. __THROW;
  25016. /* Get source filter. */
  25017. extern int getsourcefilter (int __s, uint32_t __interface_addr,
  25018. - __const struct sockaddr *__group,
  25019. + const struct sockaddr *__group,
  25020. socklen_t __grouplen, uint32_t *__fmode,
  25021. uint32_t *__numsrc,
  25022. struct sockaddr_storage *__slist) __THROW;
  25023. /* Set source filter. */
  25024. extern int setsourcefilter (int __s, uint32_t __interface_addr,
  25025. - __const struct sockaddr *__group,
  25026. + const struct sockaddr *__group,
  25027. socklen_t __grouplen, uint32_t __fmode,
  25028. uint32_t __numsrc,
  25029. - __const struct sockaddr_storage *__slist) __THROW;
  25030. + const struct sockaddr_storage *__slist) __THROW;
  25031. # endif
  25032. #endif /* use GNU */
  25033. diff -Nur uClibc-0.9.33.2/include/netinet/in_systm.h uClibc-git/include/netinet/in_systm.h
  25034. --- uClibc-0.9.33.2/include/netinet/in_systm.h 2012-05-15 09:20:09.000000000 +0200
  25035. +++ uClibc-git/include/netinet/in_systm.h 2014-07-25 20:36:05.057325525 +0200
  25036. @@ -13,9 +13,8 @@
  25037. Lesser General Public License for more details.
  25038. You should have received a copy of the GNU Lesser General Public
  25039. - License along with the GNU C Library; if not, write to the Free
  25040. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  25041. - 02111-1307 USA. */
  25042. + License along with the GNU C Library; if not, see
  25043. + <http://www.gnu.org/licenses/>. */
  25044. #ifndef _NETINET_IN_SYSTM_H
  25045. #define _NETINET_IN_SYSTM_H 1
  25046. diff -Nur uClibc-0.9.33.2/include/netinet/ip6.h uClibc-git/include/netinet/ip6.h
  25047. --- uClibc-0.9.33.2/include/netinet/ip6.h 2012-05-15 09:20:09.000000000 +0200
  25048. +++ uClibc-git/include/netinet/ip6.h 2014-07-25 20:36:05.057325525 +0200
  25049. @@ -12,9 +12,8 @@
  25050. Lesser General Public License for more details.
  25051. You should have received a copy of the GNU Lesser General Public
  25052. - License along with the GNU C Library; if not, write to the Free
  25053. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  25054. - 02111-1307 USA. */
  25055. + License along with the GNU C Library; if not, see
  25056. + <http://www.gnu.org/licenses/>. */
  25057. #ifndef _NETINET_IP6_H
  25058. #define _NETINET_IP6_H 1
  25059. diff -Nur uClibc-0.9.33.2/include/netinet/ip.h uClibc-git/include/netinet/ip.h
  25060. --- uClibc-0.9.33.2/include/netinet/ip.h 2012-05-15 09:20:09.000000000 +0200
  25061. +++ uClibc-git/include/netinet/ip.h 2014-07-25 20:36:05.057325525 +0200
  25062. @@ -13,9 +13,8 @@
  25063. Lesser General Public License for more details.
  25064. You should have received a copy of the GNU Lesser General Public
  25065. - License along with the GNU C Library; if not, write to the Free
  25066. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  25067. - 02111-1307 USA. */
  25068. + License along with the GNU C Library; if not, see
  25069. + <http://www.gnu.org/licenses/>. */
  25070. #ifndef __NETINET_IP_H
  25071. #define __NETINET_IP_H 1
  25072. diff -Nur uClibc-0.9.33.2/include/netinet/ip_icmp.h uClibc-git/include/netinet/ip_icmp.h
  25073. --- uClibc-0.9.33.2/include/netinet/ip_icmp.h 2012-05-15 09:20:09.000000000 +0200
  25074. +++ uClibc-git/include/netinet/ip_icmp.h 2014-07-25 20:36:05.057325525 +0200
  25075. @@ -12,9 +12,8 @@
  25076. Lesser General Public License for more details.
  25077. You should have received a copy of the GNU Lesser General Public
  25078. - License along with the GNU C Library; if not, write to the Free
  25079. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  25080. - 02111-1307 USA. */
  25081. + License along with the GNU C Library; if not, see
  25082. + <http://www.gnu.org/licenses/>. */
  25083. #ifndef __NETINET_IP_ICMP_H
  25084. #define __NETINET_IP_ICMP_H 1
  25085. diff -Nur uClibc-0.9.33.2/include/netinet/udp.h uClibc-git/include/netinet/udp.h
  25086. --- uClibc-0.9.33.2/include/netinet/udp.h 2012-05-15 09:20:09.000000000 +0200
  25087. +++ uClibc-git/include/netinet/udp.h 2014-07-25 20:36:05.057325525 +0200
  25088. @@ -12,9 +12,8 @@
  25089. Lesser General Public License for more details.
  25090. You should have received a copy of the GNU Lesser General Public
  25091. - License along with the GNU C Library; if not, write to the Free
  25092. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  25093. - 02111-1307 USA. */
  25094. + License along with the GNU C Library; if not, see
  25095. + <http://www.gnu.org/licenses/>. */
  25096. /*
  25097. * Copyright (C) 1982, 1986 Regents of the University of California.
  25098. diff -Nur uClibc-0.9.33.2/include/netipx/ipx.h uClibc-git/include/netipx/ipx.h
  25099. --- uClibc-0.9.33.2/include/netipx/ipx.h 2012-05-15 09:20:09.000000000 +0200
  25100. +++ uClibc-git/include/netipx/ipx.h 2014-07-25 20:36:05.069325588 +0200
  25101. @@ -12,9 +12,8 @@
  25102. Lesser General Public License for more details.
  25103. You should have received a copy of the GNU Lesser General Public
  25104. - License along with the GNU C Library; if not, write to the Free
  25105. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  25106. - 02111-1307 USA. */
  25107. + License along with the GNU C Library; if not, see
  25108. + <http://www.gnu.org/licenses/>. */
  25109. #ifndef __NETIPX_IPX_H
  25110. #define __NETIPX_IPX_H 1
  25111. diff -Nur uClibc-0.9.33.2/include/netpacket/packet.h uClibc-git/include/netpacket/packet.h
  25112. --- uClibc-0.9.33.2/include/netpacket/packet.h 2012-05-15 09:20:09.000000000 +0200
  25113. +++ uClibc-git/include/netpacket/packet.h 2014-07-25 20:36:05.085325672 +0200
  25114. @@ -13,9 +13,8 @@
  25115. Lesser General Public License for more details.
  25116. You should have received a copy of the GNU Lesser General Public
  25117. - License along with the GNU C Library; if not, write to the Free
  25118. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  25119. - 02111-1307 USA. */
  25120. + License along with the GNU C Library; if not, see
  25121. + <http://www.gnu.org/licenses/>. */
  25122. #ifndef __NETPACKET_PACKET_H
  25123. #define __NETPACKET_PACKET_H 1
  25124. diff -Nur uClibc-0.9.33.2/include/nl_types.h uClibc-git/include/nl_types.h
  25125. --- uClibc-0.9.33.2/include/nl_types.h 2012-05-15 09:20:09.000000000 +0200
  25126. +++ uClibc-git/include/nl_types.h 2014-07-25 20:36:05.085325672 +0200
  25127. @@ -12,9 +12,8 @@
  25128. Lesser General Public License for more details.
  25129. You should have received a copy of the GNU Lesser General Public
  25130. - License along with the GNU C Library; if not, write to the Free
  25131. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  25132. - 02111-1307 USA. */
  25133. + License along with the GNU C Library; if not, see
  25134. + <http://www.gnu.org/licenses/>. */
  25135. #ifndef _NL_TYPES_H
  25136. #define _NL_TYPES_H 1
  25137. @@ -49,12 +48,12 @@
  25138. This function is a possible cancellation point and therefore not
  25139. marked with __THROW. */
  25140. -extern nl_catd catopen (__const char *__cat_name, int __flag) __nonnull ((1));
  25141. +extern nl_catd catopen (const char *__cat_name, int __flag) __nonnull ((1));
  25142. /* Return translation with NUMBER in SET of CATALOG; if not found
  25143. return STRING. */
  25144. extern char *catgets (nl_catd __catalog, int __set, int __number,
  25145. - __const char *__string) __THROW __nonnull ((1));
  25146. + const char *__string) __THROW __nonnull ((1));
  25147. /* Close message CATALOG. */
  25148. extern int catclose (nl_catd __catalog) __THROW __nonnull ((1));
  25149. diff -Nur uClibc-0.9.33.2/include/obstack.h uClibc-git/include/obstack.h
  25150. --- uClibc-0.9.33.2/include/obstack.h 2012-05-15 09:20:09.000000000 +0200
  25151. +++ uClibc-git/include/obstack.h 2014-07-25 20:36:05.085325672 +0200
  25152. @@ -14,9 +14,8 @@
  25153. Lesser General Public License for more details.
  25154. You should have received a copy of the GNU Lesser General Public
  25155. - License along with the GNU C Library; if not, write to the Free
  25156. - Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  25157. - Boston, MA 02110-1301, USA. */
  25158. + License along with the GNU C Library; if not, see
  25159. + <http://www.gnu.org/licenses/>. */
  25160. /* Summary:
  25161. @@ -180,6 +179,7 @@
  25162. /* Declare the external functions we use; they are in obstack.c. */
  25163. extern void _obstack_newchunk (struct obstack *, int);
  25164. +libc_hidden_proto(_obstack_newchunk)
  25165. extern int _obstack_begin (struct obstack *, int, int,
  25166. void *(*) (long), void (*) (void *));
  25167. extern int _obstack_begin_1 (struct obstack *, int, int,
  25168. diff -Nur uClibc-0.9.33.2/include/printf.h uClibc-git/include/printf.h
  25169. --- uClibc-0.9.33.2/include/printf.h 2012-05-15 09:20:09.000000000 +0200
  25170. +++ uClibc-git/include/printf.h 2014-07-25 20:36:05.085325672 +0200
  25171. @@ -12,9 +12,8 @@
  25172. Lesser General Public License for more details.
  25173. You should have received a copy of the GNU Lesser General Public
  25174. - License along with the GNU C Library; if not, write to the Free
  25175. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  25176. - 02111-1307 USA. */
  25177. + License along with the GNU C Library; if not, see
  25178. + <http://www.gnu.org/licenses/>. */
  25179. /* March 11, 2001 Manuel Novoa III
  25180. *
  25181. @@ -143,14 +142,14 @@
  25182. #ifdef __UCLIBC_HAS_GLIBC_CUSTOM_PRINTF__
  25183. typedef int (*printf_function) (FILE *__stream,
  25184. - __const struct printf_info *__info,
  25185. - __const void *__const *__args);
  25186. + const struct printf_info *__info,
  25187. + const void *const *__args);
  25188. /* Type of a printf specifier-arginfo function.
  25189. INFO gives information about the format specification.
  25190. N, ARGTYPES, and return value are as for parse_printf_format. */
  25191. -typedef int printf_arginfo_function (__const struct printf_info *__info,
  25192. +typedef int printf_arginfo_function (const struct printf_info *__info,
  25193. size_t __n, int *__argtypes);
  25194. @@ -174,7 +173,7 @@
  25195. array it is passed with the types of the arguments it wants, and return
  25196. the number of arguments it wants. */
  25197. -extern size_t parse_printf_format (__const char *__restrict __fmt, size_t __n,
  25198. +extern size_t parse_printf_format (const char *__restrict __fmt, size_t __n,
  25199. int *__restrict __argtypes) __THROW;
  25200. @@ -222,11 +221,11 @@
  25201. the format specifier is a uppercase character powers of 1000 are
  25202. used. Otherwise powers of 1024. */
  25203. extern int printf_size (FILE *__restrict __fp,
  25204. - __const struct printf_info *__info,
  25205. - __const void *__const *__restrict __args) __THROW;
  25206. + const struct printf_info *__info,
  25207. + const void *const *__restrict __args) __THROW;
  25208. /* This is the appropriate argument information function for `printf_size'. */
  25209. -extern int printf_size_info (__const struct printf_info *__restrict
  25210. +extern int printf_size_info (const struct printf_info *__restrict
  25211. __info, size_t __n, int *__restrict __argtypes)
  25212. __THROW;
  25213. diff -Nur uClibc-0.9.33.2/include/pty.h uClibc-git/include/pty.h
  25214. --- uClibc-0.9.33.2/include/pty.h 2012-05-15 09:20:09.000000000 +0200
  25215. +++ uClibc-git/include/pty.h 2014-07-25 20:36:05.121325860 +0200
  25216. @@ -13,9 +13,8 @@
  25217. Lesser General Public License for more details.
  25218. You should have received a copy of the GNU Lesser General Public
  25219. - License along with the GNU C Library; if not, write to the Free
  25220. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  25221. - 02111-1307 USA. */
  25222. + License along with the GNU C Library; if not, see
  25223. + <http://www.gnu.org/licenses/>. */
  25224. #ifndef _PTY_H
  25225. #define _PTY_H 1
  25226. diff -Nur uClibc-0.9.33.2/include/pwd.h uClibc-git/include/pwd.h
  25227. --- uClibc-0.9.33.2/include/pwd.h 2012-05-15 09:20:09.000000000 +0200
  25228. +++ uClibc-git/include/pwd.h 2014-07-25 20:36:05.121325860 +0200
  25229. @@ -12,9 +12,8 @@
  25230. Lesser General Public License for more details.
  25231. You should have received a copy of the GNU Lesser General Public
  25232. - License along with the GNU C Library; if not, write to the Free
  25233. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  25234. - 02111-1307 USA. */
  25235. + License along with the GNU C Library; if not, see
  25236. + <http://www.gnu.org/licenses/>. */
  25237. /*
  25238. * POSIX Standard: 9.2.2 User Database Access <pwd.h>
  25239. @@ -100,7 +99,7 @@
  25240. cancellation point. But due to similarity with an POSIX interface
  25241. or due to the implementation it is a cancellation point and
  25242. therefore not marked with __THROW. */
  25243. -extern int putpwent (__const struct passwd *__restrict __p,
  25244. +extern int putpwent (const struct passwd *__restrict __p,
  25245. FILE *__restrict __f);
  25246. #endif
  25247. @@ -114,7 +113,8 @@
  25248. This function is a possible cancellation point and therefore not
  25249. marked with __THROW. */
  25250. -extern struct passwd *getpwnam (__const char *__name);
  25251. +extern struct passwd *getpwnam (const char *__name);
  25252. +libc_hidden_proto(getpwnam)
  25253. #if defined __USE_POSIX || defined __USE_MISC
  25254. @@ -149,7 +149,7 @@
  25255. struct passwd **__restrict __result);
  25256. libc_hidden_proto(getpwuid_r)
  25257. -extern int getpwnam_r (__const char *__restrict __name,
  25258. +extern int getpwnam_r (const char *__restrict __name,
  25259. struct passwd *__restrict __resultbuf,
  25260. char *__restrict __buffer, size_t __buflen,
  25261. struct passwd **__restrict __result);
  25262. diff -Nur uClibc-0.9.33.2/include/regex.h uClibc-git/include/regex.h
  25263. --- uClibc-0.9.33.2/include/regex.h 2012-05-15 09:20:09.000000000 +0200
  25264. +++ uClibc-git/include/regex.h 2014-07-25 20:36:05.121325860 +0200
  25265. @@ -1,6 +1,6 @@
  25266. /* Definitions for data structures and routines for the regular
  25267. expression library.
  25268. - Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005
  25269. + Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005,2006,2008
  25270. Free Software Foundation, Inc.
  25271. This file is part of the GNU C Library.
  25272. @@ -15,28 +15,16 @@
  25273. Lesser General Public License for more details.
  25274. You should have received a copy of the GNU Lesser General Public
  25275. - License along with the GNU C Library; if not, write to the Free
  25276. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  25277. - 02111-1307 USA. */
  25278. + License along with the GNU C Library; if not, see
  25279. + <http://www.gnu.org/licenses/>. */
  25280. #ifndef _REGEX_H
  25281. #define _REGEX_H 1
  25282. -#include <features.h>
  25283. -
  25284. #include <sys/types.h>
  25285. __BEGIN_DECLS
  25286. -/* POSIX says that <sys/types.h> must be included (by the caller) before
  25287. - <regex.h>. */
  25288. -
  25289. -#if !defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE && defined VMS
  25290. -/* VMS doesn't have `size_t' in <sys/types.h>, even though POSIX says it
  25291. - should be there. */
  25292. -# include <stddef.h>
  25293. -#endif
  25294. -
  25295. /* The following two types have to be signed and unsigned integer type
  25296. wide enough to hold a value of a pointer. For most ANSI compilers
  25297. ptrdiff_t and size_t should be likely OK. Still size of these two
  25298. @@ -51,20 +39,21 @@
  25299. add or remove a bit, only one other definition need change. */
  25300. typedef unsigned long int reg_syntax_t;
  25301. +#ifdef __USE_GNU
  25302. /* If this bit is not set, then \ inside a bracket expression is literal.
  25303. If set, then such a \ quotes the following character. */
  25304. -#define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
  25305. +# define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
  25306. /* If this bit is not set, then + and ? are operators, and \+ and \? are
  25307. literals.
  25308. If set, then \+ and \? are operators and + and ? are literals. */
  25309. -#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
  25310. +# define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
  25311. /* If this bit is set, then character classes are supported. They are:
  25312. [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:],
  25313. [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:].
  25314. If not set, then character classes are not supported. */
  25315. -#define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
  25316. +# define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
  25317. /* If this bit is set, then ^ and $ are always anchors (outside bracket
  25318. expressions, of course).
  25319. @@ -78,7 +67,7 @@
  25320. POSIX draft 11.2 says that * etc. in leading positions is undefined.
  25321. We already implemented a previous draft which made those constructs
  25322. invalid, though, so we haven't changed the code back. */
  25323. -#define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
  25324. +# define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
  25325. /* If this bit is set, then special characters are always special
  25326. regardless of where they are in the pattern.
  25327. @@ -86,71 +75,71 @@
  25328. some contexts; otherwise they are ordinary. Specifically,
  25329. * + ? and intervals are only special when not after the beginning,
  25330. open-group, or alternation operator. */
  25331. -#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
  25332. +# define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
  25333. /* If this bit is set, then *, +, ?, and { cannot be first in an re or
  25334. immediately after an alternation or begin-group operator. */
  25335. -#define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
  25336. +# define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
  25337. /* If this bit is set, then . matches newline.
  25338. If not set, then it doesn't. */
  25339. -#define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
  25340. +# define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
  25341. /* If this bit is set, then . doesn't match NUL.
  25342. If not set, then it does. */
  25343. -#define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
  25344. +# define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
  25345. /* If this bit is set, nonmatching lists [^...] do not match newline.
  25346. If not set, they do. */
  25347. -#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
  25348. +# define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
  25349. /* If this bit is set, either \{...\} or {...} defines an
  25350. interval, depending on RE_NO_BK_BRACES.
  25351. If not set, \{, \}, {, and } are literals. */
  25352. -#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
  25353. +# define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
  25354. /* If this bit is set, +, ? and | aren't recognized as operators.
  25355. If not set, they are. */
  25356. -#define RE_LIMITED_OPS (RE_INTERVALS << 1)
  25357. +# define RE_LIMITED_OPS (RE_INTERVALS << 1)
  25358. /* If this bit is set, newline is an alternation operator.
  25359. If not set, newline is literal. */
  25360. -#define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
  25361. +# define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
  25362. /* If this bit is set, then `{...}' defines an interval, and \{ and \}
  25363. are literals.
  25364. If not set, then `\{...\}' defines an interval. */
  25365. -#define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
  25366. +# define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
  25367. /* If this bit is set, (...) defines a group, and \( and \) are literals.
  25368. If not set, \(...\) defines a group, and ( and ) are literals. */
  25369. -#define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
  25370. +# define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
  25371. /* If this bit is set, then \<digit> matches <digit>.
  25372. If not set, then \<digit> is a back-reference. */
  25373. -#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
  25374. +# define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
  25375. /* If this bit is set, then | is an alternation operator, and \| is literal.
  25376. If not set, then \| is an alternation operator, and | is literal. */
  25377. -#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
  25378. +# define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
  25379. /* If this bit is set, then an ending range point collating higher
  25380. than the starting range point, as in [z-a], is invalid.
  25381. If not set, then when ending range point collates higher than the
  25382. starting range point, the range is ignored. */
  25383. -#define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
  25384. +# define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
  25385. /* If this bit is set, then an unmatched ) is ordinary.
  25386. If not set, then an unmatched ) is invalid. */
  25387. -#define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
  25388. +# define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
  25389. /* If this bit is set, succeed as soon as we match the whole pattern,
  25390. without further backtracking. */
  25391. -#define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
  25392. +# define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
  25393. /* If this bit is set, do not process the GNU regex operators.
  25394. If not set, then the GNU regex operators are recognized. */
  25395. -#define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
  25396. +# define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
  25397. /* If this bit is set, turn on internal regex debugging.
  25398. If not set, and debugging was on, turn it off.
  25399. @@ -158,29 +147,30 @@
  25400. We define this bit always, so that all that's needed to turn on
  25401. debugging is to recompile regex.c; the calling code can always have
  25402. this bit set, and it won't affect anything in the normal case. */
  25403. -#define RE_DEBUG (RE_NO_GNU_OPS << 1)
  25404. +# define RE_DEBUG (RE_NO_GNU_OPS << 1)
  25405. /* If this bit is set, a syntactically invalid interval is treated as
  25406. a string of ordinary characters. For example, the ERE 'a{1' is
  25407. treated as 'a\{1'. */
  25408. -#define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
  25409. +# define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
  25410. /* If this bit is set, then ignore case when matching.
  25411. If not set, then case is significant. */
  25412. -#define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
  25413. +# define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
  25414. /* This bit is used internally like RE_CONTEXT_INDEP_ANCHORS but only
  25415. for ^, because it is difficult to scan the regex backwards to find
  25416. whether ^ should be special. */
  25417. -#define RE_CARET_ANCHORS_HERE (RE_ICASE << 1)
  25418. +# define RE_CARET_ANCHORS_HERE (RE_ICASE << 1)
  25419. /* If this bit is set, then \{ cannot be first in an bre or
  25420. immediately after an alternation or begin-group operator. */
  25421. -#define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1)
  25422. +# define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1)
  25423. /* If this bit is set, then no_sub will be set to 1 during
  25424. re_compile_pattern. */
  25425. -#define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1)
  25426. +# define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1)
  25427. +#endif
  25428. /* This global variable defines the particular regexp syntax to use (for
  25429. some interfaces). When a regexp is compiled, the syntax used is
  25430. @@ -188,6 +178,7 @@
  25431. already-compiled regexps. */
  25432. extern reg_syntax_t re_syntax_options;
  25433. +#ifdef __USE_GNU
  25434. /* Define combinations of the above bits for the standard possibilities.
  25435. (The [[[ comments delimit what gets put into the Texinfo file, so
  25436. don't delete them!) */
  25437. @@ -262,11 +253,12 @@
  25438. /* Maximum number of duplicates an interval can allow. Some systems
  25439. (erroneously) define this in other header files, but we want our
  25440. value, so remove any previous define. */
  25441. -#ifdef RE_DUP_MAX
  25442. -# undef RE_DUP_MAX
  25443. -#endif
  25444. +# ifdef RE_DUP_MAX
  25445. +# undef RE_DUP_MAX
  25446. +# endif
  25447. /* If sizeof(int) == 2, then ((1 << 15) - 1) overflows. */
  25448. -#define RE_DUP_MAX (0x7fff)
  25449. +# define RE_DUP_MAX (0x7fff)
  25450. +#endif
  25451. /* POSIX `cflags' bits (i.e., information for `regcomp'). */
  25452. @@ -310,7 +302,7 @@
  25453. `re_error_msg' table in regex.c. */
  25454. typedef enum
  25455. {
  25456. -#ifdef _XOPEN_SOURCE
  25457. +#if defined _XOPEN_SOURCE || defined __USE_XOPEN2K
  25458. REG_ENOSYS = -1, /* This will never happen for this implementation. */
  25459. #endif
  25460. @@ -345,7 +337,16 @@
  25461. private to the regex routines. */
  25462. #ifndef RE_TRANSLATE_TYPE
  25463. -# define RE_TRANSLATE_TYPE unsigned char *
  25464. +# define __RE_TRANSLATE_TYPE unsigned char *
  25465. +# ifdef __USE_GNU
  25466. +# define RE_TRANSLATE_TYPE __RE_TRANSLATE_TYPE
  25467. +# endif
  25468. +#endif
  25469. +
  25470. +#ifdef __USE_GNU
  25471. +# define __REPB_PREFIX(name) name
  25472. +#else
  25473. +# define __REPB_PREFIX(name) __##name
  25474. #endif
  25475. struct re_pattern_buffer
  25476. @@ -353,27 +354,27 @@
  25477. /* Space that holds the compiled pattern. It is declared as
  25478. `unsigned char *' because its elements are sometimes used as
  25479. array indexes. */
  25480. - unsigned char *buffer;
  25481. + unsigned char *__REPB_PREFIX(buffer);
  25482. /* Number of bytes to which `buffer' points. */
  25483. - unsigned long int allocated;
  25484. + unsigned long int __REPB_PREFIX(allocated);
  25485. /* Number of bytes actually used in `buffer'. */
  25486. - unsigned long int used;
  25487. + unsigned long int __REPB_PREFIX(used);
  25488. /* Syntax setting with which the pattern was compiled. */
  25489. - reg_syntax_t syntax;
  25490. + reg_syntax_t __REPB_PREFIX(syntax);
  25491. /* Pointer to a fastmap, if any, otherwise zero. re_search uses the
  25492. fastmap, if there is one, to skip over impossible starting points
  25493. for matches. */
  25494. - char *fastmap;
  25495. + char *__REPB_PREFIX(fastmap);
  25496. /* Either a translate table to apply to all characters before
  25497. comparing them, or zero for no translation. The translation is
  25498. applied to a pattern when it is compiled and to a string when it
  25499. is matched. */
  25500. - RE_TRANSLATE_TYPE translate;
  25501. + __RE_TRANSLATE_TYPE __REPB_PREFIX(translate);
  25502. /* Number of subexpressions found by the compiler. */
  25503. size_t re_nsub;
  25504. @@ -382,34 +383,36 @@
  25505. Well, in truth it's used only in `re_search_2', to see whether or
  25506. not we should use the fastmap, so we don't set this absolutely
  25507. perfectly; see `re_compile_fastmap' (the `duplicate' case). */
  25508. - unsigned can_be_null : 1;
  25509. + unsigned __REPB_PREFIX(can_be_null) : 1;
  25510. /* If REGS_UNALLOCATED, allocate space in the `regs' structure
  25511. for `max (RE_NREGS, re_nsub + 1)' groups.
  25512. If REGS_REALLOCATE, reallocate space if necessary.
  25513. If REGS_FIXED, use what's there. */
  25514. -#define REGS_UNALLOCATED 0
  25515. -#define REGS_REALLOCATE 1
  25516. -#define REGS_FIXED 2
  25517. - unsigned regs_allocated : 2;
  25518. +#ifdef __USE_GNU
  25519. +# define REGS_UNALLOCATED 0
  25520. +# define REGS_REALLOCATE 1
  25521. +# define REGS_FIXED 2
  25522. +#endif
  25523. + unsigned __REPB_PREFIX(regs_allocated) : 2;
  25524. /* Set to zero when `regex_compile' compiles a pattern; set to one
  25525. by `re_compile_fastmap' if it updates the fastmap. */
  25526. - unsigned fastmap_accurate : 1;
  25527. + unsigned __REPB_PREFIX(fastmap_accurate) : 1;
  25528. /* If set, `re_match_2' does not return information about
  25529. subexpressions. */
  25530. - unsigned no_sub : 1;
  25531. + unsigned __REPB_PREFIX(no_sub) : 1;
  25532. /* If set, a beginning-of-line anchor doesn't match at the beginning
  25533. of the string. */
  25534. - unsigned not_bol : 1;
  25535. + unsigned __REPB_PREFIX(not_bol) : 1;
  25536. /* Similarly for an end-of-line anchor. */
  25537. - unsigned not_eol : 1;
  25538. + unsigned __REPB_PREFIX(not_eol) : 1;
  25539. /* If true, an anchor at a newline matches. */
  25540. - unsigned newline_anchor : 1;
  25541. + unsigned __REPB_PREFIX(newline_anchor) : 1;
  25542. };
  25543. typedef struct re_pattern_buffer regex_t;
  25544. @@ -418,6 +421,7 @@
  25545. typedef int regoff_t;
  25546. +#ifdef __USE_GNU
  25547. /* This is the structure we store register match data in. See
  25548. regex.texinfo for a full description of what registers match. */
  25549. struct re_registers
  25550. @@ -431,8 +435,9 @@
  25551. /* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer,
  25552. `re_match_2' returns information about at least this many registers
  25553. the first time a `regs' structure is passed. */
  25554. -#ifndef RE_NREGS
  25555. -# define RE_NREGS 30
  25556. +# ifndef RE_NREGS
  25557. +# define RE_NREGS 30
  25558. +# endif
  25559. #endif
  25560. @@ -447,7 +452,7 @@
  25561. /* Declarations for routines. */
  25562. -
  25563. +#ifdef __USE_GNU
  25564. /* Sets the current default syntax to SYNTAX, and return the old syntax.
  25565. You can also simply assign to the `re_syntax_options' variable. */
  25566. extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax);
  25567. @@ -515,8 +520,9 @@
  25568. struct re_registers *__regs,
  25569. unsigned int __num_regs,
  25570. regoff_t *__starts, regoff_t *__ends);
  25571. +#endif /* Use GNU */
  25572. -#if defined _REGEX_RE_COMP || defined _LIBC
  25573. +#if defined _REGEX_RE_COMP || (defined _LIBC && defined __USE_BSD)
  25574. # ifndef _CRAY
  25575. /* 4.2 bsd compatibility. */
  25576. extern char *re_comp (const char *);
  25577. @@ -537,7 +543,8 @@
  25578. #endif
  25579. /* gcc 3.1 and up support the [restrict] syntax. */
  25580. #ifndef __restrict_arr
  25581. -# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
  25582. +# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) \
  25583. + && !defined __GNUG__
  25584. # define __restrict_arr __restrict
  25585. # else
  25586. # define __restrict_arr
  25587. diff -Nur uClibc-0.9.33.2/include/regexp.h uClibc-git/include/regexp.h
  25588. --- uClibc-0.9.33.2/include/regexp.h 2012-05-15 09:20:09.000000000 +0200
  25589. +++ uClibc-git/include/regexp.h 2014-07-25 20:36:05.121325860 +0200
  25590. @@ -14,9 +14,8 @@
  25591. Lesser General Public License for more details.
  25592. You should have received a copy of the GNU Lesser General Public
  25593. - License along with the GNU C Library; if not, write to the Free
  25594. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  25595. - 02111-1307 USA. */
  25596. + License along with the GNU C Library; if not, see
  25597. + <http://www.gnu.org/licenses/>. */
  25598. #ifndef _REGEXP_H
  25599. #define _REGEXP_H 1
  25600. @@ -103,7 +102,7 @@
  25601. on the macros. */
  25602. char *
  25603. compile (char *__restrict instring, char *__restrict expbuf,
  25604. - __const char *__restrict endbuf, int eof)
  25605. + const char *__restrict endbuf, int eof)
  25606. {
  25607. char *__input_buffer = NULL;
  25608. size_t __input_size = 0;
  25609. @@ -216,14 +215,14 @@
  25610. found in the buffer starting at EXPBUF. `loc1' will return the
  25611. first character matched and `loc2' points to the next unmatched
  25612. character. */
  25613. -extern int step (__const char *__restrict __string,
  25614. - __const char *__restrict __expbuf) __THROW;
  25615. +extern int step (const char *__restrict __string,
  25616. + const char *__restrict __expbuf) __THROW;
  25617. /* Match the beginning of STRING with the compiled regular expression
  25618. in EXPBUF. If the match is successful `loc2' will contain the
  25619. position of the first unmatched character. */
  25620. -extern int advance (__const char *__restrict __string,
  25621. - __const char *__restrict __expbuf) __THROW;
  25622. +extern int advance (const char *__restrict __string,
  25623. + const char *__restrict __expbuf) __THROW;
  25624. #endif
  25625. diff -Nur uClibc-0.9.33.2/include/rpc/auth_des.h uClibc-git/include/rpc/auth_des.h
  25626. --- uClibc-0.9.33.2/include/rpc/auth_des.h 2012-05-15 09:20:09.000000000 +0200
  25627. +++ uClibc-git/include/rpc/auth_des.h 2014-07-25 20:36:05.137325944 +0200
  25628. @@ -12,9 +12,8 @@
  25629. Lesser General Public License for more details.
  25630. You should have received a copy of the GNU Lesser General Public
  25631. - License along with the GNU C Library; if not, write to the Free
  25632. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  25633. - 02111-1307 USA. */
  25634. + License along with the GNU C Library; if not, see
  25635. + <http://www.gnu.org/licenses/>. */
  25636. #ifndef _RPC_AUTH_DES_H
  25637. #define _RPC_AUTH_DES_H 1
  25638. @@ -89,27 +88,26 @@
  25639. #define adv_nickname adv_int_u
  25640. /* Map a des credential into a unix cred. */
  25641. -extern int authdes_getucred (__const struct authdes_cred * __adc,
  25642. +extern int authdes_getucred (const struct authdes_cred * __adc,
  25643. uid_t * __uid, gid_t * __gid,
  25644. short *__grouplen, gid_t * __groups) __THROW;
  25645. /* Get the public key for NAME and place it in KEY. NAME can only be
  25646. up to MAXNETNAMELEN bytes long and the destination buffer KEY should
  25647. have HEXKEYBYTES + 1 bytes long to fit all characters from the key. */
  25648. -extern int getpublickey (__const char *__name, char *__key) __THROW;
  25649. +extern int getpublickey (const char *__name, char *__key) __THROW;
  25650. /* Get the secret key for NAME and place it in KEY. PASSWD is used to
  25651. decrypt the encrypted key stored in the database. NAME can only be
  25652. up to MAXNETNAMELEN bytes long and the destination buffer KEY
  25653. should have HEXKEYBYTES + 1 bytes long to fit all characters from
  25654. the key. */
  25655. -extern int getsecretkey (__const char *__name, char *__key,
  25656. - __const char *__passwd) __THROW;
  25657. +extern int getsecretkey (const char *__name, char *__key,
  25658. + const char *__passwd) __THROW;
  25659. #endif
  25660. extern int rtime (struct sockaddr_in *__addrp, struct rpc_timeval *__timep,
  25661. struct rpc_timeval *__timeout) __THROW;
  25662. -libc_hidden_proto(rtime)
  25663. __END_DECLS
  25664. diff -Nur uClibc-0.9.33.2/include/rpc/auth.h uClibc-git/include/rpc/auth.h
  25665. --- uClibc-0.9.33.2/include/rpc/auth.h 2012-05-15 09:20:09.000000000 +0200
  25666. +++ uClibc-git/include/rpc/auth.h 2014-07-25 20:36:05.137325944 +0200
  25667. @@ -41,17 +41,6 @@
  25668. #ifndef _RPC_AUTH_H
  25669. #define _RPC_AUTH_H 1
  25670. -#ifdef _LIBC
  25671. -/* Some adjustments to make the libc source from glibc
  25672. - * compile more easily with uClibc... */
  25673. -#ifndef __FORCE_GLIBC
  25674. -#define __FORCE_GLIBC
  25675. -#endif
  25676. -#ifndef _GNU_SOURCE
  25677. -#define _GNU_SOURCE
  25678. -#endif
  25679. -#define _(X) X
  25680. -#endif
  25681. #include <features.h>
  25682. #include <rpc/xdr.h>
  25683. @@ -107,6 +96,10 @@
  25684. struct opaque_auth ah_cred;
  25685. struct opaque_auth ah_verf;
  25686. union des_block ah_key;
  25687. + /* not sure whether non-const-ness is a part of the spec... if it is,
  25688. + * enclose "const" in #ifdef _LIBC / #endif
  25689. + * to make it effective only for libc compile */
  25690. + const
  25691. struct auth_ops {
  25692. void (*ah_nextverf) (AUTH *);
  25693. int (*ah_marshal) (AUTH *, XDR *); /* nextverf & serialize */
  25694. @@ -200,11 +193,11 @@
  25695. *
  25696. */
  25697. extern int getnetname (char *) __THROW;
  25698. -extern int host2netname (char *, __const char *, __const char *) __THROW;
  25699. -extern int user2netname (char *, __const uid_t, __const char *) __THROW;
  25700. -extern int netname2user (__const char *, uid_t *, gid_t *, int *, gid_t *)
  25701. +extern int host2netname (char *, const char *, const char *) __THROW;
  25702. +extern int user2netname (char *, const uid_t, const char *) __THROW;
  25703. +extern int netname2user (const char *, uid_t *, gid_t *, int *, gid_t *)
  25704. __THROW;
  25705. -extern int netname2host (__const char *, char *, __const int) __THROW;
  25706. +extern int netname2host (const char *, char *, const int) __THROW;
  25707. /*
  25708. *
  25709. diff -Nur uClibc-0.9.33.2/include/rpc/clnt.h uClibc-git/include/rpc/clnt.h
  25710. --- uClibc-0.9.33.2/include/rpc/clnt.h 2012-05-15 09:20:09.000000000 +0200
  25711. +++ uClibc-git/include/rpc/clnt.h 2014-07-25 20:36:05.137325944 +0200
  25712. @@ -281,7 +281,7 @@
  25713. * u_long prog;
  25714. * u_long vers;
  25715. */
  25716. -extern CLIENT *clntraw_create (__const u_long __prog, __const u_long __vers)
  25717. +extern CLIENT *clntraw_create (const u_long __prog, const u_long __vers)
  25718. __THROW;
  25719. @@ -295,8 +295,8 @@
  25720. * u_ong vers; -- version number
  25721. * char *prot; -- protocol
  25722. */
  25723. -extern CLIENT *clnt_create (__const char *__host, __const u_long __prog,
  25724. - __const u_long __vers, __const char *__prot)
  25725. +extern CLIENT *clnt_create (const char *__host, const u_long __prog,
  25726. + const u_long __vers, const char *__prot)
  25727. __THROW;
  25728. @@ -365,18 +365,18 @@
  25729. libc_hidden_proto(clntunix_create)
  25730. -extern int callrpc (__const char *__host, __const u_long __prognum,
  25731. - __const u_long __versnum, __const u_long __procnum,
  25732. - __const xdrproc_t __inproc, __const char *__in,
  25733. - __const xdrproc_t __outproc, char *__out) __THROW;
  25734. +extern int callrpc (const char *__host, const u_long __prognum,
  25735. + const u_long __versnum, const u_long __procnum,
  25736. + const xdrproc_t __inproc, const char *__in,
  25737. + const xdrproc_t __outproc, char *__out) __THROW;
  25738. extern int _rpc_dtablesize (void) __THROW;
  25739. libc_hidden_proto(_rpc_dtablesize)
  25740. /*
  25741. * Print why creation failed
  25742. */
  25743. -extern void clnt_pcreateerror (__const char *__msg); /* stderr */
  25744. -extern char *clnt_spcreateerror(__const char *__msg) __THROW; /* string */
  25745. +extern void clnt_pcreateerror (const char *__msg); /* stderr */
  25746. +extern char *clnt_spcreateerror(const char *__msg) __THROW; /* string */
  25747. libc_hidden_proto(clnt_spcreateerror)
  25748. /*
  25749. @@ -387,10 +387,10 @@
  25750. /*
  25751. * Print an English error message, given the client error code
  25752. */
  25753. -extern void clnt_perror (CLIENT *__clnt, __const char *__msg);
  25754. +extern void clnt_perror (CLIENT *__clnt, const char *__msg);
  25755. /* stderr */
  25756. libc_hidden_proto(clnt_perror)
  25757. -extern char *clnt_sperror (CLIENT *__clnt, __const char *__msg) __THROW;
  25758. +extern char *clnt_sperror (CLIENT *__clnt, const char *__msg) __THROW;
  25759. /* string */
  25760. libc_hidden_proto(clnt_sperror)
  25761. @@ -416,7 +416,7 @@
  25762. /*
  25763. * get the port number on the host for the rpc program,version and proto
  25764. */
  25765. -extern int getrpcport (__const char * __host, u_long __prognum,
  25766. +extern int getrpcport (const char * __host, u_long __prognum,
  25767. u_long __versnum, u_int proto) __THROW;
  25768. /*
  25769. diff -Nur uClibc-0.9.33.2/include/rpc/netdb.h uClibc-git/include/rpc/netdb.h
  25770. --- uClibc-0.9.33.2/include/rpc/netdb.h 2012-05-15 09:20:09.000000000 +0200
  25771. +++ uClibc-git/include/rpc/netdb.h 2014-07-25 20:36:05.137325944 +0200
  25772. @@ -54,7 +54,7 @@
  25773. libc_hidden_proto(setrpcent)
  25774. extern void endrpcent (void) __THROW;
  25775. libc_hidden_proto(endrpcent)
  25776. -extern struct rpcent *getrpcbyname (__const char *__name) __THROW;
  25777. +extern struct rpcent *getrpcbyname (const char *__name) __THROW;
  25778. libc_hidden_proto(getrpcbyname)
  25779. extern struct rpcent *getrpcbynumber (int __number) __THROW;
  25780. libc_hidden_proto(getrpcbynumber)
  25781. @@ -62,7 +62,7 @@
  25782. libc_hidden_proto(getrpcent)
  25783. #if defined __USE_MISC && defined __UCLIBC_HAS_REENTRANT_RPC__
  25784. -extern int getrpcbyname_r (__const char *__name, struct rpcent *__result_buf,
  25785. +extern int getrpcbyname_r (const char *__name, struct rpcent *__result_buf,
  25786. char *__buffer, size_t __buflen,
  25787. struct rpcent **__result) __THROW;
  25788. diff -Nur uClibc-0.9.33.2/include/rpc/pmap_clnt.h uClibc-git/include/rpc/pmap_clnt.h
  25789. --- uClibc-0.9.33.2/include/rpc/pmap_clnt.h 2012-05-15 09:20:09.000000000 +0200
  25790. +++ uClibc-git/include/rpc/pmap_clnt.h 2014-07-25 20:36:05.137325944 +0200
  25791. @@ -69,30 +69,30 @@
  25792. * address if the responder to the broadcast.
  25793. */
  25794. -extern bool_t pmap_set (__const u_long __program, __const u_long __vers,
  25795. +extern bool_t pmap_set (const u_long __program, const u_long __vers,
  25796. int __protocol, u_short __port) __THROW;
  25797. libc_hidden_proto(pmap_set)
  25798. -extern bool_t pmap_unset (__const u_long __program, __const u_long __vers)
  25799. +extern bool_t pmap_unset (const u_long __program, const u_long __vers)
  25800. __THROW;
  25801. libc_hidden_proto(pmap_unset)
  25802. extern struct pmaplist *pmap_getmaps (struct sockaddr_in *__address) __THROW;
  25803. extern enum clnt_stat pmap_rmtcall (struct sockaddr_in *__addr,
  25804. - __const u_long __prog,
  25805. - __const u_long __vers,
  25806. - __const u_long __proc,
  25807. + const u_long __prog,
  25808. + const u_long __vers,
  25809. + const u_long __proc,
  25810. xdrproc_t __xdrargs,
  25811. caddr_t __argsp, xdrproc_t __xdrres,
  25812. caddr_t __resp, struct timeval __tout,
  25813. u_long *__port_ptr) __THROW;
  25814. -extern enum clnt_stat clnt_broadcast (__const u_long __prog,
  25815. - __const u_long __vers,
  25816. - __const u_long __proc, xdrproc_t __xargs,
  25817. +extern enum clnt_stat clnt_broadcast (const u_long __prog,
  25818. + const u_long __vers,
  25819. + const u_long __proc, xdrproc_t __xargs,
  25820. caddr_t __argsp, xdrproc_t __xresults,
  25821. caddr_t __resultsp,
  25822. resultproc_t __eachresult) __THROW;
  25823. extern u_short pmap_getport (struct sockaddr_in *__address,
  25824. - __const u_long __program,
  25825. - __const u_long __version, u_int __protocol)
  25826. + const u_long __program,
  25827. + const u_long __version, u_int __protocol)
  25828. __THROW;
  25829. libc_hidden_proto(pmap_getport)
  25830. diff -Nur uClibc-0.9.33.2/include/rpc/rpc.h uClibc-git/include/rpc/rpc.h
  25831. --- uClibc-0.9.33.2/include/rpc/rpc.h 2012-05-15 09:20:09.000000000 +0200
  25832. +++ uClibc-git/include/rpc/rpc.h 2014-07-25 20:36:05.137325944 +0200
  25833. @@ -38,19 +38,6 @@
  25834. #ifndef _RPC_RPC_H
  25835. #define _RPC_RPC_H 1
  25836. -#ifdef _LIBC
  25837. -/* Some adjustments to make the libc source from glibc
  25838. - * compile more easily with uClibc... */
  25839. -#ifndef __FORCE_GLIBC
  25840. -#define __FORCE_GLIBC
  25841. -#endif
  25842. -#ifndef _GNU_SOURCE
  25843. -#define _GNU_SOURCE
  25844. -#endif
  25845. -#define _(X) X
  25846. -#include <features.h>
  25847. -#endif
  25848. -
  25849. #include <rpc/types.h> /* some typedefs */
  25850. #include <netinet/in.h>
  25851. @@ -109,11 +96,6 @@
  25852. libc_hidden_proto(__rpc_thread_svc_max_pollfd)
  25853. #define svc_max_pollfd (*__rpc_thread_svc_max_pollfd ())
  25854. -extern bool_t xdr_accepted_reply (XDR *xdrs, struct accepted_reply *ar);
  25855. -libc_hidden_proto(xdr_accepted_reply)
  25856. -extern bool_t xdr_rejected_reply (XDR *xdrs, struct rejected_reply *rr);
  25857. -libc_hidden_proto(xdr_rejected_reply)
  25858. -
  25859. __END_DECLS
  25860. #endif /* rpc/rpc.h */
  25861. diff -Nur uClibc-0.9.33.2/include/rpc/rpc_msg.h uClibc-git/include/rpc/rpc_msg.h
  25862. --- uClibc-0.9.33.2/include/rpc/rpc_msg.h 2012-05-15 09:20:09.000000000 +0200
  25863. +++ uClibc-git/include/rpc/rpc_msg.h 2014-07-25 20:36:05.137325944 +0200
  25864. @@ -201,6 +201,26 @@
  25865. __THROW;
  25866. libc_hidden_proto(_seterr_reply)
  25867. +#ifdef __UCLIBC__
  25868. +/*
  25869. + * XDR routine to handle an accepted rpc reply.
  25870. + * xdr_accepted_reply(xdrs, rej)
  25871. + * XDR *xdrs;
  25872. + * struct accepted_reply *rej;
  25873. + */
  25874. +extern bool_t xdr_accepted_reply(XDR *__xdrs, struct accepted_reply *__ar);
  25875. +libc_hidden_proto(xdr_accepted_reply)
  25876. +
  25877. +/*
  25878. + * XDR routine to handle a rejected rpc reply.
  25879. + * xdr_rejected_reply(xdrs, rej)
  25880. + * XDR *xdrs;
  25881. + * struct rejected_reply *rej;
  25882. + */
  25883. +extern bool_t xdr_rejected_reply(XDR *__xdrs, struct rejected_reply *__rr);
  25884. +libc_hidden_proto(xdr_rejected_reply)
  25885. +#endif
  25886. +
  25887. __END_DECLS
  25888. #endif /* rpc/rpc_msg.h */
  25889. diff -Nur uClibc-0.9.33.2/include/rpc/types.h uClibc-git/include/rpc/types.h
  25890. --- uClibc-0.9.33.2/include/rpc/types.h 2012-05-15 09:20:09.000000000 +0200
  25891. +++ uClibc-git/include/rpc/types.h 2014-07-25 20:36:05.141325965 +0200
  25892. @@ -33,19 +33,6 @@
  25893. #ifndef _RPC_TYPES_H
  25894. #define _RPC_TYPES_H 1
  25895. -#ifdef _LIBC
  25896. -/* Some adjustments to make the libc source from glibc
  25897. - * compile more easily with uClibc... */
  25898. -#ifndef __FORCE_GLIBC
  25899. -#define __FORCE_GLIBC
  25900. -#endif
  25901. -#ifndef _GNU_SOURCE
  25902. -#define _GNU_SOURCE
  25903. -#endif
  25904. -#define _(X) X
  25905. -#endif
  25906. -#include <features.h>
  25907. -
  25908. typedef int bool_t;
  25909. typedef int enum_t;
  25910. /* This needs to be changed to uint32_t in the future */
  25911. diff -Nur uClibc-0.9.33.2/include/rpc/xdr.h uClibc-git/include/rpc/xdr.h
  25912. --- uClibc-0.9.33.2/include/rpc/xdr.h 2012-05-15 09:20:09.000000000 +0200
  25913. +++ uClibc-git/include/rpc/xdr.h 2014-07-25 20:36:05.141325965 +0200
  25914. @@ -36,14 +36,6 @@
  25915. #ifndef _RPC_XDR_H
  25916. #define _RPC_XDR_H 1
  25917. -#ifdef _LIBC
  25918. -/* Some adjustments to make the libc source from glibc
  25919. - * compile more easily with uClibc... */
  25920. -# ifndef __FORCE_GLIBC
  25921. -# define __FORCE_GLIBC
  25922. -# endif
  25923. -# define _(X) X
  25924. -#endif
  25925. #include <features.h>
  25926. #include <sys/types.h>
  25927. #include <rpc/types.h>
  25928. @@ -120,17 +112,21 @@
  25929. struct XDR
  25930. {
  25931. enum xdr_op x_op; /* operation; fast additional param */
  25932. + /* not sure whether non-const-ness is a part of the spec... if it is,
  25933. + * enclose "const" in #ifdef _LIBC / #endif
  25934. + * to make it effective only for libc compile */
  25935. + const
  25936. struct xdr_ops
  25937. {
  25938. bool_t (*x_getlong) (XDR *__xdrs, long *__lp);
  25939. /* get a long from underlying stream */
  25940. - bool_t (*x_putlong) (XDR *__xdrs, __const long *__lp);
  25941. + bool_t (*x_putlong) (XDR *__xdrs, const long *__lp);
  25942. /* put a long to " */
  25943. bool_t (*x_getbytes) (XDR *__xdrs, caddr_t __addr, u_int __len);
  25944. /* get some bytes from " */
  25945. - bool_t (*x_putbytes) (XDR *__xdrs, __const char *__addr, u_int __len);
  25946. + bool_t (*x_putbytes) (XDR *__xdrs, const char *__addr, u_int __len);
  25947. /* put some bytes to " */
  25948. - u_int (*x_getpostn) (__const XDR *__xdrs);
  25949. + u_int (*x_getpostn) (const XDR *__xdrs);
  25950. /* returns bytes off from beginning */
  25951. bool_t (*x_setpostn) (XDR *__xdrs, u_int __pos);
  25952. /* lets you reposition the stream */
  25953. @@ -140,7 +136,7 @@
  25954. /* free privates of this xdr_stream */
  25955. bool_t (*x_getint32) (XDR *__xdrs, int32_t *__ip);
  25956. /* get a int from underlying stream */
  25957. - bool_t (*x_putint32) (XDR *__xdrs, __const int32_t *__ip);
  25958. + bool_t (*x_putint32) (XDR *__xdrs, const int32_t *__ip);
  25959. /* put a int to " */
  25960. }
  25961. *x_ops;
  25962. @@ -320,6 +316,8 @@
  25963. extern bool_t xdr_uint32_t (XDR *__xdrs, uint32_t *__up) __THROW;
  25964. extern bool_t xdr_int64_t (XDR *__xdrs, int64_t *__ip) __THROW;
  25965. extern bool_t xdr_uint64_t (XDR *__xdrs, uint64_t *__up) __THROW;
  25966. +extern bool_t xdr_quad_t (XDR *__xdrs, quad_t *__ip) __THROW;
  25967. +extern bool_t xdr_u_quad_t (XDR *__xdrs, u_quad_t *__up) __THROW;
  25968. extern bool_t xdr_bool (XDR *__xdrs, bool_t *__bp) __THROW;
  25969. libc_hidden_proto(xdr_bool)
  25970. extern bool_t xdr_enum (XDR *__xdrs, enum_t *__ep) __THROW;
  25971. @@ -336,7 +334,7 @@
  25972. extern bool_t xdr_string (XDR *__xdrs, char **__cpp, u_int __maxsize) __THROW;
  25973. libc_hidden_proto(xdr_string)
  25974. extern bool_t xdr_union (XDR *__xdrs, enum_t *__dscmp, char *__unp,
  25975. - __const struct xdr_discrim *__choices,
  25976. + const struct xdr_discrim *__choices,
  25977. xdrproc_t dfault) __THROW;
  25978. libc_hidden_proto(xdr_union)
  25979. extern bool_t xdr_char (XDR *__xdrs, char *__cp) __THROW;
  25980. @@ -372,7 +370,7 @@
  25981. */
  25982. /* XDR using memory buffers */
  25983. -extern void xdrmem_create (XDR *__xdrs, __const caddr_t __addr,
  25984. +extern void xdrmem_create (XDR *__xdrs, const caddr_t __addr,
  25985. u_int __size, enum xdr_op __xop) __THROW;
  25986. libc_hidden_proto(xdrmem_create)
  25987. diff -Nur uClibc-0.9.33.2/include/sched.h uClibc-git/include/sched.h
  25988. --- uClibc-0.9.33.2/include/sched.h 2012-05-15 09:20:09.000000000 +0200
  25989. +++ uClibc-git/include/sched.h 2014-07-25 20:36:05.141325965 +0200
  25990. @@ -13,9 +13,8 @@
  25991. Lesser General Public License for more details.
  25992. You should have received a copy of the GNU Lesser General Public
  25993. - License along with the GNU C Library; if not, write to the Free
  25994. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  25995. - 02111-1307 USA. */
  25996. + License along with the GNU C Library; if not, see
  25997. + <http://www.gnu.org/licenses/>. */
  25998. #ifndef _SCHED_H
  25999. #define _SCHED_H 1
  26000. @@ -40,7 +39,7 @@
  26001. __BEGIN_DECLS
  26002. /* Set scheduling parameters for a process. */
  26003. -extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param)
  26004. +extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
  26005. __THROW;
  26006. /* Retrieve scheduling parameters for a particular process. */
  26007. @@ -48,7 +47,7 @@
  26008. /* Set scheduling algorithm and/or parameters for a process. */
  26009. extern int sched_setscheduler (__pid_t __pid, int __policy,
  26010. - __const struct sched_param *__param) __THROW;
  26011. + const struct sched_param *__param) __THROW;
  26012. /* Retrieve scheduling algorithm for a particular purpose. */
  26013. extern int sched_getscheduler (__pid_t __pid) __THROW;
  26014. @@ -108,11 +107,19 @@
  26015. /* Set the CPU affinity for a task */
  26016. extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize,
  26017. - __const cpu_set_t *__cpuset) __THROW;
  26018. + const cpu_set_t *__cpuset) __THROW;
  26019. /* Get the CPU affinity for a task */
  26020. extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize,
  26021. cpu_set_t *__cpuset) __THROW;
  26022. +
  26023. +# ifdef _LIBC
  26024. +extern int __clone (int (*__fn) (void *__arg), void *__child_stack,
  26025. + int __flags, void *__arg, ...);
  26026. +extern int __clone2 (int (*__fn) (void *__arg), void *__child_stack_base,
  26027. + size_t __child_stack_size, int __flags, void *__arg, ...);
  26028. +# endif
  26029. +
  26030. #endif
  26031. __END_DECLS
  26032. diff -Nur uClibc-0.9.33.2/include/scsi/scsi.h uClibc-git/include/scsi/scsi.h
  26033. --- uClibc-0.9.33.2/include/scsi/scsi.h 2012-05-15 09:20:09.000000000 +0200
  26034. +++ uClibc-git/include/scsi/scsi.h 2014-07-25 20:36:05.153326028 +0200
  26035. @@ -12,9 +12,8 @@
  26036. Lesser General Public License for more details.
  26037. You should have received a copy of the GNU Lesser General Public
  26038. - License along with the GNU C Library; if not, write to the Free
  26039. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  26040. - 02111-1307 USA. */
  26041. + License along with the GNU C Library; if not, see
  26042. + <http://www.gnu.org/licenses/>. */
  26043. /*
  26044. * This header file contains public constants and structures used by
  26045. diff -Nur uClibc-0.9.33.2/include/scsi/scsi_ioctl.h uClibc-git/include/scsi/scsi_ioctl.h
  26046. --- uClibc-0.9.33.2/include/scsi/scsi_ioctl.h 2012-05-15 09:20:09.000000000 +0200
  26047. +++ uClibc-git/include/scsi/scsi_ioctl.h 2014-07-25 20:36:05.153326028 +0200
  26048. @@ -12,9 +12,8 @@
  26049. Lesser General Public License for more details.
  26050. You should have received a copy of the GNU Lesser General Public
  26051. - License along with the GNU C Library; if not, write to the Free
  26052. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  26053. - 02111-1307 USA. */
  26054. + License along with the GNU C Library; if not, see
  26055. + <http://www.gnu.org/licenses/>. */
  26056. #ifndef _SCSI_IOCTL_H
  26057. #define _SCSI_IOCTL_H
  26058. diff -Nur uClibc-0.9.33.2/include/scsi/sg.h uClibc-git/include/scsi/sg.h
  26059. --- uClibc-0.9.33.2/include/scsi/sg.h 2012-05-15 09:20:09.000000000 +0200
  26060. +++ uClibc-git/include/scsi/sg.h 2014-07-25 20:36:05.161326070 +0200
  26061. @@ -12,9 +12,8 @@
  26062. Lesser General Public License for more details.
  26063. You should have received a copy of the GNU Lesser General Public
  26064. - License along with the GNU C Library; if not, write to the Free
  26065. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  26066. - 02111-1307 USA. */
  26067. + License along with the GNU C Library; if not, see
  26068. + <http://www.gnu.org/licenses/>. */
  26069. /*
  26070. History:
  26071. diff -Nur uClibc-0.9.33.2/include/search.h uClibc-git/include/search.h
  26072. --- uClibc-0.9.33.2/include/search.h 2012-05-15 09:20:09.000000000 +0200
  26073. +++ uClibc-git/include/search.h 2014-07-25 20:36:05.161326070 +0200
  26074. @@ -13,9 +13,8 @@
  26075. Lesser General Public License for more details.
  26076. You should have received a copy of the GNU Lesser General Public
  26077. - License along with the GNU C Library; if not, write to the Free
  26078. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  26079. - 02111-1307 USA. */
  26080. + License along with the GNU C Library; if not, see
  26081. + <http://www.gnu.org/licenses/>. */
  26082. #ifndef _SEARCH_H
  26083. #define _SEARCH_H 1
  26084. @@ -52,7 +51,7 @@
  26085. /* For use with hsearch(3). */
  26086. #ifndef __COMPAR_FN_T
  26087. # define __COMPAR_FN_T
  26088. -typedef int (*__compar_fn_t) (__const void *, __const void *);
  26089. +typedef int (*__compar_fn_t) (const void *, const void *);
  26090. # ifdef __USE_GNU
  26091. typedef __compar_fn_t comparison_fn_t;
  26092. @@ -130,30 +129,30 @@
  26093. /* Search for an entry matching the given KEY in the tree pointed to
  26094. by *ROOTP and insert a new element if not found. */
  26095. -extern void *tsearch (__const void *__key, void **__rootp,
  26096. +extern void *tsearch (const void *__key, void **__rootp,
  26097. __compar_fn_t __compar);
  26098. libc_hidden_proto(tsearch)
  26099. /* Search for an entry matching the given KEY in the tree pointed to
  26100. by *ROOTP. If no matching entry is available return NULL. */
  26101. -extern void *tfind (__const void *__key, void *__const *__rootp,
  26102. +extern void *tfind (const void *__key, void *const *__rootp,
  26103. __compar_fn_t __compar);
  26104. libc_hidden_proto(tfind)
  26105. /* Remove the element matching KEY from the tree pointed to by *ROOTP. */
  26106. -extern void *tdelete (__const void *__restrict __key,
  26107. +extern void *tdelete (const void *__restrict __key,
  26108. void **__restrict __rootp,
  26109. __compar_fn_t __compar);
  26110. #ifndef __ACTION_FN_T
  26111. # define __ACTION_FN_T
  26112. -typedef void (*__action_fn_t) (__const void *__nodep, VISIT __value,
  26113. +typedef void (*__action_fn_t) (const void *__nodep, VISIT __value,
  26114. int __level);
  26115. #endif
  26116. /* Walk through the whole tree and call the ACTION callback for every node
  26117. or leaf. */
  26118. -extern void twalk (__const void *__root, __action_fn_t __action);
  26119. +extern void twalk (const void *__root, __action_fn_t __action);
  26120. #ifdef __USE_GNU
  26121. /* Callback type for function to free a tree node. If the keys are atomic
  26122. @@ -168,13 +167,13 @@
  26123. /* Perform linear search for KEY by comparing by COMPAR in an array
  26124. [BASE,BASE+NMEMB*SIZE). */
  26125. -extern void *lfind (__const void *__key, __const void *__base,
  26126. +extern void *lfind (const void *__key, const void *__base,
  26127. size_t *__nmemb, size_t __size, __compar_fn_t __compar);
  26128. libc_hidden_proto(lfind)
  26129. /* Perform linear search for KEY by comparing by COMPAR function in
  26130. array [BASE,BASE+NMEMB*SIZE) and insert entry if not found. */
  26131. -extern void *lsearch (__const void *__key, void *__base,
  26132. +extern void *lsearch (const void *__key, void *__base,
  26133. size_t *__nmemb, size_t __size, __compar_fn_t __compar);
  26134. __END_DECLS
  26135. diff -Nur uClibc-0.9.33.2/include/setjmp.h uClibc-git/include/setjmp.h
  26136. --- uClibc-0.9.33.2/include/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  26137. +++ uClibc-git/include/setjmp.h 2014-07-25 20:36:05.161326070 +0200
  26138. @@ -1,4 +1,4 @@
  26139. -/* Copyright (C) 1991-1999, 2001 Free Software Foundation, Inc.
  26140. +/* Copyright (C) 1991-1999,2001,2002,2007,2009 Free Software Foundation, Inc.
  26141. This file is part of the GNU C Library.
  26142. The GNU C Library is free software; you can redistribute it and/or
  26143. @@ -12,9 +12,8 @@
  26144. Lesser General Public License for more details.
  26145. You should have received a copy of the GNU Lesser General Public
  26146. - License along with the GNU C Library; if not, write to the Free
  26147. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  26148. - 02111-1307 USA. */
  26149. + License along with the GNU C Library; if not, see
  26150. + <http://www.gnu.org/licenses/>. */
  26151. /*
  26152. * ISO C99 Standard: 7.13 Nonlocal jumps <setjmp.h>
  26153. @@ -30,8 +29,9 @@
  26154. #include <bits/setjmp.h> /* Get `__jmp_buf'. */
  26155. #include <bits/sigset.h> /* Get `__sigset_t'. */
  26156. +
  26157. /* Calling environment, plus possibly a saved signal mask. */
  26158. -typedef struct __jmp_buf_tag /* C++ doesn't like tagless structs. */
  26159. +struct __jmp_buf_tag
  26160. {
  26161. /* NOTE: The machine-dependent definitions of `__sigsetjmp'
  26162. assume that a `jmp_buf' begins with a `__jmp_buf' and that
  26163. @@ -40,23 +40,29 @@
  26164. __jmp_buf __jmpbuf; /* Calling environment. */
  26165. int __mask_was_saved; /* Saved the signal mask? */
  26166. __sigset_t __saved_mask; /* Saved signal mask. */
  26167. - } jmp_buf[1];
  26168. + };
  26169. +
  26170. +__BEGIN_NAMESPACE_STD
  26171. +
  26172. +typedef struct __jmp_buf_tag jmp_buf[1];
  26173. /* Store the calling environment in ENV, also saving the signal mask.
  26174. Return 0. */
  26175. extern int setjmp (jmp_buf __env) __THROW;
  26176. -/* Store the calling environment in ENV, not saving the signal mask.
  26177. - Return 0. */
  26178. -extern int _setjmp (jmp_buf __env) __THROW;
  26179. +__END_NAMESPACE_STD
  26180. /* Store the calling environment in ENV, also saving the
  26181. signal mask if SAVEMASK is nonzero. Return 0.
  26182. This is the internal name for `sigsetjmp'. */
  26183. -extern int __sigsetjmp (jmp_buf __env, int __savemask) __THROW;
  26184. +extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __THROW;
  26185. #ifndef __FAVOR_BSD
  26186. +/* Store the calling environment in ENV, not saving the signal mask.
  26187. + Return 0. */
  26188. +extern int _setjmp (struct __jmp_buf_tag __env[1]) __THROW;
  26189. +
  26190. /* Do not save the signal mask. This is equivalent to the `_setjmp'
  26191. BSD function. */
  26192. # define setjmp(env) _setjmp (env)
  26193. @@ -68,15 +74,20 @@
  26194. #endif /* Favor BSD. */
  26195. +__BEGIN_NAMESPACE_STD
  26196. +
  26197. /* Jump to the environment saved in ENV, making the
  26198. `setjmp' call there return VAL, or 1 if VAL is 0. */
  26199. -extern void longjmp (jmp_buf __env, int __val)
  26200. +extern void longjmp (struct __jmp_buf_tag __env[1], int __val)
  26201. __THROW __attribute__ ((__noreturn__));
  26202. +
  26203. +__END_NAMESPACE_STD
  26204. +
  26205. #if defined __USE_BSD || defined __USE_XOPEN
  26206. /* Same. Usually `_longjmp' is used with `_setjmp', which does not save
  26207. the signal mask. But it is how ENV was saved that determines whether
  26208. `longjmp' restores the mask; `_longjmp' is just an alias. */
  26209. -extern void _longjmp (jmp_buf __env, int __val)
  26210. +extern void _longjmp (struct __jmp_buf_tag __env[1], int __val)
  26211. __THROW __attribute__ ((__noreturn__));
  26212. #endif
  26213. @@ -85,7 +96,7 @@
  26214. /* Use the same type for `jmp_buf' and `sigjmp_buf'.
  26215. The `__mask_was_saved' flag determines whether
  26216. or not `longjmp' will restore the signal mask. */
  26217. -typedef jmp_buf sigjmp_buf;
  26218. +typedef struct __jmp_buf_tag sigjmp_buf[1];
  26219. /* Store the calling environment in ENV, also saving the
  26220. signal mask if SAVEMASK is nonzero. Return 0. */
  26221. @@ -101,4 +112,16 @@
  26222. __END_DECLS
  26223. +#ifdef _LIBC
  26224. +extern void __longjmp(__jmp_buf __env, int __val) attribute_noreturn;
  26225. +libc_hidden_proto(__longjmp)
  26226. +extern __typeof(longjmp) __libc_longjmp attribute_noreturn;
  26227. +extern __typeof(siglongjmp) __libc_siglongjmp attribute_noreturn;
  26228. +extern void _longjmp_unwind(jmp_buf __env, int __val);
  26229. +libc_hidden_proto(_longjmp_unwind)
  26230. +extern int __sigjmp_save(sigjmp_buf __env, int __savemask) attribute_hidden;
  26231. +/* We use the normal longjmp for unwinding */
  26232. +# define __libc_unwind_longjmp(buf, val) __libc_longjmp(buf, val)
  26233. +#endif
  26234. +
  26235. #endif /* setjmp.h */
  26236. diff -Nur uClibc-0.9.33.2/include/sgtty.h uClibc-git/include/sgtty.h
  26237. --- uClibc-0.9.33.2/include/sgtty.h 2012-05-15 09:20:09.000000000 +0200
  26238. +++ uClibc-git/include/sgtty.h 2014-07-25 20:36:05.161326070 +0200
  26239. @@ -12,9 +12,8 @@
  26240. Lesser General Public License for more details.
  26241. You should have received a copy of the GNU Lesser General Public
  26242. - License along with the GNU C Library; if not, write to the Free
  26243. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  26244. - 02111-1307 USA. */
  26245. + License along with the GNU C Library; if not, see
  26246. + <http://www.gnu.org/licenses/>. */
  26247. #ifndef _SGTTY_H
  26248. #define _SGTTY_H 1
  26249. @@ -38,7 +37,7 @@
  26250. extern int gtty (int __fd, struct sgttyb *__params) __THROW;
  26251. /* Set the terminal parameters associated with FD to *PARAMS. */
  26252. -extern int stty (int __fd, __const struct sgttyb *__params) __THROW;
  26253. +extern int stty (int __fd, const struct sgttyb *__params) __THROW;
  26254. #endif
  26255. diff -Nur uClibc-0.9.33.2/include/shadow.h uClibc-git/include/shadow.h
  26256. --- uClibc-0.9.33.2/include/shadow.h 2012-05-15 09:20:09.000000000 +0200
  26257. +++ uClibc-git/include/shadow.h 2014-07-25 20:36:05.161326070 +0200
  26258. @@ -12,9 +12,8 @@
  26259. Lesser General Public License for more details.
  26260. You should have received a copy of the GNU Lesser General Public
  26261. - License along with the GNU C Library; if not, write to the Free
  26262. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  26263. - 02111-1307 USA. */
  26264. + License along with the GNU C Library; if not, see
  26265. + <http://www.gnu.org/licenses/>. */
  26266. /* Declaration of types and functions for shadow password suite. */
  26267. @@ -84,7 +83,7 @@
  26268. cancellation point. But due to similarity with an POSIX interface
  26269. or due to the implementation it is a cancellation point and
  26270. therefore not marked with __THROW. */
  26271. -extern struct spwd *getspnam (__const char *__name);
  26272. +extern struct spwd *getspnam (const char *__name);
  26273. /* Read shadow entry from STRING.
  26274. @@ -92,7 +91,7 @@
  26275. cancellation point. But due to similarity with an POSIX interface
  26276. or due to the implementation it is a cancellation point and
  26277. therefore not marked with __THROW. */
  26278. -extern struct spwd *sgetspent (__const char *__string);
  26279. +extern struct spwd *sgetspent (const char *__string);
  26280. /* Read next shadow entry from STREAM.
  26281. @@ -108,7 +107,7 @@
  26282. cancellation point. But due to similarity with an POSIX interface
  26283. or due to the implementation it is a cancellation point and
  26284. therefore not marked with __THROW. */
  26285. -extern int putspent (__const struct spwd *__p, FILE *__stream);
  26286. +extern int putspent (const struct spwd *__p, FILE *__stream);
  26287. #ifdef __USE_MISC
  26288. @@ -122,12 +121,12 @@
  26289. size_t __buflen, struct spwd **__result);
  26290. libc_hidden_proto(getspent_r)
  26291. -extern int getspnam_r (__const char *__name, struct spwd *__result_buf,
  26292. +extern int getspnam_r (const char *__name, struct spwd *__result_buf,
  26293. char *__buffer, size_t __buflen,
  26294. struct spwd **__result);
  26295. libc_hidden_proto(getspnam_r)
  26296. -extern int sgetspent_r (__const char *__string, struct spwd *__result_buf,
  26297. +extern int sgetspent_r (const char *__string, struct spwd *__result_buf,
  26298. char *__buffer, size_t __buflen,
  26299. struct spwd **__result);
  26300. libc_hidden_proto(sgetspent_r)
  26301. diff -Nur uClibc-0.9.33.2/include/signal.h uClibc-git/include/signal.h
  26302. --- uClibc-0.9.33.2/include/signal.h 2012-05-15 09:20:09.000000000 +0200
  26303. +++ uClibc-git/include/signal.h 2014-07-25 20:36:05.165326090 +0200
  26304. @@ -1,4 +1,4 @@
  26305. -/* Copyright (C) 1991-2003, 2004 Free Software Foundation, Inc.
  26306. +/* Copyright (C) 1991-2003, 2004, 2007, 2009 Free Software Foundation, Inc.
  26307. This file is part of the GNU C Library.
  26308. The GNU C Library is free software; you can redistribute it and/or
  26309. @@ -12,9 +12,8 @@
  26310. Lesser General Public License for more details.
  26311. You should have received a copy of the GNU Lesser General Public
  26312. - License along with the GNU C Library; if not, write to the Free
  26313. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  26314. - 02111-1307 USA. */
  26315. + License along with the GNU C Library; if not, see
  26316. + <http://www.gnu.org/licenses/>. */
  26317. /*
  26318. * ISO C99 Standard: 7.14 Signal handling <signal.h>
  26319. @@ -87,15 +86,27 @@
  26320. typedef __pid_t pid_t;
  26321. # define __pid_t_defined
  26322. # endif
  26323. +#endif
  26324. +#ifdef __USE_XOPEN
  26325. # ifndef __uid_t_defined
  26326. typedef __uid_t uid_t;
  26327. # define __uid_t_defined
  26328. # endif
  26329. #endif /* Unix98 */
  26330. +#if defined __USE_POSIX199309 && defined __UCLIBC_HAS_REALTIME__
  26331. +/* We need `struct timespec' later on. */
  26332. +# define __need_timespec
  26333. +# include <time.h>
  26334. +
  26335. +/* Get the `siginfo_t' type plus the needed symbols. */
  26336. +# include <bits/siginfo.h>
  26337. +#endif
  26338. +
  26339. /* Type of a signal handler. */
  26340. typedef void (*__sighandler_t) (int);
  26341. +
  26342. #if defined __UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL__
  26343. /* The X/Open definition of `signal' specifies the SVID semantic. Use
  26344. the additional function `sysv_signal' when X/Open compatibility is
  26345. @@ -156,17 +167,23 @@
  26346. libc_hidden_proto(raise)
  26347. __END_NAMESPACE_STD
  26348. -#ifdef __USE_SVID
  26349. +#if 0 /*def __USE_SVID*/
  26350. /* SVID names for the same things. */
  26351. extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
  26352. __THROW;
  26353. extern int gsignal (int __sig) __THROW;
  26354. #endif /* Use SVID. */
  26355. -#ifdef __USE_MISC
  26356. +/* glibc guards the next two wrong with __USE_XOPEN2K */
  26357. +#if defined __USE_MISC || defined __USE_XOPEN2K8
  26358. /* Print a message describing the meaning of the given signal number. */
  26359. -extern void psignal (int __sig, __const char *__s);
  26360. -#endif /* Use misc. */
  26361. +extern void psignal (int __sig, const char *__s);
  26362. +#endif /* Use misc or POSIX 2008. */
  26363. +
  26364. +#if 0 /*def __USE_XOPEN2K8*/
  26365. +/* Print a message describing the meaning of the given signal information. */
  26366. +extern void psiginfo (const siginfo_t *__pinfo, const char *__s);
  26367. +#endif /* POSIX 2008. */
  26368. #ifdef __UCLIBC_SUSV4_LEGACY__
  26369. /* The `sigpause' function has two different interfaces. The original
  26370. @@ -177,23 +194,25 @@
  26371. This function is a cancellation point and therefore not marked with
  26372. __THROW. */
  26373. -extern int __sigpause (int __sig_or_mask, int __is_sig);
  26374. -libc_hidden_proto(__sigpause)
  26375. +/*extern int __sigpause (int __sig_or_mask, int __is_sig);*/
  26376. #ifdef __FAVOR_BSD
  26377. /* Set the mask of blocked signals to MASK,
  26378. wait for a signal to arrive, and then restore the mask. */
  26379. -extern int sigpause (int __mask) __THROW __attribute_deprecated__;
  26380. -# define sigpause(mask) __sigpause ((mask), 0)
  26381. +/*extern int sigpause (int __mask) __THROW __attribute_deprecated__;
  26382. +# define sigpause(mask) __sigpause ((mask), 0)*/
  26383. +/* uClibc note: BSD sigpause is available as __bsd_sigpause.
  26384. + * It is intentionally not prototyped */
  26385. #else
  26386. # ifdef __USE_XOPEN
  26387. /* Remove a signal from the signal mask and suspend the process. */
  26388. -# define sigpause(sig) __sigpause ((sig), 1)
  26389. +extern int sigpause(int __sig);
  26390. +/*# define sigpause(sig) __sigpause ((sig), 1)*/
  26391. # endif
  26392. #endif
  26393. #endif /* __UCLIBC_SUSV4_LEGACY__ */
  26394. -#ifdef __USE_BSD
  26395. +#if 0 /*def __USE_BSD*/
  26396. /* None of the following functions should be used anymore. They are here
  26397. only for compatibility. A single word (`int') is not guaranteed to be
  26398. enough to hold a complete signal mask and therefore these functions
  26399. @@ -203,14 +222,10 @@
  26400. # define sigmask(sig) __sigmask(sig)
  26401. /* Block signals in MASK, returning the old mask. */
  26402. -extern int sigblock (int __mask) __THROW;
  26403. -/* collides with libc_hidden_proto: __attribute_deprecated__; */
  26404. -libc_hidden_proto(sigblock)
  26405. +extern int sigblock (int __mask) __THROW __attribute_deprecated__;
  26406. /* Set the mask of blocked signals to MASK, returning the old mask. */
  26407. -extern int sigsetmask (int __mask) __THROW;
  26408. -/* collides with libc_hidden_proto: __attribute_deprecated__; */
  26409. -libc_hidden_proto(sigsetmask)
  26410. +extern int sigsetmask (int __mask) __THROW __attribute_deprecated__;
  26411. /* Return currently selected signal mask. */
  26412. extern int siggetmask (void) __THROW __attribute_deprecated__;
  26413. @@ -228,22 +243,11 @@
  26414. #ifdef __USE_POSIX
  26415. -# ifdef __USE_POSIX199309
  26416. -/* We need `struct timespec' later on. */
  26417. -# define __need_timespec
  26418. -# include <time.h>
  26419. -
  26420. -/* Get the `siginfo_t' type plus the needed symbols. */
  26421. -# include <bits/siginfo.h>
  26422. -# endif
  26423. -
  26424. /* Clear all signals from SET. */
  26425. extern int sigemptyset (sigset_t *__set) __THROW __nonnull ((1));
  26426. -libc_hidden_proto(sigemptyset)
  26427. /* Set all signals in SET. */
  26428. extern int sigfillset (sigset_t *__set) __THROW __nonnull ((1));
  26429. -libc_hidden_proto(sigfillset)
  26430. /* Add SIGNO to SET. */
  26431. extern int sigaddset (sigset_t *__set, int __signo) __THROW __nonnull ((1));
  26432. @@ -254,20 +258,20 @@
  26433. libc_hidden_proto(sigdelset)
  26434. /* Return 1 if SIGNO is in SET, 0 if not. */
  26435. -extern int sigismember (__const sigset_t *__set, int __signo)
  26436. +extern int sigismember (const sigset_t *__set, int __signo)
  26437. __THROW __nonnull ((1));
  26438. # ifdef __USE_GNU
  26439. /* Return non-empty value is SET is not empty. */
  26440. -extern int sigisemptyset (__const sigset_t *__set) __THROW __nonnull ((1));
  26441. +extern int sigisemptyset (const sigset_t *__set) __THROW __nonnull ((1));
  26442. /* Build new signal set by combining the two inputs set using logical AND. */
  26443. -extern int sigandset (sigset_t *__set, __const sigset_t *__left,
  26444. - __const sigset_t *__right) __THROW __nonnull ((1, 2, 3));
  26445. +extern int sigandset (sigset_t *__set, const sigset_t *__left,
  26446. + const sigset_t *__right) __THROW __nonnull ((1, 2, 3));
  26447. /* Build new signal set by combining the two inputs set using logical OR. */
  26448. -extern int sigorset (sigset_t *__set, __const sigset_t *__left,
  26449. - __const sigset_t *__right) __THROW __nonnull ((1, 2, 3));
  26450. +extern int sigorset (sigset_t *__set, const sigset_t *__left,
  26451. + const sigset_t *__right) __THROW __nonnull ((1, 2, 3));
  26452. # endif /* GNU */
  26453. /* Get the system-specific definitions of `struct sigaction'
  26454. @@ -275,7 +279,7 @@
  26455. # include <bits/sigaction.h>
  26456. /* Get and/or change the set of blocked signals. */
  26457. -extern int sigprocmask (int __how, __const sigset_t *__restrict __set,
  26458. +extern int sigprocmask (int __how, const sigset_t *__restrict __set,
  26459. sigset_t *__restrict __oset) __THROW;
  26460. libc_hidden_proto(sigprocmask)
  26461. @@ -284,14 +288,50 @@
  26462. This function is a cancellation point and therefore not marked with
  26463. __THROW. */
  26464. -extern int sigsuspend (__const sigset_t *__set) __nonnull ((1));
  26465. +extern int sigsuspend (const sigset_t *__set) __nonnull ((1));
  26466. +#ifdef _LIBC
  26467. +extern __typeof(sigsuspend) __sigsuspend_nocancel attribute_hidden;
  26468. libc_hidden_proto(sigsuspend)
  26469. +#endif
  26470. /* Get and/or set the action for signal SIG. */
  26471. -extern int sigaction (int __sig, __const struct sigaction *__restrict __act,
  26472. +extern int sigaction (int __sig, const struct sigaction *__restrict __act,
  26473. struct sigaction *__restrict __oact) __THROW;
  26474. +#ifdef _LIBC
  26475. +# if 0 /* this is in headers */
  26476. +/* In uclibc, userspace struct sigaction is identical to
  26477. + * "new" struct kernel_sigaction (one from the Linux 2.1.68 kernel).
  26478. + * See sigaction.h
  26479. + */
  26480. +struct old_kernel_sigaction;
  26481. +extern int __syscall_sigaction(int, const struct old_kernel_sigaction *,
  26482. + struct old_kernel_sigaction *) attribute_hidden;
  26483. +# else /* this is how the function is built */
  26484. +extern __typeof(sigaction) __syscall_sigaction attribute_hidden;
  26485. +# endif
  26486. +# define __need_size_t
  26487. +# include <stddef.h>
  26488. +/* candidate for attribute_hidden, if NPTL would behave */
  26489. +extern int __syscall_rt_sigaction(int, const struct sigaction *,
  26490. + struct sigaction *, size_t)
  26491. +# ifndef __UCLIBC_HAS_THREADS_NATIVE__
  26492. + attribute_hidden
  26493. +# endif
  26494. + ;
  26495. +extern __typeof(sigaction) __libc_sigaction;
  26496. libc_hidden_proto(sigaction)
  26497. +# ifdef __mips__
  26498. +# define _KERNEL_NSIG_WORDS (_NSIG / _MIPS_SZLONG)
  26499. +typedef struct {
  26500. + unsigned long sig[_KERNEL_NSIG_WORDS];
  26501. +} kernel_sigset_t;
  26502. +# define __SYSCALL_SIGSET_T_SIZE (sizeof(kernel_sigset_t))
  26503. +# else
  26504. +# define __SYSCALL_SIGSET_T_SIZE (_NSIG / 8)
  26505. +# endif
  26506. +#endif
  26507. +
  26508. /* Put in SET all signals that are blocked and waiting to be delivered. */
  26509. extern int sigpending (sigset_t *__set) __THROW __nonnull ((1));
  26510. @@ -300,7 +340,7 @@
  26511. This function is a cancellation point and therefore not marked with
  26512. __THROW. */
  26513. -extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig)
  26514. +extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig)
  26515. __nonnull ((1, 2));
  26516. # if defined __USE_POSIX199309 && defined __UCLIBC_HAS_REALTIME__
  26517. @@ -308,30 +348,29 @@
  26518. This function is a cancellation point and therefore not marked with
  26519. __THROW. */
  26520. -extern int sigwaitinfo (__const sigset_t *__restrict __set,
  26521. +extern int sigwaitinfo (const sigset_t *__restrict __set,
  26522. siginfo_t *__restrict __info) __nonnull ((1));
  26523. #ifdef _LIBC
  26524. extern __typeof(sigwaitinfo) __sigwaitinfo attribute_hidden;
  26525. #endif
  26526. -libc_hidden_proto(sigwaitinfo)
  26527. /* Select any of pending signals from SET and place information in INFO.
  26528. Wait the time specified by TIMEOUT if no signal is pending.
  26529. This function is a cancellation point and therefore not marked with
  26530. __THROW. */
  26531. -extern int sigtimedwait (__const sigset_t *__restrict __set,
  26532. +extern int sigtimedwait (const sigset_t *__restrict __set,
  26533. siginfo_t *__restrict __info,
  26534. - __const struct timespec *__restrict __timeout)
  26535. + const struct timespec *__restrict __timeout)
  26536. __nonnull ((1));
  26537. #ifdef _LIBC
  26538. -extern __typeof(sigtimedwait) __sigtimedwait attribute_hidden;
  26539. -#endif
  26540. +extern __typeof(sigtimedwait) __sigtimedwait_nocancel attribute_hidden;
  26541. libc_hidden_proto(sigtimedwait)
  26542. +#endif
  26543. /* Send signal SIG to the process PID. Associate data in VAL with the
  26544. signal. */
  26545. -extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val)
  26546. +extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val)
  26547. __THROW;
  26548. # endif /* Use POSIX 199306. */
  26549. @@ -343,9 +382,10 @@
  26550. /* Names of the signals. This variable exists only for compatibility.
  26551. Use `strsignal' instead (see <string.h>). */
  26552. # define _sys_siglist sys_siglist
  26553. -extern __const char *__const sys_siglist[_NSIG];
  26554. +extern const char *const sys_siglist[_NSIG];
  26555. # endif
  26556. +#ifndef __UCLIBC_STRICT_HEADERS__
  26557. /* Structure passed to `sigvec'. */
  26558. struct sigvec
  26559. {
  26560. @@ -360,27 +400,34 @@
  26561. # define SV_ONSTACK (1 << 0)/* Take the signal on the signal stack. */
  26562. # define SV_INTERRUPT (1 << 1)/* Do not restart system calls. */
  26563. # define SV_RESETHAND (1 << 2)/* Reset handler to SIG_DFL on receipt. */
  26564. +#endif
  26565. +#if 0
  26566. /* If VEC is non-NULL, set the handler for SIG to the `sv_handler' member
  26567. of VEC. The signals in `sv_mask' will be blocked while the handler runs.
  26568. If the SV_RESETHAND bit is set in `sv_flags', the handler for SIG will be
  26569. reset to SIG_DFL before `sv_handler' is entered. If OVEC is non-NULL,
  26570. it is filled in with the old information for SIG. */
  26571. -extern int sigvec (int __sig, __const struct sigvec *__vec,
  26572. +extern int sigvec (int __sig, const struct sigvec *__vec,
  26573. struct sigvec *__ovec) __THROW;
  26574. +#endif
  26575. /* Get machine-dependent `struct sigcontext' and signal subcodes. */
  26576. # include <bits/sigcontext.h>
  26577. +#if 0
  26578. /* Restore the state saved in SCP. */
  26579. extern int sigreturn (struct sigcontext *__scp) __THROW;
  26580. +#endif
  26581. #endif /* use BSD. */
  26582. #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
  26583. +# define __need_size_t
  26584. +# include <stddef.h>
  26585. # ifdef __UCLIBC_SUSV4_LEGACY__
  26586. /* If INTERRUPT is nonzero, make signal SIG interrupt system calls
  26587. @@ -406,7 +453,7 @@
  26588. /* Alternate signal handler stack interface.
  26589. This interface should always be preferred over `sigstack'. */
  26590. -extern int sigaltstack (__const struct sigaltstack *__restrict __ss,
  26591. +extern int sigaltstack (const struct sigaltstack *__restrict __ss,
  26592. struct sigaltstack *__restrict __oss) __THROW;
  26593. #endif /* use BSD or X/Open Unix. */
  26594. @@ -442,6 +489,13 @@
  26595. /* Return number of available real-time signal with lowest priority. */
  26596. extern int __libc_current_sigrtmax (void) __THROW;
  26597. +#ifdef _LIBC
  26598. +extern sigset_t _sigintr attribute_hidden;
  26599. +/* simplified version without parameter checking */
  26600. +# include <string.h>
  26601. +# undef __sigemptyset
  26602. +# define __sigemptyset(ss) (memset(ss, '\0', sizeof(sigset_t)), 0)
  26603. +#endif
  26604. #endif /* signal.h */
  26605. __END_DECLS
  26606. diff -Nur uClibc-0.9.33.2/include/spawn.h uClibc-git/include/spawn.h
  26607. --- uClibc-0.9.33.2/include/spawn.h 1970-01-01 01:00:00.000000000 +0100
  26608. +++ uClibc-git/include/spawn.h 2014-07-25 20:36:05.165326090 +0200
  26609. @@ -0,0 +1,289 @@
  26610. +/* Definitions for POSIX spawn interface.
  26611. + Copyright (C) 2000,2003,2004,2009,2011,2012 Free Software Foundation, Inc.
  26612. + This file is part of the GNU C Library.
  26613. +
  26614. + The GNU C Library is free software; you can redistribute it and/or
  26615. + modify it under the terms of the GNU Lesser General Public
  26616. + License as published by the Free Software Foundation; either
  26617. + version 2.1 of the License, or (at your option) any later version.
  26618. +
  26619. + The GNU C Library is distributed in the hope that it will be useful,
  26620. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  26621. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  26622. + Lesser General Public License for more details.
  26623. +
  26624. + You should have received a copy of the GNU Lesser General Public
  26625. + License along with the GNU C Library; if not, see
  26626. + <http://www.gnu.org/licenses/>. */
  26627. +
  26628. +#ifndef _SPAWN_H
  26629. +#define _SPAWN_H 1
  26630. +
  26631. +#include <features.h>
  26632. +#include <sched.h>
  26633. +#define __need_sigset_t
  26634. +#include <signal.h>
  26635. +#include <sys/types.h>
  26636. +
  26637. +/* For the tiny inlines (errno/free/memset). */
  26638. +#include <errno.h>
  26639. +#include <string.h>
  26640. +#include <stdlib.h>
  26641. +
  26642. +
  26643. +/* Data structure to contain attributes for thread creation. */
  26644. +typedef struct
  26645. +{
  26646. + short int __flags;
  26647. + pid_t __pgrp;
  26648. + sigset_t __sd;
  26649. + sigset_t __ss;
  26650. + struct sched_param __sp;
  26651. + int __policy;
  26652. + int __pad[16];
  26653. +} posix_spawnattr_t;
  26654. +
  26655. +
  26656. +/* Data structure to contain information about the actions to be
  26657. + performed in the new process with respect to file descriptors. */
  26658. +typedef struct
  26659. +{
  26660. + int __allocated;
  26661. + int __used;
  26662. + struct __spawn_action *__actions;
  26663. + int __pad[16];
  26664. +} posix_spawn_file_actions_t;
  26665. +
  26666. +
  26667. +/* Flags to be set in the `posix_spawnattr_t'. */
  26668. +#define POSIX_SPAWN_RESETIDS 0x01
  26669. +#define POSIX_SPAWN_SETPGROUP 0x02
  26670. +#define POSIX_SPAWN_SETSIGDEF 0x04
  26671. +#define POSIX_SPAWN_SETSIGMASK 0x08
  26672. +#define POSIX_SPAWN_SETSCHEDPARAM 0x10
  26673. +#define POSIX_SPAWN_SETSCHEDULER 0x20
  26674. +#ifdef __USE_GNU
  26675. +# define POSIX_SPAWN_USEVFORK 0x40
  26676. +#endif
  26677. +
  26678. +
  26679. +#define __POSIX_SPAWN_MASK (POSIX_SPAWN_RESETIDS \
  26680. + | POSIX_SPAWN_SETPGROUP \
  26681. + | POSIX_SPAWN_SETSIGDEF \
  26682. + | POSIX_SPAWN_SETSIGMASK \
  26683. + | POSIX_SPAWN_SETSCHEDPARAM \
  26684. + | POSIX_SPAWN_SETSCHEDULER \
  26685. + | POSIX_SPAWN_USEVFORK)
  26686. +
  26687. +__BEGIN_DECLS
  26688. +
  26689. +/* Spawn a new process executing PATH with the attributes describes in *ATTRP.
  26690. + Before running the process perform the actions described in FILE-ACTIONS.
  26691. +
  26692. + This function is a possible cancellation point and therefore not
  26693. + marked with __THROW. */
  26694. +extern int posix_spawn (pid_t *__restrict __pid,
  26695. + const char *__restrict __path,
  26696. + const posix_spawn_file_actions_t *__restrict
  26697. + __file_actions,
  26698. + const posix_spawnattr_t *__restrict __attrp,
  26699. + char *const __argv[__restrict_arr],
  26700. + char *const __envp[__restrict_arr]);
  26701. +
  26702. +/* Similar to `posix_spawn' but search for FILE in the PATH.
  26703. +
  26704. + This function is a possible cancellation point and therefore not
  26705. + marked with __THROW. */
  26706. +extern int posix_spawnp (pid_t *__pid, const char *__file,
  26707. + const posix_spawn_file_actions_t *__file_actions,
  26708. + const posix_spawnattr_t *__attrp,
  26709. + char *const __argv[], char *const __envp[]);
  26710. +
  26711. +
  26712. +/* Initialize data structure with attributes for `spawn' to default values. */
  26713. +static inline
  26714. +int posix_spawnattr_init (posix_spawnattr_t *__attr)
  26715. +{
  26716. + memset (__attr, 0, sizeof (*__attr));
  26717. + return 0;
  26718. +}
  26719. +
  26720. +/* Free resources associated with ATTR. */
  26721. +static inline
  26722. +int posix_spawnattr_destroy (posix_spawnattr_t *__attr)
  26723. +{
  26724. + return 0;
  26725. +}
  26726. +
  26727. +/* Store signal mask for signals with default handling from ATTR in
  26728. + SIGDEFAULT. */
  26729. +static inline
  26730. +int posix_spawnattr_getsigdefault (const posix_spawnattr_t *
  26731. + __restrict __attr,
  26732. + sigset_t *__restrict __sigdefault)
  26733. +{
  26734. + memcpy (__sigdefault, &__attr->__sd, sizeof (sigset_t));
  26735. + return 0;
  26736. +}
  26737. +
  26738. +/* Set signal mask for signals with default handling in ATTR to SIGDEFAULT. */
  26739. +static inline
  26740. +int posix_spawnattr_setsigdefault (posix_spawnattr_t *__restrict __attr,
  26741. + const sigset_t *__restrict
  26742. + __sigdefault)
  26743. +{
  26744. + memcpy (&__attr->__sd, __sigdefault, sizeof (sigset_t));
  26745. + return 0;
  26746. +}
  26747. +
  26748. +/* Store signal mask for the new process from ATTR in SIGMASK. */
  26749. +static inline
  26750. +int posix_spawnattr_getsigmask (const posix_spawnattr_t *__restrict
  26751. + __attr,
  26752. + sigset_t *__restrict __sigmask)
  26753. +{
  26754. + memcpy (__sigmask, &__attr->__ss, sizeof (sigset_t));
  26755. + return 0;
  26756. +}
  26757. +
  26758. +/* Set signal mask for the new process in ATTR to SIGMASK. */
  26759. +static inline
  26760. +int posix_spawnattr_setsigmask (posix_spawnattr_t *__restrict __attr,
  26761. + const sigset_t *__restrict __sigmask)
  26762. +{
  26763. + memcpy (&__attr->__ss, __sigmask, sizeof (sigset_t));
  26764. + return 0;
  26765. +}
  26766. +
  26767. +/* Get flag word from the attribute structure. */
  26768. +static inline
  26769. +int posix_spawnattr_getflags (const posix_spawnattr_t *__restrict
  26770. + __attr,
  26771. + short int *__restrict __flags)
  26772. +{
  26773. + *__flags = __attr->__flags;
  26774. + return 0;
  26775. +}
  26776. +
  26777. +/* Store flags in the attribute structure. */
  26778. +static inline
  26779. +int posix_spawnattr_setflags (posix_spawnattr_t *_attr,
  26780. + short int __flags)
  26781. +{
  26782. + /* Check no invalid bits are set. */
  26783. + if (__flags & ~__POSIX_SPAWN_MASK)
  26784. + return EINVAL;
  26785. +
  26786. + _attr->__flags = __flags;
  26787. + return 0;
  26788. +}
  26789. +
  26790. +/* Get process group ID from the attribute structure. */
  26791. +static inline
  26792. +int posix_spawnattr_getpgroup (const posix_spawnattr_t *__restrict
  26793. + __attr, pid_t *__restrict __pgroup)
  26794. +{
  26795. + *__pgroup = __attr->__pgrp;
  26796. + return 0;
  26797. +}
  26798. +
  26799. +/* Store process group ID in the attribute structure. */
  26800. +static inline
  26801. +int posix_spawnattr_setpgroup (posix_spawnattr_t *__attr,
  26802. + pid_t __pgroup)
  26803. +{
  26804. + __attr->__pgrp = __pgroup;
  26805. + return 0;
  26806. +}
  26807. +
  26808. +/* Get scheduling policy from the attribute structure. */
  26809. +static inline
  26810. +int posix_spawnattr_getschedpolicy (const posix_spawnattr_t *
  26811. + __restrict __attr,
  26812. + int *__restrict __schedpolicy)
  26813. +{
  26814. + *__schedpolicy = __attr->__policy;
  26815. + return 0;
  26816. +}
  26817. +
  26818. +/* Store scheduling policy in the attribute structure. */
  26819. +static inline
  26820. +int posix_spawnattr_setschedpolicy (posix_spawnattr_t *__attr,
  26821. + int __schedpolicy)
  26822. +{
  26823. + switch (__schedpolicy) {
  26824. + case SCHED_OTHER:
  26825. + case SCHED_FIFO:
  26826. + case SCHED_RR:
  26827. + break;
  26828. + default:
  26829. + return EINVAL;
  26830. + }
  26831. +
  26832. + __attr->__policy = __schedpolicy;
  26833. + return 0;
  26834. +}
  26835. +
  26836. +/* Get scheduling parameters from the attribute structure. */
  26837. +static inline
  26838. +int posix_spawnattr_getschedparam (const posix_spawnattr_t *
  26839. + __restrict __attr,
  26840. + struct sched_param *__restrict
  26841. + __schedparam)
  26842. +{
  26843. + memcpy (__schedparam, &__attr->__sp, sizeof (__attr->__sp));
  26844. + return 0;
  26845. +}
  26846. +
  26847. +/* Store scheduling parameters in the attribute structure. */
  26848. +static inline
  26849. +int posix_spawnattr_setschedparam (posix_spawnattr_t *__restrict __attr,
  26850. + const struct sched_param *
  26851. + __restrict __schedparam)
  26852. +{
  26853. + __attr->__sp = *__schedparam;
  26854. + return 0;
  26855. +}
  26856. +
  26857. +/* Initialize data structure for file attribute for `spawn' call. */
  26858. +static inline
  26859. +int posix_spawn_file_actions_init (posix_spawn_file_actions_t *
  26860. + __file_actions)
  26861. +{
  26862. + memset (__file_actions, 0, sizeof (*__file_actions));
  26863. + return 0;
  26864. +}
  26865. +
  26866. +/* Free resources associated with FILE-ACTIONS. */
  26867. +static inline
  26868. +int posix_spawn_file_actions_destroy (posix_spawn_file_actions_t *
  26869. + __file_actions)
  26870. +{
  26871. + free (__file_actions->__actions);
  26872. + return 0;
  26873. +}
  26874. +
  26875. +/* Add an action to FILE-ACTIONS which tells the implementation to call
  26876. + `open' for the given file during the `spawn' call. */
  26877. +extern int posix_spawn_file_actions_addopen (posix_spawn_file_actions_t *
  26878. + __restrict __file_actions,
  26879. + int __fd,
  26880. + const char *__restrict __path,
  26881. + int __oflag, mode_t __mode)
  26882. + __THROW;
  26883. +
  26884. +/* Add an action to FILE-ACTIONS which tells the implementation to call
  26885. + `close' for the given file descriptor during the `spawn' call. */
  26886. +extern int posix_spawn_file_actions_addclose (posix_spawn_file_actions_t *
  26887. + __file_actions, int __fd)
  26888. + __THROW;
  26889. +
  26890. +/* Add an action to FILE-ACTIONS which tells the implementation to call
  26891. + `dup2' for the given file descriptors during the `spawn' call. */
  26892. +extern int posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t *
  26893. + __file_actions,
  26894. + int __fd, int __newfd) __THROW;
  26895. +
  26896. +__END_DECLS
  26897. +
  26898. +#endif /* spawn.h */
  26899. diff -Nur uClibc-0.9.33.2/include/stdint.h uClibc-git/include/stdint.h
  26900. --- uClibc-0.9.33.2/include/stdint.h 2012-05-15 09:20:09.000000000 +0200
  26901. +++ uClibc-git/include/stdint.h 2014-07-25 20:36:05.165326090 +0200
  26902. @@ -12,9 +12,8 @@
  26903. Lesser General Public License for more details.
  26904. You should have received a copy of the GNU Lesser General Public
  26905. - License along with the GNU C Library; if not, write to the Free
  26906. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  26907. - 02111-1307 USA. */
  26908. + License along with the GNU C Library; if not, see
  26909. + <http://www.gnu.org/licenses/>. */
  26910. /*
  26911. * ISO C99: 7.18 Integer types <stdint.h>
  26912. diff -Nur uClibc-0.9.33.2/include/stdio_ext.h uClibc-git/include/stdio_ext.h
  26913. --- uClibc-0.9.33.2/include/stdio_ext.h 2012-05-15 09:20:09.000000000 +0200
  26914. +++ uClibc-git/include/stdio_ext.h 2014-07-25 20:36:05.165326090 +0200
  26915. @@ -13,9 +13,8 @@
  26916. Lesser General Public License for more details.
  26917. You should have received a copy of the GNU Lesser General Public
  26918. - License along with the GNU C Library; if not, write to the Free
  26919. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  26920. - 02111-1307 USA. */
  26921. + License along with the GNU C Library; if not, see
  26922. + <http://www.gnu.org/licenses/>. */
  26923. /* This header contains the same definitions as the header of the same name
  26924. on Sun's Solaris OS. */
  26925. diff -Nur uClibc-0.9.33.2/include/stdio.h uClibc-git/include/stdio.h
  26926. --- uClibc-0.9.33.2/include/stdio.h 2012-05-15 09:20:09.000000000 +0200
  26927. +++ uClibc-git/include/stdio.h 2014-07-25 20:36:05.165326090 +0200
  26928. @@ -13,9 +13,8 @@
  26929. Lesser General Public License for more details.
  26930. You should have received a copy of the GNU Lesser General Public
  26931. - License along with the GNU C Library; if not, write to the Free
  26932. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  26933. - 02111-1307 USA. */
  26934. + License along with the GNU C Library; if not, see
  26935. + <http://www.gnu.org/licenses/>. */
  26936. /*
  26937. * ISO C99 Standard: 7.19 Input/output <stdio.h>
  26938. @@ -142,16 +141,17 @@
  26939. __BEGIN_NAMESPACE_STD
  26940. /* Remove file FILENAME. */
  26941. -extern int remove (__const char *__filename) __THROW;
  26942. +extern int remove (const char *__filename) __THROW;
  26943. libc_hidden_proto(remove)
  26944. /* Rename file OLD to NEW. */
  26945. -extern int rename (__const char *__old, __const char *__new) __THROW;
  26946. +extern int rename (const char *__old, const char *__new) __THROW;
  26947. __END_NAMESPACE_STD
  26948. #ifdef __USE_ATFILE
  26949. /* Rename file OLD relative to OLDFD to NEW relative to NEWFD. */
  26950. -extern int renameat (int __oldfd, __const char *__old, int __newfd,
  26951. - __const char *__new) __THROW;
  26952. +extern int renameat (int __oldfd, const char *__old, int __newfd,
  26953. + const char *__new) __THROW;
  26954. +libc_hidden_proto(renameat)
  26955. #endif
  26956. __BEGIN_NAMESPACE_STD
  26957. @@ -194,7 +194,7 @@
  26958. If not and if DIR is not NULL, that value is checked. If that fails,
  26959. P_tmpdir is tried and finally "/tmp". The storage for the filename
  26960. is allocated by `malloc'. */
  26961. -extern char *tempnam (__const char *__dir, __const char *__pfx)
  26962. +extern char *tempnam (const char *__dir, const char *__pfx)
  26963. __THROW __attribute_malloc__ __wur;
  26964. #endif
  26965. @@ -242,23 +242,23 @@
  26966. This function is a possible cancellation point and therefore not
  26967. marked with __THROW. */
  26968. -extern FILE *fopen (__const char *__restrict __filename,
  26969. - __const char *__restrict __modes) __wur;
  26970. +extern FILE *fopen (const char *__restrict __filename,
  26971. + const char *__restrict __modes) __wur;
  26972. libc_hidden_proto(fopen)
  26973. /* Open a file, replacing an existing stream with it.
  26974. This function is a possible cancellation point and therefore not
  26975. marked with __THROW. */
  26976. -extern FILE *freopen (__const char *__restrict __filename,
  26977. - __const char *__restrict __modes,
  26978. +extern FILE *freopen (const char *__restrict __filename,
  26979. + const char *__restrict __modes,
  26980. FILE *__restrict __stream) __wur;
  26981. #else
  26982. # ifdef __REDIRECT
  26983. -extern FILE *__REDIRECT (fopen, (__const char *__restrict __filename,
  26984. - __const char *__restrict __modes), fopen64)
  26985. +extern FILE *__REDIRECT (fopen, (const char *__restrict __filename,
  26986. + const char *__restrict __modes), fopen64)
  26987. __wur;
  26988. -extern FILE *__REDIRECT (freopen, (__const char *__restrict __filename,
  26989. - __const char *__restrict __modes,
  26990. +extern FILE *__REDIRECT (freopen, (const char *__restrict __filename,
  26991. + const char *__restrict __modes,
  26992. FILE *__restrict __stream), freopen64)
  26993. __wur;
  26994. # else
  26995. @@ -268,38 +268,39 @@
  26996. #endif
  26997. __END_NAMESPACE_STD
  26998. #ifdef __USE_LARGEFILE64
  26999. -extern FILE *fopen64 (__const char *__restrict __filename,
  27000. - __const char *__restrict __modes) __wur;
  27001. +extern FILE *fopen64 (const char *__restrict __filename,
  27002. + const char *__restrict __modes) __wur;
  27003. libc_hidden_proto(fopen64)
  27004. -extern FILE *freopen64 (__const char *__restrict __filename,
  27005. - __const char *__restrict __modes,
  27006. +extern FILE *freopen64 (const char *__restrict __filename,
  27007. + const char *__restrict __modes,
  27008. FILE *__restrict __stream) __wur;
  27009. #endif
  27010. #ifdef __USE_POSIX
  27011. /* Create a new stream that refers to an existing system file descriptor. */
  27012. -extern FILE *fdopen (int __fd, __const char *__modes) __THROW __wur;
  27013. +extern FILE *fdopen (int __fd, const char *__modes) __THROW __wur;
  27014. libc_hidden_proto(fdopen)
  27015. #endif
  27016. -#ifdef __USE_GNU
  27017. #ifdef __UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__
  27018. +#ifdef __USE_GNU
  27019. /* Create a new stream that refers to the given magic cookie,
  27020. and uses the given functions for input and output. */
  27021. extern FILE *fopencookie (void *__restrict __magic_cookie,
  27022. - __const char *__restrict __modes,
  27023. + const char *__restrict __modes,
  27024. _IO_cookie_io_functions_t __io_funcs) __THROW __wur;
  27025. libc_hidden_proto(fopencookie)
  27026. +#endif
  27027. +#ifdef __USE_XOPEN2K8
  27028. /* Create a new stream that refers to a memory buffer. */
  27029. -extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes)
  27030. +extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
  27031. __THROW __wur;
  27032. /* Open a stream that writes into a malloc'd buffer that is expanded as
  27033. necessary. *BUFLOC and *SIZELOC are updated with the buffer's location
  27034. and the number of characters written on fflush or fclose. */
  27035. -extern FILE *open_memstream (char **__restrict __bufloc,
  27036. - size_t *__restrict __sizeloc) __THROW __wur;
  27037. +extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __THROW __wur;
  27038. libc_hidden_proto(open_memstream)
  27039. #endif
  27040. #endif
  27041. @@ -334,17 +335,17 @@
  27042. This function is a possible cancellation point and therefore not
  27043. marked with __THROW. */
  27044. extern int fprintf (FILE *__restrict __stream,
  27045. - __const char *__restrict __format, ...);
  27046. + const char *__restrict __format, ...);
  27047. libc_hidden_proto(fprintf)
  27048. /* Write formatted output to stdout.
  27049. This function is a possible cancellation point and therefore not
  27050. marked with __THROW. */
  27051. -extern int printf (__const char *__restrict __format, ...);
  27052. +extern int printf (const char *__restrict __format, ...);
  27053. libc_hidden_proto(printf)
  27054. /* Write formatted output to S. */
  27055. extern int sprintf (char *__restrict __s,
  27056. - __const char *__restrict __format, ...)
  27057. + const char *__restrict __format, ...)
  27058. __THROW __attribute__ ((__format__ (__printf__, 2, 3)));
  27059. libc_hidden_proto(sprintf)
  27060. @@ -352,16 +353,16 @@
  27061. This function is a possible cancellation point and therefore not
  27062. marked with __THROW. */
  27063. -extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
  27064. +extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,
  27065. __gnuc_va_list __arg);
  27066. libc_hidden_proto(vfprintf)
  27067. /* Write formatted output to stdout from argument list ARG.
  27068. This function is a possible cancellation point and therefore not
  27069. marked with __THROW. */
  27070. -extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
  27071. +extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg);
  27072. /* Write formatted output to S from argument list ARG. */
  27073. -extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
  27074. +extern int vsprintf (char *__restrict __s, const char *__restrict __format,
  27075. __gnuc_va_list __arg)
  27076. __THROW __attribute__ ((__format__ (__printf__, 2, 0)));
  27077. __END_NAMESPACE_STD
  27078. @@ -370,12 +371,12 @@
  27079. __BEGIN_NAMESPACE_C99
  27080. /* Maximum chars of output to write in MAXLEN. */
  27081. extern int snprintf (char *__restrict __s, size_t __maxlen,
  27082. - __const char *__restrict __format, ...)
  27083. + const char *__restrict __format, ...)
  27084. __THROW __attribute__ ((__format__ (__printf__, 3, 4)));
  27085. libc_hidden_proto(snprintf)
  27086. extern int vsnprintf (char *__restrict __s, size_t __maxlen,
  27087. - __const char *__restrict __format, __gnuc_va_list __arg)
  27088. + const char *__restrict __format, __gnuc_va_list __arg)
  27089. __THROW __attribute__ ((__format__ (__printf__, 3, 0)));
  27090. libc_hidden_proto(vsnprintf)
  27091. __END_NAMESPACE_C99
  27092. @@ -384,31 +385,33 @@
  27093. #ifdef __USE_GNU
  27094. /* Write formatted output to a string dynamically allocated with `malloc'.
  27095. Store the address of the string in *PTR. */
  27096. -extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
  27097. +extern int vasprintf (char **__restrict __ptr, const char *__restrict __f,
  27098. __gnuc_va_list __arg)
  27099. __THROW __attribute__ ((__format__ (__printf__, 2, 0))) __wur;
  27100. libc_hidden_proto(vasprintf)
  27101. #if 0 /* uClibc: disabled */
  27102. extern int __asprintf (char **__restrict __ptr,
  27103. - __const char *__restrict __fmt, ...)
  27104. + const char *__restrict __fmt, ...)
  27105. __THROW __attribute__ ((__format__ (__printf__, 2, 3))) __wur;
  27106. #endif
  27107. extern int asprintf (char **__restrict __ptr,
  27108. - __const char *__restrict __fmt, ...)
  27109. + const char *__restrict __fmt, ...)
  27110. __THROW __attribute__ ((__format__ (__printf__, 2, 3))) __wur;
  27111. libc_hidden_proto(asprintf)
  27112. +#endif
  27113. +#ifdef __USE_XOPEN2K8
  27114. /* Write formatted output to a file descriptor.
  27115. These functions are not part of POSIX and therefore no official
  27116. cancellation point. But due to similarity with an POSIX interface
  27117. or due to the implementation they are cancellation points and
  27118. therefore not marked with __THROW. */
  27119. -extern int vdprintf (int __fd, __const char *__restrict __fmt,
  27120. +extern int vdprintf (int __fd, const char *__restrict __fmt,
  27121. __gnuc_va_list __arg)
  27122. __attribute__ ((__format__ (__printf__, 2, 0)));
  27123. libc_hidden_proto(vdprintf)
  27124. -extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
  27125. +extern int dprintf (int __fd, const char *__restrict __fmt, ...)
  27126. __attribute__ ((__format__ (__printf__, 2, 3)));
  27127. #endif
  27128. @@ -419,18 +422,18 @@
  27129. This function is a possible cancellation point and therefore not
  27130. marked with __THROW. */
  27131. extern int fscanf (FILE *__restrict __stream,
  27132. - __const char *__restrict __format, ...)
  27133. + const char *__restrict __format, ...)
  27134. __attribute__ ((__format__ (__scanf__, 2, 3))) __wur;
  27135. libc_hidden_proto(fscanf)
  27136. /* Read formatted input from stdin.
  27137. This function is a possible cancellation point and therefore not
  27138. marked with __THROW. */
  27139. -extern int scanf (__const char *__restrict __format, ...)
  27140. +extern int scanf (const char *__restrict __format, ...)
  27141. __attribute__ ((__format__ (__scanf__, 1, 2))) __wur;
  27142. /* Read formatted input from S. */
  27143. -extern int sscanf (__const char *__restrict __s,
  27144. - __const char *__restrict __format, ...)
  27145. +extern int sscanf (const char *__restrict __s,
  27146. + const char *__restrict __format, ...)
  27147. __THROW __attribute__ ((__format__ (__scanf__, 2, 3)));
  27148. libc_hidden_proto(sscanf)
  27149. __END_NAMESPACE_STD
  27150. @@ -441,7 +444,7 @@
  27151. This function is a possible cancellation point and therefore not
  27152. marked with __THROW. */
  27153. -extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
  27154. +extern int vfscanf (FILE *__restrict __s, const char *__restrict __format,
  27155. __gnuc_va_list __arg)
  27156. __attribute__ ((__format__ (__scanf__, 2, 0))) __wur;
  27157. libc_hidden_proto(vfscanf)
  27158. @@ -450,12 +453,12 @@
  27159. This function is a possible cancellation point and therefore not
  27160. marked with __THROW. */
  27161. -extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
  27162. +extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg)
  27163. __attribute__ ((__format__ (__scanf__, 1, 0))) __wur;
  27164. /* Read formatted input from S into argument list ARG. */
  27165. -extern int vsscanf (__const char *__restrict __s,
  27166. - __const char *__restrict __format, __gnuc_va_list __arg)
  27167. +extern int vsscanf (const char *__restrict __s,
  27168. + const char *__restrict __format, __gnuc_va_list __arg)
  27169. __THROW __attribute__ ((__format__ (__scanf__, 2, 0)));
  27170. libc_hidden_proto(vsscanf)
  27171. __END_NAMESPACE_C99
  27172. @@ -491,9 +494,6 @@
  27173. libc_hidden_proto(getc_unlocked)
  27174. extern int getchar_unlocked (void);
  27175. libc_hidden_proto(getchar_unlocked)
  27176. -
  27177. -/* SUSv3 allows getc_unlocked to be a macro */
  27178. -#define getc_unlocked(_fp) __GETC_UNLOCKED(_fp)
  27179. #endif /* Use POSIX or MISC. */
  27180. #ifdef __USE_MISC
  27181. @@ -519,7 +519,6 @@
  27182. extern int fputc (int __c, FILE *__stream);
  27183. libc_hidden_proto(fputc)
  27184. extern int putc (int __c, FILE *__stream);
  27185. -libc_hidden_proto(putc)
  27186. /* Write a character to stdout.
  27187. @@ -540,7 +539,6 @@
  27188. or due to the implementation it is a cancellation point and
  27189. therefore not marked with __THROW. */
  27190. extern int fputc_unlocked (int __c, FILE *__stream);
  27191. -libc_hidden_proto(fputc_unlocked)
  27192. #endif /* Use MISC. */
  27193. #if defined __USE_POSIX || defined __USE_MISC
  27194. @@ -549,11 +547,7 @@
  27195. These functions are possible cancellation points and therefore not
  27196. marked with __THROW. */
  27197. extern int putc_unlocked (int __c, FILE *__stream);
  27198. -libc_hidden_proto(putc_unlocked)
  27199. extern int putchar_unlocked (int __c);
  27200. -
  27201. -/* SUSv3 allows putc_unlocked to be a macro */
  27202. -#define putc_unlocked(_ch, _fp) __PUTC_UNLOCKED(_ch, _fp)
  27203. #endif /* Use POSIX or MISC. */
  27204. @@ -597,7 +591,7 @@
  27205. #endif
  27206. -#ifdef __USE_GNU
  27207. +#ifdef __USE_XOPEN2K8
  27208. /* Read up to (and including) a DELIMITER from STREAM into *LINEPTR
  27209. (and null-terminate it). *LINEPTR is a pointer returned from malloc (or
  27210. NULL), pointing to *N characters of space. It is realloc'd as
  27211. @@ -636,14 +630,14 @@
  27212. This function is a possible cancellation points and therefore not
  27213. marked with __THROW. */
  27214. -extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
  27215. +extern int fputs (const char *__restrict __s, FILE *__restrict __stream);
  27216. libc_hidden_proto(fputs)
  27217. /* Write a string, followed by a newline, to stdout.
  27218. This function is a possible cancellation points and therefore not
  27219. marked with __THROW. */
  27220. -extern int puts (__const char *__s);
  27221. +extern int puts (const char *__s);
  27222. /* Push a character back onto the input buffer of STREAM.
  27223. @@ -665,7 +659,7 @@
  27224. This function is a possible cancellation points and therefore not
  27225. marked with __THROW. */
  27226. -extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
  27227. +extern size_t fwrite (const void *__restrict __ptr, size_t __size,
  27228. size_t __n, FILE *__restrict __s) __wur;
  27229. libc_hidden_proto(fwrite)
  27230. __END_NAMESPACE_STD
  27231. @@ -677,7 +671,7 @@
  27232. cancellation point. But due to similarity with an POSIX interface
  27233. or due to the implementation it is a cancellation point and
  27234. therefore not marked with __THROW. */
  27235. -extern int fputs_unlocked (__const char *__restrict __s,
  27236. +extern int fputs_unlocked (const char *__restrict __s,
  27237. FILE *__restrict __stream);
  27238. libc_hidden_proto(fputs_unlocked)
  27239. #endif
  27240. @@ -692,7 +686,7 @@
  27241. extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
  27242. size_t __n, FILE *__restrict __stream) __wur;
  27243. libc_hidden_proto(fread_unlocked)
  27244. -extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
  27245. +extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
  27246. size_t __n, FILE *__restrict __stream) __wur;
  27247. libc_hidden_proto(fwrite_unlocked)
  27248. #endif
  27249. @@ -760,13 +754,13 @@
  27250. This function is a possible cancellation point and therefore not
  27251. marked with __THROW. */
  27252. -extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
  27253. +extern int fsetpos (FILE *__stream, const fpos_t *__pos);
  27254. #else
  27255. # ifdef __REDIRECT
  27256. extern int __REDIRECT (fgetpos, (FILE *__restrict __stream,
  27257. fpos_t *__restrict __pos), fgetpos64);
  27258. extern int __REDIRECT (fsetpos,
  27259. - (FILE *__stream, __const fpos_t *__pos), fsetpos64);
  27260. + (FILE *__stream, const fpos_t *__pos), fsetpos64);
  27261. # else
  27262. # define fgetpos fgetpos64
  27263. # define fsetpos fsetpos64
  27264. @@ -780,7 +774,7 @@
  27265. extern __off64_t ftello64 (FILE *__stream) __wur;
  27266. libc_hidden_proto(ftello64)
  27267. extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
  27268. -extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos);
  27269. +extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos);
  27270. #endif
  27271. __BEGIN_NAMESPACE_STD
  27272. @@ -805,7 +799,7 @@
  27273. This function is a possible cancellation point and therefore not
  27274. marked with __THROW. */
  27275. -extern void perror (__const char *__s);
  27276. +extern void perror (const char *__s);
  27277. libc_hidden_proto(perror)
  27278. __END_NAMESPACE_STD
  27279. @@ -814,7 +808,7 @@
  27280. function provides all the needed functionality. */
  27281. #ifdef __USE_BSD
  27282. extern int sys_nerr;
  27283. -extern __const char *__const sys_errlist[];
  27284. +extern const char *const sys_errlist[];
  27285. #endif
  27286. #endif /* __UCLIBC_HAS_SYS_ERRLIST__ */
  27287. @@ -838,7 +832,7 @@
  27288. This function is a possible cancellation point and therefore not
  27289. marked with __THROW. */
  27290. -extern FILE *popen (__const char *__command, __const char *__modes) __wur;
  27291. +extern FILE *popen (const char *__command, const char *__modes) __wur;
  27292. /* Close a stream opened by popen and return the status of its child.
  27293. @@ -860,18 +854,19 @@
  27294. #endif /* Use X/Open, but not issue 6. */
  27295. -#if 0 /* def __USE_GNU uClibc note: not supported */
  27296. +#if defined __USE_GNU && defined __UCLIBC_HAS_OBSTACK__
  27297. struct obstack; /* See <obstack.h>. */
  27298. /* Write formatted output to an obstack. */
  27299. extern int obstack_printf (struct obstack *__restrict __obstack,
  27300. - __const char *__restrict __format, ...)
  27301. + const char *__restrict __format, ...)
  27302. __THROW __attribute__ ((__format__ (__printf__, 2, 3)));
  27303. extern int obstack_vprintf (struct obstack *__restrict __obstack,
  27304. - __const char *__restrict __format,
  27305. + const char *__restrict __format,
  27306. __gnuc_va_list __args)
  27307. __THROW __attribute__ ((__format__ (__printf__, 2, 0)));
  27308. -#endif /* Use GNU. */
  27309. +libc_hidden_proto(obstack_vprintf)
  27310. +#endif /* USE_GNU && UCLIBC_HAS_OBSTACK. */
  27311. #if defined __USE_POSIX || defined __USE_MISC
  27312. @@ -893,27 +888,31 @@
  27313. declared here which do not belong into this header. But we have to
  27314. follow. In GNU mode we don't do this nonsense. */
  27315. # define __need_getopt
  27316. +/* keep this on uClibc in bits/, we need it when GNU_GETOPT is disabled */
  27317. # include <bits/getopt.h>
  27318. #endif /* X/Open, but not issue 6 and not for GNU. */
  27319. /* If we are compiling with optimizing read this file. It contains
  27320. several optimizing inline functions and macros. */
  27321. +
  27322. +#ifdef __UCLIBC__
  27323. +
  27324. #define fgetc(_fp) __FGETC(_fp)
  27325. #define fputc(_ch, _fp) __FPUTC(_ch, _fp)
  27326. +#if defined __USE_POSIX || defined __USE_MISC
  27327. +/* SUSv3 allows getc_unlocked to be a macro */
  27328. +#define getc_unlocked(_fp) __GETC_UNLOCKED(_fp)
  27329. +/* SUSv3 allows putc_unlocked to be a macro */
  27330. +#define putc_unlocked(_ch, _fp) __PUTC_UNLOCKED(_ch, _fp)
  27331. +#endif
  27332. +
  27333. #ifdef __USE_MISC
  27334. #define fgetc_unlocked(_fp) __FGETC_UNLOCKED(_fp)
  27335. #define fputc_unlocked(_ch, _fp) __FPUTC_UNLOCKED(_ch, _fp)
  27336. #endif
  27337. -#ifndef __STDIO_GETC_MACRO
  27338. -#define __stdin stdin
  27339. -#endif
  27340. #define getchar() __GETC(__stdin)
  27341. -
  27342. -#ifndef __STDIO_PUTC_MACRO
  27343. -#define __stdout stdout
  27344. -#endif
  27345. #define putchar(_ch) __PUTC((_ch), __stdout)
  27346. #if defined __USE_POSIX || defined __USE_MISC
  27347. @@ -932,6 +931,8 @@
  27348. #define ferror_unlocked(_fp) __FERROR_UNLOCKED(_fp)
  27349. #endif
  27350. +#endif
  27351. +
  27352. __END_DECLS
  27353. #endif /* <stdio.h> included. */
  27354. diff -Nur uClibc-0.9.33.2/include/stdlib.h uClibc-git/include/stdlib.h
  27355. --- uClibc-0.9.33.2/include/stdlib.h 2012-05-15 09:20:09.000000000 +0200
  27356. +++ uClibc-git/include/stdlib.h 2014-07-25 20:36:05.165326090 +0200
  27357. @@ -12,9 +12,8 @@
  27358. Lesser General Public License for more details.
  27359. You should have received a copy of the GNU Lesser General Public
  27360. - License along with the GNU C Library; if not, write to the Free
  27361. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  27362. - 02111-1307 USA. */
  27363. + License along with the GNU C Library; if not, see
  27364. + <http://www.gnu.org/licenses/>. */
  27365. /*
  27366. * ISO C99 Standard: 7.20 General utilities <stdlib.h>
  27367. @@ -155,22 +154,22 @@
  27368. __BEGIN_NAMESPACE_STD
  27369. #ifdef __UCLIBC_HAS_FLOATS__
  27370. /* Convert a string to a floating-point number. */
  27371. -extern double atof (__const char *__nptr)
  27372. +extern double atof (const char *__nptr)
  27373. __THROW __attribute_pure__ __nonnull ((1)) __wur;
  27374. #endif /* __UCLIBC_HAS_FLOATS__ */
  27375. /* Convert a string to an integer. */
  27376. -extern int atoi (__const char *__nptr)
  27377. +extern int atoi (const char *__nptr)
  27378. __THROW __attribute_pure__ __nonnull ((1)) __wur;
  27379. libc_hidden_proto(atoi)
  27380. /* Convert a string to a long integer. */
  27381. -extern long int atol (__const char *__nptr)
  27382. +extern long int atol (const char *__nptr)
  27383. __THROW __attribute_pure__ __nonnull ((1)) __wur;
  27384. __END_NAMESPACE_STD
  27385. #if defined __USE_ISOC99 || defined __USE_MISC
  27386. __BEGIN_NAMESPACE_C99
  27387. /* Convert a string to a long long integer. */
  27388. -__extension__ extern long long int atoll (__const char *__nptr)
  27389. +__extension__ extern long long int atoll (const char *__nptr)
  27390. __THROW __attribute_pure__ __nonnull ((1)) __wur;
  27391. __END_NAMESPACE_C99
  27392. #endif
  27393. @@ -178,7 +177,7 @@
  27394. #ifdef __UCLIBC_HAS_FLOATS__
  27395. __BEGIN_NAMESPACE_STD
  27396. /* Convert a string to a floating-point number. */
  27397. -extern double strtod (__const char *__restrict __nptr,
  27398. +extern double strtod (const char *__restrict __nptr,
  27399. char **__restrict __endptr)
  27400. __THROW __nonnull ((1)) __wur;
  27401. libc_hidden_proto(strtod)
  27402. @@ -187,10 +186,10 @@
  27403. #ifdef __USE_ISOC99
  27404. __BEGIN_NAMESPACE_C99
  27405. /* Likewise for `float' and `long double' sizes of floating-point numbers. */
  27406. -extern float strtof (__const char *__restrict __nptr,
  27407. +extern float strtof (const char *__restrict __nptr,
  27408. char **__restrict __endptr) __THROW __nonnull ((1)) __wur;
  27409. -extern long double strtold (__const char *__restrict __nptr,
  27410. +extern long double strtold (const char *__restrict __nptr,
  27411. char **__restrict __endptr)
  27412. __THROW __nonnull ((1)) __wur;
  27413. __END_NAMESPACE_C99
  27414. @@ -199,12 +198,12 @@
  27415. __BEGIN_NAMESPACE_STD
  27416. /* Convert a string to a long integer. */
  27417. -extern long int strtol (__const char *__restrict __nptr,
  27418. +extern long int strtol (const char *__restrict __nptr,
  27419. char **__restrict __endptr, int __base)
  27420. __THROW __nonnull ((1)) __wur;
  27421. libc_hidden_proto(strtol)
  27422. /* Convert a string to an unsigned long integer. */
  27423. -extern unsigned long int strtoul (__const char *__restrict __nptr,
  27424. +extern unsigned long int strtoul (const char *__restrict __nptr,
  27425. char **__restrict __endptr, int __base)
  27426. __THROW __nonnull ((1)) __wur;
  27427. libc_hidden_proto(strtoul)
  27428. @@ -215,12 +214,12 @@
  27429. /* Convert a string to a quadword integer. */
  27430. __extension__
  27431. -extern quad_t strtoq (__const char *__restrict __nptr,
  27432. +extern quad_t strtoq (const char *__restrict __nptr,
  27433. char **__restrict __endptr, int __base)
  27434. __THROW __nonnull ((1)) __wur;
  27435. /* Convert a string to an unsigned quadword integer. */
  27436. __extension__
  27437. -extern u_quad_t strtouq (__const char *__restrict __nptr,
  27438. +extern u_quad_t strtouq (const char *__restrict __nptr,
  27439. char **__restrict __endptr, int __base)
  27440. __THROW __nonnull ((1)) __wur;
  27441. #endif /* GCC and use BSD. */
  27442. @@ -229,13 +228,13 @@
  27443. __BEGIN_NAMESPACE_C99
  27444. /* Convert a string to a quadword integer. */
  27445. __extension__
  27446. -extern long long int strtoll (__const char *__restrict __nptr,
  27447. +extern long long int strtoll (const char *__restrict __nptr,
  27448. char **__restrict __endptr, int __base)
  27449. __THROW __nonnull ((1)) __wur;
  27450. libc_hidden_proto(strtoll)
  27451. /* Convert a string to an unsigned quadword integer. */
  27452. __extension__
  27453. -extern unsigned long long int strtoull (__const char *__restrict __nptr,
  27454. +extern unsigned long long int strtoull (const char *__restrict __nptr,
  27455. char **__restrict __endptr, int __base)
  27456. __THROW __nonnull ((1)) __wur;
  27457. __END_NAMESPACE_C99
  27458. @@ -260,39 +259,39 @@
  27459. /* Special versions of the functions above which take the locale to
  27460. use as an additional parameter. */
  27461. -extern long int strtol_l (__const char *__restrict __nptr,
  27462. +extern long int strtol_l (const char *__restrict __nptr,
  27463. char **__restrict __endptr, int __base,
  27464. __locale_t __loc) __THROW __nonnull ((1, 4)) __wur;
  27465. libc_hidden_proto(strtol_l)
  27466. -extern unsigned long int strtoul_l (__const char *__restrict __nptr,
  27467. +extern unsigned long int strtoul_l (const char *__restrict __nptr,
  27468. char **__restrict __endptr,
  27469. int __base, __locale_t __loc)
  27470. __THROW __nonnull ((1, 4)) __wur;
  27471. libc_hidden_proto(strtoul_l)
  27472. __extension__
  27473. -extern long long int strtoll_l (__const char *__restrict __nptr,
  27474. +extern long long int strtoll_l (const char *__restrict __nptr,
  27475. char **__restrict __endptr, int __base,
  27476. __locale_t __loc)
  27477. __THROW __nonnull ((1, 4)) __wur;
  27478. __extension__
  27479. -extern unsigned long long int strtoull_l (__const char *__restrict __nptr,
  27480. +extern unsigned long long int strtoull_l (const char *__restrict __nptr,
  27481. char **__restrict __endptr,
  27482. int __base, __locale_t __loc)
  27483. __THROW __nonnull ((1, 4)) __wur;
  27484. #ifdef __UCLIBC_HAS_FLOATS__
  27485. -extern double strtod_l (__const char *__restrict __nptr,
  27486. +extern double strtod_l (const char *__restrict __nptr,
  27487. char **__restrict __endptr, __locale_t __loc)
  27488. __THROW __nonnull ((1, 3)) __wur;
  27489. -extern float strtof_l (__const char *__restrict __nptr,
  27490. +extern float strtof_l (const char *__restrict __nptr,
  27491. char **__restrict __endptr, __locale_t __loc)
  27492. __THROW __nonnull ((1, 3)) __wur;
  27493. -extern long double strtold_l (__const char *__restrict __nptr,
  27494. +extern long double strtold_l (const char *__restrict __nptr,
  27495. char **__restrict __endptr,
  27496. __locale_t __loc)
  27497. __THROW __nonnull ((1, 3)) __wur;
  27498. @@ -307,7 +306,7 @@
  27499. extern char *l64a (long int __n) __THROW __wur;
  27500. /* Read a number from a string S in base 64 as above. */
  27501. -extern long int a64l (__const char *__s)
  27502. +extern long int a64l (const char *__s)
  27503. __THROW __attribute_pure__ __nonnull ((1)) __wur;
  27504. #endif /* Use SVID || extended X/Open. */
  27505. @@ -564,14 +563,14 @@
  27506. __BEGIN_NAMESPACE_STD
  27507. /* Return the value of envariable NAME, or NULL if it doesn't exist. */
  27508. -extern char *getenv (__const char *__name) __THROW __nonnull ((1)) __wur;
  27509. +extern char *getenv (const char *__name) __THROW __nonnull ((1)) __wur;
  27510. libc_hidden_proto(getenv)
  27511. __END_NAMESPACE_STD
  27512. #if 0
  27513. /* This function is similar to the above but returns NULL if the
  27514. programs is running with SUID or SGID enabled. */
  27515. -extern char *__secure_getenv (__const char *__name)
  27516. +extern char *__secure_getenv (const char *__name)
  27517. __THROW __nonnull ((1)) __wur;
  27518. #endif
  27519. @@ -585,12 +584,12 @@
  27520. #if defined __USE_BSD || defined __USE_XOPEN2K
  27521. /* Set NAME to VALUE in the environment.
  27522. If REPLACE is nonzero, overwrite an existing value. */
  27523. -extern int setenv (__const char *__name, __const char *__value, int __replace)
  27524. +extern int setenv (const char *__name, const char *__value, int __replace)
  27525. __THROW __nonnull ((2));
  27526. libc_hidden_proto(setenv)
  27527. /* Remove the variable NAME from the environment. */
  27528. -extern int unsetenv (__const char *__name) __THROW;
  27529. +extern int unsetenv (const char *__name) __THROW;
  27530. libc_hidden_proto(unsetenv)
  27531. #endif
  27532. @@ -652,20 +651,43 @@
  27533. extern char *mkdtemp (char *__template) __THROW __nonnull ((1)) __wur;
  27534. #endif
  27535. +#ifdef __USE_GNU
  27536. +/* Generate a unique temporary file name from TEMPLATE similar to
  27537. + mkstemp. But allow the caller to pass additional flags which are
  27538. + used in the open call to create the file..
  27539. +
  27540. + This function is a possible cancellation point and therefore not
  27541. + marked with __THROW. */
  27542. +# ifndef __USE_FILE_OFFSET64
  27543. +extern int mkostemp (char *__template, int __flags) __nonnull ((1)) __wur;
  27544. +# else
  27545. +# ifdef __REDIRECT
  27546. +extern int __REDIRECT (mkostemp, (char *__template, int __flags), mkostemp64)
  27547. + __nonnull ((1)) __wur;
  27548. +# else
  27549. +# define mkostemp mkostemp64
  27550. +# endif
  27551. +# endif
  27552. +# ifdef __USE_LARGEFILE64
  27553. +extern int mkostemp64 (char *__template, int __flags) __nonnull ((1)) __wur;
  27554. +# endif
  27555. +
  27556. +#endif
  27557. +
  27558. __BEGIN_NAMESPACE_STD
  27559. /* Execute the given line as a shell command.
  27560. This function is a cancellation point and therefore not marked with
  27561. __THROW. */
  27562. -extern int system (__const char *__command) __wur;
  27563. +extern int system (const char *__command) __wur;
  27564. __END_NAMESPACE_STD
  27565. #ifdef __USE_GNU
  27566. /* Return a malloc'd string containing the canonical absolute name of the
  27567. existing named file. */
  27568. -extern char *canonicalize_file_name (__const char *__name)
  27569. +extern char *canonicalize_file_name (const char *__name)
  27570. __THROW __nonnull ((1)) __wur;
  27571. #endif
  27572. @@ -675,7 +697,7 @@
  27573. PATH_MAX chars or more, returns null with `errno' set to
  27574. ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars,
  27575. returns the name in RESOLVED. */
  27576. -extern char *realpath (__const char *__restrict __name,
  27577. +extern char *realpath (const char *__restrict __name,
  27578. char *__restrict __resolved) __THROW __wur;
  27579. libc_hidden_proto(realpath)
  27580. #endif
  27581. @@ -684,20 +706,20 @@
  27582. /* Shorthand for type of comparison functions. */
  27583. #ifndef __COMPAR_FN_T
  27584. # define __COMPAR_FN_T
  27585. -typedef int (*__compar_fn_t) (__const void *, __const void *);
  27586. +typedef int (*__compar_fn_t) (const void *, const void *);
  27587. # ifdef __USE_GNU
  27588. typedef __compar_fn_t comparison_fn_t;
  27589. # endif
  27590. #endif
  27591. #ifdef __USE_GNU
  27592. -typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *);
  27593. +typedef int (*__compar_d_fn_t) (const void *, const void *, void *);
  27594. #endif
  27595. __BEGIN_NAMESPACE_STD
  27596. /* Do a binary search for KEY in BASE, which consists of NMEMB elements
  27597. of SIZE bytes each, using COMPAR to perform the comparisons. */
  27598. -extern void *bsearch (__const void *__key, __const void *__base,
  27599. +extern void *bsearch (const void *__key, const void *__base,
  27600. size_t __nmemb, size_t __size, __compar_fn_t __compar)
  27601. __nonnull ((1, 2, 5)) __wur;
  27602. @@ -807,11 +829,11 @@
  27603. __BEGIN_NAMESPACE_STD
  27604. /* Return the length of the multibyte character
  27605. in S, which is no longer than N. */
  27606. -extern int mblen (__const char *__s, size_t __n) __THROW __wur;
  27607. +extern int mblen (const char *__s, size_t __n) __THROW __wur;
  27608. /* Return the length of the given multibyte character,
  27609. putting its `wchar_t' representation in *PWC. */
  27610. extern int mbtowc (wchar_t *__restrict __pwc,
  27611. - __const char *__restrict __s, size_t __n) __THROW __wur;
  27612. + const char *__restrict __s, size_t __n) __THROW __wur;
  27613. /* Put the multibyte character represented
  27614. by WCHAR in S, returning its length. */
  27615. extern int wctomb (char *__s, wchar_t __wchar) __THROW __wur;
  27616. @@ -819,21 +841,21 @@
  27617. /* Convert a multibyte string to a wide char string. */
  27618. extern size_t mbstowcs (wchar_t *__restrict __pwcs,
  27619. - __const char *__restrict __s, size_t __n) __THROW;
  27620. + const char *__restrict __s, size_t __n) __THROW;
  27621. /* Convert a wide char string to multibyte string. */
  27622. extern size_t wcstombs (char *__restrict __s,
  27623. - __const wchar_t *__restrict __pwcs, size_t __n)
  27624. + const wchar_t *__restrict __pwcs, size_t __n)
  27625. __THROW;
  27626. __END_NAMESPACE_STD
  27627. #endif /* __UCLIBC_HAS_WCHAR__ */
  27628. -#if 0 /*def __USE_SVID*/
  27629. +#ifdef __USE_SVID
  27630. /* Determine whether the string value of RESPONSE matches the affirmation
  27631. or negative response expression as specified by the LC_MESSAGES category
  27632. in the program's current locale. Returns 1 if affirmative, 0 if
  27633. negative, and -1 if not matching. */
  27634. -extern int rpmatch (__const char *__response) __THROW __nonnull ((1)) __wur;
  27635. +extern int rpmatch (const char *__response) __THROW __nonnull ((1)) __wur;
  27636. #endif
  27637. @@ -845,7 +867,7 @@
  27638. suboption. On exit *OPTIONP is set to the beginning of the next
  27639. token or at the terminating NUL character. */
  27640. extern int getsubopt (char **__restrict __optionp,
  27641. - char *__const *__restrict __tokens,
  27642. + char *const *__restrict __tokens,
  27643. char **__restrict __valuep)
  27644. __THROW __nonnull ((1, 2, 3)) __wur;
  27645. #endif
  27646. @@ -854,7 +876,7 @@
  27647. #ifdef __USE_XOPEN
  27648. # if defined __UCLIBC_HAS_CRYPT__
  27649. /* Setup DES tables according KEY. */
  27650. -extern void setkey (__const char *__key) __THROW __nonnull ((1));
  27651. +extern void setkey (const char *__key) __THROW __nonnull ((1));
  27652. # endif /* __UCLIBC_HAS_CRYPT__ */
  27653. #endif
  27654. @@ -864,7 +886,6 @@
  27655. #ifdef __USE_XOPEN2K
  27656. /* Return a master pseudo-terminal handle. */
  27657. extern int posix_openpt (int __oflag) __wur;
  27658. -libc_hidden_proto(posix_openpt)
  27659. #endif
  27660. #ifdef __USE_XOPEN
  27661. @@ -910,8 +931,8 @@
  27662. #endif
  27663. #ifdef __UCLIBC_HAS_ARC4RANDOM__
  27664. -#include <stdint.h>
  27665. -extern uint32_t arc4random(void);
  27666. +# include <sys/types.h>
  27667. +extern u_int32_t arc4random(void);
  27668. extern void arc4random_stir(void);
  27669. extern void arc4random_addrandom(unsigned char *, int);
  27670. #endif
  27671. diff -Nur uClibc-0.9.33.2/include/string.h uClibc-git/include/string.h
  27672. --- uClibc-0.9.33.2/include/string.h 2012-05-15 09:20:09.000000000 +0200
  27673. +++ uClibc-git/include/string.h 2014-07-25 20:36:05.165326090 +0200
  27674. @@ -1,4 +1,4 @@
  27675. -/* Copyright (C) 1991-1993, 1995-2003, 2004 Free Software Foundation, Inc.
  27676. +/* Copyright (C) 1991-1993,1995-2004,2007,2009 Free Software Foundation, Inc.
  27677. This file is part of the GNU C Library.
  27678. The GNU C Library is free software; you can redistribute it and/or
  27679. @@ -12,9 +12,8 @@
  27680. Lesser General Public License for more details.
  27681. You should have received a copy of the GNU Lesser General Public
  27682. - License along with the GNU C Library; if not, write to the Free
  27683. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  27684. - 02111-1307 USA. */
  27685. + License along with the GNU C Library; if not, see
  27686. + <http://www.gnu.org/licenses/>. */
  27687. /*
  27688. * ISO C99 Standard: 7.21 String handling <string.h>
  27689. @@ -36,12 +35,12 @@
  27690. __BEGIN_NAMESPACE_STD
  27691. /* Copy N bytes of SRC to DEST. */
  27692. extern void *memcpy (void *__restrict __dest,
  27693. - __const void *__restrict __src, size_t __n)
  27694. + const void *__restrict __src, size_t __n)
  27695. __THROW __nonnull ((1, 2));
  27696. libc_hidden_proto(memcpy)
  27697. /* Copy N bytes of SRC to DEST, guaranteeing
  27698. correct behavior for overlapping strings. */
  27699. -extern void *memmove (void *__dest, __const void *__src, size_t __n)
  27700. +extern void *memmove (void *__dest, const void *__src, size_t __n)
  27701. __THROW __nonnull ((1, 2));
  27702. libc_hidden_proto(memmove)
  27703. __END_NAMESPACE_STD
  27704. @@ -50,7 +49,7 @@
  27705. Return the position in DEST one byte past where C was copied,
  27706. or NULL if C was not found in the first N bytes of SRC. */
  27707. #if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN
  27708. -extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
  27709. +extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
  27710. int __c, size_t __n)
  27711. __THROW __nonnull ((1, 2));
  27712. libc_hidden_proto(memccpy)
  27713. @@ -63,12 +62,12 @@
  27714. libc_hidden_proto(memset)
  27715. /* Compare N bytes of S1 and S2. */
  27716. -extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
  27717. +extern int memcmp (const void *__s1, const void *__s2, size_t __n)
  27718. __THROW __attribute_pure__ __nonnull ((1, 2));
  27719. libc_hidden_proto(memcmp)
  27720. /* Search N bytes of S for C. */
  27721. -extern void *memchr (__const void *__s, int __c, size_t __n)
  27722. +extern void *memchr (const void *__s, int __c, size_t __n)
  27723. __THROW __attribute_pure__ __nonnull ((1));
  27724. libc_hidden_proto(memchr)
  27725. __END_NAMESPACE_STD
  27726. @@ -76,12 +75,12 @@
  27727. #ifdef __USE_GNU
  27728. /* Search in S for C. This is similar to `memchr' but there is no
  27729. length limit. */
  27730. -extern void *rawmemchr (__const void *__s, int __c)
  27731. +extern void *rawmemchr (const void *__s, int __c)
  27732. __THROW __attribute_pure__ __nonnull ((1));
  27733. libc_hidden_proto(rawmemchr)
  27734. /* Search N bytes of S for the final occurrence of C. */
  27735. -extern void *memrchr (__const void *__s, int __c, size_t __n)
  27736. +extern void *memrchr (const void *__s, int __c, size_t __n)
  27737. __THROW __attribute_pure__ __nonnull ((1));
  27738. libc_hidden_proto(memrchr)
  27739. #endif
  27740. @@ -89,62 +88,62 @@
  27741. __BEGIN_NAMESPACE_STD
  27742. /* Copy SRC to DEST. */
  27743. -extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
  27744. +extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
  27745. __THROW __nonnull ((1, 2));
  27746. libc_hidden_proto(strcpy)
  27747. /* Copy no more than N characters of SRC to DEST. */
  27748. extern char *strncpy (char *__restrict __dest,
  27749. - __const char *__restrict __src, size_t __n)
  27750. + const char *__restrict __src, size_t __n)
  27751. __THROW __nonnull ((1, 2));
  27752. libc_hidden_proto(strncpy)
  27753. /* Append SRC onto DEST. */
  27754. -extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
  27755. +extern char *strcat (char *__restrict __dest, const char *__restrict __src)
  27756. __THROW __nonnull ((1, 2));
  27757. libc_hidden_proto(strcat)
  27758. /* Append no more than N characters from SRC onto DEST. */
  27759. -extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
  27760. +extern char *strncat (char *__restrict __dest, const char *__restrict __src,
  27761. size_t __n) __THROW __nonnull ((1, 2));
  27762. libc_hidden_proto(strncat)
  27763. /* Compare S1 and S2. */
  27764. -extern int strcmp (__const char *__s1, __const char *__s2)
  27765. +extern int strcmp (const char *__s1, const char *__s2)
  27766. __THROW __attribute_pure__ __nonnull ((1, 2));
  27767. libc_hidden_proto(strcmp)
  27768. /* Compare N characters of S1 and S2. */
  27769. -extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
  27770. +extern int strncmp (const char *__s1, const char *__s2, size_t __n)
  27771. __THROW __attribute_pure__ __nonnull ((1, 2));
  27772. libc_hidden_proto(strncmp)
  27773. /* Compare the collated forms of S1 and S2. */
  27774. -extern int strcoll (__const char *__s1, __const char *__s2)
  27775. +extern int strcoll (const char *__s1, const char *__s2)
  27776. __THROW __attribute_pure__ __nonnull ((1, 2));
  27777. libc_hidden_proto(strcoll)
  27778. /* Put a transformation of SRC into no more than N bytes of DEST. */
  27779. extern size_t strxfrm (char *__restrict __dest,
  27780. - __const char *__restrict __src, size_t __n)
  27781. + const char *__restrict __src, size_t __n)
  27782. __THROW __nonnull ((2));
  27783. __END_NAMESPACE_STD
  27784. -#if defined __USE_GNU && defined __UCLIBC_HAS_XLOCALE__
  27785. +#if defined __USE_XOPEN2K8 && defined __UCLIBC_HAS_XLOCALE__
  27786. /* The following functions are equivalent to the both above but they
  27787. take the locale they use for the collation as an extra argument.
  27788. This is not standardsized but something like will come. */
  27789. # include <xlocale.h>
  27790. /* Compare the collated forms of S1 and S2 using rules from L. */
  27791. -extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
  27792. +extern int strcoll_l (const char *__s1, const char *__s2, __locale_t __l)
  27793. __THROW __attribute_pure__ __nonnull ((1, 2, 3));
  27794. libc_hidden_proto(strcoll_l)
  27795. /* Put a transformation of SRC into no more than N bytes of DEST. */
  27796. -extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n,
  27797. +extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
  27798. __locale_t __l) __THROW __nonnull ((2, 4));
  27799. libc_hidden_proto(strxfrm_l)
  27800. #endif
  27801. #if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED
  27802. /* Duplicate S, returning an identical malloc'd string. */
  27803. -extern char *strdup (__const char *__s)
  27804. +extern char *strdup (const char *__s)
  27805. __THROW __attribute_malloc__ __nonnull ((1));
  27806. libc_hidden_proto(strdup)
  27807. #endif
  27808. @@ -152,8 +151,8 @@
  27809. /* Return a malloc'd copy of at most N bytes of STRING. The
  27810. resultant string is terminated even if no null terminator
  27811. appears before STRING[N]. */
  27812. -#if defined __USE_GNU
  27813. -extern char *strndup (__const char *__string, size_t __n)
  27814. +#if defined __USE_XOPEN2K8
  27815. +extern char *strndup (const char *__string, size_t __n)
  27816. __THROW __attribute_malloc__ __nonnull ((1));
  27817. libc_hidden_proto(strndup)
  27818. #endif
  27819. @@ -163,7 +162,7 @@
  27820. # define strdupa(s) \
  27821. (__extension__ \
  27822. ({ \
  27823. - __const char *__old = (s); \
  27824. + const char *__old = (s); \
  27825. size_t __len = strlen (__old) + 1; \
  27826. char *__new = (char *) __builtin_alloca (__len); \
  27827. (char *) memcpy (__new, __old, __len); \
  27828. @@ -173,7 +172,7 @@
  27829. # define strndupa(s, n) \
  27830. (__extension__ \
  27831. ({ \
  27832. - __const char *__old = (s); \
  27833. + const char *__old = (s); \
  27834. size_t __len = strnlen (__old, (n)); \
  27835. char *__new = (char *) __builtin_alloca (__len + 1); \
  27836. __new[__len] = '\0'; \
  27837. @@ -183,11 +182,11 @@
  27838. __BEGIN_NAMESPACE_STD
  27839. /* Find the first occurrence of C in S. */
  27840. -extern char *strchr (__const char *__s, int __c)
  27841. +extern char *strchr (const char *__s, int __c)
  27842. __THROW __attribute_pure__ __nonnull ((1));
  27843. libc_hidden_proto(strchr)
  27844. /* Find the last occurrence of C in S. */
  27845. -extern char *strrchr (__const char *__s, int __c)
  27846. +extern char *strrchr (const char *__s, int __c)
  27847. __THROW __attribute_pure__ __nonnull ((1));
  27848. libc_hidden_proto(strrchr)
  27849. __END_NAMESPACE_STD
  27850. @@ -195,7 +194,7 @@
  27851. #ifdef __USE_GNU
  27852. /* This function is similar to `strchr'. But it returns a pointer to
  27853. the closing NUL byte in case C is not found in S. */
  27854. -extern char *strchrnul (__const char *__s, int __c)
  27855. +extern char *strchrnul (const char *__s, int __c)
  27856. __THROW __attribute_pure__ __nonnull ((1));
  27857. libc_hidden_proto(strchrnul)
  27858. #endif
  27859. @@ -203,26 +202,26 @@
  27860. __BEGIN_NAMESPACE_STD
  27861. /* Return the length of the initial segment of S which
  27862. consists entirely of characters not in REJECT. */
  27863. -extern size_t strcspn (__const char *__s, __const char *__reject)
  27864. +extern size_t strcspn (const char *__s, const char *__reject)
  27865. __THROW __attribute_pure__ __nonnull ((1, 2));
  27866. libc_hidden_proto(strcspn)
  27867. /* Return the length of the initial segment of S which
  27868. consists entirely of characters in ACCEPT. */
  27869. -extern size_t strspn (__const char *__s, __const char *__accept)
  27870. +extern size_t strspn (const char *__s, const char *__accept)
  27871. __THROW __attribute_pure__ __nonnull ((1, 2));
  27872. libc_hidden_proto(strspn)
  27873. /* Find the first occurrence in S of any character in ACCEPT. */
  27874. -extern char *strpbrk (__const char *__s, __const char *__accept)
  27875. +extern char *strpbrk (const char *__s, const char *__accept)
  27876. __THROW __attribute_pure__ __nonnull ((1, 2));
  27877. libc_hidden_proto(strpbrk)
  27878. /* Find the first occurrence of NEEDLE in HAYSTACK. */
  27879. -extern char *strstr (__const char *__haystack, __const char *__needle)
  27880. +extern char *strstr (const char *__haystack, const char *__needle)
  27881. __THROW __attribute_pure__ __nonnull ((1, 2));
  27882. libc_hidden_proto(strstr)
  27883. /* Divide S into tokens separated by characters in DELIM. */
  27884. -extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
  27885. +extern char *strtok (char *__restrict __s, const char *__restrict __delim)
  27886. __THROW __nonnull ((2));
  27887. libc_hidden_proto(strtok)
  27888. __END_NAMESPACE_STD
  27889. @@ -231,12 +230,12 @@
  27890. passed between calls are stored in SAVE_PTR. */
  27891. #if 0 /* uClibc: disabled */
  27892. extern char *__strtok_r (char *__restrict __s,
  27893. - __const char *__restrict __delim,
  27894. + const char *__restrict __delim,
  27895. char **__restrict __save_ptr)
  27896. __THROW __nonnull ((2, 3));
  27897. #endif
  27898. #if defined __USE_POSIX || defined __USE_MISC
  27899. -extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
  27900. +extern char *strtok_r (char *__restrict __s, const char *__restrict __delim,
  27901. char **__restrict __save_ptr)
  27902. __THROW __nonnull ((2, 3));
  27903. libc_hidden_proto(strtok_r)
  27904. @@ -244,7 +243,7 @@
  27905. #ifdef __USE_GNU
  27906. /* Similar to `strstr' but this function ignores the case of both strings. */
  27907. -extern char *strcasestr (__const char *__haystack, __const char *__needle)
  27908. +extern char *strcasestr (const char *__haystack, const char *__needle)
  27909. __THROW __attribute_pure__ __nonnull ((1, 2));
  27910. libc_hidden_proto(strcasestr)
  27911. #endif
  27912. @@ -253,19 +252,19 @@
  27913. /* Find the first occurrence of NEEDLE in HAYSTACK.
  27914. NEEDLE is NEEDLELEN bytes long;
  27915. HAYSTACK is HAYSTACKLEN bytes long. */
  27916. -extern void *memmem (__const void *__haystack, size_t __haystacklen,
  27917. - __const void *__needle, size_t __needlelen)
  27918. +extern void *memmem (const void *__haystack, size_t __haystacklen,
  27919. + const void *__needle, size_t __needlelen)
  27920. __THROW __attribute_pure__ __nonnull ((1, 3));
  27921. /* Copy N bytes of SRC to DEST, return pointer to bytes after the
  27922. last written byte. */
  27923. #if 0 /* uClibc: disabled */
  27924. extern void *__mempcpy (void *__restrict __dest,
  27925. - __const void *__restrict __src, size_t __n)
  27926. + const void *__restrict __src, size_t __n)
  27927. __THROW __nonnull ((1, 2));
  27928. #endif
  27929. extern void *mempcpy (void *__restrict __dest,
  27930. - __const void *__restrict __src, size_t __n)
  27931. + const void *__restrict __src, size_t __n)
  27932. __THROW __nonnull ((1, 2));
  27933. libc_hidden_proto(mempcpy)
  27934. #endif
  27935. @@ -273,15 +272,15 @@
  27936. __BEGIN_NAMESPACE_STD
  27937. /* Return the length of S. */
  27938. -extern size_t strlen (__const char *__s)
  27939. +extern size_t strlen (const char *__s)
  27940. __THROW __attribute_pure__ __nonnull ((1));
  27941. libc_hidden_proto(strlen)
  27942. __END_NAMESPACE_STD
  27943. -#ifdef __USE_GNU
  27944. +#ifdef __USE_XOPEN2K8
  27945. /* Find the length of STRING, but scan at most MAXLEN characters.
  27946. If no '\0' terminator is found in that many characters, return MAXLEN. */
  27947. -extern size_t strnlen (__const char *__string, size_t __maxlen)
  27948. +extern size_t strnlen (const char *__string, size_t __maxlen)
  27949. __THROW __attribute_pure__ __nonnull ((1));
  27950. libc_hidden_proto(strnlen)
  27951. #endif
  27952. @@ -329,6 +328,12 @@
  27953. # endif
  27954. #endif
  27955. +#if 0 /*defined __USE_XOPEN2K8 && defined __UCLIBC_HAS_XLOCALE__*/
  27956. +/* Translate error number to string according to the locale L. */
  27957. +extern char *strerror_l (int __errnum, __locale_t __l) __THROW;
  27958. +#endif
  27959. +
  27960. +
  27961. /* We define this function always since `bzero' is sometimes needed when
  27962. the namespace rules does not allow this. */
  27963. #if 0 /* uClibc: disabled */
  27964. @@ -338,22 +343,22 @@
  27965. #ifdef __USE_BSD
  27966. # ifdef __UCLIBC_SUSV3_LEGACY__
  27967. /* Copy N bytes of SRC to DEST (like memmove, but args reversed). */
  27968. -extern void bcopy (__const void *__src, void *__dest, size_t __n)
  27969. +extern void bcopy (const void *__src, void *__dest, size_t __n)
  27970. __THROW __nonnull ((1, 2));
  27971. /* Set N bytes of S to 0. */
  27972. extern void bzero (void *__s, size_t __n) __THROW __nonnull ((1));
  27973. /* Compare N bytes of S1 and S2 (same as memcmp). */
  27974. -extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
  27975. +extern int bcmp (const void *__s1, const void *__s2, size_t __n)
  27976. __THROW __attribute_pure__ __nonnull ((1, 2));
  27977. /* Find the first occurrence of C in S (same as strchr). */
  27978. -extern char *index (__const char *__s, int __c)
  27979. +extern char *index (const char *__s, int __c)
  27980. __THROW __attribute_pure__ __nonnull ((1));
  27981. /* Find the last occurrence of C in S (same as strrchr). */
  27982. -extern char *rindex (__const char *__s, int __c)
  27983. +extern char *rindex (const char *__s, int __c)
  27984. __THROW __attribute_pure__ __nonnull ((1));
  27985. # else
  27986. # ifdef __UCLIBC_SUSV3_LEGACY_MACROS__
  27987. @@ -385,25 +390,25 @@
  27988. # endif
  27989. /* Compare S1 and S2, ignoring case. */
  27990. -extern int strcasecmp (__const char *__s1, __const char *__s2)
  27991. +extern int strcasecmp (const char *__s1, const char *__s2)
  27992. __THROW __attribute_pure__ __nonnull ((1, 2));
  27993. libc_hidden_proto(strcasecmp)
  27994. /* Compare no more than N chars of S1 and S2, ignoring case. */
  27995. -extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
  27996. +extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)
  27997. __THROW __attribute_pure__ __nonnull ((1, 2));
  27998. libc_hidden_proto(strncasecmp)
  27999. #endif /* Use BSD. */
  28000. -#if defined __USE_GNU && defined __UCLIBC_HAS_XLOCALE__
  28001. +#if defined __USE_XOPEN2K8 && defined __UCLIBC_HAS_XLOCALE__
  28002. /* Again versions of a few functions which use the given locale instead
  28003. of the global one. */
  28004. -extern int strcasecmp_l (__const char *__s1, __const char *__s2,
  28005. +extern int strcasecmp_l (const char *__s1, const char *__s2,
  28006. __locale_t __loc)
  28007. __THROW __attribute_pure__ __nonnull ((1, 2, 3));
  28008. libc_hidden_proto(strcasecmp_l)
  28009. -extern int strncasecmp_l (__const char *__s1, __const char *__s2,
  28010. +extern int strncasecmp_l (const char *__s1, const char *__s2,
  28011. size_t __n, __locale_t __loc)
  28012. __THROW __attribute_pure__ __nonnull ((1, 2, 4));
  28013. libc_hidden_proto(strncasecmp_l)
  28014. @@ -413,27 +418,22 @@
  28015. /* Return the next DELIM-delimited token from *STRINGP,
  28016. terminating it with a '\0', and update *STRINGP to point past it. */
  28017. extern char *strsep (char **__restrict __stringp,
  28018. - __const char *__restrict __delim)
  28019. + const char *__restrict __delim)
  28020. __THROW __nonnull ((1, 2));
  28021. libc_hidden_proto(strsep)
  28022. #endif
  28023. -#ifdef __USE_GNU
  28024. -/* Compare S1 and S2 as strings holding name & indices/version numbers. */
  28025. -extern int strverscmp (__const char *__s1, __const char *__s2)
  28026. - __THROW __attribute_pure__ __nonnull ((1, 2));
  28027. -libc_hidden_proto(strverscmp)
  28028. -
  28029. +#ifdef __USE_XOPEN2K8
  28030. /* Return a string describing the meaning of the signal number in SIG. */
  28031. extern char *strsignal (int __sig) __THROW;
  28032. libc_hidden_proto(strsignal)
  28033. /* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */
  28034. # if 0 /* uClibc: disabled */
  28035. -extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
  28036. +extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)
  28037. __THROW __nonnull ((1, 2));
  28038. # endif
  28039. -extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
  28040. +extern char *stpcpy (char *__restrict __dest, const char *__restrict __src)
  28041. __THROW __nonnull ((1, 2));
  28042. libc_hidden_proto(stpcpy)
  28043. @@ -441,12 +441,19 @@
  28044. the last character written into DEST. */
  28045. # if 0 /* uClibc: disabled */
  28046. extern char *__stpncpy (char *__restrict __dest,
  28047. - __const char *__restrict __src, size_t __n)
  28048. + const char *__restrict __src, size_t __n)
  28049. __THROW __nonnull ((1, 2));
  28050. # endif
  28051. extern char *stpncpy (char *__restrict __dest,
  28052. - __const char *__restrict __src, size_t __n)
  28053. + const char *__restrict __src, size_t __n)
  28054. __THROW __nonnull ((1, 2));
  28055. +#endif
  28056. +
  28057. +#ifdef __USE_GNU
  28058. +/* Compare S1 and S2 as strings holding name & indices/version numbers. */
  28059. +extern int strverscmp (const char *__s1, const char *__s2)
  28060. + __THROW __attribute_pure__ __nonnull ((1, 2));
  28061. +libc_hidden_proto(strverscmp)
  28062. # if 0 /* uClibc does not support strfry or memfrob. */
  28063. /* Sautee STRING briskly. */
  28064. @@ -461,8 +468,7 @@
  28065. declare the function if the `basename' macro is available (defined
  28066. in <libgen.h>) which makes the XPG version of this function
  28067. available. */
  28068. -extern char *basename (__const char *__filename) __THROW __nonnull ((1));
  28069. -libc_hidden_proto(basename)
  28070. +extern char *basename (const char *__filename) __THROW __nonnull ((1));
  28071. # endif
  28072. #endif /* __USE_GNU */
  28073. diff -Nur uClibc-0.9.33.2/include/strings.h uClibc-git/include/strings.h
  28074. --- uClibc-0.9.33.2/include/strings.h 2012-05-15 09:20:09.000000000 +0200
  28075. +++ uClibc-git/include/strings.h 2014-07-25 20:36:05.165326090 +0200
  28076. @@ -1,4 +1,4 @@
  28077. -/* Copyright (C) 1991,92,96,97,99,2000,2001 Free Software Foundation, Inc.
  28078. +/* Copyright (C) 1991,92,96,97,99,2000,2001,2009 Free Software Foundation, Inc.
  28079. This file is part of the GNU C Library.
  28080. The GNU C Library is free software; you can redistribute it and/or
  28081. @@ -12,9 +12,8 @@
  28082. Lesser General Public License for more details.
  28083. You should have received a copy of the GNU Lesser General Public
  28084. - License along with the GNU C Library; if not, write to the Free
  28085. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28086. - 02111-1307 USA. */
  28087. + License along with the GNU C Library; if not, see
  28088. + <http://www.gnu.org/licenses/>. */
  28089. #ifndef _STRINGS_H
  28090. #define _STRINGS_H 1
  28091. @@ -35,22 +34,22 @@
  28092. # ifdef __UCLIBC_SUSV3_LEGACY__
  28093. /* Copy N bytes of SRC to DEST (like memmove, but args reversed). */
  28094. -extern void bcopy (__const void *__src, void *__dest, size_t __n)
  28095. +extern void bcopy (const void *__src, void *__dest, size_t __n)
  28096. __THROW __nonnull ((1, 2));
  28097. /* Set N bytes of S to 0. */
  28098. extern void bzero (void *__s, size_t __n) __THROW __nonnull ((1));
  28099. /* Compare N bytes of S1 and S2 (same as memcmp). */
  28100. -extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
  28101. +extern int bcmp (const void *__s1, const void *__s2, size_t __n)
  28102. __THROW __attribute_pure__ __nonnull ((1, 2));
  28103. /* Find the first occurrence of C in S (same as strchr). */
  28104. -extern char *index (__const char *__s, int __c)
  28105. +extern char *index (const char *__s, int __c)
  28106. __THROW __attribute_pure__ __nonnull ((1));
  28107. /* Find the last occurrence of C in S (same as strrchr). */
  28108. -extern char *rindex (__const char *__s, int __c)
  28109. +extern char *rindex (const char *__s, int __c)
  28110. __THROW __attribute_pure__ __nonnull ((1));
  28111. # else
  28112. # ifdef __UCLIBC_SUSV3_LEGACY_MACROS__
  28113. @@ -69,10 +68,11 @@
  28114. /* Return the position of the first bit set in I, or 0 if none are set.
  28115. The least-significant bit is position 1, the most-significant 32. */
  28116. extern int ffs (int __i) __THROW __attribute__ ((__const__));
  28117. +libc_hidden_proto(ffs)
  28118. /* The following two functions are non-standard but necessary for non-32 bit
  28119. platforms. */
  28120. -#if 0 /*def __USE_GNU*/
  28121. +# ifdef __USE_GNU
  28122. extern int ffsl (long int __l) __THROW __attribute__ ((__const__));
  28123. # ifdef __GNUC__
  28124. __extension__ extern int ffsll (long long int __ll)
  28125. @@ -81,17 +81,39 @@
  28126. # endif
  28127. /* Compare S1 and S2, ignoring case. */
  28128. -extern int strcasecmp (__const char *__s1, __const char *__s2)
  28129. +extern int strcasecmp (const char *__s1, const char *__s2)
  28130. __THROW __attribute_pure__ __nonnull ((1, 2));
  28131. +libc_hidden_proto(strcasecmp)
  28132. /* Compare no more than N chars of S1 and S2, ignoring case. */
  28133. -extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
  28134. +extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)
  28135. __THROW __attribute_pure__ __nonnull ((1, 2));
  28136. +libc_hidden_proto(strncasecmp)
  28137. +#if defined __USE_XOPEN2K8 && defined __UCLIBC_HAS_XLOCALE__
  28138. +/* The following functions are equivalent to the both above but they
  28139. + take the locale they use for the collation as an extra argument.
  28140. + This is not standardsized but something like will come. */
  28141. +# include <xlocale.h>
  28142. +
  28143. +/* Again versions of a few functions which use the given locale instead
  28144. + of the global one. */
  28145. +extern int strcasecmp_l (const char *__s1, const char *__s2,
  28146. + __locale_t __loc)
  28147. + __THROW __attribute_pure__ __nonnull ((1, 2, 3));
  28148. +libc_hidden_proto(strcasecmp_l)
  28149. +
  28150. +extern int strncasecmp_l (const char *__s1, const char *__s2,
  28151. + size_t __n, __locale_t __loc)
  28152. + __THROW __attribute_pure__ __nonnull ((1, 2, 4));
  28153. +libc_hidden_proto(strncasecmp_l)
  28154. +#endif
  28155. __END_DECLS
  28156. #ifdef _LIBC
  28157. +/* comment is wrong and will face this, when HAS_GNU option will be added
  28158. + * header is SuSv standard */
  28159. #error "<strings.h> should not be included from libc."
  28160. #endif
  28161. diff -Nur uClibc-0.9.33.2/include/sys/cdefs.h uClibc-git/include/sys/cdefs.h
  28162. --- uClibc-0.9.33.2/include/sys/cdefs.h 2012-05-15 09:20:09.000000000 +0200
  28163. +++ uClibc-git/include/sys/cdefs.h 2014-07-25 20:36:05.177326154 +0200
  28164. @@ -13,9 +13,8 @@
  28165. Lesser General Public License for more details.
  28166. You should have received a copy of the GNU Lesser General Public
  28167. - License along with the GNU C Library; if not, write to the Free
  28168. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28169. - 02111-1307 USA. */
  28170. + License along with the GNU C Library; if not, see
  28171. + <http://www.gnu.org/licenses/>. */
  28172. #ifndef _SYS_CDEFS_H
  28173. #define _SYS_CDEFS_H 1
  28174. @@ -63,10 +62,6 @@
  28175. # define __THROW
  28176. # define __NTH(fct) fct
  28177. -# define __const const
  28178. -# define __signed signed
  28179. -# define __volatile volatile
  28180. -
  28181. #endif /* GCC. */
  28182. /* These two macros are not used in glibc anymore. They are kept here
  28183. diff -Nur uClibc-0.9.33.2/include/sys/dir.h uClibc-git/include/sys/dir.h
  28184. --- uClibc-0.9.33.2/include/sys/dir.h 2012-05-15 09:20:09.000000000 +0200
  28185. +++ uClibc-git/include/sys/dir.h 2014-07-25 20:36:05.177326154 +0200
  28186. @@ -12,9 +12,8 @@
  28187. Lesser General Public License for more details.
  28188. You should have received a copy of the GNU Lesser General Public
  28189. - License along with the GNU C Library; if not, write to the Free
  28190. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28191. - 02111-1307 USA. */
  28192. + License along with the GNU C Library; if not, see
  28193. + <http://www.gnu.org/licenses/>. */
  28194. #ifndef _SYS_DIR_H
  28195. #define _SYS_DIR_H 1
  28196. diff -Nur uClibc-0.9.33.2/include/sys/file.h uClibc-git/include/sys/file.h
  28197. --- uClibc-0.9.33.2/include/sys/file.h 2012-05-15 09:20:09.000000000 +0200
  28198. +++ uClibc-git/include/sys/file.h 2014-07-25 20:36:05.177326154 +0200
  28199. @@ -12,9 +12,8 @@
  28200. Lesser General Public License for more details.
  28201. You should have received a copy of the GNU Lesser General Public
  28202. - License along with the GNU C Library; if not, write to the Free
  28203. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28204. - 02111-1307 USA. */
  28205. + License along with the GNU C Library; if not, see
  28206. + <http://www.gnu.org/licenses/>. */
  28207. #ifndef _SYS_FILE_H
  28208. #define _SYS_FILE_H 1
  28209. diff -Nur uClibc-0.9.33.2/include/sys/fsuid.h uClibc-git/include/sys/fsuid.h
  28210. --- uClibc-0.9.33.2/include/sys/fsuid.h 2012-05-15 09:20:09.000000000 +0200
  28211. +++ uClibc-git/include/sys/fsuid.h 2014-07-25 20:36:05.177326154 +0200
  28212. @@ -12,9 +12,8 @@
  28213. Lesser General Public License for more details.
  28214. You should have received a copy of the GNU Lesser General Public
  28215. - License along with the GNU C Library; if not, write to the Free
  28216. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28217. - 02111-1307 USA. */
  28218. + License along with the GNU C Library; if not, see
  28219. + <http://www.gnu.org/licenses/>. */
  28220. #ifndef _SYS_FSUID_H
  28221. #define _SYS_FSUID_H 1
  28222. diff -Nur uClibc-0.9.33.2/include/sys/ioctl.h uClibc-git/include/sys/ioctl.h
  28223. --- uClibc-0.9.33.2/include/sys/ioctl.h 2012-05-15 09:20:09.000000000 +0200
  28224. +++ uClibc-git/include/sys/ioctl.h 2014-07-25 20:36:05.177326154 +0200
  28225. @@ -12,9 +12,8 @@
  28226. Lesser General Public License for more details.
  28227. You should have received a copy of the GNU Lesser General Public
  28228. - License along with the GNU C Library; if not, write to the Free
  28229. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28230. - 02111-1307 USA. */
  28231. + License along with the GNU C Library; if not, see
  28232. + <http://www.gnu.org/licenses/>. */
  28233. #ifndef _SYS_IOCTL_H
  28234. #define _SYS_IOCTL_H 1
  28235. diff -Nur uClibc-0.9.33.2/include/sys/ipc.h uClibc-git/include/sys/ipc.h
  28236. --- uClibc-0.9.33.2/include/sys/ipc.h 2012-05-15 09:20:09.000000000 +0200
  28237. +++ uClibc-git/include/sys/ipc.h 2014-07-25 20:36:05.177326154 +0200
  28238. @@ -12,9 +12,8 @@
  28239. Lesser General Public License for more details.
  28240. You should have received a copy of the GNU Lesser General Public
  28241. - License along with the GNU C Library; if not, write to the Free
  28242. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28243. - 02111-1307 USA. */
  28244. + License along with the GNU C Library; if not, see
  28245. + <http://www.gnu.org/licenses/>. */
  28246. #ifndef _SYS_IPC_H
  28247. #define _SYS_IPC_H 1
  28248. @@ -51,7 +50,7 @@
  28249. __BEGIN_DECLS
  28250. /* Generates key for System V style IPC. */
  28251. -extern key_t ftok (__const char *__pathname, int __proj_id) __THROW;
  28252. +extern key_t ftok (const char *__pathname, int __proj_id) __THROW;
  28253. __END_DECLS
  28254. diff -Nur uClibc-0.9.33.2/include/sys/kdaemon.h uClibc-git/include/sys/kdaemon.h
  28255. --- uClibc-0.9.33.2/include/sys/kdaemon.h 2012-05-15 09:20:09.000000000 +0200
  28256. +++ uClibc-git/include/sys/kdaemon.h 2014-07-25 20:36:05.177326154 +0200
  28257. @@ -12,9 +12,8 @@
  28258. Lesser General Public License for more details.
  28259. You should have received a copy of the GNU Lesser General Public
  28260. - License along with the GNU C Library; if not, write to the Free
  28261. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28262. - 02111-1307 USA. */
  28263. + License along with the GNU C Library; if not, see
  28264. + <http://www.gnu.org/licenses/>. */
  28265. /* Interfaces to control the various kernel daemons. */
  28266. diff -Nur uClibc-0.9.33.2/include/sys/kd.h uClibc-git/include/sys/kd.h
  28267. --- uClibc-0.9.33.2/include/sys/kd.h 2012-05-15 09:20:09.000000000 +0200
  28268. +++ uClibc-git/include/sys/kd.h 2014-07-25 20:36:05.177326154 +0200
  28269. @@ -12,9 +12,8 @@
  28270. Lesser General Public License for more details.
  28271. You should have received a copy of the GNU Lesser General Public
  28272. - License along with the GNU C Library; if not, write to the Free
  28273. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28274. - 02111-1307 USA. */
  28275. + License along with the GNU C Library; if not, see
  28276. + <http://www.gnu.org/licenses/>. */
  28277. #ifndef _SYS_KD_H
  28278. #define _SYS_KD_H 1
  28279. diff -Nur uClibc-0.9.33.2/include/sys/klog.h uClibc-git/include/sys/klog.h
  28280. --- uClibc-0.9.33.2/include/sys/klog.h 2012-05-15 09:20:09.000000000 +0200
  28281. +++ uClibc-git/include/sys/klog.h 2014-07-25 20:36:05.177326154 +0200
  28282. @@ -12,9 +12,8 @@
  28283. Lesser General Public License for more details.
  28284. You should have received a copy of the GNU Lesser General Public
  28285. - License along with the GNU C Library; if not, write to the Free
  28286. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28287. - 02111-1307 USA. */
  28288. + License along with the GNU C Library; if not, see
  28289. + <http://www.gnu.org/licenses/>. */
  28290. #ifndef _SYS_KLOG_H
  28291. diff -Nur uClibc-0.9.33.2/include/sys/mman.h uClibc-git/include/sys/mman.h
  28292. --- uClibc-0.9.33.2/include/sys/mman.h 2012-05-15 09:20:09.000000000 +0200
  28293. +++ uClibc-git/include/sys/mman.h 2014-07-25 20:36:05.177326154 +0200
  28294. @@ -13,9 +13,8 @@
  28295. Lesser General Public License for more details.
  28296. You should have received a copy of the GNU Lesser General Public
  28297. - License along with the GNU C Library; if not, write to the Free
  28298. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28299. - 02111-1307 USA. */
  28300. + License along with the GNU C Library; if not, see
  28301. + <http://www.gnu.org/licenses/>. */
  28302. #ifndef _SYS_MMAN_H
  28303. #define _SYS_MMAN_H 1
  28304. @@ -115,10 +114,10 @@
  28305. /* Guarantee all whole pages mapped by the range [ADDR,ADDR+LEN) to
  28306. be memory resident. */
  28307. -extern int mlock (__const void *__addr, size_t __len) __THROW;
  28308. +extern int mlock (const void *__addr, size_t __len) __THROW;
  28309. /* Unlock whole pages previously mapped by the range [ADDR,ADDR+LEN). */
  28310. -extern int munlock (__const void *__addr, size_t __len) __THROW;
  28311. +extern int munlock (const void *__addr, size_t __len) __THROW;
  28312. /* Cause all currently mapped pages of the process to be memory resident
  28313. until unlocked by a call to the `munlockall', until the process exits,
  28314. @@ -133,8 +132,8 @@
  28315. /* On no-mmu systems, memory cannot be swapped out, so
  28316. * these functions will always succeed. */
  28317. -static __inline__ int mlock (__const void *__addr, size_t __len) { return 0; }
  28318. -static __inline__ int munlock (__const void *__addr, size_t __len) { return 0; }
  28319. +static __inline__ int mlock (const void *__addr, size_t __len) { return 0; }
  28320. +static __inline__ int munlock (const void *__addr, size_t __len) { return 0; }
  28321. static __inline__ int mlockall (int __flags) { return 0; }
  28322. static __inline__ int munlockall (void) { return 0; }
  28323. #endif
  28324. @@ -170,10 +169,10 @@
  28325. /* Open shared memory segment. */
  28326. -extern int shm_open (__const char *__name, int __oflag, mode_t __mode);
  28327. +extern int shm_open (const char *__name, int __oflag, mode_t __mode);
  28328. /* Remove shared memory segment. */
  28329. -extern int shm_unlink (__const char *__name);
  28330. +extern int shm_unlink (const char *__name);
  28331. __END_DECLS
  28332. diff -Nur uClibc-0.9.33.2/include/sys/mount.h uClibc-git/include/sys/mount.h
  28333. --- uClibc-0.9.33.2/include/sys/mount.h 2012-05-15 09:20:09.000000000 +0200
  28334. +++ uClibc-git/include/sys/mount.h 2014-07-25 20:36:05.177326154 +0200
  28335. @@ -1,5 +1,5 @@
  28336. /* Header file for mounting/unmount Linux filesystems.
  28337. - Copyright (C) 1996,1997,1998,1999,2000,2004 Free Software Foundation, Inc.
  28338. + Copyright (C) 1996-2000, 2004, 2010, 2012 Free Software Foundation, Inc.
  28339. This file is part of the GNU C Library.
  28340. The GNU C Library is free software; you can redistribute it and/or
  28341. @@ -13,9 +13,8 @@
  28342. Lesser General Public License for more details.
  28343. You should have received a copy of the GNU Lesser General Public
  28344. - License along with the GNU C Library; if not, write to the Free
  28345. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28346. - 02111-1307 USA. */
  28347. + License along with the GNU C Library; if not, see
  28348. + <http://www.gnu.org/licenses/>. */
  28349. /* This is taken from /usr/include/linux/fs.h. */
  28350. @@ -47,23 +46,46 @@
  28351. #define MS_REMOUNT MS_REMOUNT
  28352. MS_MANDLOCK = 64, /* Allow mandatory locks on an FS. */
  28353. #define MS_MANDLOCK MS_MANDLOCK
  28354. - S_WRITE = 128, /* Write on file/directory/symlink. */
  28355. -#define S_WRITE S_WRITE
  28356. - S_APPEND = 256, /* Append-only file. */
  28357. -#define S_APPEND S_APPEND
  28358. - S_IMMUTABLE = 512, /* Immutable file. */
  28359. -#define S_IMMUTABLE S_IMMUTABLE
  28360. + MS_DIRSYNC = 128, /* Directory modifications are synchronous. */
  28361. +#define MS_DIRSYNC MS_DIRSYNC
  28362. MS_NOATIME = 1024, /* Do not update access times. */
  28363. #define MS_NOATIME MS_NOATIME
  28364. MS_NODIRATIME = 2048, /* Do not update directory access times. */
  28365. #define MS_NODIRATIME MS_NODIRATIME
  28366. MS_BIND = 4096, /* Bind directory at different place. */
  28367. #define MS_BIND MS_BIND
  28368. + MS_MOVE = 8192,
  28369. +#define MS_MOVE MS_MOVE
  28370. + MS_REC = 16384,
  28371. +#define MS_REC MS_REC
  28372. + MS_SILENT = 32768,
  28373. +#define MS_SILENT MS_SILENT
  28374. + MS_POSIXACL = 1 << 16, /* VFS does not apply the umask. */
  28375. +#define MS_POSIXACL MS_POSIXACL
  28376. + MS_UNBINDABLE = 1 << 17, /* Change to unbindable. */
  28377. +#define MS_UNBINDABLE MS_UNBINDABLE
  28378. + MS_PRIVATE = 1 << 18, /* Change to private. */
  28379. +#define MS_PRIVATE MS_PRIVATE
  28380. + MS_SLAVE = 1 << 19, /* Change to slave. */
  28381. +#define MS_SLAVE MS_SLAVE
  28382. + MS_SHARED = 1 << 20, /* Change to shared. */
  28383. +#define MS_SHARED MS_SHARED
  28384. + MS_RELATIME = 1 << 21, /* Update atime relative to mtime/ctime. */
  28385. +#define MS_RELATIME MS_RELATIME
  28386. + MS_KERNMOUNT = 1 << 22, /* This is a kern_mount call. */
  28387. +#define MS_KERNMOUNT MS_KERNMOUNT
  28388. + MS_I_VERSION = 1 << 23, /* Update inode I_version field. */
  28389. +#define MS_I_VERSION MS_I_VERSION
  28390. + MS_STRICTATIME = 1 << 24, /* Always perform atime updates. */
  28391. +#define MS_STRICTATIME MS_STRICTATIME
  28392. + MS_ACTIVE = 1 << 30,
  28393. +#define MS_ACTIVE MS_ACTIVE
  28394. + MS_NOUSER = 1 << 31
  28395. +#define MS_NOUSER MS_NOUSER
  28396. };
  28397. /* Flags that can be altered by MS_REMOUNT */
  28398. -#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_NOATIME \
  28399. - |MS_NODIRATIME)
  28400. +#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION)
  28401. /* Magic mount flag number. Has to be or-ed to the flag values. */
  28402. @@ -100,23 +122,28 @@
  28403. #define MNT_FORCE MNT_FORCE
  28404. MNT_DETACH = 2, /* Just detach from the tree. */
  28405. #define MNT_DETACH MNT_DETACH
  28406. - MNT_EXPIRE = 4 /* Mark for expiry. */
  28407. + MNT_EXPIRE = 4, /* Mark for expiry. */
  28408. #define MNT_EXPIRE MNT_EXPIRE
  28409. + UMOUNT_NOFOLLOW = 8 /* Don't follow symlink on umount. */
  28410. +#define UMOUNT_NOFOLLOW UMOUNT_NOFOLLOW
  28411. };
  28412. __BEGIN_DECLS
  28413. /* Mount a filesystem. */
  28414. -extern int mount (__const char *__special_file, __const char *__dir,
  28415. - __const char *__fstype, unsigned long int __rwflag,
  28416. - __const void *__data) __THROW;
  28417. +extern int mount (const char *__special_file, const char *__dir,
  28418. + const char *__fstype, unsigned long int __rwflag,
  28419. + const void *__data) __THROW;
  28420. /* Unmount a filesystem. */
  28421. -extern int umount (__const char *__special_file) __THROW;
  28422. +extern int umount (const char *__special_file) __THROW;
  28423. +#ifdef __UCLIBC_LINUX_SPECIFIC__
  28424. /* Unmount a filesystem. Force unmounting if FLAGS is set to MNT_FORCE. */
  28425. -extern int umount2 (__const char *__special_file, int __flags) __THROW;
  28426. +extern int umount2 (const char *__special_file, int __flags) __THROW;
  28427. +libc_hidden_proto(umount2)
  28428. +#endif
  28429. __END_DECLS
  28430. diff -Nur uClibc-0.9.33.2/include/sys/msg.h uClibc-git/include/sys/msg.h
  28431. --- uClibc-0.9.33.2/include/sys/msg.h 2012-05-15 09:20:09.000000000 +0200
  28432. +++ uClibc-git/include/sys/msg.h 2014-07-25 20:36:05.177326154 +0200
  28433. @@ -13,9 +13,8 @@
  28434. Lesser General Public License for more details.
  28435. You should have received a copy of the GNU Lesser General Public
  28436. - License along with the GNU C Library; if not, write to the Free
  28437. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28438. - 02111-1307 USA. */
  28439. + License along with the GNU C Library; if not, see
  28440. + <http://www.gnu.org/licenses/>. */
  28441. #ifndef _SYS_MSG_H
  28442. #define _SYS_MSG_H
  28443. @@ -77,7 +76,7 @@
  28444. This function is a cancellation point and therefore not marked with
  28445. __THROW. */
  28446. -extern int msgsnd (int __msqid, __const void *__msgp, size_t __msgsz,
  28447. +extern int msgsnd (int __msqid, const void *__msgp, size_t __msgsz,
  28448. int __msgflg);
  28449. __END_DECLS
  28450. diff -Nur uClibc-0.9.33.2/include/sys/mtio.h uClibc-git/include/sys/mtio.h
  28451. --- uClibc-0.9.33.2/include/sys/mtio.h 2012-05-15 09:20:09.000000000 +0200
  28452. +++ uClibc-git/include/sys/mtio.h 2014-07-25 20:36:05.177326154 +0200
  28453. @@ -13,9 +13,8 @@
  28454. Lesser General Public License for more details.
  28455. You should have received a copy of the GNU Lesser General Public
  28456. - License along with the GNU C Library; if not, write to the Free
  28457. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28458. - 02111-1307 USA. */
  28459. + License along with the GNU C Library; if not, see
  28460. + <http://www.gnu.org/licenses/>. */
  28461. /* Written by H. Bergman <hennus@cybercomm.nl>. */
  28462. diff -Nur uClibc-0.9.33.2/include/sys/param.h uClibc-git/include/sys/param.h
  28463. --- uClibc-0.9.33.2/include/sys/param.h 2012-05-15 09:20:09.000000000 +0200
  28464. +++ uClibc-git/include/sys/param.h 2014-07-25 20:36:05.177326154 +0200
  28465. @@ -12,9 +12,8 @@
  28466. Lesser General Public License for more details.
  28467. You should have received a copy of the GNU Lesser General Public
  28468. - License along with the GNU C Library; if not, write to the Free
  28469. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28470. - 02111-1307 USA. */
  28471. + License along with the GNU C Library; if not, see
  28472. + <http://www.gnu.org/licenses/>. */
  28473. #ifndef _SYS_PARAM_H
  28474. #define _SYS_PARAM_H 1
  28475. diff -Nur uClibc-0.9.33.2/include/sys/personality.h uClibc-git/include/sys/personality.h
  28476. --- uClibc-0.9.33.2/include/sys/personality.h 2012-05-15 09:20:09.000000000 +0200
  28477. +++ uClibc-git/include/sys/personality.h 2014-07-25 20:36:05.177326154 +0200
  28478. @@ -12,9 +12,8 @@
  28479. Lesser General Public License for more details.
  28480. You should have received a copy of the GNU Lesser General Public
  28481. - License along with the GNU C Library; if not, write to the Free
  28482. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28483. - 02111-1307 USA. */
  28484. + License along with the GNU C Library; if not, see
  28485. + <http://www.gnu.org/licenses/>. */
  28486. /* Taken verbatim from Linux 2.4 (include/linux/personality.h). */
  28487. diff -Nur uClibc-0.9.33.2/include/sys/poll.h uClibc-git/include/sys/poll.h
  28488. --- uClibc-0.9.33.2/include/sys/poll.h 2012-05-15 09:20:09.000000000 +0200
  28489. +++ uClibc-git/include/sys/poll.h 2014-07-25 20:36:05.181326174 +0200
  28490. @@ -13,9 +13,8 @@
  28491. Lesser General Public License for more details.
  28492. You should have received a copy of the GNU Lesser General Public
  28493. - License along with the GNU C Library; if not, write to the Free
  28494. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28495. - 02111-1307 USA. */
  28496. + License along with the GNU C Library; if not, see
  28497. + <http://www.gnu.org/licenses/>. */
  28498. #ifndef _SYS_POLL_H
  28499. #define _SYS_POLL_H 1
  28500. @@ -66,9 +65,8 @@
  28501. This function is a cancellation point and therefore not marked with
  28502. __THROW. */
  28503. extern int ppoll (struct pollfd *__fds, nfds_t __nfds,
  28504. - __const struct timespec *__timeout,
  28505. - __const __sigset_t *__ss);
  28506. -libc_hidden_proto(ppoll)
  28507. + const struct timespec *__timeout,
  28508. + const __sigset_t *__ss);
  28509. #endif
  28510. __END_DECLS
  28511. diff -Nur uClibc-0.9.33.2/include/sys/quota.h uClibc-git/include/sys/quota.h
  28512. --- uClibc-0.9.33.2/include/sys/quota.h 2012-05-15 09:20:09.000000000 +0200
  28513. +++ uClibc-git/include/sys/quota.h 2014-07-25 20:36:05.181326174 +0200
  28514. @@ -30,8 +30,6 @@
  28515. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  28516. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  28517. * SUCH DAMAGE.
  28518. - *
  28519. - * Version: $Id: quota.h,v 1.1 2002/01/03 04:00:09 andersen Exp $
  28520. */
  28521. #ifndef _SYS_QUOTA_H
  28522. @@ -40,6 +38,19 @@
  28523. #include <features.h>
  28524. #include <sys/types.h>
  28525. +#ifdef __UCLIBC__
  28526. +# undef _LINUX_QUOTA_VERSION
  28527. +# define _LINUX_QUOTA_VERSION 1
  28528. +#endif
  28529. +
  28530. +/*
  28531. + * Select between different incompatible quota versions.
  28532. + * Default to the version used by Linux kernel version 2.4.22
  28533. + * or later. */
  28534. +#ifndef _LINUX_QUOTA_VERSION
  28535. +# define _LINUX_QUOTA_VERSION 2
  28536. +#endif
  28537. +
  28538. /*
  28539. * Convert diskblocks to blocks and the other way around.
  28540. * currently only to fool the BSD source. :-)
  28541. @@ -94,21 +105,33 @@
  28542. #define SUBCMDSHIFT 8
  28543. #define QCMD(cmd, type) (((cmd) << SUBCMDSHIFT) | ((type) & SUBCMDMASK))
  28544. -#define Q_QUOTAON 0x0100 /* enable quotas */
  28545. -#define Q_QUOTAOFF 0x0200 /* disable quotas */
  28546. -#define Q_GETQUOTA 0x0300 /* get limits and usage */
  28547. -#define Q_SETQUOTA 0x0400 /* set limits and usage */
  28548. -#define Q_SETUSE 0x0500 /* set usage */
  28549. -#define Q_SYNC 0x0600 /* sync disk copy of a filesystems quotas */
  28550. -#define Q_SETQLIM 0x0700 /* set limits */
  28551. -#define Q_GETSTATS 0x0800 /* get collected stats */
  28552. -#define Q_RSQUASH 0x1000 /* set root_squash option */
  28553. +#if _LINUX_QUOTA_VERSION < 2
  28554. +# define Q_QUOTAON 0x0100 /* enable quotas */
  28555. +# define Q_QUOTAOFF 0x0200 /* disable quotas */
  28556. +# define Q_GETQUOTA 0x0300 /* get limits and usage */
  28557. +# define Q_SETQUOTA 0x0400 /* set limits and usage */
  28558. +# define Q_SETUSE 0x0500 /* set usage */
  28559. +# define Q_SYNC 0x0600 /* sync disk copy of a filesystems quotas */
  28560. +# define Q_SETQLIM 0x0700 /* set limits */
  28561. +# define Q_GETSTATS 0x0800 /* get collected stats */
  28562. +# define Q_RSQUASH 0x1000 /* set root_squash option */
  28563. +#else
  28564. +# define Q_SYNC 0x800001 /* sync disk copy of a filesystems quotas */
  28565. +# define Q_QUOTAON 0x800002 /* turn quotas on */
  28566. +# define Q_QUOTAOFF 0x800003 /* turn quotas off */
  28567. +# define Q_GETFMT 0x800004 /* get quota format used on given filesystem */
  28568. +# define Q_GETINFO 0x800005 /* get information about quota files */
  28569. +# define Q_SETINFO 0x800006 /* set information about quota files */
  28570. +# define Q_GETQUOTA 0x800007 /* get user quota structure */
  28571. +# define Q_SETQUOTA 0x800008 /* set user quota structure */
  28572. +#endif
  28573. /*
  28574. * The following structure defines the format of the disk quota file
  28575. * (as it appears on disk) - the file is an array of these structures
  28576. * indexed by user or group number.
  28577. */
  28578. +#if _LINUX_QUOTA_VERSION < 2
  28579. struct dqblk
  28580. {
  28581. u_int32_t dqb_bhardlimit; /* absolute limit on disk blks alloc */
  28582. @@ -120,13 +143,45 @@
  28583. time_t dqb_btime; /* time limit for excessive disk use */
  28584. time_t dqb_itime; /* time limit for excessive files */
  28585. };
  28586. +#else
  28587. +
  28588. +/* Flags that indicate which fields in dqblk structure are valid. */
  28589. +#define QIF_BLIMITS 1
  28590. +#define QIF_SPACE 2
  28591. +#define QIF_ILIMITS 4
  28592. +#define QIF_INODES 8
  28593. +#define QIF_BTIME 16
  28594. +#define QIF_ITIME 32
  28595. +#define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS)
  28596. +#define QIF_USAGE (QIF_SPACE | QIF_INODES)
  28597. +#define QIF_TIMES (QIF_BTIME | QIF_ITIME)
  28598. +#define QIF_ALL (QIF_LIMITS | QIF_USAGE | QIF_TIMES)
  28599. +
  28600. +struct dqblk
  28601. + {
  28602. + u_int64_t dqb_bhardlimit; /* absolute limit on disk quota blocks alloc */
  28603. + u_int64_t dqb_bsoftlimit; /* preferred limit on disk quota blocks */
  28604. + u_int64_t dqb_curspace; /* current quota block count */
  28605. + u_int64_t dqb_ihardlimit; /* maximum # allocated inodes */
  28606. + u_int64_t dqb_isoftlimit; /* preferred inode limit */
  28607. + u_int64_t dqb_curinodes; /* current # allocated inodes */
  28608. + u_int64_t dqb_btime; /* time limit for excessive disk use */
  28609. + u_int64_t dqb_itime; /* time limit for excessive files */
  28610. + u_int32_t dqb_valid; /* bitmask of QIF_* constants */
  28611. + };
  28612. +#endif
  28613. /*
  28614. * Shorthand notation.
  28615. */
  28616. #define dq_bhardlimit dq_dqb.dqb_bhardlimit
  28617. #define dq_bsoftlimit dq_dqb.dqb_bsoftlimit
  28618. -#define dq_curblocks dq_dqb.dqb_curblocks
  28619. +#if _LINUX_QUOTA_VERSION < 2
  28620. +# define dq_curblocks dq_dqb.dqb_curblocks
  28621. +#else
  28622. +# define dq_curspace dq_dqb.dqb_curspace
  28623. +# define dq_valid dq_dqb.dqb_valid
  28624. +#endif
  28625. #define dq_ihardlimit dq_dqb.dqb_ihardlimit
  28626. #define dq_isoftlimit dq_dqb.dqb_isoftlimit
  28627. #define dq_curinodes dq_dqb.dqb_curinodes
  28628. @@ -135,6 +190,7 @@
  28629. #define dqoff(UID) ((loff_t)((UID) * sizeof (struct dqblk)))
  28630. +#if _LINUX_QUOTA_VERSION < 2
  28631. struct dqstats
  28632. {
  28633. u_int32_t lookups;
  28634. @@ -147,6 +203,22 @@
  28635. u_int32_t free_dquots;
  28636. u_int32_t syncs;
  28637. };
  28638. +#else
  28639. +
  28640. +/* Flags that indicate which fields in dqinfo structure are valid. */
  28641. +# define IIF_BGRACE 1
  28642. +# define IIF_IGRACE 2
  28643. +# define IIF_FLAGS 4
  28644. +# define IIF_ALL (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)
  28645. +
  28646. +struct dqinfo
  28647. + {
  28648. + u_int64_t dqi_bgrace;
  28649. + u_int64_t dqi_igrace;
  28650. + u_int32_t dqi_flags;
  28651. + u_int32_t dqi_valid;
  28652. + };
  28653. +#endif
  28654. __BEGIN_DECLS
  28655. diff -Nur uClibc-0.9.33.2/include/sys/reboot.h uClibc-git/include/sys/reboot.h
  28656. --- uClibc-0.9.33.2/include/sys/reboot.h 2012-05-15 09:20:09.000000000 +0200
  28657. +++ uClibc-git/include/sys/reboot.h 2014-07-25 20:36:05.181326174 +0200
  28658. @@ -12,9 +12,8 @@
  28659. Lesser General Public License for more details.
  28660. You should have received a copy of the GNU Lesser General Public
  28661. - License along with the GNU C Library; if not, write to the Free
  28662. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28663. - 02111-1307 USA. */
  28664. + License along with the GNU C Library; if not, see
  28665. + <http://www.gnu.org/licenses/>. */
  28666. /* This file should define RB_* macros to be used as flag
  28667. bits in the argument to the `reboot' system call. */
  28668. diff -Nur uClibc-0.9.33.2/include/sys/resource.h uClibc-git/include/sys/resource.h
  28669. --- uClibc-0.9.33.2/include/sys/resource.h 2012-05-15 09:20:09.000000000 +0200
  28670. +++ uClibc-git/include/sys/resource.h 2014-07-25 20:36:05.181326174 +0200
  28671. @@ -12,9 +12,8 @@
  28672. Lesser General Public License for more details.
  28673. You should have received a copy of the GNU Lesser General Public
  28674. - License along with the GNU C Library; if not, write to the Free
  28675. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28676. - 02111-1307 USA. */
  28677. + License along with the GNU C Library; if not, see
  28678. + <http://www.gnu.org/licenses/>. */
  28679. #ifndef _SYS_RESOURCE_H
  28680. #define _SYS_RESOURCE_H 1
  28681. @@ -69,12 +68,12 @@
  28682. Return 0 if successful, -1 if not (and sets errno). */
  28683. #ifndef __USE_FILE_OFFSET64
  28684. extern int setrlimit (__rlimit_resource_t __resource,
  28685. - __const struct rlimit *__rlimits) __THROW;
  28686. + const struct rlimit *__rlimits) __THROW;
  28687. libc_hidden_proto(setrlimit)
  28688. #else
  28689. # ifdef __REDIRECT_NTH
  28690. extern int __REDIRECT_NTH (setrlimit, (__rlimit_resource_t __resource,
  28691. - __const struct rlimit *__rlimits),
  28692. + const struct rlimit *__rlimits),
  28693. setrlimit64);
  28694. # else
  28695. # define setrlimit setrlimit64
  28696. @@ -82,7 +81,7 @@
  28697. #endif
  28698. #ifdef __USE_LARGEFILE64
  28699. extern int setrlimit64 (__rlimit_resource_t __resource,
  28700. - __const struct rlimit64 *__rlimits) __THROW;
  28701. + const struct rlimit64 *__rlimits) __THROW;
  28702. #endif
  28703. /* Return resource usage information on process indicated by WHO
  28704. diff -Nur uClibc-0.9.33.2/include/sys/select.h uClibc-git/include/sys/select.h
  28705. --- uClibc-0.9.33.2/include/sys/select.h 2012-05-15 09:20:09.000000000 +0200
  28706. +++ uClibc-git/include/sys/select.h 2014-07-25 20:36:05.181326174 +0200
  28707. @@ -13,9 +13,8 @@
  28708. Lesser General Public License for more details.
  28709. You should have received a copy of the GNU Lesser General Public
  28710. - License along with the GNU C Library; if not, write to the Free
  28711. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28712. - 02111-1307 USA. */
  28713. + License along with the GNU C Library; if not, see
  28714. + <http://www.gnu.org/licenses/>. */
  28715. /* POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> */
  28716. @@ -110,7 +109,10 @@
  28717. fd_set *__restrict __writefds,
  28718. fd_set *__restrict __exceptfds,
  28719. struct timeval *__restrict __timeout);
  28720. +#ifdef _LIBC
  28721. +extern __typeof(select) __select_nocancel attribute_hidden;
  28722. libc_hidden_proto(select)
  28723. +#endif
  28724. #ifdef __USE_XOPEN2K
  28725. /* Same as above only that the TIMEOUT value is given with higher
  28726. diff -Nur uClibc-0.9.33.2/include/sys/sem.h uClibc-git/include/sys/sem.h
  28727. --- uClibc-0.9.33.2/include/sys/sem.h 2012-05-15 09:20:09.000000000 +0200
  28728. +++ uClibc-git/include/sys/sem.h 2014-07-25 20:36:05.181326174 +0200
  28729. @@ -12,9 +12,8 @@
  28730. Lesser General Public License for more details.
  28731. You should have received a copy of the GNU Lesser General Public
  28732. - License along with the GNU C Library; if not, write to the Free
  28733. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28734. - 02111-1307 USA. */
  28735. + License along with the GNU C Library; if not, see
  28736. + <http://www.gnu.org/licenses/>. */
  28737. #ifndef _SYS_SEM_H
  28738. #define _SYS_SEM_H 1
  28739. @@ -61,7 +60,7 @@
  28740. #ifdef __USE_GNU
  28741. /* Operate on semaphore with timeout. */
  28742. extern int semtimedop (int __semid, struct sembuf *__sops, size_t __nsops,
  28743. - __const struct timespec *__timeout) __THROW;
  28744. + const struct timespec *__timeout) __THROW;
  28745. #endif
  28746. __END_DECLS
  28747. diff -Nur uClibc-0.9.33.2/include/sys/sendfile.h uClibc-git/include/sys/sendfile.h
  28748. --- uClibc-0.9.33.2/include/sys/sendfile.h 2012-05-15 09:20:09.000000000 +0200
  28749. +++ uClibc-git/include/sys/sendfile.h 2014-07-25 20:36:05.181326174 +0200
  28750. @@ -13,9 +13,8 @@
  28751. Lesser General Public License for more details.
  28752. You should have received a copy of the GNU Lesser General Public
  28753. - License along with the GNU C Library; if not, write to the Free
  28754. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28755. - 02111-1307 USA. */
  28756. + License along with the GNU C Library; if not, see
  28757. + <http://www.gnu.org/licenses/>. */
  28758. #ifndef _SYS_SENDFILE_H
  28759. #define _SYS_SENDFILE_H 1
  28760. @@ -45,6 +44,7 @@
  28761. #ifdef __USE_LARGEFILE64
  28762. extern ssize_t sendfile64 (int __out_fd, int __in_fd, __off64_t *__offset,
  28763. size_t __count) __THROW;
  28764. +libc_hidden_proto(sendfile64)
  28765. #endif
  28766. __END_DECLS
  28767. diff -Nur uClibc-0.9.33.2/include/sys/shm.h uClibc-git/include/sys/shm.h
  28768. --- uClibc-0.9.33.2/include/sys/shm.h 2012-05-15 09:20:09.000000000 +0200
  28769. +++ uClibc-git/include/sys/shm.h 2014-07-25 20:36:05.181326174 +0200
  28770. @@ -12,9 +12,8 @@
  28771. Lesser General Public License for more details.
  28772. You should have received a copy of the GNU Lesser General Public
  28773. - License along with the GNU C Library; if not, write to the Free
  28774. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28775. - 02111-1307 USA. */
  28776. + License along with the GNU C Library; if not, see
  28777. + <http://www.gnu.org/licenses/>. */
  28778. #ifndef _SYS_SHM_H
  28779. #define _SYS_SHM_H 1
  28780. @@ -54,11 +53,11 @@
  28781. extern int shmget (key_t __key, size_t __size, int __shmflg) __THROW;
  28782. /* Attach shared memory segment. */
  28783. -extern void *shmat (int __shmid, __const void *__shmaddr, int __shmflg)
  28784. +extern void *shmat (int __shmid, const void *__shmaddr, int __shmflg)
  28785. __THROW;
  28786. /* Detach shared memory segment. */
  28787. -extern int shmdt (__const void *__shmaddr) __THROW;
  28788. +extern int shmdt (const void *__shmaddr) __THROW;
  28789. __END_DECLS
  28790. diff -Nur uClibc-0.9.33.2/include/sys/socket.h uClibc-git/include/sys/socket.h
  28791. --- uClibc-0.9.33.2/include/sys/socket.h 2012-05-15 09:20:09.000000000 +0200
  28792. +++ uClibc-git/include/sys/socket.h 2014-07-25 20:36:05.181326174 +0200
  28793. @@ -14,9 +14,8 @@
  28794. Lesser General Public License for more details.
  28795. You should have received a copy of the GNU Lesser General Public
  28796. - License along with the GNU C Library; if not, write to the Free
  28797. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28798. - 02111-1307 USA. */
  28799. + License along with the GNU C Library; if not, see
  28800. + <http://www.gnu.org/licenses/>. */
  28801. #ifndef _SYS_SOCKET_H
  28802. #define _SYS_SOCKET_H 1
  28803. @@ -69,7 +68,7 @@
  28804. old-style declaration, too. */
  28805. #if defined __cplusplus || !__GNUC_PREREQ (2, 7) || !defined __USE_GNU
  28806. # define __SOCKADDR_ARG struct sockaddr *__restrict
  28807. -# define __CONST_SOCKADDR_ARG __const struct sockaddr *
  28808. +# define __CONST_SOCKADDR_ARG const struct sockaddr *
  28809. #else
  28810. /* Add more `struct sockaddr_AF' types here as necessary.
  28811. These are all the ones I found on NetBSD and Linux. */
  28812. @@ -92,7 +91,7 @@
  28813. typedef union { __SOCKADDR_ALLTYPES
  28814. } __SOCKADDR_ARG __attribute__ ((__transparent_union__));
  28815. # undef __SOCKADDR_ONETYPE
  28816. -# define __SOCKADDR_ONETYPE(type) __const struct type *__restrict __##type##__;
  28817. +# define __SOCKADDR_ONETYPE(type) const struct type *__restrict __##type##__;
  28818. typedef union { __SOCKADDR_ALLTYPES
  28819. } __CONST_SOCKADDR_ARG __attribute__ ((__transparent_union__));
  28820. # undef __SOCKADDR_ONETYPE
  28821. @@ -142,7 +141,7 @@
  28822. This function is a cancellation point and therefore not marked with
  28823. __THROW. */
  28824. -extern ssize_t send (int __fd, __const void *__buf, size_t __n, int __flags);
  28825. +extern ssize_t send (int __fd, const void *__buf, size_t __n, int __flags);
  28826. libc_hidden_proto(send)
  28827. /* Read N bytes into BUF from socket FD.
  28828. @@ -158,10 +157,13 @@
  28829. This function is a cancellation point and therefore not marked with
  28830. __THROW. */
  28831. -extern ssize_t sendto (int __fd, __const void *__buf, size_t __n,
  28832. +extern ssize_t sendto (int __fd, const void *__buf, size_t __n,
  28833. int __flags, __CONST_SOCKADDR_ARG __addr,
  28834. socklen_t __addr_len);
  28835. +#ifdef _LIBC
  28836. +extern __typeof(sendto) __sendto_nocancel attribute_hidden;
  28837. libc_hidden_proto(sendto)
  28838. +#endif
  28839. /* Read N bytes into BUF through socket FD.
  28840. If ADDR is not NULL, fill in *ADDR_LEN bytes of it with tha address of
  28841. @@ -173,7 +175,10 @@
  28842. extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,
  28843. int __flags, __SOCKADDR_ARG __addr,
  28844. socklen_t *__restrict __addr_len);
  28845. +#ifdef _LIBC
  28846. +extern __typeof(recvfrom) __recvfrom_nocancel attribute_hidden;
  28847. libc_hidden_proto(recvfrom)
  28848. +#endif
  28849. /* Send a message described MESSAGE on socket FD.
  28850. @@ -181,7 +186,7 @@
  28851. This function is a cancellation point and therefore not marked with
  28852. __THROW. */
  28853. -extern ssize_t sendmsg (int __fd, __const struct msghdr *__message,
  28854. +extern ssize_t sendmsg (int __fd, const struct msghdr *__message,
  28855. int __flags);
  28856. libc_hidden_proto(sendmsg)
  28857. @@ -205,7 +210,7 @@
  28858. to *OPTVAL (which is OPTLEN bytes long).
  28859. Returns 0 on success, -1 for errors. */
  28860. extern int setsockopt (int __fd, int __level, int __optname,
  28861. - __const void *__optval, socklen_t __optlen) __THROW;
  28862. + const void *__optval, socklen_t __optlen) __THROW;
  28863. libc_hidden_proto(setsockopt)
  28864. @@ -260,4 +265,8 @@
  28865. __END_DECLS
  28866. +#ifdef _LIBC
  28867. +extern int __socketcall(int, unsigned long *) attribute_hidden;
  28868. +#endif
  28869. +
  28870. #endif /* sys/socket.h */
  28871. diff -Nur uClibc-0.9.33.2/include/sys/statfs.h uClibc-git/include/sys/statfs.h
  28872. --- uClibc-0.9.33.2/include/sys/statfs.h 2012-05-15 09:20:09.000000000 +0200
  28873. +++ uClibc-git/include/sys/statfs.h 2014-07-25 20:36:05.181326174 +0200
  28874. @@ -13,9 +13,8 @@
  28875. Lesser General Public License for more details.
  28876. You should have received a copy of the GNU Lesser General Public
  28877. - License along with the GNU C Library; if not, write to the Free
  28878. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28879. - 02111-1307 USA. */
  28880. + License along with the GNU C Library; if not, see
  28881. + <http://www.gnu.org/licenses/>. */
  28882. #ifndef _SYS_STATFS_H
  28883. #define _SYS_STATFS_H 1
  28884. @@ -29,19 +28,20 @@
  28885. /* Return information about the filesystem on which FILE resides. */
  28886. #ifndef __USE_FILE_OFFSET64
  28887. -extern int statfs (__const char *__file, struct statfs *__buf)
  28888. +extern int statfs (const char *__file, struct statfs *__buf)
  28889. __THROW __nonnull ((1, 2));
  28890. +libc_hidden_proto(statfs)
  28891. #else
  28892. # ifdef __REDIRECT_NTH
  28893. extern int __REDIRECT_NTH (statfs,
  28894. - (__const char *__file, struct statfs *__buf),
  28895. + (const char *__file, struct statfs *__buf),
  28896. statfs64) __nonnull ((1, 2));
  28897. # else
  28898. # define statfs statfs64
  28899. # endif
  28900. #endif
  28901. #ifdef __USE_LARGEFILE64
  28902. -extern int statfs64 (__const char *__file, struct statfs64 *__buf)
  28903. +extern int statfs64 (const char *__file, struct statfs64 *__buf)
  28904. __THROW __nonnull ((1, 2));
  28905. libc_hidden_proto(statfs64)
  28906. #endif
  28907. diff -Nur uClibc-0.9.33.2/include/sys/stat.h uClibc-git/include/sys/stat.h
  28908. --- uClibc-0.9.33.2/include/sys/stat.h 2012-05-15 09:20:09.000000000 +0200
  28909. +++ uClibc-git/include/sys/stat.h 2014-07-25 20:36:05.181326174 +0200
  28910. @@ -13,9 +13,8 @@
  28911. Lesser General Public License for more details.
  28912. You should have received a copy of the GNU Lesser General Public
  28913. - License along with the GNU C Library; if not, write to the Free
  28914. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  28915. - 02111-1307 USA. */
  28916. + License along with the GNU C Library; if not, see
  28917. + <http://www.gnu.org/licenses/>. */
  28918. /*
  28919. * POSIX Standard: 5.6 File Characteristics <sys/stat.h>
  28920. @@ -206,7 +205,7 @@
  28921. #ifndef __USE_FILE_OFFSET64
  28922. /* Get file attributes for FILE and put them in BUF. */
  28923. -extern int stat (__const char *__restrict __file,
  28924. +extern int stat (const char *__restrict __file,
  28925. struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
  28926. libc_hidden_proto(stat)
  28927. @@ -216,7 +215,7 @@
  28928. libc_hidden_proto(fstat)
  28929. #else
  28930. # ifdef __REDIRECT_NTH
  28931. -extern int __REDIRECT_NTH (stat, (__const char *__restrict __file,
  28932. +extern int __REDIRECT_NTH (stat, (const char *__restrict __file,
  28933. struct stat *__restrict __buf), stat64)
  28934. __nonnull ((1, 2));
  28935. extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf), fstat64)
  28936. @@ -227,7 +226,7 @@
  28937. # endif
  28938. #endif
  28939. #ifdef __USE_LARGEFILE64
  28940. -extern int stat64 (__const char *__restrict __file,
  28941. +extern int stat64 (const char *__restrict __file,
  28942. struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2));
  28943. extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
  28944. libc_hidden_proto(stat64)
  28945. @@ -239,12 +238,13 @@
  28946. Relative path names are interpreted relative to FD unless FD is
  28947. AT_FDCWD. */
  28948. # ifndef __USE_FILE_OFFSET64
  28949. -extern int fstatat (int __fd, __const char *__restrict __file,
  28950. +extern int fstatat (int __fd, const char *__restrict __file,
  28951. struct stat *__restrict __buf, int __flag)
  28952. __THROW __nonnull ((2, 3));
  28953. +libc_hidden_proto(fstatat)
  28954. # else
  28955. # ifdef __REDIRECT_NTH
  28956. -extern int __REDIRECT_NTH (fstatat, (int __fd, __const char *__restrict __file,
  28957. +extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
  28958. struct stat *__restrict __buf,
  28959. int __flag),
  28960. fstatat64) __nonnull ((2, 3));
  28961. @@ -254,9 +254,10 @@
  28962. # endif
  28963. # ifdef __USE_LARGEFILE64
  28964. -extern int fstatat64 (int __fd, __const char *__restrict __file,
  28965. +extern int fstatat64 (int __fd, const char *__restrict __file,
  28966. struct stat64 *__restrict __buf, int __flag)
  28967. __THROW __nonnull ((2, 3));
  28968. +libc_hidden_proto(fstatat64)
  28969. # endif
  28970. #endif
  28971. @@ -264,13 +265,13 @@
  28972. # ifndef __USE_FILE_OFFSET64
  28973. /* Get file attributes about FILE and put them in BUF.
  28974. If FILE is a symbolic link, do not follow it. */
  28975. -extern int lstat (__const char *__restrict __file,
  28976. +extern int lstat (const char *__restrict __file,
  28977. struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
  28978. libc_hidden_proto(lstat)
  28979. # else
  28980. # ifdef __REDIRECT_NTH
  28981. extern int __REDIRECT_NTH (lstat,
  28982. - (__const char *__restrict __file,
  28983. + (const char *__restrict __file,
  28984. struct stat *__restrict __buf), lstat64)
  28985. __nonnull ((1, 2));
  28986. # else
  28987. @@ -278,7 +279,7 @@
  28988. # endif
  28989. # endif
  28990. # ifdef __USE_LARGEFILE64
  28991. -extern int lstat64 (__const char *__restrict __file,
  28992. +extern int lstat64 (const char *__restrict __file,
  28993. struct stat64 *__restrict __buf)
  28994. __THROW __nonnull ((1, 2));
  28995. libc_hidden_proto(lstat64)
  28996. @@ -287,7 +288,7 @@
  28997. /* Set file access permissions for FILE to MODE.
  28998. If FILE is a symbolic link, this affects its target instead. */
  28999. -extern int chmod (__const char *__file, __mode_t __mode)
  29000. +extern int chmod (const char *__file, __mode_t __mode)
  29001. __THROW __nonnull ((1));
  29002. libc_hidden_proto(chmod)
  29003. @@ -295,7 +296,7 @@
  29004. /* Set file access permissions for FILE to MODE.
  29005. If FILE is a symbolic link, this affects the link itself
  29006. rather than its target. */
  29007. -extern int lchmod (__const char *__file, __mode_t __mode)
  29008. +extern int lchmod (const char *__file, __mode_t __mode)
  29009. __THROW __nonnull ((1));
  29010. #endif
  29011. @@ -307,9 +308,10 @@
  29012. #ifdef __USE_ATFILE
  29013. /* Set file access permissions of FILE relative to
  29014. the directory FD is open on. */
  29015. -extern int fchmodat (int __fd, __const char *__file, __mode_t __mode,
  29016. +extern int fchmodat (int __fd, const char *__file, __mode_t __mode,
  29017. int __flag)
  29018. __THROW __nonnull ((2)) __wur;
  29019. +libc_hidden_proto(fchmodat)
  29020. #endif /* Use ATFILE. */
  29021. @@ -325,7 +327,7 @@
  29022. #endif
  29023. /* Create a new directory named PATH, with permission bits MODE. */
  29024. -extern int mkdir (__const char *__path, __mode_t __mode)
  29025. +extern int mkdir (const char *__path, __mode_t __mode)
  29026. __THROW __nonnull ((1));
  29027. libc_hidden_proto(mkdir)
  29028. @@ -333,15 +335,16 @@
  29029. /* Like mkdir, create a new directory with permission bits MODE. But
  29030. interpret relative PATH names relative to the directory associated
  29031. with FD. */
  29032. -extern int mkdirat (int __fd, __const char *__path, __mode_t __mode)
  29033. +extern int mkdirat (int __fd, const char *__path, __mode_t __mode)
  29034. __THROW __nonnull ((2));
  29035. +libc_hidden_proto(mkdirat)
  29036. #endif
  29037. /* Create a device file named PATH, with permission and special bits MODE
  29038. and device number DEV (which can be constructed from major and minor
  29039. device numbers with the `makedev' macro above). */
  29040. #if defined __USE_MISC || defined __USE_BSD || defined __USE_XOPEN_EXTENDED
  29041. -extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev)
  29042. +extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev)
  29043. __THROW __nonnull ((1));
  29044. libc_hidden_proto(mknod)
  29045. @@ -349,7 +352,7 @@
  29046. /* Like mknod, create a new device file with permission bits MODE and
  29047. device number DEV. But interpret relative PATH names relative to
  29048. the directory associated with FD. */
  29049. -extern int mknodat (int __fd, __const char *__path, __mode_t __mode,
  29050. +extern int mknodat (int __fd, const char *__path, __mode_t __mode,
  29051. __dev_t __dev) __THROW __nonnull ((2));
  29052. libc_hidden_proto(mknodat)
  29053. # endif
  29054. @@ -357,22 +360,22 @@
  29055. /* Create a new FIFO named PATH, with permission bits MODE. */
  29056. -extern int mkfifo (__const char *__path, __mode_t __mode)
  29057. +extern int mkfifo (const char *__path, __mode_t __mode)
  29058. __THROW __nonnull ((1));
  29059. #ifdef __USE_ATFILE
  29060. /* Like mkfifo, create a new FIFO with permission bits MODE. But
  29061. interpret relative PATH names relative to the directory associated
  29062. with FD. */
  29063. -extern int mkfifoat (int __fd, __const char *__path, __mode_t __mode)
  29064. +extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)
  29065. __THROW __nonnull ((2));
  29066. #endif
  29067. #ifdef __USE_ATFILE
  29068. /* Set file access and modification times relative to directory file
  29069. descriptor. */
  29070. -extern int utimensat (int __fd, __const char *__path,
  29071. - __const struct timespec __times[2],
  29072. +extern int utimensat (int __fd, const char *__path,
  29073. + const struct timespec __times[2],
  29074. int __flags)
  29075. __THROW __nonnull ((2));
  29076. libc_hidden_proto(utimensat)
  29077. @@ -380,7 +383,7 @@
  29078. #ifdef __USE_XOPEN2K8
  29079. /* Set file access and modification times of the file associated with FD. */
  29080. -extern int futimens (int __fd, __const struct timespec __times[2]) __THROW;
  29081. +extern int futimens (int __fd, const struct timespec __times[2]) __THROW;
  29082. #endif
  29083. /* on uClibc we have unversioned struct stat and mknod.
  29084. diff -Nur uClibc-0.9.33.2/include/sys/statvfs.h uClibc-git/include/sys/statvfs.h
  29085. --- uClibc-0.9.33.2/include/sys/statvfs.h 2012-05-15 09:20:09.000000000 +0200
  29086. +++ uClibc-git/include/sys/statvfs.h 2014-07-25 20:36:05.181326174 +0200
  29087. @@ -13,9 +13,8 @@
  29088. Lesser General Public License for more details.
  29089. You should have received a copy of the GNU Lesser General Public
  29090. - License along with the GNU C Library; if not, write to the Free
  29091. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  29092. - 02111-1307 USA. */
  29093. + License along with the GNU C Library; if not, see
  29094. + <http://www.gnu.org/licenses/>. */
  29095. #ifndef _SYS_STATVFS_H
  29096. #define _SYS_STATVFS_H 1
  29097. @@ -49,14 +48,14 @@
  29098. /* Return information about the filesystem on which FILE resides. */
  29099. #ifndef __USE_FILE_OFFSET64
  29100. -extern int statvfs (__const char *__restrict __file,
  29101. +extern int statvfs (const char *__restrict __file,
  29102. struct statvfs *__restrict __buf)
  29103. __THROW __nonnull ((1, 2));
  29104. libc_hidden_proto(statvfs)
  29105. #else
  29106. # ifdef __REDIRECT_NTH
  29107. extern int __REDIRECT_NTH (statvfs,
  29108. - (__const char *__restrict __file,
  29109. + (const char *__restrict __file,
  29110. struct statvfs *__restrict __buf), statvfs64)
  29111. __nonnull ((1, 2));
  29112. # else
  29113. @@ -64,7 +63,7 @@
  29114. # endif
  29115. #endif
  29116. #ifdef __USE_LARGEFILE64
  29117. -extern int statvfs64 (__const char *__restrict __file,
  29118. +extern int statvfs64 (const char *__restrict __file,
  29119. struct statvfs64 *__restrict __buf)
  29120. __THROW __nonnull ((1, 2));
  29121. #endif
  29122. diff -Nur uClibc-0.9.33.2/include/sys/swap.h uClibc-git/include/sys/swap.h
  29123. --- uClibc-0.9.33.2/include/sys/swap.h 2012-05-15 09:20:09.000000000 +0200
  29124. +++ uClibc-git/include/sys/swap.h 2014-07-25 20:36:05.181326174 +0200
  29125. @@ -13,9 +13,8 @@
  29126. Lesser General Public License for more details.
  29127. You should have received a copy of the GNU Lesser General Public
  29128. - License along with the GNU C Library; if not, write to the Free
  29129. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  29130. - 02111-1307 USA. */
  29131. + License along with the GNU C Library; if not, see
  29132. + <http://www.gnu.org/licenses/>. */
  29133. #ifndef _SYS_SWAP_H
  29134. @@ -33,10 +32,10 @@
  29135. /* Make the block special device PATH available to the system for swapping.
  29136. This call is restricted to the super-user. */
  29137. -extern int swapon (__const char *__path, int __flags) __THROW;
  29138. +extern int swapon (const char *__path, int __flags) __THROW;
  29139. /* Stop using block special device PATH for swapping. */
  29140. -extern int swapoff (__const char *__path) __THROW;
  29141. +extern int swapoff (const char *__path) __THROW;
  29142. __END_DECLS
  29143. diff -Nur uClibc-0.9.33.2/include/sys/syscall.h uClibc-git/include/sys/syscall.h
  29144. --- uClibc-0.9.33.2/include/sys/syscall.h 2012-05-15 09:20:09.000000000 +0200
  29145. +++ uClibc-git/include/sys/syscall.h 2014-07-25 20:36:05.181326174 +0200
  29146. @@ -12,9 +12,8 @@
  29147. Lesser General Public License for more details.
  29148. You should have received a copy of the GNU Lesser General Public
  29149. - License along with the GNU C Library; if not, write to the Free
  29150. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  29151. - 02111-1307 USA. */
  29152. + License along with the GNU C Library; if not, see
  29153. + <http://www.gnu.org/licenses/>. */
  29154. #ifndef _SYSCALL_H
  29155. #define _SYSCALL_H 1
  29156. diff -Nur uClibc-0.9.33.2/include/sys/sysctl.h uClibc-git/include/sys/sysctl.h
  29157. --- uClibc-0.9.33.2/include/sys/sysctl.h 2012-05-15 09:20:09.000000000 +0200
  29158. +++ uClibc-git/include/sys/sysctl.h 2014-07-25 20:36:05.181326174 +0200
  29159. @@ -12,9 +12,8 @@
  29160. Lesser General Public License for more details.
  29161. You should have received a copy of the GNU Lesser General Public
  29162. - License along with the GNU C Library; if not, write to the Free
  29163. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  29164. - 02111-1307 USA. */
  29165. + License along with the GNU C Library; if not, see
  29166. + <http://www.gnu.org/licenses/>. */
  29167. #ifndef _SYS_SYSCTL_H
  29168. #define _SYS_SYSCTL_H 1
  29169. diff -Nur uClibc-0.9.33.2/include/sys/sysinfo.h uClibc-git/include/sys/sysinfo.h
  29170. --- uClibc-0.9.33.2/include/sys/sysinfo.h 2012-05-15 09:20:09.000000000 +0200
  29171. +++ uClibc-git/include/sys/sysinfo.h 2014-07-25 20:36:05.181326174 +0200
  29172. @@ -12,9 +12,8 @@
  29173. Lesser General Public License for more details.
  29174. You should have received a copy of the GNU Lesser General Public
  29175. - License along with the GNU C Library; if not, write to the Free
  29176. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  29177. - 02111-1307 USA. */
  29178. + License along with the GNU C Library; if not, see
  29179. + <http://www.gnu.org/licenses/>. */
  29180. #ifndef _SYS_SYSINFO_H
  29181. #define _SYS_SYSINFO_H 1
  29182. @@ -24,6 +23,8 @@
  29183. #ifndef _LINUX_KERNEL_H
  29184. /* Include our own copy of struct sysinfo to avoid binary compatability
  29185. * problems with Linux 2.4, which changed things. Grumble, grumble. */
  29186. +#define _LINUX_SYSINFO_H
  29187. +
  29188. #define SI_LOAD_SHIFT 16
  29189. struct sysinfo {
  29190. long uptime; /* Seconds since boot */
  29191. diff -Nur uClibc-0.9.33.2/include/sys/syslog.h uClibc-git/include/sys/syslog.h
  29192. --- uClibc-0.9.33.2/include/sys/syslog.h 2012-05-15 09:20:09.000000000 +0200
  29193. +++ uClibc-git/include/sys/syslog.h 2014-07-25 20:36:05.181326174 +0200
  29194. @@ -179,14 +179,12 @@
  29195. This function is a possible cancellation point and therefore not
  29196. marked with __THROW. */
  29197. extern void closelog (void);
  29198. -libc_hidden_proto(closelog)
  29199. /* Open connection to system logger.
  29200. This function is a possible cancellation point and therefore not
  29201. marked with __THROW. */
  29202. -extern void openlog (__const char *__ident, int __option, int __facility);
  29203. -libc_hidden_proto(openlog)
  29204. +extern void openlog (const char *__ident, int __option, int __facility);
  29205. /* Set the log mask level. */
  29206. extern int setlogmask (int __mask) __THROW;
  29207. @@ -195,7 +193,7 @@
  29208. This function is a possible cancellation point and therefore not
  29209. marked with __THROW. */
  29210. -extern void syslog (int __pri, __const char *__fmt, ...)
  29211. +extern void syslog (int __pri, const char *__fmt, ...)
  29212. __attribute__ ((__format__ (__printf__, 2, 3)));
  29213. libc_hidden_proto(syslog)
  29214. @@ -206,9 +204,8 @@
  29215. cancellation point. But due to similarity with an POSIX interface
  29216. or due to the implementation it is a cancellation point and
  29217. therefore not marked with __THROW. */
  29218. -extern void vsyslog (int __pri, __const char *__fmt, __gnuc_va_list __ap)
  29219. +extern void vsyslog (int __pri, const char *__fmt, __gnuc_va_list __ap)
  29220. __attribute__ ((__format__ (__printf__, 2, 0)));
  29221. -libc_hidden_proto(vsyslog)
  29222. #endif
  29223. __END_DECLS
  29224. diff -Nur uClibc-0.9.33.2/include/sys/sysmacros.h uClibc-git/include/sys/sysmacros.h
  29225. --- uClibc-0.9.33.2/include/sys/sysmacros.h 2012-05-15 09:20:09.000000000 +0200
  29226. +++ uClibc-git/include/sys/sysmacros.h 2014-07-25 20:36:05.181326174 +0200
  29227. @@ -13,9 +13,8 @@
  29228. Lesser General Public License for more details.
  29229. You should have received a copy of the GNU Lesser General Public
  29230. - License along with the GNU C Library; if not, write to the Free
  29231. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  29232. - 02111-1307 USA. */
  29233. + License along with the GNU C Library; if not, see
  29234. + <http://www.gnu.org/licenses/>. */
  29235. #ifndef _SYS_SYSMACROS_H
  29236. #define _SYS_SYSMACROS_H 1
  29237. diff -Nur uClibc-0.9.33.2/include/sys/timeb.h uClibc-git/include/sys/timeb.h
  29238. --- uClibc-0.9.33.2/include/sys/timeb.h 2012-05-15 09:20:09.000000000 +0200
  29239. +++ uClibc-git/include/sys/timeb.h 2014-07-25 20:36:05.181326174 +0200
  29240. @@ -12,9 +12,8 @@
  29241. Lesser General Public License for more details.
  29242. You should have received a copy of the GNU Lesser General Public
  29243. - License along with the GNU C Library; if not, write to the Free
  29244. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  29245. - 02111-1307 USA. */
  29246. + License along with the GNU C Library; if not, see
  29247. + <http://www.gnu.org/licenses/>. */
  29248. #ifndef _SYS_TIMEB_H
  29249. #define _SYS_TIMEB_H 1
  29250. diff -Nur uClibc-0.9.33.2/include/sys/time.h uClibc-git/include/sys/time.h
  29251. --- uClibc-0.9.33.2/include/sys/time.h 2012-05-15 09:20:09.000000000 +0200
  29252. +++ uClibc-git/include/sys/time.h 2014-07-25 20:36:05.181326174 +0200
  29253. @@ -13,9 +13,8 @@
  29254. Lesser General Public License for more details.
  29255. You should have received a copy of the GNU Lesser General Public
  29256. - License along with the GNU C Library; if not, write to the Free
  29257. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  29258. - 02111-1307 USA. */
  29259. + License along with the GNU C Library; if not, see
  29260. + <http://www.gnu.org/licenses/>. */
  29261. #ifndef _SYS_TIME_H
  29262. #define _SYS_TIME_H 1
  29263. @@ -77,8 +76,8 @@
  29264. #ifdef __USE_BSD
  29265. /* Set the current time of day and timezone information.
  29266. This call is restricted to the super-user. */
  29267. -extern int settimeofday (__const struct timeval *__tv,
  29268. - __const struct timezone *__tz)
  29269. +extern int settimeofday (const struct timeval *__tv,
  29270. + const struct timezone *__tz)
  29271. __THROW __nonnull ((1));
  29272. libc_hidden_proto(settimeofday)
  29273. @@ -86,7 +85,7 @@
  29274. If OLDDELTA is not NULL, it is filled in with the amount
  29275. of time adjustment remaining to be done from the last `adjtime' call.
  29276. This call is restricted to the super-user. */
  29277. -extern int adjtime (__const struct timeval *__delta,
  29278. +extern int adjtime (const struct timeval *__delta,
  29279. struct timeval *__olddelta) __THROW;
  29280. #endif
  29281. @@ -133,25 +132,25 @@
  29282. set *OLD to the old value of timer WHICH.
  29283. Returns 0 on success, -1 on errors. */
  29284. extern int setitimer (__itimer_which_t __which,
  29285. - __const struct itimerval *__restrict __new,
  29286. + const struct itimerval *__restrict __new,
  29287. struct itimerval *__restrict __old) __THROW;
  29288. libc_hidden_proto(setitimer)
  29289. /* Change the access time of FILE to TVP[0] and the modification time of
  29290. FILE to TVP[1]. If TVP is a null pointer, use the current time instead.
  29291. Returns 0 on success, -1 on errors. */
  29292. -extern int utimes (__const char *__file, __const struct timeval __tvp[2])
  29293. +extern int utimes (const char *__file, const struct timeval __tvp[2])
  29294. __THROW __nonnull ((1));
  29295. libc_hidden_proto(utimes)
  29296. #ifdef __USE_BSD
  29297. /* Same as `utimes', but does not follow symbolic links. */
  29298. -extern int lutimes (__const char *__file, __const struct timeval __tvp[2])
  29299. +extern int lutimes (const char *__file, const struct timeval __tvp[2])
  29300. __THROW __nonnull ((1));
  29301. #if 0
  29302. /* Same as `utimes', but takes an open file descriptor instead of a name. */
  29303. -extern int futimes (int __fd, __const struct timeval __tvp[2]) __THROW;
  29304. +extern int futimes (int __fd, const struct timeval __tvp[2]) __THROW;
  29305. #endif
  29306. #endif
  29307. @@ -159,8 +158,8 @@
  29308. /* Change the access time of FILE relative to FD to TVP[0] and the
  29309. modification time of FILE to TVP[1]. If TVP is a null pointer, use
  29310. the current time instead. Returns 0 on success, -1 on errors. */
  29311. -extern int futimesat (int __fd, __const char *__file,
  29312. - __const struct timeval __tvp[2]) __THROW;
  29313. +extern int futimesat (int __fd, const char *__file,
  29314. + const struct timeval __tvp[2]) __THROW;
  29315. #endif
  29316. diff -Nur uClibc-0.9.33.2/include/sys/times.h uClibc-git/include/sys/times.h
  29317. --- uClibc-0.9.33.2/include/sys/times.h 2012-05-15 09:20:09.000000000 +0200
  29318. +++ uClibc-git/include/sys/times.h 2014-07-25 20:36:05.181326174 +0200
  29319. @@ -12,9 +12,8 @@
  29320. Lesser General Public License for more details.
  29321. You should have received a copy of the GNU Lesser General Public
  29322. - License along with the GNU C Library; if not, write to the Free
  29323. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  29324. - 02111-1307 USA. */
  29325. + License along with the GNU C Library; if not, see
  29326. + <http://www.gnu.org/licenses/>. */
  29327. /*
  29328. * POSIX Standard: 4.5.2 Process Times <sys/times.h>
  29329. diff -Nur uClibc-0.9.33.2/include/sys/timex.h uClibc-git/include/sys/timex.h
  29330. --- uClibc-0.9.33.2/include/sys/timex.h 2012-05-15 09:20:09.000000000 +0200
  29331. +++ uClibc-git/include/sys/timex.h 2014-07-25 20:36:05.181326174 +0200
  29332. @@ -12,9 +12,8 @@
  29333. Lesser General Public License for more details.
  29334. You should have received a copy of the GNU Lesser General Public
  29335. - License along with the GNU C Library; if not, write to the Free
  29336. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  29337. - 02111-1307 USA. */
  29338. + License along with the GNU C Library; if not, see
  29339. + <http://www.gnu.org/licenses/>. */
  29340. #ifndef _SYS_TIMEX_H
  29341. #define _SYS_TIMEX_H 1
  29342. diff -Nur uClibc-0.9.33.2/include/sys/types.h uClibc-git/include/sys/types.h
  29343. --- uClibc-0.9.33.2/include/sys/types.h 2012-05-15 09:20:09.000000000 +0200
  29344. +++ uClibc-git/include/sys/types.h 2014-07-25 20:36:05.181326174 +0200
  29345. @@ -13,9 +13,8 @@
  29346. Lesser General Public License for more details.
  29347. You should have received a copy of the GNU Lesser General Public
  29348. - License along with the GNU C Library; if not, write to the Free
  29349. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  29350. - 02111-1307 USA. */
  29351. + License along with the GNU C Library; if not, see
  29352. + <http://www.gnu.org/licenses/>. */
  29353. /*
  29354. * POSIX Standard: 2.6 Primitive System Data Types <sys/types.h>
  29355. @@ -165,7 +164,7 @@
  29356. typedef int int32_t;
  29357. # if __WORDSIZE == 64
  29358. typedef long int int64_t;
  29359. -# elif defined __GNUC__ || defined __ICC
  29360. +# elif defined __GNUC__ || defined __ICC || defined __TenDRA__
  29361. __extension__ typedef long long int int64_t;
  29362. # endif
  29363. # endif
  29364. @@ -176,7 +175,7 @@
  29365. typedef unsigned int u_int32_t;
  29366. # if __WORDSIZE == 64
  29367. typedef unsigned long int u_int64_t;
  29368. -# elif defined __GNUC__ || defined __ICC
  29369. +# elif defined __GNUC__ || defined __ICC || defined __TenDRA__
  29370. __extension__ typedef unsigned long long int u_int64_t;
  29371. # endif
  29372. diff -Nur uClibc-0.9.33.2/include/sys/uio.h uClibc-git/include/sys/uio.h
  29373. --- uClibc-0.9.33.2/include/sys/uio.h 2012-05-15 09:20:09.000000000 +0200
  29374. +++ uClibc-git/include/sys/uio.h 2014-07-25 20:36:05.181326174 +0200
  29375. @@ -12,9 +12,8 @@
  29376. Lesser General Public License for more details.
  29377. You should have received a copy of the GNU Lesser General Public
  29378. - License along with the GNU C Library; if not, write to the Free
  29379. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  29380. - 02111-1307 USA. */
  29381. + License along with the GNU C Library; if not, see
  29382. + <http://www.gnu.org/licenses/>. */
  29383. #ifndef _SYS_UIO_H
  29384. #define _SYS_UIO_H 1
  29385. @@ -37,7 +36,7 @@
  29386. This function is a cancellation point and therefore not marked with
  29387. __THROW. */
  29388. -extern ssize_t readv (int __fd, __const struct iovec *__iovec, int __count);
  29389. +extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count);
  29390. /* Write data pointed by the buffers described by IOVEC, which
  29391. is a vector of COUNT `struct iovec's, to file descriptor FD.
  29392. @@ -47,7 +46,7 @@
  29393. This function is a cancellation point and therefore not marked with
  29394. __THROW. */
  29395. -extern ssize_t writev (int __fd, __const struct iovec *__iovec, int __count);
  29396. +extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count);
  29397. __END_DECLS
  29398. diff -Nur uClibc-0.9.33.2/include/sys/un.h uClibc-git/include/sys/un.h
  29399. --- uClibc-0.9.33.2/include/sys/un.h 2012-05-15 09:20:09.000000000 +0200
  29400. +++ uClibc-git/include/sys/un.h 2014-07-25 20:36:05.181326174 +0200
  29401. @@ -12,9 +12,8 @@
  29402. Lesser General Public License for more details.
  29403. You should have received a copy of the GNU Lesser General Public
  29404. - License along with the GNU C Library; if not, write to the Free
  29405. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  29406. - 02111-1307 USA. */
  29407. + License along with the GNU C Library; if not, see
  29408. + <http://www.gnu.org/licenses/>. */
  29409. #ifndef _SYS_UN_H
  29410. #define _SYS_UN_H 1
  29411. diff -Nur uClibc-0.9.33.2/include/sys/ustat.h uClibc-git/include/sys/ustat.h
  29412. --- uClibc-0.9.33.2/include/sys/ustat.h 2012-05-15 09:20:09.000000000 +0200
  29413. +++ uClibc-git/include/sys/ustat.h 2014-07-25 20:36:05.181326174 +0200
  29414. @@ -13,9 +13,8 @@
  29415. Lesser General Public License for more details.
  29416. You should have received a copy of the GNU Lesser General Public
  29417. - License along with the GNU C Library; if not, write to the Free
  29418. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  29419. - 02111-1307 USA. */
  29420. + License along with the GNU C Library; if not, see
  29421. + <http://www.gnu.org/licenses/>. */
  29422. /*
  29423. * This interface is obsolete. Use <sys/statfs.h> instead.
  29424. diff -Nur uClibc-0.9.33.2/include/sys/utsname.h uClibc-git/include/sys/utsname.h
  29425. --- uClibc-0.9.33.2/include/sys/utsname.h 2012-05-15 09:20:09.000000000 +0200
  29426. +++ uClibc-git/include/sys/utsname.h 2014-07-25 20:36:05.181326174 +0200
  29427. @@ -12,9 +12,8 @@
  29428. Lesser General Public License for more details.
  29429. You should have received a copy of the GNU Lesser General Public
  29430. - License along with the GNU C Library; if not, write to the Free
  29431. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  29432. - 02111-1307 USA. */
  29433. + License along with the GNU C Library; if not, see
  29434. + <http://www.gnu.org/licenses/>. */
  29435. /*
  29436. * POSIX Standard: 4.4 System Identification <sys/utsname.h>
  29437. diff -Nur uClibc-0.9.33.2/include/sys/wait.h uClibc-git/include/sys/wait.h
  29438. --- uClibc-0.9.33.2/include/sys/wait.h 2012-05-15 09:20:09.000000000 +0200
  29439. +++ uClibc-git/include/sys/wait.h 2014-07-25 20:36:05.181326174 +0200
  29440. @@ -13,9 +13,8 @@
  29441. Lesser General Public License for more details.
  29442. You should have received a copy of the GNU Lesser General Public
  29443. - License along with the GNU C Library; if not, write to the Free
  29444. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  29445. - 02111-1307 USA. */
  29446. + License along with the GNU C Library; if not, see
  29447. + <http://www.gnu.org/licenses/>. */
  29448. /*
  29449. * POSIX Standard: 3.2.1 Wait for Process Termination <sys/wait.h>
  29450. @@ -47,7 +46,7 @@
  29451. (__extension__ (((union { __typeof(status) __in; int __i; }) \
  29452. { .__in = (status) }).__i))
  29453. # else
  29454. -# define __WAIT_INT(status) (*(__const int *) &(status))
  29455. +# define __WAIT_INT(status) (*(const int *) &(status))
  29456. # endif
  29457. /* This is the type of the argument to `wait'. The funky union
  29458. @@ -137,7 +136,10 @@
  29459. This function is a cancellation point and therefore not marked with
  29460. __THROW. */
  29461. extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options);
  29462. +#ifdef _LIBC
  29463. +extern __typeof(waitpid) __waitpid_nocancel attribute_hidden;
  29464. libc_hidden_proto(waitpid)
  29465. +#endif
  29466. #if defined __USE_SVID || defined __USE_XOPEN
  29467. # define __need_siginfo_t
  29468. @@ -158,10 +160,6 @@
  29469. #endif
  29470. #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
  29471. -/* This being here makes the prototypes valid whether or not
  29472. - we have already included <sys/resource.h> to define `struct rusage'. */
  29473. -struct rusage;
  29474. -
  29475. /* Wait for a child to exit. When one does, put its status in *STAT_LOC and
  29476. return its process ID. For errors return (pid_t) -1. If USAGE is not
  29477. nil, store information about the child's resource usage there. If the
  29478. @@ -175,9 +173,12 @@
  29479. /* PID is like waitpid. Other args are like wait3. */
  29480. extern __pid_t wait4 (__pid_t __pid, __WAIT_STATUS __stat_loc, int __options,
  29481. struct rusage *__usage) __THROW;
  29482. -libc_hidden_proto(wait4)
  29483. #endif /* Use BSD. */
  29484. +#ifdef _LIBC
  29485. +extern __pid_t __wait4_nocancel(__pid_t, __WAIT_STATUS, int, struct rusage *) attribute_hidden;
  29486. +#endif
  29487. +
  29488. __END_DECLS
  29489. diff -Nur uClibc-0.9.33.2/include/sys/xattr.h uClibc-git/include/sys/xattr.h
  29490. --- uClibc-0.9.33.2/include/sys/xattr.h 2012-05-15 09:20:09.000000000 +0200
  29491. +++ uClibc-git/include/sys/xattr.h 2014-07-25 20:36:05.181326174 +0200
  29492. @@ -12,9 +12,8 @@
  29493. Lesser General Public License for more details.
  29494. You should have received a copy of the GNU Lesser General Public
  29495. - License along with the GNU C Library; if not, write to the Free
  29496. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  29497. - 02111-1307 USA. */
  29498. + License along with the GNU C Library; if not, see
  29499. + <http://www.gnu.org/licenses/>. */
  29500. #ifndef _SYS_XATTR_H
  29501. #define _SYS_XATTR_H 1
  29502. @@ -37,48 +36,48 @@
  29503. /* Set the attribute NAME of the file pointed to by PATH to VALUE (which
  29504. is SIZE bytes long). Return 0 on success, -1 for errors. */
  29505. -extern int setxattr (__const char *__path, __const char *__name,
  29506. - __const void *__value, size_t __size, int __flags)
  29507. +extern int setxattr (const char *__path, const char *__name,
  29508. + const void *__value, size_t __size, int __flags)
  29509. __THROW;
  29510. /* Set the attribute NAME of the file pointed to by PATH to VALUE (which is
  29511. SIZE bytes long), not following symlinks for the last pathname component.
  29512. Return 0 on success, -1 for errors. */
  29513. -extern int lsetxattr (__const char *__path, __const char *__name,
  29514. - __const void *__value, size_t __size, int __flags)
  29515. +extern int lsetxattr (const char *__path, const char *__name,
  29516. + const void *__value, size_t __size, int __flags)
  29517. __THROW;
  29518. /* Set the attribute NAME of the file descriptor FD to VALUE (which is SIZE
  29519. bytes long). Return 0 on success, -1 for errors. */
  29520. -extern int fsetxattr (int __fd, __const char *__name, __const void *__value,
  29521. +extern int fsetxattr (int __fd, const char *__name, const void *__value,
  29522. size_t __size, int __flags) __THROW;
  29523. /* Get the attribute NAME of the file pointed to by PATH to VALUE (which is
  29524. SIZE bytes long). Return 0 on success, -1 for errors. */
  29525. -extern ssize_t getxattr (__const char *__path, __const char *__name,
  29526. +extern ssize_t getxattr (const char *__path, const char *__name,
  29527. void *__value, size_t __size) __THROW;
  29528. /* Get the attribute NAME of the file pointed to by PATH to VALUE (which is
  29529. SIZE bytes long), not following symlinks for the last pathname component.
  29530. Return 0 on success, -1 for errors. */
  29531. -extern ssize_t lgetxattr (__const char *__path, __const char *__name,
  29532. +extern ssize_t lgetxattr (const char *__path, const char *__name,
  29533. void *__value, size_t __size) __THROW;
  29534. /* Get the attribute NAME of the file descriptor FD to VALUE (which is SIZE
  29535. bytes long). Return 0 on success, -1 for errors. */
  29536. -extern ssize_t fgetxattr (int __fd, __const char *__name, void *__value,
  29537. +extern ssize_t fgetxattr (int __fd, const char *__name, void *__value,
  29538. size_t __size) __THROW;
  29539. /* List attributes of the file pointed to by PATH into the user-supplied
  29540. buffer LIST (which is SIZE bytes big). Return 0 on success, -1 for
  29541. errors. */
  29542. -extern ssize_t listxattr (__const char *__path, char *__list, size_t __size)
  29543. +extern ssize_t listxattr (const char *__path, char *__list, size_t __size)
  29544. __THROW;
  29545. /* List attributes of the file pointed to by PATH into the user-supplied
  29546. buffer LIST (which is SIZE bytes big), not following symlinks for the
  29547. last pathname component. Return 0 on success, -1 for errors. */
  29548. -extern ssize_t llistxattr (__const char *__path, char *__list, size_t __size)
  29549. +extern ssize_t llistxattr (const char *__path, char *__list, size_t __size)
  29550. __THROW;
  29551. /* List attributes of the file descriptor FD into the user-supplied buffer
  29552. @@ -88,16 +87,16 @@
  29553. /* Remove the attribute NAME from the file pointed to by PATH. Return 0
  29554. on success, -1 for errors. */
  29555. -extern int removexattr (__const char *__path, __const char *__name) __THROW;
  29556. +extern int removexattr (const char *__path, const char *__name) __THROW;
  29557. /* Remove the attribute NAME from the file pointed to by PATH, not
  29558. following symlinks for the last pathname component. Return 0 on
  29559. success, -1 for errors. */
  29560. -extern int lremovexattr (__const char *__path, __const char *__name) __THROW;
  29561. +extern int lremovexattr (const char *__path, const char *__name) __THROW;
  29562. /* Remove the attribute NAME from the file descriptor FD. Return 0 on
  29563. success, -1 for errors. */
  29564. -extern int fremovexattr (int __fd, __const char *__name) __THROW;
  29565. +extern int fremovexattr (int __fd, const char *__name) __THROW;
  29566. __END_DECLS
  29567. diff -Nur uClibc-0.9.33.2/include/tar.h uClibc-git/include/tar.h
  29568. --- uClibc-0.9.33.2/include/tar.h 2012-05-15 09:20:09.000000000 +0200
  29569. +++ uClibc-git/include/tar.h 2014-07-25 20:36:05.181326174 +0200
  29570. @@ -14,9 +14,8 @@
  29571. Lesser General Public License for more details.
  29572. You should have received a copy of the GNU Lesser General Public
  29573. - License along with the GNU C Library; if not, write to the Free
  29574. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  29575. - 02111-1307 USA. */
  29576. + License along with the GNU C Library; if not, see
  29577. + <http://www.gnu.org/licenses/>. */
  29578. #ifndef _TAR_H
  29579. #define _TAR_H 1
  29580. diff -Nur uClibc-0.9.33.2/include/termios.h uClibc-git/include/termios.h
  29581. --- uClibc-0.9.33.2/include/termios.h 2012-05-15 09:20:09.000000000 +0200
  29582. +++ uClibc-git/include/termios.h 2014-07-25 20:36:05.181326174 +0200
  29583. @@ -12,9 +12,8 @@
  29584. Lesser General Public License for more details.
  29585. You should have received a copy of the GNU Lesser General Public
  29586. - License along with the GNU C Library; if not, write to the Free
  29587. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  29588. - 02111-1307 USA. */
  29589. + License along with the GNU C Library; if not, see
  29590. + <http://www.gnu.org/licenses/>. */
  29591. /*
  29592. * POSIX Standard: 7.1-2 General Terminal Interface <termios.h>
  29593. @@ -46,10 +45,10 @@
  29594. #endif
  29595. /* Return the output baud rate stored in *TERMIOS_P. */
  29596. -extern speed_t cfgetospeed (__const struct termios *__termios_p) __THROW;
  29597. +extern speed_t cfgetospeed (const struct termios *__termios_p) __THROW;
  29598. /* Return the input baud rate stored in *TERMIOS_P. */
  29599. -extern speed_t cfgetispeed (__const struct termios *__termios_p) __THROW;
  29600. +extern speed_t cfgetispeed (const struct termios *__termios_p) __THROW;
  29601. /* Set the output baud rate stored in *TERMIOS_P to SPEED. */
  29602. extern int cfsetospeed (struct termios *__termios_p, speed_t __speed) __THROW;
  29603. @@ -72,7 +71,7 @@
  29604. /* Set the state of FD to *TERMIOS_P.
  29605. Values for OPTIONAL_ACTIONS (TCSA*) are in <bits/termios.h>. */
  29606. extern int tcsetattr (int __fd, int __optional_actions,
  29607. - __const struct termios *__termios_p) __THROW;
  29608. + const struct termios *__termios_p) __THROW;
  29609. libc_hidden_proto(tcsetattr)
  29610. diff -Nur uClibc-0.9.33.2/include/tgmath.h uClibc-git/include/tgmath.h
  29611. --- uClibc-0.9.33.2/include/tgmath.h 2012-05-15 09:20:09.000000000 +0200
  29612. +++ uClibc-git/include/tgmath.h 2014-07-25 20:36:05.181326174 +0200
  29613. @@ -1,4 +1,5 @@
  29614. -/* Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
  29615. +/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2007
  29616. + Free Software Foundation, Inc.
  29617. This file is part of the GNU C Library.
  29618. The GNU C Library is free software; you can redistribute it and/or
  29619. @@ -12,9 +13,8 @@
  29620. Lesser General Public License for more details.
  29621. You should have received a copy of the GNU Lesser General Public
  29622. - License along with the GNU C Library; if not, write to the Free
  29623. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  29624. - 02111-1307 USA. */
  29625. + License along with the GNU C Library; if not, see
  29626. + <http://www.gnu.org/licenses/>. */
  29627. /*
  29628. * ISO C99 Standard: 7.22 Type-generic math <tgmath.h>
  29629. @@ -47,174 +47,199 @@
  29630. /* 1 if 'type' is a floating type, 0 if 'type' is an integer type.
  29631. Allows for _Bool. Expands to an integer constant expression. */
  29632. -# define __floating_type(type) (((type) 0.25) && ((type) 0.25 - 1))
  29633. +# if 0 /* __GNUC_PREREQ (3, 1) */
  29634. +# define __floating_type(type) \
  29635. + (__builtin_classify_type ((type) 0) == 8 \
  29636. + || (__builtin_classify_type ((type) 0) == 9 \
  29637. + && __builtin_classify_type (__real__ ((type) 0)) == 8))
  29638. +# else
  29639. +# define __floating_type(type) (((type) 0.25) && ((type) 0.25 - 1))
  29640. +# endif
  29641. /* The tgmath real type for T, where E is 0 if T is an integer type and
  29642. 1 for a floating type. */
  29643. # define __tgmath_real_type_sub(T, E) \
  29644. - __typeof__(*(0 ? (__typeof__ (0 ? (double *) 0 : (void *) (E))) 0 \
  29645. - : (__typeof__ (0 ? (T *) 0 : (void *) (!(E)))) 0))
  29646. + __typeof__ (*(0 ? (__typeof__ (0 ? (double *) 0 : (void *) (E))) 0 \
  29647. + : (__typeof__ (0 ? (T *) 0 : (void *) (!(E)))) 0))
  29648. /* The tgmath real type of EXPR. */
  29649. # define __tgmath_real_type(expr) \
  29650. - __tgmath_real_type_sub(__typeof__(expr), __floating_type(__typeof__(expr)))
  29651. + __tgmath_real_type_sub (__typeof__ ((__typeof__ (expr)) 0), \
  29652. + __floating_type (__typeof__ (expr)))
  29653. /* We have two kinds of generic macros: to support functions which are
  29654. only defined on real valued parameters and those which are defined
  29655. for complex functions as well. */
  29656. # define __TGMATH_UNARY_REAL_ONLY(Val, Fct) \
  29657. - (__extension__ ({ __tgmath_real_type (Val) __tgmres; \
  29658. - if (sizeof (Val) == sizeof (double) \
  29659. - || __builtin_classify_type (Val) != 8) \
  29660. - __tgmres = Fct (Val); \
  29661. - else if (sizeof (Val) == sizeof (float)) \
  29662. - __tgmres = Fct##f (Val); \
  29663. - else \
  29664. - __tgmres = __tgml(Fct) (Val); \
  29665. - __tgmres; }))
  29666. + (__extension__ ((sizeof (Val) == sizeof (double) \
  29667. + || __builtin_classify_type (Val) != 8) \
  29668. + ? (__tgmath_real_type (Val)) Fct (Val) \
  29669. + : (sizeof (Val) == sizeof (float)) \
  29670. + ? (__tgmath_real_type (Val)) Fct##f (Val) \
  29671. + : (__tgmath_real_type (Val)) __tgml(Fct) (Val)))
  29672. +
  29673. +# define __TGMATH_UNARY_REAL_RET_ONLY(Val, RetType, Fct) \
  29674. + (__extension__ ((sizeof (Val) == sizeof (double) \
  29675. + || __builtin_classify_type (Val) != 8) \
  29676. + ? (RetType) Fct (Val) \
  29677. + : (sizeof (Val) == sizeof (float)) \
  29678. + ? (RetType) Fct##f (Val) \
  29679. + : (RetType) __tgml(Fct) (Val)))
  29680. # define __TGMATH_BINARY_FIRST_REAL_ONLY(Val1, Val2, Fct) \
  29681. - (__extension__ ({ __tgmath_real_type (Val1) __tgmres; \
  29682. - if (sizeof (Val1) == sizeof (double) \
  29683. - || __builtin_classify_type (Val1) != 8) \
  29684. - __tgmres = Fct (Val1, Val2); \
  29685. - else if (sizeof (Val1) == sizeof (float)) \
  29686. - __tgmres = Fct##f (Val1, Val2); \
  29687. - else \
  29688. - __tgmres = __tgml(Fct) (Val1, Val2); \
  29689. - __tgmres; }))
  29690. + (__extension__ ((sizeof (Val1) == sizeof (double) \
  29691. + || __builtin_classify_type (Val1) != 8) \
  29692. + ? (__tgmath_real_type (Val1)) Fct (Val1, Val2) \
  29693. + : (sizeof (Val1) == sizeof (float)) \
  29694. + ? (__tgmath_real_type (Val1)) Fct##f (Val1, Val2) \
  29695. + : (__tgmath_real_type (Val1)) __tgml(Fct) (Val1, Val2)))
  29696. # define __TGMATH_BINARY_REAL_ONLY(Val1, Val2, Fct) \
  29697. - (__extension__ ({ __tgmath_real_type ((Val1) + (Val2)) __tgmres; \
  29698. - if ((sizeof (Val1) > sizeof (double) \
  29699. - || sizeof (Val2) > sizeof (double)) \
  29700. - && __builtin_classify_type ((Val1) + (Val2)) == 8) \
  29701. - __tgmres = __tgml(Fct) (Val1, Val2); \
  29702. - else if (sizeof (Val1) == sizeof (double) \
  29703. - || sizeof (Val2) == sizeof (double) \
  29704. - || __builtin_classify_type (Val1) != 8 \
  29705. - || __builtin_classify_type (Val2) != 8) \
  29706. - __tgmres = Fct (Val1, Val2); \
  29707. - else \
  29708. - __tgmres = Fct##f (Val1, Val2); \
  29709. - __tgmres; }))
  29710. + (__extension__ (((sizeof (Val1) > sizeof (double) \
  29711. + || sizeof (Val2) > sizeof (double)) \
  29712. + && __builtin_classify_type ((Val1) + (Val2)) == 8) \
  29713. + ? (__typeof ((__tgmath_real_type (Val1)) 0 \
  29714. + + (__tgmath_real_type (Val2)) 0)) \
  29715. + __tgml(Fct) (Val1, Val2) \
  29716. + : (sizeof (Val1) == sizeof (double) \
  29717. + || sizeof (Val2) == sizeof (double) \
  29718. + || __builtin_classify_type (Val1) != 8 \
  29719. + || __builtin_classify_type (Val2) != 8) \
  29720. + ? (__typeof ((__tgmath_real_type (Val1)) 0 \
  29721. + + (__tgmath_real_type (Val2)) 0)) \
  29722. + Fct (Val1, Val2) \
  29723. + : (__typeof ((__tgmath_real_type (Val1)) 0 \
  29724. + + (__tgmath_real_type (Val2)) 0)) \
  29725. + Fct##f (Val1, Val2)))
  29726. # define __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY(Val1, Val2, Val3, Fct) \
  29727. - (__extension__ ({ __tgmath_real_type ((Val1) + (Val2)) __tgmres; \
  29728. - if ((sizeof (Val1) > sizeof (double) \
  29729. - || sizeof (Val2) > sizeof (double)) \
  29730. - && __builtin_classify_type ((Val1) + (Val2)) == 8) \
  29731. - __tgmres = __tgml(Fct) (Val1, Val2, Val3); \
  29732. - else if (sizeof (Val1) == sizeof (double) \
  29733. - || sizeof (Val2) == sizeof (double) \
  29734. - || __builtin_classify_type (Val1) != 8 \
  29735. - || __builtin_classify_type (Val2) != 8) \
  29736. - __tgmres = Fct (Val1, Val2, Val3); \
  29737. - else \
  29738. - __tgmres = Fct##f (Val1, Val2, Val3); \
  29739. - __tgmres; }))
  29740. + (__extension__ (((sizeof (Val1) > sizeof (double) \
  29741. + || sizeof (Val2) > sizeof (double)) \
  29742. + && __builtin_classify_type ((Val1) + (Val2)) == 8) \
  29743. + ? (__typeof ((__tgmath_real_type (Val1)) 0 \
  29744. + + (__tgmath_real_type (Val2)) 0)) \
  29745. + __tgml(Fct) (Val1, Val2, Val3) \
  29746. + : (sizeof (Val1) == sizeof (double) \
  29747. + || sizeof (Val2) == sizeof (double) \
  29748. + || __builtin_classify_type (Val1) != 8 \
  29749. + || __builtin_classify_type (Val2) != 8) \
  29750. + ? (__typeof ((__tgmath_real_type (Val1)) 0 \
  29751. + + (__tgmath_real_type (Val2)) 0)) \
  29752. + Fct (Val1, Val2, Val3) \
  29753. + : (__typeof ((__tgmath_real_type (Val1)) 0 \
  29754. + + (__tgmath_real_type (Val2)) 0)) \
  29755. + Fct##f (Val1, Val2, Val3)))
  29756. # define __TGMATH_TERNARY_REAL_ONLY(Val1, Val2, Val3, Fct) \
  29757. - (__extension__ ({ __tgmath_real_type ((Val1) + (Val2) + (Val3)) __tgmres;\
  29758. - if ((sizeof (Val1) > sizeof (double) \
  29759. - || sizeof (Val2) > sizeof (double) \
  29760. - || sizeof (Val3) > sizeof (double)) \
  29761. - && __builtin_classify_type ((Val1) + (Val2) \
  29762. - + (Val3)) == 8) \
  29763. - __tgmres = __tgml(Fct) (Val1, Val2, Val3); \
  29764. - else if (sizeof (Val1) == sizeof (double) \
  29765. - || sizeof (Val2) == sizeof (double) \
  29766. - || sizeof (Val3) == sizeof (double) \
  29767. - || __builtin_classify_type (Val1) != 8 \
  29768. - || __builtin_classify_type (Val2) != 8 \
  29769. - || __builtin_classify_type (Val3) != 8) \
  29770. - __tgmres = Fct (Val1, Val2, Val3); \
  29771. - else \
  29772. - __tgmres = Fct##f (Val1, Val2, Val3); \
  29773. - __tgmres; }))
  29774. + (__extension__ (((sizeof (Val1) > sizeof (double) \
  29775. + || sizeof (Val2) > sizeof (double) \
  29776. + || sizeof (Val3) > sizeof (double)) \
  29777. + && __builtin_classify_type ((Val1) + (Val2) + (Val3)) \
  29778. + == 8) \
  29779. + ? (__typeof ((__tgmath_real_type (Val1)) 0 \
  29780. + + (__tgmath_real_type (Val2)) 0 \
  29781. + + (__tgmath_real_type (Val3)) 0)) \
  29782. + __tgml(Fct) (Val1, Val2, Val3) \
  29783. + : (sizeof (Val1) == sizeof (double) \
  29784. + || sizeof (Val2) == sizeof (double) \
  29785. + || sizeof (Val3) == sizeof (double) \
  29786. + || __builtin_classify_type (Val1) != 8 \
  29787. + || __builtin_classify_type (Val2) != 8 \
  29788. + || __builtin_classify_type (Val3) != 8) \
  29789. + ? (__typeof ((__tgmath_real_type (Val1)) 0 \
  29790. + + (__tgmath_real_type (Val2)) 0 \
  29791. + + (__tgmath_real_type (Val3)) 0)) \
  29792. + Fct (Val1, Val2, Val3) \
  29793. + : (__typeof ((__tgmath_real_type (Val1)) 0 \
  29794. + + (__tgmath_real_type (Val2)) 0 \
  29795. + + (__tgmath_real_type (Val3)) 0)) \
  29796. + Fct##f (Val1, Val2, Val3)))
  29797. /* XXX This definition has to be changed as soon as the compiler understands
  29798. the imaginary keyword. */
  29799. # define __TGMATH_UNARY_REAL_IMAG(Val, Fct, Cfct) \
  29800. - (__extension__ ({ __tgmath_real_type (Val) __tgmres; \
  29801. - if (sizeof (__real__ (Val)) > sizeof (double) \
  29802. - && __builtin_classify_type (__real__ (Val)) == 8) \
  29803. - { \
  29804. - if (sizeof (__real__ (Val)) == sizeof (Val)) \
  29805. - __tgmres = __tgml(Fct) (Val); \
  29806. - else \
  29807. - __tgmres = __tgml(Cfct) (Val); \
  29808. - } \
  29809. - else if (sizeof (__real__ (Val)) == sizeof (double) \
  29810. - || __builtin_classify_type (__real__ (Val)) \
  29811. - != 8) \
  29812. - { \
  29813. - if (sizeof (__real__ (Val)) == sizeof (Val)) \
  29814. - __tgmres = Fct (Val); \
  29815. - else \
  29816. - __tgmres = Cfct (Val); \
  29817. - } \
  29818. - else \
  29819. - { \
  29820. - if (sizeof (__real__ (Val)) == sizeof (Val)) \
  29821. - __tgmres = Fct##f (Val); \
  29822. - else \
  29823. - __tgmres = Cfct##f (Val); \
  29824. - } \
  29825. - __tgmres; }))
  29826. + (__extension__ ((sizeof (__real__ (Val)) == sizeof (double) \
  29827. + || __builtin_classify_type (__real__ (Val)) != 8) \
  29828. + ? ((sizeof (__real__ (Val)) == sizeof (Val)) \
  29829. + ? (__tgmath_real_type (Val)) Fct (Val) \
  29830. + : (__tgmath_real_type (Val)) Cfct (Val)) \
  29831. + : (sizeof (__real__ (Val)) == sizeof (float)) \
  29832. + ? ((sizeof (__real__ (Val)) == sizeof (Val)) \
  29833. + ? (__tgmath_real_type (Val)) Fct##f (Val) \
  29834. + : (__tgmath_real_type (Val)) Cfct##f (Val)) \
  29835. + : ((sizeof (__real__ (Val)) == sizeof (Val)) \
  29836. + ? (__tgmath_real_type (Val)) __tgml(Fct) (Val) \
  29837. + : (__tgmath_real_type (Val)) __tgml(Cfct) (Val))))
  29838. +
  29839. +# define __TGMATH_UNARY_IMAG(Val, Cfct) \
  29840. + (__extension__ ((sizeof (__real__ (Val)) == sizeof (double) \
  29841. + || __builtin_classify_type (__real__ (Val)) != 8) \
  29842. + ? (__typeof__ ((__tgmath_real_type (Val)) 0 \
  29843. + + _Complex_I)) Cfct (Val) \
  29844. + : (sizeof (__real__ (Val)) == sizeof (float)) \
  29845. + ? (__typeof__ ((__tgmath_real_type (Val)) 0 \
  29846. + + _Complex_I)) Cfct##f (Val) \
  29847. + : (__typeof__ ((__tgmath_real_type (Val)) 0 \
  29848. + + _Complex_I)) __tgml(Cfct) (Val)))
  29849. /* XXX This definition has to be changed as soon as the compiler understands
  29850. the imaginary keyword. */
  29851. -# define __TGMATH_UNARY_IMAG_ONLY(Val, Fct) \
  29852. - (__extension__ ({ __tgmath_real_type (Val) __tgmres; \
  29853. - if (sizeof (Val) == sizeof (__complex__ double) \
  29854. - || __builtin_classify_type (__real__ (Val)) != 8) \
  29855. - __tgmres = Fct (Val); \
  29856. - else if (sizeof (Val) == sizeof (__complex__ float)) \
  29857. - __tgmres = Fct##f (Val); \
  29858. - else \
  29859. - __tgmres = __tgml(Fct) (Val); \
  29860. - __tgmres; }))
  29861. +# define __TGMATH_UNARY_REAL_IMAG_RET_REAL(Val, Fct, Cfct) \
  29862. + (__extension__ ((sizeof (__real__ (Val)) == sizeof (double) \
  29863. + || __builtin_classify_type (__real__ (Val)) != 8) \
  29864. + ? ((sizeof (__real__ (Val)) == sizeof (Val)) \
  29865. + ? (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\
  29866. + Fct (Val) \
  29867. + : (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\
  29868. + Cfct (Val)) \
  29869. + : (sizeof (__real__ (Val)) == sizeof (float)) \
  29870. + ? ((sizeof (__real__ (Val)) == sizeof (Val)) \
  29871. + ? (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\
  29872. + Fct##f (Val) \
  29873. + : (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\
  29874. + Cfct##f (Val)) \
  29875. + : ((sizeof (__real__ (Val)) == sizeof (Val)) \
  29876. + ? (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\
  29877. + __tgml(Fct) (Val) \
  29878. + : (__typeof__ (__real__ (__tgmath_real_type (Val)) 0))\
  29879. + __tgml(Cfct) (Val))))
  29880. /* XXX This definition has to be changed as soon as the compiler understands
  29881. the imaginary keyword. */
  29882. # define __TGMATH_BINARY_REAL_IMAG(Val1, Val2, Fct, Cfct) \
  29883. - (__extension__ ({ __tgmath_real_type ((Val1) + (Val2)) __tgmres; \
  29884. - if ((sizeof (__real__ (Val1)) > sizeof (double) \
  29885. - || sizeof (__real__ (Val2)) > sizeof (double)) \
  29886. - && __builtin_classify_type (__real__ (Val1) \
  29887. - + __real__ (Val2)) \
  29888. - == 8) \
  29889. - { \
  29890. - if (sizeof (__real__ (Val1)) == sizeof (Val1) \
  29891. - && sizeof (__real__ (Val2)) == sizeof (Val2)) \
  29892. - __tgmres = __tgml(Fct) (Val1, Val2); \
  29893. - else \
  29894. - __tgmres = __tgml(Cfct) (Val1, Val2); \
  29895. - } \
  29896. - else if (sizeof (__real__ (Val1)) == sizeof (double) \
  29897. - || sizeof (__real__ (Val2)) == sizeof(double) \
  29898. - || (__builtin_classify_type (__real__ (Val1)) \
  29899. - != 8) \
  29900. - || (__builtin_classify_type (__real__ (Val2)) \
  29901. - != 8)) \
  29902. - { \
  29903. - if (sizeof (__real__ (Val1)) == sizeof (Val1) \
  29904. - && sizeof (__real__ (Val2)) == sizeof (Val2)) \
  29905. - __tgmres = Fct (Val1, Val2); \
  29906. - else \
  29907. - __tgmres = Cfct (Val1, Val2); \
  29908. - } \
  29909. - else \
  29910. - { \
  29911. - if (sizeof (__real__ (Val1)) == sizeof (Val1) \
  29912. - && sizeof (__real__ (Val2)) == sizeof (Val2)) \
  29913. - __tgmres = Fct##f (Val1, Val2); \
  29914. - else \
  29915. - __tgmres = Cfct##f (Val1, Val2); \
  29916. - } \
  29917. - __tgmres; }))
  29918. + (__extension__ (((sizeof (__real__ (Val1)) > sizeof (double) \
  29919. + || sizeof (__real__ (Val2)) > sizeof (double)) \
  29920. + && __builtin_classify_type (__real__ (Val1) \
  29921. + + __real__ (Val2)) == 8) \
  29922. + ? ((sizeof (__real__ (Val1)) == sizeof (Val1) \
  29923. + && sizeof (__real__ (Val2)) == sizeof (Val2)) \
  29924. + ? (__typeof ((__tgmath_real_type (Val1)) 0 \
  29925. + + (__tgmath_real_type (Val2)) 0)) \
  29926. + __tgml(Fct) (Val1, Val2) \
  29927. + : (__typeof ((__tgmath_real_type (Val1)) 0 \
  29928. + + (__tgmath_real_type (Val2)) 0)) \
  29929. + __tgml(Cfct) (Val1, Val2)) \
  29930. + : (sizeof (__real__ (Val1)) == sizeof (double) \
  29931. + || sizeof (__real__ (Val2)) == sizeof (double) \
  29932. + || __builtin_classify_type (__real__ (Val1)) != 8 \
  29933. + || __builtin_classify_type (__real__ (Val2)) != 8) \
  29934. + ? ((sizeof (__real__ (Val1)) == sizeof (Val1) \
  29935. + && sizeof (__real__ (Val2)) == sizeof (Val2)) \
  29936. + ? (__typeof ((__tgmath_real_type (Val1)) 0 \
  29937. + + (__tgmath_real_type (Val2)) 0)) \
  29938. + Fct (Val1, Val2) \
  29939. + : (__typeof ((__tgmath_real_type (Val1)) 0 \
  29940. + + (__tgmath_real_type (Val2)) 0)) \
  29941. + Cfct (Val1, Val2)) \
  29942. + : ((sizeof (__real__ (Val1)) == sizeof (Val1) \
  29943. + && sizeof (__real__ (Val2)) == sizeof (Val2)) \
  29944. + ? (__typeof ((__tgmath_real_type (Val1)) 0 \
  29945. + + (__tgmath_real_type (Val2)) 0)) \
  29946. + Fct##f (Val1, Val2) \
  29947. + : (__typeof ((__tgmath_real_type (Val1)) 0 \
  29948. + + (__tgmath_real_type (Val2)) 0)) \
  29949. + Cfct##f (Val1, Val2))))
  29950. #else
  29951. # error "Unsupported compiler; you cannot use <tgmath.h>"
  29952. #endif
  29953. @@ -317,7 +342,7 @@
  29954. #define ceil(Val) __TGMATH_UNARY_REAL_ONLY (Val, ceil)
  29955. /* Absolute value of X. */
  29956. -#define fabs(Val) __TGMATH_UNARY_REAL_IMAG (Val, fabs, cabs)
  29957. +#define fabs(Val) __TGMATH_UNARY_REAL_IMAG_RET_REAL (Val, fabs, cabs)
  29958. /* Largest integer not greater than X. */
  29959. #define floor(Val) __TGMATH_UNARY_REAL_ONLY (Val, floor)
  29960. @@ -345,13 +370,13 @@
  29961. /* Round X to nearest integral value according to current rounding
  29962. direction. */
  29963. -#define lrint(Val) __TGMATH_UNARY_REAL_ONLY (Val, lrint)
  29964. -#define llrint(Val) __TGMATH_UNARY_REAL_ONLY (Val, llrint)
  29965. +#define lrint(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, long int, lrint)
  29966. +#define llrint(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, long long int, llrint)
  29967. /* Round X to nearest integral value, rounding halfway cases away from
  29968. zero. */
  29969. -#define lround(Val) __TGMATH_UNARY_REAL_ONLY (Val, lround)
  29970. -#define llround(Val) __TGMATH_UNARY_REAL_ONLY (Val, llround)
  29971. +#define lround(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, long int, lround)
  29972. +#define llround(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, long long int, llround)
  29973. /* Return X with its signed changed to Y's. */
  29974. @@ -376,7 +401,7 @@
  29975. /* Return the remainder of integer divison X / Y with infinite precision. */
  29976. #define remainder(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, remainder)
  29977. -#if defined __UCLIBC_SUSV3_LEGACY__
  29978. +#ifdef __UCLIBC_SUSV3_LEGACY__
  29979. /* Return X times (2 to the Nth power). */
  29980. #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
  29981. # define scalb(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, scalb)
  29982. @@ -388,10 +413,10 @@
  29983. /* Return X times (2 to the Nth power). */
  29984. #define scalbln(Val1, Val2) \
  29985. __TGMATH_BINARY_FIRST_REAL_ONLY (Val1, Val2, scalbln)
  29986. -#endif /* UCLIBC_SUSV3_LEGACY */
  29987. +#endif /* __UCLIBC_SUSV3_LEGACY__ */
  29988. /* Return the binary exponent of X, which must be nonzero. */
  29989. -#define ilogb(Val) __TGMATH_UNARY_REAL_ONLY (Val, ilogb)
  29990. +#define ilogb(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, int, ilogb)
  29991. /* Return positive difference between X and Y. */
  29992. @@ -412,21 +437,21 @@
  29993. /* Absolute value, conjugates, and projection. */
  29994. /* Argument value of Z. */
  29995. -#define carg(Val) __TGMATH_UNARY_IMAG_ONLY (Val, carg)
  29996. +#define carg(Val) __TGMATH_UNARY_REAL_IMAG_RET_REAL (Val, carg, carg)
  29997. /* Complex conjugate of Z. */
  29998. -#define conj(Val) __TGMATH_UNARY_IMAG_ONLY (Val, conj)
  29999. +#define conj(Val) __TGMATH_UNARY_IMAG (Val, conj)
  30000. /* Projection of Z onto the Riemann sphere. */
  30001. -#define cproj(Val) __TGMATH_UNARY_IMAG_ONLY (Val, cproj)
  30002. +#define cproj(Val) __TGMATH_UNARY_IMAG (Val, cproj)
  30003. /* Decomposing complex values. */
  30004. /* Imaginary part of Z. */
  30005. -#define cimag(Val) __TGMATH_UNARY_IMAG_ONLY (Val, cimag)
  30006. +#define cimag(Val) __TGMATH_UNARY_REAL_IMAG_RET_REAL (Val, cimag, cimag)
  30007. /* Real part of Z. */
  30008. -#define creal(Val) __TGMATH_UNARY_IMAG_ONLY (Val, creal)
  30009. +#define creal(Val) __TGMATH_UNARY_REAL_IMAG_RET_REAL (Val, creal, creal)
  30010. #endif /* tgmath.h */
  30011. diff -Nur uClibc-0.9.33.2/include/time.h uClibc-git/include/time.h
  30012. --- uClibc-0.9.33.2/include/time.h 2012-05-15 09:20:09.000000000 +0200
  30013. +++ uClibc-git/include/time.h 2014-07-25 20:36:05.181326174 +0200
  30014. @@ -1,5 +1,4 @@
  30015. -/* Copyright (C) 1991-1999,2000,2001,2002,2003,2006
  30016. - Free Software Foundation, Inc.
  30017. +/* Copyright (C) 1991-2003,2006,2009 Free Software Foundation, Inc.
  30018. This file is part of the GNU C Library.
  30019. The GNU C Library is free software; you can redistribute it and/or
  30020. @@ -13,9 +12,8 @@
  30021. Lesser General Public License for more details.
  30022. You should have received a copy of the GNU Lesser General Public
  30023. - License along with the GNU C Library; if not, write to the Free
  30024. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  30025. - 02111-1307 USA. */
  30026. + License along with the GNU C Library; if not, see
  30027. + <http://www.gnu.org/licenses/>. */
  30028. /*
  30029. * ISO C99 Standard: 7.23 Date and time <time.h>
  30030. @@ -146,10 +144,10 @@
  30031. #ifdef __UCLIBC_HAS_TM_EXTENSIONS__
  30032. #ifdef __USE_BSD
  30033. long int tm_gmtoff; /* Seconds east of UTC. */
  30034. - __const char *tm_zone; /* Timezone abbreviation. */
  30035. + const char *tm_zone; /* Timezone abbreviation. */
  30036. #else
  30037. long int __tm_gmtoff; /* Seconds east of UTC. */
  30038. - __const char *__tm_zone; /* Timezone abbreviation. */
  30039. + const char *__tm_zone; /* Timezone abbreviation. */
  30040. #endif
  30041. #endif /* __UCLIBC_HAS_TM_EXTENSIONS__ */
  30042. };
  30043. @@ -195,7 +193,9 @@
  30044. __THROW __attribute__ ((__const__));
  30045. #endif /* __UCLIBC_HAS_FLOATS__ */
  30046. -#define CLOCK_IDFIELD_SIZE 3
  30047. +#ifdef _LIBC
  30048. +# define CLOCK_IDFIELD_SIZE 3
  30049. +#endif
  30050. /* Return the `time_t' representation of TP and normalize TP. */
  30051. extern time_t mktime (struct tm *__tp) __THROW;
  30052. @@ -205,32 +205,34 @@
  30053. Write no more than MAXSIZE characters and return the number
  30054. of characters written, or 0 if it would exceed MAXSIZE. */
  30055. extern size_t strftime (char *__restrict __s, size_t __maxsize,
  30056. - __const char *__restrict __format,
  30057. - __const struct tm *__restrict __tp) __THROW;
  30058. + const char *__restrict __format,
  30059. + const struct tm *__restrict __tp) __THROW;
  30060. __END_NAMESPACE_STD
  30061. # ifdef __USE_XOPEN
  30062. /* Parse S according to FORMAT and store binary time information in TP.
  30063. The return value is a pointer to the first unparsed character in S. */
  30064. -extern char *strptime (__const char *__restrict __s,
  30065. - __const char *__restrict __fmt, struct tm *__tp)
  30066. +extern char *strptime (const char *__restrict __s,
  30067. + const char *__restrict __fmt, struct tm *__tp)
  30068. __THROW;
  30069. # endif
  30070. #ifdef __UCLIBC_HAS_XLOCALE__
  30071. -# ifdef __USE_GNU
  30072. +# ifdef __USE_XOPEN2K8
  30073. /* Similar to the two functions above but take the information from
  30074. the provided locale and not the global locale. */
  30075. # include <xlocale.h>
  30076. extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
  30077. - __const char *__restrict __format,
  30078. - __const struct tm *__restrict __tp,
  30079. + const char *__restrict __format,
  30080. + const struct tm *__restrict __tp,
  30081. __locale_t __loc) __THROW;
  30082. libc_hidden_proto(strftime_l)
  30083. +# endif
  30084. -extern char *strptime_l (__const char *__restrict __s,
  30085. - __const char *__restrict __fmt, struct tm *__tp,
  30086. +# ifdef __USE_GNU
  30087. +extern char *strptime_l (const char *__restrict __s,
  30088. + const char *__restrict __fmt, struct tm *__tp,
  30089. __locale_t __loc) __THROW;
  30090. libc_hidden_proto(strptime_l)
  30091. # endif
  30092. @@ -240,23 +242,23 @@
  30093. __BEGIN_NAMESPACE_STD
  30094. /* Return the `struct tm' representation of *TIMER
  30095. in Universal Coordinated Time (aka Greenwich Mean Time). */
  30096. -extern struct tm *gmtime (__const time_t *__timer) __THROW;
  30097. +extern struct tm *gmtime (const time_t *__timer) __THROW;
  30098. /* Return the `struct tm' representation
  30099. of *TIMER in the local timezone. */
  30100. -extern struct tm *localtime (__const time_t *__timer) __THROW;
  30101. +extern struct tm *localtime (const time_t *__timer) __THROW;
  30102. libc_hidden_proto(localtime)
  30103. __END_NAMESPACE_STD
  30104. # if defined __USE_POSIX || defined __USE_MISC
  30105. /* Return the `struct tm' representation of *TIMER in UTC,
  30106. using *TP to store the result. */
  30107. -extern struct tm *gmtime_r (__const time_t *__restrict __timer,
  30108. +extern struct tm *gmtime_r (const time_t *__restrict __timer,
  30109. struct tm *__restrict __tp) __THROW;
  30110. /* Return the `struct tm' representation of *TIMER in local time,
  30111. using *TP to store the result. */
  30112. -extern struct tm *localtime_r (__const time_t *__restrict __timer,
  30113. +extern struct tm *localtime_r (const time_t *__restrict __timer,
  30114. struct tm *__restrict __tp) __THROW;
  30115. libc_hidden_proto(localtime_r)
  30116. # endif /* POSIX or misc */
  30117. @@ -264,11 +266,11 @@
  30118. __BEGIN_NAMESPACE_STD
  30119. /* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n"
  30120. that is the representation of TP in this format. */
  30121. -extern char *asctime (__const struct tm *__tp) __THROW;
  30122. +extern char *asctime (const struct tm *__tp) __THROW;
  30123. libc_hidden_proto(asctime)
  30124. /* Equivalent to `asctime (localtime (timer))'. */
  30125. -extern char *ctime (__const time_t *__timer) __THROW;
  30126. +extern char *ctime (const time_t *__timer) __THROW;
  30127. libc_hidden_proto(ctime)
  30128. __END_NAMESPACE_STD
  30129. @@ -277,12 +279,12 @@
  30130. /* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n"
  30131. that is the representation of TP in this format. */
  30132. -extern char *asctime_r (__const struct tm *__restrict __tp,
  30133. +extern char *asctime_r (const struct tm *__restrict __tp,
  30134. char *__restrict __buf) __THROW;
  30135. libc_hidden_proto(asctime_r)
  30136. /* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */
  30137. -extern char *ctime_r (__const time_t *__restrict __timer,
  30138. +extern char *ctime_r (const time_t *__restrict __timer,
  30139. char *__restrict __buf) __THROW;
  30140. # endif /* POSIX or misc */
  30141. @@ -314,7 +316,8 @@
  30142. # ifdef __USE_SVID
  30143. /* Set the system time to *WHEN.
  30144. This call is restricted to the superuser. */
  30145. -extern int stime (__const time_t *__when) __THROW;
  30146. +extern int stime (const time_t *__when) __THROW;
  30147. +libc_hidden_proto(stime)
  30148. # endif
  30149. @@ -345,7 +348,7 @@
  30150. This function is a cancellation point and therefore not marked with
  30151. __THROW. */
  30152. -extern int nanosleep (__const struct timespec *__requested_time,
  30153. +extern int nanosleep (const struct timespec *__requested_time,
  30154. struct timespec *__remaining);
  30155. libc_hidden_proto(nanosleep)
  30156. @@ -358,23 +361,24 @@
  30157. extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW;
  30158. /* Set clock CLOCK_ID to value TP. */
  30159. -extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
  30160. +extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
  30161. __THROW;
  30162. # endif /* __UCLIBC_HAS_REALTIME__ */
  30163. -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
  30164. -# if defined __USE_XOPEN2K && defined __UCLIBC_HAS_ADVANCED_REALTIME__
  30165. +
  30166. +# if defined __USE_XOPEN2K && defined __UCLIBC_HAS_ADVANCED_REALTIME__
  30167. +# ifdef __UCLIBC_HAS_THREADS_NATIVE__
  30168. /* High-resolution sleep with the specified clock.
  30169. This function is a cancellation point and therefore not marked with
  30170. __THROW. */
  30171. extern int clock_nanosleep (clockid_t __clock_id, int __flags,
  30172. - __const struct timespec *__req,
  30173. + const struct timespec *__req,
  30174. struct timespec *__rem);
  30175. /* Return clock ID for CPU-time clock. */
  30176. extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW;
  30177. -# endif
  30178. -# endif /* __UCLIBC_HAS_THREADS_NATIVE__ */
  30179. +# endif /* __UCLIBC_HAS_THREADS_NATIVE__ */
  30180. +# endif
  30181. # if defined __UCLIBC_HAS_REALTIME__
  30182. /* Create new per-process timer using CLOCK_ID. */
  30183. @@ -387,7 +391,7 @@
  30184. /* Set timer TIMERID to VALUE, returning old value in OVLAUE. */
  30185. extern int timer_settime (timer_t __timerid, int __flags,
  30186. - __const struct itimerspec *__restrict __value,
  30187. + const struct itimerspec *__restrict __value,
  30188. struct itimerspec *__restrict __ovalue) __THROW;
  30189. /* Get current value of timer TIMERID and store it in VLAUE. */
  30190. @@ -423,7 +427,7 @@
  30191. This function is a possible cancellation points and therefore not
  30192. marked with __THROW. */
  30193. -extern struct tm *getdate (__const char *__string);
  30194. +extern struct tm *getdate (const char *__string);
  30195. # endif
  30196. # ifdef __USE_GNU
  30197. @@ -437,7 +441,7 @@
  30198. cancellation point. But due to similarity with an POSIX interface
  30199. or due to the implementation it is a cancellation point and
  30200. therefore not marked with __THROW. */
  30201. -extern int getdate_r (__const char *__restrict __string,
  30202. +extern int getdate_r (const char *__restrict __string,
  30203. struct tm *__restrict __resbufp);
  30204. # endif
  30205. #endif /* __UCLIBC_MJN3_ONLY__ */
  30206. diff -Nur uClibc-0.9.33.2/include/ttyent.h uClibc-git/include/ttyent.h
  30207. --- uClibc-0.9.33.2/include/ttyent.h 2012-05-15 09:20:09.000000000 +0200
  30208. +++ uClibc-git/include/ttyent.h 2014-07-25 20:36:05.181326174 +0200
  30209. @@ -57,7 +57,7 @@
  30210. extern struct ttyent *getttyent (void) __THROW;
  30211. libc_hidden_proto(getttyent)
  30212. -extern struct ttyent *getttynam (__const char *__tty) __THROW;
  30213. +extern struct ttyent *getttynam (const char *__tty) __THROW;
  30214. extern int setttyent (void) __THROW;
  30215. libc_hidden_proto(setttyent)
  30216. extern int endttyent (void) __THROW;
  30217. diff -Nur uClibc-0.9.33.2/include/ucontext.h uClibc-git/include/ucontext.h
  30218. --- uClibc-0.9.33.2/include/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  30219. +++ uClibc-git/include/ucontext.h 2014-07-25 20:36:05.181326174 +0200
  30220. @@ -12,21 +12,46 @@
  30221. Lesser General Public License for more details.
  30222. You should have received a copy of the GNU Lesser General Public
  30223. - License along with the GNU C Library; if not, write to the Free
  30224. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  30225. - 02111-1307 USA. */
  30226. + License along with the GNU C Library; if not, see
  30227. + <http://www.gnu.org/licenses/>. */
  30228. +
  30229. +/* The System V ABI user-level context switching support functions
  30230. + are marked obsolescent by SuSv3. */
  30231. #ifndef _UCONTEXT_H
  30232. #define _UCONTEXT_H 1
  30233. #include <features.h>
  30234. +#ifdef __UCLIBC_HAS_CONTEXT_FUNCS__
  30235. +
  30236. /* Get machine dependent definition of data structures. */
  30237. #include <sys/ucontext.h>
  30238. -/* The System V ABI user-level context switching support functions
  30239. - * are marked obsolescent by SuSv3, and are not implemented by
  30240. - * uClibc. This header is therefore empty. */
  30241. +__BEGIN_DECLS
  30242. +
  30243. +/* Get user context and store it in variable pointed to by UCP. */
  30244. +extern int getcontext (ucontext_t *__ucp) __THROW;
  30245. +
  30246. +/* Set user context from information of variable pointed to by UCP. */
  30247. +extern int setcontext (const ucontext_t *__ucp) __THROW;
  30248. +
  30249. +/* Save current context in context variable pointed to by OUCP and set
  30250. + context from variable pointed to by UCP. */
  30251. +extern int swapcontext (ucontext_t *__restrict __oucp,
  30252. + const ucontext_t *__restrict __ucp) __THROW;
  30253. +
  30254. +/* Manipulate user context UCP to continue with calling functions FUNC
  30255. + and the ARGC-1 parameters following ARGC when the context is used
  30256. + the next time in `setcontext' or `swapcontext'.
  30257. +
  30258. + We cannot say anything about the parameters FUNC takes; `void'
  30259. + is as good as any other choice. */
  30260. +extern void makecontext (ucontext_t *__ucp, void (*__func) (void),
  30261. + int __argc, ...) __THROW;
  30262. +
  30263. +__END_DECLS
  30264. +#endif
  30265. #endif /* ucontext.h */
  30266. diff -Nur uClibc-0.9.33.2/include/ulimit.h uClibc-git/include/ulimit.h
  30267. --- uClibc-0.9.33.2/include/ulimit.h 2012-05-15 09:20:09.000000000 +0200
  30268. +++ uClibc-git/include/ulimit.h 2014-07-25 20:36:05.181326174 +0200
  30269. @@ -12,9 +12,8 @@
  30270. Lesser General Public License for more details.
  30271. You should have received a copy of the GNU Lesser General Public
  30272. - License along with the GNU C Library; if not, write to the Free
  30273. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  30274. - 02111-1307 USA. */
  30275. + License along with the GNU C Library; if not, see
  30276. + <http://www.gnu.org/licenses/>. */
  30277. #ifndef _ULIMIT_H
  30278. #define _ULIMIT_H 1
  30279. diff -Nur uClibc-0.9.33.2/include/unistd.h uClibc-git/include/unistd.h
  30280. --- uClibc-0.9.33.2/include/unistd.h 2012-05-15 09:20:09.000000000 +0200
  30281. +++ uClibc-git/include/unistd.h 2014-07-25 20:36:05.181326174 +0200
  30282. @@ -1,4 +1,4 @@
  30283. -/* Copyright (C) 1991-2002,2003,2004,2005,2006 Free Software Foundation, Inc.
  30284. +/* Copyright (C) 1991-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
  30285. This file is part of the GNU C Library.
  30286. The GNU C Library is free software; you can redistribute it and/or
  30287. @@ -12,9 +12,8 @@
  30288. Lesser General Public License for more details.
  30289. You should have received a copy of the GNU Lesser General Public
  30290. - License along with the GNU C Library; if not, write to the Free
  30291. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  30292. - 02111-1307 USA. */
  30293. + License along with the GNU C Library; if not, see
  30294. + <http://www.gnu.org/licenses/>. */
  30295. /*
  30296. * POSIX Standard: 2.10 Symbolic Constants <unistd.h>
  30297. @@ -30,35 +29,67 @@
  30298. /* These may be used to determine what facilities are present at compile time.
  30299. Their values can be obtained at run time from `sysconf'. */
  30300. +#ifdef __USE_XOPEN2K8
  30301. +/* POSIX Standard approved as ISO/IEC 9945-1 as of September 2008. */
  30302. +# define _POSIX_VERSION 200809L
  30303. +#elif defined __USE_XOPEN2K
  30304. /* POSIX Standard approved as ISO/IEC 9945-1 as of December 2001. */
  30305. -#define _POSIX_VERSION 200112L
  30306. +# define _POSIX_VERSION 200112L
  30307. +#elif defined __USE_POSIX199506
  30308. +/* POSIX Standard approved as ISO/IEC 9945-1 as of June 1995. */
  30309. +# define _POSIX_VERSION 199506L
  30310. +#elif defined __USE_POSIX199309
  30311. +/* POSIX Standard approved as ISO/IEC 9945-1 as of September 1993. */
  30312. +# define _POSIX_VERSION 199309L
  30313. +#else
  30314. +/* POSIX Standard approved as ISO/IEC 9945-1 as of September 1990. */
  30315. +# define _POSIX_VERSION 199009L
  30316. +#endif
  30317. /* These are not #ifdef __USE_POSIX2 because they are
  30318. in the theoretically application-owned namespace. */
  30319. +#ifdef __USE_XOPEN2K8
  30320. +# define __POSIX2_THIS_VERSION 200809L
  30321. +/* The utilities on GNU systems also correspond to this version. */
  30322. +#elif defined __USE_XOPEN2K
  30323. +/* The utilities on GNU systems also correspond to this version. */
  30324. +# define __POSIX2_THIS_VERSION 200112L
  30325. +#elif defined __USE_POSIX199506
  30326. +/* The utilities on GNU systems also correspond to this version. */
  30327. +# define __POSIX2_THIS_VERSION 199506L
  30328. +#else
  30329. +/* The utilities on GNU systems also correspond to this version. */
  30330. +# define __POSIX2_THIS_VERSION 199209L
  30331. +#endif
  30332. +
  30333. /* The utilities on GNU systems also correspond to this version. */
  30334. -#define _POSIX2_VERSION 200112L
  30335. +#define _POSIX2_VERSION __POSIX2_THIS_VERSION
  30336. /* If defined, the implementation supports the
  30337. C Language Bindings Option. */
  30338. -#define _POSIX2_C_BIND 200112L
  30339. +#define _POSIX2_C_BIND __POSIX2_THIS_VERSION
  30340. /* If defined, the implementation supports the
  30341. C Language Development Utilities Option. */
  30342. -#define _POSIX2_C_DEV 200112L
  30343. +#define _POSIX2_C_DEV __POSIX2_THIS_VERSION
  30344. /* If defined, the implementation supports the
  30345. Software Development Utilities Option. */
  30346. -#define _POSIX2_SW_DEV 200112L
  30347. +#define _POSIX2_SW_DEV __POSIX2_THIS_VERSION
  30348. #if 0 /* uClibc does not provide the utility */
  30349. /* If defined, the implementation supports the
  30350. creation of locales with the localedef utility. */
  30351. -#define _POSIX2_LOCALEDEF 200112L
  30352. +#define _POSIX2_LOCALEDEF __POSIX2_THIS_VERSION
  30353. #endif
  30354. /* X/Open version number to which the library conforms. It is selectable. */
  30355. -#ifdef __USE_UNIX98
  30356. +#ifdef __USE_XOPEN2K8
  30357. +# define _XOPEN_VERSION 700
  30358. +#elif defined __USE_XOPEN2K
  30359. +# define _XOPEN_VERSION 600
  30360. +#elif defined __USE_UNIX98
  30361. # define _XOPEN_VERSION 500
  30362. #else
  30363. # define _XOPEN_VERSION 4
  30364. @@ -171,6 +202,8 @@
  30365. */
  30366. #include <bits/posix_opt.h>
  30367. +/* keep it after posix_opt.h, it overwrites based on uClibc's config options */
  30368. +#include <bits/uClibc_posix_opt.h>
  30369. /* Get the environment definitions from Unix98. */
  30370. #ifdef __USE_UNIX98
  30371. @@ -255,16 +288,16 @@
  30372. #define F_OK 0 /* Test for existence. */
  30373. /* Test for access to NAME using the real UID and real GID. */
  30374. -extern int access (__const char *__name, int __type) __THROW __nonnull ((1));
  30375. +extern int access (const char *__name, int __type) __THROW __nonnull ((1));
  30376. #if 0 /*def __USE_GNU*/
  30377. /* Test for access to NAME using the effective UID and GID
  30378. (as normal file operations use). */
  30379. -extern int euidaccess (__const char *__name, int __type)
  30380. +extern int euidaccess (const char *__name, int __type)
  30381. __THROW __nonnull ((1));
  30382. /* An alias for `euidaccess', used by some other systems. */
  30383. -extern int eaccess (__const char *__name, int __type)
  30384. +extern int eaccess (const char *__name, int __type)
  30385. __THROW __nonnull ((1));
  30386. #endif
  30387. @@ -272,8 +305,9 @@
  30388. /* Test for access to FILE relative to the directory FD is open on.
  30389. If AT_EACCESS is set in FLAG, then use effective IDs like `eaccess',
  30390. otherwise use real IDs like `access'. */
  30391. -extern int faccessat (int __fd, __const char *__file, int __type, int __flag)
  30392. +extern int faccessat (int __fd, const char *__file, int __type, int __flag)
  30393. __THROW __nonnull ((2)) __wur;
  30394. +libc_hidden_proto(faccessat)
  30395. #endif /* Use GNU. */
  30396. @@ -299,7 +333,10 @@
  30397. Return the new file position. */
  30398. #ifndef __USE_FILE_OFFSET64
  30399. extern __off_t lseek (int __fd, __off_t __offset, int __whence) __THROW;
  30400. +# ifdef _LIBC
  30401. +extern __typeof(lseek) __lseek_nocancel attribute_hidden;
  30402. libc_hidden_proto(lseek)
  30403. +# endif
  30404. #else
  30405. # ifdef __REDIRECT_NTH
  30406. extern __off64_t __REDIRECT_NTH (lseek,
  30407. @@ -312,7 +349,10 @@
  30408. #ifdef __USE_LARGEFILE64
  30409. extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
  30410. __THROW;
  30411. +# ifdef _LIBC
  30412. +extern __typeof(lseek64) __lseek64_nocancel attribute_hidden;
  30413. libc_hidden_proto(lseek64)
  30414. +# endif
  30415. #endif
  30416. /* Close the file descriptor FD.
  30417. @@ -320,7 +360,11 @@
  30418. This function is a cancellation point and therefore not marked with
  30419. __THROW. */
  30420. extern int close (int __fd);
  30421. +#ifdef _LIBC
  30422. +extern __typeof(close) __close_nocancel attribute_hidden;
  30423. +extern void __close_nocancel_no_status(int) attribute_hidden;
  30424. libc_hidden_proto(close)
  30425. +#endif
  30426. /* Read NBYTES into BUF from FD. Return the
  30427. number read, -1 for errors or 0 for EOF.
  30428. @@ -328,14 +372,20 @@
  30429. This function is a cancellation point and therefore not marked with
  30430. __THROW. */
  30431. extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur;
  30432. +#ifdef _LIBC
  30433. +extern __typeof(read) __read_nocancel attribute_hidden;
  30434. libc_hidden_proto(read)
  30435. +#endif
  30436. /* Write N bytes of BUF to FD. Return the number written, or -1.
  30437. This function is a cancellation point and therefore not marked with
  30438. __THROW. */
  30439. -extern ssize_t write (int __fd, __const void *__buf, size_t __n) __wur;
  30440. +extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur;
  30441. +#ifdef _LIBC
  30442. +extern __typeof(write) __write_nocancel attribute_hidden;
  30443. libc_hidden_proto(write)
  30444. +#endif
  30445. #ifdef __USE_UNIX98
  30446. # ifndef __USE_FILE_OFFSET64
  30447. @@ -353,14 +403,14 @@
  30448. This function is a cancellation point and therefore not marked with
  30449. __THROW. */
  30450. -extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n,
  30451. +extern ssize_t pwrite (int __fd, const void *__buf, size_t __n,
  30452. __off_t __offset) __wur;
  30453. # else
  30454. # ifdef __REDIRECT
  30455. extern ssize_t __REDIRECT (pread, (int __fd, void *__buf, size_t __nbytes,
  30456. __off64_t __offset),
  30457. pread64) __wur;
  30458. -extern ssize_t __REDIRECT (pwrite, (int __fd, __const void *__buf,
  30459. +extern ssize_t __REDIRECT (pwrite, (int __fd, const void *__buf,
  30460. size_t __nbytes, __off64_t __offset),
  30461. pwrite64) __wur;
  30462. # else
  30463. @@ -377,7 +427,7 @@
  30464. __off64_t __offset) __wur;
  30465. /* Write N bytes of BUF to FD at the given position OFFSET without
  30466. changing the file pointer. Return the number written, or -1. */
  30467. -extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n,
  30468. +extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n,
  30469. __off64_t __offset) __wur;
  30470. # endif
  30471. #endif
  30472. @@ -446,7 +496,7 @@
  30473. /* Change the owner and group of FILE. */
  30474. -extern int chown (__const char *__file, __uid_t __owner, __gid_t __group)
  30475. +extern int chown (const char *__file, __uid_t __owner, __gid_t __group)
  30476. __THROW __nonnull ((1)) __wur;
  30477. libc_hidden_proto(chown)
  30478. @@ -457,7 +507,7 @@
  30479. /* Change owner and group of FILE, if it is a symbolic
  30480. link the ownership of the symbolic link is changed. */
  30481. -extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group)
  30482. +extern int lchown (const char *__file, __uid_t __owner, __gid_t __group)
  30483. __THROW __nonnull ((1)) __wur;
  30484. #endif /* Use BSD || X/Open Unix. */
  30485. @@ -465,13 +515,14 @@
  30486. #ifdef __USE_ATFILE
  30487. /* Change the owner and group of FILE relative to the directory FD is open
  30488. on. */
  30489. -extern int fchownat (int __fd, __const char *__file, __uid_t __owner,
  30490. +extern int fchownat (int __fd, const char *__file, __uid_t __owner,
  30491. __gid_t __group, int __flag)
  30492. __THROW __nonnull ((2)) __wur;
  30493. +libc_hidden_proto(fchownat)
  30494. #endif /* Use GNU. */
  30495. /* Change the process's working directory to PATH. */
  30496. -extern int chdir (__const char *__path) __THROW __nonnull ((1)) __wur;
  30497. +extern int chdir (const char *__path) __THROW __nonnull ((1)) __wur;
  30498. libc_hidden_proto(chdir)
  30499. #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
  30500. @@ -513,6 +564,13 @@
  30501. extern int dup2 (int __fd, int __fd2) __THROW;
  30502. libc_hidden_proto(dup2)
  30503. +#ifdef __USE_GNU
  30504. +/* Duplicate FD to FD2, closing FD2 and making it open on the same
  30505. + file while setting flags according to FLAGS. */
  30506. +extern int dup3 (int __fd, int __fd2, int __flags) __THROW;
  30507. +libc_hidden_proto(dup3)
  30508. +#endif
  30509. +
  30510. /* NULL-terminated array of "NAME=VALUE" environment variables. */
  30511. extern char **__environ;
  30512. #ifdef __USE_GNU
  30513. @@ -522,48 +580,56 @@
  30514. /* Replace the current process, executing PATH with arguments ARGV and
  30515. environment ENVP. ARGV and ENVP are terminated by NULL pointers. */
  30516. -extern int execve (__const char *__path, char *__const __argv[],
  30517. - char *__const __envp[]) __THROW __nonnull ((1));
  30518. +extern int execve (const char *__path, char *const __argv[],
  30519. + char *const __envp[]) __THROW __nonnull ((1));
  30520. libc_hidden_proto(execve)
  30521. -#if 0 /*def __USE_GNU*/
  30522. +#if 0 /*def __USE_XOPEN2K8*/
  30523. /* Execute the file FD refers to, overlaying the running program image.
  30524. ARGV and ENVP are passed to the new program, as for `execve'. */
  30525. -extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[])
  30526. +extern int fexecve (int __fd, char *const __argv[], char *const __envp[])
  30527. __THROW;
  30528. #endif
  30529. /* Execute PATH with arguments ARGV and environment from `environ'. */
  30530. -extern int execv (__const char *__path, char *__const __argv[])
  30531. +extern int execv (const char *__path, char *const __argv[])
  30532. __THROW __nonnull ((1));
  30533. libc_hidden_proto(execv)
  30534. /* Execute PATH with all arguments after PATH until a NULL pointer,
  30535. and the argument after that for environment. */
  30536. -extern int execle (__const char *__path, __const char *__arg, ...)
  30537. +extern int execle (const char *__path, const char *__arg, ...)
  30538. __THROW __nonnull ((1));
  30539. libc_hidden_proto(execle)
  30540. /* Execute PATH with all arguments after PATH until
  30541. a NULL pointer and environment from `environ'. */
  30542. -extern int execl (__const char *__path, __const char *__arg, ...)
  30543. +extern int execl (const char *__path, const char *__arg, ...)
  30544. __THROW __nonnull ((1));
  30545. libc_hidden_proto(execl)
  30546. /* Execute FILE, searching in the `PATH' environment variable if it contains
  30547. no slashes, with arguments ARGV and environment from `environ'. */
  30548. -extern int execvp (__const char *__file, char *__const __argv[])
  30549. +extern int execvp (const char *__file, char *const __argv[])
  30550. __THROW __nonnull ((1));
  30551. libc_hidden_proto(execvp)
  30552. /* Execute FILE, searching in the `PATH' environment variable if
  30553. it contains no slashes, with all arguments after FILE until a
  30554. NULL pointer and environment from `environ'. */
  30555. -extern int execlp (__const char *__file, __const char *__arg, ...)
  30556. +extern int execlp (const char *__file, const char *__arg, ...)
  30557. __THROW __nonnull ((1));
  30558. libc_hidden_proto(execlp)
  30559. +#ifdef __USE_GNU
  30560. +/* Execute FILE, searching in the `PATH' environment variable if it contains
  30561. + no slashes, with arguments ARGV and environment from a pointer */
  30562. +extern int execvpe (__const char *__file, char *__const __argv[], char *__const __envp[])
  30563. + __THROW __nonnull ((1));
  30564. +libc_hidden_proto(execvpe)
  30565. +#endif
  30566. +
  30567. #if defined __USE_MISC || defined __USE_XOPEN
  30568. /* Add INC to priority of the current process. */
  30569. @@ -582,7 +648,7 @@
  30570. #include <bits/confname.h>
  30571. /* Get file-specific configuration information about PATH. */
  30572. -extern long int pathconf (__const char *__path, int __name)
  30573. +extern long int pathconf (const char *__path, int __name)
  30574. __THROW __nonnull ((1));
  30575. /* Get file-specific configuration about descriptor FD. */
  30576. @@ -767,7 +833,12 @@
  30577. Return -1 for errors, 0 to the new process,
  30578. and the process ID of the new process to the old process. */
  30579. extern __pid_t fork (void) __THROW;
  30580. +# ifdef _LIBC
  30581. +# ifdef __UCLIBC_HAS_THREADS__
  30582. +extern __typeof(fork) __libc_fork;
  30583. +# endif
  30584. libc_hidden_proto(fork)
  30585. +# endif
  30586. #endif
  30587. #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
  30588. @@ -779,8 +850,10 @@
  30589. libc_hidden_proto(vfork)
  30590. #endif /* Use BSD. */
  30591. +#if 0 /* psm: seems unused , exit-thread.S is not compiled */
  30592. /* Special exit function which only terminates the current thread. */
  30593. extern void __exit_thread (int val) __attribute__ ((__noreturn__));
  30594. +#endif
  30595. /* Return the pathname of the terminal FD is open on, or NULL on errors.
  30596. The returned storage is good only until the next call to this function. */
  30597. @@ -797,7 +870,6 @@
  30598. extern int isatty (int __fd) __THROW;
  30599. libc_hidden_proto(isatty)
  30600. -
  30601. #if 0 /*defined __USE_BSD \
  30602. || (defined __USE_XOPEN_EXTENDED && !defined __USE_UNIX98)*/
  30603. /* Return the index into the active-logins file (utmp) for
  30604. @@ -807,26 +879,27 @@
  30605. /* Make a link to FROM named TO. */
  30606. -extern int link (__const char *__from, __const char *__to)
  30607. +extern int link (const char *__from, const char *__to)
  30608. __THROW __nonnull ((1, 2)) __wur;
  30609. #ifdef __USE_ATFILE
  30610. /* Like link but relative paths in TO and FROM are interpreted relative
  30611. to FROMFD and TOFD respectively. */
  30612. -extern int linkat (int __fromfd, __const char *__from, int __tofd,
  30613. - __const char *__to, int __flags)
  30614. +extern int linkat (int __fromfd, const char *__from, int __tofd,
  30615. + const char *__to, int __flags)
  30616. __THROW __nonnull ((2, 4)) __wur;
  30617. +libc_hidden_proto(linkat)
  30618. #endif
  30619. #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
  30620. /* Make a symbolic link to FROM named TO. */
  30621. -extern int symlink (__const char *__from, __const char *__to)
  30622. +extern int symlink (const char *__from, const char *__to)
  30623. __THROW __nonnull ((1, 2)) __wur;
  30624. /* Read the contents of the symbolic link PATH into no more than
  30625. LEN bytes of BUF. The contents are not null-terminated.
  30626. Returns the number of characters read, or -1 for errors. */
  30627. -extern ssize_t readlink (__const char *__restrict __path,
  30628. +extern ssize_t readlink (const char *__restrict __path,
  30629. char *__restrict __buf, size_t __len)
  30630. __THROW __nonnull ((1, 2)) __wur;
  30631. libc_hidden_proto(readlink)
  30632. @@ -834,27 +907,30 @@
  30633. #ifdef __USE_ATFILE
  30634. /* Like symlink but a relative path in TO is interpreted relative to TOFD. */
  30635. -extern int symlinkat (__const char *__from, int __tofd,
  30636. - __const char *__to) __THROW __nonnull ((1, 3)) __wur;
  30637. +extern int symlinkat (const char *__from, int __tofd,
  30638. + const char *__to) __THROW __nonnull ((1, 3)) __wur;
  30639. +libc_hidden_proto(symlinkat)
  30640. /* Like readlink but a relative PATH is interpreted relative to FD. */
  30641. -extern ssize_t readlinkat (int __fd, __const char *__restrict __path,
  30642. +extern ssize_t readlinkat (int __fd, const char *__restrict __path,
  30643. char *__restrict __buf, size_t __len)
  30644. __THROW __nonnull ((2, 3)) __wur;
  30645. +libc_hidden_proto(readlinkat)
  30646. #endif
  30647. /* Remove the link NAME. */
  30648. -extern int unlink (__const char *__name) __THROW __nonnull ((1));
  30649. +extern int unlink (const char *__name) __THROW __nonnull ((1));
  30650. libc_hidden_proto(unlink)
  30651. #ifdef __USE_ATFILE
  30652. /* Remove the link NAME relative to FD. */
  30653. -extern int unlinkat (int __fd, __const char *__name, int __flag)
  30654. +extern int unlinkat (int __fd, const char *__name, int __flag)
  30655. __THROW __nonnull ((2));
  30656. +libc_hidden_proto(unlinkat)
  30657. #endif
  30658. /* Remove the directory PATH. */
  30659. -extern int rmdir (__const char *__path) __THROW __nonnull ((1));
  30660. +extern int rmdir (const char *__path) __THROW __nonnull ((1));
  30661. libc_hidden_proto(rmdir)
  30662. @@ -884,7 +960,7 @@
  30663. #if 0 /*def __USE_BSD*/
  30664. /* Set the login name returned by `getlogin'. */
  30665. -extern int setlogin (__const char *__name) __THROW __nonnull ((1));
  30666. +extern int setlogin (const char *__name) __THROW __nonnull ((1));
  30667. #endif
  30668. @@ -910,13 +986,14 @@
  30669. #if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98)
  30670. /* Set the name of the current host to NAME, which is LEN bytes long.
  30671. This call is restricted to the super-user. */
  30672. -extern int sethostname (__const char *__name, size_t __len)
  30673. +extern int sethostname (const char *__name, size_t __len)
  30674. __THROW __nonnull ((1)) __wur;
  30675. /* Set the current machine's Internet number to ID.
  30676. This call is restricted to the super-user. */
  30677. extern int sethostid (long int __id) __THROW __wur;
  30678. +
  30679. #if defined __UCLIBC_BSD_SPECIFIC__ || defined _LIBC
  30680. /* Get and set the NIS (aka YP) domain name, if any.
  30681. Called just like `gethostname' and `sethostname'.
  30682. @@ -926,10 +1003,11 @@
  30683. libc_hidden_proto(getdomainname)
  30684. #endif
  30685. #if defined __UCLIBC_BSD_SPECIFIC__
  30686. -extern int setdomainname (__const char *__name, size_t __len)
  30687. +extern int setdomainname (const char *__name, size_t __len)
  30688. __THROW __nonnull ((1)) __wur;
  30689. #endif
  30690. +
  30691. #if defined __UCLIBC_LINUX_SPECIFIC__
  30692. /* Revoke access permissions to all processes currently communicating
  30693. with the control terminal, and then send a SIGHUP signal to the process
  30694. @@ -939,7 +1017,7 @@
  30695. #if 0
  30696. /* Revoke the access of all descriptors currently open on FILE. */
  30697. -extern int revoke (__const char *__file) __THROW __nonnull ((1)) __wur;
  30698. +extern int revoke (const char *__file) __THROW __nonnull ((1)) __wur;
  30699. /* Enable statistical profiling, writing samples of the PC into at most
  30700. @@ -956,7 +1034,7 @@
  30701. /* Turn accounting on if NAME is an existing file. The system will then write
  30702. a record for each process as it terminates, to this file. If NAME is NULL,
  30703. turn accounting off. This call is restricted to the super-user. */
  30704. -extern int acct (__const char *__name) __THROW;
  30705. +extern int acct (const char *__name) __THROW;
  30706. /* Successive calls return the shells listed in `/etc/shells'. */
  30707. @@ -977,21 +1055,21 @@
  30708. #if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
  30709. /* Make PATH be the root directory (the starting point for absolute paths).
  30710. This call is restricted to the super-user. */
  30711. -extern int chroot (__const char *__path) __THROW __nonnull ((1)) __wur;
  30712. +extern int chroot (const char *__path) __THROW __nonnull ((1)) __wur;
  30713. /* Prompt with PROMPT and read a string from the terminal without echoing.
  30714. Uses /dev/tty if possible; otherwise stderr and stdin. */
  30715. -extern char *getpass (__const char *__prompt) __nonnull ((1));
  30716. +extern char *getpass (const char *__prompt) __nonnull ((1));
  30717. #endif /* Use BSD || X/Open. */
  30718. -#if defined __USE_BSD || defined __USE_XOPEN
  30719. +#if defined __USE_BSD || defined __USE_XOPEN || defined __USE_XOPEN2K
  30720. /* Make all changes done to FD actually appear on disk.
  30721. This function is a cancellation point and therefore not marked with
  30722. __THROW. */
  30723. extern int fsync (int __fd);
  30724. -#endif /* Use BSD || X/Open. */
  30725. +#endif /* Use BSD || X/Open || Unix98. */
  30726. #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
  30727. @@ -1017,21 +1095,22 @@
  30728. /* Truncate FILE to LENGTH bytes. */
  30729. # ifndef __USE_FILE_OFFSET64
  30730. -extern int truncate (__const char *__file, __off_t __length)
  30731. +extern int truncate (const char *__file, __off_t __length)
  30732. __THROW __nonnull ((1)) __wur;
  30733. libc_hidden_proto(truncate)
  30734. # else
  30735. # ifdef __REDIRECT_NTH
  30736. extern int __REDIRECT_NTH (truncate,
  30737. - (__const char *__file, __off64_t __length),
  30738. + (const char *__file, __off64_t __length),
  30739. truncate64) __nonnull ((1)) __wur;
  30740. # else
  30741. # define truncate truncate64
  30742. # endif
  30743. # endif
  30744. # ifdef __USE_LARGEFILE64
  30745. -extern int truncate64 (__const char *__file, __off64_t __length)
  30746. +extern int truncate64 (const char *__file, __off64_t __length)
  30747. __THROW __nonnull ((1)) __wur;
  30748. +libc_hidden_proto(truncate64)
  30749. # endif
  30750. #endif /* Use BSD || X/Open Unix. */
  30751. @@ -1120,7 +1199,6 @@
  30752. # endif
  30753. # ifdef __USE_LARGEFILE64
  30754. extern int lockf64 (int __fd, int __cmd, __off64_t __len) __wur;
  30755. -libc_hidden_proto(lockf64)
  30756. # endif
  30757. #endif /* Use misc and F_LOCK not already defined. */
  30758. @@ -1142,7 +1220,7 @@
  30759. && defined __UCLIBC_HAS_REALTIME__
  30760. /* Synchronize at least the data part of a file with the underlying
  30761. media. */
  30762. -extern int fdatasync (int __fildes) __THROW;
  30763. +extern int fdatasync (int __fildes);
  30764. #endif /* Use POSIX199309 */
  30765. @@ -1151,7 +1229,7 @@
  30766. #ifdef __USE_XOPEN
  30767. # if defined __UCLIBC_HAS_CRYPT__
  30768. /* Encrypt at most 8 characters from KEY using salt to perturb DES. */
  30769. -extern char *crypt (__const char *__key, __const char *__salt)
  30770. +extern char *crypt (const char *__key, const char *__salt)
  30771. __THROW __nonnull ((1, 2));
  30772. /* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt
  30773. @@ -1164,7 +1242,7 @@
  30774. FROM and copy the result to TO. The value of TO must not be in the
  30775. range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM
  30776. is without partner. */
  30777. -extern void swab (__const void *__restrict __from, void *__restrict __to,
  30778. +extern void swab (const void *__restrict __from, void *__restrict __to,
  30779. ssize_t __n) __THROW __nonnull ((1, 2));
  30780. #endif
  30781. @@ -1178,7 +1256,7 @@
  30782. /* Define some macros helping to catch buffer overflows. */
  30783. -#if __USE_FORTIFY_LEVEL > 0 && !defined __cplusplus
  30784. +#if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline
  30785. # include <bits/unistd.h>
  30786. #endif
  30787. @@ -1191,6 +1269,7 @@
  30788. #endif
  30789. typedef signed smallint_type smallint;
  30790. typedef unsigned smallint_type smalluint;
  30791. +extern size_t __pagesize attribute_hidden;
  30792. #endif
  30793. diff -Nur uClibc-0.9.33.2/include/utime.h uClibc-git/include/utime.h
  30794. --- uClibc-0.9.33.2/include/utime.h 2012-05-15 09:20:09.000000000 +0200
  30795. +++ uClibc-git/include/utime.h 2014-07-25 20:36:05.181326174 +0200
  30796. @@ -12,9 +12,8 @@
  30797. Lesser General Public License for more details.
  30798. You should have received a copy of the GNU Lesser General Public
  30799. - License along with the GNU C Library; if not, write to the Free
  30800. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  30801. - 02111-1307 USA. */
  30802. + License along with the GNU C Library; if not, see
  30803. + <http://www.gnu.org/licenses/>. */
  30804. /*
  30805. * POSIX Standard: 5.6.6 Set File Access and Modification Times <utime.h>
  30806. @@ -43,8 +42,8 @@
  30807. /* Set the access and modification times of FILE to those given in
  30808. *FILE_TIMES. If FILE_TIMES is NULL, set them to the current time. */
  30809. -extern int utime (__const char *__file,
  30810. - __const struct utimbuf *__file_times)
  30811. +extern int utime (const char *__file,
  30812. + const struct utimbuf *__file_times)
  30813. __THROW __nonnull ((1));
  30814. libc_hidden_proto(utime)
  30815. diff -Nur uClibc-0.9.33.2/include/utmp.h uClibc-git/include/utmp.h
  30816. --- uClibc-0.9.33.2/include/utmp.h 2012-05-15 09:20:09.000000000 +0200
  30817. +++ uClibc-git/include/utmp.h 2014-07-25 20:36:05.181326174 +0200
  30818. @@ -12,9 +12,8 @@
  30819. Lesser General Public License for more details.
  30820. You should have received a copy of the GNU Lesser General Public
  30821. - License along with the GNU C Library; if not, write to the Free
  30822. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  30823. - 02111-1307 USA. */
  30824. + License along with the GNU C Library; if not, see
  30825. + <http://www.gnu.org/licenses/>. */
  30826. #ifndef _UTMP_H
  30827. #define _UTMP_H 1
  30828. @@ -44,60 +43,52 @@
  30829. /* Write the given entry into utmp and wtmp. */
  30830. -extern void login (__const struct utmp *__entry) __THROW;
  30831. +extern void login (const struct utmp *__entry) __THROW;
  30832. /* Write the utmp entry to say the user on UT_LINE has logged out. */
  30833. -extern int logout (__const char *__ut_line) __THROW;
  30834. +extern int logout (const char *__ut_line) __THROW;
  30835. /* Append to wtmp an entry for the current time and the given info. */
  30836. -extern void logwtmp (__const char *__ut_line, __const char *__ut_name,
  30837. - __const char *__ut_host) __THROW;
  30838. +extern void logwtmp (const char *__ut_line, const char *__ut_name,
  30839. + const char *__ut_host) __THROW;
  30840. #endif
  30841. /* Append entry UTMP to the wtmp-like file WTMP_FILE. */
  30842. -extern void updwtmp (__const char *__wtmp_file, __const struct utmp *__utmp)
  30843. +extern void updwtmp (const char *__wtmp_file, const struct utmp *__utmp)
  30844. __THROW;
  30845. -libc_hidden_proto(updwtmp)
  30846. /* Change name of the utmp file to be examined. */
  30847. -extern int utmpname (__const char *__file) __THROW;
  30848. -libc_hidden_proto(utmpname)
  30849. +extern int utmpname (const char *__file) __THROW;
  30850. /* Read next entry from a utmp-like file. */
  30851. extern struct utmp *getutent (void) __THROW;
  30852. -libc_hidden_proto(getutent)
  30853. /* Reset the input stream to the beginning of the file. */
  30854. extern void setutent (void) __THROW;
  30855. -libc_hidden_proto(setutent)
  30856. /* Close the current open file. */
  30857. extern void endutent (void) __THROW;
  30858. -libc_hidden_proto(endutent)
  30859. /* Search forward from the current point in the utmp file until the
  30860. next entry with a ut_type matching ID->ut_type. */
  30861. -extern struct utmp *getutid (__const struct utmp *__id) __THROW;
  30862. -libc_hidden_proto(getutid)
  30863. +extern struct utmp *getutid (const struct utmp *__id) __THROW;
  30864. /* Search forward from the current point in the utmp file until the
  30865. next entry with a ut_line matching LINE->ut_line. */
  30866. -extern struct utmp *getutline (__const struct utmp *__line) __THROW;
  30867. -libc_hidden_proto(getutline)
  30868. +extern struct utmp *getutline (const struct utmp *__line) __THROW;
  30869. /* Write out entry pointed to by UTMP_PTR into the utmp file. */
  30870. -extern struct utmp *pututline (__const struct utmp *__utmp_ptr) __THROW;
  30871. -libc_hidden_proto(pututline)
  30872. +extern struct utmp *pututline (const struct utmp *__utmp_ptr) __THROW;
  30873. #if 0 /* def __USE_MISC */
  30874. /* Reentrant versions of the file for handling utmp files. */
  30875. extern int getutent_r (struct utmp *__buffer, struct utmp **__result) __THROW;
  30876. -extern int getutid_r (__const struct utmp *__id, struct utmp *__buffer,
  30877. +extern int getutid_r (const struct utmp *__id, struct utmp *__buffer,
  30878. struct utmp **__result) __THROW;
  30879. -extern int getutline_r (__const struct utmp *__line,
  30880. +extern int getutline_r (const struct utmp *__line,
  30881. struct utmp *__buffer, struct utmp **__result) __THROW;
  30882. #endif /* Use misc. */
  30883. diff -Nur uClibc-0.9.33.2/include/utmpx.h uClibc-git/include/utmpx.h
  30884. --- uClibc-0.9.33.2/include/utmpx.h 2012-05-15 09:20:09.000000000 +0200
  30885. +++ uClibc-git/include/utmpx.h 2014-07-25 20:36:05.181326174 +0200
  30886. @@ -12,9 +12,8 @@
  30887. Lesser General Public License for more details.
  30888. You should have received a copy of the GNU Lesser General Public
  30889. - License along with the GNU C Library; if not, write to the Free
  30890. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  30891. - 02111-1307 USA. */
  30892. + License along with the GNU C Library; if not, see
  30893. + <http://www.gnu.org/licenses/>. */
  30894. #ifndef _UTMPX_H
  30895. #define _UTMPX_H 1
  30896. @@ -69,19 +68,19 @@
  30897. This function is a possible cancellation point and therefore not
  30898. marked with __THROW. */
  30899. -extern struct utmpx *getutxid (__const struct utmpx *__id);
  30900. +extern struct utmpx *getutxid (const struct utmpx *__id);
  30901. /* Get the user accounting database entry corresponding to LINE.
  30902. This function is a possible cancellation point and therefore not
  30903. marked with __THROW. */
  30904. -extern struct utmpx *getutxline (__const struct utmpx *__line);
  30905. +extern struct utmpx *getutxline (const struct utmpx *__line);
  30906. /* Write the entry UTMPX into the user accounting database.
  30907. This function is a possible cancellation point and therefore not
  30908. marked with __THROW. */
  30909. -extern struct utmpx *pututxline (__const struct utmpx *__utmpx);
  30910. +extern struct utmpx *pututxline (const struct utmpx *__utmpx);
  30911. #ifdef __USE_GNU
  30912. @@ -91,7 +90,7 @@
  30913. cancellation point. But due to similarity with an POSIX interface
  30914. or due to the implementation it is a cancellation point and
  30915. therefore not marked with __THROW. */
  30916. -extern int utmpxname (__const char *__file);
  30917. +extern int utmpxname (const char *__file);
  30918. /* Append entry UTMP to the wtmpx-like file WTMPX_FILE.
  30919. @@ -99,8 +98,8 @@
  30920. cancellation point. But due to similarity with an POSIX interface
  30921. or due to the implementation it is a cancellation point and
  30922. therefore not marked with __THROW. */
  30923. -extern void updwtmpx (__const char *__wtmpx_file,
  30924. - __const struct utmpx *__utmpx);
  30925. +extern void updwtmpx (const char *__wtmpx_file,
  30926. + const struct utmpx *__utmpx);
  30927. /* Copy the information in UTMPX to UTMP.
  30928. @@ -109,7 +108,7 @@
  30929. cancellation point. But due to similarity with an POSIX interface
  30930. or due to the implementation it is a cancellation point and
  30931. therefore not marked with __THROW. */
  30932. -extern void getutmp (__const struct utmpx *__utmpx,
  30933. +extern void getutmp (const struct utmpx *__utmpx,
  30934. struct utmp *__utmp);
  30935. /* Copy the information in UTMP to UTMPX.
  30936. @@ -118,7 +117,7 @@
  30937. cancellation point. But due to similarity with an POSIX interface
  30938. or due to the implementation it is a cancellation point and
  30939. therefore not marked with __THROW. */
  30940. -extern void getutmpx (__const struct utmp *__utmp,
  30941. +extern void getutmpx (const struct utmp *__utmp,
  30942. struct utmpx *__utmpx);
  30943. #endif
  30944. diff -Nur uClibc-0.9.33.2/include/values.h uClibc-git/include/values.h
  30945. --- uClibc-0.9.33.2/include/values.h 2012-05-15 09:20:09.000000000 +0200
  30946. +++ uClibc-git/include/values.h 2014-07-25 20:36:05.185326195 +0200
  30947. @@ -13,9 +13,8 @@
  30948. Lesser General Public License for more details.
  30949. You should have received a copy of the GNU Lesser General Public
  30950. - License along with the GNU C Library; if not, write to the Free
  30951. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  30952. - 02111-1307 USA. */
  30953. + License along with the GNU C Library; if not, see
  30954. + <http://www.gnu.org/licenses/>. */
  30955. /* This interface is obsolete. New programs should use
  30956. <limits.h> and/or <float.h> instead of <values.h>. */
  30957. diff -Nur uClibc-0.9.33.2/include/wchar.h uClibc-git/include/wchar.h
  30958. --- uClibc-0.9.33.2/include/wchar.h 2012-05-15 09:20:09.000000000 +0200
  30959. +++ uClibc-git/include/wchar.h 2014-07-25 20:36:05.185326195 +0200
  30960. @@ -12,9 +12,8 @@
  30961. Lesser General Public License for more details.
  30962. You should have received a copy of the GNU Lesser General Public
  30963. - License along with the GNU C Library; if not, write to the Free
  30964. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  30965. - 02111-1307 USA. */
  30966. + License along with the GNU C Library; if not, see
  30967. + <http://www.gnu.org/licenses/>. */
  30968. /*
  30969. * ISO C99 Standard: 7.24
  30970. @@ -133,46 +132,46 @@
  30971. /* This incomplete type is defined in <time.h> but needed here because
  30972. of `wcsftime'. */
  30973. struct tm;
  30974. +__END_NAMESPACE_STD
  30975. /* XXX We have to clean this up at some point. Since tm is in the std
  30976. namespace but wcsftime is in __c99 the type wouldn't be found
  30977. without inserting it in the global namespace. */
  30978. __USING_NAMESPACE_STD(tm)
  30979. -__END_NAMESPACE_STD
  30980. __BEGIN_NAMESPACE_C99
  30981. /* Copy SRC to DEST. */
  30982. extern wchar_t *wcscpy (wchar_t *__restrict __dest,
  30983. - __const wchar_t *__restrict __src) __THROW;
  30984. + const wchar_t *__restrict __src) __THROW;
  30985. /* Copy no more than N wide-characters of SRC to DEST. */
  30986. extern wchar_t *wcsncpy (wchar_t *__restrict __dest,
  30987. - __const wchar_t *__restrict __src, size_t __n)
  30988. + const wchar_t *__restrict __src, size_t __n)
  30989. __THROW;
  30990. /* Append SRC onto DEST. */
  30991. extern wchar_t *wcscat (wchar_t *__restrict __dest,
  30992. - __const wchar_t *__restrict __src) __THROW;
  30993. + const wchar_t *__restrict __src) __THROW;
  30994. libc_hidden_proto(wcscat)
  30995. /* Append no more than N wide-characters of SRC onto DEST. */
  30996. extern wchar_t *wcsncat (wchar_t *__restrict __dest,
  30997. - __const wchar_t *__restrict __src, size_t __n)
  30998. + const wchar_t *__restrict __src, size_t __n)
  30999. __THROW;
  31000. /* Compare S1 and S2. */
  31001. -extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2)
  31002. +extern int wcscmp (const wchar_t *__s1, const wchar_t *__s2)
  31003. __THROW __attribute_pure__;
  31004. libc_hidden_proto(wcscmp)
  31005. /* Compare N wide-characters of S1 and S2. */
  31006. -extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n)
  31007. +extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n)
  31008. __THROW __attribute_pure__;
  31009. __END_NAMESPACE_C99
  31010. #ifdef __USE_GNU
  31011. /* Compare S1 and S2, ignoring case. */
  31012. -extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) __THROW;
  31013. +extern int wcscasecmp (const wchar_t *__s1, const wchar_t *__s2) __THROW;
  31014. /* Compare no more than N chars of S1 and S2, ignoring case. */
  31015. -extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2,
  31016. +extern int wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2,
  31017. size_t __n) __THROW;
  31018. #ifdef __UCLIBC_HAS_XLOCALE__
  31019. @@ -180,11 +179,11 @@
  31020. the provided locale and not the global locale. */
  31021. # include <xlocale.h>
  31022. -extern int wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2,
  31023. +extern int wcscasecmp_l (const wchar_t *__s1, const wchar_t *__s2,
  31024. __locale_t __loc) __THROW;
  31025. libc_hidden_proto(wcscasecmp_l)
  31026. -extern int wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2,
  31027. +extern int wcsncasecmp_l (const wchar_t *__s1, const wchar_t *__s2,
  31028. size_t __n, __locale_t __loc) __THROW;
  31029. libc_hidden_proto(wcsncasecmp_l)
  31030. #endif /* __UCLIBC_HAS_XLOCALE__ */
  31031. @@ -193,13 +192,13 @@
  31032. __BEGIN_NAMESPACE_C99
  31033. /* Compare S1 and S2, both interpreted as appropriate to the
  31034. LC_COLLATE category of the current locale. */
  31035. -extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) __THROW;
  31036. +extern int wcscoll (const wchar_t *__s1, const wchar_t *__s2) __THROW;
  31037. libc_hidden_proto(wcscoll)
  31038. /* Transform S2 into array pointed to by S1 such that if wcscmp is
  31039. applied to two transformed strings the result is the as applying
  31040. `wcscoll' to the original strings. */
  31041. extern size_t wcsxfrm (wchar_t *__restrict __s1,
  31042. - __const wchar_t *__restrict __s2, size_t __n) __THROW;
  31043. + const wchar_t *__restrict __s2, size_t __n) __THROW;
  31044. __END_NAMESPACE_C99
  31045. #ifdef __USE_GNU
  31046. @@ -209,76 +208,79 @@
  31047. /* Compare S1 and S2, both interpreted as appropriate to the
  31048. LC_COLLATE category of the given locale. */
  31049. -extern int wcscoll_l (__const wchar_t *__s1, __const wchar_t *__s2,
  31050. +extern int wcscoll_l (const wchar_t *__s1, const wchar_t *__s2,
  31051. __locale_t __loc) __THROW;
  31052. libc_hidden_proto(wcscoll_l)
  31053. /* Transform S2 into array pointed to by S1 such that if wcscmp is
  31054. applied to two transformed strings the result is the as applying
  31055. `wcscoll' to the original strings. */
  31056. -extern size_t wcsxfrm_l (wchar_t *__s1, __const wchar_t *__s2,
  31057. +extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2,
  31058. size_t __n, __locale_t __loc) __THROW;
  31059. libc_hidden_proto(wcsxfrm_l)
  31060. #endif /* __UCLIBC_HAS_XLOCALE__ */
  31061. /* Duplicate S, returning an identical malloc'd string. */
  31062. -extern wchar_t *wcsdup (__const wchar_t *__s) __THROW __attribute_malloc__;
  31063. +extern wchar_t *wcsdup (const wchar_t *__s) __THROW __attribute_malloc__;
  31064. #endif
  31065. __BEGIN_NAMESPACE_C99
  31066. /* Find the first occurrence of WC in WCS. */
  31067. -extern wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc)
  31068. +extern wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc)
  31069. __THROW __attribute_pure__;
  31070. /* Find the last occurrence of WC in WCS. */
  31071. -extern wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc)
  31072. +extern wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc)
  31073. __THROW __attribute_pure__;
  31074. __END_NAMESPACE_C99
  31075. #ifdef __USE_GNU
  31076. /* This function is similar to `wcschr'. But it returns a pointer to
  31077. the closing NUL wide character in case C is not found in S. */
  31078. -extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc)
  31079. +extern wchar_t *wcschrnul (const wchar_t *__s, wchar_t __wc)
  31080. __THROW __attribute_pure__;
  31081. #endif
  31082. __BEGIN_NAMESPACE_C99
  31083. /* Return the length of the initial segmet of WCS which
  31084. consists entirely of wide characters not in REJECT. */
  31085. -extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject)
  31086. +extern size_t wcscspn (const wchar_t *__wcs, const wchar_t *__reject)
  31087. __THROW __attribute_pure__;
  31088. /* Return the length of the initial segmet of WCS which
  31089. consists entirely of wide characters in ACCEPT. */
  31090. -extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept)
  31091. +extern size_t wcsspn (const wchar_t *__wcs, const wchar_t *__accept)
  31092. __THROW __attribute_pure__;
  31093. libc_hidden_proto(wcsspn)
  31094. /* Find the first occurrence in WCS of any character in ACCEPT. */
  31095. -extern wchar_t *wcspbrk (__const wchar_t *__wcs, __const wchar_t *__accept)
  31096. +extern wchar_t *wcspbrk (const wchar_t *__wcs, const wchar_t *__accept)
  31097. __THROW __attribute_pure__;
  31098. libc_hidden_proto(wcspbrk)
  31099. /* Find the first occurrence of NEEDLE in HAYSTACK. */
  31100. -extern wchar_t *wcsstr (__const wchar_t *__haystack, __const wchar_t *__needle)
  31101. +/* SuSv uses restrict keyword, glibc does not */
  31102. +extern wchar_t *wcsstr (const wchar_t *__restrict __haystack, const wchar_t *__restrict __needle)
  31103. __THROW __attribute_pure__;
  31104. /* Divide WCS into tokens separated by characters in DELIM. */
  31105. extern wchar_t *wcstok (wchar_t *__restrict __s,
  31106. - __const wchar_t *__restrict __delim,
  31107. + const wchar_t *__restrict __delim,
  31108. wchar_t **__restrict __ptr) __THROW;
  31109. /* Return the number of wide characters in S. */
  31110. -extern size_t wcslen (__const wchar_t *__s) __THROW __attribute_pure__;
  31111. +extern size_t wcslen (const wchar_t *__s) __THROW __attribute_pure__;
  31112. libc_hidden_proto(wcslen)
  31113. __END_NAMESPACE_C99
  31114. #if defined __USE_XOPEN && defined __UCLIBC_SUSV3_LEGACY__
  31115. /* Another name for `wcsstr' from XPG4. */
  31116. -extern wchar_t *wcswcs (__const wchar_t *__haystack, __const wchar_t *__needle)
  31117. +/* SuSv3 did not use restrict keyword, probably because it was marked LEGACY
  31118. + we do to be in sync with wcsstr */
  31119. +extern wchar_t *wcswcs (const wchar_t *__restrict __haystack, const wchar_t *__restrict __needle)
  31120. __THROW __attribute_pure__;
  31121. #endif
  31122. #ifdef __USE_GNU
  31123. /* Return the number of wide characters in S, but at most MAXLEN. */
  31124. -extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen)
  31125. +extern size_t wcsnlen (const wchar_t *__s, size_t __maxlen)
  31126. __THROW __attribute_pure__;
  31127. libc_hidden_proto(wcsnlen)
  31128. #endif
  31129. @@ -286,23 +288,24 @@
  31130. __BEGIN_NAMESPACE_C99
  31131. /* Search N wide characters of S for C. */
  31132. -extern wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, size_t __n)
  31133. +extern wchar_t *wmemchr (const wchar_t *__s, wchar_t __c, size_t __n)
  31134. __THROW __attribute_pure__;
  31135. libc_hidden_proto(wmemchr)
  31136. /* Compare N wide characters of S1 and S2. */
  31137. -extern int wmemcmp (__const wchar_t *__restrict __s1,
  31138. - __const wchar_t *__restrict __s2, size_t __n)
  31139. +/* SuSv4 does not use restrict keyword for S1 and S2, glibc does */
  31140. +extern int wmemcmp (const wchar_t *__s1,
  31141. + const wchar_t *__s2, size_t __n)
  31142. __THROW __attribute_pure__;
  31143. /* Copy N wide characters of SRC to DEST. */
  31144. extern wchar_t *wmemcpy (wchar_t *__restrict __s1,
  31145. - __const wchar_t *__restrict __s2, size_t __n) __THROW;
  31146. + const wchar_t *__restrict __s2, size_t __n) __THROW;
  31147. libc_hidden_proto(wmemcpy)
  31148. /* Copy N wide characters of SRC to DEST, guaranteeing
  31149. correct behavior for overlapping strings. */
  31150. -extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n)
  31151. +extern wchar_t *wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n)
  31152. __THROW;
  31153. /* Set N wide characters of S to C. */
  31154. @@ -313,7 +316,7 @@
  31155. /* Copy N wide characters of SRC to DEST and return pointer to following
  31156. wide character. */
  31157. extern wchar_t *wmempcpy (wchar_t *__restrict __s1,
  31158. - __const wchar_t *__restrict __s2, size_t __n)
  31159. + const wchar_t *__restrict __s2, size_t __n)
  31160. __THROW;
  31161. libc_hidden_proto(wmempcpy)
  31162. #endif
  31163. @@ -331,13 +334,13 @@
  31164. /* Determine whether PS points to an object representing the initial
  31165. state. */
  31166. -extern int mbsinit (__const mbstate_t *__ps) __THROW __attribute_pure__;
  31167. +extern int mbsinit (const mbstate_t *__ps) __THROW __attribute_pure__;
  31168. libc_hidden_proto(mbsinit)
  31169. /* Write wide character representation of multibyte character pointed
  31170. to by S to PWC. */
  31171. extern size_t mbrtowc (wchar_t *__restrict __pwc,
  31172. - __const char *__restrict __s, size_t __n,
  31173. + const char *__restrict __s, size_t __n,
  31174. mbstate_t *__p) __THROW;
  31175. libc_hidden_proto(mbrtowc)
  31176. @@ -348,24 +351,24 @@
  31177. /* Return number of bytes in multibyte character pointed to by S. */
  31178. #if 0 /* uClibc: disabled */
  31179. -extern size_t __mbrlen (__const char *__restrict __s, size_t __n,
  31180. +extern size_t __mbrlen (const char *__restrict __s, size_t __n,
  31181. mbstate_t *__restrict __ps) __THROW;
  31182. #endif
  31183. -extern size_t mbrlen (__const char *__restrict __s, size_t __n,
  31184. +extern size_t mbrlen (const char *__restrict __s, size_t __n,
  31185. mbstate_t *__restrict __ps) __THROW;
  31186. libc_hidden_proto(mbrlen)
  31187. /* Write wide character representation of multibyte character string
  31188. SRC to DST. */
  31189. extern size_t mbsrtowcs (wchar_t *__restrict __dst,
  31190. - __const char **__restrict __src, size_t __len,
  31191. + const char **__restrict __src, size_t __len,
  31192. mbstate_t *__restrict __ps) __THROW;
  31193. libc_hidden_proto(mbsrtowcs)
  31194. /* Write multibyte character representation of wide character string
  31195. SRC to DST. */
  31196. extern size_t wcsrtombs (char *__restrict __dst,
  31197. - __const wchar_t **__restrict __src, size_t __len,
  31198. + const wchar_t **__restrict __src, size_t __len,
  31199. mbstate_t *__restrict __ps) __THROW;
  31200. libc_hidden_proto(wcsrtombs)
  31201. __END_NAMESPACE_C99
  31202. @@ -375,14 +378,14 @@
  31203. /* Write wide character representation of at most NMC bytes of the
  31204. multibyte character string SRC to DST. */
  31205. extern size_t mbsnrtowcs (wchar_t *__restrict __dst,
  31206. - __const char **__restrict __src, size_t __nmc,
  31207. + const char **__restrict __src, size_t __nmc,
  31208. size_t __len, mbstate_t *__restrict __ps) __THROW;
  31209. libc_hidden_proto(mbsnrtowcs)
  31210. /* Write multibyte character representation of at most NWC characters
  31211. from the wide character string SRC to DST. */
  31212. extern size_t wcsnrtombs (char *__restrict __dst,
  31213. - __const wchar_t **__restrict __src,
  31214. + const wchar_t **__restrict __src,
  31215. size_t __nwc, size_t __len,
  31216. mbstate_t *__restrict __ps) __THROW;
  31217. libc_hidden_proto(wcsnrtombs)
  31218. @@ -396,7 +399,7 @@
  31219. /* Determine number of column positions required for first N wide
  31220. characters (or fewer if S ends before this) in S. */
  31221. -extern int wcswidth (__const wchar_t *__s, size_t __n) __THROW;
  31222. +extern int wcswidth (const wchar_t *__s, size_t __n) __THROW;
  31223. libc_hidden_proto(wcswidth)
  31224. #endif /* Use X/Open. */
  31225. @@ -405,14 +408,14 @@
  31226. #ifdef __UCLIBC_HAS_FLOATS__
  31227. /* Convert initial portion of the wide string NPTR to `double'
  31228. representation. */
  31229. -extern double wcstod (__const wchar_t *__restrict __nptr,
  31230. +extern double wcstod (const wchar_t *__restrict __nptr,
  31231. wchar_t **__restrict __endptr) __THROW;
  31232. #ifdef __USE_ISOC99
  31233. /* Likewise for `float' and `long double' sizes of floating-point numbers. */
  31234. -extern float wcstof (__const wchar_t *__restrict __nptr,
  31235. +extern float wcstof (const wchar_t *__restrict __nptr,
  31236. wchar_t **__restrict __endptr) __THROW;
  31237. -extern long double wcstold (__const wchar_t *__restrict __nptr,
  31238. +extern long double wcstold (const wchar_t *__restrict __nptr,
  31239. wchar_t **__restrict __endptr) __THROW;
  31240. #endif /* C99 */
  31241. #endif /* __UCLIBC_HAS_FLOATS__ */
  31242. @@ -420,44 +423,44 @@
  31243. /* Convert initial portion of wide string NPTR to `long int'
  31244. representation. */
  31245. -extern long int wcstol (__const wchar_t *__restrict __nptr,
  31246. +extern long int wcstol (const wchar_t *__restrict __nptr,
  31247. wchar_t **__restrict __endptr, int __base) __THROW;
  31248. /* Convert initial portion of wide string NPTR to `unsigned long int'
  31249. representation. */
  31250. -extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr,
  31251. +extern unsigned long int wcstoul (const wchar_t *__restrict __nptr,
  31252. wchar_t **__restrict __endptr, int __base)
  31253. __THROW;
  31254. #if defined __USE_ISOC99 || (defined __GNUC__ && defined __USE_GNU)
  31255. -/* Convert initial portion of wide string NPTR to `long int'
  31256. +/* Convert initial portion of wide string NPTR to `long long int'
  31257. representation. */
  31258. __extension__
  31259. -extern long long int wcstoll (__const wchar_t *__restrict __nptr,
  31260. +extern long long int wcstoll (const wchar_t *__restrict __nptr,
  31261. wchar_t **__restrict __endptr, int __base)
  31262. __THROW;
  31263. /* Convert initial portion of wide string NPTR to `unsigned long long int'
  31264. representation. */
  31265. __extension__
  31266. -extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr,
  31267. +extern unsigned long long int wcstoull (const wchar_t *__restrict __nptr,
  31268. wchar_t **__restrict __endptr,
  31269. int __base) __THROW;
  31270. #endif /* ISO C99 or GCC and GNU. */
  31271. __END_NAMESPACE_C99
  31272. #if defined __GNUC__ && defined __USE_GNU
  31273. -/* Convert initial portion of wide string NPTR to `long int'
  31274. +/* Convert initial portion of wide string NPTR to `long long int'
  31275. representation. */
  31276. __extension__
  31277. -extern long long int wcstoq (__const wchar_t *__restrict __nptr,
  31278. +extern long long int wcstoq (const wchar_t *__restrict __nptr,
  31279. wchar_t **__restrict __endptr, int __base)
  31280. __THROW;
  31281. /* Convert initial portion of wide string NPTR to `unsigned long long int'
  31282. representation. */
  31283. __extension__
  31284. -extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr,
  31285. +extern unsigned long long int wcstouq (const wchar_t *__restrict __nptr,
  31286. wchar_t **__restrict __endptr,
  31287. int __base) __THROW;
  31288. #endif /* GCC and use GNU. */
  31289. @@ -481,35 +484,35 @@
  31290. /* Special versions of the functions above which take the locale to
  31291. use as an additional parameter. */
  31292. -extern long int wcstol_l (__const wchar_t *__restrict __nptr,
  31293. +extern long int wcstol_l (const wchar_t *__restrict __nptr,
  31294. wchar_t **__restrict __endptr, int __base,
  31295. __locale_t __loc) __THROW;
  31296. -extern unsigned long int wcstoul_l (__const wchar_t *__restrict __nptr,
  31297. +extern unsigned long int wcstoul_l (const wchar_t *__restrict __nptr,
  31298. wchar_t **__restrict __endptr,
  31299. int __base, __locale_t __loc) __THROW;
  31300. __extension__
  31301. -extern long long int wcstoll_l (__const wchar_t *__restrict __nptr,
  31302. +extern long long int wcstoll_l (const wchar_t *__restrict __nptr,
  31303. wchar_t **__restrict __endptr,
  31304. int __base, __locale_t __loc) __THROW;
  31305. __extension__
  31306. -extern unsigned long long int wcstoull_l (__const wchar_t *__restrict __nptr,
  31307. +extern unsigned long long int wcstoull_l (const wchar_t *__restrict __nptr,
  31308. wchar_t **__restrict __endptr,
  31309. int __base, __locale_t __loc)
  31310. __THROW;
  31311. #ifdef __UCLIBC_HAS_FLOATS__
  31312. -extern double wcstod_l (__const wchar_t *__restrict __nptr,
  31313. +extern double wcstod_l (const wchar_t *__restrict __nptr,
  31314. wchar_t **__restrict __endptr, __locale_t __loc)
  31315. __THROW;
  31316. -extern float wcstof_l (__const wchar_t *__restrict __nptr,
  31317. +extern float wcstof_l (const wchar_t *__restrict __nptr,
  31318. wchar_t **__restrict __endptr, __locale_t __loc)
  31319. __THROW;
  31320. -extern long double wcstold_l (__const wchar_t *__restrict __nptr,
  31321. +extern long double wcstold_l (const wchar_t *__restrict __nptr,
  31322. wchar_t **__restrict __endptr,
  31323. __locale_t __loc) __THROW;
  31324. #endif /* __UCLIBC_HAS_FLOATS__ */
  31325. @@ -520,11 +523,11 @@
  31326. #ifdef __USE_GNU
  31327. /* Copy SRC to DEST, returning the address of the terminating L'\0' in
  31328. DEST. */
  31329. -extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) __THROW;
  31330. +extern wchar_t *wcpcpy (wchar_t *__dest, const wchar_t *__src) __THROW;
  31331. /* Copy no more than N characters of SRC to DEST, returning the address of
  31332. the last character written into DEST. */
  31333. -extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n)
  31334. +extern wchar_t *wcpncpy (wchar_t *__dest, const wchar_t *__src, size_t __n)
  31335. __THROW;
  31336. #endif /* use GNU */
  31337. @@ -542,17 +545,17 @@
  31338. This function is a possible cancellation point and therefore not
  31339. marked with __THROW. */
  31340. extern int fwprintf (__FILE *__restrict __stream,
  31341. - __const wchar_t *__restrict __format, ...)
  31342. + const wchar_t *__restrict __format, ...)
  31343. /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */;
  31344. /* Write formatted output to stdout.
  31345. This function is a possible cancellation point and therefore not
  31346. marked with __THROW. */
  31347. -extern int wprintf (__const wchar_t *__restrict __format, ...)
  31348. +extern int wprintf (const wchar_t *__restrict __format, ...)
  31349. /* __attribute__ ((__format__ (__wprintf__, 1, 2))) */;
  31350. /* Write formatted output of at most N characters to S. */
  31351. extern int swprintf (wchar_t *__restrict __s, size_t __n,
  31352. - __const wchar_t *__restrict __format, ...)
  31353. + const wchar_t *__restrict __format, ...)
  31354. __THROW /* __attribute__ ((__format__ (__wprintf__, 3, 4))) */;
  31355. /* Write formatted output to S from argument list ARG.
  31356. @@ -560,7 +563,7 @@
  31357. This function is a possible cancellation point and therefore not
  31358. marked with __THROW. */
  31359. extern int vfwprintf (__FILE *__restrict __s,
  31360. - __const wchar_t *__restrict __format,
  31361. + const wchar_t *__restrict __format,
  31362. __gnuc_va_list __arg)
  31363. /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */;
  31364. libc_hidden_proto(vfwprintf)
  31365. @@ -568,13 +571,13 @@
  31366. This function is a possible cancellation point and therefore not
  31367. marked with __THROW. */
  31368. -extern int vwprintf (__const wchar_t *__restrict __format,
  31369. +extern int vwprintf (const wchar_t *__restrict __format,
  31370. __gnuc_va_list __arg)
  31371. /* __attribute__ ((__format__ (__wprintf__, 1, 0))) */;
  31372. /* Write formatted output of at most N character to S from argument
  31373. list ARG. */
  31374. extern int vswprintf (wchar_t *__restrict __s, size_t __n,
  31375. - __const wchar_t *__restrict __format,
  31376. + const wchar_t *__restrict __format,
  31377. __gnuc_va_list __arg)
  31378. __THROW /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */;
  31379. libc_hidden_proto(vswprintf)
  31380. @@ -585,17 +588,17 @@
  31381. This function is a possible cancellation point and therefore not
  31382. marked with __THROW. */
  31383. extern int fwscanf (__FILE *__restrict __stream,
  31384. - __const wchar_t *__restrict __format, ...)
  31385. + const wchar_t *__restrict __format, ...)
  31386. /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
  31387. /* Read formatted input from stdin.
  31388. This function is a possible cancellation point and therefore not
  31389. marked with __THROW. */
  31390. -extern int wscanf (__const wchar_t *__restrict __format, ...)
  31391. +extern int wscanf (const wchar_t *__restrict __format, ...)
  31392. /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */;
  31393. /* Read formatted input from S. */
  31394. -extern int swscanf (__const wchar_t *__restrict __s,
  31395. - __const wchar_t *__restrict __format, ...)
  31396. +extern int swscanf (const wchar_t *__restrict __s,
  31397. + const wchar_t *__restrict __format, ...)
  31398. __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
  31399. __END_NAMESPACE_C99
  31400. @@ -609,7 +612,7 @@
  31401. This function is a possible cancellation point and therefore not
  31402. marked with __THROW. */
  31403. extern int vfwscanf (__FILE *__restrict __s,
  31404. - __const wchar_t *__restrict __format,
  31405. + const wchar_t *__restrict __format,
  31406. __gnuc_va_list __arg)
  31407. /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
  31408. libc_hidden_proto(vfwscanf)
  31409. @@ -617,12 +620,12 @@
  31410. This function is a possible cancellation point and therefore not
  31411. marked with __THROW. */
  31412. -extern int vwscanf (__const wchar_t *__restrict __format,
  31413. +extern int vwscanf (const wchar_t *__restrict __format,
  31414. __gnuc_va_list __arg)
  31415. /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */;
  31416. /* Read formatted input from S into argument list ARG. */
  31417. -extern int vswscanf (__const wchar_t *__restrict __s,
  31418. - __const wchar_t *__restrict __format,
  31419. +extern int vswscanf (const wchar_t *__restrict __s,
  31420. + const wchar_t *__restrict __format,
  31421. __gnuc_va_list __arg)
  31422. __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
  31423. libc_hidden_proto(vswscanf)
  31424. @@ -652,6 +655,7 @@
  31425. These functions are possible cancellation points and therefore not
  31426. marked with __THROW. */
  31427. extern wint_t fputwc (wchar_t __wc, __FILE *__stream);
  31428. +libc_hidden_proto(fputwc)
  31429. extern wint_t putwc (wchar_t __wc, __FILE *__stream);
  31430. /* Write a character to stdout.
  31431. @@ -673,7 +677,7 @@
  31432. This function is a possible cancellation points and therefore not
  31433. marked with __THROW. */
  31434. -extern int fputws (__const wchar_t *__restrict __ws,
  31435. +extern int fputws (const wchar_t *__restrict __ws,
  31436. __FILE *__restrict __stream);
  31437. libc_hidden_proto(fputws)
  31438. @@ -743,7 +747,7 @@
  31439. cancellation point. But due to similarity with an POSIX interface
  31440. or due to the implementation it is a cancellation point and
  31441. therefore not marked with __THROW. */
  31442. -extern int fputws_unlocked (__const wchar_t *__restrict __ws,
  31443. +extern int fputws_unlocked (const wchar_t *__restrict __ws,
  31444. __FILE *__restrict __stream);
  31445. libc_hidden_proto(fputws_unlocked)
  31446. #endif
  31447. @@ -754,8 +758,8 @@
  31448. Write no more than MAXSIZE wide characters and return the number
  31449. of wide characters written, or 0 if it would exceed MAXSIZE. */
  31450. extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize,
  31451. - __const wchar_t *__restrict __format,
  31452. - __const struct tm *__restrict __tp) __THROW;
  31453. + const wchar_t *__restrict __format,
  31454. + const struct tm *__restrict __tp) __THROW;
  31455. __END_NAMESPACE_C99
  31456. # if defined __USE_GNU && defined __UCLIBC_HAS_XLOCALE__
  31457. @@ -764,8 +768,8 @@
  31458. /* Similar to `wcsftime' but takes the information from
  31459. the provided locale and not the global locale. */
  31460. extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize,
  31461. - __const wchar_t *__restrict __format,
  31462. - __const struct tm *__restrict __tp,
  31463. + const wchar_t *__restrict __format,
  31464. + const struct tm *__restrict __tp,
  31465. __locale_t __loc) __THROW;
  31466. libc_hidden_proto(wcsftime_l)
  31467. # endif
  31468. diff -Nur uClibc-0.9.33.2/include/wctype.h uClibc-git/include/wctype.h
  31469. --- uClibc-0.9.33.2/include/wctype.h 2012-05-15 09:20:09.000000000 +0200
  31470. +++ uClibc-git/include/wctype.h 2014-07-25 20:36:05.185326195 +0200
  31471. @@ -12,9 +12,8 @@
  31472. Lesser General Public License for more details.
  31473. You should have received a copy of the GNU Lesser General Public
  31474. - License along with the GNU C Library; if not, write to the Free
  31475. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  31476. - 02111-1307 USA. */
  31477. + License along with the GNU C Library; if not, see
  31478. + <http://www.gnu.org/licenses/>. */
  31479. /*
  31480. * ISO C99 Standard: 7.25
  31481. @@ -183,7 +182,7 @@
  31482. /* Construct value that describes a class of wide characters identified
  31483. by the string argument PROPERTY. */
  31484. -extern wctype_t wctype (__const char *__property) __THROW;
  31485. +extern wctype_t wctype (const char *__property) __THROW;
  31486. libc_hidden_proto(wctype)
  31487. /* Determine whether the wide-character WC has the property described by
  31488. @@ -200,7 +199,7 @@
  31489. __BEGIN_NAMESPACE_C99
  31490. /* Scalar type that can hold values which represent locale-specific
  31491. character mappings. */
  31492. -/* uClibc note: glibc uses - typedef __const __int32_t *wctrans_t; */
  31493. +/* uClibc note: glibc uses - typedef const __int32_t *wctrans_t; */
  31494. typedef unsigned int wctrans_t;
  31495. __END_NAMESPACE_C99
  31496. #ifdef __USE_GNU
  31497. @@ -235,7 +234,7 @@
  31498. __BEGIN_NAMESPACE_C99
  31499. /* Construct value that describes a mapping between wide characters
  31500. identified by the string argument PROPERTY. */
  31501. -extern wctrans_t wctrans (__const char *__property) __THROW;
  31502. +extern wctrans_t wctrans (const char *__property) __THROW;
  31503. libc_hidden_proto(wctrans)
  31504. /* Map the wide character WC using the mapping described by DESC. */
  31505. @@ -304,7 +303,7 @@
  31506. /* Construct value that describes a class of wide characters identified
  31507. by the string argument PROPERTY. */
  31508. -extern wctype_t wctype_l (__const char *__property, __locale_t __locale)
  31509. +extern wctype_t wctype_l (const char *__property, __locale_t __locale)
  31510. __THROW;
  31511. /* Determine whether the wide-character WC has the property described by
  31512. @@ -328,7 +327,7 @@
  31513. /* Construct value that describes a mapping between wide characters
  31514. identified by the string argument PROPERTY. */
  31515. -extern wctrans_t wctrans_l (__const char *__property, __locale_t __locale)
  31516. +extern wctrans_t wctrans_l (const char *__property, __locale_t __locale)
  31517. __THROW;
  31518. /* Map the wide character WC using the mapping described by DESC. */
  31519. diff -Nur uClibc-0.9.33.2/include/wordexp.h uClibc-git/include/wordexp.h
  31520. --- uClibc-0.9.33.2/include/wordexp.h 2012-05-15 09:20:09.000000000 +0200
  31521. +++ uClibc-git/include/wordexp.h 2014-07-25 20:36:05.185326195 +0200
  31522. @@ -12,9 +12,8 @@
  31523. Lesser General Public License for more details.
  31524. You should have received a copy of the GNU Lesser General Public
  31525. - License along with the GNU C Library; if not, write to the Free
  31526. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  31527. - 02111-1307 USA. */
  31528. + License along with the GNU C Library; if not, see
  31529. + <http://www.gnu.org/licenses/>. */
  31530. #ifndef _WORDEXP_H
  31531. #define _WORDEXP_H 1
  31532. @@ -60,7 +59,7 @@
  31533. };
  31534. /* Do word expansion of WORDS into PWORDEXP. */
  31535. -extern int wordexp (__const char *__restrict __words,
  31536. +extern int wordexp (const char *__restrict __words,
  31537. wordexp_t *__restrict __pwordexp, int __flags);
  31538. /* Free the storage allocated by a `wordexp' call. */
  31539. diff -Nur uClibc-0.9.33.2/include/xlocale.h uClibc-git/include/xlocale.h
  31540. --- uClibc-0.9.33.2/include/xlocale.h 2012-05-15 09:20:09.000000000 +0200
  31541. +++ uClibc-git/include/xlocale.h 2014-07-25 20:36:05.185326195 +0200
  31542. @@ -14,9 +14,8 @@
  31543. Lesser General Public License for more details.
  31544. You should have received a copy of the GNU Lesser General Public
  31545. - License along with the GNU C Library; if not, write to the Free
  31546. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  31547. - 02111-1307 USA. */
  31548. + License along with the GNU C Library; if not, see
  31549. + <http://www.gnu.org/licenses/>. */
  31550. #ifndef _XLOCALE_H
  31551. #define _XLOCALE_H 1
  31552. @@ -39,11 +38,11 @@
  31553. /* Note: LC_ALL is not a valid index into this array. */
  31554. const char *__names[13];
  31555. } *__locale_t;
  31556. +#else
  31557. +# include <bits/uClibc_locale.h>
  31558. +#endif
  31559. /* POSIX 2008 makes locale_t official. */
  31560. typedef __locale_t locale_t;
  31561. -#else
  31562. -# include <locale.h>
  31563. -#endif
  31564. #endif /* xlocale.h */
  31565. diff -Nur uClibc-0.9.33.2/ldso/include/dl-defs.h uClibc-git/ldso/include/dl-defs.h
  31566. --- uClibc-0.9.33.2/ldso/include/dl-defs.h 2012-05-15 09:20:09.000000000 +0200
  31567. +++ uClibc-git/ldso/include/dl-defs.h 2014-07-25 20:36:05.209326321 +0200
  31568. @@ -5,8 +5,8 @@
  31569. * GNU Lesser General Public License version 2.1 or later.
  31570. */
  31571. -#ifndef _LD_DEFS_H
  31572. -#define _LD_DEFS_H
  31573. +#ifndef _DL_DEFS_H
  31574. +#define _DL_DEFS_H
  31575. #define FLAG_ANY -1
  31576. #define FLAG_TYPE_MASK 0x00ff
  31577. @@ -72,6 +72,11 @@
  31578. #endif
  31579. +#ifdef _LIBC
  31580. +/* arch specific defines */
  31581. +#include <dl-sysdep.h>
  31582. +#endif
  31583. +
  31584. /* Provide a means for a port to pass additional arguments to the _dl_start
  31585. function. */
  31586. #ifndef DL_START
  31587. @@ -281,4 +286,4 @@
  31588. # define DL_GET_RUN_ADDR(loadaddr, mapaddr) (mapaddr)
  31589. #endif
  31590. -#endif /* _LD_DEFS_H */
  31591. +#endif /* _DL_DEFS_H */
  31592. diff -Nur uClibc-0.9.33.2/ldso/include/dl-elf.h uClibc-git/ldso/include/dl-elf.h
  31593. --- uClibc-0.9.33.2/ldso/include/dl-elf.h 2012-05-15 09:20:09.000000000 +0200
  31594. +++ uClibc-git/ldso/include/dl-elf.h 2014-07-25 20:36:05.209326321 +0200
  31595. @@ -5,19 +5,22 @@
  31596. * GNU Lesser General Public License version 2.1 or later.
  31597. */
  31598. -#ifndef LINUXELF_H
  31599. -#define LINUXELF_H
  31600. +#ifndef _DL_ELF_H
  31601. +#define _DL_ELF_H
  31602. +#include <features.h>
  31603. +#include <bits/wordsize.h>
  31604. #include <dl-string.h> /* before elf.h to get ELF_USES_RELOCA right */
  31605. #include <elf.h>
  31606. #include <link.h>
  31607. +#include <dl-defs.h>
  31608. +#include <dlfcn.h>
  31609. -/* Forward declarations for stuff defined in ld_hash.h */
  31610. +/* Forward declarations for stuff defined in dl-hash.h */
  31611. struct dyn_elf;
  31612. struct elf_resolve;
  31613. struct r_scope_elem;
  31614. -#include <dl-defs.h>
  31615. #ifdef __LDSO_CACHE_SUPPORT__
  31616. extern int _dl_map_cache(void);
  31617. extern int _dl_unmap_cache(void);
  31618. @@ -29,7 +32,7 @@
  31619. #define DL_RESOLVE_SECURE 0x0001
  31620. #define DL_RESOLVE_NOLOAD 0x0002
  31621. -/* Function prototypes for non-static stuff in readelflib1.c */
  31622. +/* Function prototypes for non-static stuff in elfinterp.c */
  31623. extern void _dl_parse_lazy_relocation_information(struct dyn_elf *rpnt,
  31624. unsigned long rel_addr, unsigned long rel_size);
  31625. extern int _dl_parse_relocation_information(struct dyn_elf *rpnt,
  31626. @@ -39,8 +42,6 @@
  31627. int trace_loaded_objects);
  31628. extern struct elf_resolve * _dl_load_elf_shared_library(unsigned rflags,
  31629. struct dyn_elf **rpnt, const char *libname);
  31630. -extern struct elf_resolve *_dl_check_if_named_library_is_loaded(const char *full_libname,
  31631. - int trace_loaded_objects);
  31632. extern int _dl_linux_resolve(void);
  31633. extern int _dl_fixup(struct dyn_elf *rpnt, struct r_scope_elem *scope, int flag);
  31634. extern void _dl_protect_relro (struct elf_resolve *l);
  31635. @@ -222,11 +223,6 @@
  31636. #ifdef __DSBT__
  31637. /* Get the mapped address of the DSBT base. */
  31638. ADJUST_DYN_INFO(DT_DSBT_BASE_IDX, load_off);
  31639. -
  31640. - /* Initialize loadmap dsbt info. */
  31641. - load_off.map->dsbt_table = (void *)dynamic_info[DT_DSBT_BASE_IDX];
  31642. - load_off.map->dsbt_size = dynamic_info[DT_DSBT_SIZE_IDX];
  31643. - load_off.map->dsbt_index = dynamic_info[DT_DSBT_INDEX_IDX];
  31644. #endif
  31645. #undef ADJUST_DYN_INFO
  31646. return rtld_flags;
  31647. @@ -259,4 +255,4 @@
  31648. (((X) & PF_X) ? PROT_EXEC : 0))
  31649. -#endif /* LINUXELF_H */
  31650. +#endif /* _DL_ELF_H */
  31651. diff -Nur uClibc-0.9.33.2/ldso/include/dlfcn.h uClibc-git/ldso/include/dlfcn.h
  31652. --- uClibc-0.9.33.2/ldso/include/dlfcn.h 2012-05-15 09:20:09.000000000 +0200
  31653. +++ uClibc-git/ldso/include/dlfcn.h 2014-07-25 20:36:05.213326342 +0200
  31654. @@ -19,9 +19,9 @@
  31655. `dladdr'. */
  31656. typedef struct
  31657. {
  31658. - __const char *dli_fname; /* File name of defining object. */
  31659. + const char *dli_fname; /* File name of defining object. */
  31660. void *dli_fbase; /* Load address of that object. */
  31661. - __const char *dli_sname; /* Name of nearest symbol. */
  31662. + const char *dli_sname; /* Name of nearest symbol. */
  31663. void *dli_saddr; /* Exact value of nearest symbol. */
  31664. } Dl_info;
  31665. diff -Nur uClibc-0.9.33.2/ldso/include/dl-hash.h uClibc-git/ldso/include/dl-hash.h
  31666. --- uClibc-0.9.33.2/ldso/include/dl-hash.h 2012-05-15 09:20:09.000000000 +0200
  31667. +++ uClibc-git/ldso/include/dl-hash.h 2014-07-25 20:36:05.209326321 +0200
  31668. @@ -5,8 +5,8 @@
  31669. * GNU Lesser General Public License version 2.1 or later.
  31670. */
  31671. -#ifndef _LD_HASH_H_
  31672. -#define _LD_HASH_H_
  31673. +#ifndef _DL_HASH_H
  31674. +#define _DL_HASH_H
  31675. #ifndef RTLD_NEXT
  31676. #define RTLD_NEXT ((void*)-1)
  31677. @@ -139,6 +139,12 @@
  31678. memory when the module is dlclose()d. */
  31679. struct funcdesc_ht *funcdesc_ht;
  31680. #endif
  31681. +#ifdef __DSBT__
  31682. + /* Information for DSBT */
  31683. + void **dsbt_table;
  31684. + unsigned long dsbt_size;
  31685. + unsigned long dsbt_index;
  31686. +#endif
  31687. };
  31688. #define RELOCS_DONE 0x000001
  31689. @@ -160,17 +166,7 @@
  31690. struct elf_resolve *mytpnt, int type_class,
  31691. struct symbol_ref *symbol);
  31692. -extern int _dl_linux_dynamic_link(void);
  31693. -
  31694. extern char * _dl_library_path;
  31695. -extern char * _dl_not_lazy;
  31696. -
  31697. -static __inline__ int _dl_symbol(char * name)
  31698. -{
  31699. - if (name[0] != '_' || name[1] != 'd' || name[2] != 'l' || name[3] != '_')
  31700. - return 0;
  31701. - return 1;
  31702. -}
  31703. #define LD_ERROR_NOFILE 1
  31704. #define LD_ERROR_NOZERO 2
  31705. @@ -184,4 +180,4 @@
  31706. #define LD_BAD_HANDLE 10
  31707. #define LD_NO_SYMBOL 11
  31708. -#endif /* _LD_HASH_H_ */
  31709. +#endif /* _DL_HASH_H */
  31710. diff -Nur uClibc-0.9.33.2/ldso/include/dl-string.h uClibc-git/ldso/include/dl-string.h
  31711. --- uClibc-0.9.33.2/ldso/include/dl-string.h 2012-05-15 09:20:09.000000000 +0200
  31712. +++ uClibc-git/ldso/include/dl-string.h 2014-07-25 20:36:05.209326321 +0200
  31713. @@ -5,12 +5,16 @@
  31714. * GNU Lesser General Public License version 2.1 or later.
  31715. */
  31716. -#ifndef _LINUX_STRING_H_
  31717. -#define _LINUX_STRING_H_
  31718. +#ifndef _DL_STRING_H
  31719. +#define _DL_STRING_H
  31720. -#include <dl-sysdep.h> /* for do_rem */
  31721. #include <features.h>
  31722. +#define __need_NULL
  31723. +#include <stddef.h>
  31724. +
  31725. +#include <dl-defs.h> /* for do_rem by dl-sysdep.h */
  31726. +
  31727. /* provide some sane defaults */
  31728. #ifndef do_rem
  31729. # define do_rem(result, n, base) ((result) = (n) % (base))
  31730. @@ -19,25 +23,7 @@
  31731. # define do_div_10(result, remain) ((result) /= 10)
  31732. #endif
  31733. -static size_t _dl_strlen(const char *str);
  31734. -static char *_dl_strcat(char *dst, const char *src);
  31735. -static char *_dl_strcpy(char *dst, const char *src);
  31736. -static int _dl_strcmp(const char *s1, const char *s2);
  31737. -static int _dl_strncmp(const char *s1, const char *s2, size_t len);
  31738. -static char *_dl_strchr(const char *str, int c);
  31739. -static char *_dl_strrchr(const char *str, int c);
  31740. -static char *_dl_strstr(const char *s1, const char *s2);
  31741. -static void *_dl_memcpy(void *dst, const void *src, size_t len);
  31742. -static int _dl_memcmp(const void *s1, const void *s2, size_t len);
  31743. -static void *_dl_memset(void *str, int c, size_t len);
  31744. -static char *_dl_get_last_path_component(char *path);
  31745. -static char *_dl_simple_ltoa(char *local, unsigned long i);
  31746. -static char *_dl_simple_ltoahex(char *local, unsigned long i);
  31747. -
  31748. -#ifndef NULL
  31749. -#define NULL ((void *) 0)
  31750. -#endif
  31751. -
  31752. +#ifdef IS_IN_rtld
  31753. static __always_inline size_t _dl_strlen(const char *str)
  31754. {
  31755. register const char *ptr = (char *) str-1;
  31756. @@ -84,22 +70,6 @@
  31757. return c1 - c2;
  31758. }
  31759. -static __always_inline int _dl_strncmp(const char *s1, const char *s2, size_t len)
  31760. -{
  31761. - register unsigned char c1 = '\0';
  31762. - register unsigned char c2 = '\0';
  31763. -
  31764. - s1--;s2--;
  31765. - while (len > 0) {
  31766. - c1 = (unsigned char) *++s1;
  31767. - c2 = (unsigned char) *++s2;
  31768. - if (c1 == '\0' || c1 != c2)
  31769. - return c1 - c2;
  31770. - len--;
  31771. - }
  31772. - return c1 - c2;
  31773. -}
  31774. -
  31775. static __always_inline char * _dl_strchr(const char *str, int c)
  31776. {
  31777. register char ch;
  31778. @@ -172,7 +142,7 @@
  31779. return 0;
  31780. }
  31781. -#if defined(powerpc)
  31782. +#if defined(__powerpc__)
  31783. /* Will generate smaller and faster code due to loop unrolling.*/
  31784. static __always_inline void * _dl_memset(void *to, int c, size_t n)
  31785. {
  31786. @@ -228,7 +198,19 @@
  31787. ;/* empty */
  31788. return ptr == path ? ptr : ptr+1;
  31789. }
  31790. +#else /* IS_IN_rtld */
  31791. +# include <string.h>
  31792. +# define _dl_strlen strlen
  31793. +# define _dl_strcat strcat
  31794. +# define _dl_strcpy strcpy
  31795. +# define _dl_strcmp strcmp
  31796. +# define _dl_strrchr strrchr
  31797. +# define _dl_memcpy memcpy
  31798. +# define _dl_memcmp memcmp
  31799. +# define _dl_memset memset
  31800. +#endif /* IS_IN_rtld */
  31801. +#if defined IS_IN_rtld || defined __SUPPORT_LD_DEBUG__
  31802. /* Early on, we can't call printf, so use this to print out
  31803. * numbers using the SEND_STDERR() macro. Avoid using mod
  31804. * or using long division */
  31805. @@ -246,7 +228,9 @@
  31806. } while (i > 0);
  31807. return p;
  31808. }
  31809. +#endif
  31810. +#ifdef IS_IN_rtld
  31811. static __always_inline char * _dl_simple_ltoahex(char *local, unsigned long i)
  31812. {
  31813. /* 16 digits plus a leading "0x" plus a null terminator,
  31814. @@ -266,9 +250,6 @@
  31815. return p;
  31816. }
  31817. -
  31818. -
  31819. -
  31820. /* The following macros may be used in dl-startup.c to debug
  31821. * ldso before ldso has fixed itself up to make function calls */
  31822. @@ -285,7 +266,7 @@
  31823. /* On some arches constant strings are referenced through the GOT.
  31824. * This requires that load_addr must already be defined... */
  31825. #if defined(mc68000) || defined(__arm__) || defined(__thumb__) || \
  31826. - defined(__mips__) || defined(__sh__) || defined(__powerpc__) || \
  31827. + defined(__sh__) || defined(__powerpc__) || \
  31828. defined(__avr32__) || defined(__xtensa__) || defined(__sparc__) || defined(__microblaze__)
  31829. # define CONSTANT_STRING_GOT_FIXUP(X) \
  31830. if ((X) < (const char *) load_addr) (X) += load_addr
  31831. @@ -362,4 +343,6 @@
  31832. # define SEND_ADDRESS_STDERR_DEBUG(X, add_a_newline)
  31833. #endif
  31834. -#endif
  31835. +#endif /* IS_IN_rtld */
  31836. +
  31837. +#endif /* _DL_STRING_H */
  31838. diff -Nur uClibc-0.9.33.2/ldso/include/dl-syscall.h uClibc-git/ldso/include/dl-syscall.h
  31839. --- uClibc-0.9.33.2/ldso/include/dl-syscall.h 2012-05-15 09:20:09.000000000 +0200
  31840. +++ uClibc-git/ldso/include/dl-syscall.h 2014-07-25 20:36:05.209326321 +0200
  31841. @@ -5,8 +5,8 @@
  31842. * GNU Lesser General Public License version 2.1 or later.
  31843. */
  31844. -#ifndef _LD_SYSCALL_H_
  31845. -#define _LD_SYSCALL_H_
  31846. +#ifndef _DL_SYSCALL_H
  31847. +#define _DL_SYSCALL_H
  31848. /* We can't use the real errno in ldso, since it has not yet
  31849. * been dynamicly linked in yet. */
  31850. @@ -20,6 +20,8 @@
  31851. /* For MAP_ANONYMOUS -- differs between platforms */
  31852. #define _SYS_MMAN_H 1
  31853. #include <bits/mman.h>
  31854. +
  31855. +#ifdef __ARCH_HAS_DEPRECATED_SYSCALLS__
  31856. /* Pull in whatever this particular arch's kernel thinks the kernel version of
  31857. * struct stat should look like. It turns out that each arch has a different
  31858. * opinion on the subject, and different kernel revs use different names... */
  31859. @@ -35,6 +37,13 @@
  31860. #define S_ISUID 04000 /* Set user ID on execution. */
  31861. #define S_ISGID 02000 /* Set group ID on execution. */
  31862. +#else
  31863. +/* 1. common-generic ABI doesn't need kernel_stat translation
  31864. + * 3. S_IS?ID already provided by stat.h
  31865. + */
  31866. +#include <sys/stat.h>
  31867. +#endif
  31868. +
  31869. /* Here are the definitions for some syscalls that are used
  31870. by the dynamic linker. The idea is that we want to be able
  31871. @@ -48,9 +57,18 @@
  31872. #define __NR__dl_close __NR_close
  31873. static __always_inline _syscall1(int, _dl_close, int, fd)
  31874. -#define __NR__dl_open __NR_open
  31875. +#if defined __NR_openat && !defined __NR_open
  31876. +static __always_inline int _dl_open(const char *fn,
  31877. + int flags, __kernel_mode_t mode)
  31878. +{
  31879. + return INLINE_SYSCALL(openat, 4, AT_FDCWD, fn, flags, mode);
  31880. +}
  31881. +
  31882. +#elif defined __NR_open
  31883. +# define __NR__dl_open __NR_open
  31884. static __always_inline _syscall3(int, _dl_open, const char *, fn, int, flags,
  31885. __kernel_mode_t, mode)
  31886. +#endif
  31887. #define __NR__dl_write __NR_write
  31888. static __always_inline _syscall3(unsigned long, _dl_write, int, fd,
  31889. @@ -64,11 +82,27 @@
  31890. static __always_inline _syscall3(int, _dl_mprotect, const void *, addr,
  31891. unsigned long, len, int, prot)
  31892. -#define __NR__dl_stat __NR_stat
  31893. +#if defined __NR_fstatat64 && !defined __NR_stat
  31894. +# define __NR__dl_fstatat64 __NR_fstatat64
  31895. +static __always_inline _syscall4(int, _dl_fstatat64, int, fd, const char *,
  31896. + fn, struct stat *, stat, int, flags)
  31897. +
  31898. +static __always_inline int _dl_stat(const char *file_name,
  31899. + struct stat *buf)
  31900. +{
  31901. + return _dl_fstatat64(AT_FDCWD, file_name, buf, 0);
  31902. +}
  31903. +#elif defined __NR_stat
  31904. +# define __NR__dl_stat __NR_stat
  31905. static __always_inline _syscall2(int, _dl_stat, const char *, file_name,
  31906. struct stat *, buf)
  31907. +#endif
  31908. -#define __NR__dl_fstat __NR_fstat
  31909. +#if defined __NR_fstat64 && !defined __NR_fstat
  31910. +# define __NR__dl_fstat __NR_fstat64
  31911. +#elif defined __NR_fstat
  31912. +# define __NR__dl_fstat __NR_fstat
  31913. +#endif
  31914. static __always_inline _syscall2(int, _dl_fstat, int, fd, struct stat *, buf)
  31915. #define __NR__dl_munmap __NR_munmap
  31916. @@ -104,9 +138,15 @@
  31917. #define __NR__dl_getpid __NR_getpid
  31918. static __always_inline _syscall0(gid_t, _dl_getpid)
  31919. -#define __NR__dl_readlink __NR_readlink
  31920. +#if defined __NR_readlinkat && !defined __NR_readlink
  31921. +# define __NR__dl_readlink __NR_readlinkat
  31922. +static __always_inline _syscall4(int, _dl_readlink, int, id, const char *, path,
  31923. + char *, buf, size_t, bufsiz)
  31924. +#elif defined __NR_readlink
  31925. +# define __NR__dl_readlink __NR_readlink
  31926. static __always_inline _syscall3(int, _dl_readlink, const char *, path, char *, buf,
  31927. size_t, bufsiz)
  31928. +#endif
  31929. #ifdef __NR_pread64
  31930. #define __NR___syscall_pread __NR_pread64
  31931. @@ -187,4 +227,4 @@
  31932. #endif
  31933. }
  31934. -#endif /* _LD_SYSCALL_H_ */
  31935. +#endif /* _DL_SYSCALL_H */
  31936. diff -Nur uClibc-0.9.33.2/ldso/include/ldsodefs.h uClibc-git/ldso/include/ldsodefs.h
  31937. --- uClibc-0.9.33.2/ldso/include/ldsodefs.h 2012-05-15 09:20:09.000000000 +0200
  31938. +++ uClibc-git/ldso/include/ldsodefs.h 2014-07-25 20:36:05.213326342 +0200
  31939. @@ -66,7 +66,7 @@
  31940. /* Taken from glibc/elf/dl-reloc.c */
  31941. #define CHECK_STATIC_TLS(sym_map) \
  31942. do { \
  31943. - if (__builtin_expect ((sym_map)->l_tls_offset == NO_TLS_OFFSET, 0)) \
  31944. + if (unlikely((sym_map)->l_tls_offset == NO_TLS_OFFSET)) \
  31945. _dl_allocate_static_tls (sym_map); \
  31946. } while (0)
  31947. diff -Nur uClibc-0.9.33.2/ldso/include/ldso.h uClibc-git/ldso/include/ldso.h
  31948. --- uClibc-0.9.33.2/ldso/include/ldso.h 2012-05-15 09:20:09.000000000 +0200
  31949. +++ uClibc-git/ldso/include/ldso.h 2014-07-25 20:36:05.213326342 +0200
  31950. @@ -5,8 +5,8 @@
  31951. * GNU Lesser General Public License version 2.1 or later.
  31952. */
  31953. -#ifndef _LDSO_H_
  31954. -#define _LDSO_H_
  31955. +#ifndef _LDSO_H
  31956. +#define _LDSO_H
  31957. #include <features.h>
  31958. @@ -30,6 +30,10 @@
  31959. #include <stddef.h> /* for ptrdiff_t */
  31960. #include <stdbool.h>
  31961. #define _FCNTL_H
  31962. +/* We need this if arch has only new syscalls defined */
  31963. +#ifndef AT_FDCWD
  31964. +#define AT_FDCWD -100
  31965. +#endif /* AT_FDCWD */
  31966. #include <bits/fcntl.h>
  31967. #include <bits/wordsize.h>
  31968. /* Pull in the arch specific type information */
  31969. @@ -42,7 +46,6 @@
  31970. #ifndef __ARCH_HAS_NO_SHARED__
  31971. #include <dl-syscall.h>
  31972. #include <dl-string.h>
  31973. -#include <dlfcn.h>
  31974. /* Now the ldso specific headers */
  31975. #include <dl-elf.h>
  31976. #ifdef __UCLIBC_HAS_TLS__
  31977. @@ -84,16 +87,15 @@
  31978. #else
  31979. #define _dl_trace_prelink 0
  31980. #endif
  31981. +#ifdef __DSBT__
  31982. +extern void **_dl_ldso_dsbt;
  31983. +#endif
  31984. #if defined(USE_TLS) && USE_TLS
  31985. extern void _dl_add_to_slotinfo (struct link_map *l);
  31986. extern void ** __attribute__ ((const)) _dl_initial_error_catch_tsd (void);
  31987. #endif
  31988. -#ifdef USE_TLS
  31989. -void _dl_add_to_slotinfo (struct link_map *l);
  31990. -void ** __attribute__ ((const)) _dl_initial_error_catch_tsd (void);
  31991. -#endif
  31992. #ifdef __SUPPORT_LD_DEBUG__
  31993. extern char *_dl_debug;
  31994. extern char *_dl_debug_symbols;
  31995. @@ -110,7 +112,8 @@
  31996. #else
  31997. # define __dl_debug_dprint(fmt, args...) do {} while (0)
  31998. # define _dl_if_debug_dprint(fmt, args...) do {} while (0)
  31999. -# define _dl_debug_file 2
  32000. +/* disabled on purpose, _dl_debug_file should be guarded by __SUPPORT_LD_DEBUG__
  32001. +# define _dl_debug_file 2*/
  32002. #endif /* __SUPPORT_LD_DEBUG__ */
  32003. #ifdef IS_IN_rtld
  32004. @@ -146,8 +149,19 @@
  32005. extern void _dl_free(void *);
  32006. extern char *_dl_getenv(const char *symbol, char **envp);
  32007. extern void _dl_unsetenv(const char *symbol, char **envp);
  32008. +#ifdef IS_IN_rtld
  32009. extern char *_dl_strdup(const char *string);
  32010. extern void _dl_dprintf(int, const char *, ...);
  32011. +#else
  32012. +# include <string.h>
  32013. +# define _dl_strdup strdup
  32014. +# include <stdio.h>
  32015. +# ifdef __USE_GNU
  32016. +# define _dl_dprintf dprintf
  32017. +# else
  32018. +# define _dl_dprintf(fd, fmt, args...) fprintf(stderr, fmt, ## args)
  32019. +# endif
  32020. +#endif
  32021. #ifndef DL_GET_READY_TO_RUN_EXTRA_PARMS
  32022. # define DL_GET_READY_TO_RUN_EXTRA_PARMS
  32023. @@ -168,4 +182,4 @@
  32024. #include <dl-defs.h>
  32025. #endif
  32026. -#endif /* _LDSO_H_ */
  32027. +#endif /* _LDSO_H */
  32028. diff -Nur uClibc-0.9.33.2/ldso/ldso/arc/dl-debug.h uClibc-git/ldso/ldso/arc/dl-debug.h
  32029. --- uClibc-0.9.33.2/ldso/ldso/arc/dl-debug.h 1970-01-01 01:00:00.000000000 +0100
  32030. +++ uClibc-git/ldso/ldso/arc/dl-debug.h 2014-07-25 20:36:05.245326510 +0200
  32031. @@ -0,0 +1,68 @@
  32032. +/*
  32033. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  32034. + *
  32035. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  32036. + */
  32037. +static const char *_dl_reltypes_tab[] =
  32038. +{
  32039. + "R_ARC_NONE", /* 0 */
  32040. + "R_ARC_8",
  32041. + "R_ARC_16",
  32042. + "R_ARC_24",
  32043. + "R_ARC_32",
  32044. + "R_ARC_B26", /* 5 */
  32045. + "R_ARC_B22_PCREL",
  32046. + "R_ARC_H30",
  32047. + "R_ARC_N8",
  32048. + "R_ARC_N16",
  32049. + "R_ARC_N24", /* 10 */
  32050. + "R_ARC_N32",
  32051. + "R_ARC_SDA",
  32052. + "R_ARC_SECTOFF",
  32053. + "R_ARC_S21H_PCREL",
  32054. + "R_ARC_S21W_PCREL", /* 15 */
  32055. + "R_ARC_S25H_PCREL",
  32056. + "R_ARC_S25W_PCREL",
  32057. + "R_ARC_SDA32",
  32058. + "R_ARC_SDA_LDST",
  32059. + "R_ARC_SDA_LDST1", /* 20 */
  32060. + "R_ARC_SDA_LDST2",
  32061. + "R_ARC_SDA16_LD",
  32062. + "R_ARC_SDA16_LD1",
  32063. + "R_ARC_SDA16_LD2",
  32064. + "R_ARC_S13_PCREL", /* 25 */
  32065. + "R_ARC_W",
  32066. + "R_ARC_32_ME",
  32067. + "R_ARC_N32_ME",
  32068. + "R_ARC_SECTOFF_ME",
  32069. + "R_ARC_SDA32_ME", /* 30 */
  32070. + "R_ARC_W_ME",
  32071. + "R_ARC_H30_ME",
  32072. + "R_ARC_SECTOFF_U8",
  32073. + "R_ARC_SECTOFF_S9",
  32074. + "R_AC_SECTOFF_U8", /* 35 */
  32075. + "R_AC_SECTOFF_U8_1",
  32076. + "R_AC_SECTOFF_U8_2",
  32077. + "R_AC_SECTOFF_S9",
  32078. + "R_AC_SECTOFF_S9_1",
  32079. + "R_AC_SECTOFF_S9_2", /* 40 */
  32080. + "R_ARC_SECTOFF_ME_1",
  32081. + "R_ARC_SECTOFF_ME_2",
  32082. + "R_ARC_SECTOFF_1",
  32083. + "R_ARC_SECTOFF_2",
  32084. + "", /* 45 */
  32085. + "",
  32086. + "",
  32087. + "",
  32088. + "",
  32089. + "R_ARC_PC32", /* 50 */
  32090. + "R_ARC_GOTPC32",
  32091. + "R_ARC_PLT32",
  32092. + "R_ARC_COPY",
  32093. + "R_ARC_GLOB_DAT",
  32094. + "R_ARC_JMP_SLOT", /* 55 */
  32095. + "R_ARC_RELATIVE",
  32096. + "R_ARC_GOTOFF",
  32097. + "R_ARC_GOTPC",
  32098. + "R_ARC_GOT32",
  32099. +};
  32100. diff -Nur uClibc-0.9.33.2/ldso/ldso/arc/dl-startup.h uClibc-git/ldso/ldso/arc/dl-startup.h
  32101. --- uClibc-0.9.33.2/ldso/ldso/arc/dl-startup.h 1970-01-01 01:00:00.000000000 +0100
  32102. +++ uClibc-git/ldso/ldso/arc/dl-startup.h 2014-07-25 20:36:05.245326510 +0200
  32103. @@ -0,0 +1,89 @@
  32104. +/*
  32105. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  32106. + *
  32107. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  32108. + */
  32109. +
  32110. +/*
  32111. + * vineetg: Refactoring/cleanup of loader entry point
  32112. + * Removed 6 useless insns
  32113. + * Joern Improved it even further:
  32114. + * -better insn scheduling
  32115. + * -no need for conditional code for _dl_skip_args
  32116. + * -use of assembler .&2 expressions vs. @gotpc refs (avoids need for GP)
  32117. + *
  32118. + * What this code does:
  32119. + * -ldso starts execution here when kernel returns from execve()
  32120. + * -calls into generic ldso entry point _dl_start( )
  32121. + * -optionally adjusts argc for executable if exec passed as cmd
  32122. + * -calls into app main with address of finaliser
  32123. + */
  32124. +__asm__(
  32125. + ".section .text \n"
  32126. + ".align 4 \n"
  32127. + ".global _start \n"
  32128. + ".hidden _start \n"
  32129. + ".type _start,@function \n"
  32130. +
  32131. + "_start: \n"
  32132. + " ; ldso entry point, returns app entry point \n"
  32133. + " bl.d _dl_start \n"
  32134. + " mov_s r0, sp ; pass ptr to aux vector tbl \n"
  32135. +
  32136. + " ; If ldso ran as cmd with executable file nm as arg \n"
  32137. + " ; skip the extra args calc by dl_start() \n"
  32138. + " ld_s r1, [sp] ; orig argc from aux-vec Tbl \n"
  32139. +#ifdef STAR_9000535888_FIXED
  32140. + " ld r12, [pcl, _dl_skip_args-.+(.&2)] \n"
  32141. +#else
  32142. + " add r12, pcl, _dl_skip_args-.+(.&2) \n"
  32143. + " ld r12, [r12] \n"
  32144. +#endif
  32145. +
  32146. + " add r2, pcl, _dl_fini-.+(.&2) ; finalizer \n"
  32147. +
  32148. + " add2 sp, sp, r12 ; discard argv entries from stack\n"
  32149. + " sub_s r1, r1, r12 ; adjusted argc, on stack \n"
  32150. + " st_s r1, [sp] \n"
  32151. +
  32152. + " j_s.d [r0] ; app entry point \n"
  32153. + " mov_s r0, r2 ; ptr to finalizer _dl_fini \n"
  32154. +
  32155. + ".size _start,.-_start \n"
  32156. + ".previous \n"
  32157. +);
  32158. +
  32159. +/*
  32160. + * Get a pointer to the argv array. On many platforms this can be just
  32161. + * the address if the first argument, on other platforms we need to
  32162. + * do something a little more subtle here.
  32163. + */
  32164. +#define GET_ARGV(ARGVP, ARGS) ARGVP = ((unsigned long*) ARGS + 1)
  32165. +
  32166. +/*
  32167. + * Dynamic loader bootstrapping:
  32168. + * Since we don't modify text at runtime, these can only be data relos
  32169. + * (so safe to assume that they are word aligned).
  32170. + * And also they HAVE to be RELATIVE relos only
  32171. + * @RELP is the relo entry being processed
  32172. + * @REL is the pointer to the address we are relocating.
  32173. + * @SYMBOL is the symbol involved in the relocation
  32174. + * @LOAD is the load address.
  32175. + */
  32176. +
  32177. +#define PERFORM_BOOTSTRAP_RELOC(RELP,REL,SYMBOL,LOAD,SYMTAB) \
  32178. +do { \
  32179. + int type = ELF32_R_TYPE((RELP)->r_info); \
  32180. + if (likely(type == R_ARC_RELATIVE)) \
  32181. + *REL += (unsigned long) LOAD; \
  32182. + else \
  32183. + _dl_exit(1); \
  32184. +}while(0)
  32185. +
  32186. +/*
  32187. + * This will go away once we have DT_RELACOUNT
  32188. + */
  32189. +#define ARCH_NEEDS_BOOTSTRAP_RELOCS
  32190. +
  32191. +/* we dont need to spit out argc, argv etc for debugging */
  32192. +#define NO_EARLY_SEND_STDERR 1
  32193. diff -Nur uClibc-0.9.33.2/ldso/ldso/arc/dl-syscalls.h uClibc-git/ldso/ldso/arc/dl-syscalls.h
  32194. --- uClibc-0.9.33.2/ldso/ldso/arc/dl-syscalls.h 1970-01-01 01:00:00.000000000 +0100
  32195. +++ uClibc-git/ldso/ldso/arc/dl-syscalls.h 2014-07-25 20:36:05.245326510 +0200
  32196. @@ -0,0 +1,7 @@
  32197. +/*
  32198. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  32199. + *
  32200. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  32201. + */
  32202. +
  32203. +/* stub for arch-specific syscall issues */
  32204. diff -Nur uClibc-0.9.33.2/ldso/ldso/arc/dl-sysdep.h uClibc-git/ldso/ldso/arc/dl-sysdep.h
  32205. --- uClibc-0.9.33.2/ldso/ldso/arc/dl-sysdep.h 1970-01-01 01:00:00.000000000 +0100
  32206. +++ uClibc-git/ldso/ldso/arc/dl-sysdep.h 2014-07-25 20:36:05.245326510 +0200
  32207. @@ -0,0 +1,150 @@
  32208. +/*
  32209. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  32210. + *
  32211. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  32212. + */
  32213. +
  32214. +#include "elf.h"
  32215. +
  32216. +/*
  32217. + * Define this if the system uses RELOCA.
  32218. + */
  32219. +#define ELF_USES_RELOCA
  32220. +
  32221. +/*
  32222. + * Dynamic Linking ABI for ARCompact ISA
  32223. + *
  32224. + * PLT
  32225. + * --------------------------------
  32226. + * | ld r11, [pcl, off-to-GOT[1] | 0 (20 bytes)
  32227. + * | | 4
  32228. + * plt0 | ld r10, [pcl, off-to-GOT[2] | 8
  32229. + * | | 12
  32230. + * | j [r10] | 16
  32231. + * --------------------------------
  32232. + * | Base address of GOT | 20
  32233. + * --------------------------------
  32234. + * | ld r12, [pcl, off-to-GOT[3] | 24 (12 bytes each)
  32235. + * plt1 | |
  32236. + * | j_s.d [r12] | 32
  32237. + * | mov_s r12, pcl | 34
  32238. + * --------------------------------
  32239. + * | | 36
  32240. + * ~ ~
  32241. + * ~ ~
  32242. + * | |
  32243. + * --------------------------------
  32244. + *
  32245. + * GOT
  32246. + * --------------
  32247. + * | [0] |
  32248. + * --------------
  32249. + * | [1] | Module info - setup by ldso
  32250. + * --------------
  32251. + * | [2] | resolver entry point
  32252. + * --------------
  32253. + * | [3] |
  32254. + * | ... | Runtime address for function symbols
  32255. + * | [f] |
  32256. + * --------------
  32257. + * | [f+1] |
  32258. + * | ... | Runtime address for data symbols
  32259. + * | [last] |
  32260. + * --------------
  32261. + */
  32262. +
  32263. +/*
  32264. + * Initialization sequence for a GOT.
  32265. + * Caller elf_resolve() seeds @GOT_BASE from DT_PLTGOT - which essentially is
  32266. + * pointer to first PLT entry. The actual GOT base is 5th word in PLT
  32267. + *
  32268. + */
  32269. +#define INIT_GOT(GOT_BASE,MODULE) \
  32270. +do { \
  32271. + unsigned long *__plt_base = (unsigned long *)GOT_BASE; \
  32272. + GOT_BASE = (unsigned long *)(__plt_base[5] + \
  32273. + (unsigned long)MODULE->loadaddr); \
  32274. + GOT_BASE[1] = (unsigned long) MODULE; \
  32275. + GOT_BASE[2] = (unsigned long) _dl_linux_resolve; \
  32276. +} while(0)
  32277. +
  32278. +/* Here we define the magic numbers that this dynamic loader should accept */
  32279. +#define MAGIC1 EM_ARCOMPACT
  32280. +#undef MAGIC2
  32281. +
  32282. +/* Used for error messages */
  32283. +#define ELF_TARGET "ARC"
  32284. +
  32285. +struct elf_resolve;
  32286. +extern unsigned long _dl_linux_resolver(struct elf_resolve * tpnt,
  32287. + unsigned int plt_pc);
  32288. +
  32289. +extern unsigned __udivmodsi4(unsigned, unsigned) attribute_hidden;
  32290. +
  32291. +#define do_rem(result, n, base) ((result) = \
  32292. + \
  32293. + __builtin_constant_p (base) ? (n) % (unsigned) (base) : \
  32294. + __extension__ ({ \
  32295. + register unsigned r1 __asm__ ("r1") = (base); \
  32296. + \
  32297. + __asm__("bl.d @__udivmodsi4` mov r0,%1" \
  32298. + : "=r" (r1) \
  32299. + : "r" (n), "r" (r1) \
  32300. + : "r0", "r2", "r3", "r4", "lp_count", "blink", "cc"); \
  32301. + \
  32302. + r1; \
  32303. + }) \
  32304. +)
  32305. +
  32306. +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
  32307. + PLT entries should not be allowed to define the value.
  32308. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
  32309. + of the main executable's symbols, as for a COPY reloc. */
  32310. +#define elf_machine_type_class(type) \
  32311. + ((((type) == R_ARC_JMP_SLOT) * ELF_RTYPE_CLASS_PLT) \
  32312. + | (((type) == R_ARC_COPY) * ELF_RTYPE_CLASS_COPY))
  32313. +
  32314. +/*
  32315. + * Get the runtime address of GOT[0]
  32316. + */
  32317. +static __always_inline Elf32_Addr elf_machine_dynamic(void)
  32318. +{
  32319. + Elf32_Addr dyn;
  32320. +
  32321. + __asm__("ld %0,[pcl,_DYNAMIC@gotpc]\n\t" : "=r" (dyn));
  32322. + return dyn;
  32323. +
  32324. +/*
  32325. + * Another way would have been to simply return GP, which due to some
  32326. + * PIC reference would be automatically setup by gcc in caller
  32327. + * register Elf32_Addr *got __asm__ ("gp"); return *got;
  32328. + */
  32329. +}
  32330. +
  32331. +/* Return the run-time load address of the shared object. */
  32332. +static __always_inline Elf32_Addr elf_machine_load_address(void)
  32333. +{
  32334. + /* To find the loadaddr we subtract the runtime addr of any symbol
  32335. + * say _dl_start from it's build-time addr.
  32336. + */
  32337. + Elf32_Addr addr, tmp;
  32338. + __asm__ (
  32339. + "ld %1, [pcl, _dl_start@gotpc] ;build addr of _dl_start \n"
  32340. + "add %0, pcl, _dl_start-.+(.&2) ;runtime addr of _dl_start \n"
  32341. + "sub %0, %0, %1 ;delta \n"
  32342. + : "=&r" (addr), "=r"(tmp)
  32343. + );
  32344. + return addr;
  32345. +}
  32346. +
  32347. +static __always_inline void
  32348. +elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
  32349. + Elf32_Word relative_count)
  32350. +{
  32351. + Elf32_Rel * rpnt = (void *) rel_addr;
  32352. + --rpnt;
  32353. + do {
  32354. + Elf32_Addr *const reloc_addr = (void *) (load_off + (++rpnt)->r_offset);
  32355. + *reloc_addr += load_off;
  32356. + } while (--relative_count);
  32357. +}
  32358. diff -Nur uClibc-0.9.33.2/ldso/ldso/arc/elfinterp.c uClibc-git/ldso/ldso/arc/elfinterp.c
  32359. --- uClibc-0.9.33.2/ldso/ldso/arc/elfinterp.c 1970-01-01 01:00:00.000000000 +0100
  32360. +++ uClibc-git/ldso/ldso/arc/elfinterp.c 2014-07-25 20:36:05.245326510 +0200
  32361. @@ -0,0 +1,279 @@
  32362. +/*
  32363. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  32364. + *
  32365. + * Lots of code copied from ../i386/elfinterp.c, so:
  32366. + * Copyright (c) 1994-2000 Eric Youngdale, Peter MacDonald,
  32367. + * David Engel, Hongjiu Lu and Mitch D'Souza
  32368. + * Copyright (C) 2001-2002, Erik Andersen
  32369. + * All rights reserved.
  32370. + *
  32371. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  32372. + */
  32373. +#include "ldso.h"
  32374. +
  32375. +#define ARC_PLT_SIZE 12
  32376. +
  32377. +unsigned long
  32378. +_dl_linux_resolver(struct elf_resolve *tpnt, unsigned int plt_pc)
  32379. +{
  32380. + ELF_RELOC *this_reloc, *rel_base;
  32381. + char *strtab, *symname, *new_addr;
  32382. + ElfW(Sym) *symtab;
  32383. + int symtab_index;
  32384. + unsigned int *got_addr;
  32385. + unsigned long plt_base;
  32386. + int plt_idx;
  32387. +
  32388. + /* start of .rela.plt */
  32389. + rel_base = (ELF_RELOC *)(tpnt->dynamic_info[DT_JMPREL]);
  32390. +
  32391. + /* starts of .plt (addr of PLT0) */
  32392. + plt_base = tpnt->dynamic_info[DT_PLTGOT];
  32393. +
  32394. + /*
  32395. + * compute the idx of the yet-unresolved PLT entry in .plt
  32396. + * Same idx will be used to find the relo entry in .rela.plt
  32397. + */
  32398. + plt_idx = (plt_pc - plt_base)/ARC_PLT_SIZE - 2; /* ignoring 2 dummy PLTs */
  32399. +
  32400. + this_reloc = rel_base + plt_idx;
  32401. +
  32402. + symtab_index = ELF_R_SYM(this_reloc->r_info);
  32403. + symtab = (ElfW(Sym) *)(intptr_t) (tpnt->dynamic_info[DT_SYMTAB]);
  32404. + strtab = (char *) (tpnt->dynamic_info[DT_STRTAB]);
  32405. + symname= strtab + symtab[symtab_index].st_name;
  32406. +
  32407. + /* relo-offset to fixup, shd be a .got entry */
  32408. + got_addr = (unsigned int *)(this_reloc->r_offset + tpnt->loadaddr);
  32409. +
  32410. + /* Get the address of the GOT entry */
  32411. + new_addr = _dl_find_hash(symname, &_dl_loaded_modules->symbol_scope, tpnt,
  32412. + ELF_RTYPE_CLASS_PLT, NULL);
  32413. +
  32414. + if (unlikely(!new_addr)) {
  32415. + _dl_dprintf(2, "%s: can't resolve symbol '%s'\n", _dl_progname, symname);
  32416. + _dl_exit(1);
  32417. + }
  32418. +
  32419. +
  32420. +#if defined __SUPPORT_LD_DEBUG__
  32421. + if (_dl_debug_bindings) {
  32422. + _dl_dprintf(_dl_debug_file, "\nresolve function: %s", symname);
  32423. + if (_dl_debug_detail)
  32424. + _dl_dprintf(_dl_debug_file, "\n\tpatched %x ==> %pc @ %pl\n",
  32425. + *got_addr, new_addr, got_addr);
  32426. + }
  32427. +
  32428. + if (!_dl_debug_nofixups)
  32429. + *got_addr = (unsigned int)new_addr;
  32430. +#else
  32431. + /* Update the .got entry with the runtime address of symbol */
  32432. + *got_addr = (unsigned int)new_addr;
  32433. +#endif
  32434. +
  32435. + /*
  32436. + * Return the new addres, where the asm trampoline will jump to
  32437. + * after re-setting up the orig args
  32438. + */
  32439. + return (unsigned long) new_addr;
  32440. +}
  32441. +
  32442. +
  32443. +static int
  32444. +_dl_do_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
  32445. + ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
  32446. +{
  32447. + int reloc_type;
  32448. + int symtab_index;
  32449. + char *symname;
  32450. + unsigned long *reloc_addr;
  32451. + unsigned long symbol_addr;
  32452. +#if defined __SUPPORT_LD_DEBUG__
  32453. + unsigned long old_val = 0;
  32454. +#endif
  32455. + struct symbol_ref sym_ref;
  32456. +
  32457. + reloc_addr = (unsigned long *)(tpnt->loadaddr + rpnt->r_offset);
  32458. + reloc_type = ELF_R_TYPE(rpnt->r_info);
  32459. + symtab_index = ELF_R_SYM(rpnt->r_info);
  32460. + symbol_addr = 0;
  32461. +
  32462. + sym_ref.sym = &symtab[symtab_index];
  32463. + sym_ref.tpnt = NULL;
  32464. +
  32465. +#if defined __SUPPORT_LD_DEBUG__
  32466. + if (reloc_addr)
  32467. + old_val = *reloc_addr;
  32468. +#endif
  32469. +
  32470. + if (symtab_index) {
  32471. + symname = strtab + symtab[symtab_index].st_name;
  32472. + symbol_addr = (unsigned long) _dl_find_hash(symname, scope, tpnt,
  32473. + elf_machine_type_class(reloc_type), &sym_ref);
  32474. +
  32475. + /*
  32476. + * We want to allow undefined references to weak symbols,
  32477. + * this might have been intentional. We should not be linking
  32478. + * local symbols here, so all bases should be covered.
  32479. + */
  32480. +
  32481. + if (unlikely(!symbol_addr
  32482. + && ELF_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK)) {
  32483. + /* Non-fatal if called from dlopen, hence different ret code */
  32484. + return 1;
  32485. + }
  32486. + } else if (reloc_type == R_ARC_RELATIVE ) {
  32487. + *reloc_addr += tpnt->loadaddr;
  32488. + goto log_entry;
  32489. + }
  32490. +
  32491. + switch (reloc_type) {
  32492. + case R_ARC_32:
  32493. + *reloc_addr += symbol_addr + rpnt->r_addend;
  32494. + break;
  32495. + case R_ARC_PC32:
  32496. + *reloc_addr += symbol_addr + rpnt->r_addend - (unsigned long) reloc_addr;
  32497. + break;
  32498. + case R_ARC_GLOB_DAT:
  32499. + case R_ARC_JMP_SLOT:
  32500. + *reloc_addr = symbol_addr;
  32501. + break;
  32502. + case R_ARC_COPY:
  32503. + _dl_memcpy((void *) reloc_addr,(void *) symbol_addr,
  32504. + symtab[symtab_index].st_size);
  32505. + break;
  32506. + default:
  32507. + return -1;
  32508. + }
  32509. +
  32510. +log_entry:
  32511. +#if defined __SUPPORT_LD_DEBUG__
  32512. + if (_dl_debug_detail)
  32513. + _dl_dprintf(_dl_debug_file,"\tpatched: %lx ==> %lx @ %pl: addend %x ",
  32514. + old_val, *reloc_addr, reloc_addr, rpnt->r_addend);
  32515. +#endif
  32516. +
  32517. + return 0;
  32518. +}
  32519. +
  32520. +static int
  32521. +_dl_do_lazy_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
  32522. + ELF_RELOC *rpnt)
  32523. +{
  32524. + int reloc_type;
  32525. + unsigned long *reloc_addr;
  32526. +#if defined __SUPPORT_LD_DEBUG__
  32527. + unsigned long old_val;
  32528. +#endif
  32529. +
  32530. + reloc_addr = (unsigned long *)(tpnt->loadaddr + rpnt->r_offset);
  32531. + reloc_type = ELF_R_TYPE(rpnt->r_info);
  32532. +
  32533. +#if defined __SUPPORT_LD_DEBUG__
  32534. + old_val = *reloc_addr;
  32535. +#endif
  32536. +
  32537. + switch (reloc_type) {
  32538. + case R_ARC_JMP_SLOT:
  32539. + *reloc_addr += tpnt->loadaddr;
  32540. + break;
  32541. + default:
  32542. + return -1;
  32543. + }
  32544. +
  32545. +#if defined __SUPPORT_LD_DEBUG__
  32546. + if (_dl_debug_reloc && _dl_debug_detail)
  32547. + _dl_dprintf(_dl_debug_file, "\tpatched: %lx ==> %lx @ %pl\n",
  32548. + old_val, *reloc_addr, reloc_addr);
  32549. +#endif
  32550. +
  32551. + return 0;
  32552. +}
  32553. +
  32554. +#define ___DO_LAZY 1
  32555. +#define ___DO_NOW 2
  32556. +
  32557. +static int _dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
  32558. + unsigned long rel_addr, unsigned long rel_size, int type)
  32559. +{
  32560. + unsigned int i;
  32561. + char *strtab;
  32562. + ElfW(Sym) *symtab;
  32563. + ELF_RELOC *rpnt;
  32564. + int symtab_index;
  32565. + int res = 0;
  32566. +
  32567. + /* Now parse the relocation information */
  32568. + rpnt = (ELF_RELOC *)(intptr_t) (rel_addr);
  32569. + rel_size = rel_size / sizeof(ELF_RELOC);
  32570. +
  32571. + symtab = (ElfW(Sym) *)(intptr_t) (tpnt->dynamic_info[DT_SYMTAB]);
  32572. + strtab = (char *) (tpnt->dynamic_info[DT_STRTAB]);
  32573. +
  32574. + for (i = 0; i < rel_size; i++, rpnt++) {
  32575. +
  32576. + symtab_index = ELF_R_SYM(rpnt->r_info);
  32577. +
  32578. + debug_sym(symtab,strtab,symtab_index);
  32579. + debug_reloc(symtab,strtab,rpnt);
  32580. +
  32581. + /* constant propagation subsumes the 'if' */
  32582. + if (type == ___DO_LAZY)
  32583. + res = _dl_do_lazy_reloc(tpnt, scope, rpnt);
  32584. + else
  32585. + res = _dl_do_reloc(tpnt, scope, rpnt, symtab, strtab);
  32586. +
  32587. + if (res != 0)
  32588. + break;
  32589. + }
  32590. +
  32591. + if (unlikely(res != 0)) {
  32592. + if (res < 0) {
  32593. + int reloc_type = ELF_R_TYPE(rpnt->r_info);
  32594. +#if defined __SUPPORT_LD_DEBUG__
  32595. + _dl_dprintf(2, "can't handle reloc type %s\n ",
  32596. + _dl_reltypes(reloc_type));
  32597. +#else
  32598. + _dl_dprintf(2, "can't handle reloc type %x\n",
  32599. + reloc_type);
  32600. +#endif
  32601. + _dl_exit(-res);
  32602. + } else {
  32603. + _dl_dprintf(2, "can't resolve symbol\n");
  32604. + /* Fall thru to return res */
  32605. + }
  32606. + }
  32607. +
  32608. + return res;
  32609. +}
  32610. +
  32611. +void
  32612. +_dl_parse_lazy_relocation_information(struct dyn_elf *rpnt,
  32613. + unsigned long rel_addr,
  32614. + unsigned long rel_size)
  32615. +{
  32616. + /* This func is called for processing .rela.plt of loaded module(s)
  32617. + * The relo entries handled are JMP_SLOT type for fixing up .got slots
  32618. + * for external function calls.
  32619. + * This function doesn't resolve the slots: that is done lazily at
  32620. + * runtime. The build linker (at least thats what happens for ARC) had
  32621. + * pre-init the .got slots to point to PLT0. All that is done here is
  32622. + * to fix them up to point to load value of PLT0 (as opposed to the
  32623. + * build value).
  32624. + * On ARC, the loadaddr of dyn exec is zero, thus elfaddr == loadaddr
  32625. + * Thus there is no point in adding "0" to values and un-necessarily
  32626. + * stir up the caches and TLB.
  32627. + * For ldso processing busybox binary, this skips over 380 relo entries
  32628. + */
  32629. + if (rpnt->dyn->loadaddr != 0)
  32630. + _dl_parse(rpnt->dyn, NULL, rel_addr, rel_size, ___DO_LAZY);
  32631. +}
  32632. +
  32633. +int
  32634. +_dl_parse_relocation_information(struct dyn_elf *rpnt,
  32635. + struct r_scope_elem *scope,
  32636. + unsigned long rel_addr,
  32637. + unsigned long rel_size)
  32638. +{
  32639. + return _dl_parse(rpnt->dyn, scope, rel_addr, rel_size, ___DO_NOW);
  32640. +}
  32641. diff -Nur uClibc-0.9.33.2/ldso/ldso/arc/resolve.S uClibc-git/ldso/ldso/arc/resolve.S
  32642. --- uClibc-0.9.33.2/ldso/ldso/arc/resolve.S 1970-01-01 01:00:00.000000000 +0100
  32643. +++ uClibc-git/ldso/ldso/arc/resolve.S 2014-07-25 20:36:05.245326510 +0200
  32644. @@ -0,0 +1,57 @@
  32645. +/*
  32646. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  32647. + *
  32648. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  32649. + */
  32650. +
  32651. +#include <sysdep.h>
  32652. +#include <sys/syscall.h>
  32653. +
  32654. +; Save the registers which resolver could possibly clobber
  32655. +; r0-r9: args to the function - symbol being resolved
  32656. +; r10-r12 are already clobbered by PLTn, PLT0 thus neednot be saved
  32657. +
  32658. +.macro SAVE_CALLER_SAVED
  32659. + push_s r0
  32660. + push_s r1
  32661. + push_s r2
  32662. + push_s r3
  32663. + st.a r4, [sp, -4]
  32664. + st.a r5, [sp, -4]
  32665. + st.a r6, [sp, -4]
  32666. + st.a r7, [sp, -4]
  32667. + st.a r8, [sp, -4]
  32668. + st.a r9, [sp, -4]
  32669. + push_s blink
  32670. +.endm
  32671. +
  32672. +.macro RESTORE_CALLER_SAVED_BUT_R0
  32673. + ld.ab blink,[sp, 4]
  32674. + ld.ab r9, [sp, 4]
  32675. + ld.ab r8, [sp, 4]
  32676. + ld.ab r7, [sp, 4]
  32677. + ld.ab r6, [sp, 4]
  32678. + ld.ab r5, [sp, 4]
  32679. + ld.ab r4, [sp, 4]
  32680. + pop_s r3
  32681. + pop_s r2
  32682. + pop_s r1
  32683. +.endm
  32684. +
  32685. +; Upon entry, PLTn, which led us here, sets up the following regs
  32686. +; r11 = Module info (tpnt pointer as expected by resolver)
  32687. +; r12 = PC of the PLTn itself - needed by resolver to find
  32688. +; corresponding .rela.plt entry
  32689. +
  32690. +ENTRY(_dl_linux_resolve)
  32691. + ; args to func being resolved, which resolver might clobber
  32692. + SAVE_CALLER_SAVED
  32693. +
  32694. + mov_s r1, r12
  32695. + bl.d _dl_linux_resolver
  32696. + mov r0, r11
  32697. +
  32698. + RESTORE_CALLER_SAVED_BUT_R0
  32699. + j_s.d [r0] ; r0 has resolved function addr
  32700. + pop_s r0 ; restore first arg to resolved call
  32701. +END(_dl_linux_resolve)
  32702. diff -Nur uClibc-0.9.33.2/ldso/ldso/arm/aeabi_read_tp.S uClibc-git/ldso/ldso/arm/aeabi_read_tp.S
  32703. --- uClibc-0.9.33.2/ldso/ldso/arm/aeabi_read_tp.S 2012-05-15 09:20:09.000000000 +0200
  32704. +++ uClibc-git/ldso/ldso/arm/aeabi_read_tp.S 2014-07-25 20:36:05.257326572 +0200
  32705. @@ -29,9 +29,8 @@
  32706. Lesser General Public License for more details.
  32707. You should have received a copy of the GNU Lesser General Public
  32708. - License along with the GNU C Library; if not, write to the Free
  32709. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  32710. - 02111-1307 USA. */
  32711. + License along with the GNU C Library; if not, see
  32712. + <http://www.gnu.org/licenses/>. */
  32713. #include <features.h>
  32714. diff -Nur uClibc-0.9.33.2/ldso/ldso/arm/dl-startup.h uClibc-git/ldso/ldso/arm/dl-startup.h
  32715. --- uClibc-0.9.33.2/ldso/ldso/arm/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
  32716. +++ uClibc-git/ldso/ldso/arm/dl-startup.h 2014-07-25 20:36:05.257326572 +0200
  32717. @@ -7,13 +7,14 @@
  32718. */
  32719. #include <features.h>
  32720. -#include <bits/arm_asm.h>
  32721. +#include <bits/arm_bx.h>
  32722. #if !defined(__thumb__)
  32723. __asm__(
  32724. " .text\n"
  32725. " .globl _start\n"
  32726. " .type _start,%function\n"
  32727. + " .hidden _start\n"
  32728. "_start:\n"
  32729. " @ at start time, all the args are on the stack\n"
  32730. " mov r0, sp\n"
  32731. diff -Nur uClibc-0.9.33.2/ldso/ldso/arm/dl-sysdep.h uClibc-git/ldso/ldso/arm/dl-sysdep.h
  32732. --- uClibc-0.9.33.2/ldso/ldso/arm/dl-sysdep.h 2012-05-15 09:20:09.000000000 +0200
  32733. +++ uClibc-git/ldso/ldso/arm/dl-sysdep.h 2014-07-25 20:36:05.257326572 +0200
  32734. @@ -58,11 +58,6 @@
  32735. struct elf_resolve;
  32736. unsigned long _dl_linux_resolver(struct elf_resolve * tpnt, int reloc_entry);
  32737. -/* 4096 bytes alignment */
  32738. -#define PAGE_ALIGN 0xfffff000
  32739. -#define ADDR_ALIGN 0xfff
  32740. -#define OFFS_ALIGN 0x7ffff000
  32741. -
  32742. /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or
  32743. TLS variable, so undefined references should not be allowed to
  32744. define the value.
  32745. diff -Nur uClibc-0.9.33.2/ldso/ldso/arm/elfinterp.c uClibc-git/ldso/ldso/arm/elfinterp.c
  32746. --- uClibc-0.9.33.2/ldso/ldso/arm/elfinterp.c 2012-05-15 09:20:09.000000000 +0200
  32747. +++ uClibc-git/ldso/ldso/arm/elfinterp.c 2014-07-25 20:36:05.257326572 +0200
  32748. @@ -77,9 +77,9 @@
  32749. _dl_exit(1);
  32750. }
  32751. #if defined (__SUPPORT_LD_DEBUG__)
  32752. -#if !defined __SUPPORT_LD_DEBUG_EARLY__
  32753. +# if !defined __SUPPORT_LD_DEBUG_EARLY__
  32754. if ((unsigned long) got_addr < 0x40000000)
  32755. -#endif
  32756. +# endif
  32757. {
  32758. if (_dl_debug_bindings)
  32759. {
  32760. diff -Nur uClibc-0.9.33.2/ldso/ldso/arm/resolve.S uClibc-git/ldso/ldso/arm/resolve.S
  32761. --- uClibc-0.9.33.2/ldso/ldso/arm/resolve.S 2012-05-15 09:20:09.000000000 +0200
  32762. +++ uClibc-git/ldso/ldso/arm/resolve.S 2014-07-25 20:36:05.257326572 +0200
  32763. @@ -92,6 +92,7 @@
  32764. #include <sys/syscall.h>
  32765. #include <bits/arm_asm.h>
  32766. +#include <bits/arm_bx.h>
  32767. #include <features.h>
  32768. @@ -101,7 +102,7 @@
  32769. .text
  32770. .align 4 @ 16 byte boundary and there are 32 bytes below (arm case)
  32771. - #if !defined(__thumb__) || defined(__thumb2__)
  32772. +#if 1 /*(!defined(__thumb__) || defined __THUMB_INTERWORK__) || defined(__thumb2__)*/
  32773. .arm
  32774. .globl _dl_linux_resolve
  32775. .type _dl_linux_resolve,%function
  32776. diff -Nur uClibc-0.9.33.2/ldso/ldso/arm/thumb_atomics.S uClibc-git/ldso/ldso/arm/thumb_atomics.S
  32777. --- uClibc-0.9.33.2/ldso/ldso/arm/thumb_atomics.S 2012-05-15 09:20:09.000000000 +0200
  32778. +++ uClibc-git/ldso/ldso/arm/thumb_atomics.S 2014-07-25 20:36:05.257326572 +0200
  32779. @@ -29,9 +29,8 @@
  32780. Lesser General Public License for more details.
  32781. You should have received a copy of the GNU Lesser General Public
  32782. - License along with the GNU C Library; if not, write to the Free
  32783. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  32784. - 02111-1307 USA. */
  32785. + License along with the GNU C Library; if not, see
  32786. + <http://www.gnu.org/licenses/>. */
  32787. #include <features.h>
  32788. diff -Nur uClibc-0.9.33.2/ldso/ldso/avr32/dl-startup.h uClibc-git/ldso/ldso/avr32/dl-startup.h
  32789. --- uClibc-0.9.33.2/ldso/ldso/avr32/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
  32790. +++ uClibc-git/ldso/ldso/avr32/dl-startup.h 2014-07-25 20:36:05.273326656 +0200
  32791. @@ -12,6 +12,7 @@
  32792. __asm__(" .text\n"
  32793. " .global _start\n"
  32794. " .type _start,@function\n"
  32795. + " .hidden _start\n"
  32796. "_start:\n"
  32797. /* All arguments are on the stack initially */
  32798. " mov r12, sp\n"
  32799. diff -Nur uClibc-0.9.33.2/ldso/ldso/avr32/dl-sysdep.h uClibc-git/ldso/ldso/avr32/dl-sysdep.h
  32800. --- uClibc-0.9.33.2/ldso/ldso/avr32/dl-sysdep.h 2012-05-15 09:20:09.000000000 +0200
  32801. +++ uClibc-git/ldso/ldso/avr32/dl-sysdep.h 2014-07-25 20:36:05.273326656 +0200
  32802. @@ -35,8 +35,6 @@
  32803. GOT_BASE[_i] += (unsigned long)MODULE->loadaddr; \
  32804. } while (0)
  32805. -#define do_rem(result, n, base) ((result) = (n) % (base))
  32806. -
  32807. /* Here we define the magic numbers that this dynamic loader should accept */
  32808. #define MAGIC1 EM_AVR32
  32809. #undef MAGIC2
  32810. diff -Nur uClibc-0.9.33.2/ldso/ldso/bfin/dl-startup.h uClibc-git/ldso/ldso/bfin/dl-startup.h
  32811. --- uClibc-0.9.33.2/ldso/ldso/bfin/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
  32812. +++ uClibc-git/ldso/ldso/bfin/dl-startup.h 2014-07-25 20:36:05.285326719 +0200
  32813. @@ -14,9 +14,8 @@
  32814. Library General Public License for more details.
  32815. You should have received a copy of the GNU Lesser General Public
  32816. -License along with uClibc; see the file COPYING.LIB. If not, write to
  32817. -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  32818. -USA. */
  32819. +License along with uClibc; see the file COPYING.LIB. If not, see
  32820. +<http://www.gnu.org/licenses/>. */
  32821. /* Any assembly language/system dependent hacks needed to setup
  32822. * boot1.c so it will work as expected and cope with whatever platform
  32823. @@ -40,10 +39,7 @@
  32824. " .text\n"
  32825. " .global __start\n"
  32826. " .type __start,@function\n"
  32827. - /* Build system expects a "_start" for the entry point;
  32828. - provide it as it's free to do so with aliases. */
  32829. - " .set _start, __start\n"
  32830. - " .global _start\n"
  32831. + " .hidden __start\n"
  32832. "__start:\n"
  32833. " call .Lcall\n"
  32834. ".Lcall:\n"
  32835. diff -Nur uClibc-0.9.33.2/ldso/ldso/bfin/dl-syscalls.h uClibc-git/ldso/ldso/bfin/dl-syscalls.h
  32836. --- uClibc-0.9.33.2/ldso/ldso/bfin/dl-syscalls.h 2012-05-15 09:20:09.000000000 +0200
  32837. +++ uClibc-git/ldso/ldso/bfin/dl-syscalls.h 2014-07-25 20:36:05.285326719 +0200
  32838. @@ -14,9 +14,8 @@
  32839. Library General Public License for more details.
  32840. You should have received a copy of the GNU Lesser General Public
  32841. -License along with uClibc; see the file COPYING.LIB. If not, write to
  32842. -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  32843. -USA. */
  32844. +License along with uClibc; see the file COPYING.LIB. If not, see
  32845. +<http://www.gnu.org/licenses/>. */
  32846. #ifdef __NR_sram_alloc
  32847. #define __NR__dl_sram_alloc __NR_sram_alloc
  32848. diff -Nur uClibc-0.9.33.2/ldso/ldso/bfin/elfinterp.c uClibc-git/ldso/ldso/bfin/elfinterp.c
  32849. --- uClibc-0.9.33.2/ldso/ldso/bfin/elfinterp.c 2012-05-15 09:20:09.000000000 +0200
  32850. +++ uClibc-git/ldso/ldso/bfin/elfinterp.c 2014-07-25 20:36:05.289326740 +0200
  32851. @@ -20,9 +20,8 @@
  32852. Library General Public License for more details.
  32853. You should have received a copy of the GNU Lesser General Public
  32854. -License along with uClibc; see the file COPYING.LIB. If not, write to
  32855. -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  32856. -USA. */
  32857. +License along with uClibc; see the file COPYING.LIB. If not, see
  32858. +<http://www.gnu.org/licenses/>. */
  32859. #include <sys/cdefs.h> /* __attribute_used__ */
  32860. diff -Nur uClibc-0.9.33.2/ldso/ldso/bfin/resolve.S uClibc-git/ldso/ldso/bfin/resolve.S
  32861. --- uClibc-0.9.33.2/ldso/ldso/bfin/resolve.S 2012-05-15 09:20:09.000000000 +0200
  32862. +++ uClibc-git/ldso/ldso/bfin/resolve.S 2014-07-25 20:36:05.289326740 +0200
  32863. @@ -14,9 +14,8 @@
  32864. Library General Public License for more details.
  32865. You should have received a copy of the GNU Lesser General Public
  32866. -License along with uClibc; see the file COPYING.LIB. If not, write to
  32867. -the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  32868. -USA. */
  32869. +License along with uClibc; see the file COPYING.LIB. If not, see
  32870. +<http://www.gnu.org/licenses/>. */
  32871. /* The function below is tail-called by resolver stubs when a
  32872. lazily-bound function is called. It must preserve all
  32873. diff -Nur uClibc-0.9.33.2/ldso/ldso/c6x/dl-startup.h uClibc-git/ldso/ldso/c6x/dl-startup.h
  32874. --- uClibc-0.9.33.2/ldso/ldso/c6x/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
  32875. +++ uClibc-git/ldso/ldso/c6x/dl-startup.h 2014-07-25 20:36:05.301326802 +0200
  32876. @@ -6,10 +6,9 @@
  32877. *
  32878. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  32879. */
  32880. -
  32881. #undef DL_START
  32882. #define DL_START(X) \
  32883. -int \
  32884. +static void * __attribute_used__ \
  32885. _dl_start (unsigned placeholder, \
  32886. struct elf32_dsbt_loadmap *dl_boot_progmap, \
  32887. struct elf32_dsbt_loadmap *dl_boot_ldsomap, \
  32888. @@ -34,7 +33,6 @@
  32889. * B4 --> executable loadmap address
  32890. * A6 --> interpreter loadmap address
  32891. * B6 --> dynamic section address
  32892. - * B14 --> our DP setup by kernel
  32893. *
  32894. * NB: DSBT index is always 0 for the executable
  32895. * and 1 for the interpreter
  32896. @@ -42,7 +40,76 @@
  32897. __asm__(" .text\n"
  32898. ".globl _start\n"
  32899. + ".hidden _start\n"
  32900. "_start:\n"
  32901. + /* Find interpreter DSBT base in dynamic section */
  32902. + " MV .S2 B6,B2\n"
  32903. + " || ADD .D1X B6,4,A2\n"
  32904. + " LDW .D2T2 *B2++[2],B0\n"
  32905. + " || LDW .D1T1 *A2++[2],A0\n"
  32906. + " MVKL .S2 " __stringify(DT_C6000_DSBT_BASE) ",B7\n"
  32907. + " MVKH .S2 " __stringify(DT_C6000_DSBT_BASE) ",B7\n"
  32908. + " NOP\n"
  32909. + " NOP\n"
  32910. + /*
  32911. + * B0 now holds dynamic tag and A0 holds tag value.
  32912. + * Loop through looking for DSBT base tag
  32913. + */
  32914. + "0:\n"
  32915. + " [B0] CMPEQ .L2 B0,B7,B1\n"
  32916. + " || [!B0] MVK .S2 1,B1\n"
  32917. + " [!B1] BNOP .S1 0b,5\n"
  32918. + " ||[!B1] LDW .D2T2 *B2++[2],B0\n"
  32919. + " ||[!B1] LDW .D1T1 *A2++[2],A0\n"
  32920. + /*
  32921. + * DSBT base in A0 needs to be relocated.
  32922. + * Search through our loadmap to find where it got loaded.
  32923. + *
  32924. + * struct elf32_dsbt_loadmap {
  32925. + * Elf32_Half version;
  32926. + * Elf32_Half nsegs;
  32927. + * struct {
  32928. + * Elf32_Addr addr;
  32929. + * Elf32_Addr p_vaddr;
  32930. + * Elf32_Word p_memsz;
  32931. + * } segments[];
  32932. + * }
  32933. + *
  32934. + */
  32935. + " MV .S1 A6,A1\n"
  32936. + " [!A1] MV .S1X B4,A1\n"
  32937. + " ADD .D1 A1,2,A3\n"
  32938. + " LDHU .D1T2 *A3++[1],B0\n" /* nsegs */
  32939. + " LDW .D1T1 *A3++[1],A10\n" /* addr */
  32940. + " LDW .D1T1 *A3++[1],A11\n" /* p_vaddr */
  32941. + " LDW .D1T1 *A3++[1],A12\n" /* p_memsz */
  32942. + " NOP\n"
  32943. + " NOP\n"
  32944. + /*
  32945. + * Here we have:
  32946. + * B0 -> number of segments to search.
  32947. + * A3 -> pointer to next segment to check
  32948. + * A10 -> segment load address
  32949. + * A11 -> ELF segment virt address
  32950. + * A12 -> ELF segment size
  32951. + */
  32952. + "0:\n"
  32953. + " [!B0] B .S2 0f\n"
  32954. + " SUB .D2 B0,1,B0\n"
  32955. + " CMPLTU .L1 A0,A11,A13\n"
  32956. + " || SUB .S1 A12,1,A12\n"
  32957. + " ADD .D1 A11,A12,A12\n"
  32958. + " CMPGTU .L1 A0,A12,A14\n"
  32959. + " OR .L1 A13,A14,A2\n"
  32960. + " [A2] B .S2 0b\n"
  32961. + " || [!A2] SUB .L1 A0,A11,A0\n"
  32962. + " [B0] LDW .D1T1 *A3++[1],A10\n" /* addr */
  32963. + " || [!A2] ADD .L1 A0,A10,A0\n"
  32964. + " [B0] LDW .D1T1 *A3++[1],A11\n" /* p_vaddr */
  32965. + " [B0] LDW .D1T1 *A3++[1],A12\n" /* p_memsz */
  32966. + " MV .S2X A0,B14\n"
  32967. + " NOP\n"
  32968. + "0:\n"
  32969. " B .S2 _dl_start\n"
  32970. " STW .D2T2 B14, *+B14[1]\n"
  32971. " ADD .D1X B15,8,A8\n"
  32972. diff -Nur uClibc-0.9.33.2/ldso/ldso/c6x/dl-sysdep.h uClibc-git/ldso/ldso/c6x/dl-sysdep.h
  32973. --- uClibc-0.9.33.2/ldso/ldso/c6x/dl-sysdep.h 2012-05-15 09:20:09.000000000 +0200
  32974. +++ uClibc-git/ldso/ldso/c6x/dl-sysdep.h 2014-07-25 20:36:05.301326802 +0200
  32975. @@ -52,13 +52,13 @@
  32976. struct funcdesc_ht;
  32977. struct elf32_dsbt_loadaddr;
  32978. -/* We must force strings used early in the bootstrap into the text
  32979. - segment (const data), such that they are referenced relative to
  32980. - the DP register rather than through the GOT which will not have
  32981. - been relocated when these are used. */
  32982. +/* Current toolchains access constant strings via unrelocated GOT
  32983. + entries. Fortunately, we have enough in place to just call the
  32984. + relocation function early on. */
  32985. #undef SEND_EARLY_STDERR
  32986. #define SEND_EARLY_STDERR(S) \
  32987. - do { static char __s[] = (S); SEND_STDERR (__s); } while (0)
  32988. + do { char *__p = __reloc_pointer((S), dl_boot_ldsomap?:dl_boot_progmap);\
  32989. + SEND_STDERR (__p); } while (0)
  32990. #define DL_LOADADDR_TYPE struct elf32_dsbt_loadaddr
  32991. @@ -114,7 +114,7 @@
  32992. (__dl_loadaddr_unmap ((LIB)->loadaddr))
  32993. #define DL_LOADADDR_BASE(LOADADDR) \
  32994. - ((LOADADDR).map->dsbt_table)
  32995. + ((LOADADDR).map)
  32996. #define DL_ADDR_IN_LOADADDR(ADDR, TPNT, TFROM) \
  32997. (! (TFROM) && __dl_addr_in_loadaddr ((void*)(ADDR), (TPNT)->loadaddr))
  32998. @@ -150,18 +150,28 @@
  32999. /*
  33000. - * Compute the GOT address.
  33001. - * Also setup program and interpreter DSBT table entries.
  33002. + * C6X doesn't really need the GOT here.
  33003. + * The GOT is placed just past the DSBT table, so we could find it by
  33004. + * using the DSBT register + table size found in the dynamic section.
  33005. + *
  33006. + * do { \
  33007. + * unsigned long *ldso_dsbt; \
  33008. + * ElfW(Dyn) *d = dl_boot_ldso_dyn_pointer; \
  33009. + * while (d->d_tag != DT_NULL) { \
  33010. + * if (d->d_tag == DT_C6000_DSBT_SIZE) { \
  33011. + * __asm__ (" MV .S2 B14,%0\n" \
  33012. + * : "=b" (ldso_dsbt)); \
  33013. + * (GOT) = ldso_dsbt + d->d_un.d_val; \
  33014. + * break; \
  33015. + * } \
  33016. + * d++; \
  33017. + * } \
  33018. + * } while(0)
  33019. + *
  33020. + * Instead, just point it to the DSBT table to avoid unused variable warning.
  33021. */
  33022. #define DL_BOOT_COMPUTE_GOT(GOT) \
  33023. - do { \
  33024. - unsigned long *ldso_dsbt, *prog_dsbt; \
  33025. - ldso_dsbt = dl_boot_ldsomap->dsbt_table; \
  33026. - prog_dsbt = dl_boot_progmap->dsbt_table; \
  33027. - ldso_dsbt[0] = prog_dsbt[0] = (unsigned long)prog_dsbt; \
  33028. - ldso_dsbt[1] = prog_dsbt[1] = (unsigned long)ldso_dsbt; \
  33029. - (GOT) = ldso_dsbt + dl_boot_ldsomap->dsbt_size; \
  33030. - } while(0)
  33031. + __asm__ (" MV .S2 B14,%0\n" : "=b" (GOT))
  33032. #define DL_BOOT_COMPUTE_DYN(dpnt, got, load_addr) \
  33033. ((dpnt) = dl_boot_ldso_dyn_pointer)
  33034. @@ -186,12 +196,9 @@
  33035. # undef __USE_GNU
  33036. #endif
  33037. -static __always_inline Elf32_Addr
  33038. -elf_machine_load_address (void)
  33039. -{
  33040. - /* this is never an issue on DSBT systems */
  33041. - return 0;
  33042. -}
  33043. +/* we need this for __LDSO_STANDALONE_SUPPORT__ */
  33044. +#define elf_machine_load_address() \
  33045. + (dl_boot_ldsomap ?: dl_boot_progmap)->segs[0].addr
  33046. static __always_inline void
  33047. elf_machine_relative (DL_LOADADDR_TYPE load_off, const Elf32_Addr rel_addr,
  33048. diff -Nur uClibc-0.9.33.2/ldso/ldso/c6x/elfinterp.c uClibc-git/ldso/ldso/c6x/elfinterp.c
  33049. --- uClibc-0.9.33.2/ldso/ldso/c6x/elfinterp.c 2012-05-15 09:20:09.000000000 +0200
  33050. +++ uClibc-git/ldso/ldso/c6x/elfinterp.c 2014-07-25 20:36:05.301326802 +0200
  33051. @@ -69,14 +69,12 @@
  33052. got_addr = (char **) DL_RELOC_ADDR(tpnt->loadaddr, this_reloc->r_offset);
  33053. /* Get the address to be used to fill in the GOT entry. */
  33054. - new_addr = _dl_find_hash(symname, tpnt->symbol_scope, tpnt,
  33055. - ELF_RTYPE_CLASS_PLT, NULL);
  33056. + new_addr = _dl_find_hash(symname, &_dl_loaded_modules->symbol_scope, tpnt, ELF_RTYPE_CLASS_PLT, NULL);
  33057. if (unlikely(!new_addr)) {
  33058. _dl_dprintf(2, "%s: can't resolve symbol '%s' in lib '%s'.\n", _dl_progname, symname, tpnt->libname);
  33059. _dl_exit(1);
  33060. }
  33061. -
  33062. #if defined (__SUPPORT_LD_DEBUG__)
  33063. if (_dl_debug_bindings) {
  33064. _dl_dprintf(_dl_debug_file, "\nresolve function: %s", symname);
  33065. @@ -96,9 +94,9 @@
  33066. }
  33067. static int
  33068. -_dl_parse(struct elf_resolve *tpnt, struct dyn_elf *scope,
  33069. +_dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
  33070. unsigned long rel_addr, unsigned long rel_size,
  33071. - int (*reloc_fnc) (struct elf_resolve *tpnt, struct dyn_elf *scope,
  33072. + int (*reloc_fnc) (struct elf_resolve *tpnt, struct r_scope_elem *scope,
  33073. ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab))
  33074. {
  33075. unsigned int i;
  33076. @@ -148,7 +146,7 @@
  33077. }
  33078. static int
  33079. -_dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
  33080. +_dl_do_reloc (struct elf_resolve *tpnt,struct r_scope_elem *scope,
  33081. ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
  33082. {
  33083. int reloc_type;
  33084. @@ -157,7 +155,9 @@
  33085. unsigned long *reloc_addr;
  33086. unsigned long symbol_addr, sym_val;
  33087. long reloc_addend;
  33088. - unsigned long old_val, new_val;
  33089. + unsigned long old_val, new_val = 0;
  33090. + struct symbol_ref sym_ref;
  33091. + struct elf_resolve *symbol_tpnt;
  33092. reloc_addr = (unsigned long *)(intptr_t)
  33093. DL_RELOC_ADDR (tpnt->loadaddr, rpnt->r_offset);
  33094. @@ -167,14 +167,17 @@
  33095. symtab_index = ELF_R_SYM(rpnt->r_info);
  33096. symbol_addr = 0;
  33097. symname = strtab + symtab[symtab_index].st_name;
  33098. + sym_ref.sym = &symtab[symtab_index];
  33099. + sym_ref.tpnt = NULL;
  33100. if (ELF_ST_BIND (symtab[symtab_index].st_info) == STB_LOCAL) {
  33101. symbol_addr = (unsigned long)
  33102. DL_RELOC_ADDR (tpnt->loadaddr, symtab[symtab_index].st_value);
  33103. + symbol_tpnt = tpnt;
  33104. } else {
  33105. - symbol_addr = (unsigned long) _dl_find_hash(strtab + symtab[symtab_index].st_name,
  33106. - scope, tpnt, elf_machine_type_class(reloc_type),
  33107. - NULL);
  33108. + symbol_addr = (unsigned long) _dl_find_hash(symname,
  33109. + scope, NULL, elf_machine_type_class(reloc_type),
  33110. + &sym_ref);
  33111. /*
  33112. * We want to allow undefined references to weak symbols - this might
  33113. * have been intentional. We should not be linking local symbols
  33114. @@ -186,6 +189,7 @@
  33115. _dl_progname, strtab + symtab[symtab_index].st_name);
  33116. _dl_exit (1);
  33117. }
  33118. + symbol_tpnt = sym_ref.tpnt;
  33119. }
  33120. old_val = *reloc_addr;
  33121. sym_val = symbol_addr + reloc_addend;
  33122. @@ -199,7 +203,7 @@
  33123. *reloc_addr = sym_val;
  33124. break;
  33125. case R_C6000_DSBT_INDEX:
  33126. - new_val = (old_val & ~0x007fff00) | ((tpnt->loadaddr.map->dsbt_index & 0x7fff) << 8);
  33127. + new_val = (old_val & ~0x007fff00) | ((symbol_tpnt->dsbt_index & 0x7fff) << 8);
  33128. *reloc_addr = new_val;
  33129. break;
  33130. case R_C6000_ABS_L16:
  33131. @@ -242,7 +246,7 @@
  33132. static int
  33133. _dl_do_lazy_reloc (struct elf_resolve *tpnt,
  33134. - struct dyn_elf *scope attribute_unused,
  33135. + struct r_scope_elem *scope attribute_unused,
  33136. ELF_RELOC *rpnt, ElfW(Sym) *symtab attribute_unused,
  33137. char *strtab attribute_unused)
  33138. {
  33139. @@ -283,9 +287,9 @@
  33140. int
  33141. _dl_parse_relocation_information
  33142. -(struct dyn_elf *rpnt, unsigned long rel_addr, unsigned long rel_size)
  33143. +(struct dyn_elf *rpnt, struct r_scope_elem *scope, unsigned long rel_addr, unsigned long rel_size)
  33144. {
  33145. - return _dl_parse(rpnt->dyn, rpnt->dyn->symbol_scope, rel_addr, rel_size, _dl_do_reloc);
  33146. + return _dl_parse(rpnt->dyn, scope, rel_addr, rel_size, _dl_do_reloc);
  33147. }
  33148. /* We don't have copy relocs. */
  33149. diff -Nur uClibc-0.9.33.2/ldso/ldso/cris/dl-startup.h uClibc-git/ldso/ldso/cris/dl-startup.h
  33150. --- uClibc-0.9.33.2/ldso/ldso/cris/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
  33151. +++ uClibc-git/ldso/ldso/cris/dl-startup.h 2014-07-25 20:36:05.321326908 +0200
  33152. @@ -10,6 +10,7 @@
  33153. " .text\n" \
  33154. " .globl _start\n" \
  33155. " .type _start,@function\n" \
  33156. +" .hidden _start\n" \
  33157. "_start:\n" \
  33158. " move.d $sp,$r10\n" \
  33159. " lapc _dl_start,$r9\n" \
  33160. @@ -28,6 +29,7 @@
  33161. " .text\n" \
  33162. " .globl _start\n" \
  33163. " .type _start,@function\n" \
  33164. +" .hidden _start\n" \
  33165. "_start:\n" \
  33166. " move.d $sp,$r10\n" \
  33167. " move.d $pc,$r9\n" \
  33168. diff -Nur uClibc-0.9.33.2/ldso/ldso/dl-elf.c uClibc-git/ldso/ldso/dl-elf.c
  33169. --- uClibc-0.9.33.2/ldso/ldso/dl-elf.c 2012-05-15 09:20:09.000000000 +0200
  33170. +++ uClibc-git/ldso/ldso/dl-elf.c 2014-07-25 20:36:05.321326908 +0200
  33171. @@ -174,8 +174,11 @@
  33172. _dl_strcpy(mylibname, "."); /* Assume current dir if empty path */
  33173. _dl_strcat(mylibname, "/");
  33174. _dl_strcat(mylibname, name);
  33175. - if ((tpnt = _dl_load_elf_shared_library(rflags, rpnt, mylibname)) != NULL)
  33176. - return tpnt;
  33177. +#ifdef __LDSO_SAFE_RUNPATH__
  33178. + if (*mylibname == '/')
  33179. +#endif
  33180. + if ((tpnt = _dl_load_elf_shared_library(rflags, rpnt, mylibname)) != NULL)
  33181. + return tpnt;
  33182. path_n = path+1;
  33183. }
  33184. path++;
  33185. @@ -500,7 +503,7 @@
  33186. return NULL;
  33187. }
  33188. header = _dl_mmap((void *) 0, _dl_pagesize, PROT_READ | PROT_WRITE,
  33189. - MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZE, -1, 0);
  33190. + MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZED, -1, 0);
  33191. if (_dl_mmap_check_error(header)) {
  33192. _dl_dprintf(2, "%s:%i: can't map '%s'\n", _dl_progname, __LINE__, libname);
  33193. _dl_internal_error_number = LD_ERROR_MMAP_FAILED;
  33194. @@ -739,7 +742,7 @@
  33195. }
  33196. }
  33197. #else
  33198. - _dl_dprintf(_dl_debug_file, "Can't modify %s's text section."
  33199. + _dl_dprintf(2, "Can't modify %s's text section."
  33200. " Use GCC option -fPIC for shared objects, please.\n",
  33201. libname);
  33202. _dl_exit(1);
  33203. @@ -791,7 +794,7 @@
  33204. #endif
  33205. {
  33206. # ifdef __SUPPORT_LD_DEBUG_EARLY__
  33207. - unsigned int tmp = (unsigned int) tpnt->l_tls_initimage;
  33208. + char *tmp = (char *) tpnt->l_tls_initimage;
  33209. tpnt->l_tls_initimage = (char *) tlsppnt->p_vaddr + tpnt->loadaddr;
  33210. _dl_debug_early("Relocated TLS initial image from %x to %x (size = %x)\n", tmp, tpnt->l_tls_initimage, tpnt->l_tls_initimage_size);
  33211. tmp = 0;
  33212. @@ -851,10 +854,15 @@
  33213. /* Handle DSBT initialization */
  33214. {
  33215. struct elf_resolve *t, *ref;
  33216. - int idx = tpnt->loadaddr.map->dsbt_index;
  33217. - unsigned *dsbt = tpnt->loadaddr.map->dsbt_table;
  33218. + int idx = tpnt->dsbt_index;
  33219. + void **dsbt = tpnt->dsbt_table;
  33220. - if (idx == 0) {
  33221. + /*
  33222. + * It is okay (required actually) to have zero idx for an executable.
  33223. + * This is the case when running ldso standalone and the program
  33224. + * is being mapped in via _dl_load_shared_library().
  33225. + */
  33226. + if (idx == 0 && tpnt->libtype != elf_executable) {
  33227. if (!dynamic_info[DT_TEXTREL]) {
  33228. /* This DSO has not been assigned an index. */
  33229. _dl_dprintf(2, "%s: '%s' is missing a dsbt index assignment!\n",
  33230. @@ -869,9 +877,9 @@
  33231. break;
  33232. }
  33233. }
  33234. - idx = tpnt->loadaddr.map->dsbt_size;
  33235. + idx = tpnt->dsbt_size;
  33236. while (idx-- > 0)
  33237. - if (!ref || ref->loadaddr.map->dsbt_table[idx] == NULL)
  33238. + if (!ref || ref->dsbt_table[idx] == NULL)
  33239. break;
  33240. if (idx <= 0) {
  33241. _dl_dprintf(2, "%s: '%s' caused DSBT table overflow!\n",
  33242. @@ -880,43 +888,36 @@
  33243. }
  33244. _dl_if_debug_dprint("\n\tfile='%s'; assigned index %d\n",
  33245. libname, idx);
  33246. - tpnt->loadaddr.map->dsbt_index = idx;
  33247. + tpnt->dsbt_index = idx;
  33248. + }
  33249. + /* make sure index is not already used */
  33250. + if (_dl_ldso_dsbt[idx]) {
  33251. + struct elf_resolve *dup;
  33252. + const char *dup_name;
  33253. +
  33254. + for (dup = _dl_loaded_modules; dup; dup = dup->next)
  33255. + if (dup != tpnt && dup->dsbt_index == idx)
  33256. + break;
  33257. + if (dup)
  33258. + dup_name = dup->libname;
  33259. + else if (idx == 1)
  33260. + dup_name = "runtime linker";
  33261. + else
  33262. + dup_name = "unknown library";
  33263. + _dl_dprintf(2, "%s: '%s' dsbt index %d already used by %s!\n",
  33264. + _dl_progname, libname, idx, dup_name);
  33265. + _dl_exit(1);
  33266. }
  33267. /*
  33268. * Setup dsbt slot for this module in dsbt of all modules.
  33269. */
  33270. - ref = NULL;
  33271. - for (t = _dl_loaded_modules; t; t = t->next) {
  33272. - /* find a dsbt table from another module */
  33273. - if (ref == NULL && t != tpnt) {
  33274. - ref = t;
  33275. -
  33276. - /* make sure index is not already used */
  33277. - if (t->loadaddr.map->dsbt_table[idx]) {
  33278. - struct elf_resolve *dup;
  33279. - char *dup_name;
  33280. -
  33281. - for (dup = _dl_loaded_modules; dup; dup = dup->next)
  33282. - if (dup != tpnt && dup->loadaddr.map->dsbt_index == idx)
  33283. - break;
  33284. - if (dup)
  33285. - dup_name = dup->libname;
  33286. - else if (idx == 1)
  33287. - dup_name = "runtime linker";
  33288. - else
  33289. - dup_name = "unknown library";
  33290. - _dl_dprintf(2, "%s: '%s' dsbt index %d already used by %s!\n",
  33291. - _dl_progname, libname, idx, dup_name);
  33292. - _dl_exit(1);
  33293. - }
  33294. - }
  33295. - t->loadaddr.map->dsbt_table[idx] = (unsigned)dsbt;
  33296. - }
  33297. - if (ref)
  33298. - _dl_memcpy(dsbt, ref->loadaddr.map->dsbt_table,
  33299. - tpnt->loadaddr.map->dsbt_size * sizeof(unsigned *));
  33300. + for (t = _dl_loaded_modules; t; t = t->next)
  33301. + t->dsbt_table[idx] = dsbt;
  33302. + _dl_ldso_dsbt[idx] = dsbt;
  33303. + _dl_memcpy(dsbt, _dl_ldso_dsbt,
  33304. + tpnt->dsbt_size * sizeof(tpnt->dsbt_table[0]));
  33305. }
  33306. #endif
  33307. _dl_if_debug_dprint("\n\tfile='%s'; generating link map\n", libname);
  33308. @@ -1006,6 +1007,7 @@
  33309. return goof;
  33310. }
  33311. +#ifdef IS_IN_rtld
  33312. /* Minimal printf which handles only %s, %d, and %x */
  33313. void _dl_dprintf(int fd, const char *fmt, ...)
  33314. {
  33315. @@ -1071,7 +1073,7 @@
  33316. break;
  33317. }
  33318. case 'x':
  33319. - case 'X':
  33320. + case 'p':
  33321. {
  33322. char tmp[22];
  33323. #if __WORDSIZE > 32
  33324. @@ -1108,6 +1110,7 @@
  33325. _dl_strcpy(retval, string);
  33326. return retval;
  33327. }
  33328. +#endif
  33329. unsigned int _dl_parse_dynamic_info(ElfW(Dyn) *dpnt, unsigned long dynamic_info[],
  33330. void *debug_addr, DL_LOADADDR_TYPE load_off)
  33331. diff -Nur uClibc-0.9.33.2/ldso/ldso/dl-hash.c uClibc-git/ldso/ldso/dl-hash.c
  33332. --- uClibc-0.9.33.2/ldso/ldso/dl-hash.c 2012-05-15 09:20:09.000000000 +0200
  33333. +++ uClibc-git/ldso/ldso/dl-hash.c 2014-07-25 20:36:05.321326908 +0200
  33334. @@ -115,6 +115,15 @@
  33335. tpnt->dynamic_addr = (ElfW(Dyn) *)dynamic_addr;
  33336. tpnt->libtype = loaded_file;
  33337. +#ifdef __DSBT__
  33338. + if (dynamic_info[DT_DSBT_BASE_IDX] != 0)
  33339. + tpnt->dsbt_table = (void *)dynamic_info[DT_DSBT_BASE_IDX];
  33340. + if (dynamic_info[DT_DSBT_SIZE_IDX] != 0)
  33341. + tpnt->dsbt_size = dynamic_info[DT_DSBT_SIZE_IDX];
  33342. + if (dynamic_info[DT_DSBT_INDEX_IDX] != 0)
  33343. + tpnt->dsbt_index = dynamic_info[DT_DSBT_INDEX_IDX];
  33344. +#endif /* __DSBT__ */
  33345. +
  33346. #ifdef __LDSO_GNU_HASH_SUPPORT__
  33347. if (dynamic_info[DT_GNU_HASH_IDX] != 0) {
  33348. Elf32_Word *hash32 = (Elf_Symndx*)dynamic_info[DT_GNU_HASH_IDX];
  33349. @@ -355,7 +364,6 @@
  33350. #if defined(USE_TLS) && USE_TLS
  33351. if (ELF_ST_TYPE(sym->st_info) == STT_TLS) {
  33352. _dl_assert(sym_ref != NULL);
  33353. - sym_ref->tpnt = tpnt;
  33354. return (char *)sym->st_value;
  33355. }
  33356. #endif
  33357. diff -Nur uClibc-0.9.33.2/ldso/ldso/dl-tls.c uClibc-git/ldso/ldso/dl-tls.c
  33358. --- uClibc-0.9.33.2/ldso/ldso/dl-tls.c 2012-05-15 09:20:09.000000000 +0200
  33359. +++ uClibc-git/ldso/ldso/dl-tls.c 2014-07-25 20:36:05.325326929 +0200
  33360. @@ -922,8 +922,7 @@
  33361. generation. */
  33362. ++_dl_tls_generation;
  33363. - _dl_dprintf (_dl_debug_file,
  33364. - "cannot create TLS data structures: ABORT\n");
  33365. + _dl_dprintf(2, "cannot create TLS data structures: ABORT\n");
  33366. _dl_exit (127);
  33367. }
  33368. diff -Nur uClibc-0.9.33.2/ldso/ldso/i386/dl-startup.h uClibc-git/ldso/ldso/i386/dl-startup.h
  33369. --- uClibc-0.9.33.2/ldso/ldso/i386/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
  33370. +++ uClibc-git/ldso/ldso/i386/dl-startup.h 2014-07-25 20:36:05.373327180 +0200
  33371. @@ -7,6 +7,7 @@
  33372. " .text\n"
  33373. " .globl _start\n"
  33374. " .type _start,@function\n"
  33375. + " .hidden _start\n"
  33376. "_start:\n"
  33377. " call _dl_start\n"
  33378. " # Save the user entry point address in %edi.\n"
  33379. diff -Nur uClibc-0.9.33.2/ldso/ldso/ldso.c uClibc-git/ldso/ldso/ldso.c
  33380. --- uClibc-0.9.33.2/ldso/ldso/ldso.c 2012-05-15 09:20:09.000000000 +0200
  33381. +++ uClibc-git/ldso/ldso/ldso.c 2014-07-25 20:36:05.377327201 +0200
  33382. @@ -64,7 +64,7 @@
  33383. bool _dl_verbose = true; /* On by default */
  33384. bool prelinked = false;
  33385. #endif
  33386. -static int _dl_secure = 1; /* Are we dealing with setuid stuff? */
  33387. +int _dl_secure = 1; /* Are we dealing with setuid stuff? */
  33388. #ifdef __SUPPORT_LD_DEBUG__
  33389. char *_dl_debug = NULL;
  33390. @@ -77,17 +77,11 @@
  33391. int _dl_debug_file = 2;
  33392. #endif
  33393. -#if defined (__LDSO_STANDALONE_SUPPORT__) && defined (__sh__)
  33394. -/* Not hidden, needed for standalone execution. */
  33395. -/*
  33396. - * FIXME: align dl_start for SH to other archs so that we can keep this symbol
  33397. - * hidden and we don't need to handle in __uClibc_main
  33398. - */
  33399. +#ifdef __DSBT__
  33400. +void **_dl_ldso_dsbt = NULL;
  33401. +#endif
  33402. -unsigned long _dl_skip_args = 0;
  33403. -#else
  33404. unsigned long attribute_hidden _dl_skip_args = 0;
  33405. -#endif
  33406. const char *_dl_progname = UCLIBC_LDSO; /* The name of the executable being run */
  33407. #include "dl-startup.c"
  33408. @@ -245,9 +239,9 @@
  33409. _dl_debug_early("mmapping more memory\n");
  33410. _dl_mmap_zero = _dl_malloc_addr = _dl_mmap((void *) 0, rounded_size,
  33411. - PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZE, -1, 0);
  33412. + PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZED, -1, 0);
  33413. if (_dl_mmap_check_error(_dl_mmap_zero)) {
  33414. - _dl_dprintf(_dl_debug_file, "%s: mmap of a spare page failed!\n", _dl_progname);
  33415. + _dl_dprintf(2, "%s: mmap of a spare page failed!\n", _dl_progname);
  33416. _dl_exit(20);
  33417. }
  33418. }
  33419. @@ -464,9 +458,14 @@
  33420. _dl_progname = argv[0];
  33421. }
  33422. +#ifdef __DSBT__
  33423. + _dl_ldso_dsbt = (void *)tpnt->dynamic_info[DT_DSBT_BASE_IDX];
  33424. + _dl_ldso_dsbt[tpnt->dynamic_info[DT_DSBT_INDEX_IDX]] = _dl_ldso_dsbt;
  33425. +#endif
  33426. +
  33427. #ifndef __LDSO_STANDALONE_SUPPORT__
  33428. if (_start == (void *) auxvt[AT_ENTRY].a_un.a_val) {
  33429. - _dl_dprintf(_dl_debug_file, "Standalone execution is not enabled\n");
  33430. + _dl_dprintf(2, "Standalone execution is not enabled\n");
  33431. _dl_exit(1);
  33432. }
  33433. #endif
  33434. @@ -504,15 +503,15 @@
  33435. const char *nextp;
  33436. _dl_secure = 1;
  33437. +#ifdef __LDSO_PRELOAD_ENV_SUPPORT__
  33438. + _dl_preload = _dl_getenv("LD_PRELOAD", envp);
  33439. +#endif
  33440. nextp = unsecure_envvars;
  33441. do {
  33442. _dl_unsetenv (nextp, envp);
  33443. /* We could use rawmemchr but this need not be fast. */
  33444. nextp = _dl_strchr(nextp, '\0') + 1;
  33445. } while (*nextp != '\0');
  33446. -#ifdef __LDSO_PRELOAD_ENV_SUPPORT__
  33447. - _dl_preload = NULL;
  33448. -#endif
  33449. #ifdef __LDSO_LD_LIBRARY_PATH__
  33450. _dl_library_path = NULL;
  33451. #endif
  33452. @@ -527,8 +526,8 @@
  33453. #ifdef __LDSO_STANDALONE_SUPPORT__
  33454. if (_start == (void *) auxvt[AT_ENTRY].a_un.a_val) {
  33455. - unsigned int *aux_dat = (unsigned int *) argv;
  33456. - int argc = aux_dat[-1];
  33457. + ElfW(Addr) *aux_dat = (ElfW(Addr) *) argv;
  33458. + int argc = (int) aux_dat[-1];
  33459. tpnt->libname = argv[0];
  33460. while (argc > 1)
  33461. @@ -580,7 +579,7 @@
  33462. */
  33463. app_tpnt = _dl_load_elf_shared_library(_dl_secure, &rpnt, _dl_progname);
  33464. if (!app_tpnt) {
  33465. - _dl_dprintf(_dl_debug_file, "can't load '%s'\n", _dl_progname);
  33466. + _dl_dprintf(2, "can't load '%s'\n", _dl_progname);
  33467. _dl_exit(16);
  33468. }
  33469. /*
  33470. @@ -675,7 +674,7 @@
  33471. }
  33472. #else
  33473. if (app_tpnt->dynamic_info[DT_TEXTREL]) {
  33474. - _dl_dprintf(_dl_debug_file, "Can't modify application's text section; use the GCC option -fPIE for position-independent executables.\n");
  33475. + _dl_dprintf(2, "Can't modify application's text section; use the GCC option -fPIE for position-independent executables.\n");
  33476. _dl_exit(1);
  33477. }
  33478. #endif
  33479. @@ -698,6 +697,11 @@
  33480. app_tpnt->mapaddr = app_mapaddr;
  33481. app_tpnt->rtld_flags = unlazy | RTLD_GLOBAL;
  33482. app_tpnt->usage_count++;
  33483. +#ifdef __DSBT__
  33484. + _dl_ldso_dsbt[0] = app_tpnt->dsbt_table;
  33485. + _dl_memcpy(app_tpnt->dsbt_table, _dl_ldso_dsbt,
  33486. + app_tpnt->dsbt_size * sizeof(tpnt->dsbt_table[0]));
  33487. +#endif
  33488. lpnt = (unsigned long *) (app_tpnt->dynamic_info[DT_PLTGOT]);
  33489. #ifdef ALLOW_ZERO_PLTGOT
  33490. if (lpnt)
  33491. @@ -733,7 +737,7 @@
  33492. _dl_debug_early("Found TLS header for application program\n");
  33493. break;
  33494. #else
  33495. - _dl_dprintf(_dl_debug_file, "Program uses unsupported TLS data!\n");
  33496. + _dl_dprintf(2, "Program uses unsupported TLS data!\n");
  33497. _dl_exit(1);
  33498. #endif
  33499. }
  33500. @@ -747,7 +751,8 @@
  33501. * case the executable is actually an ET_DYN object.
  33502. */
  33503. if (app_tpnt->l_tls_initimage != NULL) {
  33504. - unsigned int tmp = (unsigned int) app_tpnt->l_tls_initimage;
  33505. + char *tmp attribute_unused =
  33506. + (char *) app_tpnt->l_tls_initimage;
  33507. app_tpnt->l_tls_initimage =
  33508. (char *) app_tpnt->l_tls_initimage + app_tpnt->loadaddr;
  33509. _dl_debug_early("Relocated TLS initial image from %x to %x (size = %x)\n",
  33510. @@ -823,7 +828,7 @@
  33511. #ifndef __LDSO_LDD_SUPPORT__
  33512. if (trace_loaded_objects) {
  33513. - _dl_dprintf(_dl_debug_file, "Use the ldd provided by uClibc\n");
  33514. + _dl_dprintf(2, "Use the ldd provided by uClibc\n");
  33515. _dl_exit(1);
  33516. }
  33517. #endif
  33518. @@ -879,8 +884,9 @@
  33519. else
  33520. #endif
  33521. {
  33522. - _dl_dprintf(_dl_debug_file, "%s: can't load " "library '%s'\n", _dl_progname, str);
  33523. - _dl_exit(15);
  33524. + _dl_dprintf(2, "%s: library '%s' "
  33525. + "from LD_PRELOAD can't be preloaded: ignored.\n",
  33526. + _dl_progname, str);
  33527. }
  33528. } else {
  33529. tpnt1->rtld_flags = unlazy | RTLD_GLOBAL;
  33530. @@ -923,7 +929,7 @@
  33531. }
  33532. if ((fd = _dl_open(LDSO_PRELOAD, O_RDONLY, 0)) < 0) {
  33533. - _dl_dprintf(_dl_debug_file, "%s: can't open file '%s'\n",
  33534. + _dl_dprintf(2, "%s: can't open file '%s'\n",
  33535. _dl_progname, LDSO_PRELOAD);
  33536. break;
  33537. }
  33538. @@ -932,7 +938,7 @@
  33539. PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
  33540. _dl_close(fd);
  33541. if (preload == (caddr_t) -1) {
  33542. - _dl_dprintf(_dl_debug_file, "%s:%i: can't map '%s'\n",
  33543. + _dl_dprintf(2, "%s:%i: can't map '%s'\n",
  33544. _dl_progname, __LINE__, LDSO_PRELOAD);
  33545. break;
  33546. }
  33547. @@ -971,7 +977,7 @@
  33548. else
  33549. # endif
  33550. {
  33551. - _dl_dprintf(_dl_debug_file, "%s: can't load library '%s'\n", _dl_progname, cp2);
  33552. + _dl_dprintf(2, "%s: can't load library '%s'\n", _dl_progname, cp2);
  33553. _dl_exit(15);
  33554. }
  33555. } else {
  33556. @@ -1032,7 +1038,7 @@
  33557. } else
  33558. #endif
  33559. {
  33560. - _dl_dprintf(_dl_debug_file, "%s: can't load library '%s'\n", _dl_progname, lpntstr);
  33561. + _dl_dprintf(2, "%s: can't load library '%s'\n", _dl_progname, lpntstr);
  33562. _dl_exit(16);
  33563. }
  33564. }
  33565. diff -Nur uClibc-0.9.33.2/ldso/ldso/m68k/dl-startup.h uClibc-git/ldso/ldso/m68k/dl-startup.h
  33566. --- uClibc-0.9.33.2/ldso/ldso/m68k/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
  33567. +++ uClibc-git/ldso/ldso/m68k/dl-startup.h 2014-07-25 20:36:05.389327264 +0200
  33568. @@ -19,6 +19,7 @@
  33569. .text\n\
  33570. .globl _start\n\
  33571. .type _start,@function\n\
  33572. + .hidden _start\n\
  33573. _start:\n\
  33574. move.l %sp, -(%sp)\n\
  33575. jbsr _dl_start\n\
  33576. diff -Nur uClibc-0.9.33.2/ldso/ldso/m68k/elfinterp.c uClibc-git/ldso/ldso/m68k/elfinterp.c
  33577. --- uClibc-0.9.33.2/ldso/ldso/m68k/elfinterp.c 2012-05-15 09:20:09.000000000 +0200
  33578. +++ uClibc-git/ldso/ldso/m68k/elfinterp.c 2014-07-25 20:36:05.389327264 +0200
  33579. @@ -241,8 +241,11 @@
  33580. _dl_memcpy ((void *) reloc_addr,
  33581. (void *) symbol_addr,
  33582. sym_ref.sym->st_size);
  33583. - } else
  33584. + }
  33585. +#if defined (__SUPPORT_LD_DEBUG__)
  33586. + else
  33587. _dl_dprintf(_dl_debug_file, "no symbol_addr to copy !?\n");
  33588. +#endif
  33589. break;
  33590. default:
  33591. diff -Nur uClibc-0.9.33.2/ldso/ldso/Makefile.in uClibc-git/ldso/ldso/Makefile.in
  33592. --- uClibc-0.9.33.2/ldso/ldso/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  33593. +++ uClibc-git/ldso/ldso/Makefile.in 2014-07-25 20:36:05.225326404 +0200
  33594. @@ -9,8 +9,10 @@
  33595. CFLAGS-ldso := -DNOT_IN_libc -DIS_IN_rtld $(SSP_DISABLE_FLAGS)
  33596. +ifneq ($(TARGET_ARCH),arc)
  33597. # This stuff will not work with -fomit-frame-pointer
  33598. CFLAGS-ldso += -fno-omit-frame-pointer
  33599. +endif
  33600. CFLAGS-ldso += -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) -I$(top_srcdir)ldso/include -I$(top_srcdir)ldso/ldso
  33601. CFLAGS-ldso += -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\"
  33602. @@ -36,7 +38,7 @@
  33603. else
  33604. LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS_NOSTRIP) -Wl,-z,defs
  33605. endif
  33606. -LDFLAGS-$(UCLIBC_LDSO_NAME).so += -Wl,-e,_start -Wl,-z,now -Wl,-Bsymbolic \
  33607. +LDFLAGS-$(UCLIBC_LDSO_NAME).so += -Wl,-e,$(SYMBOL_PREFIX)_start -Wl,-z,now -Wl,-Bsymbolic \
  33608. -Wl,--export-dynamic $(CFLAG_-Wl--sort-common) -Wl,--discard-locals \
  33609. $(CFLAG_-Wl--discard-all) -Wl,--no-undefined
  33610. diff -Nur uClibc-0.9.33.2/ldso/ldso/metag/dl-debug.h uClibc-git/ldso/ldso/metag/dl-debug.h
  33611. --- uClibc-0.9.33.2/ldso/ldso/metag/dl-debug.h 1970-01-01 01:00:00.000000000 +0100
  33612. +++ uClibc-git/ldso/ldso/metag/dl-debug.h 2014-07-25 20:36:05.397327305 +0200
  33613. @@ -0,0 +1,33 @@
  33614. +/*
  33615. + * Meta ELF shared library loader support.
  33616. + *
  33617. + * Program to load an elf binary on a linux system, and run it.
  33618. + * References to symbols in sharable libraries can be resolved
  33619. + * by either an ELF sharable library or a linux style of shared
  33620. + * library.
  33621. + *
  33622. + * Copyright (C) 2013, Imagination Technologies Ltd.
  33623. + *
  33624. + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  33625. + */
  33626. +
  33627. +static const char *_dl_reltypes_tab[] = {
  33628. + [0] "R_METAG_HIADDR16", "R_METAG_LOADDR16", "R_METAG_ADDR32",
  33629. + [3] "R_METAG_NONE", "R_METAG_RELBRANCH", "R_METAG_GETSETOFF",
  33630. + [6] "R_METAG_REG32OP1", "R_METAG_REG32OP2", "R_METAG_REG32OP3",
  33631. + [9] "R_METAG_REG16OP1", "R_METAG_REG16OP2", "R_METAG_REG16OP3",
  33632. + [12] "R_METAG_REG32OP4", "R_METAG_HIOG", "R_METAG_LOOG",
  33633. + [30] "R_METAG_GNU_VTINHERIT", "R_METAG_GNU_VTENTRY",
  33634. + [32] "R_METAG_HI16_GOTOFF", "R_METAG_LO16_GOTOFF",
  33635. + [34] "R_METAG_GETSET_GOTOFF", "R_METAG_GETSET_GOT",
  33636. + [36] "R_METAG_HI16_GOTPC", "R_METAG_LO16_GOTPC",
  33637. + [38] "R_METAG_HI16_PLT", "R_METAG_LO16_PLT",
  33638. + [40] "R_METAG_RELBRANCH_PLT", "R_METAG_GOTOFF",
  33639. + [42] "R_METAG_PLT", "R_METAG_COPY", "R_METAG_JMP_SLOT",
  33640. + [45] "R_METAG_RELATIVE", "R_METAG_GLOB_DAT", "R_METAG_TLS_GD",
  33641. + [48] "R_METAG_TLS_LDM", "R_METAG_TLS_LDO_HI16", "R_METAG_TLS_LDO_LO16",
  33642. + [51] "R_METAG_TLS_LDO", "R_METAG_TLS_IE", "R_METAG_TLS_IENONPIC",
  33643. + [54] "R_METAG_TLS_IENONPIC_HI16", "R_METAG_TLS_IENONPIC_LO16",
  33644. + [56] "R_METAG_TLS_TPOFF", "R_METAG_TLS_DTPMOD", "R_METAG_TLS_DTPOFF",
  33645. + [59] "R_METAG_TLS_LE", "R_METAG_TLS_LE_HI16", "R_METAG_TLS_LE_LO16"
  33646. +};
  33647. diff -Nur uClibc-0.9.33.2/ldso/ldso/metag/dl-inlines.h uClibc-git/ldso/ldso/metag/dl-inlines.h
  33648. --- uClibc-0.9.33.2/ldso/ldso/metag/dl-inlines.h 1970-01-01 01:00:00.000000000 +0100
  33649. +++ uClibc-git/ldso/ldso/metag/dl-inlines.h 2014-07-25 20:36:05.421327432 +0200
  33650. @@ -0,0 +1,39 @@
  33651. +/*
  33652. + * Copyright (C) 2013, Imagination Technologies Ltd.
  33653. + *
  33654. + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  33655. + */
  33656. +
  33657. +static __always_inline int
  33658. +__dl_is_special_segment (Elf32_Ehdr *epnt,
  33659. + Elf32_Phdr *ppnt)
  33660. +{
  33661. + if (ppnt->p_type != PT_LOAD &&
  33662. + ppnt->p_type != PT_DYNAMIC)
  33663. + return 0;
  33664. +
  33665. + if (ppnt->p_vaddr >= 0x80000000 &&
  33666. + ppnt->p_vaddr < 0x82060000)
  33667. + return 1;
  33668. +
  33669. + if (ppnt->p_vaddr >= 0xe0200000 &&
  33670. + ppnt->p_vaddr < 0xe0260000)
  33671. + return 1;
  33672. +
  33673. + return 0;
  33674. +}
  33675. +
  33676. +static __always_inline char *
  33677. +__dl_map_segment (Elf32_Ehdr *epnt,
  33678. + Elf32_Phdr *ppnt,
  33679. + int infile,
  33680. + int flags)
  33681. +{
  33682. + char *addr = (char *)ppnt->p_vaddr;
  33683. +
  33684. + if (_DL_PREAD (infile, addr, ppnt->p_filesz, ppnt->p_offset) != ppnt->p_filesz) {
  33685. + return 0;
  33686. + }
  33687. +
  33688. + return addr;
  33689. +}
  33690. diff -Nur uClibc-0.9.33.2/ldso/ldso/metag/dl-startup.h uClibc-git/ldso/ldso/metag/dl-startup.h
  33691. --- uClibc-0.9.33.2/ldso/ldso/metag/dl-startup.h 1970-01-01 01:00:00.000000000 +0100
  33692. +++ uClibc-git/ldso/ldso/metag/dl-startup.h 2014-07-25 20:36:05.421327432 +0200
  33693. @@ -0,0 +1,68 @@
  33694. +/*
  33695. + * Copyright (C) 2013 Imagination Technologies Ltd.
  33696. + *
  33697. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  33698. + */
  33699. +
  33700. +/*
  33701. + * This code fixes the stack pointer so that the dynamic linker
  33702. + * can find argc, argv and auxvt (Auxillary Vector Table).
  33703. + */
  33704. +
  33705. +__asm__ (
  33706. +" .text\n"
  33707. +" .global __start\n"
  33708. +" .type __start,@function\n"
  33709. +" .hidden __start\n"
  33710. +"_start:\n"
  33711. +"__start:\n"
  33712. +" MSETL [A0StP++],D0Ar4,D0Ar2\n"
  33713. +" MOV D1Ar1,D0Ar2\n"
  33714. +" CALLR D1RtP,__dl_start\n"
  33715. +" GETL D0Ar2,D1Ar1,[A0StP+#-(1*8)]\n"
  33716. +" GETL D0Ar4,D1Ar3,[A0StP+#-(2*8)]\n"
  33717. +" ADDT A1LbP,CPC1,#HI(__GLOBAL_OFFSET_TABLE__)\n"
  33718. +" ADD A1LbP,A1LbP,#LO(__GLOBAL_OFFSET_TABLE__+4)\n"
  33719. +" ADDT A1LbP,A1LbP,#HI(__dl_fini@GOTOFF)\n"
  33720. +" ADD A1LbP,A1LbP,#LO(__dl_fini@GOTOFF)\n"
  33721. +" MOV D0Ar4, A1LbP\n"
  33722. +" SUB A0StP,A0StP,#(2*8)\n"
  33723. +" MOV PC,D0Re0\n"
  33724. +" .size __start,.-__start\n"
  33725. +" .previous\n"
  33726. +);
  33727. +
  33728. +
  33729. +/*
  33730. + * Get a pointer to the argv array. On many platforms this can be just
  33731. + * the address if the first argument, on other platforms we need to
  33732. + * do something a little more subtle here.
  33733. + */
  33734. +
  33735. +#define GET_ARGV(ARGVP, ARGS) ARGVP = (((unsigned long *) ARGS))
  33736. +
  33737. +
  33738. +/* Handle relocation of the symbols in the dynamic loader. */
  33739. +static inline
  33740. +void PERFORM_BOOTSTRAP_RELOC(ELF_RELOC *rpnt, unsigned long *reloc_addr,
  33741. + unsigned long symbol_addr, unsigned long load_addr, Elf32_Sym *symtab)
  33742. +{
  33743. + switch (ELF32_R_TYPE(rpnt->r_info)) {
  33744. + case R_METAG_GLOB_DAT:
  33745. + case R_METAG_JMP_SLOT:
  33746. + case R_METAG_ADDR32:
  33747. + *reloc_addr = symbol_addr;
  33748. + break;
  33749. + case R_METAG_RELATIVE:
  33750. + *reloc_addr = load_addr + rpnt->r_addend;
  33751. + break;
  33752. + case R_METAG_RELBRANCH:
  33753. + *reloc_addr = symbol_addr + rpnt->r_addend - *reloc_addr - 4;
  33754. + break;
  33755. + case R_METAG_NONE:
  33756. + break;
  33757. + default:
  33758. + _dl_exit(1);
  33759. + break;
  33760. + }
  33761. +}
  33762. diff -Nur uClibc-0.9.33.2/ldso/ldso/metag/dl-syscalls.h uClibc-git/ldso/ldso/metag/dl-syscalls.h
  33763. --- uClibc-0.9.33.2/ldso/ldso/metag/dl-syscalls.h 1970-01-01 01:00:00.000000000 +0100
  33764. +++ uClibc-git/ldso/ldso/metag/dl-syscalls.h 2014-07-25 20:36:05.421327432 +0200
  33765. @@ -0,0 +1,6 @@
  33766. +/* stub for arch-specific syscall issues
  33767. + *
  33768. + * Copyright (C) 2013, Imagination Technologies Ltd.
  33769. + *
  33770. + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  33771. + */
  33772. diff -Nur uClibc-0.9.33.2/ldso/ldso/metag/dl-sysdep.h uClibc-git/ldso/ldso/metag/dl-sysdep.h
  33773. --- uClibc-0.9.33.2/ldso/ldso/metag/dl-sysdep.h 1970-01-01 01:00:00.000000000 +0100
  33774. +++ uClibc-git/ldso/ldso/metag/dl-sysdep.h 2014-07-25 20:36:05.421327432 +0200
  33775. @@ -0,0 +1,121 @@
  33776. +/*
  33777. + * Meta can never use Elf32_Rel relocations.
  33778. + *
  33779. + * Copyright (C) 2013, Imagination Technologies Ltd.
  33780. + *
  33781. + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  33782. + */
  33783. +
  33784. +#define ELF_USES_RELOCA
  33785. +
  33786. +#include <elf.h>
  33787. +
  33788. +/* Initialization sequence for the GOT. */
  33789. +#define INIT_GOT(GOT_BASE,MODULE) \
  33790. +{ \
  33791. + GOT_BASE[1] = (unsigned long) MODULE; \
  33792. + GOT_BASE[2] = (unsigned long) _dl_linux_resolve; \
  33793. +}
  33794. +
  33795. +/* Maximum unsigned GOT [GS]ETD offset size, ie. 2^(11+2). */
  33796. +#define GOT_REG_OFFSET 0x2000
  33797. +
  33798. +/* Defined some magic numbers that this ld.so should accept. */
  33799. +#define MAGIC1 EM_METAG
  33800. +#undef MAGIC2
  33801. +#define ELF_TARGET "META"
  33802. +
  33803. +/* Need bootstrap relocations */
  33804. +#define ARCH_NEEDS_BOOTSTRAP_RELOCS
  33805. +
  33806. +struct elf_resolve;
  33807. +extern unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry);
  33808. +
  33809. +/* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry or
  33810. + TLS variable, so undefined references should not be allowed to
  33811. + define the value.
  33812. +
  33813. + ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
  33814. + of the main executable's symbols, as for a COPY reloc. */
  33815. +#define elf_machine_type_class(type) \
  33816. + ((((type) == R_METAG_JMP_SLOT || (type) == R_METAG_TLS_DTPMOD \
  33817. + || (type) == R_METAG_TLS_DTPOFF || (type) == R_METAG_TLS_TPOFF) \
  33818. + * ELF_RTYPE_CLASS_PLT) \
  33819. + | (((type) == R_METAG_COPY) * ELF_RTYPE_CLASS_COPY))
  33820. +
  33821. +static inline Elf32_Addr
  33822. +elf_machine_dynamic(Elf32_Ehdr *header)
  33823. +{
  33824. + Elf32_Addr *got;
  33825. +
  33826. + __asm__ ("MOV %0,A1LbP" : "=r" (got));
  33827. +
  33828. + if (header->e_ident[EI_ABIVERSION] >= 1) {
  33829. + /* GOT register offset was introduced with ABI v1 */
  33830. + got = (Elf32_Addr*)((void*)got - GOT_REG_OFFSET);
  33831. + }
  33832. + return *got;
  33833. +}
  33834. +
  33835. +#define DL_BOOT_COMPUTE_GOT(GOT) \
  33836. + ((GOT) = elf_machine_dynamic(header))
  33837. +
  33838. +static inline Elf32_Addr
  33839. +elf_machine_load_address(void)
  33840. +{
  33841. + Elf32_Addr addr;
  33842. + __asm__ ("MOV D1Ar1,A1LbP\n"
  33843. + "ADDT D1Ar1,D1Ar1,#HI(__dl_start@GOTOFF)\n"
  33844. + "ADD D1Ar1,D1Ar1,#LO(__dl_start@GOTOFF)\n"
  33845. + "ADDT D0Ar2,D0Ar2,#HI(__dl_start_addr@GOTOFF)\n"
  33846. + "ADD D0Ar2,D0Ar2,#LO(__dl_start_addr@GOTOFF)\n"
  33847. + "GETD D0Ar2,[D0Ar2]\n"
  33848. + "SUB %0,D1Ar1,D0Ar2\n"
  33849. + ".section .data\n"
  33850. + "__dl_start_addr: .long __dl_start\n"
  33851. + ".previous\n"
  33852. + : "=d" (addr) : : "D1Ar1", "D0Ar2");
  33853. + return addr;
  33854. +}
  33855. +
  33856. +static inline void
  33857. +elf_machine_relative(Elf32_Addr load_off, const Elf32_Addr rel_addr,
  33858. + Elf32_Word relative_count)
  33859. +{
  33860. + Elf32_Rela *rpnt = (void *)rel_addr;
  33861. +
  33862. + --rpnt;
  33863. + do {
  33864. + Elf32_Addr *const reloc_addr =
  33865. + (void *)(load_off + (++rpnt)->r_offset);
  33866. +
  33867. + *reloc_addr = load_off + rpnt->r_addend;
  33868. + } while (--relative_count);
  33869. +}
  33870. +
  33871. +#define DL_MALLOC_ALIGN 8
  33872. +
  33873. +#define HAVE_DL_INLINES_H
  33874. +
  33875. +#define DL_IS_SPECIAL_SEGMENT(EPNT, PPNT) \
  33876. + __dl_is_special_segment(EPNT, PPNT)
  33877. +#define DL_MAP_SEGMENT(EPNT, PPNT, INFILE, FLAGS) \
  33878. + __dl_map_segment (EPNT, PPNT, INFILE, FLAGS)
  33879. +
  33880. +#define DL_CHECK_LIB_TYPE(epnt, piclib, _dl_progname, libname) \
  33881. +do \
  33882. +{ \
  33883. + ElfW(Phdr) *ppnt_; \
  33884. + char *header_ = (char *)epnt; \
  33885. + ppnt_ = (ElfW(Phdr) *)(intptr_t) & header_[epnt->e_phoff]; \
  33886. + if (ppnt_->p_vaddr >= 0x80000000 && \
  33887. + ppnt_->p_vaddr < 0x82060000) \
  33888. + (piclib) = 2; \
  33889. + if (ppnt_->p_vaddr >= 0xe0200000 && \
  33890. + ppnt_->p_vaddr < 0xe0260000) \
  33891. + (piclib) = 2; \
  33892. +} \
  33893. +while (0)
  33894. +
  33895. +#define _DL_PREAD(FD, BUF, SIZE, OFFSET) \
  33896. + (_dl_pread((FD), (BUF), (SIZE), (OFFSET)))
  33897. diff -Nur uClibc-0.9.33.2/ldso/ldso/metag/elfinterp.c uClibc-git/ldso/ldso/metag/elfinterp.c
  33898. --- uClibc-0.9.33.2/ldso/ldso/metag/elfinterp.c 1970-01-01 01:00:00.000000000 +0100
  33899. +++ uClibc-git/ldso/ldso/metag/elfinterp.c 2014-07-25 20:36:05.421327432 +0200
  33900. @@ -0,0 +1,318 @@
  33901. +/*
  33902. + * Meta ELF shared library loader support.
  33903. + *
  33904. + * Program to load an elf binary on a linux system, and run it.
  33905. + * References to symbols in sharable libraries can be resolved
  33906. + * by either an ELF sharable library or a linux style of shared
  33907. + * library.
  33908. + *
  33909. + * Copyright (C) 2013, Imagination Technologies Ltd.
  33910. + *
  33911. + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  33912. + */
  33913. +
  33914. +#include "ldso.h"
  33915. +
  33916. +/* Defined in resolve.S. */
  33917. +extern int _dl_linux_resolve(void);
  33918. +
  33919. +static inline unsigned long __get_unaligned_reloc(unsigned long *addr)
  33920. +{
  33921. + char *rel_addr = (char *)addr;
  33922. + unsigned long val;
  33923. +
  33924. + val = *rel_addr++ & 0xff;
  33925. + val |= (*rel_addr++ << 8) & 0x0000ff00;
  33926. + val |= (*rel_addr++ << 16) & 0x00ff0000;
  33927. + val |= (*rel_addr++ << 24) & 0xff000000;
  33928. +
  33929. + return val;
  33930. +}
  33931. +
  33932. +static inline void __put_unaligned_reloc(unsigned long *addr,
  33933. + unsigned long val)
  33934. +{
  33935. + char *rel_addr = (char *)addr;
  33936. +
  33937. + *rel_addr++ = (val & 0x000000ff);
  33938. + *rel_addr++ = ((val & 0x0000ff00) >> 8);
  33939. + *rel_addr++ = ((val & 0x00ff0000) >> 16);
  33940. + *rel_addr++ = ((val & 0xff000000) >> 24);
  33941. +}
  33942. +
  33943. +unsigned long
  33944. +_dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
  33945. +{
  33946. + int symtab_index;
  33947. + char *strtab;
  33948. + char *symname;
  33949. + char *new_addr;
  33950. + char *rel_addr;
  33951. + char **got_addr;
  33952. + ElfW(Sym) *symtab;
  33953. + ELF_RELOC *this_reloc;
  33954. + unsigned long instr_addr;
  33955. +
  33956. + rel_addr = (char *)tpnt->dynamic_info[DT_JMPREL];
  33957. +
  33958. + this_reloc = (ELF_RELOC *)(intptr_t)(rel_addr + reloc_entry);
  33959. + symtab_index = ELF_R_SYM(this_reloc->r_info);
  33960. +
  33961. + symtab = (ElfW(Sym) *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
  33962. + strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
  33963. + symname = strtab + symtab[symtab_index].st_name;
  33964. +
  33965. + /* Address of the jump instruction to fix up. */
  33966. + instr_addr = ((unsigned long)this_reloc->r_offset +
  33967. + (unsigned long)tpnt->loadaddr);
  33968. + got_addr = (char **)instr_addr;
  33969. +
  33970. + /* Get the address of the GOT entry. */
  33971. + new_addr = _dl_find_hash(symname, &_dl_loaded_modules->symbol_scope, tpnt,
  33972. + ELF_RTYPE_CLASS_PLT, NULL);
  33973. + if (unlikely(!new_addr)) {
  33974. + _dl_dprintf(2, "%s: Can't resolve symbol '%s'\n",
  33975. + _dl_progname, symname);
  33976. + _dl_exit(1);
  33977. + }
  33978. +
  33979. +#if defined (__SUPPORT_LD_DEBUG__)
  33980. + if (_dl_debug_bindings) {
  33981. + _dl_dprintf(_dl_debug_file, "\nresolve function: %s", symname);
  33982. + if (_dl_debug_detail)
  33983. + _dl_dprintf(_dl_debug_file,
  33984. + "\n\tpatched: %x ==> %x @ %x\n",
  33985. + *got_addr, new_addr, got_addr);
  33986. + }
  33987. + if (!_dl_debug_nofixups) {
  33988. + *got_addr = new_addr;
  33989. + }
  33990. +#else
  33991. + *got_addr = new_addr;
  33992. +#endif
  33993. +
  33994. + return (unsigned long)new_addr;
  33995. +}
  33996. +
  33997. +static int
  33998. +_dl_parse(struct elf_resolve *tpnt, struct r_scope_elem *scope,
  33999. + unsigned long rel_addr, unsigned long rel_size,
  34000. + int (*reloc_fnc)(struct elf_resolve *tpnt, struct r_scope_elem *scope,
  34001. + ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab))
  34002. +{
  34003. + int symtab_index;
  34004. + unsigned int i;
  34005. + char *strtab;
  34006. + ElfW(Sym) *symtab;
  34007. + ELF_RELOC *rpnt;
  34008. +
  34009. + /* Parse the relocation information. */
  34010. + rpnt = (ELF_RELOC *)(intptr_t)rel_addr;
  34011. + rel_size /= sizeof(ELF_RELOC);
  34012. +
  34013. + symtab = (ElfW(Sym) *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
  34014. + strtab = (char *)tpnt->dynamic_info[DT_STRTAB];
  34015. +
  34016. + for (i = 0; i < rel_size; i++, rpnt++) {
  34017. + int res;
  34018. +
  34019. + symtab_index = ELF_R_SYM(rpnt->r_info);
  34020. +
  34021. + debug_sym(symtab, strtab, symtab_index);
  34022. + debug_reloc(symtab, strtab, rpnt);
  34023. +
  34024. + /* Pass over to actual relocation function. */
  34025. + res = reloc_fnc(tpnt, scope, rpnt, symtab, strtab);
  34026. +
  34027. + if (res == 0)
  34028. + continue;
  34029. +
  34030. + _dl_dprintf(2, "\n%s: ", _dl_progname);
  34031. +
  34032. + if (symtab_index)
  34033. + _dl_dprintf(2, "symbol '%s': ",
  34034. + strtab + symtab[symtab_index].st_name);
  34035. +
  34036. + if (unlikely(res < 0)) {
  34037. + int reloc_type = ELF_R_TYPE(rpnt->r_info);
  34038. +
  34039. +#if defined (__SUPPORT_LD_DEBUG__)
  34040. + _dl_dprintf(2, "can't handle reloc type %s\n",
  34041. + _dl_reltypes(reloc_type));
  34042. +#else
  34043. + _dl_dprintf(2, "can't handle reloc type %x\n",
  34044. + reloc_type);
  34045. +#endif
  34046. + _dl_exit(-res);
  34047. + } else if (unlikely(res > 0)) {
  34048. + _dl_dprintf(2, "can't resolve symbol\n");
  34049. + return res;
  34050. + }
  34051. + }
  34052. +
  34053. + return 0;
  34054. +}
  34055. +
  34056. +static int
  34057. +_dl_do_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
  34058. + ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
  34059. +{
  34060. + int reloc_type;
  34061. + int symtab_index;
  34062. + char *symname = NULL;
  34063. + unsigned long *reloc_addr;
  34064. + unsigned long symbol_addr;
  34065. +#if defined (__SUPPORT_LD_DEBUG__)
  34066. + unsigned long old_val = 0;
  34067. +#endif
  34068. + struct elf_resolve *tls_tpnt = NULL;
  34069. + struct symbol_ref sym_ref;
  34070. +
  34071. + reloc_addr = (unsigned long *)(tpnt->loadaddr + rpnt->r_offset);
  34072. + reloc_type = ELF_R_TYPE(rpnt->r_info);
  34073. + symtab_index = ELF_R_SYM(rpnt->r_info);
  34074. + symbol_addr = 0;
  34075. + sym_ref.sym = &symtab[symtab_index];
  34076. + sym_ref.tpnt = NULL;
  34077. +
  34078. + if (symtab_index) {
  34079. + symname = strtab + symtab[symtab_index].st_name;
  34080. + symbol_addr = (unsigned long)_dl_find_hash(symname, scope, tpnt,
  34081. + elf_machine_type_class(reloc_type), &sym_ref);
  34082. +
  34083. + if (!symbol_addr
  34084. + && ELF_ST_TYPE(symtab[symtab_index].st_info) != STT_TLS
  34085. + && ELF_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK) {
  34086. + _dl_dprintf(2, "%s: can't resolve symbol '%s'\n",
  34087. + _dl_progname, symname);
  34088. + return 1;
  34089. + };
  34090. + if (_dl_trace_prelink) {
  34091. + _dl_debug_lookup(symname, tpnt, &symtab[symtab_index],
  34092. + &sym_ref, elf_machine_type_class(reloc_type));
  34093. + }
  34094. + tls_tpnt = sym_ref.tpnt;
  34095. + }
  34096. +
  34097. +#if defined (__SUPPORT_LD_DEBUG__)
  34098. + if (reloc_type != R_METAG_NONE)
  34099. + old_val = __get_unaligned_reloc(reloc_addr);
  34100. +#endif
  34101. +
  34102. +#if defined USE_TLS && USE_TLS
  34103. + /* In case of a TLS reloc, tls_tpnt NULL means we have an 'anonymous'
  34104. + symbol. This is the case for a static tls variable, so the lookup
  34105. + module is just that one is referencing the tls variable. */
  34106. + if (!tls_tpnt)
  34107. + tls_tpnt = tpnt;
  34108. +#endif
  34109. + switch (reloc_type) {
  34110. + case R_METAG_NONE:
  34111. + break;
  34112. + case R_METAG_GLOB_DAT:
  34113. + case R_METAG_JMP_SLOT:
  34114. + case R_METAG_ADDR32:
  34115. + __put_unaligned_reloc(reloc_addr,
  34116. + symbol_addr + rpnt->r_addend);
  34117. + break;
  34118. + case R_METAG_COPY:
  34119. +#if defined (__SUPPORT_LD_DEBUG__)
  34120. + if (_dl_debug_move)
  34121. + _dl_dprintf(_dl_debug_file,
  34122. + "\t%s move %d bytes from %x to %x\n",
  34123. + symname, symtab[symtab_index].st_size,
  34124. + symbol_addr + rpnt->r_addend,
  34125. + reloc_addr);
  34126. +#endif
  34127. +
  34128. + _dl_memcpy((char *)reloc_addr,
  34129. + (char *)symbol_addr + rpnt->r_addend,
  34130. + symtab[symtab_index].st_size);
  34131. + break;
  34132. + case R_METAG_RELATIVE:
  34133. + __put_unaligned_reloc(reloc_addr,
  34134. + (unsigned long)tpnt->loadaddr +
  34135. + rpnt->r_addend);
  34136. + break;
  34137. +#if defined USE_TLS && USE_TLS
  34138. + case R_METAG_TLS_DTPMOD:
  34139. + *reloc_addr = tls_tpnt->l_tls_modid;
  34140. + break;
  34141. + case R_METAG_TLS_DTPOFF:
  34142. + *reloc_addr = symbol_addr;
  34143. + break;
  34144. + case R_METAG_TLS_TPOFF:
  34145. + CHECK_STATIC_TLS ((struct link_map *) tls_tpnt);
  34146. + *reloc_addr = tls_tpnt->l_tls_offset + symbol_addr + rpnt->r_addend;
  34147. + break;
  34148. +#endif
  34149. + default:
  34150. + return -1; /* Calls _dl_exit(1). */
  34151. + }
  34152. +
  34153. +#if defined (__SUPPORT_LD_DEBUG__)
  34154. + if (_dl_debug_reloc && _dl_debug_detail && reloc_type != R_METAG_NONE) {
  34155. + unsigned long new_val = __get_unaligned_reloc(reloc_addr);
  34156. + _dl_dprintf(_dl_debug_file, "\tpatched: %x ==> %x @ %x\n",
  34157. + old_val, new_val, reloc_addr);
  34158. + }
  34159. +#endif
  34160. +
  34161. + return 0;
  34162. +}
  34163. +
  34164. +static int
  34165. +_dl_do_lazy_reloc(struct elf_resolve *tpnt, struct r_scope_elem *scope,
  34166. + ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
  34167. +{
  34168. + int reloc_type;
  34169. + unsigned long *reloc_addr;
  34170. +#if defined (__SUPPORT_LD_DEBUG__)
  34171. + unsigned long old_val;
  34172. +#endif
  34173. +
  34174. + reloc_addr = (unsigned long *)(tpnt->loadaddr + rpnt->r_offset);
  34175. + reloc_type = ELF_R_TYPE(rpnt->r_info);
  34176. +
  34177. +#if defined (__SUPPORT_LD_DEBUG__)
  34178. + old_val = *reloc_addr;
  34179. +#endif
  34180. +
  34181. + switch (reloc_type) {
  34182. + case R_METAG_NONE:
  34183. + break;
  34184. + case R_METAG_JMP_SLOT:
  34185. + *reloc_addr += (unsigned long)tpnt->loadaddr;
  34186. + break;
  34187. + default:
  34188. + return -1; /* Calls _dl_exit(1). */
  34189. + }
  34190. +
  34191. +#if defined (__SUPPORT_LD_DEBUG__)
  34192. + if (_dl_debug_reloc && _dl_debug_detail)
  34193. + _dl_dprintf(_dl_debug_file, "\tpatched: %x ==> %x @ %x\n",
  34194. + old_val, *reloc_addr, reloc_addr);
  34195. +#endif
  34196. +
  34197. + return 0;
  34198. +}
  34199. +
  34200. +/* External interface to the generic part of the dynamic linker. */
  34201. +
  34202. +void
  34203. +_dl_parse_lazy_relocation_information(struct dyn_elf *rpnt,
  34204. + unsigned long rel_addr,
  34205. + unsigned long rel_size)
  34206. +{
  34207. + _dl_parse(rpnt->dyn, NULL, rel_addr, rel_size, _dl_do_lazy_reloc);
  34208. +}
  34209. +
  34210. +int
  34211. +_dl_parse_relocation_information(struct dyn_elf *rpnt,
  34212. + struct r_scope_elem *scope,
  34213. + unsigned long rel_addr,
  34214. + unsigned long rel_size)
  34215. +{
  34216. + return _dl_parse(rpnt->dyn, scope, rel_addr,
  34217. + rel_size, _dl_do_reloc);
  34218. +}
  34219. diff -Nur uClibc-0.9.33.2/ldso/ldso/metag/metag_load_tp.S uClibc-git/ldso/ldso/metag/metag_load_tp.S
  34220. --- uClibc-0.9.33.2/ldso/ldso/metag/metag_load_tp.S 1970-01-01 01:00:00.000000000 +0100
  34221. +++ uClibc-git/ldso/ldso/metag/metag_load_tp.S 2014-07-25 20:36:05.421327432 +0200
  34222. @@ -0,0 +1,20 @@
  34223. +! Copyright (C) 2013 Imagination Technologies Ltd.
  34224. +
  34225. +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  34226. +
  34227. +#include <features.h>
  34228. +
  34229. +#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  34230. +
  34231. +#include <sysdep.h>
  34232. +
  34233. + .text
  34234. + .global ___metag_load_tp
  34235. + .type ___metag_load_tp,@function
  34236. +
  34237. +___metag_load_tp:
  34238. + MOVT D1Ar1,#HI(0x6ffff000)
  34239. + JUMP D1Ar1,#LO(0x6ffff000)
  34240. + .size ___metag_load_tp,.-___metag_load_tp
  34241. +
  34242. +#endif /* __UCLIBC_HAS_THREADS_NATIVE__ */
  34243. diff -Nur uClibc-0.9.33.2/ldso/ldso/metag/resolve.S uClibc-git/ldso/ldso/metag/resolve.S
  34244. --- uClibc-0.9.33.2/ldso/ldso/metag/resolve.S 1970-01-01 01:00:00.000000000 +0100
  34245. +++ uClibc-git/ldso/ldso/metag/resolve.S 2014-07-25 20:36:05.421327432 +0200
  34246. @@ -0,0 +1,51 @@
  34247. +/*
  34248. + * Meta dynamic resolver
  34249. + *
  34250. + * Copyright (C) 2013 Imagination Technologies Ltd.
  34251. + *
  34252. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  34253. + *
  34254. + * This function is _not_ called directly. It is jumped to (so no return
  34255. + * address is on the stack) when attempting to use a symbol that has not yet
  34256. + * been resolved. The first time a jump symbol (such as a function call inside
  34257. + * a shared library) is used (before it gets resolved) it will jump here to
  34258. + * _dl_linux_resolve. When we get called the stack looks like this:
  34259. + * reloc_entry
  34260. + * tpnt
  34261. + *
  34262. + * This function saves all the registers then makes the function call
  34263. + * _dl_linux_resolver(tpnt, reloc_entry). _dl_linux_resolver() figures out
  34264. + * where the jump symbol is _really_ supposed to have jumped to and returns
  34265. + * that to us. Once we have that, we overwrite tpnt with this fixed up
  34266. + * address. We then clean up after ourselves, put all the registers back how we
  34267. + * found them, then we jump to the fixed up address, which is where the jump
  34268. + * symbol that got us here really wanted to jump to in the first place.
  34269. + * -Erik Andersen
  34270. + */
  34271. +
  34272. + .text
  34273. + .global __dl_linux_resolve
  34274. + .type __dl_linux_resolve,@function
  34275. +
  34276. +__dl_linux_resolve:
  34277. + !! Save registers on the stack. Do we need to save any more here?
  34278. + MSETL [A0StP++],D0Ar6,D0Ar4,D0Ar2,D0FrT
  34279. + SETL [A0StP++],A0FrP,A1LbP
  34280. + !! Get the args for _dl_linux_resolver off the stack
  34281. + GETL D0Re0,D1Re0,[A0StP+#-(6*8)]
  34282. + GETD D1Ar1,[D0Re0]
  34283. + MOV D0Ar2,D1Re0
  34284. + !! Multiply plt_index by sizeof(Elf32_Rela)
  34285. + MULW D0Ar2,D0Ar2,#12
  34286. + !! Call the resolver
  34287. + CALLR D1RtP,__dl_linux_resolver
  34288. + !! Restore the registers from the stack
  34289. + SUB A0.2,A0StP,#(1*8)
  34290. + GETL A0FrP,A1LbP,[A0.2]
  34291. + SUB A0.2,A0.2,#(4*8)
  34292. + MGETL D0Ar6,D0Ar4,D0Ar2,D0FrT,[A0.2]
  34293. + !! Also take into account args pushed by PLT
  34294. + SUB A0StP,A0StP,#(6*8)
  34295. + !! Jump to the resolved address
  34296. + MOV PC,D0Re0
  34297. + .size __dl_linux_resolve, .-__dl_linux_resolve
  34298. diff -Nur uClibc-0.9.33.2/ldso/ldso/microblaze/dl-startup.h uClibc-git/ldso/ldso/microblaze/dl-startup.h
  34299. --- uClibc-0.9.33.2/ldso/ldso/microblaze/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
  34300. +++ uClibc-git/ldso/ldso/microblaze/dl-startup.h 2014-07-25 20:36:05.429327473 +0200
  34301. @@ -12,14 +12,14 @@
  34302. Lesser General Public License for more details.
  34303. You should have received a copy of the GNU Lesser General Public
  34304. - License along with the GNU C Library; if not, write to the Free
  34305. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  34306. - 02111-1307 USA. */
  34307. + License along with the GNU C Library; if not, see
  34308. + <http://www.gnu.org/licenses/>. */
  34309. __asm__ ("\
  34310. .text\n\
  34311. .globl _start\n\
  34312. .type _start,@function\n\
  34313. + .hidden _start\n\
  34314. _start:\n\
  34315. addk r5,r0,r1\n\
  34316. addk r3,r0,r0\n\
  34317. diff -Nur uClibc-0.9.33.2/ldso/ldso/microblaze/dl-sysdep.h uClibc-git/ldso/ldso/microblaze/dl-sysdep.h
  34318. --- uClibc-0.9.33.2/ldso/ldso/microblaze/dl-sysdep.h 2012-05-15 09:20:09.000000000 +0200
  34319. +++ uClibc-git/ldso/ldso/microblaze/dl-sysdep.h 2014-07-25 20:36:05.429327473 +0200
  34320. @@ -12,9 +12,8 @@
  34321. Lesser General Public License for more details.
  34322. You should have received a copy of the GNU Lesser General Public
  34323. - License along with the GNU C Library; if not, write to the Free
  34324. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  34325. - 02111-1307 USA. */
  34326. + License along with the GNU C Library; if not, see
  34327. + <http://www.gnu.org/licenses/>. */
  34328. /* Use reloca */
  34329. #define ELF_USES_RELOCA
  34330. diff -Nur uClibc-0.9.33.2/ldso/ldso/microblaze/resolve.S uClibc-git/ldso/ldso/microblaze/resolve.S
  34331. --- uClibc-0.9.33.2/ldso/ldso/microblaze/resolve.S 2012-05-15 09:20:09.000000000 +0200
  34332. +++ uClibc-git/ldso/ldso/microblaze/resolve.S 2014-07-25 20:36:05.429327473 +0200
  34333. @@ -18,9 +18,8 @@
  34334. Lesser General Public License for more details.
  34335. You should have received a copy of the GNU Lesser General Public
  34336. - License along with the GNU C Library; if not, write to the Free
  34337. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  34338. - 02111-1307 USA. */
  34339. + License along with the GNU C Library; if not, see
  34340. + <http://www.gnu.org/licenses/>. */
  34341. .text
  34342. .align 4
  34343. diff -Nur uClibc-0.9.33.2/ldso/ldso/mips/dl-debug.h uClibc-git/ldso/ldso/mips/dl-debug.h
  34344. --- uClibc-0.9.33.2/ldso/ldso/mips/dl-debug.h 2012-05-15 09:20:09.000000000 +0200
  34345. +++ uClibc-git/ldso/ldso/mips/dl-debug.h 2014-07-25 20:36:05.441327536 +0200
  34346. @@ -40,6 +40,15 @@
  34347. [25] "R_MIPS_INSERT_A", "R_MIPS_INSERT_B", "R_MIPS_DELETE",
  34348. [28] "R_MIPS_HIGHER", "R_MIPS_HIGHEST", "R_MIPS_CALL_HI16",
  34349. [31] "R_MIPS_CALL_LO16", "R_MIPS_SCN_DISP", "R_MIPS_REL16",
  34350. - [34] "R_MIPS_ADD_IMMEDIATE", "R_MIPS_PJUMP", "R_MIPS_RELGOT",
  34351. - [37] "R_MIPS_JALR",
  34352. + [34] "R_MIPS_ADD_IMMEDIATE", "R_MIPS_PJUMP", "R_MIPS_RELGOT",
  34353. + [37] "R_MIPS_JALR", "R_MIPS_TLS_DTPMOD32", "R_MIPS_TLS_DTPREL32",
  34354. + [40] "R_MIPS_TLS_DTPMOD64", "R_MIPS_TLS_DTPREL64", "R_MIPS_TLS_GD",
  34355. + [43] "R_MIPS_TLS_LDM", "R_MIPS_TLS_DTPREL_HI16",
  34356. + [45] "R_MIPS_TLS_DTPREL_LO16",
  34357. + [46] "R_MIPS_TLS_GOTTPREL", "R_MIPS_TLS_TPREL32", "R_MIPS_TLS_TPREL64",
  34358. + [49] "R_MIPS_TLS_TPREL_HI16",
  34359. + [50] "R_MIPS_TLS_TPREL_LO16",
  34360. + [51] "R_MIPS_GLOB_DAT",
  34361. + [126] "R_MIPS_COPY", "R_MIPS_JUMP_SLOT",
  34362. +
  34363. };
  34364. diff -Nur uClibc-0.9.33.2/ldso/ldso/mips/dl-startup.h uClibc-git/ldso/ldso/mips/dl-startup.h
  34365. --- uClibc-0.9.33.2/ldso/ldso/mips/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
  34366. +++ uClibc-git/ldso/ldso/mips/dl-startup.h 2014-07-25 20:36:05.441327536 +0200
  34367. @@ -12,6 +12,7 @@
  34368. " .globl _start\n"
  34369. " .ent _start\n"
  34370. " .type _start,@function\n"
  34371. + " .hidden _start\n"
  34372. "_start:\n"
  34373. " .set noreorder\n"
  34374. " move $25, $31\n"
  34375. diff -Nur uClibc-0.9.33.2/ldso/ldso/mips/elfinterp.c uClibc-git/ldso/ldso/mips/elfinterp.c
  34376. --- uClibc-0.9.33.2/ldso/ldso/mips/elfinterp.c 2012-05-15 09:20:09.000000000 +0200
  34377. +++ uClibc-git/ldso/ldso/mips/elfinterp.c 2014-07-25 20:36:05.441327536 +0200
  34378. @@ -240,31 +240,19 @@
  34379. case R_MIPS_TLS_DTPMOD32:
  34380. if (tls_tpnt)
  34381. *(ElfW(Word) *)reloc_addr = tls_tpnt->l_tls_modid;
  34382. -#ifdef __SUPPORT_LD_DEBUG__
  34383. - _dl_dprintf(2, "TLS_DTPMOD : %s, %d, %d\n",
  34384. - symname, old_val, *((unsigned int *)reloc_addr));
  34385. -#endif
  34386. break;
  34387. case R_MIPS_TLS_DTPREL64:
  34388. case R_MIPS_TLS_DTPREL32:
  34389. *(ElfW(Word) *)reloc_addr +=
  34390. TLS_DTPREL_VALUE (symbol_addr);
  34391. -#ifdef __SUPPORT_LD_DEBUG__
  34392. - _dl_dprintf(2, "TLS_DTPREL : %s, %x, %x\n",
  34393. - symname, old_val, *((unsigned int *)reloc_addr));
  34394. -#endif
  34395. break;
  34396. case R_MIPS_TLS_TPREL32:
  34397. case R_MIPS_TLS_TPREL64:
  34398. CHECK_STATIC_TLS((struct link_map *)tls_tpnt);
  34399. - *(ElfW(Word) *)reloc_addr +=
  34400. + *(ElfW(Addr) *)reloc_addr +=
  34401. TLS_TPREL_VALUE (tls_tpnt, symbol_addr);
  34402. -#ifdef __SUPPORT_LD_DEBUG__
  34403. - _dl_dprintf(2, "TLS_TPREL : %s, %x, %x\n",
  34404. - symname, old_val, *((unsigned int *)reloc_addr));
  34405. -#endif
  34406. break;
  34407. }
  34408. @@ -325,11 +313,11 @@
  34409. _dl_exit(1);
  34410. }
  34411. }
  34412. - }
  34413. #if defined (__SUPPORT_LD_DEBUG__)
  34414. - if (_dl_debug_reloc && _dl_debug_detail && reloc_addr)
  34415. - _dl_dprintf(_dl_debug_file, "\tpatched: %x ==> %x @ %x\n", old_val, *reloc_addr, reloc_addr);
  34416. + if (_dl_debug_reloc && _dl_debug_detail && reloc_addr)
  34417. + _dl_dprintf(_dl_debug_file, "\tpatched: %x ==> %x @ %x\n", old_val, *reloc_addr, reloc_addr);
  34418. #endif
  34419. + }
  34420. return 0;
  34421. }
  34422. diff -Nur uClibc-0.9.33.2/ldso/ldso/mips/README uClibc-git/ldso/ldso/mips/README
  34423. --- uClibc-0.9.33.2/ldso/ldso/mips/README 2012-05-15 09:20:09.000000000 +0200
  34424. +++ uClibc-git/ldso/ldso/mips/README 2014-07-25 20:36:05.441327536 +0200
  34425. @@ -13,7 +13,7 @@
  34426. elfinterp.c
  34427. -----------
  34428. Contains the runtime resolver code taken from the function
  34429. -'__dl_runtime_resolve' in 'sysdeps/mips/dl-machine.h'. Also
  34430. +'__dl_runtime_resolve' in 'sysdeps/mips/dl-trampoline.h'. Also
  34431. contains the function to perform relocations for objects
  34432. other than the linker itself. The code was taken from the
  34433. function 'elf_machine_rel' in 'sysdeps/mips/dl-machine.h'.
  34434. @@ -47,6 +47,6 @@
  34435. ---------
  34436. Contains the low-level assembly code for the dynamic runtime
  34437. resolver. The code is taken from the assembly code function
  34438. -'_dl_runtime_resolve' in the file 'sysdeps/mips/dl-machine.h'.
  34439. +'_dl_runtime_resolve' in the file 'sysdeps/mips/dl-trampoline.h'.
  34440. The code looks a bit different since we only need to pass the
  34441. symbol index and the old GP register.
  34442. diff -Nur uClibc-0.9.33.2/ldso/ldso/powerpc/dl-startup.h uClibc-git/ldso/ldso/powerpc/dl-startup.h
  34443. --- uClibc-0.9.33.2/ldso/ldso/powerpc/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
  34444. +++ uClibc-git/ldso/ldso/powerpc/dl-startup.h 2014-07-25 20:36:05.453327599 +0200
  34445. @@ -8,6 +8,7 @@
  34446. " .text\n"
  34447. " .globl _start\n"
  34448. " .type _start,@function\n"
  34449. + " .hidden _start\n"
  34450. "_start:\n"
  34451. " mr 3,1\n" /* Pass SP to _dl_start in r3 */
  34452. " li 0,0\n"
  34453. diff -Nur uClibc-0.9.33.2/ldso/ldso/powerpc/elfinterp.c uClibc-git/ldso/ldso/powerpc/elfinterp.c
  34454. --- uClibc-0.9.33.2/ldso/ldso/powerpc/elfinterp.c 2012-05-15 09:20:09.000000000 +0200
  34455. +++ uClibc-git/ldso/ldso/powerpc/elfinterp.c 2014-07-25 20:36:05.457327620 +0200
  34456. @@ -234,12 +234,12 @@
  34457. case R_PPC_ADDR32:
  34458. case R_PPC_GLOB_DAT:
  34459. *reloc_addr = finaladdr;
  34460. - goto out_nocode; /* No code code modified */
  34461. + goto out_nocode; /* No code modified */
  34462. case R_PPC_JMP_SLOT:
  34463. {
  34464. if (tpnt->dynamic_info[DT_PPC_GOT_IDX] != 0) {
  34465. *reloc_addr = finaladdr;
  34466. - goto out_nocode; /* No code code modified */
  34467. + goto out_nocode; /* No code modified */
  34468. } else {
  34469. Elf32_Sword delta = finaladdr - (Elf32_Word)reloc_addr;
  34470. if (delta<<6>>6 == delta) {
  34471. @@ -275,7 +275,7 @@
  34472. symbol_addr, reloc_addr);
  34473. #endif
  34474. _dl_memcpy((char *) reloc_addr, (char *) finaladdr, sym_ref.sym->st_size);
  34475. - goto out_nocode; /* No code code modified */
  34476. + goto out_nocode; /* No code modified */
  34477. case R_PPC_ADDR16_HA:
  34478. finaladdr += 0x8000; /* fall through. */
  34479. case R_PPC_ADDR16_HI:
  34480. @@ -314,7 +314,7 @@
  34481. return -1;
  34482. #endif
  34483. case R_PPC_NONE:
  34484. - goto out_nocode; /* No code code modified */
  34485. + goto out_nocode; /* No code modified */
  34486. default:
  34487. _dl_dprintf(2, "%s: can't handle reloc type ", _dl_progname);
  34488. #if defined (__SUPPORT_LD_DEBUG__)
  34489. diff -Nur uClibc-0.9.33.2/ldso/ldso/sh/dl-startup.h uClibc-git/ldso/ldso/sh/dl-startup.h
  34490. --- uClibc-0.9.33.2/ldso/ldso/sh/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
  34491. +++ uClibc-git/ldso/ldso/sh/dl-startup.h 2014-07-25 20:36:05.469327682 +0200
  34492. @@ -6,6 +6,7 @@
  34493. " .text\n"
  34494. " .globl _start\n"
  34495. " .type _start,@function\n"
  34496. + " .hidden _start\n"
  34497. "_start:\n"
  34498. " mov r15, r4\n"
  34499. " mov.l .L_dl_start, r0\n"
  34500. @@ -16,12 +17,22 @@
  34501. " mov.l .L_got, r12 ! Load the GOT on r12\n"
  34502. " mova .L_got, r0\n"
  34503. " add r0, r12\n"
  34504. + " mov.l .L_dl_skip_args,r0\n"
  34505. + " mov.l @(r0,r12),r0\n"
  34506. + " mov.l @r0,r0\n"
  34507. + " mov.l @r15,r5 ! Get the original argument count\n"
  34508. + " sub r0,r5 ! Subtract _dl_skip_args from it\n"
  34509. + " shll2 r0\n"
  34510. + " add r0,r15 ! Adjust the stack pointer to skip _dl_skip_args words\n"
  34511. + " mov.l r5,@r15 ! Store back the modified argument count\n"
  34512. " mov.l .L_dl_fini, r0\n"
  34513. " mov.l @(r0,r12), r4 ! Pass the finalizer in r4\n"
  34514. " jmp @r8\n"
  34515. " nop\n"
  34516. ".L_dl_start:\n"
  34517. " .long _dl_start-.jmp_loc\n"
  34518. + ".L_dl_skip_args:\n"
  34519. + " .long _dl_skip_args@GOT\n"
  34520. ".L_dl_fini:\n"
  34521. " .long _dl_fini@GOT\n"
  34522. ".L_got:\n"
  34523. diff -Nur uClibc-0.9.33.2/ldso/ldso/sh/elfinterp.c uClibc-git/ldso/ldso/sh/elfinterp.c
  34524. --- uClibc-0.9.33.2/ldso/ldso/sh/elfinterp.c 2012-05-15 09:20:09.000000000 +0200
  34525. +++ uClibc-git/ldso/ldso/sh/elfinterp.c 2014-07-25 20:36:05.469327682 +0200
  34526. @@ -160,7 +160,9 @@
  34527. unsigned long old_val;
  34528. #endif
  34529. +#if defined USE_TLS && USE_TLS
  34530. struct elf_resolve *tls_tpnt = NULL;
  34531. +#endif
  34532. struct symbol_ref sym_ref;
  34533. reloc_addr = (unsigned long *)(intptr_t) (tpnt->loadaddr + (unsigned long) rpnt->r_offset);
  34534. @@ -193,7 +195,9 @@
  34535. _dl_debug_lookup (symname, tpnt, &symtab[symtab_index],
  34536. &sym_ref, elf_machine_type_class(reloc_type));
  34537. }
  34538. +#if defined USE_TLS && USE_TLS
  34539. tls_tpnt = sym_ref.tpnt;
  34540. +#endif
  34541. }
  34542. #if defined (__SUPPORT_LD_DEBUG__)
  34543. diff -Nur uClibc-0.9.33.2/ldso/ldso/sh64/dl-startup.h uClibc-git/ldso/ldso/sh64/dl-startup.h
  34544. --- uClibc-0.9.33.2/ldso/ldso/sh64/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
  34545. +++ uClibc-git/ldso/ldso/sh64/dl-startup.h 2014-07-25 20:36:05.481327745 +0200
  34546. @@ -7,6 +7,7 @@
  34547. " .section .text..SHmedia32,\"ax\"\n" \
  34548. " .globl _start\n" \
  34549. " .type _start, @function\n" \
  34550. +" .hidden _start\n" \
  34551. " .align 5\n" \
  34552. "_start:\n" \
  34553. " ! Set r12 to point to GOT\n" \
  34554. diff -Nur uClibc-0.9.33.2/ldso/ldso/sparc/dl-startup.h uClibc-git/ldso/ldso/sparc/dl-startup.h
  34555. --- uClibc-0.9.33.2/ldso/ldso/sparc/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
  34556. +++ uClibc-git/ldso/ldso/sparc/dl-startup.h 2014-07-25 20:36:05.501327851 +0200
  34557. @@ -8,6 +8,7 @@
  34558. .text\n\
  34559. .global _start\n\
  34560. .type _start,%function\n\
  34561. + .hidden _start\n\
  34562. .align 32\n\
  34563. .register %g2, #scratch\n\
  34564. _start:\n\
  34565. diff -Nur uClibc-0.9.33.2/ldso/ldso/sparc/elfinterp.c uClibc-git/ldso/ldso/sparc/elfinterp.c
  34566. --- uClibc-0.9.33.2/ldso/ldso/sparc/elfinterp.c 2012-05-15 09:20:09.000000000 +0200
  34567. +++ uClibc-git/ldso/ldso/sparc/elfinterp.c 2014-07-25 20:36:05.501327851 +0200
  34568. @@ -275,8 +275,11 @@
  34569. _dl_memcpy((char *)reloc_addr,
  34570. (char *)symbol_addr,
  34571. sym_ref.sym->st_size);
  34572. - } else
  34573. + }
  34574. +#if defined (__SUPPORT_LD_DEBUG__)
  34575. + else
  34576. _dl_dprintf(_dl_debug_file, "no symbol_addr to copy !?\n");
  34577. +#endif
  34578. break;
  34579. #if defined USE_TLS && USE_TLS
  34580. case R_SPARC_TLS_DTPMOD32:
  34581. diff -Nur uClibc-0.9.33.2/ldso/ldso/x86_64/dl-startup.h uClibc-git/ldso/ldso/x86_64/dl-startup.h
  34582. --- uClibc-0.9.33.2/ldso/ldso/x86_64/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
  34583. +++ uClibc-git/ldso/ldso/x86_64/dl-startup.h 2014-07-25 20:36:05.513327913 +0200
  34584. @@ -10,6 +10,7 @@
  34585. " .text\n"
  34586. " .global _start\n"
  34587. " .type _start,%function\n"
  34588. + " .hidden _start\n"
  34589. "_start:\n"
  34590. " movq %rsp, %rdi\n"
  34591. " call _dl_start\n"
  34592. diff -Nur uClibc-0.9.33.2/ldso/ldso/x86_64/dl-sysdep.h uClibc-git/ldso/ldso/x86_64/dl-sysdep.h
  34593. --- uClibc-0.9.33.2/ldso/ldso/x86_64/dl-sysdep.h 2012-05-15 09:20:09.000000000 +0200
  34594. +++ uClibc-git/ldso/ldso/x86_64/dl-sysdep.h 2014-07-25 20:36:05.513327913 +0200
  34595. @@ -16,9 +16,8 @@
  34596. Lesser General Public License for more details.
  34597. You should have received a copy of the GNU Lesser General Public
  34598. - License along with the GNU C Library; if not, write to the Free
  34599. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  34600. - 02111-1307 USA. */
  34601. + License along with the GNU C Library; if not, see
  34602. + <http://www.gnu.org/licenses/>. */
  34603. /* Define this if the system uses RELOCA. */
  34604. #define ELF_USES_RELOCA
  34605. diff -Nur uClibc-0.9.33.2/ldso/ldso/xtensa/dl-startup.h uClibc-git/ldso/ldso/xtensa/dl-startup.h
  34606. --- uClibc-0.9.33.2/ldso/ldso/xtensa/dl-startup.h 2012-05-15 09:20:09.000000000 +0200
  34607. +++ uClibc-git/ldso/ldso/xtensa/dl-startup.h 2014-07-25 20:36:05.533328017 +0200
  34608. @@ -11,8 +11,10 @@
  34609. __asm__ (
  34610. " .text\n"
  34611. " .align 4\n"
  34612. + " .literal_position\n"
  34613. " .global _start\n"
  34614. " .type _start, @function\n"
  34615. + " .hidden _start\n"
  34616. "_start:\n"
  34617. " # Compute load offset in a2: the GOT has not yet been relocated\n"
  34618. " # but the entries for local symbols contain the relative offsets\n"
  34619. diff -Nur uClibc-0.9.33.2/ldso/ldso/xtensa/dl-sysdep.h uClibc-git/ldso/ldso/xtensa/dl-sysdep.h
  34620. --- uClibc-0.9.33.2/ldso/ldso/xtensa/dl-sysdep.h 2012-05-15 09:20:09.000000000 +0200
  34621. +++ uClibc-git/ldso/ldso/xtensa/dl-sysdep.h 2014-07-25 20:36:05.533328017 +0200
  34622. @@ -14,9 +14,8 @@
  34623. Lesser General Public License for more details.
  34624. You should have received a copy of the GNU Lesser General Public
  34625. - License along with the GNU C Library; if not, write to the Free
  34626. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  34627. - Boston, MA 02110-1301, USA. */
  34628. + License along with the GNU C Library; if not, see
  34629. + <http://www.gnu.org/licenses/>. */
  34630. /* Define this if the system uses RELOCA. */
  34631. #define ELF_USES_RELOCA
  34632. diff -Nur uClibc-0.9.33.2/ldso/ldso/xtensa/resolve.S uClibc-git/ldso/ldso/xtensa/resolve.S
  34633. --- uClibc-0.9.33.2/ldso/ldso/xtensa/resolve.S 2012-05-15 09:20:09.000000000 +0200
  34634. +++ uClibc-git/ldso/ldso/xtensa/resolve.S 2014-07-25 20:36:05.533328017 +0200
  34635. @@ -14,9 +14,8 @@
  34636. Lesser General Public License for more details.
  34637. You should have received a copy of the GNU Lesser General Public
  34638. - License along with the GNU C Library; if not, write to the Free
  34639. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  34640. - Boston, MA 02110-1301, USA. */
  34641. + License along with the GNU C Library; if not, see
  34642. + <http://www.gnu.org/licenses/>. */
  34643. #define MIN_FRAME_SIZE 32
  34644. @@ -28,6 +27,7 @@
  34645. .text
  34646. .align 4
  34647. + .literal_position
  34648. .global _dl_linux_resolve
  34649. .type _dl_linux_resolve, @function
  34650. _dl_linux_resolve:
  34651. diff -Nur uClibc-0.9.33.2/ldso/libdl/libdl.c uClibc-git/ldso/libdl/libdl.c
  34652. --- uClibc-0.9.33.2/ldso/libdl/libdl.c 2012-05-15 09:20:09.000000000 +0200
  34653. +++ uClibc-git/ldso/libdl/libdl.c 2014-07-25 20:36:05.545328081 +0200
  34654. @@ -32,7 +32,7 @@
  34655. #include <ldso.h>
  34656. #include <stdio.h>
  34657. -#include <string.h> /* Needed for 'strstr' prototype' */
  34658. +#include <string.h>
  34659. #include <stdbool.h>
  34660. #include <bits/uClibc_mutex.h>
  34661. @@ -42,6 +42,7 @@
  34662. #if defined(USE_TLS) && USE_TLS
  34663. #include <ldsodefs.h>
  34664. +#include <dl-tls.h>
  34665. extern void _dl_add_to_slotinfo(struct link_map *l);
  34666. #endif
  34667. @@ -51,7 +52,6 @@
  34668. #ifdef SHARED
  34669. # if defined(USE_TLS) && USE_TLS
  34670. -# include <dl-tls.h>
  34671. extern struct link_map *_dl_update_slotinfo(unsigned long int req_modid);
  34672. # endif
  34673. @@ -269,7 +269,7 @@
  34674. #endif
  34675. #ifndef __LDSO_NO_CLEANUP__
  34676. -void dl_cleanup(void) __attribute__ ((destructor));
  34677. +void dl_cleanup(void) attribute_hidden __attribute__ ((destructor));
  34678. void dl_cleanup(void)
  34679. {
  34680. struct dyn_elf *h, *n;
  34681. @@ -296,11 +296,10 @@
  34682. return p - list;
  34683. }
  34684. -static void *do_dlopen(const char *libname, int flag)
  34685. +static void *do_dlopen(const char *libname, int flag, ElfW(Addr) from)
  34686. {
  34687. struct elf_resolve *tpnt, *tfrom;
  34688. struct dyn_elf *dyn_chain, *rpnt = NULL, *dyn_ptr, *relro_ptr, *handle;
  34689. - ElfW(Addr) from;
  34690. struct elf_resolve *tpnt1;
  34691. void (*dl_brk) (void);
  34692. int now_flag;
  34693. @@ -309,7 +308,9 @@
  34694. struct elf_resolve **init_fini_list;
  34695. static bool _dl_init;
  34696. struct elf_resolve **local_scope;
  34697. +#ifdef SHARED
  34698. struct r_scope_elem *ls;
  34699. +#endif
  34700. #if defined(USE_TLS) && USE_TLS
  34701. bool any_tls = false;
  34702. #endif
  34703. @@ -320,8 +321,6 @@
  34704. return NULL;
  34705. }
  34706. - from = (ElfW(Addr)) __builtin_return_address(0);
  34707. -
  34708. if (!_dl_init) {
  34709. _dl_init = true;
  34710. _dl_malloc_function = malloc;
  34711. @@ -335,7 +334,7 @@
  34712. # ifdef __SUPPORT_LD_DEBUG__
  34713. _dl_debug = getenv("LD_DEBUG");
  34714. if (_dl_debug) {
  34715. - if (_dl_strstr(_dl_debug, "all")) {
  34716. + if (strstr(_dl_debug, "all")) {
  34717. _dl_debug_detail = _dl_debug_move = _dl_debug_symbols
  34718. = _dl_debug_reloc = _dl_debug_bindings = _dl_debug_nofixups = (void*)1;
  34719. } else {
  34720. @@ -377,7 +376,7 @@
  34721. if (getenv("LD_BIND_NOW"))
  34722. now_flag = RTLD_NOW;
  34723. -#if !defined SHARED && defined __LDSO_LIBRARY_PATH__
  34724. +#if !defined SHARED && defined __LDSO_LD_LIBRARY_PATH__
  34725. /* When statically linked, the _dl_library_path is not yet initialized */
  34726. _dl_library_path = getenv("LD_LIBRARY_PATH");
  34727. #endif
  34728. @@ -393,7 +392,7 @@
  34729. return NULL;
  34730. }
  34731. dyn_chain = (struct dyn_elf *) malloc(sizeof(struct dyn_elf));
  34732. - _dl_memset(dyn_chain, 0, sizeof(struct dyn_elf));
  34733. + memset(dyn_chain, 0, sizeof(struct dyn_elf));
  34734. dyn_chain->dyn = tpnt;
  34735. tpnt->rtld_flags |= (flag & RTLD_GLOBAL);
  34736. @@ -444,7 +443,7 @@
  34737. /* This list is for dlsym() and relocation */
  34738. dyn_ptr->next = (struct dyn_elf *) malloc(sizeof(struct dyn_elf));
  34739. - _dl_memset (dyn_ptr->next, 0, sizeof (struct dyn_elf));
  34740. + memset (dyn_ptr->next, 0, sizeof (struct dyn_elf));
  34741. dyn_ptr = dyn_ptr->next;
  34742. dyn_ptr->dyn = tpnt1;
  34743. /* Used to record RTLD_LOCAL scope */
  34744. @@ -544,11 +543,18 @@
  34745. * to the GOT tables. We need to do this in reverse order so that COPY
  34746. * directives work correctly */
  34747. - /* Get the tail of the list */
  34748. +#ifdef SHARED
  34749. + /*
  34750. + * Get the tail of the list.
  34751. + * In the static case doesn't need to extend the global scope, it is
  34752. + * ready to be used as it is, because _dl_loaded_modules already points
  34753. + * to the dlopened library.
  34754. + */
  34755. for (ls = &_dl_loaded_modules->symbol_scope; ls && ls->next; ls = ls->next);
  34756. /* Extend the global scope by adding the local scope of the dlopened DSO. */
  34757. ls->next = &dyn_chain->dyn->symbol_scope;
  34758. +#endif
  34759. #ifdef __mips__
  34760. /*
  34761. * Relocation of the GOT entries for MIPS have to be done
  34762. @@ -661,7 +667,8 @@
  34763. void *ret;
  34764. __UCLIBC_MUTEX_CONDITIONAL_LOCK(_dl_mutex, 1);
  34765. - ret = do_dlopen(libname, flag);
  34766. + ret = do_dlopen(libname, flag,
  34767. + (ElfW(Addr)) __builtin_return_address(0));
  34768. __UCLIBC_MUTEX_CONDITIONAL_UNLOCK(_dl_mutex, 1);
  34769. return ret;
  34770. @@ -671,7 +678,7 @@
  34771. {
  34772. struct elf_resolve *tpnt, *tfrom;
  34773. struct dyn_elf *handle;
  34774. - ElfW(Addr) from;
  34775. + ElfW(Addr) from = 0;
  34776. struct dyn_elf *rpnt;
  34777. void *ret;
  34778. struct symbol_ref sym_ref = { NULL, NULL };
  34779. @@ -729,7 +736,13 @@
  34780. tpnt = NULL;
  34781. if (handle == _dl_symbol_tables)
  34782. tpnt = handle->dyn; /* Only search RTLD_GLOBAL objs if global object */
  34783. - ret = _dl_find_hash(name2, &handle->dyn->symbol_scope, tpnt, ELF_RTYPE_CLASS_DLSYM, &sym_ref);
  34784. +
  34785. + do {
  34786. + ret = _dl_find_hash(name2, &handle->dyn->symbol_scope, tpnt, ELF_RTYPE_CLASS_DLSYM, &sym_ref);
  34787. + if (ret != NULL)
  34788. + break;
  34789. + handle = handle->next;
  34790. + } while (from && handle);
  34791. #if defined(USE_TLS) && USE_TLS && defined SHARED
  34792. if (sym_ref.sym && (ELF_ST_TYPE(sym_ref.sym->st_info) == STT_TLS) && (sym_ref.tpnt)) {
  34793. @@ -1081,8 +1094,10 @@
  34794. * Dump information to stderr about the current loaded modules
  34795. */
  34796. #ifdef __USE_GNU
  34797. +# if 0
  34798. static const char type[][4] = { "Lib", "Exe", "Int", "Mod" };
  34799. +/* reimplement this, being a GNU extension it should be the same as on glibc */
  34800. int dlinfo(void)
  34801. {
  34802. struct elf_resolve *tpnt;
  34803. @@ -1109,6 +1124,7 @@
  34804. }
  34805. return 0;
  34806. }
  34807. +#endif
  34808. static int do_dladdr(const void *__address, Dl_info * __info)
  34809. {
  34810. diff -Nur uClibc-0.9.33.2/ldso/libdl/Makefile.in uClibc-git/ldso/libdl/Makefile.in
  34811. --- uClibc-0.9.33.2/ldso/libdl/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  34812. +++ uClibc-git/ldso/libdl/Makefile.in 2014-07-25 20:36:05.545328081 +0200
  34813. @@ -23,7 +23,7 @@
  34814. LDFLAGS-libdl.so := $(LDFLAGS)
  34815. ifeq ($(LDSO_NO_CLEANUP),)
  34816. -LDFLAGS-libdl.so += -Wl,-fini,dl_cleanup
  34817. +LDFLAGS-libdl.so += -Wl,-fini,$(SYMBOL_PREFIX)dl_cleanup
  34818. endif
  34819. LIBS-libdl.so := $(LIBS) $(ldso)
  34820. diff -Nur uClibc-0.9.33.2/ldso/man/dlopen.3 uClibc-git/ldso/man/dlopen.3
  34821. --- uClibc-0.9.33.2/ldso/man/dlopen.3 2012-05-15 09:20:09.000000000 +0200
  34822. +++ uClibc-git/ldso/man/dlopen.3 2014-07-25 20:36:05.557328144 +0200
  34823. @@ -19,9 +19,8 @@
  34824. .\" GNU General Public License for more details.
  34825. .\"
  34826. .\" You should have received a copy of the GNU General Public
  34827. -.\" License along with this manual; if not, write to the Free
  34828. -.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  34829. -.\" USA.
  34830. +.\" License along with this manual; if not, see
  34831. +.\" <http://www.gnu.org/licenses/>.
  34832. .\"
  34833. .TH DLOPEN 3 "16 May 1995" "Linux" "Linux Programmer's Manual"
  34834. .SH NAME
  34835. diff -Nur uClibc-0.9.33.2/libc/.gitignore uClibc-git/libc/.gitignore
  34836. --- uClibc-0.9.33.2/libc/.gitignore 1970-01-01 01:00:00.000000000 +0100
  34837. +++ uClibc-git/libc/.gitignore 2014-07-25 20:36:05.569328207 +0200
  34838. @@ -0,0 +1 @@
  34839. +ucontext_i.[chs]
  34840. diff -Nur uClibc-0.9.33.2/libc/inet/addr.c uClibc-git/libc/inet/addr.c
  34841. --- uClibc-0.9.33.2/libc/inet/addr.c 2012-05-15 09:20:09.000000000 +0200
  34842. +++ uClibc-git/libc/inet/addr.c 2014-07-25 20:36:05.573328227 +0200
  34843. @@ -17,8 +17,6 @@
  34844. * Changed to use _int10tostr.
  34845. */
  34846. -#define __FORCE_GLIBC
  34847. -#include <features.h>
  34848. #include <stdio.h>
  34849. #include <string.h>
  34850. #include <ctype.h>
  34851. @@ -114,7 +112,7 @@
  34852. #define INET_NTOA_MAX_LEN 16 /* max 12 digits + 3 '.'s + 1 nul */
  34853. -char *inet_ntoa_r(struct in_addr in, char buf[INET_NTOA_MAX_LEN])
  34854. +static char *__inet_ntoa_r(struct in_addr in, char buf[INET_NTOA_MAX_LEN])
  34855. {
  34856. in_addr_t addr = ntohl(in.s_addr);
  34857. int i;
  34858. @@ -133,12 +131,12 @@
  34859. return p+1;
  34860. }
  34861. -libc_hidden_def(inet_ntoa_r)
  34862. +strong_alias(__inet_ntoa_r,inet_ntoa_r)
  34863. char *inet_ntoa(struct in_addr in)
  34864. {
  34865. static char buf[INET_NTOA_MAX_LEN];
  34866. - return inet_ntoa_r(in, buf);
  34867. + return __inet_ntoa_r(in, buf);
  34868. }
  34869. libc_hidden_def(inet_ntoa)
  34870. #endif
  34871. @@ -153,18 +151,18 @@
  34872. */
  34873. struct in_addr inet_makeaddr(in_addr_t net, in_addr_t host)
  34874. {
  34875. - in_addr_t addr;
  34876. + struct in_addr in;
  34877. if (net < 128)
  34878. - addr = (net << IN_CLASSA_NSHIFT) | (host & IN_CLASSA_HOST);
  34879. + in.s_addr = (net << IN_CLASSA_NSHIFT) | (host & IN_CLASSA_HOST);
  34880. else if (net < 65536)
  34881. - addr = (net << IN_CLASSB_NSHIFT) | (host & IN_CLASSB_HOST);
  34882. + in.s_addr = (net << IN_CLASSB_NSHIFT) | (host & IN_CLASSB_HOST);
  34883. else if (net < 16777216UL)
  34884. - addr = (net << IN_CLASSC_NSHIFT) | (host & IN_CLASSC_HOST);
  34885. + in.s_addr = (net << IN_CLASSC_NSHIFT) | (host & IN_CLASSC_HOST);
  34886. else
  34887. - addr = net | host;
  34888. - addr = htonl(addr);
  34889. - return *(struct in_addr *)&addr;
  34890. + in.s_addr = net | host;
  34891. + in.s_addr = htonl(in.s_addr);
  34892. + return in;
  34893. }
  34894. libc_hidden_def(inet_makeaddr)
  34895. #endif
  34896. diff -Nur uClibc-0.9.33.2/libc/inet/ether_addr.c uClibc-git/libc/inet/ether_addr.c
  34897. --- uClibc-0.9.33.2/libc/inet/ether_addr.c 2012-05-15 09:20:09.000000000 +0200
  34898. +++ uClibc-git/libc/inet/ether_addr.c 2014-07-25 20:36:05.577328249 +0200
  34899. @@ -13,9 +13,8 @@
  34900. Lesser General Public License for more details.
  34901. You should have received a copy of the GNU Lesser General Public
  34902. - License along with the GNU C Library; if not, write to the Free
  34903. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  34904. - 02111-1307 USA.
  34905. + License along with the GNU C Library; see the file COPYING.LIB. If
  34906. + not, see <http://www.gnu.org/licenses/>.
  34907. */
  34908. /*
  34909. @@ -23,8 +22,6 @@
  34910. * - initial uClibc port
  34911. */
  34912. -#define __FORCE_GLIBC
  34913. -#include <features.h>
  34914. #include <ctype.h>
  34915. #include <stdio.h>
  34916. #include <stdlib.h>
  34917. diff -Nur uClibc-0.9.33.2/libc/inet/gai_strerror.c uClibc-git/libc/inet/gai_strerror.c
  34918. --- uClibc-0.9.33.2/libc/inet/gai_strerror.c 2012-05-15 09:20:09.000000000 +0200
  34919. +++ uClibc-git/libc/inet/gai_strerror.c 2014-07-25 20:36:05.577328249 +0200
  34920. @@ -13,17 +13,13 @@
  34921. Lesser General Public License for more details.
  34922. You should have received a copy of the GNU Lesser General Public
  34923. - License along with the GNU C Library; if not, write to the Free
  34924. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  34925. - 02111-1307 USA. */
  34926. + License along with the GNU C Library; if not, see
  34927. + <http://www.gnu.org/licenses/>. */
  34928. -#define __FORCE_GLIBC
  34929. -#include <features.h>
  34930. #include <stdio.h>
  34931. #include <netdb.h>
  34932. +#include <libintl.h>
  34933. -#define N_(x) x
  34934. -#define _(x) x
  34935. static const struct
  34936. {
  34937. int code;
  34938. diff -Nur uClibc-0.9.33.2/libc/inet/getaddrinfo.c uClibc-git/libc/inet/getaddrinfo.c
  34939. --- uClibc-0.9.33.2/libc/inet/getaddrinfo.c 2012-05-15 09:20:09.000000000 +0200
  34940. +++ uClibc-git/libc/inet/getaddrinfo.c 2014-07-25 20:36:05.577328249 +0200
  34941. @@ -51,8 +51,6 @@
  34942. If these license terms cause you a real problem, contact the author. */
  34943. -#define __FORCE_GLIBC
  34944. -#include <features.h>
  34945. #include <assert.h>
  34946. #include <errno.h>
  34947. #include <netdb.h>
  34948. @@ -283,7 +281,7 @@
  34949. ai->ai_protocol = req->ai_protocol;
  34950. ai->ai_addrlen = sizeof(struct sockaddr_un);
  34951. ai->ai_addr = (void *)ai + sizeof(struct addrinfo);
  34952. -#if SALEN
  34953. +#if 0 /* SALEN */
  34954. ((struct sockaddr_un *)ai->ai_addr)->sun_len = sizeof(struct sockaddr_un);
  34955. #endif /* SALEN */
  34956. @@ -713,7 +711,7 @@
  34957. (*pai)->ai_protocol = st2->protocol;
  34958. (*pai)->ai_addrlen = socklen;
  34959. (*pai)->ai_addr = (void *) (*pai) + sizeof(struct addrinfo);
  34960. -#if defined SALEN
  34961. +#if 0 /* SALEN */
  34962. (*pai)->ai_addr->sa_len = socklen;
  34963. #endif
  34964. (*pai)->ai_addr->sa_family = family;
  34965. diff -Nur uClibc-0.9.33.2/libc/inet/herror.c uClibc-git/libc/inet/herror.c
  34966. --- uClibc-0.9.33.2/libc/inet/herror.c 2012-05-15 09:20:09.000000000 +0200
  34967. +++ uClibc-git/libc/inet/herror.c 2014-07-25 20:36:05.577328249 +0200
  34968. @@ -17,8 +17,6 @@
  34969. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  34970. */
  34971. -#define __FORCE_GLIBC
  34972. -#include <features.h>
  34973. #include <stdio.h>
  34974. #include <string.h>
  34975. #include <netdb.h>
  34976. diff -Nur uClibc-0.9.33.2/libc/inet/hostid.c uClibc-git/libc/inet/hostid.c
  34977. --- uClibc-0.9.33.2/libc/inet/hostid.c 2012-05-15 09:20:09.000000000 +0200
  34978. +++ uClibc-git/libc/inet/hostid.c 2014-07-25 20:36:05.577328249 +0200
  34979. @@ -5,8 +5,6 @@
  34980. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  34981. */
  34982. -#define __FORCE_GLIBC
  34983. -#include <features.h>
  34984. #include <errno.h>
  34985. #include <unistd.h>
  34986. #include <sys/types.h>
  34987. diff -Nur uClibc-0.9.33.2/libc/inet/ifaddrs.c uClibc-git/libc/inet/ifaddrs.c
  34988. --- uClibc-0.9.33.2/libc/inet/ifaddrs.c 2012-05-15 09:20:09.000000000 +0200
  34989. +++ uClibc-git/libc/inet/ifaddrs.c 2014-07-25 20:36:05.577328249 +0200
  34990. @@ -13,12 +13,9 @@
  34991. Lesser General Public License for more details.
  34992. You should have received a copy of the GNU Lesser General Public
  34993. - License along with the GNU C Library; if not, write to the Free
  34994. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  34995. - 02111-1307 USA. */
  34996. + License along with the GNU C Library; if not, see
  34997. + <http://www.gnu.org/licenses/>. */
  34998. -#define __FORCE_GLIBC
  34999. -#include <features.h>
  35000. #include <alloca.h>
  35001. #include <assert.h>
  35002. #include <errno.h>
  35003. @@ -33,7 +30,6 @@
  35004. #include <string.h>
  35005. #include <sys/ioctl.h>
  35006. #include <sys/socket.h>
  35007. -#include <libc-internal.h>
  35008. #include <time.h>
  35009. #include <unistd.h>
  35010. diff -Nur uClibc-0.9.33.2/libc/inet/if_index.c uClibc-git/libc/inet/if_index.c
  35011. --- uClibc-0.9.33.2/libc/inet/if_index.c 2012-05-15 09:20:09.000000000 +0200
  35012. +++ uClibc-git/libc/inet/if_index.c 2014-07-25 20:36:05.577328249 +0200
  35013. @@ -13,15 +13,12 @@
  35014. Lesser General Public License for more details.
  35015. You should have received a copy of the GNU Lesser General Public
  35016. - License along with the GNU C Library; if not, write to the Free
  35017. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  35018. - 02111-1307 USA.
  35019. + License along with the GNU C Library; see the file COPYING.LIB. If
  35020. + not, see <http://www.gnu.org/licenses/>.
  35021. Reworked Dec 2002 by Erik Andersen <andersen@codepoet.org>
  35022. */
  35023. -#define __FORCE_GLIBC
  35024. -#include <features.h>
  35025. #include <string.h>
  35026. #include <alloca.h>
  35027. #include <errno.h>
  35028. @@ -31,7 +28,6 @@
  35029. #include <net/if.h>
  35030. #include <sys/socket.h>
  35031. #include <sys/ioctl.h>
  35032. -#include <libc-internal.h>
  35033. #include <not-cancel.h>
  35034. #include "netlinkaccess.h"
  35035. diff -Nur uClibc-0.9.33.2/libc/inet/in6_addr.c uClibc-git/libc/inet/in6_addr.c
  35036. --- uClibc-0.9.33.2/libc/inet/in6_addr.c 2012-05-15 09:20:09.000000000 +0200
  35037. +++ uClibc-git/libc/inet/in6_addr.c 2014-07-25 20:36:05.577328249 +0200
  35038. @@ -13,12 +13,9 @@
  35039. Lesser General Public License for more details.
  35040. You should have received a copy of the GNU Lesser General Public
  35041. - License along with the GNU C Library; if not, write to the Free
  35042. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  35043. - 02111-1307 USA. */
  35044. + License along with the GNU C Library; if not, see
  35045. + <http://www.gnu.org/licenses/>. */
  35046. -#define __FORCE_GLIBC
  35047. -#include <features.h>
  35048. #include <netinet/in.h>
  35049. #ifdef __UCLIBC_HAS_IPV6__
  35050. diff -Nur uClibc-0.9.33.2/libc/inet/inet_addr.c uClibc-git/libc/inet/inet_addr.c
  35051. --- uClibc-0.9.33.2/libc/inet/inet_addr.c 2012-05-15 09:20:09.000000000 +0200
  35052. +++ uClibc-git/libc/inet/inet_addr.c 2014-07-25 20:36:05.577328249 +0200
  35053. @@ -4,5 +4,5 @@
  35054. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  35055. */
  35056. -#define L_inet_makeaddr
  35057. +#define L_inet_addr
  35058. #include "addr.c"
  35059. diff -Nur uClibc-0.9.33.2/libc/inet/inet_makeaddr.c uClibc-git/libc/inet/inet_makeaddr.c
  35060. --- uClibc-0.9.33.2/libc/inet/inet_makeaddr.c 2012-05-15 09:20:09.000000000 +0200
  35061. +++ uClibc-git/libc/inet/inet_makeaddr.c 2014-07-25 20:36:05.577328249 +0200
  35062. @@ -4,5 +4,5 @@
  35063. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  35064. */
  35065. -#define L_inet_addr
  35066. +#define L_inet_makeaddr
  35067. #include "addr.c"
  35068. diff -Nur uClibc-0.9.33.2/libc/inet/inet_net.c uClibc-git/libc/inet/inet_net.c
  35069. --- uClibc-0.9.33.2/libc/inet/inet_net.c 2012-05-15 09:20:09.000000000 +0200
  35070. +++ uClibc-git/libc/inet/inet_net.c 2014-07-25 20:36:05.577328249 +0200
  35071. @@ -32,8 +32,6 @@
  35072. * SUCH DAMAGE.
  35073. */
  35074. -#define __FORCE_GLIBC
  35075. -#include <features.h>
  35076. #include <ctype.h>
  35077. #include <netinet/in.h>
  35078. #include <arpa/inet.h>
  35079. diff -Nur uClibc-0.9.33.2/libc/inet/Makefile.in uClibc-git/libc/inet/Makefile.in
  35080. --- uClibc-0.9.33.2/libc/inet/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  35081. +++ uClibc-git/libc/inet/Makefile.in 2014-07-25 20:36:05.573328227 +0200
  35082. @@ -11,33 +11,34 @@
  35083. INET_DIR := $(top_srcdir)libc/inet
  35084. INET_OUT := $(top_builddir)libc/inet
  35085. +V4_OR_V6 := $(findstring y,$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6))
  35086. CFLAGS-inet := -DRESOLVER="\"resolv.c\""
  35087. CSRC-y :=
  35088. # des uses ntohl
  35089. -CSRC-$(findstring y,$(UCLIBC_HAS_CRYPT_IMPL)$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += ntohl.c
  35090. -CSRC-$(findstring y,$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += \
  35091. +CSRC-$(findstring y,$(UCLIBC_HAS_CRYPT_IMPL)$(V4_OR_V6)) += ntohl.c
  35092. +CSRC-$(V4_OR_V6) += \
  35093. getservice.c getproto.c getnet.c hostid.c \
  35094. inet_net.c herror.c if_index.c gai_strerror.c getaddrinfo.c \
  35095. ifaddrs.c ntop.c
  35096. CSRC-$(UCLIBC_HAS_IPV6) += in6_addr.c
  35097. # multi source addr.c
  35098. -CSRC-$(findstring y,$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += \
  35099. +CSRC-$(V4_OR_V6) += \
  35100. inet_aton.c inet_addr.c inet_ntoa.c inet_makeaddr.c \
  35101. inet_lnaof.c inet_netof.c
  35102. # multi source resolv.c
  35103. -CSRC-$(findstring y,$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += \
  35104. +CSRC-$(V4_OR_V6) += \
  35105. encodeh.c decodeh.c encoded.c decoded.c \
  35106. encodeq.c encodea.c \
  35107. read_etc_hosts_r.c \
  35108. dnslookup.c opennameservers.c closenameservers.c \
  35109. getnameinfo.c \
  35110. gethostent.c gethostent_r.c
  35111. -CSRC-$(findstring y,$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += \
  35112. +CSRC-$(V4_OR_V6) += \
  35113. get_hosts_byaddr_r.c get_hosts_byname_r.c \
  35114. gethostbyaddr_r.c gethostbyname_r.c gethostbyname2_r.c \
  35115. gethostbyaddr.c gethostbyname.c gethostbyname2.c
  35116. -CSRC-$(findstring y,$(UCLIBC_HAS_RESOLVER_SUPPORT)) += \
  35117. +CSRC-$(UCLIBC_HAS_RESOLVER_SUPPORT) += \
  35118. ns_netint.c ns_parse.c res_data.c \
  35119. res_init.c res_query.c res_comp.c ns_name.c \
  35120. _res_state.c
  35121. @@ -52,7 +53,7 @@
  35122. socketcalls_CSRC-$(UCLIBC_LINUX_SPECIFIC) += accept4.c
  35123. CSRC-$(UCLIBC_HAS_SOCKET) += $(socketcalls_CSRC-y) opensock.c
  35124. -CSRC-$(findstring y,$(UCLIBC_HAS_SOCKET)$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6)) += ethers.c ether_addr.c
  35125. +CSRC-$(findstring y,$(UCLIBC_HAS_SOCKET)$(V4_OR_V6)) += ethers.c ether_addr.c
  35126. INET_SRC := $(patsubst %.c,$(INET_DIR)/%.c,$(CSRC-y))
  35127. INET_OBJ := $(patsubst %.c,$(INET_OUT)/%.o,$(CSRC-y))
  35128. diff -Nur uClibc-0.9.33.2/libc/inet/netlinkaccess.h uClibc-git/libc/inet/netlinkaccess.h
  35129. --- uClibc-0.9.33.2/libc/inet/netlinkaccess.h 2012-05-15 09:20:09.000000000 +0200
  35130. +++ uClibc-git/libc/inet/netlinkaccess.h 2014-07-25 20:36:05.577328249 +0200
  35131. @@ -12,9 +12,8 @@
  35132. Lesser General Public License for more details.
  35133. You should have received a copy of the GNU Lesser General Public
  35134. - License along with the GNU C Library; if not, write to the Free
  35135. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  35136. - 02111-1307 USA. */
  35137. + License along with the GNU C Library; if not, see
  35138. + <http://www.gnu.org/licenses/>. */
  35139. #ifndef _NETLINKACCESS_H
  35140. #define _NETLINKACCESS_H 1
  35141. diff -Nur uClibc-0.9.33.2/libc/inet/ntohl.c uClibc-git/libc/inet/ntohl.c
  35142. --- uClibc-0.9.33.2/libc/inet/ntohl.c 2012-05-15 09:20:09.000000000 +0200
  35143. +++ uClibc-git/libc/inet/ntohl.c 2014-07-25 20:36:05.577328249 +0200
  35144. @@ -6,9 +6,6 @@
  35145. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  35146. */
  35147. -#include <stdint.h>
  35148. -#include <endian.h>
  35149. -#include <byteswap.h>
  35150. #include <netinet/in.h>
  35151. #undef ntohl
  35152. @@ -16,51 +13,30 @@
  35153. #undef htonl
  35154. #undef htons
  35155. -#if __BYTE_ORDER == __BIG_ENDIAN
  35156. -uint32_t ntohl (uint32_t x)
  35157. -{
  35158. - return x;
  35159. -}
  35160. -
  35161. -uint16_t ntohs (uint16_t x)
  35162. -{
  35163. - return x;
  35164. -}
  35165. -
  35166. -uint32_t htonl (uint32_t x)
  35167. -{
  35168. - return x;
  35169. -}
  35170. +#if __BYTE_ORDER != __BIG_ENDIAN && __BYTE_ORDER != __LITTLE_ENDIAN
  35171. +# error "You seem to have an unsupported byteorder"
  35172. +#endif
  35173. -uint16_t htons (uint16_t x)
  35174. -{
  35175. - return x;
  35176. -}
  35177. -#elif __BYTE_ORDER == __LITTLE_ENDIAN
  35178. uint32_t ntohl (uint32_t x)
  35179. {
  35180. +#if __BYTE_ORDER == __BIG_ENDIAN
  35181. + return x;
  35182. +#else
  35183. return __bswap_32(x);
  35184. +#endif
  35185. }
  35186. +libc_hidden_def(ntohl)
  35187. +strong_alias(ntohl,htonl)
  35188. +libc_hidden_def(htonl)
  35189. uint16_t ntohs (uint16_t x)
  35190. {
  35191. - return __bswap_16(x);
  35192. -}
  35193. -
  35194. -uint32_t htonl (uint32_t x)
  35195. -{
  35196. - return __bswap_32(x);
  35197. -}
  35198. -
  35199. -uint16_t htons (uint16_t x)
  35200. -{
  35201. - return __bswap_16(x);
  35202. -}
  35203. +#if __BYTE_ORDER == __BIG_ENDIAN
  35204. + return x;
  35205. #else
  35206. -#error "You seem to have an unsupported byteorder"
  35207. + return __bswap_16(x);
  35208. #endif
  35209. -
  35210. -libc_hidden_def(ntohl)
  35211. +}
  35212. libc_hidden_def(ntohs)
  35213. -libc_hidden_def(htonl)
  35214. +strong_alias(ntohs,htons)
  35215. libc_hidden_def(htons)
  35216. diff -Nur uClibc-0.9.33.2/libc/inet/ntop.c uClibc-git/libc/inet/ntop.c
  35217. --- uClibc-0.9.33.2/libc/inet/ntop.c 2012-05-15 09:20:09.000000000 +0200
  35218. +++ uClibc-git/libc/inet/ntop.c 2014-07-25 20:36:05.577328249 +0200
  35219. @@ -15,8 +15,6 @@
  35220. * SOFTWARE.
  35221. */
  35222. -#define __FORCE_GLIBC
  35223. -#include <features.h>
  35224. #include <sys/param.h>
  35225. #include <sys/types.h>
  35226. #include <sys/socket.h>
  35227. diff -Nur uClibc-0.9.33.2/libc/inet/opensock.c uClibc-git/libc/inet/opensock.c
  35228. --- uClibc-0.9.33.2/libc/inet/opensock.c 2012-05-15 09:20:09.000000000 +0200
  35229. +++ uClibc-git/libc/inet/opensock.c 2014-07-25 20:36:05.577328249 +0200
  35230. @@ -12,18 +12,11 @@
  35231. Lesser General Public License for more details.
  35232. You should have received a copy of the GNU Lesser General Public
  35233. - License along with the GNU C Library; if not, write to the Free
  35234. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  35235. - 02111-1307 USA. */
  35236. + License along with the GNU C Library; if not, see
  35237. + <http://www.gnu.org/licenses/>. */
  35238. -#include <assert.h>
  35239. -#include <errno.h>
  35240. -#include <stdio.h>
  35241. -#include <string.h>
  35242. -#include <unistd.h>
  35243. #include <sys/socket.h>
  35244. -#include <features.h>
  35245. -#include <libc-internal.h>
  35246. +#include <bits/kernel-features.h>
  35247. /* Return a socket of any type. The socket can be used in subsequent
  35248. ioctl calls to talk to the kernel. */
  35249. diff -Nur uClibc-0.9.33.2/libc/inet/resolv.c uClibc-git/libc/inet/resolv.c
  35250. --- uClibc-0.9.33.2/libc/inet/resolv.c 2012-05-15 09:20:09.000000000 +0200
  35251. +++ uClibc-git/libc/inet/resolv.c 2014-07-25 20:36:05.577328249 +0200
  35252. @@ -293,8 +293,6 @@
  35253. - a sequence of labels ending with a pointer
  35254. */
  35255. -#define __FORCE_GLIBC
  35256. -#include <features.h>
  35257. #include <string.h>
  35258. #include <stdio.h>
  35259. #include <stdio_ext.h>
  35260. @@ -317,6 +315,7 @@
  35261. #include <sys/utsname.h>
  35262. #include <sys/un.h>
  35263. #include <sys/stat.h>
  35264. +#include <sys/param.h>
  35265. #include <bits/uClibc_mutex.h>
  35266. #include "internal/parse_config.h"
  35267. @@ -406,7 +405,7 @@
  35268. } sockaddr46_t;
  35269. -__UCLIBC_MUTEX_EXTERN(__resolv_lock);
  35270. +__UCLIBC_MUTEX_EXTERN(__resolv_lock) attribute_hidden;
  35271. /* Protected by __resolv_lock */
  35272. extern void (*__res_sync)(void) attribute_hidden;
  35273. @@ -566,7 +565,7 @@
  35274. #ifdef L_encodeh
  35275. -int attribute_hidden __encode_header(struct resolv_header *h, unsigned char *dest, int maxlen)
  35276. +int __encode_header(struct resolv_header *h, unsigned char *dest, int maxlen)
  35277. {
  35278. if (maxlen < HFIXEDSZ)
  35279. return -1;
  35280. @@ -595,7 +594,7 @@
  35281. #ifdef L_decodeh
  35282. -void attribute_hidden __decode_header(unsigned char *data,
  35283. +void __decode_header(unsigned char *data,
  35284. struct resolv_header *h)
  35285. {
  35286. h->id = (data[0] << 8) | data[1];
  35287. @@ -619,7 +618,7 @@
  35288. /* Encode a dotted string into nameserver transport-level encoding.
  35289. This routine is fairly dumb, and doesn't attempt to compress
  35290. the data */
  35291. -int attribute_hidden __encode_dotted(const char *dotted, unsigned char *dest, int maxlen)
  35292. +int __encode_dotted(const char *dotted, unsigned char *dest, int maxlen)
  35293. {
  35294. unsigned used = 0;
  35295. @@ -657,7 +656,7 @@
  35296. /* Decode a dotted string from nameserver transport-level encoding.
  35297. This routine understands compressed data. */
  35298. -int attribute_hidden __decode_dotted(const unsigned char *packet,
  35299. +int __decode_dotted(const unsigned char *packet,
  35300. int offset,
  35301. int packet_len,
  35302. char *dest,
  35303. @@ -722,7 +721,7 @@
  35304. #ifdef L_encodeq
  35305. -int attribute_hidden __encode_question(const struct resolv_question *q,
  35306. +int __encode_question(const struct resolv_question *q,
  35307. unsigned char *dest,
  35308. int maxlen)
  35309. {
  35310. @@ -750,7 +749,7 @@
  35311. #ifdef L_encodea
  35312. -int attribute_hidden __encode_answer(struct resolv_answer *a, unsigned char *dest, int maxlen)
  35313. +int __encode_answer(struct resolv_answer *a, unsigned char *dest, int maxlen)
  35314. {
  35315. int i;
  35316. @@ -864,7 +863,7 @@
  35317. const char *name,
  35318. int type,
  35319. unsigned char *packet,
  35320. - int maxlen);
  35321. + int maxlen) attribute_hidden;
  35322. int __form_query(int id,
  35323. const char *name,
  35324. int type,
  35325. @@ -956,7 +955,7 @@
  35326. }
  35327. /* Must be called under __resolv_lock. */
  35328. -void attribute_hidden __open_nameservers(void)
  35329. +void __open_nameservers(void)
  35330. {
  35331. static uint32_t resolv_conf_mtime;
  35332. @@ -1122,7 +1121,7 @@
  35333. #ifdef L_closenameservers
  35334. /* Must be called under __resolv_lock. */
  35335. -void attribute_hidden __close_nameservers(void)
  35336. +void __close_nameservers(void)
  35337. {
  35338. if (__nameserver != (void*) &__local_nameserver)
  35339. free(__nameserver);
  35340. @@ -1230,7 +1229,7 @@
  35341. * appended. (why the filed is called "dotted" I have no idea)
  35342. * This is a malloced string. May be NULL because strdup failed.
  35343. */
  35344. -int attribute_hidden __dns_lookup(const char *name,
  35345. +int __dns_lookup(const char *name,
  35346. int type,
  35347. unsigned char **outpacket,
  35348. struct resolv_answer *a)
  35349. @@ -1472,9 +1471,11 @@
  35350. }
  35351. /* no more search domains to try */
  35352. }
  35353. - /* dont loop, this is "no such host" situation */
  35354. - h_errno = HOST_NOT_FOUND;
  35355. - goto fail1;
  35356. + if (h.rcode != SERVFAIL) {
  35357. + /* dont loop, this is "no such host" situation */
  35358. + h_errno = HOST_NOT_FOUND;
  35359. + goto fail1;
  35360. + }
  35361. }
  35362. /* Insert other non-fatal errors here, which do not warrant
  35363. * switching to next nameserver */
  35364. @@ -1594,7 +1595,7 @@
  35365. #define HALISTOFF (sizeof(char*) * MAXTOKENS)
  35366. #define INADDROFF (HALISTOFF + 2 * sizeof(char*))
  35367. -int attribute_hidden __read_etc_hosts_r(
  35368. +int __read_etc_hosts_r(
  35369. parser_t * parser,
  35370. const char *name,
  35371. int type,
  35372. @@ -1708,7 +1709,7 @@
  35373. #ifdef L_get_hosts_byname_r
  35374. -int attribute_hidden __get_hosts_byname_r(const char *name,
  35375. +int __get_hosts_byname_r(const char *name,
  35376. int type,
  35377. struct hostent *result_buf,
  35378. char *buf,
  35379. @@ -1724,7 +1725,7 @@
  35380. #ifdef L_get_hosts_byaddr_r
  35381. -int attribute_hidden __get_hosts_byaddr_r(const char *addr,
  35382. +int __get_hosts_byaddr_r(const char *addr,
  35383. int len,
  35384. int type,
  35385. struct hostent *result_buf,
  35386. @@ -1775,7 +1776,7 @@
  35387. unsigned flags)
  35388. {
  35389. int serrno = errno;
  35390. - unsigned ok;
  35391. + bool ok = 0;
  35392. struct hostent *hoste = NULL;
  35393. char domain[256];
  35394. @@ -1785,16 +1786,15 @@
  35395. if (sa == NULL || addrlen < sizeof(sa_family_t))
  35396. return EAI_FAMILY;
  35397. - ok = sa->sa_family;
  35398. - if (ok == AF_LOCAL) /* valid */;
  35399. + if (sa->sa_family == AF_LOCAL) /* valid */;
  35400. #ifdef __UCLIBC_HAS_IPV4__
  35401. - else if (ok == AF_INET) {
  35402. + else if (sa->sa_family == AF_INET) {
  35403. if (addrlen < sizeof(struct sockaddr_in))
  35404. return EAI_FAMILY;
  35405. }
  35406. #endif
  35407. #ifdef __UCLIBC_HAS_IPV6__
  35408. - else if (ok == AF_INET6) {
  35409. + else if (sa->sa_family == AF_INET6) {
  35410. if (addrlen < sizeof(struct sockaddr_in6))
  35411. return EAI_FAMILY;
  35412. }
  35413. @@ -1802,7 +1802,6 @@
  35414. else
  35415. return EAI_FAMILY;
  35416. - ok = 0;
  35417. if (host != NULL && hostlen > 0)
  35418. switch (sa->sa_family) {
  35419. case AF_INET:
  35420. @@ -1826,21 +1825,18 @@
  35421. if (hoste) {
  35422. char *c;
  35423. -#undef min
  35424. -#define min(x,y) (((x) > (y)) ? (y) : (x))
  35425. if ((flags & NI_NOFQDN)
  35426. && (getdomainname(domain, sizeof(domain)) == 0)
  35427. && (c = strstr(hoste->h_name, domain)) != NULL
  35428. && (c != hoste->h_name) && (*(--c) == '.')
  35429. ) {
  35430. strncpy(host, hoste->h_name,
  35431. - min(hostlen, (size_t) (c - hoste->h_name)));
  35432. - host[min(hostlen - 1, (size_t) (c - hoste->h_name))] = '\0';
  35433. + MIN(hostlen, (size_t) (c - hoste->h_name)));
  35434. + host[MIN(hostlen - 1, (size_t) (c - hoste->h_name))] = '\0';
  35435. } else {
  35436. strncpy(host, hoste->h_name, hostlen);
  35437. }
  35438. ok = 1;
  35439. -#undef min
  35440. }
  35441. }
  35442. @@ -3432,6 +3428,7 @@
  35443. */
  35444. }
  35445. +/* has to be called under __resolv_lock */
  35446. static int
  35447. __res_vinit(res_state rp, int preinit)
  35448. {
  35449. @@ -3440,7 +3437,6 @@
  35450. int m = 0;
  35451. #endif
  35452. - __UCLIBC_MUTEX_LOCK(__resolv_lock);
  35453. __close_nameservers();
  35454. __open_nameservers();
  35455. @@ -3532,29 +3528,87 @@
  35456. rp->options |= RES_INIT;
  35457. + return 0;
  35458. +}
  35459. +
  35460. +static unsigned int
  35461. +res_randomid(void)
  35462. +{
  35463. + return 0xffff & getpid();
  35464. +}
  35465. +
  35466. +/* Our res_init never fails (always returns 0) */
  35467. +int
  35468. +res_init(void)
  35469. +{
  35470. + /*
  35471. + * These three fields used to be statically initialized. This made
  35472. + * it hard to use this code in a shared library. It is necessary,
  35473. + * now that we're doing dynamic initialization here, that we preserve
  35474. + * the old semantics: if an application modifies one of these three
  35475. + * fields of _res before res_init() is called, res_init() will not
  35476. + * alter them. Of course, if an application is setting them to
  35477. + * _zero_ before calling res_init(), hoping to override what used
  35478. + * to be the static default, we can't detect it and unexpected results
  35479. + * will follow. Zero for any of these fields would make no sense,
  35480. + * so one can safely assume that the applications were already getting
  35481. + * unexpected results.
  35482. + *
  35483. + * _res.options is tricky since some apps were known to diddle the bits
  35484. + * before res_init() was first called. We can't replicate that semantic
  35485. + * with dynamic initialization (they may have turned bits off that are
  35486. + * set in RES_DEFAULT). Our solution is to declare such applications
  35487. + * "broken". They could fool us by setting RES_INIT but none do (yet).
  35488. + */
  35489. +
  35490. + __UCLIBC_MUTEX_LOCK(__resolv_lock);
  35491. +
  35492. + if (!_res.retrans)
  35493. + _res.retrans = RES_TIMEOUT;
  35494. + if (!_res.retry)
  35495. + _res.retry = 4;
  35496. + if (!(_res.options & RES_INIT))
  35497. + _res.options = RES_DEFAULT;
  35498. +
  35499. + /*
  35500. + * This one used to initialize implicitly to zero, so unless the app
  35501. + * has set it to something in particular, we can randomize it now.
  35502. + */
  35503. + if (!_res.id)
  35504. + _res.id = res_randomid();
  35505. +
  35506. + __res_sync = NULL;
  35507. + __res_vinit(&_res, 1);
  35508. + __res_sync = res_sync_func;
  35509. +
  35510. __UCLIBC_MUTEX_UNLOCK(__resolv_lock);
  35511. +
  35512. return 0;
  35513. }
  35514. +libc_hidden_def(res_init)
  35515. static void
  35516. -__res_iclose(void)
  35517. +__res_iclose(res_state statp)
  35518. {
  35519. + struct __res_state * rp = statp;
  35520. __UCLIBC_MUTEX_LOCK(__resolv_lock);
  35521. + if (rp == NULL)
  35522. + rp = __res_state();
  35523. __close_nameservers();
  35524. __res_sync = NULL;
  35525. #ifdef __UCLIBC_HAS_IPV6__
  35526. {
  35527. - char *p1 = (char*) &(_res.nsaddr_list[0]);
  35528. - int m = 0;
  35529. + char *p1 = (char*) &(rp->nsaddr_list[0]);
  35530. + unsigned int m = 0;
  35531. /* free nsaddrs[m] if they do not point to nsaddr_list[x] */
  35532. - while (m < ARRAY_SIZE(_res._u._ext.nsaddrs)) {
  35533. - char *p2 = (char*)(_res._u._ext.nsaddrs[m++]);
  35534. - if (p2 < p1 || (p2 - p1) > sizeof(_res.nsaddr_list))
  35535. + while (m < ARRAY_SIZE(rp->_u._ext.nsaddrs)) {
  35536. + char *p2 = (char*)(rp->_u._ext.nsaddrs[m++]);
  35537. + if (p2 < p1 || (p2 - p1) > (signed)sizeof(rp->nsaddr_list))
  35538. free(p2);
  35539. }
  35540. }
  35541. #endif
  35542. - memset(&_res, 0, sizeof(_res));
  35543. + memset(rp, 0, sizeof(struct __res_state));
  35544. __UCLIBC_MUTEX_UNLOCK(__resolv_lock);
  35545. }
  35546. @@ -3569,13 +3623,13 @@
  35547. void
  35548. res_nclose(res_state statp)
  35549. {
  35550. - __res_iclose();
  35551. + __res_iclose(statp);
  35552. }
  35553. #ifdef __UCLIBC_HAS_BSD_RES_CLOSE__
  35554. void res_close(void)
  35555. {
  35556. - __res_iclose();
  35557. + __res_iclose(NULL);
  35558. }
  35559. #endif
  35560. @@ -3595,74 +3649,14 @@
  35561. # if defined __UCLIBC_HAS_TLS__
  35562. # undef __resp
  35563. __thread struct __res_state *__resp = &_res;
  35564. -/*
  35565. - * FIXME: Add usage of hidden attribute for this when used in the shared
  35566. - * library. It currently crashes the linker when doing section
  35567. - * relocations.
  35568. - */
  35569. extern __thread struct __res_state *__libc_resp
  35570. - __attribute__ ((alias ("__resp"))) attribute_hidden;
  35571. + __attribute__ ((alias ("__resp"))) attribute_hidden attribute_tls_model_ie;
  35572. # else
  35573. # undef __resp
  35574. struct __res_state *__resp = &_res;
  35575. # endif
  35576. #endif /* !__UCLIBC_HAS_THREADS__ */
  35577. -static unsigned int
  35578. -res_randomid(void)
  35579. -{
  35580. - return 0xffff & getpid();
  35581. -}
  35582. -
  35583. -/* Our res_init never fails (always returns 0) */
  35584. -int
  35585. -res_init(void)
  35586. -{
  35587. - /*
  35588. - * These three fields used to be statically initialized. This made
  35589. - * it hard to use this code in a shared library. It is necessary,
  35590. - * now that we're doing dynamic initialization here, that we preserve
  35591. - * the old semantics: if an application modifies one of these three
  35592. - * fields of _res before res_init() is called, res_init() will not
  35593. - * alter them. Of course, if an application is setting them to
  35594. - * _zero_ before calling res_init(), hoping to override what used
  35595. - * to be the static default, we can't detect it and unexpected results
  35596. - * will follow. Zero for any of these fields would make no sense,
  35597. - * so one can safely assume that the applications were already getting
  35598. - * unexpected results.
  35599. - *
  35600. - * _res.options is tricky since some apps were known to diddle the bits
  35601. - * before res_init() was first called. We can't replicate that semantic
  35602. - * with dynamic initialization (they may have turned bits off that are
  35603. - * set in RES_DEFAULT). Our solution is to declare such applications
  35604. - * "broken". They could fool us by setting RES_INIT but none do (yet).
  35605. - */
  35606. -
  35607. - __UCLIBC_MUTEX_LOCK(__resolv_lock);
  35608. -
  35609. - if (!_res.retrans)
  35610. - _res.retrans = RES_TIMEOUT;
  35611. - if (!_res.retry)
  35612. - _res.retry = 4;
  35613. - if (!(_res.options & RES_INIT))
  35614. - _res.options = RES_DEFAULT;
  35615. -
  35616. - /*
  35617. - * This one used to initialize implicitly to zero, so unless the app
  35618. - * has set it to something in particular, we can randomize it now.
  35619. - */
  35620. - if (!_res.id)
  35621. - _res.id = res_randomid();
  35622. - __res_sync = res_sync_func;
  35623. -
  35624. - __UCLIBC_MUTEX_UNLOCK(__resolv_lock);
  35625. -
  35626. - __res_vinit(&_res, 1);
  35627. -
  35628. - return 0;
  35629. -}
  35630. -libc_hidden_def(res_init)
  35631. -
  35632. /*
  35633. * Set up default settings. If the configuration file exist, the values
  35634. * there will have precedence. Otherwise, the server address is set to
  35635. @@ -3687,7 +3681,11 @@
  35636. int
  35637. res_ninit(res_state statp)
  35638. {
  35639. - return __res_vinit(statp, 0);
  35640. + int ret;
  35641. + __UCLIBC_MUTEX_LOCK(__resolv_lock);
  35642. + ret = __res_vinit(statp, 0);
  35643. + __UCLIBC_MUTEX_UNLOCK(__resolv_lock);
  35644. + return ret;
  35645. }
  35646. #endif /* L_res_init */
  35647. @@ -3740,11 +3738,10 @@
  35648. free(a.dotted);
  35649. - if (a.atype == type) { /* CNAME */
  35650. - if (i > anslen)
  35651. - i = anslen;
  35652. - memcpy(answer, packet, i);
  35653. - }
  35654. + if (i > anslen)
  35655. + i = anslen;
  35656. + memcpy(answer, packet, i);
  35657. +
  35658. free(packet);
  35659. return i;
  35660. }
  35661. @@ -4227,7 +4224,7 @@
  35662. hp = (HEADER *) buf;
  35663. hp->id = getpid() & 0xffff;
  35664. hp->opcode = op;
  35665. - hp->rd = (_res.options & RES_RECURSE) != 0U;
  35666. + hp->rd = (_res_options & RES_RECURSE) != 0U;
  35667. hp->rcode = NOERROR;
  35668. cp = buf + HFIXEDSZ;
  35669. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/auth_none.c uClibc-git/libc/inet/rpc/auth_none.c
  35670. --- uClibc-0.9.33.2/libc/inet/rpc/auth_none.c 2012-05-15 09:20:09.000000000 +0200
  35671. +++ uClibc-git/libc/inet/rpc/auth_none.c 2014-07-25 20:36:05.581328269 +0200
  35672. @@ -35,8 +35,6 @@
  35673. * credentials and verifiers to remote systems.
  35674. */
  35675. -#define __FORCE_GLIBC
  35676. -#include <features.h>
  35677. #include "rpc_private.h"
  35678. @@ -66,49 +64,54 @@
  35679. char marshalled_client[MAX_MARSHAL_SIZE];
  35680. u_int mcnt;
  35681. };
  35682. +
  35683. +static struct authnone_private_s authnone_private;
  35684. #ifdef __UCLIBC_HAS_THREADS__
  35685. -#define authnone_private (*(struct authnone_private_s **)&RPC_THREAD_VARIABLE(authnone_private_s))
  35686. -#else
  35687. -static struct authnone_private_s *authnone_private;
  35688. +__libc_once_define(static, authnone_private_guard);
  35689. #endif
  35690. -AUTH *
  35691. -authnone_create (void)
  35692. +static void authnone_create_once (void);
  35693. +
  35694. +static void
  35695. +authnone_create_once (void)
  35696. {
  35697. struct authnone_private_s *ap;
  35698. XDR xdr_stream;
  35699. XDR *xdrs;
  35700. - ap = (struct authnone_private_s *) authnone_private;
  35701. - if (ap == NULL)
  35702. - {
  35703. - ap = (struct authnone_private_s *) calloc (1, sizeof (*ap));
  35704. - if (ap == NULL)
  35705. - return NULL;
  35706. - authnone_private = ap;
  35707. - }
  35708. - if (!ap->mcnt)
  35709. - {
  35710. - ap->no_client.ah_cred = ap->no_client.ah_verf = _null_auth;
  35711. - ap->no_client.ah_ops = (struct auth_ops *)&ops;
  35712. - xdrs = &xdr_stream;
  35713. - xdrmem_create (xdrs, ap->marshalled_client, (u_int) MAX_MARSHAL_SIZE,
  35714. - XDR_ENCODE);
  35715. - (void) xdr_opaque_auth (xdrs, &ap->no_client.ah_cred);
  35716. - (void) xdr_opaque_auth (xdrs, &ap->no_client.ah_verf);
  35717. - ap->mcnt = XDR_GETPOS (xdrs);
  35718. - XDR_DESTROY (xdrs);
  35719. - }
  35720. - return (&ap->no_client);
  35721. + ap = &authnone_private;
  35722. +
  35723. + ap->no_client.ah_cred = ap->no_client.ah_verf = _null_auth;
  35724. + ap->no_client.ah_ops = (struct auth_ops *) &ops;
  35725. + xdrs = &xdr_stream;
  35726. + xdrmem_create(xdrs, ap->marshalled_client,
  35727. + (u_int) MAX_MARSHAL_SIZE, XDR_ENCODE);
  35728. + (void) xdr_opaque_auth(xdrs, &ap->no_client.ah_cred);
  35729. + (void) xdr_opaque_auth(xdrs, &ap->no_client.ah_verf);
  35730. + ap->mcnt = XDR_GETPOS (xdrs);
  35731. + XDR_DESTROY (xdrs);
  35732. +}
  35733. +
  35734. +AUTH *
  35735. +authnone_create (void)
  35736. +{
  35737. +#ifdef __UCLIBC_HAS_THREADS__
  35738. + __libc_once (authnone_private_guard, authnone_create_once);
  35739. +#else
  35740. + authnone_create_once();
  35741. +#endif
  35742. + return &authnone_private.no_client;
  35743. }
  35744. libc_hidden_def(authnone_create)
  35745. static bool_t
  35746. -authnone_marshal (AUTH *client attribute_unused, XDR *xdrs)
  35747. +authnone_marshal (AUTH *client, XDR *xdrs)
  35748. {
  35749. struct authnone_private_s *ap;
  35750. - ap = authnone_private;
  35751. + /* authnone_create returned authnone_private->no_client, which is
  35752. + the first field of struct authnone_private_s. */
  35753. + ap = (struct authnone_private_s *) client;
  35754. if (ap == NULL)
  35755. return FALSE;
  35756. return (*xdrs->x_ops->x_putbytes) (xdrs, ap->marshalled_client, ap->mcnt);
  35757. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/auth_unix.c uClibc-git/libc/inet/rpc/auth_unix.c
  35758. --- uClibc-0.9.33.2/libc/inet/rpc/auth_unix.c 2012-05-15 09:20:09.000000000 +0200
  35759. +++ uClibc-git/libc/inet/rpc/auth_unix.c 2014-07-25 20:36:05.581328269 +0200
  35760. @@ -38,13 +38,11 @@
  35761. * for the credentials.
  35762. */
  35763. -#define __FORCE_GLIBC
  35764. -#include <features.h>
  35765. -
  35766. #include <limits.h>
  35767. #include <stdio.h>
  35768. #include <string.h>
  35769. #include <unistd.h>
  35770. +#include <libintl.h>
  35771. #include <sys/param.h>
  35772. #include <rpc/types.h>
  35773. @@ -52,10 +50,6 @@
  35774. #include <rpc/auth.h>
  35775. #include <rpc/auth_unix.h>
  35776. -#ifdef USE_IN_LIBIO
  35777. -# include <wchar.h>
  35778. -#endif
  35779. -
  35780. /*
  35781. * Unix authenticator operations vector
  35782. */
  35783. @@ -65,7 +59,7 @@
  35784. static bool_t authunix_refresh (AUTH *);
  35785. static void authunix_destroy (AUTH *);
  35786. -static struct auth_ops auth_unix_ops = {
  35787. +static const struct auth_ops auth_unix_ops = {
  35788. authunix_nextverf,
  35789. authunix_marshal,
  35790. authunix_validate,
  35791. @@ -111,13 +105,7 @@
  35792. if (auth == NULL || au == NULL)
  35793. {
  35794. no_memory:
  35795. -#ifdef USE_IN_LIBIO
  35796. - if (_IO_fwide (stderr, 0) > 0)
  35797. - (void) fwprintf (stderr, L"%s",
  35798. - _("authunix_create: out of memory\n"));
  35799. - else
  35800. -#endif
  35801. - (void) fputs (_("authunix_create: out of memory\n"), stderr);
  35802. + (void) fputs (_("authunix_create: out of memory\n"), stderr);
  35803. mem_free (auth, sizeof (*auth));
  35804. mem_free (au, sizeof (*au));
  35805. return NULL;
  35806. @@ -326,7 +314,7 @@
  35807. xdrmem_create (xdrs, au->au_marshed, MAX_AUTH_BYTES, XDR_ENCODE);
  35808. if ((!xdr_opaque_auth (xdrs, &(auth->ah_cred))) ||
  35809. (!xdr_opaque_auth (xdrs, &(auth->ah_verf))))
  35810. - perror (_("auth_none.c - Fatal marshalling problem"));
  35811. + perror (_("auth_unix.c - Fatal marshalling problem"));
  35812. else
  35813. au->au_mpos = XDR_GETPOS (xdrs);
  35814. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/bindresvport.c uClibc-git/libc/inet/rpc/bindresvport.c
  35815. --- uClibc-0.9.33.2/libc/inet/rpc/bindresvport.c 2012-05-15 09:20:09.000000000 +0200
  35816. +++ uClibc-git/libc/inet/rpc/bindresvport.c 2014-07-25 20:36:05.581328269 +0200
  35817. @@ -30,9 +30,6 @@
  35818. * Copyright (c) 1987 by Sun Microsystems, Inc.
  35819. */
  35820. -#define __FORCE_GLIBC
  35821. -#include <features.h>
  35822. -
  35823. #include <errno.h>
  35824. #include <unistd.h>
  35825. #include <string.h>
  35826. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/clnt_generic.c uClibc-git/libc/inet/rpc/clnt_generic.c
  35827. --- uClibc-0.9.33.2/libc/inet/rpc/clnt_generic.c 2012-05-15 09:20:09.000000000 +0200
  35828. +++ uClibc-git/libc/inet/rpc/clnt_generic.c 2014-07-25 20:36:05.581328269 +0200
  35829. @@ -30,9 +30,6 @@
  35830. * Copyright (C) 1987, Sun Microsystems, Inc.
  35831. */
  35832. -#define __FORCE_GLIBC
  35833. -#include <features.h>
  35834. -
  35835. #include <alloca.h>
  35836. #include <errno.h>
  35837. #include <string.h>
  35838. @@ -119,7 +116,7 @@
  35839. prttmpbuf = alloca (prtbuflen);
  35840. while (getprotobyname_r (proto, &protobuf, prttmpbuf, prtbuflen, &p) != 0
  35841. || p == NULL)
  35842. - if (errno != ERANGE)
  35843. + if (errno != ERANGE)
  35844. {
  35845. struct rpc_createerr *ce = &get_rpc_createerr ();
  35846. ce->cf_stat = RPC_UNKNOWNPROTO;
  35847. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/clnt_perror.c uClibc-git/libc/inet/rpc/clnt_perror.c
  35848. --- uClibc-0.9.33.2/libc/inet/rpc/clnt_perror.c 2012-05-15 09:20:09.000000000 +0200
  35849. +++ uClibc-git/libc/inet/rpc/clnt_perror.c 2014-07-25 20:36:05.581328269 +0200
  35850. @@ -38,19 +38,10 @@
  35851. *
  35852. */
  35853. -#define __FORCE_GLIBC
  35854. -#include <features.h>
  35855. -
  35856. #include <stdio.h>
  35857. #include <string.h>
  35858. #include "rpc_private.h"
  35859. -#ifdef USE_IN_LIBIO
  35860. -# include <wchar.h>
  35861. -# include <libio/iolibio.h>
  35862. -# define fputs(s, f) _IO_fputs (s, f)
  35863. -#endif
  35864. -
  35865. static char *auth_errmsg (enum auth_stat stat) internal_function;
  35866. #ifdef __UCLIBC_HAS_THREADS__
  35867. @@ -81,74 +72,74 @@
  35868. static const char rpc_errstr[] =
  35869. {
  35870. #define RPC_SUCCESS_IDX 0
  35871. - _("RPC: Success")
  35872. + N_("RPC: Success")
  35873. "\0"
  35874. #define RPC_CANTENCODEARGS_IDX (RPC_SUCCESS_IDX + sizeof "RPC: Success")
  35875. - _("RPC: Can't encode arguments")
  35876. + N_("RPC: Can't encode arguments")
  35877. "\0"
  35878. #define RPC_CANTDECODERES_IDX (RPC_CANTENCODEARGS_IDX \
  35879. + sizeof "RPC: Can't encode arguments")
  35880. - _("RPC: Can't decode result")
  35881. + N_("RPC: Can't decode result")
  35882. "\0"
  35883. #define RPC_CANTSEND_IDX (RPC_CANTDECODERES_IDX \
  35884. + sizeof "RPC: Can't decode result")
  35885. - _("RPC: Unable to send")
  35886. + N_("RPC: Unable to send")
  35887. "\0"
  35888. #define RPC_CANTRECV_IDX (RPC_CANTSEND_IDX \
  35889. + sizeof "RPC: Unable to send")
  35890. - _("RPC: Unable to receive")
  35891. + N_("RPC: Unable to receive")
  35892. "\0"
  35893. #define RPC_TIMEDOUT_IDX (RPC_CANTRECV_IDX \
  35894. + sizeof "RPC: Unable to receive")
  35895. - _("RPC: Timed out")
  35896. + N_("RPC: Timed out")
  35897. "\0"
  35898. #define RPC_VERSMISMATCH_IDX (RPC_TIMEDOUT_IDX \
  35899. + sizeof "RPC: Timed out")
  35900. - _("RPC: Incompatible versions of RPC")
  35901. + N_("RPC: Incompatible versions of RPC")
  35902. "\0"
  35903. #define RPC_AUTHERROR_IDX (RPC_VERSMISMATCH_IDX \
  35904. + sizeof "RPC: Incompatible versions of RPC")
  35905. - _("RPC: Authentication error")
  35906. + N_("RPC: Authentication error")
  35907. "\0"
  35908. #define RPC_PROGUNAVAIL_IDX (RPC_AUTHERROR_IDX \
  35909. + sizeof "RPC: Authentication error")
  35910. - _("RPC: Program unavailable")
  35911. + N_("RPC: Program unavailable")
  35912. "\0"
  35913. #define RPC_PROGVERSMISMATCH_IDX (RPC_PROGUNAVAIL_IDX \
  35914. + sizeof "RPC: Program unavailable")
  35915. - _("RPC: Program/version mismatch")
  35916. + N_("RPC: Program/version mismatch")
  35917. "\0"
  35918. #define RPC_PROCUNAVAIL_IDX (RPC_PROGVERSMISMATCH_IDX \
  35919. + sizeof "RPC: Program/version mismatch")
  35920. - _("RPC: Procedure unavailable")
  35921. + N_("RPC: Procedure unavailable")
  35922. "\0"
  35923. #define RPC_CANTDECODEARGS_IDX (RPC_PROCUNAVAIL_IDX \
  35924. + sizeof "RPC: Procedure unavailable")
  35925. - _("RPC: Server can't decode arguments")
  35926. + N_("RPC: Server can't decode arguments")
  35927. "\0"
  35928. #define RPC_SYSTEMERROR_IDX (RPC_CANTDECODEARGS_IDX \
  35929. + sizeof "RPC: Server can't decode arguments")
  35930. - _("RPC: Remote system error")
  35931. + N_("RPC: Remote system error")
  35932. "\0"
  35933. #define RPC_UNKNOWNHOST_IDX (RPC_SYSTEMERROR_IDX \
  35934. + sizeof "RPC: Remote system error")
  35935. - _("RPC: Unknown host")
  35936. + N_("RPC: Unknown host")
  35937. "\0"
  35938. #define RPC_UNKNOWNPROTO_IDX (RPC_UNKNOWNHOST_IDX \
  35939. + sizeof "RPC: Unknown host")
  35940. - _("RPC: Unknown protocol")
  35941. + N_("RPC: Unknown protocol")
  35942. "\0"
  35943. #define RPC_PMAPFAILURE_IDX (RPC_UNKNOWNPROTO_IDX \
  35944. + sizeof "RPC: Unknown protocol")
  35945. - _("RPC: Port mapper failure")
  35946. + N_("RPC: Port mapper failure")
  35947. "\0"
  35948. #define RPC_PROGNOTREGISTERED_IDX (RPC_PMAPFAILURE_IDX \
  35949. + sizeof "RPC: Port mapper failure")
  35950. - _("RPC: Program not registered")
  35951. + N_("RPC: Program not registered")
  35952. "\0"
  35953. #define RPC_FAILED_IDX (RPC_PROGNOTREGISTERED_IDX \
  35954. + sizeof "RPC: Program not registered")
  35955. - _("RPC: Failed (unspecified error)")
  35956. + N_("RPC: Failed (unspecified error)")
  35957. };
  35958. static const struct rpc_errtab rpc_errlist[] =
  35959. @@ -189,19 +180,14 @@
  35960. return (char*)_(rpc_errstr + rpc_errlist[i].message_off);
  35961. }
  35962. }
  35963. - return _("RPC: (unknown error code)");
  35964. + return N_("RPC: (unknown error code)");
  35965. }
  35966. libc_hidden_def(clnt_sperrno)
  35967. void
  35968. clnt_perrno (enum clnt_stat num)
  35969. {
  35970. -#ifdef USE_IN_LIBIO
  35971. - if (_IO_fwide (stderr, 0) > 0)
  35972. - (void) fwprintf (stderr, L"%s", clnt_sperrno (num));
  35973. - else
  35974. -#endif
  35975. - (void) fputs (clnt_sperrno (num), stderr);
  35976. + (void) fputs (clnt_sperrno (num), stderr);
  35977. }
  35978. /*
  35979. @@ -295,12 +281,7 @@
  35980. void
  35981. clnt_perror (CLIENT * rpch, const char *msg)
  35982. {
  35983. -#ifdef USE_IN_LIBIO
  35984. - if (_IO_fwide (stderr, 0) > 0)
  35985. - (void) fwprintf (stderr, L"%s", clnt_sperror (rpch, msg));
  35986. - else
  35987. -#endif
  35988. - (void) fputs (clnt_sperror (rpch, msg), stderr);
  35989. + (void) fputs (clnt_sperror (rpch, msg), stderr);
  35990. }
  35991. libc_hidden_def(clnt_perror)
  35992. @@ -352,12 +333,7 @@
  35993. void
  35994. clnt_pcreateerror (const char *msg)
  35995. {
  35996. -#ifdef USE_IN_LIBIO
  35997. - if (_IO_fwide (stderr, 0) > 0)
  35998. - (void) fwprintf (stderr, L"%s", clnt_spcreateerror (msg));
  35999. - else
  36000. -#endif
  36001. - (void) fputs (clnt_spcreateerror (msg), stderr);
  36002. + (void) fputs (clnt_spcreateerror (msg), stderr);
  36003. }
  36004. struct auth_errtab
  36005. @@ -369,34 +345,34 @@
  36006. static const char auth_errstr[] =
  36007. {
  36008. #define AUTH_OK_IDX 0
  36009. - _("Authentication OK")
  36010. + N_("Authentication OK")
  36011. "\0"
  36012. #define AUTH_BADCRED_IDX (AUTH_OK_IDX + sizeof "Authentication OK")
  36013. - _("Invalid client credential")
  36014. + N_("Invalid client credential")
  36015. "\0"
  36016. #define AUTH_REJECTEDCRED_IDX (AUTH_BADCRED_IDX \
  36017. + sizeof "Invalid client credential")
  36018. - _("Server rejected credential")
  36019. + N_("Server rejected credential")
  36020. "\0"
  36021. #define AUTH_BADVERF_IDX (AUTH_REJECTEDCRED_IDX \
  36022. + sizeof "Server rejected credential")
  36023. - _("Invalid client verifier")
  36024. + N_("Invalid client verifier")
  36025. "\0"
  36026. #define AUTH_REJECTEDVERF_IDX (AUTH_BADVERF_IDX \
  36027. + sizeof "Invalid client verifier")
  36028. - _("Server rejected verifier")
  36029. + N_("Server rejected verifier")
  36030. "\0"
  36031. #define AUTH_TOOWEAK_IDX (AUTH_REJECTEDVERF_IDX \
  36032. + sizeof "Server rejected verifier")
  36033. - _("Client credential too weak")
  36034. + N_("Client credential too weak")
  36035. "\0"
  36036. #define AUTH_INVALIDRESP_IDX (AUTH_TOOWEAK_IDX \
  36037. + sizeof "Client credential too weak")
  36038. - _("Invalid server verifier")
  36039. + N_("Invalid server verifier")
  36040. "\0"
  36041. #define AUTH_FAILED_IDX (AUTH_INVALIDRESP_IDX \
  36042. + sizeof "Invalid server verifier")
  36043. - _("Failed (unspecified error)")
  36044. + N_("Failed (unspecified error)")
  36045. };
  36046. static const struct auth_errtab auth_errlist[] =
  36047. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/clnt_raw.c uClibc-git/libc/inet/rpc/clnt_raw.c
  36048. --- uClibc-0.9.33.2/libc/inet/rpc/clnt_raw.c 2012-05-15 09:20:09.000000000 +0200
  36049. +++ uClibc-git/libc/inet/rpc/clnt_raw.c 2014-07-25 20:36:05.585328291 +0200
  36050. @@ -42,7 +42,6 @@
  36051. * any interference from the kernel.
  36052. */
  36053. -#define __FORCE_GLIBC
  36054. #include <features.h>
  36055. #include "rpc_private.h"
  36056. #include <rpc/svc.h>
  36057. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/clnt_simple.c uClibc-git/libc/inet/rpc/clnt_simple.c
  36058. --- uClibc-0.9.33.2/libc/inet/rpc/clnt_simple.c 2012-05-15 09:20:09.000000000 +0200
  36059. +++ uClibc-git/libc/inet/rpc/clnt_simple.c 2014-07-25 20:36:05.585328291 +0200
  36060. @@ -38,9 +38,6 @@
  36061. * Copyright (C) 1984, Sun Microsystems, Inc.
  36062. */
  36063. -#define __FORCE_GLIBC
  36064. -#include <features.h>
  36065. -
  36066. #include <alloca.h>
  36067. #include <errno.h>
  36068. #include <stdio.h>
  36069. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/clnt_tcp.c uClibc-git/libc/inet/rpc/clnt_tcp.c
  36070. --- uClibc-0.9.33.2/libc/inet/rpc/clnt_tcp.c 2012-05-15 09:20:09.000000000 +0200
  36071. +++ uClibc-git/libc/inet/rpc/clnt_tcp.c 2014-07-25 20:36:05.585328291 +0200
  36072. @@ -50,22 +50,14 @@
  36073. * Now go hang yourself.
  36074. */
  36075. -#define __FORCE_GLIBC
  36076. -#include <features.h>
  36077. -
  36078. #include <netdb.h>
  36079. #include <errno.h>
  36080. #include <stdio.h>
  36081. #include <unistd.h>
  36082. -#include <rpc/rpc.h>
  36083. +#include "rpc_private.h"
  36084. #include <sys/poll.h>
  36085. #include <sys/socket.h>
  36086. #include <rpc/pmap_clnt.h>
  36087. -#ifdef USE_IN_LIBIO
  36088. -# include <wchar.h>
  36089. -#endif
  36090. -
  36091. -extern u_long _create_xid (void) attribute_hidden;
  36092. #define MCALL_MSG_SIZE 24
  36093. @@ -130,13 +122,7 @@
  36094. if (h == NULL || ct == NULL)
  36095. {
  36096. struct rpc_createerr *ce = &get_rpc_createerr ();
  36097. -#ifdef USE_IN_LIBIO
  36098. - if (_IO_fwide (stderr, 0) > 0)
  36099. - (void) fwprintf (stderr, L"%s",
  36100. - _("clnttcp_create: out of memory\n"));
  36101. - else
  36102. -#endif
  36103. - (void) fputs (_("clnttcp_create: out of memory\n"), stderr);
  36104. + (void) fputs (_("clnttcp_create: out of memory\n"), stderr);
  36105. ce->cf_stat = RPC_SYSTEMERROR;
  36106. ce->cf_error.re_errno = ENOMEM;
  36107. goto fooy;
  36108. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/clnt_udp.c uClibc-git/libc/inet/rpc/clnt_udp.c
  36109. --- uClibc-0.9.33.2/libc/inet/rpc/clnt_udp.c 2012-05-15 09:20:09.000000000 +0200
  36110. +++ uClibc-git/libc/inet/rpc/clnt_udp.c 2014-07-25 20:36:05.585328291 +0200
  36111. @@ -37,12 +37,9 @@
  36112. * Copyright (C) 1984, Sun Microsystems, Inc.
  36113. */
  36114. -#define __FORCE_GLIBC
  36115. -#include <features.h>
  36116. -
  36117. #include <stdio.h>
  36118. #include <unistd.h>
  36119. -#include <rpc/rpc.h>
  36120. +#include "rpc_private.h"
  36121. #include <rpc/xdr.h>
  36122. #include <rpc/clnt.h>
  36123. #include <sys/poll.h>
  36124. @@ -52,20 +49,12 @@
  36125. #include <errno.h>
  36126. #include <rpc/pmap_clnt.h>
  36127. #include <net/if.h>
  36128. -#ifdef USE_IN_LIBIO
  36129. -# include <wchar.h>
  36130. -#endif
  36131. #ifdef IP_RECVERR
  36132. #include "errqueue.h"
  36133. #include <sys/uio.h>
  36134. #endif
  36135. -/* CMSG_NXTHDR is using it */
  36136. -
  36137. -
  36138. -extern u_long _create_xid (void) attribute_hidden;
  36139. -
  36140. /*
  36141. * UDP bases client side rpc operations
  36142. */
  36143. @@ -116,7 +105,7 @@
  36144. * NB: The rpch->cl_auth is initialized to null authentication.
  36145. * Caller may wish to set this something more useful.
  36146. *
  36147. - * wait is the amount of time used between retransmitting a call if
  36148. + * _wait is the amount of time used between retransmitting a call if
  36149. * no response has been heard; retransmission occurs until the actual
  36150. * rpc call times out.
  36151. *
  36152. @@ -125,7 +114,7 @@
  36153. */
  36154. CLIENT *
  36155. clntudp_bufcreate (struct sockaddr_in *raddr, u_long program, u_long version,
  36156. - struct timeval wait, int *sockp, u_int sendsz,
  36157. + struct timeval _wait, int *sockp, u_int sendsz,
  36158. u_int recvsz)
  36159. {
  36160. CLIENT *cl;
  36161. @@ -139,13 +128,7 @@
  36162. if (cl == NULL || cu == NULL)
  36163. {
  36164. struct rpc_createerr *ce = &get_rpc_createerr ();
  36165. -#ifdef USE_IN_LIBIO
  36166. - if (_IO_fwide (stderr, 0) > 0)
  36167. - (void) fwprintf (stderr, L"%s",
  36168. - _("clntudp_create: out of memory\n"));
  36169. - else
  36170. -#endif
  36171. - (void) fputs (_("clntudp_create: out of memory\n"), stderr);
  36172. + (void) fputs (_("clntudp_create: out of memory\n"), stderr);
  36173. ce->cf_stat = RPC_SYSTEMERROR;
  36174. ce->cf_error.re_errno = ENOMEM;
  36175. goto fooy;
  36176. @@ -166,7 +149,7 @@
  36177. cl->cl_private = (caddr_t) cu;
  36178. cu->cu_raddr = *raddr;
  36179. cu->cu_rlen = sizeof (cu->cu_raddr);
  36180. - cu->cu_wait = wait;
  36181. + cu->cu_wait = _wait;
  36182. cu->cu_total.tv_sec = -1;
  36183. cu->cu_total.tv_usec = -1;
  36184. cu->cu_sendsz = sendsz;
  36185. @@ -224,10 +207,10 @@
  36186. libc_hidden_def(clntudp_bufcreate)
  36187. CLIENT *
  36188. -clntudp_create (struct sockaddr_in *raddr, u_long program, u_long version, struct timeval wait, int *sockp)
  36189. +clntudp_create (struct sockaddr_in *raddr, u_long program, u_long version, struct timeval _wait, int *sockp)
  36190. {
  36191. - return clntudp_bufcreate (raddr, program, version, wait, sockp,
  36192. + return clntudp_bufcreate (raddr, program, version, _wait, sockp,
  36193. UDPMSGSIZE, UDPMSGSIZE);
  36194. }
  36195. libc_hidden_def(clntudp_create)
  36196. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/clnt_unix.c uClibc-git/libc/inet/rpc/clnt_unix.c
  36197. --- uClibc-0.9.33.2/libc/inet/rpc/clnt_unix.c 2012-05-15 09:20:09.000000000 +0200
  36198. +++ uClibc-git/libc/inet/rpc/clnt_unix.c 2014-07-25 20:36:05.585328291 +0200
  36199. @@ -46,24 +46,15 @@
  36200. * Now go hang yourself.
  36201. */
  36202. -#define __FORCE_GLIBC
  36203. -#include <features.h>
  36204. -
  36205. #include <netdb.h>
  36206. #include <errno.h>
  36207. #include <stdio.h>
  36208. #include <unistd.h>
  36209. -#include <rpc/rpc.h>
  36210. +#include "rpc_private.h"
  36211. #include <sys/uio.h>
  36212. #include <sys/poll.h>
  36213. #include <sys/socket.h>
  36214. #include <rpc/pmap_clnt.h>
  36215. -#ifdef USE_IN_LIBIO
  36216. -# include <wchar.h>
  36217. -#endif
  36218. -
  36219. -
  36220. -extern u_long _create_xid (void) attribute_hidden;
  36221. #define MCALL_MSG_SIZE 24
  36222. @@ -128,13 +119,7 @@
  36223. if (h == NULL || ct == NULL)
  36224. {
  36225. struct rpc_createerr *ce = &get_rpc_createerr ();
  36226. -#ifdef USE_IN_LIBIO
  36227. - if (_IO_fwide (stderr, 0) > 0)
  36228. - (void) fwprintf (stderr, L"%s",
  36229. - _("clntunix_create: out of memory\n"));
  36230. - else
  36231. -#endif
  36232. - (void) fputs (_("clntunix_create: out of memory\n"), stderr);
  36233. + (void) fputs (_("clntunix_create: out of memory\n"), stderr);
  36234. ce->cf_stat = RPC_SYSTEMERROR;
  36235. ce->cf_error.re_errno = ENOMEM;
  36236. goto fooy;
  36237. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/create_xid.c uClibc-git/libc/inet/rpc/create_xid.c
  36238. --- uClibc-0.9.33.2/libc/inet/rpc/create_xid.c 2012-05-15 09:20:09.000000000 +0200
  36239. +++ uClibc-git/libc/inet/rpc/create_xid.c 2014-07-25 20:36:05.585328291 +0200
  36240. @@ -13,17 +13,13 @@
  36241. Lesser General Public License for more details.
  36242. You should have received a copy of the GNU Lesser General Public
  36243. - License along with the GNU C Library; if not, write to the Free
  36244. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  36245. - 02111-1307 USA. */
  36246. -
  36247. -#define __FORCE_GLIBC
  36248. -#include <features.h>
  36249. + License along with the GNU C Library; if not, see
  36250. + <http://www.gnu.org/licenses/>. */
  36251. #include <unistd.h>
  36252. #include <stdlib.h>
  36253. #include <sys/time.h>
  36254. -#include <rpc/rpc.h>
  36255. +#include "rpc_private.h"
  36256. /* The RPC code is not threadsafe, but new code should be threadsafe. */
  36257. @@ -34,7 +30,6 @@
  36258. static smallint is_initialized;
  36259. static struct drand48_data __rpc_lrand48_data;
  36260. -u_long _create_xid (void) attribute_hidden;
  36261. u_long _create_xid (void)
  36262. {
  36263. long res;
  36264. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/errqueue.h uClibc-git/libc/inet/rpc/errqueue.h
  36265. --- uClibc-0.9.33.2/libc/inet/rpc/errqueue.h 2012-05-15 09:20:09.000000000 +0200
  36266. +++ uClibc-git/libc/inet/rpc/errqueue.h 2014-07-25 20:36:05.585328291 +0200
  36267. @@ -12,9 +12,8 @@
  36268. Lesser General Public License for more details.
  36269. You should have received a copy of the GNU Lesser General Public
  36270. - License along with the GNU C Library; if not, write to the Free
  36271. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  36272. - 02111-1307 USA. */
  36273. + License along with the GNU C Library; if not, see
  36274. + <http://www.gnu.org/licenses/>. */
  36275. /* Linux version. */
  36276. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/get_myaddress.c uClibc-git/libc/inet/rpc/get_myaddress.c
  36277. --- uClibc-0.9.33.2/libc/inet/rpc/get_myaddress.c 2012-05-15 09:20:09.000000000 +0200
  36278. +++ uClibc-git/libc/inet/rpc/get_myaddress.c 2014-07-25 20:36:05.585328291 +0200
  36279. @@ -44,6 +44,7 @@
  36280. #include <sys/socket.h>
  36281. #include <stdio.h>
  36282. #include <unistd.h>
  36283. +#include <libintl.h>
  36284. #include <net/if.h>
  36285. #include <sys/ioctl.h>
  36286. /* Order of following two #includes reversed by roland@gnu */
  36287. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/getrpcent.c uClibc-git/libc/inet/rpc/getrpcent.c
  36288. --- uClibc-0.9.33.2/libc/inet/rpc/getrpcent.c 2012-05-15 09:20:09.000000000 +0200
  36289. +++ uClibc-git/libc/inet/rpc/getrpcent.c 2014-07-25 20:36:05.585328291 +0200
  36290. @@ -33,8 +33,6 @@
  36291. * Copyright (c) 1985 by Sun Microsystems, Inc.
  36292. */
  36293. -#define __FORCE_GLIBC
  36294. -#include <features.h>
  36295. #include <stdio.h>
  36296. #include <string.h>
  36297. #include <sys/types.h>
  36298. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/getrpcport.c uClibc-git/libc/inet/rpc/getrpcport.c
  36299. --- uClibc-0.9.33.2/libc/inet/rpc/getrpcport.c 2012-05-15 09:20:09.000000000 +0200
  36300. +++ uClibc-git/libc/inet/rpc/getrpcport.c 2014-07-25 20:36:05.585328291 +0200
  36301. @@ -35,9 +35,6 @@
  36302. * Copyright (c) 1985 by Sun Microsystems, Inc.
  36303. */
  36304. -#define __FORCE_GLIBC
  36305. -#include <features.h>
  36306. -
  36307. #include <alloca.h>
  36308. #include <errno.h>
  36309. #include <stdio.h>
  36310. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/Makefile.in uClibc-git/libc/inet/rpc/Makefile.in
  36311. --- uClibc-0.9.33.2/libc/inet/rpc/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  36312. +++ uClibc-git/libc/inet/rpc/Makefile.in 2014-07-25 20:36:05.581328269 +0200
  36313. @@ -9,9 +9,8 @@
  36314. CFLAGS-rpc := -fno-strict-aliasing
  36315. -ifneq ($(UCLIBC_HAS_FULL_RPC),y)
  36316. # For now, only compile the stuff needed to do an NFS mount....
  36317. -CSRC:= authunix_prot.c auth_none.c auth_unix.c bindresvport.c \
  36318. +CSRC_NFS = authunix_prot.c auth_none.c auth_unix.c bindresvport.c \
  36319. clnt_perror.c clnt_simple.c clnt_tcp.c clnt_udp.c \
  36320. create_xid.c getrpcent.c \
  36321. pmap_clnt.c pm_getmaps.c pm_getport.c pmap_prot.c pmap_prot2.c \
  36322. @@ -19,27 +18,23 @@
  36323. rpc_prot.c rpc_thread.c rtime.c ruserpass.c sa_len.c \
  36324. svc.c svc_auth.c svc_authux.c \
  36325. xdr.c xdr_array.c xdr_mem.c xdr_rec.c xdr_reference.c
  36326. -endif
  36327. INET_RPC_DIR:=$(top_srcdir)libc/inet/rpc
  36328. INET_RPC_OUT:=$(top_builddir)libc/inet/rpc
  36329. -ifeq ($(UCLIBC_HAS_FULL_RPC),y)
  36330. -INET_RPC_SRC:=$(wildcard $(INET_RPC_DIR)/*.c)
  36331. -else
  36332. -INET_RPC_SRC:=$(patsubst %.c,$(INET_RPC_DIR)/%.c,$(CSRC))
  36333. -endif
  36334. -# rpc_thread.oS is better, because the header adds unneeded references to __pthread_internal_tsd*
  36335. -INET_RPC_SRC:=$(filter-out $(INET_RPC_DIR)/rpc_thread.c,$(INET_RPC_SRC))
  36336. +CSRC_ALL = $(notdir $(wildcard $(INET_RPC_DIR)/*.c))
  36337. +CSRC-y := $(if $(UCLIBC_HAS_FULL_RPC),$(CSRC_ALL),$(CSRC_NFS))
  36338. +# rpc_thread.oS is better, because the header adds unneeded references
  36339. +# to __pthread_internal_tsd*
  36340. +CSRC-y := $(filter-out rpc_thread.c,$(CSRC-y))
  36341. -INET_RPC_OBJ:=$(patsubst $(INET_RPC_DIR)/%.c,$(INET_RPC_OUT)/%.o,$(INET_RPC_SRC))
  36342. -
  36343. -libc-static-$(UCLIBC_HAS_RPC)+=$(INET_RPC_OUT)/rpc_thread.o
  36344. -libc-shared-$(UCLIBC_HAS_RPC)+=$(INET_RPC_OUT)/rpc_thread.oS
  36345. +INET_RPC_SRC:=$(patsubst %.c,$(INET_RPC_DIR)/%.c,$(CSRC-y))
  36346. +INET_RPC_OBJ:=$(patsubst %.c,$(INET_RPC_OUT)/%.o,$(CSRC-y))
  36347. +libc-static-$(UCLIBC_HAS_RPC) += $(INET_RPC_OUT)/rpc_thread.o
  36348. +libc-shared-$(UCLIBC_HAS_RPC) += $(INET_RPC_OUT)/rpc_thread.oS
  36349. libc-nomulti-$(UCLIBC_HAS_RPC) += $(INET_RPC_OUT)/rpc_thread.o
  36350. -
  36351. -libc-$(UCLIBC_HAS_RPC)+=$(INET_RPC_OBJ)
  36352. +libc-$(UCLIBC_HAS_RPC) += $(INET_RPC_OBJ)
  36353. objclean-y+=CLEAN_libc/inet/rpc
  36354. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/pmap_clnt.c uClibc-git/libc/inet/rpc/pmap_clnt.c
  36355. --- uClibc-0.9.33.2/libc/inet/rpc/pmap_clnt.c 2012-05-15 09:20:09.000000000 +0200
  36356. +++ uClibc-git/libc/inet/rpc/pmap_clnt.c 2014-07-25 20:36:05.585328291 +0200
  36357. @@ -34,9 +34,6 @@
  36358. * Client interface to pmap rpc service.
  36359. */
  36360. -#define __FORCE_GLIBC
  36361. -#include <features.h>
  36362. -
  36363. #include <stdio.h>
  36364. #include <unistd.h>
  36365. #include <net/if.h>
  36366. @@ -44,7 +41,7 @@
  36367. #include <sys/socket.h>
  36368. #include <netinet/in.h>
  36369. #include <arpa/inet.h>
  36370. -#include <rpc/rpc.h>
  36371. +#include "rpc_private.h"
  36372. #include <rpc/pmap_prot.h>
  36373. #include <rpc/pmap_clnt.h>
  36374. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/pmap_rmt.c uClibc-git/libc/inet/rpc/pmap_rmt.c
  36375. --- uClibc-0.9.33.2/libc/inet/rpc/pmap_rmt.c 2012-05-15 09:20:09.000000000 +0200
  36376. +++ uClibc-git/libc/inet/rpc/pmap_rmt.c 2014-07-25 20:36:05.585328291 +0200
  36377. @@ -39,12 +39,9 @@
  36378. * Copyright (C) 1984, Sun Microsystems, Inc.
  36379. */
  36380. -#define __FORCE_GLIBC
  36381. -#include <features.h>
  36382. -
  36383. #include <unistd.h>
  36384. #include <string.h>
  36385. -#include <rpc/rpc.h>
  36386. +#include "rpc_private.h"
  36387. #include <rpc/pmap_prot.h>
  36388. #include <rpc/pmap_clnt.h>
  36389. #include <rpc/pmap_rmt.h>
  36390. @@ -52,17 +49,12 @@
  36391. #include <sys/socket.h>
  36392. #include <stdio.h>
  36393. #include <errno.h>
  36394. -#undef _POSIX_SOURCE /* Ultrix <sys/param.h> needs --roland@gnu */
  36395. #include <sys/param.h> /* Ultrix needs before net/if --roland@gnu */
  36396. #include <net/if.h>
  36397. #include <sys/ioctl.h>
  36398. #include <arpa/inet.h>
  36399. #define MAX_BROADCAST_SIZE 1400
  36400. -
  36401. -
  36402. -extern u_long _create_xid (void) attribute_hidden;
  36403. -
  36404. static const struct timeval timeout = {3, 0};
  36405. /*
  36406. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/pm_getmaps.c uClibc-git/libc/inet/rpc/pm_getmaps.c
  36407. --- uClibc-0.9.33.2/libc/inet/rpc/pm_getmaps.c 2012-05-15 09:20:09.000000000 +0200
  36408. +++ uClibc-git/libc/inet/rpc/pm_getmaps.c 2014-07-25 20:36:05.585328291 +0200
  36409. @@ -39,7 +39,7 @@
  36410. * Copyright (C) 1984, Sun Microsystems, Inc.
  36411. */
  36412. -#include <rpc/rpc.h>
  36413. +#include "rpc_private.h"
  36414. #include <rpc/pmap_prot.h>
  36415. #include <rpc/pmap_clnt.h>
  36416. #include <netdb.h>
  36417. @@ -78,7 +78,7 @@
  36418. }
  36419. CLNT_DESTROY (client);
  36420. }
  36421. - /* (void)__close(_socket); CLNT_DESTROY already closed it */
  36422. + /* (void)close(_socket); CLNT_DESTROY already closed it */
  36423. address->sin_port = 0;
  36424. return head;
  36425. }
  36426. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/pm_getport.c uClibc-git/libc/inet/rpc/pm_getport.c
  36427. --- uClibc-0.9.33.2/libc/inet/rpc/pm_getport.c 2012-05-15 09:20:09.000000000 +0200
  36428. +++ uClibc-git/libc/inet/rpc/pm_getport.c 2014-07-25 20:36:05.585328291 +0200
  36429. @@ -65,7 +65,19 @@
  36430. struct pmap parms;
  36431. address->sin_port = htons (PMAPPORT);
  36432. - client = clntudp_bufcreate (address, PMAPPROG,
  36433. + if (protocol == IPPROTO_TCP)
  36434. + {
  36435. + // glibc does this:
  36436. + ///* Don't need a reserved port to get ports from the portmapper. */
  36437. + //socket = __get_socket(address); // does socket(TCP),bind(),connect(address)
  36438. + //if (_socket != -1)
  36439. + // closeit = true;
  36440. + // do we need/want to do the same?
  36441. + client = clnttcp_create (address, PMAPPROG,
  36442. + PMAPVERS, &_socket, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
  36443. + }
  36444. + else
  36445. + client = clntudp_bufcreate (address, PMAPPROG,
  36446. PMAPVERS, timeout, &_socket, RPCSMALLMSGSIZE, RPCSMALLMSGSIZE);
  36447. if (client != (CLIENT *) NULL)
  36448. {
  36449. @@ -87,7 +99,7 @@
  36450. }
  36451. CLNT_DESTROY (client);
  36452. }
  36453. - /* (void)__close(_socket); CLNT_DESTROY already closed it */
  36454. + /* (void)close(_socket); CLNT_DESTROY already closed it */
  36455. address->sin_port = 0;
  36456. return port;
  36457. }
  36458. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/rcmd.c uClibc-git/libc/inet/rpc/rcmd.c
  36459. --- uClibc-0.9.33.2/libc/inet/rpc/rcmd.c 2012-05-15 09:20:09.000000000 +0200
  36460. +++ uClibc-git/libc/inet/rpc/rcmd.c 2014-07-25 20:36:05.585328291 +0200
  36461. @@ -76,7 +76,6 @@
  36462. #include <pwd.h>
  36463. #include <errno.h>
  36464. #include <stdio.h>
  36465. -#include <stdio_ext.h>
  36466. #include <ctype.h>
  36467. #include <string.h>
  36468. #include <libintl.h>
  36469. @@ -87,6 +86,11 @@
  36470. #include <sys/uio.h>
  36471. #include <bits/uClibc_alloc.h>
  36472. +/* sigsetmask and sigblock are not provided anymore, until this file is corrected,
  36473. + * include the sources */
  36474. +#include "../../signal/sigblock.c"
  36475. +#include "../../signal/sigsetmask.c"
  36476. +
  36477. /* some forward declarations */
  36478. static int __ivaliduser2(FILE *hostf, u_int32_t raddr,
  36479. @@ -146,7 +150,7 @@
  36480. pfd[1].events = POLLIN;
  36481. *ahost = hp->h_name;
  36482. - oldmask = sigblock(sigmask(SIGURG)); /* __sigblock */
  36483. + oldmask = sigblock(__sigmask(SIGURG)); /* sigblock */
  36484. for (timo = 1, lport = IPPORT_RESERVED - 1;;) {
  36485. s = rresvport(&lport);
  36486. if (s < 0) {
  36487. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/rexec.c uClibc-git/libc/inet/rpc/rexec.c
  36488. --- uClibc-0.9.33.2/libc/inet/rpc/rexec.c 2012-05-15 09:20:09.000000000 +0200
  36489. +++ uClibc-git/libc/inet/rpc/rexec.c 2014-07-25 20:36:05.585328291 +0200
  36490. @@ -27,8 +27,6 @@
  36491. * SUCH DAMAGE.
  36492. */
  36493. -#define __FORCE_GLIBC
  36494. -#include <features.h>
  36495. #include <sys/types.h>
  36496. #include <sys/socket.h>
  36497. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/rpc_cmsg.c uClibc-git/libc/inet/rpc/rpc_cmsg.c
  36498. --- uClibc-0.9.33.2/libc/inet/rpc/rpc_cmsg.c 2012-05-15 09:20:09.000000000 +0200
  36499. +++ uClibc-git/libc/inet/rpc/rpc_cmsg.c 2014-07-25 20:36:05.585328291 +0200
  36500. @@ -38,9 +38,6 @@
  36501. *
  36502. */
  36503. -#define __FORCE_GLIBC
  36504. -#include <features.h>
  36505. -
  36506. #include <string.h>
  36507. #include <sys/param.h>
  36508. #include <rpc/rpc.h>
  36509. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/rpc_dtablesize.c uClibc-git/libc/inet/rpc/rpc_dtablesize.c
  36510. --- uClibc-0.9.33.2/libc/inet/rpc/rpc_dtablesize.c 2012-05-15 09:20:09.000000000 +0200
  36511. +++ uClibc-git/libc/inet/rpc/rpc_dtablesize.c 2014-07-25 20:36:05.585328291 +0200
  36512. @@ -31,10 +31,6 @@
  36513. static char sccsid[] = "@(#)rpc_dtablesize.c 1.2 87/08/11 Copyr 1987 Sun Micro";
  36514. #endif
  36515. -#define __FORCE_GLIBC
  36516. -#define __USE_BSD
  36517. -#include <features.h>
  36518. -
  36519. #include <unistd.h>
  36520. #include <rpc/clnt.h>
  36521. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/rpc_private.h uClibc-git/libc/inet/rpc/rpc_private.h
  36522. --- uClibc-0.9.33.2/libc/inet/rpc/rpc_private.h 2012-05-15 09:20:09.000000000 +0200
  36523. +++ uClibc-git/libc/inet/rpc/rpc_private.h 2014-07-25 20:36:05.585328291 +0200
  36524. @@ -1,5 +1,7 @@
  36525. -#ifndef _RPC_RPC_H
  36526. +#ifndef _RPC_PRIVATE_H
  36527. +#define _RPC_PRIVATE_H
  36528. #include <rpc/rpc.h>
  36529. +#include <libintl.h>
  36530. /* Now define the internal interfaces. */
  36531. extern u_long _create_xid (void) attribute_hidden;
  36532. @@ -12,14 +14,13 @@
  36533. */
  36534. #ifdef __UCLIBC_HAS_THREADS__
  36535. #include <pthread.h>
  36536. +#include <bits/libc-lock.h>
  36537. struct rpc_thread_variables {
  36538. fd_set svc_fdset_s; /* Global, rpc_common.c */
  36539. struct rpc_createerr rpc_createerr_s; /* Global, rpc_common.c */
  36540. struct pollfd *svc_pollfd_s; /* Global, rpc_common.c */
  36541. int svc_max_pollfd_s; /* Global, rpc_common.c */
  36542. - void *authnone_private_s; /* auth_none.c */
  36543. -
  36544. void *clnt_perr_buf_s; /* clnt_perr.c */
  36545. void *clntraw_private_s; /* clnt_raw.c */
  36546. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/rpc_prot.c uClibc-git/libc/inet/rpc/rpc_prot.c
  36547. --- uClibc-0.9.33.2/libc/inet/rpc/rpc_prot.c 2012-05-15 09:20:09.000000000 +0200
  36548. +++ uClibc-git/libc/inet/rpc/rpc_prot.c 2014-07-25 20:36:05.585328291 +0200
  36549. @@ -44,9 +44,6 @@
  36550. * routines are also in this program.
  36551. */
  36552. -#define __FORCE_GLIBC
  36553. -#include <features.h>
  36554. -
  36555. #include <sys/param.h>
  36556. #include <rpc/rpc.h>
  36557. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/rpc_thread.c uClibc-git/libc/inet/rpc/rpc_thread.c
  36558. --- uClibc-0.9.33.2/libc/inet/rpc/rpc_thread.c 2012-05-15 09:20:09.000000000 +0200
  36559. +++ uClibc-git/libc/inet/rpc/rpc_thread.c 2014-07-25 20:36:05.585328291 +0200
  36560. @@ -4,8 +4,6 @@
  36561. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  36562. */
  36563. -#define __FORCE_GLIBC
  36564. -#include <features.h>
  36565. #include <stdio.h>
  36566. #include <assert.h>
  36567. #include "rpc_private.h"
  36568. @@ -32,7 +30,6 @@
  36569. __rpc_thread_svc_cleanup ();
  36570. __rpc_thread_clnt_cleanup ();
  36571. /*__rpc_thread_key_cleanup (); */
  36572. - free (tvp->authnone_private_s);
  36573. free (tvp->clnt_perr_buf_s);
  36574. free (tvp->clntraw_private_s);
  36575. free (tvp->svcraw_private_s);
  36576. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/rtime.c uClibc-git/libc/inet/rpc/rtime.c
  36577. --- uClibc-0.9.33.2/libc/inet/rpc/rtime.c 2012-05-15 09:20:09.000000000 +0200
  36578. +++ uClibc-git/libc/inet/rpc/rtime.c 2014-07-25 20:36:05.585328291 +0200
  36579. @@ -43,9 +43,6 @@
  36580. * what unix uses.
  36581. */
  36582. -#define __FORCE_GLIBC
  36583. -#include <features.h>
  36584. -
  36585. #include <stdio.h>
  36586. #include <unistd.h>
  36587. #include <rpc/rpc.h>
  36588. @@ -150,4 +147,3 @@
  36589. timep->tv_usec = 0;
  36590. return 0;
  36591. }
  36592. -libc_hidden_def (rtime)
  36593. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/ruserpass.c uClibc-git/libc/inet/rpc/ruserpass.c
  36594. --- uClibc-0.9.33.2/libc/inet/rpc/ruserpass.c 2012-05-15 09:20:09.000000000 +0200
  36595. +++ uClibc-git/libc/inet/rpc/ruserpass.c 2014-07-25 20:36:05.585328291 +0200
  36596. @@ -27,8 +27,6 @@
  36597. * SUCH DAMAGE.
  36598. */
  36599. -#define __FORCE_GLIBC
  36600. -#include <features.h>
  36601. #include <sys/types.h>
  36602. #include <sys/stat.h>
  36603. @@ -37,13 +35,14 @@
  36604. #include <errno.h>
  36605. #include <netdb.h>
  36606. #include <stdio.h>
  36607. -#include <stdio_ext.h>
  36608. +#ifdef __UCLIBC_HAS_THREADS__
  36609. +# include <stdio_ext.h>
  36610. +#endif
  36611. #include <stdlib.h>
  36612. #include <string.h>
  36613. #include <unistd.h>
  36614. +#include <libintl.h>
  36615. -
  36616. -#define _(X) (X)
  36617. /* #include "ftp_var.h" */
  36618. static int token (void);
  36619. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/sa_len.c uClibc-git/libc/inet/rpc/sa_len.c
  36620. --- uClibc-0.9.33.2/libc/inet/rpc/sa_len.c 2012-05-15 09:20:09.000000000 +0200
  36621. +++ uClibc-git/libc/inet/rpc/sa_len.c 2014-07-25 20:36:05.585328291 +0200
  36622. @@ -12,17 +12,14 @@
  36623. Lesser General Public License for more details.
  36624. You should have received a copy of the GNU Lesser General Public
  36625. - License along with the GNU C Library; if not, write to the Free
  36626. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  36627. - 02111-1307 USA. */
  36628. + License along with the GNU C Library; if not, see
  36629. + <http://www.gnu.org/licenses/>. */
  36630. -#define __FORCE_GLIBC
  36631. -#include <features.h>
  36632. #include <sys/socket.h>
  36633. #include <netinet/in.h>
  36634. -#include <netipx/ipx.h>
  36635. #include <sys/un.h>
  36636. #if 0
  36637. +#include <netipx/ipx.h>
  36638. #include <netash/ash.h>
  36639. #include <netatalk/at.h>
  36640. #include <netax25/ax25.h>
  36641. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/svc_auth.c uClibc-git/libc/inet/rpc/svc_auth.c
  36642. --- uClibc-0.9.33.2/libc/inet/rpc/svc_auth.c 2012-05-15 09:20:09.000000000 +0200
  36643. +++ uClibc-git/libc/inet/rpc/svc_auth.c 2014-07-25 20:36:05.585328291 +0200
  36644. @@ -58,9 +58,9 @@
  36645. static enum auth_stat _svcauth_null (struct svc_req *, struct rpc_msg *);
  36646. /* no authentication */
  36647. -extern enum auth_stat _svcauth_unix (struct svc_req *, struct rpc_msg *);
  36648. +extern enum auth_stat _svcauth_unix (struct svc_req *, struct rpc_msg *) attribute_hidden;
  36649. /* unix style (uid, gids) */
  36650. -extern enum auth_stat _svcauth_short (struct svc_req *, struct rpc_msg *);
  36651. +extern enum auth_stat _svcauth_short (struct svc_req *, struct rpc_msg *) attribute_hidden;
  36652. /* short hand unix style */
  36653. #ifdef CONFIG_AUTH_DES
  36654. extern enum auth_stat _svcauth_des (struct svc_req *, struct rpc_msg *);
  36655. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/svc_authux.c uClibc-git/libc/inet/rpc/svc_authux.c
  36656. --- uClibc-0.9.33.2/libc/inet/rpc/svc_authux.c 2012-05-15 09:20:09.000000000 +0200
  36657. +++ uClibc-git/libc/inet/rpc/svc_authux.c 2014-07-25 20:36:05.585328291 +0200
  36658. @@ -38,9 +38,6 @@
  36659. * Copyright (C) 1984, Sun Microsystems, Inc.
  36660. */
  36661. -#define __FORCE_GLIBC
  36662. -#include <features.h>
  36663. -
  36664. #include <stdio.h>
  36665. #include <string.h>
  36666. #include <rpc/rpc.h>
  36667. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/svc.c uClibc-git/libc/inet/rpc/svc.c
  36668. --- uClibc-0.9.33.2/libc/inet/rpc/svc.c 2012-05-15 09:20:09.000000000 +0200
  36669. +++ uClibc-git/libc/inet/rpc/svc.c 2014-07-25 20:36:05.585328291 +0200
  36670. @@ -36,9 +36,6 @@
  36671. * Copyright (C) 1984, Sun Microsystems, Inc.
  36672. */
  36673. -#define __FORCE_GLIBC
  36674. -#include <features.h>
  36675. -
  36676. #include <errno.h>
  36677. #include <unistd.h>
  36678. #include <string.h>
  36679. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/svc_raw.c uClibc-git/libc/inet/rpc/svc_raw.c
  36680. --- uClibc-0.9.33.2/libc/inet/rpc/svc_raw.c 2012-05-15 09:20:09.000000000 +0200
  36681. +++ uClibc-git/libc/inet/rpc/svc_raw.c 2014-07-25 20:36:05.585328291 +0200
  36682. @@ -40,8 +40,6 @@
  36683. * Copyright (C) 1984, Sun Microsystems, Inc.
  36684. */
  36685. -#define __FORCE_GLIBC
  36686. -#include <features.h>
  36687. #include "rpc_private.h"
  36688. #include <rpc/svc.h>
  36689. @@ -69,7 +67,7 @@
  36690. static bool_t svcraw_freeargs (SVCXPRT *, xdrproc_t, caddr_t);
  36691. static void svcraw_destroy (SVCXPRT *);
  36692. -static struct xp_ops server_ops =
  36693. +static const struct xp_ops server_ops =
  36694. {
  36695. svcraw_recv,
  36696. svcraw_stat,
  36697. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/svc_run.c uClibc-git/libc/inet/rpc/svc_run.c
  36698. --- uClibc-0.9.33.2/libc/inet/rpc/svc_run.c 2012-05-15 09:20:09.000000000 +0200
  36699. +++ uClibc-git/libc/inet/rpc/svc_run.c 2014-07-25 20:36:05.585328291 +0200
  36700. @@ -31,13 +31,10 @@
  36701. * Wait for input, call server program.
  36702. */
  36703. -#define __FORCE_GLIBC
  36704. -#include <features.h>
  36705. -
  36706. #include <errno.h>
  36707. #include <unistd.h>
  36708. #include <sys/poll.h>
  36709. -#include <rpc/rpc.h>
  36710. +#include "rpc_private.h"
  36711. /* used by svc_[max_]pollfd */
  36712. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/svc_simple.c uClibc-git/libc/inet/rpc/svc_simple.c
  36713. --- uClibc-0.9.33.2/libc/inet/rpc/svc_simple.c 2012-05-15 09:20:09.000000000 +0200
  36714. +++ uClibc-git/libc/inet/rpc/svc_simple.c 2014-07-25 20:36:05.585328291 +0200
  36715. @@ -38,9 +38,6 @@
  36716. * Copyright (C) 1984, Sun Microsystems, Inc.
  36717. */
  36718. -#define __FORCE_GLIBC
  36719. -#include <features.h>
  36720. -
  36721. #include <stdio.h>
  36722. #include <string.h>
  36723. #include <unistd.h>
  36724. @@ -49,13 +46,6 @@
  36725. #include <sys/socket.h>
  36726. #include <netdb.h>
  36727. -#ifdef USE_IN_LIBIO
  36728. -# include <wchar.h>
  36729. -# include <libio/iolibio.h>
  36730. -# define fputs(s, f) _IO_fputs (s, f)
  36731. -#endif
  36732. -
  36733. -
  36734. struct proglst_
  36735. {
  36736. char *(*p_progname) (char *);
  36737. @@ -127,12 +117,7 @@
  36738. return 0;
  36739. err_out:
  36740. -#ifdef USE_IN_LIBIO
  36741. - if (_IO_fwide (stderr, 0) > 0)
  36742. - (void) __fwprintf (stderr, L"%s", buf);
  36743. - else
  36744. -#endif
  36745. - (void) fputs (buf, stderr);
  36746. + (void) fputs (buf, stderr);
  36747. free (buf);
  36748. return -1;
  36749. }
  36750. @@ -186,12 +171,7 @@
  36751. return;
  36752. }
  36753. (void) asprintf (&buf, _("never registered prog %d\n"), prog);
  36754. -#ifdef USE_IN_LIBIO
  36755. - if (_IO_fwide (stderr, 0) > 0)
  36756. - __fwprintf (stderr, L"%s", buf);
  36757. - else
  36758. -#endif
  36759. - fputs (buf, stderr);
  36760. + fputs (buf, stderr);
  36761. free (buf);
  36762. exit (1);
  36763. }
  36764. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/svc_tcp.c uClibc-git/libc/inet/rpc/svc_tcp.c
  36765. --- uClibc-0.9.33.2/libc/inet/rpc/svc_tcp.c 2012-05-15 09:20:09.000000000 +0200
  36766. +++ uClibc-git/libc/inet/rpc/svc_tcp.c 2014-07-25 20:36:05.585328291 +0200
  36767. @@ -41,25 +41,15 @@
  36768. * and a record/tcp stream.
  36769. */
  36770. -#define __FORCE_GLIBC
  36771. -#include <features.h>
  36772. -
  36773. #include <stdio.h>
  36774. #include <unistd.h>
  36775. #include <string.h>
  36776. -#include <rpc/rpc.h>
  36777. +#include "rpc_private.h"
  36778. #include <sys/socket.h>
  36779. #include <sys/poll.h>
  36780. #include <errno.h>
  36781. #include <stdlib.h>
  36782. -#ifdef USE_IN_LIBIO
  36783. -# include <wchar.h>
  36784. -# include <libio/iolibio.h>
  36785. -# define fputs(s, f) _IO_fputs (s, f)
  36786. -#endif
  36787. -
  36788. -
  36789. /*
  36790. * Ops vector for TCP/IP based rpc service handle
  36791. */
  36792. @@ -180,12 +170,7 @@
  36793. xprt = (SVCXPRT *) mem_alloc (sizeof (SVCXPRT));
  36794. if (r == NULL || xprt == NULL)
  36795. {
  36796. -#ifdef USE_IN_LIBIO
  36797. - if (_IO_fwide (stderr, 0) > 0)
  36798. - (void) __fwprintf (stderr, L"%s", _("svctcp_create: out of memory\n"));
  36799. - else
  36800. -#endif
  36801. - (void) fputs (_("svctcp_create: out of memory\n"), stderr);
  36802. + (void) fputs (_("svctcp_create: out of memory\n"), stderr);
  36803. mem_free (r, sizeof (*r));
  36804. mem_free (xprt, sizeof (SVCXPRT));
  36805. return NULL;
  36806. @@ -225,13 +210,7 @@
  36807. cd = (struct tcp_conn *) mem_alloc (sizeof (struct tcp_conn));
  36808. if (xprt == (SVCXPRT *) NULL || cd == NULL)
  36809. {
  36810. -#ifdef USE_IN_LIBIO
  36811. - if (_IO_fwide (stderr, 0) > 0)
  36812. - (void) __fwprintf (stderr, L"%s",
  36813. - _("svc_tcp: makefd_xprt: out of memory\n"));
  36814. - else
  36815. -#endif
  36816. - (void) fputs (_("svc_tcp: makefd_xprt: out of memory\n"), stderr);
  36817. + (void) fputs (_("svc_tcp: makefd_xprt: out of memory\n"), stderr);
  36818. mem_free (xprt, sizeof (SVCXPRT));
  36819. mem_free (cd, sizeof (struct tcp_conn));
  36820. return NULL;
  36821. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/svc_udp.c uClibc-git/libc/inet/rpc/svc_udp.c
  36822. --- uClibc-0.9.33.2/libc/inet/rpc/svc_udp.c 2012-05-15 09:20:09.000000000 +0200
  36823. +++ uClibc-git/libc/inet/rpc/svc_udp.c 2014-07-25 20:36:05.589328311 +0200
  36824. @@ -39,13 +39,10 @@
  36825. * Copyright (C) 1984, Sun Microsystems, Inc.
  36826. */
  36827. -#define __FORCE_GLIBC
  36828. -#include <features.h>
  36829. -
  36830. #include <stdio.h>
  36831. #include <unistd.h>
  36832. #include <string.h>
  36833. -#include <rpc/rpc.h>
  36834. +#include "rpc_private.h"
  36835. #include <sys/socket.h>
  36836. #include <errno.h>
  36837. @@ -53,13 +50,6 @@
  36838. #include <sys/uio.h>
  36839. #endif
  36840. -#ifdef USE_IN_LIBIO
  36841. -# include <wchar.h>
  36842. -# include <libio/iolibio.h>
  36843. -# define fputs(s, f) _IO_fputs (s, f)
  36844. -#endif
  36845. -
  36846. -
  36847. #define rpc_buffer(xprt) ((xprt)->xp_p1)
  36848. #ifndef MAX
  36849. #define MAX(a, b) ((a > b) ? a : b)
  36850. @@ -151,12 +141,7 @@
  36851. buf = mem_alloc (((MAX (sendsz, recvsz) + 3) / 4) * 4);
  36852. if (xprt == NULL || su == NULL || buf == NULL)
  36853. {
  36854. -#ifdef USE_IN_LIBIO
  36855. - if (_IO_fwide (stderr, 0) > 0)
  36856. - (void) fwprintf (stderr, L"%s", _("svcudp_create: out of memory\n"));
  36857. - else
  36858. -#endif
  36859. - (void) fputs (_("svcudp_create: out of memory\n"), stderr);
  36860. + (void) fputs (_("svcudp_create: out of memory\n"), stderr);
  36861. mem_free (xprt, sizeof (SVCXPRT));
  36862. mem_free (su, sizeof (*su));
  36863. mem_free (buf, ((MAX (sendsz, recvsz) + 3) / 4) * 4);
  36864. @@ -177,13 +162,7 @@
  36865. + sizeof(struct cmsghdr) + sizeof (struct in_pktinfo))
  36866. > sizeof (xprt->xp_pad))
  36867. {
  36868. -# ifdef USE_IN_LIBIO
  36869. - if (_IO_fwide (stderr, 0) > 0)
  36870. - (void) fwprintf (stderr, L"%s",
  36871. - _("svcudp_create: xp_pad is too small for IP_PKTINFO\n"));
  36872. - else
  36873. -# endif
  36874. - (void) fputs (_("svcudp_create: xp_pad is too small for IP_PKTINFO\n"),
  36875. + (void) fputs (_("svcudp_create: xp_pad is too small for IP_PKTINFO\n"),
  36876. stderr);
  36877. return NULL;
  36878. }
  36879. @@ -378,16 +357,8 @@
  36880. #define SPARSENESS 4 /* 75% sparse */
  36881. -#ifdef USE_IN_LIBIO
  36882. -# define CACHE_PERROR(msg) \
  36883. - if (_IO_fwide (stderr, 0) > 0) \
  36884. - (void) __fwprintf(stderr, L"%s\n", msg); \
  36885. - else \
  36886. - (void) fprintf(stderr, "%s\n", msg)
  36887. -#else
  36888. -# define CACHE_PERROR(msg) \
  36889. +#define CACHE_PERROR(msg) \
  36890. (void) fprintf(stderr,"%s\n", msg)
  36891. -#endif
  36892. #define ALLOC(type, size) \
  36893. (type *) mem_alloc((unsigned) (sizeof(type) * (size)))
  36894. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/svc_unix.c uClibc-git/libc/inet/rpc/svc_unix.c
  36895. --- uClibc-0.9.33.2/libc/inet/rpc/svc_unix.c 2012-05-15 09:20:09.000000000 +0200
  36896. +++ uClibc-git/libc/inet/rpc/svc_unix.c 2014-07-25 20:36:05.589328311 +0200
  36897. @@ -37,13 +37,10 @@
  36898. * and a record/unix stream.
  36899. */
  36900. -#define __FORCE_GLIBC
  36901. -#include <features.h>
  36902. -
  36903. #include <stdio.h>
  36904. #include <unistd.h>
  36905. #include <string.h>
  36906. -#include <rpc/rpc.h>
  36907. +#include "rpc_private.h"
  36908. #include <rpc/svc.h>
  36909. #include <sys/socket.h>
  36910. #include <sys/uio.h>
  36911. @@ -51,11 +48,6 @@
  36912. #include <errno.h>
  36913. #include <stdlib.h>
  36914. -#ifdef USE_IN_LIBIO
  36915. -# include <wchar.h>
  36916. -#endif
  36917. -
  36918. -
  36919. /*
  36920. * Ops vector for AF_UNIX based rpc service handle
  36921. */
  36922. @@ -176,12 +168,7 @@
  36923. xprt = (SVCXPRT *) mem_alloc (sizeof (SVCXPRT));
  36924. if (r == NULL || xprt == NULL)
  36925. {
  36926. -#ifdef USE_IN_LIBIO
  36927. - if (_IO_fwide (stderr, 0) > 0)
  36928. - __fwprintf (stderr, L"%s", _("svcunix_create: out of memory\n"));
  36929. - else
  36930. -#endif
  36931. - fputs (_("svcunix_create: out of memory\n"), stderr);
  36932. + fputs (_("svcunix_create: out of memory\n"), stderr);
  36933. mem_free (r, sizeof (*r));
  36934. mem_free (xprt, sizeof (SVCXPRT));
  36935. return NULL;
  36936. @@ -221,13 +208,7 @@
  36937. cd = (struct unix_conn *) mem_alloc (sizeof (struct unix_conn));
  36938. if (xprt == (SVCXPRT *) NULL || cd == (struct unix_conn *) NULL)
  36939. {
  36940. -#ifdef USE_IN_LIBIO
  36941. - if (_IO_fwide (stderr, 0) > 0)
  36942. - (void) __fwprintf (stderr, L"%s",
  36943. - _("svc_unix: makefd_xprt: out of memory\n"));
  36944. - else
  36945. -#endif
  36946. - (void) fputs (_("svc_unix: makefd_xprt: out of memory\n"), stderr);
  36947. + (void) fputs (_("svc_unix: makefd_xprt: out of memory\n"), stderr);
  36948. mem_free (xprt, sizeof (SVCXPRT));
  36949. mem_free (cd, sizeof (struct unix_conn));
  36950. return NULL;
  36951. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/xdr_array.c uClibc-git/libc/inet/rpc/xdr_array.c
  36952. --- uClibc-0.9.33.2/libc/inet/rpc/xdr_array.c 2012-05-15 09:20:09.000000000 +0200
  36953. +++ uClibc-git/libc/inet/rpc/xdr_array.c 2014-07-25 20:36:05.589328311 +0200
  36954. @@ -40,23 +40,15 @@
  36955. * arrays. See xdr.h for more info on the interface to xdr.
  36956. */
  36957. -#define __FORCE_GLIBC
  36958. -#include <features.h>
  36959. -
  36960. #include <stdio.h>
  36961. #include <string.h>
  36962. #include <rpc/types.h>
  36963. #include <rpc/xdr.h>
  36964. #include <limits.h>
  36965. -
  36966. -#ifdef USE_IN_LIBIO
  36967. -# include <wchar.h>
  36968. -#endif
  36969. -
  36970. +#include <libintl.h>
  36971. #define LASTUNSIGNED ((u_int)0-1)
  36972. -
  36973. /*
  36974. * XDR an array of arbitrary elements
  36975. * *addrp is a pointer to the array, *sizep is the number of elements.
  36976. @@ -102,13 +94,7 @@
  36977. *addrp = target = mem_alloc (nodesize);
  36978. if (target == NULL)
  36979. {
  36980. -#ifdef USE_IN_LIBIO
  36981. - if (_IO_fwide (stderr, 0) > 0)
  36982. - (void) fwprintf (stderr, L"%s",
  36983. - _("xdr_array: out of memory\n"));
  36984. - else
  36985. -#endif
  36986. - (void) fputs (_("xdr_array: out of memory\n"), stderr);
  36987. + (void) fputs (_("xdr_array: out of memory\n"), stderr);
  36988. return FALSE;
  36989. }
  36990. memset (target, 0, nodesize);
  36991. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/xdr.c uClibc-git/libc/inet/rpc/xdr.c
  36992. --- uClibc-0.9.33.2/libc/inet/rpc/xdr.c 2012-05-15 09:20:09.000000000 +0200
  36993. +++ uClibc-git/libc/inet/rpc/xdr.c 2014-07-25 20:36:05.589328311 +0200
  36994. @@ -41,21 +41,14 @@
  36995. * xdr.
  36996. */
  36997. -#define __FORCE_GLIBC
  36998. -#include <features.h>
  36999. -
  37000. #include <stdio.h>
  37001. #include <limits.h>
  37002. #include <string.h>
  37003. +#include <libintl.h>
  37004. #include <rpc/types.h>
  37005. #include <rpc/xdr.h>
  37006. -#ifdef USE_IN_LIBIO
  37007. -# include <wchar.h>
  37008. -#endif
  37009. -
  37010. -
  37011. /*
  37012. * constants specific to the xdr "protocol"
  37013. */
  37014. @@ -564,12 +557,7 @@
  37015. }
  37016. if (sp == NULL)
  37017. {
  37018. -#ifdef USE_IN_LIBIO
  37019. - if (_IO_fwide (stderr, 0) > 0)
  37020. - (void) fwprintf (stderr, L"%s", _("xdr_bytes: out of memory\n"));
  37021. - else
  37022. -#endif
  37023. - (void) fputs (_("xdr_bytes: out of memory\n"), stderr);
  37024. + (void) fputs (_("xdr_bytes: out of memory\n"), stderr);
  37025. return FALSE;
  37026. }
  37027. /* fall into ... */
  37028. @@ -706,13 +694,7 @@
  37029. *cpp = sp = (char *) mem_alloc (nodesize);
  37030. if (sp == NULL)
  37031. {
  37032. -#ifdef USE_IN_LIBIO
  37033. - if (_IO_fwide (stderr, 0) > 0)
  37034. - (void) fwprintf (stderr, L"%s",
  37035. - _("xdr_string: out of memory\n"));
  37036. - else
  37037. -#endif
  37038. - (void) fputs (_("xdr_string: out of memory\n"), stderr);
  37039. + (void) fputs (_("xdr_string: out of memory\n"), stderr);
  37040. return FALSE;
  37041. }
  37042. sp[size] = 0;
  37043. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/xdr_float.c uClibc-git/libc/inet/rpc/xdr_float.c
  37044. --- uClibc-0.9.33.2/libc/inet/rpc/xdr_float.c 2012-05-15 09:20:09.000000000 +0200
  37045. +++ uClibc-git/libc/inet/rpc/xdr_float.c 2014-07-25 20:36:05.589328311 +0200
  37046. @@ -41,9 +41,6 @@
  37047. * xdr.
  37048. */
  37049. -#define __FORCE_GLIBC
  37050. -#include <features.h>
  37051. -
  37052. #include <stdio.h>
  37053. #include <endian.h>
  37054. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/xdr_intXX_t.c uClibc-git/libc/inet/rpc/xdr_intXX_t.c
  37055. --- uClibc-0.9.33.2/libc/inet/rpc/xdr_intXX_t.c 2012-05-15 09:20:09.000000000 +0200
  37056. +++ uClibc-git/libc/inet/rpc/xdr_intXX_t.c 2014-07-25 20:36:05.589328311 +0200
  37057. @@ -13,9 +13,8 @@
  37058. Lesser General Public License for more details.
  37059. You should have received a copy of the GNU Lesser General Public
  37060. - License along with the GNU C Library; if not, write to the Free
  37061. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  37062. - 02111-1307 USA. */
  37063. + License along with the GNU C Library; if not, see
  37064. + <http://www.gnu.org/licenses/>. */
  37065. #include <rpc/types.h>
  37066. #include <rpc/xdr.h>
  37067. @@ -47,6 +46,7 @@
  37068. return FALSE;
  37069. }
  37070. }
  37071. +strong_alias_untyped(xdr_int64_t,xdr_quad_t)
  37072. /* XDR 64bit unsigned integers */
  37073. bool_t
  37074. @@ -75,6 +75,7 @@
  37075. return FALSE;
  37076. }
  37077. }
  37078. +strong_alias_untyped(xdr_uint64_t,xdr_u_quad_t)
  37079. /* XDR 32bit integers */
  37080. bool_t
  37081. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/xdr_mem.c uClibc-git/libc/inet/rpc/xdr_mem.c
  37082. --- uClibc-0.9.33.2/libc/inet/rpc/xdr_mem.c 2012-05-15 09:20:09.000000000 +0200
  37083. +++ uClibc-git/libc/inet/rpc/xdr_mem.c 2014-07-25 20:36:05.589328311 +0200
  37084. @@ -77,9 +77,7 @@
  37085. xdrmem_create (XDR *xdrs, const caddr_t addr, u_int size, enum xdr_op op)
  37086. {
  37087. xdrs->x_op = op;
  37088. - /* We have to add the const since the `struct xdr_ops' in `struct XDR'
  37089. - is not `const'. */
  37090. - xdrs->x_ops = (struct xdr_ops *) &xdrmem_ops;
  37091. + xdrs->x_ops = &xdrmem_ops;
  37092. xdrs->x_private = xdrs->x_base = addr;
  37093. xdrs->x_handy = size;
  37094. }
  37095. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/xdr_rec.c uClibc-git/libc/inet/rpc/xdr_rec.c
  37096. --- uClibc-0.9.33.2/libc/inet/rpc/xdr_rec.c 2012-05-15 09:20:09.000000000 +0200
  37097. +++ uClibc-git/libc/inet/rpc/xdr_rec.c 2014-07-25 20:36:05.589328311 +0200
  37098. @@ -44,21 +44,10 @@
  37099. * The other 31 bits encode the byte length of the fragment.
  37100. */
  37101. -#define __FORCE_GLIBC
  37102. -#include <features.h>
  37103. -
  37104. -
  37105. #include <stdio.h>
  37106. #include <string.h>
  37107. #include <unistd.h>
  37108. -#include <rpc/rpc.h>
  37109. -
  37110. -#ifdef USE_IN_LIBIO
  37111. -# include <wchar.h>
  37112. -# include <libio/iolibio.h>
  37113. -# define fputs(s, f) _IO_fputs (s, f)
  37114. -#endif
  37115. -
  37116. +#include "rpc_private.h"
  37117. static bool_t xdrrec_getbytes (XDR *, caddr_t, u_int);
  37118. static bool_t xdrrec_putbytes (XDR *, const char *, u_int);
  37119. @@ -165,12 +154,7 @@
  37120. if (rstrm == NULL || buf == NULL)
  37121. {
  37122. -#ifdef USE_IN_LIBIO
  37123. - if (_IO_fwide (stderr, 0) > 0)
  37124. - (void) fwprintf (stderr, L"%s", _("xdrrec_create: out of memory\n"));
  37125. - else
  37126. -#endif
  37127. - (void) fputs (_("xdrrec_create: out of memory\n"), stderr);
  37128. + (void) fputs (_("xdrrec_create: out of memory\n"), stderr);
  37129. mem_free (rstrm, sizeof (RECSTREAM));
  37130. mem_free (buf, sendsize + recvsize + BYTES_PER_XDR_UNIT);
  37131. /*
  37132. @@ -193,9 +177,7 @@
  37133. /*
  37134. * now the rest ...
  37135. */
  37136. - /* We have to add the const since the `struct xdr_ops' in `struct XDR'
  37137. - is not `const'. */
  37138. - xdrs->x_ops = (struct xdr_ops *) &xdrrec_ops;
  37139. + xdrs->x_ops = &xdrrec_ops;
  37140. xdrs->x_private = (caddr_t) rstrm;
  37141. rstrm->tcp_handle = tcp_handle;
  37142. rstrm->readit = readit;
  37143. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/xdr_reference.c uClibc-git/libc/inet/rpc/xdr_reference.c
  37144. --- uClibc-0.9.33.2/libc/inet/rpc/xdr_reference.c 2012-05-15 09:20:09.000000000 +0200
  37145. +++ uClibc-git/libc/inet/rpc/xdr_reference.c 2014-07-25 20:36:05.589328311 +0200
  37146. @@ -40,20 +40,11 @@
  37147. * "pointers". See xdr.h for more info on the interface to xdr.
  37148. */
  37149. -#define __FORCE_GLIBC
  37150. -#include <features.h>
  37151. -
  37152. #include <stdio.h>
  37153. #include <string.h>
  37154. #include <rpc/types.h>
  37155. #include <rpc/xdr.h>
  37156. -
  37157. -#ifdef USE_IN_LIBIO
  37158. -# include <wchar.h>
  37159. -# include <libio/iolibio.h>
  37160. -# define fputs(s, f) _IO_fputs (s, f)
  37161. -#endif
  37162. -
  37163. +#include <libintl.h>
  37164. #define LASTUNSIGNED ((u_int)0-1)
  37165. @@ -82,13 +73,7 @@
  37166. *pp = loc = (caddr_t) mem_alloc (size);
  37167. if (loc == NULL)
  37168. {
  37169. -#ifdef USE_IN_LIBIO
  37170. - if (_IO_fwide (stderr, 0) > 0)
  37171. - (void) fwprintf (stderr, L"%s",
  37172. - _("xdr_reference: out of memory\n"));
  37173. - else
  37174. -#endif
  37175. - (void) fputs (_("xdr_reference: out of memory\n"), stderr);
  37176. + (void) fputs (_("xdr_reference: out of memory\n"), stderr);
  37177. return FALSE;
  37178. }
  37179. memset (loc, 0, (int) size);
  37180. diff -Nur uClibc-0.9.33.2/libc/inet/rpc/xdr_stdio.c uClibc-git/libc/inet/rpc/xdr_stdio.c
  37181. --- uClibc-0.9.33.2/libc/inet/rpc/xdr_stdio.c 2012-05-15 09:20:09.000000000 +0200
  37182. +++ uClibc-git/libc/inet/rpc/xdr_stdio.c 2014-07-25 20:36:05.589328311 +0200
  37183. @@ -41,15 +41,6 @@
  37184. #include <stdio.h>
  37185. #include <rpc/xdr.h>
  37186. -#ifdef USE_IN_LIBIO
  37187. -# include <libio/iolibio.h>
  37188. -# define fflush(s) _IO_fflush (s)
  37189. -# define fread(p, m, n, s) _IO_fread (p, m, n, s)
  37190. -# define ftell(s) _IO_ftell (s)
  37191. -# define fwrite(p, m, n, s) _IO_fwrite (p, m, n, s)
  37192. -#endif
  37193. -
  37194. -
  37195. static bool_t xdrstdio_getlong (XDR *, long *);
  37196. static bool_t xdrstdio_putlong (XDR *, const long *);
  37197. static bool_t xdrstdio_getbytes (XDR *, caddr_t, u_int);
  37198. @@ -87,9 +78,7 @@
  37199. xdrstdio_create (XDR *xdrs, FILE *file, enum xdr_op op)
  37200. {
  37201. xdrs->x_op = op;
  37202. - /* We have to add the const since the `struct xdr_ops' in `struct XDR'
  37203. - is not `const'. */
  37204. - xdrs->x_ops = (struct xdr_ops *) &xdrstdio_ops;
  37205. + xdrs->x_ops = &xdrstdio_ops;
  37206. xdrs->x_private = (caddr_t) file;
  37207. xdrs->x_handy = 0;
  37208. xdrs->x_base = 0;
  37209. diff -Nur uClibc-0.9.33.2/libc/inet/socketcalls.c uClibc-git/libc/inet/socketcalls.c
  37210. --- uClibc-0.9.33.2/libc/inet/socketcalls.c 2012-05-15 09:20:09.000000000 +0200
  37211. +++ uClibc-git/libc/inet/socketcalls.c 2014-07-25 20:36:05.589328311 +0200
  37212. @@ -4,15 +4,12 @@
  37213. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  37214. */
  37215. -#define __FORCE_GLIBC
  37216. -#include <features.h>
  37217. -#include <errno.h>
  37218. -#include <syscall.h>
  37219. +#include <stddef.h>
  37220. +#include <sys/syscall.h>
  37221. #include <sys/socket.h>
  37222. +#include <cancel.h>
  37223. #ifdef __NR_socketcall
  37224. -extern int __socketcall(int call, unsigned long *args) attribute_hidden;
  37225. -
  37226. /* Various socketcall numbers */
  37227. #define SYS_SOCKET 1
  37228. #define SYS_BIND 2
  37229. @@ -34,53 +31,24 @@
  37230. #define SYS_ACCEPT4 18
  37231. #endif
  37232. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  37233. -#include <sysdep-cancel.h>
  37234. -#include <pthreadP.h>
  37235. -#else
  37236. -#define SINGLE_THREAD_P 1
  37237. -#endif
  37238. -
  37239. #ifdef L_accept
  37240. -extern __typeof(accept) __libc_accept;
  37241. -#ifdef __NR_accept
  37242. -#define __NR___sys_accept __NR_accept
  37243. -static
  37244. -_syscall3(int, __sys_accept, int, call, struct sockaddr *, addr, socklen_t *,addrlen)
  37245. -int __libc_accept(int s, struct sockaddr *addr, socklen_t * addrlen)
  37246. -{
  37247. - if (SINGLE_THREAD_P)
  37248. - return __sys_accept(s, addr, addrlen);
  37249. -
  37250. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  37251. - int oldtype = LIBC_CANCEL_ASYNC ();
  37252. - int result = __sys_accept(s, addr, addrlen);
  37253. - LIBC_CANCEL_RESET (oldtype);
  37254. - return result;
  37255. -#endif
  37256. -}
  37257. -#elif defined(__NR_socketcall)
  37258. -int __libc_accept(int s, struct sockaddr *addr, socklen_t * addrlen)
  37259. +static int __NC(accept)(int sockfd, struct sockaddr *addr, socklen_t *addrlen)
  37260. {
  37261. +# ifdef __NR_accept
  37262. + return INLINE_SYSCALL(accept, 3, sockfd, addr, addrlen);
  37263. +# else
  37264. unsigned long args[3];
  37265. - args[0] = s;
  37266. + args[0] = sockfd;
  37267. args[1] = (unsigned long) addr;
  37268. args[2] = (unsigned long) addrlen;
  37269. - if (SINGLE_THREAD_P)
  37270. - return __socketcall(SYS_ACCEPT, args);
  37271. -
  37272. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  37273. - int oldtype = LIBC_CANCEL_ASYNC ();
  37274. - int result = __socketcall(SYS_ACCEPT, args);
  37275. - LIBC_CANCEL_RESET (oldtype);
  37276. - return result;
  37277. -#endif
  37278. + return __socketcall(SYS_ACCEPT, args);
  37279. +# endif
  37280. }
  37281. -#endif
  37282. -weak_alias(__libc_accept,accept)
  37283. -libc_hidden_weak(accept)
  37284. +CANCELLABLE_SYSCALL(int, accept, (int sockfd, struct sockaddr *addr, socklen_t *addrlen),
  37285. + (sockfd, addr, addrlen))
  37286. +lt_libc_hidden(accept)
  37287. #endif
  37288. #ifdef L_accept4
  37289. @@ -124,104 +92,81 @@
  37290. #endif
  37291. #ifdef L_bind
  37292. -#ifdef __NR_bind
  37293. -_syscall3(int, bind, int, sockfd, const struct sockaddr *, myaddr, socklen_t, addrlen)
  37294. -#elif defined(__NR_socketcall)
  37295. int bind(int sockfd, const struct sockaddr *myaddr, socklen_t addrlen)
  37296. {
  37297. +# ifdef __NR_bind
  37298. + return INLINE_SYSCALL(bind, 3, sockfd, myaddr, addrlen);
  37299. +# else
  37300. unsigned long args[3];
  37301. args[0] = sockfd;
  37302. args[1] = (unsigned long) myaddr;
  37303. args[2] = addrlen;
  37304. return __socketcall(SYS_BIND, args);
  37305. +# endif
  37306. }
  37307. -#endif
  37308. libc_hidden_def(bind)
  37309. #endif
  37310. #ifdef L_connect
  37311. -extern __typeof(connect) __libc_connect;
  37312. -#ifdef __NR_connect
  37313. -#define __NR___sys_connect __NR_connect
  37314. -static
  37315. -_syscall3(int, __sys_connect, int, sockfd, const struct sockaddr *, saddr, socklen_t, addrlen)
  37316. -int __libc_connect(int sockfd, const struct sockaddr *saddr, socklen_t addrlen)
  37317. -{
  37318. - if (SINGLE_THREAD_P)
  37319. - return __sys_connect(sockfd, saddr, addrlen);
  37320. -
  37321. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  37322. - int oldtype = LIBC_CANCEL_ASYNC ();
  37323. - int result = __sys_connect(sockfd, saddr, addrlen);
  37324. - LIBC_CANCEL_RESET (oldtype);
  37325. - return result;
  37326. -#endif
  37327. -}
  37328. -#elif defined(__NR_socketcall)
  37329. -int __libc_connect(int sockfd, const struct sockaddr *saddr, socklen_t addrlen)
  37330. +static int __NC(connect)(int sockfd, const struct sockaddr *saddr, socklen_t addrlen)
  37331. {
  37332. +# ifdef __NR_connect
  37333. + return INLINE_SYSCALL(connect, 3, sockfd, saddr, addrlen);
  37334. +# else
  37335. unsigned long args[3];
  37336. args[0] = sockfd;
  37337. args[1] = (unsigned long) saddr;
  37338. args[2] = addrlen;
  37339. -
  37340. - if (SINGLE_THREAD_P)
  37341. - return __socketcall(SYS_CONNECT, args);
  37342. -
  37343. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  37344. - int oldtype = LIBC_CANCEL_ASYNC ();
  37345. - int result = __socketcall(SYS_CONNECT, args);
  37346. - LIBC_CANCEL_RESET (oldtype);
  37347. - return result;
  37348. -#endif
  37349. + return __socketcall(SYS_CONNECT, args);
  37350. +# endif
  37351. }
  37352. -#endif
  37353. -weak_alias(__libc_connect,connect)
  37354. -libc_hidden_weak(connect)
  37355. +CANCELLABLE_SYSCALL(int, connect, (int sockfd, const struct sockaddr *saddr, socklen_t addrlen),
  37356. + (sockfd, saddr, addrlen))
  37357. +lt_libc_hidden(connect)
  37358. #endif
  37359. #ifdef L_getpeername
  37360. -#ifdef __NR_getpeername
  37361. -_syscall3(int, getpeername, int, sockfd, struct sockaddr *, addr, socklen_t *,paddrlen)
  37362. -#elif defined(__NR_socketcall)
  37363. -int getpeername(int sockfd, struct sockaddr *addr, socklen_t * paddrlen)
  37364. +int getpeername(int sockfd, struct sockaddr *addr, socklen_t *paddrlen)
  37365. {
  37366. +# ifdef __NR_getpeername
  37367. + return INLINE_SYSCALL(getpeername, 3, sockfd, addr, paddrlen);
  37368. +# else
  37369. unsigned long args[3];
  37370. args[0] = sockfd;
  37371. args[1] = (unsigned long) addr;
  37372. args[2] = (unsigned long) paddrlen;
  37373. return __socketcall(SYS_GETPEERNAME, args);
  37374. +# endif
  37375. }
  37376. #endif
  37377. -#endif
  37378. #ifdef L_getsockname
  37379. -#ifdef __NR_getsockname
  37380. -_syscall3(int, getsockname, int, sockfd, struct sockaddr *, addr, socklen_t *,paddrlen)
  37381. -#elif defined(__NR_socketcall)
  37382. int getsockname(int sockfd, struct sockaddr *addr, socklen_t * paddrlen)
  37383. {
  37384. +# ifdef __NR_getsockname
  37385. + return INLINE_SYSCALL(getsockname, 3, sockfd, addr, paddrlen);
  37386. +# else
  37387. unsigned long args[3];
  37388. args[0] = sockfd;
  37389. args[1] = (unsigned long) addr;
  37390. args[2] = (unsigned long) paddrlen;
  37391. return __socketcall(SYS_GETSOCKNAME, args);
  37392. +# endif
  37393. }
  37394. -#endif
  37395. libc_hidden_def(getsockname)
  37396. #endif
  37397. #ifdef L_getsockopt
  37398. -#ifdef __NR_getsockopt
  37399. -_syscall5(int, getsockopt, int, fd, int, level, int, optname, __ptr_t, optval, socklen_t *, optlen)
  37400. -#elif defined(__NR_socketcall)
  37401. -int getsockopt(int fd, int level, int optname, __ptr_t optval,
  37402. - socklen_t * optlen)
  37403. +int getsockopt(int fd, int level, int optname, void *optval,
  37404. + socklen_t *optlen)
  37405. {
  37406. +# ifdef __NR_getsockopt
  37407. + return INLINE_SYSCALL(getsockopt, 5, fd, level, optname, optval, optlen);
  37408. +# else
  37409. unsigned long args[5];
  37410. args[0] = fd;
  37411. @@ -230,101 +175,56 @@
  37412. args[3] = (unsigned long) optval;
  37413. args[4] = (unsigned long) optlen;
  37414. return (__socketcall(SYS_GETSOCKOPT, args));
  37415. +# endif
  37416. }
  37417. #endif
  37418. -#endif
  37419. #ifdef L_listen
  37420. -#ifdef __NR_listen
  37421. -_syscall2(int, listen, int, sockfd, int, backlog)
  37422. -#elif defined(__NR_socketcall)
  37423. int listen(int sockfd, int backlog)
  37424. {
  37425. +# ifdef __NR_listen
  37426. + return INLINE_SYSCALL(listen, 2, sockfd, backlog);
  37427. +# else
  37428. unsigned long args[2];
  37429. args[0] = sockfd;
  37430. args[1] = backlog;
  37431. return __socketcall(SYS_LISTEN, args);
  37432. +# endif
  37433. }
  37434. -#endif
  37435. libc_hidden_def(listen)
  37436. #endif
  37437. #ifdef L_recv
  37438. -extern __typeof(recv) __libc_recv;
  37439. -#ifdef __NR_recv
  37440. -#define __NR___sys_recv __NR_recv
  37441. -static
  37442. -_syscall4(ssize_t, __sys_recv, int, sockfd, __ptr_t, buffer, size_t, len,
  37443. - int, flags)
  37444. -ssize_t __libc_recv(int sockfd, __ptr_t buffer, size_t len, int flags)
  37445. -{
  37446. - if (SINGLE_THREAD_P)
  37447. - return __sys_recv(sockfd, buffer, len, flags);
  37448. -
  37449. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  37450. - int oldtype = LIBC_CANCEL_ASYNC ();
  37451. - int result = __sys_recv(sockfd, buffer, len, flags);
  37452. - LIBC_CANCEL_RESET (oldtype);
  37453. - return result;
  37454. -#endif
  37455. -}
  37456. -#elif defined(__NR_socketcall)
  37457. -/* recv, recvfrom added by bir7@leland.stanford.edu */
  37458. -ssize_t __libc_recv(int sockfd, __ptr_t buffer, size_t len, int flags)
  37459. +static ssize_t __NC(recv)(int sockfd, void *buffer, size_t len, int flags)
  37460. {
  37461. +# ifdef __NR_recv
  37462. + return (ssize_t)INLINE_SYSCALL(recv, 4, sockfd, buffer, len, flags);
  37463. +# elif defined __NR_recvfrom && defined _syscall6
  37464. + return __NC(recvfrom)(sockfd, buffer, len, flags, NULL, NULL);
  37465. +# else
  37466. unsigned long args[4];
  37467. args[0] = sockfd;
  37468. args[1] = (unsigned long) buffer;
  37469. args[2] = len;
  37470. args[3] = flags;
  37471. -
  37472. - if (SINGLE_THREAD_P)
  37473. - return (__socketcall(SYS_RECV, args));
  37474. -
  37475. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  37476. - int oldtype = LIBC_CANCEL_ASYNC ();
  37477. - int result = __socketcall(SYS_RECV, args);
  37478. - LIBC_CANCEL_RESET (oldtype);
  37479. - return result;
  37480. -#endif
  37481. -}
  37482. -#elif defined(__NR_recvfrom)
  37483. -ssize_t __libc_recv(int sockfd, __ptr_t buffer, size_t len, int flags)
  37484. -{
  37485. - return (recvfrom(sockfd, buffer, len, flags, NULL, NULL));
  37486. + return (ssize_t)__socketcall(SYS_RECV, args);
  37487. +# endif
  37488. }
  37489. -#endif
  37490. -weak_alias(__libc_recv,recv)
  37491. -libc_hidden_weak(recv)
  37492. +CANCELLABLE_SYSCALL(ssize_t, recv, (int sockfd, void *buffer, size_t len, int flags),
  37493. + (sockfd, buffer, len, flags))
  37494. +lt_libc_hidden(recv)
  37495. #endif
  37496. #ifdef L_recvfrom
  37497. -extern __typeof(recvfrom) __libc_recvfrom;
  37498. -#ifdef __NR_recvfrom
  37499. -#define __NR___sys_recvfrom __NR_recvfrom
  37500. -static
  37501. -_syscall6(ssize_t, __sys_recvfrom, int, sockfd, __ptr_t, buffer, size_t, len,
  37502. - int, flags, struct sockaddr *, to, socklen_t *, tolen)
  37503. -ssize_t __libc_recvfrom(int sockfd, __ptr_t buffer, size_t len, int flags,
  37504. - struct sockaddr *to, socklen_t * tolen)
  37505. -{
  37506. - if (SINGLE_THREAD_P)
  37507. - return __sys_recvfrom(sockfd, buffer, len, flags, to, tolen);
  37508. -
  37509. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  37510. - int oldtype = LIBC_CANCEL_ASYNC ();
  37511. - int result = __sys_recvfrom(sockfd, buffer, len, flags, to, tolen);
  37512. - LIBC_CANCEL_RESET (oldtype);
  37513. - return result;
  37514. -#endif
  37515. -}
  37516. -#elif defined(__NR_socketcall)
  37517. -/* recv, recvfrom added by bir7@leland.stanford.edu */
  37518. -ssize_t __libc_recvfrom(int sockfd, __ptr_t buffer, size_t len, int flags,
  37519. - struct sockaddr *to, socklen_t * tolen)
  37520. +ssize_t __NC(recvfrom)(int sockfd, void *buffer, size_t len, int flags,
  37521. + struct sockaddr *to, socklen_t *tolen)
  37522. {
  37523. +# if defined __NR_recvfrom && defined _syscall6
  37524. + return (ssize_t)INLINE_SYSCALL(recvfrom, 6, sockfd, buffer, len,
  37525. + flags, to, tolen);
  37526. +# else
  37527. unsigned long args[6];
  37528. args[0] = sockfd;
  37529. @@ -333,180 +233,82 @@
  37530. args[3] = flags;
  37531. args[4] = (unsigned long) to;
  37532. args[5] = (unsigned long) tolen;
  37533. -
  37534. - if (SINGLE_THREAD_P)
  37535. - return (__socketcall(SYS_RECVFROM, args));
  37536. -
  37537. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  37538. - int oldtype = LIBC_CANCEL_ASYNC ();
  37539. - int result = __socketcall(SYS_RECVFROM, args);
  37540. - LIBC_CANCEL_RESET (oldtype);
  37541. - return result;
  37542. -#endif
  37543. + return (ssize_t)__socketcall(SYS_RECVFROM, args);
  37544. +# endif
  37545. }
  37546. -#endif
  37547. -weak_alias(__libc_recvfrom,recvfrom)
  37548. -libc_hidden_weak(recvfrom)
  37549. +CANCELLABLE_SYSCALL(ssize_t, recvfrom, (int sockfd, void *buffer, size_t len,
  37550. + int flags, struct sockaddr *to, socklen_t *tolen),
  37551. + (sockfd, buffer, len, flags, to, tolen))
  37552. +lt_libc_hidden(recvfrom)
  37553. #endif
  37554. #ifdef L_recvmsg
  37555. -extern __typeof(recvmsg) __libc_recvmsg;
  37556. -#ifdef __NR_recvmsg
  37557. -#define __NR___sys_recvmsg __NR_recvmsg
  37558. -static
  37559. -_syscall3(ssize_t, __sys_recvmsg, int, sockfd, struct msghdr *, msg, int, flags)
  37560. -ssize_t __libc_recvmsg(int sockfd, struct msghdr *msg, int flags)
  37561. -{
  37562. - if (SINGLE_THREAD_P)
  37563. - return __sys_recvmsg(sockfd, msg, flags);
  37564. -
  37565. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  37566. - int oldtype = LIBC_CANCEL_ASYNC ();
  37567. - int result = __sys_recvmsg(sockfd, msg, flags);
  37568. - LIBC_CANCEL_RESET (oldtype);
  37569. - return result;
  37570. -#endif
  37571. -}
  37572. -#elif defined(__NR_socketcall)
  37573. -ssize_t __libc_recvmsg(int sockfd, struct msghdr *msg, int flags)
  37574. +static ssize_t __NC(recvmsg)(int sockfd, struct msghdr *msg, int flags)
  37575. {
  37576. +# ifdef __NR_recvmsg
  37577. + return (ssize_t)INLINE_SYSCALL(recvmsg, 3, sockfd, msg, flags);
  37578. +# else
  37579. unsigned long args[3];
  37580. args[0] = sockfd;
  37581. args[1] = (unsigned long) msg;
  37582. args[2] = flags;
  37583. -
  37584. - if (SINGLE_THREAD_P)
  37585. - return (__socketcall(SYS_RECVMSG, args));
  37586. -
  37587. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  37588. - int oldtype = LIBC_CANCEL_ASYNC ();
  37589. - int result = __socketcall(SYS_RECVMSG, args);
  37590. - LIBC_CANCEL_RESET (oldtype);
  37591. - return result;
  37592. -#endif
  37593. + return (ssize_t)__socketcall(SYS_RECVMSG, args);
  37594. +# endif
  37595. }
  37596. -#endif
  37597. -weak_alias(__libc_recvmsg,recvmsg)
  37598. -libc_hidden_weak(recvmsg)
  37599. +CANCELLABLE_SYSCALL(ssize_t, recvmsg, (int sockfd, struct msghdr *msg, int flags),
  37600. + (sockfd, msg, flags))
  37601. +lt_libc_hidden(recvmsg)
  37602. #endif
  37603. #ifdef L_send
  37604. -extern __typeof(send) __libc_send;
  37605. -#ifdef __NR_send
  37606. -#define __NR___sys_send __NR_send
  37607. -static
  37608. -_syscall4(ssize_t, __sys_send, int, sockfd, const void *, buffer, size_t, len, int, flags)
  37609. -ssize_t __libc_send(int sockfd, const void *buffer, size_t len, int flags)
  37610. -{
  37611. - if (SINGLE_THREAD_P)
  37612. - return __sys_send(sockfd, buffer, len, flags);
  37613. -
  37614. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  37615. - int oldtype = LIBC_CANCEL_ASYNC ();
  37616. - int result = __sys_send(sockfd, buffer, len, flags);
  37617. - LIBC_CANCEL_RESET (oldtype);
  37618. - return result;
  37619. -#endif
  37620. -}
  37621. -#elif defined(__NR_socketcall)
  37622. -/* send, sendto added by bir7@leland.stanford.edu */
  37623. -ssize_t __libc_send(int sockfd, const void *buffer, size_t len, int flags)
  37624. +static ssize_t __NC(send)(int sockfd, const void *buffer, size_t len, int flags)
  37625. {
  37626. +# ifdef __NR_send
  37627. + return (ssize_t)INLINE_SYSCALL(send, 4, sockfd, buffer, len, flags);
  37628. +# elif defined __NR_sendto && defined _syscall6
  37629. + return __NC(sendto)(sockfd, buffer, len, flags, NULL, 0);
  37630. +# else
  37631. unsigned long args[4];
  37632. args[0] = sockfd;
  37633. args[1] = (unsigned long) buffer;
  37634. args[2] = len;
  37635. args[3] = flags;
  37636. -
  37637. - if (SINGLE_THREAD_P)
  37638. - return (__socketcall(SYS_SEND, args));
  37639. -
  37640. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  37641. - int oldtype = LIBC_CANCEL_ASYNC ();
  37642. - int result = __socketcall(SYS_SEND, args);
  37643. - LIBC_CANCEL_RESET (oldtype);
  37644. - return result;
  37645. -#endif
  37646. -}
  37647. -
  37648. -#elif defined(__NR_sendto)
  37649. -ssize_t __libc_send(int sockfd, const void *buffer, size_t len, int flags)
  37650. -{
  37651. - return (sendto(sockfd, buffer, len, flags, NULL, 0));
  37652. + return (ssize_t)__socketcall(SYS_SEND, args);
  37653. +# endif
  37654. }
  37655. -#endif
  37656. -weak_alias(__libc_send,send)
  37657. -libc_hidden_weak(send)
  37658. +CANCELLABLE_SYSCALL(ssize_t, send, (int sockfd, const void *buffer, size_t len, int flags),
  37659. + (sockfd, buffer, len, flags))
  37660. +lt_libc_hidden(send)
  37661. #endif
  37662. #ifdef L_sendmsg
  37663. -extern __typeof(sendmsg) __libc_sendmsg;
  37664. -#ifdef __NR_sendmsg
  37665. -#define __NR___sys_sendmsg __NR_sendmsg
  37666. -static
  37667. -_syscall3(ssize_t, __sys_sendmsg, int, sockfd, const struct msghdr *, msg, int, flags)
  37668. -ssize_t __libc_sendmsg(int sockfd, const struct msghdr *msg, int flags)
  37669. -{
  37670. - if (SINGLE_THREAD_P)
  37671. - return __sys_sendmsg(sockfd, msg, flags);
  37672. -
  37673. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  37674. - int oldtype = LIBC_CANCEL_ASYNC ();
  37675. - int result = __sys_sendmsg(sockfd, msg, flags);
  37676. - LIBC_CANCEL_RESET (oldtype);
  37677. - return result;
  37678. -#endif
  37679. -}
  37680. -#elif defined(__NR_socketcall)
  37681. -ssize_t __libc_sendmsg(int sockfd, const struct msghdr *msg, int flags)
  37682. +static ssize_t __NC(sendmsg)(int sockfd, const struct msghdr *msg, int flags)
  37683. {
  37684. +# ifdef __NR_sendmsg
  37685. + return (ssize_t)INLINE_SYSCALL(sendmsg, 3, sockfd, msg, flags);
  37686. +# else
  37687. unsigned long args[3];
  37688. args[0] = sockfd;
  37689. args[1] = (unsigned long) msg;
  37690. args[2] = flags;
  37691. -
  37692. - if (SINGLE_THREAD_P)
  37693. - return (__socketcall(SYS_SENDMSG, args));
  37694. -
  37695. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  37696. - int oldtype = LIBC_CANCEL_ASYNC ();
  37697. - int result = __socketcall(SYS_SENDMSG, args);
  37698. - LIBC_CANCEL_RESET (oldtype);
  37699. - return result;
  37700. -#endif
  37701. + return (ssize_t)__socketcall(SYS_SENDMSG, args);
  37702. +# endif
  37703. }
  37704. -#endif
  37705. -weak_alias(__libc_sendmsg,sendmsg)
  37706. -libc_hidden_weak(sendmsg)
  37707. +CANCELLABLE_SYSCALL(ssize_t, sendmsg, (int sockfd, const struct msghdr *msg, int flags),
  37708. + (sockfd, msg, flags))
  37709. +lt_libc_hidden(sendmsg)
  37710. #endif
  37711. #ifdef L_sendto
  37712. -extern __typeof(sendto) __libc_sendto;
  37713. -#ifdef __NR_sendto
  37714. -#define __NR___sys_sendto __NR_sendto
  37715. -static
  37716. -_syscall6(ssize_t, __sys_sendto, int, sockfd, const void *, buffer,
  37717. - size_t, len, int, flags, const struct sockaddr *, to, socklen_t, tolen)
  37718. -ssize_t __libc_sendto(int sockfd, const void *buffer, size_t len, int flags,const struct sockaddr *to, socklen_t tolen)
  37719. -{
  37720. - if (SINGLE_THREAD_P)
  37721. - return __sys_sendto(sockfd, buffer, len, flags, to, tolen);
  37722. -
  37723. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  37724. - int oldtype = LIBC_CANCEL_ASYNC ();
  37725. - int result = __sys_sendto(sockfd, buffer, len, flags, to, tolen);
  37726. - LIBC_CANCEL_RESET (oldtype);
  37727. - return result;
  37728. -#endif
  37729. -}
  37730. -#elif defined(__NR_socketcall)
  37731. -/* send, sendto added by bir7@leland.stanford.edu */
  37732. -ssize_t __libc_sendto(int sockfd, const void *buffer, size_t len, int flags,
  37733. - const struct sockaddr *to, socklen_t tolen)
  37734. +ssize_t __NC(sendto)(int sockfd, const void *buffer, size_t len, int flags,
  37735. + const struct sockaddr *to, socklen_t tolen)
  37736. {
  37737. +# if defined __NR_sendto && defined _syscall6
  37738. + return (ssize_t)INLINE_SYSCALL(sendto, 6, sockfd, buffer, len, flags, to, tolen);
  37739. +# else
  37740. unsigned long args[6];
  37741. args[0] = sockfd;
  37742. @@ -515,30 +317,21 @@
  37743. args[3] = flags;
  37744. args[4] = (unsigned long) to;
  37745. args[5] = tolen;
  37746. -
  37747. - if (SINGLE_THREAD_P)
  37748. - return (__socketcall(SYS_SENDTO, args));
  37749. -
  37750. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  37751. - int oldtype = LIBC_CANCEL_ASYNC ();
  37752. - int result = __socketcall(SYS_SENDTO, args);
  37753. - LIBC_CANCEL_RESET (oldtype);
  37754. - return result;
  37755. -#endif
  37756. + return (ssize_t)__socketcall(SYS_SENDTO, args);
  37757. +# endif
  37758. }
  37759. -#endif
  37760. -weak_alias(__libc_sendto,sendto)
  37761. -libc_hidden_weak(sendto)
  37762. +CANCELLABLE_SYSCALL(ssize_t, sendto, (int sockfd, const void *buffer, size_t len,
  37763. + int flags, const struct sockaddr *to, socklen_t tolen),
  37764. + (sockfd, buffer, len, flags, to, tolen))
  37765. +lt_libc_hidden(sendto)
  37766. #endif
  37767. #ifdef L_setsockopt
  37768. -#ifdef __NR_setsockopt
  37769. -_syscall5(int, setsockopt, int, fd, int, level, int, optname, const void *, optval, socklen_t, optlen)
  37770. -#elif defined(__NR_socketcall)
  37771. -/* [sg]etsockoptions by bir7@leland.stanford.edu */
  37772. -int setsockopt(int fd, int level, int optname, const void *optval,
  37773. - socklen_t optlen)
  37774. +int setsockopt(int fd, int level, int optname, const void *optval, socklen_t optlen)
  37775. {
  37776. +# ifdef __NR_setsockopt
  37777. + return INLINE_SYSCALL(setsockopt, 5, fd, level, optname, optval, optlen);
  37778. +# else
  37779. unsigned long args[5];
  37780. args[0] = fd;
  37781. @@ -546,51 +339,50 @@
  37782. args[2] = optname;
  37783. args[3] = (unsigned long) optval;
  37784. args[4] = optlen;
  37785. - return (__socketcall(SYS_SETSOCKOPT, args));
  37786. + return __socketcall(SYS_SETSOCKOPT, args);
  37787. +# endif
  37788. }
  37789. -#endif
  37790. libc_hidden_def(setsockopt)
  37791. #endif
  37792. #ifdef L_shutdown
  37793. -#ifdef __NR_shutdown
  37794. -_syscall2(int, shutdown, int, sockfd, int, how)
  37795. -#elif defined(__NR_socketcall)
  37796. -/* shutdown by bir7@leland.stanford.edu */
  37797. int shutdown(int sockfd, int how)
  37798. {
  37799. +# ifdef __NR_shutdown
  37800. + return INLINE_SYSCALL(shutdown, 2, sockfd, how);
  37801. +# else
  37802. unsigned long args[2];
  37803. args[0] = sockfd;
  37804. args[1] = how;
  37805. - return (__socketcall(SYS_SHUTDOWN, args));
  37806. + return __socketcall(SYS_SHUTDOWN, args);
  37807. +# endif
  37808. }
  37809. #endif
  37810. -#endif
  37811. #ifdef L_socket
  37812. -#ifdef __NR_socket
  37813. -_syscall3(int, socket, int, family, int, type, int, protocol)
  37814. -#elif defined(__NR_socketcall)
  37815. int socket(int family, int type, int protocol)
  37816. {
  37817. +# ifdef __NR_socket
  37818. + return INLINE_SYSCALL(socket, 3, family, type, protocol);
  37819. +# else
  37820. unsigned long args[3];
  37821. args[0] = family;
  37822. args[1] = type;
  37823. args[2] = (unsigned long) protocol;
  37824. return __socketcall(SYS_SOCKET, args);
  37825. +# endif
  37826. }
  37827. -#endif
  37828. libc_hidden_def(socket)
  37829. #endif
  37830. #ifdef L_socketpair
  37831. -#ifdef __NR_socketpair
  37832. -_syscall4(int, socketpair, int, family, int, type, int, protocol, int *, sockvec)
  37833. -#elif defined(__NR_socketcall)
  37834. int socketpair(int family, int type, int protocol, int sockvec[2])
  37835. {
  37836. +# ifdef __NR_socketpair
  37837. + return INLINE_SYSCALL(socketpair, 4, family, type, protocol, sockvec);
  37838. +# else
  37839. unsigned long args[4];
  37840. args[0] = family;
  37841. @@ -598,7 +390,6 @@
  37842. args[2] = protocol;
  37843. args[3] = (unsigned long) sockvec;
  37844. return __socketcall(SYS_SOCKETPAIR, args);
  37845. +# endif
  37846. }
  37847. #endif
  37848. -#endif
  37849. -
  37850. diff -Nur uClibc-0.9.33.2/libc/misc/assert/__assert.c uClibc-git/libc/misc/assert/__assert.c
  37851. --- uClibc-0.9.33.2/libc/misc/assert/__assert.c 2012-05-15 09:20:09.000000000 +0200
  37852. +++ uClibc-git/libc/misc/assert/__assert.c 2014-07-25 20:36:05.609328415 +0200
  37853. @@ -13,8 +13,8 @@
  37854. * Library General Public License for more details.
  37855. *
  37856. * You should have received a copy of the GNU Library General Public
  37857. - * License along with this library; if not, write to the Free
  37858. - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  37859. + * License along with this library; if not, see
  37860. + * <http://www.gnu.org/licenses/>.
  37861. */
  37862. /* Oct 28, 2002
  37863. diff -Nur uClibc-0.9.33.2/libc/misc/assert/Makefile.in uClibc-git/libc/misc/assert/Makefile.in
  37864. --- uClibc-0.9.33.2/libc/misc/assert/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  37865. +++ uClibc-git/libc/misc/assert/Makefile.in 2014-07-25 20:36:05.609328415 +0200
  37866. @@ -7,13 +7,13 @@
  37867. subdirs += libc/misc/assert
  37868. -CSRC := __assert.c
  37869. +CSRC-y := __assert.c
  37870. MISC_ASSERT_DIR := $(top_srcdir)libc/misc/assert
  37871. MISC_ASSERT_OUT := $(top_builddir)libc/misc/assert
  37872. -MISC_ASSERT_SRC := $(MISC_ASSERT_DIR)/__assert.c
  37873. -MISC_ASSERT_OBJ := $(MISC_ASSERT_OUT)/__assert.o
  37874. +MISC_ASSERT_SRC := $(patsubst %.c,$(MISC_ASSERT_DIR)/%.c,$(CSRC-y))
  37875. +MISC_ASSERT_OBJ := $(patsubst %.c,$(MISC_ASSERT_OUT)/%.o,$(CSRC-y))
  37876. libc-y += $(MISC_ASSERT_OBJ)
  37877. diff -Nur uClibc-0.9.33.2/libc/misc/ctype/ctype.c uClibc-git/libc/misc/ctype/ctype.c
  37878. --- uClibc-0.9.33.2/libc/misc/ctype/ctype.c 2012-05-15 09:20:09.000000000 +0200
  37879. +++ uClibc-git/libc/misc/ctype/ctype.c 2014-07-25 20:36:05.629328521 +0200
  37880. @@ -11,8 +11,8 @@
  37881. * Library General Public License for more details.
  37882. *
  37883. * You should have received a copy of the GNU Library General Public
  37884. - * License along with this library; if not, write to the Free
  37885. - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  37886. + * License along with this library; if not, see
  37887. + * <http://www.gnu.org/licenses/>.
  37888. */
  37889. /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
  37890. @@ -36,10 +36,6 @@
  37891. #include <assert.h>
  37892. #include <locale.h>
  37893. -#ifdef __UCLIBC_HAS_XLOCALE__
  37894. -# include <xlocale.h>
  37895. -#endif
  37896. -
  37897. /**********************************************************************/
  37898. #ifdef __UCLIBC_HAS_CTYPE_TABLES__
  37899. diff -Nur uClibc-0.9.33.2/libc/misc/ctype/Makefile.in uClibc-git/libc/misc/ctype/Makefile.in
  37900. --- uClibc-0.9.33.2/libc/misc/ctype/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  37901. +++ uClibc-git/libc/misc/ctype/Makefile.in 2014-07-25 20:36:05.625328499 +0200
  37902. @@ -8,31 +8,25 @@
  37903. subdirs += libc/misc/ctype
  37904. # multi source ctype.c
  37905. -COM_SRC := \
  37906. +COM_SRC-y := \
  37907. isalnum.c isalpha.c iscntrl.c isdigit.c \
  37908. isgraph.c islower.c isprint.c ispunct.c isspace.c \
  37909. isupper.c isxdigit.c tolower.c toupper.c \
  37910. isblank.c
  37911. -ifeq ($(UCLIBC_SUSV4_LEGACY),y)
  37912. -COM_SRC += isascii.c toascii.c
  37913. -endif
  37914. -CSRC := $(COM_SRC)
  37915. +COM_SRC-$(UCLIBC_SUSV4_LEGACY) += isascii.c toascii.c
  37916. +CSRC-y := $(COM_SRC-y)
  37917. -ifeq ($(UCLIBC_HAS_CTYPE_TABLES),y)
  37918. -CSRC += __C_ctype_b.c __C_ctype_tolower.c __C_ctype_toupper.c \
  37919. +CSRC-$(UCLIBC_HAS_CTYPE_TABLES) += \
  37920. + __C_ctype_b.c __C_ctype_tolower.c __C_ctype_toupper.c \
  37921. __ctype_b_loc.c __ctype_tolower_loc.c __ctype_toupper_loc.c \
  37922. __ctype_assert.c isctype.c
  37923. -endif
  37924. -
  37925. -ifeq ($(UCLIBC_HAS_XLOCALE),y)
  37926. -CSRC += $(patsubst %.c,%_l.c,$(COM_SRC))
  37927. -endif
  37928. +CSRC-$(UCLIBC_HAS_XLOCALE) += $(patsubst %.c,%_l.c,$(COM_SRC-y))
  37929. MISC_CTYPE_DIR := $(top_srcdir)libc/misc/ctype
  37930. MISC_CTYPE_OUT := $(top_builddir)libc/misc/ctype
  37931. -MISC_CTYPE_SRC := $(patsubst %.c,$(MISC_CTYPE_DIR)/%.c,$(CSRC))
  37932. -MISC_CTYPE_OBJ := $(patsubst %.c,$(MISC_CTYPE_OUT)/%.o,$(CSRC))
  37933. +MISC_CTYPE_SRC := $(patsubst %.c,$(MISC_CTYPE_DIR)/%.c,$(CSRC-y))
  37934. +MISC_CTYPE_OBJ := $(patsubst %.c,$(MISC_CTYPE_OUT)/%.o,$(CSRC-y))
  37935. libc-y += $(MISC_CTYPE_OBJ)
  37936. diff -Nur uClibc-0.9.33.2/libc/misc/dirent/alphasort64.c uClibc-git/libc/misc/dirent/alphasort64.c
  37937. --- uClibc-0.9.33.2/libc/misc/dirent/alphasort64.c 2012-05-15 09:20:09.000000000 +0200
  37938. +++ uClibc-git/libc/misc/dirent/alphasort64.c 2014-07-25 20:36:05.641328583 +0200
  37939. @@ -5,12 +5,14 @@
  37940. */
  37941. #include <_lfs_64.h>
  37942. -
  37943. #include <dirent.h>
  37944. -#include <string.h>
  37945. -#include "dirstream.h"
  37946. +
  37947. +#if __WORDSIZE != 64
  37948. +# include <string.h>
  37949. +# include "dirstream.h"
  37950. int alphasort64(const struct dirent64 **a, const struct dirent64 **b)
  37951. {
  37952. - return strcmp((*a)->d_name, (*b)->d_name);
  37953. + return strcoll((*a)->d_name, (*b)->d_name);
  37954. }
  37955. +#endif
  37956. diff -Nur uClibc-0.9.33.2/libc/misc/dirent/alphasort.c uClibc-git/libc/misc/dirent/alphasort.c
  37957. --- uClibc-0.9.33.2/libc/misc/dirent/alphasort.c 2012-05-15 09:20:09.000000000 +0200
  37958. +++ uClibc-git/libc/misc/dirent/alphasort.c 2014-07-25 20:36:05.641328583 +0200
  37959. @@ -10,6 +10,8 @@
  37960. int alphasort(const struct dirent **a, const struct dirent **b)
  37961. {
  37962. - return strcmp((*a)->d_name, (*b)->d_name);
  37963. + return strcoll((*a)->d_name, (*b)->d_name);
  37964. }
  37965. -
  37966. +#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
  37967. +strong_alias_untyped(alphasort,alphasort64)
  37968. +#endif
  37969. diff -Nur uClibc-0.9.33.2/libc/misc/dirent/dirstream.h uClibc-git/libc/misc/dirent/dirstream.h
  37970. --- uClibc-0.9.33.2/libc/misc/dirent/dirstream.h 2012-05-15 09:20:09.000000000 +0200
  37971. +++ uClibc-git/libc/misc/dirent/dirstream.h 2014-07-25 20:36:05.641328583 +0200
  37972. @@ -13,8 +13,7 @@
  37973. You should have received a copy of the GNU Library General Public
  37974. License along with the GNU C Library; see the file COPYING.LIB. If
  37975. -not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
  37976. -Cambridge, MA 02139, USA. */
  37977. +not, see <http://www.gnu.org/licenses/>. */
  37978. /*
  37979. * POSIX Standard: 5.1.2 Directory Operations <dirent.h>
  37980. @@ -29,18 +28,6 @@
  37981. #include <bits/uClibc_mutex.h>
  37982. -/* For now, syscall readdir () only supports one entry at a time. It
  37983. - * will be changed in the future.
  37984. -#define NUMENT 3
  37985. -*/
  37986. -#ifndef NUMENT
  37987. -#define NUMENT 1
  37988. -#endif
  37989. -
  37990. -#define SINGLE_READDIR 11
  37991. -#define MULTI_READDIR 12
  37992. -#define NEW_READDIR 13
  37993. -
  37994. /* Directory stream type. */
  37995. struct __dirstream {
  37996. /* file descriptor */
  37997. @@ -65,10 +52,4 @@
  37998. __UCLIBC_MUTEX(dd_lock);
  37999. }; /* stream data from opendir() */
  38000. -
  38001. -extern ssize_t __getdents(int fd, char *buf, size_t count) attribute_hidden;
  38002. -#ifdef __UCLIBC_HAS_LFS__
  38003. -extern ssize_t __getdents64 (int fd, char *buf, size_t count) attribute_hidden;
  38004. -#endif
  38005. -
  38006. #endif /* dirent.h */
  38007. diff -Nur uClibc-0.9.33.2/libc/misc/dirent/Makefile.in uClibc-git/libc/misc/dirent/Makefile.in
  38008. --- uClibc-0.9.33.2/libc/misc/dirent/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  38009. +++ uClibc-git/libc/misc/dirent/Makefile.in 2014-07-25 20:36:05.641328583 +0200
  38010. @@ -7,18 +7,18 @@
  38011. subdirs += libc/misc/dirent
  38012. -CSRC := alphasort.c closedir.c dirfd.c opendir.c readdir.c rewinddir.c \
  38013. - scandir.c seekdir.c telldir.c readdir_r.c versionsort.c
  38014. -
  38015. -ifeq ($(UCLIBC_HAS_LFS),y)
  38016. -CSRC += readdir64.c alphasort64.c scandir64.c readdir64_r.c versionsort64.c
  38017. -endif
  38018. +CSRC := alphasort.c readdir.c scandir.c versionsort.c
  38019. +CSRC_R := readdir_r.c
  38020. +CSRC-y := closedir.c dirfd.c opendir.c rewinddir.c seekdir.c telldir.c $(CSRC) \
  38021. + $(CSRC_R)
  38022. +CSRC-$(UCLIBC_HAS_LFS) += $(patsubst %.c,%64.c,$(CSRC))
  38023. +CSRC-$(UCLIBC_HAS_LFS) += $(patsubst %_r.c,%64_r.c,$(CSRC_R))
  38024. MISC_DIRENT_DIR := $(top_srcdir)libc/misc/dirent
  38025. MISC_DIRENT_OUT := $(top_builddir)libc/misc/dirent
  38026. -MISC_DIRENT_SRC := $(patsubst %.c,$(MISC_DIRENT_DIR)/%.c,$(CSRC))
  38027. -MISC_DIRENT_OBJ := $(patsubst %.c,$(MISC_DIRENT_OUT)/%.o,$(CSRC))
  38028. +MISC_DIRENT_SRC := $(patsubst %.c,$(MISC_DIRENT_DIR)/%.c,$(CSRC-y))
  38029. +MISC_DIRENT_OBJ := $(patsubst %.c,$(MISC_DIRENT_OUT)/%.o,$(CSRC-y))
  38030. libc-y += $(MISC_DIRENT_OBJ)
  38031. diff -Nur uClibc-0.9.33.2/libc/misc/dirent/readdir64.c uClibc-git/libc/misc/dirent/readdir64.c
  38032. --- uClibc-0.9.33.2/libc/misc/dirent/readdir64.c 2012-05-15 09:20:09.000000000 +0200
  38033. +++ uClibc-git/libc/misc/dirent/readdir64.c 2014-07-25 20:36:05.641328583 +0200
  38034. @@ -5,52 +5,12 @@
  38035. */
  38036. #include <_lfs_64.h>
  38037. -
  38038. -#include <errno.h>
  38039. -#include <stdlib.h>
  38040. -#include <string.h>
  38041. -#include <unistd.h>
  38042. #include <dirent.h>
  38043. -#include "dirstream.h"
  38044. -
  38045. -struct dirent64 *readdir64(DIR * dir)
  38046. -{
  38047. - ssize_t bytes;
  38048. - struct dirent64 *de;
  38049. -
  38050. - if (!dir) {
  38051. - __set_errno(EBADF);
  38052. - return NULL;
  38053. - }
  38054. -
  38055. - __UCLIBC_MUTEX_LOCK(dir->dd_lock);
  38056. -
  38057. - do {
  38058. - if (dir->dd_size <= dir->dd_nextloc) {
  38059. - /* read dir->dd_max bytes of directory entries. */
  38060. - bytes = __getdents64(dir->dd_fd, dir->dd_buf, dir->dd_max);
  38061. - if (bytes <= 0) {
  38062. - de = NULL;
  38063. - goto all_done;
  38064. - }
  38065. - dir->dd_size = bytes;
  38066. - dir->dd_nextloc = 0;
  38067. - }
  38068. -
  38069. - de = (struct dirent64 *) (((char *) dir->dd_buf) + dir->dd_nextloc);
  38070. -
  38071. - /* Am I right? H.J. */
  38072. - dir->dd_nextloc += de->d_reclen;
  38073. -
  38074. - /* We have to save the next offset here. */
  38075. - dir->dd_nextoff = de->d_off;
  38076. -
  38077. - /* Skip deleted files. */
  38078. - } while (de->d_ino == 0);
  38079. -all_done:
  38080. - __UCLIBC_MUTEX_UNLOCK(dir->dd_lock);
  38081. +#if __WORDSIZE != 64
  38082. +# define __READDIR readdir64
  38083. +# define __DIRENT_TYPE struct dirent64
  38084. +# define __GETDENTS __getdents64
  38085. - return de;
  38086. -}
  38087. -libc_hidden_def(readdir64)
  38088. +# include "readdir.c"
  38089. +#endif
  38090. diff -Nur uClibc-0.9.33.2/libc/misc/dirent/readdir64_r.c uClibc-git/libc/misc/dirent/readdir64_r.c
  38091. --- uClibc-0.9.33.2/libc/misc/dirent/readdir64_r.c 2012-05-15 09:20:09.000000000 +0200
  38092. +++ uClibc-git/libc/misc/dirent/readdir64_r.c 2014-07-25 20:36:05.641328583 +0200
  38093. @@ -5,62 +5,12 @@
  38094. */
  38095. #include <_lfs_64.h>
  38096. -
  38097. -#include <errno.h>
  38098. -#include <stdlib.h>
  38099. -#include <string.h>
  38100. -#include <unistd.h>
  38101. #include <dirent.h>
  38102. -#include "dirstream.h"
  38103. -
  38104. -
  38105. -int readdir64_r(DIR *dir, struct dirent64 *entry, struct dirent64 **result)
  38106. -{
  38107. - int ret;
  38108. - ssize_t bytes;
  38109. - struct dirent64 *de;
  38110. -
  38111. - if (!dir) {
  38112. - __set_errno(EBADF);
  38113. - return(EBADF);
  38114. - }
  38115. - de = NULL;
  38116. -
  38117. - __UCLIBC_MUTEX_LOCK(dir->dd_lock);
  38118. -
  38119. - do {
  38120. - if (dir->dd_size <= dir->dd_nextloc) {
  38121. - /* read dir->dd_max bytes of directory entries. */
  38122. - bytes = __getdents64(dir->dd_fd, dir->dd_buf, dir->dd_max);
  38123. - if (bytes <= 0) {
  38124. - *result = NULL;
  38125. - ret = (bytes==0)? 0 : errno;
  38126. - goto all_done;
  38127. - }
  38128. - dir->dd_size = bytes;
  38129. - dir->dd_nextloc = 0;
  38130. - }
  38131. -
  38132. - de = (struct dirent64 *) (((char *) dir->dd_buf) + dir->dd_nextloc);
  38133. -
  38134. - /* Am I right? H.J. */
  38135. - dir->dd_nextloc += de->d_reclen;
  38136. -
  38137. - /* We have to save the next offset here. */
  38138. - dir->dd_nextoff = de->d_off;
  38139. - /* Skip deleted files. */
  38140. - } while (de->d_ino == 0);
  38141. -
  38142. - if (de == NULL) {
  38143. - *result = NULL;
  38144. - } else {
  38145. - *result = memcpy (entry, de, de->d_reclen);
  38146. - }
  38147. - ret = 0;
  38148. -all_done:
  38149. +#if __WORDSIZE != 64
  38150. +# define __READDIR_R readdir64_r
  38151. +# define __DIRENT_TYPE struct dirent64
  38152. +# define __GETDENTS __getdents64
  38153. - __UCLIBC_MUTEX_UNLOCK(dir->dd_lock);
  38154. - return((de != NULL)? 0 : ret);
  38155. -}
  38156. -libc_hidden_def(readdir64_r)
  38157. +# include "readdir_r.c"
  38158. +#endif
  38159. diff -Nur uClibc-0.9.33.2/libc/misc/dirent/readdir.c uClibc-git/libc/misc/dirent/readdir.c
  38160. --- uClibc-0.9.33.2/libc/misc/dirent/readdir.c 2012-05-15 09:20:09.000000000 +0200
  38161. +++ uClibc-git/libc/misc/dirent/readdir.c 2014-07-25 20:36:05.641328583 +0200
  38162. @@ -4,20 +4,22 @@
  38163. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  38164. */
  38165. -#include <features.h>
  38166. -
  38167. -#include <errno.h>
  38168. -#include <stdlib.h>
  38169. -#include <string.h>
  38170. -#include <unistd.h>
  38171. #include <dirent.h>
  38172. +#include <errno.h>
  38173. +#define __need_NULL
  38174. +#include <stddef.h>
  38175. #include "dirstream.h"
  38176. +#ifndef __READDIR
  38177. +# define __READDIR readdir
  38178. +# define __DIRENT_TYPE struct dirent
  38179. +# define __GETDENTS __getdents
  38180. +#endif
  38181. -struct dirent *readdir(DIR * dir)
  38182. +__DIRENT_TYPE *__READDIR(DIR * dir)
  38183. {
  38184. ssize_t bytes;
  38185. - struct dirent *de;
  38186. + __DIRENT_TYPE *de;
  38187. if (!dir) {
  38188. __set_errno(EBADF);
  38189. @@ -29,7 +31,7 @@
  38190. do {
  38191. if (dir->dd_size <= dir->dd_nextloc) {
  38192. /* read dir->dd_max bytes of directory entries. */
  38193. - bytes = __getdents(dir->dd_fd, dir->dd_buf, dir->dd_max);
  38194. + bytes = __GETDENTS(dir->dd_fd, dir->dd_buf, dir->dd_max);
  38195. if (bytes <= 0) {
  38196. de = NULL;
  38197. goto all_done;
  38198. @@ -38,7 +40,7 @@
  38199. dir->dd_nextloc = 0;
  38200. }
  38201. - de = (struct dirent *) (((char *) dir->dd_buf) + dir->dd_nextloc);
  38202. + de = (__DIRENT_TYPE *) (((char *) dir->dd_buf) + dir->dd_nextloc);
  38203. /* Am I right? H.J. */
  38204. dir->dd_nextloc += de->d_reclen;
  38205. @@ -53,4 +55,8 @@
  38206. __UCLIBC_MUTEX_UNLOCK(dir->dd_lock);
  38207. return de;
  38208. }
  38209. -libc_hidden_def(readdir)
  38210. +libc_hidden_def(__READDIR)
  38211. +#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
  38212. +strong_alias_untyped(readdir,readdir64)
  38213. +libc_hidden_def(readdir64)
  38214. +#endif
  38215. diff -Nur uClibc-0.9.33.2/libc/misc/dirent/readdir_r.c uClibc-git/libc/misc/dirent/readdir_r.c
  38216. --- uClibc-0.9.33.2/libc/misc/dirent/readdir_r.c 2012-05-15 09:20:09.000000000 +0200
  38217. +++ uClibc-git/libc/misc/dirent/readdir_r.c 2014-07-25 20:36:05.641328583 +0200
  38218. @@ -4,19 +4,24 @@
  38219. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  38220. */
  38221. +#include <dirent.h>
  38222. #include <errno.h>
  38223. -#include <stdlib.h>
  38224. #include <string.h>
  38225. -#include <unistd.h>
  38226. -#include <dirent.h>
  38227. +#define __need_NULL
  38228. +#include <stddef.h>
  38229. #include "dirstream.h"
  38230. +#ifndef __READDIR_R
  38231. +# define __READDIR_R readdir_r
  38232. +# define __DIRENT_TYPE struct dirent
  38233. +# define __GETDENTS __getdents
  38234. +#endif
  38235. -int readdir_r(DIR *dir, struct dirent *entry, struct dirent **result)
  38236. +int __READDIR_R(DIR *dir, __DIRENT_TYPE *entry, __DIRENT_TYPE **result)
  38237. {
  38238. int ret;
  38239. ssize_t bytes;
  38240. - struct dirent *de;
  38241. + __DIRENT_TYPE *de;
  38242. if (!dir) {
  38243. __set_errno(EBADF);
  38244. @@ -29,7 +34,7 @@
  38245. do {
  38246. if (dir->dd_size <= dir->dd_nextloc) {
  38247. /* read dir->dd_max bytes of directory entries. */
  38248. - bytes = __getdents(dir->dd_fd, dir->dd_buf, dir->dd_max);
  38249. + bytes = __GETDENTS(dir->dd_fd, dir->dd_buf, dir->dd_max);
  38250. if (bytes <= 0) {
  38251. *result = NULL;
  38252. ret = (bytes==0)? 0 : errno;
  38253. @@ -39,7 +44,7 @@
  38254. dir->dd_nextloc = 0;
  38255. }
  38256. - de = (struct dirent *) (((char *) dir->dd_buf) + dir->dd_nextloc);
  38257. + de = (__DIRENT_TYPE *) (((char *) dir->dd_buf) + dir->dd_nextloc);
  38258. /* Am I right? H.J. */
  38259. dir->dd_nextloc += de->d_reclen;
  38260. @@ -61,4 +66,8 @@
  38261. __UCLIBC_MUTEX_UNLOCK(dir->dd_lock);
  38262. return((de != NULL)? 0 : ret);
  38263. }
  38264. -libc_hidden_def(readdir_r)
  38265. +libc_hidden_def(__READDIR_R)
  38266. +#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
  38267. +strong_alias_untyped(readdir_r,readdir64_r)
  38268. +libc_hidden_def(readdir64_r)
  38269. +#endif
  38270. diff -Nur uClibc-0.9.33.2/libc/misc/dirent/scandir64.c uClibc-git/libc/misc/dirent/scandir64.c
  38271. --- uClibc-0.9.33.2/libc/misc/dirent/scandir64.c 2012-05-15 09:20:09.000000000 +0200
  38272. +++ uClibc-git/libc/misc/dirent/scandir64.c 2014-07-25 20:36:05.641328583 +0200
  38273. @@ -1,111 +1,16 @@
  38274. -/* Copyright (C) 1992-1998, 2000 Free Software Foundation, Inc.
  38275. - This file is part of the GNU C Library.
  38276. -
  38277. - The GNU C Library is free software; you can redistribute it and/or
  38278. - modify it under the terms of the GNU Lesser General Public
  38279. - License as published by the Free Software Foundation; either
  38280. - version 2.1 of the License, or (at your option) any later version.
  38281. -
  38282. - The GNU C Library is distributed in the hope that it will be useful,
  38283. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  38284. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  38285. - Lesser General Public License for more details.
  38286. -
  38287. - You should have received a copy of the GNU Lesser General Public
  38288. - License along with the GNU C Library; if not, write to the Free
  38289. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  38290. - 02111-1307 USA.
  38291. - */
  38292. -
  38293. -/* Modified for uClibc by Erik Andersen
  38294. - */
  38295. +/*
  38296. + * Copyright (C) 2000-2011 Erik Andersen <andersen@uclibc.org>
  38297. + *
  38298. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  38299. + */
  38300. #include <_lfs_64.h>
  38301. -
  38302. #include <dirent.h>
  38303. -#include <stdio.h>
  38304. -#include <string.h>
  38305. -#include <stdlib.h>
  38306. -#include <errno.h>
  38307. -#include <sys/types.h>
  38308. -#include "dirstream.h"
  38309. -
  38310. -int scandir64(const char *dir, struct dirent64 ***namelist,
  38311. - int (*selector) (const struct dirent64 *),
  38312. - int (*compar) (const struct dirent64 **, const struct dirent64 **))
  38313. -{
  38314. - DIR *dp = opendir (dir);
  38315. - struct dirent64 *current;
  38316. - struct dirent64 **names = NULL;
  38317. - size_t names_size = 0, pos;
  38318. - int save;
  38319. -
  38320. - if (dp == NULL)
  38321. - return -1;
  38322. -
  38323. - save = errno;
  38324. - __set_errno (0);
  38325. -
  38326. - pos = 0;
  38327. - while ((current = readdir64 (dp)) != NULL) {
  38328. - int use_it = selector == NULL;
  38329. -
  38330. - if (! use_it)
  38331. - {
  38332. - use_it = (*selector) (current);
  38333. - /* The selector function might have changed errno.
  38334. - * It was zero before and it need to be again to make
  38335. - * the latter tests work. */
  38336. - if (! use_it)
  38337. - __set_errno (0);
  38338. - }
  38339. - if (use_it)
  38340. - {
  38341. - struct dirent64 *vnew;
  38342. - size_t dsize;
  38343. -
  38344. - /* Ignore errors from selector or readdir64 */
  38345. - __set_errno (0);
  38346. -
  38347. - if (unlikely(pos == names_size))
  38348. - {
  38349. - struct dirent64 **new;
  38350. - if (names_size == 0)
  38351. - names_size = 10;
  38352. - else
  38353. - names_size *= 2;
  38354. - new = (struct dirent64 **) realloc (names,
  38355. - names_size * sizeof (struct dirent64 *));
  38356. - if (new == NULL)
  38357. - break;
  38358. - names = new;
  38359. - }
  38360. -
  38361. - dsize = &current->d_name[_D_ALLOC_NAMLEN(current)] - (char*)current;
  38362. - vnew = (struct dirent64 *) malloc (dsize);
  38363. - if (vnew == NULL)
  38364. - break;
  38365. -
  38366. - names[pos++] = (struct dirent64 *) memcpy (vnew, current, dsize);
  38367. - }
  38368. - }
  38369. - if (unlikely(errno != 0))
  38370. - {
  38371. - save = errno;
  38372. - closedir (dp);
  38373. - while (pos > 0)
  38374. - free (names[--pos]);
  38375. - free (names);
  38376. - __set_errno (save);
  38377. - return -1;
  38378. - }
  38379. - closedir (dp);
  38380. - __set_errno (save);
  38381. +#if __WORDSIZE != 64
  38382. +# define __SCANDIR scandir64
  38383. +# define __DIRENT_TYPE struct dirent64
  38384. +# define __READDIR readdir64
  38385. - /* Sort the list if we have a comparison function to sort with. */
  38386. - if (compar != NULL)
  38387. - qsort (names, pos, sizeof (struct dirent64 *), (comparison_fn_t) compar);
  38388. - *namelist = names;
  38389. - return pos;
  38390. -}
  38391. +# include "scandir.c"
  38392. +#endif
  38393. diff -Nur uClibc-0.9.33.2/libc/misc/dirent/scandir.c uClibc-git/libc/misc/dirent/scandir.c
  38394. --- uClibc-0.9.33.2/libc/misc/dirent/scandir.c 2012-05-15 09:20:09.000000000 +0200
  38395. +++ uClibc-git/libc/misc/dirent/scandir.c 2014-07-25 20:36:05.641328583 +0200
  38396. @@ -1,24 +1,29 @@
  38397. +/* vi: set sw=4 ts=4: */
  38398. /*
  38399. - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  38400. + * Copyright (C) 2000-2011 Erik Andersen <andersen@uclibc.org>
  38401. *
  38402. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  38403. */
  38404. #include <dirent.h>
  38405. -#include <stdio.h>
  38406. #include <string.h>
  38407. #include <stdlib.h>
  38408. #include <errno.h>
  38409. -#include <sys/types.h>
  38410. #include "dirstream.h"
  38411. -int scandir(const char *dir, struct dirent ***namelist,
  38412. - int (*selector) (const struct dirent *),
  38413. - int (*compar) (const struct dirent **, const struct dirent **))
  38414. +#ifndef __SCANDIR
  38415. +# define __SCANDIR scandir
  38416. +# define __DIRENT_TYPE struct dirent
  38417. +# define __READDIR readdir
  38418. +#endif
  38419. +
  38420. +int __SCANDIR(const char *dir, __DIRENT_TYPE ***namelist,
  38421. + int (*selector) (const __DIRENT_TYPE *),
  38422. + int (*compar) (const __DIRENT_TYPE **, const __DIRENT_TYPE **))
  38423. {
  38424. DIR *dp = opendir (dir);
  38425. - struct dirent *current;
  38426. - struct dirent **names = NULL;
  38427. + __DIRENT_TYPE *current;
  38428. + __DIRENT_TYPE **names = NULL;
  38429. size_t names_size = 0, pos;
  38430. int save;
  38431. @@ -29,7 +34,7 @@
  38432. __set_errno (0);
  38433. pos = 0;
  38434. - while ((current = readdir (dp)) != NULL) {
  38435. + while ((current = __READDIR (dp)) != NULL) {
  38436. int use_it = selector == NULL;
  38437. if (! use_it)
  38438. @@ -43,7 +48,7 @@
  38439. }
  38440. if (use_it)
  38441. {
  38442. - struct dirent *vnew;
  38443. + __DIRENT_TYPE *vnew;
  38444. size_t dsize;
  38445. /* Ignore errors from selector or readdir */
  38446. @@ -51,24 +56,24 @@
  38447. if (unlikely(pos == names_size))
  38448. {
  38449. - struct dirent **new;
  38450. + __DIRENT_TYPE **new;
  38451. if (names_size == 0)
  38452. names_size = 10;
  38453. else
  38454. names_size *= 2;
  38455. - new = (struct dirent **) realloc (names,
  38456. - names_size * sizeof (struct dirent *));
  38457. + new = (__DIRENT_TYPE **) realloc (names,
  38458. + names_size * sizeof (__DIRENT_TYPE *));
  38459. if (new == NULL)
  38460. break;
  38461. names = new;
  38462. }
  38463. dsize = &current->d_name[_D_ALLOC_NAMLEN(current)] - (char*)current;
  38464. - vnew = (struct dirent *) malloc (dsize);
  38465. + vnew = (__DIRENT_TYPE *) malloc (dsize);
  38466. if (vnew == NULL)
  38467. break;
  38468. - names[pos++] = (struct dirent *) memcpy (vnew, current, dsize);
  38469. + names[pos++] = (__DIRENT_TYPE *) memcpy (vnew, current, dsize);
  38470. }
  38471. }
  38472. @@ -88,7 +93,10 @@
  38473. /* Sort the list if we have a comparison function to sort with. */
  38474. if (compar != NULL)
  38475. - qsort (names, pos, sizeof (struct dirent *), (comparison_fn_t) compar);
  38476. + qsort (names, pos, sizeof (__DIRENT_TYPE *), (comparison_fn_t) compar);
  38477. *namelist = names;
  38478. return pos;
  38479. }
  38480. +#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
  38481. +strong_alias_untyped(scandir,scandir64)
  38482. +#endif
  38483. diff -Nur uClibc-0.9.33.2/libc/misc/dirent/versionsort64.c uClibc-git/libc/misc/dirent/versionsort64.c
  38484. --- uClibc-0.9.33.2/libc/misc/dirent/versionsort64.c 2012-05-15 09:20:09.000000000 +0200
  38485. +++ uClibc-git/libc/misc/dirent/versionsort64.c 2014-07-25 20:36:05.641328583 +0200
  38486. @@ -5,12 +5,14 @@
  38487. */
  38488. #include <_lfs_64.h>
  38489. -
  38490. #include <dirent.h>
  38491. -#include <string.h>
  38492. -#include "dirstream.h"
  38493. +
  38494. +#if __WORDSIZE != 64
  38495. +# include <string.h>
  38496. +# include "dirstream.h"
  38497. int versionsort64(const struct dirent64 **a, const struct dirent64 **b)
  38498. {
  38499. return strverscmp((*a)->d_name, (*b)->d_name);
  38500. }
  38501. +#endif
  38502. diff -Nur uClibc-0.9.33.2/libc/misc/dirent/versionsort.c uClibc-git/libc/misc/dirent/versionsort.c
  38503. --- uClibc-0.9.33.2/libc/misc/dirent/versionsort.c 2012-05-15 09:20:09.000000000 +0200
  38504. +++ uClibc-git/libc/misc/dirent/versionsort.c 2014-07-25 20:36:05.641328583 +0200
  38505. @@ -12,3 +12,6 @@
  38506. {
  38507. return strverscmp((*a)->d_name, (*b)->d_name);
  38508. }
  38509. +#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
  38510. +strong_alias_untyped(versionsort,versionsort64)
  38511. +#endif
  38512. diff -Nur uClibc-0.9.33.2/libc/misc/elf/dl-iterate-phdr.c uClibc-git/libc/misc/elf/dl-iterate-phdr.c
  38513. --- uClibc-0.9.33.2/libc/misc/elf/dl-iterate-phdr.c 2012-05-15 09:20:09.000000000 +0200
  38514. +++ uClibc-git/libc/misc/elf/dl-iterate-phdr.c 2014-07-25 20:36:05.657328667 +0200
  38515. @@ -18,10 +18,7 @@
  38516. /* we want this in libc but nowhere else */
  38517. #ifdef __USE_GNU
  38518. -extern __typeof(dl_iterate_phdr) __dl_iterate_phdr;
  38519. -
  38520. -hidden_proto(__dl_iterate_phdr)
  38521. -int
  38522. +static int
  38523. __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, size_t size, void *data), void *data)
  38524. {
  38525. int ret = 0;
  38526. @@ -41,7 +38,6 @@
  38527. #endif
  38528. return ret;
  38529. }
  38530. -hidden_def (__dl_iterate_phdr)
  38531. # ifdef SHARED
  38532. diff -Nur uClibc-0.9.33.2/libc/misc/elf/dl-support.c uClibc-git/libc/misc/elf/dl-support.c
  38533. --- uClibc-0.9.33.2/libc/misc/elf/dl-support.c 2012-05-15 09:20:09.000000000 +0200
  38534. +++ uClibc-git/libc/misc/elf/dl-support.c 2014-07-25 20:36:05.657328667 +0200
  38535. @@ -19,6 +19,7 @@
  38536. #include <ldsodefs.h>
  38537. #include <string.h>
  38538. #endif
  38539. +#include <bits/uClibc_page.h>
  38540. #if defined(USE_TLS) && USE_TLS
  38541. @@ -28,6 +29,7 @@
  38542. ElfW(Phdr) *_dl_phdr;
  38543. size_t _dl_phnum;
  38544. +size_t _dl_pagesize;
  38545. void internal_function _dl_aux_init (ElfW(auxv_t) *av);
  38546. void internal_function _dl_aux_init (ElfW(auxv_t) *av)
  38547. @@ -37,6 +39,9 @@
  38548. /* Get the number of program headers from the aux vect */
  38549. _dl_phnum = (size_t) av[AT_PHNUM].a_un.a_val;
  38550. +
  38551. + /* Get the pagesize from the aux vect */
  38552. + _dl_pagesize = (av[AT_PAGESZ].a_un.a_val) ? (size_t) av[AT_PAGESZ].a_un.a_val : PAGE_SIZE;
  38553. }
  38554. #if defined(USE_TLS) && USE_TLS
  38555. diff -Nur uClibc-0.9.33.2/libc/misc/error/err.c uClibc-git/libc/misc/error/err.c
  38556. --- uClibc-0.9.33.2/libc/misc/error/err.c 2012-05-15 09:20:09.000000000 +0200
  38557. +++ uClibc-git/libc/misc/error/err.c 2014-07-25 20:36:05.665328709 +0200
  38558. @@ -11,9 +11,6 @@
  38559. #include <stdarg.h>
  38560. #include <errno.h>
  38561. #include <err.h>
  38562. -#ifdef __UCLIBC_HAS_THREADS__
  38563. -#include <pthread.h>
  38564. -#endif
  38565. #ifdef __UCLIBC_MJN3_ONLY__
  38566. #warning REMINDER: Deal with wide oriented stderr case.
  38567. @@ -50,68 +47,68 @@
  38568. __STDIO_AUTO_THREADUNLOCK(stderr);
  38569. }
  38570. -void vwarn(const char *format, va_list args)
  38571. +static void __vwarn(const char *format, va_list args)
  38572. {
  38573. vwarn_work(format, args, 1);
  38574. }
  38575. -libc_hidden_def(vwarn)
  38576. +strong_alias(__vwarn,vwarn)
  38577. void warn(const char *format, ...)
  38578. {
  38579. va_list args;
  38580. va_start(args, format);
  38581. - vwarn(format, args);
  38582. + __vwarn(format, args);
  38583. va_end(args);
  38584. }
  38585. -void vwarnx(const char *format, va_list args)
  38586. +static void __vwarnx(const char *format, va_list args)
  38587. {
  38588. vwarn_work(format, args, 0);
  38589. }
  38590. -libc_hidden_def(vwarnx)
  38591. +strong_alias(__vwarnx,vwarnx)
  38592. void warnx(const char *format, ...)
  38593. {
  38594. va_list args;
  38595. va_start(args, format);
  38596. - vwarnx(format, args);
  38597. + __vwarnx(format, args);
  38598. va_end(args);
  38599. }
  38600. -void verr(int status, const char *format, va_list args)
  38601. +static void attribute_noreturn __verr(int status, const char *format, va_list args)
  38602. {
  38603. - vwarn(format, args);
  38604. + __vwarn(format, args);
  38605. exit(status);
  38606. }
  38607. -libc_hidden_def(verr)
  38608. +strong_alias(__verr,verr)
  38609. -void attribute_noreturn err(int status, const char *format, ...)
  38610. +void err(int status, const char *format, ...)
  38611. {
  38612. va_list args;
  38613. va_start(args, format);
  38614. - verr(status, format, args);
  38615. + __verr(status, format, args);
  38616. /* This should get optimized away. We'll leave it now for safety. */
  38617. /* The loop is added only to keep gcc happy. */
  38618. while(1)
  38619. va_end(args);
  38620. }
  38621. -void verrx(int status, const char *format, va_list args)
  38622. +static void attribute_noreturn __verrx(int status, const char *format, va_list args)
  38623. {
  38624. - vwarnx(format, args);
  38625. + __vwarnx(format, args);
  38626. exit(status);
  38627. }
  38628. -libc_hidden_def(verrx)
  38629. +strong_alias(__verrx,verrx)
  38630. -void attribute_noreturn errx(int status, const char *format, ...)
  38631. +void errx(int status, const char *format, ...)
  38632. {
  38633. va_list args;
  38634. va_start(args, format);
  38635. - verrx(status, format, args);
  38636. + __verrx(status, format, args);
  38637. /* This should get optimized away. We'll leave it now for safety. */
  38638. /* The loop is added only to keep gcc happy. */
  38639. while(1)
  38640. diff -Nur uClibc-0.9.33.2/libc/misc/error/error.c uClibc-git/libc/misc/error/error.c
  38641. --- uClibc-0.9.33.2/libc/misc/error/error.c 2012-05-15 09:20:09.000000000 +0200
  38642. +++ uClibc-git/libc/misc/error/error.c 2014-07-25 20:36:05.665328709 +0200
  38643. @@ -13,9 +13,8 @@
  38644. Lesser General Public License for more details.
  38645. You should have received a copy of the GNU Lesser General Public
  38646. - License along with the GNU C Library; if not, write to the Free
  38647. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  38648. - 02111-1307 USA. */
  38649. + License along with the GNU C Library; if not, see
  38650. + <http://www.gnu.org/licenses/>. */
  38651. /* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
  38652. /* Adjusted slightly by Erik Andersen <andersen@uclibc.org> */
  38653. @@ -37,8 +36,7 @@
  38654. function without parameters instead. */
  38655. void (*error_print_progname) (void) = NULL;
  38656. -extern __typeof(error) __error attribute_hidden;
  38657. -void __error (int status, int errnum, const char *message, ...)
  38658. +void error (int status, int errnum, const char *message, ...)
  38659. {
  38660. va_list args;
  38661. @@ -60,11 +58,9 @@
  38662. if (status)
  38663. exit (status);
  38664. }
  38665. -weak_alias(__error,error)
  38666. -extern __typeof(error_at_line) __error_at_line attribute_hidden;
  38667. -void __error_at_line (int status, int errnum, const char *file_name,
  38668. - unsigned int line_number, const char *message, ...)
  38669. +void error_at_line (int status, int errnum, const char *file_name,
  38670. + unsigned int line_number, const char *message, ...)
  38671. {
  38672. va_list args;
  38673. @@ -103,4 +99,3 @@
  38674. if (status)
  38675. exit (status);
  38676. }
  38677. -weak_alias(__error_at_line,error_at_line)
  38678. diff -Nur uClibc-0.9.33.2/libc/misc/error/Makefile.in uClibc-git/libc/misc/error/Makefile.in
  38679. --- uClibc-0.9.33.2/libc/misc/error/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  38680. +++ uClibc-git/libc/misc/error/Makefile.in 2014-07-25 20:36:05.665328709 +0200
  38681. @@ -7,19 +7,15 @@
  38682. subdirs += libc/misc/error
  38683. -CSRC :=
  38684. -ifeq ($(UCLIBC_HAS_BSD_ERR),y)
  38685. -CSRC += err.c
  38686. -endif
  38687. -ifeq ($(UCLIBC_HAS_GNU_ERROR),y)
  38688. -CSRC += error.c
  38689. -endif
  38690. +CSRC-y :=
  38691. +CSRC-$(UCLIBC_HAS_BSD_ERR) += err.c
  38692. +CSRC-$(UCLIBC_HAS_GNU_ERROR) += error.c
  38693. MISC_ERROR_DIR := $(top_srcdir)libc/misc/error
  38694. MISC_ERROR_OUT := $(top_builddir)libc/misc/error
  38695. -MISC_ERROR_SRC := $(patsubst %.c,$(MISC_ERROR_DIR)/%.c,$(CSRC))
  38696. -MISC_ERROR_OBJ := $(patsubst %.c,$(MISC_ERROR_OUT)/%.o,$(CSRC))
  38697. +MISC_ERROR_SRC := $(patsubst %.c,$(MISC_ERROR_DIR)/%.c,$(CSRC-y))
  38698. +MISC_ERROR_OBJ := $(patsubst %.c,$(MISC_ERROR_OUT)/%.o,$(CSRC-y))
  38699. libc-y += $(MISC_ERROR_OBJ)
  38700. diff -Nur uClibc-0.9.33.2/libc/misc/file/isfdtype.c uClibc-git/libc/misc/file/isfdtype.c
  38701. --- uClibc-0.9.33.2/libc/misc/file/isfdtype.c 1970-01-01 01:00:00.000000000 +0100
  38702. +++ uClibc-git/libc/misc/file/isfdtype.c 2014-07-25 20:36:05.677328772 +0200
  38703. @@ -0,0 +1,40 @@
  38704. +/* Determine whether descriptor has given property.
  38705. + Copyright (C) 1996-2013 Free Software Foundation, Inc.
  38706. + This file is part of the GNU C Library.
  38707. +
  38708. + The GNU C Library is free software; you can redistribute it and/or
  38709. + modify it under the terms of the GNU Lesser General Public
  38710. + License as published by the Free Software Foundation; either
  38711. + version 2.1 of the License, or (at your option) any later version.
  38712. +
  38713. + The GNU C Library is distributed in the hope that it will be useful,
  38714. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  38715. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  38716. + Lesser General Public License for more details.
  38717. +
  38718. + You should have received a copy of the GNU Lesser General Public
  38719. + License along with the GNU C Library; if not, see
  38720. + <http://www.gnu.org/licenses/>. */
  38721. +
  38722. +#include <errno.h>
  38723. +#include <sys/stat.h>
  38724. +#include <sys/socket.h>
  38725. +#include <sys/types.h>
  38726. +#ifdef __UCLIBC_HAS_LFS__
  38727. +# include <_lfs_64.h>
  38728. +#else
  38729. +# define stat64 stat
  38730. +# define fstat64 fstat
  38731. +#endif
  38732. +
  38733. +int
  38734. +isfdtype (int fildes, int fdtype)
  38735. +{
  38736. + struct stat64 st;
  38737. + int save_error = errno;
  38738. + int result = fstat64 (fildes, &st);
  38739. + __set_errno (save_error);
  38740. + if (result)
  38741. + return result;
  38742. + return (st.st_mode & S_IFMT) == (mode_t) fdtype;
  38743. +}
  38744. diff -Nur uClibc-0.9.33.2/libc/misc/file/lockf64.c uClibc-git/libc/misc/file/lockf64.c
  38745. --- uClibc-0.9.33.2/libc/misc/file/lockf64.c 2012-05-15 09:20:09.000000000 +0200
  38746. +++ uClibc-git/libc/misc/file/lockf64.c 2014-07-25 20:36:05.677328772 +0200
  38747. @@ -13,8 +13,7 @@
  38748. You should have received a copy of the GNU Library General Public
  38749. License along with the GNU C Library; see the file COPYING.LIB. If not,
  38750. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  38751. - Boston, MA 02111-1307, USA. */
  38752. + see <http://www.gnu.org/licenses/>. */
  38753. #include <_lfs_64.h>
  38754. @@ -90,4 +89,3 @@
  38755. return fcntl(fd, cmd, &fl);
  38756. }
  38757. -libc_hidden_def(lockf64)
  38758. diff -Nur uClibc-0.9.33.2/libc/misc/file/lockf.c uClibc-git/libc/misc/file/lockf.c
  38759. --- uClibc-0.9.33.2/libc/misc/file/lockf.c 2012-05-15 09:20:09.000000000 +0200
  38760. +++ uClibc-git/libc/misc/file/lockf.c 2014-07-25 20:36:05.677328772 +0200
  38761. @@ -13,19 +13,15 @@
  38762. You should have received a copy of the GNU Library General Public
  38763. License along with the GNU C Library; see the file COPYING.LIB. If not,
  38764. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  38765. - Boston, MA 02111-1307, USA. */
  38766. + see <http://www.gnu.org/licenses/>. */
  38767. #include <features.h>
  38768. -
  38769. #include <sys/types.h>
  38770. -#include <unistd.h>
  38771. #include <fcntl.h>
  38772. +#include <unistd.h>
  38773. #include <errno.h>
  38774. #include <string.h>
  38775. -
  38776. -
  38777. /* lockf is a simplified interface to fcntl's locking facilities. */
  38778. int lockf (int fd, int cmd, off_t len)
  38779. diff -Nur uClibc-0.9.33.2/libc/misc/file/Makefile.in uClibc-git/libc/misc/file/Makefile.in
  38780. --- uClibc-0.9.33.2/libc/misc/file/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  38781. +++ uClibc-git/libc/misc/file/Makefile.in 2014-07-25 20:36:05.677328772 +0200
  38782. @@ -10,12 +10,12 @@
  38783. MISC_FILE_DIR := $(top_srcdir)libc/misc/file
  38784. MISC_FILE_OUT := $(top_builddir)libc/misc/file
  38785. -MISC_FILE_SRC := $(wildcard $(MISC_FILE_DIR)/*.c)
  38786. -ifneq ($(UCLIBC_HAS_LFS),y)
  38787. -MISC_FILE_SRC := $(filter-out $(MISC_FILE_DIR)/lockf64.c,$(MISC_FILE_SRC))
  38788. -endif
  38789. -MISC_FILE_OBJ := $(patsubst $(MISC_FILE_DIR)/%.c,$(MISC_FILE_OUT)/%.o,$(MISC_FILE_SRC))
  38790. +CSRC-y := $(wildcard $(MISC_FILE_DIR)/*.c)
  38791. +CSRC_LFS := $(wildcard $(MISC_FILE_DIR)/*64.c)
  38792. +CSRC-y := $(filter-out $(CSRC_LFS),$(CSRC-y))
  38793. +CSRC-$(UCLIBC_HAS_LFS) += $(CSRC_LFS)
  38794. +MISC_FILE_OBJ := $(patsubst $(MISC_FILE_DIR)/%.c,$(MISC_FILE_OUT)/%.o,$(CSRC-y))
  38795. libc-y += $(MISC_FILE_OBJ)
  38796. libc-nomulti-$(UCLIBC_HAS_LFS) += $(MISC_FILE_OUT)/lockf64.o
  38797. diff -Nur uClibc-0.9.33.2/libc/misc/fnmatch/fnmatch.c uClibc-git/libc/misc/fnmatch/fnmatch.c
  38798. --- uClibc-0.9.33.2/libc/misc/fnmatch/fnmatch.c 2012-05-15 09:20:09.000000000 +0200
  38799. +++ uClibc-git/libc/misc/fnmatch/fnmatch.c 2014-07-25 20:36:05.689328835 +0200
  38800. @@ -13,9 +13,8 @@
  38801. Lesser General Public License for more details.
  38802. You should have received a copy of the GNU Lesser General Public
  38803. - License along with the GNU C Library; if not, write to the Free
  38804. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  38805. - 02111-1307 USA. */
  38806. + License along with the GNU C Library; if not, see
  38807. + <http://www.gnu.org/licenses/>. */
  38808. #ifdef HAVE_CONFIG_H
  38809. # include <config.h>
  38810. @@ -54,10 +53,6 @@
  38811. # include <stdlib.h>
  38812. #endif
  38813. -#ifdef __UCLIBC__
  38814. -# define __memset memset
  38815. -#endif
  38816. -
  38817. /* For platform which support the ISO C amendement 1 functionality we
  38818. support user defined character classes. */
  38819. #if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
  38820. @@ -347,7 +342,7 @@
  38821. wchar_t *wstring = NULL;
  38822. /* Convert the strings into wide characters. */
  38823. - __memset (&ps, '\0', sizeof (ps));
  38824. + memset (&ps, '\0', sizeof (ps));
  38825. p = pattern;
  38826. #ifdef _LIBC
  38827. n = strnlen (pattern, 1024);
  38828. @@ -364,7 +359,7 @@
  38829. already done? */
  38830. return -1;
  38831. if (p)
  38832. - __memset (&ps, '\0', sizeof (ps));
  38833. + memset (&ps, '\0', sizeof (ps));
  38834. }
  38835. if (__builtin_expect (p != NULL, 0))
  38836. {
  38837. @@ -396,7 +391,7 @@
  38838. already done? */
  38839. return -1;
  38840. if (p)
  38841. - __memset (&ps, '\0', sizeof (ps));
  38842. + memset (&ps, '\0', sizeof (ps));
  38843. }
  38844. if (__builtin_expect (p != NULL, 0))
  38845. {
  38846. diff -Nur uClibc-0.9.33.2/libc/misc/fnmatch/fnmatch_loop.c uClibc-git/libc/misc/fnmatch/fnmatch_loop.c
  38847. --- uClibc-0.9.33.2/libc/misc/fnmatch/fnmatch_loop.c 2012-05-15 09:20:09.000000000 +0200
  38848. +++ uClibc-git/libc/misc/fnmatch/fnmatch_loop.c 2014-07-25 20:36:05.689328835 +0200
  38849. @@ -13,9 +13,8 @@
  38850. Lesser General Public License for more details.
  38851. You should have received a copy of the GNU Lesser General Public
  38852. - License along with the GNU C Library; if not, write to the Free
  38853. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  38854. - 02111-1307 USA. */
  38855. + License along with the GNU C Library; if not, see
  38856. + <http://www.gnu.org/licenses/>. */
  38857. /* Match STRING against the filename pattern PATTERN, returning zero if
  38858. it matches, nonzero if not. */
  38859. @@ -508,7 +507,7 @@
  38860. if (symb_table[2 * elem] == hash
  38861. && (c1
  38862. == extra[symb_table[2 * elem + 1]])
  38863. - && __memcmp (str,
  38864. + && memcmp (str,
  38865. &extra[symb_table[2 * elem
  38866. + 1]
  38867. + 1], c1) == 0)
  38868. @@ -729,7 +728,7 @@
  38869. if (symb_table[2 * elem] == hash
  38870. && (c1
  38871. == extra[symb_table[2 * elem + 1]])
  38872. - && __memcmp (str,
  38873. + && memcmp (str,
  38874. &extra[symb_table[2 * elem + 1]
  38875. + 1], c1) == 0)
  38876. {
  38877. diff -Nur uClibc-0.9.33.2/libc/misc/fnmatch/fnmatch_old.c uClibc-git/libc/misc/fnmatch/fnmatch_old.c
  38878. --- uClibc-0.9.33.2/libc/misc/fnmatch/fnmatch_old.c 2012-05-15 09:20:09.000000000 +0200
  38879. +++ uClibc-git/libc/misc/fnmatch/fnmatch_old.c 2014-07-25 20:36:05.689328835 +0200
  38880. @@ -12,8 +12,7 @@
  38881. You should have received a copy of the GNU Library General Public
  38882. License along with this library; see the file COPYING.LIB. If
  38883. -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  38884. -Cambridge, MA 02139, USA. */
  38885. +not, see <http://www.gnu.org/licenses/>. */
  38886. #ifdef HAVE_CONFIG_H
  38887. # include <config.h>
  38888. diff -Nur uClibc-0.9.33.2/libc/misc/fnmatch/Makefile.in uClibc-git/libc/misc/fnmatch/Makefile.in
  38889. --- uClibc-0.9.33.2/libc/misc/fnmatch/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  38890. +++ uClibc-git/libc/misc/fnmatch/Makefile.in 2014-07-25 20:36:05.689328835 +0200
  38891. @@ -7,17 +7,13 @@
  38892. subdirs += libc/misc/fnmatch
  38893. -ifeq ($(UCLIBC_HAS_FNMATCH_OLD),y)
  38894. -CSRC := fnmatch_old.c
  38895. -else
  38896. -CSRC := fnmatch.c
  38897. -endif
  38898. +CSRC-y := $(if $(UCLIBC_HAS_FNMATCH_OLD),fnmatch_old.c,fnmatch.c)
  38899. MISC_FNMATCH_DIR := $(top_srcdir)libc/misc/fnmatch
  38900. MISC_FNMATCH_OUT := $(top_builddir)libc/misc/fnmatch
  38901. -MISC_FNMATCH_SRC := $(patsubst %.c,$(MISC_FNMATCH_DIR)/%.c,$(CSRC))
  38902. -MISC_FNMATCH_OBJ := $(patsubst %.c,$(MISC_FNMATCH_OUT)/%.o,$(CSRC))
  38903. +MISC_FNMATCH_SRC := $(patsubst %.c,$(MISC_FNMATCH_DIR)/%.c,$(CSRC-y))
  38904. +MISC_FNMATCH_OBJ := $(patsubst %.c,$(MISC_FNMATCH_OUT)/%.o,$(CSRC-y))
  38905. libc-$(UCLIBC_HAS_FNMATCH) += $(MISC_FNMATCH_OBJ)
  38906. diff -Nur uClibc-0.9.33.2/libc/misc/fts/fts.c uClibc-git/libc/misc/fts/fts.c
  38907. --- uClibc-0.9.33.2/libc/misc/fts/fts.c 2012-05-15 09:20:09.000000000 +0200
  38908. +++ uClibc-git/libc/misc/fts/fts.c 2014-07-25 20:36:05.705328919 +0200
  38909. @@ -38,6 +38,7 @@
  38910. #include <unistd.h>
  38911. #ifdef __UCLIBC_HAS_LFS__
  38912. +/* this is wrong, either you include this header as first, or not at all */
  38913. # include <_lfs_64.h>
  38914. #else
  38915. # define stat64 stat
  38916. @@ -576,7 +577,7 @@
  38917. FTSENT *cur, *tail;
  38918. DIR *dirp;
  38919. void *oldaddr;
  38920. - int cderrno, descend, len, level, nlinks, saved_errno,
  38921. + int /*cderrno,*/ descend, len, level, nlinks, saved_errno,
  38922. nostat, doadjust;
  38923. size_t maxlen;
  38924. char *cp;
  38925. @@ -641,14 +642,14 @@
  38926. * needed sorted entries or stat information, they had better be
  38927. * checking FTS_NS on the returned nodes.
  38928. */
  38929. - cderrno = 0;
  38930. + /* cderrno = 0; */
  38931. if (nlinks || type == BREAD) {
  38932. if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) {
  38933. if (nlinks && type == BREAD)
  38934. cur->fts_errno = errno;
  38935. cur->fts_flags |= FTS_DONTCHDIR;
  38936. descend = 0;
  38937. - cderrno = errno;
  38938. + /* cderrno = errno; */
  38939. (void)closedir(dirp);
  38940. dirp = NULL;
  38941. } else
  38942. diff -Nur uClibc-0.9.33.2/libc/misc/fts/Makefile.in uClibc-git/libc/misc/fts/Makefile.in
  38943. --- uClibc-0.9.33.2/libc/misc/fts/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  38944. +++ uClibc-git/libc/misc/fts/Makefile.in 2014-07-25 20:36:05.705328919 +0200
  38945. @@ -7,13 +7,13 @@
  38946. #
  38947. subdirs += libc/misc/fts
  38948. -CSRC := fts.c
  38949. +CSRC-y := fts.c
  38950. MISC_FTS_DIR := $(top_srcdir)libc/misc/fts
  38951. MISC_FTS_OUT := $(top_builddir)libc/misc/fts
  38952. -MISC_FTS_SRC := $(patsubst %.c,$(MISC_FTS_DIR)/%.c,$(CSRC))
  38953. -MISC_FTS_OBJ := $(patsubst %.c,$(MISC_FTS_OUT)/%.o,$(CSRC))
  38954. +MISC_FTS_SRC := $(patsubst %.c,$(MISC_FTS_DIR)/%.c,$(CSRC-y))
  38955. +MISC_FTS_OBJ := $(patsubst %.c,$(MISC_FTS_OUT)/%.o,$(CSRC-y))
  38956. libc-$(UCLIBC_HAS_FTS) += $(MISC_FTS_OBJ)
  38957. diff -Nur uClibc-0.9.33.2/libc/misc/ftw/ftw64.c uClibc-git/libc/misc/ftw/ftw64.c
  38958. --- uClibc-0.9.33.2/libc/misc/ftw/ftw64.c 2012-05-15 09:20:09.000000000 +0200
  38959. +++ uClibc-git/libc/misc/ftw/ftw64.c 2014-07-25 20:36:05.713328961 +0200
  38960. @@ -14,9 +14,8 @@
  38961. Lesser General Public License for more details.
  38962. You should have received a copy of the GNU Lesser General Public
  38963. - License along with the GNU C Library; if not, write to the Free
  38964. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  38965. - 02111-1307 USA. */
  38966. + License along with the GNU C Library; if not, see
  38967. + <http://www.gnu.org/licenses/>. */
  38968. #define FTW_NAME ftw64
  38969. #define NFTW_NAME nftw64
  38970. diff -Nur uClibc-0.9.33.2/libc/misc/ftw/ftw.c uClibc-git/libc/misc/ftw/ftw.c
  38971. --- uClibc-0.9.33.2/libc/misc/ftw/ftw.c 2012-05-15 09:20:09.000000000 +0200
  38972. +++ uClibc-git/libc/misc/ftw/ftw.c 2014-07-25 20:36:05.713328961 +0200
  38973. @@ -14,15 +14,16 @@
  38974. Lesser General Public License for more details.
  38975. You should have received a copy of the GNU Lesser General Public
  38976. - License along with the GNU C Library; if not, write to the Free
  38977. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  38978. - 02111-1307 USA. */
  38979. + License along with the GNU C Library; if not, see
  38980. + <http://www.gnu.org/licenses/>. */
  38981. #ifdef HAVE_CONFIG_H
  38982. # include <config.h>
  38983. #endif
  38984. #include <features.h>
  38985. +/* need errno.h before undefining _LIBC */
  38986. +#include <errno.h>
  38987. #ifdef __UCLIBC__
  38988. #undef _LIBC
  38989. #define HAVE_DIRENT_H 1
  38990. @@ -32,6 +33,7 @@
  38991. #endif
  38992. #if __GNUC__
  38993. +# undef alloca
  38994. # define alloca __builtin_alloca
  38995. #else
  38996. # if HAVE_ALLOCA_H
  38997. @@ -67,7 +69,6 @@
  38998. # endif
  38999. #endif
  39000. -#include <errno.h>
  39001. #include <ftw.h>
  39002. #include <limits.h>
  39003. #include <search.h>
  39004. @@ -77,11 +78,7 @@
  39005. #if HAVE_SYS_PARAM_H || defined _LIBC
  39006. # include <sys/param.h>
  39007. #endif
  39008. -#ifdef _LIBC
  39009. -# include <include/sys/stat.h>
  39010. -#else
  39011. -# include <sys/stat.h>
  39012. -#endif
  39013. +#include <sys/stat.h>
  39014. #if !defined _LIBC && !HAVE_DECL_STPCPY && !defined stpcpy
  39015. char *stpcpy ();
  39016. diff -Nur uClibc-0.9.33.2/libc/misc/ftw/Makefile.in uClibc-git/libc/misc/ftw/Makefile.in
  39017. --- uClibc-0.9.33.2/libc/misc/ftw/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  39018. +++ uClibc-git/libc/misc/ftw/Makefile.in 2014-07-25 20:36:05.713328961 +0200
  39019. @@ -7,16 +7,14 @@
  39020. subdirs += libc/misc/ftw
  39021. -CSRC := ftw.c
  39022. -ifeq ($(UCLIBC_HAS_LFS),y)
  39023. -CSRC += ftw64.c
  39024. -endif
  39025. +CSRC-y := ftw.c
  39026. +CSRC-$(UCLIBC_HAS_LFS) += ftw64.c
  39027. MISC_FTW_DIR := $(top_srcdir)libc/misc/ftw
  39028. MISC_FTW_OUT := $(top_builddir)libc/misc/ftw
  39029. -MISC_FTW_SRC := $(patsubst %.c,$(MISC_FTW_DIR)/%.c,$(CSRC))
  39030. -MISC_FTW_OBJ := $(patsubst %.c,$(MISC_FTW_OUT)/%.o,$(CSRC))
  39031. +MISC_FTW_SRC := $(patsubst %.c,$(MISC_FTW_DIR)/%.c,$(CSRC-y))
  39032. +MISC_FTW_OBJ := $(patsubst %.c,$(MISC_FTW_OUT)/%.o,$(CSRC-y))
  39033. libc-$(findstring y,$(UCLIBC_HAS_FTW)$(UCLIBC_HAS_NFTW)) += $(MISC_FTW_OBJ)
  39034. diff -Nur uClibc-0.9.33.2/libc/misc/glob/glob.c uClibc-git/libc/misc/glob/glob.c
  39035. --- uClibc-0.9.33.2/libc/misc/glob/glob.c 2012-05-15 09:20:09.000000000 +0200
  39036. +++ uClibc-git/libc/misc/glob/glob.c 2014-07-25 20:36:05.729329044 +0200
  39037. @@ -12,9 +12,8 @@
  39038. Lesser General Public License for more details.
  39039. You should have received a copy of the GNU Lesser General Public
  39040. - License along with the GNU C Library; if not, write to the Free
  39041. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  39042. - 02111-1307 USA. */
  39043. + License along with the GNU C Library; if not, see
  39044. + <http://www.gnu.org/licenses/>. */
  39045. #undef ENABLE_GLOB_BRACE_EXPANSION
  39046. #undef ENABLE_GLOB_TILDE_EXPANSION
  39047. diff -Nur uClibc-0.9.33.2/libc/misc/glob/Makefile.in uClibc-git/libc/misc/glob/Makefile.in
  39048. --- uClibc-0.9.33.2/libc/misc/glob/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  39049. +++ uClibc-git/libc/misc/glob/Makefile.in 2014-07-25 20:36:05.729329044 +0200
  39050. @@ -7,23 +7,15 @@
  39051. subdirs += libc/misc/glob
  39052. -ifeq ($(UCLIBC_HAS_GNU_GLOB),y)
  39053. -CSRC := glob.c
  39054. -ifeq ($(UCLIBC_HAS_LFS),y)
  39055. -CSRC += glob64.c
  39056. -endif
  39057. -else
  39058. -CSRC := glob-susv3.c
  39059. -ifeq ($(UCLIBC_HAS_LFS),y)
  39060. -CSRC += glob64-susv3.c
  39061. -endif
  39062. -endif
  39063. +VARIANT := $(if $(UCLIBC_HAS_GNU_GLOB),,-susv3)
  39064. +CSRC-y := glob$(VARIANT).c
  39065. +CSRC-$(UCLIBC_HAS_LFS) += glob64$(VARIANT).c
  39066. MISC_GLOB_DIR := $(top_srcdir)libc/misc/glob
  39067. MISC_GLOB_OUT := $(top_builddir)libc/misc/glob
  39068. -MISC_GLOB_SRC := $(patsubst %.c,$(MISC_GLOB_DIR)/%.c,$(CSRC))
  39069. -MISC_GLOB_OBJ := $(patsubst %.c,$(MISC_GLOB_OUT)/%.o,$(CSRC))
  39070. +MISC_GLOB_SRC := $(patsubst %.c,$(MISC_GLOB_DIR)/%.c,$(CSRC-y))
  39071. +MISC_GLOB_OBJ := $(patsubst %.c,$(MISC_GLOB_OUT)/%.o,$(CSRC-y))
  39072. libc-$(UCLIBC_HAS_GLOB) += $(MISC_GLOB_OBJ)
  39073. diff -Nur uClibc-0.9.33.2/libc/misc/gnu/Makefile.in uClibc-git/libc/misc/gnu/Makefile.in
  39074. --- uClibc-0.9.33.2/libc/misc/gnu/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  39075. +++ uClibc-git/libc/misc/gnu/Makefile.in 2014-07-25 20:36:05.745329128 +0200
  39076. @@ -7,13 +7,14 @@
  39077. subdirs += libc/misc/gnu
  39078. -CSRC := obstack.c
  39079. +CSRC-y :=
  39080. +CSRC-$(UCLIBC_HAS_OBSTACK) := obstack.c obprintf.c
  39081. MISC_GNU_DIR := $(top_srcdir)libc/misc/gnu
  39082. MISC_GNU_OUT := $(top_builddir)libc/misc/gnu
  39083. -MISC_GNU_SRC := $(MISC_GNU_DIR)/obstack.c
  39084. -MISC_GNU_OBJ := $(MISC_GNU_OUT)/obstack.o
  39085. +MISC_GNU_SRC := $(patsubst %.c,$(MISC_GNU_DIR)/%.c,$(CSRC-y))
  39086. +MISC_GNU_OBJ := $(patsubst %.c,$(MISC_GNU_OUT)/%.o,$(CSRC-y))
  39087. libc-y += $(MISC_GNU_OBJ)
  39088. diff -Nur uClibc-0.9.33.2/libc/misc/gnu/obprintf.c uClibc-git/libc/misc/gnu/obprintf.c
  39089. --- uClibc-0.9.33.2/libc/misc/gnu/obprintf.c 1970-01-01 01:00:00.000000000 +0100
  39090. +++ uClibc-git/libc/misc/gnu/obprintf.c 2014-07-25 20:36:05.745329128 +0200
  39091. @@ -0,0 +1,29 @@
  39092. +/* Copyright (C) 2013 Gentoo Foundation
  39093. + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  39094. + */
  39095. +
  39096. +#include <stdio.h>
  39097. +#include <stdarg.h>
  39098. +#include <obstack.h>
  39099. +
  39100. +int
  39101. +obstack_vprintf (struct obstack *obstack, const char *format, va_list args)
  39102. +{
  39103. + int n;
  39104. + char *s;
  39105. + n = vasprintf(&s, format, args);
  39106. + obstack_grow(obstack, s, n);
  39107. + return n;
  39108. +}
  39109. +libc_hidden_def(obstack_vprintf)
  39110. +
  39111. +int
  39112. +obstack_printf (struct obstack *obstack, const char *format, ...)
  39113. +{
  39114. + int n;
  39115. + va_list ap;
  39116. + va_start (ap, format);
  39117. + n = obstack_vprintf (obstack, format, ap);
  39118. + va_end (ap);
  39119. + return n;
  39120. +}
  39121. diff -Nur uClibc-0.9.33.2/libc/misc/gnu/obstack.c uClibc-git/libc/misc/gnu/obstack.c
  39122. --- uClibc-0.9.33.2/libc/misc/gnu/obstack.c 2012-05-15 09:20:09.000000000 +0200
  39123. +++ uClibc-git/libc/misc/gnu/obstack.c 2014-07-25 20:36:05.745329128 +0200
  39124. @@ -14,9 +14,8 @@
  39125. Lesser General Public License for more details.
  39126. You should have received a copy of the GNU Lesser General Public
  39127. - License along with the GNU C Library; if not, write to the Free
  39128. - Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  39129. - Boston, MA 02110-1301, USA. */
  39130. + License along with the GNU C Library; if not, see
  39131. + <http://www.gnu.org/licenses/>. */
  39132. #ifdef HAVE_CONFIG_H
  39133. @@ -30,11 +29,6 @@
  39134. #else
  39135. # define HAVE_INTTYPES_H 1
  39136. # define HAVE_STDINT_H 1
  39137. -# define SHLIB_COMPAT(x,y,z) 0
  39138. -# undef libc_hidden_def
  39139. -# define libc_hidden_def(x)
  39140. -# undef strong_alias
  39141. -# define strong_alias(x,y)
  39142. #endif
  39143. #else
  39144. # include "obstack.h"
  39145. @@ -112,19 +106,19 @@
  39146. `print_and_abort'. */
  39147. static void print_and_abort (void);
  39148. static void (*__obstack_alloc_failed_handler) (void) = print_and_abort;
  39149. -weak_alias(__obstack_alloc_failed_handler,obstack_alloc_failed_handler)
  39150. +strong_alias(__obstack_alloc_failed_handler,obstack_alloc_failed_handler)
  39151. /* Exit value used when `print_and_abort' is used. */
  39152. # include <stdlib.h>
  39153. # ifdef _LIBC
  39154. static int __obstack_exit_failure = EXIT_FAILURE;
  39155. -weak_alias(__obstack_exit_failure,obstack_exit_failure)
  39156. +strong_alias(__obstack_exit_failure,obstack_exit_failure)
  39157. # else
  39158. # include "exitfail.h"
  39159. # define __obstack_exit_failure exit_failure
  39160. # endif
  39161. -# ifdef _LIBC
  39162. +# if 0
  39163. # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
  39164. /* A looong time ago (before 1994, anyway; we're not sure) this global variable
  39165. was used by non-GNU-C macros to avoid multiple evaluation. The GNU C
  39166. @@ -328,9 +322,7 @@
  39167. /* The new chunk certainly contains no empty object yet. */
  39168. h->maybe_empty_object = 0;
  39169. }
  39170. -# ifdef _LIBC
  39171. -libc_hidden_def (_obstack_newchunk)
  39172. -# endif
  39173. +libc_hidden_def(_obstack_newchunk)
  39174. /* Return nonzero if object OBJ has been allocated from obstack H.
  39175. This is here for debugging.
  39176. @@ -393,7 +385,7 @@
  39177. abort ();
  39178. }
  39179. -# ifdef _LIBC
  39180. +# if 0
  39181. /* Older versions of libc used a function _obstack_free intended to be
  39182. called by non-GCC compilers. */
  39183. strong_alias (obstack_free, _obstack_free)
  39184. @@ -418,9 +410,6 @@
  39185. # else
  39186. # include "gettext.h"
  39187. # endif
  39188. -/* NLS: Disable gettext in obstack for now: */
  39189. -# undef _
  39190. -# define _(Str) (Str)
  39191. # ifndef _
  39192. # define _(msgid) gettext (msgid)
  39193. # endif
  39194. diff -Nur uClibc-0.9.33.2/libc/misc/internals/errno.c uClibc-git/libc/misc/internals/errno.c
  39195. --- uClibc-0.9.33.2/libc/misc/internals/errno.c 2012-05-15 09:20:09.000000000 +0200
  39196. +++ uClibc-git/libc/misc/internals/errno.c 2014-07-25 20:36:05.769329254 +0200
  39197. @@ -1,21 +1,14 @@
  39198. #include <features.h>
  39199. +#include <errno.h>
  39200. +#undef errno
  39201. #ifdef __UCLIBC_HAS_TLS__
  39202. __thread int errno;
  39203. -__thread int h_errno;
  39204. -
  39205. extern __thread int __libc_errno __attribute__ ((alias ("errno"))) attribute_hidden;
  39206. -extern __thread int __libc_h_errno __attribute__ ((alias ("h_errno"))) attribute_hidden;
  39207. -#define h_errno __libc_h_errno
  39208. -
  39209. #else
  39210. -#include "internal_errno.h"
  39211. +extern int errno;
  39212. int errno = 0;
  39213. -int h_errno = 0;
  39214. -#ifdef __UCLIBC_HAS_THREADS__
  39215. -libc_hidden_def(errno)
  39216. -weak_alias(errno, _errno)
  39217. -libc_hidden_def(h_errno)
  39218. -weak_alias(h_errno, _h_errno)
  39219. -#endif
  39220. +# ifdef __UCLIBC_HAS_THREADS__
  39221. +strong_alias(errno,_errno)
  39222. +# endif
  39223. #endif
  39224. diff -Nur uClibc-0.9.33.2/libc/misc/internals/__errno_location.c uClibc-git/libc/misc/internals/__errno_location.c
  39225. --- uClibc-0.9.33.2/libc/misc/internals/__errno_location.c 2012-05-15 09:20:09.000000000 +0200
  39226. +++ uClibc-git/libc/misc/internals/__errno_location.c 2014-07-25 20:36:05.769329254 +0200
  39227. @@ -4,17 +4,15 @@
  39228. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  39229. */
  39230. -#include "internal_errno.h"
  39231. +#include <features.h>
  39232. +#include <errno.h>
  39233. -/* psm: moved to bits/errno.h: */
  39234. -int *
  39235. -#ifndef __UCLIBC_HAS_THREADS__
  39236. -weak_const_function
  39237. +#ifndef __UCLIBC_HAS_TLS__
  39238. +# undef errno
  39239. +extern int errno;
  39240. #endif
  39241. -__errno_location (void)
  39242. +
  39243. +int weak_const_function *__errno_location(void)
  39244. {
  39245. return &errno;
  39246. }
  39247. -#ifdef IS_IN_libc /* not really need, only to keep in sync w/ libc_hidden_proto */
  39248. -libc_hidden_weak(__errno_location)
  39249. -#endif
  39250. diff -Nur uClibc-0.9.33.2/libc/misc/internals/h_errno.c uClibc-git/libc/misc/internals/h_errno.c
  39251. --- uClibc-0.9.33.2/libc/misc/internals/h_errno.c 1970-01-01 01:00:00.000000000 +0100
  39252. +++ uClibc-git/libc/misc/internals/h_errno.c 2014-07-25 20:36:05.769329254 +0200
  39253. @@ -0,0 +1,14 @@
  39254. +#include <features.h>
  39255. +#include <netdb.h>
  39256. +#undef h_errno
  39257. +
  39258. +#ifdef __UCLIBC_HAS_TLS__
  39259. +__thread int h_errno;
  39260. +extern __thread int __libc_h_errno __attribute__ ((alias ("h_errno"))) attribute_hidden;
  39261. +#else
  39262. +extern int h_errno;
  39263. +int h_errno = 0;
  39264. +# ifdef __UCLIBC_HAS_THREADS__
  39265. +strong_alias(h_errno,_h_errno)
  39266. +# endif
  39267. +#endif
  39268. diff -Nur uClibc-0.9.33.2/libc/misc/internals/__h_errno_location.c uClibc-git/libc/misc/internals/__h_errno_location.c
  39269. --- uClibc-0.9.33.2/libc/misc/internals/__h_errno_location.c 2012-05-15 09:20:09.000000000 +0200
  39270. +++ uClibc-git/libc/misc/internals/__h_errno_location.c 2014-07-25 20:36:05.769329254 +0200
  39271. @@ -4,10 +4,15 @@
  39272. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  39273. */
  39274. -#include "internal_errno.h"
  39275. +#include <features.h>
  39276. +#include <netdb.h>
  39277. -int * weak_const_function __h_errno_location (void)
  39278. +#ifndef __UCLIBC_HAS_TLS__
  39279. +# undef h_errno
  39280. +extern int h_errno;
  39281. +#endif
  39282. +
  39283. +int weak_const_function *__h_errno_location(void)
  39284. {
  39285. return &h_errno;
  39286. }
  39287. -libc_hidden_weak(__h_errno_location)
  39288. diff -Nur uClibc-0.9.33.2/libc/misc/internals/internal_errno.h uClibc-git/libc/misc/internals/internal_errno.h
  39289. --- uClibc-0.9.33.2/libc/misc/internals/internal_errno.h 2012-05-15 09:20:09.000000000 +0200
  39290. +++ uClibc-git/libc/misc/internals/internal_errno.h 1970-01-01 01:00:00.000000000 +0100
  39291. @@ -1,21 +0,0 @@
  39292. -/*
  39293. - *
  39294. - */
  39295. -
  39296. -#include <features.h>
  39297. -#include <errno.h>
  39298. -#include <netdb.h>
  39299. -
  39300. -#ifndef __UCLIBC_HAS_TLS__
  39301. -
  39302. -#undef errno
  39303. -#undef h_errno
  39304. -
  39305. -extern int h_errno;
  39306. -extern int errno;
  39307. -
  39308. -#ifdef __UCLIBC_HAS_THREADS__
  39309. -libc_hidden_proto(h_errno)
  39310. -libc_hidden_proto(errno)
  39311. -#endif
  39312. -#endif
  39313. diff -Nur uClibc-0.9.33.2/libc/misc/internals/Makefile.in uClibc-git/libc/misc/internals/Makefile.in
  39314. --- uClibc-0.9.33.2/libc/misc/internals/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  39315. +++ uClibc-git/libc/misc/internals/Makefile.in 2014-07-25 20:36:05.769329254 +0200
  39316. @@ -7,14 +7,14 @@
  39317. subdirs += libc/misc/internals
  39318. -CSRC := tempname.c errno.c __errno_location.c __h_errno_location.c \
  39319. +CSRC-y := tempname.c errno.c h_errno.c __errno_location.c __h_errno_location.c \
  39320. parse_config.c
  39321. MISC_INTERNALS_DIR := $(top_srcdir)libc/misc/internals
  39322. MISC_INTERNALS_OUT := $(top_builddir)libc/misc/internals
  39323. -MISC_INTERNALS_SRC := $(patsubst %.c,$(MISC_INTERNALS_DIR)/%.c,$(CSRC))
  39324. -MISC_INTERNALS_OBJ := $(patsubst %.c,$(MISC_INTERNALS_OUT)/%.o,$(CSRC))
  39325. +MISC_INTERNALS_SRC := $(patsubst %.c,$(MISC_INTERNALS_DIR)/%.c,$(CSRC-y))
  39326. +MISC_INTERNALS_OBJ := $(patsubst %.c,$(MISC_INTERNALS_OUT)/%.o,$(CSRC-y))
  39327. CFLAGS-__uClibc_main.c := $(SSP_DISABLE_FLAGS)
  39328. diff -Nur uClibc-0.9.33.2/libc/misc/internals/parse_config.c uClibc-git/libc/misc/internals/parse_config.c
  39329. --- uClibc-0.9.33.2/libc/misc/internals/parse_config.c 2012-05-15 09:20:09.000000000 +0200
  39330. +++ uClibc-git/libc/misc/internals/parse_config.c 2014-07-25 20:36:05.769329254 +0200
  39331. @@ -129,7 +129,7 @@
  39332. return parser;
  39333. }
  39334. -parser_t attribute_hidden * FAST_FUNC config_open(const char *filename)
  39335. +parser_t * FAST_FUNC config_open(const char *filename)
  39336. {
  39337. return config_open2(filename, fopen_or_warn_stdin);
  39338. }
  39339. @@ -142,7 +142,7 @@
  39340. }
  39341. #endif
  39342. -void attribute_hidden FAST_FUNC config_close(parser_t *parser)
  39343. +void FAST_FUNC config_close(parser_t *parser)
  39344. {
  39345. if (parser) {
  39346. fclose(parser->fp);
  39347. @@ -176,7 +176,7 @@
  39348. (but more than 0) are found. Empty lines are always skipped (not warned about).
  39349. */
  39350. #undef config_read
  39351. -int attribute_hidden FAST_FUNC config_read(parser_t *parser, char ***tokens,
  39352. +int FAST_FUNC config_read(parser_t *parser, char ***tokens,
  39353. unsigned flags, const char *delims)
  39354. {
  39355. char *line;
  39356. diff -Nur uClibc-0.9.33.2/libc/misc/internals/tempname.c uClibc-git/libc/misc/internals/tempname.c
  39357. --- uClibc-0.9.33.2/libc/misc/internals/tempname.c 2012-05-15 09:20:09.000000000 +0200
  39358. +++ uClibc-git/libc/misc/internals/tempname.c 2014-07-25 20:36:05.769329254 +0200
  39359. @@ -13,8 +13,7 @@
  39360. You should have received a copy of the GNU Library General Public
  39361. License along with the GNU C Library; see the file COPYING.LIB. If not,
  39362. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  39363. - Boston, MA 02111-1307, USA. */
  39364. + see <http://www.gnu.org/licenses/>. */
  39365. /* March 11, 2002 Manuel Novoa III
  39366. *
  39367. @@ -58,7 +57,7 @@
  39368. for use with mk[s]temp. Will fail (-1) if DIR is non-null and
  39369. doesn't exist, none of the searched dirs exists, or there's not
  39370. enough space in TMPL. */
  39371. -int attribute_hidden ___path_search (char *tmpl, size_t tmpl_len, const char *dir,
  39372. +int ___path_search (char *tmpl, size_t tmpl_len, const char *dir,
  39373. const char *pfx /*, int try_tmpdir*/)
  39374. {
  39375. /*const char *d; */
  39376. diff -Nur uClibc-0.9.33.2/libc/misc/internals/__uClibc_main.c uClibc-git/libc/misc/internals/__uClibc_main.c
  39377. --- uClibc-0.9.33.2/libc/misc/internals/__uClibc_main.c 2012-05-15 09:20:09.000000000 +0200
  39378. +++ uClibc-git/libc/misc/internals/__uClibc_main.c 2014-07-25 20:36:05.769329254 +0200
  39379. @@ -15,9 +15,6 @@
  39380. */
  39381. #include <features.h>
  39382. -#ifndef __UCLIBC_HAS_THREADS_NATIVE__
  39383. -#define _ERRNO_H
  39384. -#endif
  39385. #include <unistd.h>
  39386. #include <stdlib.h>
  39387. #include <string.h>
  39388. @@ -25,20 +22,23 @@
  39389. #include <link.h>
  39390. #include <bits/uClibc_page.h>
  39391. #include <paths.h>
  39392. -#include <unistd.h>
  39393. -#include <asm/errno.h>
  39394. +#include <errno.h>
  39395. +#include <netdb.h>
  39396. +#include <stdio.h>
  39397. +#ifndef __ARCH_HAS_NO_LDSO__
  39398. #include <fcntl.h>
  39399. -#include <sys/stat.h>
  39400. -#include <sys/sysmacros.h>
  39401. +#endif
  39402. #ifdef __UCLIBC_HAS_THREADS_NATIVE__
  39403. -#include <errno.h>
  39404. #include <pthread-functions.h>
  39405. #include <not-cancel.h>
  39406. #include <atomic.h>
  39407. #endif
  39408. #ifdef __UCLIBC_HAS_THREADS__
  39409. #include <pthread.h>
  39410. -#endif
  39411. +#endif
  39412. +#ifdef __UCLIBC_HAS_LOCALE__
  39413. +#include <locale.h>
  39414. +#endif
  39415. #ifndef SHARED
  39416. void *__libc_stack_end = NULL;
  39417. @@ -116,12 +116,6 @@
  39418. /*
  39419. * Prototypes.
  39420. */
  39421. -extern int *weak_const_function __errno_location(void);
  39422. -extern int *weak_const_function __h_errno_location(void);
  39423. -extern void weak_function _stdio_init(void) attribute_hidden;
  39424. -#ifdef __UCLIBC_HAS_LOCALE__
  39425. -extern void weak_function _locale_init(void) attribute_hidden;
  39426. -#endif
  39427. #ifdef __UCLIBC_HAS_THREADS__
  39428. #if !defined (__UCLIBC_HAS_THREADS_NATIVE__) || defined (SHARED)
  39429. extern void weak_function __pthread_initialize_minimal(void);
  39430. @@ -146,18 +140,24 @@
  39431. # endif
  39432. #endif
  39433. -#if defined (__LDSO_STANDALONE_SUPPORT__) && defined (SHARED) && defined __sh__
  39434. -extern unsigned long _dl_skip_args;
  39435. +#ifdef SHARED
  39436. +extern int _dl_secure;
  39437. #endif
  39438. +extern size_t _dl_pagesize;
  39439. -attribute_hidden const char *__uclibc_progname = "";
  39440. -#ifdef __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__
  39441. -const char *program_invocation_short_name = "";
  39442. -const char *program_invocation_name = "";
  39443. -#endif
  39444. -#ifdef __UCLIBC_HAS___PROGNAME__
  39445. -weak_alias (program_invocation_short_name, __progname)
  39446. -weak_alias (program_invocation_name, __progname_full)
  39447. +const char *__uclibc_progname = "";
  39448. +#if !defined __UCLIBC_HAS___PROGNAME__ && defined __USE_GNU && defined __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__
  39449. +# define __progname program_invocation_short_name
  39450. +# define __progname_full program_invocation_name
  39451. +#endif
  39452. +#if defined __UCLIBC_HAS___PROGNAME__ || (defined __USE_GNU && defined __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__)
  39453. +const char *__progname = "";
  39454. +/* psm: why have a visible __progname_full? */
  39455. +const char *__progname_full = "";
  39456. +# if defined __UCLIBC_HAS___PROGNAME__ && defined __USE_GNU && defined __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__
  39457. +weak_alias (__progname, program_invocation_short_name)
  39458. +weak_alias (__progname_full, program_invocation_name)
  39459. +# endif
  39460. #endif
  39461. /*
  39462. @@ -167,7 +167,6 @@
  39463. char **__environ = 0;
  39464. weak_alias(__environ, environ)
  39465. -/* TODO: don't export __pagesize; we cant now because libpthread uses it */
  39466. size_t __pagesize = 0;
  39467. #ifndef O_NOFOLLOW
  39468. @@ -192,6 +191,7 @@
  39469. }
  39470. }
  39471. +#ifndef SHARED
  39472. static int __check_suid(void)
  39473. {
  39474. uid_t uid, euid;
  39475. @@ -208,6 +208,7 @@
  39476. return 0; /* we are not suid */
  39477. }
  39478. #endif
  39479. +#endif
  39480. /* __uClibc_init completely initialize uClibc so it is ready to use.
  39481. *
  39482. @@ -222,8 +223,7 @@
  39483. * __uClibc_main.
  39484. */
  39485. -extern void __uClibc_init(void);
  39486. -libc_hidden_proto(__uClibc_init)
  39487. +extern void __uClibc_init(void) attribute_hidden;
  39488. void __uClibc_init(void)
  39489. {
  39490. /* Don't recurse */
  39491. @@ -276,7 +276,6 @@
  39492. _stdio_init();
  39493. }
  39494. -libc_hidden_def(__uClibc_init)
  39495. #ifdef __UCLIBC_CTOR_DTOR__
  39496. void attribute_hidden (*__app_fini)(void) = NULL;
  39497. @@ -284,8 +283,7 @@
  39498. void attribute_hidden (*__rtld_fini)(void) = NULL;
  39499. -extern void __uClibc_fini(void);
  39500. -libc_hidden_proto(__uClibc_fini)
  39501. +extern void __uClibc_fini(void) attribute_hidden;
  39502. void __uClibc_fini(void)
  39503. {
  39504. #ifdef __UCLIBC_CTOR_DTOR__
  39505. @@ -304,7 +302,6 @@
  39506. if (__rtld_fini != NULL)
  39507. (__rtld_fini)();
  39508. }
  39509. -libc_hidden_def(__uClibc_fini)
  39510. #ifndef SHARED
  39511. extern void __nptl_deallocate_tsd (void) __attribute ((weak));
  39512. @@ -323,7 +320,7 @@
  39513. char **argv, void (*app_init)(void), void (*app_fini)(void),
  39514. void (*rtld_fini)(void), void *stack_end attribute_unused)
  39515. {
  39516. -#ifndef __ARCH_HAS_NO_LDSO__
  39517. +#if !defined __ARCH_HAS_NO_LDSO__ && !defined SHARED
  39518. unsigned long *aux_dat;
  39519. ElfW(auxv_t) auxvt[AT_EGID + 1];
  39520. #endif
  39521. @@ -339,18 +336,6 @@
  39522. __rtld_fini = rtld_fini;
  39523. -#if defined __LDSO_STANDALONE_SUPPORT__ && defined SHARED && defined __sh__
  39524. - /*
  39525. - * Skip ld.so and its arguments
  39526. - * Other archs except for SH do this in _dl_start before passing
  39527. - * control to the application.
  39528. - * FIXME: align SH _dl_start to other archs and remove this from here,
  39529. - * so that we can keep the visibility hidden.
  39530. - */
  39531. - argc -= _dl_skip_args;
  39532. - argv += _dl_skip_args;
  39533. -#endif
  39534. -
  39535. /* The environment begins right after argv. */
  39536. __environ = &argv[argc + 1];
  39537. @@ -361,7 +346,7 @@
  39538. __environ = &argv[argc];
  39539. }
  39540. -#ifndef __ARCH_HAS_NO_LDSO__
  39541. +#if !defined __ARCH_HAS_NO_LDSO__ && !defined SHARED
  39542. /* Pull stuff from the ELF header when possible */
  39543. memset(auxvt, 0x00, sizeof(auxvt));
  39544. aux_dat = (unsigned long*)__environ;
  39545. @@ -376,13 +361,11 @@
  39546. }
  39547. aux_dat += 2;
  39548. }
  39549. -#ifndef SHARED
  39550. /* Get the program headers (_dl_phdr) from the aux vector
  39551. It will be used into __libc_setup_tls. */
  39552. _dl_aux_init (auxvt);
  39553. #endif
  39554. -#endif
  39555. /* We need to initialize uClibc. If we are dynamically linked this
  39556. * may have already been completed by the shared lib loader. We call
  39557. @@ -390,15 +373,20 @@
  39558. __uClibc_init();
  39559. #ifndef __ARCH_HAS_NO_LDSO__
  39560. - /* Make certain getpagesize() gives the correct answer */
  39561. - __pagesize = (auxvt[AT_PAGESZ].a_un.a_val)? auxvt[AT_PAGESZ].a_un.a_val : PAGE_SIZE;
  39562. + /* Make certain getpagesize() gives the correct answer.
  39563. + * _dl_pagesize is defined into ld.so if SHARED or into libc.a otherwise. */
  39564. + __pagesize = _dl_pagesize;
  39565. +#ifndef SHARED
  39566. /* Prevent starting SUID binaries where the stdin. stdout, and
  39567. * stderr file descriptors are not already opened. */
  39568. if ((auxvt[AT_UID].a_un.a_val == (size_t)-1 && __check_suid()) ||
  39569. (auxvt[AT_UID].a_un.a_val != (size_t)-1 &&
  39570. (auxvt[AT_UID].a_un.a_val != auxvt[AT_EUID].a_un.a_val ||
  39571. auxvt[AT_GID].a_un.a_val != auxvt[AT_EGID].a_un.a_val)))
  39572. +#else
  39573. + if (_dl_secure)
  39574. +#endif
  39575. {
  39576. __check_one_fd (STDIN_FILENO, O_RDONLY | O_NOFOLLOW);
  39577. __check_one_fd (STDOUT_FILENO, O_RDWR | O_NOFOLLOW);
  39578. @@ -407,14 +395,14 @@
  39579. #endif
  39580. __uclibc_progname = *argv;
  39581. -#ifdef __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__
  39582. +#if defined __UCLIBC_HAS___PROGNAME__ || (defined __USE_GNU && defined __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__)
  39583. if (*argv != NULL) {
  39584. - program_invocation_name = *argv;
  39585. - program_invocation_short_name = strrchr(*argv, '/');
  39586. - if (program_invocation_short_name != NULL)
  39587. - ++program_invocation_short_name;
  39588. + __progname_full = *argv;
  39589. + __progname = strrchr(*argv, '/');
  39590. + if (__progname != NULL)
  39591. + ++__progname;
  39592. else
  39593. - program_invocation_short_name = program_invocation_name;
  39594. + __progname = *argv;
  39595. }
  39596. #endif
  39597. diff -Nur uClibc-0.9.33.2/libc/misc/locale/locale.c uClibc-git/libc/misc/locale/locale.c
  39598. --- uClibc-0.9.33.2/libc/misc/locale/locale.c 2012-05-15 09:20:09.000000000 +0200
  39599. +++ uClibc-git/libc/misc/locale/locale.c 2014-07-25 20:36:05.785329337 +0200
  39600. @@ -11,8 +11,8 @@
  39601. * Library General Public License for more details.
  39602. *
  39603. * You should have received a copy of the GNU Library General Public
  39604. - * License along with this library; if not, write to the Free
  39605. - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  39606. + * License along with this library; if not, see
  39607. + * <http://www.gnu.org/licenses/>.
  39608. */
  39609. /* Nov. 1, 2002
  39610. @@ -85,19 +85,17 @@
  39611. #endif
  39612. #endif
  39613. -/* Need to include this before locale.h and xlocale.h! */
  39614. +/* Need to include this before locale.h! */
  39615. #include <bits/uClibc_locale.h>
  39616. #undef CODESET_LIST
  39617. #define CODESET_LIST (__locale_mmap->codeset_list)
  39618. #ifdef __UCLIBC_HAS_XLOCALE__
  39619. -#include <xlocale.h>
  39620. #include <locale.h>
  39621. #else /* __UCLIBC_HAS_XLOCALE__ */
  39622. /* We need this internally... */
  39623. #define __UCLIBC_HAS_XLOCALE__ 1
  39624. -#include <xlocale.h>
  39625. #include <locale.h>
  39626. #undef __UCLIBC_HAS_XLOCALE__
  39627. #endif /* __UCLIBC_HAS_XLOCALE__ */
  39628. @@ -908,7 +906,6 @@
  39629. _locale_set_l((unsigned char*) C_LOCALE_SELECTOR, base);
  39630. }
  39631. -void _locale_init(void) attribute_hidden;
  39632. void _locale_init(void)
  39633. {
  39634. /* TODO: mmap the locale file */
  39635. @@ -1396,6 +1393,7 @@
  39636. {
  39637. return __curlocale_var; /* This is overriden by the thread version. */
  39638. }
  39639. +libc_hidden_weak(__curlocale)
  39640. __locale_t weak_function __curlocale_set(__locale_t newloc)
  39641. {
  39642. @@ -1404,6 +1402,7 @@
  39643. __curlocale_var = newloc;
  39644. return oldloc;
  39645. }
  39646. +libc_hidden_weak(__curlocale_set)
  39647. #endif
  39648. diff -Nur uClibc-0.9.33.2/libc/misc/locale/Makefile.in uClibc-git/libc/misc/locale/Makefile.in
  39649. --- uClibc-0.9.33.2/libc/misc/locale/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  39650. +++ uClibc-git/libc/misc/locale/Makefile.in 2014-07-25 20:36:05.785329337 +0200
  39651. @@ -8,19 +8,16 @@
  39652. subdirs += libc/misc/locale
  39653. # multi source locale.c
  39654. -CSRC := setlocale.c localeconv.c _locale_init.c nl_langinfo.c
  39655. -ifeq ($(UCLIBC_HAS_LOCALE),y)
  39656. -CSRC += newlocale.c __locale_mbrtowc_l.c
  39657. -endif
  39658. -ifeq ($(UCLIBC_HAS_XLOCALE),y)
  39659. -CSRC += nl_langinfo_l.c duplocale.c freelocale.c uselocale.c __curlocale.c
  39660. -endif
  39661. +CSRC-y := setlocale.c localeconv.c _locale_init.c nl_langinfo.c
  39662. +CSRC-$(UCLIBC_HAS_LOCALE) += newlocale.c __locale_mbrtowc_l.c
  39663. +CSRC-$(UCLIBC_HAS_XLOCALE) += nl_langinfo_l.c duplocale.c freelocale.c \
  39664. + uselocale.c __curlocale.c
  39665. MISC_LOCALE_DIR := $(top_srcdir)libc/misc/locale
  39666. MISC_LOCALE_OUT := $(top_builddir)libc/misc/locale
  39667. -MISC_LOCALE_SRC := $(patsubst %.c,$(MISC_LOCALE_DIR)/%.c,$(CSRC))
  39668. -MISC_LOCALE_OBJ := $(patsubst %.c,$(MISC_LOCALE_OUT)/%.o,$(CSRC))
  39669. +MISC_LOCALE_SRC := $(patsubst %.c,$(MISC_LOCALE_DIR)/%.c,$(CSRC-y))
  39670. +MISC_LOCALE_OBJ := $(patsubst %.c,$(MISC_LOCALE_OUT)/%.o,$(CSRC-y))
  39671. libc-y += $(MISC_LOCALE_OBJ)
  39672. diff -Nur uClibc-0.9.33.2/libc/misc/mntent/Makefile.in uClibc-git/libc/misc/mntent/Makefile.in
  39673. --- uClibc-0.9.33.2/libc/misc/mntent/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  39674. +++ uClibc-git/libc/misc/mntent/Makefile.in 2014-07-25 20:36:05.813329484 +0200
  39675. @@ -7,13 +7,13 @@
  39676. subdirs += libc/misc/mntent
  39677. -CSRC := mntent.c
  39678. +CSRC-y := mntent.c
  39679. MISC_MNTENT_DIR := $(top_srcdir)libc/misc/mntent
  39680. MISC_MNTENT_OUT := $(top_builddir)libc/misc/mntent
  39681. -MISC_MNTENT_SRC := $(MISC_MNTENT_DIR)/mntent.c
  39682. -MISC_MNTENT_OBJ := $(MISC_MNTENT_OUT)/mntent.o
  39683. +MISC_MNTENT_SRC := $(patsubst %.c,$(MISC_MNTENT_DIR)/%.c,$(CSRC-y))
  39684. +MISC_MNTENT_OBJ := $(patsubst %.c,$(MISC_MNTENT_OUT)/%.o,$(CSRC-y))
  39685. libc-y += $(MISC_MNTENT_OBJ)
  39686. diff -Nur uClibc-0.9.33.2/libc/misc/pthread/tsd.c uClibc-git/libc/misc/pthread/tsd.c
  39687. --- uClibc-0.9.33.2/libc/misc/pthread/tsd.c 2012-05-15 09:20:09.000000000 +0200
  39688. +++ uClibc-git/libc/misc/pthread/tsd.c 2014-07-25 20:36:05.833329589 +0200
  39689. @@ -1,5 +1,5 @@
  39690. /* libpthread sets _dl_error_catch_tsd to point to this function.
  39691. - We define it here instead of in libpthread so t here instead of in libpthread so that it doesn't
  39692. + We define it here instead of in libpthread so that it doesn't
  39693. need to have a TLS segment of its own just for this one pointer. */
  39694. void **__libc_dl_error_tsd(void) __attribute__ ((const));
  39695. diff -Nur uClibc-0.9.33.2/libc/misc/regex/Makefile.in uClibc-git/libc/misc/regex/Makefile.in
  39696. --- uClibc-0.9.33.2/libc/misc/regex/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  39697. +++ uClibc-git/libc/misc/regex/Makefile.in 2014-07-25 20:36:05.845329652 +0200
  39698. @@ -7,17 +7,14 @@
  39699. subdirs += libc/misc/regex
  39700. -ifeq ($(UCLIBC_HAS_REGEX_OLD),y)
  39701. -CSRC := regex_old.c
  39702. -else
  39703. -CSRC := regex.c
  39704. -endif
  39705. +VARIANT := $(if $(UCLIBC_HAS_REGEX_OLD),_old)
  39706. +CSRC-y := regex$(VARIANT).c
  39707. MISC_REGEX_DIR := $(top_srcdir)libc/misc/regex
  39708. MISC_REGEX_OUT := $(top_builddir)libc/misc/regex
  39709. -MISC_REGEX_SRC := $(patsubst %.c,$(MISC_REGEX_DIR)/%.c,$(CSRC))
  39710. -MISC_REGEX_OBJ := $(patsubst %.c,$(MISC_REGEX_OUT)/%.o,$(CSRC))
  39711. +MISC_REGEX_SRC := $(patsubst %.c,$(MISC_REGEX_DIR)/%.c,$(CSRC-y))
  39712. +MISC_REGEX_OBJ := $(patsubst %.c,$(MISC_REGEX_OUT)/%.o,$(CSRC-y))
  39713. libc-$(UCLIBC_HAS_REGEX) += $(MISC_REGEX_OBJ)
  39714. diff -Nur uClibc-0.9.33.2/libc/misc/regex/regcomp.c uClibc-git/libc/misc/regex/regcomp.c
  39715. --- uClibc-0.9.33.2/libc/misc/regex/regcomp.c 2012-05-15 09:20:09.000000000 +0200
  39716. +++ uClibc-git/libc/misc/regex/regcomp.c 2014-07-25 20:36:05.845329652 +0200
  39717. @@ -14,9 +14,8 @@
  39718. Lesser General Public License for more details.
  39719. You should have received a copy of the GNU Lesser General Public
  39720. - License along with the GNU C Library; if not, write to the Free
  39721. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  39722. - 02111-1307 USA. */
  39723. + License along with the GNU C Library; if not, see
  39724. + <http://www.gnu.org/licenses/>. */
  39725. static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern,
  39726. size_t length, reg_syntax_t syntax);
  39727. @@ -91,7 +90,7 @@
  39728. re_charset_t *mbcset,
  39729. int *equiv_class_alloc,
  39730. const unsigned char *name);
  39731. -static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans,
  39732. +static reg_errcode_t build_charclass (__RE_TRANSLATE_TYPE trans,
  39733. bitset_t sbcset,
  39734. re_charset_t *mbcset,
  39735. int *char_class_alloc,
  39736. @@ -100,13 +99,13 @@
  39737. #else /* not RE_ENABLE_I18N */
  39738. static reg_errcode_t build_equiv_class (bitset_t sbcset,
  39739. const unsigned char *name);
  39740. -static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans,
  39741. +static reg_errcode_t build_charclass (__RE_TRANSLATE_TYPE trans,
  39742. bitset_t sbcset,
  39743. const unsigned char *class_name,
  39744. reg_syntax_t syntax);
  39745. #endif /* not RE_ENABLE_I18N */
  39746. static bin_tree_t *build_charclass_op (re_dfa_t *dfa,
  39747. - RE_TRANSLATE_TYPE trans,
  39748. + __RE_TRANSLATE_TYPE trans,
  39749. const unsigned char *class_name,
  39750. const unsigned char *extra,
  39751. int non_match, reg_errcode_t *err);
  39752. @@ -3414,11 +3413,11 @@
  39753. static reg_errcode_t
  39754. #ifdef RE_ENABLE_I18N
  39755. -build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
  39756. +build_charclass (__RE_TRANSLATE_TYPE trans, bitset_t sbcset,
  39757. re_charset_t *mbcset, int *char_class_alloc,
  39758. const unsigned char *class_name, reg_syntax_t syntax)
  39759. #else
  39760. -build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
  39761. +build_charclass (__RE_TRANSLATE_TYPE trans, bitset_t sbcset,
  39762. const unsigned char *class_name, reg_syntax_t syntax)
  39763. #endif
  39764. {
  39765. @@ -3496,7 +3495,7 @@
  39766. }
  39767. static bin_tree_t *
  39768. -build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
  39769. +build_charclass_op (re_dfa_t *dfa, __RE_TRANSLATE_TYPE trans,
  39770. const unsigned char *class_name,
  39771. const unsigned char *extra, int non_match,
  39772. reg_errcode_t *err)
  39773. diff -Nur uClibc-0.9.33.2/libc/misc/regex/regex.c uClibc-git/libc/misc/regex/regex.c
  39774. --- uClibc-0.9.33.2/libc/misc/regex/regex.c 2012-05-15 09:20:09.000000000 +0200
  39775. +++ uClibc-git/libc/misc/regex/regex.c 2014-07-25 20:36:05.845329652 +0200
  39776. @@ -14,9 +14,8 @@
  39777. Lesser General Public License for more details.
  39778. You should have received a copy of the GNU Lesser General Public
  39779. - License along with the GNU C Library; if not, write to the Free
  39780. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  39781. - 02111-1307 USA. */
  39782. + License along with the GNU C Library; if not, see
  39783. + <http://www.gnu.org/licenses/>. */
  39784. #include <features.h>
  39785. @@ -30,7 +29,12 @@
  39786. # include <stdlib.h>
  39787. # ifdef __UCLIBC_HAS_WCHAR__
  39788. # define RE_ENABLE_I18N
  39789. +# define HAVE_WCHAR_H 1
  39790. +# define HAVE_WCRTOMB 1
  39791. +# define HAVE_MBRTOWC 1
  39792. +# define HAVE_WCSCOLL 1
  39793. # include <wchar.h>
  39794. +# define HAVE_WCTYPE_H 1
  39795. # include <wctype.h>
  39796. # define __iswctype iswctype
  39797. # define __wcrtomb wcrtomb
  39798. @@ -38,6 +42,9 @@
  39799. # define __wctype wctype
  39800. # endif
  39801. # include <ctype.h>
  39802. +# ifdef __UCLIBC_HAS_LOCALE__
  39803. +# define HAVE_LOCALE_H 1
  39804. +# endif
  39805. #endif
  39806. /* Make sure noone compiles this code with a C++ compiler. */
  39807. diff -Nur uClibc-0.9.33.2/libc/misc/regex/regexec.c uClibc-git/libc/misc/regex/regexec.c
  39808. --- uClibc-0.9.33.2/libc/misc/regex/regexec.c 2012-05-15 09:20:09.000000000 +0200
  39809. +++ uClibc-git/libc/misc/regex/regexec.c 2014-07-25 20:36:05.849329673 +0200
  39810. @@ -14,9 +14,8 @@
  39811. Lesser General Public License for more details.
  39812. You should have received a copy of the GNU Lesser General Public
  39813. - License along with the GNU C Library; if not, write to the Free
  39814. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  39815. - 02111-1307 USA. */
  39816. + License along with the GNU C Library; if not, see
  39817. + <http://www.gnu.org/licenses/>. */
  39818. static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
  39819. int n) internal_function;
  39820. @@ -564,7 +563,7 @@
  39821. re_match_context_t mctx;
  39822. char *fastmap = (preg->fastmap != NULL && preg->fastmap_accurate
  39823. && range && !preg->can_be_null) ? preg->fastmap : NULL;
  39824. - RE_TRANSLATE_TYPE t = preg->translate;
  39825. + __RE_TRANSLATE_TYPE t = preg->translate;
  39826. memset (&mctx, '\0', sizeof (re_match_context_t));
  39827. mctx.dfa = dfa;
  39828. diff -Nur uClibc-0.9.33.2/libc/misc/regex/regex_internal.c uClibc-git/libc/misc/regex/regex_internal.c
  39829. --- uClibc-0.9.33.2/libc/misc/regex/regex_internal.c 2012-05-15 09:20:09.000000000 +0200
  39830. +++ uClibc-git/libc/misc/regex/regex_internal.c 2014-07-25 20:36:05.845329652 +0200
  39831. @@ -14,13 +14,12 @@
  39832. Lesser General Public License for more details.
  39833. You should have received a copy of the GNU Lesser General Public
  39834. - License along with the GNU C Library; if not, write to the Free
  39835. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  39836. - 02111-1307 USA. */
  39837. + License along with the GNU C Library; if not, see
  39838. + <http://www.gnu.org/licenses/>. */
  39839. static void re_string_construct_common (const char *str, int len,
  39840. re_string_t *pstr,
  39841. - RE_TRANSLATE_TYPE trans, int icase,
  39842. + __RE_TRANSLATE_TYPE trans, int icase,
  39843. const re_dfa_t *dfa) internal_function;
  39844. static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa,
  39845. const re_node_set *nodes,
  39846. @@ -38,7 +37,7 @@
  39847. static reg_errcode_t
  39848. internal_function
  39849. re_string_allocate (re_string_t *pstr, const char *str, int len, int init_len,
  39850. - RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa)
  39851. + __RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa)
  39852. {
  39853. reg_errcode_t ret;
  39854. int init_buf_len;
  39855. @@ -66,7 +65,7 @@
  39856. static reg_errcode_t
  39857. internal_function
  39858. re_string_construct (re_string_t *pstr, const char *str, int len,
  39859. - RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa)
  39860. + __RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa)
  39861. {
  39862. reg_errcode_t ret;
  39863. memset (pstr, '\0', sizeof (re_string_t));
  39864. @@ -162,7 +161,7 @@
  39865. static void
  39866. internal_function
  39867. re_string_construct_common (const char *str, int len, re_string_t *pstr,
  39868. - RE_TRANSLATE_TYPE trans, int icase,
  39869. + __RE_TRANSLATE_TYPE trans, int icase,
  39870. const re_dfa_t *dfa)
  39871. {
  39872. pstr->raw_mbs = (const unsigned char *) str;
  39873. diff -Nur uClibc-0.9.33.2/libc/misc/regex/regex_internal.h uClibc-git/libc/misc/regex/regex_internal.h
  39874. --- uClibc-0.9.33.2/libc/misc/regex/regex_internal.h 2012-05-15 09:20:09.000000000 +0200
  39875. +++ uClibc-git/libc/misc/regex/regex_internal.h 2014-07-25 20:36:05.845329652 +0200
  39876. @@ -14,16 +14,14 @@
  39877. Lesser General Public License for more details.
  39878. You should have received a copy of the GNU Lesser General Public
  39879. - License along with the GNU C Library; if not, write to the Free
  39880. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  39881. - 02111-1307 USA. */
  39882. + License along with the GNU C Library; if not, see
  39883. + <http://www.gnu.org/licenses/>. */
  39884. #ifndef _REGEX_INTERNAL_H
  39885. #define _REGEX_INTERNAL_H 1
  39886. #include <assert.h>
  39887. #include <ctype.h>
  39888. -#include <stdio.h>
  39889. #include <stdlib.h>
  39890. #include <string.h>
  39891. @@ -315,7 +313,7 @@
  39892. the beginning of the input string. */
  39893. unsigned int tip_context;
  39894. /* The translation passed as a part of an argument of re_compile_pattern. */
  39895. - RE_TRANSLATE_TYPE trans;
  39896. + __RE_TRANSLATE_TYPE trans;
  39897. /* Copy of re_dfa_t's word_char. */
  39898. re_const_bitset_ptr_t word_char;
  39899. /* 1 if REG_ICASE. */
  39900. diff -Nur uClibc-0.9.33.2/libc/misc/regex/regex_old.c uClibc-git/libc/misc/regex/regex_old.c
  39901. --- uClibc-0.9.33.2/libc/misc/regex/regex_old.c 2012-05-15 09:20:09.000000000 +0200
  39902. +++ uClibc-git/libc/misc/regex/regex_old.c 2014-07-25 20:36:05.849329673 +0200
  39903. @@ -16,25 +16,25 @@
  39904. Lesser General Public License for more details.
  39905. You should have received a copy of the GNU Lesser General Public
  39906. - License along with the GNU C Library; if not, write to the Free
  39907. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  39908. - 02111-1307 USA. */
  39909. + License along with the GNU C Library; if not, see
  39910. + <http://www.gnu.org/licenses/>. */
  39911. /* To exclude some unwanted junk.... */
  39912. #undef emacs
  39913. #include <features.h>
  39914. /* unistd.h must be included with _LIBC defined: we need smallint */
  39915. #include <unistd.h>
  39916. +#include <stdio.h>
  39917. #ifdef __UCLIBC__
  39918. # undef _LIBC
  39919. # define _REGEX_RE_COMP
  39920. # define STDC_HEADERS
  39921. -# define RE_TRANSLATE_TYPE char *
  39922. +# define __RE_TRANSLATE_TYPE char *
  39923. +# define RE_TRANSLATE_TYPE __RE_TRANSLATE_TYPE
  39924. #endif
  39925. #include <stdlib.h>
  39926. #include <stdint.h>
  39927. #include <string.h>
  39928. -#include <stdio.h>
  39929. /* AIX requires this to be the first thing in the file. */
  39930. #if defined _AIX && !defined REGEX_MALLOC
  39931. @@ -64,10 +64,9 @@
  39932. # include <wctype.h>
  39933. # endif
  39934. -# if defined _LIBC || defined __UCLIBC__
  39935. +# ifdef _LIBC
  39936. /* We have to keep the namespace clean. */
  39937. -# ifndef __UCLIBC__
  39938. # define btowc __btowc
  39939. /* We are also using some library internals. */
  39940. @@ -76,7 +75,6 @@
  39941. # include <langinfo.h>
  39942. # include <locale/coll-lookup.h>
  39943. # endif
  39944. -# endif
  39945. /* This is for other GNU distributions with internationalized messages. */
  39946. # if defined HAVE_LIBINTL_H || defined _LIBC
  39947. @@ -177,6 +175,7 @@
  39948. /* Get the interface, including the syntax bits. */
  39949. # include <regex.h>
  39950. +# define translate __REPB_PREFIX(translate)
  39951. /* isalpha etc. are used for the character classes. */
  39952. # include <ctype.h>
  39953. @@ -1896,7 +1895,7 @@
  39954. static reg_errcode_t wcs_compile_range (CHAR_T range_start,
  39955. const CHAR_T **p_ptr,
  39956. const CHAR_T *pend,
  39957. - char *translate,
  39958. + __RE_TRANSLATE_TYPE translate,
  39959. reg_syntax_t syntax,
  39960. UCHAR_T *b,
  39961. CHAR_T *char_set);
  39962. @@ -1905,7 +1904,7 @@
  39963. static reg_errcode_t byte_compile_range (unsigned int range_start,
  39964. const char **p_ptr,
  39965. const char *pend,
  39966. - char *translate,
  39967. + __RE_TRANSLATE_TYPE translate,
  39968. reg_syntax_t syntax,
  39969. unsigned char *b);
  39970. # endif /* WCHAR */
  39971. @@ -2338,7 +2337,7 @@
  39972. #endif /* WCHAR */
  39973. /* How to translate the characters in the pattern. */
  39974. - RE_TRANSLATE_TYPE translate = bufp->translate;
  39975. + __RE_TRANSLATE_TYPE translate = bufp->translate;
  39976. /* Address of the count-byte of the most recently inserted `exactn'
  39977. command. This makes it possible to tell if a new exact-match
  39978. @@ -4402,7 +4401,7 @@
  39979. wcs_compile_range (
  39980. CHAR_T range_start_char,
  39981. const CHAR_T **p_ptr, const CHAR_T *pend,
  39982. - RE_TRANSLATE_TYPE translate,
  39983. + __RE_TRANSLATE_TYPE translate,
  39984. reg_syntax_t syntax,
  39985. CHAR_T *b, CHAR_T *char_set)
  39986. {
  39987. @@ -4488,7 +4487,7 @@
  39988. byte_compile_range (
  39989. unsigned int range_start_char,
  39990. const char **p_ptr, const char *pend,
  39991. - RE_TRANSLATE_TYPE translate,
  39992. + __RE_TRANSLATE_TYPE translate,
  39993. reg_syntax_t syntax,
  39994. unsigned char *b)
  39995. {
  39996. @@ -5060,7 +5059,7 @@
  39997. {
  39998. int val;
  39999. register char *fastmap = bufp->fastmap;
  40000. - register RE_TRANSLATE_TYPE translate = bufp->translate;
  40001. + register __RE_TRANSLATE_TYPE translate = bufp->translate;
  40002. int total_size = size1 + size2;
  40003. int endpos = startpos + range;
  40004. #ifdef WCHAR
  40005. @@ -5477,7 +5476,7 @@
  40006. UCHAR_T *end,
  40007. PREFIX(register_info_type) *reg_info);
  40008. static int PREFIX(bcmp_translate) (const CHAR_T *s1, const CHAR_T *s2,
  40009. - int len, char *translate);
  40010. + int len, __RE_TRANSLATE_TYPE translate);
  40011. #else /* not INSIDE_RECURSION */
  40012. /* re_match_2 matches the compiled pattern in BUFP against the
  40013. @@ -5637,7 +5636,7 @@
  40014. UCHAR_T *just_past_start_mem = 0;
  40015. /* We use this to map every character in the string. */
  40016. - RE_TRANSLATE_TYPE translate = bufp->translate;
  40017. + __RE_TRANSLATE_TYPE translate = bufp->translate;
  40018. /* Failure point stack. Each place that can handle a failure further
  40019. down the line pushes a failure point on this stack. It consists of
  40020. @@ -7212,6 +7211,10 @@
  40021. POP_FAILURE_POINT (sdummy, pdummy,
  40022. dummy_low_reg, dummy_high_reg,
  40023. reg_dummy, reg_dummy, reg_info_dummy);
  40024. +
  40025. + /* Silence 'set but not used' warnings. */
  40026. + (void) pdummy;
  40027. + (void) sdummy;
  40028. }
  40029. /* Note fall through. */
  40030. @@ -7802,7 +7805,7 @@
  40031. PREFIX(bcmp_translate) (
  40032. const CHAR_T *s1, const CHAR_T *s2,
  40033. register int len,
  40034. - RE_TRANSLATE_TYPE translate)
  40035. + __RE_TRANSLATE_TYPE translate)
  40036. {
  40037. register const UCHAR_T *p1 = (const UCHAR_T *) s1;
  40038. register const UCHAR_T *p2 = (const UCHAR_T *) s2;
  40039. @@ -8002,8 +8005,8 @@
  40040. unsigned i;
  40041. preg->translate
  40042. - = (RE_TRANSLATE_TYPE) malloc (CHAR_SET_SIZE
  40043. - * sizeof (*(RE_TRANSLATE_TYPE)0));
  40044. + = (__RE_TRANSLATE_TYPE) malloc (CHAR_SET_SIZE
  40045. + * sizeof (*(__RE_TRANSLATE_TYPE)0));
  40046. if (preg->translate == NULL)
  40047. return (int) REG_ESPACE;
  40048. diff -Nur uClibc-0.9.33.2/libc/misc/search/hsearch.c uClibc-git/libc/misc/search/hsearch.c
  40049. --- uClibc-0.9.33.2/libc/misc/search/hsearch.c 2012-05-15 09:20:09.000000000 +0200
  40050. +++ uClibc-git/libc/misc/search/hsearch.c 2014-07-25 20:36:05.869329778 +0200
  40051. @@ -13,9 +13,8 @@
  40052. Lesser General Public License for more details.
  40053. You should have received a copy of the GNU Lesser General Public
  40054. - License along with the GNU C Library; if not, write to the Free
  40055. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  40056. - 02111-1307 USA. */
  40057. + License along with the GNU C Library; if not, see
  40058. + <http://www.gnu.org/licenses/>. */
  40059. #include <search.h>
  40060. diff -Nur uClibc-0.9.33.2/libc/misc/search/_hsearch_r.c uClibc-git/libc/misc/search/_hsearch_r.c
  40061. --- uClibc-0.9.33.2/libc/misc/search/_hsearch_r.c 2012-05-15 09:20:09.000000000 +0200
  40062. +++ uClibc-git/libc/misc/search/_hsearch_r.c 2014-07-25 20:36:05.865329757 +0200
  40063. @@ -13,12 +13,11 @@
  40064. Lesser General Public License for more details.
  40065. You should have received a copy of the GNU Lesser General Public
  40066. - License along with the GNU C Library; if not, write to the Free
  40067. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  40068. - 02111-1307 USA. */
  40069. + License along with the GNU C Library; if not, see
  40070. + <http://www.gnu.org/licenses/>. */
  40071. #include <errno.h>
  40072. -#include <malloc.h>
  40073. +#include <stdlib.h>
  40074. #include <string.h>
  40075. #include <search.h>
  40076. diff -Nur uClibc-0.9.33.2/libc/misc/search/insremque.c uClibc-git/libc/misc/search/insremque.c
  40077. --- uClibc-0.9.33.2/libc/misc/search/insremque.c 2012-05-15 09:20:09.000000000 +0200
  40078. +++ uClibc-git/libc/misc/search/insremque.c 2014-07-25 20:36:05.869329778 +0200
  40079. @@ -13,8 +13,7 @@
  40080. You should have received a copy of the GNU Library General Public
  40081. License along with the GNU C Library; see the file COPYING.LIB. If not,
  40082. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  40083. - Boston, MA 02111-1307, USA. */
  40084. + see <http://www.gnu.org/licenses/>. */
  40085. #include <features.h>
  40086. #include <stddef.h>
  40087. @@ -27,12 +26,20 @@
  40088. void
  40089. insque (void *elem, void *prev)
  40090. {
  40091. - struct qelem *next = ((struct qelem *) prev)->q_forw;
  40092. - ((struct qelem *) prev)->q_forw = (struct qelem *) elem;
  40093. - if (next != NULL)
  40094. - next->q_back = (struct qelem *) elem;
  40095. - ((struct qelem *) elem)->q_forw = next;
  40096. - ((struct qelem *) elem)->q_back = (struct qelem *) prev;
  40097. + if (prev == NULL)
  40098. + {
  40099. + ((struct qelem *) elem)->q_forw = NULL;
  40100. + ((struct qelem *) elem)->q_back = NULL;
  40101. + }
  40102. + else
  40103. + {
  40104. + struct qelem *next = ((struct qelem *) prev)->q_forw;
  40105. + ((struct qelem *) prev)->q_forw = (struct qelem *) elem;
  40106. + if (next != NULL)
  40107. + next->q_back = (struct qelem *) elem;
  40108. + ((struct qelem *) elem)->q_forw = next;
  40109. + ((struct qelem *) elem)->q_back = (struct qelem *) prev;
  40110. + }
  40111. }
  40112. #endif
  40113. diff -Nur uClibc-0.9.33.2/libc/misc/search/Makefile.in uClibc-git/libc/misc/search/Makefile.in
  40114. --- uClibc-0.9.33.2/libc/misc/search/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  40115. +++ uClibc-git/libc/misc/search/Makefile.in 2014-07-25 20:36:05.865329757 +0200
  40116. @@ -7,25 +7,25 @@
  40117. subdirs += libc/misc/search
  40118. -CSRC := hsearch.c
  40119. +CSRC-y := hsearch.c
  40120. # multi source _tsearch.c
  40121. -CSRC += tsearch.c tfind.c tdelete.c twalk.c tdestroy.c
  40122. +CSRC-y += tsearch.c tfind.c tdelete.c twalk.c tdestroy.c
  40123. # multi source _lsearch.c
  40124. -CSRC += lfind.c lsearch.c
  40125. +CSRC-y += lfind.c lsearch.c
  40126. # multi source insremque.c
  40127. -CSRC += insque.c remque.c
  40128. +CSRC-y += insque.c remque.c
  40129. # multi source _hsearch_r.c
  40130. -CSRC += hcreate_r.c hdestroy_r.c hsearch_r.c
  40131. +CSRC-y += hcreate_r.c hdestroy_r.c hsearch_r.c
  40132. MISC_SEARCH_DIR := $(top_srcdir)libc/misc/search
  40133. MISC_SEARCH_OUT := $(top_builddir)libc/misc/search
  40134. -MISC_SEARCH_SRC := $(patsubst %.c,$(MISC_SEARCH_DIR)/%.c,$(CSRC))
  40135. -MISC_SEARCH_OBJ := $(patsubst %.c,$(MISC_SEARCH_OUT)/%.o,$(CSRC))
  40136. +MISC_SEARCH_SRC := $(patsubst %.c,$(MISC_SEARCH_DIR)/%.c,$(CSRC-y))
  40137. +MISC_SEARCH_OBJ := $(patsubst %.c,$(MISC_SEARCH_OUT)/%.o,$(CSRC-y))
  40138. libc-y += $(MISC_SEARCH_OBJ)
  40139. diff -Nur uClibc-0.9.33.2/libc/misc/search/_tsearch.c uClibc-git/libc/misc/search/_tsearch.c
  40140. --- uClibc-0.9.33.2/libc/misc/search/_tsearch.c 2012-05-15 09:20:09.000000000 +0200
  40141. +++ uClibc-git/libc/misc/search/_tsearch.c 2014-07-25 20:36:05.869329778 +0200
  40142. @@ -13,8 +13,7 @@
  40143. You should have received a copy of the GNU Library General Public
  40144. License along with the GNU C Library; see the file COPYING.LIB. If
  40145. -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  40146. -Cambridge, MA 02139, USA. */
  40147. +not, see <http://www.gnu.org/licenses/>. */
  40148. /*
  40149. * Tree search generalized from Knuth (6.2.2) Algorithm T just like
  40150. @@ -50,7 +49,7 @@
  40151. int (*compar)(); ordering function
  40152. */
  40153. -void *tsearch(__const void *key, void **vrootp, __compar_fn_t compar)
  40154. +void *tsearch(const void *key, void **vrootp, __compar_fn_t compar)
  40155. {
  40156. register node *q;
  40157. register node **rootp = (node **) vrootp;
  40158. @@ -80,7 +79,7 @@
  40159. #endif
  40160. #ifdef L_tfind
  40161. -void *tfind(__const void *key, void * __const *vrootp, __compar_fn_t compar)
  40162. +void *tfind(const void *key, void * const *vrootp, __compar_fn_t compar)
  40163. {
  40164. register node **rootp = (node **) vrootp;
  40165. @@ -107,7 +106,7 @@
  40166. register node **rootp; address of the root of tree
  40167. int (*compar)(); comparison function
  40168. */
  40169. -void *tdelete(__const void *key, void ** vrootp, __compar_fn_t compar)
  40170. +void *tdelete(const void *key, void ** vrootp, __compar_fn_t compar)
  40171. {
  40172. node *p;
  40173. register node *q;
  40174. @@ -157,7 +156,7 @@
  40175. register void (*action)(); Function to be called at each node
  40176. register int level;
  40177. */
  40178. -static void trecurse(__const void *vroot, __action_fn_t action, int level)
  40179. +static void trecurse(const void *vroot, __action_fn_t action, int level)
  40180. {
  40181. register node *root = (node *) vroot;
  40182. @@ -180,9 +179,9 @@
  40183. void (*action)(); Function to be called at each node
  40184. PTR
  40185. */
  40186. -void twalk(__const void *vroot, __action_fn_t action)
  40187. +void twalk(const void *vroot, __action_fn_t action)
  40188. {
  40189. - register __const node *root = (node *) vroot;
  40190. + register const node *root = (node *) vroot;
  40191. if (root != (node *)0 && action != (__action_fn_t) 0)
  40192. trecurse(root, action, 0);
  40193. diff -Nur uClibc-0.9.33.2/libc/misc/statfs/fstatfs64.c uClibc-git/libc/misc/statfs/fstatfs64.c
  40194. --- uClibc-0.9.33.2/libc/misc/statfs/fstatfs64.c 2012-05-15 09:20:09.000000000 +0200
  40195. +++ uClibc-git/libc/misc/statfs/fstatfs64.c 2014-07-25 20:36:05.881329841 +0200
  40196. @@ -13,9 +13,8 @@
  40197. Lesser General Public License for more details.
  40198. You should have received a copy of the GNU Lesser General Public
  40199. - License along with the GNU C Library; if not, write to the Free
  40200. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  40201. - 02111-1307 USA. */
  40202. + License along with the GNU C Library; if not, see
  40203. + <http://www.gnu.org/licenses/>. */
  40204. #include <_lfs_64.h>
  40205. @@ -23,8 +22,10 @@
  40206. #include <string.h>
  40207. #include <sys/statfs.h>
  40208. #include <sys/statvfs.h>
  40209. +#include <sys/syscall.h>
  40210. #include <stddef.h>
  40211. +#if defined __NR_fstatfs
  40212. extern __typeof(fstatfs) __libc_fstatfs;
  40213. /* Return information about the filesystem on which FD resides. */
  40214. @@ -43,9 +44,24 @@
  40215. buf->f_files = buf32.f_files;
  40216. buf->f_ffree = buf32.f_ffree;
  40217. buf->f_fsid = buf32.f_fsid;
  40218. +# ifdef _STATFS_F_FRSIZE
  40219. + buf->f_frsize = buf32.f_frsize;
  40220. +# endif
  40221. buf->f_namelen = buf32.f_namelen;
  40222. memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare));
  40223. return 0;
  40224. }
  40225. +#else
  40226. +/*
  40227. + * Use the fstatfs64 system call if fstatfs is not defined
  40228. + * This is for backwards compatibility and it should be
  40229. + * made default in the future
  40230. + */
  40231. +int fstatfs64(int fd, struct statfs64 *buf)
  40232. +{
  40233. + /* Signature has 2 arguments but syscalls wants 3 */
  40234. + return INLINE_SYSCALL(fstatfs64, 3, fd, sizeof(*buf), buf);
  40235. +}
  40236. +#endif
  40237. libc_hidden_def(fstatfs64)
  40238. diff -Nur uClibc-0.9.33.2/libc/misc/statfs/fstatvfs64.c uClibc-git/libc/misc/statfs/fstatvfs64.c
  40239. --- uClibc-0.9.33.2/libc/misc/statfs/fstatvfs64.c 2012-05-15 09:20:09.000000000 +0200
  40240. +++ uClibc-git/libc/misc/statfs/fstatvfs64.c 2014-07-25 20:36:05.881329841 +0200
  40241. @@ -13,9 +13,8 @@
  40242. Lesser General Public License for more details.
  40243. You should have received a copy of the GNU Lesser General Public
  40244. - License along with the GNU C Library; if not, write to the Free
  40245. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  40246. - 02111-1307 USA. */
  40247. + License along with the GNU C Library; if not, see
  40248. + <http://www.gnu.org/licenses/>. */
  40249. #include <_lfs_64.h>
  40250. diff -Nur uClibc-0.9.33.2/libc/misc/statfs/fstatvfs.c uClibc-git/libc/misc/statfs/fstatvfs.c
  40251. --- uClibc-0.9.33.2/libc/misc/statfs/fstatvfs.c 2012-05-15 09:20:09.000000000 +0200
  40252. +++ uClibc-git/libc/misc/statfs/fstatvfs.c 2014-07-25 20:36:05.881329841 +0200
  40253. @@ -13,9 +13,8 @@
  40254. Lesser General Public License for more details.
  40255. You should have received a copy of the GNU Lesser General Public
  40256. - License along with the GNU C Library; if not, write to the Free
  40257. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  40258. - 02111-1307 USA. */
  40259. + License along with the GNU C Library; if not, see
  40260. + <http://www.gnu.org/licenses/>. */
  40261. #include <features.h>
  40262. #include <errno.h>
  40263. diff -Nur uClibc-0.9.33.2/libc/misc/statfs/internal_statvfs.c uClibc-git/libc/misc/statfs/internal_statvfs.c
  40264. --- uClibc-0.9.33.2/libc/misc/statfs/internal_statvfs.c 2012-05-15 09:20:09.000000000 +0200
  40265. +++ uClibc-git/libc/misc/statfs/internal_statvfs.c 2014-07-25 20:36:05.881329841 +0200
  40266. @@ -13,14 +13,20 @@
  40267. Lesser General Public License for more details.
  40268. You should have received a copy of the GNU Lesser General Public
  40269. - License along with the GNU C Library; if not, write to the Free
  40270. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  40271. - 02111-1307 USA. */
  40272. + License along with the GNU C Library; if not, see
  40273. + <http://www.gnu.org/licenses/>. */
  40274. +
  40275. +/* The kernel hints us if the f_flags is valid */
  40276. +#define ST_VALID 0x0020
  40277. /* Now fill in the fields we have information for. */
  40278. buf->f_bsize = fsbuf.f_bsize;
  40279. - /* Linux does not support f_frsize, so set it to the full block size. */
  40280. +#ifdef _STATFS_F_FRSIZE
  40281. + buf->f_frsize = fsbuf.f_frsize;
  40282. +#else
  40283. + /* No support for f_frsize so set it to the full block size. */
  40284. buf->f_frsize = fsbuf.f_bsize;
  40285. +#endif
  40286. buf->f_blocks = fsbuf.f_blocks;
  40287. buf->f_bfree = fsbuf.f_bfree;
  40288. buf->f_bavail = fsbuf.f_bavail;
  40289. @@ -28,7 +34,7 @@
  40290. buf->f_ffree = fsbuf.f_ffree;
  40291. if (sizeof (buf->f_fsid) == sizeof (fsbuf.f_fsid))
  40292. buf->f_fsid = (fsbuf.f_fsid.__val[0]
  40293. - | ((unsigned long int) fsbuf.f_fsid.__val[1]
  40294. + | ((unsigned long long int) fsbuf.f_fsid.__val[1]
  40295. << (8 * (sizeof (buf->f_fsid)
  40296. - sizeof (fsbuf.f_fsid.__val[0])))));
  40297. else
  40298. @@ -39,10 +45,7 @@
  40299. buf->__f_unused = 0;
  40300. #endif
  40301. buf->f_namemax = fsbuf.f_namelen;
  40302. - memset (buf->__f_spare, '\0', 6 * sizeof (int));
  40303. -
  40304. - /* What remains to do is to fill the fields f_favail and f_flag. */
  40305. -
  40306. + memset (buf->__f_spare, '\0', sizeof(buf->__f_spare));
  40307. /* XXX I have no idea how to compute f_favail. Any idea??? */
  40308. buf->f_favail = buf->f_ffree;
  40309. @@ -51,61 +54,63 @@
  40310. file. The way we can test for matching filesystem is using the
  40311. device number. */
  40312. buf->f_flag = 0;
  40313. - if (STAT (&st) >= 0)
  40314. - {
  40315. - int save_errno = errno;
  40316. - struct mntent mntbuf;
  40317. - FILE *mtab;
  40318. -
  40319. - mtab = setmntent ("/proc/mounts", "r");
  40320. - if (mtab == NULL)
  40321. - mtab = setmntent (_PATH_MOUNTED, "r");
  40322. -
  40323. - if (mtab != NULL)
  40324. - {
  40325. - char tmpbuf[1024];
  40326. -
  40327. - while (getmntent_r (mtab, &mntbuf, tmpbuf, sizeof (tmpbuf)))
  40328. - {
  40329. - struct stat fsst;
  40330. -
  40331. - /* Find out about the device the current entry is for. */
  40332. - if (stat (mntbuf.mnt_dir, &fsst) >= 0
  40333. - && st.st_dev == fsst.st_dev)
  40334. - {
  40335. - /* Bingo, we found the entry for the device FD is on.
  40336. - Now interpret the option string. */
  40337. - char *cp = mntbuf.mnt_opts;
  40338. - char *opt;
  40339. -
  40340. - while ((opt = strsep (&cp, ",")) != NULL)
  40341. - if (strcmp (opt, "ro") == 0)
  40342. - buf->f_flag |= ST_RDONLY;
  40343. - else if (strcmp (opt, "nosuid") == 0)
  40344. - buf->f_flag |= ST_NOSUID;
  40345. + if (STAT (&st) >= 0
  40346. +#ifdef _STATFS_F_FLAGS
  40347. + && (fsbuf.f_flags & ST_VALID) == 0
  40348. +#endif
  40349. + ) {
  40350. + int save_errno = errno;
  40351. + struct mntent mntbuf;
  40352. + FILE *mtab;
  40353. +
  40354. + mtab = setmntent ("/proc/mounts", "r");
  40355. + if (mtab == NULL)
  40356. + mtab = setmntent (_PATH_MOUNTED, "r");
  40357. + if (mtab != NULL) {
  40358. + char tmpbuf[1024];
  40359. +
  40360. + while (getmntent_r (mtab, &mntbuf, tmpbuf, sizeof (tmpbuf))) {
  40361. + struct stat fsst;
  40362. +
  40363. + /* Find out about the device the current entry is for. */
  40364. + if (stat (mntbuf.mnt_dir, &fsst) >= 0
  40365. + && st.st_dev == fsst.st_dev) {
  40366. + /* Bingo, we found the entry for the device FD is on.
  40367. + Now interpret the option string. */
  40368. + char *cp = mntbuf.mnt_opts;
  40369. + char *opt;
  40370. +
  40371. + while ((opt = strsep (&cp, ",")) != NULL)
  40372. + if (strcmp (opt, "ro") == 0)
  40373. + buf->f_flag |= ST_RDONLY;
  40374. + else if (strcmp (opt, "nosuid") == 0)
  40375. + buf->f_flag |= ST_NOSUID;
  40376. #ifdef __USE_GNU
  40377. - else if (strcmp (opt, "noexec") == 0)
  40378. - buf->f_flag |= ST_NOEXEC;
  40379. - else if (strcmp (opt, "nodev") == 0)
  40380. - buf->f_flag |= ST_NODEV;
  40381. - else if (strcmp (opt, "sync") == 0)
  40382. - buf->f_flag |= ST_SYNCHRONOUS;
  40383. - else if (strcmp (opt, "mand") == 0)
  40384. - buf->f_flag |= ST_MANDLOCK;
  40385. - else if (strcmp (opt, "noatime") == 0)
  40386. - buf->f_flag |= ST_NOATIME;
  40387. - else if (strcmp (opt, "nodiratime") == 0)
  40388. - buf->f_flag |= ST_NODIRATIME;
  40389. + else if (strcmp (opt, "noexec") == 0)
  40390. + buf->f_flag |= ST_NOEXEC;
  40391. + else if (strcmp (opt, "nodev") == 0)
  40392. + buf->f_flag |= ST_NODEV;
  40393. + else if (strcmp (opt, "sync") == 0)
  40394. + buf->f_flag |= ST_SYNCHRONOUS;
  40395. + else if (strcmp (opt, "mand") == 0)
  40396. + buf->f_flag |= ST_MANDLOCK;
  40397. + else if (strcmp (opt, "noatime") == 0)
  40398. + buf->f_flag |= ST_NOATIME;
  40399. + else if (strcmp (opt, "nodiratime") == 0)
  40400. + buf->f_flag |= ST_NODIRATIME;
  40401. + else if (strcmp (opt, "relatime") == 0)
  40402. + buf->f_flag |= ST_RELATIME;
  40403. #endif
  40404. -
  40405. - /* We can stop looking for more entries. */
  40406. - break;
  40407. + /* We can stop looking for more entries. */
  40408. + break;
  40409. + }
  40410. }
  40411. - }
  40412. -
  40413. - /* Close the file. */
  40414. - endmntent (mtab);
  40415. - }
  40416. -
  40417. - __set_errno (save_errno);
  40418. - }
  40419. + /* Close the file. */
  40420. + endmntent (mtab);
  40421. + }
  40422. + __set_errno (save_errno);
  40423. + }
  40424. +#ifdef _STATFS_F_FLAGS
  40425. + else
  40426. + buf->f_flag = fsbuf.f_flags ^ ST_VALID;
  40427. +#endif
  40428. diff -Nur uClibc-0.9.33.2/libc/misc/statfs/Makefile.in uClibc-git/libc/misc/statfs/Makefile.in
  40429. --- uClibc-0.9.33.2/libc/misc/statfs/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  40430. +++ uClibc-git/libc/misc/statfs/Makefile.in 2014-07-25 20:36:05.881329841 +0200
  40431. @@ -7,19 +7,16 @@
  40432. subdirs += libc/misc/statfs
  40433. -CSRC := statvfs.c fstatvfs.c
  40434. -ifeq ($(UCLIBC_HAS_LFS),y)
  40435. -ifeq ($(UCLIBC_LINUX_SPECIFIC),y)
  40436. -CSRC += fstatfs64.c statfs64.c
  40437. -endif
  40438. -CSRC += statvfs64.c fstatvfs64.c
  40439. -endif
  40440. +CSRC-y := statvfs.c fstatvfs.c
  40441. +CSRC-$(UCLIBC_HAS_LFS) += $(patsubst %.c,%64.c,$(CSRC-y))
  40442. +CSRC-$(if $(findstring yy,$(UCLIBC_HAS_LFS)$(UCLIBC_LINUX_SPECIFIC)),y) += \
  40443. + fstatfs64.c statfs64.c
  40444. MISC_STATFS_DIR := $(top_srcdir)libc/misc/statfs
  40445. MISC_STATFS_OUT := $(top_builddir)libc/misc/statfs
  40446. -MISC_STATFS_SRC := $(patsubst %.c,$(MISC_STATFS_DIR)/%.c,$(CSRC))
  40447. -MISC_STATFS_OBJ := $(patsubst %.c,$(MISC_STATFS_OUT)/%.o,$(CSRC))
  40448. +MISC_STATFS_SRC := $(patsubst %.c,$(MISC_STATFS_DIR)/%.c,$(CSRC-y))
  40449. +MISC_STATFS_OBJ := $(patsubst %.c,$(MISC_STATFS_OUT)/%.o,$(CSRC-y))
  40450. libc-y += $(MISC_STATFS_OBJ)
  40451. diff -Nur uClibc-0.9.33.2/libc/misc/statfs/statfs64.c uClibc-git/libc/misc/statfs/statfs64.c
  40452. --- uClibc-0.9.33.2/libc/misc/statfs/statfs64.c 2012-05-15 09:20:09.000000000 +0200
  40453. +++ uClibc-git/libc/misc/statfs/statfs64.c 2014-07-25 20:36:05.881329841 +0200
  40454. @@ -13,18 +13,19 @@
  40455. Lesser General Public License for more details.
  40456. You should have received a copy of the GNU Lesser General Public
  40457. - License along with the GNU C Library; if not, write to the Free
  40458. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  40459. - 02111-1307 USA. */
  40460. + License along with the GNU C Library; if not, see
  40461. + <http://www.gnu.org/licenses/>. */
  40462. #include <_lfs_64.h>
  40463. #include <string.h>
  40464. #include <stddef.h>
  40465. #include <sys/statfs.h>
  40466. +#include <sys/syscall.h>
  40467. extern __typeof(statfs) __libc_statfs;
  40468. +#if defined __NR_statfs
  40469. /* Return information about the filesystem on which FILE resides. */
  40470. int statfs64 (const char *file, struct statfs64 *buf)
  40471. {
  40472. @@ -42,8 +43,21 @@
  40473. buf->f_ffree = buf32.f_ffree;
  40474. buf->f_fsid = buf32.f_fsid;
  40475. buf->f_namelen = buf32.f_namelen;
  40476. +#ifdef _STATFS_F_FRSIZE
  40477. + buf->f_frsize = buf32.f_frsize;
  40478. +#endif
  40479. +#ifdef _STATFS_F_FLAGS
  40480. + buf->f_flags = buf32.f_flags;
  40481. +#endif
  40482. memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare));
  40483. return 0;
  40484. }
  40485. +#else
  40486. +int statfs64 (const char *file, struct statfs64 *buf)
  40487. +{
  40488. + return INLINE_SYSCALL(statfs64, 3, file, sizeof(*buf), buf);
  40489. +}
  40490. +#endif
  40491. +
  40492. libc_hidden_def(statfs64)
  40493. diff -Nur uClibc-0.9.33.2/libc/misc/statfs/statvfs64.c uClibc-git/libc/misc/statfs/statvfs64.c
  40494. --- uClibc-0.9.33.2/libc/misc/statfs/statvfs64.c 2012-05-15 09:20:09.000000000 +0200
  40495. +++ uClibc-git/libc/misc/statfs/statvfs64.c 2014-07-25 20:36:05.881329841 +0200
  40496. @@ -13,9 +13,8 @@
  40497. Lesser General Public License for more details.
  40498. You should have received a copy of the GNU Lesser General Public
  40499. - License along with the GNU C Library; if not, write to the Free
  40500. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  40501. - 02111-1307 USA. */
  40502. + License along with the GNU C Library; if not, see
  40503. + <http://www.gnu.org/licenses/>. */
  40504. #include <_lfs_64.h>
  40505. diff -Nur uClibc-0.9.33.2/libc/misc/statfs/statvfs.c uClibc-git/libc/misc/statfs/statvfs.c
  40506. --- uClibc-0.9.33.2/libc/misc/statfs/statvfs.c 2012-05-15 09:20:09.000000000 +0200
  40507. +++ uClibc-git/libc/misc/statfs/statvfs.c 2014-07-25 20:36:05.881329841 +0200
  40508. @@ -13,9 +13,8 @@
  40509. Lesser General Public License for more details.
  40510. You should have received a copy of the GNU Lesser General Public
  40511. - License along with the GNU C Library; if not, write to the Free
  40512. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  40513. - 02111-1307 USA. */
  40514. + License along with the GNU C Library; if not, see
  40515. + <http://www.gnu.org/licenses/>. */
  40516. #include <features.h>
  40517. #include <errno.h>
  40518. diff -Nur uClibc-0.9.33.2/libc/misc/syslog/Makefile.in uClibc-git/libc/misc/syslog/Makefile.in
  40519. --- uClibc-0.9.33.2/libc/misc/syslog/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  40520. +++ uClibc-git/libc/misc/syslog/Makefile.in 2014-07-25 20:36:05.897329925 +0200
  40521. @@ -7,13 +7,13 @@
  40522. subdirs += libc/misc/syslog
  40523. -CSRC := syslog.c
  40524. +CSRC-y := syslog.c
  40525. MISC_SYSLOG_DIR := $(top_srcdir)libc/misc/syslog
  40526. MISC_SYSLOG_OUT := $(top_builddir)libc/misc/syslog
  40527. -MISC_SYSLOG_SRC := $(patsubst %.c,$(MISC_SYSLOG_DIR)/%.c,$(CSRC))
  40528. -MISC_SYSLOG_OBJ := $(patsubst %.c,$(MISC_SYSLOG_OUT)/%.o,$(CSRC))
  40529. +MISC_SYSLOG_SRC := $(patsubst %.c,$(MISC_SYSLOG_DIR)/%.c,$(CSRC-y))
  40530. +MISC_SYSLOG_OBJ := $(patsubst %.c,$(MISC_SYSLOG_OUT)/%.o,$(CSRC-y))
  40531. ifeq ($(UCLIBC_HAS_SYSLOG),y)
  40532. libc-y += $(MISC_SYSLOG_OBJ)
  40533. diff -Nur uClibc-0.9.33.2/libc/misc/syslog/syslog.c uClibc-git/libc/misc/syslog/syslog.c
  40534. --- uClibc-0.9.33.2/libc/misc/syslog/syslog.c 2012-05-15 09:20:09.000000000 +0200
  40535. +++ uClibc-git/libc/misc/syslog/syslog.c 2014-07-25 20:36:05.897329925 +0200
  40536. @@ -58,8 +58,6 @@
  40537. * - Major code cleanup.
  40538. */
  40539. -#define __FORCE_GLIBC
  40540. -#include <features.h>
  40541. #include <sys/types.h>
  40542. #include <sys/socket.h>
  40543. #include <sys/file.h>
  40544. @@ -177,14 +175,17 @@
  40545. openlog_intern(ident, logstat, logfac);
  40546. __UCLIBC_MUTEX_UNLOCK(mylock);
  40547. }
  40548. -libc_hidden_def(openlog)
  40549. /*
  40550. * syslog, vsyslog --
  40551. * print message on log file; output is intended for syslogd(8).
  40552. */
  40553. +static
  40554. +#ifndef __USE_BSD
  40555. +__always_inline
  40556. +#endif
  40557. void
  40558. -vsyslog(int pri, const char *fmt, va_list ap)
  40559. +__vsyslog(int pri, const char *fmt, va_list ap)
  40560. {
  40561. register char *p;
  40562. char *last_chr, *head_end, *end, *stdp;
  40563. @@ -303,7 +304,9 @@
  40564. getout:
  40565. __UCLIBC_MUTEX_UNLOCK(mylock);
  40566. }
  40567. -libc_hidden_def(vsyslog)
  40568. +#ifdef __USE_BSD
  40569. +strong_alias(__vsyslog,vsyslog)
  40570. +#endif
  40571. void
  40572. syslog(int pri, const char *fmt, ...)
  40573. @@ -311,7 +314,7 @@
  40574. va_list ap;
  40575. va_start(ap, fmt);
  40576. - vsyslog(pri, fmt, ap);
  40577. + __vsyslog(pri, fmt, ap);
  40578. va_end(ap);
  40579. }
  40580. libc_hidden_def(syslog)
  40581. @@ -326,7 +329,6 @@
  40582. closelog_intern(0); /* 0: reset LogXXX globals to default */
  40583. __UCLIBC_MUTEX_UNLOCK(mylock);
  40584. }
  40585. -libc_hidden_def(closelog)
  40586. /* setlogmask -- set the log mask level */
  40587. int setlogmask(int pmask)
  40588. @@ -335,9 +337,9 @@
  40589. omask = LogMask;
  40590. if (pmask != 0) {
  40591. - __UCLIBC_MUTEX_LOCK(mylock);
  40592. +/* __UCLIBC_MUTEX_LOCK(mylock);*/
  40593. LogMask = pmask;
  40594. - __UCLIBC_MUTEX_UNLOCK(mylock);
  40595. +/* __UCLIBC_MUTEX_UNLOCK(mylock);*/
  40596. }
  40597. return omask;
  40598. }
  40599. diff -Nur uClibc-0.9.33.2/libc/misc/sysvipc/ftok.c uClibc-git/libc/misc/sysvipc/ftok.c
  40600. --- uClibc-0.9.33.2/libc/misc/sysvipc/ftok.c 2012-05-15 09:20:09.000000000 +0200
  40601. +++ uClibc-git/libc/misc/sysvipc/ftok.c 2014-07-25 20:36:05.909329987 +0200
  40602. @@ -14,8 +14,7 @@
  40603. You should have received a copy of the GNU Library General Public
  40604. License along with the GNU C Library; see the file COPYING.LIB. If not,
  40605. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  40606. - Boston, MA 02111-1307, USA. */
  40607. + see <http://www.gnu.org/licenses/>. */
  40608. #include <sys/ipc.h>
  40609. #include <sys/stat.h>
  40610. diff -Nur uClibc-0.9.33.2/libc/misc/sysvipc/ipc.h uClibc-git/libc/misc/sysvipc/ipc.h
  40611. --- uClibc-0.9.33.2/libc/misc/sysvipc/ipc.h 2012-05-15 09:20:09.000000000 +0200
  40612. +++ uClibc-git/libc/misc/sysvipc/ipc.h 2014-07-25 20:36:05.909329987 +0200
  40613. @@ -3,10 +3,14 @@
  40614. #include <syscall.h>
  40615. #include <bits/wordsize.h>
  40616. -#if __WORDSIZE == 32 || defined __alpha__ || defined __mips__
  40617. -# define __IPC_64 0x100
  40618. +#ifndef __ARCH_HAS_DEPRECATED_SYSCALLS__
  40619. +# define __IPC_64 0x0
  40620. #else
  40621. -# define __IPC_64 0x0
  40622. +# if __WORDSIZE == 32 || defined __alpha__ || defined __mips__
  40623. +# define __IPC_64 0x100
  40624. +# else
  40625. +# define __IPC_64 0x0
  40626. +# endif
  40627. #endif
  40628. #ifdef __NR_ipc
  40629. diff -Nur uClibc-0.9.33.2/libc/misc/sysvipc/Makefile.in uClibc-git/libc/misc/sysvipc/Makefile.in
  40630. --- uClibc-0.9.33.2/libc/misc/sysvipc/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  40631. +++ uClibc-git/libc/misc/sysvipc/Makefile.in 2014-07-25 20:36:05.909329987 +0200
  40632. @@ -7,22 +7,22 @@
  40633. subdirs += libc/misc/sysvipc
  40634. -CSRC := ftok.c __syscall_ipc.c
  40635. +CSRC-y := ftok.c __syscall_ipc.c
  40636. # multi source sem.c
  40637. -CSRC += semget.c semctl.c semop.c semtimedop.c
  40638. +CSRC-y += semget.c semctl.c semop.c semtimedop.c
  40639. # multi source shm.c
  40640. -CSRC += shmat.c shmctl.c shmdt.c shmget.c
  40641. +CSRC-y += shmat.c shmctl.c shmdt.c shmget.c
  40642. # multi source msgq.c
  40643. -CSRC += msgctl.c msgget.c msgrcv.c msgsnd.c
  40644. +CSRC-y += msgctl.c msgget.c msgrcv.c msgsnd.c
  40645. MISC_SYSVIPC_DIR := $(top_srcdir)libc/misc/sysvipc
  40646. MISC_SYSVIPC_OUT := $(top_builddir)libc/misc/sysvipc
  40647. -MISC_SYSVIPC_SRC := $(patsubst %.c,$(MISC_SYSVIPC_DIR)/%.c,$(CSRC))
  40648. -MISC_SYSVIPC_OBJ := $(patsubst %.c,$(MISC_SYSVIPC_OUT)/%.o,$(CSRC))
  40649. +MISC_SYSVIPC_SRC := $(patsubst %.c,$(MISC_SYSVIPC_DIR)/%.c,$(CSRC-y))
  40650. +MISC_SYSVIPC_OBJ := $(patsubst %.c,$(MISC_SYSVIPC_OUT)/%.o,$(CSRC-y))
  40651. libc-y += $(MISC_SYSVIPC_OBJ)
  40652. diff -Nur uClibc-0.9.33.2/libc/misc/sysvipc/sem.c uClibc-git/libc/misc/sysvipc/sem.c
  40653. --- uClibc-0.9.33.2/libc/misc/sysvipc/sem.c 2012-05-15 09:20:09.000000000 +0200
  40654. +++ uClibc-git/libc/misc/sysvipc/sem.c 2014-07-25 20:36:05.909329987 +0200
  40655. @@ -14,8 +14,7 @@
  40656. You should have received a copy of the GNU Library General Public
  40657. License along with the GNU C Library; see the file COPYING.LIB. If not,
  40658. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  40659. - Boston, MA 02111-1307, USA. */
  40660. + see <http://www.gnu.org/licenses/>. */
  40661. #include <errno.h>
  40662. #include <sys/sem.h>
  40663. diff -Nur uClibc-0.9.33.2/libc/misc/sysvipc/shm.c uClibc-git/libc/misc/sysvipc/shm.c
  40664. --- uClibc-0.9.33.2/libc/misc/sysvipc/shm.c 2012-05-15 09:20:09.000000000 +0200
  40665. +++ uClibc-git/libc/misc/sysvipc/shm.c 2014-07-25 20:36:05.909329987 +0200
  40666. @@ -14,8 +14,7 @@
  40667. You should have received a copy of the GNU Library General Public
  40668. License along with the GNU C Library; see the file COPYING.LIB. If not,
  40669. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  40670. - Boston, MA 02111-1307, USA. */
  40671. + see <http://www.gnu.org/licenses/>. */
  40672. /* SHMLBA uses it on most of the archs (not mips) */
  40673. #define __getpagesize getpagesize
  40674. @@ -54,13 +53,13 @@
  40675. #ifdef L_shmctl
  40676. /* Provide operations to control over shared memory segments. */
  40677. #ifdef __NR_shmctl
  40678. -#define __NR___libc_shmctl __NR_shmctl
  40679. -static __inline__ _syscall3(int, __libc_shmctl, int, shmid, int, cmd, struct shmid_ds *, buf)
  40680. +#define __NR___syscall_shmctl __NR_shmctl
  40681. +static __always_inline _syscall3(int, __syscall_shmctl, int, shmid, int, cmd, struct shmid_ds *, buf)
  40682. #endif
  40683. int shmctl(int shmid, int cmd, struct shmid_ds *buf)
  40684. {
  40685. #ifdef __NR_shmctl
  40686. - return __libc_shmctl(shmid, cmd | __IPC_64, buf);
  40687. + return __syscall_shmctl(shmid, cmd | __IPC_64, buf);
  40688. #else
  40689. return __syscall_ipc(IPCOP_shmctl, shmid, cmd | __IPC_64, 0, buf, 0);
  40690. #endif
  40691. diff -Nur uClibc-0.9.33.2/libc/misc/time/ftime.c uClibc-git/libc/misc/time/ftime.c
  40692. --- uClibc-0.9.33.2/libc/misc/time/ftime.c 2012-05-15 09:20:09.000000000 +0200
  40693. +++ uClibc-git/libc/misc/time/ftime.c 2014-07-25 20:36:05.929330092 +0200
  40694. @@ -12,9 +12,8 @@
  40695. Lesser General Public License for more details.
  40696. You should have received a copy of the GNU Lesser General Public
  40697. - License along with the GNU C Library; if not, write to the Free
  40698. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  40699. - 02111-1307 USA. */
  40700. + License along with the GNU C Library; if not, see
  40701. + <http://www.gnu.org/licenses/>. */
  40702. #include <sys/timeb.h>
  40703. #include <sys/time.h>
  40704. diff -Nur uClibc-0.9.33.2/libc/misc/time/Makefile.in uClibc-git/libc/misc/time/Makefile.in
  40705. --- uClibc-0.9.33.2/libc/misc/time/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  40706. +++ uClibc-git/libc/misc/time/Makefile.in 2014-07-25 20:36:05.929330092 +0200
  40707. @@ -7,33 +7,24 @@
  40708. subdirs += libc/misc/time
  40709. -CSRC := adjtime.c
  40710. -ifeq ($(UCLIBC_SUSV3_LEGACY),y)
  40711. -CSRC += ftime.c
  40712. -endif
  40713. +CSRC-y := adjtime.c
  40714. +CSRC-$(UCLIBC_SUSV3_LEGACY) += ftime.c
  40715. # multi source time.c
  40716. -CSRC += asctime.c asctime_r.c clock.c ctime.c ctime_r.c gmtime.c gmtime_r.c \
  40717. +CSRC-y += asctime.c asctime_r.c clock.c ctime.c ctime_r.c gmtime.c gmtime_r.c \
  40718. localtime.c localtime_r.c mktime.c strftime.c strptime.c tzset.c \
  40719. _time_t2tm.c __time_tm.c _time_mktime.c dysize.c timegm.c \
  40720. _time_mktime_tzi.c _time_localtime_tzi.c
  40721. -ifeq ($(UCLIBC_HAS_FLOATS),y)
  40722. -CSRC += difftime.c
  40723. -endif
  40724. -ifeq ($(UCLIBC_HAS_XLOCALE),y)
  40725. -CSRC += strftime_l.c strptime_l.c
  40726. -endif
  40727. -ifeq ($(UCLIBC_HAS_WCHAR),y)
  40728. -CSRC += wcsftime.c
  40729. -ifeq ($(UCLIBC_HAS_XLOCALE),y)
  40730. -CSRC += wcsftime_l.c
  40731. -endif
  40732. -endif
  40733. +CSRC-$(UCLIBC_HAS_FLOATS) += difftime.c
  40734. +CSRC-$(UCLIBC_HAS_XLOCALE) += strftime_l.c strptime_l.c
  40735. +CSRC-$(UCLIBC_HAS_WCHAR) += wcsftime.c
  40736. +CSRC-$(if $(findstring yy,$(UCLIBC_HAS_WCHAR)$(UCLIBC_HAS_XLOCALE)),y) += \
  40737. + wcsftime_l.c
  40738. MISC_TIME_DIR := $(top_srcdir)libc/misc/time
  40739. MISC_TIME_OUT := $(top_builddir)libc/misc/time
  40740. -MISC_TIME_SRC := $(patsubst %.c,$(MISC_TIME_DIR)/%.c,$(CSRC))
  40741. -MISC_TIME_OBJ := $(patsubst %.c,$(MISC_TIME_OUT)/%.o,$(CSRC))
  40742. +MISC_TIME_SRC := $(patsubst %.c,$(MISC_TIME_DIR)/%.c,$(CSRC-y))
  40743. +MISC_TIME_OBJ := $(patsubst %.c,$(MISC_TIME_OUT)/%.o,$(CSRC-y))
  40744. libc-y += $(MISC_TIME_OBJ)
  40745. diff -Nur uClibc-0.9.33.2/libc/misc/time/time.c uClibc-git/libc/misc/time/time.c
  40746. --- uClibc-0.9.33.2/libc/misc/time/time.c 2012-05-15 09:20:09.000000000 +0200
  40747. +++ uClibc-git/libc/misc/time/time.c 2014-07-25 20:36:05.929330092 +0200
  40748. @@ -149,10 +149,6 @@
  40749. #ifdef __UCLIBC_HAS_WCHAR__
  40750. #include <wchar.h>
  40751. #endif
  40752. -#ifdef __UCLIBC_HAS_XLOCALE__
  40753. -#include <xlocale.h>
  40754. -#endif
  40755. -
  40756. #ifndef __isleap
  40757. #define __isleap(y) ( !((y) % 4) && ( ((y) % 100) || !((y) % 400) ) )
  40758. @@ -212,7 +208,7 @@
  40759. char tzname[TZNAME_MAX+1];
  40760. } rule_struct;
  40761. -__UCLIBC_MUTEX_EXTERN(_time_tzlock);
  40762. +__UCLIBC_MUTEX_EXTERN(_time_tzlock) attribute_hidden;
  40763. extern rule_struct _time_tzinfo[2] attribute_hidden;
  40764. @@ -605,11 +601,11 @@
  40765. } ll_tzname_item_t;
  40766. /* Structures form a list "UTC" -> "???" -> "tzname1" -> "tzname2"... */
  40767. -struct {
  40768. +static struct {
  40769. struct ll_tzname_item *next;
  40770. char tzname[4];
  40771. } ll_tzname_UNKNOWN = { NULL, "???" };
  40772. -const struct {
  40773. +static const struct {
  40774. struct ll_tzname_item *next;
  40775. char tzname[4];
  40776. } ll_tzname_UTC = { (void*)&ll_tzname_UNKNOWN, "UTC" };
  40777. @@ -671,7 +667,7 @@
  40778. isleap = __isleap(i);
  40779. --i;
  40780. day0 = (1
  40781. - + i /* Normal years increment 1 wday. */
  40782. + + i /* Normal years increment 1 wday. */
  40783. + (i/4)
  40784. - (i/100)
  40785. + (i/400) ) % 7;
  40786. @@ -684,20 +680,22 @@
  40787. }
  40788. } else if (r->rule_type == 'M') {
  40789. /* Find 0-based day number for 1st of the month. */
  40790. - day = 31*r->month - day_cor[r->month -1];
  40791. + day = 31 * r->month - day_cor[r->month - 1];
  40792. if (isleap && (day >= 59)) {
  40793. ++day;
  40794. }
  40795. - monlen = 31 + day_cor[r->month -1] - day_cor[r->month];
  40796. + monlen = 31 + day_cor[r->month - 1] - day_cor[r->month];
  40797. if (isleap && (r->month == 2)) {
  40798. ++monlen;
  40799. }
  40800. - /* Wweekday (0 is Sunday) of 1st of the month
  40801. + /* Weekday (0 is Sunday) of 1st of the month
  40802. * is (day0 + day) % 7. */
  40803. - if ((mday = r->day - ((day0 + day) % 7)) >= 0) {
  40804. - mday -= 7; /* Back up into prev month since r->week>0. */
  40805. + mday = r->day - ((day0 + day) % 7);
  40806. + if (mday >= 0) {
  40807. + mday -= 7; /* Back up into prev month since r->week > 0. */
  40808. }
  40809. - if ((mday += 7 * r->week) >= monlen) {
  40810. + mday += 7 * r->week;
  40811. + if (mday >= monlen) {
  40812. mday -= 7;
  40813. }
  40814. /* So, 0-based day number is... */
  40815. @@ -2100,7 +2098,8 @@
  40816. daylight = !!_time_tzinfo[1].tzname[0];
  40817. timezone = _time_tzinfo[0].gmt_offset;
  40818. -#if defined(__UCLIBC_HAS_TZ_FILE__) || defined(__UCLIBC_HAS_TZ_CACHING__)
  40819. +#if (defined(__UCLIBC_HAS_TZ_FILE__) && !defined(__UCLIBC_HAS_TZ_FILE_READ_MANY__)) || \
  40820. + defined(__UCLIBC_HAS_TZ_CACHING__)
  40821. FAST_DONE:
  40822. #endif
  40823. __UCLIBC_MUTEX_UNLOCK(_time_tzlock);
  40824. diff -Nur uClibc-0.9.33.2/libc/misc/ttyent/getttyent.c uClibc-git/libc/misc/ttyent/getttyent.c
  40825. --- uClibc-0.9.33.2/libc/misc/ttyent/getttyent.c 2012-05-15 09:20:09.000000000 +0200
  40826. +++ uClibc-git/libc/misc/ttyent/getttyent.c 2014-07-25 20:36:05.953330218 +0200
  40827. @@ -30,12 +30,11 @@
  40828. #include <features.h>
  40829. #include <ttyent.h>
  40830. #include <stdio.h>
  40831. -#include <stdio_ext.h>
  40832. #include <ctype.h>
  40833. #include <string.h>
  40834. #include <stdlib.h>
  40835. #ifdef __UCLIBC_HAS_THREADS__
  40836. -# include <pthread.h>
  40837. +# include <stdio_ext.h>
  40838. #endif
  40839. static char zapchar;
  40840. diff -Nur uClibc-0.9.33.2/libc/misc/ttyent/Makefile.in uClibc-git/libc/misc/ttyent/Makefile.in
  40841. --- uClibc-0.9.33.2/libc/misc/ttyent/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  40842. +++ uClibc-git/libc/misc/ttyent/Makefile.in 2014-07-25 20:36:05.953330218 +0200
  40843. @@ -7,13 +7,13 @@
  40844. subdirs += libc/misc/ttyent
  40845. -CSRC := getttyent.c
  40846. +CSRC-y := getttyent.c
  40847. MISC_TTYENT_DIR := $(top_srcdir)libc/misc/ttyent
  40848. MISC_TTYENT_OUT := $(top_builddir)libc/misc/ttyent
  40849. -MISC_TTYENT_SRC := $(patsubst %.c,$(MISC_TTYENT_DIR)/%.c,$(CSRC))
  40850. -MISC_TTYENT_OBJ := $(patsubst %.c,$(MISC_TTYENT_OUT)/%.o,$(CSRC))
  40851. +MISC_TTYENT_SRC := $(patsubst %.c,$(MISC_TTYENT_DIR)/%.c,$(CSRC-y))
  40852. +MISC_TTYENT_OBJ := $(patsubst %.c,$(MISC_TTYENT_OUT)/%.o,$(CSRC-y))
  40853. libc-y += $(MISC_TTYENT_OBJ)
  40854. diff -Nur uClibc-0.9.33.2/libc/misc/utmp/Makefile.in uClibc-git/libc/misc/utmp/Makefile.in
  40855. --- uClibc-0.9.33.2/libc/misc/utmp/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  40856. +++ uClibc-git/libc/misc/utmp/Makefile.in 2014-07-25 20:36:05.957330238 +0200
  40857. @@ -7,17 +7,14 @@
  40858. subdirs += libc/misc/utmp
  40859. -CSRC := utent.c wtent.c
  40860. -
  40861. -ifeq ($(UCLIBC_HAS_UTMPX),y)
  40862. -CSRC += utxent.c
  40863. -endif
  40864. +CSRC-y := utent.c wtent.c
  40865. +CSRC-$(UCLIBC_HAS_UTMPX) += utxent.c
  40866. MISC_UTMP_DIR := $(top_srcdir)libc/misc/utmp
  40867. MISC_UTMP_OUT := $(top_builddir)libc/misc/utmp
  40868. -MISC_UTMP_SRC := $(patsubst %.c,$(MISC_UTMP_DIR)/%.c,$(CSRC))
  40869. -MISC_UTMP_OBJ := $(patsubst %.c,$(MISC_UTMP_OUT)/%.o,$(CSRC))
  40870. +MISC_UTMP_SRC := $(patsubst %.c,$(MISC_UTMP_DIR)/%.c,$(CSRC-y))
  40871. +MISC_UTMP_OBJ := $(patsubst %.c,$(MISC_UTMP_OUT)/%.o,$(CSRC-y))
  40872. libc-y += $(MISC_UTMP_OBJ)
  40873. diff -Nur uClibc-0.9.33.2/libc/misc/utmp/utent.c uClibc-git/libc/misc/utmp/utent.c
  40874. --- uClibc-0.9.33.2/libc/misc/utmp/utent.c 2012-05-15 09:20:09.000000000 +0200
  40875. +++ uClibc-git/libc/misc/utmp/utent.c 2014-07-25 20:36:05.957330238 +0200
  40876. @@ -19,32 +19,22 @@
  40877. #include <errno.h>
  40878. #include <string.h>
  40879. #include <utmp.h>
  40880. +#ifdef __UCLIBC_HAS_UTMPX__
  40881. +# include <utmpx.h>
  40882. +#endif
  40883. #include <not-cancel.h>
  40884. #include <bits/uClibc_mutex.h>
  40885. __UCLIBC_MUTEX_STATIC(utmplock, PTHREAD_MUTEX_INITIALIZER);
  40886. -
  40887. -/* Do not create extra unlocked functions if no locking is needed */
  40888. -#if defined __UCLIBC_HAS_THREADS__
  40889. -# define static_if_threaded static
  40890. -#else
  40891. -# define static_if_threaded /* nothing */
  40892. -# define __setutent setutent
  40893. -# define __getutent getutent
  40894. -# define __getutid getutid
  40895. -#endif
  40896. -
  40897. -
  40898. /* Some global crap */
  40899. static int static_fd = -1;
  40900. static struct utmp static_utmp;
  40901. static const char default_file_name[] = _PATH_UTMP;
  40902. static const char *static_ut_name = default_file_name;
  40903. -
  40904. /* This function must be called with the LOCK held */
  40905. -static_if_threaded void __setutent(void)
  40906. +static void __setutent_unlocked(void)
  40907. {
  40908. if (static_fd < 0) {
  40909. static_fd = open_not_cancel_2(static_ut_name, O_RDWR | O_CLOEXEC);
  40910. @@ -63,17 +53,24 @@
  40911. lseek(static_fd, 0, SEEK_SET);
  40912. }
  40913. #if defined __UCLIBC_HAS_THREADS__
  40914. -void setutent(void)
  40915. +static void __setutent(void)
  40916. {
  40917. __UCLIBC_MUTEX_LOCK(utmplock);
  40918. - __setutent();
  40919. + __setutent_unlocked();
  40920. __UCLIBC_MUTEX_UNLOCK(utmplock);
  40921. }
  40922. +#else
  40923. +static void __setutent(void);
  40924. +strong_alias(__setutent_unlocked,__setutent)
  40925. +#endif
  40926. +strong_alias(__setutent,setutent)
  40927. +
  40928. +#ifdef __UCLIBC_HAS_UTMPX__
  40929. +strong_alias(__setutent,setutxent)
  40930. #endif
  40931. -libc_hidden_def(setutent)
  40932. /* This function must be called with the LOCK held */
  40933. -static_if_threaded struct utmp *__getutent(void)
  40934. +static struct utmp *__getutent_unlocked(void)
  40935. {
  40936. if (static_fd < 0) {
  40937. __setutent();
  40938. @@ -89,19 +86,29 @@
  40939. return NULL;
  40940. }
  40941. #if defined __UCLIBC_HAS_THREADS__
  40942. -struct utmp *getutent(void)
  40943. +static struct utmp *__getutent(void)
  40944. {
  40945. struct utmp *ret;
  40946. __UCLIBC_MUTEX_LOCK(utmplock);
  40947. - ret = __getutent();
  40948. + ret = __getutent_unlocked();
  40949. __UCLIBC_MUTEX_UNLOCK(utmplock);
  40950. return ret;
  40951. }
  40952. +#else
  40953. +static struct utmp *__getutent(void);
  40954. +strong_alias(__getutent_unlocked,__getutent)
  40955. +#endif
  40956. +strong_alias(__getutent,getutent)
  40957. +
  40958. +#ifdef __UCLIBC_HAS_UTMPX__
  40959. +struct utmpx *getutxent(void)
  40960. +{
  40961. + return (struct utmpx *) __getutent ();
  40962. +}
  40963. #endif
  40964. -libc_hidden_def(getutent)
  40965. -void endutent(void)
  40966. +static void __endutent(void)
  40967. {
  40968. __UCLIBC_MUTEX_LOCK(utmplock);
  40969. if (static_fd >= 0)
  40970. @@ -109,10 +116,14 @@
  40971. static_fd = -1;
  40972. __UCLIBC_MUTEX_UNLOCK(utmplock);
  40973. }
  40974. -libc_hidden_def(endutent)
  40975. +strong_alias(__endutent,endutent)
  40976. +
  40977. +#ifdef __UCLIBC_HAS_UTMPX__
  40978. +strong_alias(__endutent,endutxent)
  40979. +#endif
  40980. /* This function must be called with the LOCK held */
  40981. -static_if_threaded struct utmp *__getutid(const struct utmp *utmp_entry)
  40982. +static struct utmp *__getutid_unlocked(const struct utmp *utmp_entry)
  40983. {
  40984. struct utmp *lutmp;
  40985. unsigned type;
  40986. @@ -122,7 +133,7 @@
  40987. type = utmp_entry->ut_type - 1;
  40988. type /= 4;
  40989. - while ((lutmp = __getutent()) != NULL) {
  40990. + while ((lutmp = __getutent_unlocked()) != NULL) {
  40991. if (type == 0 && lutmp->ut_type == utmp_entry->ut_type) {
  40992. /* one of RUN_LVL, BOOT_TIME, NEW_TIME, OLD_TIME */
  40993. return lutmp;
  40994. @@ -136,24 +147,34 @@
  40995. return NULL;
  40996. }
  40997. #if defined __UCLIBC_HAS_THREADS__
  40998. -struct utmp *getutid(const struct utmp *utmp_entry)
  40999. +static struct utmp *__getutid(const struct utmp *utmp_entry)
  41000. {
  41001. struct utmp *ret;
  41002. __UCLIBC_MUTEX_LOCK(utmplock);
  41003. - ret = __getutid(utmp_entry);
  41004. + ret = __getutid_unlocked(utmp_entry);
  41005. __UCLIBC_MUTEX_UNLOCK(utmplock);
  41006. return ret;
  41007. }
  41008. +#else
  41009. +static struct utmp *__getutid(const struct utmp *utmp_entry);
  41010. +strong_alias(__getutid_unlocked,__getutid)
  41011. +#endif
  41012. +strong_alias(__getutid,getutid)
  41013. +
  41014. +#ifdef __UCLIBC_HAS_UTMPX__
  41015. +struct utmpx *getutxid(const struct utmpx *utmp_entry)
  41016. +{
  41017. + return (struct utmpx *) __getutid ((const struct utmp *) utmp_entry);
  41018. +}
  41019. #endif
  41020. -libc_hidden_def(getutid)
  41021. -struct utmp *getutline(const struct utmp *utmp_entry)
  41022. +static struct utmp *__getutline(const struct utmp *utmp_entry)
  41023. {
  41024. struct utmp *lutmp;
  41025. __UCLIBC_MUTEX_LOCK(utmplock);
  41026. - while ((lutmp = __getutent()) != NULL) {
  41027. + while ((lutmp = __getutent_unlocked()) != NULL) {
  41028. if (lutmp->ut_type == USER_PROCESS || lutmp->ut_type == LOGIN_PROCESS) {
  41029. if (strncmp(lutmp->ut_line, utmp_entry->ut_line, sizeof(lutmp->ut_line)) == 0) {
  41030. break;
  41031. @@ -163,16 +184,23 @@
  41032. __UCLIBC_MUTEX_UNLOCK(utmplock);
  41033. return lutmp;
  41034. }
  41035. -libc_hidden_def(getutline)
  41036. +strong_alias(__getutline,getutline)
  41037. +
  41038. +#ifdef __UCLIBC_HAS_UTMPX__
  41039. +struct utmpx *getutxline(const struct utmpx *utmp_entry)
  41040. +{
  41041. + return (struct utmpx *) __getutline ((const struct utmp *) utmp_entry);
  41042. +}
  41043. +#endif
  41044. -struct utmp *pututline(const struct utmp *utmp_entry)
  41045. +static struct utmp *__pututline(const struct utmp *utmp_entry)
  41046. {
  41047. __UCLIBC_MUTEX_LOCK(utmplock);
  41048. /* Ignore the return value. That way, if they've already positioned
  41049. the file pointer where they want it, everything will work out. */
  41050. lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR);
  41051. - if (__getutid(utmp_entry) != NULL)
  41052. + if (__getutid_unlocked(utmp_entry) != NULL)
  41053. lseek(static_fd, (off_t) - sizeof(struct utmp), SEEK_CUR);
  41054. else
  41055. lseek(static_fd, (off_t) 0, SEEK_END);
  41056. @@ -182,9 +210,16 @@
  41057. __UCLIBC_MUTEX_UNLOCK(utmplock);
  41058. return (struct utmp *)utmp_entry;
  41059. }
  41060. -libc_hidden_def(pututline)
  41061. +strong_alias(__pututline,pututline)
  41062. +
  41063. +#ifdef __UCLIBC_HAS_UTMPX__
  41064. +struct utmpx *pututxline (const struct utmpx *utmp_entry)
  41065. +{
  41066. + return (struct utmpx *) __pututline ((const struct utmp *) utmp_entry);
  41067. +}
  41068. +#endif
  41069. -int utmpname(const char *new_ut_name)
  41070. +static int __utmpname(const char *new_ut_name)
  41071. {
  41072. __UCLIBC_MUTEX_LOCK(utmplock);
  41073. if (new_ut_name != NULL) {
  41074. @@ -205,4 +240,8 @@
  41075. __UCLIBC_MUTEX_UNLOCK(utmplock);
  41076. return 0; /* or maybe return -(static_ut_name != new_ut_name)? */
  41077. }
  41078. -libc_hidden_def(utmpname)
  41079. +strong_alias(__utmpname,utmpname)
  41080. +
  41081. +#ifdef __UCLIBC_HAS_UTMPX__
  41082. +strong_alias(__utmpname,utmpxname)
  41083. +#endif
  41084. diff -Nur uClibc-0.9.33.2/libc/misc/utmp/utxent.c uClibc-git/libc/misc/utmp/utxent.c
  41085. --- uClibc-0.9.33.2/libc/misc/utmp/utxent.c 2012-05-15 09:20:09.000000000 +0200
  41086. +++ uClibc-git/libc/misc/utmp/utxent.c 2014-07-25 20:36:05.957330238 +0200
  41087. @@ -13,6 +13,7 @@
  41088. #include <utmpx.h>
  41089. #include <utmp.h>
  41090. +#if 0 /* moved to utent.c */
  41091. void setutxent(void)
  41092. {
  41093. setutent ();
  41094. @@ -48,10 +49,12 @@
  41095. return utmpname (new_ut_name);
  41096. }
  41097. +/* moved to wtent.c */
  41098. void updwtmpx (const char *wtmpx_file, const struct utmpx *utmpx)
  41099. {
  41100. updwtmp (wtmpx_file, (const struct utmp *) utmpx);
  41101. }
  41102. +#endif
  41103. /* Copy the information in UTMPX to UTMP. */
  41104. void getutmp (const struct utmpx *utmpx, struct utmp *utmp)
  41105. @@ -104,4 +107,3 @@
  41106. utmpx->ut_time = utmp->ut_time;
  41107. #endif
  41108. }
  41109. -
  41110. diff -Nur uClibc-0.9.33.2/libc/misc/utmp/wtent.c uClibc-git/libc/misc/utmp/wtent.c
  41111. --- uClibc-0.9.33.2/libc/misc/utmp/wtent.c 2012-05-15 09:20:09.000000000 +0200
  41112. +++ uClibc-git/libc/misc/utmp/wtent.c 2014-07-25 20:36:05.957330238 +0200
  41113. @@ -11,6 +11,9 @@
  41114. #include <time.h>
  41115. #include <unistd.h>
  41116. #include <utmp.h>
  41117. +#ifdef __UCLIBC_HAS_UTMPX__
  41118. +# include <utmpx.h>
  41119. +#endif
  41120. #include <fcntl.h>
  41121. #include <sys/file.h>
  41122. #include <not-cancel.h>
  41123. @@ -33,11 +36,11 @@
  41124. }
  41125. #endif
  41126. -void updwtmp(const char *wtmp_file, const struct utmp *lutmp)
  41127. +static void __updwtmp(const char *wtmp_file, const struct utmp *lutmp)
  41128. {
  41129. int fd;
  41130. - fd = open_not_cancel(wtmp_file, O_APPEND | O_WRONLY, 0);
  41131. + fd = open_not_cancel_2(wtmp_file, O_APPEND | O_WRONLY);
  41132. if (fd >= 0) {
  41133. if (lockf(fd, F_LOCK, 0) == 0) {
  41134. write_not_cancel(fd, lutmp, sizeof(struct utmp));
  41135. @@ -46,4 +49,11 @@
  41136. }
  41137. }
  41138. }
  41139. -libc_hidden_def(updwtmp)
  41140. +strong_alias(__updwtmp,updwtmp)
  41141. +
  41142. +#ifdef __UCLIBC_HAS_UTMPX__
  41143. +void updwtmpx (const char *wtmpx_file, const struct utmpx *utmpx)
  41144. +{
  41145. + __updwtmp (wtmpx_file, (const struct utmp *) utmpx);
  41146. +}
  41147. +#endif
  41148. diff -Nur uClibc-0.9.33.2/libc/misc/wchar/Makefile.in uClibc-git/libc/misc/wchar/Makefile.in
  41149. --- uClibc-0.9.33.2/libc/misc/wchar/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  41150. +++ uClibc-git/libc/misc/wchar/Makefile.in 2014-07-25 20:36:05.969330302 +0200
  41151. @@ -19,19 +19,17 @@
  41152. subdirs += libc/misc/wchar
  41153. # multi source wchar.c
  41154. -CSRC := btowc.c wctob.c mbsinit.c mbrlen.c mbrtowc.c wcrtomb.c mbsrtowcs.c \
  41155. +CSRC-y := btowc.c wctob.c mbsinit.c mbrlen.c mbrtowc.c wcrtomb.c mbsrtowcs.c \
  41156. wcsrtombs.c _wchar_utf8sntowcs.c _wchar_wcsntoutf8s.c \
  41157. mbsnrtowcs.c wcsnrtombs.c wcwidth.c wcswidth.c
  41158. -ifeq ($(UCLIBC_HAS_LOCALE),y)
  41159. -CSRC += iconv.c
  41160. -endif
  41161. +CSRC-$(UCLIBC_HAS_LOCALE) += iconv.c
  41162. MISC_WCHAR_DIR := $(top_srcdir)libc/misc/wchar
  41163. MISC_WCHAR_OUT := $(top_builddir)libc/misc/wchar
  41164. -MISC_WCHAR_SRC := $(patsubst %.c,$(MISC_WCHAR_DIR)/%.c,$(CSRC))
  41165. -MISC_WCHAR_OBJ := $(patsubst %.c,$(MISC_WCHAR_OUT)/%.o,$(CSRC))
  41166. +MISC_WCHAR_SRC := $(patsubst %.c,$(MISC_WCHAR_DIR)/%.c,$(CSRC-y))
  41167. +MISC_WCHAR_OBJ := $(patsubst %.c,$(MISC_WCHAR_OUT)/%.o,$(CSRC-y))
  41168. libc-$(UCLIBC_HAS_WCHAR) += $(MISC_WCHAR_OBJ)
  41169. diff -Nur uClibc-0.9.33.2/libc/misc/wchar/wchar.c uClibc-git/libc/misc/wchar/wchar.c
  41170. --- uClibc-0.9.33.2/libc/misc/wchar/wchar.c 2012-05-15 09:20:09.000000000 +0200
  41171. +++ uClibc-git/libc/misc/wchar/wchar.c 2014-07-25 20:36:05.969330302 +0200
  41172. @@ -12,8 +12,8 @@
  41173. * Library General Public License for more details.
  41174. *
  41175. * You should have received a copy of the GNU Library General Public
  41176. - * License along with this library; if not, write to the Free
  41177. - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  41178. + * License along with this library; if not, see
  41179. + * <http://www.gnu.org/licenses/>.
  41180. */
  41181. /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
  41182. @@ -1196,6 +1196,9 @@
  41183. #endif
  41184. #if defined L_iconv || defined L_iconv_main
  41185. +# ifdef L_iconv_main
  41186. +static
  41187. +# endif
  41188. const unsigned char __iconv_codesets[] =
  41189. "\x0a\xe0""WCHAR_T\x00" /* superset of UCS-4 but platform-endian */
  41190. #if __BYTE_ORDER == __BIG_ENDIAN
  41191. diff -Nur uClibc-0.9.33.2/libc/misc/wctype/Makefile.in uClibc-git/libc/misc/wctype/Makefile.in
  41192. --- uClibc-0.9.33.2/libc/misc/wctype/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  41193. +++ uClibc-git/libc/misc/wctype/Makefile.in 2014-07-25 20:36:05.985330385 +0200
  41194. @@ -14,19 +14,15 @@
  41195. iswxdigit.c iswblank.c wctrans.c towctrans.c \
  41196. wctype.c iswctype.c towlower.c towupper.c
  41197. -CSRC :=
  41198. -ifeq ($(UCLIBC_HAS_WCHAR),y)
  41199. -CSRC += $(COM_SRC)
  41200. -endif
  41201. -ifeq ($(UCLIBC_HAS_XLOCALE),y)
  41202. -CSRC += $(patsubst %.c,%_l.c,$(COM_SRC))
  41203. -endif
  41204. +CSRC-y :=
  41205. +CSRC-$(UCLIBC_HAS_WCHAR) += $(COM_SRC)
  41206. +CSRC-$(UCLIBC_HAS_XLOCALE) += $(patsubst %.c,%_l.c,$(COM_SRC))
  41207. MISC_WCTYPE_DIR := $(top_srcdir)libc/misc/wctype
  41208. MISC_WCTYPE_OUT := $(top_builddir)libc/misc/wctype
  41209. -MISC_WCTYPE_SRC := $(patsubst %.c,$(MISC_WCTYPE_DIR)/%.c,$(CSRC))
  41210. -MISC_WCTYPE_OBJ := $(patsubst %.c,$(MISC_WCTYPE_OUT)/%.o,$(CSRC))
  41211. +MISC_WCTYPE_SRC := $(patsubst %.c,$(MISC_WCTYPE_DIR)/%.c,$(CSRC-y))
  41212. +MISC_WCTYPE_OBJ := $(patsubst %.c,$(MISC_WCTYPE_OUT)/%.o,$(CSRC-y))
  41213. libc-y += $(MISC_WCTYPE_OBJ)
  41214. diff -Nur uClibc-0.9.33.2/libc/misc/wctype/_wctype.c uClibc-git/libc/misc/wctype/_wctype.c
  41215. --- uClibc-0.9.33.2/libc/misc/wctype/_wctype.c 2012-05-15 09:20:09.000000000 +0200
  41216. +++ uClibc-git/libc/misc/wctype/_wctype.c 2014-07-25 20:36:05.985330385 +0200
  41217. @@ -11,8 +11,8 @@
  41218. * Library General Public License for more details.
  41219. *
  41220. * You should have received a copy of the GNU Library General Public
  41221. - * License along with this library; if not, write to the Free
  41222. - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  41223. + * License along with this library; if not, see
  41224. + * <http://www.gnu.org/licenses/>.
  41225. */
  41226. /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
  41227. @@ -41,10 +41,6 @@
  41228. # error xlocale functionality is not supported in stub locale mode.
  41229. #endif
  41230. -#ifdef __UCLIBC_HAS_XLOCALE__
  41231. -# include <xlocale.h>
  41232. -#endif
  41233. -
  41234. /* We know wide char support is enabled. We wouldn't be here otherwise. */
  41235. /* Define this if you want to unify the towupper and towlower code in the
  41236. diff -Nur uClibc-0.9.33.2/libc/misc/wordexp/Makefile.in uClibc-git/libc/misc/wordexp/Makefile.in
  41237. --- uClibc-0.9.33.2/libc/misc/wordexp/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  41238. +++ uClibc-git/libc/misc/wordexp/Makefile.in 2014-07-25 20:36:05.997330448 +0200
  41239. @@ -7,13 +7,13 @@
  41240. subdirs += libc/misc/wordexp
  41241. -CSRC := wordexp.c
  41242. +CSRC-y := wordexp.c
  41243. MISC_WORDEXP_DIR := $(top_srcdir)libc/misc/wordexp
  41244. MISC_WORDEXP_OUT := $(top_builddir)libc/misc/wordexp
  41245. -MISC_WORDEXP_SRC := $(patsubst %.c,$(MISC_WORDEXP_DIR)/%.c,$(CSRC))
  41246. -MISC_WORDEXP_OBJ := $(patsubst %.c,$(MISC_WORDEXP_OUT)/%.o,$(CSRC))
  41247. +MISC_WORDEXP_SRC := $(patsubst %.c,$(MISC_WORDEXP_DIR)/%.c,$(CSRC-y))
  41248. +MISC_WORDEXP_OBJ := $(patsubst %.c,$(MISC_WORDEXP_OUT)/%.o,$(CSRC-y))
  41249. libc-$(UCLIBC_HAS_WORDEXP) += $(MISC_WORDEXP_OBJ)
  41250. diff -Nur uClibc-0.9.33.2/libc/misc/wordexp/wordexp.c uClibc-git/libc/misc/wordexp/wordexp.c
  41251. --- uClibc-0.9.33.2/libc/misc/wordexp/wordexp.c 2012-05-15 09:20:09.000000000 +0200
  41252. +++ uClibc-git/libc/misc/wordexp/wordexp.c 2014-07-25 20:36:05.997330448 +0200
  41253. @@ -16,11 +16,11 @@
  41254. You should have received a copy of the GNU Library General Public
  41255. License along with the GNU C Library; see the file COPYING.LIB. If not,
  41256. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  41257. - Boston, MA 02111-1307, USA. */
  41258. + see <http://www.gnu.org/licenses/>. */
  41259. #include <features.h>
  41260. #include <bits/kernel-features.h>
  41261. +#include <ctype.h>
  41262. #include <sys/types.h>
  41263. #include <sys/wait.h>
  41264. #include <fcntl.h>
  41265. @@ -36,6 +36,10 @@
  41266. #include <glob.h>
  41267. #include <wordexp.h>
  41268. +#ifndef __ARCH_USE_MMU__
  41269. +# define fork vfork
  41270. +#endif
  41271. +
  41272. #define __WORDEXP_FULL
  41273. /*
  41274. diff -Nur uClibc-0.9.33.2/libc/pwd_grp/lckpwdf.c uClibc-git/libc/pwd_grp/lckpwdf.c
  41275. --- uClibc-0.9.33.2/libc/pwd_grp/lckpwdf.c 2012-05-15 09:20:09.000000000 +0200
  41276. +++ uClibc-git/libc/pwd_grp/lckpwdf.c 2014-07-25 20:36:06.017330553 +0200
  41277. @@ -15,9 +15,8 @@
  41278. Lesser General Public License for more details.
  41279. You should have received a copy of the GNU Lesser General Public
  41280. - License along with the GNU C Library; if not, write to the Free
  41281. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41282. - 02111-1307 USA. */
  41283. + License along with the GNU C Library; if not, see
  41284. + <http://www.gnu.org/licenses/>. */
  41285. #include <features.h>
  41286. #include <fcntl.h>
  41287. @@ -51,6 +50,7 @@
  41288. struct sigaction new_act; /* New signal action. */
  41289. struct flock fl; /* Information struct for locking. */
  41290. int result;
  41291. + int rv = -1;
  41292. if (lock_fd != -1)
  41293. /* Still locked by own process. */
  41294. @@ -111,11 +111,13 @@
  41295. if (result < 0) {
  41296. close(lock_fd);
  41297. lock_fd = -1;
  41298. + goto DONE;
  41299. }
  41300. + rv = 0;
  41301. DONE:
  41302. __UCLIBC_MUTEX_UNLOCK(mylock);
  41303. - return 0; /* TODO: return result? */
  41304. + return rv;
  41305. }
  41306. diff -Nur uClibc-0.9.33.2/libc/pwd_grp/Makefile.in uClibc-git/libc/pwd_grp/Makefile.in
  41307. --- uClibc-0.9.33.2/libc/pwd_grp/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  41308. +++ uClibc-git/libc/pwd_grp/Makefile.in 2014-07-25 20:36:06.009330510 +0200
  41309. @@ -10,20 +10,17 @@
  41310. PWDGRP_DIR := $(top_srcdir)libc/pwd_grp
  41311. PWDGRP_OUT := $(top_builddir)libc/pwd_grp
  41312. -CSRC := $(notdir $(wildcard $(PWDGRP_DIR)/*.c))
  41313. -CSRC := $(filter-out pwd_grp.c pwd_grp_internal.c,$(CSRC))
  41314. -
  41315. -ifneq ($(UCLIBC_HAS_SHADOW),y)
  41316. -SHADOW_CSRC := \
  41317. - fgetspent_r.c fgetspent.c getspent_r.c getspent.c \
  41318. +CSRC-y := $(notdir $(wildcard $(PWDGRP_DIR)/*.c))
  41319. +CSRC- := pwd_grp.c pwd_grp_internal.c # multi-source and helper
  41320. +CSRC-$(UCLIBC_HAS_SHADOW) += fgetspent_r.c fgetspent.c getspent_r.c getspent.c \
  41321. getspnam_r.c getspnam.c lckpwdf.c putspent.c \
  41322. sgetspent_r.c sgetspent.c __parsespent.c
  41323. # getspuid_r.c getspuid.c
  41324. -CSRC := $(filter-out $(SHADOW_CSRC),$(CSRC))
  41325. -endif
  41326. -PWDGRP_SRC := $(patsubst %.c,$(PWDGRP_DIR)/%.c,$(CSRC))
  41327. -PWDGRP_OBJ := $(patsubst %.c,$(PWDGRP_OUT)/%.o,$(CSRC))
  41328. +CSRC-y := $(filter-out $(CSRC-),$(CSRC-y))
  41329. +
  41330. +PWDGRP_SRC := $(patsubst %.c,$(PWDGRP_DIR)/%.c,$(CSRC-y))
  41331. +PWDGRP_OBJ := $(patsubst %.c,$(PWDGRP_OUT)/%.o,$(CSRC-y))
  41332. libc-y += $(PWDGRP_OBJ)
  41333. diff -Nur uClibc-0.9.33.2/libc/pwd_grp/pwd_grp.c uClibc-git/libc/pwd_grp/pwd_grp.c
  41334. --- uClibc-0.9.33.2/libc/pwd_grp/pwd_grp.c 2012-05-15 09:20:09.000000000 +0200
  41335. +++ uClibc-git/libc/pwd_grp/pwd_grp.c 2014-07-25 20:36:06.017330553 +0200
  41336. @@ -354,6 +354,7 @@
  41337. getpwnam_r(name, &resultbuf, buffer, sizeof(buffer), &result);
  41338. return result;
  41339. }
  41340. +libc_hidden_def(getpwnam)
  41341. #endif
  41342. /**********************************************************************/
  41343. diff -Nur uClibc-0.9.33.2/libc/pwd_grp/pwd_grp_internal.c uClibc-git/libc/pwd_grp/pwd_grp_internal.c
  41344. --- uClibc-0.9.33.2/libc/pwd_grp/pwd_grp_internal.c 2012-05-15 09:20:09.000000000 +0200
  41345. +++ uClibc-git/libc/pwd_grp/pwd_grp_internal.c 2014-07-25 20:36:06.017330553 +0200
  41346. @@ -34,9 +34,6 @@
  41347. #ifdef __UCLIBC_HAS_SHADOW__
  41348. #include <shadow.h>
  41349. #endif
  41350. -#ifdef __UCLIBC_HAS_THREADS__
  41351. -#include <pthread.h>
  41352. -#endif
  41353. /**********************************************************************/
  41354. /* Sizes for statically allocated buffers. */
  41355. diff -Nur uClibc-0.9.33.2/libc/signal/allocrtsig.c uClibc-git/libc/signal/allocrtsig.c
  41356. --- uClibc-0.9.33.2/libc/signal/allocrtsig.c 2012-05-15 09:20:09.000000000 +0200
  41357. +++ uClibc-git/libc/signal/allocrtsig.c 2014-07-25 20:36:06.033330637 +0200
  41358. @@ -14,13 +14,11 @@
  41359. Lesser General Public License for more details.
  41360. You should have received a copy of the GNU Lesser General Public
  41361. - License along with the GNU C Library; if not, write to the Free
  41362. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41363. - 02111-1307 USA. */
  41364. + License along with the GNU C Library; if not, see
  41365. + <http://www.gnu.org/licenses/>. */
  41366. #include <features.h>
  41367. #include <signal.h>
  41368. -#include <sys/types.h>
  41369. #include <sys/syscall.h>
  41370. /* Only enable rt signals when it is supported at compile time */
  41371. @@ -34,6 +32,13 @@
  41372. #else
  41373. # ifdef __UCLIBC_HAS_THREADS_NATIVE__
  41374. static int current_rtmin = __SIGRTMIN + 2;
  41375. +# elif defined __UCLIBC_HAS_THREADS__ && !defined __LINUXTHREADS_OLD__
  41376. +/* psm: might be good for LT old as well, do not want to break it for now */
  41377. +/* Sanity check */
  41378. +# if !defined __SIGRTMIN || (__SIGRTMAX - __SIGRTMIN) < 3
  41379. +# error "This must not happen"
  41380. +# endif
  41381. +static int current_rtmin = __SIGRTMIN + 3;
  41382. # else
  41383. static int current_rtmin = __SIGRTMIN;
  41384. # endif
  41385. @@ -52,6 +57,7 @@
  41386. return current_rtmax;
  41387. }
  41388. +#if 0
  41389. /* Allocate real-time signal with highest/lowest available
  41390. priority. Please note that we don't use a lock since we assume
  41391. this function to be called at program start. */
  41392. @@ -64,3 +70,4 @@
  41393. return high ? current_rtmin++ : current_rtmax--;
  41394. }
  41395. +#endif
  41396. diff -Nur uClibc-0.9.33.2/libc/signal/killpg.c uClibc-git/libc/signal/killpg.c
  41397. --- uClibc-0.9.33.2/libc/signal/killpg.c 2012-05-15 09:20:09.000000000 +0200
  41398. +++ uClibc-git/libc/signal/killpg.c 2014-07-25 20:36:06.033330637 +0200
  41399. @@ -12,14 +12,12 @@
  41400. Lesser General Public License for more details.
  41401. You should have received a copy of the GNU Lesser General Public
  41402. - License along with the GNU C Library; if not, write to the Free
  41403. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41404. - 02111-1307 USA. */
  41405. + License along with the GNU C Library; if not, see
  41406. + <http://www.gnu.org/licenses/>. */
  41407. #include <errno.h>
  41408. #include <signal.h>
  41409. -
  41410. /* Send SIG to all processes in process group PGRP.
  41411. If PGRP is zero, send SIG to all processes in
  41412. the current process's process group. */
  41413. diff -Nur uClibc-0.9.33.2/libc/signal/Makefile.in uClibc-git/libc/signal/Makefile.in
  41414. --- uClibc-0.9.33.2/libc/signal/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  41415. +++ uClibc-git/libc/signal/Makefile.in 2014-07-25 20:36:06.033330637 +0200
  41416. @@ -8,20 +8,18 @@
  41417. subdirs += libc/signal
  41418. CSRC-y := allocrtsig.c killpg.c raise.c sigaction.c sigaddset.c sigandset.c \
  41419. - sigblock.c sigdelset.c sigempty.c sigfillset.c siggetmask.c \
  41420. + sigdelset.c sigempty.c sigfillset.c \
  41421. sigisempty.c sigismem.c sigjmp.c signal.c \
  41422. - sigorset.c sigsetmask.c sigsetops.c sigwait.c
  41423. + sigorset.c sigsetops.c sigwait.c
  41424. CSRC-$(UCLIBC_HAS_OBSOLETE_BSD_SIGNAL) += \
  41425. sighold.c sigignore.c sigrelse.c sigset.c
  41426. CSRC-$(UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL) += sysv_signal.c
  41427. CSRC-$(UCLIBC_SUSV4_LEGACY) += sigintr.c sigpause.c
  41428. -ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
  41429. -CSRC-y:=$(filter-out raise.c,$(CSRC-y))
  41430. -endif
  41431. +CSRC-$(UCLIBC_HAS_THREADS_NATIVE):=$(filter-out raise.c,$(CSRC-y))
  41432. -ifneq ($(strip $(ARCH_OBJS)),)
  41433. -CSRC-y := $(filter-out $(notdir $(ARCH_OBJS:.o=.c)),$(CSRC-y))
  41434. +ifneq ($(strip $(ARCH_OBJS-y)),)
  41435. +CSRC-y := $(filter-out $(notdir $(ARCH_OBJS-y:.o=.c)),$(CSRC-y))
  41436. endif
  41437. ifneq ($(UCLIBC_HAS_BACKTRACE),)
  41438. diff -Nur uClibc-0.9.33.2/libc/signal/raise.c uClibc-git/libc/signal/raise.c
  41439. --- uClibc-0.9.33.2/libc/signal/raise.c 2012-05-15 09:20:09.000000000 +0200
  41440. +++ uClibc-git/libc/signal/raise.c 2014-07-25 20:36:06.033330637 +0200
  41441. @@ -3,9 +3,7 @@
  41442. */
  41443. #include <unistd.h>
  41444. -#include <string.h>
  41445. #include <signal.h>
  41446. -#include <sys/types.h>
  41447. int raise(int signo)
  41448. {
  41449. diff -Nur uClibc-0.9.33.2/libc/signal/sigaction.c uClibc-git/libc/signal/sigaction.c
  41450. --- uClibc-0.9.33.2/libc/signal/sigaction.c 2012-05-15 09:20:09.000000000 +0200
  41451. +++ uClibc-git/libc/signal/sigaction.c 2014-07-25 20:36:06.033330637 +0200
  41452. @@ -12,23 +12,12 @@
  41453. Lesser General Public License for more details.
  41454. You should have received a copy of the GNU Lesser General Public
  41455. - License along with the GNU C Library; if not, write to the Free
  41456. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41457. - 02111-1307 USA. */
  41458. + License along with the GNU C Library; if not, see
  41459. + <http://www.gnu.org/licenses/>. */
  41460. -#include <features.h>
  41461. -#include <errno.h>
  41462. #include <signal.h>
  41463. -#include <string.h>
  41464. #include <sys/syscall.h>
  41465. -#include <bits/kernel_sigaction.h>
  41466. -
  41467. -#ifndef LIBC_SIGACTION
  41468. -extern __typeof(sigaction) __libc_sigaction;
  41469. -#endif
  41470. -
  41471. -
  41472. #if defined __NR_rt_sigaction
  41473. /* If ACT is not NULL, change the action for SIG to *ACT.
  41474. @@ -47,6 +36,9 @@
  41475. }
  41476. #else
  41477. +# define __need_NULL
  41478. +# include <stddef.h>
  41479. +# include <bits/kernel_sigaction.h>
  41480. /* If ACT is not NULL, change the action for SIG to *ACT.
  41481. If OACT is not NULL, put the old action for SIG in *OACT. */
  41482. diff -Nur uClibc-0.9.33.2/libc/signal/sigaddset.c uClibc-git/libc/signal/sigaddset.c
  41483. --- uClibc-0.9.33.2/libc/signal/sigaddset.c 2012-05-15 09:20:09.000000000 +0200
  41484. +++ uClibc-git/libc/signal/sigaddset.c 2014-07-25 20:36:06.033330637 +0200
  41485. @@ -12,11 +12,13 @@
  41486. Lesser General Public License for more details.
  41487. You should have received a copy of the GNU Lesser General Public
  41488. - License along with the GNU C Library; if not, write to the Free
  41489. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41490. - 02111-1307 USA. */
  41491. + License along with the GNU C Library; if not, see
  41492. + <http://www.gnu.org/licenses/>. */
  41493. -#include "sigsetops.h"
  41494. +#define __need_NULL
  41495. +#include <stddef.h>
  41496. +#include <signal.h>
  41497. +#include <errno.h>
  41498. /* Add SIGNO to SET. */
  41499. int
  41500. diff -Nur uClibc-0.9.33.2/libc/signal/sigandset.c uClibc-git/libc/signal/sigandset.c
  41501. --- uClibc-0.9.33.2/libc/signal/sigandset.c 2012-05-15 09:20:09.000000000 +0200
  41502. +++ uClibc-git/libc/signal/sigandset.c 2014-07-25 20:36:06.033330637 +0200
  41503. @@ -12,9 +12,8 @@
  41504. Lesser General Public License for more details.
  41505. You should have received a copy of the GNU Lesser General Public
  41506. - License along with the GNU C Library; if not, write to the Free
  41507. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41508. - 02111-1307 USA. */
  41509. + License along with the GNU C Library; if not, see
  41510. + <http://www.gnu.org/licenses/>. */
  41511. #include <errno.h>
  41512. #include <signal.h>
  41513. diff -Nur uClibc-0.9.33.2/libc/signal/sigblock.c uClibc-git/libc/signal/sigblock.c
  41514. --- uClibc-0.9.33.2/libc/signal/sigblock.c 2012-05-15 09:20:09.000000000 +0200
  41515. +++ uClibc-git/libc/signal/sigblock.c 2014-07-25 20:36:06.033330637 +0200
  41516. @@ -12,18 +12,16 @@
  41517. Lesser General Public License for more details.
  41518. You should have received a copy of the GNU Lesser General Public
  41519. - License along with the GNU C Library; if not, write to the Free
  41520. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41521. - 02111-1307 USA. */
  41522. + License along with the GNU C Library; if not, see
  41523. + <http://www.gnu.org/licenses/>. */
  41524. -#define __UCLIBC_HIDE_DEPRECATED__
  41525. -#include <errno.h>
  41526. +/*#define __UCLIBC_HIDE_DEPRECATED__*/
  41527. #include <signal.h>
  41528. #include "sigset-cvt-mask.h"
  41529. /* Block signals in MASK, returning the old mask. */
  41530. -int sigblock (int mask)
  41531. +static int sigblock (int mask)
  41532. {
  41533. sigset_t set, oset;
  41534. @@ -31,4 +29,3 @@
  41535. sigprocmask (SIG_BLOCK, &set, &oset); /* can't fail */
  41536. return sigset_get_old_mask (&oset);
  41537. }
  41538. -libc_hidden_def(sigblock)
  41539. diff -Nur uClibc-0.9.33.2/libc/signal/sigdelset.c uClibc-git/libc/signal/sigdelset.c
  41540. --- uClibc-0.9.33.2/libc/signal/sigdelset.c 2012-05-15 09:20:09.000000000 +0200
  41541. +++ uClibc-git/libc/signal/sigdelset.c 2014-07-25 20:36:06.033330637 +0200
  41542. @@ -12,11 +12,13 @@
  41543. Lesser General Public License for more details.
  41544. You should have received a copy of the GNU Lesser General Public
  41545. - License along with the GNU C Library; if not, write to the Free
  41546. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41547. - 02111-1307 USA. */
  41548. + License along with the GNU C Library; if not, see
  41549. + <http://www.gnu.org/licenses/>. */
  41550. -#include "sigsetops.h"
  41551. +#define __need_NULL
  41552. +#include <stddef.h>
  41553. +#include <signal.h>
  41554. +#include <errno.h>
  41555. /* Add SIGNO to SET. */
  41556. int sigdelset (sigset_t *set, int signo)
  41557. diff -Nur uClibc-0.9.33.2/libc/signal/sigempty.c uClibc-git/libc/signal/sigempty.c
  41558. --- uClibc-0.9.33.2/libc/signal/sigempty.c 2012-05-15 09:20:09.000000000 +0200
  41559. +++ uClibc-git/libc/signal/sigempty.c 2014-07-25 20:36:06.033330637 +0200
  41560. @@ -12,14 +12,15 @@
  41561. Lesser General Public License for more details.
  41562. You should have received a copy of the GNU Lesser General Public
  41563. - License along with the GNU C Library; if not, write to the Free
  41564. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41565. - 02111-1307 USA. */
  41566. + License along with the GNU C Library; if not, see
  41567. + <http://www.gnu.org/licenses/>. */
  41568. -#include <errno.h>
  41569. #include <signal.h>
  41570. -#include <string.h>
  41571. -
  41572. +#if 0
  41573. +#define __need_NULL
  41574. +#include <stddef.h>
  41575. +#include <errno.h>
  41576. +#endif
  41577. /* Clear all signals from SET. */
  41578. int sigemptyset (sigset_t *set)
  41579. @@ -36,4 +37,3 @@
  41580. return 0;
  41581. }
  41582. -libc_hidden_def(sigemptyset)
  41583. diff -Nur uClibc-0.9.33.2/libc/signal/sigfillset.c uClibc-git/libc/signal/sigfillset.c
  41584. --- uClibc-0.9.33.2/libc/signal/sigfillset.c 2012-05-15 09:20:09.000000000 +0200
  41585. +++ uClibc-git/libc/signal/sigfillset.c 2014-07-25 20:36:06.033330637 +0200
  41586. @@ -12,17 +12,18 @@
  41587. Lesser General Public License for more details.
  41588. You should have received a copy of the GNU Lesser General Public
  41589. - License along with the GNU C Library; if not, write to the Free
  41590. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41591. - 02111-1307 USA. */
  41592. + License along with the GNU C Library; if not, see
  41593. + <http://www.gnu.org/licenses/>. */
  41594. -#include <errno.h>
  41595. #include <signal.h>
  41596. -#include <string.h>
  41597. #ifdef __UCLIBC_HAS_THREADS_NATIVE__
  41598. # include <pthreadP.h> /* SIGCANCEL */
  41599. #endif
  41600. -
  41601. +#if 0
  41602. +#define __need_NULL
  41603. +#include <stddef.h>
  41604. +#include <errno.h>
  41605. +#endif
  41606. /* Set all signals in SET. */
  41607. int
  41608. @@ -49,4 +50,3 @@
  41609. return 0;
  41610. }
  41611. -libc_hidden_def(sigfillset)
  41612. diff -Nur uClibc-0.9.33.2/libc/signal/siggetmask.c uClibc-git/libc/signal/siggetmask.c
  41613. --- uClibc-0.9.33.2/libc/signal/siggetmask.c 2012-05-15 09:20:09.000000000 +0200
  41614. +++ uClibc-git/libc/signal/siggetmask.c 2014-07-25 20:36:06.033330637 +0200
  41615. @@ -13,14 +13,12 @@
  41616. Lesser General Public License for more details.
  41617. You should have received a copy of the GNU Lesser General Public
  41618. - License along with the GNU C Library; if not, write to the Free
  41619. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41620. - 02111-1307 USA. */
  41621. + License along with the GNU C Library; if not, see
  41622. + <http://www.gnu.org/licenses/>. */
  41623. #define __UCLIBC_HIDE_DEPRECATED__
  41624. #include <signal.h>
  41625. -
  41626. int
  41627. siggetmask (void)
  41628. {
  41629. diff -Nur uClibc-0.9.33.2/libc/signal/sighold.c uClibc-git/libc/signal/sighold.c
  41630. --- uClibc-0.9.33.2/libc/signal/sighold.c 2012-05-15 09:20:09.000000000 +0200
  41631. +++ uClibc-git/libc/signal/sighold.c 2014-07-25 20:36:06.033330637 +0200
  41632. @@ -14,15 +14,13 @@
  41633. Lesser General Public License for more details.
  41634. You should have received a copy of the GNU Lesser General Public
  41635. - License along with the GNU C Library; if not, write to the Free
  41636. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41637. - 02111-1307 USA. */
  41638. + License along with the GNU C Library; if not, see
  41639. + <http://www.gnu.org/licenses/>. */
  41640. #define __need_NULL
  41641. #include <stddef.h>
  41642. #include <signal.h>
  41643. -
  41644. int sighold (int sig)
  41645. {
  41646. sigset_t set;
  41647. diff -Nur uClibc-0.9.33.2/libc/signal/sigignore.c uClibc-git/libc/signal/sigignore.c
  41648. --- uClibc-0.9.33.2/libc/signal/sigignore.c 2012-05-15 09:20:09.000000000 +0200
  41649. +++ uClibc-git/libc/signal/sigignore.c 2014-07-25 20:36:06.033330637 +0200
  41650. @@ -14,16 +14,13 @@
  41651. Lesser General Public License for more details.
  41652. You should have received a copy of the GNU Lesser General Public
  41653. - License along with the GNU C Library; if not, write to the Free
  41654. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41655. - 02111-1307 USA. */
  41656. + License along with the GNU C Library; if not, see
  41657. + <http://www.gnu.org/licenses/>. */
  41658. -#include <errno.h>
  41659. #define __need_NULL
  41660. #include <stddef.h>
  41661. #include <signal.h>
  41662. -#include <string.h> /* For the real memset prototype. */
  41663. -
  41664. +#include <string.h>
  41665. int sigignore (int sig)
  41666. {
  41667. diff -Nur uClibc-0.9.33.2/libc/signal/sigintr.c uClibc-git/libc/signal/sigintr.c
  41668. --- uClibc-0.9.33.2/libc/signal/sigintr.c 2012-05-15 09:20:09.000000000 +0200
  41669. +++ uClibc-git/libc/signal/sigintr.c 2014-07-25 20:36:06.033330637 +0200
  41670. @@ -12,20 +12,19 @@
  41671. Lesser General Public License for more details.
  41672. You should have received a copy of the GNU Lesser General Public
  41673. - License along with the GNU C Library; if not, write to the Free
  41674. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41675. - 02111-1307 USA. */
  41676. + License along with the GNU C Library; if not, see
  41677. + <http://www.gnu.org/licenses/>. */
  41678. -#include <stddef.h>
  41679. #include <signal.h>
  41680. -#include <errno.h>
  41681. -
  41682. /* If INTERRUPT is nonzero, make signal SIG interrupt system calls
  41683. (causing them to fail with EINTR); if INTERRUPT is zero, make system
  41684. calls be restarted after signal SIG. */
  41685. #ifdef SA_RESTART
  41686. -extern sigset_t _sigintr attribute_hidden; /* Defined in signal.c. */
  41687. +# define __need_NULL
  41688. +# include <stddef.h>
  41689. +#else
  41690. +# include <errno.h>
  41691. #endif
  41692. int siginterrupt (int sig, int interrupt)
  41693. diff -Nur uClibc-0.9.33.2/libc/signal/sigisempty.c uClibc-git/libc/signal/sigisempty.c
  41694. --- uClibc-0.9.33.2/libc/signal/sigisempty.c 2012-05-15 09:20:09.000000000 +0200
  41695. +++ uClibc-git/libc/signal/sigisempty.c 2014-07-25 20:36:06.033330637 +0200
  41696. @@ -12,9 +12,8 @@
  41697. Lesser General Public License for more details.
  41698. You should have received a copy of the GNU Lesser General Public
  41699. - License along with the GNU C Library; if not, write to the Free
  41700. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41701. - 02111-1307 USA. */
  41702. + License along with the GNU C Library; if not, see
  41703. + <http://www.gnu.org/licenses/>. */
  41704. #include <errno.h>
  41705. #include <signal.h>
  41706. diff -Nur uClibc-0.9.33.2/libc/signal/sigismem.c uClibc-git/libc/signal/sigismem.c
  41707. --- uClibc-0.9.33.2/libc/signal/sigismem.c 2012-05-15 09:20:09.000000000 +0200
  41708. +++ uClibc-git/libc/signal/sigismem.c 2014-07-25 20:36:06.033330637 +0200
  41709. @@ -12,11 +12,13 @@
  41710. Lesser General Public License for more details.
  41711. You should have received a copy of the GNU Lesser General Public
  41712. - License along with the GNU C Library; if not, write to the Free
  41713. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41714. - 02111-1307 USA. */
  41715. + License along with the GNU C Library; if not, see
  41716. + <http://www.gnu.org/licenses/>. */
  41717. -#include "sigsetops.h"
  41718. +#define __need_NULL
  41719. +#include <stddef.h>
  41720. +#include <signal.h>
  41721. +#include <errno.h>
  41722. /* Return 1 if SIGNO is in SET, 0 if not. */
  41723. int sigismember (const sigset_t *set, int signo)
  41724. diff -Nur uClibc-0.9.33.2/libc/signal/sigjmp.c uClibc-git/libc/signal/sigjmp.c
  41725. --- uClibc-0.9.33.2/libc/signal/sigjmp.c 2012-05-15 09:20:09.000000000 +0200
  41726. +++ uClibc-git/libc/signal/sigjmp.c 2014-07-25 20:36:06.033330637 +0200
  41727. @@ -12,21 +12,18 @@
  41728. Lesser General Public License for more details.
  41729. You should have received a copy of the GNU Lesser General Public
  41730. - License along with the GNU C Library; if not, write to the Free
  41731. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41732. - 02111-1307 USA. */
  41733. + License along with the GNU C Library; if not, see
  41734. + <http://www.gnu.org/licenses/>. */
  41735. +#define __need_NULL
  41736. #include <stddef.h>
  41737. #include <setjmp.h>
  41738. #include <signal.h>
  41739. -#include <libc-internal.h>
  41740. -
  41741. /* This function is called by the `sigsetjmp' macro
  41742. before doing a `__setjmp' on ENV[0].__jmpbuf.
  41743. Always return zero. */
  41744. -int __sigjmp_save (sigjmp_buf env, int savemask) attribute_hidden;
  41745. int __sigjmp_save (sigjmp_buf env, int savemask)
  41746. {
  41747. env[0].__mask_was_saved = (savemask &&
  41748. diff -Nur uClibc-0.9.33.2/libc/signal/signal.c uClibc-git/libc/signal/signal.c
  41749. --- uClibc-0.9.33.2/libc/signal/signal.c 2012-05-15 09:20:09.000000000 +0200
  41750. +++ uClibc-git/libc/signal/signal.c 2014-07-25 20:36:06.033330637 +0200
  41751. @@ -14,15 +14,14 @@
  41752. Lesser General Public License for more details.
  41753. You should have received a copy of the GNU Lesser General Public
  41754. - License along with the GNU C Library; if not, write to the Free
  41755. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41756. - 02111-1307 USA. */
  41757. + License along with the GNU C Library; if not, see
  41758. + <http://www.gnu.org/licenses/>. */
  41759. #include <errno.h>
  41760. #include <signal.h>
  41761. #include <string.h> /* For the real memset prototype. */
  41762. -sigset_t _sigintr attribute_hidden; /* Set by siginterrupt. */
  41763. +sigset_t _sigintr; /* Set by siginterrupt. */
  41764. /* Set the handler for the signal SIG to HANDLER,
  41765. returning the old handler, or SIG_ERR on error. */
  41766. diff -Nur uClibc-0.9.33.2/libc/signal/sigorset.c uClibc-git/libc/signal/sigorset.c
  41767. --- uClibc-0.9.33.2/libc/signal/sigorset.c 2012-05-15 09:20:09.000000000 +0200
  41768. +++ uClibc-git/libc/signal/sigorset.c 2014-07-25 20:36:06.037330658 +0200
  41769. @@ -12,9 +12,8 @@
  41770. Lesser General Public License for more details.
  41771. You should have received a copy of the GNU Lesser General Public
  41772. - License along with the GNU C Library; if not, write to the Free
  41773. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41774. - 02111-1307 USA. */
  41775. + License along with the GNU C Library; if not, see
  41776. + <http://www.gnu.org/licenses/>. */
  41777. #include <errno.h>
  41778. #include <signal.h>
  41779. diff -Nur uClibc-0.9.33.2/libc/signal/sigpause.c uClibc-git/libc/signal/sigpause.c
  41780. --- uClibc-0.9.33.2/libc/signal/sigpause.c 2012-05-15 09:20:09.000000000 +0200
  41781. +++ uClibc-git/libc/signal/sigpause.c 2014-07-25 20:36:06.037330658 +0200
  41782. @@ -13,25 +13,19 @@
  41783. Lesser General Public License for more details.
  41784. You should have received a copy of the GNU Lesser General Public
  41785. - License along with the GNU C Library; if not, write to the Free
  41786. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41787. - 02111-1307 USA. */
  41788. -
  41789. -#define __UCLIBC_HIDE_DEPRECATED__
  41790. -/* psm: need the BSD version of sigpause here */
  41791. -#include <errno.h>
  41792. -#define __FAVOR_BSD
  41793. + License along with the GNU C Library; if not, see
  41794. + <http://www.gnu.org/licenses/>. */
  41795. +
  41796. #include <signal.h>
  41797. -#include <stddef.h> /* For NULL. */
  41798. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  41799. -#include <sysdep-cancel.h>
  41800. -#endif
  41801. +#define __need_NULL
  41802. +#include <stddef.h>
  41803. +#include <cancel.h>
  41804. #include "sigset-cvt-mask.h"
  41805. /* Set the mask of blocked signals to MASK,
  41806. wait for a signal to arrive, and then restore the mask. */
  41807. -int __sigpause (int sig_or_mask, int is_sig)
  41808. +static int __sigpause (int sig_or_mask, int is_sig)
  41809. {
  41810. sigset_t set;
  41811. @@ -49,29 +43,21 @@
  41812. /* Note the sigpause() is a cancellation point. But since we call
  41813. sigsuspend() which itself is a cancellation point we do not have
  41814. to do anything here. */
  41815. - return sigsuspend (&set);
  41816. + /* uClibc note: not true on uClibc, we call the non-cancellable version */
  41817. + return __NC(sigsuspend)(&set);
  41818. }
  41819. -libc_hidden_def(__sigpause)
  41820. -#undef sigpause
  41821. +int __bsd_sigpause(int mask);
  41822. +int __bsd_sigpause(int mask)
  41823. +{
  41824. + return __sigpause(mask, 0);
  41825. +}
  41826. /* We have to provide a default version of this function since the
  41827. standards demand it. The version which is a bit more reasonable is
  41828. the BSD version. So make this the default. */
  41829. -int sigpause (int mask)
  41830. +static int __NC(sigpause)(int sig)
  41831. {
  41832. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  41833. - if (SINGLE_THREAD_P)
  41834. - return __sigpause (mask, 0);
  41835. -
  41836. - int oldtype = LIBC_CANCEL_ASYNC ();
  41837. -
  41838. - int result = __sigpause (mask, 0);
  41839. -
  41840. - LIBC_CANCEL_RESET (oldtype);
  41841. -
  41842. - return result;
  41843. -#else
  41844. - return __sigpause (mask, 0);
  41845. -#endif
  41846. + return __sigpause(sig, 1);
  41847. }
  41848. +CANCELLABLE_SYSCALL(int, sigpause, (int sig), (sig))
  41849. diff -Nur uClibc-0.9.33.2/libc/signal/sigrelse.c uClibc-git/libc/signal/sigrelse.c
  41850. --- uClibc-0.9.33.2/libc/signal/sigrelse.c 2012-05-15 09:20:09.000000000 +0200
  41851. +++ uClibc-git/libc/signal/sigrelse.c 2014-07-25 20:36:06.037330658 +0200
  41852. @@ -14,15 +14,13 @@
  41853. Lesser General Public License for more details.
  41854. You should have received a copy of the GNU Lesser General Public
  41855. - License along with the GNU C Library; if not, write to the Free
  41856. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41857. - 02111-1307 USA. */
  41858. + License along with the GNU C Library; if not, see
  41859. + <http://www.gnu.org/licenses/>. */
  41860. #define __need_NULL
  41861. #include <stddef.h>
  41862. #include <signal.h>
  41863. -
  41864. int sigrelse (int sig)
  41865. {
  41866. sigset_t set;
  41867. diff -Nur uClibc-0.9.33.2/libc/signal/sigset.c uClibc-git/libc/signal/sigset.c
  41868. --- uClibc-0.9.33.2/libc/signal/sigset.c 2012-05-15 09:20:09.000000000 +0200
  41869. +++ uClibc-git/libc/signal/sigset.c 2014-07-25 20:36:06.037330658 +0200
  41870. @@ -12,16 +12,14 @@
  41871. Lesser General Public License for more details.
  41872. You should have received a copy of the GNU Lesser General Public
  41873. - License along with the GNU C Library; if not, write to the Free
  41874. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41875. - 02111-1307 USA. */
  41876. + License along with the GNU C Library; if not, see
  41877. + <http://www.gnu.org/licenses/>. */
  41878. #include <errno.h>
  41879. #define __need_NULL
  41880. #include <stddef.h>
  41881. #include <signal.h>
  41882. -#include <string.h> /* For the real memset prototype. */
  41883. -
  41884. +#include <string.h>
  41885. /* Set the disposition for SIG. */
  41886. __sighandler_t sigset (int sig, __sighandler_t disp)
  41887. diff -Nur uClibc-0.9.33.2/libc/signal/sigset-cvt-mask.h uClibc-git/libc/signal/sigset-cvt-mask.h
  41888. --- uClibc-0.9.33.2/libc/signal/sigset-cvt-mask.h 2012-05-15 09:20:09.000000000 +0200
  41889. +++ uClibc-git/libc/signal/sigset-cvt-mask.h 2014-07-25 20:36:06.037330658 +0200
  41890. @@ -15,9 +15,11 @@
  41891. Lesser General Public License for more details.
  41892. You should have received a copy of the GNU Lesser General Public
  41893. - License along with the GNU C Library; if not, write to the Free
  41894. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41895. - 02111-1307 USA. */
  41896. + License along with the GNU C Library; if not, see
  41897. + <http://www.gnu.org/licenses/>. */
  41898. +
  41899. +#ifndef _SIGSET_CVT_MASK_H
  41900. +#define _SIGSET_CVT_MASK_H
  41901. #include <string.h>
  41902. @@ -36,3 +38,5 @@
  41903. {
  41904. return (unsigned int) set->__val[0];
  41905. }
  41906. +
  41907. +#endif
  41908. diff -Nur uClibc-0.9.33.2/libc/signal/sigsetmask.c uClibc-git/libc/signal/sigsetmask.c
  41909. --- uClibc-0.9.33.2/libc/signal/sigsetmask.c 2012-05-15 09:20:09.000000000 +0200
  41910. +++ uClibc-git/libc/signal/sigsetmask.c 2014-07-25 20:36:06.037330658 +0200
  41911. @@ -12,18 +12,16 @@
  41912. Lesser General Public License for more details.
  41913. You should have received a copy of the GNU Lesser General Public
  41914. - License along with the GNU C Library; if not, write to the Free
  41915. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41916. - 02111-1307 USA. */
  41917. + License along with the GNU C Library; if not, see
  41918. + <http://www.gnu.org/licenses/>. */
  41919. -#define __UCLIBC_HIDE_DEPRECATED__
  41920. -#include <errno.h>
  41921. +/*#define __UCLIBC_HIDE_DEPRECATED__*/
  41922. #include <signal.h>
  41923. #include "sigset-cvt-mask.h"
  41924. /* Set the mask of blocked signals to MASK, returning the old mask. */
  41925. -int
  41926. +static int
  41927. sigsetmask (int mask)
  41928. {
  41929. sigset_t set, oset;
  41930. @@ -32,4 +30,3 @@
  41931. sigprocmask (SIG_SETMASK, &set, &oset); /* can't fail */
  41932. return sigset_get_old_mask (&oset);
  41933. }
  41934. -libc_hidden_def(sigsetmask)
  41935. diff -Nur uClibc-0.9.33.2/libc/signal/sigsetops.h uClibc-git/libc/signal/sigsetops.h
  41936. --- uClibc-0.9.33.2/libc/signal/sigsetops.h 2012-05-15 09:20:09.000000000 +0200
  41937. +++ uClibc-git/libc/signal/sigsetops.h 1970-01-01 01:00:00.000000000 +0100
  41938. @@ -1,33 +0,0 @@
  41939. -/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc.
  41940. - This file is part of the GNU C Library.
  41941. -
  41942. - The GNU C Library is free software; you can redistribute it and/or
  41943. - modify it under the terms of the GNU Lesser General Public
  41944. - License as published by the Free Software Foundation; either
  41945. - version 2.1 of the License, or (at your option) any later version.
  41946. -
  41947. - The GNU C Library is distributed in the hope that it will be useful,
  41948. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  41949. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  41950. - Lesser General Public License for more details.
  41951. -
  41952. - You should have received a copy of the GNU Lesser General Public
  41953. - License along with the GNU C Library; if not, write to the Free
  41954. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41955. - 02111-1307 USA. */
  41956. -
  41957. -/* Definitions relevant to functions that operate on `sigset_t's. */
  41958. -
  41959. -#include <errno.h>
  41960. -#include <signal.h>
  41961. -#include <string.h>
  41962. -
  41963. -#define BITS (_NSIG - 1)
  41964. -#define ELT(signo) (((signo) - 1) / BITS)
  41965. -#define MASK(signo) (1 << (((signo) - 1) % BITS))
  41966. -
  41967. -#undef sigemptyset
  41968. -#undef sigfillset
  41969. -#undef sigaddset
  41970. -#undef sigdelset
  41971. -#undef sigismember
  41972. diff -Nur uClibc-0.9.33.2/libc/signal/sigwait.c uClibc-git/libc/signal/sigwait.c
  41973. --- uClibc-0.9.33.2/libc/signal/sigwait.c 2012-05-15 09:20:09.000000000 +0200
  41974. +++ uClibc-git/libc/signal/sigwait.c 2014-07-25 20:36:06.037330658 +0200
  41975. @@ -15,96 +15,42 @@
  41976. * Lesser General Public License for more details.
  41977. *
  41978. * You should have received a copy of the GNU Lesser General Public
  41979. - * License along with the GNU C Library; if not, write to the Free
  41980. - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  41981. - * 02111-1307 USA. */
  41982. -
  41983. -#include <errno.h>
  41984. + * License along with the GNU C Library; see the file COPYING.LIB. If
  41985. + * not, see <http://www.gnu.org/licenses/>.
  41986. + */
  41987. +
  41988. +#define __need_NULL
  41989. +#include <stddef.h>
  41990. +#include <sys/syscall.h>
  41991. #include <signal.h>
  41992. -#include <string.h>
  41993. -#include <unistd.h>
  41994. +#include <cancel.h>
  41995. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  41996. -# include <sysdep-cancel.h>
  41997. +#if defined __NR_rt_sigtimedwait && defined __UCLIBC_HAS_REALTIME__
  41998. -# ifdef __NR_rt_sigtimedwait
  41999. +#include <string.h>
  42000. /* Return any pending signal or wait for one for the given time. */
  42001. -static int do_sigwait(const sigset_t *set, int *sig)
  42002. +static int __NC(sigwait)(const sigset_t *set, int *sig)
  42003. {
  42004. int ret;
  42005. -# ifdef SIGCANCEL
  42006. - sigset_t tmpset;
  42007. - if (set != NULL
  42008. - && (__builtin_expect (__sigismember (set, SIGCANCEL), 0)
  42009. -# ifdef SIGSETXID
  42010. - || __builtin_expect (__sigismember (set, SIGSETXID), 0)
  42011. -# endif
  42012. - ))
  42013. - {
  42014. - /* Create a temporary mask without the bit for SIGCANCEL set. */
  42015. - // We are not copying more than we have to.
  42016. - memcpy(&tmpset, set, _NSIG / 8);
  42017. - __sigdelset(&tmpset, SIGCANCEL);
  42018. -# ifdef SIGSETXID
  42019. - __sigdelset(&tmpset, SIGSETXID);
  42020. -# endif
  42021. - set = &tmpset;
  42022. - }
  42023. -# endif
  42024. -
  42025. - /* XXX The size argument hopefully will have to be changed to the
  42026. - real size of the user-level sigset_t. */
  42027. - INTERNAL_SYSCALL_DECL(err);
  42028. do
  42029. - ret = INTERNAL_SYSCALL (rt_sigtimedwait, err, 4, set, NULL,
  42030. - NULL, _NSIG / 8);
  42031. - while (INTERNAL_SYSCALL_ERROR_P (ret, err)
  42032. - && INTERNAL_SYSCALL_ERRNO (ret, err) == EINTR);
  42033. - if (! INTERNAL_SYSCALL_ERROR_P (ret, err))
  42034. - {
  42035. + /* we might as well use sigtimedwait and do not care about cancellation */
  42036. + ret = __NC(sigtimedwait)(set, NULL, NULL);
  42037. + while (ret == -1 && errno == EINTR);
  42038. + if (ret != -1) {
  42039. *sig = ret;
  42040. ret = 0;
  42041. - }
  42042. -else
  42043. - ret = INTERNAL_SYSCALL_ERRNO (ret, err);
  42044. + } else
  42045. + ret = errno;
  42046. return ret;
  42047. }
  42048. -int sigwait (const sigset_t *set, int *sig)
  42049. -{
  42050. - if(SINGLE_THREAD_P)
  42051. - return do_sigwait(set, sig);
  42052. -
  42053. - int oldtype = LIBC_CANCEL_ASYNC();
  42054. -
  42055. - int result = do_sigwait(set, sig);
  42056. +#else /* __NR_rt_sigtimedwait */
  42057. - LIBC_CANCEL_RESET(oldtype);
  42058. -
  42059. - return result;
  42060. -}
  42061. -# else /* __NR_rt_sigtimedwait */
  42062. -# error We must have rt_sigtimedwait defined!!!
  42063. -# endif
  42064. -#else /* __UCLIBC_HAS_THREADS_NATIVE__ */
  42065. -
  42066. -# if defined __UCLIBC_HAS_REALTIME__
  42067. -
  42068. -int sigwait (const sigset_t *set, int *sig)
  42069. -{
  42070. - int ret = 1;
  42071. - if ((ret = sigwaitinfo(set, NULL)) != -1) {
  42072. - *sig = ret;
  42073. - return 0;
  42074. - }
  42075. - return 1;
  42076. -}
  42077. -
  42078. -# else /* __UCLIBC_HAS_REALTIME__ */
  42079. /* variant without REALTIME extensions */
  42080. +#include <unistd.h> /* smallint */
  42081. static smallint was_sig; /* obviously not thread-safe */
  42082. @@ -113,7 +59,7 @@
  42083. was_sig = sig;
  42084. }
  42085. -int sigwait (const sigset_t *set, int *sig)
  42086. +static int __NC(sigwait)(const sigset_t *set, int *sig)
  42087. {
  42088. sigset_t tmp_mask;
  42089. struct sigaction saved[NSIG];
  42090. @@ -147,7 +93,7 @@
  42091. }
  42092. /* Now we can wait for signals. */
  42093. - sigsuspend (&tmp_mask);
  42094. + __NC(sigsuspend)(&tmp_mask);
  42095. restore_handler:
  42096. save_errno = errno;
  42097. @@ -163,5 +109,6 @@
  42098. *sig = was_sig;
  42099. return was_sig == -1 ? -1 : 0;
  42100. }
  42101. -# endif /* __UCLIBC_HAS_REALTIME__ */
  42102. -#endif /* __UCLIBC_HAS_THREADS_NATIVE__ */
  42103. +#endif /* __NR_rt_sigtimedwait */
  42104. +
  42105. +CANCELLABLE_SYSCALL(int, sigwait, (const sigset_t *set, int *sig), (set, sig))
  42106. diff -Nur uClibc-0.9.33.2/libc/signal/sysv_signal.c uClibc-git/libc/signal/sysv_signal.c
  42107. --- uClibc-0.9.33.2/libc/signal/sysv_signal.c 2012-05-15 09:20:09.000000000 +0200
  42108. +++ uClibc-git/libc/signal/sysv_signal.c 2014-07-25 20:36:06.037330658 +0200
  42109. @@ -12,14 +12,11 @@
  42110. Lesser General Public License for more details.
  42111. You should have received a copy of the GNU Lesser General Public
  42112. - License along with the GNU C Library; if not, write to the Free
  42113. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  42114. - 02111-1307 USA. */
  42115. + License along with the GNU C Library; if not, see
  42116. + <http://www.gnu.org/licenses/>. */
  42117. #include <errno.h>
  42118. #include <signal.h>
  42119. -#include <string.h> /* For the real memset prototype. */
  42120. -
  42121. /* Tolerate non-threads versions of Posix */
  42122. #ifndef SA_ONESHOT
  42123. diff -Nur uClibc-0.9.33.2/libc/stdio/_fpmaxtostr.c uClibc-git/libc/stdio/_fpmaxtostr.c
  42124. --- uClibc-0.9.33.2/libc/stdio/_fpmaxtostr.c 2012-05-15 09:20:09.000000000 +0200
  42125. +++ uClibc-git/libc/stdio/_fpmaxtostr.c 2014-07-25 20:36:06.045330699 +0200
  42126. @@ -1,6 +1,7 @@
  42127. -/* Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org>
  42128. +/*
  42129. + * Copyright (C) 2000,2001,2003,2004 Manuel Novoa III <mjn3@codepoet.org>
  42130. *
  42131. - * GNU Library General Public License (LGPL) version 2 or later.
  42132. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  42133. *
  42134. * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details.
  42135. */
  42136. @@ -9,15 +10,9 @@
  42137. #include <printf.h>
  42138. #include <float.h>
  42139. #include <locale.h>
  42140. -#include <bits/uClibc_fpmax.h>
  42141. +#include "_fpmaxtostr.h"
  42142. -
  42143. -typedef size_t (__fp_outfunc_t)(FILE *fp, intptr_t type, intptr_t len,
  42144. - intptr_t buf);
  42145. -
  42146. -
  42147. -/* Copyright (C) 2000, 2001, 2003 Manuel Novoa III
  42148. - *
  42149. +/*
  42150. * Function:
  42151. *
  42152. * ssize_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
  42153. @@ -40,7 +35,6 @@
  42154. * It should also be fairly portable, as no assumptions are made about the
  42155. * bit-layout of doubles. Of course, that does make it less efficient than
  42156. * it could be.
  42157. - *
  42158. */
  42159. /*****************************************************************************/
  42160. @@ -67,9 +61,6 @@
  42161. #define NUM_HEX_DIGITS ((FPMAX_MANT_DIG + 3)/ 4)
  42162. -/* WARNING: Adjust _fp_out_wide() below if this changes! */
  42163. -/* With 32 bit ints, we can get 9 decimal digits per block. */
  42164. -#define DIGITS_PER_BLOCK 9
  42165. #define HEX_DIGITS_PER_BLOCK 8
  42166. /* Maximum number of subcases to output double is...
  42167. @@ -87,15 +78,9 @@
  42168. /*****************************************************************************/
  42169. -#define NUM_DIGIT_BLOCKS ((DECIMAL_DIG+DIGITS_PER_BLOCK-1)/DIGITS_PER_BLOCK)
  42170. #define NUM_HEX_DIGIT_BLOCKS \
  42171. ((NUM_HEX_DIGITS+HEX_DIGITS_PER_BLOCK-1)/HEX_DIGITS_PER_BLOCK)
  42172. -/* WARNING: Adjust _fp_out_wide() below if this changes! */
  42173. -
  42174. -/* extra space for '-', '.', 'e+###', and nul */
  42175. -#define BUF_SIZE ( 3 + NUM_DIGIT_BLOCKS * DIGITS_PER_BLOCK )
  42176. -
  42177. /*****************************************************************************/
  42178. static const char fmt[] = "inf\0INF\0nan\0NAN\0.\0,";
  42179. @@ -200,8 +185,6 @@
  42180. #define FPO_STR_PREC 'p'
  42181. ssize_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
  42182. - __fp_outfunc_t fp_outfunc) attribute_hidden;
  42183. -ssize_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
  42184. __fp_outfunc_t fp_outfunc)
  42185. {
  42186. #ifdef __UCLIBC_HAS_HEXADECIMAL_FLOATS__
  42187. @@ -219,8 +202,8 @@
  42188. #ifdef __UCLIBC_HAS_GLIBC_DIGIT_GROUPING__
  42189. int num_groups = 0;
  42190. int initial_group; /* This does not need to be initialized. */
  42191. - int tslen; /* This does not need to be initialized. */
  42192. - int nblk2; /* This does not need to be initialized. */
  42193. + int tslen; /* This does not need to be initialized. */
  42194. + int nblk2; /* This does not need to be initialized. */
  42195. const char *ts; /* This does not need to be initialized. */
  42196. #endif /* __UCLIBC_HAS_GLIBC_DIGIT_GROUPING__ */
  42197. int round, o_exp;
  42198. diff -Nur uClibc-0.9.33.2/libc/stdio/_fpmaxtostr.h uClibc-git/libc/stdio/_fpmaxtostr.h
  42199. --- uClibc-0.9.33.2/libc/stdio/_fpmaxtostr.h 1970-01-01 01:00:00.000000000 +0100
  42200. +++ uClibc-git/libc/stdio/_fpmaxtostr.h 2014-07-25 20:36:06.045330699 +0200
  42201. @@ -0,0 +1,49 @@
  42202. +/* vi: set sw=4 ts=4: */
  42203. +/*
  42204. + * Copyright (C) 2000,2001,2003,2004 Manuel Novoa III <mjn3@codepoet.org>
  42205. + *
  42206. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  42207. + *
  42208. + * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details.
  42209. + */
  42210. +
  42211. +#ifndef _FPMAXTOSTR_H
  42212. +#define _FPMAXTOSTR_H 1
  42213. +
  42214. +#include <features.h>
  42215. +#ifdef __UCLIBC_HAS_FLOATS__
  42216. +
  42217. +#define __need_size_t
  42218. +#include <stddef.h>
  42219. +#include <stdint.h>
  42220. +#include <stdio.h>
  42221. +#include <printf.h>
  42222. +#include <sys/types.h>
  42223. +#include <float.h>
  42224. +#include <bits/uClibc_fpmax.h>
  42225. +
  42226. +/* WARNING: Adjust _fp_out_wide() in _vfprintf.c if this changes! */
  42227. +/* With 32 bit ints, we can get 9 decimal digits per block. */
  42228. +#define DIGITS_PER_BLOCK 9
  42229. +
  42230. +#define NUM_DIGIT_BLOCKS ((DECIMAL_DIG+DIGITS_PER_BLOCK-1)/DIGITS_PER_BLOCK)
  42231. +
  42232. +/* WARNING: Adjust _fp_out_wide() in _vfprintf.c if this changes! */
  42233. +/* extra space for '-', '.', 'e+###', and nul */
  42234. +#define BUF_SIZE ( 3 + NUM_DIGIT_BLOCKS * DIGITS_PER_BLOCK )
  42235. +
  42236. +/* psm: why do these internals differ? */
  42237. +#ifdef __USE_OLD_VFPRINTF__
  42238. +typedef void (__fp_outfunc_t)(FILE *fp, intptr_t type, intptr_t len, intptr_t buf);
  42239. +
  42240. +extern size_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
  42241. + __fp_outfunc_t fp_outfunc) attribute_hidden;
  42242. +#else
  42243. +typedef size_t (__fp_outfunc_t)(FILE *fp, intptr_t type, intptr_t len, intptr_t buf);
  42244. +
  42245. +extern ssize_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
  42246. + __fp_outfunc_t fp_outfunc) attribute_hidden;
  42247. +#endif
  42248. +
  42249. +#endif /* __UCLIBC_HAS_FLOATS__ */
  42250. +#endif /* _FPMAXTOSTR_H */
  42251. diff -Nur uClibc-0.9.33.2/libc/stdio/fputc.c uClibc-git/libc/stdio/fputc.c
  42252. --- uClibc-0.9.33.2/libc/stdio/fputc.c 2012-05-15 09:20:09.000000000 +0200
  42253. +++ uClibc-git/libc/stdio/fputc.c 2014-07-25 20:36:06.049330721 +0200
  42254. @@ -72,16 +72,13 @@
  42255. libc_hidden_def(__fputc_unlocked)
  42256. strong_alias(__fputc_unlocked,fputc_unlocked)
  42257. -libc_hidden_def(fputc_unlocked)
  42258. strong_alias(__fputc_unlocked,putc_unlocked)
  42259. -libc_hidden_def(putc_unlocked)
  42260. #ifndef __UCLIBC_HAS_THREADS__
  42261. strong_alias(__fputc_unlocked,fputc)
  42262. libc_hidden_def(fputc)
  42263. strong_alias(__fputc_unlocked,putc)
  42264. -libc_hidden_def(putc)
  42265. #endif
  42266. #elif defined __UCLIBC_HAS_THREADS__
  42267. @@ -101,6 +98,5 @@
  42268. libc_hidden_def(fputc)
  42269. strong_alias(fputc,putc)
  42270. -libc_hidden_def(putc)
  42271. #endif
  42272. diff -Nur uClibc-0.9.33.2/libc/stdio/fputwc.c uClibc-git/libc/stdio/fputwc.c
  42273. --- uClibc-0.9.33.2/libc/stdio/fputwc.c 2012-05-15 09:20:09.000000000 +0200
  42274. +++ uClibc-git/libc/stdio/fputwc.c 2014-07-25 20:36:06.049330721 +0200
  42275. @@ -19,6 +19,7 @@
  42276. strong_alias(fputwc_unlocked,putwc_unlocked)
  42277. #ifndef __UCLIBC_HAS_THREADS__
  42278. strong_alias(fputwc_unlocked,fputwc)
  42279. +libc_hidden_def(fputwc)
  42280. strong_alias(fputwc_unlocked,putwc)
  42281. #endif
  42282. @@ -37,6 +38,7 @@
  42283. return retval;
  42284. }
  42285. +libc_hidden_def(fputwc)
  42286. strong_alias(fputwc,putwc)
  42287. diff -Nur uClibc-0.9.33.2/libc/stdio/fseeko.c uClibc-git/libc/stdio/fseeko.c
  42288. --- uClibc-0.9.33.2/libc/stdio/fseeko.c 2012-05-15 09:20:09.000000000 +0200
  42289. +++ uClibc-git/libc/stdio/fseeko.c 2014-07-25 20:36:06.049330721 +0200
  42290. @@ -77,5 +77,5 @@
  42291. libc_hidden_def(fseeko64)
  42292. #else
  42293. libc_hidden_def(fseek)
  42294. -strong_alias(fseek,fseeko)
  42295. +strong_alias_untyped(fseek,fseeko)
  42296. #endif
  42297. diff -Nur uClibc-0.9.33.2/libc/stdio/ftello.c uClibc-git/libc/stdio/ftello.c
  42298. --- uClibc-0.9.33.2/libc/stdio/ftello.c 2012-05-15 09:20:09.000000000 +0200
  42299. +++ uClibc-git/libc/stdio/ftello.c 2014-07-25 20:36:06.049330721 +0200
  42300. @@ -53,5 +53,5 @@
  42301. libc_hidden_def(ftello64)
  42302. #else
  42303. libc_hidden_def(ftell)
  42304. -strong_alias(ftell,ftello)
  42305. +strong_alias_untyped(ftell,ftello)
  42306. #endif
  42307. diff -Nur uClibc-0.9.33.2/libc/stdio/_load_inttype.c uClibc-git/libc/stdio/_load_inttype.c
  42308. --- uClibc-0.9.33.2/libc/stdio/_load_inttype.c 2012-05-15 09:20:09.000000000 +0200
  42309. +++ uClibc-git/libc/stdio/_load_inttype.c 2014-07-25 20:36:06.045330699 +0200
  42310. @@ -8,7 +8,6 @@
  42311. #include "_stdio.h"
  42312. #include <printf.h>
  42313. -uintmax_t _load_inttype(int desttype, register const void *src, int uflag) attribute_hidden;
  42314. uintmax_t _load_inttype(int desttype, register const void *src, int uflag)
  42315. {
  42316. if (uflag >= 0) { /* unsigned */
  42317. diff -Nur uClibc-0.9.33.2/libc/stdio/Makefile.in uClibc-git/libc/stdio/Makefile.in
  42318. --- uClibc-0.9.33.2/libc/stdio/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  42319. +++ uClibc-git/libc/stdio/Makefile.in 2014-07-25 20:36:06.041330678 +0200
  42320. @@ -11,7 +11,7 @@
  42321. subdirs += libc/stdio
  42322. # SUSv3 functions
  42323. -CSRC := \
  42324. +CSRC-y := \
  42325. fclose.c fcloseall.c fdopen.c fgetpos.c fopen.c freopen.c \
  42326. fseeko.c fsetpos.c ftello.c getdelim.c getline.c gets.c getw.c \
  42327. perror.c puts.c putw.c remove.c rewind.c setbuf.c setbuffer.c \
  42328. @@ -19,92 +19,80 @@
  42329. printf.c vprintf.c vsprintf.c fprintf.c snprintf.c dprintf.c \
  42330. asprintf.c sprintf.c vasprintf.c vdprintf.c vsnprintf.c \
  42331. tmpfile.c popen.c ctermid.c
  42332. +CSRC-$(UCLIBC_HAS_LFS) += fgetpos64.c fopen64.c freopen64.c \
  42333. + fseeko64.c fsetpos64.c ftello64.c
  42334. +CSRC-$(UCLIBC_SUSV4_LEGACY) += tmpnam.c tmpnam_r.c tempnam.c
  42335. -ifeq ($(UCLIBC_HAS_LFS),y)
  42336. -CSRC += fgetpos64.c fopen64.c freopen64.c fseeko64.c fsetpos64.c ftello64.c
  42337. -endif
  42338. -ifeq ($(UCLIBC_SUSV4_LEGACY),y)
  42339. -CSRC += tmpnam.c tmpnam_r.c tempnam.c
  42340. -endif
  42341. -
  42342. -# getc -> alias for fgetc
  42343. -# putc -> alias for fputc
  42344. -# rename is a syscall
  42345. -
  42346. -# Implementation support functions
  42347. -CSRC += \
  42348. +# internal support functions
  42349. +CSRC-y += \
  42350. _READ.c _WRITE.c _adjust_pos.c _fopen.c _fwrite.c \
  42351. _rfill.c _stdio.c _trans2r.c _trans2w.c _wcommit.c \
  42352. _cs_funcs.c _load_inttype.c _store_inttype.c _uintmaxtostr.c
  42353. -ifeq ($(UCLIBC_HAS_FLOATS),y)
  42354. -CSRC += _fpmaxtostr.c
  42355. -endif
  42356. +CSRC-$(UCLIBC_HAS_FLOATS) += _fpmaxtostr.c
  42357. # stdio_ext.h functions
  42358. -CSRC += \
  42359. +CSRC-y += \
  42360. __fbufsize.c __flbf.c __fpending.c __fpurge.c __freadable.c \
  42361. __freading.c __fsetlocking.c __fwritable.c __fwriting.c _flushlbf.c
  42362. # Other glibc extensions
  42363. -ifeq ($(UCLIBC_HAS_GLIBC_CUSTOM_STREAMS),y)
  42364. -CSRC += fopencookie.c fmemopen.c open_memstream.c
  42365. -endif
  42366. +CSRC-$(UCLIBC_HAS_GLIBC_CUSTOM_STREAMS) += fopencookie.c fmemopen.c \
  42367. + open_memstream.c
  42368. # pthread functions
  42369. -CSRC += flockfile.c ftrylockfile.c funlockfile.c
  42370. +CSRC-y += flockfile.c ftrylockfile.c funlockfile.c
  42371. # Functions with unlocked versions
  42372. -CUSRC := \
  42373. +CUSRC-y := \
  42374. clearerr.c feof.c ferror.c fflush.c fgetc.c fgets.c fileno.c \
  42375. fputc.c fputs.c fread.c fwrite.c getchar.c putchar.c
  42376. # getc_unlocked -> alias for fgetc_unlocked
  42377. # putc_unlocked -> alias for fputc_unlocked
  42378. # vfprintf and support functions
  42379. -ifneq ($(USE_OLD_VFPRINTF),y)
  42380. +ifeq ($(USE_OLD_VFPRINTF),y)
  42381. +VF_CSRC := old_vfprintf.c
  42382. +else
  42383. +# multi source _vfprintf.c
  42384. VF_CSRC := \
  42385. vfprintf.c \
  42386. _vfprintf_internal.c \
  42387. _ppfs_init.c _ppfs_prepargs.c _ppfs_setargs.c _ppfs_parsespec.c \
  42388. register_printf_function.c parse_printf_format.c
  42389. -CSRC += $(VF_CSRC)
  42390. -else
  42391. -CSRC += old_vfprintf.c
  42392. endif
  42393. +CSRC-y += $(VF_CSRC)
  42394. # vfscanf and support functions plus other *scanf funcs
  42395. -CSRC += \
  42396. +CSRC-y += \
  42397. vfscanf.c __scan_cookie.c __psfs_parse_spec.c __psfs_do_numeric.c \
  42398. scanf.c sscanf.c fscanf.c vscanf.c vsscanf.c
  42399. -ifeq ($(UCLIBC_HAS_WCHAR),y)
  42400. -CSRC += _wfwrite.c fwprintf.c swprintf.c vswprintf.c vwprintf.c wprintf.c \
  42401. +CSRC-$(UCLIBC_HAS_WCHAR) += \
  42402. + _wfwrite.c fwprintf.c swprintf.c vswprintf.c vwprintf.c wprintf.c \
  42403. fwide.c ungetwc.c
  42404. -CUSRC += fgetwc.c getwchar.c fgetws.c fputwc.c putwchar.c fputws.c
  42405. +CUSRC-$(UCLIBC_HAS_WCHAR) += \
  42406. + fgetwc.c getwchar.c fgetws.c fputwc.c putwchar.c fputws.c
  42407. # getwc (fgetwc alias) getwc_unlocked (fgetwc_unlocked alias)
  42408. # putwc (fputwc alias) putwc_unlocked (fputwc_unlocked alias)
  42409. -CSRC += vfwprintf.c _vfwprintf_internal.c
  42410. -CSRC += wscanf.c swscanf.c fwscanf.c vwscanf.c vswscanf.c vfwscanf.c
  42411. -endif
  42412. -
  42413. -CUSRC_UNLOCKED := $(patsubst %.c,%_unlocked.c,$(CUSRC))
  42414. +CSRC-$(UCLIBC_HAS_WCHAR) += vfwprintf.c _vfwprintf_internal.c \
  42415. + wscanf.c swscanf.c fwscanf.c vwscanf.c vswscanf.c vfwscanf.c
  42416. -CSRC += $(CUSRC) $(CUSRC_UNLOCKED)
  42417. +CUSRC_UNLOCKED := $(patsubst %.c,%_unlocked.c,$(CUSRC-y))
  42418. +CSRC-y += $(CUSRC-y) $(CUSRC_UNLOCKED)
  42419. STDIO_DIR := $(top_srcdir)libc/stdio
  42420. STDIO_OUT := $(top_builddir)libc/stdio
  42421. -STDIO_SRC := $(patsubst %.c,$(STDIO_DIR)/%.c,$(CSRC))
  42422. -STDIO_OBJ := $(patsubst %.c,$(STDIO_OUT)/%.o,$(CSRC))
  42423. +STDIO_SRC := $(patsubst %.c,$(STDIO_DIR)/%.c,$(CSRC-y))
  42424. +STDIO_OBJ := $(patsubst %.c,$(STDIO_OUT)/%.o,$(CSRC-y))
  42425. libc-y += $(STDIO_OBJ)
  42426. ifneq ($(USE_OLD_VFPRINTF),y)
  42427. libc-nomulti-y += $(patsubst %.c,$(STDIO_OUT)/%.o,$(VF_CSRC))
  42428. endif
  42429. -ifeq ($(UCLIBC_HAS_WCHAR),y)
  42430. -libc-nomulti-y += $(STDIO_OUT)/vfwprintf.o $(STDIO_OUT)/vfwscanf.o
  42431. -endif
  42432. +libc-nomulti-$(UCLIBC_HAS_WCHAR) += $(STDIO_OUT)/vfwprintf.o \
  42433. + $(STDIO_OUT)/vfwscanf.o
  42434. objclean-y += CLEAN_libc/stdio
  42435. diff -Nur uClibc-0.9.33.2/libc/stdio/old_vfprintf.c uClibc-git/libc/stdio/old_vfprintf.c
  42436. --- uClibc-0.9.33.2/libc/stdio/old_vfprintf.c 2012-05-15 09:20:09.000000000 +0200
  42437. +++ uClibc-git/libc/stdio/old_vfprintf.c 2014-07-25 20:36:06.049330721 +0200
  42438. @@ -127,9 +127,7 @@
  42439. /**************************************************************************/
  42440. -#define _ISOC99_SOURCE /* for ULLONG primarily... */
  42441. #include "_stdio.h"
  42442. -/* #include <stdio.h> */
  42443. #include <stdarg.h>
  42444. #include <limits.h>
  42445. #include <stdint.h>
  42446. @@ -137,14 +135,9 @@
  42447. #include <errno.h>
  42448. #include <ctype.h>
  42449. #include <bits/uClibc_uintmaxtostr.h>
  42450. -#include <printf.h>
  42451. -#ifdef __UCLIBC_HAS_THREADS__
  42452. -#include <pthread.h>
  42453. -#endif /* __UCLIBC_HAS_THREADS__ */
  42454. +#include "_fpmaxtostr.h"
  42455. -
  42456. -/* #undef __UCLIBC_HAS_FLOATS__ */
  42457. /* #undef WANT_FLOAT_ERROR */
  42458. /* #define WANT_FLOAT_ERROR 1 */
  42459. @@ -208,14 +201,6 @@
  42460. #endif /* __STDIO_BUFFERS */
  42461. #ifdef __UCLIBC_HAS_FLOATS__
  42462. -#include <float.h>
  42463. -#include <bits/uClibc_fpmax.h>
  42464. -
  42465. -typedef void (__fp_outfunc_t)(FILE *fp, intptr_t type, intptr_t len,
  42466. - intptr_t buf);
  42467. -
  42468. -extern size_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
  42469. - __fp_outfunc_t fp_outfunc) attribute_hidden;
  42470. static void _charpad(FILE * __restrict stream, int padchar, size_t numpad)
  42471. {
  42472. @@ -259,9 +244,6 @@
  42473. /**********************************************************************/
  42474. -extern void _store_inttype(void *dest, int desttype, uintmax_t val) attribute_hidden;
  42475. -extern uintmax_t _load_inttype(int desttype, const void *src, int uflag) attribute_hidden;
  42476. -
  42477. /*
  42478. * In order to ease translation to what arginfo and _print_info._flags expect,
  42479. * we map: 0:int 1:char 2:longlong 4:long 8:short
  42480. diff -Nur uClibc-0.9.33.2/libc/stdio/open_memstream.c uClibc-git/libc/stdio/open_memstream.c
  42481. --- uClibc-0.9.33.2/libc/stdio/open_memstream.c 2012-05-15 09:20:09.000000000 +0200
  42482. +++ uClibc-git/libc/stdio/open_memstream.c 2014-07-25 20:36:06.049330721 +0200
  42483. @@ -128,7 +128,7 @@
  42484. * (ie replace the FILE buffer with the cookie buffer and update FILE bufstart,
  42485. * etc. whenever we seek). */
  42486. -FILE *open_memstream(char **__restrict bufloc, size_t *__restrict sizeloc)
  42487. +FILE *open_memstream(char **bufloc, size_t *sizeloc)
  42488. {
  42489. register __oms_cookie *cookie;
  42490. register FILE *fp;
  42491. diff -Nur uClibc-0.9.33.2/libc/stdio/popen.c uClibc-git/libc/stdio/popen.c
  42492. --- uClibc-0.9.33.2/libc/stdio/popen.c 2012-05-15 09:20:09.000000000 +0200
  42493. +++ uClibc-git/libc/stdio/popen.c 2014-07-25 20:36:06.049330721 +0200
  42494. @@ -26,15 +26,6 @@
  42495. #warning "hmm... susv3 says Pipe streams are byte-oriented."
  42496. #endif /* __UCLIBC_MJN3_ONLY__ */
  42497. -
  42498. -/* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
  42499. -#include <sys/syscall.h>
  42500. -#if ! defined __NR_vfork
  42501. -# define vfork fork
  42502. -# define VFORK_LOCK ((void) 0)
  42503. -# define VFORK_UNLOCK ((void) 0)
  42504. -#endif
  42505. -
  42506. #ifndef VFORK_LOCK
  42507. __UCLIBC_MUTEX_STATIC(mylock, PTHREAD_MUTEX_INITIALIZER);
  42508. # define VFORK_LOCK __UCLIBC_MUTEX_LOCK(mylock)
  42509. @@ -138,7 +129,7 @@
  42510. int pclose(FILE *stream)
  42511. {
  42512. struct popen_list_item *p;
  42513. - int stat;
  42514. + int status;
  42515. pid_t pid;
  42516. /* First, find the list entry corresponding to stream and remove it
  42517. @@ -173,8 +164,8 @@
  42518. /* SUSv3 specificly requires that pclose not return before the child
  42519. * terminates, in order to disallow pclose from returning on EINTR. */
  42520. do {
  42521. - if (waitpid(pid, &stat, 0) >= 0) {
  42522. - return stat;
  42523. + if (waitpid(pid, &status, 0) >= 0) {
  42524. + return status;
  42525. }
  42526. if (errno != EINTR) {
  42527. break;
  42528. diff -Nur uClibc-0.9.33.2/libc/stdio/putwchar.c uClibc-git/libc/stdio/putwchar.c
  42529. --- uClibc-0.9.33.2/libc/stdio/putwchar.c 2012-05-15 09:20:09.000000000 +0200
  42530. +++ uClibc-git/libc/stdio/putwchar.c 2014-07-25 20:36:06.049330721 +0200
  42531. @@ -9,7 +9,6 @@
  42532. #ifdef __DO_UNLOCKED
  42533. -
  42534. wint_t putwchar_unlocked(wchar_t wc)
  42535. {
  42536. return fputwc_unlocked(wc, stdout);
  42537. @@ -21,11 +20,9 @@
  42538. #elif defined __UCLIBC_HAS_THREADS__
  42539. -/* psm: should this be fputwc? */
  42540. -
  42541. wint_t putwchar(wchar_t wc)
  42542. {
  42543. - return fputc(wc, stdout);
  42544. + return fputwc(wc, stdout);
  42545. }
  42546. #endif
  42547. diff -Nur uClibc-0.9.33.2/libc/stdio/_scanf.c uClibc-git/libc/stdio/_scanf.c
  42548. --- uClibc-0.9.33.2/libc/stdio/_scanf.c 2012-05-15 09:20:09.000000000 +0200
  42549. +++ uClibc-git/libc/stdio/_scanf.c 2014-07-25 20:36:06.045330699 +0200
  42550. @@ -11,8 +11,8 @@
  42551. * Library General Public License for more details.
  42552. *
  42553. * You should have received a copy of the GNU Library General Public
  42554. - * License along with this library; if not, write to the Free
  42555. - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  42556. + * License along with this library; if not, see
  42557. + * <http://www.gnu.org/licenses/>.
  42558. */
  42559. /* Aug 1, 2003
  42560. @@ -43,7 +43,6 @@
  42561. * standards and from an official C standard defect report.
  42562. */
  42563. -#define _ISOC99_SOURCE /* for LLONG_MAX primarily... */
  42564. #include <features.h>
  42565. #include "_stdio.h"
  42566. #include <stdlib.h>
  42567. @@ -77,14 +76,6 @@
  42568. #include <bits/uClibc_fpmax.h>
  42569. #endif /* __UCLIBC_HAS_FLOATS__ */
  42570. -#ifdef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__
  42571. -#ifdef L_vfscanf
  42572. -/* only emit this once */
  42573. -#warning Forcing undef of __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ until implemented!
  42574. -#endif
  42575. -#undef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__
  42576. -#endif
  42577. -
  42578. #undef __STDIO_HAS_VSSCANF
  42579. #if defined(__STDIO_BUFFERS) || !defined(__UCLIBC_HAS_WCHAR__) || defined(__UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__)
  42580. #define __STDIO_HAS_VSSCANF 1
  42581. @@ -99,8 +90,6 @@
  42582. #endif
  42583. -extern void _store_inttype(void *dest, int desttype, uintmax_t val);
  42584. -
  42585. #if defined(ULLONG_MAX) && (LLONG_MAX > LONG_MAX)
  42586. extern unsigned long long
  42587. @@ -209,7 +198,7 @@
  42588. #ifdef __STDIO_BUFFERS
  42589. -int vsscanf(__const char *sp, __const char *fmt, va_list ap)
  42590. +int vsscanf(const char *sp, const char *fmt, va_list ap)
  42591. {
  42592. FILE f;
  42593. @@ -253,7 +242,7 @@
  42594. #elif !defined(__UCLIBC_HAS_WCHAR__)
  42595. -int vsscanf(__const char *sp, __const char *fmt, va_list ap)
  42596. +int vsscanf(const char *sp, const char *fmt, va_list ap)
  42597. {
  42598. __FILE_vsscanf f;
  42599. @@ -292,7 +281,7 @@
  42600. #elif defined(__UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__)
  42601. -int vsscanf(__const char *sp, __const char *fmt, va_list ap)
  42602. +int vsscanf(const char *sp, const char *fmt, va_list ap)
  42603. {
  42604. FILE *f;
  42605. int rv = EOF;
  42606. @@ -388,9 +377,9 @@
  42607. FILE f;
  42608. f.__bufstart =
  42609. - f.__bufpos = (char *) str;
  42610. + f.__bufpos = (unsigned char *) str;
  42611. f.__bufread =
  42612. - f.__bufend = (char *)(str + wcslen(str));
  42613. + f.__bufend = (unsigned char *)(str + wcslen(str));
  42614. __STDIO_STREAM_DISABLE_GETC(&f);
  42615. __STDIO_STREAM_DISABLE_PUTC(&f);
  42616. @@ -433,18 +422,19 @@
  42617. /* float layout 0123456789012345678901 repeat n for "l[" */
  42618. -#define SPEC_CHARS "npxXoudifFeEgGaACSncs["
  42619. -/* npxXoudif eEgG CS cs[ */
  42620. +#define SPEC_CHARS "npxXoudifFeEgGaACSnmcs["
  42621. +/* npxXoudif eEgG CS cs[ */
  42622. +/* NOTE: the 'm' flag must come before any convs that support it */
  42623. -/* NOTE: Ordering is important! In particular, CONV_LEFTBRACKET
  42624. - * must immediately precede CONV_c. */
  42625. +/* NOTE: Ordering is important! The CONV_{C,S,LEFTBRACKET} must map
  42626. + simply to their lowercase equivalents. */
  42627. enum {
  42628. CONV_n = 0,
  42629. CONV_p,
  42630. CONV_x, CONV_X, CONV_o, CONV_u, CONV_d, CONV_i,
  42631. CONV_f, CONV_F, CONV_e, CONV_E, CONV_g, CONV_G, CONV_a, CONV_A,
  42632. - CONV_C, CONV_S, CONV_LEFTBRACKET, CONV_c, CONV_s, CONV_leftbracket,
  42633. + CONV_C, CONV_S, CONV_LEFTBRACKET, CONV_m, CONV_c, CONV_s, CONV_leftbracket,
  42634. CONV_percent, CONV_whitespace /* not in SPEC_* and no flags */
  42635. };
  42636. @@ -474,7 +464,7 @@
  42637. FLAG_SURPRESS = 0x10, /* MUST BE 1ST!! See DO_FLAGS. */
  42638. FLAG_THOUSANDS = 0x20,
  42639. FLAG_I18N = 0x40, /* only works for d, i, u */
  42640. - FLAG_MALLOC = 0x80, /* only works for s, S, and [ (and l[)*/
  42641. + FLAG_MALLOC = 0x80, /* only works for c, s, S, and [ (and l[)*/
  42642. };
  42643. @@ -491,7 +481,7 @@
  42644. /* fFeEgGaA */ (0x0c|FLAG_SURPRESS|FLAG_THOUSANDS|FLAG_I18N), \
  42645. /* C */ ( 0|FLAG_SURPRESS), \
  42646. /* S and l[ */ ( 0|FLAG_SURPRESS|FLAG_MALLOC), \
  42647. - /* c */ (0x04|FLAG_SURPRESS), \
  42648. + /* c */ (0x04|FLAG_SURPRESS|FLAG_MALLOC), \
  42649. /* s and [ */ (0x04|FLAG_SURPRESS|FLAG_MALLOC), \
  42650. }
  42651. @@ -904,17 +894,17 @@
  42652. if (*psfs->fmt == *p) {
  42653. int p_m_spec_chars = p - spec_chars;
  42654. -#ifdef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__
  42655. -#error implement gnu a flag
  42656. - if ((*p == 'a')
  42657. - && ((psfs->fmt[1] == '[') || ((psfs->fmt[1]|0x20) == 's'))
  42658. - ) { /* Assumes ascii for 's' and 'S' test. */
  42659. - psfs->flags |= FLAG_MALLOC;
  42660. + if (*p == 'm' &&
  42661. + (psfs->fmt[1] == '[' || psfs->fmt[1] == 'c' ||
  42662. + /* Assumes ascii for 's' and 'S' test. */
  42663. + (psfs->fmt[1] | 0x20) == 's'))
  42664. + {
  42665. + if (psfs->store)
  42666. + psfs->flags |= FLAG_MALLOC;
  42667. ++psfs->fmt;
  42668. ++p;
  42669. - continue; /* The related conversions follow 'a'. */
  42670. + continue; /* The related conversions follow 'm'. */
  42671. }
  42672. -#endif /* __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ */
  42673. for (p = spec_ranges; p_m_spec_chars > *p ; ++p) {}
  42674. if (((psfs->dataargtype >> 8) | psfs->flags)
  42675. @@ -928,7 +918,7 @@
  42676. psfs->dataargtype = PA_FLAG_LONG;
  42677. } else if ((p_m_spec_chars >= CONV_c)
  42678. && (psfs->dataargtype & PA_FLAG_LONG)) {
  42679. - p_m_spec_chars -= 3; /* lc -> C, ls -> S, l[ -> ?? */
  42680. + p_m_spec_chars -= CONV_c - CONV_C; /* lc -> C, ls -> S, l[ -> ?? */
  42681. }
  42682. psfs->conv_num = p_m_spec_chars;
  42683. @@ -1265,12 +1255,6 @@
  42684. while (*wf && __isascii(*wf) && (b < buf + sizeof(buf) - 1)) {
  42685. *b++ = *wf++;
  42686. }
  42687. -#ifdef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__
  42688. -#error this is wrong... we need to ched in __psfs_parse_spec instead since this checks last char in buffer and conversion my have stopped before it.
  42689. - if ((*b == 'a') && ((*wf == '[') || ((*wf|0x20) == 's'))) {
  42690. - goto DONE; /* Spec was excessively long. */
  42691. - }
  42692. -#endif /* __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__ */
  42693. *b = 0;
  42694. if (b == buf) { /* Bad conversion specifier! */
  42695. goto DONE;
  42696. @@ -1390,13 +1374,36 @@
  42697. }
  42698. if (psfs.conv_num == CONV_s) {
  42699. + /* We might have to handle the allocation ourselves */
  42700. + int len;
  42701. + /* With 'm', we actually got a pointer to a pointer */
  42702. + unsigned char **ptr = (void *)b;
  42703. +
  42704. + i = 0;
  42705. + if (psfs.flags & FLAG_MALLOC) {
  42706. + len = 0;
  42707. + b = NULL;
  42708. + } else
  42709. + len = -1;
  42710. +
  42711. /* Yes, believe it or not, a %s conversion can store nuls. */
  42712. while ((__scan_getc(&sc) >= 0) && !isspace(sc.cc)) {
  42713. zero_conversions = 0;
  42714. - *b = sc.cc;
  42715. - b += psfs.store;
  42716. + if (i == len) {
  42717. + /* Pick a size that won't trigger a lot of
  42718. + * mallocs early on ... */
  42719. + len += 256;
  42720. + b = realloc(b, len + 1);
  42721. + }
  42722. + b[i] = sc.cc;
  42723. + i += psfs.store;
  42724. fail = 0;
  42725. }
  42726. +
  42727. + if (psfs.flags & FLAG_MALLOC)
  42728. + *ptr = b;
  42729. + /* The code below takes care of terminating NUL */
  42730. + b += i;
  42731. } else {
  42732. #ifdef __UCLIBC_HAS_WCHAR__
  42733. assert((psfs.conv_num == CONV_LEFTBRACKET) || \
  42734. diff -Nur uClibc-0.9.33.2/libc/stdio/_stdio.c uClibc-git/libc/stdio/_stdio.c
  42735. --- uClibc-0.9.33.2/libc/stdio/_stdio.c 2012-05-15 09:20:09.000000000 +0200
  42736. +++ uClibc-git/libc/stdio/_stdio.c 2014-07-25 20:36:06.045330699 +0200
  42737. @@ -7,7 +7,6 @@
  42738. #include "_stdio.h"
  42739. -
  42740. /* This is pretty much straight from uClibc, but with one important
  42741. * difference.
  42742. *
  42743. @@ -185,7 +184,7 @@
  42744. /**********************************************************************/
  42745. /* We assume here that we are the only remaining thread. */
  42746. -void attribute_hidden _stdio_term(void)
  42747. +void _stdio_term(void)
  42748. {
  42749. #if defined(__STDIO_BUFFERS) || defined(__UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__)
  42750. register FILE *ptr;
  42751. @@ -252,7 +251,7 @@
  42752. }
  42753. #if defined __STDIO_BUFFERS || !defined __UCLIBC__
  42754. -void attribute_hidden _stdio_init(void)
  42755. +void _stdio_init(void)
  42756. {
  42757. #ifdef __STDIO_BUFFERS
  42758. int old_errno = errno;
  42759. @@ -277,10 +276,6 @@
  42760. #error Assumption violated about __MASK_READING and __FLAG_UNGOT
  42761. #endif
  42762. -#ifdef __UCLIBC_HAS_THREADS__
  42763. -#include <pthread.h>
  42764. -#endif
  42765. -
  42766. #ifndef NDEBUG
  42767. void attribute_hidden _stdio_validate_FILE(const FILE *stream)
  42768. diff -Nur uClibc-0.9.33.2/libc/stdio/_stdio.h uClibc-git/libc/stdio/_stdio.h
  42769. --- uClibc-0.9.33.2/libc/stdio/_stdio.h 2012-05-15 09:20:09.000000000 +0200
  42770. +++ uClibc-git/libc/stdio/_stdio.h 2014-07-25 20:36:06.045330699 +0200
  42771. @@ -39,6 +39,9 @@
  42772. #ifdef __UCLIBC_HAS_THREADS__
  42773. +extern void __stdio_init_mutex(__UCLIBC_MUTEX_TYPE *m) attribute_hidden;
  42774. +
  42775. +extern volatile int _stdio_openlist_use_count attribute_hidden; /* _stdio_openlist_del_lock */
  42776. #define __STDIO_OPENLIST_INC_USE \
  42777. do { \
  42778. __STDIO_THREADLOCK_OPENLIST_DEL; \
  42779. @@ -51,6 +54,7 @@
  42780. #define __STDIO_OPENLIST_DEC_USE \
  42781. _stdio_openlist_dec_use()
  42782. +extern int _stdio_openlist_del_count attribute_hidden; /* _stdio_openlist_del_lock */
  42783. #define __STDIO_OPENLIST_INC_DEL_CNT \
  42784. do { \
  42785. __STDIO_THREADLOCK_OPENLIST_DEL; \
  42786. @@ -308,6 +312,9 @@
  42787. extern int __stdio_trans2r_o(FILE *__restrict stream, int oflag) attribute_hidden;
  42788. extern int __stdio_trans2w_o(FILE *__restrict stream, int oflag) attribute_hidden;
  42789. +extern uintmax_t _load_inttype(int desttype, register const void *src, int uflag) attribute_hidden;
  42790. +extern void _store_inttype(void *dest, int desttype, uintmax_t val) attribute_hidden;
  42791. +
  42792. /**********************************************************************/
  42793. #ifdef __STDIO_BUFFERS
  42794. diff -Nur uClibc-0.9.33.2/libc/stdio/_store_inttype.c uClibc-git/libc/stdio/_store_inttype.c
  42795. --- uClibc-0.9.33.2/libc/stdio/_store_inttype.c 2012-05-15 09:20:09.000000000 +0200
  42796. +++ uClibc-git/libc/stdio/_store_inttype.c 2014-07-25 20:36:06.045330699 +0200
  42797. @@ -28,7 +28,6 @@
  42798. /* We assume int may be short or long, but short and long are different. */
  42799. -void _store_inttype(register void *dest, int desttype, uintmax_t val) attribute_hidden;
  42800. void _store_inttype(register void *dest, int desttype, uintmax_t val)
  42801. {
  42802. if (desttype == __PA_FLAG_CHAR) { /* assume char not int */
  42803. diff -Nur uClibc-0.9.33.2/libc/stdio/tempnam.c uClibc-git/libc/stdio/tempnam.c
  42804. --- uClibc-0.9.33.2/libc/stdio/tempnam.c 2012-05-15 09:20:09.000000000 +0200
  42805. +++ uClibc-git/libc/stdio/tempnam.c 2014-07-25 20:36:06.049330721 +0200
  42806. @@ -13,8 +13,7 @@
  42807. You should have received a copy of the GNU Library General Public
  42808. License along with the GNU C Library; see the file COPYING.LIB. If not,
  42809. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  42810. - Boston, MA 02111-1307, USA. */
  42811. + see <http://www.gnu.org/licenses/>. */
  42812. #include <stdio.h>
  42813. #include <string.h>
  42814. diff -Nur uClibc-0.9.33.2/libc/stdio/tmpfile.c uClibc-git/libc/stdio/tmpfile.c
  42815. --- uClibc-0.9.33.2/libc/stdio/tmpfile.c 2012-05-15 09:20:09.000000000 +0200
  42816. +++ uClibc-git/libc/stdio/tmpfile.c 2014-07-25 20:36:06.049330721 +0200
  42817. @@ -13,8 +13,7 @@
  42818. You should have received a copy of the GNU Library General Public
  42819. License along with the GNU C Library; see the file COPYING.LIB. If not,
  42820. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  42821. - Boston, MA 02111-1307, USA. */
  42822. + see <http://www.gnu.org/licenses/>. */
  42823. #include <features.h>
  42824. #include <stdio.h>
  42825. diff -Nur uClibc-0.9.33.2/libc/stdio/tmpnam.c uClibc-git/libc/stdio/tmpnam.c
  42826. --- uClibc-0.9.33.2/libc/stdio/tmpnam.c 2012-05-15 09:20:09.000000000 +0200
  42827. +++ uClibc-git/libc/stdio/tmpnam.c 2014-07-25 20:36:06.049330721 +0200
  42828. @@ -12,9 +12,8 @@
  42829. Lesser General Public License for more details.
  42830. You should have received a copy of the GNU Lesser General Public
  42831. - License along with the GNU C Library; if not, write to the Free
  42832. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  42833. - 02111-1307 USA. */
  42834. + License along with the GNU C Library; if not, see
  42835. + <http://www.gnu.org/licenses/>. */
  42836. #include <stdio.h>
  42837. #include <string.h>
  42838. diff -Nur uClibc-0.9.33.2/libc/stdio/tmpnam_r.c uClibc-git/libc/stdio/tmpnam_r.c
  42839. --- uClibc-0.9.33.2/libc/stdio/tmpnam_r.c 2012-05-15 09:20:09.000000000 +0200
  42840. +++ uClibc-git/libc/stdio/tmpnam_r.c 2014-07-25 20:36:06.049330721 +0200
  42841. @@ -13,8 +13,7 @@
  42842. You should have received a copy of the GNU Library General Public
  42843. License along with the GNU C Library; see the file COPYING.LIB. If not,
  42844. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  42845. - Boston, MA 02111-1307, USA. */
  42846. + see <http://www.gnu.org/licenses/>. */
  42847. #include <stdio.h>
  42848. #include "../misc/internals/tempname.h"
  42849. diff -Nur uClibc-0.9.33.2/libc/stdio/_uintmaxtostr.c uClibc-git/libc/stdio/_uintmaxtostr.c
  42850. --- uClibc-0.9.33.2/libc/stdio/_uintmaxtostr.c 2012-05-15 09:20:09.000000000 +0200
  42851. +++ uClibc-git/libc/stdio/_uintmaxtostr.c 2014-07-25 20:36:06.045330699 +0200
  42852. @@ -5,7 +5,6 @@
  42853. * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details.
  42854. */
  42855. -#define _ISOC99_SOURCE /* for ULLONG primarily... */
  42856. #include "_stdio.h"
  42857. #include <limits.h>
  42858. #include <locale.h>
  42859. diff -Nur uClibc-0.9.33.2/libc/stdio/_vfprintf.c uClibc-git/libc/stdio/_vfprintf.c
  42860. --- uClibc-0.9.33.2/libc/stdio/_vfprintf.c 2012-05-15 09:20:09.000000000 +0200
  42861. +++ uClibc-git/libc/stdio/_vfprintf.c 2014-07-25 20:36:06.045330699 +0200
  42862. @@ -12,8 +12,8 @@
  42863. * Library General Public License for more details.
  42864. *
  42865. * You should have received a copy of the GNU Library General Public
  42866. - * License along with this library; if not, write to the Free
  42867. - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  42868. + * License along with this library; if not, see
  42869. + * <http://www.gnu.org/licenses/>.
  42870. */
  42871. /* This code needs a lot of clean up. Some of that is on hold until uClibc
  42872. @@ -88,7 +88,6 @@
  42873. * treats this as an error.
  42874. */
  42875. -#define _ISOC99_SOURCE /* for ULLONG primarily... */
  42876. #include <features.h>
  42877. #include "_stdio.h"
  42878. #include <stdlib.h>
  42879. @@ -101,7 +100,6 @@
  42880. #include <stdint.h>
  42881. #include <errno.h>
  42882. #include <locale.h>
  42883. -#include <printf.h>
  42884. #ifdef __UCLIBC_HAS_THREADS__
  42885. # include <stdio_ext.h>
  42886. @@ -126,30 +124,16 @@
  42887. /**********************************************************************/
  42888. /* These provide some control over printf's feature set */
  42889. -/* This is undefined below depeding on uClibc's configuration. */
  42890. -#define __STDIO_PRINTF_FLOAT 1
  42891. +/* Now controlled by uClibc_config.h. */
  42892. +/* #define __UCLIBC_HAS_FLOATS__ 1 */
  42893. -/* Now controlled by uClibc_stdio.h. */
  42894. +/* Now controlled by uClibc_config.h. */
  42895. /* #define __UCLIBC_HAS_PRINTF_M_SPEC__ */
  42896. /**********************************************************************/
  42897. -#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_FLOATS__)
  42898. -# undef __STDIO_PRINTF_FLOAT
  42899. -#endif
  42900. -
  42901. -#ifdef __BCC__
  42902. -# undef __STDIO_PRINTF_FLOAT
  42903. -#endif
  42904. -
  42905. -#ifdef __STDIO_PRINTF_FLOAT
  42906. -# include <float.h>
  42907. -# include <bits/uClibc_fpmax.h>
  42908. -#else
  42909. -# undef L__fpmaxtostr
  42910. -#endif
  42911. -
  42912. +#include "_fpmaxtostr.h"
  42913. #undef __STDIO_HAS_VSNPRINTF
  42914. #if defined(__STDIO_BUFFERS) || defined(__USE_OLD_VFPRINTF__) || defined(__UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__)
  42915. @@ -158,7 +142,7 @@
  42916. /**********************************************************************/
  42917. -/* Now controlled by uClibc_stdio.h. */
  42918. +/* Now controlled by uClibc_config.h. */
  42919. /* #define __UCLIBC_HAS_GLIBC_CUSTOM_PRINTF__ */
  42920. #ifdef __UCLIBC_MJN3_ONLY__
  42921. @@ -361,7 +345,7 @@
  42922. # ifdef ULLONG_MAX
  42923. unsigned long long ull;
  42924. # endif
  42925. -# ifdef __STDIO_PRINTF_FLOAT
  42926. +# ifdef __UCLIBC_HAS_FLOATS__
  42927. double d;
  42928. long double ld;
  42929. # endif
  42930. @@ -398,22 +382,11 @@
  42931. /* TODO: fix printf to return 0 and set errno if format error. Standard says
  42932. only returns -1 if sets error indicator for the stream. */
  42933. -#ifdef __STDIO_PRINTF_FLOAT
  42934. -typedef size_t (__fp_outfunc_t)(FILE *fp, intptr_t type, intptr_t len,
  42935. - intptr_t buf);
  42936. -
  42937. -extern ssize_t _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info *info,
  42938. - __fp_outfunc_t fp_outfunc) attribute_hidden;
  42939. -#endif
  42940. -
  42941. extern int _ppfs_init(ppfs_t *ppfs, const char *fmt0) attribute_hidden; /* validates */
  42942. extern void _ppfs_prepargs(ppfs_t *ppfs, va_list arg) attribute_hidden; /* sets posargptrs */
  42943. extern void _ppfs_setargs(ppfs_t *ppfs) attribute_hidden; /* sets argptrs for current spec */
  42944. extern int _ppfs_parsespec(ppfs_t *ppfs) attribute_hidden; /* parses specifier */
  42945. -extern void _store_inttype(void *dest, int desttype, uintmax_t val) attribute_hidden;
  42946. -extern uintmax_t _load_inttype(int desttype, const void *src, int uflag) attribute_hidden;
  42947. -
  42948. /**********************************************************************/
  42949. #ifdef L_parse_printf_format
  42950. @@ -564,7 +537,7 @@
  42951. ppfs->fmtpos = fmt0; /* rewind */
  42952. }
  42953. -#ifdef NL_MAX_ARG
  42954. +#ifdef NL_ARGMAX
  42955. /* If we have positional args, make sure we know all the types. */
  42956. {
  42957. register int *p = ppfs->argtype;
  42958. @@ -576,7 +549,7 @@
  42959. ++p;
  42960. }
  42961. }
  42962. -#endif /* NL_MAX_ARG */
  42963. +#endif /* NL_ARGMAX */
  42964. return 0;
  42965. }
  42966. @@ -653,7 +626,7 @@
  42967. /* we're assuming wchar_t is at least an int */
  42968. GET_VA_ARG(p,wc,wchar_t,ppfs->arg);
  42969. break;
  42970. -#ifdef __STDIO_PRINTF_FLOAT
  42971. +#ifdef __UCLIBC_HAS_FLOATS__
  42972. /* PA_FLOAT */
  42973. case PA_DOUBLE:
  42974. GET_VA_ARG(p,d,double,ppfs->arg);
  42975. @@ -661,12 +634,12 @@
  42976. case (PA_DOUBLE|PA_FLAG_LONG_DOUBLE):
  42977. GET_VA_ARG(p,ld,long double,ppfs->arg);
  42978. break;
  42979. -#else /* __STDIO_PRINTF_FLOAT */
  42980. +#else /* __UCLIBC_HAS_FLOATS__ */
  42981. case PA_DOUBLE:
  42982. case (PA_DOUBLE|PA_FLAG_LONG_DOUBLE):
  42983. assert(0);
  42984. continue;
  42985. -#endif /* __STDIO_PRINTF_FLOAT */
  42986. +#endif /* __UCLIBC_HAS_FLOATS__ */
  42987. default:
  42988. /* TODO -- really need to ensure this can't happen */
  42989. assert(ppfs->argtype[i-1] & PA_FLAG_PTR);
  42990. @@ -743,7 +716,7 @@
  42991. PA_INT|PA_FLAG_LONG,
  42992. PA_INT|PA_FLAG_LONG_LONG,
  42993. PA_WCHAR,
  42994. -#ifdef __STDIO_PRINTF_FLOAT
  42995. +#ifdef __UCLIBC_HAS_FLOATS__
  42996. /* PA_FLOAT, */
  42997. PA_DOUBLE,
  42998. PA_DOUBLE|PA_FLAG_LONG_DOUBLE,
  42999. @@ -766,7 +739,7 @@
  43000. PROMOTED_SIZE_OF(long), /* TODO -- is this correct? (above too) */
  43001. #endif
  43002. PROMOTED_SIZE_OF(wchar_t),
  43003. -#ifdef __STDIO_PRINTF_FLOAT
  43004. +#ifdef __UCLIBC_HAS_FLOATS__
  43005. /* PROMOTED_SIZE_OF(float), */
  43006. PROMOTED_SIZE_OF(double),
  43007. PROMOTED_SIZE_OF(long double),
  43008. @@ -1199,7 +1172,7 @@
  43009. #define _outnstr(stream, string, len) ((len > 0) ? __stdio_fwrite((const unsigned char *)(string), len, stream) : 0)
  43010. #define FP_OUT _fp_out_narrow
  43011. -#ifdef __STDIO_PRINTF_FLOAT
  43012. +#ifdef __UCLIBC_HAS_FLOATS__
  43013. static size_t _fp_out_narrow(FILE *fp, intptr_t type, intptr_t len, intptr_t buf)
  43014. {
  43015. @@ -1219,7 +1192,7 @@
  43016. return r + OUTNSTR(fp, (const char *) buf, len);
  43017. }
  43018. -#endif /* __STDIO_PRINTF_FLOAT */
  43019. +#endif /* __UCLIBC_HAS_FLOATS__ */
  43020. #else /* L__vfprintf_internal */
  43021. @@ -1229,7 +1202,7 @@
  43022. #define STRLEN wcslen
  43023. #define _PPFS_init _ppwfs_init
  43024. /* Pulls in fseek: */
  43025. -#define OUTPUT(F,S) fputws(S,F)
  43026. +#define OUTPUT(F,S) fputws_unlocked(S,F)
  43027. /* TODO: #define OUTPUT(F,S) _wstdio_fwrite((S),wcslen(S),(F)) */
  43028. #define _outnwcs(stream, wstring, len) _wstdio_fwrite((const wchar_t *)(wstring), len, stream)
  43029. #define FP_OUT _fp_out_wide
  43030. @@ -1261,16 +1234,7 @@
  43031. return wclen - todo;
  43032. }
  43033. -#ifdef __STDIO_PRINTF_FLOAT
  43034. -
  43035. -#ifdef __UCLIBC_MJN3_ONLY__
  43036. -#warning TODO: Move defines from _fpmaxtostr. Put them in a common header.
  43037. -#endif
  43038. -
  43039. -/* The following defines are from _fpmaxtostr.*/
  43040. -#define DIGITS_PER_BLOCK 9
  43041. -#define NUM_DIGIT_BLOCKS ((DECIMAL_DIG+DIGITS_PER_BLOCK-1)/DIGITS_PER_BLOCK)
  43042. -#define BUF_SIZE ( 3 + NUM_DIGIT_BLOCKS * DIGITS_PER_BLOCK )
  43043. +#ifdef __UCLIBC_HAS_FLOATS__
  43044. static size_t _fp_out_wide(FILE *fp, intptr_t type, intptr_t len, intptr_t buf)
  43045. {
  43046. @@ -1318,7 +1282,7 @@
  43047. return r;
  43048. }
  43049. -#endif /* __STDIO_PRINTF_FLOAT */
  43050. +#endif /* __UCLIBC_HAS_FLOATS__ */
  43051. static int _ppwfs_init(register ppfs_t *ppfs, const wchar_t *fmt0)
  43052. {
  43053. @@ -1608,7 +1572,7 @@
  43054. }
  43055. numfill = ((numfill > SLEN) ? numfill - SLEN : 0);
  43056. } else if (ppfs->conv_num <= CONV_A) { /* floating point */
  43057. -#ifdef __STDIO_PRINTF_FLOAT
  43058. +#ifdef __UCLIBC_HAS_FLOATS__
  43059. ssize_t nf;
  43060. nf = _fpmaxtostr(stream,
  43061. (__fpmax_t)
  43062. @@ -1622,7 +1586,7 @@
  43063. *count += nf;
  43064. return 0;
  43065. -#else /* __STDIO_PRINTF_FLOAT */
  43066. +#else /* __UCLIBC_HAS_FLOATS__ */
  43067. return -1; /* TODO -- try to continue? */
  43068. #endif
  43069. } else if (ppfs->conv_num <= CONV_S) { /* wide char or string */
  43070. diff -Nur uClibc-0.9.33.2/libc/stdlib/a64l.c uClibc-git/libc/stdlib/a64l.c
  43071. --- uClibc-0.9.33.2/libc/stdlib/a64l.c 2012-05-15 09:20:09.000000000 +0200
  43072. +++ uClibc-git/libc/stdlib/a64l.c 2014-07-25 20:36:06.061330784 +0200
  43073. @@ -13,9 +13,8 @@
  43074. Lesser General Public License for more details.
  43075. You should have received a copy of the GNU Lesser General Public
  43076. - License along with the GNU C Library; if not, write to the Free
  43077. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  43078. - 02111-1307 USA. */
  43079. + License along with the GNU C Library; if not, see
  43080. + <http://www.gnu.org/licenses/>. */
  43081. #include <stdlib.h>
  43082. diff -Nur uClibc-0.9.33.2/libc/stdlib/abort.c uClibc-git/libc/stdlib/abort.c
  43083. --- uClibc-0.9.33.2/libc/stdlib/abort.c 2012-05-15 09:20:09.000000000 +0200
  43084. +++ uClibc-git/libc/stdlib/abort.c 2014-07-25 20:36:06.061330784 +0200
  43085. @@ -13,8 +13,7 @@
  43086. You should have received a copy of the GNU Library General Public
  43087. License along with the GNU C Library; see the file COPYING.LIB. If
  43088. -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  43089. -Cambridge, MA 02139, USA. */
  43090. +not, see <http://www.gnu.org/licenses/>. */
  43091. /* Hacked up for uClibc by Erik Andersen */
  43092. @@ -47,9 +46,6 @@
  43093. # warning "no abort instruction defined for your arch"
  43094. #endif
  43095. -#ifdef __UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT__
  43096. -extern void weak_function _stdio_term(void) attribute_hidden;
  43097. -#endif
  43098. static smallint been_there_done_that = 0;
  43099. /* Be prepared in case multiple threads try to abort() */
  43100. diff -Nur uClibc-0.9.33.2/libc/stdlib/arc4random.c uClibc-git/libc/stdlib/arc4random.c
  43101. --- uClibc-0.9.33.2/libc/stdlib/arc4random.c 2012-05-15 09:20:09.000000000 +0200
  43102. +++ uClibc-git/libc/stdlib/arc4random.c 2014-07-25 20:36:06.061330784 +0200
  43103. @@ -1,24 +1,29 @@
  43104. -/* $$$: arc4random.c 2005/02/08 robert */
  43105. -/* $NetBSD: arc4random.c,v 1.5.2.1 2004/03/26 22:52:50 jmc Exp $ */
  43106. -/* $OpenBSD: arc4random.c,v 1.6 2001/06/05 05:05:38 pvalchev Exp $ */
  43107. -
  43108. /*
  43109. - * Arc4 random number generator for OpenBSD.
  43110. - * Copyright 1996 David Mazieres <dm@lcs.mit.edu>.
  43111. + * Copyright (c) 1996, David Mazieres <dm@uun.org>
  43112. *
  43113. - * Modification and redistribution in source and binary forms is
  43114. - * permitted provided that due credit is given to the author and the
  43115. - * OpenBSD project by leaving this copyright notice intact.
  43116. + * Permission to use, copy, modify, and distribute this software for any
  43117. + * purpose with or without fee is hereby granted, provided that the above
  43118. + * copyright notice and this permission notice appear in all copies.
  43119. + *
  43120. + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  43121. + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  43122. + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  43123. + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  43124. + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  43125. + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  43126. + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  43127. */
  43128. /*
  43129. + * Arc4 random number generator for OpenBSD.
  43130. + *
  43131. * This code is derived from section 17.1 of Applied Cryptography,
  43132. * second edition, which describes a stream cipher allegedly
  43133. * compatible with RSA Labs "RC4" cipher (the actual description of
  43134. * which is a trade secret). The same algorithm is used as a stream
  43135. * cipher called "arcfour" in Tatu Ylonen's ssh package.
  43136. *
  43137. - * Here the stream cipher has been modified always to include the time
  43138. + * Here the stream cipher has been modified always to include entropy
  43139. * when initializing the state. That makes it impossible to
  43140. * regenerate the same random sequence twice, so this can't be used
  43141. * for encryption, but will generate good random numbers.
  43142. @@ -26,32 +31,26 @@
  43143. * RC4 is a registered trademark of RSA Laboratories.
  43144. */
  43145. +/* $OpenBSD: arc4random.c,v 1.16 2007/02/12 19:58:47 otto Exp $ */
  43146. +
  43147. #include <features.h>
  43148. +
  43149. #include <fcntl.h>
  43150. #include <stdlib.h>
  43151. #include <unistd.h>
  43152. #include <sys/types.h>
  43153. -#include <sys/param.h>
  43154. #include <sys/time.h>
  43155. -#ifdef __ARC4RANDOM_USE_ERANDOM__
  43156. -#include <sys/sysctl.h>
  43157. -#endif
  43158. -
  43159. struct arc4_stream {
  43160. - uint8_t i;
  43161. - uint8_t j;
  43162. - uint8_t s[256];
  43163. + u_int8_t i;
  43164. + u_int8_t j;
  43165. + u_int8_t s[256];
  43166. };
  43167. -static int rs_initialized;
  43168. +static smallint rs_initialized;
  43169. static struct arc4_stream rs;
  43170. -
  43171. -static __inline__ void arc4_init(struct arc4_stream *);
  43172. -static __inline__ void arc4_addrandom(struct arc4_stream *, u_char *, int);
  43173. -static void arc4_stir(struct arc4_stream *);
  43174. -static __inline__ uint8_t arc4_getbyte(struct arc4_stream *);
  43175. -static __inline__ uint32_t arc4_getword(struct arc4_stream *);
  43176. +static pid_t arc4_stir_pid;
  43177. +static int arc4_count;
  43178. static __inline__ void
  43179. arc4_init(struct arc4_stream *as)
  43180. @@ -64,11 +63,25 @@
  43181. as->j = 0;
  43182. }
  43183. +static __inline__ u_int8_t
  43184. +arc4_getbyte(struct arc4_stream *as)
  43185. +{
  43186. + u_int8_t si, sj;
  43187. +
  43188. + as->i = (as->i + 1);
  43189. + si = as->s[as->i];
  43190. + as->j = (as->j + si);
  43191. + sj = as->s[as->j];
  43192. + as->s[as->i] = sj;
  43193. + as->s[as->j] = si;
  43194. + return (as->s[(si + sj) & 0xff]);
  43195. +}
  43196. +
  43197. static __inline__ void
  43198. arc4_addrandom(struct arc4_stream *as, u_char *dat, int datlen)
  43199. {
  43200. int n;
  43201. - uint8_t si;
  43202. + u_int8_t si;
  43203. as->i--;
  43204. for (n = 0; n < 256; n++) {
  43205. @@ -84,71 +97,88 @@
  43206. static void
  43207. arc4_stir(struct arc4_stream *as)
  43208. {
  43209. - int fd;
  43210. - struct {
  43211. - struct timeval tv;
  43212. - uint rnd[(128 - sizeof(struct timeval)) / sizeof(uint)];
  43213. - } rdat;
  43214. int n;
  43215. + u_char rnd[128];
  43216. + struct timeval tv;
  43217. +
  43218. +#ifndef __ARC4RANDOM_USES_NODEV__
  43219. + int fd;
  43220. - gettimeofday(&rdat.tv, NULL);
  43221. fd = open("/dev/urandom", O_RDONLY);
  43222. if (fd != -1) {
  43223. - read(fd, rdat.rnd, sizeof(rdat.rnd));
  43224. + read(fd, rnd, sizeof(rnd));
  43225. close(fd);
  43226. }
  43227. -#ifdef __ARC4RANDOM_USE_ERANDOM__
  43228. + /* Did the pseudo-random device fail? Use gettimeofday(). */
  43229. + else
  43230. +#endif
  43231. + if (gettimeofday(&tv, NULL) != (-1)) {
  43232. +
  43233. + /* Initialize the first element so it's hopefully not '0',
  43234. + * to help out the next loop. Tossing in some prime numbers
  43235. + * probably can't hurt. */
  43236. + rnd[0] = (tv.tv_sec % 10000) * 3 + tv.tv_usec * 7 + \
  43237. + (getpid() % 1000) * 13;
  43238. +
  43239. + for (n = 1; n < 127 ; n++) {
  43240. +
  43241. + /* Take advantage of the stack space. Only initialize
  43242. + * elements equal to '0'. This will make the rnd[]
  43243. + * array much less vulnerable to timing attacks. Here
  43244. + * we'll stir getpid() into the value of the previous
  43245. + * element. Approximately 1 in 128 elements will still
  43246. + * become '0'. */
  43247. +
  43248. + if (rnd[n] == 0) {
  43249. + rnd[n] = ((rnd[n - 1] + n) ^ \
  43250. + ((getpid() % 1000) * 17));
  43251. + }
  43252. + }
  43253. + }
  43254. else {
  43255. - int mib[3];
  43256. - uint i;
  43257. - size_t len;
  43258. -
  43259. - /* Device could not be opened, we might be chrooted, take
  43260. - * randomness from sysctl. */
  43261. -
  43262. - mib[0] = CTL_KERN;
  43263. - mib[1] = KERN_RANDOM;
  43264. - mib[2] = RANDOM_ERANDOM;
  43265. -
  43266. - for (i = 0; i < sizeof(rdat.rnd) / sizeof(uint); i++) {
  43267. - len = sizeof(uint);
  43268. - if (sysctl(mib, 3, &rdat.rnd[i], &len, NULL, 0) == -1)
  43269. - break;
  43270. + /* gettimeofday() failed? Do the same thing as above, but only
  43271. + * with getpid(). */
  43272. +
  43273. + rnd[0] = (getpid() % 1000) * 19;
  43274. + for (n = 1; n < 127 ; n++) {
  43275. + if (rnd[n] == 0) {
  43276. + rnd[n] = ((rnd[n - 1] + n) ^ \
  43277. + ((getpid() % 1000) * 23));
  43278. + }
  43279. }
  43280. }
  43281. -#endif
  43282. - arc4_addrandom(as, (void *) &rdat, sizeof(rdat));
  43283. + arc4_stir_pid = getpid();
  43284. + arc4_addrandom(as, rnd, sizeof(rnd));
  43285. /*
  43286. - * Throw away the first N words of output, as suggested in the
  43287. - * paper "Weaknesses in the Key Scheduling Algorithm of RC4"
  43288. - * by Fluher, Mantin, and Shamir.
  43289. + * Discard early keystream, as per recommendations in:
  43290. * http://www.wisdom.weizmann.ac.il/~itsik/RC4/Papers/Rc4_ksa.ps
  43291. - * N = 256 in our case.
  43292. */
  43293. - for (n = 0; n < 256 * 4; n++)
  43294. - arc4_getbyte(as);
  43295. + for (n = 0; n < 256; n++)
  43296. + (void)arc4_getbyte(as);
  43297. + arc4_count = 1600000;
  43298. }
  43299. -static __inline__ uint8_t
  43300. -arc4_getbyte(struct arc4_stream *as)
  43301. +#if 0
  43302. +static void __arc4random_stir(void);
  43303. +/*
  43304. + * __arc4_getbyte() is a libc private function intended for use
  43305. + * with malloc.
  43306. + */
  43307. +u_int8_t
  43308. +__arc4_getbyte(void)
  43309. {
  43310. - uint8_t si, sj;
  43311. -
  43312. - as->i = (as->i + 1);
  43313. - si = as->s[as->i];
  43314. - as->j = (as->j + si);
  43315. - sj = as->s[as->j];
  43316. - as->s[as->i] = sj;
  43317. - as->s[as->j] = si;
  43318. - return (as->s[(si + sj) & 0xff]);
  43319. + if (--arc4_count == 0 || !rs_initialized)
  43320. + __arc4random_stir();
  43321. + return arc4_getbyte(&rs);
  43322. }
  43323. +#endif
  43324. -static __inline__ uint32_t
  43325. +static __inline__ u_int32_t
  43326. arc4_getword(struct arc4_stream *as)
  43327. {
  43328. - uint32_t val;
  43329. + u_int32_t val;
  43330. val = arc4_getbyte(as) << 24;
  43331. val |= arc4_getbyte(as) << 16;
  43332. val |= arc4_getbyte(as) << 8;
  43333. @@ -175,23 +205,11 @@
  43334. arc4_addrandom(&rs, dat, datlen);
  43335. }
  43336. -uint32_t
  43337. +u_int32_t
  43338. arc4random(void)
  43339. {
  43340. - if (!rs_initialized)
  43341. + arc4_count -= 4;
  43342. + if (arc4_count <= 0 || !rs_initialized || arc4_stir_pid != getpid())
  43343. __arc4random_stir();
  43344. return arc4_getword(&rs);
  43345. }
  43346. -
  43347. -#if 0
  43348. -/*-------- Test code --------*/
  43349. -#include <stdlib.h>
  43350. -#include <stdio.h>
  43351. -
  43352. -int main(void) {
  43353. - int random_number;
  43354. - random_number = arc4random() % 65536;
  43355. - printf("%d\n", random_number);
  43356. - return 0;
  43357. -}
  43358. -#endif
  43359. diff -Nur uClibc-0.9.33.2/libc/stdlib/_atexit.c uClibc-git/libc/stdlib/_atexit.c
  43360. --- uClibc-0.9.33.2/libc/stdlib/_atexit.c 2012-05-15 09:20:09.000000000 +0200
  43361. +++ uClibc-git/libc/stdlib/_atexit.c 2014-07-25 20:36:06.061330784 +0200
  43362. @@ -40,11 +40,12 @@
  43363. #include <features.h>
  43364. #include <unistd.h>
  43365. #include <stdlib.h>
  43366. +#include <stdio.h>
  43367. #include <errno.h>
  43368. #include <atomic.h>
  43369. #include <bits/uClibc_mutex.h>
  43370. -__UCLIBC_MUTEX_EXTERN(__atexit_lock);
  43371. +__UCLIBC_MUTEX_EXTERN(__atexit_lock) attribute_hidden;
  43372. @@ -240,6 +241,16 @@
  43373. __UCLIBC_MUTEX_LOCK(__atexit_lock);
  43374. + /*
  43375. + * Reuse free slots at the end of the list.
  43376. + * This avoids eating memory when dlopen and dlclose modules multiple times.
  43377. + */
  43378. + while (__exit_count > 0) {
  43379. + if (__exit_function_table[__exit_count-1].type == ef_free) {
  43380. + --__exit_count;
  43381. + } else break;
  43382. + }
  43383. +
  43384. #ifdef __UCLIBC_DYNAMIC_ATEXIT__
  43385. /* If we are out of function table slots, make some more */
  43386. if (__exit_slots < __exit_count+1) {
  43387. @@ -318,8 +329,7 @@
  43388. attribute_hidden void (*__exit_cleanup)(int) = 0;
  43389. __UCLIBC_MUTEX_INIT(__atexit_lock, PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP);
  43390. -extern void __uClibc_fini(void);
  43391. -libc_hidden_proto(__uClibc_fini)
  43392. +extern void __uClibc_fini(void) attribute_hidden;
  43393. /*
  43394. * Normal program termination
  43395. diff -Nur uClibc-0.9.33.2/libc/stdlib/bsd_getpt.c uClibc-git/libc/stdlib/bsd_getpt.c
  43396. --- uClibc-0.9.33.2/libc/stdlib/bsd_getpt.c 2012-05-15 09:20:09.000000000 +0200
  43397. +++ uClibc-git/libc/stdlib/bsd_getpt.c 2014-07-25 20:36:06.061330784 +0200
  43398. @@ -13,9 +13,8 @@
  43399. Lesser General Public License for more details.
  43400. You should have received a copy of the GNU Lesser General Public
  43401. - License along with the GNU C Library; if not, write to the Free
  43402. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  43403. - 02111-1307 USA. */
  43404. + License along with the GNU C Library; if not, see
  43405. + <http://www.gnu.org/licenses/>. */
  43406. #include <errno.h>
  43407. #include <fcntl.h>
  43408. @@ -40,7 +39,7 @@
  43409. const char __libc_ptyname2[] attribute_hidden = PTYNAME2;
  43410. /* Open a master pseudo terminal and return its file descriptor. */
  43411. -int
  43412. +static __inline__ int
  43413. __getpt (void)
  43414. {
  43415. char buf[sizeof (_PATH_PTY) + 2];
  43416. diff -Nur uClibc-0.9.33.2/libc/stdlib/drand48.c uClibc-git/libc/stdlib/drand48.c
  43417. --- uClibc-0.9.33.2/libc/stdlib/drand48.c 2012-05-15 09:20:09.000000000 +0200
  43418. +++ uClibc-git/libc/stdlib/drand48.c 2014-07-25 20:36:06.065330804 +0200
  43419. @@ -13,9 +13,8 @@
  43420. Lesser General Public License for more details.
  43421. You should have received a copy of the GNU Lesser General Public
  43422. - License along with the GNU C Library; if not, write to the Free
  43423. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  43424. - 02111-1307 USA. */
  43425. + License along with the GNU C Library; if not, see
  43426. + <http://www.gnu.org/licenses/>. */
  43427. #include <stdlib.h>
  43428. diff -Nur uClibc-0.9.33.2/libc/stdlib/drand48-iter.c uClibc-git/libc/stdlib/drand48-iter.c
  43429. --- uClibc-0.9.33.2/libc/stdlib/drand48-iter.c 2012-05-15 09:20:09.000000000 +0200
  43430. +++ uClibc-git/libc/stdlib/drand48-iter.c 2014-07-25 20:36:06.061330784 +0200
  43431. @@ -13,9 +13,8 @@
  43432. Lesser General Public License for more details.
  43433. You should have received a copy of the GNU Lesser General Public
  43434. - License along with the GNU C Library; if not, write to the Free
  43435. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  43436. - 02111-1307 USA. */
  43437. + License along with the GNU C Library; if not, see
  43438. + <http://www.gnu.org/licenses/>. */
  43439. #include <errno.h>
  43440. #include <stdlib.h>
  43441. diff -Nur uClibc-0.9.33.2/libc/stdlib/drand48_r.c uClibc-git/libc/stdlib/drand48_r.c
  43442. --- uClibc-0.9.33.2/libc/stdlib/drand48_r.c 2012-05-15 09:20:09.000000000 +0200
  43443. +++ uClibc-git/libc/stdlib/drand48_r.c 2014-07-25 20:36:06.065330804 +0200
  43444. @@ -13,9 +13,8 @@
  43445. Lesser General Public License for more details.
  43446. You should have received a copy of the GNU Lesser General Public
  43447. - License along with the GNU C Library; if not, write to the Free
  43448. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  43449. - 02111-1307 USA. */
  43450. + License along with the GNU C Library; if not, see
  43451. + <http://www.gnu.org/licenses/>. */
  43452. #include <errno.h>
  43453. #include <math.h>
  43454. diff -Nur uClibc-0.9.33.2/libc/stdlib/erand48.c uClibc-git/libc/stdlib/erand48.c
  43455. --- uClibc-0.9.33.2/libc/stdlib/erand48.c 2012-05-15 09:20:09.000000000 +0200
  43456. +++ uClibc-git/libc/stdlib/erand48.c 2014-07-25 20:36:06.065330804 +0200
  43457. @@ -13,9 +13,8 @@
  43458. Lesser General Public License for more details.
  43459. You should have received a copy of the GNU Lesser General Public
  43460. - License along with the GNU C Library; if not, write to the Free
  43461. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  43462. - 02111-1307 USA. */
  43463. + License along with the GNU C Library; if not, see
  43464. + <http://www.gnu.org/licenses/>. */
  43465. #include <stdlib.h>
  43466. diff -Nur uClibc-0.9.33.2/libc/stdlib/erand48_r.c uClibc-git/libc/stdlib/erand48_r.c
  43467. --- uClibc-0.9.33.2/libc/stdlib/erand48_r.c 2012-05-15 09:20:09.000000000 +0200
  43468. +++ uClibc-git/libc/stdlib/erand48_r.c 2014-07-25 20:36:06.065330804 +0200
  43469. @@ -13,9 +13,8 @@
  43470. Lesser General Public License for more details.
  43471. You should have received a copy of the GNU Lesser General Public
  43472. - License along with the GNU C Library; if not, write to the Free
  43473. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  43474. - 02111-1307 USA. */
  43475. + License along with the GNU C Library; if not, see
  43476. + <http://www.gnu.org/licenses/>. */
  43477. #include <ieee754.h>
  43478. #include <stdlib.h>
  43479. diff -Nur uClibc-0.9.33.2/libc/stdlib/getpt.c uClibc-git/libc/stdlib/getpt.c
  43480. --- uClibc-0.9.33.2/libc/stdlib/getpt.c 2012-05-15 09:20:09.000000000 +0200
  43481. +++ uClibc-git/libc/stdlib/getpt.c 2014-07-25 20:36:06.065330804 +0200
  43482. @@ -13,9 +13,8 @@
  43483. Lesser General Public License for more details.
  43484. You should have received a copy of the GNU Lesser General Public
  43485. - License along with the GNU C Library; if not, write to the Free
  43486. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  43487. - 02111-1307 USA. */
  43488. + License along with the GNU C Library; if not, see
  43489. + <http://www.gnu.org/licenses/>. */
  43490. #include <errno.h>
  43491. #include <fcntl.h>
  43492. @@ -43,12 +42,12 @@
  43493. #if !defined __UNIX98PTY_ONLY__ && defined __UCLIBC_HAS_GETPT__
  43494. /* Prototype for function that opens BSD-style master pseudo-terminals. */
  43495. -extern int __bsd_getpt (void) attribute_hidden;
  43496. +static __inline__ int __bsd_getpt (void);
  43497. #endif
  43498. /* Open a master pseudo terminal and return its file descriptor. */
  43499. -int
  43500. -posix_openpt (int flags)
  43501. +static int
  43502. +__posix_openpt (int flags)
  43503. {
  43504. #define have_no_dev_ptmx (1<<0)
  43505. #define devpts_mounted (1<<1)
  43506. @@ -112,14 +111,14 @@
  43507. #endif
  43508. return -1;
  43509. }
  43510. -libc_hidden_def(posix_openpt)
  43511. +strong_alias(__posix_openpt,posix_openpt)
  43512. #undef have_no_dev_ptmx
  43513. #undef devpts_mounted
  43514. #if defined __USE_GNU && defined __UCLIBC_HAS_GETPT__
  43515. int getpt (void)
  43516. {
  43517. - return posix_openpt(O_RDWR);
  43518. + return __posix_openpt(O_RDWR);
  43519. }
  43520. #if !defined __UNIX98PTY_ONLY__ && defined __UCLIBC_HAS_GETPT__
  43521. diff -Nur uClibc-0.9.33.2/libc/stdlib/grantpt.c uClibc-git/libc/stdlib/grantpt.c
  43522. --- uClibc-0.9.33.2/libc/stdlib/grantpt.c 2012-05-15 09:20:09.000000000 +0200
  43523. +++ uClibc-git/libc/stdlib/grantpt.c 2014-07-25 20:36:06.065330804 +0200
  43524. @@ -13,8 +13,7 @@
  43525. You should have received a copy of the GNU Library General Public
  43526. License along with the GNU C Library; see the file COPYING.LIB. If not,
  43527. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  43528. - Boston, MA 02111-1307, USA. */
  43529. + see <http://www.gnu.org/licenses/>. */
  43530. #include <limits.h>
  43531. #include <stdlib.h>
  43532. @@ -33,25 +32,18 @@
  43533. /* Prototype for function that changes ownership and access permission
  43534. for slave pseudo terminals that do not live on a `devpts'
  43535. filesystem. */
  43536. -int __unix_grantpt (int fd);
  43537. +static int __unix_grantpt (int fd);
  43538. /* Prototype for private function that gets the name of the slave
  43539. pseudo terminal in a safe way. */
  43540. static int pts_name (int fd, char **pts, size_t buf_len);
  43541. extern __typeof(statfs) __libc_statfs;
  43542. -#endif
  43543. /* Change the ownership and access permission of the slave pseudo
  43544. terminal associated with the master pseudo terminal specified
  43545. by FD. */
  43546. -int
  43547. -#if !defined __ASSUME_DEVPTS__
  43548. -grantpt (int fd)
  43549. -#else
  43550. -grantpt (attribute_unused int fd)
  43551. -#endif
  43552. +int grantpt (int fd)
  43553. {
  43554. -#if !defined __ASSUME_DEVPTS__
  43555. struct statfs fsbuf;
  43556. char _buf[PATH_MAX];
  43557. char *buf = _buf;
  43558. @@ -65,12 +57,19 @@
  43559. /* If the slave pseudo terminal lives on a `devpts' filesystem, the
  43560. ownership and access permission are already set. */
  43561. if (fsbuf.f_type != DEVPTS_SUPER_MAGIC && fsbuf.f_type != DEVFS_SUPER_MAGIC)
  43562. - return __unix_grantpt (fd);
  43563. -#endif
  43564. + return __unix_grantpt (fd);
  43565. +
  43566. return 0;
  43567. }
  43568. -#if !defined __ASSUME_DEVPTS__
  43569. # define grantpt __unix_grantpt
  43570. # include "unix_grantpt.c"
  43571. +
  43572. +#else
  43573. +
  43574. +int grantpt (attribute_unused int fd)
  43575. +{
  43576. + return 0;
  43577. +}
  43578. +
  43579. #endif
  43580. diff -Nur uClibc-0.9.33.2/libc/stdlib/jrand48.c uClibc-git/libc/stdlib/jrand48.c
  43581. --- uClibc-0.9.33.2/libc/stdlib/jrand48.c 2012-05-15 09:20:09.000000000 +0200
  43582. +++ uClibc-git/libc/stdlib/jrand48.c 2014-07-25 20:36:06.065330804 +0200
  43583. @@ -13,9 +13,8 @@
  43584. Lesser General Public License for more details.
  43585. You should have received a copy of the GNU Lesser General Public
  43586. - License along with the GNU C Library; if not, write to the Free
  43587. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  43588. - 02111-1307 USA. */
  43589. + License along with the GNU C Library; if not, see
  43590. + <http://www.gnu.org/licenses/>. */
  43591. #include <stdlib.h>
  43592. diff -Nur uClibc-0.9.33.2/libc/stdlib/jrand48_r.c uClibc-git/libc/stdlib/jrand48_r.c
  43593. --- uClibc-0.9.33.2/libc/stdlib/jrand48_r.c 2012-05-15 09:20:09.000000000 +0200
  43594. +++ uClibc-git/libc/stdlib/jrand48_r.c 2014-07-25 20:36:06.065330804 +0200
  43595. @@ -13,9 +13,8 @@
  43596. Lesser General Public License for more details.
  43597. You should have received a copy of the GNU Lesser General Public
  43598. - License along with the GNU C Library; if not, write to the Free
  43599. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  43600. - 02111-1307 USA. */
  43601. + License along with the GNU C Library; if not, see
  43602. + <http://www.gnu.org/licenses/>. */
  43603. #include <stdlib.h>
  43604. diff -Nur uClibc-0.9.33.2/libc/stdlib/l64a.c uClibc-git/libc/stdlib/l64a.c
  43605. --- uClibc-0.9.33.2/libc/stdlib/l64a.c 2012-05-15 09:20:09.000000000 +0200
  43606. +++ uClibc-git/libc/stdlib/l64a.c 2014-07-25 20:36:06.065330804 +0200
  43607. @@ -13,9 +13,8 @@
  43608. Lesser General Public License for more details.
  43609. You should have received a copy of the GNU Lesser General Public
  43610. - License along with the GNU C Library; if not, write to the Free
  43611. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  43612. - 02111-1307 USA. */
  43613. + License along with the GNU C Library; if not, see
  43614. + <http://www.gnu.org/licenses/>. */
  43615. #include <stdlib.h>
  43616. diff -Nur uClibc-0.9.33.2/libc/stdlib/lcong48.c uClibc-git/libc/stdlib/lcong48.c
  43617. --- uClibc-0.9.33.2/libc/stdlib/lcong48.c 1970-01-01 01:00:00.000000000 +0100
  43618. +++ uClibc-git/libc/stdlib/lcong48.c 2014-07-25 20:36:06.065330804 +0200
  43619. @@ -0,0 +1,29 @@
  43620. +/* vi: set sw=4 ts=4: */
  43621. +/* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */
  43622. +
  43623. +#include <features.h>
  43624. +
  43625. +#if defined __USE_SVID || defined __USE_XOPEN
  43626. +#include <stdint.h>
  43627. +#include <stdlib.h>
  43628. +#include <string.h>
  43629. +
  43630. +static int __lcong48_r (unsigned short int param[7], struct drand48_data *buffer)
  43631. +{
  43632. + /* Store the given values. */
  43633. + memcpy (buffer->__x, &param[0], sizeof (buffer->__x));
  43634. + buffer->__a = ((uint64_t) param[5] << 32 | (uint32_t) param[4] << 16 | param[3]);
  43635. + buffer->__c = param[6];
  43636. + buffer->__init = 1;
  43637. +
  43638. + return 0;
  43639. +}
  43640. +# ifdef __USE_MISC
  43641. +strong_alias(__lcong48_r,lcong48_r)
  43642. +# endif
  43643. +
  43644. +void lcong48 (unsigned short int param[7])
  43645. +{
  43646. + (void) __lcong48_r (param, &__libc_drand48_data);
  43647. +}
  43648. +#endif
  43649. diff -Nur uClibc-0.9.33.2/libc/stdlib/ldiv.c uClibc-git/libc/stdlib/ldiv.c
  43650. --- uClibc-0.9.33.2/libc/stdlib/ldiv.c 2012-05-15 09:20:09.000000000 +0200
  43651. +++ uClibc-git/libc/stdlib/ldiv.c 2014-07-25 20:36:06.065330804 +0200
  43652. @@ -13,9 +13,8 @@
  43653. Lesser General Public License for more details.
  43654. You should have received a copy of the GNU Lesser General Public
  43655. - License along with the GNU C Library; if not, write to the Free
  43656. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  43657. - 02111-1307 USA. */
  43658. + License along with the GNU C Library; if not, see
  43659. + <http://www.gnu.org/licenses/>. */
  43660. #include <features.h>
  43661. #include <stdlib.h>
  43662. diff -Nur uClibc-0.9.33.2/libc/stdlib/lldiv.c uClibc-git/libc/stdlib/lldiv.c
  43663. --- uClibc-0.9.33.2/libc/stdlib/lldiv.c 2012-05-15 09:20:09.000000000 +0200
  43664. +++ uClibc-git/libc/stdlib/lldiv.c 2014-07-25 20:36:06.065330804 +0200
  43665. @@ -13,9 +13,8 @@
  43666. Lesser General Public License for more details.
  43667. You should have received a copy of the GNU Lesser General Public
  43668. - License along with the GNU C Library; if not, write to the Free
  43669. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  43670. - 02111-1307 USA. */
  43671. + License along with the GNU C Library; if not, see
  43672. + <http://www.gnu.org/licenses/>. */
  43673. #include <features.h>
  43674. #include <stdlib.h>
  43675. diff -Nur uClibc-0.9.33.2/libc/stdlib/lrand48.c uClibc-git/libc/stdlib/lrand48.c
  43676. --- uClibc-0.9.33.2/libc/stdlib/lrand48.c 2012-05-15 09:20:09.000000000 +0200
  43677. +++ uClibc-git/libc/stdlib/lrand48.c 2014-07-25 20:36:06.065330804 +0200
  43678. @@ -13,9 +13,8 @@
  43679. Lesser General Public License for more details.
  43680. You should have received a copy of the GNU Lesser General Public
  43681. - License along with the GNU C Library; if not, write to the Free
  43682. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  43683. - 02111-1307 USA. */
  43684. + License along with the GNU C Library; if not, see
  43685. + <http://www.gnu.org/licenses/>. */
  43686. #include <stdlib.h>
  43687. diff -Nur uClibc-0.9.33.2/libc/stdlib/lrand48_r.c uClibc-git/libc/stdlib/lrand48_r.c
  43688. --- uClibc-0.9.33.2/libc/stdlib/lrand48_r.c 2012-05-15 09:20:09.000000000 +0200
  43689. +++ uClibc-git/libc/stdlib/lrand48_r.c 2014-07-25 20:36:06.065330804 +0200
  43690. @@ -13,9 +13,8 @@
  43691. Lesser General Public License for more details.
  43692. You should have received a copy of the GNU Lesser General Public
  43693. - License along with the GNU C Library; if not, write to the Free
  43694. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  43695. - 02111-1307 USA. */
  43696. + License along with the GNU C Library; if not, see
  43697. + <http://www.gnu.org/licenses/>. */
  43698. #include <stdlib.h>
  43699. diff -Nur uClibc-0.9.33.2/libc/stdlib/Makefile.in uClibc-git/libc/stdlib/Makefile.in
  43700. --- uClibc-0.9.33.2/libc/stdlib/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  43701. +++ uClibc-git/libc/stdlib/Makefile.in 2014-07-25 20:36:06.061330784 +0200
  43702. @@ -12,16 +12,17 @@
  43703. include $(top_srcdir)libc/stdlib/malloc-standard/Makefile.in
  43704. CSRC-y := \
  43705. - abort.c getenv.c mkdtemp.c realpath.c canonicalize.c mkstemp.c \
  43706. + abort.c getenv.c mkdtemp.c realpath.c canonicalize.c mkstemp.c mkostemp.c \
  43707. rand.c random.c random_r.c setenv.c div.c ldiv.c lldiv.c \
  43708. getpt.c drand48-iter.c jrand48.c \
  43709. - jrand48_r.c lrand48.c lrand48_r.c mrand48.c mrand48_r.c nrand48.c \
  43710. + jrand48_r.c lcong48.c lrand48.c lrand48_r.c mrand48.c mrand48_r.c nrand48.c \
  43711. nrand48_r.c rand_r.c srand48.c srand48_r.c seed48.c seed48_r.c \
  43712. - valloc.c a64l.c l64a.c __uc_malloc.c
  43713. + a64l.c l64a.c __uc_malloc.c
  43714. +CSRC-$(UCLIBC_SUSV2_LEGACY) += valloc.c
  43715. CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_memalign.c
  43716. CSRC-$(UCLIBC_HAS_PTY) += grantpt.c unlockpt.c ptsname.c
  43717. CSRC-$(UCLIBC_HAS_ARC4RANDOM) += arc4random.c
  43718. -CSRC-$(UCLIBC_HAS_LFS) += mkstemp64.c
  43719. +CSRC-$(UCLIBC_HAS_LFS) += mkstemp64.c mkostemp64.c
  43720. CSRC-$(UCLIBC_HAS_FLOATS) += drand48.c drand48_r.c erand48.c erand48_r.c
  43721. CSRC-$(if $(findstring yy,$(UCLIBC_HAS_FLOATS)$(UCLIBC_SUSV3_LEGACY)),y) += \
  43722. gcvt.c
  43723. @@ -33,7 +34,7 @@
  43724. # multi source stdlib.c
  43725. CSRC-y += abs.c labs.c atoi.c atol.c strtol.c strtoul.c _stdlib_strto_l.c \
  43726. - qsort.c qsort_r.c bsearch.c \
  43727. + qsort.c qsort_r.c bsearch.c rpmatch.c \
  43728. llabs.c atoll.c strtoll.c strtoull.c _stdlib_strto_ll.c
  43729. # (aliases) strtoq.o strtouq.o
  43730. CSRC-$(UCLIBC_HAS_FLOATS) += atof.c
  43731. diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc/calloc.c uClibc-git/libc/stdlib/malloc/calloc.c
  43732. --- uClibc-0.9.33.2/libc/stdlib/malloc/calloc.c 2012-05-15 09:20:09.000000000 +0200
  43733. +++ uClibc-git/libc/stdlib/malloc/calloc.c 2014-07-25 20:36:06.109331035 +0200
  43734. @@ -14,8 +14,8 @@
  43735. * for more details.
  43736. *
  43737. * You should have received a copy of the GNU Library General Public License
  43738. - * along with this program; if not, write to the Free Software Foundation,
  43739. - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  43740. + * along with this program; see the file COPYING.LIB. If not, see
  43741. + * <http://www.gnu.org/licenses/>.
  43742. */
  43743. #include <stdlib.h>
  43744. diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc/free.c uClibc-git/libc/stdlib/malloc/free.c
  43745. --- uClibc-0.9.33.2/libc/stdlib/malloc/free.c 2012-05-15 09:20:09.000000000 +0200
  43746. +++ uClibc-git/libc/stdlib/malloc/free.c 2014-07-25 20:36:06.109331035 +0200
  43747. @@ -28,7 +28,7 @@
  43748. static void
  43749. __free_to_heap (void *mem, struct heap_free_area **heap
  43750. #ifdef HEAP_USE_LOCKING
  43751. - , malloc_mutex_t *heap_lock
  43752. + , __UCLIBC_MUTEX_TYPE *heap_lock
  43753. #endif
  43754. )
  43755. {
  43756. diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc/heap.h uClibc-git/libc/stdlib/malloc/heap.h
  43757. --- uClibc-0.9.33.2/libc/stdlib/malloc/heap.h 2012-05-15 09:20:09.000000000 +0200
  43758. +++ uClibc-git/libc/stdlib/malloc/heap.h 2014-07-25 20:36:06.109331035 +0200
  43759. @@ -13,18 +13,13 @@
  43760. #include <features.h>
  43761. -
  43762. -/* On multi-threaded systems, the heap includes a lock. */
  43763. +#include <bits/uClibc_mutex.h>
  43764. #ifdef __UCLIBC_HAS_THREADS__
  43765. -# include <bits/uClibc_mutex.h>
  43766. # define HEAP_USE_LOCKING
  43767. -# define __heap_lock(heap_lock) __UCLIBC_MUTEX_LOCK_CANCEL_UNSAFE(*(heap_lock))
  43768. -# define __heap_unlock(heap_lock) __UCLIBC_MUTEX_UNLOCK_CANCEL_UNSAFE(*(heap_lock))
  43769. -#else
  43770. -# define __heap_lock(heap_lock)
  43771. -# define __heap_unlock(heap_lock)
  43772. #endif
  43773. +#define __heap_lock(heap_lock) __UCLIBC_MUTEX_LOCK_CANCEL_UNSAFE(*(heap_lock))
  43774. +#define __heap_unlock(heap_lock) __UCLIBC_MUTEX_UNLOCK_CANCEL_UNSAFE(*(heap_lock))
  43775. /* The heap allocates in multiples of, and aligned to, HEAP_GRANULARITY.
  43776. HEAP_GRANULARITY must be a power of 2. Malloc depends on this being the
  43777. @@ -35,11 +30,9 @@
  43778. -/* The HEAP_INIT macro can be used as a static initializer for a heap
  43779. - variable. The HEAP_INIT_WITH_FA variant is used to initialize a heap
  43780. +/* The HEAP_INIT_WITH_FA variant is used to initialize a heap
  43781. with an initial static free-area; its argument FA should be declared
  43782. using HEAP_DECLARE_STATIC_FREE_AREA. */
  43783. -# define HEAP_INIT 0
  43784. # define HEAP_INIT_WITH_FA(fa) &fa._fa
  43785. /* A free-list area `header'. These are actually stored at the _ends_ of
  43786. @@ -92,34 +85,21 @@
  43787. #define HEAP_MIN_FREE_AREA_SIZE \
  43788. HEAP_ADJUST_SIZE (sizeof (struct heap_free_area) + 32)
  43789. -
  43790. -/* branch-prediction macros; they may already be defined by libc. */
  43791. -#ifndef likely
  43792. -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
  43793. -#define likely(cond) __builtin_expect(!!(int)(cond), 1)
  43794. -#define unlikely(cond) __builtin_expect((int)(cond), 0)
  43795. -#else
  43796. -#define likely(cond) (cond)
  43797. -#define unlikely(cond) (cond)
  43798. -#endif
  43799. -#endif /* !likely */
  43800. -
  43801. -
  43802. /* Define HEAP_DEBUGGING to cause the heap routines to emit debugging info
  43803. to stderr when the variable __heap_debug is set to true. */
  43804. #ifdef HEAP_DEBUGGING
  43805. -extern int __heap_debug;
  43806. +extern int __heap_debug attribute_hidden;
  43807. #define HEAP_DEBUG(heap, str) (__heap_debug ? __heap_dump (heap, str) : 0)
  43808. #else
  43809. #define HEAP_DEBUG(heap, str) (void)0
  43810. #endif
  43811. /* Output a text representation of HEAP to stderr, labelling it with STR. */
  43812. -extern void __heap_dump (struct heap_free_area *heap, const char *str);
  43813. +extern void __heap_dump (struct heap_free_area *heap, const char *str) attribute_hidden;
  43814. /* Do some consistency checks on HEAP. If they fail, output an error
  43815. message to stderr, and exit. STR is printed with the failure message. */
  43816. -extern void __heap_check (struct heap_free_area *heap, const char *str);
  43817. +extern void __heap_check (struct heap_free_area *heap, const char *str) attribute_hidden;
  43818. /* Delete the free-area FA from HEAP. */
  43819. @@ -216,16 +196,16 @@
  43820. /* Allocate and return a block at least *SIZE bytes long from HEAP.
  43821. *SIZE is adjusted to reflect the actual amount allocated (which may be
  43822. greater than requested). */
  43823. -extern void *__heap_alloc (struct heap_free_area **heap, size_t *size);
  43824. +extern void *__heap_alloc (struct heap_free_area **heap, size_t *size) attribute_hidden;
  43825. /* Allocate SIZE bytes at address MEM in HEAP. Return the actual size
  43826. allocated, or 0 if we failed. */
  43827. -extern size_t __heap_alloc_at (struct heap_free_area **heap, void *mem, size_t size);
  43828. +extern size_t __heap_alloc_at (struct heap_free_area **heap, void *mem, size_t size) attribute_hidden;
  43829. /* Return the memory area MEM of size SIZE to HEAP.
  43830. Returns the heap free area into which the memory was placed. */
  43831. extern struct heap_free_area *__heap_free (struct heap_free_area **heap,
  43832. - void *mem, size_t size);
  43833. + void *mem, size_t size) attribute_hidden;
  43834. /* Return true if HEAP contains absolutely no memory. */
  43835. #define __heap_is_empty(heap) (! (heap))
  43836. diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc/Makefile.in uClibc-git/libc/stdlib/malloc/Makefile.in
  43837. --- uClibc-0.9.33.2/libc/stdlib/malloc/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  43838. +++ uClibc-git/libc/stdlib/malloc/Makefile.in 2014-07-25 20:36:06.109331035 +0200
  43839. @@ -9,12 +9,12 @@
  43840. subdirs += libc/stdlib/malloc
  43841. -CSRC := malloc.c calloc.c free.c realloc.c memalign.c \
  43842. +CSRC-y := malloc.c calloc.c free.c realloc.c memalign.c \
  43843. heap_alloc.c heap_alloc_at.c heap_free.c
  43844. # Turn on malloc debugging if requested
  43845. +CSRC-$(UCLIBC_MALLOC_DEBUGGING) += malloc_debug.c heap_debug.c
  43846. ifeq ($(UCLIBC_MALLOC_DEBUGGING),y)
  43847. -CSRC += malloc_debug.c heap_debug.c
  43848. CFLAGS += -DMALLOC_DEBUGGING -DHEAP_DEBUGGING
  43849. ifeq ($(UCLIBC_UCLINUX_BROKEN_MUNMAP),y)
  43850. CFLAGS += -DMALLOC_MMB_DEBUGGING
  43851. @@ -24,8 +24,8 @@
  43852. STDLIB_MALLOC_DIR := $(top_srcdir)libc/stdlib/malloc
  43853. STDLIB_MALLOC_OUT := $(top_builddir)libc/stdlib/malloc
  43854. -STDLIB_MALLOC_SRC := $(patsubst %.c,$(STDLIB_MALLOC_DIR)/%.c,$(CSRC))
  43855. -STDLIB_MALLOC_OBJ := $(patsubst %.c,$(STDLIB_MALLOC_OUT)/%.o,$(CSRC))
  43856. +STDLIB_MALLOC_SRC := $(patsubst %.c,$(STDLIB_MALLOC_DIR)/%.c,$(CSRC-y))
  43857. +STDLIB_MALLOC_OBJ := $(patsubst %.c,$(STDLIB_MALLOC_OUT)/%.o,$(CSRC-y))
  43858. libc-$(MALLOC) += $(STDLIB_MALLOC_OBJ)
  43859. diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc/malloc.c uClibc-git/libc/stdlib/malloc/malloc.c
  43860. --- uClibc-0.9.33.2/libc/stdlib/malloc/malloc.c 2012-05-15 09:20:09.000000000 +0200
  43861. +++ uClibc-git/libc/stdlib/malloc/malloc.c 2014-07-25 20:36:06.109331035 +0200
  43862. @@ -26,12 +26,12 @@
  43863. HEAP_DECLARE_STATIC_FREE_AREA (initial_fa, 256);
  43864. struct heap_free_area *__malloc_heap = HEAP_INIT_WITH_FA (initial_fa);
  43865. #ifdef HEAP_USE_LOCKING
  43866. -malloc_mutex_t __malloc_heap_lock = PTHREAD_MUTEX_INITIALIZER;
  43867. +__UCLIBC_MUTEX_INIT(__malloc_heap_lock,PTHREAD_MUTEX_INITIALIZER);
  43868. #endif
  43869. #if defined(MALLOC_USE_LOCKING) && defined(MALLOC_USE_SBRK)
  43870. /* A lock protecting our use of sbrk. */
  43871. -malloc_mutex_t __malloc_sbrk_lock;
  43872. +__UCLIBC_MUTEX(__malloc_sbrk_lock);
  43873. #endif /* MALLOC_USE_LOCKING && MALLOC_USE_SBRK */
  43874. @@ -46,7 +46,7 @@
  43875. HEAP_DECLARE_STATIC_FREE_AREA (initial_mmb_fa, 48); /* enough for 3 mmbs */
  43876. struct heap_free_area *__malloc_mmb_heap = HEAP_INIT_WITH_FA (initial_mmb_fa);
  43877. #ifdef HEAP_USE_LOCKING
  43878. -malloc_mutex_t __malloc_mmb_heap_lock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
  43879. +__UCLIBC_MUTEX_INIT(__malloc_mmb_heap_lock,PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP);
  43880. #endif
  43881. #endif /* __UCLIBC_UCLINUX_BROKEN_MUNMAP__ */
  43882. @@ -59,7 +59,7 @@
  43883. static void *
  43884. __malloc_from_heap (size_t size, struct heap_free_area **heap
  43885. #ifdef HEAP_USE_LOCKING
  43886. - , malloc_mutex_t *heap_lock
  43887. + , __UCLIBC_MUTEX_TYPE *heap_lock
  43888. #endif
  43889. )
  43890. {
  43891. @@ -124,7 +124,7 @@
  43892. MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
  43893. #else
  43894. block = mmap ((void *)0, block_size, PROT_READ | PROT_WRITE,
  43895. - MAP_SHARED | MAP_ANONYMOUS | MAP_UNINITIALIZE, 0, 0);
  43896. + MAP_SHARED | MAP_ANONYMOUS | MAP_UNINITIALIZED, 0, 0);
  43897. #endif
  43898. #endif /* MALLOC_USE_SBRK */
  43899. diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc/malloc.h uClibc-git/libc/stdlib/malloc/malloc.h
  43900. --- uClibc-0.9.33.2/libc/stdlib/malloc/malloc.h 2012-05-15 09:20:09.000000000 +0200
  43901. +++ uClibc-git/libc/stdlib/malloc/malloc.h 2014-07-25 20:36:06.109331035 +0200
  43902. @@ -20,8 +20,7 @@
  43903. (__alignof__ (double) > sizeof (size_t) ? __alignof__ (double) : sizeof (size_t))
  43904. /* The system pagesize... */
  43905. -extern size_t __pagesize;
  43906. -#define MALLOC_PAGE_SIZE __pagesize
  43907. +#define MALLOC_PAGE_SIZE sysconf(_SC_PAGESIZE)
  43908. /* The minimum size of block we request from the the system to extend the
  43909. heap for small allocations (we may request a bigger block if necessary to
  43910. @@ -128,69 +127,46 @@
  43911. /* Return the size of a malloc allocation, given the user address. */
  43912. #define MALLOC_SIZE(addr) (*(size_t *)MALLOC_BASE(addr))
  43913. +#include <bits/uClibc_mutex.h>
  43914. -/* Locking for multithreaded apps. */
  43915. #ifdef __UCLIBC_HAS_THREADS__
  43916. -
  43917. -# include <bits/uClibc_mutex.h>
  43918. -
  43919. # define MALLOC_USE_LOCKING
  43920. +#endif
  43921. -typedef __UCLIBC_MUTEX_TYPE malloc_mutex_t;
  43922. -# define MALLOC_MUTEX_INIT __UCLIBC_MUTEX_INITIALIZER
  43923. -
  43924. -# ifdef MALLOC_USE_SBRK
  43925. +#ifdef MALLOC_USE_SBRK
  43926. /* This lock is used to serialize uses of the `sbrk' function (in both
  43927. malloc and free, sbrk may be used several times in succession, and
  43928. things will break if these multiple calls are interleaved with another
  43929. thread's use of sbrk!). */
  43930. -extern malloc_mutex_t __malloc_sbrk_lock;
  43931. +__UCLIBC_MUTEX_EXTERN(__malloc_sbrk_lock) attribute_hidden;
  43932. # define __malloc_lock_sbrk() __UCLIBC_MUTEX_LOCK_CANCEL_UNSAFE (__malloc_sbrk_lock)
  43933. # define __malloc_unlock_sbrk() __UCLIBC_MUTEX_UNLOCK_CANCEL_UNSAFE (__malloc_sbrk_lock)
  43934. -# endif /* MALLOC_USE_SBRK */
  43935. -
  43936. -#else /* !__UCLIBC_HAS_THREADS__ */
  43937. -
  43938. -/* Without threads, mutex operations are a nop. */
  43939. +#else
  43940. # define __malloc_lock_sbrk() (void)0
  43941. # define __malloc_unlock_sbrk() (void)0
  43942. -
  43943. -#endif /* __UCLIBC_HAS_THREADS__ */
  43944. -
  43945. -
  43946. -/* branch-prediction macros; they may already be defined by libc. */
  43947. -#ifndef likely
  43948. -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
  43949. -#define likely(cond) __builtin_expect(!!(int)(cond), 1)
  43950. -#define unlikely(cond) __builtin_expect((int)(cond), 0)
  43951. -#else
  43952. -#define likely(cond) (cond)
  43953. -#define unlikely(cond) (cond)
  43954. -#endif
  43955. -#endif /* !likely */
  43956. -
  43957. +#endif /* MALLOC_USE_SBRK */
  43958. /* Define MALLOC_DEBUGGING to cause malloc to emit debugging info to stderr
  43959. when the variable __malloc_debug is set to true. */
  43960. #ifdef MALLOC_DEBUGGING
  43961. -extern void __malloc_debug_init (void);
  43962. +extern void __malloc_debug_init (void) attribute_hidden;
  43963. /* The number of spaces in a malloc debug indent level. */
  43964. #define MALLOC_DEBUG_INDENT_SIZE 3
  43965. -extern int __malloc_debug, __malloc_check;
  43966. +extern int __malloc_debug attribute_hidden, __malloc_check attribute_hidden;
  43967. # define MALLOC_DEBUG(indent, fmt, args...) \
  43968. (__malloc_debug ? __malloc_debug_printf (indent, fmt , ##args) : 0)
  43969. # define MALLOC_DEBUG_INDENT(indent) \
  43970. (__malloc_debug ? __malloc_debug_indent (indent) : 0)
  43971. -extern int __malloc_debug_cur_indent;
  43972. +extern int __malloc_debug_cur_indent attribute_hidden;
  43973. /* Print FMT and args indented at the current debug print level, followed
  43974. by a newline, and change the level by INDENT. */
  43975. -extern void __malloc_debug_printf (int indent, const char *fmt, ...);
  43976. +extern void __malloc_debug_printf (int indent, const char *fmt, ...) attribute_hidden;
  43977. /* Change the current debug print level by INDENT, and return the value. */
  43978. #define __malloc_debug_indent(indent) (__malloc_debug_cur_indent += indent)
  43979. @@ -220,10 +196,18 @@
  43980. /* The malloc heap. */
  43981. -extern struct heap_free_area *__malloc_heap;
  43982. +extern struct heap_free_area *__malloc_heap attribute_hidden;
  43983. #ifdef __UCLIBC_HAS_THREADS__
  43984. -extern malloc_mutex_t __malloc_heap_lock;
  43985. -#ifdef __UCLIBC_UCLINUX_BROKEN_MUNMAP__
  43986. -extern malloc_mutex_t __malloc_mmb_heap_lock;
  43987. -#endif
  43988. +__UCLIBC_MUTEX_EXTERN(__malloc_heap_lock)
  43989. +# ifndef __LINUXTHREADS_OLD__
  43990. + attribute_hidden
  43991. +# endif
  43992. + ;
  43993. +# ifdef __UCLIBC_UCLINUX_BROKEN_MUNMAP__
  43994. +__UCLIBC_MUTEX_EXTERN(__malloc_mmb_heap_lock)
  43995. +# ifndef __LINUXTHREADS_OLD__
  43996. + attribute_hidden
  43997. +# endif
  43998. + ;
  43999. +# endif
  44000. #endif
  44001. diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc/memalign.c uClibc-git/libc/stdlib/malloc/memalign.c
  44002. --- uClibc-0.9.33.2/libc/stdlib/malloc/memalign.c 2012-05-15 09:20:09.000000000 +0200
  44003. +++ uClibc-git/libc/stdlib/malloc/memalign.c 2014-07-25 20:36:06.109331035 +0200
  44004. @@ -14,7 +14,6 @@
  44005. #include <stdlib.h>
  44006. #include <unistd.h>
  44007. #include <sys/mman.h>
  44008. -#include <sys/param.h> /* MAX */
  44009. #include "malloc.h"
  44010. #include "heap.h"
  44011. @@ -30,6 +29,8 @@
  44012. */
  44013. void *memalign (size_t alignment, size_t size);
  44014. +/* XXX shadow outer malloc.h */
  44015. +libc_hidden_proto(memalign)
  44016. void *
  44017. memalign (size_t alignment, size_t size)
  44018. {
  44019. @@ -92,3 +93,4 @@
  44020. return MALLOC_SETUP (base, end_addr - (unsigned long)base);
  44021. }
  44022. +libc_hidden_def(memalign)
  44023. diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc-simple/alloc.c uClibc-git/libc/stdlib/malloc-simple/alloc.c
  44024. --- uClibc-0.9.33.2/libc/stdlib/malloc-simple/alloc.c 2012-05-15 09:20:09.000000000 +0200
  44025. +++ uClibc-git/libc/stdlib/malloc-simple/alloc.c 2014-07-25 20:36:06.081330888 +0200
  44026. @@ -17,6 +17,7 @@
  44027. #include <sys/mman.h>
  44028. #include <malloc.h>
  44029. +extern int weak_function __libc_free_aligned(void *ptr) attribute_hidden;
  44030. #ifdef L_malloc
  44031. void *malloc(size_t size)
  44032. @@ -36,7 +37,7 @@
  44033. #ifdef __ARCH_USE_MMU__
  44034. # define MMAP_FLAGS MAP_PRIVATE | MAP_ANONYMOUS
  44035. #else
  44036. -# define MMAP_FLAGS MAP_SHARED | MAP_ANONYMOUS | MAP_UNINITIALIZE
  44037. +# define MMAP_FLAGS MAP_SHARED | MAP_ANONYMOUS | MAP_UNINITIALIZED
  44038. #endif
  44039. result = mmap((void *) 0, size + sizeof(size_t), PROT_READ | PROT_WRITE,
  44040. @@ -63,7 +64,7 @@
  44041. result = malloc(size);
  44042. #ifndef __ARCH_USE_MMU__
  44043. - /* mmap'd with MAP_UNINITIALIZE, we have to blank memory ourselves */
  44044. + /* mmap'd with MAP_UNINITIALIZED, we have to blank memory ourselves */
  44045. if (result != NULL) {
  44046. memset(result, 0, size);
  44047. }
  44048. @@ -95,7 +96,6 @@
  44049. #endif
  44050. #ifdef L_free
  44051. -extern int weak_function __libc_free_aligned(void *ptr);
  44052. void free(void *ptr)
  44053. {
  44054. if (unlikely(ptr == NULL))
  44055. @@ -123,7 +123,7 @@
  44056. __ptr_t aligned; /* The address that memaligned returned. */
  44057. __ptr_t exact; /* The address that malloc returned. */
  44058. };
  44059. -struct alignlist *_aligned_blocks;
  44060. +static struct alignlist *_aligned_blocks;
  44061. /* Return memory to the heap. */
  44062. int __libc_free_aligned(void *ptr)
  44063. @@ -182,4 +182,5 @@
  44064. return result;
  44065. }
  44066. +libc_hidden_def(memalign)
  44067. #endif
  44068. diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc-simple/Makefile.in uClibc-git/libc/stdlib/malloc-simple/Makefile.in
  44069. --- uClibc-0.9.33.2/libc/stdlib/malloc-simple/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  44070. +++ uClibc-git/libc/stdlib/malloc-simple/Makefile.in 2014-07-25 20:36:06.081330888 +0200
  44071. @@ -10,11 +10,13 @@
  44072. STDLIB_MALLOC_SIMPLE_DIR := $(top_srcdir)libc/stdlib/malloc-simple
  44073. STDLIB_MALLOC_SIMPLE_OUT := $(top_builddir)libc/stdlib/malloc-simple
  44074. -CSRC := $(notdir $(wildcard $(STDLIB_MALLOC_SIMPLE_DIR)/*.c))
  44075. -CSRC := $(filter-out alloc.c,$(CSRC))
  44076. +CSRC-y := $(notdir $(wildcard $(STDLIB_MALLOC_SIMPLE_DIR)/*.c))
  44077. +# multi source alloc.c
  44078. +CSRC- := alloc.c
  44079. +CSRC-y := $(filter-out $(CSRC-),$(CSRC-y))
  44080. -STDLIB_MALLOC_SIMPLE_SRC := $(patsubst %.c,$(STDLIB_MALLOC_SIMPLE_DIR)/%.c,$(CSRC))
  44081. -STDLIB_MALLOC_SIMPLE_OBJ := $(patsubst %.c,$(STDLIB_MALLOC_SIMPLE_OUT)/%.o,$(CSRC))
  44082. +STDLIB_MALLOC_SIMPLE_SRC := $(patsubst %.c,$(STDLIB_MALLOC_SIMPLE_DIR)/%.c,$(CSRC-y))
  44083. +STDLIB_MALLOC_SIMPLE_OBJ := $(patsubst %.c,$(STDLIB_MALLOC_SIMPLE_OUT)/%.o,$(CSRC-y))
  44084. libc-$(MALLOC_SIMPLE) += $(STDLIB_MALLOC_SIMPLE_OBJ)
  44085. diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc-standard/Makefile.in uClibc-git/libc/stdlib/malloc-standard/Makefile.in
  44086. --- uClibc-0.9.33.2/libc/stdlib/malloc-standard/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  44087. +++ uClibc-git/libc/stdlib/malloc-standard/Makefile.in 2014-07-25 20:36:06.097330972 +0200
  44088. @@ -7,15 +7,13 @@
  44089. subdirs += libc/stdlib/malloc-standard
  44090. -# calloc.c can be found at uClibc/libc/stdlib/calloc.c
  44091. -# valloc.c can be found at uClibc/libc/stdlib/valloc.c
  44092. -CSRC := malloc.c calloc.c realloc.c free.c memalign.c mallopt.c mallinfo.c
  44093. -
  44094. STDLIB_MALLOC_STANDARD_DIR := $(top_srcdir)libc/stdlib/malloc-standard
  44095. STDLIB_MALLOC_STANDARD_OUT := $(top_builddir)libc/stdlib/malloc-standard
  44096. -STDLIB_MALLOC_STANDARD_SRC := $(patsubst %.c,$(STDLIB_MALLOC_STANDARD_DIR)/%.c,$(CSRC))
  44097. -STDLIB_MALLOC_STANDARD_OBJ := $(patsubst %.c,$(STDLIB_MALLOC_STANDARD_OUT)/%.o,$(CSRC))
  44098. +CSRC-y := $(notdir $(wildcard $(STDLIB_MALLOC_STANDARD_DIR)/*.c))
  44099. +
  44100. +STDLIB_MALLOC_STANDARD_SRC := $(patsubst %.c,$(STDLIB_MALLOC_STANDARD_DIR)/%.c,$(CSRC-y))
  44101. +STDLIB_MALLOC_STANDARD_OBJ := $(patsubst %.c,$(STDLIB_MALLOC_STANDARD_OUT)/%.o,$(CSRC-y))
  44102. libc-$(MALLOC_STANDARD) += $(STDLIB_MALLOC_STANDARD_OBJ)
  44103. diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc-standard/mallinfo.c uClibc-git/libc/stdlib/malloc-standard/mallinfo.c
  44104. --- uClibc-0.9.33.2/libc/stdlib/malloc-standard/mallinfo.c 2012-05-15 09:20:09.000000000 +0200
  44105. +++ uClibc-git/libc/stdlib/malloc-standard/mallinfo.c 2014-07-25 20:36:06.097330972 +0200
  44106. @@ -15,6 +15,7 @@
  44107. */
  44108. #include "malloc.h"
  44109. +#include <stdio.h> /* fprintf */
  44110. /* ------------------------------ mallinfo ------------------------------ */
  44111. diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc-standard/malloc.h uClibc-git/libc/stdlib/malloc-standard/malloc.h
  44112. --- uClibc-0.9.33.2/libc/stdlib/malloc-standard/malloc.h 2012-05-15 09:20:09.000000000 +0200
  44113. +++ uClibc-git/libc/stdlib/malloc-standard/malloc.h 2014-07-25 20:36:06.097330972 +0200
  44114. @@ -26,7 +26,11 @@
  44115. -__UCLIBC_MUTEX_EXTERN(__malloc_lock);
  44116. +__UCLIBC_MUTEX_EXTERN(__malloc_lock)
  44117. +#if defined __UCLIBC_HAS_THREADS__ && !defined __LINUXTHREADS_OLD__
  44118. + attribute_hidden
  44119. +#endif
  44120. + ;
  44121. #define __MALLOC_LOCK __UCLIBC_MUTEX_LOCK(__malloc_lock)
  44122. #define __MALLOC_UNLOCK __UCLIBC_MUTEX_UNLOCK(__malloc_lock)
  44123. @@ -349,13 +353,13 @@
  44124. #endif
  44125. #ifdef __ARCH_USE_MMU__
  44126. -# define _MAP_UNINITIALIZE 0
  44127. +# define _MAP_UNINITIALIZED 0
  44128. #else
  44129. -# define _MAP_UNINITIALIZE MAP_UNINITIALIZE
  44130. +# define _MAP_UNINITIALIZED MAP_UNINITIALIZED
  44131. #endif
  44132. #define MMAP(addr, size, prot) \
  44133. - (mmap((addr), (size), (prot), MAP_PRIVATE|MAP_ANONYMOUS|_MAP_UNINITIALIZE, 0, 0))
  44134. + (mmap((addr), (size), (prot), MAP_PRIVATE|MAP_ANONYMOUS|_MAP_UNINITIALIZED, 0, 0))
  44135. /* ----------------------- Chunk representations ----------------------- */
  44136. @@ -910,7 +914,7 @@
  44137. malloc relies on the property that malloc_state is initialized to
  44138. all zeroes (as is true of C statics).
  44139. */
  44140. -extern struct malloc_state __malloc_state; /* never directly referenced */
  44141. +extern struct malloc_state __malloc_state attribute_hidden; /* never directly referenced */
  44142. /*
  44143. All uses of av_ are via get_malloc_state().
  44144. @@ -947,12 +951,12 @@
  44145. #define check_malloced_chunk(P,N) __do_check_malloced_chunk(P,N)
  44146. #define check_malloc_state() __do_check_malloc_state()
  44147. -extern void __do_check_chunk(mchunkptr p);
  44148. -extern void __do_check_free_chunk(mchunkptr p);
  44149. -extern void __do_check_inuse_chunk(mchunkptr p);
  44150. -extern void __do_check_remalloced_chunk(mchunkptr p, size_t s);
  44151. -extern void __do_check_malloced_chunk(mchunkptr p, size_t s);
  44152. -extern void __do_check_malloc_state(void);
  44153. +extern void __do_check_chunk(mchunkptr p) attribute_hidden;
  44154. +extern void __do_check_free_chunk(mchunkptr p) attribute_hidden;
  44155. +extern void __do_check_inuse_chunk(mchunkptr p) attribute_hidden;
  44156. +extern void __do_check_remalloced_chunk(mchunkptr p, size_t s) attribute_hidden;
  44157. +extern void __do_check_malloced_chunk(mchunkptr p, size_t s) attribute_hidden;
  44158. +extern void __do_check_malloc_state(void) attribute_hidden;
  44159. #include <assert.h>
  44160. diff -Nur uClibc-0.9.33.2/libc/stdlib/malloc-standard/memalign.c uClibc-git/libc/stdlib/malloc-standard/memalign.c
  44161. --- uClibc-0.9.33.2/libc/stdlib/malloc-standard/memalign.c 2012-05-15 09:20:09.000000000 +0200
  44162. +++ uClibc-git/libc/stdlib/malloc-standard/memalign.c 2014-07-25 20:36:06.097330972 +0200
  44163. @@ -127,4 +127,4 @@
  44164. __MALLOC_UNLOCK;
  44165. return retval;
  44166. }
  44167. -
  44168. +libc_hidden_def(memalign)
  44169. diff -Nur uClibc-0.9.33.2/libc/stdlib/mkdtemp.c uClibc-git/libc/stdlib/mkdtemp.c
  44170. --- uClibc-0.9.33.2/libc/stdlib/mkdtemp.c 2012-05-15 09:20:09.000000000 +0200
  44171. +++ uClibc-git/libc/stdlib/mkdtemp.c 2014-07-25 20:36:06.109331035 +0200
  44172. @@ -14,8 +14,7 @@
  44173. You should have received a copy of the GNU Library General Public
  44174. License along with the GNU C Library; see the file COPYING.LIB. If not,
  44175. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  44176. - Boston, MA 02111-1307, USA. */
  44177. + see <http://www.gnu.org/licenses/>. */
  44178. #include <stdio.h>
  44179. #include <stdlib.h>
  44180. diff -Nur uClibc-0.9.33.2/libc/stdlib/mkostemp64.c uClibc-git/libc/stdlib/mkostemp64.c
  44181. --- uClibc-0.9.33.2/libc/stdlib/mkostemp64.c 1970-01-01 01:00:00.000000000 +0100
  44182. +++ uClibc-git/libc/stdlib/mkostemp64.c 2014-07-25 20:36:06.109331035 +0200
  44183. @@ -0,0 +1,31 @@
  44184. +/* Copyright (C) 2000-2012 Free Software Foundation, Inc.
  44185. + This file is part of the GNU C Library.
  44186. +
  44187. + The GNU C Library is free software; you can redistribute it and/or
  44188. + modify it under the terms of the GNU Lesser General Public
  44189. + License as published by the Free Software Foundation; either
  44190. + version 2.1 of the License, or (at your option) any later version.
  44191. +
  44192. + The GNU C Library is distributed in the hope that it will be useful,
  44193. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  44194. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  44195. + Lesser General Public License for more details.
  44196. +
  44197. + You should have received a copy of the GNU Lesser General Public
  44198. + License along with the GNU C Library; if not, see
  44199. + <http://www.gnu.org/licenses/>. */
  44200. +
  44201. +#include <fcntl.h>
  44202. +#include <stdio.h>
  44203. +#include <stdlib.h>
  44204. +#include "../misc/internals/tempname.h"
  44205. +
  44206. +/* Generate a unique temporary file name from TEMPLATE.
  44207. + The last six characters of TEMPLATE must be "XXXXXX";
  44208. + they are replaced with a string that makes the filename unique.
  44209. + Then open the file and return a fd. */
  44210. +int
  44211. +mkostemp64 (char *template, int flags)
  44212. +{
  44213. + return __gen_tempname (template, __GT_BIGFILE, flags | O_LARGEFILE);
  44214. +}
  44215. diff -Nur uClibc-0.9.33.2/libc/stdlib/mkostemp.c uClibc-git/libc/stdlib/mkostemp.c
  44216. --- uClibc-0.9.33.2/libc/stdlib/mkostemp.c 1970-01-01 01:00:00.000000000 +0100
  44217. +++ uClibc-git/libc/stdlib/mkostemp.c 2014-07-25 20:36:06.109331035 +0200
  44218. @@ -0,0 +1,30 @@
  44219. +/* Copyright (C) 1998-2012 Free Software Foundation, Inc.
  44220. + This file is part of the GNU C Library.
  44221. +
  44222. + The GNU C Library is free software; you can redistribute it and/or
  44223. + modify it under the terms of the GNU Lesser General Public
  44224. + License as published by the Free Software Foundation; either
  44225. + version 2.1 of the License, or (at your option) any later version.
  44226. +
  44227. + The GNU C Library is distributed in the hope that it will be useful,
  44228. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  44229. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  44230. + Lesser General Public License for more details.
  44231. +
  44232. + You should have received a copy of the GNU Lesser General Public
  44233. + License along with the GNU C Library; if not, see
  44234. + <http://www.gnu.org/licenses/>. */
  44235. +
  44236. +#include <stdio.h>
  44237. +#include <stdlib.h>
  44238. +#include "../misc/internals/tempname.h"
  44239. +
  44240. +/* Generate a unique temporary file name from TEMPLATE.
  44241. + The last six characters of TEMPLATE must be "XXXXXX";
  44242. + they are replaced with a string that makes the filename unique.
  44243. + Then open the file and return a fd. */
  44244. +int
  44245. +mkostemp (char *template, int flags)
  44246. +{
  44247. + return __gen_tempname (template, __GT_FILE, flags);
  44248. +}
  44249. diff -Nur uClibc-0.9.33.2/libc/stdlib/mkstemp64.c uClibc-git/libc/stdlib/mkstemp64.c
  44250. --- uClibc-0.9.33.2/libc/stdlib/mkstemp64.c 2012-05-15 09:20:09.000000000 +0200
  44251. +++ uClibc-git/libc/stdlib/mkstemp64.c 2014-07-25 20:36:06.109331035 +0200
  44252. @@ -13,8 +13,7 @@
  44253. You should have received a copy of the GNU Library General Public
  44254. License along with the GNU C Library; see the file COPYING.LIB. If not,
  44255. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  44256. - Boston, MA 02111-1307, USA. */
  44257. + see <http://www.gnu.org/licenses/>. */
  44258. #include <stdio.h>
  44259. #include <stdlib.h>
  44260. diff -Nur uClibc-0.9.33.2/libc/stdlib/mkstemp.c uClibc-git/libc/stdlib/mkstemp.c
  44261. --- uClibc-0.9.33.2/libc/stdlib/mkstemp.c 2012-05-15 09:20:09.000000000 +0200
  44262. +++ uClibc-git/libc/stdlib/mkstemp.c 2014-07-25 20:36:06.109331035 +0200
  44263. @@ -13,8 +13,7 @@
  44264. You should have received a copy of the GNU Library General Public
  44265. License along with the GNU C Library; see the file COPYING.LIB. If not,
  44266. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  44267. - Boston, MA 02111-1307, USA. */
  44268. + see <http://www.gnu.org/licenses/>. */
  44269. #include <stdio.h>
  44270. #include <stdlib.h>
  44271. diff -Nur uClibc-0.9.33.2/libc/stdlib/mktemp.c uClibc-git/libc/stdlib/mktemp.c
  44272. --- uClibc-0.9.33.2/libc/stdlib/mktemp.c 2012-05-15 09:20:09.000000000 +0200
  44273. +++ uClibc-git/libc/stdlib/mktemp.c 2014-07-25 20:36:06.109331035 +0200
  44274. @@ -13,8 +13,7 @@
  44275. You should have received a copy of the GNU Library General Public
  44276. License along with the GNU C Library; see the file COPYING.LIB. If not,
  44277. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  44278. - Boston, MA 02111-1307, USA. */
  44279. + see <http://www.gnu.org/licenses/>. */
  44280. #include <stdio.h>
  44281. #include <stdlib.h>
  44282. diff -Nur uClibc-0.9.33.2/libc/stdlib/mrand48.c uClibc-git/libc/stdlib/mrand48.c
  44283. --- uClibc-0.9.33.2/libc/stdlib/mrand48.c 2012-05-15 09:20:09.000000000 +0200
  44284. +++ uClibc-git/libc/stdlib/mrand48.c 2014-07-25 20:36:06.109331035 +0200
  44285. @@ -13,9 +13,8 @@
  44286. Lesser General Public License for more details.
  44287. You should have received a copy of the GNU Lesser General Public
  44288. - License along with the GNU C Library; if not, write to the Free
  44289. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  44290. - 02111-1307 USA. */
  44291. + License along with the GNU C Library; if not, see
  44292. + <http://www.gnu.org/licenses/>. */
  44293. #include <stdlib.h>
  44294. diff -Nur uClibc-0.9.33.2/libc/stdlib/mrand48_r.c uClibc-git/libc/stdlib/mrand48_r.c
  44295. --- uClibc-0.9.33.2/libc/stdlib/mrand48_r.c 2012-05-15 09:20:09.000000000 +0200
  44296. +++ uClibc-git/libc/stdlib/mrand48_r.c 2014-07-25 20:36:06.109331035 +0200
  44297. @@ -13,9 +13,8 @@
  44298. Lesser General Public License for more details.
  44299. You should have received a copy of the GNU Lesser General Public
  44300. - License along with the GNU C Library; if not, write to the Free
  44301. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  44302. - 02111-1307 USA. */
  44303. + License along with the GNU C Library; if not, see
  44304. + <http://www.gnu.org/licenses/>. */
  44305. #include <stdlib.h>
  44306. diff -Nur uClibc-0.9.33.2/libc/stdlib/nrand48.c uClibc-git/libc/stdlib/nrand48.c
  44307. --- uClibc-0.9.33.2/libc/stdlib/nrand48.c 2012-05-15 09:20:09.000000000 +0200
  44308. +++ uClibc-git/libc/stdlib/nrand48.c 2014-07-25 20:36:06.109331035 +0200
  44309. @@ -13,9 +13,8 @@
  44310. Lesser General Public License for more details.
  44311. You should have received a copy of the GNU Lesser General Public
  44312. - License along with the GNU C Library; if not, write to the Free
  44313. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  44314. - 02111-1307 USA. */
  44315. + License along with the GNU C Library; if not, see
  44316. + <http://www.gnu.org/licenses/>. */
  44317. #include <stdlib.h>
  44318. diff -Nur uClibc-0.9.33.2/libc/stdlib/nrand48_r.c uClibc-git/libc/stdlib/nrand48_r.c
  44319. --- uClibc-0.9.33.2/libc/stdlib/nrand48_r.c 2012-05-15 09:20:09.000000000 +0200
  44320. +++ uClibc-git/libc/stdlib/nrand48_r.c 2014-07-25 20:36:06.109331035 +0200
  44321. @@ -13,9 +13,8 @@
  44322. Lesser General Public License for more details.
  44323. You should have received a copy of the GNU Lesser General Public
  44324. - License along with the GNU C Library; if not, write to the Free
  44325. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  44326. - 02111-1307 USA. */
  44327. + License along with the GNU C Library; if not, see
  44328. + <http://www.gnu.org/licenses/>. */
  44329. #include <stdlib.h>
  44330. diff -Nur uClibc-0.9.33.2/libc/stdlib/posix_memalign.c uClibc-git/libc/stdlib/posix_memalign.c
  44331. --- uClibc-0.9.33.2/libc/stdlib/posix_memalign.c 2012-05-15 09:20:09.000000000 +0200
  44332. +++ uClibc-git/libc/stdlib/posix_memalign.c 2014-07-25 20:36:06.109331035 +0200
  44333. @@ -15,9 +15,8 @@
  44334. * for more details.
  44335. *
  44336. * You should have received a copy of the GNU Library General Public License
  44337. - * along with this program; if not, write to the Free Software Foundation,
  44338. - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  44339. - *
  44340. + * along with this program; see the file COPYING.LIB. If not, see
  44341. + * <http://www.gnu.org/licenses/>.
  44342. */
  44343. #include <stdlib.h>
  44344. diff -Nur uClibc-0.9.33.2/libc/stdlib/ptsname.c uClibc-git/libc/stdlib/ptsname.c
  44345. --- uClibc-0.9.33.2/libc/stdlib/ptsname.c 2012-05-15 09:20:09.000000000 +0200
  44346. +++ uClibc-git/libc/stdlib/ptsname.c 2014-07-25 20:36:06.109331035 +0200
  44347. @@ -13,9 +13,8 @@
  44348. Lesser General Public License for more details.
  44349. You should have received a copy of the GNU Lesser General Public
  44350. - License along with the GNU C Library; if not, write to the Free
  44351. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  44352. - 02111-1307 USA. */
  44353. + License along with the GNU C Library; if not, see
  44354. + <http://www.gnu.org/licenses/>. */
  44355. #include <stdio.h>
  44356. #include <errno.h>
  44357. diff -Nur uClibc-0.9.33.2/libc/stdlib/pty-private.h uClibc-git/libc/stdlib/pty-private.h
  44358. --- uClibc-0.9.33.2/libc/stdlib/pty-private.h 2012-05-15 09:20:09.000000000 +0200
  44359. +++ uClibc-git/libc/stdlib/pty-private.h 2014-07-25 20:36:06.109331035 +0200
  44360. @@ -15,8 +15,7 @@
  44361. You should have received a copy of the GNU Library General Public
  44362. License along with the GNU C Library; see the file COPYING.LIB. If not,
  44363. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  44364. - Boston, MA 02111-1307, USA. */
  44365. + see <http://www.gnu.org/licenses/>. */
  44366. #ifndef _PTY_PRIVATE_H
  44367. #define _PTY_PRIVATE_H 1
  44368. diff -Nur uClibc-0.9.33.2/libc/stdlib/rand_r.c uClibc-git/libc/stdlib/rand_r.c
  44369. --- uClibc-0.9.33.2/libc/stdlib/rand_r.c 2012-05-15 09:20:09.000000000 +0200
  44370. +++ uClibc-git/libc/stdlib/rand_r.c 2014-07-25 20:36:06.109331035 +0200
  44371. @@ -14,9 +14,8 @@
  44372. Lesser General Public License for more details.
  44373. You should have received a copy of the GNU Lesser General Public
  44374. - License along with the GNU C Library; if not, write to the Free
  44375. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  44376. - 02111-1307 USA. */
  44377. + License along with the GNU C Library; if not, see
  44378. + <http://www.gnu.org/licenses/>. */
  44379. #include <stdlib.h>
  44380. diff -Nur uClibc-0.9.33.2/libc/stdlib/rpmatch.c uClibc-git/libc/stdlib/rpmatch.c
  44381. --- uClibc-0.9.33.2/libc/stdlib/rpmatch.c 1970-01-01 01:00:00.000000000 +0100
  44382. +++ uClibc-git/libc/stdlib/rpmatch.c 2014-07-25 20:36:06.113331056 +0200
  44383. @@ -0,0 +1,7 @@
  44384. +/* Copyright (C) 2012 Bernhard Reutner-Fischer <uclibc@uclibc.org>
  44385. + *
  44386. + * Licensed under the LGPL v2.1+, see the file COPYING.LIB in this tarball.
  44387. + */
  44388. +
  44389. +#define L_rpmatch
  44390. +#include "stdlib.c"
  44391. diff -Nur uClibc-0.9.33.2/libc/stdlib/seed48.c uClibc-git/libc/stdlib/seed48.c
  44392. --- uClibc-0.9.33.2/libc/stdlib/seed48.c 2012-05-15 09:20:09.000000000 +0200
  44393. +++ uClibc-git/libc/stdlib/seed48.c 2014-07-25 20:36:06.113331056 +0200
  44394. @@ -13,9 +13,8 @@
  44395. Lesser General Public License for more details.
  44396. You should have received a copy of the GNU Lesser General Public
  44397. - License along with the GNU C Library; if not, write to the Free
  44398. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  44399. - 02111-1307 USA. */
  44400. + License along with the GNU C Library; if not, see
  44401. + <http://www.gnu.org/licenses/>. */
  44402. #include <stdlib.h>
  44403. diff -Nur uClibc-0.9.33.2/libc/stdlib/seed48_r.c uClibc-git/libc/stdlib/seed48_r.c
  44404. --- uClibc-0.9.33.2/libc/stdlib/seed48_r.c 2012-05-15 09:20:09.000000000 +0200
  44405. +++ uClibc-git/libc/stdlib/seed48_r.c 2014-07-25 20:36:06.113331056 +0200
  44406. @@ -13,9 +13,8 @@
  44407. Lesser General Public License for more details.
  44408. You should have received a copy of the GNU Lesser General Public
  44409. - License along with the GNU C Library; if not, write to the Free
  44410. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  44411. - 02111-1307 USA. */
  44412. + License along with the GNU C Library; if not, see
  44413. + <http://www.gnu.org/licenses/>. */
  44414. #include <stdlib.h>
  44415. #include <string.h>
  44416. diff -Nur uClibc-0.9.33.2/libc/stdlib/setenv.c uClibc-git/libc/stdlib/setenv.c
  44417. --- uClibc-0.9.33.2/libc/stdlib/setenv.c 2012-05-15 09:20:09.000000000 +0200
  44418. +++ uClibc-git/libc/stdlib/setenv.c 2014-07-25 20:36:06.113331056 +0200
  44419. @@ -12,9 +12,8 @@
  44420. Lesser General Public License for more details.
  44421. You should have received a copy of the GNU Lesser General Public
  44422. - License along with the GNU C Library; if not, write to the Free
  44423. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  44424. - 02111-1307 USA.
  44425. + License along with the GNU C Library; see the file COPYING.LIB. If
  44426. + not, see <http://www.gnu.org/licenses/>.
  44427. modified for uClibc by Erik Andersen <andersen@codepoet.org>
  44428. */
  44429. diff -Nur uClibc-0.9.33.2/libc/stdlib/srand48.c uClibc-git/libc/stdlib/srand48.c
  44430. --- uClibc-0.9.33.2/libc/stdlib/srand48.c 2012-05-15 09:20:09.000000000 +0200
  44431. +++ uClibc-git/libc/stdlib/srand48.c 2014-07-25 20:36:06.113331056 +0200
  44432. @@ -13,9 +13,8 @@
  44433. Lesser General Public License for more details.
  44434. You should have received a copy of the GNU Lesser General Public
  44435. - License along with the GNU C Library; if not, write to the Free
  44436. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  44437. - 02111-1307 USA. */
  44438. + License along with the GNU C Library; if not, see
  44439. + <http://www.gnu.org/licenses/>. */
  44440. #include <stdlib.h>
  44441. diff -Nur uClibc-0.9.33.2/libc/stdlib/srand48_r.c uClibc-git/libc/stdlib/srand48_r.c
  44442. --- uClibc-0.9.33.2/libc/stdlib/srand48_r.c 2012-05-15 09:20:09.000000000 +0200
  44443. +++ uClibc-git/libc/stdlib/srand48_r.c 2014-07-25 20:36:06.113331056 +0200
  44444. @@ -13,9 +13,8 @@
  44445. Lesser General Public License for more details.
  44446. You should have received a copy of the GNU Lesser General Public
  44447. - License along with the GNU C Library; if not, write to the Free
  44448. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  44449. - 02111-1307 USA. */
  44450. + License along with the GNU C Library; if not, see
  44451. + <http://www.gnu.org/licenses/>. */
  44452. #include <stdlib.h>
  44453. #include <limits.h>
  44454. diff -Nur uClibc-0.9.33.2/libc/stdlib/stdlib.c uClibc-git/libc/stdlib/stdlib.c
  44455. --- uClibc-0.9.33.2/libc/stdlib/stdlib.c 2012-05-15 09:20:09.000000000 +0200
  44456. +++ uClibc-git/libc/stdlib/stdlib.c 2014-07-25 20:36:06.113331056 +0200
  44457. @@ -12,8 +12,8 @@
  44458. * Library General Public License for more details.
  44459. *
  44460. * You should have received a copy of the GNU Library General Public
  44461. - * License along with this library; if not, write to the Free
  44462. - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  44463. + * License along with this library; if not, see
  44464. + * <http://www.gnu.org/licenses/>.
  44465. */
  44466. /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
  44467. @@ -32,58 +32,8 @@
  44468. * Add wscto{inttype} functions.
  44469. */
  44470. -#define _ISOC99_SOURCE /* for ULLONG primarily... */
  44471. #include <limits.h>
  44472. #include <stdint.h>
  44473. -/* Work around gcc's refusal to create aliases.
  44474. - * TODO: Add in a define to disable the aliases? */
  44475. -
  44476. -#if UINT_MAX == ULONG_MAX
  44477. -#ifdef L_labs
  44478. -#define abs __ignore_abs
  44479. -#endif
  44480. -#ifdef L_atol
  44481. -#define atoi __ignore_atoi
  44482. -#endif
  44483. -#endif
  44484. -#if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
  44485. -#ifdef L_labs
  44486. -#define llabs __ignore_llabs
  44487. -#endif
  44488. -#ifdef L_atol
  44489. -#define atoll __ignore_atoll
  44490. -#endif
  44491. -#ifdef L_strtol
  44492. -#define strtoll __ignore_strtoll
  44493. -#endif
  44494. -#ifdef L_strtoul
  44495. -#define strtoull __ignore_strtoull
  44496. -#endif
  44497. -#ifdef L_wcstol
  44498. -#define wcstoll __ignore_wcstoll
  44499. -#endif
  44500. -#ifdef L_wcstoul
  44501. -#define wcstoull __ignore_wcstoull
  44502. -#endif
  44503. -#ifdef L_strtol_l
  44504. -#define strtoll_l __ignore_strtoll_l
  44505. -#endif
  44506. -#ifdef L_strtoul_l
  44507. -#define strtoull_l __ignore_strtoull_l
  44508. -#endif
  44509. -#ifdef L_wcstol_l
  44510. -#define wcstoll_l __ignore_wcstoll_l
  44511. -#endif
  44512. -#ifdef L_wcstoul_l
  44513. -#define wcstoull_l __ignore_wcstoull_l
  44514. -#endif
  44515. -#endif
  44516. -#if defined(ULLONG_MAX) && (ULLONG_MAX == UINTMAX_MAX)
  44517. -#if defined L_labs || defined L_llabs
  44518. -#define imaxabs __ignore_imaxabs
  44519. -#endif
  44520. -#endif
  44521. -
  44522. #include <stdint.h>
  44523. #include <inttypes.h>
  44524. #include <ctype.h>
  44525. @@ -100,10 +50,6 @@
  44526. #include <wctype.h>
  44527. #include <bits/uClibc_uwchar.h>
  44528. -#ifdef __UCLIBC_HAS_XLOCALE__
  44529. -#include <xlocale.h>
  44530. -#endif /* __UCLIBC_HAS_XLOCALE__ */
  44531. -
  44532. /* TODO: clean up the following... */
  44533. #if WCHAR_MAX > 0xffffUL
  44534. @@ -226,21 +172,15 @@
  44535. }
  44536. #if UINT_MAX == ULONG_MAX
  44537. -#undef abs
  44538. -extern __typeof(labs) abs;
  44539. -strong_alias(labs,abs)
  44540. +strong_alias_untyped(labs,abs)
  44541. #endif
  44542. #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
  44543. -#undef llabs
  44544. -extern __typeof(labs) llabs;
  44545. -strong_alias(labs,llabs)
  44546. +strong_alias_untyped(labs,llabs)
  44547. #endif
  44548. #if ULONG_MAX == UINTMAX_MAX
  44549. -#undef imaxabs
  44550. -extern __typeof(labs) imaxabs;
  44551. -strong_alias(labs,imaxabs)
  44552. +strong_alias_untyped(labs,imaxabs)
  44553. #endif
  44554. #endif
  44555. @@ -255,9 +195,7 @@
  44556. }
  44557. #if (ULLONG_MAX == UINTMAX_MAX)
  44558. -#undef imaxabs
  44559. -extern __typeof(llabs) imaxabs;
  44560. -strong_alias(llabs,imaxabs)
  44561. +strong_alias_untyped(llabs,imaxabs)
  44562. #endif
  44563. #endif /* defined(ULLONG_MAX) && (LLONG_MAX > LONG_MAX) */
  44564. @@ -288,18 +226,12 @@
  44565. }
  44566. #if UINT_MAX == ULONG_MAX
  44567. -#undef atoi
  44568. -extern __typeof(atol) atoi;
  44569. -/* the one in stdlib.h is not enough due to prototype mismatch */
  44570. -libc_hidden_proto(atoi)
  44571. -strong_alias(atol,atoi)
  44572. +strong_alias_untyped(atol,atoi)
  44573. libc_hidden_def(atoi)
  44574. #endif
  44575. #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
  44576. -#undef atoll
  44577. -extern __typeof(atol) atoll;
  44578. -strong_alias(atol,atoll)
  44579. +strong_alias_untyped(atol,atoll)
  44580. #endif
  44581. #endif
  44582. @@ -318,9 +250,16 @@
  44583. #endif
  44584. /**********************************************************************/
  44585. +#ifdef L_rpmatch
  44586. +int rpmatch (const char *__response)
  44587. +{
  44588. + return (__response[0] == 'y' || __response[0] == 'Y') ? 1 :
  44589. + (__response[0] == 'n' || __response[0] == 'N') ? 0 : -1;
  44590. +}
  44591. +#endif
  44592. +/**********************************************************************/
  44593. #if defined(L_strtol) || defined(L_strtol_l)
  44594. -libc_hidden_proto(__XL_NPP(strtol))
  44595. long __XL_NPP(strtol)(const char * __restrict str, char ** __restrict endptr,
  44596. int base __LOCALE_PARAM)
  44597. {
  44598. @@ -333,17 +272,7 @@
  44599. #endif
  44600. #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
  44601. -#ifdef L_strtol_l
  44602. -#undef strtoll_l
  44603. -#else
  44604. -#undef strtoll
  44605. -#endif
  44606. -extern __typeof(__XL_NPP(strtol)) __XL_NPP(strtoll);
  44607. -/* the one in stdlib.h is not enough due to prototype mismatch */
  44608. -#ifdef L_strtol
  44609. -libc_hidden_proto(__XL_NPP(strtoll))
  44610. -#endif
  44611. -strong_alias(__XL_NPP(strtol),__XL_NPP(strtoll))
  44612. +strong_alias_untyped(__XL_NPP(strtol),__XL_NPP(strtoll))
  44613. #ifdef L_strtol
  44614. libc_hidden_def(__XL_NPP(strtoll))
  44615. strong_alias(strtol,strtoq)
  44616. @@ -389,13 +318,7 @@
  44617. #endif
  44618. #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
  44619. -#ifdef L_strtoul_l
  44620. -#undef strtoull_l
  44621. -#else
  44622. -#undef strtoull
  44623. -#endif
  44624. -extern __typeof(__XL_NPP(strtoul)) __XL_NPP(strtoull);
  44625. -strong_alias(__XL_NPP(strtoul),__XL_NPP(strtoull))
  44626. +strong_alias_untyped(__XL_NPP(strtoul),__XL_NPP(strtoull))
  44627. #if !defined(L_strtoul_l)
  44628. strong_alias(strtoul,strtouq)
  44629. #endif
  44630. @@ -744,16 +667,7 @@
  44631. #endif /* defined(ULLONG_MAX) && (LLONG_MAX > LONG_MAX) */
  44632. #endif
  44633. -/**********************************************************************/
  44634. -/* Made _Exit() an alias for _exit(), as per C99. */
  44635. -/* #ifdef L__Exit */
  44636. -/* void _Exit(int status) */
  44637. -/* { */
  44638. -/* _exit(status); */
  44639. -/* } */
  44640. -/* #endif */
  44641. -/**********************************************************************/
  44642. #ifdef L_bsearch
  44643. void *bsearch(const void *key, const void *base, size_t /* nmemb */ high,
  44644. @@ -1067,13 +981,7 @@
  44645. #endif
  44646. #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
  44647. -#ifdef L_wcstol_l
  44648. -#undef wcstoll_l
  44649. -#else
  44650. -#undef wcstoll
  44651. -#endif
  44652. -extern __typeof(__XL_NPP(wcstol)) __XL_NPP(wcstoll);
  44653. -strong_alias(__XL_NPP(wcstol),__XL_NPP(wcstoll))
  44654. +strong_alias_untyped(__XL_NPP(wcstol),__XL_NPP(wcstoll))
  44655. #endif
  44656. #endif
  44657. @@ -1114,13 +1022,7 @@
  44658. #endif
  44659. #if defined(ULLONG_MAX) && (ULLONG_MAX == ULONG_MAX)
  44660. -#ifdef L_wcstoul_l
  44661. -#undef wcstoull_l
  44662. -#else
  44663. -#undef wcstoull
  44664. -#endif
  44665. -extern __typeof(__XL_NPP(wcstoul)) __XL_NPP(wcstoull);
  44666. -strong_alias(__XL_NPP(wcstoul),__XL_NPP(wcstoull))
  44667. +strong_alias_untyped(__XL_NPP(wcstoul),__XL_NPP(wcstoull))
  44668. #endif
  44669. #endif
  44670. diff -Nur uClibc-0.9.33.2/libc/stdlib/_strtod.c uClibc-git/libc/stdlib/_strtod.c
  44671. --- uClibc-0.9.33.2/libc/stdlib/_strtod.c 2012-05-15 09:20:09.000000000 +0200
  44672. +++ uClibc-git/libc/stdlib/_strtod.c 2014-07-25 20:36:06.061330784 +0200
  44673. @@ -95,7 +95,6 @@
  44674. /**********************************************************************/
  44675. -#define _ISOC99_SOURCE 1
  44676. #include <stdlib.h>
  44677. #include <string.h>
  44678. #include <ctype.h>
  44679. @@ -112,10 +111,6 @@
  44680. # include <bits/uClibc_uwchar.h>
  44681. #endif
  44682. -#ifdef __UCLIBC_HAS_XLOCALE__
  44683. -# include <xlocale.h>
  44684. -#endif
  44685. -
  44686. /* Handle _STRTOD_HEXADECIMAL_FLOATS via uClibc config now. */
  44687. #undef _STRTOD_HEXADECIMAL_FLOATS
  44688. #ifdef __UCLIBC_HAS_HEXADECIMAL_FLOATS__
  44689. @@ -509,7 +504,6 @@
  44690. #endif
  44691. -libc_hidden_proto(__XL_NPP(strtof))
  44692. float __XL_NPP(strtof)(const Wchar *str, Wchar **endptr __LOCALE_PARAM )
  44693. {
  44694. #if FPMAX_TYPE == 1
  44695. @@ -526,7 +520,6 @@
  44696. return y;
  44697. #endif
  44698. }
  44699. -libc_hidden_def(__XL_NPP(strtof))
  44700. #endif
  44701. #endif
  44702. diff -Nur uClibc-0.9.33.2/libc/stdlib/system.c uClibc-git/libc/stdlib/system.c
  44703. --- uClibc-0.9.33.2/libc/stdlib/system.c 2012-05-15 09:20:09.000000000 +0200
  44704. +++ uClibc-git/libc/stdlib/system.c 2014-07-25 20:36:06.113331056 +0200
  44705. @@ -24,11 +24,6 @@
  44706. * need to figure out why still
  44707. */
  44708. #if !defined __UCLIBC_HAS_THREADS_NATIVE__ || defined __sparc__
  44709. -/* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
  44710. -#include <sys/syscall.h>
  44711. -#ifndef __NR_vfork
  44712. -# define vfork fork
  44713. -#endif
  44714. int __libc_system(const char *command)
  44715. {
  44716. @@ -66,7 +61,7 @@
  44717. __printf("Waiting for child %d\n", pid);
  44718. #endif
  44719. - if (wait4(pid, &wait_val, 0, 0) == -1)
  44720. + if (__wait4_nocancel(pid, &wait_val, 0, 0) == -1)
  44721. wait_val = -1;
  44722. out:
  44723. diff -Nur uClibc-0.9.33.2/libc/stdlib/__uc_malloc.c uClibc-git/libc/stdlib/__uc_malloc.c
  44724. --- uClibc-0.9.33.2/libc/stdlib/__uc_malloc.c 2012-05-15 09:20:09.000000000 +0200
  44725. +++ uClibc-git/libc/stdlib/__uc_malloc.c 2014-07-25 20:36:06.061330784 +0200
  44726. @@ -13,8 +13,7 @@
  44727. You should have received a copy of the GNU Library General Public
  44728. License along with this library; see the file COPYING.LIB. If
  44729. -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  44730. -Cambridge, MA 02139, USA.
  44731. +not, see <http://www.gnu.org/licenses/>.
  44732. */
  44733. diff -Nur uClibc-0.9.33.2/libc/stdlib/unix_grantpt.c uClibc-git/libc/stdlib/unix_grantpt.c
  44734. --- uClibc-0.9.33.2/libc/stdlib/unix_grantpt.c 2012-05-15 09:20:09.000000000 +0200
  44735. +++ uClibc-git/libc/stdlib/unix_grantpt.c 2014-07-25 20:36:06.113331056 +0200
  44736. @@ -14,8 +14,7 @@
  44737. You should have received a copy of the GNU Library General Public
  44738. License along with the GNU C Library; see the file COPYING.LIB. If not,
  44739. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  44740. - Boston, MA 02111-1307, USA. */
  44741. + see <http://www.gnu.org/licenses/>. */
  44742. #include <assert.h>
  44743. #include <errno.h>
  44744. @@ -31,12 +30,6 @@
  44745. #include "pty-private.h"
  44746. -/* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
  44747. -#include <sys/syscall.h>
  44748. -#if ! defined __NR_vfork
  44749. -#define vfork fork
  44750. -#endif
  44751. -
  44752. /* Return the result of ptsname_r in the buffer pointed to by PTS,
  44753. which should be of length BUF_LEN. If it is too long to fit in
  44754. this buffer, a sufficiently long buffer is allocated using malloc,
  44755. diff -Nur uClibc-0.9.33.2/libc/stdlib/unlockpt.c uClibc-git/libc/stdlib/unlockpt.c
  44756. --- uClibc-0.9.33.2/libc/stdlib/unlockpt.c 2012-05-15 09:20:09.000000000 +0200
  44757. +++ uClibc-git/libc/stdlib/unlockpt.c 2014-07-25 20:36:06.113331056 +0200
  44758. @@ -14,8 +14,7 @@
  44759. You should have received a copy of the GNU Library General Public
  44760. License along with the GNU C Library; see the file COPYING.LIB. If not,
  44761. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  44762. - Boston, MA 02111-1307, USA. */
  44763. + see <http://www.gnu.org/licenses/>. */
  44764. #include <errno.h>
  44765. #include <stdlib.h>
  44766. diff -Nur uClibc-0.9.33.2/libc/stdlib/valloc.c uClibc-git/libc/stdlib/valloc.c
  44767. --- uClibc-0.9.33.2/libc/stdlib/valloc.c 2012-05-15 09:20:09.000000000 +0200
  44768. +++ uClibc-git/libc/stdlib/valloc.c 2014-07-25 20:36:06.113331056 +0200
  44769. @@ -14,8 +14,7 @@
  44770. You should have received a copy of the GNU Library General Public
  44771. License along with this library; see the file COPYING.LIB. If
  44772. -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  44773. -Cambridge, MA 02139, USA.
  44774. +not, see <http://www.gnu.org/licenses/>.
  44775. The author may be reached (Email) at the address mike@@ai.mit.edu,
  44776. or (US mail) as Mike Haertel c/o Free Software Foundation. */
  44777. diff -Nur uClibc-0.9.33.2/libc/string/arc/Makefile uClibc-git/libc/string/arc/Makefile
  44778. --- uClibc-0.9.33.2/libc/string/arc/Makefile 1970-01-01 01:00:00.000000000 +0100
  44779. +++ uClibc-git/libc/string/arc/Makefile 2014-07-25 20:36:06.149331244 +0200
  44780. @@ -0,0 +1,13 @@
  44781. +# Makefile for uClibc
  44782. +#
  44783. +# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
  44784. +#
  44785. +# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  44786. +#
  44787. +
  44788. +top_srcdir:=../../../
  44789. +top_builddir:=../../../
  44790. +all: objs
  44791. +include $(top_builddir)Rules.mak
  44792. +include ../Makefile.in
  44793. +include $(top_srcdir)Makerules
  44794. diff -Nur uClibc-0.9.33.2/libc/string/arc/memcmp.S uClibc-git/libc/string/arc/memcmp.S
  44795. --- uClibc-0.9.33.2/libc/string/arc/memcmp.S 1970-01-01 01:00:00.000000000 +0100
  44796. +++ uClibc-git/libc/string/arc/memcmp.S 2014-07-25 20:36:06.149331244 +0200
  44797. @@ -0,0 +1,128 @@
  44798. +/*
  44799. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  44800. + * Copyright (C) 2007 ARC International (UK) LTD
  44801. + *
  44802. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  44803. + */
  44804. +
  44805. +#include <sysdep.h>
  44806. +#include <features.h>
  44807. +
  44808. +#ifdef __LITTLE_ENDIAN__
  44809. +#define WORD2 r2
  44810. +#define SHIFT r3
  44811. +#else /* BIG ENDIAN */
  44812. +#define WORD2 r3
  44813. +#define SHIFT r2
  44814. +#endif
  44815. +
  44816. +ENTRY(memcmp)
  44817. + or r12,r0,r1
  44818. + asl_s r12,r12,30
  44819. + sub r3,r2,1
  44820. + brls r2,r12,.Lbytewise
  44821. + ld r4,[r0,0]
  44822. + ld r5,[r1,0]
  44823. + lsr.f lp_count,r3,3
  44824. + lpne .Loop_end
  44825. + ld_s WORD2,[r0,4]
  44826. + ld_s r12,[r1,4]
  44827. + brne r4,r5,.Leven
  44828. + ld.a r4,[r0,8]
  44829. + ld.a r5,[r1,8]
  44830. + brne WORD2,r12,.Lodd
  44831. +.Loop_end:
  44832. + asl_s SHIFT,SHIFT,3
  44833. + bhs_s .Last_cmp
  44834. + brne r4,r5,.Leven
  44835. + ld r4,[r0,4]
  44836. + ld r5,[r1,4]
  44837. +#ifdef __LITTLE_ENDIAN__
  44838. + nop_s
  44839. + ; one more load latency cycle
  44840. +.Last_cmp:
  44841. + xor r0,r4,r5
  44842. + bset r0,r0,SHIFT
  44843. + sub_s r1,r0,1
  44844. + bic_s r1,r1,r0
  44845. + norm r1,r1
  44846. + b.d .Leven_cmp
  44847. + and r1,r1,24
  44848. +.Leven:
  44849. + xor r0,r4,r5
  44850. + sub_s r1,r0,1
  44851. + bic_s r1,r1,r0
  44852. + norm r1,r1
  44853. + ; slow track insn
  44854. + and r1,r1,24
  44855. +.Leven_cmp:
  44856. + asl r2,r4,r1
  44857. + asl r12,r5,r1
  44858. + lsr_s r2,r2,1
  44859. + lsr_s r12,r12,1
  44860. + j_s.d [blink]
  44861. + sub r0,r2,r12
  44862. + .balign 4
  44863. +.Lodd:
  44864. + xor r0,WORD2,r12
  44865. + sub_s r1,r0,1
  44866. + bic_s r1,r1,r0
  44867. + norm r1,r1
  44868. + ; slow track insn
  44869. + and r1,r1,24
  44870. + asl_s r2,r2,r1
  44871. + asl_s r12,r12,r1
  44872. + lsr_s r2,r2,1
  44873. + lsr_s r12,r12,1
  44874. + j_s.d [blink]
  44875. + sub r0,r2,r12
  44876. +#else /* BIG ENDIAN */
  44877. +.Last_cmp:
  44878. + neg_s SHIFT,SHIFT
  44879. + lsr r4,r4,SHIFT
  44880. + lsr r5,r5,SHIFT
  44881. + ; slow track insn
  44882. +.Leven:
  44883. + sub.f r0,r4,r5
  44884. + mov.ne r0,1
  44885. + j_s.d [blink]
  44886. + bset.cs r0,r0,31
  44887. +.Lodd:
  44888. + cmp_s WORD2,r12
  44889. + mov_s r0,1
  44890. + j_s.d [blink]
  44891. + bset.cs r0,r0,31
  44892. +#endif /* ENDIAN */
  44893. + .balign 4
  44894. +.Lbytewise:
  44895. + breq r2,0,.Lnil
  44896. + ldb r4,[r0,0]
  44897. + ldb r5,[r1,0]
  44898. + lsr.f lp_count,r3
  44899. + lpne .Lbyte_end
  44900. + ldb_s r3,[r0,1]
  44901. + ldb r12,[r1,1]
  44902. + brne r4,r5,.Lbyte_even
  44903. + ldb.a r4,[r0,2]
  44904. + ldb.a r5,[r1,2]
  44905. + brne r3,r12,.Lbyte_odd
  44906. +.Lbyte_end:
  44907. + bcc .Lbyte_even
  44908. + brne r4,r5,.Lbyte_even
  44909. + ldb_s r3,[r0,1]
  44910. + ldb_s r12,[r1,1]
  44911. +.Lbyte_odd:
  44912. + j_s.d [blink]
  44913. + sub r0,r3,r12
  44914. +.Lbyte_even:
  44915. + j_s.d [blink]
  44916. + sub r0,r4,r5
  44917. +.Lnil:
  44918. + j_s.d [blink]
  44919. + mov r0,0
  44920. +END(memcmp)
  44921. +libc_hidden_def(memcmp)
  44922. +
  44923. +#ifdef __UCLIBC_SUSV3_LEGACY__
  44924. +strong_alias(memcmp,bcmp)
  44925. +#endif
  44926. diff -Nur uClibc-0.9.33.2/libc/string/arc/memcpy.S uClibc-git/libc/string/arc/memcpy.S
  44927. --- uClibc-0.9.33.2/libc/string/arc/memcpy.S 1970-01-01 01:00:00.000000000 +0100
  44928. +++ uClibc-git/libc/string/arc/memcpy.S 2014-07-25 20:36:06.149331244 +0200
  44929. @@ -0,0 +1,71 @@
  44930. +/*
  44931. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  44932. + * Copyright (C) 2007 ARC International (UK) LTD
  44933. + *
  44934. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  44935. + */
  44936. +
  44937. +#include <sysdep.h>
  44938. +
  44939. +/* This memcpy implementation does not support objects of 1GB or larger -
  44940. + the check for alignment does not work then. */
  44941. +/* We assume that most sources and destinations are aligned, and
  44942. + that also lengths are mostly a multiple of four, although to a lesser
  44943. + extent. */
  44944. +ENTRY(memcpy)
  44945. + or r3,r0,r1
  44946. + asl_s r3,r3,30
  44947. + mov_s r5,r0
  44948. + brls.d r2,r3,.Lcopy_bytewise
  44949. + sub.f r3,r2,1
  44950. + ld_s r12,[r1,0]
  44951. + asr.f lp_count,r3,3
  44952. + bbit0.d r3,2,.Lnox4
  44953. + bmsk_s r2,r2,1
  44954. + st.ab r12,[r5,4]
  44955. + ld.a r12,[r1,4]
  44956. +.Lnox4:
  44957. + lppnz .Lendloop
  44958. + ld_s r3,[r1,4]
  44959. + st.ab r12,[r5,4]
  44960. + ld.a r12,[r1,8]
  44961. + st.ab r3,[r5,4]
  44962. +.Lendloop:
  44963. + breq r2,0,.Last_store
  44964. + ld r3,[r5,0]
  44965. +#ifdef __LITTLE_ENDIAN__
  44966. + add3 r2,-1,r2
  44967. + ; uses long immediate
  44968. + xor_s r12,r12,r3
  44969. + bmsk r12,r12,r2
  44970. + xor_s r12,r12,r3
  44971. +#else /* BIG ENDIAN */
  44972. + sub3 r2,31,r2
  44973. + ; uses long immediate
  44974. + xor_s r3,r3,r12
  44975. + bmsk r3,r3,r2
  44976. + xor_s r12,r12,r3
  44977. +#endif /* ENDIAN */
  44978. +.Last_store:
  44979. + j_s.d [blink]
  44980. + st r12,[r5,0]
  44981. +
  44982. + .balign 4
  44983. +.Lcopy_bytewise:
  44984. + jcs [blink]
  44985. + ldb_s r12,[r1,0]
  44986. + lsr.f lp_count,r3
  44987. + bhs_s .Lnox1
  44988. + stb.ab r12,[r5,1]
  44989. + ldb.a r12,[r1,1]
  44990. +.Lnox1:
  44991. + lppnz .Lendbloop
  44992. + ldb_s r3,[r1,1]
  44993. + stb.ab r12,[r5,1]
  44994. + ldb.a r12,[r1,2]
  44995. + stb.ab r3,[r5,1]
  44996. +.Lendbloop:
  44997. + j_s.d [blink]
  44998. + stb r12,[r5,0]
  44999. +END(memcpy)
  45000. +libc_hidden_def(memcpy)
  45001. diff -Nur uClibc-0.9.33.2/libc/string/arc/memset.S uClibc-git/libc/string/arc/memset.S
  45002. --- uClibc-0.9.33.2/libc/string/arc/memset.S 1970-01-01 01:00:00.000000000 +0100
  45003. +++ uClibc-git/libc/string/arc/memset.S 2014-07-25 20:36:06.149331244 +0200
  45004. @@ -0,0 +1,51 @@
  45005. +/*
  45006. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  45007. + * Copyright (C) 2007 ARC International (UK) LTD
  45008. + *
  45009. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  45010. + */
  45011. +
  45012. +#include <sysdep.h>
  45013. +
  45014. +#define SMALL 7 /* Must be at least 6 to deal with alignment/loop issues. */
  45015. +
  45016. +ENTRY(memset)
  45017. +
  45018. + mov_s r4,r0
  45019. + or r12,r0,r2
  45020. + bmsk.f r12,r12,1
  45021. + extb_s r1,r1
  45022. + asl r3,r1,8
  45023. + beq.d .Laligned
  45024. + or_s r1,r1,r3
  45025. + brls r2,SMALL,.Ltiny
  45026. + add r3,r2,r0
  45027. + stb r1,[r3,-1]
  45028. + bclr_s r3,r3,0
  45029. + stw r1,[r3,-2]
  45030. + bmsk.f r12,r0,1
  45031. + add_s r2,r2,r12
  45032. + sub.ne r2,r2,4
  45033. + stb.ab r1,[r4,1]
  45034. + and r4,r4,-2
  45035. + stw.ab r1,[r4,2]
  45036. + and r4,r4,-4
  45037. +.Laligned: ; This code address should be aligned for speed.
  45038. + asl r3,r1,16
  45039. + lsr.f lp_count,r2,2
  45040. + or_s r1,r1,r3
  45041. + lpne .Loop_end
  45042. + st.ab r1,[r4,4]
  45043. +.Loop_end:
  45044. + j_s [blink]
  45045. +
  45046. +
  45047. + .balign 4
  45048. +.Ltiny:
  45049. + mov.f lp_count,r2
  45050. + lpne .Ltiny_end
  45051. + stb.ab r1,[r4,1]
  45052. +.Ltiny_end:
  45053. + j_s [blink]
  45054. +END(memset)
  45055. +libc_hidden_def(memset)
  45056. diff -Nur uClibc-0.9.33.2/libc/string/arc/strchr.S uClibc-git/libc/string/arc/strchr.S
  45057. --- uClibc-0.9.33.2/libc/string/arc/strchr.S 1970-01-01 01:00:00.000000000 +0100
  45058. +++ uClibc-git/libc/string/arc/strchr.S 2014-07-25 20:36:06.149331244 +0200
  45059. @@ -0,0 +1,138 @@
  45060. +/*
  45061. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  45062. + * Copyright (C) 2007 ARC International (UK) LTD
  45063. + *
  45064. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  45065. + */
  45066. +
  45067. +#include <sysdep.h>
  45068. +#include <features.h>
  45069. +
  45070. +/* ARC700 has a relatively long pipeline and branch prediction, so we want
  45071. + to avoid branches that are hard to predict. On the other hand, the
  45072. + presence of the norm instruction makes it easier to operate on whole
  45073. + words branch-free. */
  45074. +
  45075. +ENTRY(strchr)
  45076. + extb_s r1,r1
  45077. + asl r5,r1,8
  45078. + bmsk r2,r0,1
  45079. + or r5,r5,r1
  45080. + mov_s r3,0x01010101
  45081. + breq.d r2,r0,.Laligned
  45082. + asl r4,r5,16
  45083. + sub_s r0,r0,r2
  45084. + asl r7,r2,3
  45085. + ld_s r2,[r0]
  45086. +#ifdef __LITTLE_ENDIAN__
  45087. + asl r7,r3,r7
  45088. +#else
  45089. + lsr r7,r3,r7
  45090. +#endif
  45091. + or r5,r5,r4
  45092. + ror r4,r3
  45093. + sub r12,r2,r7
  45094. + bic_s r12,r12,r2
  45095. + and r12,r12,r4
  45096. + brne.d r12,0,.Lfound0_ua
  45097. + xor r6,r2,r5
  45098. + ld.a r2,[r0,4]
  45099. + sub r12,r6,r7
  45100. + bic r12,r12,r6
  45101. +#ifdef __LITTLE_ENDIAN__
  45102. + and r7,r12,r4
  45103. + breq r7,0,.Loop ; For speed, we want this branch to be unaligned.
  45104. + b .Lfound_char ; Likewise this one.
  45105. +#else
  45106. + and r12,r12,r4
  45107. + breq r12,0,.Loop ; For speed, we want this branch to be unaligned.
  45108. + lsr_s r12,r12,7
  45109. + bic r2,r7,r6
  45110. + b.d .Lfound_char_b
  45111. + and_s r2,r2,r12
  45112. +#endif
  45113. +; /* We require this code address to be unaligned for speed... */
  45114. +.Laligned:
  45115. + ld_s r2,[r0]
  45116. + or r5,r5,r4
  45117. + ror r4,r3
  45118. +; /* ... so that this code address is aligned, for itself and ... */
  45119. +.Loop:
  45120. + sub r12,r2,r3
  45121. + bic_s r12,r12,r2
  45122. + and r12,r12,r4
  45123. + brne.d r12,0,.Lfound0
  45124. + xor r6,r2,r5
  45125. + ld.a r2,[r0,4]
  45126. + sub r12,r6,r3
  45127. + bic r12,r12,r6
  45128. + and r7,r12,r4
  45129. + breq r7,0,.Loop /* ... so that this branch is unaligned. */
  45130. + ; Found searched-for character. r0 has already advanced to next word.
  45131. +#ifdef __LITTLE_ENDIAN__
  45132. +/* We only need the information about the first matching byte
  45133. + (i.e. the least significant matching byte) to be exact,
  45134. + hence there is no problem with carry effects. */
  45135. +.Lfound_char:
  45136. + sub r3,r7,1
  45137. + bic r3,r3,r7
  45138. + norm r2,r3
  45139. + sub_s r0,r0,1
  45140. + asr_s r2,r2,3
  45141. + j.d [blink]
  45142. + sub_s r0,r0,r2
  45143. +
  45144. + .balign 4
  45145. +.Lfound0_ua:
  45146. + mov r3,r7
  45147. +.Lfound0:
  45148. + sub r3,r6,r3
  45149. + bic r3,r3,r6
  45150. + and r2,r3,r4
  45151. + or_s r12,r12,r2
  45152. + sub_s r3,r12,1
  45153. + bic_s r3,r3,r12
  45154. + norm r3,r3
  45155. + add_s r0,r0,3
  45156. + asr_s r12,r3,3
  45157. + asl.f 0,r2,r3
  45158. + sub_s r0,r0,r12
  45159. + j_s.d [blink]
  45160. + mov.pl r0,0
  45161. +#else /* BIG ENDIAN */
  45162. +.Lfound_char:
  45163. + lsr r7,r7,7
  45164. +
  45165. + bic r2,r7,r6
  45166. +.Lfound_char_b:
  45167. + norm r2,r2
  45168. + sub_s r0,r0,4
  45169. + asr_s r2,r2,3
  45170. + j.d [blink]
  45171. + add_s r0,r0,r2
  45172. +
  45173. +.Lfound0_ua:
  45174. + mov_s r3,r7
  45175. +.Lfound0:
  45176. + asl_s r2,r2,7
  45177. + or r7,r6,r4
  45178. + bic_s r12,r12,r2
  45179. + sub r2,r7,r3
  45180. + or r2,r2,r6
  45181. + bic r12,r2,r12
  45182. + bic.f r3,r4,r12
  45183. + norm r3,r3
  45184. +
  45185. + add.pl r3,r3,1
  45186. + asr_s r12,r3,3
  45187. + asl.f 0,r2,r3
  45188. + add_s r0,r0,r12
  45189. + j_s.d [blink]
  45190. + mov.mi r0,0
  45191. +#endif /* ENDIAN */
  45192. +END(strchr)
  45193. +libc_hidden_def(strchr)
  45194. +
  45195. +#ifdef __UCLIBC_SUSV3_LEGACY__
  45196. +strong_alias(strchr,index)
  45197. +#endif
  45198. diff -Nur uClibc-0.9.33.2/libc/string/arc/strcmp.S uClibc-git/libc/string/arc/strcmp.S
  45199. --- uClibc-0.9.33.2/libc/string/arc/strcmp.S 1970-01-01 01:00:00.000000000 +0100
  45200. +++ uClibc-git/libc/string/arc/strcmp.S 2014-07-25 20:36:06.149331244 +0200
  45201. @@ -0,0 +1,102 @@
  45202. +/*
  45203. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  45204. + * Copyright (C) 2007 ARC International (UK) LTD
  45205. + *
  45206. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  45207. + */
  45208. +
  45209. +#include <features.h>
  45210. +#include <sysdep.h>
  45211. +
  45212. +/* This is optimized primarily for the ARC700.
  45213. + It would be possible to speed up the loops by one cycle / word
  45214. + respective one cycle / byte by forcing double source 1 alignment, unrolling
  45215. + by a factor of two, and speculatively loading the second word / byte of
  45216. + source 1; however, that would increase the overhead for loop setup / finish,
  45217. + and strcmp might often terminate early. */
  45218. +
  45219. +ENTRY(strcmp)
  45220. + or r2,r0,r1
  45221. + bmsk_s r2,r2,1
  45222. + brne r2,0,.Lcharloop
  45223. + mov_s r12,0x01010101
  45224. + ror r5,r12
  45225. +.Lwordloop:
  45226. + ld.ab r2,[r0,4]
  45227. + ld.ab r3,[r1,4]
  45228. + nop_s
  45229. + sub r4,r2,r12
  45230. + bic r4,r4,r2
  45231. + and r4,r4,r5
  45232. + brne r4,0,.Lfound0
  45233. + breq r2,r3,.Lwordloop
  45234. +#ifdef __LITTLE_ENDIAN__
  45235. + xor r0,r2,r3 ; mask for difference
  45236. + sub_s r1,r0,1
  45237. + bic_s r0,r0,r1 ; mask for least significant difference bit
  45238. + sub r1,r5,r0
  45239. + xor r0,r5,r1 ; mask for least significant difference byte
  45240. + and_s r2,r2,r0
  45241. + and_s r3,r3,r0
  45242. +#endif /* LITTLE ENDIAN */
  45243. + cmp_s r2,r3
  45244. + mov_s r0,1
  45245. + j_s.d [blink]
  45246. + bset.lo r0,r0,31
  45247. +
  45248. + .balign 4
  45249. +#ifdef __LITTLE_ENDIAN__
  45250. +.Lfound0:
  45251. + xor r0,r2,r3 ; mask for difference
  45252. + or r0,r0,r4 ; or in zero indicator
  45253. + sub_s r1,r0,1
  45254. + bic_s r0,r0,r1 ; mask for least significant difference bit
  45255. + sub r1,r5,r0
  45256. + xor r0,r5,r1 ; mask for least significant difference byte
  45257. + and_s r2,r2,r0
  45258. + and_s r3,r3,r0
  45259. + sub.f r0,r2,r3
  45260. + mov.hi r0,1
  45261. + j_s.d [blink]
  45262. + bset.lo r0,r0,31
  45263. +#else /* BIG ENDIAN */
  45264. + /* The zero-detection above can mis-detect 0x01 bytes as zeroes
  45265. + because of carry-propagateion from a lower significant zero byte.
  45266. + We can compensate for this by checking that bit0 is zero.
  45267. + This compensation is not necessary in the step where we
  45268. + get a low estimate for r2, because in any affected bytes
  45269. + we already have 0x00 or 0x01, which will remain unchanged
  45270. + when bit 7 is cleared. */
  45271. + .balign 4
  45272. +.Lfound0:
  45273. + lsr r0,r4,8
  45274. + lsr_s r1,r2
  45275. + bic_s r2,r2,r0 ; get low estimate for r2 and get ...
  45276. + bic_s r0,r0,r1 ; <this is the adjusted mask for zeros>
  45277. + or_s r3,r3,r0 ; ... high estimate r3 so that r2 > r3 will ...
  45278. + cmp_s r3,r2 ; ... be independent of trailing garbage
  45279. + or_s r2,r2,r0 ; likewise for r3 > r2
  45280. + bic_s r3,r3,r0
  45281. + rlc r0,0 ; r0 := r2 > r3 ? 1 : 0
  45282. + cmp_s r2,r3
  45283. + j_s.d [blink]
  45284. + bset.lo r0,r0,31
  45285. +#endif /* ENDIAN */
  45286. +
  45287. + .balign 4
  45288. +.Lcharloop:
  45289. + ldb.ab r2,[r0,1]
  45290. + ldb.ab r3,[r1,1]
  45291. + nop_s
  45292. + breq r2,0,.Lcmpend
  45293. + breq r2,r3,.Lcharloop
  45294. +.Lcmpend:
  45295. + j_s.d [blink]
  45296. + sub r0,r2,r3
  45297. +END(strcmp)
  45298. +libc_hidden_def(strcmp)
  45299. +
  45300. +#ifndef __UCLIBC_HAS_LOCALE__
  45301. +strong_alias(strcmp,strcoll)
  45302. +libc_hidden_def(strcoll)
  45303. +#endif
  45304. diff -Nur uClibc-0.9.33.2/libc/string/arc/strcpy.S uClibc-git/libc/string/arc/strcpy.S
  45305. --- uClibc-0.9.33.2/libc/string/arc/strcpy.S 1970-01-01 01:00:00.000000000 +0100
  45306. +++ uClibc-git/libc/string/arc/strcpy.S 2014-07-25 20:36:06.149331244 +0200
  45307. @@ -0,0 +1,71 @@
  45308. +/*
  45309. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  45310. + * Copyright (C) 2007 ARC International (UK) LTD
  45311. + *
  45312. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  45313. + */
  45314. +
  45315. +
  45316. +#include <sysdep.h>
  45317. +
  45318. +/* If dst and src are 4 byte aligned, copy 8 bytes at a time.
  45319. + If the src is 4, but not 8 byte aligned, we first read 4 bytes to get
  45320. + it 8 byte aligned. Thus, we can do a little read-ahead, without
  45321. + dereferencing a cache line that we should not touch.
  45322. + Note that short and long instructions have been scheduled to avoid
  45323. + branch stalls.
  45324. + The beq_s to r3z could be made unaligned & long to avoid a stall
  45325. + there, but the it is not likely to be taken often, and it
  45326. + would also be likey to cost an unaligned mispredict at the next call. */
  45327. +
  45328. +ENTRY(strcpy)
  45329. + or r2,r0,r1
  45330. + bmsk_s r2,r2,1
  45331. + brne.d r2,0,charloop
  45332. + mov_s r10,r0
  45333. + ld_s r3,[r1,0]
  45334. + mov r8,0x01010101
  45335. + bbit0.d r1,2,loop_start
  45336. + ror r12,r8
  45337. + sub r2,r3,r8
  45338. + bic_s r2,r2,r3
  45339. + tst_s r2,r12
  45340. + bne r3z
  45341. + mov_s r4,r3
  45342. + .balign 4
  45343. +loop:
  45344. + ld.a r3,[r1,4]
  45345. + st.ab r4,[r10,4]
  45346. +loop_start:
  45347. + ld.a r4,[r1,4]
  45348. + sub r2,r3,r8
  45349. + bic_s r2,r2,r3
  45350. + tst_s r2,r12
  45351. + bne_s r3z
  45352. + st.ab r3,[r10,4]
  45353. + sub r2,r4,r8
  45354. + bic r2,r2,r4
  45355. + tst r2,r12
  45356. + beq loop
  45357. + mov_s r3,r4
  45358. +#ifdef __LITTLE_ENDIAN__
  45359. +r3z: bmsk.f r1,r3,7
  45360. + lsr_s r3,r3,8
  45361. +#else
  45362. +r3z: lsr.f r1,r3,24
  45363. + asl_s r3,r3,8
  45364. +#endif
  45365. + bne.d r3z
  45366. + stb.ab r1,[r10,1]
  45367. + j_s [blink]
  45368. +
  45369. + .balign 4
  45370. +charloop:
  45371. + ldb.ab r3,[r1,1]
  45372. +
  45373. +
  45374. + brne.d r3,0,charloop
  45375. + stb.ab r3,[r10,1]
  45376. + j [blink]
  45377. +END(strcpy)
  45378. +libc_hidden_def(strcpy)
  45379. diff -Nur uClibc-0.9.33.2/libc/string/arc/strlen.S uClibc-git/libc/string/arc/strlen.S
  45380. --- uClibc-0.9.33.2/libc/string/arc/strlen.S 1970-01-01 01:00:00.000000000 +0100
  45381. +++ uClibc-git/libc/string/arc/strlen.S 2014-07-25 20:36:06.149331244 +0200
  45382. @@ -0,0 +1,84 @@
  45383. +/*
  45384. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  45385. + * Copyright (C) 2007 ARC International (UK) LTD
  45386. + *
  45387. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  45388. + */
  45389. +
  45390. +
  45391. +#include <sysdep.h>
  45392. +
  45393. +ENTRY(strlen)
  45394. + or r3,r0,7
  45395. + ld r2,[r3,-7]
  45396. + ld.a r6,[r3,-3]
  45397. + mov r4,0x01010101
  45398. + ; uses long immediate
  45399. +#ifdef __LITTLE_ENDIAN__
  45400. + asl_s r1,r0,3
  45401. + btst_s r0,2
  45402. + asl r7,r4,r1
  45403. + ror r5,r4
  45404. + sub r1,r2,r7
  45405. + bic_s r1,r1,r2
  45406. + mov.eq r7,r4
  45407. + sub r12,r6,r7
  45408. + bic r12,r12,r6
  45409. + or.eq r12,r12,r1
  45410. + and r12,r12,r5
  45411. + brne r12,0,.Learly_end
  45412. +#else /* BIG ENDIAN */
  45413. + ror r5,r4
  45414. + btst_s r0,2
  45415. + mov_s r1,31
  45416. + sub3 r7,r1,r0
  45417. + sub r1,r2,r4
  45418. + bic_s r1,r1,r2
  45419. + bmsk r1,r1,r7
  45420. + sub r12,r6,r4
  45421. + bic r12,r12,r6
  45422. + bmsk.ne r12,r12,r7
  45423. + or.eq r12,r12,r1
  45424. + and r12,r12,r5
  45425. + brne r12,0,.Learly_end
  45426. +#endif /* ENDIAN */
  45427. +
  45428. +.Loop:
  45429. + ld_s r2,[r3,4]
  45430. + ld.a r6,[r3,8]
  45431. + ; stall for load result
  45432. + sub r1,r2,r4
  45433. + bic_s r1,r1,r2
  45434. + sub r12,r6,r4
  45435. + bic r12,r12,r6
  45436. + or r12,r12,r1
  45437. + and r12,r12,r5
  45438. + breq r12,0,.Loop
  45439. +.Lend:
  45440. + and.f r1,r1,r5
  45441. + sub.ne r3,r3,4
  45442. + mov.eq r1,r12
  45443. +#ifdef __LITTLE_ENDIAN__
  45444. + sub_s r2,r1,1
  45445. + bic_s r2,r2,r1
  45446. + norm r1,r2
  45447. + sub_s r0,r0,3
  45448. + lsr_s r1,r1,3
  45449. + sub r0,r3,r0
  45450. + j_s.d [blink]
  45451. + sub r0,r0,r1
  45452. +#else /* BIG ENDIAN */
  45453. + lsr_s r1,r1,7
  45454. + mov.eq r2,r6
  45455. + bic_s r1,r1,r2
  45456. + norm r1,r1
  45457. + sub r0,r3,r0
  45458. + lsr_s r1,r1,3
  45459. + j_s.d [blink]
  45460. + add r0,r0,r1
  45461. +#endif /* ENDIAN */
  45462. +.Learly_end:
  45463. + b.d .Lend
  45464. + sub_s.ne r1,r1,r1
  45465. +END(strlen)
  45466. +libc_hidden_def(strlen)
  45467. diff -Nur uClibc-0.9.33.2/libc/string/arm/memcmp.S uClibc-git/libc/string/arm/memcmp.S
  45468. --- uClibc-0.9.33.2/libc/string/arm/memcmp.S 2012-05-15 09:20:09.000000000 +0200
  45469. +++ uClibc-git/libc/string/arm/memcmp.S 2014-07-25 20:36:06.161331307 +0200
  45470. @@ -31,6 +31,7 @@
  45471. #include <features.h>
  45472. #include <bits/arm_asm.h>
  45473. +#include <bits/arm_bx.h>
  45474. .text
  45475. .global memcmp
  45476. diff -Nur uClibc-0.9.33.2/libc/string/arm/_memcpy.S uClibc-git/libc/string/arm/_memcpy.S
  45477. --- uClibc-0.9.33.2/libc/string/arm/_memcpy.S 2012-05-15 09:20:09.000000000 +0200
  45478. +++ uClibc-git/libc/string/arm/_memcpy.S 2014-07-25 20:36:06.161331307 +0200
  45479. @@ -40,6 +40,7 @@
  45480. #include <features.h>
  45481. #include <endian.h>
  45482. #include <bits/arm_asm.h>
  45483. +#include <bits/arm_bx.h>
  45484. #if !defined(THUMB1_ONLY)
  45485. /*
  45486. diff -Nur uClibc-0.9.33.2/libc/string/arm/memset.S uClibc-git/libc/string/arm/memset.S
  45487. --- uClibc-0.9.33.2/libc/string/arm/memset.S 2012-05-15 09:20:09.000000000 +0200
  45488. +++ uClibc-git/libc/string/arm/memset.S 2014-07-25 20:36:06.161331307 +0200
  45489. @@ -13,13 +13,13 @@
  45490. Lesser General Public License for more details.
  45491. You should have received a copy of the GNU Lesser General Public
  45492. - License along with the GNU C Library; if not, write to the Free
  45493. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45494. - 02111-1307 USA. */
  45495. + License along with the GNU C Library; if not, see
  45496. + <http://www.gnu.org/licenses/>. */
  45497. #include <features.h>
  45498. #include <sys/syscall.h>
  45499. #include <bits/arm_asm.h>
  45500. +#include <bits/arm_bx.h>
  45501. .text
  45502. .global memset
  45503. diff -Nur uClibc-0.9.33.2/libc/string/arm/strcmp.S uClibc-git/libc/string/arm/strcmp.S
  45504. --- uClibc-0.9.33.2/libc/string/arm/strcmp.S 2012-05-15 09:20:09.000000000 +0200
  45505. +++ uClibc-git/libc/string/arm/strcmp.S 2014-07-25 20:36:06.161331307 +0200
  45506. @@ -31,6 +31,7 @@
  45507. #include <features.h>
  45508. #include <bits/arm_asm.h>
  45509. +#include <bits/arm_bx.h>
  45510. .text
  45511. .global strcmp
  45512. diff -Nur uClibc-0.9.33.2/libc/string/arm/strlen.S uClibc-git/libc/string/arm/strlen.S
  45513. --- uClibc-0.9.33.2/libc/string/arm/strlen.S 2012-05-15 09:20:09.000000000 +0200
  45514. +++ uClibc-git/libc/string/arm/strlen.S 2014-07-25 20:36:06.161331307 +0200
  45515. @@ -13,14 +13,14 @@
  45516. Lesser General Public License for more details.
  45517. You should have received a copy of the GNU Lesser General Public
  45518. - License along with the GNU C Library; if not, write to the Free
  45519. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45520. - 02111-1307 USA. */
  45521. + License along with the GNU C Library; if not, see
  45522. + <http://www.gnu.org/licenses/>. */
  45523. #include <features.h>
  45524. #include <endian.h>
  45525. #include <sys/syscall.h>
  45526. #include <bits/arm_asm.h>
  45527. +#include <bits/arm_bx.h>
  45528. /* size_t strlen(const char *S)
  45529. * entry: r0 -> string
  45530. diff -Nur uClibc-0.9.33.2/libc/string/avr32/Makefile uClibc-git/libc/string/avr32/Makefile
  45531. --- uClibc-0.9.33.2/libc/string/avr32/Makefile 2012-05-15 09:20:09.000000000 +0200
  45532. +++ uClibc-git/libc/string/avr32/Makefile 2014-07-25 20:36:06.181331412 +0200
  45533. @@ -13,8 +13,7 @@
  45534. # details.
  45535. #
  45536. # You should have received a copy of the GNU Library General Public License
  45537. -# along with this program; if not, write to the Free Software Foundation, Inc.,
  45538. -# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  45539. +# along with this program; if not, see <http://www.gnu.org/licenses/>.
  45540. top_srcdir := ../../../
  45541. top_builddir := ../../../
  45542. diff -Nur uClibc-0.9.33.2/libc/string/basename.c uClibc-git/libc/string/basename.c
  45543. --- uClibc-0.9.33.2/libc/string/basename.c 2012-05-15 09:20:09.000000000 +0200
  45544. +++ uClibc-git/libc/string/basename.c 2014-07-25 20:36:06.181331412 +0200
  45545. @@ -5,7 +5,7 @@
  45546. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  45547. */
  45548. -#include "_string.h"
  45549. +#include <string.h>
  45550. #ifdef __USE_GNU
  45551. @@ -24,5 +24,4 @@
  45552. return (char *) p;
  45553. }
  45554. -libc_hidden_def(basename)
  45555. #endif
  45556. diff -Nur uClibc-0.9.33.2/libc/string/bcopy.c uClibc-git/libc/string/bcopy.c
  45557. --- uClibc-0.9.33.2/libc/string/bcopy.c 2012-05-15 09:20:09.000000000 +0200
  45558. +++ uClibc-git/libc/string/bcopy.c 2014-07-25 20:36:06.181331412 +0200
  45559. @@ -5,11 +5,9 @@
  45560. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  45561. */
  45562. -#include "_string.h"
  45563. +#include <string.h>
  45564. #ifdef __UCLIBC_SUSV3_LEGACY__
  45565. -
  45566. -
  45567. void bcopy(const void *s2, void *s1, size_t n)
  45568. {
  45569. #if 1
  45570. diff -Nur uClibc-0.9.33.2/libc/string/bzero.c uClibc-git/libc/string/bzero.c
  45571. --- uClibc-0.9.33.2/libc/string/bzero.c 2012-05-15 09:20:09.000000000 +0200
  45572. +++ uClibc-git/libc/string/bzero.c 2014-07-25 20:36:06.193331475 +0200
  45573. @@ -5,7 +5,7 @@
  45574. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  45575. */
  45576. -#include "_string.h"
  45577. +#include <string.h>
  45578. #ifdef __UCLIBC_SUSV3_LEGACY__
  45579. void bzero(void *s, size_t n)
  45580. diff -Nur uClibc-0.9.33.2/libc/string/_collate.c uClibc-git/libc/string/_collate.c
  45581. --- uClibc-0.9.33.2/libc/string/_collate.c 2012-05-15 09:20:09.000000000 +0200
  45582. +++ uClibc-git/libc/string/_collate.c 2014-07-25 20:36:06.137331182 +0200
  45583. @@ -159,7 +159,7 @@
  45584. #define N (1)
  45585. #else /* WANT_WIDE */
  45586. wchar_t WC;
  45587. - size_t n0, nx;
  45588. + size_t n0, nx = 0;
  45589. #define N n0
  45590. #endif /* WANT_WIDE */
  45591. diff -Nur uClibc-0.9.33.2/libc/string/cris/memcopy.h uClibc-git/libc/string/cris/memcopy.h
  45592. --- uClibc-0.9.33.2/libc/string/cris/memcopy.h 2012-05-15 09:20:09.000000000 +0200
  45593. +++ uClibc-git/libc/string/cris/memcopy.h 2014-07-25 20:36:06.209331558 +0200
  45594. @@ -16,8 +16,7 @@
  45595. You should have received a copy of the GNU Library General Public
  45596. License along with the GNU C Library; see the file COPYING.LIB. If not,
  45597. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  45598. - Boston, MA 02111-1307, USA. */
  45599. + see <http://www.gnu.org/licenses/>. */
  45600. #include "../generic/memcopy.h"
  45601. diff -Nur uClibc-0.9.33.2/libc/string/cris/memmove.c uClibc-git/libc/string/cris/memmove.c
  45602. --- uClibc-0.9.33.2/libc/string/cris/memmove.c 2012-05-15 09:20:09.000000000 +0200
  45603. +++ uClibc-git/libc/string/cris/memmove.c 2014-07-25 20:36:06.213331580 +0200
  45604. @@ -18,9 +18,8 @@
  45605. Lesser General Public License for more details.
  45606. You should have received a copy of the GNU Lesser General Public
  45607. - License along with the GNU C Library; if not, write to the Free
  45608. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45609. - 02111-1307 USA. */
  45610. + License along with the GNU C Library; if not, see
  45611. + <http://www.gnu.org/licenses/>. */
  45612. #include <string.h>
  45613. diff -Nur uClibc-0.9.33.2/libc/string/dirname.c uClibc-git/libc/string/dirname.c
  45614. --- uClibc-0.9.33.2/libc/string/dirname.c 2012-05-15 09:20:09.000000000 +0200
  45615. +++ uClibc-git/libc/string/dirname.c 2014-07-25 20:36:06.213331580 +0200
  45616. @@ -5,7 +5,8 @@
  45617. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  45618. */
  45619. -#include "_string.h"
  45620. +#define __need_NULL
  45621. +#include <stddef.h>
  45622. #include <libgen.h>
  45623. char *dirname(char *path)
  45624. diff -Nur uClibc-0.9.33.2/libc/string/ffsll.c uClibc-git/libc/string/ffsll.c
  45625. --- uClibc-0.9.33.2/libc/string/ffsll.c 2012-05-15 09:20:09.000000000 +0200
  45626. +++ uClibc-git/libc/string/ffsll.c 2014-07-25 20:36:06.213331580 +0200
  45627. @@ -13,9 +13,8 @@
  45628. Lesser General Public License for more details.
  45629. You should have received a copy of the GNU Lesser General Public
  45630. - License along with the GNU C Library; if not, write to the Free
  45631. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45632. - 02111-1307 USA. */
  45633. + License along with the GNU C Library; if not, see
  45634. + <http://www.gnu.org/licenses/>. */
  45635. #include <limits.h>
  45636. #include <string.h>
  45637. diff -Nur uClibc-0.9.33.2/libc/string/frv/memcpy.S uClibc-git/libc/string/frv/memcpy.S
  45638. --- uClibc-0.9.33.2/libc/string/frv/memcpy.S 2012-05-15 09:20:09.000000000 +0200
  45639. +++ uClibc-git/libc/string/frv/memcpy.S 2014-07-25 20:36:06.225331642 +0200
  45640. @@ -14,8 +14,8 @@
  45641. * Library General Public License for more details.
  45642. *
  45643. * You should have received a copy of the GNU Library General Public
  45644. - * License along with this library; if not, write to the Free
  45645. - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  45646. + * License along with this library; if not, see
  45647. + * <http://www.gnu.org/licenses/>.
  45648. */
  45649. #include <features.h>
  45650. diff -Nur uClibc-0.9.33.2/libc/string/frv/memset.S uClibc-git/libc/string/frv/memset.S
  45651. --- uClibc-0.9.33.2/libc/string/frv/memset.S 2012-05-15 09:20:09.000000000 +0200
  45652. +++ uClibc-git/libc/string/frv/memset.S 2014-07-25 20:36:06.225331642 +0200
  45653. @@ -14,8 +14,8 @@
  45654. * Library General Public License for more details.
  45655. *
  45656. * You should have received a copy of the GNU Library General Public
  45657. - * License along with this library; if not, write to the Free
  45658. - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  45659. + * License along with this library; if not, see
  45660. + * <http://www.gnu.org/licenses/>.
  45661. */
  45662. #include <features.h>
  45663. diff -Nur uClibc-0.9.33.2/libc/string/generic/memchr.c uClibc-git/libc/string/generic/memchr.c
  45664. --- uClibc-0.9.33.2/libc/string/generic/memchr.c 2012-05-15 09:20:09.000000000 +0200
  45665. +++ uClibc-git/libc/string/generic/memchr.c 2014-07-25 20:36:06.237331706 +0200
  45666. @@ -17,9 +17,8 @@
  45667. Lesser General Public License for more details.
  45668. You should have received a copy of the GNU Lesser General Public
  45669. - License along with the GNU C Library; if not, write to the Free
  45670. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45671. - 02111-1307 USA. */
  45672. + License along with the GNU C Library; if not, see
  45673. + <http://www.gnu.org/licenses/>. */
  45674. #include <string.h>
  45675. #include <stdlib.h>
  45676. diff -Nur uClibc-0.9.33.2/libc/string/generic/memcmp.c uClibc-git/libc/string/generic/memcmp.c
  45677. --- uClibc-0.9.33.2/libc/string/generic/memcmp.c 2012-05-15 09:20:09.000000000 +0200
  45678. +++ uClibc-git/libc/string/generic/memcmp.c 2014-07-25 20:36:06.237331706 +0200
  45679. @@ -14,9 +14,8 @@
  45680. Lesser General Public License for more details.
  45681. You should have received a copy of the GNU Lesser General Public
  45682. - License along with the GNU C Library; if not, write to the Free
  45683. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45684. - 02111-1307 USA. */
  45685. + License along with the GNU C Library; if not, see
  45686. + <http://www.gnu.org/licenses/>. */
  45687. #include <string.h>
  45688. #include "memcopy.h"
  45689. diff -Nur uClibc-0.9.33.2/libc/string/generic/memcopy.h uClibc-git/libc/string/generic/memcopy.h
  45690. --- uClibc-0.9.33.2/libc/string/generic/memcopy.h 2012-05-15 09:20:09.000000000 +0200
  45691. +++ uClibc-git/libc/string/generic/memcopy.h 2014-07-25 20:36:06.237331706 +0200
  45692. @@ -14,9 +14,8 @@
  45693. Lesser General Public License for more details.
  45694. You should have received a copy of the GNU Lesser General Public
  45695. - License along with the GNU C Library; if not, write to the Free
  45696. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45697. - 02111-1307 USA. */
  45698. + License along with the GNU C Library; if not, see
  45699. + <http://www.gnu.org/licenses/>. */
  45700. /* The strategy of the memory functions is:
  45701. diff -Nur uClibc-0.9.33.2/libc/string/generic/memcpy.c uClibc-git/libc/string/generic/memcpy.c
  45702. --- uClibc-0.9.33.2/libc/string/generic/memcpy.c 2012-05-15 09:20:09.000000000 +0200
  45703. +++ uClibc-git/libc/string/generic/memcpy.c 2014-07-25 20:36:06.237331706 +0200
  45704. @@ -15,9 +15,8 @@
  45705. Lesser General Public License for more details.
  45706. You should have received a copy of the GNU Lesser General Public
  45707. - License along with the GNU C Library; if not, write to the Free
  45708. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45709. - 02111-1307 USA. */
  45710. + License along with the GNU C Library; if not, see
  45711. + <http://www.gnu.org/licenses/>. */
  45712. #include <string.h>
  45713. #include "memcopy.h"
  45714. diff -Nur uClibc-0.9.33.2/libc/string/generic/memmem.c uClibc-git/libc/string/generic/memmem.c
  45715. --- uClibc-0.9.33.2/libc/string/generic/memmem.c 2012-05-15 09:20:09.000000000 +0200
  45716. +++ uClibc-git/libc/string/generic/memmem.c 2014-07-25 20:36:06.237331706 +0200
  45717. @@ -12,9 +12,8 @@
  45718. Lesser General Public License for more details.
  45719. You should have received a copy of the GNU Lesser General Public
  45720. - License along with the GNU C Library; if not, write to the Free
  45721. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45722. - 02111-1307 USA. */
  45723. + License along with the GNU C Library; if not, see
  45724. + <http://www.gnu.org/licenses/>. */
  45725. #include <string.h>
  45726. #include <stddef.h>
  45727. diff -Nur uClibc-0.9.33.2/libc/string/generic/memmove.c uClibc-git/libc/string/generic/memmove.c
  45728. --- uClibc-0.9.33.2/libc/string/generic/memmove.c 2012-05-15 09:20:09.000000000 +0200
  45729. +++ uClibc-git/libc/string/generic/memmove.c 2014-07-25 20:36:06.237331706 +0200
  45730. @@ -15,9 +15,8 @@
  45731. Lesser General Public License for more details.
  45732. You should have received a copy of the GNU Lesser General Public
  45733. - License along with the GNU C Library; if not, write to the Free
  45734. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45735. - 02111-1307 USA. */
  45736. + License along with the GNU C Library; if not, see
  45737. + <http://www.gnu.org/licenses/>. */
  45738. #include <string.h>
  45739. diff -Nur uClibc-0.9.33.2/libc/string/generic/memrchr.c uClibc-git/libc/string/generic/memrchr.c
  45740. --- uClibc-0.9.33.2/libc/string/generic/memrchr.c 2012-05-15 09:20:09.000000000 +0200
  45741. +++ uClibc-git/libc/string/generic/memrchr.c 2014-07-25 20:36:06.237331706 +0200
  45742. @@ -18,9 +18,8 @@
  45743. Lesser General Public License for more details.
  45744. You should have received a copy of the GNU Lesser General Public
  45745. - License along with the GNU C Library; if not, write to the Free
  45746. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45747. - 02111-1307 USA. */
  45748. + License along with the GNU C Library; if not, see
  45749. + <http://www.gnu.org/licenses/>. */
  45750. #include <string.h>
  45751. #include <stdlib.h>
  45752. diff -Nur uClibc-0.9.33.2/libc/string/generic/memset.c uClibc-git/libc/string/generic/memset.c
  45753. --- uClibc-0.9.33.2/libc/string/generic/memset.c 2012-05-15 09:20:09.000000000 +0200
  45754. +++ uClibc-git/libc/string/generic/memset.c 2014-07-25 20:36:06.237331706 +0200
  45755. @@ -12,9 +12,8 @@
  45756. Lesser General Public License for more details.
  45757. You should have received a copy of the GNU Lesser General Public
  45758. - License along with the GNU C Library; if not, write to the Free
  45759. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45760. - 02111-1307 USA. */
  45761. + License along with the GNU C Library; if not, see
  45762. + <http://www.gnu.org/licenses/>. */
  45763. #include <string.h>
  45764. #include "memcopy.h"
  45765. diff -Nur uClibc-0.9.33.2/libc/string/generic/pagecopy.h uClibc-git/libc/string/generic/pagecopy.h
  45766. --- uClibc-0.9.33.2/libc/string/generic/pagecopy.h 2012-05-15 09:20:09.000000000 +0200
  45767. +++ uClibc-git/libc/string/generic/pagecopy.h 2014-07-25 20:36:06.237331706 +0200
  45768. @@ -13,9 +13,8 @@
  45769. Lesser General Public License for more details.
  45770. You should have received a copy of the GNU Lesser General Public
  45771. - License along with the GNU C Library; if not, write to the Free
  45772. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45773. - 02111-1307 USA. */
  45774. + License along with the GNU C Library; if not, see
  45775. + <http://www.gnu.org/licenses/>. */
  45776. /* This file defines the macro:
  45777. diff -Nur uClibc-0.9.33.2/libc/string/generic/rawmemchr.c uClibc-git/libc/string/generic/rawmemchr.c
  45778. --- uClibc-0.9.33.2/libc/string/generic/rawmemchr.c 2012-05-15 09:20:09.000000000 +0200
  45779. +++ uClibc-git/libc/string/generic/rawmemchr.c 2014-07-25 20:36:06.237331706 +0200
  45780. @@ -17,9 +17,8 @@
  45781. Lesser General Public License for more details.
  45782. You should have received a copy of the GNU Lesser General Public
  45783. - License along with the GNU C Library; if not, write to the Free
  45784. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45785. - 02111-1307 USA. */
  45786. + License along with the GNU C Library; if not, see
  45787. + <http://www.gnu.org/licenses/>. */
  45788. #include <string.h>
  45789. #include <stdlib.h>
  45790. diff -Nur uClibc-0.9.33.2/libc/string/generic/strcat.c uClibc-git/libc/string/generic/strcat.c
  45791. --- uClibc-0.9.33.2/libc/string/generic/strcat.c 2012-05-15 09:20:09.000000000 +0200
  45792. +++ uClibc-git/libc/string/generic/strcat.c 2014-07-25 20:36:06.237331706 +0200
  45793. @@ -12,9 +12,8 @@
  45794. Lesser General Public License for more details.
  45795. You should have received a copy of the GNU Lesser General Public
  45796. - License along with the GNU C Library; if not, write to the Free
  45797. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45798. - 02111-1307 USA. */
  45799. + License along with the GNU C Library; if not, see
  45800. + <http://www.gnu.org/licenses/>. */
  45801. #include <string.h>
  45802. #include "memcopy.h"
  45803. diff -Nur uClibc-0.9.33.2/libc/string/generic/strchr.c uClibc-git/libc/string/generic/strchr.c
  45804. --- uClibc-0.9.33.2/libc/string/generic/strchr.c 2012-05-15 09:20:09.000000000 +0200
  45805. +++ uClibc-git/libc/string/generic/strchr.c 2014-07-25 20:36:06.237331706 +0200
  45806. @@ -17,9 +17,8 @@
  45807. Lesser General Public License for more details.
  45808. You should have received a copy of the GNU Lesser General Public
  45809. - License along with the GNU C Library; if not, write to the Free
  45810. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45811. - 02111-1307 USA. */
  45812. + License along with the GNU C Library; if not, see
  45813. + <http://www.gnu.org/licenses/>. */
  45814. #include <string.h>
  45815. #include <stdlib.h>
  45816. diff -Nur uClibc-0.9.33.2/libc/string/generic/strchrnul.c uClibc-git/libc/string/generic/strchrnul.c
  45817. --- uClibc-0.9.33.2/libc/string/generic/strchrnul.c 2012-05-15 09:20:09.000000000 +0200
  45818. +++ uClibc-git/libc/string/generic/strchrnul.c 2014-07-25 20:36:06.237331706 +0200
  45819. @@ -17,9 +17,8 @@
  45820. Lesser General Public License for more details.
  45821. You should have received a copy of the GNU Lesser General Public
  45822. - License along with the GNU C Library; if not, write to the Free
  45823. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45824. - 02111-1307 USA. */
  45825. + License along with the GNU C Library; if not, see
  45826. + <http://www.gnu.org/licenses/>. */
  45827. #include <string.h>
  45828. #include <stdlib.h>
  45829. diff -Nur uClibc-0.9.33.2/libc/string/generic/strcmp.c uClibc-git/libc/string/generic/strcmp.c
  45830. --- uClibc-0.9.33.2/libc/string/generic/strcmp.c 2012-05-15 09:20:09.000000000 +0200
  45831. +++ uClibc-git/libc/string/generic/strcmp.c 2014-07-25 20:36:06.237331706 +0200
  45832. @@ -12,9 +12,8 @@
  45833. Lesser General Public License for more details.
  45834. You should have received a copy of the GNU Lesser General Public
  45835. - License along with the GNU C Library; if not, write to the Free
  45836. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45837. - 02111-1307 USA. */
  45838. + License along with the GNU C Library; if not, see
  45839. + <http://www.gnu.org/licenses/>. */
  45840. #include <string.h>
  45841. diff -Nur uClibc-0.9.33.2/libc/string/generic/strcpy.c uClibc-git/libc/string/generic/strcpy.c
  45842. --- uClibc-0.9.33.2/libc/string/generic/strcpy.c 2012-05-15 09:20:09.000000000 +0200
  45843. +++ uClibc-git/libc/string/generic/strcpy.c 2014-07-25 20:36:06.237331706 +0200
  45844. @@ -12,9 +12,8 @@
  45845. Lesser General Public License for more details.
  45846. You should have received a copy of the GNU Lesser General Public
  45847. - License along with the GNU C Library; if not, write to the Free
  45848. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45849. - 02111-1307 USA. */
  45850. + License along with the GNU C Library; if not, see
  45851. + <http://www.gnu.org/licenses/>. */
  45852. #include <string.h>
  45853. diff -Nur uClibc-0.9.33.2/libc/string/generic/strcspn.c uClibc-git/libc/string/generic/strcspn.c
  45854. --- uClibc-0.9.33.2/libc/string/generic/strcspn.c 2012-05-15 09:20:09.000000000 +0200
  45855. +++ uClibc-git/libc/string/generic/strcspn.c 2014-07-25 20:36:06.237331706 +0200
  45856. @@ -12,9 +12,8 @@
  45857. Lesser General Public License for more details.
  45858. You should have received a copy of the GNU Lesser General Public
  45859. - License along with the GNU C Library; if not, write to the Free
  45860. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45861. - 02111-1307 USA. */
  45862. + License along with the GNU C Library; if not, see
  45863. + <http://www.gnu.org/licenses/>. */
  45864. #include <string.h>
  45865. diff -Nur uClibc-0.9.33.2/libc/string/generic/strlen.c uClibc-git/libc/string/generic/strlen.c
  45866. --- uClibc-0.9.33.2/libc/string/generic/strlen.c 2012-05-15 09:20:09.000000000 +0200
  45867. +++ uClibc-git/libc/string/generic/strlen.c 2014-07-25 20:36:06.237331706 +0200
  45868. @@ -15,9 +15,8 @@
  45869. Lesser General Public License for more details.
  45870. You should have received a copy of the GNU Lesser General Public
  45871. - License along with the GNU C Library; if not, write to the Free
  45872. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45873. - 02111-1307 USA. */
  45874. + License along with the GNU C Library; if not, see
  45875. + <http://www.gnu.org/licenses/>. */
  45876. #include <string.h>
  45877. #include <stdlib.h>
  45878. diff -Nur uClibc-0.9.33.2/libc/string/generic/strncat.c uClibc-git/libc/string/generic/strncat.c
  45879. --- uClibc-0.9.33.2/libc/string/generic/strncat.c 2012-05-15 09:20:09.000000000 +0200
  45880. +++ uClibc-git/libc/string/generic/strncat.c 2014-07-25 20:36:06.237331706 +0200
  45881. @@ -12,9 +12,8 @@
  45882. Lesser General Public License for more details.
  45883. You should have received a copy of the GNU Lesser General Public
  45884. - License along with the GNU C Library; if not, write to the Free
  45885. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45886. - 02111-1307 USA. */
  45887. + License along with the GNU C Library; if not, see
  45888. + <http://www.gnu.org/licenses/>. */
  45889. #include <string.h>
  45890. diff -Nur uClibc-0.9.33.2/libc/string/generic/strncmp.c uClibc-git/libc/string/generic/strncmp.c
  45891. --- uClibc-0.9.33.2/libc/string/generic/strncmp.c 2012-05-15 09:20:09.000000000 +0200
  45892. +++ uClibc-git/libc/string/generic/strncmp.c 2014-07-25 20:36:06.237331706 +0200
  45893. @@ -12,9 +12,8 @@
  45894. Lesser General Public License for more details.
  45895. You should have received a copy of the GNU Lesser General Public
  45896. - License along with the GNU C Library; if not, write to the Free
  45897. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45898. - 02111-1307 USA. */
  45899. + License along with the GNU C Library; if not, see
  45900. + <http://www.gnu.org/licenses/>. */
  45901. #include <string.h>
  45902. #include "memcopy.h"
  45903. diff -Nur uClibc-0.9.33.2/libc/string/generic/strncpy.c uClibc-git/libc/string/generic/strncpy.c
  45904. --- uClibc-0.9.33.2/libc/string/generic/strncpy.c 2012-05-15 09:20:09.000000000 +0200
  45905. +++ uClibc-git/libc/string/generic/strncpy.c 2014-07-25 20:36:06.237331706 +0200
  45906. @@ -12,9 +12,8 @@
  45907. Lesser General Public License for more details.
  45908. You should have received a copy of the GNU Lesser General Public
  45909. - License along with the GNU C Library; if not, write to the Free
  45910. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45911. - 02111-1307 USA. */
  45912. + License along with the GNU C Library; if not, see
  45913. + <http://www.gnu.org/licenses/>. */
  45914. #include <string.h>
  45915. #include "memcopy.h"
  45916. diff -Nur uClibc-0.9.33.2/libc/string/generic/strnlen.c uClibc-git/libc/string/generic/strnlen.c
  45917. --- uClibc-0.9.33.2/libc/string/generic/strnlen.c 2012-05-15 09:20:09.000000000 +0200
  45918. +++ uClibc-git/libc/string/generic/strnlen.c 2014-07-25 20:36:06.241331726 +0200
  45919. @@ -17,9 +17,8 @@
  45920. Lesser General Public License for more details.
  45921. You should have received a copy of the GNU Lesser General Public
  45922. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  45923. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  45924. - Boston, MA 02111-1307, USA. */
  45925. + License along with the GNU C Library; see the file COPYING.LIB. If
  45926. + not, see <http://www.gnu.org/licenses/>. */
  45927. #include <string.h>
  45928. #include <stdlib.h>
  45929. diff -Nur uClibc-0.9.33.2/libc/string/generic/strrchr.c uClibc-git/libc/string/generic/strrchr.c
  45930. --- uClibc-0.9.33.2/libc/string/generic/strrchr.c 2012-05-15 09:20:09.000000000 +0200
  45931. +++ uClibc-git/libc/string/generic/strrchr.c 2014-07-25 20:36:06.241331726 +0200
  45932. @@ -12,9 +12,8 @@
  45933. Lesser General Public License for more details.
  45934. You should have received a copy of the GNU Lesser General Public
  45935. - License along with the GNU C Library; if not, write to the Free
  45936. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45937. - 02111-1307 USA. */
  45938. + License along with the GNU C Library; if not, see
  45939. + <http://www.gnu.org/licenses/>. */
  45940. #include <string.h>
  45941. diff -Nur uClibc-0.9.33.2/libc/string/generic/strsep.c uClibc-git/libc/string/generic/strsep.c
  45942. --- uClibc-0.9.33.2/libc/string/generic/strsep.c 2012-05-15 09:20:09.000000000 +0200
  45943. +++ uClibc-git/libc/string/generic/strsep.c 2014-07-25 20:36:06.241331726 +0200
  45944. @@ -12,9 +12,8 @@
  45945. Lesser General Public License for more details.
  45946. You should have received a copy of the GNU Lesser General Public
  45947. - License along with the GNU C Library; if not, write to the Free
  45948. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45949. - 02111-1307 USA. */
  45950. + License along with the GNU C Library; if not, see
  45951. + <http://www.gnu.org/licenses/>. */
  45952. #include <string.h>
  45953. diff -Nur uClibc-0.9.33.2/libc/string/generic/strspn.c uClibc-git/libc/string/generic/strspn.c
  45954. --- uClibc-0.9.33.2/libc/string/generic/strspn.c 2012-05-15 09:20:09.000000000 +0200
  45955. +++ uClibc-git/libc/string/generic/strspn.c 2014-07-25 20:36:06.241331726 +0200
  45956. @@ -12,9 +12,8 @@
  45957. Lesser General Public License for more details.
  45958. You should have received a copy of the GNU Lesser General Public
  45959. - License along with the GNU C Library; if not, write to the Free
  45960. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45961. - 02111-1307 USA. */
  45962. + License along with the GNU C Library; if not, see
  45963. + <http://www.gnu.org/licenses/>. */
  45964. #include <string.h>
  45965. diff -Nur uClibc-0.9.33.2/libc/string/generic/strstr.c uClibc-git/libc/string/generic/strstr.c
  45966. --- uClibc-0.9.33.2/libc/string/generic/strstr.c 2012-05-15 09:20:09.000000000 +0200
  45967. +++ uClibc-git/libc/string/generic/strstr.c 2014-07-25 20:36:06.241331726 +0200
  45968. @@ -13,9 +13,8 @@
  45969. Lesser General Public License for more details.
  45970. You should have received a copy of the GNU Lesser General Public
  45971. - License along with the GNU C Library; if not, write to the Free
  45972. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45973. - 02111-1307 USA. */
  45974. + License along with the GNU C Library; if not, see
  45975. + <http://www.gnu.org/licenses/>. */
  45976. /*
  45977. * My personal strstr() implementation that beats most other algorithms.
  45978. diff -Nur uClibc-0.9.33.2/libc/string/generic/strtok_r.c uClibc-git/libc/string/generic/strtok_r.c
  45979. --- uClibc-0.9.33.2/libc/string/generic/strtok_r.c 2012-05-15 09:20:09.000000000 +0200
  45980. +++ uClibc-git/libc/string/generic/strtok_r.c 2014-07-25 20:36:06.241331726 +0200
  45981. @@ -13,9 +13,8 @@
  45982. Lesser General Public License for more details.
  45983. You should have received a copy of the GNU Lesser General Public
  45984. - License along with the GNU C Library; if not, write to the Free
  45985. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  45986. - 02111-1307 USA. */
  45987. + License along with the GNU C Library; if not, see
  45988. + <http://www.gnu.org/licenses/>. */
  45989. #include <string.h>
  45990. diff -Nur uClibc-0.9.33.2/libc/string/__glibc_strerror_r.c uClibc-git/libc/string/__glibc_strerror_r.c
  45991. --- uClibc-0.9.33.2/libc/string/__glibc_strerror_r.c 2012-05-15 09:20:09.000000000 +0200
  45992. +++ uClibc-git/libc/string/__glibc_strerror_r.c 2014-07-25 20:36:06.133331160 +0200
  45993. @@ -5,9 +5,13 @@
  45994. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  45995. */
  45996. +/* get rid of REDIRECT */
  45997. +#define strerror_r __hide_strerror_r
  45998. +
  45999. #include <features.h>
  46000. #include <string.h>
  46001. +#undef strerror_r
  46002. char *__glibc_strerror_r(int errnum, char *strerrbuf, size_t buflen)
  46003. {
  46004. @@ -16,3 +20,6 @@
  46005. return strerrbuf;
  46006. }
  46007. libc_hidden_def(__glibc_strerror_r)
  46008. +#if !defined __USE_XOPEN2K || defined __USE_GNU
  46009. +strong_alias(__glibc_strerror_r,strerror_r)
  46010. +#endif
  46011. diff -Nur uClibc-0.9.33.2/libc/string/ia64/bcopy.S uClibc-git/libc/string/ia64/bcopy.S
  46012. --- uClibc-0.9.33.2/libc/string/ia64/bcopy.S 2012-05-15 09:20:09.000000000 +0200
  46013. +++ uClibc-git/libc/string/ia64/bcopy.S 2014-07-25 20:36:06.265331852 +0200
  46014. @@ -1,4 +1,4 @@
  46015. -#include "sysdep.h"
  46016. +#include <sysdep.h>
  46017. #ifdef __UCLIBC_SUSV3_LEGACY__
  46018. diff -Nur uClibc-0.9.33.2/libc/string/ia64/bzero.S uClibc-git/libc/string/ia64/bzero.S
  46019. --- uClibc-0.9.33.2/libc/string/ia64/bzero.S 2012-05-15 09:20:09.000000000 +0200
  46020. +++ uClibc-git/libc/string/ia64/bzero.S 2014-07-25 20:36:06.265331852 +0200
  46021. @@ -15,9 +15,8 @@
  46022. Lesser General Public License for more details.
  46023. You should have received a copy of the GNU Lesser General Public
  46024. - License along with the GNU C Library; if not, write to the Free
  46025. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  46026. - 02111-1307 USA. */
  46027. + License along with the GNU C Library; if not, see
  46028. + <http://www.gnu.org/licenses/>. */
  46029. /* Return: dest
  46030. @@ -32,7 +31,7 @@
  46031. Since a stf.spill f0 can store 16B in one go, we use this instruction
  46032. to get peak speed. */
  46033. -#include "sysdep.h"
  46034. +#include <sysdep.h>
  46035. #ifdef __UCLIBC_SUSV3_LEGACY__
  46036. diff -Nur uClibc-0.9.33.2/libc/string/ia64/memccpy.S uClibc-git/libc/string/ia64/memccpy.S
  46037. --- uClibc-0.9.33.2/libc/string/ia64/memccpy.S 2012-05-15 09:20:09.000000000 +0200
  46038. +++ uClibc-git/libc/string/ia64/memccpy.S 2014-07-25 20:36:06.265331852 +0200
  46039. @@ -14,9 +14,8 @@
  46040. Lesser General Public License for more details.
  46041. You should have received a copy of the GNU Lesser General Public
  46042. - License along with the GNU C Library; if not, write to the Free
  46043. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  46044. - 02111-1307 USA. */
  46045. + License along with the GNU C Library; if not, see
  46046. + <http://www.gnu.org/licenses/>. */
  46047. /* Return: a pointer to the next byte after char in dest or NULL
  46048. @@ -31,7 +30,7 @@
  46049. This implementation assumes that it is safe to do read ahead
  46050. in the src block, without getting beyond its limit. */
  46051. -#include "sysdep.h"
  46052. +#include <sysdep.h>
  46053. #undef ret
  46054. #define OP_T_THRES 16
  46055. diff -Nur uClibc-0.9.33.2/libc/string/ia64/memchr.S uClibc-git/libc/string/ia64/memchr.S
  46056. --- uClibc-0.9.33.2/libc/string/ia64/memchr.S 2012-05-15 09:20:09.000000000 +0200
  46057. +++ uClibc-git/libc/string/ia64/memchr.S 2014-07-25 20:36:06.265331852 +0200
  46058. @@ -14,9 +14,8 @@
  46059. Lesser General Public License for more details.
  46060. You should have received a copy of the GNU Lesser General Public
  46061. - License along with the GNU C Library; if not, write to the Free
  46062. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  46063. - 02111-1307 USA. */
  46064. + License along with the GNU C Library; if not, see
  46065. + <http://www.gnu.org/licenses/>. */
  46066. /* Return: the address of the first occurence of chr in str or NULL
  46067. @@ -40,7 +39,7 @@
  46068. All the loops in this function could have had the internal branch removed
  46069. if br.ctop and br.cloop could be predicated :-(. */
  46070. -#include "sysdep.h"
  46071. +#include <sysdep.h>
  46072. #undef ret
  46073. #define saved_pr r15
  46074. diff -Nur uClibc-0.9.33.2/libc/string/ia64/memcmp.S uClibc-git/libc/string/ia64/memcmp.S
  46075. --- uClibc-0.9.33.2/libc/string/ia64/memcmp.S 2012-05-15 09:20:09.000000000 +0200
  46076. +++ uClibc-git/libc/string/ia64/memcmp.S 2014-07-25 20:36:06.265331852 +0200
  46077. @@ -14,9 +14,8 @@
  46078. Lesser General Public License for more details.
  46079. You should have received a copy of the GNU Lesser General Public
  46080. - License along with the GNU C Library; if not, write to the Free
  46081. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  46082. - 02111-1307 USA. */
  46083. + License along with the GNU C Library; if not, see
  46084. + <http://www.gnu.org/licenses/>. */
  46085. /* Return: the result of the comparison
  46086. @@ -33,7 +32,7 @@
  46087. and all the mux1 instructions should be replaced by plain mov's. */
  46088. -#include "sysdep.h"
  46089. +#include <sysdep.h>
  46090. #undef ret
  46091. #define OP_T_THRES 16
  46092. diff -Nur uClibc-0.9.33.2/libc/string/ia64/memcpy.S uClibc-git/libc/string/ia64/memcpy.S
  46093. --- uClibc-0.9.33.2/libc/string/ia64/memcpy.S 2012-05-15 09:20:09.000000000 +0200
  46094. +++ uClibc-git/libc/string/ia64/memcpy.S 2014-07-25 20:36:06.265331852 +0200
  46095. @@ -15,9 +15,8 @@
  46096. Lesser General Public License for more details.
  46097. You should have received a copy of the GNU Lesser General Public
  46098. - License along with the GNU C Library; if not, write to the Free
  46099. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  46100. - 02111-1307 USA. */
  46101. + License along with the GNU C Library; if not, see
  46102. + <http://www.gnu.org/licenses/>. */
  46103. /* Return: dest
  46104. @@ -37,7 +36,7 @@
  46105. #define USE_LFETCH
  46106. #define USE_FLP
  46107. -#include "sysdep.h"
  46108. +#include <sysdep.h>
  46109. #undef ret
  46110. #define LFETCH_DIST 500
  46111. diff -Nur uClibc-0.9.33.2/libc/string/ia64/memmove.S uClibc-git/libc/string/ia64/memmove.S
  46112. --- uClibc-0.9.33.2/libc/string/ia64/memmove.S 2012-05-15 09:20:09.000000000 +0200
  46113. +++ uClibc-git/libc/string/ia64/memmove.S 2014-07-25 20:36:06.265331852 +0200
  46114. @@ -14,9 +14,8 @@
  46115. Lesser General Public License for more details.
  46116. You should have received a copy of the GNU Lesser General Public
  46117. - License along with the GNU C Library; if not, write to the Free
  46118. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  46119. - 02111-1307 USA. */
  46120. + License along with the GNU C Library; if not, see
  46121. + <http://www.gnu.org/licenses/>. */
  46122. /* Return: dest
  46123. @@ -33,7 +32,7 @@
  46124. sh1 must be computed using an extra instruction: sub sh1 = 64, sh1
  46125. or the UM.be bit should be cleared at the beginning and set at the end. */
  46126. -#include "sysdep.h"
  46127. +#include <sysdep.h>
  46128. #undef ret
  46129. #define OP_T_THRES 16
  46130. diff -Nur uClibc-0.9.33.2/libc/string/ia64/memset.S uClibc-git/libc/string/ia64/memset.S
  46131. --- uClibc-0.9.33.2/libc/string/ia64/memset.S 2012-05-15 09:20:09.000000000 +0200
  46132. +++ uClibc-git/libc/string/ia64/memset.S 2014-07-25 20:36:06.265331852 +0200
  46133. @@ -15,9 +15,8 @@
  46134. Lesser General Public License for more details.
  46135. You should have received a copy of the GNU Lesser General Public
  46136. - License along with the GNU C Library; if not, write to the Free
  46137. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  46138. - 02111-1307 USA. */
  46139. + License along with the GNU C Library; if not, see
  46140. + <http://www.gnu.org/licenses/>. */
  46141. /* Return: dest
  46142. @@ -33,7 +32,7 @@
  46143. Since a stf.spill f0 can store 16B in one go, we use this instruction
  46144. to get peak speed when value = 0. */
  46145. -#include "sysdep.h"
  46146. +#include <sysdep.h>
  46147. #undef ret
  46148. #define dest in0
  46149. diff -Nur uClibc-0.9.33.2/libc/string/ia64/softpipe.h uClibc-git/libc/string/ia64/softpipe.h
  46150. --- uClibc-0.9.33.2/libc/string/ia64/softpipe.h 2012-05-15 09:20:09.000000000 +0200
  46151. +++ uClibc-git/libc/string/ia64/softpipe.h 2014-07-25 20:36:06.265331852 +0200
  46152. @@ -12,9 +12,8 @@
  46153. Lesser General Public License for more details.
  46154. You should have received a copy of the GNU Lesser General Public
  46155. - License along with the GNU C Library; if not, write to the Free
  46156. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  46157. - 02111-1307 USA. */
  46158. + License along with the GNU C Library; if not, see
  46159. + <http://www.gnu.org/licenses/>. */
  46160. /* The latency of a memory load assumed by the assembly implementation
  46161. of the mem and str functions. Since we don't have any clue about
  46162. diff -Nur uClibc-0.9.33.2/libc/string/ia64/strchr.S uClibc-git/libc/string/ia64/strchr.S
  46163. --- uClibc-0.9.33.2/libc/string/ia64/strchr.S 2012-05-15 09:20:09.000000000 +0200
  46164. +++ uClibc-git/libc/string/ia64/strchr.S 2014-07-25 20:36:06.265331852 +0200
  46165. @@ -14,9 +14,8 @@
  46166. Lesser General Public License for more details.
  46167. You should have received a copy of the GNU Lesser General Public
  46168. - License along with the GNU C Library; if not, write to the Free
  46169. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  46170. - 02111-1307 USA. */
  46171. + License along with the GNU C Library; if not, see
  46172. + <http://www.gnu.org/licenses/>. */
  46173. /* Return: the address of the first occurence of chr in str or NULL
  46174. @@ -30,7 +29,7 @@
  46175. This implementation assumes little endian mode. For big endian mode,
  46176. the instruction czx1.r should be replaced by czx1.l. */
  46177. -#include "sysdep.h"
  46178. +#include <sysdep.h>
  46179. #undef ret
  46180. #define saved_lc r18
  46181. diff -Nur uClibc-0.9.33.2/libc/string/ia64/strcmp.S uClibc-git/libc/string/ia64/strcmp.S
  46182. --- uClibc-0.9.33.2/libc/string/ia64/strcmp.S 2012-05-15 09:20:09.000000000 +0200
  46183. +++ uClibc-git/libc/string/ia64/strcmp.S 2014-07-25 20:36:06.265331852 +0200
  46184. @@ -14,9 +14,8 @@
  46185. Lesser General Public License for more details.
  46186. You should have received a copy of the GNU Lesser General Public
  46187. - License along with the GNU C Library; if not, write to the Free
  46188. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  46189. - 02111-1307 USA. */
  46190. + License along with the GNU C Library; if not, see
  46191. + <http://www.gnu.org/licenses/>. */
  46192. /* Return: the result of the comparison
  46193. @@ -27,7 +26,7 @@
  46194. Unlike memcmp(), this function is optimized for mismatches within the
  46195. first few characters. */
  46196. -#include "sysdep.h"
  46197. +#include <sysdep.h>
  46198. #undef ret
  46199. #define s1 in0
  46200. diff -Nur uClibc-0.9.33.2/libc/string/ia64/strcpy.S uClibc-git/libc/string/ia64/strcpy.S
  46201. --- uClibc-0.9.33.2/libc/string/ia64/strcpy.S 2012-05-15 09:20:09.000000000 +0200
  46202. +++ uClibc-git/libc/string/ia64/strcpy.S 2014-07-25 20:36:06.265331852 +0200
  46203. @@ -14,9 +14,8 @@
  46204. Lesser General Public License for more details.
  46205. You should have received a copy of the GNU Lesser General Public
  46206. - License along with the GNU C Library; if not, write to the Free
  46207. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  46208. - 02111-1307 USA. */
  46209. + License along with the GNU C Library; if not, see
  46210. + <http://www.gnu.org/licenses/>. */
  46211. /* Return: dest
  46212. @@ -31,7 +30,7 @@
  46213. shr.u tmp = r[0], sh2 // tmp = w1 >> sh2
  46214. */
  46215. -#include "sysdep.h"
  46216. +#include <sysdep.h>
  46217. #undef ret
  46218. #define saved_lc r15
  46219. diff -Nur uClibc-0.9.33.2/libc/string/ia64/strlen.S uClibc-git/libc/string/ia64/strlen.S
  46220. --- uClibc-0.9.33.2/libc/string/ia64/strlen.S 2012-05-15 09:20:09.000000000 +0200
  46221. +++ uClibc-git/libc/string/ia64/strlen.S 2014-07-25 20:36:06.265331852 +0200
  46222. @@ -14,9 +14,8 @@
  46223. Lesser General Public License for more details.
  46224. You should have received a copy of the GNU Lesser General Public
  46225. - License along with the GNU C Library; if not, write to the Free
  46226. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  46227. - 02111-1307 USA. */
  46228. + License along with the GNU C Library; if not, see
  46229. + <http://www.gnu.org/licenses/>. */
  46230. /* Return: the length of the input string
  46231. @@ -33,7 +32,7 @@
  46232. This implementation assumes little endian mode. For big endian mode,
  46233. the instruction czx1.r should be replaced by czx1.l. */
  46234. -#include "sysdep.h"
  46235. +#include <sysdep.h>
  46236. #undef ret
  46237. #define saved_lc r18
  46238. diff -Nur uClibc-0.9.33.2/libc/string/ia64/strncmp.S uClibc-git/libc/string/ia64/strncmp.S
  46239. --- uClibc-0.9.33.2/libc/string/ia64/strncmp.S 2012-05-15 09:20:09.000000000 +0200
  46240. +++ uClibc-git/libc/string/ia64/strncmp.S 2014-07-25 20:36:06.265331852 +0200
  46241. @@ -14,9 +14,8 @@
  46242. Lesser General Public License for more details.
  46243. You should have received a copy of the GNU Lesser General Public
  46244. - License along with the GNU C Library; if not, write to the Free
  46245. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  46246. - 02111-1307 USA. */
  46247. + License along with the GNU C Library; if not, see
  46248. + <http://www.gnu.org/licenses/>. */
  46249. /* Return: the result of the comparison
  46250. @@ -28,7 +27,7 @@
  46251. Unlike memcmp(), this function is optimized for mismatches within the
  46252. first few characters. */
  46253. -#include "sysdep.h"
  46254. +#include <sysdep.h>
  46255. #undef ret
  46256. #define s1 in0
  46257. diff -Nur uClibc-0.9.33.2/libc/string/ia64/strncpy.S uClibc-git/libc/string/ia64/strncpy.S
  46258. --- uClibc-0.9.33.2/libc/string/ia64/strncpy.S 2012-05-15 09:20:09.000000000 +0200
  46259. +++ uClibc-git/libc/string/ia64/strncpy.S 2014-07-25 20:36:06.265331852 +0200
  46260. @@ -15,9 +15,8 @@
  46261. Lesser General Public License for more details.
  46262. You should have received a copy of the GNU Lesser General Public
  46263. - License along with the GNU C Library; if not, write to the Free
  46264. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  46265. - 02111-1307 USA. */
  46266. + License along with the GNU C Library; if not, see
  46267. + <http://www.gnu.org/licenses/>. */
  46268. /* Return: dest
  46269. @@ -29,7 +28,7 @@
  46270. In this form, it assumes little endian mode.
  46271. */
  46272. -#include "sysdep.h"
  46273. +#include <sysdep.h>
  46274. #undef ret
  46275. #define saved_lc r15
  46276. diff -Nur uClibc-0.9.33.2/libc/string/ia64/sysdep.h uClibc-git/libc/string/ia64/sysdep.h
  46277. --- uClibc-0.9.33.2/libc/string/ia64/sysdep.h 2012-05-15 09:20:09.000000000 +0200
  46278. +++ uClibc-git/libc/string/ia64/sysdep.h 1970-01-01 01:00:00.000000000 +0100
  46279. @@ -1,168 +0,0 @@
  46280. -/* Copyright (C) 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
  46281. - This file is part of the GNU C Library.
  46282. - Written by Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999.
  46283. - Based on code originally written by David Mosberger-Tang
  46284. -
  46285. - The GNU C Library is free software; you can redistribute it and/or
  46286. - modify it under the terms of the GNU Lesser General Public
  46287. - License as published by the Free Software Foundation; either
  46288. - version 2.1 of the License, or (at your option) any later version.
  46289. -
  46290. - The GNU C Library is distributed in the hope that it will be useful,
  46291. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  46292. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  46293. - Lesser General Public License for more details.
  46294. -
  46295. - You should have received a copy of the GNU Lesser General Public
  46296. - License along with the GNU C Library; if not, write to the Free
  46297. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  46298. - 02111-1307 USA. */
  46299. -
  46300. -#ifndef _LINUX_IA64_SYSDEP_H
  46301. -#define _LINUX_IA64_SYSDEP_H 1
  46302. -
  46303. -#include <features.h>
  46304. -#include <asm/unistd.h>
  46305. -
  46306. -#ifdef __ASSEMBLER__
  46307. -
  46308. -/* Macros to help writing .prologue directives in assembly code. */
  46309. -#define ASM_UNW_PRLG_RP 0x8
  46310. -#define ASM_UNW_PRLG_PFS 0x4
  46311. -#define ASM_UNW_PRLG_PSP 0x2
  46312. -#define ASM_UNW_PRLG_PR 0x1
  46313. -#define ASM_UNW_PRLG_GRSAVE(ninputs) (32+(ninputs))
  46314. -
  46315. -#ifdef __STDC__
  46316. -#define C_LABEL(name) name :
  46317. -#else
  46318. -#define C_LABEL(name) name/**/:
  46319. -#endif
  46320. -
  46321. -#define CALL_MCOUNT
  46322. -
  46323. -#define ENTRY(name) \
  46324. - .text; \
  46325. - .align 32; \
  46326. - .proc C_SYMBOL_NAME(name); \
  46327. - .global C_SYMBOL_NAME(name); \
  46328. - C_LABEL(name) \
  46329. - CALL_MCOUNT
  46330. -
  46331. -#define LEAF(name) \
  46332. - .text; \
  46333. - .align 32; \
  46334. - .proc C_SYMBOL_NAME(name); \
  46335. - .global name; \
  46336. - C_LABEL(name)
  46337. -
  46338. -/* Mark the end of function SYM. */
  46339. -#undef END
  46340. -#define END(sym) .endp C_SYMBOL_NAME(sym)
  46341. -
  46342. -/* For Linux we can use the system call table in the header file
  46343. - /usr/include/asm/unistd.h
  46344. - of the kernel. But these symbols do not follow the SYS_* syntax
  46345. - so we have to redefine the `SYS_ify' macro here. */
  46346. -#undef SYS_ify
  46347. -#ifdef __STDC__
  46348. -# define SYS_ify(syscall_name) __NR_##syscall_name
  46349. -#else
  46350. -# define SYS_ify(syscall_name) __NR_/**/syscall_name
  46351. -#endif
  46352. -
  46353. -/* Linux uses a negative return value to indicate syscall errors, unlike
  46354. - most Unices, which use the condition codes' carry flag.
  46355. -
  46356. - Since version 2.1 the return value of a system call might be negative
  46357. - even if the call succeeded. E.g., the `lseek' system call might return
  46358. - a large offset. Therefore we must not anymore test for < 0, but test
  46359. - for a real error by making sure the value in %d0 is a real error
  46360. - number. Linus said he will make sure the no syscall returns a value
  46361. - in -1 .. -4095 as a valid result so we can savely test with -4095. */
  46362. -
  46363. -/* We don't want the label for the error handler to be visible in the symbol
  46364. - table when we define it here. */
  46365. -#define SYSCALL_ERROR_LABEL __syscall_error
  46366. -
  46367. -#undef PSEUDO
  46368. -#define PSEUDO(name, syscall_name, args) \
  46369. - ENTRY(name) \
  46370. - DO_CALL (SYS_ify(syscall_name)); \
  46371. - cmp.eq p6,p0=-1,r10; \
  46372. -(p6) br.cond.spnt.few __syscall_error;
  46373. -
  46374. -#define DO_CALL_VIA_BREAK(num) \
  46375. - mov r15=num; \
  46376. - break __BREAK_SYSCALL
  46377. -
  46378. -#ifdef IA64_USE_NEW_STUB
  46379. -# ifdef SHARED
  46380. -# define DO_CALL(num) \
  46381. - .prologue; \
  46382. - adds r2 = SYSINFO_OFFSET, r13;; \
  46383. - ld8 r2 = [r2]; \
  46384. - .save ar.pfs, r11; \
  46385. - mov r11 = ar.pfs;; \
  46386. - .body; \
  46387. - mov r15 = num; \
  46388. - mov b7 = r2; \
  46389. - br.call.sptk.many b6 = b7;; \
  46390. - .restore sp; \
  46391. - mov ar.pfs = r11; \
  46392. - .prologue; \
  46393. - .body
  46394. -# else /* !SHARED */
  46395. -# define DO_CALL(num) \
  46396. - .prologue; \
  46397. - mov r15 = num; \
  46398. - movl r2 = _dl_sysinfo;; \
  46399. - ld8 r2 = [r2]; \
  46400. - .save ar.pfs, r11; \
  46401. - mov r11 = ar.pfs;; \
  46402. - .body; \
  46403. - mov b7 = r2; \
  46404. - br.call.sptk.many b6 = b7;; \
  46405. - .restore sp; \
  46406. - mov ar.pfs = r11; \
  46407. - .prologue; \
  46408. - .body
  46409. -# endif
  46410. -#else
  46411. -# define DO_CALL(num) DO_CALL_VIA_BREAK(num)
  46412. -#endif
  46413. -
  46414. -#undef PSEUDO_END
  46415. -#define PSEUDO_END(name) .endp C_SYMBOL_NAME(name);
  46416. -
  46417. -#undef PSEUDO_NOERRNO
  46418. -#define PSEUDO_NOERRNO(name, syscall_name, args) \
  46419. - ENTRY(name) \
  46420. - DO_CALL (SYS_ify(syscall_name));
  46421. -
  46422. -#undef PSEUDO_END_NOERRNO
  46423. -#define PSEUDO_END_NOERRNO(name) .endp C_SYMBOL_NAME(name);
  46424. -
  46425. -#undef PSEUDO_ERRVAL
  46426. -#define PSEUDO_ERRVAL(name, syscall_name, args) \
  46427. - ENTRY(name) \
  46428. - DO_CALL (SYS_ify(syscall_name)); \
  46429. - cmp.eq p6,p0=-1,r10; \
  46430. -(p6) mov r10=r8;
  46431. -
  46432. -
  46433. -#undef PSEUDO_END_ERRVAL
  46434. -#define PSEUDO_END_ERRVAL(name) .endp C_SYMBOL_NAME(name);
  46435. -
  46436. -#undef END
  46437. -#define END(name) \
  46438. - .size C_SYMBOL_NAME(name), . - C_SYMBOL_NAME(name) ; \
  46439. - .endp C_SYMBOL_NAME(name)
  46440. -
  46441. -#define ret br.ret.sptk.few b0
  46442. -#define ret_NOERRNO ret
  46443. -#define ret_ERRVAL ret
  46444. -
  46445. -#endif /* not __ASSEMBLER__ */
  46446. -
  46447. -#endif /* linux/ia64/sysdep.h */
  46448. diff -Nur uClibc-0.9.33.2/libc/string/memmove.c uClibc-git/libc/string/memmove.c
  46449. --- uClibc-0.9.33.2/libc/string/memmove.c 2012-05-15 09:20:09.000000000 +0200
  46450. +++ uClibc-git/libc/string/memmove.c 2014-07-25 20:36:06.265331852 +0200
  46451. @@ -34,5 +34,5 @@
  46452. }
  46453. #ifndef WANT_WIDE
  46454. -libc_hidden_def(Wmemmove)
  46455. +libc_hidden_def(memmove)
  46456. #endif
  46457. diff -Nur uClibc-0.9.33.2/libc/string/metag/Makefile uClibc-git/libc/string/metag/Makefile
  46458. --- uClibc-0.9.33.2/libc/string/metag/Makefile 1970-01-01 01:00:00.000000000 +0100
  46459. +++ uClibc-git/libc/string/metag/Makefile 2014-07-25 20:36:06.277331914 +0200
  46460. @@ -0,0 +1,13 @@
  46461. +# Makefile for uClibc
  46462. +#
  46463. +# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
  46464. +#
  46465. +# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  46466. +#
  46467. +
  46468. +top_srcdir:=../../../
  46469. +top_builddir:=../../../
  46470. +all: objs
  46471. +include $(top_builddir)Rules.mak
  46472. +include ../Makefile.in
  46473. +include $(top_srcdir)Makerules
  46474. diff -Nur uClibc-0.9.33.2/libc/string/metag/memchr.S uClibc-git/libc/string/metag/memchr.S
  46475. --- uClibc-0.9.33.2/libc/string/metag/memchr.S 1970-01-01 01:00:00.000000000 +0100
  46476. +++ uClibc-git/libc/string/metag/memchr.S 2014-07-25 20:36:06.277331914 +0200
  46477. @@ -0,0 +1,156 @@
  46478. +! Copyright (C) 2013 Imagination Technologies Ltd.
  46479. +!
  46480. +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  46481. +
  46482. + .text
  46483. + .global _memchr
  46484. + .type _memchr,function
  46485. +! D0Ar6 src
  46486. +! D0Ar2 c
  46487. +! D1Ar3 n
  46488. +_memchr:
  46489. + CMP D1Ar3, #0
  46490. + BEQ $Lexit_fail
  46491. + !! convert c to unsigned char
  46492. + AND D0Ar2,D0Ar2,#0xff
  46493. + MOV D0Ar6, D1Ar1
  46494. + MOV D1Ar5, D0Ar6
  46495. + !! test alignment
  46496. + AND D1Ar5, D1Ar5, #7
  46497. + CMP D1Ar5, #0
  46498. + BNZ $Lunaligned_loop
  46499. + !! length must be greater than or equal to 8 for aligned loop
  46500. + CMP D1Ar3, #8
  46501. + BGE $Laligned_setup
  46502. +$Lunaligned_loop:
  46503. + !! get 1 char from s
  46504. + GETB D0Re0, [D0Ar6++]
  46505. + !! increase alignment counter
  46506. + ADD D1Ar5, D1Ar5, #1
  46507. + !! decrement n
  46508. + SUB D1Ar3, D1Ar3, #1
  46509. + !! exit if we have a match
  46510. + CMP D0Re0, D0Ar2
  46511. + BZ $Lexit_success1
  46512. + !! exit if we have hit the end of the string
  46513. + CMP D1Ar3, #0
  46514. + BZ $Lexit_fail
  46515. + !! fall through if the buffer is aligned now
  46516. + CMP D1Ar5, #8
  46517. + BNE $Lunaligned_loop
  46518. + !! fall through if there is more than 8 bytes left
  46519. + CMP D1Ar3, #8
  46520. + BLT $Lunaligned_loop
  46521. +$Laligned_setup:
  46522. + !! fill the c into 4 bytes
  46523. + MOV D0Ar4, D0Ar2
  46524. + LSL D0Ar4, D0Ar4, #8
  46525. + ADD D0Ar4, D0Ar4, D0Ar2
  46526. + LSL D0Ar4, D0Ar4, #8
  46527. + ADD D0Ar4, D0Ar4, D0Ar2
  46528. + LSL D0Ar4, D0Ar4, #8
  46529. + ADD D0Ar4, D0Ar4, D0Ar2
  46530. + !! divide n by 8
  46531. + MOV D1Ar5, D1Ar3
  46532. + LSR D1Ar5, D1Ar5, #3
  46533. +$Laligned_loop:
  46534. + !! get 8 chars from s
  46535. + GETL D0Re0, D1Re0, [D0Ar6++]
  46536. + !! decrement loop counter
  46537. + SUB D1Ar5, D1Ar5, #1
  46538. + !! test first 4 chars
  46539. + XOR D0Re0, D0Re0, D0Ar4
  46540. + !! test second 4 chars
  46541. + MOV D0Ar2, D1Re0
  46542. + XOR D1Re0, D0Ar2, D0Ar4
  46543. + !! check for matches in the first 4 chars
  46544. + MOV D0Ar2, D0Re0
  46545. + ADDT D0Re0, D0Re0, #HI(0xfefefeff)
  46546. + ADD D0Re0, D0Re0, #LO(0xfefefeff)
  46547. + XOR D0Ar2, D0Ar2, #-1
  46548. + AND D0Re0, D0Re0, D0Ar2
  46549. + ANDMT D0Re0, D0Re0, #HI(0x80808080)
  46550. + ANDMB D0Re0, D0Re0, #LO(0x80808080)
  46551. + CMP D0Re0, #0
  46552. + BNZ $Lmatch_word1
  46553. + !! check for matches in the second 4 chars
  46554. + MOV D1Ar1, D1Re0
  46555. + ADDT D1Re0, D1Re0, #HI(0xfefefeff)
  46556. + ADD D1Re0, D1Re0, #LO(0xfefefeff)
  46557. + XOR D1Ar1, D1Ar1, #-1
  46558. + AND D1Re0, D1Re0, D1Ar1
  46559. + ANDMT D1Re0, D1Re0, #HI(0x80808080)
  46560. + ANDMB D1Re0, D1Re0, #LO(0x80808080)
  46561. + CMP D1Re0, #0
  46562. + BNZ $Lmatch_word2
  46563. + !! check if we have reached the end of the buffer
  46564. + CMP D1Ar5, #0
  46565. + BNE $Laligned_loop
  46566. + !! exit if there are no chars left to check
  46567. + AND D1Ar3, D1Ar3, #7
  46568. + CMP D1Ar3, #0
  46569. + BZ $Lexit_fail
  46570. + !! recover c
  46571. + AND D0Ar2, D0Ar4, #0xff
  46572. +$Lbyte_loop:
  46573. + !! get 1 char from s
  46574. + GETB D0Re0, [D0Ar6++]
  46575. + !! decrement n
  46576. + SUB D1Ar3, D1Ar3, #1
  46577. + !! exit if we have a match
  46578. + CMP D0Re0, D0Ar2
  46579. + BZ $Lexit_success1
  46580. + !! fall through if we have run out of chars
  46581. + CMP D1Ar3, #0
  46582. + BNE $Lbyte_loop
  46583. +
  46584. +$Lexit_fail:
  46585. + MOV D0Re0, #0
  46586. + B $Lend
  46587. +
  46588. +$Lmatch_word1:
  46589. + !! move the match word into D1Re0
  46590. + MOV D1Re0, D0Re0
  46591. + !! roll back the buffer pointer by 4 chars
  46592. + SUB D0Ar6, D0Ar6, #4
  46593. +$Lmatch_word2:
  46594. + !! roll back the buffer pointer by 4 chars
  46595. + SUB D0Ar6, D0Ar6, #4
  46596. + !! exit if lowest byte is 0
  46597. + MOV D1Ar1, D1Re0
  46598. + AND D1Ar1, D1Ar1, #0xff
  46599. + CMP D1Ar1, #0
  46600. + BNE $Lexit_success2
  46601. + !! advance buffer pointer to the next char
  46602. + ADD D0Ar6, D0Ar6, #1
  46603. + !! shift in the next lowest byte
  46604. + LSR D1Re0, D1Re0, #8
  46605. + !! exit if lowest byte is 0
  46606. + MOV D1Ar1, D1Re0
  46607. + AND D1Ar1, D1Ar1, #0xff
  46608. + CMP D1Ar1, #0
  46609. + BNE $Lexit_success2
  46610. + !! advance buffer pointer to the next char
  46611. + ADD D0Ar6, D0Ar6, #1
  46612. + !! shift in the next lowest byte
  46613. + LSR D1Re0, D1Re0, #8
  46614. + !! exit if lowest byte is 0
  46615. + MOV D1Ar1, D1Re0
  46616. + AND D1Ar1, D1Ar1, #0xff
  46617. + CMP D1Ar1, #0
  46618. + BNE $Lexit_success2
  46619. + !! the match must be in the last byte, exit
  46620. + ADD D0Ar6, D0Ar6, #1
  46621. + B $Lexit_success2
  46622. +
  46623. +$Lexit_success1:
  46624. + SUB D0Ar6, D0Ar6, #1
  46625. +$Lexit_success2:
  46626. + !! return the buffer pointer
  46627. + MOV D0Re0, D0Ar6
  46628. +$Lend:
  46629. + MOV PC, D1RtP
  46630. +
  46631. + .size _memchr,.-_memchr
  46632. +
  46633. +libc_hidden_def(memchr)
  46634. diff -Nur uClibc-0.9.33.2/libc/string/metag/memcpy.S uClibc-git/libc/string/metag/memcpy.S
  46635. --- uClibc-0.9.33.2/libc/string/metag/memcpy.S 1970-01-01 01:00:00.000000000 +0100
  46636. +++ uClibc-git/libc/string/metag/memcpy.S 2014-07-25 20:36:06.277331914 +0200
  46637. @@ -0,0 +1,189 @@
  46638. +! Copyright (C) 2013 Imagination Technologies Ltd.
  46639. +
  46640. +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  46641. +
  46642. + .text
  46643. + .global _memcpy
  46644. + .type _memcpy,function
  46645. +! D1Ar1 dst
  46646. +! D0Ar2 src
  46647. +! D1Ar3 cnt
  46648. +! D0Re0 dst
  46649. +_memcpy:
  46650. + CMP D1Ar3, #16
  46651. + MOV A1.2, D0Ar2 ! source pointer
  46652. + MOV A0.2, D1Ar1 ! destination pointer
  46653. + MOV A0.3, D1Ar1 ! for return value
  46654. +! If there are less than 16 bytes to copy use the byte copy loop
  46655. + BGE $Llong_copy
  46656. +
  46657. +$Lbyte_copy:
  46658. +! Simply copy a byte at a time
  46659. + SUBS TXRPT, D1Ar3, #1
  46660. + BLT $Lend
  46661. +$Lloop_byte:
  46662. + GETB D1Re0, [A1.2++]
  46663. + SETB [A0.2++], D1Re0
  46664. + BR $Lloop_byte
  46665. +
  46666. +$Lend:
  46667. +! Finally set return value and return
  46668. + MOV D0Re0, A0.3
  46669. + MOV PC, D1RtP
  46670. +
  46671. +$Llong_copy:
  46672. + ANDS D1Ar5, D1Ar1, #7 ! test destination alignment
  46673. + BZ $Laligned_dst
  46674. +
  46675. +! The destination address is not 8 byte aligned. We will copy bytes from
  46676. +! the source to the destination until the remaining data has an 8 byte
  46677. +! destination address alignment (i.e we should never copy more than 7
  46678. +! bytes here).
  46679. +$Lalign_dst:
  46680. + GETB D0Re0, [A1.2++]
  46681. + ADD D1Ar5, D1Ar5, #1 ! dest is aligned when D1Ar5 reaches #8
  46682. + SUB D1Ar3, D1Ar3, #1 ! decrement count of remaining bytes
  46683. + SETB [A0.2++], D0Re0
  46684. + CMP D1Ar5, #8
  46685. + BNE $Lalign_dst
  46686. +
  46687. +! We have at least (16 - 7) = 9 bytes to copy - calculate the number of 8 byte
  46688. +! blocks, then jump to the unaligned copy loop or fall through to the aligned
  46689. +! copy loop as appropriate.
  46690. +$Laligned_dst:
  46691. + MOV D0Ar4, A1.2
  46692. + LSR D1Ar5, D1Ar3, #3 ! D1Ar5 = number of 8 byte blocks
  46693. + ANDS D0Ar4, D0Ar4, #7 ! test source alignment
  46694. + BNZ $Lunaligned_copy ! if unaligned, use unaligned copy loop
  46695. +
  46696. +! Both source and destination are 8 byte aligned - the easy case.
  46697. +$Laligned_copy:
  46698. + LSRS D1Ar5, D1Ar3, #5 ! D1Ar5 = number of 32 byte blocks
  46699. + BZ $Lbyte_copy
  46700. + SUB TXRPT, D1Ar5, #1
  46701. +
  46702. +$Laligned_32:
  46703. + GETL D0Re0, D1Re0, [A1.2++]
  46704. + GETL D0Ar6, D1Ar5, [A1.2++]
  46705. + SETL [A0.2++], D0Re0, D1Re0
  46706. + SETL [A0.2++], D0Ar6, D1Ar5
  46707. + GETL D0Re0, D1Re0, [A1.2++]
  46708. + GETL D0Ar6, D1Ar5, [A1.2++]
  46709. + SETL [A0.2++], D0Re0, D1Re0
  46710. + SETL [A0.2++], D0Ar6, D1Ar5
  46711. + BR $Laligned_32
  46712. +
  46713. +! If there are any remaining bytes use the byte copy loop, otherwise we are done
  46714. + ANDS D1Ar3, D1Ar3, #0x1f
  46715. + BNZ $Lbyte_copy
  46716. + B $Lend
  46717. +
  46718. +! The destination is 8 byte aligned but the source is not, and there are 8
  46719. +! or more bytes to be copied.
  46720. +$Lunaligned_copy:
  46721. +! Adjust the source pointer (A1.2) to the 8 byte boundary before its
  46722. +! current value
  46723. + MOV D0Ar4, A1.2
  46724. + MOV D0Ar6, A1.2
  46725. + ANDMB D0Ar4, D0Ar4, #0xfff8
  46726. + MOV A1.2, D0Ar4
  46727. +! Save the number of bytes of mis-alignment in D0Ar4 for use later
  46728. + SUBS D0Ar6, D0Ar6, D0Ar4
  46729. + MOV D0Ar4, D0Ar6
  46730. +! if there is no mis-alignment after all, use the aligned copy loop
  46731. + BZ $Laligned_copy
  46732. +
  46733. +! prefetch 8 bytes
  46734. + GETL D0Re0, D1Re0, [A1.2]
  46735. +
  46736. + SUB TXRPT, D1Ar5, #1
  46737. +
  46738. +! There are 3 mis-alignment cases to be considered. Less than 4 bytes, exactly
  46739. +! 4 bytes, and more than 4 bytes.
  46740. + CMP D0Ar6, #4
  46741. + BLT $Lunaligned_1_2_3 ! use 1-3 byte mis-alignment loop
  46742. + BZ $Lunaligned_4 ! use 4 byte mis-alignment loop
  46743. +
  46744. +! The mis-alignment is more than 4 bytes
  46745. +$Lunaligned_5_6_7:
  46746. + SUB D0Ar6, D0Ar6, #4
  46747. +! Calculate the bit offsets required for the shift operations necesssary
  46748. +! to align the data.
  46749. +! D0Ar6 = bit offset, D1Ar5 = (32 - bit offset)
  46750. + MULW D0Ar6, D0Ar6, #8
  46751. + MOV D1Ar5, #32
  46752. + SUB D1Ar5, D1Ar5, D0Ar6
  46753. +! Move data 4 bytes before we enter the main loop
  46754. + MOV D0Re0, D1Re0
  46755. +
  46756. +$Lloop_5_6_7:
  46757. + GETL D0Ar2, D1Ar1, [++A1.2]
  46758. +! form 64-bit data in D0Re0, D1Re0
  46759. + LSR D0Re0, D0Re0, D0Ar6
  46760. + MOV D1Re0, D0Ar2
  46761. + LSL D1Re0, D1Re0, D1Ar5
  46762. + ADD D0Re0, D0Re0, D1Re0
  46763. +
  46764. + LSR D0Ar2, D0Ar2, D0Ar6
  46765. + LSL D1Re0, D1Ar1, D1Ar5
  46766. + ADD D1Re0, D1Re0, D0Ar2
  46767. +
  46768. + SETL [A0.2++], D0Re0, D1Re0
  46769. + MOV D0Re0, D1Ar1
  46770. + BR $Lloop_5_6_7
  46771. +
  46772. + B $Lunaligned_end
  46773. +
  46774. +$Lunaligned_1_2_3:
  46775. +! Calculate the bit offsets required for the shift operations necesssary
  46776. +! to align the data.
  46777. +! D0Ar6 = bit offset, D1Ar5 = (32 - bit offset)
  46778. + MULW D0Ar6, D0Ar6, #8
  46779. + MOV D1Ar5, #32
  46780. + SUB D1Ar5, D1Ar5, D0Ar6
  46781. +
  46782. +$Lloop_1_2_3:
  46783. +! form 64-bit data in D0Re0,D1Re0
  46784. + LSR D0Re0, D0Re0, D0Ar6
  46785. + LSL D1Ar1, D1Re0, D1Ar5
  46786. + ADD D0Re0, D0Re0, D1Ar1
  46787. + MOV D0Ar2, D1Re0
  46788. + LSR D0FrT, D0Ar2, D0Ar6
  46789. + GETL D0Ar2, D1Ar1, [++A1.2]
  46790. +
  46791. + MOV D1Re0, D0Ar2
  46792. + LSL D1Re0, D1Re0, D1Ar5
  46793. + ADD D1Re0, D1Re0, D0FrT
  46794. +
  46795. + SETL [A0.2++], D0Re0, D1Re0
  46796. + MOV D0Re0, D0Ar2
  46797. + MOV D1Re0, D1Ar1
  46798. + BR $Lloop_1_2_3
  46799. +
  46800. + B $Lunaligned_end
  46801. +
  46802. +! The 4 byte mis-alignment case - this does not require any shifting, just a
  46803. +! shuffling of registers.
  46804. +$Lunaligned_4:
  46805. + MOV D0Re0, D1Re0
  46806. +$Lloop_4:
  46807. + GETL D0Ar2, D1Ar1, [++A1.2]
  46808. + MOV D1Re0, D0Ar2
  46809. + SETL [A0.2++], D0Re0, D1Re0
  46810. + MOV D0Re0, D1Ar1
  46811. + BR $Lloop_4
  46812. +
  46813. +$Lunaligned_end:
  46814. +! If there are no remaining bytes to copy, we are done.
  46815. + ANDS D1Ar3, D1Ar3, #7
  46816. + BZ $Lend
  46817. +! Re-adjust the source pointer (A1.2) back to the actual (unaligned) byte
  46818. +! address of the remaining bytes, and fall through to the byte copy loop.
  46819. + MOV D0Ar6, A1.2
  46820. + ADD D1Ar5, D0Ar4, D0Ar6
  46821. + MOV A1.2, D1Ar5
  46822. + B $Lbyte_copy
  46823. +
  46824. + .size _memcpy,.-_memcpy
  46825. +
  46826. +libc_hidden_def(memcpy)
  46827. diff -Nur uClibc-0.9.33.2/libc/string/metag/memmove.S uClibc-git/libc/string/metag/memmove.S
  46828. --- uClibc-0.9.33.2/libc/string/metag/memmove.S 1970-01-01 01:00:00.000000000 +0100
  46829. +++ uClibc-git/libc/string/metag/memmove.S 2014-07-25 20:36:06.277331914 +0200
  46830. @@ -0,0 +1,350 @@
  46831. +! Copyright (C) 2013 Imagination Technologies Ltd.
  46832. +
  46833. +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  46834. +
  46835. +
  46836. + .text
  46837. + .global _memmove
  46838. + .type _memmove,function
  46839. +! D1Ar1 dst
  46840. +! D0Ar2 src
  46841. +! D1Ar3 cnt
  46842. +! D0Re0 dst
  46843. +_memmove:
  46844. + CMP D1Ar3, #0
  46845. + MOV D0Re0, D1Ar1
  46846. + BZ $LEND2
  46847. + MSETL [A0StP], D0.5, D0.6, D0.7
  46848. + MOV D1Ar5, D0Ar2
  46849. + CMP D1Ar1, D1Ar5
  46850. + BLT $Lforwards_copy
  46851. + SUB D0Ar4, D1Ar1, D1Ar3
  46852. + ADD D0Ar4, D0Ar4, #1
  46853. + CMP D0Ar2, D0Ar4
  46854. + BLT $Lforwards_copy
  46855. + ! should copy backwards
  46856. + MOV D1Re0, D0Ar2
  46857. + ! adjust pointer to the end of mem
  46858. + ADD D0Ar2, D1Re0, D1Ar3
  46859. + ADD D1Ar1, D1Ar1, D1Ar3
  46860. +
  46861. + MOV A1.2, D0Ar2
  46862. + MOV A0.2, D1Ar1
  46863. + CMP D1Ar3, #8
  46864. + BLT $Lbbyte_loop
  46865. +
  46866. + MOV D0Ar4, D0Ar2
  46867. + MOV D1Ar5, D1Ar1
  46868. +
  46869. + ! test 8 byte alignment
  46870. + ANDS D1Ar5, D1Ar5, #7
  46871. + BNE $Lbdest_unaligned
  46872. +
  46873. + ANDS D0Ar4, D0Ar4, #7
  46874. + BNE $Lbsrc_unaligned
  46875. +
  46876. + LSR D1Ar5, D1Ar3, #3
  46877. +
  46878. +$Lbaligned_loop:
  46879. + GETL D0Re0, D1Re0, [--A1.2]
  46880. + SETL [--A0.2], D0Re0, D1Re0
  46881. + SUBS D1Ar5, D1Ar5, #1
  46882. + BNE $Lbaligned_loop
  46883. +
  46884. + ANDS D1Ar3, D1Ar3, #7
  46885. + BZ $Lbbyte_loop_exit
  46886. +$Lbbyte_loop:
  46887. + GETB D1Re0, [--A1.2]
  46888. + SETB [--A0.2], D1Re0
  46889. + SUBS D1Ar3, D1Ar3, #1
  46890. + BNE $Lbbyte_loop
  46891. +$Lbbyte_loop_exit:
  46892. + MOV D0Re0, A0.2
  46893. +$LEND:
  46894. + SUB A0.2, A0StP, #24
  46895. + MGETL D0.5, D0.6, D0.7, [A0.2]
  46896. + SUB A0StP, A0StP, #24
  46897. +$LEND2:
  46898. + MOV PC, D1RtP
  46899. +
  46900. +$Lbdest_unaligned:
  46901. + GETB D0Re0, [--A1.2]
  46902. + SETB [--A0.2], D0Re0
  46903. + SUBS D1Ar5, D1Ar5, #1
  46904. + SUB D1Ar3, D1Ar3, #1
  46905. + BNE $Lbdest_unaligned
  46906. + CMP D1Ar3, #8
  46907. + BLT $Lbbyte_loop
  46908. +$Lbsrc_unaligned:
  46909. + LSR D1Ar5, D1Ar3, #3
  46910. + ! adjust A1.2
  46911. + MOV D0Ar4, A1.2
  46912. + ! save original address
  46913. + MOV D0Ar6, A1.2
  46914. +
  46915. + ADD D0Ar4, D0Ar4, #7
  46916. + ANDMB D0Ar4, D0Ar4, #0xfff8
  46917. + ! new address is the 8-byte aligned one above the original
  46918. + MOV A1.2, D0Ar4
  46919. +
  46920. + ! A0.2 dst 64-bit is aligned
  46921. + ! measure the gap size
  46922. + SUB D0Ar6, D0Ar4, D0Ar6
  46923. + MOVS D0Ar4, D0Ar6
  46924. + ! keep this information for the later adjustment
  46925. + ! both aligned
  46926. + BZ $Lbaligned_loop
  46927. +
  46928. + ! prefetch
  46929. + GETL D0Re0, D1Re0, [--A1.2]
  46930. +
  46931. + CMP D0Ar6, #4
  46932. + BLT $Lbunaligned_1_2_3
  46933. + ! 32-bit aligned
  46934. + BZ $Lbaligned_4
  46935. +
  46936. + SUB D0Ar6, D0Ar6, #4
  46937. + ! D1.6 stores the gap size in bits
  46938. + MULW D1.6, D0Ar6, #8
  46939. + MOV D0.6, #32
  46940. + ! D0.6 stores the complement of the gap size
  46941. + SUB D0.6, D0.6, D1.6
  46942. +
  46943. +$Lbunaligned_5_6_7:
  46944. + GETL D0.7, D1.7, [--A1.2]
  46945. + ! form 64-bit data in D0Re0, D1Re0
  46946. + MOV D1Re0, D0Re0
  46947. + ! D1Re0 << gap-size
  46948. + LSL D1Re0, D1Re0, D1.6
  46949. + MOV D0Re0, D1.7
  46950. + ! D0Re0 >> complement
  46951. + LSR D0Re0, D0Re0, D0.6
  46952. + MOV D1.5, D0Re0
  46953. + ! combine the both
  46954. + ADD D1Re0, D1Re0, D1.5
  46955. +
  46956. + MOV D1.5, D1.7
  46957. + LSL D1.5, D1.5, D1.6
  46958. + MOV D0Re0, D0.7
  46959. + LSR D0Re0, D0Re0, D0.6
  46960. + MOV D0.5, D1.5
  46961. + ADD D0Re0, D0Re0, D0.5
  46962. +
  46963. + SETL [--A0.2], D0Re0, D1Re0
  46964. + MOV D0Re0, D0.7
  46965. + MOV D1Re0, D1.7
  46966. + SUBS D1Ar5, D1Ar5, #1
  46967. + BNE $Lbunaligned_5_6_7
  46968. +
  46969. + ANDS D1Ar3, D1Ar3, #7
  46970. + BZ $Lbbyte_loop_exit
  46971. + ! Adjust A1.2
  46972. + ! A1.2 <- A1.2 +8 - gapsize
  46973. + ADD A1.2, A1.2, #8
  46974. + SUB A1.2, A1.2, D0Ar4
  46975. + B $Lbbyte_loop
  46976. +
  46977. +$Lbunaligned_1_2_3:
  46978. + MULW D1.6, D0Ar6, #8
  46979. + MOV D0.6, #32
  46980. + SUB D0.6, D0.6, D1.6
  46981. +
  46982. +$Lbunaligned_1_2_3_loop:
  46983. + GETL D0.7, D1.7, [--A1.2]
  46984. + ! form 64-bit data in D0Re0, D1Re0
  46985. + LSL D1Re0, D1Re0, D1.6
  46986. + ! save D0Re0 for later use
  46987. + MOV D0.5, D0Re0
  46988. + LSR D0Re0, D0Re0, D0.6
  46989. + MOV D1.5, D0Re0
  46990. + ADD D1Re0, D1Re0, D1.5
  46991. +
  46992. + ! orignal data in D0Re0
  46993. + MOV D1.5, D0.5
  46994. + LSL D1.5, D1.5, D1.6
  46995. + MOV D0Re0, D1.7
  46996. + LSR D0Re0, D0Re0, D0.6
  46997. + MOV D0.5, D1.5
  46998. + ADD D0Re0, D0Re0, D0.5
  46999. +
  47000. + SETL [--A0.2], D0Re0, D1Re0
  47001. + MOV D0Re0, D0.7
  47002. + MOV D1Re0, D1.7
  47003. + SUBS D1Ar5, D1Ar5, #1
  47004. + BNE $Lbunaligned_1_2_3_loop
  47005. +
  47006. + ANDS D1Ar3, D1Ar3, #7
  47007. + BZ $Lbbyte_loop_exit
  47008. + ! Adjust A1.2
  47009. + ADD A1.2, A1.2, #8
  47010. + SUB A1.2, A1.2, D0Ar4
  47011. + B $Lbbyte_loop
  47012. +
  47013. +$Lbaligned_4:
  47014. + GETL D0.7, D1.7, [--A1.2]
  47015. + MOV D1Re0, D0Re0
  47016. + MOV D0Re0, D1.7
  47017. + SETL [--A0.2], D0Re0, D1Re0
  47018. + MOV D0Re0, D0.7
  47019. + MOV D1Re0, D1.7
  47020. + SUBS D1Ar5, D1Ar5, #1
  47021. + BNE $Lbaligned_4
  47022. + ANDS D1Ar3, D1Ar3, #7
  47023. + BZ $Lbbyte_loop_exit
  47024. + ! Adjust A1.2
  47025. + ADD A1.2, A1.2, #8
  47026. + SUB A1.2, A1.2, D0Ar4
  47027. + B $Lbbyte_loop
  47028. +
  47029. +$Lforwards_copy:
  47030. + MOV A1.2, D0Ar2
  47031. + MOV A0.2, D1Ar1
  47032. + CMP D1Ar3, #8
  47033. + BLT $Lfbyte_loop
  47034. +
  47035. + MOV D0Ar4, D0Ar2
  47036. + MOV D1Ar5, D1Ar1
  47037. +
  47038. + ANDS D1Ar5, D1Ar5, #7
  47039. + BNE $Lfdest_unaligned
  47040. +
  47041. + ANDS D0Ar4, D0Ar4, #7
  47042. + BNE $Lfsrc_unaligned
  47043. +
  47044. + LSR D1Ar5, D1Ar3, #3
  47045. +
  47046. +$Lfaligned_loop:
  47047. + GETL D0Re0, D1Re0, [A1.2++]
  47048. + SUBS D1Ar5, D1Ar5, #1
  47049. + SETL [A0.2++], D0Re0, D1Re0
  47050. + BNE $Lfaligned_loop
  47051. +
  47052. + ANDS D1Ar3, D1Ar3, #7
  47053. + BZ $Lfbyte_loop_exit
  47054. +$Lfbyte_loop:
  47055. + GETB D1Re0, [A1.2++]
  47056. + SETB [A0.2++], D1Re0
  47057. + SUBS D1Ar3, D1Ar3, #1
  47058. + BNE $Lfbyte_loop
  47059. +$Lfbyte_loop_exit:
  47060. + MOV D0Re0, D1Ar1
  47061. + B $LEND
  47062. +
  47063. +$Lfdest_unaligned:
  47064. + GETB D0Re0, [A1.2++]
  47065. + ADD D1Ar5, D1Ar5, #1
  47066. + SUB D1Ar3, D1Ar3, #1
  47067. + SETB [A0.2++], D0Re0
  47068. + CMP D1Ar5, #8
  47069. + BNE $Lfdest_unaligned
  47070. + CMP D1Ar3, #8
  47071. + BLT $Lfbyte_loop
  47072. +$Lfsrc_unaligned:
  47073. + ! adjust A1.2
  47074. + LSR D1Ar5, D1Ar3, #3
  47075. +
  47076. + MOV D0Ar4, A1.2
  47077. + MOV D0Ar6, A1.2
  47078. + ANDMB D0Ar4, D0Ar4, #0xfff8
  47079. + MOV A1.2, D0Ar4
  47080. +
  47081. + ! A0.2 dst 64-bit is aligned
  47082. + SUB D0Ar6, D0Ar6, D0Ar4
  47083. + ! keep the information for the later adjustment
  47084. + MOVS D0Ar4, D0Ar6
  47085. +
  47086. + ! both aligned
  47087. + BZ $Lfaligned_loop
  47088. +
  47089. + ! prefetch
  47090. + GETL D0Re0, D1Re0, [A1.2]
  47091. +
  47092. + CMP D0Ar6, #4
  47093. + BLT $Lfunaligned_1_2_3
  47094. + BZ $Lfaligned_4
  47095. +
  47096. + SUB D0Ar6, D0Ar6, #4
  47097. + MULW D0.6, D0Ar6, #8
  47098. + MOV D1.6, #32
  47099. + SUB D1.6, D1.6, D0.6
  47100. +
  47101. +$Lfunaligned_5_6_7:
  47102. + GETL D0.7, D1.7, [++A1.2]
  47103. + ! form 64-bit data in D0Re0, D1Re0
  47104. + MOV D0Re0, D1Re0
  47105. + LSR D0Re0, D0Re0, D0.6
  47106. + MOV D1Re0, D0.7
  47107. + LSL D1Re0, D1Re0, D1.6
  47108. + MOV D0.5, D1Re0
  47109. + ADD D0Re0, D0Re0, D0.5
  47110. +
  47111. + MOV D0.5, D0.7
  47112. + LSR D0.5, D0.5, D0.6
  47113. + MOV D1Re0, D1.7
  47114. + LSL D1Re0, D1Re0, D1.6
  47115. + MOV D1.5, D0.5
  47116. + ADD D1Re0, D1Re0, D1.5
  47117. +
  47118. + SETL [A0.2++], D0Re0, D1Re0
  47119. + MOV D0Re0, D0.7
  47120. + MOV D1Re0, D1.7
  47121. + SUBS D1Ar5, D1Ar5, #1
  47122. + BNE $Lfunaligned_5_6_7
  47123. +
  47124. + ANDS D1Ar3, D1Ar3, #7
  47125. + BZ $Lfbyte_loop_exit
  47126. + ! Adjust A1.2
  47127. + ADD A1.2, A1.2, D0Ar4
  47128. + B $Lfbyte_loop
  47129. +
  47130. +$Lfunaligned_1_2_3:
  47131. + MULW D0.6, D0Ar6, #8
  47132. + MOV D1.6, #32
  47133. + SUB D1.6, D1.6, D0.6
  47134. +
  47135. +$Lfunaligned_1_2_3_loop:
  47136. + GETL D0.7, D1.7, [++A1.2]
  47137. + ! form 64-bit data in D0Re0, D1Re0
  47138. + LSR D0Re0, D0Re0, D0.6
  47139. + MOV D1.5, D1Re0
  47140. + LSL D1Re0, D1Re0, D1.6
  47141. + MOV D0.5, D1Re0
  47142. + ADD D0Re0, D0Re0, D0.5
  47143. +
  47144. + MOV D0.5, D1.5
  47145. + LSR D0.5, D0.5, D0.6
  47146. + MOV D1Re0, D0.7
  47147. + LSL D1Re0, D1Re0, D1.6
  47148. + MOV D1.5, D0.5
  47149. + ADD D1Re0, D1Re0, D1.5
  47150. +
  47151. + SETL [A0.2++], D0Re0, D1Re0
  47152. + MOV D0Re0, D0.7
  47153. + MOV D1Re0, D1.7
  47154. + SUBS D1Ar5, D1Ar5, #1
  47155. + BNE $Lfunaligned_1_2_3_loop
  47156. +
  47157. + ANDS D1Ar3, D1Ar3, #7
  47158. + BZ $Lfbyte_loop_exit
  47159. + ! Adjust A1.2
  47160. + ADD A1.2, A1.2, D0Ar4
  47161. + B $Lfbyte_loop
  47162. +
  47163. +$Lfaligned_4:
  47164. + GETL D0.7, D1.7, [++A1.2]
  47165. + MOV D0Re0, D1Re0
  47166. + MOV D1Re0, D0.7
  47167. + SETL [A0.2++], D0Re0, D1Re0
  47168. + MOV D0Re0, D0.7
  47169. + MOV D1Re0, D1.7
  47170. + SUBS D1Ar5, D1Ar5, #1
  47171. + BNE $Lfaligned_4
  47172. + ANDS D1Ar3, D1Ar3, #7
  47173. + BZ $Lfbyte_loop_exit
  47174. + ! Adjust A1.2
  47175. + ADD A1.2, A1.2, D0Ar4
  47176. + B $Lfbyte_loop
  47177. +
  47178. + .size _memmove,.-_memmove
  47179. +
  47180. +libc_hidden_def(memmove)
  47181. diff -Nur uClibc-0.9.33.2/libc/string/metag/memset.S uClibc-git/libc/string/metag/memset.S
  47182. --- uClibc-0.9.33.2/libc/string/metag/memset.S 1970-01-01 01:00:00.000000000 +0100
  47183. +++ uClibc-git/libc/string/metag/memset.S 2014-07-25 20:36:06.277331914 +0200
  47184. @@ -0,0 +1,90 @@
  47185. +! Copyright (C) 2013 Imagination Technologies Ltd.
  47186. +
  47187. +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  47188. +
  47189. +
  47190. + .text
  47191. + .global _memset
  47192. + .type _memset,function
  47193. +! D1Ar1 dst
  47194. +! D0Ar2 c
  47195. +! D1Ar3 cnt
  47196. +! D0Re0 dst
  47197. +_memset:
  47198. + AND D0Ar2,D0Ar2,#0xFF ! Ensure a byte input value
  47199. + MULW D0Ar2,D0Ar2,#0x0101 ! Duplicate byte value into 0-15
  47200. + ANDS D0Ar4,D1Ar1,#7 ! Extract bottom LSBs of dst
  47201. + LSL D0Re0,D0Ar2,#16 ! Duplicate byte value into 16-31
  47202. + ADD A0.2,D0Ar2,D0Re0 ! Duplicate byte value into 4 (A0.2)
  47203. + MOV D0Re0,D1Ar1 ! Return dst
  47204. + BZ $LLongStub ! if start address is aligned
  47205. + ! start address is not aligned on an 8 byte boundary, so we
  47206. + ! need the number of bytes up to the next 8 byte address
  47207. + ! boundary, or the length of the string if less than 8, in D1Ar5
  47208. + MOV D0Ar2,#8 ! Need 8 - N in D1Ar5 ...
  47209. + SUB D1Ar5,D0Ar2,D0Ar4 ! ... subtract N
  47210. + CMP D1Ar3,D1Ar5
  47211. + MOVMI D1Ar5,D1Ar3
  47212. + B $LByteStub ! dst is mis-aligned, do $LByteStub
  47213. +
  47214. +!
  47215. +! Preamble to LongLoop which generates 4*8 bytes per interation (5 cycles)
  47216. +!
  47217. +$LLongStub:
  47218. + LSRS D0Ar2,D1Ar3,#5
  47219. + AND D1Ar3,D1Ar3,#0x1F
  47220. + MOV A1.2,A0.2
  47221. + BEQ $LLongishStub
  47222. + SUB TXRPT,D0Ar2,#1
  47223. + CMP D1Ar3,#0
  47224. +$LLongLoop:
  47225. + SETL [D1Ar1++],A0.2,A1.2
  47226. + SETL [D1Ar1++],A0.2,A1.2
  47227. + SETL [D1Ar1++],A0.2,A1.2
  47228. + SETL [D1Ar1++],A0.2,A1.2
  47229. + BR $LLongLoop
  47230. + BZ $Lexit
  47231. +!
  47232. +! Preamble to LongishLoop which generates 1*8 bytes per interation (2 cycles)
  47233. +!
  47234. +$LLongishStub:
  47235. + LSRS D0Ar2,D1Ar3,#3
  47236. + AND D1Ar3,D1Ar3,#0x7
  47237. + MOV D1Ar5,D1Ar3
  47238. + BEQ $LByteStub
  47239. + SUB TXRPT,D0Ar2,#1
  47240. + CMP D1Ar3,#0
  47241. +$LLongishLoop:
  47242. + SETL [D1Ar1++],A0.2,A1.2
  47243. + BR $LLongishLoop
  47244. + BZ $Lexit
  47245. +!
  47246. +! This does a byte structured burst of up to 7 bytes
  47247. +!
  47248. +! D1Ar1 should point to the location required
  47249. +! D1Ar3 should be the remaining total byte count
  47250. +! D1Ar5 should be burst size (<= D1Ar3)
  47251. +!
  47252. +$LByteStub:
  47253. + SUBS D1Ar3,D1Ar3,D1Ar5 ! Reduce count
  47254. + ADD D1Ar1,D1Ar1,D1Ar5 ! Advance pointer to end of area
  47255. + MULW D1Ar5,D1Ar5,#4 ! Scale to (1*4), (2*4), (3*4)
  47256. + SUB D1Ar5,D1Ar5,#(8*4) ! Rebase to -(7*4), -(6*4), -(5*4), ...
  47257. + MOV A1.2,D1Ar5
  47258. + SUB PC,CPC1,A1.2 ! Jump into table below
  47259. + SETB [D1Ar1+#(-7)],A0.2
  47260. + SETB [D1Ar1+#(-6)],A0.2
  47261. + SETB [D1Ar1+#(-5)],A0.2
  47262. + SETB [D1Ar1+#(-4)],A0.2
  47263. + SETB [D1Ar1+#(-3)],A0.2
  47264. + SETB [D1Ar1+#(-2)],A0.2
  47265. + SETB [D1Ar1+#(-1)],A0.2
  47266. +!
  47267. +! Return if all data has been output, otherwise do $LLongStub
  47268. +!
  47269. + BNZ $LLongStub
  47270. +$Lexit:
  47271. + MOV PC,D1RtP
  47272. + .size _memset,.-_memset
  47273. +
  47274. +libc_hidden_def(memset)
  47275. diff -Nur uClibc-0.9.33.2/libc/string/metag/strchr.S uClibc-git/libc/string/metag/strchr.S
  47276. --- uClibc-0.9.33.2/libc/string/metag/strchr.S 1970-01-01 01:00:00.000000000 +0100
  47277. +++ uClibc-git/libc/string/metag/strchr.S 2014-07-25 20:36:06.277331914 +0200
  47278. @@ -0,0 +1,167 @@
  47279. +! Copyright (C) 2013 Imagination Technologies Ltd.
  47280. +
  47281. +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  47282. +
  47283. +
  47284. +#include <features.h>
  47285. +
  47286. + .text
  47287. + .global _strchr
  47288. + .type _strchr, function
  47289. +! D1Ar1 src
  47290. +! D0Ar2 c
  47291. +_strchr:
  47292. + AND D0Ar2,D0Ar2,#0xff ! Drop all but 8 bits of c
  47293. + MOV D1Ar5, D1Ar1 ! Copy src to D1Ar5
  47294. + AND D1Ar5, D1Ar5, #7 ! Check 64 bit alignment
  47295. + CMP D1Ar5, #0
  47296. + BZ $Laligned64bit ! Jump to 64 bit aligned strchr
  47297. +$Lalign64bit:
  47298. + GETB D0Re0, [D1Ar1++] ! Get the next character
  47299. + ADD D1Ar5, D1Ar5, #1 ! Increment alignment counter
  47300. + CMP D0Re0, D0Ar2 ! Is the char c
  47301. + BZ $Lcharatprevious ! If so exit returning position
  47302. + CMP D0Re0, #0 ! End of string?
  47303. + BZ $Lnotfound ! If so exit
  47304. + CMP D1Ar5, #8 ! Are we aligned 64bit yet?
  47305. + BNZ $Lalign64bit ! If not keep aligning
  47306. +$Laligned64bit: ! src is 64bit aligned
  47307. + MOV D0Ar4, D0Ar2 ! put c into D0Ar4
  47308. + LSL D0Ar4, D0Ar4, #8 ! Shift it up
  47309. + ADD D0Ar4, D0Ar4, D0Ar2 ! another c
  47310. + LSL D0Ar4, D0Ar4, #8 ! shift
  47311. + ADD D0Ar4, D0Ar4, D0Ar2 ! another c
  47312. + LSL D0Ar4, D0Ar4, #8 ! shift
  47313. + ADD D0Ar4, D0Ar4, D0Ar2 ! 4 copies of c
  47314. +$Lcheck8bytes:
  47315. + GETL D0Re0, D1Re0, [D1Ar1++] ! grab 16 bytes
  47316. + MOV A0.3, D0Re0 ! save for later use
  47317. + ! first word
  47318. + ! check for \0
  47319. + MOV D0Ar2, D0Re0 ! D0Ar2 is a scratch now
  47320. + ADDT D0Re0, D0Re0, #HI(0xfefefeff) ! Do 4 1-byte compares
  47321. + ADD D0Re0, D0Re0, #LO(0xfefefeff)
  47322. + XOR D0Ar2, D0Ar2, #-1
  47323. + AND D0Re0, D0Re0, D0Ar2
  47324. + ANDMT D0Re0, D0Re0, #HI(0x80808080)
  47325. + ANDMB D0Re0, D0Re0, #LO(0x80808080)
  47326. + CMP D0Re0, #0
  47327. + BNZ $Lnullinword1 ! found \0 (or c if c==\0)
  47328. +
  47329. + ! Check for c
  47330. + MOV D0Re0, A0.3 ! restore the first word
  47331. + XOR D0Re0, D0Re0, D0Ar4
  47332. + MOV D0Ar2, D0Re0 ! DO 4 1-byte compares
  47333. + ADDT D0Re0, D0Re0, #HI(0xfefefeff)
  47334. + ADD D0Re0, D0Re0, #LO(0xfefefeff)
  47335. + XOR D0Ar2, D0Ar2, #-1
  47336. + AND D0Re0, D0Re0, D0Ar2
  47337. + ANDMT D0Re0, D0Re0, #HI(0x80808080)
  47338. + ANDMB D0Re0, D0Re0, #LO(0x80808080)
  47339. + CMP D0Re0, #0
  47340. + BNZ $Lcharinword1 ! found c
  47341. +
  47342. + ! second word
  47343. + ! check for \0
  47344. + MOV A0.3, D1Re0 ! save for later use
  47345. + MOV D1Ar3, D1Re0
  47346. + ADDT D1Re0, D1Re0, #HI(0xfefefeff) ! Do 4 1-byte compares
  47347. + ADD D1Re0, D1Re0, #LO(0xfefefeff)
  47348. + XOR D1Ar3, D1Ar3, #-1
  47349. + AND D1Re0, D1Re0, D1Ar3
  47350. + ANDMT D1Re0, D1Re0, #HI(0x80808080)
  47351. + ANDMB D1Re0, D1Re0, #LO(0x80808080)
  47352. + CMP D1Re0, #0
  47353. + BNZ $Lnullinword2 ! Found \0 (or c if c==\0)
  47354. +
  47355. + MOV D0.4, A0.3 ! restore the second word
  47356. + XOR D1Re0, D0.4, D0Ar4 ! test c
  47357. +
  47358. + MOV D1Ar3, D1Re0
  47359. + ADDT D1Re0, D1Re0, #HI(0xfefefeff) ! Do 4 1-byte compares
  47360. + ADD D1Re0, D1Re0, #LO(0xfefefeff)
  47361. + XOR D1Ar3, D1Ar3, #-1
  47362. + AND D1Re0, D1Re0, D1Ar3
  47363. + ANDMT D1Re0, D1Re0, #HI(0x80808080)
  47364. + ANDMB D1Re0, D1Re0, #LO(0x80808080)
  47365. + CMP D1Re0, #0
  47366. + BNZ $Lcharinword2 ! found c
  47367. +
  47368. + B $Lcheck8bytes ! Keep checking
  47369. +
  47370. +$Lnullinword1: ! found \0 somewhere, check for c too
  47371. + SUB D1Ar1, D1Ar1, #4
  47372. +$Lnullinword2:
  47373. + SUB D1Ar1, D1Ar1, #4
  47374. + AND D0Ar2, D0Ar4, #0xff ! restore c
  47375. + MOV D0Re0, A0.3 ! restore the word
  47376. + MOV D0.4, D0Re0 ! for shifting later
  47377. + AND D0Re0, D0Re0, #0xff ! take first byte of word
  47378. + CMP D0Re0, D0Ar2
  47379. + BZ $Lcharatcurrent ! found c
  47380. + CMP D0Re0, #0!
  47381. + BZ $Lnotfound ! found \0
  47382. +
  47383. + ADD D1Ar1, D1Ar1, #1
  47384. + LSR D0.4, D0.4, #8
  47385. + MOV D0Re0, D0.4
  47386. + AND D0Re0, D0Re0, #0xff ! take second byte of word
  47387. + CMP D0Re0, D0Ar2
  47388. + BZ $Lcharatcurrent ! found c
  47389. + CMP D0Re0, #0
  47390. + BZ $Lnotfound ! found \0
  47391. +
  47392. + ADD D1Ar1, D1Ar1, #1
  47393. + LSR D0.4, D0.4, #8
  47394. + MOV D0Re0, D0.4
  47395. + AND D0Re0, D0Re0, #0xff ! take third byte of word
  47396. + CMP D0Re0, D0Ar2
  47397. + BZ $Lcharatcurrent ! found c
  47398. + CMP D0Re0, #0
  47399. + BZ $Lnotfound ! found \0
  47400. +
  47401. + ADD D1Ar1, D1Ar1, #1 ! move to 4th byte
  47402. + CMP D0Ar2, #0 ! If c was \0
  47403. + BZ $Lcharatcurrent ! c has been found!
  47404. +
  47405. +$Lnotfound:
  47406. + MOV D0Re0, #0 ! End of string c not found
  47407. + B $Lend
  47408. +
  47409. +$Lcharinword1: ! found c in first word
  47410. + MOV D1Re0, D0Re0
  47411. + SUB D1Ar1, D1Ar1, #4
  47412. +$Lcharinword2: ! found c in second word
  47413. + SUB D1Ar1, D1Ar1, #4
  47414. +
  47415. + AND D0Re0, D1Re0, #0xff ! First byte
  47416. + CMP D0Re0, #0 ! Test c (zero indicates c due
  47417. + ! to the 4 1-byte compare code)
  47418. + BNE $Lcharatcurrent
  47419. + ADD D1Ar1, D1Ar1, #1
  47420. +
  47421. + LSR D1Re0, D1Re0, #8
  47422. + AND D0Re0, D1Re0, #0xff ! Second byte
  47423. + CMP D0Re0, #0 ! Test c (indicated by zero)
  47424. + BNE $Lcharatcurrent
  47425. + ADD D1Ar1, D1Ar1, #1
  47426. +
  47427. + LSR D1Re0, D1Re0, #8
  47428. + AND D0Re0, D1Re0, #0xff ! Third byte
  47429. + CMP D0Re0, #0 ! Test c (indicated by zero)
  47430. + BNE $Lcharatcurrent
  47431. + ADD D1Ar1, D1Ar1, #1 ! Must be the fourth byte
  47432. + B $Lcharatcurrent
  47433. +
  47434. +$Lcharatprevious:
  47435. + SUB D1Ar1, D1Ar1, #1 ! Fix-up pointer
  47436. +$Lcharatcurrent:
  47437. + MOV D0Re0, D1Ar1 ! Return the string pointer
  47438. +$Lend:
  47439. + MOV PC, D1RtP
  47440. + .size _strchr,.-_strchr
  47441. +
  47442. +libc_hidden_def(strchr)
  47443. +#ifdef __UCLIBC_SUSV3_LEGACY__
  47444. +strong_alias(strchr,index)
  47445. +#endif
  47446. diff -Nur uClibc-0.9.33.2/libc/string/metag/strcmp.S uClibc-git/libc/string/metag/strcmp.S
  47447. --- uClibc-0.9.33.2/libc/string/metag/strcmp.S 1970-01-01 01:00:00.000000000 +0100
  47448. +++ uClibc-git/libc/string/metag/strcmp.S 2014-07-25 20:36:06.277331914 +0200
  47449. @@ -0,0 +1,65 @@
  47450. +! Copyright (C) 2013 Imagination Technologies Ltd.
  47451. +
  47452. +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  47453. +
  47454. +
  47455. +#include <features.h>
  47456. +
  47457. + .text
  47458. + .global _strcmp
  47459. + .type _strcmp,function
  47460. +!D1Ar1 s1
  47461. +!D0Ar2 s2
  47462. +_strcmp:
  47463. + TST D1Ar1,#3
  47464. + TSTZ D0Ar2,#3
  47465. + MOVT D1Re0,#0x0101
  47466. + ADD D1Re0,D1Re0,#0x0101
  47467. + BNZ $Lstrcmp_slow
  47468. + GETD D1Ar3,[D1Ar1+#4++] ! Load 32-bits from s1
  47469. + GETD D1Ar5,[D0Ar2+#4++] ! Load 32-bits from s2
  47470. + LSL D0FrT,D1Re0,#7 ! D0FrT = 0x80808080
  47471. +$Lstrcmp4_loop:
  47472. + SUB D0Re0,D1Ar3,D1Re0 ! D1Re0 = 0x01010101
  47473. + MOV D0Ar6,D1Ar3
  47474. + SUBS D0Ar4,D1Ar3,D1Ar5 ! Calculate difference
  47475. + XOR D0Ar6,D0Ar6,#-1
  47476. + GETD D1Ar3,[D1Ar1+#4++] ! Load 32-bits from s1
  47477. + AND D0Re0,D0Re0,D0Ar6
  47478. + ANDSZ D0Ar6,D0Re0,D0FrT ! D0FrT = 0x80808080
  47479. + GETD D1Ar5,[D0Ar2+#4++] ! Load 32-bits from s2
  47480. + BZ $Lstrcmp4_loop
  47481. + AND D0Ar6, D0Re0, D0FrT ! D0FrT = 0x80808080
  47482. +!
  47483. +! Either they are different or they both contain a NULL + junk
  47484. +!
  47485. +$Lstrcmp4_end:
  47486. + LSLS D0Re0,D0Ar4,#24 ! Was Byte[0] the same?
  47487. + LSLSZ D0Ar2,D0Ar6,#24 ! Yes: AND they where not zero?
  47488. + LSLSZ D0Re0,D0Ar4,#16 ! Yes: Was Byte[1] the same?
  47489. + LSLSZ D0Ar2,D0Ar6,#16 ! Yes: AND they where not zero?
  47490. + LSLSZ D0Re0,D0Ar4,#8 ! Tes: Was Byte[2] the same?
  47491. + LSLSZ D0Ar2,D0Ar6,#8 ! Yes: AND they where not zero?
  47492. + MOVZ D0Re0,D0Ar4 ! Yes: Must by Byte[3] thats the result
  47493. + ASR D0Re0,D0Re0,#24 ! Sign extend result to integer
  47494. + MOV PC,D1RtP
  47495. +!
  47496. +! Misaligned case, byte at a time
  47497. +!
  47498. +$Lstrcmp_slow:
  47499. + GETB D1Ar3,[D1Ar1++] ! Load char from s1
  47500. + GETB D1Ar5,[D0Ar2++] ! Load char from s2
  47501. + CMP D1Ar3,#1 ! Null -> C and NZ, rest -> NC (\1->Z)
  47502. + CMPNC D1Ar3,D1Ar5 ! NOT Null: Same -> Z, else -> NZ
  47503. + BZ $Lstrcmp_slow ! NOT Null and Same: Loop
  47504. + SUB D0Re0,D1Ar3,D1Ar5 ! Generate result
  47505. + MOV PC,D1RtP
  47506. +
  47507. + .size _strcmp,.-_strcmp
  47508. +
  47509. +
  47510. +libc_hidden_def(strcmp)
  47511. +#ifndef __UCLIBC_HAS_LOCALE__
  47512. +strong_alias(strcmp,strcoll)
  47513. +libc_hidden_def(strcoll)
  47514. +#endif
  47515. diff -Nur uClibc-0.9.33.2/libc/string/metag/strcpy.S uClibc-git/libc/string/metag/strcpy.S
  47516. --- uClibc-0.9.33.2/libc/string/metag/strcpy.S 1970-01-01 01:00:00.000000000 +0100
  47517. +++ uClibc-git/libc/string/metag/strcpy.S 2014-07-25 20:36:06.277331914 +0200
  47518. @@ -0,0 +1,94 @@
  47519. +! Copyright (C) 2013 Imagination Technologies Ltd.
  47520. +
  47521. +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  47522. +
  47523. +
  47524. + .text
  47525. + .global _strcpy
  47526. + .type _strcpy,function
  47527. +! D1Ar1 dst
  47528. +! D0Ar2 src
  47529. +
  47530. +_strcpy:
  47531. + MOV A1.2, D1Ar1
  47532. +
  47533. + ! test 4 byte alignment of src
  47534. + ANDS D0Ar4, D0Ar2, #3
  47535. + BNZ $Lbyteloop
  47536. +
  47537. + ! test 4 byte alignment of dest
  47538. + ANDS D1Ar5, D1Ar1, #3
  47539. + BNZ $Lbyteloop
  47540. +
  47541. + ! load mask values for aligned loops
  47542. + MOVT D1Ar3, #HI(0xfefefeff)
  47543. + ADD D1Ar3, D1Ar3, #LO(0xfefefeff)
  47544. + MOVT D0FrT, #HI(0x80808080)
  47545. + ADD D0FrT, D0FrT, #LO(0x80808080)
  47546. +
  47547. + ! test 8 byte alignment of src
  47548. + ANDS D0Ar4, D0Ar2, #7
  47549. + BNZ $Lwordloop
  47550. +
  47551. + ! test 8 byte alignment of dest
  47552. + ANDS D1Ar5, D1Ar1, #7
  47553. + BNZ $Lwordloop
  47554. +
  47555. +$L8byteloop:
  47556. + GETL D1Ar5, D0Ar6, [D0Ar2++]
  47557. + MOV D1Re0, D1Ar5
  47558. + MOV D0Re0, D1Ar5
  47559. + ADD D1Re0, D1Re0, D1Ar3
  47560. + XOR D0Re0, D0Re0, #-1
  47561. + AND D1Re0, D1Re0, D0Re0
  47562. + ANDS D1Re0, D1Re0, D0FrT
  47563. + BNZ $Lnullfound ! NULL in first word
  47564. +
  47565. + MOV D1Re0, D0Ar6
  47566. + MOV D0Re0, D0Ar6
  47567. + ADD D1Re0, D1Re0, D1Ar3
  47568. + XOR D0Re0, D0Re0, #-1
  47569. + AND D1Re0, D1Re0, D0Re0
  47570. + ANDS D1Re0, D1Re0, D0FrT
  47571. + BNZ $Lnullfound2 ! NULL in the second word
  47572. +
  47573. + SETL [A1.2++], D1Ar5, D0Ar6
  47574. + B $L8byteloop
  47575. +
  47576. +$Lwordloop:
  47577. + GETD D0Ar6, [D0Ar2++]
  47578. + MOV D1Re0, D0Ar6
  47579. + MOV D0Re0, D0Ar6
  47580. + ADD D1Re0, D1Re0, D1Ar3
  47581. + XOR D0Re0, D0Re0, #-1
  47582. + AND D1Re0, D1Re0, D0Re0
  47583. + ANDS D1Re0, D1Re0, D0FrT
  47584. + MOV D1Ar5, D0Ar6
  47585. + BNZ $Lnullfound
  47586. + SETD [A1.2++], D0Ar6
  47587. + B $Lwordloop
  47588. +
  47589. +$Lnullfound2:
  47590. + SETD [A1.2++], D1Ar5
  47591. + MOV D1Ar5, D0Ar6
  47592. +
  47593. +$Lnullfound:
  47594. + SETB [A1.2++], D1Ar5
  47595. + ANDS D0Ar6, D1Ar5, #0xff
  47596. + LSR D1Ar5, D1Ar5, #8
  47597. + BNZ $Lnullfound
  47598. + B $Lend
  47599. +
  47600. +$Lbyteloop:
  47601. + GETB D0Ar6, [D0Ar2++]
  47602. + SETB [A1.2++], D0Ar6
  47603. + CMP D0Ar6, #0
  47604. + BNZ $Lbyteloop
  47605. +
  47606. +$Lend:
  47607. + MOV D0Re0, D1Ar1
  47608. + MOV PC, D1RtP
  47609. +
  47610. + .size _strcpy,.-_strcpy
  47611. +
  47612. +libc_hidden_def(strcpy)
  47613. diff -Nur uClibc-0.9.33.2/libc/string/microblaze/memcpy.S uClibc-git/libc/string/microblaze/memcpy.S
  47614. --- uClibc-0.9.33.2/libc/string/microblaze/memcpy.S 2012-05-15 09:20:09.000000000 +0200
  47615. +++ uClibc-git/libc/string/microblaze/memcpy.S 2014-07-25 20:36:06.289331978 +0200
  47616. @@ -34,6 +34,14 @@
  47617. .type memcpy, @function
  47618. .ent memcpy
  47619. +#ifdef __MICROBLAZEEL__
  47620. +# define BSLLI bsrli
  47621. +# define BSRLI bslli
  47622. +#else
  47623. +# define BSLLI bslli
  47624. +# define BSRLI bsrli
  47625. +#endif
  47626. +
  47627. memcpy:
  47628. fast_memcpy_ascending:
  47629. /* move d to return register as value of function */
  47630. @@ -85,48 +93,48 @@
  47631. beqi r9, a_block_u2 /* t1 was 2 => 2 byte offset */
  47632. a_block_u3:
  47633. - bslli r11, r11, 24 /* h = h << 24 */
  47634. + BSLLI r11, r11, 24 /* h = h << 24 */
  47635. a_bu3_loop:
  47636. lwi r12, r8, 4 /* v = *(as + 4) */
  47637. - bsrli r9, r12, 8 /* t1 = v >> 8 */
  47638. + BSRLI r9, r12, 8 /* t1 = v >> 8 */
  47639. or r9, r11, r9 /* t1 = h | t1 */
  47640. swi r9, r5, 0 /* *(d + 0) = t1 */
  47641. - bslli r11, r12, 24 /* h = v << 24 */
  47642. + BSLLI r11, r12, 24 /* h = v << 24 */
  47643. lwi r12, r8, 8 /* v = *(as + 8) */
  47644. - bsrli r9, r12, 8 /* t1 = v >> 8 */
  47645. + BSRLI r9, r12, 8 /* t1 = v >> 8 */
  47646. or r9, r11, r9 /* t1 = h | t1 */
  47647. swi r9, r5, 4 /* *(d + 4) = t1 */
  47648. - bslli r11, r12, 24 /* h = v << 24 */
  47649. + BSLLI r11, r12, 24 /* h = v << 24 */
  47650. lwi r12, r8, 12 /* v = *(as + 12) */
  47651. - bsrli r9, r12, 8 /* t1 = v >> 8 */
  47652. + BSRLI r9, r12, 8 /* t1 = v >> 8 */
  47653. or r9, r11, r9 /* t1 = h | t1 */
  47654. swi r9, r5, 8 /* *(d + 8) = t1 */
  47655. - bslli r11, r12, 24 /* h = v << 24 */
  47656. + BSLLI r11, r12, 24 /* h = v << 24 */
  47657. lwi r12, r8, 16 /* v = *(as + 16) */
  47658. - bsrli r9, r12, 8 /* t1 = v >> 8 */
  47659. + BSRLI r9, r12, 8 /* t1 = v >> 8 */
  47660. or r9, r11, r9 /* t1 = h | t1 */
  47661. swi r9, r5, 12 /* *(d + 12) = t1 */
  47662. - bslli r11, r12, 24 /* h = v << 24 */
  47663. + BSLLI r11, r12, 24 /* h = v << 24 */
  47664. lwi r12, r8, 20 /* v = *(as + 20) */
  47665. - bsrli r9, r12, 8 /* t1 = v >> 8 */
  47666. + BSRLI r9, r12, 8 /* t1 = v >> 8 */
  47667. or r9, r11, r9 /* t1 = h | t1 */
  47668. swi r9, r5, 16 /* *(d + 16) = t1 */
  47669. - bslli r11, r12, 24 /* h = v << 24 */
  47670. + BSLLI r11, r12, 24 /* h = v << 24 */
  47671. lwi r12, r8, 24 /* v = *(as + 24) */
  47672. - bsrli r9, r12, 8 /* t1 = v >> 8 */
  47673. + BSRLI r9, r12, 8 /* t1 = v >> 8 */
  47674. or r9, r11, r9 /* t1 = h | t1 */
  47675. swi r9, r5, 20 /* *(d + 20) = t1 */
  47676. - bslli r11, r12, 24 /* h = v << 24 */
  47677. + BSLLI r11, r12, 24 /* h = v << 24 */
  47678. lwi r12, r8, 28 /* v = *(as + 28) */
  47679. - bsrli r9, r12, 8 /* t1 = v >> 8 */
  47680. + BSRLI r9, r12, 8 /* t1 = v >> 8 */
  47681. or r9, r11, r9 /* t1 = h | t1 */
  47682. swi r9, r5, 24 /* *(d + 24) = t1 */
  47683. - bslli r11, r12, 24 /* h = v << 24 */
  47684. + BSLLI r11, r12, 24 /* h = v << 24 */
  47685. lwi r12, r8, 32 /* v = *(as + 32) */
  47686. - bsrli r9, r12, 8 /* t1 = v >> 8 */
  47687. + BSRLI r9, r12, 8 /* t1 = v >> 8 */
  47688. or r9, r11, r9 /* t1 = h | t1 */
  47689. swi r9, r5, 28 /* *(d + 28) = t1 */
  47690. - bslli r11, r12, 24 /* h = v << 24 */
  47691. + BSLLI r11, r12, 24 /* h = v << 24 */
  47692. addi r8, r8, 32 /* as = as + 32 */
  47693. addi r4, r4, -32 /* n = n - 32 */
  47694. bneid r4, a_bu3_loop /* while (n) loop */
  47695. @@ -134,48 +142,48 @@
  47696. bri a_block_done
  47697. a_block_u1:
  47698. - bslli r11, r11, 8 /* h = h << 8 */
  47699. + BSLLI r11, r11, 8 /* h = h << 8 */
  47700. a_bu1_loop:
  47701. lwi r12, r8, 4 /* v = *(as + 4) */
  47702. - bsrli r9, r12, 24 /* t1 = v >> 24 */
  47703. + BSRLI r9, r12, 24 /* t1 = v >> 24 */
  47704. or r9, r11, r9 /* t1 = h | t1 */
  47705. swi r9, r5, 0 /* *(d + 0) = t1 */
  47706. - bslli r11, r12, 8 /* h = v << 8 */
  47707. + BSLLI r11, r12, 8 /* h = v << 8 */
  47708. lwi r12, r8, 8 /* v = *(as + 8) */
  47709. - bsrli r9, r12, 24 /* t1 = v >> 24 */
  47710. + BSRLI r9, r12, 24 /* t1 = v >> 24 */
  47711. or r9, r11, r9 /* t1 = h | t1 */
  47712. swi r9, r5, 4 /* *(d + 4) = t1 */
  47713. - bslli r11, r12, 8 /* h = v << 8 */
  47714. + BSLLI r11, r12, 8 /* h = v << 8 */
  47715. lwi r12, r8, 12 /* v = *(as + 12) */
  47716. - bsrli r9, r12, 24 /* t1 = v >> 24 */
  47717. + BSRLI r9, r12, 24 /* t1 = v >> 24 */
  47718. or r9, r11, r9 /* t1 = h | t1 */
  47719. swi r9, r5, 8 /* *(d + 8) = t1 */
  47720. - bslli r11, r12, 8 /* h = v << 8 */
  47721. + BSLLI r11, r12, 8 /* h = v << 8 */
  47722. lwi r12, r8, 16 /* v = *(as + 16) */
  47723. - bsrli r9, r12, 24 /* t1 = v >> 24 */
  47724. + BSRLI r9, r12, 24 /* t1 = v >> 24 */
  47725. or r9, r11, r9 /* t1 = h | t1 */
  47726. swi r9, r5, 12 /* *(d + 12) = t1 */
  47727. - bslli r11, r12, 8 /* h = v << 8 */
  47728. + BSLLI r11, r12, 8 /* h = v << 8 */
  47729. lwi r12, r8, 20 /* v = *(as + 20) */
  47730. - bsrli r9, r12, 24 /* t1 = v >> 24 */
  47731. + BSRLI r9, r12, 24 /* t1 = v >> 24 */
  47732. or r9, r11, r9 /* t1 = h | t1 */
  47733. swi r9, r5, 16 /* *(d + 16) = t1 */
  47734. - bslli r11, r12, 8 /* h = v << 8 */
  47735. + BSLLI r11, r12, 8 /* h = v << 8 */
  47736. lwi r12, r8, 24 /* v = *(as + 24) */
  47737. - bsrli r9, r12, 24 /* t1 = v >> 24 */
  47738. + BSRLI r9, r12, 24 /* t1 = v >> 24 */
  47739. or r9, r11, r9 /* t1 = h | t1 */
  47740. swi r9, r5, 20 /* *(d + 20) = t1 */
  47741. - bslli r11, r12, 8 /* h = v << 8 */
  47742. + BSLLI r11, r12, 8 /* h = v << 8 */
  47743. lwi r12, r8, 28 /* v = *(as + 28) */
  47744. - bsrli r9, r12, 24 /* t1 = v >> 24 */
  47745. + BSRLI r9, r12, 24 /* t1 = v >> 24 */
  47746. or r9, r11, r9 /* t1 = h | t1 */
  47747. swi r9, r5, 24 /* *(d + 24) = t1 */
  47748. - bslli r11, r12, 8 /* h = v << 8 */
  47749. + BSLLI r11, r12, 8 /* h = v << 8 */
  47750. lwi r12, r8, 32 /* v = *(as + 32) */
  47751. - bsrli r9, r12, 24 /* t1 = v >> 24 */
  47752. + BSRLI r9, r12, 24 /* t1 = v >> 24 */
  47753. or r9, r11, r9 /* t1 = h | t1 */
  47754. swi r9, r5, 28 /* *(d + 28) = t1 */
  47755. - bslli r11, r12, 8 /* h = v << 8 */
  47756. + BSLLI r11, r12, 8 /* h = v << 8 */
  47757. addi r8, r8, 32 /* as = as + 32 */
  47758. addi r4, r4, -32 /* n = n - 32 */
  47759. bneid r4, a_bu1_loop /* while (n) loop */
  47760. @@ -183,48 +191,48 @@
  47761. bri a_block_done
  47762. a_block_u2:
  47763. - bslli r11, r11, 16 /* h = h << 16 */
  47764. + BSLLI r11, r11, 16 /* h = h << 16 */
  47765. a_bu2_loop:
  47766. lwi r12, r8, 4 /* v = *(as + 4) */
  47767. - bsrli r9, r12, 16 /* t1 = v >> 16 */
  47768. + BSRLI r9, r12, 16 /* t1 = v >> 16 */
  47769. or r9, r11, r9 /* t1 = h | t1 */
  47770. swi r9, r5, 0 /* *(d + 0) = t1 */
  47771. - bslli r11, r12, 16 /* h = v << 16 */
  47772. + BSLLI r11, r12, 16 /* h = v << 16 */
  47773. lwi r12, r8, 8 /* v = *(as + 8) */
  47774. - bsrli r9, r12, 16 /* t1 = v >> 16 */
  47775. + BSRLI r9, r12, 16 /* t1 = v >> 16 */
  47776. or r9, r11, r9 /* t1 = h | t1 */
  47777. swi r9, r5, 4 /* *(d + 4) = t1 */
  47778. - bslli r11, r12, 16 /* h = v << 16 */
  47779. + BSLLI r11, r12, 16 /* h = v << 16 */
  47780. lwi r12, r8, 12 /* v = *(as + 12) */
  47781. - bsrli r9, r12, 16 /* t1 = v >> 16 */
  47782. + BSRLI r9, r12, 16 /* t1 = v >> 16 */
  47783. or r9, r11, r9 /* t1 = h | t1 */
  47784. swi r9, r5, 8 /* *(d + 8) = t1 */
  47785. - bslli r11, r12, 16 /* h = v << 16 */
  47786. + BSLLI r11, r12, 16 /* h = v << 16 */
  47787. lwi r12, r8, 16 /* v = *(as + 16) */
  47788. - bsrli r9, r12, 16 /* t1 = v >> 16 */
  47789. + BSRLI r9, r12, 16 /* t1 = v >> 16 */
  47790. or r9, r11, r9 /* t1 = h | t1 */
  47791. swi r9, r5, 12 /* *(d + 12) = t1 */
  47792. - bslli r11, r12, 16 /* h = v << 16 */
  47793. + BSLLI r11, r12, 16 /* h = v << 16 */
  47794. lwi r12, r8, 20 /* v = *(as + 20) */
  47795. - bsrli r9, r12, 16 /* t1 = v >> 16 */
  47796. + BSRLI r9, r12, 16 /* t1 = v >> 16 */
  47797. or r9, r11, r9 /* t1 = h | t1 */
  47798. swi r9, r5, 16 /* *(d + 16) = t1 */
  47799. - bslli r11, r12, 16 /* h = v << 16 */
  47800. + BSLLI r11, r12, 16 /* h = v << 16 */
  47801. lwi r12, r8, 24 /* v = *(as + 24) */
  47802. - bsrli r9, r12, 16 /* t1 = v >> 16 */
  47803. + BSRLI r9, r12, 16 /* t1 = v >> 16 */
  47804. or r9, r11, r9 /* t1 = h | t1 */
  47805. swi r9, r5, 20 /* *(d + 20) = t1 */
  47806. - bslli r11, r12, 16 /* h = v << 16 */
  47807. + BSLLI r11, r12, 16 /* h = v << 16 */
  47808. lwi r12, r8, 28 /* v = *(as + 28) */
  47809. - bsrli r9, r12, 16 /* t1 = v >> 16 */
  47810. + BSRLI r9, r12, 16 /* t1 = v >> 16 */
  47811. or r9, r11, r9 /* t1 = h | t1 */
  47812. swi r9, r5, 24 /* *(d + 24) = t1 */
  47813. - bslli r11, r12, 16 /* h = v << 16 */
  47814. + BSLLI r11, r12, 16 /* h = v << 16 */
  47815. lwi r12, r8, 32 /* v = *(as + 32) */
  47816. - bsrli r9, r12, 16 /* t1 = v >> 16 */
  47817. + BSRLI r9, r12, 16 /* t1 = v >> 16 */
  47818. or r9, r11, r9 /* t1 = h | t1 */
  47819. swi r9, r5, 28 /* *(d + 28) = t1 */
  47820. - bslli r11, r12, 16 /* h = v << 16 */
  47821. + BSLLI r11, r12, 16 /* h = v << 16 */
  47822. addi r8, r8, 32 /* as = as + 32 */
  47823. addi r4, r4, -32 /* n = n - 32 */
  47824. bneid r4, a_bu2_loop /* while (n) loop */
  47825. @@ -263,13 +271,13 @@
  47826. beqi r9, a_word_u2 /* t1 was 2 => 2 byte offset */
  47827. a_word_u3:
  47828. - bslli r11, r11, 24 /* h = h << 24 */
  47829. + BSLLI r11, r11, 24 /* h = h << 24 */
  47830. a_wu3_loop:
  47831. lw r12, r8, r10 /* v = *(as + offset) */
  47832. - bsrli r9, r12, 8 /* t1 = v >> 8 */
  47833. + BSRLI r9, r12, 8 /* t1 = v >> 8 */
  47834. or r9, r11, r9 /* t1 = h | t1 */
  47835. sw r9, r5, r10 /* *(d + offset) = t1 */
  47836. - bslli r11, r12, 24 /* h = v << 24 */
  47837. + BSLLI r11, r12, 24 /* h = v << 24 */
  47838. addi r4, r4,-4 /* n = n - 4 */
  47839. bneid r4, a_wu3_loop /* while (n) loop */
  47840. addi r10, r10, 4 /* offset = ofset + 4 (IN DELAY SLOT) */
  47841. @@ -277,13 +285,13 @@
  47842. bri a_word_done
  47843. a_word_u1:
  47844. - bslli r11, r11, 8 /* h = h << 8 */
  47845. + BSLLI r11, r11, 8 /* h = h << 8 */
  47846. a_wu1_loop:
  47847. lw r12, r8, r10 /* v = *(as + offset) */
  47848. - bsrli r9, r12, 24 /* t1 = v >> 24 */
  47849. + BSRLI r9, r12, 24 /* t1 = v >> 24 */
  47850. or r9, r11, r9 /* t1 = h | t1 */
  47851. sw r9, r5, r10 /* *(d + offset) = t1 */
  47852. - bslli r11, r12, 8 /* h = v << 8 */
  47853. + BSLLI r11, r12, 8 /* h = v << 8 */
  47854. addi r4, r4,-4 /* n = n - 4 */
  47855. bneid r4, a_wu1_loop /* while (n) loop */
  47856. addi r10, r10, 4 /* offset = ofset + 4 (IN DELAY SLOT) */
  47857. @@ -291,13 +299,13 @@
  47858. bri a_word_done
  47859. a_word_u2:
  47860. - bslli r11, r11, 16 /* h = h << 16 */
  47861. + BSLLI r11, r11, 16 /* h = h << 16 */
  47862. a_wu2_loop:
  47863. lw r12, r8, r10 /* v = *(as + offset) */
  47864. - bsrli r9, r12, 16 /* t1 = v >> 16 */
  47865. + BSRLI r9, r12, 16 /* t1 = v >> 16 */
  47866. or r9, r11, r9 /* t1 = h | t1 */
  47867. sw r9, r5, r10 /* *(d + offset) = t1 */
  47868. - bslli r11, r12, 16 /* h = v << 16 */
  47869. + BSLLI r11, r12, 16 /* h = v << 16 */
  47870. addi r4, r4,-4 /* n = n - 4 */
  47871. bneid r4, a_wu2_loop /* while (n) loop */
  47872. addi r10, r10, 4 /* offset = ofset + 4 (IN DELAY SLOT) */
  47873. diff -Nur uClibc-0.9.33.2/libc/string/microblaze/memmove.S uClibc-git/libc/string/microblaze/memmove.S
  47874. --- uClibc-0.9.33.2/libc/string/microblaze/memmove.S 2012-05-15 09:20:09.000000000 +0200
  47875. +++ uClibc-git/libc/string/microblaze/memmove.S 2014-07-25 20:36:06.289331978 +0200
  47876. @@ -33,6 +33,14 @@
  47877. .type memmove, @function
  47878. .ent memmove
  47879. +#ifdef __MICROBLAZEEL__
  47880. +# define BSLLI bsrli
  47881. +# define BSRLI bslli
  47882. +#else
  47883. +# define BSLLI bslli
  47884. +# define BSRLI bsrli
  47885. +#endif
  47886. +
  47887. memmove:
  47888. cmpu r4, r5, r6 /* n = s - d */
  47889. bgei r4, HIDDEN_JUMPTARGET(memcpy)
  47890. @@ -112,150 +120,150 @@
  47891. beqi r9,d_block_u2 /* t1 was 2 => 2 byte offset */
  47892. d_block_u3:
  47893. - bsrli r11, r11, 8 /* h = h >> 8 */
  47894. + BSRLI r11, r11, 8 /* h = h >> 8 */
  47895. d_bu3_loop:
  47896. addi r8, r8, -32 /* as = as - 32 */
  47897. addi r5, r5, -32 /* d = d - 32 */
  47898. lwi r12, r8, 28 /* v = *(as + 28) */
  47899. - bslli r9, r12, 24 /* t1 = v << 24 */
  47900. + BSLLI r9, r12, 24 /* t1 = v << 24 */
  47901. or r9, r11, r9 /* t1 = h | t1 */
  47902. swi r9, r5, 28 /* *(d + 28) = t1 */
  47903. - bsrli r11, r12, 8 /* h = v >> 8 */
  47904. + BSRLI r11, r12, 8 /* h = v >> 8 */
  47905. lwi r12, r8, 24 /* v = *(as + 24) */
  47906. - bslli r9, r12, 24 /* t1 = v << 24 */
  47907. + BSLLI r9, r12, 24 /* t1 = v << 24 */
  47908. or r9, r11, r9 /* t1 = h | t1 */
  47909. swi r9, r5, 24 /* *(d + 24) = t1 */
  47910. - bsrli r11, r12, 8 /* h = v >> 8 */
  47911. + BSRLI r11, r12, 8 /* h = v >> 8 */
  47912. lwi r12, r8, 20 /* v = *(as + 20) */
  47913. - bslli r9, r12, 24 /* t1 = v << 24 */
  47914. + BSLLI r9, r12, 24 /* t1 = v << 24 */
  47915. or r9, r11, r9 /* t1 = h | t1 */
  47916. swi r9, r5, 20 /* *(d + 20) = t1 */
  47917. - bsrli r11, r12, 8 /* h = v >> 8 */
  47918. + BSRLI r11, r12, 8 /* h = v >> 8 */
  47919. lwi r12, r8, 16 /* v = *(as + 16) */
  47920. - bslli r9, r12, 24 /* t1 = v << 24 */
  47921. + BSLLI r9, r12, 24 /* t1 = v << 24 */
  47922. or r9, r11, r9 /* t1 = h | t1 */
  47923. swi r9, r5, 16 /* *(d + 16) = t1 */
  47924. - bsrli r11, r12, 8 /* h = v >> 8 */
  47925. + BSRLI r11, r12, 8 /* h = v >> 8 */
  47926. lwi r12, r8, 12 /* v = *(as + 12) */
  47927. - bslli r9, r12, 24 /* t1 = v << 24 */
  47928. + BSLLI r9, r12, 24 /* t1 = v << 24 */
  47929. or r9, r11, r9 /* t1 = h | t1 */
  47930. swi r9, r5, 12 /* *(d + 112) = t1 */
  47931. - bsrli r11, r12, 8 /* h = v >> 8 */
  47932. + BSRLI r11, r12, 8 /* h = v >> 8 */
  47933. lwi r12, r8, 8 /* v = *(as + 8) */
  47934. - bslli r9, r12, 24 /* t1 = v << 24 */
  47935. + BSLLI r9, r12, 24 /* t1 = v << 24 */
  47936. or r9, r11, r9 /* t1 = h | t1 */
  47937. swi r9, r5, 8 /* *(d + 8) = t1 */
  47938. - bsrli r11, r12, 8 /* h = v >> 8 */
  47939. + BSRLI r11, r12, 8 /* h = v >> 8 */
  47940. lwi r12, r8, 4 /* v = *(as + 4) */
  47941. - bslli r9, r12, 24 /* t1 = v << 24 */
  47942. + BSLLI r9, r12, 24 /* t1 = v << 24 */
  47943. or r9, r11, r9 /* t1 = h | t1 */
  47944. swi r9, r5, 4 /* *(d + 4) = t1 */
  47945. - bsrli r11, r12, 8 /* h = v >> 8 */
  47946. + BSRLI r11, r12, 8 /* h = v >> 8 */
  47947. lwi r12, r8, 0 /* v = *(as + 0) */
  47948. - bslli r9, r12, 24 /* t1 = v << 24 */
  47949. + BSLLI r9, r12, 24 /* t1 = v << 24 */
  47950. or r9, r11, r9 /* t1 = h | t1 */
  47951. swi r9, r5, 0 /* *(d + 0) = t1 */
  47952. addi r4, r4, -32 /* n = n - 32 */
  47953. bneid r4, d_bu3_loop /* while (n) loop */
  47954. - bsrli r11, r12, 8 /* h = v >> 8 (IN DELAY SLOT) */
  47955. + BSRLI r11, r12, 8 /* h = v >> 8 (IN DELAY SLOT) */
  47956. bri d_block_done
  47957. d_block_u1:
  47958. - bsrli r11, r11, 24 /* h = h >> 24 */
  47959. + BSRLI r11, r11, 24 /* h = h >> 24 */
  47960. d_bu1_loop:
  47961. addi r8, r8, -32 /* as = as - 32 */
  47962. addi r5, r5, -32 /* d = d - 32 */
  47963. lwi r12, r8, 28 /* v = *(as + 28) */
  47964. - bslli r9, r12, 8 /* t1 = v << 8 */
  47965. + BSLLI r9, r12, 8 /* t1 = v << 8 */
  47966. or r9, r11, r9 /* t1 = h | t1 */
  47967. swi r9, r5, 28 /* *(d + 28) = t1 */
  47968. - bsrli r11, r12, 24 /* h = v >> 24 */
  47969. + BSRLI r11, r12, 24 /* h = v >> 24 */
  47970. lwi r12, r8, 24 /* v = *(as + 24) */
  47971. - bslli r9, r12, 8 /* t1 = v << 8 */
  47972. + BSLLI r9, r12, 8 /* t1 = v << 8 */
  47973. or r9, r11, r9 /* t1 = h | t1 */
  47974. swi r9, r5, 24 /* *(d + 24) = t1 */
  47975. - bsrli r11, r12, 24 /* h = v >> 24 */
  47976. + BSRLI r11, r12, 24 /* h = v >> 24 */
  47977. lwi r12, r8, 20 /* v = *(as + 20) */
  47978. - bslli r9, r12, 8 /* t1 = v << 8 */
  47979. + BSLLI r9, r12, 8 /* t1 = v << 8 */
  47980. or r9, r11, r9 /* t1 = h | t1 */
  47981. swi r9, r5, 20 /* *(d + 20) = t1 */
  47982. - bsrli r11, r12, 24 /* h = v >> 24 */
  47983. + BSRLI r11, r12, 24 /* h = v >> 24 */
  47984. lwi r12, r8, 16 /* v = *(as + 16) */
  47985. - bslli r9, r12, 8 /* t1 = v << 8 */
  47986. + BSLLI r9, r12, 8 /* t1 = v << 8 */
  47987. or r9, r11, r9 /* t1 = h | t1 */
  47988. swi r9, r5, 16 /* *(d + 16) = t1 */
  47989. - bsrli r11, r12, 24 /* h = v >> 24 */
  47990. + BSRLI r11, r12, 24 /* h = v >> 24 */
  47991. lwi r12, r8, 12 /* v = *(as + 12) */
  47992. - bslli r9, r12, 8 /* t1 = v << 8 */
  47993. + BSLLI r9, r12, 8 /* t1 = v << 8 */
  47994. or r9, r11, r9 /* t1 = h | t1 */
  47995. swi r9, r5, 12 /* *(d + 112) = t1 */
  47996. - bsrli r11, r12, 24 /* h = v >> 24 */
  47997. + BSRLI r11, r12, 24 /* h = v >> 24 */
  47998. lwi r12, r8, 8 /* v = *(as + 8) */
  47999. - bslli r9, r12, 8 /* t1 = v << 8 */
  48000. + BSLLI r9, r12, 8 /* t1 = v << 8 */
  48001. or r9, r11, r9 /* t1 = h | t1 */
  48002. swi r9, r5, 8 /* *(d + 8) = t1 */
  48003. - bsrli r11, r12, 24 /* h = v >> 24 */
  48004. + BSRLI r11, r12, 24 /* h = v >> 24 */
  48005. lwi r12, r8, 4 /* v = *(as + 4) */
  48006. - bslli r9, r12, 8 /* t1 = v << 8 */
  48007. + BSLLI r9, r12, 8 /* t1 = v << 8 */
  48008. or r9, r11, r9 /* t1 = h | t1 */
  48009. swi r9, r5, 4 /* *(d + 4) = t1 */
  48010. - bsrli r11, r12, 24 /* h = v >> 24 */
  48011. + BSRLI r11, r12, 24 /* h = v >> 24 */
  48012. lwi r12, r8, 0 /* v = *(as + 0) */
  48013. - bslli r9, r12, 8 /* t1 = v << 8 */
  48014. + BSLLI r9, r12, 8 /* t1 = v << 8 */
  48015. or r9, r11, r9 /* t1 = h | t1 */
  48016. swi r9, r5, 0 /* *(d + 0) = t1 */
  48017. addi r4, r4, -32 /* n = n - 32 */
  48018. bneid r4, d_bu1_loop /* while (n) loop */
  48019. - bsrli r11, r12, 24 /* h = v >> 24 (IN DELAY SLOT) */
  48020. + BSRLI r11, r12, 24 /* h = v >> 24 (IN DELAY SLOT) */
  48021. bri d_block_done
  48022. d_block_u2:
  48023. - bsrli r11, r11, 16 /* h = h >> 16 */
  48024. + BSRLI r11, r11, 16 /* h = h >> 16 */
  48025. d_bu2_loop:
  48026. addi r8, r8, -32 /* as = as - 32 */
  48027. addi r5, r5, -32 /* d = d - 32 */
  48028. lwi r12, r8, 28 /* v = *(as + 28) */
  48029. - bslli r9, r12, 16 /* t1 = v << 16 */
  48030. + BSLLI r9, r12, 16 /* t1 = v << 16 */
  48031. or r9, r11, r9 /* t1 = h | t1 */
  48032. swi r9, r5, 28 /* *(d + 28) = t1 */
  48033. - bsrli r11, r12, 16 /* h = v >> 16 */
  48034. + BSRLI r11, r12, 16 /* h = v >> 16 */
  48035. lwi r12, r8, 24 /* v = *(as + 24) */
  48036. - bslli r9, r12, 16 /* t1 = v << 16 */
  48037. + BSLLI r9, r12, 16 /* t1 = v << 16 */
  48038. or r9, r11, r9 /* t1 = h | t1 */
  48039. swi r9, r5, 24 /* *(d + 24) = t1 */
  48040. - bsrli r11, r12, 16 /* h = v >> 16 */
  48041. + BSRLI r11, r12, 16 /* h = v >> 16 */
  48042. lwi r12, r8, 20 /* v = *(as + 20) */
  48043. - bslli r9, r12, 16 /* t1 = v << 16 */
  48044. + BSLLI r9, r12, 16 /* t1 = v << 16 */
  48045. or r9, r11, r9 /* t1 = h | t1 */
  48046. swi r9, r5, 20 /* *(d + 20) = t1 */
  48047. - bsrli r11, r12, 16 /* h = v >> 16 */
  48048. + BSRLI r11, r12, 16 /* h = v >> 16 */
  48049. lwi r12, r8, 16 /* v = *(as + 16) */
  48050. - bslli r9, r12, 16 /* t1 = v << 16 */
  48051. + BSLLI r9, r12, 16 /* t1 = v << 16 */
  48052. or r9, r11, r9 /* t1 = h | t1 */
  48053. swi r9, r5, 16 /* *(d + 16) = t1 */
  48054. - bsrli r11, r12, 16 /* h = v >> 16 */
  48055. + BSRLI r11, r12, 16 /* h = v >> 16 */
  48056. lwi r12, r8, 12 /* v = *(as + 12) */
  48057. - bslli r9, r12, 16 /* t1 = v << 16 */
  48058. + BSLLI r9, r12, 16 /* t1 = v << 16 */
  48059. or r9, r11, r9 /* t1 = h | t1 */
  48060. swi r9, r5, 12 /* *(d + 112) = t1 */
  48061. - bsrli r11, r12, 16 /* h = v >> 16 */
  48062. + BSRLI r11, r12, 16 /* h = v >> 16 */
  48063. lwi r12, r8, 8 /* v = *(as + 8) */
  48064. - bslli r9, r12, 16 /* t1 = v << 16 */
  48065. + BSLLI r9, r12, 16 /* t1 = v << 16 */
  48066. or r9, r11, r9 /* t1 = h | t1 */
  48067. swi r9, r5, 8 /* *(d + 8) = t1 */
  48068. - bsrli r11, r12, 16 /* h = v >> 16 */
  48069. + BSRLI r11, r12, 16 /* h = v >> 16 */
  48070. lwi r12, r8, 4 /* v = *(as + 4) */
  48071. - bslli r9, r12, 16 /* t1 = v << 16 */
  48072. + BSLLI r9, r12, 16 /* t1 = v << 16 */
  48073. or r9, r11, r9 /* t1 = h | t1 */
  48074. swi r9, r5, 4 /* *(d + 4) = t1 */
  48075. - bsrli r11, r12, 16 /* h = v >> 16 */
  48076. + BSRLI r11, r12, 16 /* h = v >> 16 */
  48077. lwi r12, r8, 0 /* v = *(as + 0) */
  48078. - bslli r9, r12, 16 /* t1 = v << 16 */
  48079. + BSLLI r9, r12, 16 /* t1 = v << 16 */
  48080. or r9, r11, r9 /* t1 = h | t1 */
  48081. swi r9, r5, 0 /* *(d + 0) = t1 */
  48082. addi r4, r4, -32 /* n = n - 32 */
  48083. bneid r4, d_bu2_loop /* while (n) loop */
  48084. - bsrli r11, r12, 16 /* h = v >> 16 (IN DELAY SLOT) */
  48085. + BSRLI r11, r12, 16 /* h = v >> 16 (IN DELAY SLOT) */
  48086. d_block_done:
  48087. addi r4, r0, 4 /* n = 4 */
  48088. @@ -290,41 +298,41 @@
  48089. beqi r9,d_word_u2 /* t1 was 2 => 2 byte offset */
  48090. d_word_u3:
  48091. - bsrli r11, r11, 8 /* h = h >> 8 */
  48092. + BSRLI r11, r11, 8 /* h = h >> 8 */
  48093. d_wu3_loop:
  48094. addi r4, r4,-4 /* n = n - 4 */
  48095. lw r12, r8, r4 /* v = *(as + n) */
  48096. - bslli r9, r12, 24 /* t1 = v << 24 */
  48097. + BSLLI r9, r12, 24 /* t1 = v << 24 */
  48098. or r9, r11, r9 /* t1 = h | t1 */
  48099. sw r9, r5, r4 /* *(d + n) = t1 */
  48100. bneid r4, d_wu3_loop /* while (n) loop */
  48101. - bsrli r11, r12, 8 /* h = v >> 8 (IN DELAY SLOT) */
  48102. + BSRLI r11, r12, 8 /* h = v >> 8 (IN DELAY SLOT) */
  48103. bri d_word_done
  48104. d_word_u1:
  48105. - bsrli r11, r11, 24 /* h = h >> 24 */
  48106. + BSRLI r11, r11, 24 /* h = h >> 24 */
  48107. d_wu1_loop:
  48108. addi r4, r4,-4 /* n = n - 4 */
  48109. lw r12, r8, r4 /* v = *(as + n) */
  48110. - bslli r9, r12, 8 /* t1 = v << 8 */
  48111. + BSLLI r9, r12, 8 /* t1 = v << 8 */
  48112. or r9, r11, r9 /* t1 = h | t1 */
  48113. sw r9, r5, r4 /* *(d + n) = t1 */
  48114. bneid r4, d_wu1_loop /* while (n) loop */
  48115. - bsrli r11, r12, 24 /* h = v >> 24 (IN DELAY SLOT) */
  48116. + BSRLI r11, r12, 24 /* h = v >> 24 (IN DELAY SLOT) */
  48117. bri d_word_done
  48118. d_word_u2:
  48119. - bsrli r11, r11, 16 /* h = h >> 16 */
  48120. + BSRLI r11, r11, 16 /* h = h >> 16 */
  48121. d_wu2_loop:
  48122. addi r4, r4,-4 /* n = n - 4 */
  48123. lw r12, r8, r4 /* v = *(as + n) */
  48124. - bslli r9, r12, 16 /* t1 = v << 16 */
  48125. + BSLLI r9, r12, 16 /* t1 = v << 16 */
  48126. or r9, r11, r9 /* t1 = h | t1 */
  48127. sw r9, r5, r4 /* *(d + n) = t1 */
  48128. bneid r4, d_wu2_loop /* while (n) loop */
  48129. - bsrli r11, r12, 16 /* h = v >> 16 (IN DELAY SLOT) */
  48130. + BSRLI r11, r12, 16 /* h = v >> 16 (IN DELAY SLOT) */
  48131. d_word_done:
  48132. diff -Nur uClibc-0.9.33.2/libc/string/mips/memcpy.S uClibc-git/libc/string/mips/memcpy.S
  48133. --- uClibc-0.9.33.2/libc/string/mips/memcpy.S 2012-05-15 09:20:09.000000000 +0200
  48134. +++ uClibc-git/libc/string/mips/memcpy.S 2014-07-25 20:36:06.301332040 +0200
  48135. @@ -13,14 +13,12 @@
  48136. Lesser General Public License for more details.
  48137. You should have received a copy of the GNU Lesser General Public
  48138. - License along with the GNU C Library; if not, write to the Free
  48139. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48140. - 02111-1307 USA. */
  48141. + License along with the GNU C Library; if not, see
  48142. + <http://www.gnu.org/licenses/>. */
  48143. #include <features.h>
  48144. -/*#include <sysdep.h>*/
  48145. +#include <sysdep.h>
  48146. #include <endian.h>
  48147. -#include "sysdep.h"
  48148. /* void *memcpy(void *s1, const void *s2, size_t n); */
  48149. diff -Nur uClibc-0.9.33.2/libc/string/mips/memset.S uClibc-git/libc/string/mips/memset.S
  48150. --- uClibc-0.9.33.2/libc/string/mips/memset.S 2012-05-15 09:20:09.000000000 +0200
  48151. +++ uClibc-git/libc/string/mips/memset.S 2014-07-25 20:36:06.301332040 +0200
  48152. @@ -13,14 +13,12 @@
  48153. Lesser General Public License for more details.
  48154. You should have received a copy of the GNU Lesser General Public
  48155. - License along with the GNU C Library; if not, write to the Free
  48156. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48157. - 02111-1307 USA. */
  48158. + License along with the GNU C Library; if not, see
  48159. + <http://www.gnu.org/licenses/>. */
  48160. #include <features.h>
  48161. -/*#include <sysdep.h>*/
  48162. +#include <sysdep.h>
  48163. #include <endian.h>
  48164. -#include "sysdep.h"
  48165. /* void *memset(void *s, int c, size_t n). */
  48166. diff -Nur uClibc-0.9.33.2/libc/string/mips/sysdep.h uClibc-git/libc/string/mips/sysdep.h
  48167. --- uClibc-0.9.33.2/libc/string/mips/sysdep.h 2012-05-15 09:20:09.000000000 +0200
  48168. +++ uClibc-git/libc/string/mips/sysdep.h 1970-01-01 01:00:00.000000000 +0100
  48169. @@ -1,45 +0,0 @@
  48170. -/* Adapted from glibc's sysdeps/unix/mips/sysdep.h */
  48171. -
  48172. -/* Copyright (C) 1992, 1995, 1997, 1999, 2000, 2002, 2003
  48173. - Free Software Foundation, Inc.
  48174. - This file is part of the GNU C Library.
  48175. - Contributed by Brendan Kehoe (brendan@zen.org).
  48176. -
  48177. - The GNU C Library is free software; you can redistribute it and/or
  48178. - modify it under the terms of the GNU Lesser General Public
  48179. - License as published by the Free Software Foundation; either
  48180. - version 2.1 of the License, or (at your option) any later version.
  48181. -
  48182. - The GNU C Library is distributed in the hope that it will be useful,
  48183. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  48184. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  48185. - Lesser General Public License for more details.
  48186. -
  48187. - You should have received a copy of the GNU Lesser General Public
  48188. - License along with the GNU C Library; if not, write to the Free
  48189. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48190. - 02111-1307 USA. */
  48191. -
  48192. -#ifdef __ASSEMBLER__
  48193. -
  48194. -#include <sgidefs.h>
  48195. -#include <sys/regdef.h>
  48196. -
  48197. -#define ENTRY(name) \
  48198. - .globl name; \
  48199. - .align 2; \
  48200. - .ent name,0; \
  48201. - name/* use a comment rather than ## to workaround bug in gcc-3.4.x */:
  48202. -
  48203. -#undef END
  48204. -#define END(function) \
  48205. - .end function; \
  48206. - .size function,.-function
  48207. -
  48208. -#if _MIPS_SIM == _MIPS_SIM_ABI32 || _MIPS_SIM == _MIPS_SIM_ABIO64
  48209. -# define L(label) $L ## label
  48210. -#else
  48211. -# define L(label) .L ## label
  48212. -#endif
  48213. -
  48214. -#endif
  48215. diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc32/memchr.S uClibc-git/libc/string/sparc/sparc32/memchr.S
  48216. --- uClibc-0.9.33.2/libc/string/sparc/sparc32/memchr.S 2012-05-15 09:20:09.000000000 +0200
  48217. +++ uClibc-git/libc/string/sparc/sparc32/memchr.S 2014-07-25 20:36:06.369332397 +0200
  48218. @@ -24,9 +24,8 @@
  48219. Lesser General Public License for more details.
  48220. You should have received a copy of the GNU Lesser General Public
  48221. - License along with the GNU C Library; if not, write to the Free
  48222. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48223. - 02111-1307 USA. */
  48224. + License along with the GNU C Library; if not, see
  48225. + <http://www.gnu.org/licenses/>. */
  48226. .text
  48227. .align 4
  48228. diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc32/memcpy.S uClibc-git/libc/string/sparc/sparc32/memcpy.S
  48229. --- uClibc-0.9.33.2/libc/string/sparc/sparc32/memcpy.S 2012-05-15 09:20:09.000000000 +0200
  48230. +++ uClibc-git/libc/string/sparc/sparc32/memcpy.S 2014-07-25 20:36:06.369332397 +0200
  48231. @@ -17,9 +17,8 @@
  48232. Lesser General Public License for more details.
  48233. You should have received a copy of the GNU Lesser General Public
  48234. - License along with the GNU C Library; if not, write to the Free
  48235. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48236. - 02111-1307 USA. */
  48237. + License along with the GNU C Library; if not, see
  48238. + <http://www.gnu.org/licenses/>. */
  48239. #include <features.h>
  48240. diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc32/memset.S uClibc-git/libc/string/sparc/sparc32/memset.S
  48241. --- uClibc-0.9.33.2/libc/string/sparc/sparc32/memset.S 2012-05-15 09:20:09.000000000 +0200
  48242. +++ uClibc-git/libc/string/sparc/sparc32/memset.S 2014-07-25 20:36:06.369332397 +0200
  48243. @@ -16,9 +16,8 @@
  48244. Lesser General Public License for more details.
  48245. You should have received a copy of the GNU Lesser General Public
  48246. - License along with the GNU C Library; if not, write to the Free
  48247. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48248. - 02111-1307 USA. */
  48249. + License along with the GNU C Library; if not, see
  48250. + <http://www.gnu.org/licenses/>. */
  48251. #include <features.h>
  48252. diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc32/stpcpy.S uClibc-git/libc/string/sparc/sparc32/stpcpy.S
  48253. --- uClibc-0.9.33.2/libc/string/sparc/sparc32/stpcpy.S 2012-05-15 09:20:09.000000000 +0200
  48254. +++ uClibc-git/libc/string/sparc/sparc32/stpcpy.S 2014-07-25 20:36:06.377332438 +0200
  48255. @@ -15,9 +15,8 @@
  48256. Lesser General Public License for more details.
  48257. You should have received a copy of the GNU Lesser General Public
  48258. - License along with the GNU C Library; if not, write to the Free
  48259. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48260. - 02111-1307 USA. */
  48261. + License along with the GNU C Library; if not, see
  48262. + <http://www.gnu.org/licenses/>. */
  48263. /* Normally, this uses ((xword - 0x01010101) & 0x80808080) test
  48264. to find out if any byte in xword could be zero. This is fast, but
  48265. diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc32/strcat.S uClibc-git/libc/string/sparc/sparc32/strcat.S
  48266. --- uClibc-0.9.33.2/libc/string/sparc/sparc32/strcat.S 2012-05-15 09:20:09.000000000 +0200
  48267. +++ uClibc-git/libc/string/sparc/sparc32/strcat.S 2014-07-25 20:36:06.377332438 +0200
  48268. @@ -15,9 +15,8 @@
  48269. Lesser General Public License for more details.
  48270. You should have received a copy of the GNU Lesser General Public
  48271. - License along with the GNU C Library; if not, write to the Free
  48272. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48273. - 02111-1307 USA. */
  48274. + License along with the GNU C Library; if not, see
  48275. + <http://www.gnu.org/licenses/>. */
  48276. /* Normally, this uses ((xword - 0x01010101) & 0x80808080) test
  48277. to find out if any byte in xword could be zero. This is fast, but
  48278. diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc32/strchr.S uClibc-git/libc/string/sparc/sparc32/strchr.S
  48279. --- uClibc-0.9.33.2/libc/string/sparc/sparc32/strchr.S 2012-05-15 09:20:09.000000000 +0200
  48280. +++ uClibc-git/libc/string/sparc/sparc32/strchr.S 2014-07-25 20:36:06.377332438 +0200
  48281. @@ -16,9 +16,8 @@
  48282. Lesser General Public License for more details.
  48283. You should have received a copy of the GNU Lesser General Public
  48284. - License along with the GNU C Library; if not, write to the Free
  48285. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48286. - 02111-1307 USA. */
  48287. + License along with the GNU C Library; if not, see
  48288. + <http://www.gnu.org/licenses/>. */
  48289. /* Normally, this uses ((xword - 0x01010101) & 0x80808080) test
  48290. to find out if any byte in xword could be zero. This is fast, but
  48291. diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc32/strcmp.S uClibc-git/libc/string/sparc/sparc32/strcmp.S
  48292. --- uClibc-0.9.33.2/libc/string/sparc/sparc32/strcmp.S 2012-05-15 09:20:09.000000000 +0200
  48293. +++ uClibc-git/libc/string/sparc/sparc32/strcmp.S 2014-07-25 20:36:06.377332438 +0200
  48294. @@ -15,9 +15,8 @@
  48295. Lesser General Public License for more details.
  48296. You should have received a copy of the GNU Lesser General Public
  48297. - License along with the GNU C Library; if not, write to the Free
  48298. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48299. - 02111-1307 USA. */
  48300. + License along with the GNU C Library; if not, see
  48301. + <http://www.gnu.org/licenses/>. */
  48302. /* Normally, this uses ((xword - 0x01010101) & 0x80808080) test
  48303. to find out if any byte in xword could be zero. This is fast, but
  48304. diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc32/strcpy.S uClibc-git/libc/string/sparc/sparc32/strcpy.S
  48305. --- uClibc-0.9.33.2/libc/string/sparc/sparc32/strcpy.S 2012-05-15 09:20:09.000000000 +0200
  48306. +++ uClibc-git/libc/string/sparc/sparc32/strcpy.S 2014-07-25 20:36:06.377332438 +0200
  48307. @@ -15,9 +15,8 @@
  48308. Lesser General Public License for more details.
  48309. You should have received a copy of the GNU Lesser General Public
  48310. - License along with the GNU C Library; if not, write to the Free
  48311. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48312. - 02111-1307 USA. */
  48313. + License along with the GNU C Library; if not, see
  48314. + <http://www.gnu.org/licenses/>. */
  48315. /* Normally, this uses ((xword - 0x01010101) & 0x80808080) test
  48316. to find out if any byte in xword could be zero. This is fast, but
  48317. diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc32/strlen.S uClibc-git/libc/string/sparc/sparc32/strlen.S
  48318. --- uClibc-0.9.33.2/libc/string/sparc/sparc32/strlen.S 2012-05-15 09:20:09.000000000 +0200
  48319. +++ uClibc-git/libc/string/sparc/sparc32/strlen.S 2014-07-25 20:36:06.377332438 +0200
  48320. @@ -15,9 +15,8 @@
  48321. Lesser General Public License for more details.
  48322. You should have received a copy of the GNU Lesser General Public
  48323. - License along with the GNU C Library; if not, write to the Free
  48324. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48325. - 02111-1307 USA. */
  48326. + License along with the GNU C Library; if not, see
  48327. + <http://www.gnu.org/licenses/>. */
  48328. /* Normally, this uses ((xword - 0x01010101) & 0x80808080) test
  48329. to find out if any byte in xword could be zero. This is fast, but
  48330. diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc64/memchr.S uClibc-git/libc/string/sparc/sparc64/memchr.S
  48331. --- uClibc-0.9.33.2/libc/string/sparc/sparc64/memchr.S 2012-05-15 09:20:09.000000000 +0200
  48332. +++ uClibc-git/libc/string/sparc/sparc64/memchr.S 2014-07-25 20:36:06.389332501 +0200
  48333. @@ -24,9 +24,8 @@
  48334. Lesser General Public License for more details.
  48335. You should have received a copy of the GNU Lesser General Public
  48336. - License along with the GNU C Library; if not, write to the Free
  48337. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48338. - 02111-1307 USA. */
  48339. + License along with the GNU C Library; if not, see
  48340. + <http://www.gnu.org/licenses/>. */
  48341. #include <asm/asi.h>
  48342. #ifndef XCC
  48343. diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc64/memcpy.S uClibc-git/libc/string/sparc/sparc64/memcpy.S
  48344. --- uClibc-0.9.33.2/libc/string/sparc/sparc64/memcpy.S 2012-05-15 09:20:09.000000000 +0200
  48345. +++ uClibc-git/libc/string/sparc/sparc64/memcpy.S 2014-07-25 20:36:06.389332501 +0200
  48346. @@ -16,9 +16,8 @@
  48347. Lesser General Public License for more details.
  48348. You should have received a copy of the GNU Lesser General Public
  48349. - License along with the GNU C Library; if not, write to the Free
  48350. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48351. - 02111-1307 USA. */
  48352. + License along with the GNU C Library; if not, see
  48353. + <http://www.gnu.org/licenses/>. */
  48354. #include <features.h>
  48355. #include <asm/asi.h>
  48356. diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc64/memset.S uClibc-git/libc/string/sparc/sparc64/memset.S
  48357. --- uClibc-0.9.33.2/libc/string/sparc/sparc64/memset.S 2012-05-15 09:20:09.000000000 +0200
  48358. +++ uClibc-git/libc/string/sparc/sparc64/memset.S 2014-07-25 20:36:06.389332501 +0200
  48359. @@ -16,9 +16,8 @@
  48360. Lesser General Public License for more details.
  48361. You should have received a copy of the GNU Lesser General Public
  48362. - License along with the GNU C Library; if not, write to the Free
  48363. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48364. - 02111-1307 USA. */
  48365. + License along with the GNU C Library; if not, see
  48366. + <http://www.gnu.org/licenses/>. */
  48367. #include <features.h>
  48368. #include <asm/asi.h>
  48369. diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc64/sparcv9b/memcpy.S uClibc-git/libc/string/sparc/sparc64/sparcv9b/memcpy.S
  48370. --- uClibc-0.9.33.2/libc/string/sparc/sparc64/sparcv9b/memcpy.S 2012-05-15 09:20:09.000000000 +0200
  48371. +++ uClibc-git/libc/string/sparc/sparc64/sparcv9b/memcpy.S 2014-07-25 20:36:06.401332564 +0200
  48372. @@ -15,9 +15,8 @@
  48373. Lesser General Public License for more details.
  48374. You should have received a copy of the GNU Lesser General Public
  48375. - License along with the GNU C Library; if not, write to the Free
  48376. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48377. - 02111-1307 USA. */
  48378. + License along with the GNU C Library; if not, see
  48379. + <http://www.gnu.org/licenses/>. */
  48380. #include <features.h>
  48381. diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc64/stpcpy.S uClibc-git/libc/string/sparc/sparc64/stpcpy.S
  48382. --- uClibc-0.9.33.2/libc/string/sparc/sparc64/stpcpy.S 2012-05-15 09:20:09.000000000 +0200
  48383. +++ uClibc-git/libc/string/sparc/sparc64/stpcpy.S 2014-07-25 20:36:06.401332564 +0200
  48384. @@ -16,9 +16,8 @@
  48385. Lesser General Public License for more details.
  48386. You should have received a copy of the GNU Lesser General Public
  48387. - License along with the GNU C Library; if not, write to the Free
  48388. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48389. - 02111-1307 USA. */
  48390. + License along with the GNU C Library; if not, see
  48391. + <http://www.gnu.org/licenses/>. */
  48392. #include <asm/asi.h>
  48393. #ifndef XCC
  48394. diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc64/strcat.S uClibc-git/libc/string/sparc/sparc64/strcat.S
  48395. --- uClibc-0.9.33.2/libc/string/sparc/sparc64/strcat.S 2012-05-15 09:20:09.000000000 +0200
  48396. +++ uClibc-git/libc/string/sparc/sparc64/strcat.S 2014-07-25 20:36:06.401332564 +0200
  48397. @@ -16,9 +16,8 @@
  48398. Lesser General Public License for more details.
  48399. You should have received a copy of the GNU Lesser General Public
  48400. - License along with the GNU C Library; if not, write to the Free
  48401. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48402. - 02111-1307 USA. */
  48403. + License along with the GNU C Library; if not, see
  48404. + <http://www.gnu.org/licenses/>. */
  48405. #include <asm/asi.h>
  48406. #ifndef XCC
  48407. diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc64/strchr.S uClibc-git/libc/string/sparc/sparc64/strchr.S
  48408. --- uClibc-0.9.33.2/libc/string/sparc/sparc64/strchr.S 2012-05-15 09:20:09.000000000 +0200
  48409. +++ uClibc-git/libc/string/sparc/sparc64/strchr.S 2014-07-25 20:36:06.401332564 +0200
  48410. @@ -16,9 +16,8 @@
  48411. Lesser General Public License for more details.
  48412. You should have received a copy of the GNU Lesser General Public
  48413. - License along with the GNU C Library; if not, write to the Free
  48414. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48415. - 02111-1307 USA. */
  48416. + License along with the GNU C Library; if not, see
  48417. + <http://www.gnu.org/licenses/>. */
  48418. #include <features.h>
  48419. #include <asm/asi.h>
  48420. diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc64/strcmp.S uClibc-git/libc/string/sparc/sparc64/strcmp.S
  48421. --- uClibc-0.9.33.2/libc/string/sparc/sparc64/strcmp.S 2012-05-15 09:20:09.000000000 +0200
  48422. +++ uClibc-git/libc/string/sparc/sparc64/strcmp.S 2014-07-25 20:36:06.401332564 +0200
  48423. @@ -16,9 +16,8 @@
  48424. Lesser General Public License for more details.
  48425. You should have received a copy of the GNU Lesser General Public
  48426. - License along with the GNU C Library; if not, write to the Free
  48427. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48428. - 02111-1307 USA. */
  48429. + License along with the GNU C Library; if not, see
  48430. + <http://www.gnu.org/licenses/>. */
  48431. #include <asm/asi.h>
  48432. #ifndef XCC
  48433. diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc64/strcpy.S uClibc-git/libc/string/sparc/sparc64/strcpy.S
  48434. --- uClibc-0.9.33.2/libc/string/sparc/sparc64/strcpy.S 2012-05-15 09:20:09.000000000 +0200
  48435. +++ uClibc-git/libc/string/sparc/sparc64/strcpy.S 2014-07-25 20:36:06.401332564 +0200
  48436. @@ -16,9 +16,8 @@
  48437. Lesser General Public License for more details.
  48438. You should have received a copy of the GNU Lesser General Public
  48439. - License along with the GNU C Library; if not, write to the Free
  48440. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48441. - 02111-1307 USA. */
  48442. + License along with the GNU C Library; if not, see
  48443. + <http://www.gnu.org/licenses/>. */
  48444. #include <asm/asi.h>
  48445. #ifndef XCC
  48446. diff -Nur uClibc-0.9.33.2/libc/string/sparc/sparc64/strlen.S uClibc-git/libc/string/sparc/sparc64/strlen.S
  48447. --- uClibc-0.9.33.2/libc/string/sparc/sparc64/strlen.S 2012-05-15 09:20:09.000000000 +0200
  48448. +++ uClibc-git/libc/string/sparc/sparc64/strlen.S 2014-07-25 20:36:06.401332564 +0200
  48449. @@ -15,9 +15,8 @@
  48450. Lesser General Public License for more details.
  48451. You should have received a copy of the GNU Lesser General Public
  48452. - License along with the GNU C Library; if not, write to the Free
  48453. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48454. - 02111-1307 USA. */
  48455. + License along with the GNU C Library; if not, see
  48456. + <http://www.gnu.org/licenses/>. */
  48457. #include <asm/asi.h>
  48458. diff -Nur uClibc-0.9.33.2/libc/string/strchrnul.c uClibc-git/libc/string/strchrnul.c
  48459. --- uClibc-0.9.33.2/libc/string/strchrnul.c 2012-05-15 09:20:09.000000000 +0200
  48460. +++ uClibc-git/libc/string/strchrnul.c 2014-07-25 20:36:06.401332564 +0200
  48461. @@ -22,6 +22,6 @@
  48462. return (Wchar *) s;
  48463. }
  48464. # ifndef WANT_WIDE
  48465. -libc_hidden_def(Wstrchrnul)
  48466. +libc_hidden_def(strchrnul)
  48467. # endif
  48468. #endif
  48469. diff -Nur uClibc-0.9.33.2/libc/string/strverscmp.c uClibc-git/libc/string/strverscmp.c
  48470. --- uClibc-0.9.33.2/libc/string/strverscmp.c 2012-05-15 09:20:09.000000000 +0200
  48471. +++ uClibc-git/libc/string/strverscmp.c 2014-07-25 20:36:06.401332564 +0200
  48472. @@ -19,9 +19,8 @@
  48473. Lesser General Public License for more details.
  48474. You should have received a copy of the GNU Lesser General Public
  48475. - License along with the GNU C Library; if not, write to the Free
  48476. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48477. - 02111-1307 USA. */
  48478. + License along with the GNU C Library; if not, see
  48479. + <http://www.gnu.org/licenses/>. */
  48480. #include <string.h>
  48481. #include <ctype.h>
  48482. diff -Nur uClibc-0.9.33.2/libc/string/x86_64/memcpy.S uClibc-git/libc/string/x86_64/memcpy.S
  48483. --- uClibc-0.9.33.2/libc/string/x86_64/memcpy.S 2012-05-15 09:20:09.000000000 +0200
  48484. +++ uClibc-git/libc/string/x86_64/memcpy.S 2014-07-25 20:36:06.441332774 +0200
  48485. @@ -14,9 +14,8 @@
  48486. Lesser General Public License for more details.
  48487. You should have received a copy of the GNU Lesser General Public
  48488. - License along with the GNU C Library; if not, write to the Free
  48489. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48490. - 02111-1307 USA. */
  48491. + License along with the GNU C Library; if not, see
  48492. + <http://www.gnu.org/licenses/>. */
  48493. #include "_glibc_inc.h"
  48494. diff -Nur uClibc-0.9.33.2/libc/string/x86_64/memset.S uClibc-git/libc/string/x86_64/memset.S
  48495. --- uClibc-0.9.33.2/libc/string/x86_64/memset.S 2012-05-15 09:20:09.000000000 +0200
  48496. +++ uClibc-git/libc/string/x86_64/memset.S 2014-07-25 20:36:06.441332774 +0200
  48497. @@ -15,9 +15,8 @@
  48498. Lesser General Public License for more details.
  48499. You should have received a copy of the GNU Lesser General Public
  48500. - License along with the GNU C Library; if not, write to the Free
  48501. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48502. - 02111-1307 USA. */
  48503. + License along with the GNU C Library; if not, see
  48504. + <http://www.gnu.org/licenses/>. */
  48505. #include "_glibc_inc.h"
  48506. diff -Nur uClibc-0.9.33.2/libc/string/x86_64/strcat.S uClibc-git/libc/string/x86_64/strcat.S
  48507. --- uClibc-0.9.33.2/libc/string/x86_64/strcat.S 2012-05-15 09:20:09.000000000 +0200
  48508. +++ uClibc-git/libc/string/x86_64/strcat.S 2014-07-25 20:36:06.441332774 +0200
  48509. @@ -15,9 +15,8 @@
  48510. Lesser General Public License for more details.
  48511. You should have received a copy of the GNU Lesser General Public
  48512. - License along with the GNU C Library; if not, write to the Free
  48513. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48514. - 02111-1307 USA. */
  48515. + License along with the GNU C Library; if not, see
  48516. + <http://www.gnu.org/licenses/>. */
  48517. #include "_glibc_inc.h"
  48518. diff -Nur uClibc-0.9.33.2/libc/string/x86_64/strchr.S uClibc-git/libc/string/x86_64/strchr.S
  48519. --- uClibc-0.9.33.2/libc/string/x86_64/strchr.S 2012-05-15 09:20:09.000000000 +0200
  48520. +++ uClibc-git/libc/string/x86_64/strchr.S 2014-07-25 20:36:06.441332774 +0200
  48521. @@ -14,9 +14,8 @@
  48522. Lesser General Public License for more details.
  48523. You should have received a copy of the GNU Lesser General Public
  48524. - License along with the GNU C Library; if not, write to the Free
  48525. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48526. - 02111-1307 USA. */
  48527. + License along with the GNU C Library; if not, see
  48528. + <http://www.gnu.org/licenses/>. */
  48529. #include "_glibc_inc.h"
  48530. diff -Nur uClibc-0.9.33.2/libc/string/x86_64/strcmp.S uClibc-git/libc/string/x86_64/strcmp.S
  48531. --- uClibc-0.9.33.2/libc/string/x86_64/strcmp.S 2012-05-15 09:20:09.000000000 +0200
  48532. +++ uClibc-git/libc/string/x86_64/strcmp.S 2014-07-25 20:36:06.441332774 +0200
  48533. @@ -15,9 +15,8 @@
  48534. Lesser General Public License for more details.
  48535. You should have received a copy of the GNU Lesser General Public
  48536. - License along with the GNU C Library; if not, write to the Free
  48537. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48538. - 02111-1307 USA. */
  48539. + License along with the GNU C Library; if not, see
  48540. + <http://www.gnu.org/licenses/>. */
  48541. #include "_glibc_inc.h"
  48542. diff -Nur uClibc-0.9.33.2/libc/string/x86_64/strcpy.S uClibc-git/libc/string/x86_64/strcpy.S
  48543. --- uClibc-0.9.33.2/libc/string/x86_64/strcpy.S 2012-05-15 09:20:09.000000000 +0200
  48544. +++ uClibc-git/libc/string/x86_64/strcpy.S 2014-07-25 20:36:06.441332774 +0200
  48545. @@ -14,9 +14,8 @@
  48546. Lesser General Public License for more details.
  48547. You should have received a copy of the GNU Lesser General Public
  48548. - License along with the GNU C Library; if not, write to the Free
  48549. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48550. - 02111-1307 USA. */
  48551. + License along with the GNU C Library; if not, see
  48552. + <http://www.gnu.org/licenses/>. */
  48553. #include "_glibc_inc.h"
  48554. diff -Nur uClibc-0.9.33.2/libc/string/x86_64/strcspn.S uClibc-git/libc/string/x86_64/strcspn.S
  48555. --- uClibc-0.9.33.2/libc/string/x86_64/strcspn.S 2012-05-15 09:20:09.000000000 +0200
  48556. +++ uClibc-git/libc/string/x86_64/strcspn.S 2014-07-25 20:36:06.441332774 +0200
  48557. @@ -19,9 +19,8 @@
  48558. Lesser General Public License for more details.
  48559. You should have received a copy of the GNU Lesser General Public
  48560. - License along with the GNU C Library; if not, write to the Free
  48561. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48562. - 02111-1307 USA. */
  48563. + License along with the GNU C Library; if not, see
  48564. + <http://www.gnu.org/licenses/>. */
  48565. #include "_glibc_inc.h"
  48566. diff -Nur uClibc-0.9.33.2/libc/string/x86_64/strlen.S uClibc-git/libc/string/x86_64/strlen.S
  48567. --- uClibc-0.9.33.2/libc/string/x86_64/strlen.S 2012-05-15 09:20:09.000000000 +0200
  48568. +++ uClibc-git/libc/string/x86_64/strlen.S 2014-07-25 20:36:06.441332774 +0200
  48569. @@ -14,9 +14,8 @@
  48570. Lesser General Public License for more details.
  48571. You should have received a copy of the GNU Lesser General Public
  48572. - License along with the GNU C Library; if not, write to the Free
  48573. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48574. - 02111-1307 USA. */
  48575. + License along with the GNU C Library; if not, see
  48576. + <http://www.gnu.org/licenses/>. */
  48577. #include "_glibc_inc.h"
  48578. diff -Nur uClibc-0.9.33.2/libc/string/x86_64/strspn.S uClibc-git/libc/string/x86_64/strspn.S
  48579. --- uClibc-0.9.33.2/libc/string/x86_64/strspn.S 2012-05-15 09:20:09.000000000 +0200
  48580. +++ uClibc-git/libc/string/x86_64/strspn.S 2014-07-25 20:36:06.441332774 +0200
  48581. @@ -19,9 +19,8 @@
  48582. Lesser General Public License for more details.
  48583. You should have received a copy of the GNU Lesser General Public
  48584. - License along with the GNU C Library; if not, write to the Free
  48585. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48586. - 02111-1307 USA. */
  48587. + License along with the GNU C Library; if not, see
  48588. + <http://www.gnu.org/licenses/>. */
  48589. #include "_glibc_inc.h"
  48590. diff -Nur uClibc-0.9.33.2/libc/string/__xpg_basename.c uClibc-git/libc/string/__xpg_basename.c
  48591. --- uClibc-0.9.33.2/libc/string/__xpg_basename.c 2012-05-15 09:20:09.000000000 +0200
  48592. +++ uClibc-git/libc/string/__xpg_basename.c 2014-07-25 20:36:06.133331160 +0200
  48593. @@ -5,7 +5,6 @@
  48594. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  48595. */
  48596. -#include "_string.h"
  48597. #include <libgen.h>
  48598. char *__xpg_basename(register char *path)
  48599. @@ -34,3 +33,7 @@
  48600. return first;
  48601. }
  48602. +#ifndef __USE_GNU
  48603. +# undef basename
  48604. +weak_alias(__xpg_basename,basename)
  48605. +#endif
  48606. diff -Nur uClibc-0.9.33.2/libc/string/__xpg_strerror_r.c uClibc-git/libc/string/__xpg_strerror_r.c
  48607. --- uClibc-0.9.33.2/libc/string/__xpg_strerror_r.c 2012-05-15 09:20:09.000000000 +0200
  48608. +++ uClibc-git/libc/string/__xpg_strerror_r.c 2014-07-25 20:36:06.133331160 +0200
  48609. @@ -5,8 +5,8 @@
  48610. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  48611. */
  48612. -/* Make sure we get proper strerror_r() prototype */
  48613. -#define strerror_r _hidestrerror_r
  48614. +/* get rid of REDIRECT */
  48615. +#define strerror_r __hide_strerror_r
  48616. #include <features.h>
  48617. #include <errno.h>
  48618. @@ -15,7 +15,6 @@
  48619. #undef strerror_r
  48620. -
  48621. #ifdef __UCLIBC_HAS_ERRNO_MESSAGES__
  48622. extern const char _string_syserrmsgs[] attribute_hidden;
  48623. @@ -273,4 +272,6 @@
  48624. #endif /* __UCLIBC_HAS_ERRNO_MESSAGES__ */
  48625. libc_hidden_def(__xpg_strerror_r)
  48626. -weak_alias(__xpg_strerror_r, strerror_r)
  48627. +#if defined __USE_XOPEN2K && !defined __USE_GNU
  48628. +strong_alias(__xpg_strerror_r,strerror_r)
  48629. +#endif
  48630. diff -Nur uClibc-0.9.33.2/libc/string/xtensa/memcpy.S uClibc-git/libc/string/xtensa/memcpy.S
  48631. --- uClibc-0.9.33.2/libc/string/xtensa/memcpy.S 2012-05-15 09:20:09.000000000 +0200
  48632. +++ uClibc-git/libc/string/xtensa/memcpy.S 2014-07-25 20:36:06.457332858 +0200
  48633. @@ -13,11 +13,10 @@
  48634. Lesser General Public License for more details.
  48635. You should have received a copy of the GNU Lesser General Public
  48636. - License along with the GNU C Library; if not, write to the Free
  48637. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  48638. - Boston, MA 02110-1301, USA. */
  48639. + License along with the GNU C Library; if not, see
  48640. + <http://www.gnu.org/licenses/>. */
  48641. -#include "../../sysdeps/linux/xtensa/sysdep.h"
  48642. +#include <sysdep.h>
  48643. #include <bits/xtensa-config.h>
  48644. .macro src_b r, w0, w1
  48645. diff -Nur uClibc-0.9.33.2/libc/string/xtensa/memset.S uClibc-git/libc/string/xtensa/memset.S
  48646. --- uClibc-0.9.33.2/libc/string/xtensa/memset.S 2012-05-15 09:20:09.000000000 +0200
  48647. +++ uClibc-git/libc/string/xtensa/memset.S 2014-07-25 20:36:06.457332858 +0200
  48648. @@ -13,11 +13,10 @@
  48649. Lesser General Public License for more details.
  48650. You should have received a copy of the GNU Lesser General Public
  48651. - License along with the GNU C Library; if not, write to the Free
  48652. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  48653. - Boston, MA 02110-1301, USA. */
  48654. + License along with the GNU C Library; if not, see
  48655. + <http://www.gnu.org/licenses/>. */
  48656. -#include "../../sysdeps/linux/xtensa/sysdep.h"
  48657. +#include <sysdep.h>
  48658. #include <bits/xtensa-config.h>
  48659. /* Do not use .literal_position in the ENTRY macro. */
  48660. diff -Nur uClibc-0.9.33.2/libc/string/xtensa/strcmp.S uClibc-git/libc/string/xtensa/strcmp.S
  48661. --- uClibc-0.9.33.2/libc/string/xtensa/strcmp.S 2012-05-15 09:20:09.000000000 +0200
  48662. +++ uClibc-git/libc/string/xtensa/strcmp.S 2014-07-25 20:36:06.457332858 +0200
  48663. @@ -13,11 +13,10 @@
  48664. Lesser General Public License for more details.
  48665. You should have received a copy of the GNU Lesser General Public
  48666. - License along with the GNU C Library; if not, write to the Free
  48667. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  48668. - Boston, MA 02110-1301, USA. */
  48669. + License along with the GNU C Library; if not, see
  48670. + <http://www.gnu.org/licenses/>. */
  48671. -#include "../../sysdeps/linux/xtensa/sysdep.h"
  48672. +#include <sysdep.h>
  48673. #include <bits/xtensa-config.h>
  48674. #include <features.h>
  48675. @@ -35,13 +34,14 @@
  48676. #define MASK4 0x40404040
  48677. + .text
  48678. + .align 4
  48679. + .literal_position
  48680. .literal .Lmask0, MASK0
  48681. .literal .Lmask1, MASK1
  48682. .literal .Lmask2, MASK2
  48683. .literal .Lmask3, MASK3
  48684. .literal .Lmask4, MASK4
  48685. -
  48686. - .text
  48687. ENTRY (strcmp)
  48688. /* a2 = s1, a3 = s2 */
  48689. diff -Nur uClibc-0.9.33.2/libc/string/xtensa/strcpy.S uClibc-git/libc/string/xtensa/strcpy.S
  48690. --- uClibc-0.9.33.2/libc/string/xtensa/strcpy.S 2012-05-15 09:20:09.000000000 +0200
  48691. +++ uClibc-git/libc/string/xtensa/strcpy.S 2014-07-25 20:36:06.457332858 +0200
  48692. @@ -13,11 +13,10 @@
  48693. Lesser General Public License for more details.
  48694. You should have received a copy of the GNU Lesser General Public
  48695. - License along with the GNU C Library; if not, write to the Free
  48696. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  48697. - Boston, MA 02110-1301, USA. */
  48698. + License along with the GNU C Library; if not, see
  48699. + <http://www.gnu.org/licenses/>. */
  48700. -#include "../../sysdeps/linux/xtensa/sysdep.h"
  48701. +#include <sysdep.h>
  48702. #include <bits/xtensa-config.h>
  48703. #ifdef __XTENSA_EB__
  48704. diff -Nur uClibc-0.9.33.2/libc/string/xtensa/strlen.S uClibc-git/libc/string/xtensa/strlen.S
  48705. --- uClibc-0.9.33.2/libc/string/xtensa/strlen.S 2012-05-15 09:20:09.000000000 +0200
  48706. +++ uClibc-git/libc/string/xtensa/strlen.S 2014-07-25 20:36:06.457332858 +0200
  48707. @@ -13,11 +13,10 @@
  48708. Lesser General Public License for more details.
  48709. You should have received a copy of the GNU Lesser General Public
  48710. - License along with the GNU C Library; if not, write to the Free
  48711. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  48712. - Boston, MA 02110-1301, USA. */
  48713. + License along with the GNU C Library; if not, see
  48714. + <http://www.gnu.org/licenses/>. */
  48715. -#include "../../sysdeps/linux/xtensa/sysdep.h"
  48716. +#include <sysdep.h>
  48717. #include <bits/xtensa-config.h>
  48718. #ifdef __XTENSA_EB__
  48719. diff -Nur uClibc-0.9.33.2/libc/string/xtensa/strncpy.S uClibc-git/libc/string/xtensa/strncpy.S
  48720. --- uClibc-0.9.33.2/libc/string/xtensa/strncpy.S 2012-05-15 09:20:09.000000000 +0200
  48721. +++ uClibc-git/libc/string/xtensa/strncpy.S 2014-07-25 20:36:06.457332858 +0200
  48722. @@ -13,11 +13,10 @@
  48723. Lesser General Public License for more details.
  48724. You should have received a copy of the GNU Lesser General Public
  48725. - License along with the GNU C Library; if not, write to the Free
  48726. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  48727. - Boston, MA 02110-1301, USA. */
  48728. + License along with the GNU C Library; if not, see
  48729. + <http://www.gnu.org/licenses/>. */
  48730. -#include "../../sysdeps/linux/xtensa/sysdep.h"
  48731. +#include <sysdep.h>
  48732. #include <bits/xtensa-config.h>
  48733. #ifdef __XTENSA_EB__
  48734. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/atomic.h uClibc-git/libc/sysdeps/linux/alpha/bits/atomic.h
  48735. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
  48736. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/atomic.h 2014-07-25 20:36:06.501333088 +0200
  48737. @@ -12,9 +12,8 @@
  48738. Lesser General Public License for more details.
  48739. You should have received a copy of the GNU Lesser General Public
  48740. - License along with the GNU C Library; if not, write to the Free
  48741. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48742. - 02111-1307 USA. */
  48743. + License along with the GNU C Library; if not, see
  48744. + <http://www.gnu.org/licenses/>. */
  48745. #include <stdint.h>
  48746. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/dirent.h uClibc-git/libc/sysdeps/linux/alpha/bits/dirent.h
  48747. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/dirent.h 2012-05-15 09:20:09.000000000 +0200
  48748. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/dirent.h 2014-07-25 20:36:06.501333088 +0200
  48749. @@ -12,9 +12,8 @@
  48750. Lesser General Public License for more details.
  48751. You should have received a copy of the GNU Lesser General Public
  48752. - License along with the GNU C Library; if not, write to the Free
  48753. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48754. - 02111-1307 USA. */
  48755. + License along with the GNU C Library; if not, see
  48756. + <http://www.gnu.org/licenses/>. */
  48757. #ifndef _BITS_DIRENT_H
  48758. #define _BITS_DIRENT_H 1
  48759. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/eventfd.h uClibc-git/libc/sysdeps/linux/alpha/bits/eventfd.h
  48760. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/eventfd.h 1970-01-01 01:00:00.000000000 +0100
  48761. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/eventfd.h 2014-07-25 20:36:06.501333088 +0200
  48762. @@ -0,0 +1,31 @@
  48763. +/* Copyright (C) 2007-2013 Free Software Foundation, Inc.
  48764. + This file is part of the GNU C Library.
  48765. +
  48766. + The GNU C Library is free software; you can redistribute it and/or
  48767. + modify it under the terms of the GNU Lesser General Public
  48768. + License as published by the Free Software Foundation; either
  48769. + version 2.1 of the License, or (at your option) any later version.
  48770. +
  48771. + The GNU C Library is distributed in the hope that it will be useful,
  48772. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  48773. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  48774. + Lesser General Public License for more details.
  48775. +
  48776. + You should have received a copy of the GNU Lesser General Public
  48777. + License along with the GNU C Library; if not, see
  48778. + <http://www.gnu.org/licenses/>. */
  48779. +
  48780. +#ifndef _SYS_EVENTFD_H
  48781. +# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
  48782. +#endif
  48783. +
  48784. +/* Flags for eventfd. */
  48785. +enum
  48786. + {
  48787. + EFD_SEMAPHORE = 000000001,
  48788. +#define EFD_SEMAPHORE EFD_SEMAPHORE
  48789. + EFD_CLOEXEC = 010000000,
  48790. +#define EFD_CLOEXEC EFD_CLOEXEC
  48791. + EFD_NONBLOCK = 000000004
  48792. +#define EFD_NONBLOCK EFD_NONBLOCK
  48793. + };
  48794. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/fcntl.h uClibc-git/libc/sysdeps/linux/alpha/bits/fcntl.h
  48795. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  48796. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/fcntl.h 2014-07-25 20:36:06.501333088 +0200
  48797. @@ -13,9 +13,8 @@
  48798. Lesser General Public License for more details.
  48799. You should have received a copy of the GNU Lesser General Public
  48800. - License along with the GNU C Library; if not, write to the Free
  48801. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48802. - 02111-1307 USA. */
  48803. + License along with the GNU C Library; if not, see
  48804. + <http://www.gnu.org/licenses/>. */
  48805. #ifndef _FCNTL_H
  48806. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  48807. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/fenv.h uClibc-git/libc/sysdeps/linux/alpha/bits/fenv.h
  48808. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
  48809. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/fenv.h 2014-07-25 20:36:06.501333088 +0200
  48810. @@ -12,9 +12,8 @@
  48811. Lesser General Public License for more details.
  48812. You should have received a copy of the GNU Lesser General Public
  48813. - License along with the GNU C Library; if not, write to the Free
  48814. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48815. - 02111-1307 USA. */
  48816. + License along with the GNU C Library; if not, see
  48817. + <http://www.gnu.org/licenses/>. */
  48818. #ifndef _FENV_H
  48819. # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
  48820. @@ -107,15 +106,15 @@
  48821. /* If the default argument is used we use this value. Note that due to
  48822. architecture-specified page mappings, no user-space pointer will ever
  48823. have its two high bits set. Co-opt one. */
  48824. -#define FE_DFL_ENV ((__const fenv_t *) 0x8800000000000000UL)
  48825. +#define FE_DFL_ENV ((const fenv_t *) 0x8800000000000000UL)
  48826. #ifdef __USE_GNU
  48827. /* Floating-point environment where none of the exceptions are masked. */
  48828. -# define FE_NOMASK_ENV ((__const fenv_t *) 0x880000000000003eUL)
  48829. +# define FE_NOMASK_ENV ((const fenv_t *) 0x880000000000003eUL)
  48830. /* Floating-point environment with (processor-dependent) non-IEEE floating
  48831. point. In this case, mapping denormals to zero. */
  48832. -# define FE_NONIEEE_ENV ((__const fenv_t *) 0x8800000000003000UL)
  48833. +# define FE_NONIEEE_ENV ((const fenv_t *) 0x8800000000003000UL)
  48834. #endif
  48835. /* The system calls to talk to the kernel's FP code. */
  48836. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/ioctls.h uClibc-git/libc/sysdeps/linux/alpha/bits/ioctls.h
  48837. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/ioctls.h 2012-05-15 09:20:09.000000000 +0200
  48838. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/ioctls.h 2014-07-25 20:36:06.501333088 +0200
  48839. @@ -12,9 +12,8 @@
  48840. Lesser General Public License for more details.
  48841. You should have received a copy of the GNU Lesser General Public
  48842. - License along with the GNU C Library; if not, write to the Free
  48843. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48844. - 02111-1307 USA. */
  48845. + License along with the GNU C Library; if not, see
  48846. + <http://www.gnu.org/licenses/>. */
  48847. #ifndef _SYS_IOCTL_H
  48848. # error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
  48849. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/ipc.h uClibc-git/libc/sysdeps/linux/alpha/bits/ipc.h
  48850. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/ipc.h 2012-05-15 09:20:09.000000000 +0200
  48851. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/ipc.h 2014-07-25 20:36:06.501333088 +0200
  48852. @@ -12,9 +12,8 @@
  48853. Lesser General Public License for more details.
  48854. You should have received a copy of the GNU Lesser General Public
  48855. - License along with the GNU C Library; if not, write to the Free
  48856. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48857. - 02111-1307 USA. */
  48858. + License along with the GNU C Library; if not, see
  48859. + <http://www.gnu.org/licenses/>. */
  48860. #ifndef _SYS_IPC_H
  48861. # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
  48862. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/kernel_sigaction.h uClibc-git/libc/sysdeps/linux/alpha/bits/kernel_sigaction.h
  48863. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/kernel_sigaction.h 2012-05-15 09:20:09.000000000 +0200
  48864. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/kernel_sigaction.h 2014-07-25 20:36:06.501333088 +0200
  48865. @@ -9,12 +9,4 @@
  48866. unsigned int sa_flags;
  48867. };
  48868. -/* In uclibc, userspace struct sigaction is identical to
  48869. - * "new" struct kernel_sigaction (one from the Linux 2.1.68 kernel).
  48870. - * See sigaction.h
  48871. - */
  48872. -
  48873. -extern int __syscall_rt_sigaction (int, const struct sigaction *,
  48874. - struct sigaction *, size_t) attribute_hidden;
  48875. -
  48876. #endif
  48877. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/alpha/bits/kernel_types.h
  48878. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
  48879. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/kernel_types.h 2014-07-25 20:36:06.501333088 +0200
  48880. @@ -33,6 +33,8 @@
  48881. typedef __kernel_uid_t __kernel_uid32_t;
  48882. typedef __kernel_gid_t __kernel_gid32_t;
  48883. typedef __kernel_dev_t __kernel_old_dev_t;
  48884. +typedef long __kernel_long_t;
  48885. +typedef unsigned long __kernel_ulong_t;
  48886. typedef struct {
  48887. int val[2];
  48888. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/local_lim.h uClibc-git/libc/sysdeps/linux/alpha/bits/local_lim.h
  48889. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/local_lim.h 1970-01-01 01:00:00.000000000 +0100
  48890. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/local_lim.h 2014-07-25 20:36:06.501333088 +0200
  48891. @@ -0,0 +1,91 @@
  48892. +/* Minimum guaranteed maximum values for system limits. Linux/Alpha version.
  48893. + Copyright (C) 1993-1998,2000,2002,2003,2004 Free Software Foundation, Inc.
  48894. + This file is part of the GNU C Library.
  48895. +
  48896. + The GNU C Library is free software; you can redistribute it and/or
  48897. + modify it under the terms of the GNU Library General Public License as
  48898. + published by the Free Software Foundation; either version 2 of the
  48899. + License, or (at your option) any later version.
  48900. +
  48901. + The GNU C Library is distributed in the hope that it will be useful,
  48902. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  48903. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  48904. + Library General Public License for more details.
  48905. +
  48906. + You should have received a copy of the GNU Library General Public
  48907. + License along with the GNU C Library; see the file COPYING.LIB. If not,
  48908. + see <http://www.gnu.org/licenses/>. */
  48909. +
  48910. +/* The kernel header pollutes the namespace with the NR_OPEN symbol
  48911. + and defines LINK_MAX although filesystems have different maxima. A
  48912. + similar thing is true for OPEN_MAX: the limit can be changed at
  48913. + runtime and therefore the macro must not be defined. Remove this
  48914. + after including the header if necessary. */
  48915. +#ifndef NR_OPEN
  48916. +# define __undef_NR_OPEN
  48917. +#endif
  48918. +#ifndef LINK_MAX
  48919. +# define __undef_LINK_MAX
  48920. +#endif
  48921. +#ifndef OPEN_MAX
  48922. +# define __undef_OPEN_MAX
  48923. +#endif
  48924. +
  48925. +/* The kernel sources contain a file with all the needed information. */
  48926. +#include <linux/limits.h>
  48927. +
  48928. +/* Have to remove NR_OPEN? */
  48929. +#ifdef __undef_NR_OPEN
  48930. +# undef NR_OPEN
  48931. +# undef __undef_NR_OPEN
  48932. +#endif
  48933. +/* Have to remove LINK_MAX? */
  48934. +#ifdef __undef_LINK_MAX
  48935. +# undef LINK_MAX
  48936. +# undef __undef_LINK_MAX
  48937. +#endif
  48938. +/* Have to remove OPEN_MAX? */
  48939. +#ifdef __undef_OPEN_MAX
  48940. +# undef OPEN_MAX
  48941. +# undef __undef_OPEN_MAX
  48942. +#endif
  48943. +
  48944. +/* The number of data keys per process. */
  48945. +#define _POSIX_THREAD_KEYS_MAX 128
  48946. +/* This is the value this implementation supports. */
  48947. +#define PTHREAD_KEYS_MAX 1024
  48948. +
  48949. +/* Controlling the iterations of destructors for thread-specific data. */
  48950. +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
  48951. +/* Number of iterations this implementation does. */
  48952. +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
  48953. +
  48954. +/* The number of threads per process. */
  48955. +#define _POSIX_THREAD_THREADS_MAX 64
  48956. +/* We have no predefined limit on the number of threads. */
  48957. +#undef PTHREAD_THREADS_MAX
  48958. +
  48959. +/* Maximum amount by which a process can descrease its asynchronous I/O
  48960. + priority level. */
  48961. +#define AIO_PRIO_DELTA_MAX 20
  48962. +
  48963. +/* Minimum size for a thread. We are free to choose a reasonable value. */
  48964. +#define PTHREAD_STACK_MIN 24576
  48965. +
  48966. +/* Maximum number of timer expiration overruns. */
  48967. +#define DELAYTIMER_MAX 2147483647
  48968. +
  48969. +/* Maximum tty name length. */
  48970. +#define TTY_NAME_MAX 32
  48971. +
  48972. +/* Maximum login name length. This is arbitrary. */
  48973. +#define LOGIN_NAME_MAX 256
  48974. +
  48975. +/* Maximum host name length. */
  48976. +#define HOST_NAME_MAX 64
  48977. +
  48978. +/* Maximum message queue priority level. */
  48979. +#define MQ_PRIO_MAX 32768
  48980. +
  48981. +/* Maximum value the semaphore can have. */
  48982. +#define SEM_VALUE_MAX (2147483647)
  48983. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/mathdef.h uClibc-git/libc/sysdeps/linux/alpha/bits/mathdef.h
  48984. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
  48985. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/mathdef.h 2014-07-25 20:36:06.501333088 +0200
  48986. @@ -13,9 +13,8 @@
  48987. Lesser General Public License for more details.
  48988. You should have received a copy of the GNU Lesser General Public
  48989. - License along with the GNU C Library; if not, write to the Free
  48990. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  48991. - 02111-1307 USA. */
  48992. + License along with the GNU C Library; if not, see
  48993. + <http://www.gnu.org/licenses/>. */
  48994. #if !defined _MATH_H && !defined _COMPLEX_H
  48995. # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
  48996. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/mathinline.h uClibc-git/libc/sysdeps/linux/alpha/bits/mathinline.h
  48997. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/mathinline.h 2012-05-15 09:20:09.000000000 +0200
  48998. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/mathinline.h 2014-07-25 20:36:06.501333088 +0200
  48999. @@ -14,9 +14,8 @@
  49000. Lesser General Public License for more details.
  49001. You should have received a copy of the GNU Lesser General Public
  49002. - License along with the GNU C Library; if not, write to the Free
  49003. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49004. - 02111-1307 USA. */
  49005. + License along with the GNU C Library; if not, see
  49006. + <http://www.gnu.org/licenses/>. */
  49007. #ifndef _MATH_H
  49008. # error "Never use <bits/mathinline.h> directly; include <math.h> instead."
  49009. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/mman.h uClibc-git/libc/sysdeps/linux/alpha/bits/mman.h
  49010. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/mman.h 2012-05-15 09:20:09.000000000 +0200
  49011. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/mman.h 2014-07-25 20:36:06.501333088 +0200
  49012. @@ -13,9 +13,8 @@
  49013. Lesser General Public License for more details.
  49014. You should have received a copy of the GNU Lesser General Public
  49015. - License along with the GNU C Library; if not, write to the Free
  49016. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49017. - 02111-1307 USA. */
  49018. + License along with the GNU C Library; if not, see
  49019. + <http://www.gnu.org/licenses/>. */
  49020. #ifndef _SYS_MMAN_H
  49021. # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
  49022. @@ -71,7 +70,7 @@
  49023. # define MAP_NORESERVE 0x10000 /* Don't check for reservations. */
  49024. # define MAP_POPULATE 0x20000 /* Populate (prefault) pagetables. */
  49025. # define MAP_NONBLOCK 0x40000 /* Do not block on IO. */
  49026. -# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could
  49027. +# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could
  49028. be uninitialized. */
  49029. #endif
  49030. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/msq.h uClibc-git/libc/sysdeps/linux/alpha/bits/msq.h
  49031. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/msq.h 2012-05-15 09:20:09.000000000 +0200
  49032. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/msq.h 2014-07-25 20:36:06.501333088 +0200
  49033. @@ -12,9 +12,8 @@
  49034. Lesser General Public License for more details.
  49035. You should have received a copy of the GNU Lesser General Public
  49036. - License along with the GNU C Library; if not, write to the Free
  49037. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49038. - 02111-1307 USA. */
  49039. + License along with the GNU C Library; if not, see
  49040. + <http://www.gnu.org/licenses/>. */
  49041. #ifndef _SYS_MSG_H
  49042. # error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
  49043. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/netdb.h uClibc-git/libc/sysdeps/linux/alpha/bits/netdb.h
  49044. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/netdb.h 2012-05-15 09:20:09.000000000 +0200
  49045. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/netdb.h 2014-07-25 20:36:06.501333088 +0200
  49046. @@ -12,9 +12,8 @@
  49047. Lesser General Public License for more details.
  49048. You should have received a copy of the GNU Lesser General Public
  49049. - License along with the GNU C Library; if not, write to the Free
  49050. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49051. - 02111-1307 USA. */
  49052. + License along with the GNU C Library; if not, see
  49053. + <http://www.gnu.org/licenses/>. */
  49054. #ifndef _NETDB_H
  49055. # error "Never include <bits/netdb.h> directly; use <netdb.h> instead."
  49056. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/resource.h uClibc-git/libc/sysdeps/linux/alpha/bits/resource.h
  49057. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/resource.h 2012-05-15 09:20:09.000000000 +0200
  49058. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/resource.h 2014-07-25 20:36:06.501333088 +0200
  49059. @@ -14,9 +14,8 @@
  49060. Lesser General Public License for more details.
  49061. You should have received a copy of the GNU Lesser General Public
  49062. - License along with the GNU C Library; if not, write to the Free
  49063. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49064. - 02111-1307 USA. */
  49065. + License along with the GNU C Library; if not, see
  49066. + <http://www.gnu.org/licenses/>. */
  49067. #ifndef _SYS_RESOURCE_H
  49068. # error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
  49069. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/sem.h uClibc-git/libc/sysdeps/linux/alpha/bits/sem.h
  49070. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/sem.h 2012-05-15 09:20:09.000000000 +0200
  49071. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/sem.h 2014-07-25 20:36:06.501333088 +0200
  49072. @@ -12,9 +12,8 @@
  49073. Lesser General Public License for more details.
  49074. You should have received a copy of the GNU Lesser General Public
  49075. - License along with the GNU C Library; if not, write to the Free
  49076. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49077. - 02111-1307 USA. */
  49078. + License along with the GNU C Library; if not, see
  49079. + <http://www.gnu.org/licenses/>. */
  49080. #ifndef _SYS_SEM_H
  49081. # error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
  49082. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/setjmp.h uClibc-git/libc/sysdeps/linux/alpha/bits/setjmp.h
  49083. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  49084. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/setjmp.h 2014-07-25 20:36:06.501333088 +0200
  49085. @@ -13,9 +13,8 @@
  49086. Lesser General Public License for more details.
  49087. You should have received a copy of the GNU Lesser General Public
  49088. - License along with the GNU C Library; if not, write to the Free
  49089. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49090. - 02111-1307 USA. */
  49091. + License along with the GNU C Library; if not, see
  49092. + <http://www.gnu.org/licenses/>. */
  49093. #ifndef _BITS_SETJMP_H
  49094. #define _BITS_SETJMP_H 1
  49095. @@ -55,33 +54,6 @@
  49096. * registers.
  49097. */
  49098. -#if defined __USE_MISC || defined __ASSEMBLY__
  49099. -# define JB_S0 0
  49100. -# define JB_S1 1
  49101. -# define JB_S2 2
  49102. -# define JB_S3 3
  49103. -# define JB_S4 4
  49104. -# define JB_S5 5
  49105. -# define JB_PC 6
  49106. -# define JB_FP 7
  49107. -# define JB_SP 8
  49108. -# define JB_F2 9
  49109. -# define JB_F3 10
  49110. -# define JB_F4 11
  49111. -# define JB_F5 12
  49112. -# define JB_F6 13
  49113. -# define JB_F7 14
  49114. -# define JB_F8 15
  49115. -# define JB_F9 16
  49116. -#endif
  49117. -
  49118. -#ifndef __ASSEMBLY__
  49119. typedef long int __jmp_buf[17];
  49120. -/* Test if longjmp to JMPBUF would unwind the frame containing a local
  49121. - variable at ADDRESS. */
  49122. -#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
  49123. - ((void *)(_address) < (void *)((_jmpbuf)[JB_SP]))
  49124. -#endif
  49125. -
  49126. #endif /* bits/setjmp.h */
  49127. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/shm.h uClibc-git/libc/sysdeps/linux/alpha/bits/shm.h
  49128. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
  49129. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/shm.h 2014-07-25 20:36:06.501333088 +0200
  49130. @@ -13,9 +13,8 @@
  49131. Lesser General Public License for more details.
  49132. You should have received a copy of the GNU Lesser General Public
  49133. - License along with the GNU C Library; if not, write to the Free
  49134. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49135. - 02111-1307 USA. */
  49136. + License along with the GNU C Library; if not, see
  49137. + <http://www.gnu.org/licenses/>. */
  49138. #ifndef _SYS_SHM_H
  49139. # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
  49140. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/sigaction.h uClibc-git/libc/sysdeps/linux/alpha/bits/sigaction.h
  49141. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/sigaction.h 2012-05-15 09:20:09.000000000 +0200
  49142. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/sigaction.h 2014-07-25 20:36:06.501333088 +0200
  49143. @@ -13,9 +13,8 @@
  49144. Lesser General Public License for more details.
  49145. You should have received a copy of the GNU Lesser General Public
  49146. - License along with the GNU C Library; if not, write to the Free
  49147. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49148. - 02111-1307 USA. */
  49149. + License along with the GNU C Library; if not, see
  49150. + <http://www.gnu.org/licenses/>. */
  49151. #ifndef _SIGNAL_H
  49152. # error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
  49153. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/sigcontextinfo.h uClibc-git/libc/sysdeps/linux/alpha/bits/sigcontextinfo.h
  49154. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
  49155. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/sigcontextinfo.h 2014-07-25 20:36:06.505333109 +0200
  49156. @@ -12,9 +12,8 @@
  49157. Lesser General Public License for more details.
  49158. You should have received a copy of the GNU Lesser General Public
  49159. - License along with the GNU C Library; if not, write to the Free
  49160. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49161. - 02111-1307 USA. */
  49162. + License along with the GNU C Library; if not, see
  49163. + <http://www.gnu.org/licenses/>. */
  49164. #define SIGCONTEXT int _code, struct sigcontext *
  49165. #define SIGCONTEXT_EXTRA_ARGS _code,
  49166. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/siginfo.h uClibc-git/libc/sysdeps/linux/alpha/bits/siginfo.h
  49167. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/siginfo.h 2012-05-15 09:20:09.000000000 +0200
  49168. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/siginfo.h 2014-07-25 20:36:06.505333109 +0200
  49169. @@ -13,9 +13,8 @@
  49170. Lesser General Public License for more details.
  49171. You should have received a copy of the GNU Lesser General Public
  49172. - License along with the GNU C Library; if not, write to the Free
  49173. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49174. - 02111-1307 USA. */
  49175. + License along with the GNU C Library; if not, see
  49176. + <http://www.gnu.org/licenses/>. */
  49177. #if !defined _SIGNAL_H && !defined __need_siginfo_t \
  49178. && !defined __need_sigevent_t
  49179. @@ -258,7 +257,11 @@
  49180. /* Structure to transport application-defined values with signals. */
  49181. # define __SIGEV_MAX_SIZE 64
  49182. -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
  49183. +# if __WORDSIZE == 64
  49184. +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
  49185. +# else
  49186. +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
  49187. +# endif
  49188. typedef struct sigevent
  49189. {
  49190. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/signum.h uClibc-git/libc/sysdeps/linux/alpha/bits/signum.h
  49191. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/signum.h 2012-05-15 09:20:09.000000000 +0200
  49192. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/signum.h 2014-07-25 20:36:06.505333109 +0200
  49193. @@ -13,9 +13,8 @@
  49194. Lesser General Public License for more details.
  49195. You should have received a copy of the GNU Lesser General Public
  49196. - License along with the GNU C Library; if not, write to the Free
  49197. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49198. - 02111-1307 USA. */
  49199. + License along with the GNU C Library; if not, see
  49200. + <http://www.gnu.org/licenses/>. */
  49201. #ifdef _SIGNAL_H
  49202. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/sigstack.h uClibc-git/libc/sysdeps/linux/alpha/bits/sigstack.h
  49203. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/sigstack.h 2012-05-15 09:20:09.000000000 +0200
  49204. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/sigstack.h 2014-07-25 20:36:06.505333109 +0200
  49205. @@ -13,9 +13,8 @@
  49206. Lesser General Public License for more details.
  49207. You should have received a copy of the GNU Lesser General Public
  49208. - License along with the GNU C Library; if not, write to the Free
  49209. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49210. - 02111-1307 USA. */
  49211. + License along with the GNU C Library; if not, see
  49212. + <http://www.gnu.org/licenses/>. */
  49213. #ifndef _SIGNAL_H
  49214. # error "Never include this file directly. Use <signal.h> instead"
  49215. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/socket_type.h uClibc-git/libc/sysdeps/linux/alpha/bits/socket_type.h
  49216. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/socket_type.h 1970-01-01 01:00:00.000000000 +0100
  49217. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/socket_type.h 2014-07-25 20:36:06.505333109 +0200
  49218. @@ -0,0 +1,54 @@
  49219. +/* Define enum __socket_type for Linux/Alpha.
  49220. + Copyright (C) 1991-2012 Free Software Foundation, Inc.
  49221. + This file is part of the GNU C Library.
  49222. +
  49223. + The GNU C Library is free software; you can redistribute it and/or
  49224. + modify it under the terms of the GNU Lesser General Public
  49225. + License as published by the Free Software Foundation; either
  49226. + version 2.1 of the License, or (at your option) any later version.
  49227. +
  49228. + The GNU C Library is distributed in the hope that it will be useful,
  49229. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  49230. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  49231. + Lesser General Public License for more details.
  49232. +
  49233. + You should have received a copy of the GNU Lesser General Public
  49234. + License along with the GNU C Library. If not, see
  49235. + <http://www.gnu.org/licenses/>. */
  49236. +
  49237. +#ifndef _SYS_SOCKET_H
  49238. +# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
  49239. +#endif
  49240. +
  49241. +/* Types of sockets. */
  49242. +enum __socket_type
  49243. +{
  49244. + SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
  49245. + byte streams. */
  49246. +#define SOCK_STREAM SOCK_STREAM
  49247. + SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
  49248. + of fixed maximum length. */
  49249. +#define SOCK_DGRAM SOCK_DGRAM
  49250. + SOCK_RAW = 3, /* Raw protocol interface. */
  49251. +#define SOCK_RAW SOCK_RAW
  49252. + SOCK_RDM = 4, /* Reliably-delivered messages. */
  49253. +#define SOCK_RDM SOCK_RDM
  49254. + SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
  49255. + datagrams of fixed maximum length. */
  49256. +#define SOCK_SEQPACKET SOCK_SEQPACKET
  49257. + SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */
  49258. +#define SOCK_DCCP SOCK_DCCP
  49259. + SOCK_PACKET = 10, /* Linux specific way of getting packets
  49260. + at the dev level. For writing rarp and
  49261. + other similar things on the user level. */
  49262. +#define SOCK_PACKET SOCK_PACKET
  49263. +
  49264. + /* Flags to be ORed into the type parameter of socket and socketpair. */
  49265. +
  49266. + SOCK_CLOEXEC = 010000000, /* Atomically set close-on-exec flag for the
  49267. + new descriptor(s). */
  49268. +#define SOCK_CLOEXEC SOCK_CLOEXEC
  49269. + SOCK_NONBLOCK = 0x40000000 /* Atomically mark descriptor(s) as
  49270. + non-blocking. */
  49271. +#define SOCK_NONBLOCK SOCK_NONBLOCK
  49272. +};
  49273. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/alpha/bits/stackinfo.h
  49274. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  49275. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/stackinfo.h 2014-07-25 20:36:06.505333109 +0200
  49276. @@ -12,9 +12,8 @@
  49277. Lesser General Public License for more details.
  49278. You should have received a copy of the GNU Lesser General Public
  49279. - License along with the GNU C Library; if not, write to the Free
  49280. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49281. - 02111-1307 USA. */
  49282. + License along with the GNU C Library; if not, see
  49283. + <http://www.gnu.org/licenses/>. */
  49284. /* This file contains a bit of information about the stack allocation
  49285. of the processor. */
  49286. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/statfs.h uClibc-git/libc/sysdeps/linux/alpha/bits/statfs.h
  49287. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/statfs.h 2012-05-15 09:20:09.000000000 +0200
  49288. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/statfs.h 2014-07-25 20:36:06.505333109 +0200
  49289. @@ -12,9 +12,8 @@
  49290. Lesser General Public License for more details.
  49291. You should have received a copy of the GNU Lesser General Public
  49292. - License along with the GNU C Library; if not, write to the Free
  49293. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49294. - 02111-1307 USA. */
  49295. + License along with the GNU C Library; if not, see
  49296. + <http://www.gnu.org/licenses/>. */
  49297. #ifndef _SYS_STATFS_H
  49298. # error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
  49299. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/stat.h uClibc-git/libc/sysdeps/linux/alpha/bits/stat.h
  49300. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
  49301. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/stat.h 2014-07-25 20:36:06.505333109 +0200
  49302. @@ -13,9 +13,8 @@
  49303. Lesser General Public License for more details.
  49304. You should have received a copy of the GNU Lesser General Public
  49305. - License along with the GNU C Library; if not, write to the Free
  49306. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49307. - 02111-1307 USA. */
  49308. + License along with the GNU C Library; if not, see
  49309. + <http://www.gnu.org/licenses/>. */
  49310. #ifndef _SYS_STAT_H
  49311. # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
  49312. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/syscalls.h uClibc-git/libc/sysdeps/linux/alpha/bits/syscalls.h
  49313. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/syscalls.h 2012-05-15 09:20:09.000000000 +0200
  49314. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/syscalls.h 2014-07-25 20:36:06.505333109 +0200
  49315. @@ -14,9 +14,8 @@
  49316. Lesser General Public License for more details.
  49317. You should have received a copy of the GNU Lesser General Public
  49318. - License along with the GNU C Library; if not, write to the Free
  49319. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49320. - 02111-1307 USA. */
  49321. + License along with the GNU C Library; if not, see
  49322. + <http://www.gnu.org/licenses/>. */
  49323. #ifndef _BITS_SYSCALLS_H
  49324. #define _BITS_SYSCALLS_H
  49325. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/termios.h uClibc-git/libc/sysdeps/linux/alpha/bits/termios.h
  49326. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/termios.h 2012-05-15 09:20:09.000000000 +0200
  49327. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/termios.h 2014-07-25 20:36:06.505333109 +0200
  49328. @@ -14,9 +14,8 @@
  49329. Lesser General Public License for more details.
  49330. You should have received a copy of the GNU Lesser General Public
  49331. - License along with the GNU C Library; if not, write to the Free
  49332. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49333. - 02111-1307 USA. */
  49334. + License along with the GNU C Library; if not, see
  49335. + <http://www.gnu.org/licenses/>. */
  49336. #ifndef _TERMIOS_H
  49337. # error "Never include <bits/termios.h> directly; use <termios.h> instead."
  49338. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/typesizes.h uClibc-git/libc/sysdeps/linux/alpha/bits/typesizes.h
  49339. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/typesizes.h 2012-05-15 09:20:09.000000000 +0200
  49340. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/typesizes.h 2014-07-25 20:36:06.505333109 +0200
  49341. @@ -13,9 +13,8 @@
  49342. Lesser General Public License for more details.
  49343. You should have received a copy of the GNU Lesser General Public
  49344. - License along with the GNU C Library; if not, write to the Free
  49345. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49346. - 02111-1307 USA. */
  49347. + License along with the GNU C Library; if not, see
  49348. + <http://www.gnu.org/licenses/>. */
  49349. #ifndef _BITS_TYPES_H
  49350. # error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
  49351. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/alpha/bits/uClibc_arch_features.h
  49352. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  49353. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/uClibc_arch_features.h 2014-07-25 20:36:06.505333109 +0200
  49354. @@ -11,8 +11,8 @@
  49355. /* can your target use syscall6() for mmap ? */
  49356. #define __UCLIBC_MMAP_HAS_6_ARGS__
  49357. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  49358. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  49359. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  49360. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  49361. /* does your target have a broken create_module() ? */
  49362. #define __UCLIBC_SLIGHTLY_BROKEN_CREATE_MODULE__
  49363. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/uClibc_page.h uClibc-git/libc/sysdeps/linux/alpha/bits/uClibc_page.h
  49364. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/uClibc_page.h 2012-05-15 09:20:09.000000000 +0200
  49365. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/uClibc_page.h 2014-07-25 20:36:06.505333109 +0200
  49366. @@ -11,8 +11,8 @@
  49367. * Library General Public License for more details.
  49368. *
  49369. * You should have received a copy of the GNU Library General Public
  49370. - * License along with this library; if not, write to the Free
  49371. - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  49372. + * License along with this library; if not, see
  49373. + * <http://www.gnu.org/licenses/>.
  49374. */
  49375. /* Supply an architecture specific value for PAGE_SIZE and friends. */
  49376. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/wordsize.h uClibc-git/libc/sysdeps/linux/alpha/bits/wordsize.h
  49377. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
  49378. +++ uClibc-git/libc/sysdeps/linux/alpha/bits/wordsize.h 2014-07-25 20:36:06.505333109 +0200
  49379. @@ -12,9 +12,8 @@
  49380. Lesser General Public License for more details.
  49381. You should have received a copy of the GNU Lesser General Public
  49382. - License along with the GNU C Library; if not, write to the Free
  49383. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49384. - 02111-1307 USA. */
  49385. + License along with the GNU C Library; if not, see
  49386. + <http://www.gnu.org/licenses/>. */
  49387. #define __WORDSIZE 64
  49388. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/brk.S uClibc-git/libc/sysdeps/linux/alpha/brk.S
  49389. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/brk.S 2012-05-15 09:20:09.000000000 +0200
  49390. +++ uClibc-git/libc/sysdeps/linux/alpha/brk.S 2014-07-25 20:36:06.505333109 +0200
  49391. @@ -13,9 +13,8 @@
  49392. Lesser General Public License for more details.
  49393. You should have received a copy of the GNU Lesser General Public
  49394. - License along with the GNU C Library; if not, write to the Free
  49395. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49396. - 02111-1307 USA. */
  49397. + License along with the GNU C Library; if not, see
  49398. + <http://www.gnu.org/licenses/>. */
  49399. /* __brk is a special syscall under Linux since it never returns an
  49400. error. Instead, the error condition is indicated by returning the old
  49401. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/clone.S uClibc-git/libc/sysdeps/linux/alpha/clone.S
  49402. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/clone.S 2012-05-15 09:20:09.000000000 +0200
  49403. +++ uClibc-git/libc/sysdeps/linux/alpha/clone.S 2014-07-25 20:36:06.505333109 +0200
  49404. @@ -13,9 +13,8 @@
  49405. Lesser General Public License for more details.
  49406. You should have received a copy of the GNU Lesser General Public
  49407. - License along with the GNU C Library; if not, write to the Free
  49408. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49409. - 02111-1307 USA. */
  49410. + License along with the GNU C Library; if not, see
  49411. + <http://www.gnu.org/licenses/>. */
  49412. /* clone() is even more special than fork() as it mucks with stacks
  49413. and invokes a function in the right context after its all over. */
  49414. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/crt1.S uClibc-git/libc/sysdeps/linux/alpha/crt1.S
  49415. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/crt1.S 2012-05-15 09:20:09.000000000 +0200
  49416. +++ uClibc-git/libc/sysdeps/linux/alpha/crt1.S 2014-07-25 20:36:06.505333109 +0200
  49417. @@ -32,9 +32,8 @@
  49418. Lesser General Public License for more details.
  49419. You should have received a copy of the GNU Lesser General Public
  49420. - License along with the GNU C Library; if not, write to the Free
  49421. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49422. - 02111-1307 USA. */
  49423. + License along with the GNU C Library; if not, see
  49424. + <http://www.gnu.org/licenses/>. */
  49425. #include <features.h>
  49426. #include <sys/regdef.h>
  49427. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/divrem.h uClibc-git/libc/sysdeps/linux/alpha/divrem.h
  49428. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/divrem.h 2012-05-15 09:20:09.000000000 +0200
  49429. +++ uClibc-git/libc/sysdeps/linux/alpha/divrem.h 2014-07-25 20:36:06.505333109 +0200
  49430. @@ -13,9 +13,8 @@
  49431. Lesser General Public License for more details.
  49432. You should have received a copy of the GNU Lesser General Public
  49433. - License along with the GNU C Library; if not, write to the Free
  49434. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49435. - 02111-1307 USA. */
  49436. + License along with the GNU C Library; if not, see
  49437. + <http://www.gnu.org/licenses/>. */
  49438. /* The current Alpha chips don't provide hardware for integer
  49439. division. The C compiler expects the functions
  49440. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/fpu_control.h uClibc-git/libc/sysdeps/linux/alpha/fpu_control.h
  49441. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
  49442. +++ uClibc-git/libc/sysdeps/linux/alpha/fpu_control.h 2014-07-25 20:36:06.505333109 +0200
  49443. @@ -14,9 +14,8 @@
  49444. Lesser General Public License for more details.
  49445. You should have received a copy of the GNU Lesser General Public
  49446. - License along with the GNU C Library; if not, write to the Free
  49447. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49448. - 02111-1307 USA. */
  49449. + License along with the GNU C Library; if not, see
  49450. + <http://www.gnu.org/licenses/>. */
  49451. #ifndef _ALPHA_FPU_CONTROL_H
  49452. #define _ALPHA_FPU_CONTROL_H
  49453. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/jmpbuf-offsets.h uClibc-git/libc/sysdeps/linux/alpha/jmpbuf-offsets.h
  49454. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
  49455. +++ uClibc-git/libc/sysdeps/linux/alpha/jmpbuf-offsets.h 2014-07-25 20:36:06.505333109 +0200
  49456. @@ -0,0 +1,35 @@
  49457. +/* Private macros for accessing __jmp_buf contents. Alpha version.
  49458. + Copyright (C) 2006 Free Software Foundation, Inc.
  49459. + This file is part of the GNU C Library.
  49460. +
  49461. + The GNU C Library is free software; you can redistribute it and/or
  49462. + modify it under the terms of the GNU Lesser General Public
  49463. + License as published by the Free Software Foundation; either
  49464. + version 2.1 of the License, or (at your option) any later version.
  49465. +
  49466. + The GNU C Library is distributed in the hope that it will be useful,
  49467. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  49468. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  49469. + Lesser General Public License for more details.
  49470. +
  49471. + You should have received a copy of the GNU Lesser General Public
  49472. + License along with the GNU C Library; if not, see
  49473. + <http://www.gnu.org/licenses/>. */
  49474. +
  49475. +#define JB_S0 0
  49476. +#define JB_S1 1
  49477. +#define JB_S2 2
  49478. +#define JB_S3 3
  49479. +#define JB_S4 4
  49480. +#define JB_S5 5
  49481. +#define JB_PC 6
  49482. +#define JB_FP 7
  49483. +#define JB_SP 8
  49484. +#define JB_F2 9
  49485. +#define JB_F3 10
  49486. +#define JB_F4 11
  49487. +#define JB_F5 12
  49488. +#define JB_F6 13
  49489. +#define JB_F7 14
  49490. +#define JB_F8 15
  49491. +#define JB_F9 16
  49492. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/alpha/jmpbuf-unwind.h
  49493. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  49494. +++ uClibc-git/libc/sysdeps/linux/alpha/jmpbuf-unwind.h 2014-07-25 20:36:06.505333109 +0200
  49495. @@ -0,0 +1,23 @@
  49496. +/*
  49497. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  49498. + *
  49499. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  49500. + */
  49501. +#include <setjmp.h>
  49502. +#include <jmpbuf-offsets.h>
  49503. +
  49504. +/* Test if longjmp to JMPBUF would unwind the frame containing a local
  49505. + variable at ADDRESS. */
  49506. +#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
  49507. + ((void *)(_address) < (void *)((_jmpbuf)[JB_SP]))
  49508. +
  49509. +#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  49510. +#include <stdint.h>
  49511. +#include <unwind.h>
  49512. +
  49513. +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
  49514. + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
  49515. +
  49516. +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
  49517. + ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
  49518. +#endif
  49519. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/__longjmp.S uClibc-git/libc/sysdeps/linux/alpha/__longjmp.S
  49520. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
  49521. +++ uClibc-git/libc/sysdeps/linux/alpha/__longjmp.S 2014-07-25 20:36:06.489333026 +0200
  49522. @@ -12,14 +12,10 @@
  49523. Lesser General Public License for more details.
  49524. You should have received a copy of the GNU Lesser General Public
  49525. - License along with the GNU C Library; if not, write to the Free
  49526. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49527. - 02111-1307 USA. */
  49528. + License along with the GNU C Library; if not, see
  49529. + <http://www.gnu.org/licenses/>. */
  49530. -#include <features.h>
  49531. -#define _SETJMP_H
  49532. -#define __ASSEMBLY__
  49533. -#include <bits/setjmp.h>
  49534. +#include <setjmp-offsets.h>
  49535. #define a0 $16
  49536. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/Makefile.arch uClibc-git/libc/sysdeps/linux/alpha/Makefile.arch
  49537. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
  49538. +++ uClibc-git/libc/sysdeps/linux/alpha/Makefile.arch 2014-07-25 20:36:06.489333026 +0200
  49539. @@ -5,9 +5,9 @@
  49540. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  49541. #
  49542. -CSRC := __syscall_error.c sigprocmask.c
  49543. +CSRC-y := __syscall_error.c sigprocmask.c
  49544. -SSRC := \
  49545. +SSRC-y := \
  49546. __longjmp.S brk.S bsd-_setjmp.S bsd-setjmp.S clone.S \
  49547. divl.S divq.S pipe.S reml.S remq.S __syscall_rt_sigaction.S setjmp.S \
  49548. syscall.S
  49549. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/pipe.S uClibc-git/libc/sysdeps/linux/alpha/pipe.S
  49550. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/pipe.S 2012-05-15 09:20:09.000000000 +0200
  49551. +++ uClibc-git/libc/sysdeps/linux/alpha/pipe.S 2014-07-25 20:36:06.505333109 +0200
  49552. @@ -13,9 +13,8 @@
  49553. Lesser General Public License for more details.
  49554. You should have received a copy of the GNU Lesser General Public
  49555. - License along with the GNU C Library; if not, write to the Free
  49556. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49557. - 02111-1307 USA. */
  49558. + License along with the GNU C Library; if not, see
  49559. + <http://www.gnu.org/licenses/>. */
  49560. #include <features.h>
  49561. #include <sys/syscall.h>
  49562. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/setjmp.S uClibc-git/libc/sysdeps/linux/alpha/setjmp.S
  49563. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/setjmp.S 2012-05-15 09:20:09.000000000 +0200
  49564. +++ uClibc-git/libc/sysdeps/linux/alpha/setjmp.S 2014-07-25 20:36:06.505333109 +0200
  49565. @@ -12,15 +12,10 @@
  49566. Lesser General Public License for more details.
  49567. You should have received a copy of the GNU Lesser General Public
  49568. - License along with the GNU C Library; if not, write to the Free
  49569. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49570. - 02111-1307 USA. */
  49571. -
  49572. -#include <features.h>
  49573. -#define _ASM
  49574. -#define _SETJMP_H
  49575. -#define __ASSEMBLY__
  49576. -#include <bits/setjmp.h>
  49577. + License along with the GNU C Library; if not, see
  49578. + <http://www.gnu.org/licenses/>. */
  49579. +
  49580. +#include <jmpbuf-offsets.h>
  49581. #define a0 $16
  49582. @@ -30,10 +25,16 @@
  49583. ldgp $29, 0($27)
  49584. $sigsetjmp_local:
  49585. - subq $30, 16, $30
  49586. - .frame $26, 16, $26, 0
  49587. - stq $26, 0($30)
  49588. - .mask 0x04000000, -16
  49589. +#ifndef __PIC__
  49590. +# define FRAME 16
  49591. + subq $30, FRAME, $30
  49592. + .frame $30, FRAME, $26, 0
  49593. + stq $26, 0($30)
  49594. + .mask 0x04000000, -FRAME
  49595. +#else
  49596. +# define FRAME 0
  49597. + .frame $30, FRAME, $26, 0
  49598. +#endif
  49599. .prologue 1
  49600. stq $9, JB_S0*8(a0)
  49601. @@ -43,9 +44,9 @@
  49602. stq $13, JB_S4*8(a0)
  49603. stq $14, JB_S5*8(a0)
  49604. stq $26, JB_PC*8(a0)
  49605. - addq $30, 16, $1
  49606. - stq $15, JB_FP*8(a0)
  49607. + addq $30, FRAME, $1
  49608. stq $1, JB_SP*8(a0)
  49609. + stq $15, JB_FP*8(a0)
  49610. stt $f2, JB_F2*8(a0)
  49611. stt $f3, JB_F3*8(a0)
  49612. stt $f4, JB_F4*8(a0)
  49613. @@ -55,12 +56,16 @@
  49614. stt $f8, JB_F8*8(a0)
  49615. stt $f9, JB_F9*8(a0)
  49616. +#ifndef __PIC__
  49617. /* Call to C to (potentially) save our signal mask. */
  49618. jsr $26, __sigjmp_save
  49619. -
  49620. ldq $26, 0($30)
  49621. addq $30, 16, $30
  49622. ret
  49623. +#else
  49624. + /* Tailcall to save the signal mask. */
  49625. + br $31, __sigjmp_save !samegp
  49626. +#endif
  49627. .end __sigsetjmp
  49628. @@ -71,7 +76,6 @@
  49629. .align 3;
  49630. .ent _setjmp , 0;
  49631. _setjmp:
  49632. - .frame $30 , 0, $26
  49633. ldgp $29, 0($27)
  49634. mov 0, $17
  49635. br $sigsetjmp_local
  49636. @@ -81,11 +85,7 @@
  49637. .align 3;
  49638. .ent setjmp , 0;
  49639. setjmp:
  49640. - .frame $30 , 0, $26
  49641. ldgp $29, 0($27)
  49642. mov 1, $17
  49643. br $sigsetjmp_local
  49644. .end setjmp
  49645. -
  49646. -.weak _setjmp
  49647. -.weak setjmp
  49648. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sigprocmask.c uClibc-git/libc/sysdeps/linux/alpha/sigprocmask.c
  49649. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sigprocmask.c 2012-05-15 09:20:09.000000000 +0200
  49650. +++ uClibc-git/libc/sysdeps/linux/alpha/sigprocmask.c 2014-07-25 20:36:06.505333109 +0200
  49651. @@ -13,9 +13,8 @@
  49652. Lesser General Public License for more details.
  49653. You should have received a copy of the GNU Lesser General Public
  49654. - License along with the GNU C Library; if not, write to the Free
  49655. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49656. - 02111-1307 USA. */
  49657. + License along with the GNU C Library; if not, see
  49658. + <http://www.gnu.org/licenses/>. */
  49659. #include <features.h>
  49660. #include <errno.h>
  49661. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sys/acct.h uClibc-git/libc/sysdeps/linux/alpha/sys/acct.h
  49662. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sys/acct.h 2012-05-15 09:20:09.000000000 +0200
  49663. +++ uClibc-git/libc/sysdeps/linux/alpha/sys/acct.h 2014-07-25 20:36:06.513333151 +0200
  49664. @@ -12,9 +12,8 @@
  49665. Lesser General Public License for more details.
  49666. You should have received a copy of the GNU Lesser General Public
  49667. - License along with the GNU C Library; if not, write to the Free
  49668. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49669. - 02111-1307 USA. */
  49670. + License along with the GNU C Library; if not, see
  49671. + <http://www.gnu.org/licenses/>. */
  49672. #ifndef _SYS_ACCT_H
  49673. @@ -59,7 +58,7 @@
  49674. /* Switch process accounting on and off. */
  49675. -extern int acct (__const char *__filename) __THROW;
  49676. +extern int acct (const char *__filename) __THROW;
  49677. __END_DECLS
  49678. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sys/io.h uClibc-git/libc/sysdeps/linux/alpha/sys/io.h
  49679. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sys/io.h 2012-05-15 09:20:09.000000000 +0200
  49680. +++ uClibc-git/libc/sysdeps/linux/alpha/sys/io.h 2014-07-25 20:36:06.513333151 +0200
  49681. @@ -12,9 +12,8 @@
  49682. Lesser General Public License for more details.
  49683. You should have received a copy of the GNU Lesser General Public
  49684. - License along with the GNU C Library; if not, write to the Free
  49685. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49686. - 02111-1307 USA. */
  49687. + License along with the GNU C Library; if not, see
  49688. + <http://www.gnu.org/licenses/>. */
  49689. #ifndef _SYS_IO_H
  49690. @@ -23,6 +22,7 @@
  49691. __BEGIN_DECLS
  49692. +#if defined __UCLIBC_LINUX_SPECIFIC__
  49693. /* If TURN_ON is TRUE, request for permission to do direct i/o on the
  49694. port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
  49695. permission off for that range. This call requires root privileges.
  49696. @@ -32,12 +32,12 @@
  49697. E.g., Linux/Alpha for Alpha PCs supports this. */
  49698. extern int ioperm (unsigned long int __from, unsigned long int __num,
  49699. int __turn_on) __THROW;
  49700. -libc_hidden_proto(ioperm)
  49701. /* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to
  49702. access any I/O port is granted. This call requires root
  49703. privileges. */
  49704. extern int iopl (int __level) __THROW;
  49705. +#endif /* __UCLIBC_LINUX_SPECIFIC__ */
  49706. /* Return the physical address of the DENSE I/O memory or NULL if none
  49707. is available (e.g. on a jensen). */
  49708. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sys/procfs.h uClibc-git/libc/sysdeps/linux/alpha/sys/procfs.h
  49709. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  49710. +++ uClibc-git/libc/sysdeps/linux/alpha/sys/procfs.h 2014-07-25 20:36:06.513333151 +0200
  49711. @@ -12,9 +12,8 @@
  49712. Lesser General Public License for more details.
  49713. You should have received a copy of the GNU Lesser General Public
  49714. - License along with the GNU C Library; if not, write to the Free
  49715. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49716. - 02111-1307 USA. */
  49717. + License along with the GNU C Library; if not, see
  49718. + <http://www.gnu.org/licenses/>. */
  49719. #ifndef _SYS_PROCFS_H
  49720. #define _SYS_PROCFS_H 1
  49721. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sys/ucontext.h uClibc-git/libc/sysdeps/linux/alpha/sys/ucontext.h
  49722. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  49723. +++ uClibc-git/libc/sysdeps/linux/alpha/sys/ucontext.h 2014-07-25 20:36:06.513333151 +0200
  49724. @@ -12,9 +12,8 @@
  49725. Lesser General Public License for more details.
  49726. You should have received a copy of the GNU Lesser General Public
  49727. - License along with the GNU C Library; if not, write to the Free
  49728. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49729. - 02111-1307 USA. */
  49730. + License along with the GNU C Library; if not, see
  49731. + <http://www.gnu.org/licenses/>. */
  49732. #ifndef _SYS_UCONTEXT_H
  49733. #define _SYS_UCONTEXT_H 1
  49734. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sys/user.h uClibc-git/libc/sysdeps/linux/alpha/sys/user.h
  49735. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/sys/user.h 2012-05-15 09:20:09.000000000 +0200
  49736. +++ uClibc-git/libc/sysdeps/linux/alpha/sys/user.h 2014-07-25 20:36:06.513333151 +0200
  49737. @@ -12,9 +12,8 @@
  49738. Lesser General Public License for more details.
  49739. You should have received a copy of the GNU Lesser General Public
  49740. - License along with the GNU C Library; if not, write to the Free
  49741. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49742. - 02111-1307 USA. */
  49743. + License along with the GNU C Library; if not, see
  49744. + <http://www.gnu.org/licenses/>. */
  49745. #ifndef _SYS_USER_H
  49746. #define _SYS_USER_H 1
  49747. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/__syscall_rt_sigaction.S uClibc-git/libc/sysdeps/linux/alpha/__syscall_rt_sigaction.S
  49748. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/__syscall_rt_sigaction.S 2012-05-15 09:20:09.000000000 +0200
  49749. +++ uClibc-git/libc/sysdeps/linux/alpha/__syscall_rt_sigaction.S 2014-07-25 20:36:06.489333026 +0200
  49750. @@ -13,9 +13,8 @@
  49751. Lesser General Public License for more details.
  49752. You should have received a copy of the GNU Lesser General Public
  49753. - License along with the GNU C Library; if not, write to the Free
  49754. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49755. - 02111-1307 USA. */
  49756. + License along with the GNU C Library; if not, see
  49757. + <http://www.gnu.org/licenses/>. */
  49758. #include <features.h>
  49759. #include <sys/syscall.h>
  49760. @@ -31,6 +30,9 @@
  49761. .text
  49762. .globl __syscall_rt_sigaction
  49763. +#ifndef __UCLIBC_HAS_THREADS_NATIVE__
  49764. +.hidden __syscall_rt_sigaction
  49765. +#endif
  49766. .align 4
  49767. .ent __syscall_rt_sigaction, 0
  49768. __syscall_rt_sigaction:
  49769. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/alpha/syscall.S uClibc-git/libc/sysdeps/linux/alpha/syscall.S
  49770. --- uClibc-0.9.33.2/libc/sysdeps/linux/alpha/syscall.S 2012-05-15 09:20:09.000000000 +0200
  49771. +++ uClibc-git/libc/sysdeps/linux/alpha/syscall.S 2014-07-25 20:36:06.513333151 +0200
  49772. @@ -13,9 +13,8 @@
  49773. Lesser General Public License for more details.
  49774. You should have received a copy of the GNU Lesser General Public
  49775. - License along with the GNU C Library; if not, write to the Free
  49776. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  49777. - 02111-1307 USA. */
  49778. + License along with the GNU C Library; if not, see
  49779. + <http://www.gnu.org/licenses/>. */
  49780. #include <features.h>
  49781. #include <sys/regdef.h>
  49782. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/byteswap.h uClibc-git/libc/sysdeps/linux/arc/bits/byteswap.h
  49783. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/byteswap.h 1970-01-01 01:00:00.000000000 +0100
  49784. +++ uClibc-git/libc/sysdeps/linux/arc/bits/byteswap.h 2014-07-25 20:36:06.549333339 +0200
  49785. @@ -0,0 +1,23 @@
  49786. +/*
  49787. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  49788. + *
  49789. + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  49790. + *
  49791. + */
  49792. +
  49793. +#ifndef _ASM_BITS_BYTESWAP_H
  49794. +#define _ASM_BITS_BYTESWAP_H 1
  49795. +
  49796. +#ifdef __Xswape /* gcc defined if -mswape is enabled */
  49797. +
  49798. +#define __bswap_non_constant_32(x) \
  49799. + __extension__ \
  49800. + ({ unsigned int __bswap_32_v = x; \
  49801. + __asm__ ("swape %0, %0" : "+r" (__bswap_32_v)); \
  49802. + __bswap_32_v; })
  49803. +
  49804. +#endif /* __Xswape */
  49805. +
  49806. +#endif /* _ASM_BITS_BYTESWAP_H */
  49807. +
  49808. +#include <bits/byteswap-common.h>
  49809. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/endian.h uClibc-git/libc/sysdeps/linux/arc/bits/endian.h
  49810. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/endian.h 1970-01-01 01:00:00.000000000 +0100
  49811. +++ uClibc-git/libc/sysdeps/linux/arc/bits/endian.h 2014-07-25 20:36:06.549333339 +0200
  49812. @@ -0,0 +1,15 @@
  49813. +/*
  49814. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  49815. + *
  49816. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  49817. + */
  49818. +#ifndef _ENDIAN_H
  49819. +# error "Never use <bits/endian.h> directly; include <endian.h> instead."
  49820. +#endif
  49821. +
  49822. +/* ARC support either endianness. */
  49823. +#ifdef __BIG_ENDIAN__
  49824. +#define __BYTE_ORDER __BIG_ENDIAN
  49825. +#else
  49826. +#define __BYTE_ORDER __LITTLE_ENDIAN
  49827. +#endif
  49828. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/fcntl.h uClibc-git/libc/sysdeps/linux/arc/bits/fcntl.h
  49829. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/fcntl.h 1970-01-01 01:00:00.000000000 +0100
  49830. +++ uClibc-git/libc/sysdeps/linux/arc/bits/fcntl.h 2014-07-25 20:36:06.549333339 +0200
  49831. @@ -0,0 +1,223 @@
  49832. +/* O_*, F_*, FD_* bit values for Linux.
  49833. + *
  49834. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  49835. + *
  49836. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  49837. + */
  49838. +#ifndef _FCNTL_H
  49839. +# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  49840. +#endif
  49841. +
  49842. +
  49843. +#include <sys/types.h>
  49844. +#ifdef __USE_GNU
  49845. +# include <bits/uio.h>
  49846. +#endif
  49847. +
  49848. +/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
  49849. + located on an ext2 file system */
  49850. +#define O_ACCMODE 0003
  49851. +#define O_RDONLY 00
  49852. +#define O_WRONLY 01
  49853. +#define O_RDWR 02
  49854. +#define O_CREAT 0100 /* not fcntl */
  49855. +#define O_EXCL 0200 /* not fcntl */
  49856. +#define O_NOCTTY 0400 /* not fcntl */
  49857. +#define O_TRUNC 01000 /* not fcntl */
  49858. +#define O_APPEND 02000
  49859. +#define O_NONBLOCK 04000
  49860. +#define O_NDELAY O_NONBLOCK
  49861. +#define O_SYNC 010000
  49862. +#define O_FSYNC O_SYNC
  49863. +#define O_ASYNC 020000
  49864. +
  49865. +#ifdef __USE_GNU
  49866. +# define O_DIRECT 040000 /* Direct disk access. */
  49867. +# define O_DIRECTORY 0200000 /* Must be a directory. */
  49868. +# define O_NOFOLLOW 0400000 /* Do not follow links. */
  49869. +# define O_NOATIME 01000000 /* Do not set atime. */
  49870. +# define O_CLOEXEC 02000000 /* Set close_on_exec. */
  49871. +#endif
  49872. +
  49873. +#ifdef __USE_LARGEFILE64
  49874. +# define O_LARGEFILE 0100000
  49875. +#endif
  49876. +
  49877. +/* For now Linux has synchronisity options for data and read operations.
  49878. + We define the symbols here but let them do the same as O_SYNC since
  49879. + this is a superset. */
  49880. +#if defined __USE_POSIX199309 || defined __USE_UNIX98
  49881. +# define O_DSYNC O_SYNC /* Synchronize data. */
  49882. +# define O_RSYNC O_SYNC /* Synchronize read operations. */
  49883. +#endif
  49884. +
  49885. +/* Values for the second argument to `fcntl'. */
  49886. +#define F_DUPFD 0 /* Duplicate file descriptor. */
  49887. +#define F_GETFD 1 /* Get file descriptor flags. */
  49888. +#define F_SETFD 2 /* Set file descriptor flags. */
  49889. +#define F_GETFL 3 /* Get file status flags. */
  49890. +#define F_SETFL 4 /* Set file status flags. */
  49891. +
  49892. +#ifndef __USE_FILE_OFFSET64
  49893. +# define F_GETLK 5 /* Get record locking info. */
  49894. +# define F_SETLK 6 /* Set record locking info (non-blocking). */
  49895. +# define F_SETLKW 7 /* Set record locking info (blocking). */
  49896. +#else
  49897. +# define F_GETLK F_GETLK64 /* Get record locking info. */
  49898. +# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
  49899. +# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
  49900. +#endif
  49901. +#define F_GETLK64 12 /* Get record locking info. */
  49902. +#define F_SETLK64 13 /* Set record locking info (non-blocking). */
  49903. +#define F_SETLKW64 14 /* Set record locking info (blocking). */
  49904. +
  49905. +#if defined __USE_BSD || defined __USE_XOPEN2K
  49906. +# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */
  49907. +# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */
  49908. +#endif
  49909. +
  49910. +#ifdef __USE_GNU
  49911. +# define F_SETSIG 10 /* Set number of signal to be sent. */
  49912. +# define F_GETSIG 11 /* Get number of signal to be sent. */
  49913. +#endif
  49914. +
  49915. +#ifdef __USE_GNU
  49916. +# define F_SETLEASE 1024 /* Set a lease. */
  49917. +# define F_GETLEASE 1025 /* Enquire what lease is active. */
  49918. +# define F_NOTIFY 1026 /* Request notfications on a directory. */
  49919. +# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
  49920. + close-on-exit set on new fd. */
  49921. +#endif
  49922. +
  49923. +/* For F_[GET|SET]FL. */
  49924. +#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
  49925. +
  49926. +/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
  49927. +#define F_RDLCK 0 /* Read lock. */
  49928. +#define F_WRLCK 1 /* Write lock. */
  49929. +#define F_UNLCK 2 /* Remove lock. */
  49930. +
  49931. +/* For old implementation of bsd flock(). */
  49932. +#define F_EXLCK 4 /* or 3 */
  49933. +#define F_SHLCK 8 /* or 4 */
  49934. +
  49935. +#ifdef __USE_BSD
  49936. +/* Operations for bsd flock(), also used by the kernel implementation. */
  49937. +# define LOCK_SH 1 /* shared lock */
  49938. +# define LOCK_EX 2 /* exclusive lock */
  49939. +# define LOCK_NB 4 /* or'd with one of the above to prevent
  49940. + blocking */
  49941. +# define LOCK_UN 8 /* remove lock */
  49942. +#endif
  49943. +
  49944. +#ifdef __USE_GNU
  49945. +# define LOCK_MAND 32 /* This is a mandatory flock: */
  49946. +# define LOCK_READ 64 /* ... which allows concurrent read operations. */
  49947. +# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
  49948. +# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
  49949. +#endif
  49950. +
  49951. +#ifdef __USE_GNU
  49952. +/* Types of directory notifications that may be requested with F_NOTIFY. */
  49953. +# define DN_ACCESS 0x00000001 /* File accessed. */
  49954. +# define DN_MODIFY 0x00000002 /* File modified. */
  49955. +# define DN_CREATE 0x00000004 /* File created. */
  49956. +# define DN_DELETE 0x00000008 /* File removed. */
  49957. +# define DN_RENAME 0x00000010 /* File renamed. */
  49958. +# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
  49959. +# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
  49960. +#endif
  49961. +
  49962. +struct flock
  49963. + {
  49964. + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
  49965. + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
  49966. +#ifndef __USE_FILE_OFFSET64
  49967. + __off_t l_start; /* Offset where the lock begins. */
  49968. + __off_t l_len; /* Size of the locked area; zero means until EOF. */
  49969. +#else
  49970. + __off64_t l_start; /* Offset where the lock begins. */
  49971. + __off64_t l_len; /* Size of the locked area; zero means until EOF. */
  49972. +#endif
  49973. + __pid_t l_pid; /* Process holding the lock. */
  49974. + };
  49975. +
  49976. +#ifdef __USE_LARGEFILE64
  49977. +struct flock64
  49978. + {
  49979. + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
  49980. + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
  49981. + __off64_t l_start; /* Offset where the lock begins. */
  49982. + __off64_t l_len; /* Size of the locked area; zero means until EOF. */
  49983. + __pid_t l_pid; /* Process holding the lock. */
  49984. + };
  49985. +#endif
  49986. +
  49987. +/* Define some more compatibility macros to be backward compatible with
  49988. + BSD systems which did not managed to hide these kernel macros. */
  49989. +#ifdef __USE_BSD
  49990. +# define FAPPEND O_APPEND
  49991. +# define FFSYNC O_FSYNC
  49992. +# define FASYNC O_ASYNC
  49993. +# define FNONBLOCK O_NONBLOCK
  49994. +# define FNDELAY O_NDELAY
  49995. +#endif /* Use BSD. */
  49996. +
  49997. +/* Advise to `posix_fadvise'. */
  49998. +#ifdef __USE_XOPEN2K
  49999. +# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
  50000. +# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
  50001. +# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
  50002. +# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
  50003. +# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
  50004. +# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
  50005. +#endif
  50006. +
  50007. +#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
  50008. +/* Flags for SYNC_FILE_RANGE. */
  50009. +# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
  50010. + in the range before performing the
  50011. + write. */
  50012. +# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
  50013. + dirty pages in the range which are
  50014. + not presently under writeback. */
  50015. +# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
  50016. + the range after performing the
  50017. + write. */
  50018. +
  50019. +/* Flags for SPLICE and VMSPLICE. */
  50020. +# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
  50021. +# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
  50022. + (but we may still block on the fd
  50023. + we splice from/to). */
  50024. +# define SPLICE_F_MORE 4 /* Expect more data. */
  50025. +# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
  50026. +#endif
  50027. +
  50028. +__BEGIN_DECLS
  50029. +
  50030. +#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
  50031. +
  50032. +/* Provide kernel hint to read ahead. */
  50033. +extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
  50034. + __THROW;
  50035. +
  50036. +/* Selective file content synch'ing. */
  50037. +extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
  50038. + unsigned int __flags);
  50039. +
  50040. +/* Splice address range into a pipe. */
  50041. +extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
  50042. + size_t __count, unsigned int __flags);
  50043. +
  50044. +/* Splice two files together. */
  50045. +extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
  50046. + __off64_t *__offout, size_t __len,
  50047. + unsigned int __flags);
  50048. +
  50049. +/* In-kernel implementation of tee for pipe buffers. */
  50050. +extern ssize_t tee (int __fdin, int __fdout, size_t __len,
  50051. + unsigned int __flags);
  50052. +
  50053. +#endif
  50054. +__END_DECLS
  50055. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/arc/bits/kernel_types.h
  50056. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/kernel_types.h 1970-01-01 01:00:00.000000000 +0100
  50057. +++ uClibc-git/libc/sysdeps/linux/arc/bits/kernel_types.h 2014-07-25 20:36:06.549333339 +0200
  50058. @@ -0,0 +1,59 @@
  50059. +/*
  50060. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50061. + *
  50062. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50063. + */
  50064. +
  50065. +/* Note that we use the exact same include guard #define names
  50066. + * as asm/posix_types.h. This will avoid gratuitous conflicts
  50067. + * with the posix_types.h kernel header, and will ensure that
  50068. + * our private content, and not the kernel header, will win.
  50069. + * -Erik
  50070. + *
  50071. + * Update: ARC Linux 3.2 ABI change - asm-generic/posix_types.h used now.
  50072. + * for which ARCH wrapper (asm/posix_types.h) is generated, so need to use
  50073. + * the asm-generic file's gaurd.
  50074. + *
  50075. + * Based on asm-generic/stat.h
  50076. + */
  50077. +
  50078. +#ifndef __ASM_GENERIC_POSIX_TYPES_H
  50079. +#define __ASM_GENERIC_POSIX_TYPES_H
  50080. +
  50081. +typedef unsigned long __kernel_dev_t;
  50082. +typedef unsigned long __kernel_ino_t;
  50083. +typedef unsigned int __kernel_mode_t;
  50084. +typedef unsigned int __kernel_nlink_t;
  50085. +typedef long __kernel_off_t;
  50086. +typedef int __kernel_pid_t;
  50087. +typedef int __kernel_ipc_pid_t;
  50088. +typedef unsigned int __kernel_uid_t;
  50089. +typedef unsigned int __kernel_gid_t;
  50090. +typedef unsigned int __kernel_size_t;
  50091. +typedef int __kernel_ssize_t;
  50092. +typedef int __kernel_ptrdiff_t;
  50093. +typedef long __kernel_time_t;
  50094. +typedef long __kernel_suseconds_t;
  50095. +typedef long __kernel_clock_t;
  50096. +typedef int __kernel_daddr_t;
  50097. +typedef char * __kernel_caddr_t;
  50098. +typedef unsigned short __kernel_uid16_t;
  50099. +typedef unsigned short __kernel_gid16_t;
  50100. +typedef __kernel_uid_t __kernel_uid32_t;
  50101. +typedef __kernel_gid_t __kernel_gid32_t;
  50102. +typedef __kernel_uid_t __kernel_old_uid_t;
  50103. +typedef __kernel_gid_t __kernel_old_gid_t;
  50104. +typedef long long __kernel_loff_t;
  50105. +typedef unsigned int __kernel_old_dev_t;
  50106. +typedef long __kernel_long_t;
  50107. +typedef unsigned long __kernel_ulong_t;
  50108. +
  50109. +typedef struct {
  50110. +#ifdef __USE_ALL
  50111. + int val[2];
  50112. +#else
  50113. + int __val[2];
  50114. +#endif
  50115. +} __kernel_fsid_t;
  50116. +
  50117. +#endif /* _ASM_ARC_POSIX_TYPES_H */
  50118. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/setjmp.h uClibc-git/libc/sysdeps/linux/arc/bits/setjmp.h
  50119. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/setjmp.h 1970-01-01 01:00:00.000000000 +0100
  50120. +++ uClibc-git/libc/sysdeps/linux/arc/bits/setjmp.h 2014-07-25 20:36:06.549333339 +0200
  50121. @@ -0,0 +1,16 @@
  50122. +/*
  50123. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50124. + *
  50125. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50126. + */
  50127. +
  50128. +#ifndef _BITS_SETJMP_H
  50129. +#define _BITS_SETJMP_H 1
  50130. +
  50131. +#if !defined _SETJMP_H && !defined _PTHREAD_H
  50132. +# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
  50133. +#endif
  50134. +
  50135. +typedef int __jmp_buf[13+1+1+1]; /*r13-r25, fp, sp, blink */
  50136. +
  50137. +#endif
  50138. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/sigcontextinfo.h uClibc-git/libc/sysdeps/linux/arc/bits/sigcontextinfo.h
  50139. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/sigcontextinfo.h 1970-01-01 01:00:00.000000000 +0100
  50140. +++ uClibc-git/libc/sysdeps/linux/arc/bits/sigcontextinfo.h 2014-07-25 20:36:06.549333339 +0200
  50141. @@ -0,0 +1,15 @@
  50142. +/*
  50143. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50144. + *
  50145. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50146. + */
  50147. +
  50148. +#include <features.h>
  50149. +#define SIGCONTEXT struct sigcontext *
  50150. +#define SIGCONTEXT_EXTRA_ARGS
  50151. +
  50152. +#define GET_PC(ctx) ((void *) ctx->regs.scratch.ret)
  50153. +#define GET_FRAME(ctx) ((void *) ctx->regs.scratch.fp)
  50154. +#define GET_STACK(ctx) ((void *) ctx->regs.scratch.sp)
  50155. +#define CALL_SIGHANDLER(handler, signo, ctx) \
  50156. + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
  50157. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/arc/bits/stackinfo.h
  50158. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/stackinfo.h 1970-01-01 01:00:00.000000000 +0100
  50159. +++ uClibc-git/libc/sysdeps/linux/arc/bits/stackinfo.h 2014-07-25 20:36:06.549333339 +0200
  50160. @@ -0,0 +1,13 @@
  50161. +/*
  50162. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50163. + *
  50164. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50165. + */
  50166. +
  50167. +#ifndef _STACKINFO_H
  50168. +#define _STACKINFO_H 1
  50169. +
  50170. +/* On ARC, the stack grows down. */
  50171. +#define _STACK_GROWS_DOWN 1
  50172. +
  50173. +#endif /* stackinfo.h */
  50174. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/syscalls.h uClibc-git/libc/sysdeps/linux/arc/bits/syscalls.h
  50175. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/syscalls.h 1970-01-01 01:00:00.000000000 +0100
  50176. +++ uClibc-git/libc/sysdeps/linux/arc/bits/syscalls.h 2014-07-25 20:36:06.549333339 +0200
  50177. @@ -0,0 +1,183 @@
  50178. +/*
  50179. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50180. + *
  50181. + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50182. + *
  50183. + */
  50184. +#ifndef _BITS_SYSCALLS_H
  50185. +#define _BITS_SYSCALLS_H
  50186. +#ifndef _SYSCALL_H
  50187. +#error "Never use <bits/syscalls.h> directly; include <sys/syscall.h> instead."
  50188. +#endif
  50189. +
  50190. +#ifndef __ASSEMBLER__
  50191. +
  50192. +#include <errno.h>
  50193. +
  50194. +/*
  50195. + * Fine tuned code for errno handling in syscall wrappers.
  50196. + *
  50197. + * 1. __syscall_error(raw_syscall_ret_val) is used to set the errno (vs.
  50198. + * the typical __set_errno). This helps elide the generated code for
  50199. + * GOT fetch for __errno_location pointer etc, in each wrapper.
  50200. + *
  50201. + * 2. The call to above is also disguised in inline asm. This elides
  50202. + * unconditional save/restore of a few callee regs which gcc almost
  50203. + * always generates if the call is exposed
  50204. + *
  50205. + * 3. The function can't be hidden because wrappers from librt et all also
  50206. + * call it. However hidden is not really needed to bypass PLT for
  50207. + * intra-libc calls as the branch insn w/o @plt is sufficient.
  50208. + */
  50209. +
  50210. +#ifdef IS_IN_rtld
  50211. +/* ldso doesn't have real errno */
  50212. +#define ERRNO_ERRANDS(_sys_result)
  50213. +#else /* !IS_IN_rtld */
  50214. +extern int __syscall_error (int);
  50215. +#ifndef IS_IN_libc
  50216. +/* Inter-libc callers use PLT */
  50217. +#define CALL_ERRNO_SETTER "bl __syscall_error@plt \n\t"
  50218. +#else
  50219. +/* intra-libc callers, despite PIC can bypass PLT */
  50220. +#define CALL_ERRNO_SETTER "bl __syscall_error \n\t"
  50221. +#endif
  50222. +
  50223. +#define ERRNO_ERRANDS(_sys_result) \
  50224. + __asm__ volatile ( \
  50225. + "st.a blink, [sp, -4] \n\t" \
  50226. + CALL_ERRNO_SETTER \
  50227. + "ld.ab blink, [sp, 4] \n\t" \
  50228. + :"+r" (_sys_result) \
  50229. + : \
  50230. + :"r1","r2","r3","r4","r5","r6", \
  50231. + "r7","r8","r9","r10","r11","r12" \
  50232. + );
  50233. +
  50234. +#endif /* IS_IN_rtld */
  50235. +
  50236. +/* -1 to -1023 as valid error values will suffice for some time */
  50237. +#define INTERNAL_SYSCALL_ERROR_P(val, err) \
  50238. + ((unsigned int) (val) > (unsigned int) -1024)
  50239. +
  50240. +/*
  50241. + * Standard sycall wrapper
  50242. + * -Gets syscall name (conv to __NR_xxx)
  50243. + * -sets errno, return success/error-codes
  50244. + */
  50245. +#define INLINE_SYSCALL(name, nr_args, args...) \
  50246. +({ \
  50247. + register int __res __asm__("r0"); \
  50248. + __res = INTERNAL_SYSCALL_NCS(__NR_##name, , nr_args, args); \
  50249. + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P ((__res), ), 0)) \
  50250. + { \
  50251. + ERRNO_ERRANDS(__res); \
  50252. + } \
  50253. + __res; \
  50254. +})
  50255. +
  50256. +/* variant of INLINE_SYSCALL, gets syscall number
  50257. + */
  50258. +#define INLINE_SYSCALL_NCS(num, nr_args, args...) \
  50259. +({ \
  50260. + register int __res __asm__("r0"); \
  50261. + __res = INTERNAL_SYSCALL_NCS(num, , nr_args, args); \
  50262. + if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P ((__res), ), 0)) \
  50263. + { \
  50264. + ERRNO_ERRANDS(__res); \
  50265. + } \
  50266. + __res; \
  50267. +})
  50268. +
  50269. +/*-------------------------------------------------------------------------
  50270. + * Mechanics of Trap - specific to ARC700
  50271. + *
  50272. + * Note the memory clobber is not strictly needed for intended semantics of
  50273. + * the inline asm. However some of the cases, such as old-style 6 arg mmap
  50274. + * gcc was generating code for inline syscall ahead of buffer packing needed
  50275. + * for syscall itself.
  50276. + *-------------------------------------------------------------------------*/
  50277. +
  50278. +#define ARC_TRAP_INSN "trap0 \n\t"
  50279. +
  50280. +#define INTERNAL_SYSCALL_NCS(nm, err, nr_args, args...) \
  50281. +({ \
  50282. + /* Per ABI, r0 is 1st arg and return reg */ \
  50283. + register int __ret __asm__("r0"); \
  50284. + register int _sys_num __asm__("r8"); \
  50285. + \
  50286. + LOAD_ARGS_##nr_args (nm, args) \
  50287. + \
  50288. + __asm__ volatile ( \
  50289. + ARC_TRAP_INSN \
  50290. + : "+r" (__ret) \
  50291. + : "r"(_sys_num) ASM_ARGS_##nr_args \
  50292. + : "memory"); \
  50293. + \
  50294. + __ret; \
  50295. +})
  50296. +
  50297. +/* Macros for setting up inline __asm__ input regs */
  50298. +#define ASM_ARGS_0
  50299. +#define ASM_ARGS_1 ASM_ARGS_0, "r" (__ret)
  50300. +#define ASM_ARGS_2 ASM_ARGS_1, "r" (_arg2)
  50301. +#define ASM_ARGS_3 ASM_ARGS_2, "r" (_arg3)
  50302. +#define ASM_ARGS_4 ASM_ARGS_3, "r" (_arg4)
  50303. +#define ASM_ARGS_5 ASM_ARGS_4, "r" (_arg5)
  50304. +#define ASM_ARGS_6 ASM_ARGS_5, "r" (_arg6)
  50305. +#define ASM_ARGS_7 ASM_ARGS_6, "r" (_arg7)
  50306. +
  50307. +/* Macros for converting sys-call wrapper args into sys call args */
  50308. +#define LOAD_ARGS_0(nm, arg) \
  50309. + _sys_num = (int) (nm); \
  50310. +
  50311. +#define LOAD_ARGS_1(nm, arg1) \
  50312. + __ret = (int) (arg1); \
  50313. + LOAD_ARGS_0 (nm, arg1)
  50314. +
  50315. +/*
  50316. + * Note that the use of _tmpX might look superflous, however it is needed
  50317. + * to ensure that register variables are not clobbered if arg happens to be
  50318. + * a function call itself. e.g. sched_setaffinity() calling getpid() for arg2
  50319. + *
  50320. + * Also this specific order of recursive calling is important to segregate
  50321. + * the tmp args evaluation (function call case described above) and assigment
  50322. + * of register variables
  50323. + */
  50324. +#define LOAD_ARGS_2(nm, arg1, arg2) \
  50325. + int _tmp2 = (int) (arg2); \
  50326. + LOAD_ARGS_1 (nm, arg1) \
  50327. + register int _arg2 __asm__ ("r1") = _tmp2;
  50328. +
  50329. +#define LOAD_ARGS_3(nm, arg1, arg2, arg3) \
  50330. + int _tmp3 = (int) (arg3); \
  50331. + LOAD_ARGS_2 (nm, arg1, arg2) \
  50332. + register int _arg3 __asm__ ("r2") = _tmp3;
  50333. +
  50334. +#define LOAD_ARGS_4(nm, arg1, arg2, arg3, arg4) \
  50335. + int _tmp4 = (int) (arg4); \
  50336. + LOAD_ARGS_3 (nm, arg1, arg2, arg3) \
  50337. + register int _arg4 __asm__ ("r3") = _tmp4;
  50338. +
  50339. +#define LOAD_ARGS_5(nm, arg1, arg2, arg3, arg4, arg5) \
  50340. + int _tmp5 = (int) (arg5); \
  50341. + LOAD_ARGS_4 (nm, arg1, arg2, arg3, arg4) \
  50342. + register int _arg5 __asm__ ("r4") = _tmp5;
  50343. +
  50344. +#define LOAD_ARGS_6(nm, arg1, arg2, arg3, arg4, arg5, arg6) \
  50345. + int _tmp6 = (int) (arg6); \
  50346. + LOAD_ARGS_5 (nm, arg1, arg2, arg3, arg4, arg5) \
  50347. + register int _arg6 __asm__ ("r5") = _tmp6;
  50348. +
  50349. +#define LOAD_ARGS_7(nm, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\
  50350. + int _tmp7 = (int) (arg7); \
  50351. + LOAD_ARGS_6 (nm, arg1, arg2, arg3, arg4, arg5, arg6) \
  50352. + register int _arg7 __asm__ ("r6") = _tmp7;
  50353. +
  50354. +#else
  50355. +
  50356. +#define ARC_TRAP_INSN trap0
  50357. +
  50358. +#endif /* __ASSEMBLER__ */
  50359. +
  50360. +#endif /* _BITS_SYSCALLS_H */
  50361. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/arc/bits/uClibc_arch_features.h
  50362. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/uClibc_arch_features.h 1970-01-01 01:00:00.000000000 +0100
  50363. +++ uClibc-git/libc/sysdeps/linux/arc/bits/uClibc_arch_features.h 2014-07-25 20:36:06.549333339 +0200
  50364. @@ -0,0 +1,53 @@
  50365. +/*
  50366. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50367. + *
  50368. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50369. + */
  50370. +
  50371. +/*
  50372. + * Track misc arch-specific features that aren't config options
  50373. + */
  50374. +
  50375. +#ifndef _BITS_UCLIBC_ARCH_FEATURES_H
  50376. +#define _BITS_UCLIBC_ARCH_FEATURES_H
  50377. +
  50378. +/* instruction used when calling abort() to kill yourself */
  50379. +#define __UCLIBC_ABORT_INSTRUCTION__ "flag 0"
  50380. +
  50381. +/* can your target use syscall6() for mmap ? */
  50382. +#undef __UCLIBC_MMAP_HAS_6_ARGS__
  50383. +
  50384. +/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  50385. +#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  50386. +
  50387. +/* does your target have a broken create_module() ? */
  50388. +#undef __UCLIBC_BROKEN_CREATE_MODULE__
  50389. +
  50390. +/* does your target have to worry about older [gs]etrlimit() ? */
  50391. +#undef __UCLIBC_HANDLE_OLDER_RLIMIT__
  50392. +
  50393. +/* does your target have an asm .set ? */
  50394. +#define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__
  50395. +
  50396. +/* define if target doesn't like .global */
  50397. +#undef __UCLIBC_ASM_GLOBAL_DIRECTIVE__
  50398. +
  50399. +/* define if target supports .weak */
  50400. +#define __UCLIBC_HAVE_ASM_WEAK_DIRECTIVE__
  50401. +
  50402. +/* define if target supports .weakext */
  50403. +#undef __UCLIBC_HAVE_ASM_WEAKEXT_DIRECTIVE__
  50404. +
  50405. +/* needed probably only for ppc64 */
  50406. +#undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
  50407. +
  50408. +/* define if target supports CFI pseudo ops */
  50409. +#undef __UCLIBC_HAVE_ASM_CFI_DIRECTIVES__
  50410. +
  50411. +/* define if target supports IEEE signed zero floats */
  50412. +#define __UCLIBC_HAVE_SIGNED_ZERO__
  50413. +
  50414. +/* The default ';' is a comment on ARC. */
  50415. +#define __UCLIBC_ASM_LINE_SEP__ `
  50416. +
  50417. +#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
  50418. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/uClibc_page.h uClibc-git/libc/sysdeps/linux/arc/bits/uClibc_page.h
  50419. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/uClibc_page.h 1970-01-01 01:00:00.000000000 +0100
  50420. +++ uClibc-git/libc/sysdeps/linux/arc/bits/uClibc_page.h 2014-07-25 20:36:06.549333339 +0200
  50421. @@ -0,0 +1,26 @@
  50422. +/*
  50423. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50424. + *
  50425. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50426. + */
  50427. +
  50428. +#ifndef _UCLIBC_PAGE_H
  50429. +#define _UCLIBC_PAGE_H
  50430. +
  50431. +/*
  50432. + * ARC700/linux supports 4k, 8k, 16k pages (build time).
  50433. + * We rely on the kernel exported header (aka uapi headers since 3.8)
  50434. + * for PAGE_SIZE and friends. This avoids hand-editing here when building
  50435. + * toolchain.
  50436. + *
  50437. + * Although uClibc determines page size dynamically, from kernel's auxv which
  50438. + * ARC Linux does pass, still the generic code needs a fall back
  50439. + * _dl_pagesize = auxvt[AT_PAGESZ].a_un.a_val ? : PAGE_SIZE
  50440. + *
  50441. + */
  50442. +#include <asm/page.h>
  50443. +
  50444. +/* TBD: fix this with runtime value for a PAGE_SIZE agnostic uClibc */
  50445. +#define MMAP2_PAGE_SHIFT PAGE_SHIFT
  50446. +
  50447. +#endif /* _UCLIBC_PAGE_H */
  50448. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/wordsize.h uClibc-git/libc/sysdeps/linux/arc/bits/wordsize.h
  50449. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bits/wordsize.h 1970-01-01 01:00:00.000000000 +0100
  50450. +++ uClibc-git/libc/sysdeps/linux/arc/bits/wordsize.h 2014-07-25 20:36:06.549333339 +0200
  50451. @@ -0,0 +1,7 @@
  50452. +/*
  50453. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50454. + *
  50455. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50456. + */
  50457. +
  50458. +#define __WORDSIZE 32
  50459. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bsd-setjmp.S uClibc-git/libc/sysdeps/linux/arc/bsd-setjmp.S
  50460. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bsd-setjmp.S 1970-01-01 01:00:00.000000000 +0100
  50461. +++ uClibc-git/libc/sysdeps/linux/arc/bsd-setjmp.S 2014-07-25 20:36:06.549333339 +0200
  50462. @@ -0,0 +1,20 @@
  50463. +/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. ARC version.
  50464. + *
  50465. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50466. + *
  50467. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50468. + */
  50469. +
  50470. +/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
  50471. + We cannot do it in C because it must be a tail-call, so frame-unwinding
  50472. + in setjmp doesn't clobber the state restored by longjmp. */
  50473. +
  50474. +#include <sysdep.h>
  50475. +
  50476. +;@ r0 = jump buffer into which regs will be saved
  50477. +
  50478. +ENTRY(setjmp)
  50479. + b.d __sigsetjmp
  50480. + mov r1, 1 ; save signals
  50481. +END(setjmp)
  50482. +libc_hidden_def(setjmp)
  50483. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/bsd-_setjmp.S uClibc-git/libc/sysdeps/linux/arc/bsd-_setjmp.S
  50484. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/bsd-_setjmp.S 1970-01-01 01:00:00.000000000 +0100
  50485. +++ uClibc-git/libc/sysdeps/linux/arc/bsd-_setjmp.S 2014-07-25 20:36:06.549333339 +0200
  50486. @@ -0,0 +1,20 @@
  50487. +/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. ARC version.
  50488. + *
  50489. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50490. + *
  50491. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50492. + */
  50493. +
  50494. +/* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
  50495. + We cannot do it in C because it must be a tail-call, so frame-unwinding
  50496. + in setjmp doesn't clobber the state restored by longjmp. */
  50497. +
  50498. +#include <sysdep.h>
  50499. +
  50500. +;@ r0 = jump buffer into which regs will be saved
  50501. +
  50502. +ENTRY(_setjmp)
  50503. + b.d __sigsetjmp
  50504. + mov r1, 0 ; don't save signals
  50505. +END(_setjmp)
  50506. +libc_hidden_def(_setjmp)
  50507. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/cacheflush.c uClibc-git/libc/sysdeps/linux/arc/cacheflush.c
  50508. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/cacheflush.c 1970-01-01 01:00:00.000000000 +0100
  50509. +++ uClibc-git/libc/sysdeps/linux/arc/cacheflush.c 2014-07-25 20:36:06.549333339 +0200
  50510. @@ -0,0 +1,11 @@
  50511. +/* cacheflush syscall for ARC
  50512. + *
  50513. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50514. + *
  50515. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50516. + */
  50517. +
  50518. +#include <sys/syscall.h>
  50519. +#include <sys/cachectl.h>
  50520. +
  50521. +_syscall3(int, cacheflush, void *, addr, int, nbytes, int, op)
  50522. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/clone.S uClibc-git/libc/sysdeps/linux/arc/clone.S
  50523. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/clone.S 1970-01-01 01:00:00.000000000 +0100
  50524. +++ uClibc-git/libc/sysdeps/linux/arc/clone.S 2014-07-25 20:36:06.549333339 +0200
  50525. @@ -0,0 +1,71 @@
  50526. +/*
  50527. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50528. + *
  50529. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50530. + */
  50531. +
  50532. +#include <asm/errno.h>
  50533. +#include <sys/syscall.h>
  50534. +#include <sysdep.h>
  50535. +
  50536. +; Per man, libc clone( ) is as follows
  50537. +;
  50538. +; int clone(int (*fn)(void *), void *child_stack,
  50539. +; int flags, void *arg, ...
  50540. +; /* pid_t *ptid, struct user_desc *tls, pid_t *ctid */);
  50541. +;
  50542. +; NOTE: I'm assuming that the last 3 args are NOT var-args and in case all
  50543. +; 3 are not relevant, caller will nevertheless pass those as NULL.
  50544. +; Current (Jul 2012) upstream powerpc/clone.S assumes similarly.
  50545. +; Our LTP (from 2007) doesn't seem to have tests to prove otherwise
  50546. +
  50547. +; clone syscall in kernel
  50548. +;
  50549. +; int sys_clone(unsigned long clone_flags, unsigned long newsp,
  50550. +; int __user *parent_tidptr, void *tls,
  50551. +; int __user *child_tidptr)
  50552. +
  50553. +
  50554. +ENTRY(clone)
  50555. + cmp r0, 0 ; @fn can't be NULL
  50556. + cmp.ne r1, 0 ; @child_stack can't be NULL
  50557. + bz .L__sys_err
  50558. +
  50559. + ; @fn and @args needed after the syscall for child
  50560. + ; However r3 containing @arg will be clobbered BEFORE syscall
  50561. + ; r0 containg @fn will be clobbered AFTER syscall (with ret val)
  50562. + mov r10, r0
  50563. + mov r11, r3
  50564. +
  50565. + ; adjust libc args for syscall
  50566. + mov r0, r2 ; libc @flags is 1st syscall arg
  50567. + mov r2, r4 ; libc @ptid
  50568. + mov r3, r5 ; libc @tls
  50569. + mov r4, r6 ; libc @ctid
  50570. + mov r8, __NR_clone
  50571. + ARC_TRAP_INSN
  50572. +
  50573. + cmp r0, 0 ; return code : 0 new process, !0 parent
  50574. + blt .L__sys_err2 ; < 0 (signed) error
  50575. + jnz [blink] ; Parent returns
  50576. +
  50577. + ; child jumps off to @fn with @arg as argument, and returns here
  50578. + jl.d [r10]
  50579. + mov r0, r11
  50580. +
  50581. + ; falls thru to _exit() with result from @fn (already in r0)
  50582. + b HIDDEN_JUMPTARGET(_exit)
  50583. +
  50584. +.L__sys_err:
  50585. + mov r0, -EINVAL
  50586. +.L__sys_err2:
  50587. + ; (1) No need to make -ve kernel error code as positive errno
  50588. + ; __syscall_error expects the -ve error code returned by kernel
  50589. + ; (2) r0 still had orig -ve kernel error code
  50590. + ; (3) Tail call to __syscall_error so we dont have to come back
  50591. + ; here hence instead of jmp-n-link (reg push/pop) we do jmp
  50592. + ; (4) No need to route __syscall_error via PLT, B is inherently
  50593. + ; position independent
  50594. + b __syscall_error
  50595. +END(clone)
  50596. +libc_hidden_def(clone)
  50597. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/crt1.S uClibc-git/libc/sysdeps/linux/arc/crt1.S
  50598. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/crt1.S 1970-01-01 01:00:00.000000000 +0100
  50599. +++ uClibc-git/libc/sysdeps/linux/arc/crt1.S 2014-07-25 20:36:06.549333339 +0200
  50600. @@ -0,0 +1,57 @@
  50601. +/*
  50602. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50603. + *
  50604. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50605. + */
  50606. +
  50607. +#include <features.h>
  50608. +
  50609. +.text
  50610. +
  50611. +#ifndef __UCLIBC_CTOR_DTOR__
  50612. + .weak _init
  50613. + .weak _fini
  50614. +#endif
  50615. +
  50616. +/* Stick in a dummy reference to main(), so that if an application
  50617. + * is linking when the main() function is in a static library (.a)
  50618. + * we can be sure that main() actually gets linked in
  50619. + */
  50620. + .type main,@function
  50621. + .type _main,@function
  50622. +
  50623. +
  50624. +/* When we enter this piece of code, the program stack looks like this:
  50625. + argc argument counter (integer)
  50626. + argv[0] program name (pointer)
  50627. + argv[1...N] program args (pointers)
  50628. + argv[argc-1] end of args (integer)
  50629. + NULL
  50630. + env[0...N] environment variables (pointers)
  50631. + NULL
  50632. +*/
  50633. + .text
  50634. + .align 4
  50635. + .global __start
  50636. + .hidden __start
  50637. + .type __start,@function
  50638. +__start:
  50639. + mov fp, 0
  50640. + ld_s r1, [sp] ; argc
  50641. +
  50642. + mov_s r5, r0 ; rltd_fini
  50643. + add_s r2, sp, 4 ; argv
  50644. +
  50645. + mov_s r0, main
  50646. + mov_s r3, _init
  50647. + mov r4, _fini
  50648. +
  50649. + and sp, sp, -8
  50650. + mov r6, sp
  50651. +
  50652. + /* __uClibc_main (main, argc, argv, init, fini, rtld_fini, stack_end) */
  50653. + bl __uClibc_main
  50654. +
  50655. + /* Should never get here.... */
  50656. + flag 1
  50657. +.size __start,.-__start
  50658. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/crti.S uClibc-git/libc/sysdeps/linux/arc/crti.S
  50659. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/crti.S 1970-01-01 01:00:00.000000000 +0100
  50660. +++ uClibc-git/libc/sysdeps/linux/arc/crti.S 2014-07-25 20:36:06.549333339 +0200
  50661. @@ -0,0 +1,27 @@
  50662. +/*
  50663. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50664. + *
  50665. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50666. + */
  50667. +
  50668. +___gnu_compiled_c:
  50669. +
  50670. + .section .init
  50671. + .align 4
  50672. + .global _init
  50673. + .type _init,@function
  50674. +_init:
  50675. + st.a blink,[sp,-4]
  50676. + st.a fp,[sp,-4]
  50677. + mov fp,sp
  50678. +
  50679. +
  50680. + .section .fini
  50681. + .align 4
  50682. + .global _fini
  50683. + .type _fini,@function
  50684. +_fini:
  50685. + st.a blink,[sp,-4]
  50686. + st.a fp,[sp,-4]
  50687. + mov fp,sp
  50688. + .align 4
  50689. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/crtn.S uClibc-git/libc/sysdeps/linux/arc/crtn.S
  50690. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/crtn.S 1970-01-01 01:00:00.000000000 +0100
  50691. +++ uClibc-git/libc/sysdeps/linux/arc/crtn.S 2014-07-25 20:36:06.549333339 +0200
  50692. @@ -0,0 +1,29 @@
  50693. +/*
  50694. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50695. + *
  50696. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50697. + */
  50698. +
  50699. +___gnu_compiled_c:
  50700. +
  50701. + .section .init
  50702. + .align 4
  50703. + .global _init
  50704. + .type _init,@function
  50705. + ; EPILOGUE
  50706. + ld.ab fp,[sp,4]
  50707. + ld blink,[sp,0]
  50708. + j.d [blink]
  50709. + add sp,sp,4
  50710. +; .size _init,.-_init
  50711. +
  50712. + .section .fini
  50713. + .align 4
  50714. + .global _fini
  50715. + .type _fini,@function
  50716. + ; EPILOGUE
  50717. + ld.ab fp,[sp,4]
  50718. + ld blink,[sp,0]
  50719. + j.d [blink]
  50720. + add sp,sp,4
  50721. +; .size _fini,.-_fini
  50722. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/jmpbuf-offsets.h uClibc-git/libc/sysdeps/linux/arc/jmpbuf-offsets.h
  50723. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
  50724. +++ uClibc-git/libc/sysdeps/linux/arc/jmpbuf-offsets.h 2014-07-25 20:36:06.549333339 +0200
  50725. @@ -0,0 +1,7 @@
  50726. +/*
  50727. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50728. + *
  50729. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50730. + */
  50731. +
  50732. +#define __JMP_BUF_SP (13+1)
  50733. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/arc/jmpbuf-unwind.h
  50734. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  50735. +++ uClibc-git/libc/sysdeps/linux/arc/jmpbuf-unwind.h 2014-07-25 20:36:06.549333339 +0200
  50736. @@ -0,0 +1,13 @@
  50737. +/*
  50738. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50739. + *
  50740. + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50741. + */
  50742. +
  50743. +#include <setjmp.h>
  50744. +#include <jmpbuf-offsets.h>
  50745. +
  50746. +/* Test if longjmp to JMPBUF would unwind the frame
  50747. + containing a local variable at ADDRESS. */
  50748. +#define _JMPBUF_UNWINDS(jmpbuf, address) \
  50749. + ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
  50750. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/__longjmp.S uClibc-git/libc/sysdeps/linux/arc/__longjmp.S
  50751. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/__longjmp.S 1970-01-01 01:00:00.000000000 +0100
  50752. +++ uClibc-git/libc/sysdeps/linux/arc/__longjmp.S 2014-07-25 20:36:06.533333255 +0200
  50753. @@ -0,0 +1,38 @@
  50754. +/*
  50755. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50756. + *
  50757. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50758. + */
  50759. +
  50760. +#include <sysdep.h>
  50761. +
  50762. +;@ r0 = jump buffer from which regs will be restored
  50763. +;@ r1 = value that setjmp( ) will return due to this longjmp
  50764. +
  50765. +ENTRY(__longjmp)
  50766. +
  50767. + ld_s r13, [r0]
  50768. + ld_s r14, [r0,4]
  50769. + ld r15, [r0,8]
  50770. + ld r16, [r0,12]
  50771. + ld r17, [r0,16]
  50772. + ld r18, [r0,20]
  50773. + ld r19, [r0,24]
  50774. + ld r20, [r0,28]
  50775. + ld r21, [r0,32]
  50776. + ld r22, [r0,36]
  50777. + ld r23, [r0,40]
  50778. + ld r24, [r0,44]
  50779. + ld r25, [r0,48]
  50780. +
  50781. + ld blink, [r0,60] ; load it early enough to not stall the pipeline
  50782. + ld fp, [r0,52]
  50783. + ld sp, [r0,56]
  50784. +
  50785. + mov.f r0, r1 ; get the setjmp return value(due to longjmp) in place
  50786. +
  50787. + j.d [blink] ; to caller of setjmp location, right after the call
  50788. + mov.z r0, 1 ; can't let setjmp return 0 when it is due to longjmp
  50789. +
  50790. +END(__longjmp)
  50791. +libc_hidden_def(__longjmp)
  50792. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/Makefile uClibc-git/libc/sysdeps/linux/arc/Makefile
  50793. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/Makefile 1970-01-01 01:00:00.000000000 +0100
  50794. +++ uClibc-git/libc/sysdeps/linux/arc/Makefile 2014-07-25 20:36:06.533333255 +0200
  50795. @@ -0,0 +1,13 @@
  50796. +# Makefile for uClibc
  50797. +#
  50798. +# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
  50799. +#
  50800. +# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50801. +#
  50802. +
  50803. +top_srcdir=../../../../
  50804. +top_builddir=../../../../
  50805. +all: objs
  50806. +include $(top_builddir)Rules.mak
  50807. +include Makefile.arch
  50808. +include $(top_srcdir)Makerules
  50809. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/Makefile.arch uClibc-git/libc/sysdeps/linux/arc/Makefile.arch
  50810. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/Makefile.arch 1970-01-01 01:00:00.000000000 +0100
  50811. +++ uClibc-git/libc/sysdeps/linux/arc/Makefile.arch 2014-07-25 20:36:06.533333255 +0200
  50812. @@ -0,0 +1,11 @@
  50813. +# Makefile for uClibc
  50814. +#
  50815. +# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
  50816. +#
  50817. +# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50818. +#
  50819. +
  50820. +CSRC-y := syscall.c sigaction.c __syscall_error.c cacheflush.c
  50821. +
  50822. +SSRC-y := sigrestorer.S __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \
  50823. + vfork.S clone.S
  50824. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/setjmp.S uClibc-git/libc/sysdeps/linux/arc/setjmp.S
  50825. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/setjmp.S 1970-01-01 01:00:00.000000000 +0100
  50826. +++ uClibc-git/libc/sysdeps/linux/arc/setjmp.S 2014-07-25 20:36:06.549333339 +0200
  50827. @@ -0,0 +1,39 @@
  50828. +/*
  50829. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50830. + *
  50831. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50832. + */
  50833. +
  50834. +#include <sysdep.h>
  50835. +
  50836. +;@ r0 = jump buffer into which regs will be saved
  50837. +;@ r1 = do we need to save signals
  50838. +
  50839. +ENTRY(__sigsetjmp)
  50840. +
  50841. + st_s r13, [r0]
  50842. + st_s r14, [r0,4]
  50843. + st r15, [r0,8]
  50844. + st r16, [r0,12]
  50845. + st r17, [r0,16]
  50846. + st r18, [r0,20]
  50847. + st r19, [r0,24]
  50848. + st r20, [r0,28]
  50849. + st r21, [r0,32]
  50850. + st r22, [r0,36]
  50851. + st r23, [r0,40]
  50852. + st r24, [r0,44]
  50853. + st r25, [r0,48]
  50854. + st fp, [r0,52]
  50855. + st sp, [r0,56]
  50856. +
  50857. + ; make a note of where longjmp will return to.
  50858. + ; that will be right next to this setjmp call-site which will be
  50859. + ; contained in blink, since "C" caller of this routine will do
  50860. + ; a branch-n-link
  50861. +
  50862. + st blink, [r0,60]
  50863. + b __sigjmp_save
  50864. +
  50865. +END(__sigsetjmp)
  50866. +libc_hidden_def(__sigsetjmp)
  50867. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/sigaction.c uClibc-git/libc/sysdeps/linux/arc/sigaction.c
  50868. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/sigaction.c 1970-01-01 01:00:00.000000000 +0100
  50869. +++ uClibc-git/libc/sysdeps/linux/arc/sigaction.c 2014-07-25 20:36:06.549333339 +0200
  50870. @@ -0,0 +1,52 @@
  50871. +/*
  50872. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50873. + *
  50874. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50875. + */
  50876. +
  50877. +#include <errno.h>
  50878. +#include <signal.h>
  50879. +#include <string.h>
  50880. +#include <sys/syscall.h>
  50881. +#include <bits/kernel_sigaction.h>
  50882. +
  50883. +extern void __default_rt_sa_restorer(void);
  50884. +//libc_hidden_proto(__default_rt_sa_restorer);
  50885. +
  50886. +#define SA_RESTORER 0x04000000
  50887. +
  50888. +/* If @act is not NULL, change the action for @sig to @act.
  50889. + If @oact is not NULL, put the old action for @sig in @oact. */
  50890. +int
  50891. +__libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
  50892. +{
  50893. + struct sigaction kact;
  50894. +
  50895. + /* !act means caller only wants to know @oact
  50896. + * Hence only otherwise, do SA_RESTORER stuff
  50897. + *
  50898. + * For the normal/default cases (user not providing SA_RESTORER) use
  50899. + * a real sigreturn stub to avoid kernel synthesizing one on user stack
  50900. + * at runtime, which needs PTE permissions update (hence TLB entry
  50901. + * update) and costly cache line flushes for code modification
  50902. + */
  50903. + if (act && !(act->sa_flags & SA_RESTORER)) {
  50904. + memcpy(&kact, act, sizeof(kact));
  50905. + kact.sa_restorer = __default_rt_sa_restorer;
  50906. + kact.sa_flags |= SA_RESTORER;
  50907. +
  50908. + act = &kact;
  50909. + }
  50910. +
  50911. + return __syscall_rt_sigaction(sig, act, oact, sizeof(act->sa_mask));
  50912. +}
  50913. +
  50914. +#ifndef LIBC_SIGACTION
  50915. +# ifndef __UCLIBC_HAS_THREADS__
  50916. +strong_alias(__libc_sigaction,sigaction)
  50917. +libc_hidden_def(sigaction)
  50918. +# else
  50919. +weak_alias(__libc_sigaction,sigaction)
  50920. +libc_hidden_weak(sigaction)
  50921. +# endif
  50922. +#endif
  50923. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/sigrestorer.S uClibc-git/libc/sysdeps/linux/arc/sigrestorer.S
  50924. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/sigrestorer.S 1970-01-01 01:00:00.000000000 +0100
  50925. +++ uClibc-git/libc/sysdeps/linux/arc/sigrestorer.S 2014-07-25 20:36:06.549333339 +0200
  50926. @@ -0,0 +1,21 @@
  50927. +/*
  50928. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50929. + *
  50930. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50931. + */
  50932. +
  50933. +#include <sysdep.h>
  50934. +#include <sys/syscall.h>
  50935. +
  50936. +/*
  50937. + * Provide a real sigreturn stub to avoid kernel synthesizing one
  50938. + * on user stack at runtime, which needs PTE permissions update
  50939. + * (hence TLB entry update) and costly cache line flushes for
  50940. + * code modification
  50941. + */
  50942. +
  50943. +ENTRY(__default_rt_sa_restorer)
  50944. + mov r8, __NR_rt_sigreturn
  50945. + ARC_TRAP_INSN
  50946. +END(__default_rt_sa_restorer)
  50947. +libc_hidden_def(__default_rt_sa_restorer)
  50948. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/sys/cachectl.h uClibc-git/libc/sysdeps/linux/arc/sys/cachectl.h
  50949. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/sys/cachectl.h 1970-01-01 01:00:00.000000000 +0100
  50950. +++ uClibc-git/libc/sysdeps/linux/arc/sys/cachectl.h 2014-07-25 20:36:06.565333423 +0200
  50951. @@ -0,0 +1,21 @@
  50952. +/*
  50953. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50954. + *
  50955. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50956. + */
  50957. +
  50958. +#ifndef _SYS_CACHECTL_H
  50959. +#define _SYS_CACHECTL_H 1
  50960. +
  50961. +/*
  50962. + * Get the kernel definition for the flag bits
  50963. + */
  50964. +#include <asm/cachectl.h>
  50965. +
  50966. +__BEGIN_DECLS
  50967. +
  50968. +extern int cacheflush(void *addr, int nbytes, int flags);
  50969. +
  50970. +__END_DECLS
  50971. +
  50972. +#endif /* sys/cachectl.h */
  50973. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/sys/procfs.h uClibc-git/libc/sysdeps/linux/arc/sys/procfs.h
  50974. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/sys/procfs.h 1970-01-01 01:00:00.000000000 +0100
  50975. +++ uClibc-git/libc/sysdeps/linux/arc/sys/procfs.h 2014-07-25 20:36:06.565333423 +0200
  50976. @@ -0,0 +1,109 @@
  50977. +/*
  50978. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  50979. + *
  50980. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  50981. + */
  50982. +
  50983. +#ifndef _SYS_PROCFS_H
  50984. +#define _SYS_PROCFS_H 1
  50985. +
  50986. +/* This is somewhat modelled after the file of the same name on SVR4
  50987. + systems. It provides a definition of the core file format for ELF
  50988. + used on Linux. It doesn't have anything to do with the /proc file
  50989. + system, even though Linux has one.
  50990. +
  50991. + Anyway, the whole purpose of this file is for GDB and GDB only.
  50992. + Don't read too much into it. Don't use it for anything other than
  50993. + GDB unless you know what you are doing. */
  50994. +
  50995. +#include <features.h>
  50996. +#include <sys/time.h>
  50997. +#include <sys/types.h>
  50998. +#include <sys/user.h>
  50999. +
  51000. +__BEGIN_DECLS
  51001. +
  51002. +/* Type for a general-purpose register. */
  51003. +typedef unsigned long elf_greg_t;
  51004. +
  51005. +/* And the whole bunch of them. We could have used `struct
  51006. + user_regs' directly in the typedef, but tradition says that
  51007. + the register set is an array, which does have some peculiar
  51008. + semantics, so leave it that way. */
  51009. +#define ELF_NGREG 40
  51010. +typedef elf_greg_t elf_gregset_t[ELF_NGREG];
  51011. +typedef struct { } elf_fpregset_t;
  51012. +
  51013. +/* Signal info. */
  51014. +struct elf_siginfo
  51015. + {
  51016. + int si_signo; /* Signal number. */
  51017. + int si_code; /* Extra code. */
  51018. + int si_errno; /* Errno. */
  51019. + };
  51020. +
  51021. +/* Definitions to generate Intel SVR4-like core files. These mostly
  51022. + have the same names as the SVR4 types with "elf_" tacked on the
  51023. + front to prevent clashes with Linux definitions, and the typedef
  51024. + forms have been avoided. This is mostly like the SVR4 structure,
  51025. + but more Linuxy, with things that Linux does not support and which
  51026. + GDB doesn't really use excluded. */
  51027. +
  51028. +struct elf_prstatus
  51029. + {
  51030. + struct elf_siginfo pr_info; /* Info associated with signal. */
  51031. + short int pr_cursig; /* Current signal. */
  51032. + unsigned long int pr_sigpend; /* Set of pending signals. */
  51033. + unsigned long int pr_sighold; /* Set of held signals. */
  51034. + __pid_t pr_pid;
  51035. + __pid_t pr_ppid;
  51036. + __pid_t pr_pgrp;
  51037. + __pid_t pr_sid;
  51038. + struct timeval pr_utime; /* User time. */
  51039. + struct timeval pr_stime; /* System time. */
  51040. + struct timeval pr_cutime; /* Cumulative user time. */
  51041. + struct timeval pr_cstime; /* Cumulative system time. */
  51042. + elf_gregset_t pr_reg; /* GP registers. */
  51043. + int pr_fpvalid; /* True if math copro being used. */
  51044. + };
  51045. +
  51046. +
  51047. +#define ELF_PRARGSZ (80) /* Number of chars for args. */
  51048. +
  51049. +struct elf_prpsinfo
  51050. + {
  51051. + char pr_state; /* Numeric process state. */
  51052. + char pr_sname; /* Char for pr_state. */
  51053. + char pr_zomb; /* Zombie. */
  51054. + char pr_nice; /* Nice val. */
  51055. + unsigned long int pr_flag; /* Flags. */
  51056. + unsigned short int pr_uid;
  51057. + unsigned short int pr_gid;
  51058. + int pr_pid, pr_ppid, pr_pgrp, pr_sid;
  51059. + /* Lots missing */
  51060. + char pr_fname[16]; /* Filename of executable. */
  51061. + char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
  51062. + };
  51063. +
  51064. +/* The rest of this file provides the types for emulation of the
  51065. + Solaris <proc_service.h> interfaces that should be implemented by
  51066. + users of libthread_db. */
  51067. +
  51068. +/* Addresses. */
  51069. +typedef void *psaddr_t;
  51070. +
  51071. +/* Register sets. Linux has different names. */
  51072. +typedef elf_gregset_t prgregset_t;
  51073. +typedef elf_fpregset_t prfpregset_t;
  51074. +
  51075. +/* We don't have any differences between processes and threads,
  51076. + therefore have only one PID type. */
  51077. +typedef __pid_t lwpid_t;
  51078. +
  51079. +/* Process status and info. In the end we do provide typedefs for them. */
  51080. +typedef struct elf_prstatus prstatus_t;
  51081. +typedef struct elf_prpsinfo prpsinfo_t;
  51082. +
  51083. +__END_DECLS
  51084. +
  51085. +#endif /* sys/procfs.h */
  51086. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/sys/ucontext.h uClibc-git/libc/sysdeps/linux/arc/sys/ucontext.h
  51087. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/sys/ucontext.h 1970-01-01 01:00:00.000000000 +0100
  51088. +++ uClibc-git/libc/sysdeps/linux/arc/sys/ucontext.h 2014-07-25 20:36:06.565333423 +0200
  51089. @@ -0,0 +1,22 @@
  51090. +/*
  51091. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  51092. + *
  51093. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  51094. + */
  51095. +
  51096. +#ifndef _SYS_UCONTEXT_H
  51097. +#define _SYS_UCONTEXT_H 1
  51098. +
  51099. +#include <features.h>
  51100. +#include <signal.h>
  51101. +#include <bits/sigcontext.h>
  51102. +
  51103. +typedef struct ucontext {
  51104. + unsigned long uc_flags;
  51105. + struct ucontext *uc_link;
  51106. + stack_t uc_stack;
  51107. + struct sigcontext uc_mcontext;
  51108. + sigset_t uc_sigmask; /* mask last for extensibility */
  51109. +} ucontext_t;
  51110. +
  51111. +#endif /* sys/ucontext.h */
  51112. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/sys/user.h uClibc-git/libc/sysdeps/linux/arc/sys/user.h
  51113. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/sys/user.h 1970-01-01 01:00:00.000000000 +0100
  51114. +++ uClibc-git/libc/sysdeps/linux/arc/sys/user.h 2014-07-25 20:36:06.565333423 +0200
  51115. @@ -0,0 +1,23 @@
  51116. +/*
  51117. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  51118. + *
  51119. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  51120. + */
  51121. +
  51122. +#ifndef _SYS_USER_H
  51123. +#define _SYS_USER_H 1
  51124. +
  51125. +/* The whole purpose of this file is for GDB and GDB only. Don't read
  51126. + too much into it. Don't use it for anything other than GDB unless
  51127. + you know what you are doing. */
  51128. +
  51129. +
  51130. +/* Actually apps like strace also expect a struct user, so it's better to
  51131. + * have a dummy implementation
  51132. + */
  51133. +
  51134. +struct user {
  51135. + int dummy;
  51136. +};
  51137. +
  51138. +#endif /* sys/user.h */
  51139. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/syscall.c uClibc-git/libc/sysdeps/linux/arc/syscall.c
  51140. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/syscall.c 1970-01-01 01:00:00.000000000 +0100
  51141. +++ uClibc-git/libc/sysdeps/linux/arc/syscall.c 2014-07-25 20:36:06.565333423 +0200
  51142. @@ -0,0 +1,17 @@
  51143. +/*
  51144. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  51145. + *
  51146. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  51147. + */
  51148. +
  51149. +#include <features.h>
  51150. +#include <errno.h>
  51151. +#include <sys/types.h>
  51152. +#include <sys/syscall.h>
  51153. +
  51154. +extern long syscall(long int sysnum, long a, long b, long c, long d, long e, long f);
  51155. +
  51156. +long syscall(long int sysnum, long a, long b, long c, long d, long e, long f)
  51157. +{
  51158. + return INLINE_SYSCALL_NCS(sysnum, 6, a, b, c, d, e, f);
  51159. +}
  51160. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/__syscall_error.c uClibc-git/libc/sysdeps/linux/arc/__syscall_error.c
  51161. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/__syscall_error.c 1970-01-01 01:00:00.000000000 +0100
  51162. +++ uClibc-git/libc/sysdeps/linux/arc/__syscall_error.c 2014-07-25 20:36:06.533333255 +0200
  51163. @@ -0,0 +1,15 @@
  51164. +/* Wrapper for setting errno.
  51165. + *
  51166. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  51167. + *
  51168. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  51169. + */
  51170. +
  51171. +#include <errno.h>
  51172. +#include <sys/syscall.h>
  51173. +
  51174. +int __syscall_error(int err_no)
  51175. +{
  51176. + __set_errno(-err_no);
  51177. + return -1;
  51178. +}
  51179. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/sysdep.h uClibc-git/libc/sysdeps/linux/arc/sysdep.h
  51180. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/sysdep.h 1970-01-01 01:00:00.000000000 +0100
  51181. +++ uClibc-git/libc/sysdeps/linux/arc/sysdep.h 2014-07-25 20:36:06.565333423 +0200
  51182. @@ -0,0 +1,22 @@
  51183. +#ifndef _LINUX_ARC_SYSDEP_H
  51184. +#define _LINUX_ARC_SYSDEP_H 1
  51185. +
  51186. +#include <features.h>
  51187. +#include <libc-internal.h>
  51188. +
  51189. +#ifdef __ASSEMBLER__
  51190. +
  51191. +#define ENTRY(nm) \
  51192. + .text ` \
  51193. + .align 4 ` \
  51194. + .globl nm ` \
  51195. + .type nm,@function ` \
  51196. +nm:
  51197. +
  51198. +#define END(name) .size name,.-name
  51199. +
  51200. +#endif /* __ASSEMBLER __*/
  51201. +
  51202. +#include <common/sysdep.h>
  51203. +
  51204. +#endif
  51205. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/vfork.S uClibc-git/libc/sysdeps/linux/arc/vfork.S
  51206. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/vfork.S 1970-01-01 01:00:00.000000000 +0100
  51207. +++ uClibc-git/libc/sysdeps/linux/arc/vfork.S 2014-07-25 20:36:06.565333423 +0200
  51208. @@ -0,0 +1,31 @@
  51209. +/*
  51210. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  51211. + *
  51212. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  51213. + */
  51214. +
  51215. +#include <sys/syscall.h>
  51216. +#include <sysdep.h>
  51217. +
  51218. +/* No legacy syscall ABI means NR_vfork is not available at all, use clone */
  51219. +#define _SIGNAL_H
  51220. +#include <bits/signum.h> /* For SIGCHLD */
  51221. +
  51222. +#define CLONE_VM 0x00000100
  51223. +#define CLONE_VFORK 0x00004000
  51224. +#define CLONE_FLAGS_FOR_VFORK (CLONE_VM|CLONE_VFORK|SIGCHLD)
  51225. +
  51226. +ENTRY(__vfork)
  51227. + mov r0, CLONE_FLAGS_FOR_VFORK
  51228. + mov_s r1, sp
  51229. + mov r8, __NR_clone
  51230. + ARC_TRAP_INSN
  51231. +
  51232. + cmp r0, 0
  51233. + jge [blink] ; pid >=0 return, else detour via tailcall to errno
  51234. +
  51235. + b __syscall_error
  51236. +END(__vfork)
  51237. +
  51238. +weak_alias(__vfork,vfork)
  51239. +libc_hidden_def(vfork)
  51240. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arc/xstatconv.c uClibc-git/libc/sysdeps/linux/arc/xstatconv.c
  51241. --- uClibc-0.9.33.2/libc/sysdeps/linux/arc/xstatconv.c 1970-01-01 01:00:00.000000000 +0100
  51242. +++ uClibc-git/libc/sysdeps/linux/arc/xstatconv.c 2014-07-25 20:36:06.565333423 +0200
  51243. @@ -0,0 +1 @@
  51244. +/* We don't need any of this. */
  51245. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_assert.c uClibc-git/libc/sysdeps/linux/arm/aeabi_assert.c
  51246. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_assert.c 2012-05-15 09:20:09.000000000 +0200
  51247. +++ uClibc-git/libc/sysdeps/linux/arm/aeabi_assert.c 2014-07-25 20:36:06.577333486 +0200
  51248. @@ -12,16 +12,15 @@
  51249. Lesser General Public License for more details.
  51250. You should have received a copy of the GNU Lesser General Public
  51251. - License along with the GNU C Library; if not, write to the Free
  51252. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51253. - 02111-1307 USA. */
  51254. + License along with the GNU C Library; if not, see
  51255. + <http://www.gnu.org/licenses/>. */
  51256. #undef NDEBUG
  51257. #include <assert.h>
  51258. #include <stdlib.h>
  51259. -void __aeabi_assert(const char *assertion, const char *file, unsigned int line);
  51260. +void __aeabi_assert(const char *assertion, const char *file, unsigned int line) attribute_noreturn;
  51261. void __aeabi_assert(const char *assertion, const char *file, unsigned int line)
  51262. {
  51263. __assert (assertion, file, line, NULL);
  51264. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_atexit.c uClibc-git/libc/sysdeps/linux/arm/aeabi_atexit.c
  51265. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_atexit.c 2012-05-15 09:20:09.000000000 +0200
  51266. +++ uClibc-git/libc/sysdeps/linux/arm/aeabi_atexit.c 2014-07-25 20:36:06.577333486 +0200
  51267. @@ -12,9 +12,8 @@
  51268. Lesser General Public License for more details.
  51269. You should have received a copy of the GNU Lesser General Public
  51270. - License along with the GNU C Library; if not, write to the Free
  51271. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51272. - 02111-1307 USA. */
  51273. + License along with the GNU C Library; if not, see
  51274. + <http://www.gnu.org/licenses/>. */
  51275. #include <stdlib.h>
  51276. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_errno_addr.c uClibc-git/libc/sysdeps/linux/arm/aeabi_errno_addr.c
  51277. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_errno_addr.c 2012-05-15 09:20:09.000000000 +0200
  51278. +++ uClibc-git/libc/sysdeps/linux/arm/aeabi_errno_addr.c 2014-07-25 20:36:06.577333486 +0200
  51279. @@ -12,9 +12,8 @@
  51280. Lesser General Public License for more details.
  51281. You should have received a copy of the GNU Lesser General Public
  51282. - License along with the GNU C Library; if not, write to the Free
  51283. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51284. - 02111-1307 USA. */
  51285. + License along with the GNU C Library; if not, see
  51286. + <http://www.gnu.org/licenses/>. */
  51287. #include <errno.h>
  51288. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_lcsts.c uClibc-git/libc/sysdeps/linux/arm/aeabi_lcsts.c
  51289. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_lcsts.c 2012-05-15 09:20:09.000000000 +0200
  51290. +++ uClibc-git/libc/sysdeps/linux/arm/aeabi_lcsts.c 2014-07-25 20:36:06.577333486 +0200
  51291. @@ -30,9 +30,8 @@
  51292. Lesser General Public License for more details.
  51293. You should have received a copy of the GNU Lesser General Public
  51294. - License along with the GNU C Library; if not, write to the Free
  51295. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51296. - 02111-1307 USA. */
  51297. + License along with the GNU C Library; if not, see
  51298. + <http://www.gnu.org/licenses/>. */
  51299. /* The ARM EABI requires that we provide ISO compile-time constants as
  51300. link-time constants. Some portable applications may reference these. */
  51301. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_localeconv.c uClibc-git/libc/sysdeps/linux/arm/aeabi_localeconv.c
  51302. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_localeconv.c 2012-05-15 09:20:09.000000000 +0200
  51303. +++ uClibc-git/libc/sysdeps/linux/arm/aeabi_localeconv.c 2014-07-25 20:36:06.577333486 +0200
  51304. @@ -12,9 +12,8 @@
  51305. Lesser General Public License for more details.
  51306. You should have received a copy of the GNU Lesser General Public
  51307. - License along with the GNU C Library; if not, write to the Free
  51308. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51309. - 02111-1307 USA. */
  51310. + License along with the GNU C Library; if not, see
  51311. + <http://www.gnu.org/licenses/>. */
  51312. #include <locale.h>
  51313. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_math.c uClibc-git/libc/sysdeps/linux/arm/aeabi_math.c
  51314. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_math.c 2012-05-15 09:20:09.000000000 +0200
  51315. +++ uClibc-git/libc/sysdeps/linux/arm/aeabi_math.c 2014-07-25 20:36:06.577333486 +0200
  51316. @@ -29,9 +29,8 @@
  51317. Lesser General Public License for more details.
  51318. You should have received a copy of the GNU Lesser General Public
  51319. - License along with the GNU C Library; if not, write to the Free
  51320. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51321. - 02111-1307 USA. */
  51322. + License along with the GNU C Library; if not, see
  51323. + <http://www.gnu.org/licenses/>. */
  51324. #include <math.h>
  51325. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_mb_cur_max.c uClibc-git/libc/sysdeps/linux/arm/aeabi_mb_cur_max.c
  51326. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_mb_cur_max.c 2012-05-15 09:20:09.000000000 +0200
  51327. +++ uClibc-git/libc/sysdeps/linux/arm/aeabi_mb_cur_max.c 2014-07-25 20:36:06.577333486 +0200
  51328. @@ -12,16 +12,15 @@
  51329. Lesser General Public License for more details.
  51330. You should have received a copy of the GNU Lesser General Public
  51331. - License along with the GNU C Library; if not, write to the Free
  51332. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51333. - 02111-1307 USA. */
  51334. + License along with the GNU C Library; if not, see
  51335. + <http://www.gnu.org/licenses/>. */
  51336. #include <langinfo.h>
  51337. #include <locale.h>
  51338. #include <stdlib.h>
  51339. -int
  51340. -__aeabi_MB_CUR_MAX (void)
  51341. +int __aeabi_MB_CUR_MAX (void);
  51342. +int __aeabi_MB_CUR_MAX (void)
  51343. {
  51344. return MB_CUR_MAX;
  51345. }
  51346. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_memclr.c uClibc-git/libc/sysdeps/linux/arm/aeabi_memclr.c
  51347. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_memclr.c 2012-05-15 09:20:09.000000000 +0200
  51348. +++ uClibc-git/libc/sysdeps/linux/arm/aeabi_memclr.c 2014-07-25 20:36:06.577333486 +0200
  51349. @@ -12,9 +12,8 @@
  51350. Lesser General Public License for more details.
  51351. You should have received a copy of the GNU Lesser General Public
  51352. - License along with the GNU C Library; if not, write to the Free
  51353. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51354. - 02111-1307 USA. */
  51355. + License along with the GNU C Library; if not, see
  51356. + <http://www.gnu.org/licenses/>. */
  51357. #include <string.h>
  51358. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_memcpy.c uClibc-git/libc/sysdeps/linux/arm/aeabi_memcpy.c
  51359. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_memcpy.c 2012-05-15 09:20:09.000000000 +0200
  51360. +++ uClibc-git/libc/sysdeps/linux/arm/aeabi_memcpy.c 2014-07-25 20:36:06.577333486 +0200
  51361. @@ -12,9 +12,8 @@
  51362. Lesser General Public License for more details.
  51363. You should have received a copy of the GNU Lesser General Public
  51364. - License along with the GNU C Library; if not, write to the Free
  51365. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51366. - 02111-1307 USA. */
  51367. + License along with the GNU C Library; if not, see
  51368. + <http://www.gnu.org/licenses/>. */
  51369. #include <string.h>
  51370. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_memmove.c uClibc-git/libc/sysdeps/linux/arm/aeabi_memmove.c
  51371. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_memmove.c 2012-05-15 09:20:09.000000000 +0200
  51372. +++ uClibc-git/libc/sysdeps/linux/arm/aeabi_memmove.c 2014-07-25 20:36:06.577333486 +0200
  51373. @@ -12,9 +12,8 @@
  51374. Lesser General Public License for more details.
  51375. You should have received a copy of the GNU Lesser General Public
  51376. - License along with the GNU C Library; if not, write to the Free
  51377. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51378. - 02111-1307 USA. */
  51379. + License along with the GNU C Library; if not, see
  51380. + <http://www.gnu.org/licenses/>. */
  51381. #include <string.h>
  51382. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_memset.c uClibc-git/libc/sysdeps/linux/arm/aeabi_memset.c
  51383. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_memset.c 2012-05-15 09:20:09.000000000 +0200
  51384. +++ uClibc-git/libc/sysdeps/linux/arm/aeabi_memset.c 2014-07-25 20:36:06.577333486 +0200
  51385. @@ -12,9 +12,8 @@
  51386. Lesser General Public License for more details.
  51387. You should have received a copy of the GNU Lesser General Public
  51388. - License along with the GNU C Library; if not, write to the Free
  51389. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51390. - 02111-1307 USA. */
  51391. + License along with the GNU C Library; if not, see
  51392. + <http://www.gnu.org/licenses/>. */
  51393. #include <string.h>
  51394. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_sighandlers.S uClibc-git/libc/sysdeps/linux/arm/aeabi_sighandlers.S
  51395. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_sighandlers.S 2012-05-15 09:20:09.000000000 +0200
  51396. +++ uClibc-git/libc/sysdeps/linux/arm/aeabi_sighandlers.S 2014-07-25 20:36:06.577333486 +0200
  51397. @@ -30,9 +30,8 @@
  51398. Lesser General Public License for more details.
  51399. You should have received a copy of the GNU Lesser General Public
  51400. - License along with the GNU C Library; if not, write to the Free
  51401. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51402. - 02111-1307 USA. */
  51403. + License along with the GNU C Library; if not, see
  51404. + <http://www.gnu.org/licenses/>. */
  51405. /* The ARM EABI defines these as "functions". */
  51406. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_unwind_cpp_pr1.c uClibc-git/libc/sysdeps/linux/arm/aeabi_unwind_cpp_pr1.c
  51407. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/aeabi_unwind_cpp_pr1.c 2012-05-15 09:20:09.000000000 +0200
  51408. +++ uClibc-git/libc/sysdeps/linux/arm/aeabi_unwind_cpp_pr1.c 2014-07-25 20:36:06.577333486 +0200
  51409. @@ -12,9 +12,8 @@
  51410. Lesser General Public License for more details.
  51411. You should have received a copy of the GNU Lesser General Public
  51412. - License along with the GNU C Library; if not, write to the Free
  51413. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51414. - 02111-1307 USA. */
  51415. + License along with the GNU C Library; if not, see
  51416. + <http://www.gnu.org/licenses/>. */
  51417. /* Because some objects in ld.so and libc.so are built with
  51418. -fexceptions, we end up with references to this personality
  51419. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/arm_asm.h uClibc-git/libc/sysdeps/linux/arm/bits/arm_asm.h
  51420. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/arm_asm.h 2012-05-15 09:20:09.000000000 +0200
  51421. +++ uClibc-git/libc/sysdeps/linux/arm/bits/arm_asm.h 2014-07-25 20:36:06.593333569 +0200
  51422. @@ -3,8 +3,10 @@
  51423. #define _ARM_ASM_H
  51424. #ifdef __thumb2__
  51425. +# ifdef __ASSEMBLER__
  51426. .thumb
  51427. .syntax unified
  51428. +# endif /* __ASSEMBLER__ */
  51429. #define IT(t, cond) i##t cond
  51430. #else
  51431. /* XXX: This can be removed if/when we require an assembler that supports
  51432. @@ -24,12 +26,4 @@
  51433. #define THUMB1_ONLY 1
  51434. #endif
  51435. -#if defined(__USE_BX__)
  51436. -# if ( defined (__ARM_ARCH_2__) || defined (__ARM_ARCH_3__) \
  51437. - || defined (__ARM_ARCH_3M__) || defined (__ARM_ARCH_4__) \
  51438. - )
  51439. -# error Use of BX was requested, but is not available on the target processor.
  51440. -# endif /* ARCH level */
  51441. -#endif /* __USE_BX__ */
  51442. -
  51443. #endif /* _ARM_ASM_H */
  51444. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/arm_bx.h uClibc-git/libc/sysdeps/linux/arm/bits/arm_bx.h
  51445. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/arm_bx.h 1970-01-01 01:00:00.000000000 +0100
  51446. +++ uClibc-git/libc/sysdeps/linux/arm/bits/arm_bx.h 2014-07-25 20:36:06.593333569 +0200
  51447. @@ -0,0 +1,34 @@
  51448. +/* Copyright (C) 2013 Yann E. MORIN <yann.morin.1998@free.fr>
  51449. + *
  51450. + * This file is free software; you can redistribute it and/or modify
  51451. + * it under the terms of the GNU Lesser General Public License as
  51452. + * published by the Free Software Foundation; either version 2.1 of
  51453. + * the License, or (at your option) any later version.
  51454. + *
  51455. + * This file is distributed in the hope that it will be useful, but
  51456. + * WITHOUT ANY WARRANTY; without even the implied warranty of
  51457. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  51458. + * Lesser General Public License for more details.
  51459. + *
  51460. + * You should have received a copy of the GNU Lesser General Public
  51461. + * License along with the GNU C Library; if not, see
  51462. + * <http://www.gnu.org/licenses/>.
  51463. + */
  51464. +
  51465. +#ifndef _ARM_BX_H
  51466. +#define _ARM_BX_H
  51467. +
  51468. +/* We need features.h first */
  51469. +#if !defined _FEATURES_H
  51470. +#error Please include features.h first
  51471. +#endif /* features.h not yet included */
  51472. +
  51473. +#if defined(__USE_BX__)
  51474. +# if ( defined (__ARM_ARCH_2__) || defined (__ARM_ARCH_3__) \
  51475. + || defined (__ARM_ARCH_3M__) || defined (__ARM_ARCH_4__) \
  51476. + )
  51477. +# error Use of BX was requested, but is not available on the target processor.
  51478. +# endif /* ARCH level */
  51479. +#endif /* __USE_BX__ */
  51480. +
  51481. +#endif /* _ARM_BX_H */
  51482. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/armsigctx.h uClibc-git/libc/sysdeps/linux/arm/bits/armsigctx.h
  51483. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/armsigctx.h 2012-05-15 09:20:09.000000000 +0200
  51484. +++ uClibc-git/libc/sysdeps/linux/arm/bits/armsigctx.h 2014-07-25 20:36:06.593333569 +0200
  51485. @@ -13,9 +13,8 @@
  51486. Lesser General Public License for more details.
  51487. You should have received a copy of the GNU Lesser General Public
  51488. - License along with the GNU C Library; if not, write to the Free
  51489. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51490. - 02111-1307 USA. */
  51491. + License along with the GNU C Library; if not, see
  51492. + <http://www.gnu.org/licenses/>. */
  51493. /* The format of struct sigcontext changed between 2.0 and 2.1 kernels.
  51494. Fortunately 2.0 puts a magic number in the first word and this is not
  51495. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/atomic.h uClibc-git/libc/sysdeps/linux/arm/bits/atomic.h
  51496. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
  51497. +++ uClibc-git/libc/sysdeps/linux/arm/bits/atomic.h 2014-07-25 20:36:06.593333569 +0200
  51498. @@ -12,9 +12,8 @@
  51499. Lesser General Public License for more details.
  51500. You should have received a copy of the GNU Lesser General Public
  51501. - License along with the GNU C Library; if not, write to the Free
  51502. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51503. - 02111-1307 USA. */
  51504. + License along with the GNU C Library; if not, see
  51505. + <http://www.gnu.org/licenses/>. */
  51506. #if defined __thumb__ && !defined __thumb2__
  51507. #include_next <common/bits/atomic.h>
  51508. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/fcntl.h uClibc-git/libc/sysdeps/linux/arm/bits/fcntl.h
  51509. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  51510. +++ uClibc-git/libc/sysdeps/linux/arm/bits/fcntl.h 2014-07-25 20:36:06.593333569 +0200
  51511. @@ -14,9 +14,8 @@
  51512. Lesser General Public License for more details.
  51513. You should have received a copy of the GNU Lesser General Public
  51514. - License along with the GNU C Library; if not, write to the Free
  51515. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51516. - 02111-1307 USA. */
  51517. + License along with the GNU C Library; if not, see
  51518. + <http://www.gnu.org/licenses/>. */
  51519. #ifndef _FCNTL_H
  51520. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  51521. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/fenv.h uClibc-git/libc/sysdeps/linux/arm/bits/fenv.h
  51522. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
  51523. +++ uClibc-git/libc/sysdeps/linux/arm/bits/fenv.h 2014-07-25 20:36:06.593333569 +0200
  51524. @@ -12,9 +12,8 @@
  51525. Lesser General Public License for more details.
  51526. You should have received a copy of the GNU Lesser General Public
  51527. - License along with the GNU C Library; if not, write to the Free
  51528. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51529. - 02111-1307 USA. */
  51530. + License along with the GNU C Library; if not, see
  51531. + <http://www.gnu.org/licenses/>. */
  51532. #ifndef _FENV_H
  51533. # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
  51534. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/huge_val.h uClibc-git/libc/sysdeps/linux/arm/bits/huge_val.h
  51535. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/huge_val.h 2012-05-15 09:20:09.000000000 +0200
  51536. +++ uClibc-git/libc/sysdeps/linux/arm/bits/huge_val.h 2014-07-25 20:36:06.593333569 +0200
  51537. @@ -16,9 +16,8 @@
  51538. Lesser General Public License for more details.
  51539. You should have received a copy of the GNU Lesser General Public
  51540. - License along with the GNU C Library; if not, write to the Free
  51541. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51542. - 02111-1307 USA. */
  51543. + License along with the GNU C Library; if not, see
  51544. + <http://www.gnu.org/licenses/>. */
  51545. #ifndef _MATH_H
  51546. # error "Never use <bits/huge_val.h> directly; include <math.h> instead."
  51547. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/arm/bits/kernel_types.h
  51548. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
  51549. +++ uClibc-git/libc/sysdeps/linux/arm/bits/kernel_types.h 2014-07-25 20:36:06.593333569 +0200
  51550. @@ -32,6 +32,8 @@
  51551. typedef unsigned short __kernel_old_gid_t;
  51552. typedef long long __kernel_loff_t;
  51553. typedef __kernel_dev_t __kernel_old_dev_t;
  51554. +typedef long __kernel_long_t;
  51555. +typedef unsigned long __kernel_ulong_t;
  51556. typedef struct {
  51557. #ifdef __USE_ALL
  51558. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/mathdef.h uClibc-git/libc/sysdeps/linux/arm/bits/mathdef.h
  51559. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
  51560. +++ uClibc-git/libc/sysdeps/linux/arm/bits/mathdef.h 2014-07-25 20:36:06.593333569 +0200
  51561. @@ -12,9 +12,8 @@
  51562. Lesser General Public License for more details.
  51563. You should have received a copy of the GNU Lesser General Public
  51564. - License along with the GNU C Library; if not, write to the Free
  51565. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51566. - 02111-1307 USA. */
  51567. + License along with the GNU C Library; if not, see
  51568. + <http://www.gnu.org/licenses/>. */
  51569. #if !defined _MATH_H && !defined _COMPLEX_H
  51570. # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
  51571. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/setjmp.h uClibc-git/libc/sysdeps/linux/arm/bits/setjmp.h
  51572. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  51573. +++ uClibc-git/libc/sysdeps/linux/arm/bits/setjmp.h 2014-07-25 20:36:06.593333569 +0200
  51574. @@ -1,4 +1,4 @@
  51575. -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
  51576. +/* Copyright (C) 1997,1998,2005,2006 Free Software Foundation, Inc.
  51577. This file is part of the GNU C Library.
  51578. The GNU C Library is free software; you can redistribute it and/or
  51579. @@ -12,19 +12,18 @@
  51580. Lesser General Public License for more details.
  51581. You should have received a copy of the GNU Lesser General Public
  51582. - License along with the GNU C Library; if not, write to the Free
  51583. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51584. - 02111-1307 USA. */
  51585. + License along with the GNU C Library; if not, see
  51586. + <http://www.gnu.org/licenses/>. */
  51587. /* Define the machine-dependent type `jmp_buf'. ARM version. */
  51588. +
  51589. #ifndef _BITS_SETJMP_H
  51590. -#define _BITS_SETJMP_H 1
  51591. +#define _BITS_SETJMP_H 1
  51592. #if !defined _SETJMP_H && !defined _PTHREAD_H
  51593. # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
  51594. #endif
  51595. -#ifndef _ASM
  51596. /* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not
  51597. saved. */
  51598. #ifdef __ARM_EABI__
  51599. @@ -38,15 +37,10 @@
  51600. #elif defined __MAVERICK__ || defined __IWMMXT__
  51601. typedef int __jmp_buf[34];
  51602. #else
  51603. +# ifdef __UCLIBC_HAS_FPU__
  51604. typedef int __jmp_buf[22];
  51605. +# else
  51606. +typedef int __jmp_buf[10];
  51607. +# endif
  51608. #endif
  51609. #endif
  51610. -
  51611. -#define __JMP_BUF_SP 8
  51612. -
  51613. -/* Test if longjmp to JMPBUF would unwind the frame
  51614. - containing a local variable at ADDRESS. */
  51615. -#define _JMPBUF_UNWINDS(jmpbuf, address) \
  51616. - ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
  51617. -
  51618. -#endif /* bits/setjmp.h */
  51619. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/shm.h uClibc-git/libc/sysdeps/linux/arm/bits/shm.h
  51620. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
  51621. +++ uClibc-git/libc/sysdeps/linux/arm/bits/shm.h 2014-07-25 20:36:06.593333569 +0200
  51622. @@ -12,9 +12,8 @@
  51623. Lesser General Public License for more details.
  51624. You should have received a copy of the GNU Lesser General Public
  51625. - License along with the GNU C Library; if not, write to the Free
  51626. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51627. - 02111-1307 USA. */
  51628. + License along with the GNU C Library; if not, see
  51629. + <http://www.gnu.org/licenses/>. */
  51630. #ifndef _SYS_SHM_H
  51631. # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
  51632. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/sigcontextinfo.h uClibc-git/libc/sysdeps/linux/arm/bits/sigcontextinfo.h
  51633. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
  51634. +++ uClibc-git/libc/sysdeps/linux/arm/bits/sigcontextinfo.h 2014-07-25 20:36:06.593333569 +0200
  51635. @@ -13,9 +13,8 @@
  51636. Lesser General Public License for more details.
  51637. You should have received a copy of the GNU Lesser General Public
  51638. - License along with the GNU C Library; if not, write to the Free
  51639. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51640. - 02111-1307 USA. */
  51641. + License along with the GNU C Library; if not, see
  51642. + <http://www.gnu.org/licenses/>. */
  51643. #include <bits/armsigctx.h>
  51644. #include <linux/version.h>
  51645. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/arm/bits/stackinfo.h
  51646. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  51647. +++ uClibc-git/libc/sysdeps/linux/arm/bits/stackinfo.h 2014-07-25 20:36:06.593333569 +0200
  51648. @@ -12,9 +12,8 @@
  51649. Lesser General Public License for more details.
  51650. You should have received a copy of the GNU Lesser General Public
  51651. - License along with the GNU C Library; if not, write to the Free
  51652. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51653. - 02111-1307 USA. */
  51654. + License along with the GNU C Library; if not, see
  51655. + <http://www.gnu.org/licenses/>. */
  51656. /* This file contains a bit of information about the stack allocation
  51657. of the processor. */
  51658. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h
  51659. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  51660. +++ uClibc-git/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h 2014-07-25 20:36:06.593333569 +0200
  51661. @@ -11,11 +11,11 @@
  51662. /* can your target use syscall6() for mmap ? */
  51663. #undef __UCLIBC_MMAP_HAS_6_ARGS__
  51664. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  51665. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  51666. #ifdef __ARM_EABI__
  51667. -#define __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  51668. +#define __UCLIBC_SYSCALL_ALIGN_64BIT__
  51669. #else
  51670. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  51671. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  51672. #endif
  51673. /* does your target have a broken create_module() ? */
  51674. @@ -48,4 +48,15 @@
  51675. /* only weird assemblers generally need this */
  51676. #undef __UCLIBC_ASM_LINE_SEP__
  51677. +#ifdef __GNUC__
  51678. +# define __need_uClibc_config_h
  51679. +# include <bits/uClibc_config.h>
  51680. +# undef __need_uClibc_config_h
  51681. +# if defined __CONFIG_ARM_EABI__ && !defined __ARM_EABI__
  51682. +# error Your toolchain does not support EABI
  51683. +# elif !defined __CONFIG_ARM_EABI__ && defined __ARM_EABI__
  51684. +# error Your toolchain was built for EABI, but you have chosen OABI
  51685. +# endif
  51686. +#endif
  51687. +
  51688. #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
  51689. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/wordsize.h uClibc-git/libc/sysdeps/linux/arm/bits/wordsize.h
  51690. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
  51691. +++ uClibc-git/libc/sysdeps/linux/arm/bits/wordsize.h 2014-07-25 20:36:06.593333569 +0200
  51692. @@ -12,8 +12,7 @@
  51693. Lesser General Public License for more details.
  51694. You should have received a copy of the GNU Lesser General Public
  51695. - License along with the GNU C Library; if not, write to the Free
  51696. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51697. - 02111-1307 USA. */
  51698. + License along with the GNU C Library; if not, see
  51699. + <http://www.gnu.org/licenses/>. */
  51700. #define __WORDSIZE 32
  51701. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/brk.c uClibc-git/libc/sysdeps/linux/arm/brk.c
  51702. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/brk.c 2012-05-15 09:20:09.000000000 +0200
  51703. +++ uClibc-git/libc/sysdeps/linux/arm/brk.c 2014-07-25 20:36:06.593333569 +0200
  51704. @@ -13,9 +13,8 @@
  51705. Lesser General Public License for more details.
  51706. You should have received a copy of the GNU Lesser General Public
  51707. - License along with the GNU C Library; if not, write to the Free
  51708. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51709. - 02111-1307 USA. */
  51710. + License along with the GNU C Library; if not, see
  51711. + <http://www.gnu.org/licenses/>. */
  51712. #include <errno.h>
  51713. #include <unistd.h>
  51714. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bsd-setjmp.S uClibc-git/libc/sysdeps/linux/arm/bsd-setjmp.S
  51715. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bsd-setjmp.S 2012-05-15 09:20:09.000000000 +0200
  51716. +++ uClibc-git/libc/sysdeps/linux/arm/bsd-setjmp.S 2014-07-25 20:36:06.593333569 +0200
  51717. @@ -13,9 +13,8 @@
  51718. Lesser General Public License for more details.
  51719. You should have received a copy of the GNU Lesser General Public
  51720. - License along with the GNU C Library; if not, write to the Free
  51721. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51722. - 02111-1307 USA. */
  51723. + License along with the GNU C Library; if not, see
  51724. + <http://www.gnu.org/licenses/>. */
  51725. #include <bits/arm_asm.h>
  51726. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/bsd-_setjmp.S uClibc-git/libc/sysdeps/linux/arm/bsd-_setjmp.S
  51727. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/bsd-_setjmp.S 2012-05-15 09:20:09.000000000 +0200
  51728. +++ uClibc-git/libc/sysdeps/linux/arm/bsd-_setjmp.S 2014-07-25 20:36:06.593333569 +0200
  51729. @@ -13,9 +13,8 @@
  51730. Lesser General Public License for more details.
  51731. You should have received a copy of the GNU Lesser General Public
  51732. - License along with the GNU C Library; if not, write to the Free
  51733. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51734. - 02111-1307 USA. */
  51735. + License along with the GNU C Library; if not, see
  51736. + <http://www.gnu.org/licenses/>. */
  51737. #include <bits/arm_asm.h>
  51738. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/clone.S uClibc-git/libc/sysdeps/linux/arm/clone.S
  51739. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/clone.S 2012-05-15 09:20:09.000000000 +0200
  51740. +++ uClibc-git/libc/sysdeps/linux/arm/clone.S 2014-07-25 20:36:06.593333569 +0200
  51741. @@ -13,9 +13,8 @@
  51742. Lesser General Public License for more details.
  51743. You should have received a copy of the GNU Lesser General Public
  51744. - License along with the GNU C Library; if not, write to the Free
  51745. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51746. - 02111-1307 USA. */
  51747. + License along with the GNU C Library; if not, see
  51748. + <http://www.gnu.org/licenses/>. */
  51749. /* clone() is even more special than fork() as it mucks with stacks
  51750. and invokes a function in the right context after its all over. */
  51751. @@ -25,6 +24,7 @@
  51752. #include <bits/errno.h>
  51753. #include <sys/syscall.h>
  51754. #include <bits/arm_asm.h>
  51755. +#include <bits/arm_bx.h>
  51756. #if defined(__NR_clone)
  51757. /* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */
  51758. @@ -111,8 +111,9 @@
  51759. ldr r4, [sp, #12]
  51760. DO_CALL (clone)
  51761. movs a1, a1
  51762. - blt __error
  51763. + IT(t, ne)
  51764. ldmnefd sp!, {r4}
  51765. + blt __error
  51766. IT(t, ne)
  51767. #if defined(__USE_BX__)
  51768. bxne lr
  51769. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/crt1.S uClibc-git/libc/sysdeps/linux/arm/crt1.S
  51770. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/crt1.S 2012-05-15 09:20:09.000000000 +0200
  51771. +++ uClibc-git/libc/sysdeps/linux/arm/crt1.S 2014-07-25 20:36:06.593333569 +0200
  51772. @@ -31,9 +31,8 @@
  51773. Lesser General Public License for more details.
  51774. You should have received a copy of the GNU Lesser General Public
  51775. - License along with the GNU C Library; if not, write to the Free
  51776. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51777. - 02111-1307 USA. */
  51778. + License along with the GNU C Library; if not, see
  51779. + <http://www.gnu.org/licenses/>. */
  51780. /* This is the canonical entry point, usually the first thing in the text
  51781. segment.
  51782. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/find_exidx.c uClibc-git/libc/sysdeps/linux/arm/find_exidx.c
  51783. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/find_exidx.c 2012-05-15 09:20:09.000000000 +0200
  51784. +++ uClibc-git/libc/sysdeps/linux/arm/find_exidx.c 2014-07-25 20:36:06.593333569 +0200
  51785. @@ -12,9 +12,8 @@
  51786. Lesser General Public License for more details.
  51787. You should have received a copy of the GNU Lesser General Public
  51788. - License along with the GNU C Library; if not, write to the Free
  51789. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51790. - 02111-1307 USA. */
  51791. + License along with the GNU C Library; if not, see
  51792. + <http://www.gnu.org/licenses/>. */
  51793. #include <link.h>
  51794. #include <unwind.h>
  51795. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/fpu_control.h uClibc-git/libc/sysdeps/linux/arm/fpu_control.h
  51796. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
  51797. +++ uClibc-git/libc/sysdeps/linux/arm/fpu_control.h 2014-07-25 20:36:06.593333569 +0200
  51798. @@ -13,9 +13,8 @@
  51799. Lesser General Public License for more details.
  51800. You should have received a copy of the GNU Lesser General Public
  51801. - License along with the GNU C Library; if not, write to the Free
  51802. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51803. - 02111-1307 USA. */
  51804. + License along with the GNU C Library; if not, see
  51805. + <http://www.gnu.org/licenses/>. */
  51806. #ifndef _FPU_CONTROL_H
  51807. #define _FPU_CONTROL_H
  51808. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/getcontext.S uClibc-git/libc/sysdeps/linux/arm/getcontext.S
  51809. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/getcontext.S 1970-01-01 01:00:00.000000000 +0100
  51810. +++ uClibc-git/libc/sysdeps/linux/arm/getcontext.S 2014-07-25 20:36:06.593333569 +0200
  51811. @@ -0,0 +1,80 @@
  51812. +/* Copyright (C) 2012 Free Software Foundation, Inc.
  51813. + This file is part of the GNU C Library.
  51814. +
  51815. + The GNU C Library is free software; you can redistribute it and/or
  51816. + modify it under the terms of the GNU Lesser General Public
  51817. + License as published by the Free Software Foundation; either
  51818. + version 2.1 of the License, or (at your option) any later version.
  51819. +
  51820. + The GNU C Library is distributed in the hope that it will be useful,
  51821. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  51822. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  51823. + Lesser General Public License for more details.
  51824. +
  51825. + You should have received a copy of the GNU Lesser General Public
  51826. + License along with the GNU C Library; if not, see
  51827. + <http://www.gnu.org/licenses/>. */
  51828. +
  51829. +#include <sysdep.h>
  51830. +
  51831. +#include "ucontext_i.h"
  51832. +
  51833. + .syntax unified
  51834. + .text
  51835. +
  51836. +/* int getcontext (ucontext_t *ucp) */
  51837. +
  51838. +ENTRY(__getcontext)
  51839. + /* No need to save r0-r3, d0-d7, or d16-d31. */
  51840. + add r1, r0, #MCONTEXT_ARM_R4
  51841. + stmia r1, {r4-r11}
  51842. +
  51843. + /* Save R13 separately as Thumb can't STM it. */
  51844. + str r13, [r0, #MCONTEXT_ARM_SP]
  51845. + str r14, [r0, #MCONTEXT_ARM_LR]
  51846. + /* Return to LR */
  51847. + str r14, [r0, #MCONTEXT_ARM_PC]
  51848. + /* Return zero */
  51849. + mov r2, #0
  51850. + str r2, [r0, #MCONTEXT_ARM_R0]
  51851. +
  51852. + /* Save ucontext_t * across the next call. */
  51853. + mov r4, r0
  51854. +
  51855. + /* __sigprocmask(SIG_BLOCK, NULL, &(ucontext->uc_sigmask)) */
  51856. + mov r0, #SIG_BLOCK
  51857. + mov r1, #0
  51858. + add r2, r4, #UCONTEXT_SIGMASK
  51859. + bl PLTJMP(sigprocmask)
  51860. +
  51861. +#if defined __UCLIBC_HAS_FLOATS__ && ! defined __UCLIBC_HAS_SOFT_FLOAT__
  51862. +# ifdef __VFP_FP__
  51863. + /* Store the VFP registers. */
  51864. + /* Following instruction is fstmiax ip!, {d8-d15}. */
  51865. + stc p11, cr8, [r0], #64
  51866. + /* Store the floating-point status register. */
  51867. + /* Following instruction is fmrx r2, fpscr. */
  51868. + mrc p10, 7, r1, cr1, cr0, 0
  51869. + str r1, [r0], #4
  51870. +# endif
  51871. +#endif
  51872. +#ifdef __IWMMXT__
  51873. + /* Save the call-preserved iWMMXt registers. */
  51874. + /* Following instructions are wstrd wr10, [r0], #8 (etc.) */
  51875. + stcl p1, cr10, [r0], #8
  51876. + stcl p1, cr11, [r0], #8
  51877. + stcl p1, cr12, [r0], #8
  51878. + stcl p1, cr13, [r0], #8
  51879. + stcl p1, cr14, [r0], #8
  51880. + stcl p1, cr15, [r0], #8
  51881. +#endif
  51882. +
  51883. + /* Restore the clobbered R4 and LR. */
  51884. + ldr r14, [r4, #MCONTEXT_ARM_LR]
  51885. + ldr r4, [r4, #MCONTEXT_ARM_R4]
  51886. +
  51887. + mov r0, #0
  51888. + DO_RET(r14)
  51889. +
  51890. +END(__getcontext)
  51891. +weak_alias(__getcontext, getcontext)
  51892. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/ioperm.c uClibc-git/libc/sysdeps/linux/arm/ioperm.c
  51893. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/ioperm.c 2012-05-15 09:20:09.000000000 +0200
  51894. +++ uClibc-git/libc/sysdeps/linux/arm/ioperm.c 2014-07-25 20:36:06.593333569 +0200
  51895. @@ -14,9 +14,8 @@
  51896. Lesser General Public License for more details.
  51897. You should have received a copy of the GNU Lesser General Public
  51898. - License along with the GNU C Library; if not, write to the Free
  51899. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51900. - 02111-1307 USA. */
  51901. + License along with the GNU C Library; if not, see
  51902. + <http://www.gnu.org/licenses/>. */
  51903. /* I/O port access on the ARM is something of a fiction. What we do is to
  51904. map an appropriate area of /dev/mem into user space so that a program
  51905. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/iopl.c uClibc-git/libc/sysdeps/linux/arm/iopl.c
  51906. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/iopl.c 2012-05-15 09:20:09.000000000 +0200
  51907. +++ uClibc-git/libc/sysdeps/linux/arm/iopl.c 2014-07-25 20:36:06.593333569 +0200
  51908. @@ -14,9 +14,8 @@
  51909. Lesser General Public License for more details.
  51910. You should have received a copy of the GNU Lesser General Public
  51911. - License along with the GNU C Library; if not, write to the Free
  51912. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51913. - 02111-1307 USA. */
  51914. + License along with the GNU C Library; if not, see
  51915. + <http://www.gnu.org/licenses/>. */
  51916. #include <sys/io.h>
  51917. #include <errno.h>
  51918. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/jmpbuf-offsets.h uClibc-git/libc/sysdeps/linux/arm/jmpbuf-offsets.h
  51919. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
  51920. +++ uClibc-git/libc/sysdeps/linux/arm/jmpbuf-offsets.h 2014-07-25 20:36:06.593333569 +0200
  51921. @@ -0,0 +1,23 @@
  51922. +/* Private macros for accessing __jmp_buf contents. ARM version.
  51923. + Copyright (C) 2006 Free Software Foundation, Inc.
  51924. + This file is part of the GNU C Library.
  51925. +
  51926. + The GNU C Library is free software; you can redistribute it and/or
  51927. + modify it under the terms of the GNU Lesser General Public
  51928. + License as published by the Free Software Foundation; either
  51929. + version 2.1 of the License, or (at your option) any later version.
  51930. +
  51931. + The GNU C Library is distributed in the hope that it will be useful,
  51932. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  51933. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  51934. + Lesser General Public License for more details.
  51935. +
  51936. + You should have received a copy of the GNU Lesser General Public
  51937. + License along with the GNU C Library; if not, see
  51938. + <http://www.gnu.org/licenses/>. */
  51939. +
  51940. +#ifdef __UCLIBC_HAS_FPU__
  51941. +#define __JMP_BUF_SP 20
  51942. +#else
  51943. +#define __JMP_BUF_SP 8
  51944. +#endif
  51945. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/arm/jmpbuf-unwind.h
  51946. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  51947. +++ uClibc-git/libc/sysdeps/linux/arm/jmpbuf-unwind.h 2014-07-25 20:36:06.593333569 +0200
  51948. @@ -0,0 +1,29 @@
  51949. +/*
  51950. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  51951. + *
  51952. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  51953. + */
  51954. +#include <setjmp.h>
  51955. +#include <jmpbuf-offsets.h>
  51956. +
  51957. +/* Test if longjmp to JMPBUF would unwind the frame
  51958. + containing a local variable at ADDRESS. */
  51959. +#define _JMPBUF_UNWINDS(jmpbuf, address) \
  51960. + ((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
  51961. +
  51962. +#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  51963. +#include <stdint.h>
  51964. +#include <unwind.h>
  51965. +
  51966. +/* Test if longjmp to JMPBUF would unwind the frame
  51967. + containing a local variable at ADDRESS. */
  51968. +#undef _JMPBUF_UNWINDS
  51969. +#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
  51970. + ((void *) (address) < (void *) demangle (jmpbuf[__JMP_BUF_SP]))
  51971. +
  51972. +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
  51973. + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
  51974. +
  51975. +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
  51976. + ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[__JMP_BUF_SP] - (_adj))
  51977. +#endif
  51978. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/__longjmp.S uClibc-git/libc/sysdeps/linux/arm/__longjmp.S
  51979. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
  51980. +++ uClibc-git/libc/sysdeps/linux/arm/__longjmp.S 2014-07-25 20:36:06.577333486 +0200
  51981. @@ -13,16 +13,12 @@
  51982. Lesser General Public License for more details.
  51983. You should have received a copy of the GNU Lesser General Public
  51984. - License along with the GNU C Library; if not, write to the Free
  51985. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  51986. - 02111-1307 USA. */
  51987. + License along with the GNU C Library; if not, see
  51988. + <http://www.gnu.org/licenses/>. */
  51989. #include <features.h>
  51990. #include <bits/arm_asm.h>
  51991. -#define _SETJMP_H
  51992. -#define _ASM
  51993. -#include <bits/setjmp.h>
  51994. -
  51995. +#include <bits/arm_bx.h>
  51996. .global __longjmp
  51997. .type __longjmp,%function
  51998. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/makecontext.c uClibc-git/libc/sysdeps/linux/arm/makecontext.c
  51999. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/makecontext.c 1970-01-01 01:00:00.000000000 +0100
  52000. +++ uClibc-git/libc/sysdeps/linux/arm/makecontext.c 2014-07-25 20:36:06.593333569 +0200
  52001. @@ -0,0 +1,73 @@
  52002. +/* Copyright (C) 2012 Free Software Foundation, Inc.
  52003. + This file is part of the GNU C Library.
  52004. +
  52005. + The GNU C Library is free software; you can redistribute it and/or
  52006. + modify it under the terms of the GNU Lesser General Public
  52007. + License as published by the Free Software Foundation; either
  52008. + version 2.1 of the License, or (at your option) any later version.
  52009. +
  52010. + The GNU C Library is distributed in the hope that it will be useful,
  52011. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  52012. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  52013. + Lesser General Public License for more details.
  52014. +
  52015. + You should have received a copy of the GNU Lesser General Public
  52016. + License along with the GNU C Library; if not, see
  52017. + <http://www.gnu.org/licenses/>. */
  52018. +
  52019. +#include <stdarg.h>
  52020. +#include <ucontext.h>
  52021. +
  52022. +/* Number of arguments that go in registers. */
  52023. +#define NREG_ARGS 4
  52024. +
  52025. +/* Take a context previously prepared via getcontext() and set to
  52026. + call func() with the given int only args. */
  52027. +void
  52028. +__makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
  52029. +{
  52030. + extern void __startcontext (void);
  52031. + unsigned long *funcstack;
  52032. + va_list vl;
  52033. + unsigned long *regptr;
  52034. + unsigned int reg;
  52035. + int misaligned;
  52036. +
  52037. + /* Start at the top of stack. */
  52038. + funcstack = (unsigned long *) (ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
  52039. +
  52040. + /* Ensure the stack stays eight byte aligned. */
  52041. + misaligned = ((unsigned long) funcstack & 4) != 0;
  52042. +
  52043. + if ((argc > NREG_ARGS) && (argc & 1) != 0)
  52044. + misaligned = !misaligned;
  52045. +
  52046. + if (misaligned)
  52047. + funcstack -= 1;
  52048. +
  52049. + va_start (vl, argc);
  52050. +
  52051. + /* Reserve space for the on-stack arguments. */
  52052. + if (argc > NREG_ARGS)
  52053. + funcstack -= (argc - NREG_ARGS);
  52054. +
  52055. + ucp->uc_mcontext.arm_sp = (unsigned long) funcstack;
  52056. + ucp->uc_mcontext.arm_pc = (unsigned long) func;
  52057. +
  52058. + /* Exit to startcontext() with the next context in R4 */
  52059. + ucp->uc_mcontext.arm_r4 = (unsigned long) ucp->uc_link;
  52060. + ucp->uc_mcontext.arm_lr = (unsigned long) __startcontext;
  52061. +
  52062. + /* The first four arguments go into registers. */
  52063. + regptr = &(ucp->uc_mcontext.arm_r0);
  52064. +
  52065. + for (reg = 0; (reg < argc) && (reg < NREG_ARGS); reg++)
  52066. + *regptr++ = va_arg (vl, unsigned long);
  52067. +
  52068. + /* And the remainder on the stack. */
  52069. + for (; reg < argc; reg++)
  52070. + *funcstack++ = va_arg (vl, unsigned long);
  52071. +
  52072. + va_end (vl);
  52073. +}
  52074. +weak_alias (__makecontext, makecontext)
  52075. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/Makefile.arch uClibc-git/libc/sysdeps/linux/arm/Makefile.arch
  52076. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
  52077. +++ uClibc-git/libc/sysdeps/linux/arm/Makefile.arch 2014-07-25 20:36:06.577333486 +0200
  52078. @@ -5,42 +5,40 @@
  52079. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  52080. #
  52081. -CSRC := brk.c ioperm.c iopl.c mmap.c __syscall_error.c sigaction.c
  52082. +CSRC-y := brk.c ioperm.c iopl.c __syscall_error.c sigaction.c
  52083. -SSRC := \
  52084. +SSRC-y := \
  52085. __longjmp.S setjmp.S bsd-setjmp.S \
  52086. - bsd-_setjmp.S sigrestorer.S mmap64.S \
  52087. + bsd-_setjmp.S sigrestorer.S \
  52088. vfork.S clone.S
  52089. -ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
  52090. -SSRC += libc-aeabi_read_tp.S libc-thumb_atomics.S
  52091. -endif
  52092. -
  52093. -ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
  52094. -CSRC += posix_fadvise.c posix_fadvise64.c
  52095. -endif
  52096. +SSRC-$(UCLIBC_HAS_LFS) += mmap64.S
  52097. +SSRC-$(UCLIBC_HAS_THREADS_NATIVE) += libc-aeabi_read_tp.S libc-thumb_atomics.S
  52098. +CSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += makecontext.c
  52099. +SSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += getcontext.S setcontext.S swapcontext.S
  52100. # Is our compiler set up for EABI ?
  52101. -IS_EABI:=$(shell $(CC) $(CFLAGS) -x c - -E -dM </dev/null 2>/dev/null \
  52102. - | grep __ARM_EABI__ 2>&1 >/dev/null && echo 'y' \
  52103. - )
  52104. +CC_IS_EABI_CHECK = $(filter-out -include libc-symbols.h,$(CC) $(CFLAGS))
  52105. +$(eval $(call cache-output-var,IS_EABI,$(CC_IS_EABI_CHECK) -x c - -E -dM </dev/null 2>/dev/null | grep __ARM_EABI__ 2>&1 >/dev/null && echo 'y'))
  52106. -ifeq ($(IS_EABI),y)
  52107. -CSRC += aeabi_assert.c aeabi_atexit.c aeabi_errno_addr.c \
  52108. +CSRC-$(IS_EABI) += aeabi_assert.c aeabi_atexit.c aeabi_errno_addr.c \
  52109. aeabi_localeconv.c aeabi_memclr.c aeabi_memcpy.c \
  52110. aeabi_memmove.c aeabi_memset.c find_exidx.c
  52111. -SSRC += syscall-eabi.S
  52112. -ARCH_OBJ_FILTEROUT := syscall.c
  52113. -ifeq ($(UCLIBC_HAS_WCHAR),y)
  52114. -CSRC += aeabi_mb_cur_max.c
  52115. -endif
  52116. -else
  52117. -CSRC += syscall.c
  52118. -endif
  52119. -
  52120. +SSRC-$(IS_EABI) += syscall-eabi.S
  52121. +CSRC-$(if $(IS_EABI),,y)) += syscall.c
  52122. +ARCH_OBJ_FILTEROUT-$(IS_EABI) := syscall.c
  52123. ifeq ($(IS_EABI),y)
  52124. -libc-static-y += $(ARCH_OUT)/aeabi_lcsts.o $(ARCH_OUT)/aeabi_math.o \
  52125. - $(ARCH_OUT)/aeabi_sighandlers.o
  52126. -libc-nonshared-y += $(ARCH_OUT)/aeabi_lcsts.os $(ARCH_OUT)/aeabi_math.os \
  52127. - $(ARCH_OUT)/aeabi_sighandlers.os $(ARCH_OUT)/aeabi_unwind_cpp_pr1.o
  52128. +CSRC-$(UCLIBC_HAS_WCHAR) += aeabi_mb_cur_max.c
  52129. endif
  52130. +
  52131. +libc-static-$(IS_EABI) += $(addprefix $(ARCH_OUT)/, \
  52132. + aeabi_lcsts.o \
  52133. + aeabi_math.o \
  52134. + aeabi_sighandlers.o \
  52135. + )
  52136. +libc-nonshared-$(IS_EABI) += $(addprefix $(ARCH_OUT)/, \
  52137. + aeabi_lcsts.os \
  52138. + aeabi_math.os \
  52139. + aeabi_sighandlers.os \
  52140. + aeabi_unwind_cpp_pr1.o \
  52141. + )
  52142. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/mmap64.S uClibc-git/libc/sysdeps/linux/arm/mmap64.S
  52143. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/mmap64.S 2012-05-15 09:20:09.000000000 +0200
  52144. +++ uClibc-git/libc/sysdeps/linux/arm/mmap64.S 2014-07-25 20:36:06.593333569 +0200
  52145. @@ -12,17 +12,17 @@
  52146. Lesser General Public License for more details.
  52147. You should have received a copy of the GNU Lesser General Public
  52148. - License along with the GNU C Library; if not, write to the Free
  52149. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  52150. - 02111-1307 USA. */
  52151. + License along with the GNU C Library; if not, see
  52152. + <http://www.gnu.org/licenses/>. */
  52153. -#include <features.h>
  52154. +#include <_lfs_64.h>
  52155. #define _ERRNO_H
  52156. #include <bits/errno.h>
  52157. #include <sys/syscall.h>
  52158. #include <bits/arm_asm.h>
  52159. +#include <bits/arm_bx.h>
  52160. -#if defined __UCLIBC_HAS_LFS__ && defined __NR_mmap2
  52161. +#ifdef __NR_mmap2
  52162. /* The mmap2 system call takes six arguments, all in registers. */
  52163. .text
  52164. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/mmap.c uClibc-git/libc/sysdeps/linux/arm/mmap.c
  52165. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/mmap.c 2012-05-15 09:20:09.000000000 +0200
  52166. +++ uClibc-git/libc/sysdeps/linux/arm/mmap.c 1970-01-01 01:00:00.000000000 +0100
  52167. @@ -1,74 +0,0 @@
  52168. -/* vi: set sw=4 ts=4: */
  52169. -/*
  52170. - * _mmap() for uClibc
  52171. - *
  52172. - * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
  52173. - *
  52174. - * GNU Library General Public License (LGPL) version 2 or later.
  52175. - */
  52176. -#include <errno.h>
  52177. -#include <unistd.h>
  52178. -#include <sys/mman.h>
  52179. -#include <sys/syscall.h>
  52180. -
  52181. -#if defined (__NR_mmap) || defined (__NR_mmap2)
  52182. -
  52183. -libc_hidden_proto(mmap)
  52184. -#if defined (__UCLIBC_MMAP_HAS_6_ARGS__) && defined (__NR_mmap)
  52185. -#define __NR__mmap __NR_mmap
  52186. -static __inline__ _syscall6 (__ptr_t, _mmap, __ptr_t, addr, size_t, len,
  52187. - int, prot, int, flags, int, fd, __off_t, offset)
  52188. -__ptr_t mmap(__ptr_t addr, size_t len, int prot,
  52189. - int flags, int fd, __off_t offset)
  52190. -{
  52191. - return (__ptr_t) _mmap (addr, len, prot, flags,
  52192. - fd, offset);
  52193. -}
  52194. -
  52195. -#elif defined (__NR_mmap2)
  52196. -#define __NR__mmap __NR_mmap2
  52197. -
  52198. -#ifndef MMAP2_PAGE_SHIFT
  52199. -# define MMAP2_PAGE_SHIFT 12
  52200. -#endif
  52201. -
  52202. -static __inline__ _syscall6 (__ptr_t, _mmap, __ptr_t, addr, size_t, len,
  52203. - int, prot, int, flags, int, fd, __off_t, offset);
  52204. -__ptr_t mmap(__ptr_t addr, size_t len, int prot,
  52205. - int flags, int fd, __off_t offset)
  52206. -{
  52207. - /* check if offset is page aligned */
  52208. - if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1))
  52209. - {
  52210. - __set_errno(EINVAL);
  52211. - return MAP_FAILED;
  52212. - }
  52213. -#ifdef __USE_FILE_OFFSET64
  52214. - return (__ptr_t) _mmap (addr, len, prot, flags,
  52215. - fd, ((__u_quad_t) offset >> MMAP2_PAGE_SHIFT));
  52216. -#else
  52217. - return (__ptr_t) _mmap (addr, len, prot, flags,
  52218. - fd, ((__u_long) offset >> MMAP2_PAGE_SHIFT));
  52219. -#endif
  52220. -}
  52221. -#elif defined (__NR_mmap)
  52222. -# define __NR__mmap __NR_mmap
  52223. -static __inline__ _syscall1(__ptr_t, _mmap, unsigned long *, buffer)
  52224. -__ptr_t mmap(__ptr_t addr, size_t len, int prot,
  52225. - int flags, int fd, __off_t offset)
  52226. -{
  52227. - unsigned long buffer[6];
  52228. -
  52229. - buffer[0] = (unsigned long) addr;
  52230. - buffer[1] = (unsigned long) len;
  52231. - buffer[2] = (unsigned long) prot;
  52232. - buffer[3] = (unsigned long) flags;
  52233. - buffer[4] = (unsigned long) fd;
  52234. - buffer[5] = (unsigned long) offset;
  52235. - return (__ptr_t) _mmap(buffer);
  52236. -}
  52237. -#endif
  52238. -libc_hidden_def (mmap)
  52239. -#else
  52240. -# error "Your architecture doesn't seem to provide mmap() !?"
  52241. -#endif
  52242. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/posix_fadvise64.c uClibc-git/libc/sysdeps/linux/arm/posix_fadvise64.c
  52243. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/posix_fadvise64.c 2012-05-15 09:20:09.000000000 +0200
  52244. +++ uClibc-git/libc/sysdeps/linux/arm/posix_fadvise64.c 1970-01-01 01:00:00.000000000 +0100
  52245. @@ -1,59 +0,0 @@
  52246. -/* vi: set sw=4 ts=4: */
  52247. -/*
  52248. - * posix_fadvise64() for ARM uClibc
  52249. - * http://www.opengroup.org/onlinepubs/009695399/functions/posix_fadvise.html
  52250. - *
  52251. - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  52252. - *
  52253. - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  52254. - */
  52255. -
  52256. -#include <features.h>
  52257. -#include <unistd.h>
  52258. -#include <errno.h>
  52259. -#include <endian.h>
  52260. -#include <stdint.h>
  52261. -#include <sys/types.h>
  52262. -#include <sys/syscall.h>
  52263. -#include <fcntl.h>
  52264. -
  52265. -#ifdef __UCLIBC_HAS_LFS__
  52266. -
  52267. -#if defined __NR_arm_fadvise64_64
  52268. -
  52269. -/* Was named __libc_posix_fadvise64 for some inexplicable reason.
  52270. -** google says only uclibc has *__libc*_posix_fadviseXXX,
  52271. -** so it cannot be compat with anything.
  52272. -**
  52273. -** Remove this comment and one at the end after 0.9.31
  52274. -*/
  52275. -
  52276. -/* This is for the ARM version of fadvise64_64 which swaps the params
  52277. - * about to avoid having ABI compat issues
  52278. - */
  52279. -#define __NR___syscall_arm_fadvise64_64 __NR_arm_fadvise64_64
  52280. -int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advise)
  52281. -{
  52282. - INTERNAL_SYSCALL_DECL (err);
  52283. - int ret = INTERNAL_SYSCALL (arm_fadvise64_64, err, 6, fd, advise,
  52284. - __LONG_LONG_PAIR ((long)(offset >> 32), (long)offset),
  52285. - __LONG_LONG_PAIR ((long)(len >> 32), (long)len));
  52286. - if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
  52287. - return 0;
  52288. - if (INTERNAL_SYSCALL_ERRNO (ret, err) != ENOSYS)
  52289. - return INTERNAL_SYSCALL_ERRNO (ret, err);
  52290. - return 0;
  52291. -}
  52292. -
  52293. -/* weak_alias(__libc_posix_fadvise64, posix_fadvise64); */
  52294. -
  52295. -#elif defined __UCLIBC_HAS_STUBS__
  52296. -
  52297. -int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advise)
  52298. -{
  52299. - return ENOSYS;
  52300. -}
  52301. -
  52302. -#endif
  52303. -
  52304. -#endif
  52305. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/posix_fadvise.c uClibc-git/libc/sysdeps/linux/arm/posix_fadvise.c
  52306. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/posix_fadvise.c 2012-05-15 09:20:09.000000000 +0200
  52307. +++ uClibc-git/libc/sysdeps/linux/arm/posix_fadvise.c 1970-01-01 01:00:00.000000000 +0100
  52308. @@ -1,49 +0,0 @@
  52309. -/* vi: set sw=4 ts=4: */
  52310. -/*
  52311. - * posix_fadvise() for ARM uClibc
  52312. - * http://www.opengroup.org/onlinepubs/009695399/functions/posix_fadvise.html
  52313. - *
  52314. - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  52315. - *
  52316. - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  52317. - */
  52318. -#include <sys/syscall.h>
  52319. -#include <fcntl.h>
  52320. -
  52321. -#if defined __NR_arm_fadvise64_64
  52322. -
  52323. -#define HIGH_BITS(x) (sizeof(x) > 4 ? (x) >> 32 : 0)
  52324. -
  52325. -/* Was named __libc_posix_fadvise for some inexplicable reason.
  52326. -** google says only uclibc has *__libc*_posix_fadviseXXX,
  52327. -** so it cannot be compat with anything.
  52328. -**
  52329. -** Remove this comment and one at the end after 0.9.31
  52330. -*/
  52331. -
  52332. -/* This is for the ARM version of fadvise64_64 which swaps the params
  52333. - * about to avoid having ABI compat issues
  52334. - */
  52335. -#define __NR___syscall_arm_fadvise64_64 __NR_arm_fadvise64_64
  52336. -int posix_fadvise(int fd, off_t offset, off_t len, int advise)
  52337. -{
  52338. - INTERNAL_SYSCALL_DECL (err);
  52339. - int ret = INTERNAL_SYSCALL (arm_fadvise64_64, err, 6, fd, advise,
  52340. - __LONG_LONG_PAIR (HIGH_BITS(offset), (long)offset),
  52341. - __LONG_LONG_PAIR (HIGH_BITS(len), (long)len));
  52342. -
  52343. - if (INTERNAL_SYSCALL_ERROR_P (ret, err))
  52344. - return INTERNAL_SYSCALL_ERRNO (ret, err);
  52345. - return 0;
  52346. -}
  52347. -
  52348. -/* weak_alias(__libc_posix_fadvise, posix_fadvise); */
  52349. -
  52350. -#elif defined __UCLIBC_HAS_STUBS__
  52351. -
  52352. -int posix_fadvise(int fd attribute_unused, off_t offset attribute_unused, off_t len attribute_unused, int advice attribute_unused)
  52353. -{
  52354. - return ENOSYS;
  52355. -}
  52356. -
  52357. -#endif
  52358. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/setcontext.S uClibc-git/libc/sysdeps/linux/arm/setcontext.S
  52359. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/setcontext.S 1970-01-01 01:00:00.000000000 +0100
  52360. +++ uClibc-git/libc/sysdeps/linux/arm/setcontext.S 2014-07-25 20:36:06.593333569 +0200
  52361. @@ -0,0 +1,76 @@
  52362. +/* Copyright (C) 2012 Free Software Foundation, Inc.
  52363. + This file is part of the GNU C Library.
  52364. +
  52365. + The GNU C Library is free software; you can redistribute it and/or
  52366. + modify it under the terms of the GNU Lesser General Public
  52367. + License as published by the Free Software Foundation; either
  52368. + version 2.1 of the License, or (at your option) any later version.
  52369. +
  52370. + The GNU C Library is distributed in the hope that it will be useful,
  52371. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  52372. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  52373. + Lesser General Public License for more details.
  52374. +
  52375. + You should have received a copy of the GNU Lesser General Public
  52376. + License along with the GNU C Library; if not, see
  52377. + <http://www.gnu.org/licenses/>. */
  52378. +
  52379. +#include <sysdep.h>
  52380. +
  52381. +#include "ucontext_i.h"
  52382. +
  52383. + .syntax unified
  52384. + .text
  52385. +
  52386. +/* int setcontext (const ucontext_t *ucp) */
  52387. +
  52388. +ENTRY(__setcontext)
  52389. + mov r4, r0
  52390. +
  52391. +#if defined __UCLIBC_HAS_FLOATS__ && ! defined __UCLIBC_HAS_SOFT_FLOAT__
  52392. +# ifdef __VFP_FP__
  52393. + /* Following instruction is vldmia r0!, {d8-d15}. */
  52394. + ldc p11, cr8, [r0], #64
  52395. + /* Restore the floating-point status register. */
  52396. + ldr r1, [r0], #4
  52397. + /* Following instruction is fmxr fpscr, r1. */
  52398. + mcr p10, 7, r1, cr1, cr0, 0
  52399. +# endif
  52400. +#endif
  52401. +
  52402. +#ifdef __IWMMXT__
  52403. + /* Restore the call-preserved iWMMXt registers. */
  52404. + /* Following instructions are wldrd wr10, [r0], #8 (etc.) */
  52405. + ldcl p1, cr10, [r0], #8
  52406. + ldcl p1, cr11, [r0], #8
  52407. + ldcl p1, cr12, [r0], #8
  52408. + ldcl p1, cr13, [r0], #8
  52409. + ldcl p1, cr14, [r0], #8
  52410. + ldcl p1, cr15, [r0], #8
  52411. +#endif
  52412. +
  52413. + /* Now bring back the signal status. */
  52414. + mov r0, #SIG_SETMASK
  52415. + add r1, r4, #UCONTEXT_SIGMASK
  52416. + mov r2, #0
  52417. + bl PLTJMP(sigprocmask)
  52418. +
  52419. + /* Loading r0-r3 makes makecontext easier. */
  52420. + add r14, r4, #MCONTEXT_ARM_R0
  52421. + ldmia r14, {r0-r11}
  52422. + ldr r13, [r14, #(MCONTEXT_ARM_SP - MCONTEXT_ARM_R0)]
  52423. + add r14, r14, #(MCONTEXT_ARM_LR - MCONTEXT_ARM_R0)
  52424. + ldmia r14, {r14, pc}
  52425. +
  52426. +END(setcontext)
  52427. +weak_alias(__setcontext, setcontext)
  52428. +
  52429. + /* Called when a makecontext() context returns. Start the
  52430. + context in R4 or fall through to exit(). */
  52431. +ENTRY(__startcontext)
  52432. + movs r0, r4
  52433. + bne PLTJMP(__setcontext)
  52434. +
  52435. + @ New context was 0 - exit
  52436. + b PLTJMP(_exit)
  52437. +END(__startcontext)
  52438. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/setjmp.S uClibc-git/libc/sysdeps/linux/arm/setjmp.S
  52439. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/setjmp.S 2012-05-15 09:20:09.000000000 +0200
  52440. +++ uClibc-git/libc/sysdeps/linux/arm/setjmp.S 2014-07-25 20:36:06.593333569 +0200
  52441. @@ -13,9 +13,8 @@
  52442. Lesser General Public License for more details.
  52443. You should have received a copy of the GNU Lesser General Public
  52444. - License along with the GNU C Library; if not, write to the Free
  52445. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  52446. - 02111-1307 USA. */
  52447. + License along with the GNU C Library; if not, see
  52448. + <http://www.gnu.org/licenses/>. */
  52449. #include <features.h>
  52450. #include <bits/arm_asm.h>
  52451. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/sigaction.c uClibc-git/libc/sysdeps/linux/arm/sigaction.c
  52452. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/sigaction.c 2012-05-15 09:20:09.000000000 +0200
  52453. +++ uClibc-git/libc/sysdeps/linux/arm/sigaction.c 2014-07-25 20:36:06.593333569 +0200
  52454. @@ -12,9 +12,8 @@
  52455. Lesser General Public License for more details.
  52456. You should have received a copy of the GNU Lesser General Public
  52457. - License along with the GNU C Library; if not, write to the Free
  52458. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  52459. - 02111-1307 USA.
  52460. + License along with the GNU C Library; if not, see
  52461. + <http://www.gnu.org/licenses/>.
  52462. Totally hacked up for uClibc by Erik Andersen <andersen@codepoet.org>
  52463. */
  52464. @@ -29,8 +28,6 @@
  52465. extern void __default_sa_restorer(void);
  52466. extern void __default_rt_sa_restorer(void);
  52467. -extern __typeof(sigaction) __libc_sigaction;
  52468. -
  52469. /* When RT signals are in use we need to use a different return stub. */
  52470. #ifdef __NR_rt_sigreturn
  52471. #define choose_restorer(flags) \
  52472. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/sigrestorer.S uClibc-git/libc/sysdeps/linux/arm/sigrestorer.S
  52473. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/sigrestorer.S 2012-05-15 09:20:09.000000000 +0200
  52474. +++ uClibc-git/libc/sysdeps/linux/arm/sigrestorer.S 2014-07-25 20:36:06.593333569 +0200
  52475. @@ -12,9 +12,8 @@
  52476. Lesser General Public License for more details.
  52477. You should have received a copy of the GNU Lesser General Public
  52478. - License along with the GNU C Library; if not, write to the Free
  52479. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  52480. - 02111-1307 USA. */
  52481. + License along with the GNU C Library; if not, see
  52482. + <http://www.gnu.org/licenses/>. */
  52483. #include <bits/arm_asm.h>
  52484. #include <sys/syscall.h>
  52485. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/swapcontext.S uClibc-git/libc/sysdeps/linux/arm/swapcontext.S
  52486. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/swapcontext.S 1970-01-01 01:00:00.000000000 +0100
  52487. +++ uClibc-git/libc/sysdeps/linux/arm/swapcontext.S 2014-07-25 20:36:06.593333569 +0200
  52488. @@ -0,0 +1,63 @@
  52489. +/* Copyright (C) 2012 Free Software Foundation, Inc.
  52490. + This file is part of the GNU C Library.
  52491. +
  52492. + The GNU C Library is free software; you can redistribute it and/or
  52493. + modify it under the terms of the GNU Lesser General Public
  52494. + License as published by the Free Software Foundation; either
  52495. + version 2.1 of the License, or (at your option) any later version.
  52496. +
  52497. + The GNU C Library is distributed in the hope that it will be useful,
  52498. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  52499. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  52500. + Lesser General Public License for more details.
  52501. +
  52502. + You should have received a copy of the GNU Lesser General Public
  52503. + License along with the GNU C Library; if not, see
  52504. + <http://www.gnu.org/licenses/>. */
  52505. +
  52506. +#include <sysdep.h>
  52507. +
  52508. +#include "ucontext_i.h"
  52509. +
  52510. + .syntax unified
  52511. + .text
  52512. +
  52513. +/* int swapcontext (ucontext_t *oucp, const ucontext_t *ucp) */
  52514. +
  52515. +ENTRY(swapcontext)
  52516. +
  52517. + /* Have getcontext() do most of the work then fix up
  52518. + LR afterwards. Save R3 to keep the stack aligned. */
  52519. + push {r0,r1,r3,r14}
  52520. + cfi_adjust_cfa_offset (16)
  52521. + cfi_rel_offset (r0,0)
  52522. + cfi_rel_offset (r1,4)
  52523. + cfi_rel_offset (r3,8)
  52524. + cfi_rel_offset (r14,12)
  52525. +
  52526. + bl __getcontext
  52527. + mov r4, r0
  52528. +
  52529. + pop {r0,r1,r3,r14}
  52530. + cfi_adjust_cfa_offset (-16)
  52531. + cfi_restore (r0)
  52532. + cfi_restore (r1)
  52533. + cfi_restore (r3)
  52534. + cfi_restore (r14)
  52535. +
  52536. + /* Exit if getcontext() failed. */
  52537. + cmp r4, #0
  52538. + itt ne
  52539. + movne r0, r4
  52540. + RETINSTR(ne, r14)
  52541. +
  52542. + /* Fix up LR and the PC. */
  52543. + str r13,[r0, #MCONTEXT_ARM_SP]
  52544. + str r14,[r0, #MCONTEXT_ARM_LR]
  52545. + str r14,[r0, #MCONTEXT_ARM_PC]
  52546. +
  52547. + /* And swap using swapcontext(). */
  52548. + mov r0, r1
  52549. + b __setcontext
  52550. +
  52551. +END(swapcontext)
  52552. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/sys/elf.h uClibc-git/libc/sysdeps/linux/arm/sys/elf.h
  52553. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/sys/elf.h 2012-05-15 09:20:09.000000000 +0200
  52554. +++ uClibc-git/libc/sysdeps/linux/arm/sys/elf.h 2014-07-25 20:36:06.609333653 +0200
  52555. @@ -12,9 +12,8 @@
  52556. Lesser General Public License for more details.
  52557. You should have received a copy of the GNU Lesser General Public
  52558. - License along with the GNU C Library; if not, write to the Free
  52559. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  52560. - 02111-1307 USA. */
  52561. + License along with the GNU C Library; if not, see
  52562. + <http://www.gnu.org/licenses/>. */
  52563. #ifndef _SYS_ELF_H
  52564. #define _SYS_ELF_H 1
  52565. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/sys/io.h uClibc-git/libc/sysdeps/linux/arm/sys/io.h
  52566. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/sys/io.h 2012-05-15 09:20:09.000000000 +0200
  52567. +++ uClibc-git/libc/sysdeps/linux/arm/sys/io.h 2014-07-25 20:36:06.609333653 +0200
  52568. @@ -12,9 +12,8 @@
  52569. Lesser General Public License for more details.
  52570. You should have received a copy of the GNU Lesser General Public
  52571. - License along with the GNU C Library; if not, write to the Free
  52572. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  52573. - 02111-1307 USA. */
  52574. + License along with the GNU C Library; if not, see
  52575. + <http://www.gnu.org/licenses/>. */
  52576. #ifndef _SYS_IO_H
  52577. @@ -23,6 +22,7 @@
  52578. __BEGIN_DECLS
  52579. +#if defined __UCLIBC_LINUX_SPECIFIC__
  52580. /* If TURN_ON is TRUE, request for permission to do direct i/o on the
  52581. port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
  52582. permission off for that range. This call requires root privileges. */
  52583. @@ -34,6 +34,7 @@
  52584. permission to access any I/O port is granted. This call requires
  52585. root privileges. */
  52586. extern int iopl (int __level) __THROW;
  52587. +#endif /* __UCLIBC_LINUX_SPECIFIC__ */
  52588. /* The functions that actually perform reads and writes. */
  52589. extern unsigned char inb (unsigned long int port) __THROW;
  52590. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/sys/procfs.h uClibc-git/libc/sysdeps/linux/arm/sys/procfs.h
  52591. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  52592. +++ uClibc-git/libc/sysdeps/linux/arm/sys/procfs.h 2014-07-25 20:36:06.609333653 +0200
  52593. @@ -12,9 +12,8 @@
  52594. Lesser General Public License for more details.
  52595. You should have received a copy of the GNU Lesser General Public
  52596. - License along with the GNU C Library; if not, write to the Free
  52597. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  52598. - 02111-1307 USA. */
  52599. + License along with the GNU C Library; if not, see
  52600. + <http://www.gnu.org/licenses/>. */
  52601. #ifndef _SYS_PROCFS_H
  52602. #define _SYS_PROCFS_H 1
  52603. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/sys/ucontext.h uClibc-git/libc/sysdeps/linux/arm/sys/ucontext.h
  52604. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  52605. +++ uClibc-git/libc/sysdeps/linux/arm/sys/ucontext.h 2014-07-25 20:36:06.609333653 +0200
  52606. @@ -12,9 +12,8 @@
  52607. Lesser General Public License for more details.
  52608. You should have received a copy of the GNU Lesser General Public
  52609. - License along with the GNU C Library; if not, write to the Free
  52610. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  52611. - 02111-1307 USA. */
  52612. + License along with the GNU C Library; if not, see
  52613. + <http://www.gnu.org/licenses/>. */
  52614. /* System V/ARM ABI compliant context switching support. */
  52615. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/sys/user.h uClibc-git/libc/sysdeps/linux/arm/sys/user.h
  52616. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/sys/user.h 2012-05-15 09:20:09.000000000 +0200
  52617. +++ uClibc-git/libc/sysdeps/linux/arm/sys/user.h 2014-07-25 20:36:06.609333653 +0200
  52618. @@ -12,9 +12,8 @@
  52619. Lesser General Public License for more details.
  52620. You should have received a copy of the GNU Lesser General Public
  52621. - License along with the GNU C Library; if not, write to the Free
  52622. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  52623. - 02111-1307 USA. */
  52624. + License along with the GNU C Library; if not, see
  52625. + <http://www.gnu.org/licenses/>. */
  52626. #ifndef _SYS_USER_H
  52627. #define _SYS_USER_H 1
  52628. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/syscall-eabi.S uClibc-git/libc/sysdeps/linux/arm/syscall-eabi.S
  52629. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/syscall-eabi.S 2012-05-15 09:20:09.000000000 +0200
  52630. +++ uClibc-git/libc/sysdeps/linux/arm/syscall-eabi.S 2014-07-25 20:36:06.609333653 +0200
  52631. @@ -12,12 +12,12 @@
  52632. Lesser General Public License for more details.
  52633. You should have received a copy of the GNU Lesser General Public
  52634. - License along with the GNU C Library; if not, write to the Free
  52635. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  52636. - 02111-1307 USA. */
  52637. + License along with the GNU C Library; if not, see
  52638. + <http://www.gnu.org/licenses/>. */
  52639. #include <sys/syscall.h>
  52640. #include <bits/arm_asm.h>
  52641. +#include <bits/arm_bx.h>
  52642. /* In the EABI syscall interface, we don't need a special syscall to
  52643. implement syscall(). It won't work reliably with 64-bit arguments
  52644. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/sysdep.h uClibc-git/libc/sysdeps/linux/arm/sysdep.h
  52645. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/sysdep.h 2012-05-15 09:20:09.000000000 +0200
  52646. +++ uClibc-git/libc/sysdeps/linux/arm/sysdep.h 2014-07-25 20:36:06.609333653 +0200
  52647. @@ -13,15 +13,14 @@
  52648. Lesser General Public License for more details.
  52649. You should have received a copy of the GNU Lesser General Public
  52650. - License along with the GNU C Library; if not, write to the Free
  52651. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  52652. - 02111-1307 USA. */
  52653. + License along with the GNU C Library; if not, see
  52654. + <http://www.gnu.org/licenses/>. */
  52655. #ifndef _LINUX_ARM_SYSDEP_H
  52656. #define _LINUX_ARM_SYSDEP_H 1
  52657. #include <common/sysdep.h>
  52658. -#include <bits/arm_asm.h>
  52659. +#include <bits/arm_bx.h>
  52660. #include <sys/syscall.h>
  52661. /* For Linux we can use the system call table in the header file
  52662. @@ -157,6 +156,7 @@
  52663. #define PSEUDO_END_ERRVAL(name) \
  52664. END (name)
  52665. +#undef ret_ERRVAL
  52666. #define ret_ERRVAL PSEUDO_RET_NOERRNO
  52667. #if defined NOT_IN_libc
  52668. @@ -254,7 +254,7 @@
  52669. #undef INLINE_SYSCALL
  52670. #define INLINE_SYSCALL(name, nr, args...) \
  52671. ({ unsigned int _inline_sys_result = INTERNAL_SYSCALL (name, , nr, args); \
  52672. - if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_inline_sys_result, ), 0)) \
  52673. + if (unlikely (INTERNAL_SYSCALL_ERROR_P (_inline_sys_result, ))) \
  52674. { \
  52675. __set_errno (INTERNAL_SYSCALL_ERRNO (_inline_sys_result, )); \
  52676. _inline_sys_result = (unsigned int) -1; \
  52677. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/ucontext_i.sym uClibc-git/libc/sysdeps/linux/arm/ucontext_i.sym
  52678. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/ucontext_i.sym 1970-01-01 01:00:00.000000000 +0100
  52679. +++ uClibc-git/libc/sysdeps/linux/arm/ucontext_i.sym 2014-07-25 20:36:06.609333653 +0200
  52680. @@ -0,0 +1,30 @@
  52681. +#include <inttypes.h>
  52682. +#include <signal.h>
  52683. +#include <stddef.h>
  52684. +#include <sys/ucontext.h>
  52685. +
  52686. +SIG_BLOCK
  52687. +SIG_SETMASK
  52688. +
  52689. +-- Offsets of the fields in the ucontext_t structure.
  52690. +#define ucontext(member) offsetof (ucontext_t, member)
  52691. +#define mcontext(member) ucontext (uc_mcontext.member)
  52692. +
  52693. +UCONTEXT_FLAGS ucontext (uc_flags)
  52694. +UCONTEXT_LINK ucontext (uc_link)
  52695. +UCONTEXT_STACK ucontext (uc_stack)
  52696. +UCONTEXT_MCONTEXT ucontext (uc_mcontext)
  52697. +UCONTEXT_SIGMASK ucontext (uc_sigmask)
  52698. +
  52699. +UCONTEXT_REGSPACE ucontext (uc_regspace)
  52700. +
  52701. +MCONTEXT_TRAP_NO mcontext (trap_no)
  52702. +MCONTEXT_ERROR_CODE mcontext (error_code)
  52703. +MCONTEXT_OLDMASK mcontext (oldmask)
  52704. +MCONTEXT_ARM_R0 mcontext (arm_r0)
  52705. +MCONTEXT_ARM_R4 mcontext (arm_r4)
  52706. +MCONTEXT_ARM_SP mcontext (arm_sp)
  52707. +MCONTEXT_ARM_LR mcontext (arm_lr)
  52708. +MCONTEXT_ARM_PC mcontext (arm_pc)
  52709. +MCONTEXT_ARM_CPSR mcontext (arm_cpsr)
  52710. +MCONTEXT_FAULT_ADDRESS mcontext (fault_address)
  52711. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/unwind.h uClibc-git/libc/sysdeps/linux/arm/unwind.h
  52712. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/unwind.h 2012-05-15 09:20:09.000000000 +0200
  52713. +++ uClibc-git/libc/sysdeps/linux/arm/unwind.h 2014-07-25 20:36:06.609333653 +0200
  52714. @@ -22,9 +22,8 @@
  52715. General Public License for more details.
  52716. You should have received a copy of the GNU General Public License
  52717. - along with this program; see the file COPYING. If not, write to
  52718. - the Free Software Foundation, 51 Franklin Street, Fifth Floor,
  52719. - Boston, MA 02110-1301, USA. */
  52720. + along with this program; see the file COPYING. If not, see
  52721. + <http://www.gnu.org/licenses/>. */
  52722. /* Language-independent unwinder header public defines. This contains both
  52723. ABI defined objects, and GNU support routines. */
  52724. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/arm/vfork.S uClibc-git/libc/sysdeps/linux/arm/vfork.S
  52725. --- uClibc-0.9.33.2/libc/sysdeps/linux/arm/vfork.S 2012-05-15 09:20:09.000000000 +0200
  52726. +++ uClibc-git/libc/sysdeps/linux/arm/vfork.S 2014-07-25 20:36:06.609333653 +0200
  52727. @@ -7,6 +7,7 @@
  52728. #include <features.h>
  52729. #include <bits/arm_asm.h>
  52730. +#include <bits/arm_bx.h>
  52731. #define _ERRNO_H
  52732. #include <bits/errno.h>
  52733. @@ -104,5 +105,5 @@
  52734. .size __vfork,.-__vfork
  52735. weak_alias(__vfork,vfork)
  52736. -libc_hidden_weak(vfork)
  52737. +libc_hidden_def(vfork)
  52738. #endif
  52739. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/bits/atomic.h uClibc-git/libc/sysdeps/linux/avr32/bits/atomic.h
  52740. --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
  52741. +++ uClibc-git/libc/sysdeps/linux/avr32/bits/atomic.h 2014-07-25 20:36:06.629333758 +0200
  52742. @@ -28,6 +28,7 @@
  52743. #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
  52744. ({ \
  52745. + __uint32_t __result; \
  52746. __typeof__(*(mem)) __prev; \
  52747. __asm__ __volatile__( \
  52748. "/* __arch_compare_and_exchange_val_32_acq */\n" \
  52749. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/avr32/bits/kernel_types.h
  52750. --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
  52751. +++ uClibc-git/libc/sysdeps/linux/avr32/bits/kernel_types.h 2014-07-25 20:36:06.629333758 +0200
  52752. @@ -39,6 +39,8 @@
  52753. typedef unsigned short __kernel_old_uid_t;
  52754. typedef unsigned short __kernel_old_gid_t;
  52755. typedef unsigned short __kernel_old_dev_t;
  52756. +typedef long __kernel_long_t;
  52757. +typedef unsigned long __kernel_ulong_t;
  52758. #ifdef __GNUC__
  52759. typedef long long __kernel_loff_t;
  52760. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/bits/setjmp.h uClibc-git/libc/sysdeps/linux/avr32/bits/setjmp.h
  52761. --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  52762. +++ uClibc-git/libc/sysdeps/linux/avr32/bits/setjmp.h 2014-07-25 20:36:06.629333758 +0200
  52763. @@ -12,19 +12,10 @@
  52764. # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
  52765. #endif
  52766. -#ifndef _ASM
  52767. /*
  52768. * The jump buffer contains r0-r7, sr, sp and lr. Other registers are
  52769. * not saved.
  52770. */
  52771. typedef int __jmp_buf[11];
  52772. -#endif
  52773. -
  52774. -#define __JMP_BUF_SP 4
  52775. -
  52776. -/* Test if longjmp to JMPBUF would unwind the frame containing a local
  52777. - variable at ADDRESS. */
  52778. -#define _JMPBUF_UNWINDS(jmpbuf, address) \
  52779. - ((void *)(address) < (void *)(jmpbuf[__JMP_BUF_SP]))
  52780. #endif /* _BITS_SETJMP_H */
  52781. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/avr32/bits/stackinfo.h
  52782. --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  52783. +++ uClibc-git/libc/sysdeps/linux/avr32/bits/stackinfo.h 2014-07-25 20:36:06.629333758 +0200
  52784. @@ -12,9 +12,8 @@
  52785. Lesser General Public License for more details.
  52786. You should have received a copy of the GNU Lesser General Public
  52787. - License along with the GNU C Library; if not, write to the Free
  52788. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  52789. - 02111-1307 USA. */
  52790. + License along with the GNU C Library; if not, see
  52791. + <http://www.gnu.org/licenses/>. */
  52792. /* This file contains a bit of information about the stack allocation
  52793. of the processor. */
  52794. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/avr32/bits/uClibc_arch_features.h
  52795. --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  52796. +++ uClibc-git/libc/sysdeps/linux/avr32/bits/uClibc_arch_features.h 2014-07-25 20:36:06.629333758 +0200
  52797. @@ -12,8 +12,8 @@
  52798. /* can your target use syscall6() for mmap ? */
  52799. #define __UCLIBC_MMAP_HAS_6_ARGS__
  52800. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  52801. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  52802. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  52803. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  52804. /* does your target have a broken create_module() ? */
  52805. #undef __UCLIBC_BROKEN_CREATE_MODULE__
  52806. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/jmpbuf-offsets.h uClibc-git/libc/sysdeps/linux/avr32/jmpbuf-offsets.h
  52807. --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
  52808. +++ uClibc-git/libc/sysdeps/linux/avr32/jmpbuf-offsets.h 2014-07-25 20:36:06.629333758 +0200
  52809. @@ -0,0 +1,9 @@
  52810. +/* Private macros for accessing __jmp_buf contents. avr32 version.
  52811. + * Copyright (C) 2004-2005 Atmel Corporation
  52812. + *
  52813. + * This file is subject to the terms and conditions of the GNU Lesser General
  52814. + * Public License. See the file "COPYING.LIB" in the main directory of this
  52815. + * archive for more details.
  52816. + */
  52817. +
  52818. +#define __JMP_BUF_SP 4
  52819. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/avr32/jmpbuf-unwind.h
  52820. --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  52821. +++ uClibc-git/libc/sysdeps/linux/avr32/jmpbuf-unwind.h 2014-07-25 20:36:06.629333758 +0200
  52822. @@ -0,0 +1,14 @@
  52823. +/*
  52824. + * Copyright (C) 2004-2005 Atmel Corporation
  52825. + *
  52826. + * This file is subject to the terms and conditions of the GNU Lesser General
  52827. + * Public License. See the file "COPYING.LIB" in the main directory of this
  52828. + * archive for more details.
  52829. + */
  52830. +#include <setjmp.h>
  52831. +#include <jmpbuf-offsets.h>
  52832. +
  52833. +/* Test if longjmp to JMPBUF would unwind the frame containing a local
  52834. + variable at ADDRESS. */
  52835. +#define _JMPBUF_UNWINDS(jmpbuf, address) \
  52836. + ((void *)(address) < (void *)(jmpbuf[__JMP_BUF_SP]))
  52837. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/Makefile uClibc-git/libc/sysdeps/linux/avr32/Makefile
  52838. --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/Makefile 2012-05-15 09:20:09.000000000 +0200
  52839. +++ uClibc-git/libc/sysdeps/linux/avr32/Makefile 2014-07-25 20:36:06.617333696 +0200
  52840. @@ -13,8 +13,7 @@
  52841. # details.
  52842. #
  52843. # You should have received a copy of the GNU Library General Public License
  52844. -# along with this program; if not, write to the Free Software Foundation, Inc.,
  52845. -# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  52846. +# along with this program; if not, see <http://www.gnu.org/licenses/>.
  52847. top_srcdir=../../../../
  52848. top_builddir=../../../../
  52849. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/Makefile.arch uClibc-git/libc/sysdeps/linux/avr32/Makefile.arch
  52850. --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
  52851. +++ uClibc-git/libc/sysdeps/linux/avr32/Makefile.arch 2014-07-25 20:36:06.617333696 +0200
  52852. @@ -5,7 +5,7 @@
  52853. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  52854. #
  52855. -CSRC := brk.c clone.c mmap.c prctl.c sigaction.c
  52856. +CSRC-y := brk.c clone.c mmap.c prctl.c sigaction.c
  52857. -SSRC := __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \
  52858. +SSRC-y := __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \
  52859. sigrestorer.S syscall.S vfork.S
  52860. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/mmap.c uClibc-git/libc/sysdeps/linux/avr32/mmap.c
  52861. --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/mmap.c 2012-05-15 09:20:09.000000000 +0200
  52862. +++ uClibc-git/libc/sysdeps/linux/avr32/mmap.c 2014-07-25 20:36:06.629333758 +0200
  52863. @@ -12,10 +12,10 @@
  52864. #include <sys/syscall.h>
  52865. -static _syscall6(__ptr_t, mmap2, __ptr_t, addr, size_t, len, int, prot,
  52866. - int, flags, int, fd, __off_t, pgoff)
  52867. +static __inline__ _syscall6(void *, mmap2, void *, addr, size_t, len, int, prot,
  52868. + int, flags, int, fd, __off_t, pgoff)
  52869. -__ptr_t mmap(__ptr_t addr, size_t len, int prot, int flags, int fd, __off_t offset)
  52870. +void *mmap(void *addr, size_t len, int prot, int flags, int fd, __off_t offset)
  52871. {
  52872. unsigned long page_size = sysconf(_SC_PAGESIZE);
  52873. unsigned long pgoff;
  52874. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/setjmp.S uClibc-git/libc/sysdeps/linux/avr32/setjmp.S
  52875. --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/setjmp.S 2012-05-15 09:20:09.000000000 +0200
  52876. +++ uClibc-git/libc/sysdeps/linux/avr32/setjmp.S 2014-07-25 20:36:06.629333758 +0200
  52877. @@ -5,9 +5,6 @@
  52878. * Public License. See the file "COPYING.LIB" in the main directory of this
  52879. * archive for more details.
  52880. */
  52881. -#define _SETJMP_H
  52882. -#define _ASM
  52883. -#include <bits/setjmp.h>
  52884. .text
  52885. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/sigaction.c uClibc-git/libc/sysdeps/linux/avr32/sigaction.c
  52886. --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/sigaction.c 2012-05-15 09:20:09.000000000 +0200
  52887. +++ uClibc-git/libc/sysdeps/linux/avr32/sigaction.c 2014-07-25 20:36:06.629333758 +0200
  52888. @@ -14,8 +14,6 @@
  52889. #define SA_RESTORER 0x04000000
  52890. extern void __default_rt_sa_restorer(void);
  52891. -extern __typeof(sigaction) __libc_sigaction;
  52892. -
  52893. /*
  52894. * If act is not NULL, change the action for sig to *act.
  52895. * If oact is not NULL, put the old action for sig in *oact.
  52896. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/sys/elf.h uClibc-git/libc/sysdeps/linux/avr32/sys/elf.h
  52897. --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/sys/elf.h 2012-05-15 09:20:09.000000000 +0200
  52898. +++ uClibc-git/libc/sysdeps/linux/avr32/sys/elf.h 2014-07-25 20:36:06.645333842 +0200
  52899. @@ -12,9 +12,8 @@
  52900. Lesser General Public License for more details.
  52901. You should have received a copy of the GNU Lesser General Public
  52902. - License along with the GNU C Library; if not, write to the Free
  52903. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  52904. - 02111-1307 USA. */
  52905. + License along with the GNU C Library; if not, see
  52906. + <http://www.gnu.org/licenses/>. */
  52907. #ifndef _SYS_ELF_H
  52908. #define _SYS_ELF_H 1
  52909. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/sys/procfs.h uClibc-git/libc/sysdeps/linux/avr32/sys/procfs.h
  52910. --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  52911. +++ uClibc-git/libc/sysdeps/linux/avr32/sys/procfs.h 2014-07-25 20:36:06.645333842 +0200
  52912. @@ -12,9 +12,8 @@
  52913. Lesser General Public License for more details.
  52914. You should have received a copy of the GNU Lesser General Public
  52915. - License along with the GNU C Library; if not, write to the Free
  52916. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  52917. - 02111-1307 USA. */
  52918. + License along with the GNU C Library; if not, see
  52919. + <http://www.gnu.org/licenses/>. */
  52920. #ifndef _SYS_PROCFS_H
  52921. #define _SYS_PROCFS_H 1
  52922. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/sys/ucontext.h uClibc-git/libc/sysdeps/linux/avr32/sys/ucontext.h
  52923. --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  52924. +++ uClibc-git/libc/sysdeps/linux/avr32/sys/ucontext.h 2014-07-25 20:36:06.645333842 +0200
  52925. @@ -12,9 +12,8 @@
  52926. Lesser General Public License for more details.
  52927. You should have received a copy of the GNU Lesser General Public
  52928. - License along with the GNU C Library; if not, write to the Free
  52929. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  52930. - 02111-1307 USA. */
  52931. + License along with the GNU C Library; if not, see
  52932. + <http://www.gnu.org/licenses/>. */
  52933. /* Linux/AVR32 ABI compliant context switching support. */
  52934. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/avr32/vfork.S uClibc-git/libc/sysdeps/linux/avr32/vfork.S
  52935. --- uClibc-0.9.33.2/libc/sysdeps/linux/avr32/vfork.S 2012-05-15 09:20:09.000000000 +0200
  52936. +++ uClibc-git/libc/sysdeps/linux/avr32/vfork.S 2014-07-25 20:36:06.645333842 +0200
  52937. @@ -17,10 +17,10 @@
  52938. * Fortunately, the Linux kernel preserves LR across system calls.
  52939. */
  52940. -#include <features.h>
  52941. #include <sys/syscall.h>
  52942. .global __vfork
  52943. + .hidden __vfork
  52944. .type __vfork,@function
  52945. .align 1
  52946. __vfork:
  52947. @@ -55,4 +55,4 @@
  52948. .size __vfork, . - __vfork
  52949. weak_alias(__vfork,vfork)
  52950. -libc_hidden_weak(vfork)
  52951. +libc_hidden_def(vfork)
  52952. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/elf-fdpic.h uClibc-git/libc/sysdeps/linux/bfin/bits/elf-fdpic.h
  52953. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/elf-fdpic.h 2012-05-15 09:20:09.000000000 +0200
  52954. +++ uClibc-git/libc/sysdeps/linux/bfin/bits/elf-fdpic.h 2014-07-25 20:36:06.677334010 +0200
  52955. @@ -22,8 +22,7 @@
  52956. You should have received a copy of the GNU Lesser General Public
  52957. License along with the GNU C Library; see the file COPYING.LIB. If
  52958. -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  52959. -Cambridge, MA 02139, USA. */
  52960. +not, see <http://www.gnu.org/licenses/>. */
  52961. #ifndef _BITS_ELF_FDPIC_H
  52962. #define _BITS_ELF_FDPIC_H
  52963. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/fcntl.h uClibc-git/libc/sysdeps/linux/bfin/bits/fcntl.h
  52964. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  52965. +++ uClibc-git/libc/sysdeps/linux/bfin/bits/fcntl.h 2014-07-25 20:36:06.677334010 +0200
  52966. @@ -13,9 +13,8 @@
  52967. Lesser General Public License for more details.
  52968. You should have received a copy of the GNU Lesser General Public
  52969. - License along with the GNU C Library; if not, write to the Free
  52970. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  52971. - 02111-1307 USA. */
  52972. + License along with the GNU C Library; if not, see
  52973. + <http://www.gnu.org/licenses/>. */
  52974. #ifndef _FCNTL_H
  52975. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  52976. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/huge_val.h uClibc-git/libc/sysdeps/linux/bfin/bits/huge_val.h
  52977. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/huge_val.h 2012-05-15 09:20:09.000000000 +0200
  52978. +++ uClibc-git/libc/sysdeps/linux/bfin/bits/huge_val.h 2014-07-25 20:36:06.677334010 +0200
  52979. @@ -16,9 +16,8 @@
  52980. Lesser General Public License for more details.
  52981. You should have received a copy of the GNU Lesser General Public
  52982. - License along with the GNU C Library; if not, write to the Free
  52983. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  52984. - 02111-1307 USA. */
  52985. + License along with the GNU C Library; if not, see
  52986. + <http://www.gnu.org/licenses/>. */
  52987. #ifndef _MATH_H
  52988. # error "Never use <bits/huge_val.h> directly; include <math.h> instead."
  52989. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/bfin/bits/kernel_types.h
  52990. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
  52991. +++ uClibc-git/libc/sysdeps/linux/bfin/bits/kernel_types.h 2014-07-25 20:36:06.677334010 +0200
  52992. @@ -32,6 +32,8 @@
  52993. typedef unsigned short __kernel_old_gid_t;
  52994. typedef long long __kernel_loff_t;
  52995. typedef __kernel_dev_t __kernel_old_dev_t;
  52996. +typedef long __kernel_long_t;
  52997. +typedef unsigned long __kernel_ulong_t;
  52998. typedef struct {
  52999. #ifdef __USE_ALL
  53000. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/setjmp.h uClibc-git/libc/sysdeps/linux/bfin/bits/setjmp.h
  53001. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  53002. +++ uClibc-git/libc/sysdeps/linux/bfin/bits/setjmp.h 2014-07-25 20:36:06.677334010 +0200
  53003. @@ -12,9 +12,8 @@
  53004. Lesser General Public License for more details.
  53005. You should have received a copy of the GNU Lesser General Public
  53006. - License along with the GNU C Library; if not, write to the Free
  53007. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53008. - 02111-1307 USA. */
  53009. + License along with the GNU C Library; if not, see
  53010. + <http://www.gnu.org/licenses/>. */
  53011. /* Define the machine-dependent type `jmp_buf'. bfin version. Lineo, Inc. 2001*/
  53012. #ifndef _BITS_SETJMP_H
  53013. @@ -24,7 +23,6 @@
  53014. # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
  53015. #endif
  53016. -#ifndef _ASM
  53017. /* Jump buffer contains r7-r4, p5-p3, fp, sp and pc. Other registers are not saved. */
  53018. typedef struct
  53019. {
  53020. @@ -45,13 +43,4 @@
  53021. unsigned long pc;
  53022. }__jmp_buf[1];
  53023. -#endif
  53024. -
  53025. -#define __JMP_BUF_SP 8
  53026. -
  53027. -/* Test if longjmp to JMPBUF would unwind the frame
  53028. - containing a local variable at ADDRESS. */
  53029. -#define _JMPBUF_UNWINDS(jmpbuf, address) \
  53030. - ((void *) (address) < (void *) (jmpbuf)->fp)
  53031. -
  53032. #endif /* bits/setjmp.h */
  53033. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/sigcontextinfo.h uClibc-git/libc/sysdeps/linux/bfin/bits/sigcontextinfo.h
  53034. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
  53035. +++ uClibc-git/libc/sysdeps/linux/bfin/bits/sigcontextinfo.h 2014-07-25 20:36:06.677334010 +0200
  53036. @@ -13,9 +13,8 @@
  53037. Lesser General Public License for more details.
  53038. You should have received a copy of the GNU Lesser General Public
  53039. - License along with the GNU C Library; if not, write to the Free
  53040. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53041. - 02111-1307 USA. */
  53042. + License along with the GNU C Library; if not, see
  53043. + <http://www.gnu.org/licenses/>. */
  53044. #define SIGCONTEXT int _code, struct sigcontext *
  53045. #define SIGCONTEXT_EXTRA_ARGS _code,
  53046. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/bfin/bits/stackinfo.h
  53047. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  53048. +++ uClibc-git/libc/sysdeps/linux/bfin/bits/stackinfo.h 2014-07-25 20:36:06.677334010 +0200
  53049. @@ -12,9 +12,8 @@
  53050. Lesser General Public License for more details.
  53051. You should have received a copy of the GNU Lesser General Public
  53052. - License along with the GNU C Library; if not, write to the Free
  53053. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53054. - 02111-1307 USA. */
  53055. + License along with the GNU C Library; if not, see
  53056. + <http://www.gnu.org/licenses/>. */
  53057. /* This file contains a bit of information about the stack allocation
  53058. of the processor. */
  53059. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/typesizes.h uClibc-git/libc/sysdeps/linux/bfin/bits/typesizes.h
  53060. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/typesizes.h 2012-05-15 09:20:09.000000000 +0200
  53061. +++ uClibc-git/libc/sysdeps/linux/bfin/bits/typesizes.h 2014-07-25 20:36:06.677334010 +0200
  53062. @@ -13,9 +13,8 @@
  53063. Lesser General Public License for more details.
  53064. You should have received a copy of the GNU Lesser General Public
  53065. - License along with the GNU C Library; if not, write to the Free
  53066. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53067. - 02111-1307 USA. */
  53068. + License along with the GNU C Library; if not, see
  53069. + <http://www.gnu.org/licenses/>. */
  53070. #ifndef _BITS_TYPES_H
  53071. # error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
  53072. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/bfin/bits/uClibc_arch_features.h
  53073. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  53074. +++ uClibc-git/libc/sysdeps/linux/bfin/bits/uClibc_arch_features.h 2014-07-25 20:36:06.677334010 +0200
  53075. @@ -11,8 +11,8 @@
  53076. /* can your target use syscall6() for mmap ? */
  53077. #define __UCLIBC_MMAP_HAS_6_ARGS__
  53078. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  53079. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  53080. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  53081. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  53082. /* does your target have a broken create_module() ? */
  53083. #undef __UCLIBC_BROKEN_CREATE_MODULE__
  53084. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/wordsize.h uClibc-git/libc/sysdeps/linux/bfin/bits/wordsize.h
  53085. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
  53086. +++ uClibc-git/libc/sysdeps/linux/bfin/bits/wordsize.h 2014-07-25 20:36:06.677334010 +0200
  53087. @@ -12,8 +12,7 @@
  53088. Lesser General Public License for more details.
  53089. You should have received a copy of the GNU Lesser General Public
  53090. - License along with the GNU C Library; if not, write to the Free
  53091. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53092. - 02111-1307 USA. */
  53093. + License along with the GNU C Library; if not, see
  53094. + <http://www.gnu.org/licenses/>. */
  53095. #define __WORDSIZE 32
  53096. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/cacheflush.c uClibc-git/libc/sysdeps/linux/bfin/cacheflush.c
  53097. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/cacheflush.c 2012-05-15 09:20:09.000000000 +0200
  53098. +++ uClibc-git/libc/sysdeps/linux/bfin/cacheflush.c 2014-07-25 20:36:06.677334010 +0200
  53099. @@ -6,9 +6,10 @@
  53100. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  53101. */
  53102. -#include <unistd.h>
  53103. -#include <errno.h>
  53104. #include <sys/syscall.h>
  53105. -#include <sys/cachectl.h>
  53106. -_syscall3 (int, cacheflush, void *, start, const int, nbytes, const int, flags)
  53107. +#ifdef __NR_cacheflush
  53108. +# include <sys/cachectl.h>
  53109. +
  53110. +_syscall3 (int, cacheflush, void *, addr, const int, nbytes, const int, flags)
  53111. +#endif
  53112. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/crt1.S uClibc-git/libc/sysdeps/linux/bfin/crt1.S
  53113. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/crt1.S 2012-05-15 09:20:09.000000000 +0200
  53114. +++ uClibc-git/libc/sysdeps/linux/bfin/crt1.S 2014-07-25 20:36:06.677334010 +0200
  53115. @@ -14,8 +14,7 @@
  53116. You should have received a copy of the GNU Library General Public
  53117. License along with the GNU C Library; see the file COPYING.LIB. If
  53118. -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  53119. -Cambridge, MA 02139, USA. */
  53120. +not, see <http://www.gnu.org/licenses/>. */
  53121. /* When we enter this piece of code, the user stack looks like this:
  53122. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/crti.S uClibc-git/libc/sysdeps/linux/bfin/crti.S
  53123. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/crti.S 2012-05-15 09:20:09.000000000 +0200
  53124. +++ uClibc-git/libc/sysdeps/linux/bfin/crti.S 2014-07-25 20:36:06.677334010 +0200
  53125. @@ -16,9 +16,8 @@
  53126. GNU General Public License for more details.
  53127. You should have received a copy of the GNU General Public License
  53128. -along with GCC; see the file COPYING. If not, write to
  53129. -the Free Software Foundation, 59 Temple Place - Suite 330,
  53130. -Boston, MA 02111-1307, USA. */
  53131. +along with GCC; see the file COPYING. If not, see
  53132. +<http://www.gnu.org/licenses/>. */
  53133. /* As a special exception, if you link this library with files
  53134. compiled with GCC to produce an executable, this does not cause
  53135. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/crtn.S uClibc-git/libc/sysdeps/linux/bfin/crtn.S
  53136. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/crtn.S 2012-05-15 09:20:09.000000000 +0200
  53137. +++ uClibc-git/libc/sysdeps/linux/bfin/crtn.S 2014-07-25 20:36:06.677334010 +0200
  53138. @@ -16,9 +16,8 @@
  53139. GNU General Public License for more details.
  53140. You should have received a copy of the GNU General Public License
  53141. -along with GCC; see the file COPYING. If not, write to
  53142. -the Free Software Foundation, 59 Temple Place - Suite 330,
  53143. -Boston, MA 02111-1307, USA. */
  53144. +along with GCC; see the file COPYING. If not, see
  53145. +<http://www.gnu.org/licenses/>. */
  53146. /* As a special exception, if you link this library with files
  53147. compiled with GCC to produce an executable, this does not cause
  53148. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/crtreloc.c uClibc-git/libc/sysdeps/linux/bfin/crtreloc.c
  53149. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/crtreloc.c 2012-05-15 09:20:09.000000000 +0200
  53150. +++ uClibc-git/libc/sysdeps/linux/bfin/crtreloc.c 2014-07-25 20:36:06.677334010 +0200
  53151. @@ -23,8 +23,7 @@
  53152. You should have received a copy of the GNU Lesser General Public
  53153. License along with the GNU C Library; see the file COPYING.LIB. If
  53154. -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  53155. -Cambridge, MA 02139, USA. */
  53156. +not, see <http://www.gnu.org/licenses/>. */
  53157. #ifdef __BFIN_FDPIC__
  53158. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/jmpbuf-offsets.h uClibc-git/libc/sysdeps/linux/bfin/jmpbuf-offsets.h
  53159. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
  53160. +++ uClibc-git/libc/sysdeps/linux/bfin/jmpbuf-offsets.h 2014-07-25 20:36:06.677334010 +0200
  53161. @@ -0,0 +1,8 @@
  53162. +/* Private macros for accessing __jmp_buf contents. BFIN version. */
  53163. +/*
  53164. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  53165. + *
  53166. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  53167. + */
  53168. +
  53169. +#define __JMP_BUF_SP 8
  53170. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/bfin/jmpbuf-unwind.h
  53171. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  53172. +++ uClibc-git/libc/sysdeps/linux/bfin/jmpbuf-unwind.h 2014-07-25 20:36:06.677334010 +0200
  53173. @@ -0,0 +1,11 @@
  53174. +/*
  53175. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  53176. + *
  53177. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  53178. + */
  53179. +#include <setjmp.h>
  53180. +
  53181. +/* Test if longjmp to JMPBUF would unwind the frame
  53182. + containing a local variable at ADDRESS. */
  53183. +#define _JMPBUF_UNWINDS(jmpbuf, address) \
  53184. + ((void *) (address) < (void *) (jmpbuf)->fp)
  53185. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/Makefile.arch uClibc-git/libc/sysdeps/linux/bfin/Makefile.arch
  53186. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
  53187. +++ uClibc-git/libc/sysdeps/linux/bfin/Makefile.arch 2014-07-25 20:36:06.661333926 +0200
  53188. @@ -5,9 +5,11 @@
  53189. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  53190. #
  53191. -CSRC := bsdsetjmp.c clone.c \
  53192. - sram-alloc.c sram-free.c dma-memcpy.c cacheflush.c
  53193. +CSRC-y := bsdsetjmp.c clone.c \
  53194. + sram-alloc.c sram-free.c dma-memcpy.c
  53195. -SSRC := __longjmp.S setjmp.S bsd-_setjmp.S
  53196. +SSRC-y := __longjmp.S setjmp.S bsd-_setjmp.S
  53197. +
  53198. +CSRC-$(UCLIBC_LINUX_SPECIFIC) += cacheflush.c
  53199. ARCH_HEADERS := bfin_fixed_code.h bfin_l1layout.h bfin_sram.h
  53200. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/sys/cachectl.h uClibc-git/libc/sysdeps/linux/bfin/sys/cachectl.h
  53201. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/sys/cachectl.h 2012-05-15 09:20:09.000000000 +0200
  53202. +++ uClibc-git/libc/sysdeps/linux/bfin/sys/cachectl.h 2014-07-25 20:36:06.689334073 +0200
  53203. @@ -18,7 +18,7 @@
  53204. __BEGIN_DECLS
  53205. -extern int cacheflush (void *addr, __const int nbytes, __const int flags);
  53206. +extern int cacheflush (void *addr, const int nbytes, const int flags);
  53207. __END_DECLS
  53208. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/sys/elf.h uClibc-git/libc/sysdeps/linux/bfin/sys/elf.h
  53209. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/sys/elf.h 2012-05-15 09:20:09.000000000 +0200
  53210. +++ uClibc-git/libc/sysdeps/linux/bfin/sys/elf.h 2014-07-25 20:36:06.689334073 +0200
  53211. @@ -12,9 +12,8 @@
  53212. Lesser General Public License for more details.
  53213. You should have received a copy of the GNU Lesser General Public
  53214. - License along with the GNU C Library; if not, write to the Free
  53215. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53216. - 02111-1307 USA. */
  53217. + License along with the GNU C Library; if not, see
  53218. + <http://www.gnu.org/licenses/>. */
  53219. #ifndef _SYS_ELF_H
  53220. #define _SYS_ELF_H 1
  53221. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/sys/io.h uClibc-git/libc/sysdeps/linux/bfin/sys/io.h
  53222. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/sys/io.h 2012-05-15 09:20:09.000000000 +0200
  53223. +++ uClibc-git/libc/sysdeps/linux/bfin/sys/io.h 2014-07-25 20:36:06.689334073 +0200
  53224. @@ -12,9 +12,8 @@
  53225. Lesser General Public License for more details.
  53226. You should have received a copy of the GNU Lesser General Public
  53227. - License along with the GNU C Library; if not, write to the Free
  53228. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53229. - 02111-1307 USA. */
  53230. + License along with the GNU C Library; if not, see
  53231. + <http://www.gnu.org/licenses/>. */
  53232. #ifndef _SYS_IO_H
  53233. @@ -23,17 +22,18 @@
  53234. __BEGIN_DECLS
  53235. +#if defined __UCLIBC_LINUX_SPECIFIC__
  53236. /* If TURN_ON is TRUE, request for permission to do direct i/o on the
  53237. port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
  53238. permission off for that range. This call requires root privileges. */
  53239. extern int ioperm (unsigned long int __from, unsigned long int __num,
  53240. int __turn_on) __THROW;
  53241. -libc_hidden_proto(ioperm)
  53242. /* Set the I/O privilege level to LEVEL. If LEVEL is nonzero,
  53243. permission to access any I/O port is granted. This call requires
  53244. root privileges. */
  53245. extern int iopl (int __level) __THROW;
  53246. +#endif /* __UCLIBC_LINUX_SPECIFIC__ */
  53247. /* The functions that actually perform reads and writes. */
  53248. extern unsigned char inb (unsigned long int port) __THROW;
  53249. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/sys/procfs.h uClibc-git/libc/sysdeps/linux/bfin/sys/procfs.h
  53250. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  53251. +++ uClibc-git/libc/sysdeps/linux/bfin/sys/procfs.h 2014-07-25 20:36:06.689334073 +0200
  53252. @@ -12,9 +12,8 @@
  53253. Lesser General Public License for more details.
  53254. You should have received a copy of the GNU Lesser General Public
  53255. - License along with the GNU C Library; if not, write to the Free
  53256. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53257. - 02111-1307 USA. */
  53258. + License along with the GNU C Library; if not, see
  53259. + <http://www.gnu.org/licenses/>. */
  53260. #ifndef _SYS_PROCFS_H
  53261. #define _SYS_PROCFS_H 1
  53262. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/bfin/sys/ucontext.h uClibc-git/libc/sysdeps/linux/bfin/sys/ucontext.h
  53263. --- uClibc-0.9.33.2/libc/sysdeps/linux/bfin/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  53264. +++ uClibc-git/libc/sysdeps/linux/bfin/sys/ucontext.h 2014-07-25 20:36:06.689334073 +0200
  53265. @@ -12,9 +12,8 @@
  53266. Lesser General Public License for more details.
  53267. You should have received a copy of the GNU Lesser General Public
  53268. - License along with the GNU C Library; if not, write to the Free
  53269. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53270. - 02111-1307 USA. */
  53271. + License along with the GNU C Library; if not, see
  53272. + <http://www.gnu.org/licenses/>. */
  53273. /* System V/blackfin ABI compliant context switching support. */
  53274. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/byteswap.h uClibc-git/libc/sysdeps/linux/c6x/bits/byteswap.h
  53275. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/byteswap.h 2012-05-15 09:20:09.000000000 +0200
  53276. +++ uClibc-git/libc/sysdeps/linux/c6x/bits/byteswap.h 2014-07-25 20:36:06.721334241 +0200
  53277. @@ -14,9 +14,8 @@
  53278. * for more details.
  53279. *
  53280. * You should have received a copy of the GNU Library General Public License
  53281. - * along with this program; if not, write to the Free Software Foundation,
  53282. - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  53283. - *
  53284. + * along with this program; see the file COPYING.LIB. If not, see
  53285. + * <http://www.gnu.org/licenses/>.
  53286. */
  53287. #ifndef _ASM_BITS_BYTESWAP_H
  53288. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/elf-dsbt.h uClibc-git/libc/sysdeps/linux/c6x/bits/elf-dsbt.h
  53289. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/elf-dsbt.h 2012-05-15 09:20:09.000000000 +0200
  53290. +++ uClibc-git/libc/sysdeps/linux/c6x/bits/elf-dsbt.h 2014-07-25 20:36:06.721334241 +0200
  53291. @@ -25,8 +25,7 @@
  53292. You should have received a copy of the GNU Lesser General Public
  53293. License along with the GNU C Library; see the file COPYING.LIB. If
  53294. -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  53295. -Cambridge, MA 02139, USA. */
  53296. +not, see <http://www.gnu.org/licenses/>. */
  53297. #ifndef _BITS_ELF_DSBT_H
  53298. #define _BITS_ELF_DSBT_H
  53299. @@ -59,15 +58,10 @@
  53300. struct elf32_dsbt_loadmap {
  53301. /* Protocol version number, must be zero. */
  53302. - Elf32_Word version;
  53303. -
  53304. - /* Pointer to DSBT */
  53305. - unsigned *dsbt_table;
  53306. - unsigned dsbt_size;
  53307. - unsigned dsbt_index;
  53308. + Elf32_Half version;
  53309. /* number of segments */
  53310. - Elf32_Word nsegs;
  53311. + Elf32_Half nsegs;
  53312. /* The actual memory map. */
  53313. struct elf32_dsbt_loadseg segs[0];
  53314. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/fcntl.h uClibc-git/libc/sysdeps/linux/c6x/bits/fcntl.h
  53315. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  53316. +++ uClibc-git/libc/sysdeps/linux/c6x/bits/fcntl.h 2014-07-25 20:36:06.721334241 +0200
  53317. @@ -13,9 +13,8 @@
  53318. Lesser General Public License for more details.
  53319. You should have received a copy of the GNU Lesser General Public
  53320. - License along with the GNU C Library; if not, write to the Free
  53321. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53322. - 02111-1307 USA. */
  53323. + License along with the GNU C Library; if not, see
  53324. + <http://www.gnu.org/licenses/>. */
  53325. #ifndef _FCNTL_H
  53326. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  53327. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/ipc.h uClibc-git/libc/sysdeps/linux/c6x/bits/ipc.h
  53328. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/ipc.h 2012-05-15 09:20:09.000000000 +0200
  53329. +++ uClibc-git/libc/sysdeps/linux/c6x/bits/ipc.h 2014-07-25 20:36:06.721334241 +0200
  53330. @@ -12,9 +12,8 @@
  53331. Lesser General Public License for more details.
  53332. You should have received a copy of the GNU Lesser General Public
  53333. - License along with the GNU C Library; if not, write to the Free
  53334. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53335. - 02111-1307 USA. */
  53336. + License along with the GNU C Library; if not, see
  53337. + <http://www.gnu.org/licenses/>. */
  53338. #ifndef _SYS_IPC_H
  53339. # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
  53340. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/c6x/bits/kernel_types.h
  53341. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
  53342. +++ uClibc-git/libc/sysdeps/linux/c6x/bits/kernel_types.h 2014-07-25 20:36:06.721334241 +0200
  53343. @@ -22,6 +22,8 @@
  53344. typedef unsigned int __kernel_old_uid_t;
  53345. typedef unsigned int __kernel_old_gid_t;
  53346. typedef unsigned int __kernel_old_dev_t;
  53347. +typedef long __kernel_long_t;
  53348. +typedef unsigned long __kernel_ulong_t;
  53349. typedef unsigned int __kernel_size_t;
  53350. typedef int __kernel_ssize_t;
  53351. typedef int __kernel_ptrdiff_t;
  53352. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/mathdef.h uClibc-git/libc/sysdeps/linux/c6x/bits/mathdef.h
  53353. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
  53354. +++ uClibc-git/libc/sysdeps/linux/c6x/bits/mathdef.h 2014-07-25 20:36:06.721334241 +0200
  53355. @@ -12,9 +12,8 @@
  53356. Lesser General Public License for more details.
  53357. You should have received a copy of the GNU Lesser General Public
  53358. - License along with the GNU C Library; if not, write to the Free
  53359. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53360. - 02111-1307 USA. */
  53361. + License along with the GNU C Library; if not, see
  53362. + <http://www.gnu.org/licenses/>. */
  53363. #if !defined _MATH_H && !defined _COMPLEX_H
  53364. # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
  53365. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/nan.h uClibc-git/libc/sysdeps/linux/c6x/bits/nan.h
  53366. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/nan.h 2012-05-15 09:20:09.000000000 +0200
  53367. +++ uClibc-git/libc/sysdeps/linux/c6x/bits/nan.h 2014-07-25 20:36:06.721334241 +0200
  53368. @@ -13,9 +13,8 @@
  53369. Lesser General Public License for more details.
  53370. You should have received a copy of the GNU Lesser General Public
  53371. - License along with the GNU C Library; if not, write to the Free
  53372. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53373. - 02111-1307 USA. */
  53374. + License along with the GNU C Library; if not, see
  53375. + <http://www.gnu.org/licenses/>. */
  53376. #ifndef _MATH_H
  53377. # error "Never use <bits/nan.h> directly; include <math.h> instead."
  53378. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/poll.h uClibc-git/libc/sysdeps/linux/c6x/bits/poll.h
  53379. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/poll.h 2012-05-15 09:20:09.000000000 +0200
  53380. +++ uClibc-git/libc/sysdeps/linux/c6x/bits/poll.h 2014-07-25 20:36:06.721334241 +0200
  53381. @@ -12,9 +12,8 @@
  53382. Lesser General Public License for more details.
  53383. You should have received a copy of the GNU Lesser General Public
  53384. - License along with the GNU C Library; if not, write to the Free
  53385. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53386. - 02111-1307 USA. */
  53387. + License along with the GNU C Library; if not, see
  53388. + <http://www.gnu.org/licenses/>. */
  53389. #ifndef _SYS_POLL_H
  53390. # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
  53391. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/resource.h uClibc-git/libc/sysdeps/linux/c6x/bits/resource.h
  53392. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/resource.h 2012-05-15 09:20:09.000000000 +0200
  53393. +++ uClibc-git/libc/sysdeps/linux/c6x/bits/resource.h 2014-07-25 20:36:06.721334241 +0200
  53394. @@ -13,9 +13,8 @@
  53395. Lesser General Public License for more details.
  53396. You should have received a copy of the GNU Lesser General Public
  53397. - License along with the GNU C Library; if not, write to the Free
  53398. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53399. - 02111-1307 USA. */
  53400. + License along with the GNU C Library; if not, see
  53401. + <http://www.gnu.org/licenses/>. */
  53402. #ifndef _SYS_RESOURCE_H
  53403. # error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
  53404. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/setjmp.h uClibc-git/libc/sysdeps/linux/c6x/bits/setjmp.h
  53405. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  53406. +++ uClibc-git/libc/sysdeps/linux/c6x/bits/setjmp.h 2014-07-25 20:36:06.721334241 +0200
  53407. @@ -14,12 +14,14 @@
  53408. * for more details.
  53409. *
  53410. * You should have received a copy of the GNU Library General Public License
  53411. - * along with this program; if not, write to the Free Software Foundation,
  53412. - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  53413. - *
  53414. + * along with this program; see the file COPYING.LIB. If not, see
  53415. + * <http://www.gnu.org/licenses/>.
  53416. */
  53417. -#ifndef _SETJMP_H
  53418. +#ifndef _BITS_SETJMP_H
  53419. +#define _BITS_SETJMP_H 1
  53420. +
  53421. +#if !defined _SETJMP_H && !defined _PTHREAD_H
  53422. # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
  53423. #endif
  53424. @@ -28,12 +30,4 @@
  53425. unsigned long __pc; /* the return address */
  53426. } __jmp_buf[1];
  53427. -/* the stack pointer (B15) */
  53428. -#define JP_SP 11
  53429. -
  53430. -/* Test if longjmp to JMPBUF would unwind the frame
  53431. - containing a local variable at ADDRESS. */
  53432. -#define _JMPBUF_UNWINDS(jmpbuf, address) \
  53433. - ((void *) (address) < (void *) (jmpbuf)->__regs[JP_SP])
  53434. -
  53435. -
  53436. +#endif
  53437. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/sigcontextinfo.h uClibc-git/libc/sysdeps/linux/c6x/bits/sigcontextinfo.h
  53438. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
  53439. +++ uClibc-git/libc/sysdeps/linux/c6x/bits/sigcontextinfo.h 2014-07-25 20:36:06.721334241 +0200
  53440. @@ -13,9 +13,8 @@
  53441. Lesser General Public License for more details.
  53442. You should have received a copy of the GNU Lesser General Public
  53443. - License along with the GNU C Library; if not, write to the Free
  53444. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53445. - 02111-1307 USA. */
  53446. + License along with the GNU C Library; if not, see
  53447. + <http://www.gnu.org/licenses/>. */
  53448. #define SIGCONTEXT int _code, struct sigcontext *
  53449. #define SIGCONTEXT_EXTRA_ARGS _code,
  53450. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/c6x/bits/stackinfo.h
  53451. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  53452. +++ uClibc-git/libc/sysdeps/linux/c6x/bits/stackinfo.h 2014-07-25 20:36:06.721334241 +0200
  53453. @@ -12,9 +12,8 @@
  53454. Lesser General Public License for more details.
  53455. You should have received a copy of the GNU Lesser General Public
  53456. - License along with the GNU C Library; if not, write to the Free
  53457. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53458. - 02111-1307 USA. */
  53459. + License along with the GNU C Library; if not, see
  53460. + <http://www.gnu.org/licenses/>. */
  53461. /* This file contains a bit of information about the stack allocation
  53462. of the processor. */
  53463. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/syscalls.h uClibc-git/libc/sysdeps/linux/c6x/bits/syscalls.h
  53464. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/syscalls.h 2012-05-15 09:20:09.000000000 +0200
  53465. +++ uClibc-git/libc/sysdeps/linux/c6x/bits/syscalls.h 2014-07-25 20:36:06.721334241 +0200
  53466. @@ -37,7 +37,7 @@
  53467. #undef INLINE_SYSCALL
  53468. #define INLINE_SYSCALL(name, nr, args...) \
  53469. ({ unsigned int _inline_sys_result = INTERNAL_SYSCALL (name, , nr, args); \
  53470. - if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_inline_sys_result, ), 0)) \
  53471. + if (unlikely (INTERNAL_SYSCALL_ERROR_P (_inline_sys_result, ))) \
  53472. { \
  53473. __set_errno (INTERNAL_SYSCALL_ERRNO (_inline_sys_result, )); \
  53474. _inline_sys_result = (unsigned int) -1; \
  53475. @@ -103,7 +103,7 @@
  53476. register long __B6 __asm__ ("B6") = (long)(arg4); \
  53477. register long __A8 __asm__ ("A8") = (long)(arg5); \
  53478. register long __g1 __asm__ ("g1") = __NR_clone; \
  53479. - __asm __volatile (__CLONE_SYSCALL_STRING : \
  53480. + __asm__ __volatile__ (__CLONE_SYSCALL_STRING : \
  53481. "=r" (__g1), "=r" (__A4), "=r" (__B4) : \
  53482. "0" (__g1), "1" (__A4), "2" (__B4), \
  53483. "r" (__A6), "r" (__B6), "r" (__A8) : \
  53484. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/c6x/bits/uClibc_arch_features.h
  53485. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  53486. +++ uClibc-git/libc/sysdeps/linux/c6x/bits/uClibc_arch_features.h 2014-07-25 20:36:06.721334241 +0200
  53487. @@ -12,8 +12,8 @@
  53488. /* can your target use syscall6() for mmap ? */
  53489. #define __UCLIBC_MMAP_HAS_6_ARGS__
  53490. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  53491. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  53492. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  53493. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  53494. /* does your target have a broken create_module() ? */
  53495. #undef __UCLIBC_BROKEN_CREATE_MODULE__
  53496. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/wordsize.h uClibc-git/libc/sysdeps/linux/c6x/bits/wordsize.h
  53497. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
  53498. +++ uClibc-git/libc/sysdeps/linux/c6x/bits/wordsize.h 2014-07-25 20:36:06.721334241 +0200
  53499. @@ -12,8 +12,7 @@
  53500. Lesser General Public License for more details.
  53501. You should have received a copy of the GNU Lesser General Public
  53502. - License along with the GNU C Library; if not, write to the Free
  53503. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53504. - 02111-1307 USA. */
  53505. + License along with the GNU C Library; if not, see
  53506. + <http://www.gnu.org/licenses/>. */
  53507. #define __WORDSIZE 32
  53508. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/brk.c uClibc-git/libc/sysdeps/linux/c6x/brk.c
  53509. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/brk.c 2012-05-15 09:20:09.000000000 +0200
  53510. +++ uClibc-git/libc/sysdeps/linux/c6x/brk.c 2014-07-25 20:36:06.721334241 +0200
  53511. @@ -14,9 +14,8 @@
  53512. * for more details.
  53513. *
  53514. * You should have received a copy of the GNU Library General Public License
  53515. - * along with this program; if not, write to the Free Software Foundation,
  53516. - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  53517. - *
  53518. + * along with this program; see the file COPYING.LIB. If not, see
  53519. + * <http://www.gnu.org/licenses/>.
  53520. */
  53521. #include <unistd.h>
  53522. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bsd-_setjmp.s uClibc-git/libc/sysdeps/linux/c6x/bsd-_setjmp.s
  53523. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bsd-_setjmp.s 2012-05-15 09:20:09.000000000 +0200
  53524. +++ uClibc-git/libc/sysdeps/linux/c6x/bsd-_setjmp.s 2014-07-25 20:36:06.721334241 +0200
  53525. @@ -14,8 +14,7 @@
  53526. ; for more details.
  53527. ;
  53528. ; You should have received a copy of the GNU Library General Public License
  53529. - ; along with this program; if not, write to the Free Software Foundation,
  53530. - ; Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  53531. + ; along with this program; if not, see <http://www.gnu.org/licenses/>.
  53532. ;
  53533. .global _setjmp
  53534. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bsd-setjmp.S uClibc-git/libc/sysdeps/linux/c6x/bsd-setjmp.S
  53535. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/bsd-setjmp.S 2012-05-15 09:20:09.000000000 +0200
  53536. +++ uClibc-git/libc/sysdeps/linux/c6x/bsd-setjmp.S 2014-07-25 20:36:06.721334241 +0200
  53537. @@ -14,8 +14,7 @@
  53538. ; for more details.
  53539. ;
  53540. ; You should have received a copy of the GNU Library General Public License
  53541. - ; along with this program; if not, write to the Free Software Foundation,
  53542. - ; Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  53543. + ; along with this program; if not, see <http://www.gnu.org/licenses/>.
  53544. ;
  53545. .global setjmp
  53546. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/clone.S uClibc-git/libc/sysdeps/linux/c6x/clone.S
  53547. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/clone.S 2012-05-15 09:20:09.000000000 +0200
  53548. +++ uClibc-git/libc/sysdeps/linux/c6x/clone.S 2014-07-25 20:36:06.721334241 +0200
  53549. @@ -14,8 +14,7 @@
  53550. ; for more details.
  53551. ;
  53552. ; You should have received a copy of the GNU Library General Public License
  53553. - ; along with this program; if not, write to the Free Software Foundation,
  53554. - ; Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  53555. + ; along with this program; if not, see <http://www.gnu.org/licenses/>.
  53556. ;
  53557. #define __ASSEMBLY__
  53558. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/crt1.S uClibc-git/libc/sysdeps/linux/c6x/crt1.S
  53559. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/crt1.S 2012-05-15 09:20:09.000000000 +0200
  53560. +++ uClibc-git/libc/sysdeps/linux/c6x/crt1.S 2014-07-25 20:36:06.721334241 +0200
  53561. @@ -15,8 +15,7 @@
  53562. ; for more details.
  53563. ;
  53564. ; You should have received a copy of the GNU Library General Public License
  53565. -; along with this program; if not, write to the Free Software Foundation,
  53566. -; Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  53567. +; along with this program; if not, see <http://www.gnu.org/licenses/>.
  53568. ;
  53569. .text
  53570. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/jmpbuf-offsets.h uClibc-git/libc/sysdeps/linux/c6x/jmpbuf-offsets.h
  53571. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
  53572. +++ uClibc-git/libc/sysdeps/linux/c6x/jmpbuf-offsets.h 2014-07-25 20:36:06.721334241 +0200
  53573. @@ -0,0 +1,22 @@
  53574. +/* Private macros for accessing __jmp_buf contents. c6x version.
  53575. + * Port of uClibc for TMS320C6000 DSP architecture
  53576. + * Copyright (C) 2004 Texas Instruments Incorporated
  53577. + * Author of TMS320C6000 port: Aurelien Jacquiot
  53578. + *
  53579. + * This program is free software; you can redistribute it and/or modify it
  53580. + * under the terms of the GNU Library General Public License as published by
  53581. + * the Free Software Foundation; either version 2 of the License, or (at your
  53582. + * option) any later version.
  53583. + *
  53584. + * This program is distributed in the hope that it will be useful, but WITHOUT
  53585. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  53586. + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
  53587. + * for more details.
  53588. + *
  53589. + * You should have received a copy of the GNU Library General Public License
  53590. + * along with this program; see the file COPYING.LIB. If not, see
  53591. + * <http://www.gnu.org/licenses/>.
  53592. + */
  53593. +
  53594. +/* the stack pointer (B15) */
  53595. +#define JP_SP 11
  53596. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/c6x/jmpbuf-unwind.h
  53597. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  53598. +++ uClibc-git/libc/sysdeps/linux/c6x/jmpbuf-unwind.h 2014-07-25 20:36:06.721334241 +0200
  53599. @@ -0,0 +1,28 @@
  53600. +/*
  53601. + * Port of uClibc for TMS320C6000 DSP architecture
  53602. + * Copyright (C) 2004 Texas Instruments Incorporated
  53603. + * Author of TMS320C6000 port: Aurelien Jacquiot
  53604. + *
  53605. + * This program is free software; you can redistribute it and/or modify it
  53606. + * under the terms of the GNU Library General Public License as published by
  53607. + * the Free Software Foundation; either version 2 of the License, or (at your
  53608. + * option) any later version.
  53609. + *
  53610. + * This program is distributed in the hope that it will be useful, but WITHOUT
  53611. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  53612. + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
  53613. + * for more details.
  53614. + *
  53615. + * You should have received a copy of the GNU Library General Public License
  53616. + * along with this program; see the file COPYING.LIB. If not, see
  53617. + * <http://www.gnu.org/licenses/>.
  53618. + */
  53619. +#include <setjmp.h>
  53620. +#include <jmpbuf-offsets.h>
  53621. +
  53622. +/* Test if longjmp to JMPBUF would unwind the frame
  53623. + containing a local variable at ADDRESS. */
  53624. +#define _JMPBUF_UNWINDS(jmpbuf, address) \
  53625. + ((void *) (address) < (void *) (jmpbuf)->__regs[JP_SP])
  53626. +
  53627. +
  53628. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/__longjmp.S uClibc-git/libc/sysdeps/linux/c6x/__longjmp.S
  53629. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
  53630. +++ uClibc-git/libc/sysdeps/linux/c6x/__longjmp.S 2014-07-25 20:36:06.709334178 +0200
  53631. @@ -14,8 +14,7 @@
  53632. ; for more details.
  53633. ;
  53634. ; You should have received a copy of the GNU Library General Public License
  53635. - ; along with this program; if not, write to the Free Software Foundation,
  53636. - ; Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  53637. + ; along with this program; if not, see <http://www.gnu.org/licenses/>.
  53638. ;
  53639. .global __longjmp
  53640. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/Makefile.arch uClibc-git/libc/sysdeps/linux/c6x/Makefile.arch
  53641. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
  53642. +++ uClibc-git/libc/sysdeps/linux/c6x/Makefile.arch 2014-07-25 20:36:06.709334178 +0200
  53643. @@ -5,6 +5,6 @@
  53644. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  53645. #
  53646. -CSRC := brk.c pread_write.c syscall.c prctl.c
  53647. +CSRC-y := brk.c syscall.c prctl.c
  53648. -SSRC := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S _vfork.S
  53649. +SSRC-y := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S _vfork.S
  53650. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/pread_write.c uClibc-git/libc/sysdeps/linux/c6x/pread_write.c
  53651. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/pread_write.c 2012-05-15 09:20:09.000000000 +0200
  53652. +++ uClibc-git/libc/sysdeps/linux/c6x/pread_write.c 1970-01-01 01:00:00.000000000 +0100
  53653. @@ -1,103 +0,0 @@
  53654. -/* vi: set sw=4 ts=4:
  53655. - *
  53656. - * Copyright (C) 2002 by Erik Andersen <andersen@uclibc.org>
  53657. - * Based in part on the files
  53658. - * ./sysdeps/unix/sysv/linux/pwrite.c,
  53659. - * ./sysdeps/unix/sysv/linux/pread.c,
  53660. - * sysdeps/posix/pread.c
  53661. - * sysdeps/posix/pwrite.c
  53662. - * from GNU libc 2.2.5, but reworked considerably...
  53663. - *
  53664. - * This program is free software; you can redistribute it and/or modify it
  53665. - * under the terms of the GNU Library General Public License as published by
  53666. - * the Free Software Foundation; either version 2 of the License, or (at your
  53667. - * option) any later version.
  53668. - *
  53669. - * This program is distributed in the hope that it will be useful, but WITHOUT
  53670. - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  53671. - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
  53672. - * for more details.
  53673. - *
  53674. - * You should have received a copy of the GNU Library General Public License
  53675. - * along with this program; if not, write to the Free Software Foundation,
  53676. - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  53677. - */
  53678. -
  53679. -#define _LARGEFILE64_SOURCE
  53680. -#include <features.h>
  53681. -#undef __OPTIMIZE__
  53682. -/* We absolutely do _NOT_ want interfaces silently
  53683. - * * * renamed under us or very bad things will happen... */
  53684. -#ifdef __USE_FILE_OFFSET64
  53685. -# undef __USE_FILE_OFFSET64
  53686. -#endif
  53687. -
  53688. -
  53689. -#include <errno.h>
  53690. -#include <sys/types.h>
  53691. -#include <sys/syscall.h>
  53692. -#include <unistd.h>
  53693. -#include <stdint.h>
  53694. -
  53695. -extern __typeof(pread) __libc_pread;
  53696. -extern __typeof(pwrite) __libc_pwrite;
  53697. -#ifdef __UCLIBC_HAS_LFS__
  53698. -extern __typeof(pread64) __libc_pread64;
  53699. -extern __typeof(pwrite64) __libc_pwrite64;
  53700. -#endif
  53701. -
  53702. -#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */
  53703. -# ifdef __NR_pread
  53704. -# error "__NR_pread and __NR_pread64 both defined???"
  53705. -# endif
  53706. -# define __NR_pread __NR_pread64
  53707. -#endif
  53708. -
  53709. -#define __NR___syscall_pread __NR_pread
  53710. -static inline _syscall5(ssize_t, __syscall_pread, int, fd, void *, buf,
  53711. - size_t, count, off_t, offset_hi, off_t, offset_lo);
  53712. -
  53713. -ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
  53714. -{
  53715. - return(__syscall_pread(fd,buf,count,offset,offset >> 31));
  53716. -}
  53717. -weak_alias (__libc_pread, pread)
  53718. -
  53719. -#if defined __UCLIBC_HAS_LFS__
  53720. -ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
  53721. -{
  53722. - uint32_t low = offset & 0xffffffff;
  53723. - uint32_t high = offset >> 32;
  53724. - return(__syscall_pread(fd, buf, count, low, high));
  53725. -}
  53726. -weak_alias (__libc_pread64, pread64)
  53727. -#endif /* __UCLIBC_HAS_LFS__ */
  53728. -
  53729. -
  53730. -#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */
  53731. -# ifdef __NR_pwrite
  53732. -# error "__NR_pwrite and __NR_pwrite64 both defined???"
  53733. -# endif
  53734. -# define __NR_pwrite __NR_pwrite64
  53735. -#endif
  53736. -
  53737. -#define __NR___syscall_pwrite __NR_pwrite
  53738. -static inline _syscall5(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
  53739. - size_t, count, off_t, offset_hi, off_t, offset_lo);
  53740. -
  53741. -ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
  53742. -{
  53743. - return(__syscall_pwrite(fd,buf,count,offset,offset >> 31));
  53744. -}
  53745. -weak_alias (__libc_pwrite, pwrite)
  53746. -
  53747. -#if defined __UCLIBC_HAS_LFS__
  53748. -ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
  53749. -{
  53750. - uint32_t low = offset & 0xffffffff;
  53751. - uint32_t high = offset >> 32;
  53752. - return(__syscall_pwrite(fd, buf, count, low, high));
  53753. -}
  53754. -weak_alias (__libc_pwrite64, pwrite64)
  53755. -#endif /* __UCLIBC_HAS_LFS__ */
  53756. -
  53757. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/setjmp.s uClibc-git/libc/sysdeps/linux/c6x/setjmp.s
  53758. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/setjmp.s 2012-05-15 09:20:09.000000000 +0200
  53759. +++ uClibc-git/libc/sysdeps/linux/c6x/setjmp.s 2014-07-25 20:36:06.721334241 +0200
  53760. @@ -14,8 +14,7 @@
  53761. ; for more details.
  53762. ;
  53763. ; You should have received a copy of the GNU Library General Public License
  53764. - ; along with this program; if not, write to the Free Software Foundation,
  53765. - ; Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  53766. + ; along with this program; if not, see <http://www.gnu.org/licenses/>.
  53767. ;
  53768. .global __sigsetjmp
  53769. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sigaction.c uClibc-git/libc/sysdeps/linux/c6x/sigaction.c
  53770. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sigaction.c 2012-05-15 09:20:09.000000000 +0200
  53771. +++ uClibc-git/libc/sysdeps/linux/c6x/sigaction.c 2014-07-25 20:36:06.721334241 +0200
  53772. @@ -17,8 +17,7 @@
  53773. You should have received a copy of the GNU Library General Public
  53774. License along with the GNU C Library; see the file COPYING.LIB. If not,
  53775. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  53776. - Boston, MA 02111-1307, USA.
  53777. + see <http://www.gnu.org/licenses/>.
  53778. Totally hacked up for uClibc by Erik Andersen <andersen@codepoet.org>
  53779. */
  53780. @@ -34,8 +33,6 @@
  53781. #define SA_RESTORER 0x04000000
  53782. -extern __typeof(sigaction) __libc_sigaction;
  53783. -
  53784. extern void restore_rt(void) __asm__ ("__restore_rt") attribute_hidden;
  53785. extern void restore(void) __asm__ ("__restore") attribute_hidden;
  53786. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sys/procfs.h uClibc-git/libc/sysdeps/linux/c6x/sys/procfs.h
  53787. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  53788. +++ uClibc-git/libc/sysdeps/linux/c6x/sys/procfs.h 2014-07-25 20:36:06.729334283 +0200
  53789. @@ -12,9 +12,8 @@
  53790. Lesser General Public License for more details.
  53791. You should have received a copy of the GNU Lesser General Public
  53792. - License along with the GNU C Library; if not, write to the Free
  53793. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53794. - 02111-1307 USA. */
  53795. + License along with the GNU C Library; if not, see
  53796. + <http://www.gnu.org/licenses/>. */
  53797. #ifndef _SYS_PROCFS_H
  53798. #define _SYS_PROCFS_H 1
  53799. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sys/ptrace.h uClibc-git/libc/sysdeps/linux/c6x/sys/ptrace.h
  53800. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sys/ptrace.h 2012-05-15 09:20:09.000000000 +0200
  53801. +++ uClibc-git/libc/sysdeps/linux/c6x/sys/ptrace.h 2014-07-25 20:36:06.729334283 +0200
  53802. @@ -13,9 +13,8 @@
  53803. Lesser General Public License for more details.
  53804. You should have received a copy of the GNU Lesser General Public
  53805. - License along with the GNU C Library; if not, write to the Free
  53806. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53807. - 02111-1307 USA. */
  53808. + License along with the GNU C Library; if not, see
  53809. + <http://www.gnu.org/licenses/>. */
  53810. #ifndef _SYS_PTRACE_H
  53811. #define _SYS_PTRACE_H 1
  53812. @@ -112,12 +111,6 @@
  53813. PTRACE_SYSCALL = 24,
  53814. #define PT_SYSCALL PTRACE_SYSCALL
  53815. - /* Obtain the load map of the main program or the interpreter of the
  53816. - ptraced process, depending on whether the addr argument is
  53817. - (void*)0 or (void*)1, respectively. */
  53818. - PTRACE_GETDSBT = 31,
  53819. -#define PT_GETDSBT PTRACE_GETDSBT
  53820. -
  53821. /* Set ptrace filter options. */
  53822. PTRACE_SETOPTIONS = 0x4200,
  53823. #define PT_SETOPTIONS PTRACE_SETOPTIONS
  53824. @@ -135,9 +128,6 @@
  53825. #define PT_SETSIGINFO PTRACE_SETSIGINFO
  53826. };
  53827. -#define PTRACE_GETDSBT_EXEC ((void*)0) /* [addr] request the executable loadmap */
  53828. -#define PTRACE_GETDSBT_INTERP ((void*)1) /* [addr] request the interpreter loadmap */
  53829. -
  53830. /* Options set using PTRACE_SETOPTIONS. */
  53831. enum __ptrace_setoptions {
  53832. PTRACE_O_TRACESYSGOOD = 0x00000001,
  53833. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sys/reg.h uClibc-git/libc/sysdeps/linux/c6x/sys/reg.h
  53834. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sys/reg.h 2012-05-15 09:20:09.000000000 +0200
  53835. +++ uClibc-git/libc/sysdeps/linux/c6x/sys/reg.h 2014-07-25 20:36:06.729334283 +0200
  53836. @@ -14,9 +14,8 @@
  53837. * for more details.
  53838. *
  53839. * You should have received a copy of the GNU Library General Public License
  53840. - * along with this program; if not, write to the Free Software Foundation,
  53841. - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  53842. - *
  53843. + * along with this program; see the file COPYING.LIB. If not, see
  53844. + * <http://www.gnu.org/licenses/>.
  53845. */
  53846. #ifndef _SYS_REG_H
  53847. #define _SYS_REG_H 1
  53848. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sys/ucontext.h uClibc-git/libc/sysdeps/linux/c6x/sys/ucontext.h
  53849. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  53850. +++ uClibc-git/libc/sysdeps/linux/c6x/sys/ucontext.h 2014-07-25 20:36:06.729334283 +0200
  53851. @@ -12,9 +12,8 @@
  53852. Lesser General Public License for more details.
  53853. You should have received a copy of the GNU Lesser General Public
  53854. - License along with the GNU C Library; if not, write to the Free
  53855. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53856. - 02111-1307 USA. */
  53857. + License along with the GNU C Library; if not, see
  53858. + <http://www.gnu.org/licenses/>. */
  53859. #ifndef _SYS_UCONTEXT_H
  53860. #define _SYS_UCONTEXT_H 1
  53861. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sys/user.h uClibc-git/libc/sysdeps/linux/c6x/sys/user.h
  53862. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/sys/user.h 2012-05-15 09:20:09.000000000 +0200
  53863. +++ uClibc-git/libc/sysdeps/linux/c6x/sys/user.h 2014-07-25 20:36:06.729334283 +0200
  53864. @@ -12,9 +12,8 @@
  53865. Lesser General Public License for more details.
  53866. You should have received a copy of the GNU Lesser General Public
  53867. - License along with the GNU C Library; if not, write to the Free
  53868. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53869. - 02111-1307 USA. */
  53870. + License along with the GNU C Library; if not, see
  53871. + <http://www.gnu.org/licenses/>. */
  53872. #ifndef _SYS_USER_H
  53873. #define _SYS_USER_H 1
  53874. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/c6x/_vfork.S uClibc-git/libc/sysdeps/linux/c6x/_vfork.S
  53875. --- uClibc-0.9.33.2/libc/sysdeps/linux/c6x/_vfork.S 2012-05-15 09:20:09.000000000 +0200
  53876. +++ uClibc-git/libc/sysdeps/linux/c6x/_vfork.S 2014-07-25 20:36:06.709334178 +0200
  53877. @@ -16,8 +16,8 @@
  53878. * for more details.
  53879. *
  53880. * You should have received a copy of the GNU Library General Public License
  53881. - * along with this program; if not, write to the Free Software Foundation,
  53882. - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  53883. + * along with this program; see the file COPYING.LIB. If not, see
  53884. + * <http://www.gnu.org/licenses/>.
  53885. */
  53886. #define __ASSEMBLY__
  53887. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/access.c uClibc-git/libc/sysdeps/linux/common/access.c
  53888. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/access.c 2012-05-15 09:20:09.000000000 +0200
  53889. +++ uClibc-git/libc/sysdeps/linux/common/access.c 2014-07-25 20:36:06.757334429 +0200
  53890. @@ -9,4 +9,14 @@
  53891. #include <sys/syscall.h>
  53892. #include <unistd.h>
  53893. +
  53894. +#if defined __NR_faccessat && !defined __NR_access
  53895. +# include <fcntl.h>
  53896. +int access(const char *pathname, int mode)
  53897. +{
  53898. + return faccessat(AT_FDCWD, pathname, mode, 0);
  53899. +}
  53900. +
  53901. +#else
  53902. _syscall2(int, access, const char *, pathname, int, mode)
  53903. +#endif
  53904. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/alarm.c uClibc-git/libc/sysdeps/linux/common/alarm.c
  53905. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/alarm.c 2012-05-15 09:20:09.000000000 +0200
  53906. +++ uClibc-git/libc/sysdeps/linux/common/alarm.c 2014-07-25 20:36:06.757334429 +0200
  53907. @@ -10,12 +10,10 @@
  53908. #include <sys/syscall.h>
  53909. #include <unistd.h>
  53910. -
  53911. #ifdef __NR_alarm
  53912. _syscall1(unsigned int, alarm, unsigned int, seconds)
  53913. #else
  53914. -#include <sys/time.h>
  53915. -
  53916. +# include <sys/time.h>
  53917. unsigned int alarm(unsigned int seconds)
  53918. {
  53919. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/arch_prctl.c uClibc-git/libc/sysdeps/linux/common/arch_prctl.c
  53920. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/arch_prctl.c 2012-05-15 09:20:09.000000000 +0200
  53921. +++ uClibc-git/libc/sysdeps/linux/common/arch_prctl.c 2014-07-25 20:36:06.757334429 +0200
  53922. @@ -10,6 +10,6 @@
  53923. #include <sys/syscall.h>
  53924. #ifdef __NR_arch_prctl
  53925. -extern int arch_prctl(int code, unsigned long addr);
  53926. +int arch_prctl(int code, unsigned long addr);
  53927. _syscall2(int, arch_prctl, int, code, unsigned long, addr)
  53928. #endif
  53929. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/atomic.h uClibc-git/libc/sysdeps/linux/common/bits/atomic.h
  53930. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
  53931. +++ uClibc-git/libc/sysdeps/linux/common/bits/atomic.h 2014-07-25 20:36:06.769334491 +0200
  53932. @@ -13,9 +13,8 @@
  53933. Lesser General Public License for more details.
  53934. You should have received a copy of the GNU Lesser General Public
  53935. - License along with the GNU C Library; if not, write to the Free
  53936. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53937. - 02111-1307 USA. */
  53938. + License along with the GNU C Library; if not, see
  53939. + <http://www.gnu.org/licenses/>. */
  53940. #ifndef _BITS_ATOMIC_H
  53941. #define _BITS_ATOMIC_H 1
  53942. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/byteswap-common.h uClibc-git/libc/sysdeps/linux/common/bits/byteswap-common.h
  53943. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/byteswap-common.h 2012-05-15 09:20:09.000000000 +0200
  53944. +++ uClibc-git/libc/sysdeps/linux/common/bits/byteswap-common.h 2014-07-25 20:36:06.769334491 +0200
  53945. @@ -13,9 +13,8 @@
  53946. Lesser General Public License for more details.
  53947. You should have received a copy of the GNU Lesser General Public
  53948. - License along with the GNU C Library; if not, write to the Free
  53949. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53950. - 02111-1307 USA. */
  53951. + License along with the GNU C Library; if not, see
  53952. + <http://www.gnu.org/licenses/>. */
  53953. #if !defined _BYTESWAP_H && !defined _NETINET_IN_H
  53954. # error "Never use <bits/byteswap.h> directly; include <byteswap.h> instead."
  53955. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/cmathcalls.h uClibc-git/libc/sysdeps/linux/common/bits/cmathcalls.h
  53956. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/cmathcalls.h 2012-05-15 09:20:09.000000000 +0200
  53957. +++ uClibc-git/libc/sysdeps/linux/common/bits/cmathcalls.h 2014-07-25 20:36:06.769334491 +0200
  53958. @@ -14,9 +14,8 @@
  53959. Lesser General Public License for more details.
  53960. You should have received a copy of the GNU Lesser General Public
  53961. - License along with the GNU C Library; if not, write to the Free
  53962. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53963. - 02111-1307 USA. */
  53964. + License along with the GNU C Library; if not, see
  53965. + <http://www.gnu.org/licenses/>. */
  53966. /* NOTE: Because of the special way this file is used by <complex.h>, this
  53967. file must NOT be protected from multiple inclusion as header files
  53968. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/confname.h uClibc-git/libc/sysdeps/linux/common/bits/confname.h
  53969. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/confname.h 2012-05-15 09:20:09.000000000 +0200
  53970. +++ uClibc-git/libc/sysdeps/linux/common/bits/confname.h 2014-07-25 20:36:06.769334491 +0200
  53971. @@ -14,9 +14,8 @@
  53972. Lesser General Public License for more details.
  53973. You should have received a copy of the GNU Lesser General Public
  53974. - License along with the GNU C Library; if not, write to the Free
  53975. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53976. - 02111-1307 USA. */
  53977. + License along with the GNU C Library; if not, see
  53978. + <http://www.gnu.org/licenses/>. */
  53979. #ifndef _UNISTD_H
  53980. # error "Never use <bits/confname.h> directly; include <unistd.h> instead."
  53981. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/dirent.h uClibc-git/libc/sysdeps/linux/common/bits/dirent.h
  53982. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/dirent.h 2012-05-15 09:20:09.000000000 +0200
  53983. +++ uClibc-git/libc/sysdeps/linux/common/bits/dirent.h 2014-07-25 20:36:06.769334491 +0200
  53984. @@ -12,9 +12,8 @@
  53985. Lesser General Public License for more details.
  53986. You should have received a copy of the GNU Lesser General Public
  53987. - License along with the GNU C Library; if not, write to the Free
  53988. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  53989. - 02111-1307 USA. */
  53990. + License along with the GNU C Library; if not, see
  53991. + <http://www.gnu.org/licenses/>. */
  53992. #ifndef _DIRENT_H
  53993. # error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
  53994. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/dlfcn.h uClibc-git/libc/sysdeps/linux/common/bits/dlfcn.h
  53995. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/dlfcn.h 2012-05-15 09:20:09.000000000 +0200
  53996. +++ uClibc-git/libc/sysdeps/linux/common/bits/dlfcn.h 2014-07-25 20:36:06.769334491 +0200
  53997. @@ -13,9 +13,8 @@
  53998. Lesser General Public License for more details.
  53999. You should have received a copy of the GNU Lesser General Public
  54000. - License along with the GNU C Library; if not, write to the Free
  54001. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54002. - 02111-1307 USA. */
  54003. + License along with the GNU C Library; if not, see
  54004. + <http://www.gnu.org/licenses/>. */
  54005. #ifndef _DLFCN_H
  54006. # error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
  54007. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/environments.h uClibc-git/libc/sysdeps/linux/common/bits/environments.h
  54008. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/environments.h 2012-05-15 09:20:09.000000000 +0200
  54009. +++ uClibc-git/libc/sysdeps/linux/common/bits/environments.h 2014-07-25 20:36:06.769334491 +0200
  54010. @@ -12,9 +12,8 @@
  54011. Lesser General Public License for more details.
  54012. You should have received a copy of the GNU Lesser General Public
  54013. - License along with the GNU C Library; if not, write to the Free
  54014. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54015. - 02111-1307 USA. */
  54016. + License along with the GNU C Library; if not, see
  54017. + <http://www.gnu.org/licenses/>. */
  54018. #ifndef _UNISTD_H
  54019. # error "Never include this file directly. Use <unistd.h> instead"
  54020. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/errno.h uClibc-git/libc/sysdeps/linux/common/bits/errno.h
  54021. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/errno.h 2012-05-15 09:20:09.000000000 +0200
  54022. +++ uClibc-git/libc/sysdeps/linux/common/bits/errno.h 2014-07-25 20:36:06.769334491 +0200
  54023. @@ -13,9 +13,8 @@
  54024. Lesser General Public License for more details.
  54025. You should have received a copy of the GNU Lesser General Public
  54026. - License along with the GNU C Library; if not, write to the Free
  54027. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54028. - 02111-1307 USA. */
  54029. + License along with the GNU C Library; if not, see
  54030. + <http://www.gnu.org/licenses/>. */
  54031. #ifdef _ERRNO_H
  54032. @@ -43,7 +42,6 @@
  54033. # ifndef __ASSEMBLER__
  54034. /* Function to get address of global `errno' variable. */
  54035. extern int *__errno_location (void) __THROW __attribute__ ((__const__));
  54036. -libc_hidden_proto(__errno_location)
  54037. # ifdef __UCLIBC_HAS_THREADS__
  54038. /* When using threads, errno is a per-thread value. */
  54039. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/eventfd.h uClibc-git/libc/sysdeps/linux/common/bits/eventfd.h
  54040. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/eventfd.h 1970-01-01 01:00:00.000000000 +0100
  54041. +++ uClibc-git/libc/sysdeps/linux/common/bits/eventfd.h 2014-07-25 20:36:06.769334491 +0200
  54042. @@ -0,0 +1,31 @@
  54043. +/* Copyright (C) 2007-2013 Free Software Foundation, Inc.
  54044. + This file is part of the GNU C Library.
  54045. +
  54046. + The GNU C Library is free software; you can redistribute it and/or
  54047. + modify it under the terms of the GNU Lesser General Public
  54048. + License as published by the Free Software Foundation; either
  54049. + version 2.1 of the License, or (at your option) any later version.
  54050. +
  54051. + The GNU C Library is distributed in the hope that it will be useful,
  54052. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  54053. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  54054. + Lesser General Public License for more details.
  54055. +
  54056. + You should have received a copy of the GNU Lesser General Public
  54057. + License along with the GNU C Library; if not, see
  54058. + <http://www.gnu.org/licenses/>. */
  54059. +
  54060. +#ifndef _SYS_EVENTFD_H
  54061. +# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
  54062. +#endif
  54063. +
  54064. +/* Flags for eventfd. */
  54065. +enum
  54066. + {
  54067. + EFD_SEMAPHORE = 00000001,
  54068. +#define EFD_SEMAPHORE EFD_SEMAPHORE
  54069. + EFD_CLOEXEC = 02000000,
  54070. +#define EFD_CLOEXEC EFD_CLOEXEC
  54071. + EFD_NONBLOCK = 00004000
  54072. +#define EFD_NONBLOCK EFD_NONBLOCK
  54073. + };
  54074. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/fenv.h uClibc-git/libc/sysdeps/linux/common/bits/fenv.h
  54075. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
  54076. +++ uClibc-git/libc/sysdeps/linux/common/bits/fenv.h 2014-07-25 20:36:06.769334491 +0200
  54077. @@ -12,9 +12,8 @@
  54078. Lesser General Public License for more details.
  54079. You should have received a copy of the GNU Lesser General Public
  54080. - License along with the GNU C Library; if not, write to the Free
  54081. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54082. - 02111-1307 USA. */
  54083. + License along with the GNU C Library; if not, see
  54084. + <http://www.gnu.org/licenses/>. */
  54085. #ifndef _FENV_H
  54086. # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
  54087. @@ -53,4 +52,4 @@
  54088. fenv_t;
  54089. /* If the default argument is used we use this value. */
  54090. -#define FE_DFL_ENV ((__const fenv_t *) -1l)
  54091. +#define FE_DFL_ENV ((const fenv_t *) -1l)
  54092. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/getopt.h uClibc-git/libc/sysdeps/linux/common/bits/getopt.h
  54093. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/getopt.h 2012-05-15 09:20:09.000000000 +0200
  54094. +++ uClibc-git/libc/sysdeps/linux/common/bits/getopt.h 2014-07-25 20:36:06.769334491 +0200
  54095. @@ -14,9 +14,8 @@
  54096. Lesser General Public License for more details.
  54097. You should have received a copy of the GNU Lesser General Public
  54098. - License along with the GNU C Library; if not, write to the Free
  54099. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54100. - 02111-1307 USA. */
  54101. + License along with the GNU C Library; if not, see
  54102. + <http://www.gnu.org/licenses/>. */
  54103. #ifndef _GETOPT_H
  54104. @@ -26,31 +25,7 @@
  54105. # define _GETOPT_H 1
  54106. #endif
  54107. -/* If __GNU_LIBRARY__ is not already defined, either we are being used
  54108. - standalone, or this is the first header included in the source file.
  54109. - If we are being used with glibc, we need to include <features.h>, but
  54110. - that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
  54111. - not defined, include <ctype.h>, which will pull in <features.h> for us
  54112. - if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
  54113. - doesn't flood the namespace with stuff the way some other headers do.) */
  54114. -#if !defined __GNU_LIBRARY__
  54115. -# include <ctype.h>
  54116. -#endif
  54117. -
  54118. -#ifndef __THROW
  54119. -# ifndef __GNUC_PREREQ
  54120. -# define __GNUC_PREREQ(maj, min) (0)
  54121. -# endif
  54122. -# if defined __cplusplus && __GNUC_PREREQ (2,8)
  54123. -# define __THROW throw ()
  54124. -# else
  54125. -# define __THROW
  54126. -# endif
  54127. -#endif
  54128. -
  54129. -#ifdef __cplusplus
  54130. -extern "C" {
  54131. -#endif
  54132. +__BEGIN_DECLS
  54133. /* For communication from `getopt' to the caller.
  54134. When `getopt' finds an option that takes an argument,
  54135. @@ -147,17 +122,9 @@
  54136. arguments to the option '\0'. This behavior is specific to the GNU
  54137. `getopt'. */
  54138. -#if defined __GNU_LIBRARY__ || defined __UCLIBC__
  54139. -/* Many other libraries have conflicting prototypes for getopt, with
  54140. - differences in the consts, in stdlib.h. To avoid compilation
  54141. - errors, only prototype getopt for the GNU C library. */
  54142. extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
  54143. __THROW;
  54144. libc_hidden_proto(getopt)
  54145. -#else /* not __GNU_LIBRARY__ */
  54146. -extern int getopt ();
  54147. -libc_hidden_proto(getopt)
  54148. -#endif /* __GNU_LIBRARY__ */
  54149. #if defined __UCLIBC_HAS_GNU_GETOPT__ || defined __UCLIBC_HAS_GETOPT_LONG__
  54150. #ifndef __need_getopt
  54151. @@ -173,9 +140,7 @@
  54152. #endif
  54153. #endif
  54154. -#ifdef __cplusplus
  54155. -}
  54156. -#endif
  54157. +__END_DECLS
  54158. /* Make sure we later can get all the definitions and declarations. */
  54159. #undef __need_getopt
  54160. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/huge_valf.h uClibc-git/libc/sysdeps/linux/common/bits/huge_valf.h
  54161. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/huge_valf.h 2012-05-15 09:20:09.000000000 +0200
  54162. +++ uClibc-git/libc/sysdeps/linux/common/bits/huge_valf.h 2014-07-25 20:36:06.769334491 +0200
  54163. @@ -15,9 +15,8 @@
  54164. Lesser General Public License for more details.
  54165. You should have received a copy of the GNU Lesser General Public
  54166. - License along with the GNU C Library; if not, write to the Free
  54167. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54168. - 02111-1307 USA. */
  54169. + License along with the GNU C Library; if not, see
  54170. + <http://www.gnu.org/licenses/>. */
  54171. #ifndef _MATH_H
  54172. # error "Never use <bits/huge_valf.h> directly; include <math.h> instead."
  54173. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/huge_val.h uClibc-git/libc/sysdeps/linux/common/bits/huge_val.h
  54174. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/huge_val.h 2012-05-15 09:20:09.000000000 +0200
  54175. +++ uClibc-git/libc/sysdeps/linux/common/bits/huge_val.h 2014-07-25 20:36:06.769334491 +0200
  54176. @@ -15,9 +15,8 @@
  54177. Lesser General Public License for more details.
  54178. You should have received a copy of the GNU Lesser General Public
  54179. - License along with the GNU C Library; if not, write to the Free
  54180. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54181. - 02111-1307 USA. */
  54182. + License along with the GNU C Library; if not, see
  54183. + <http://www.gnu.org/licenses/>. */
  54184. #ifndef _MATH_H
  54185. # error "Never use <bits/huge_val.h> directly; include <math.h> instead."
  54186. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/huge_vall.h uClibc-git/libc/sysdeps/linux/common/bits/huge_vall.h
  54187. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/huge_vall.h 2012-05-15 09:20:09.000000000 +0200
  54188. +++ uClibc-git/libc/sysdeps/linux/common/bits/huge_vall.h 2014-07-25 20:36:06.769334491 +0200
  54189. @@ -14,9 +14,8 @@
  54190. Lesser General Public License for more details.
  54191. You should have received a copy of the GNU Lesser General Public
  54192. - License along with the GNU C Library; if not, write to the Free
  54193. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54194. - 02111-1307 USA. */
  54195. + License along with the GNU C Library; if not, see
  54196. + <http://www.gnu.org/licenses/>. */
  54197. #ifndef _MATH_H
  54198. # error "Never use <bits/huge_vall.h> directly; include <math.h> instead."
  54199. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/inf.h uClibc-git/libc/sysdeps/linux/common/bits/inf.h
  54200. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/inf.h 2012-05-15 09:20:09.000000000 +0200
  54201. +++ uClibc-git/libc/sysdeps/linux/common/bits/inf.h 2014-07-25 20:36:06.769334491 +0200
  54202. @@ -13,9 +13,8 @@
  54203. Lesser General Public License for more details.
  54204. You should have received a copy of the GNU Lesser General Public
  54205. - License along with the GNU C Library; if not, write to the Free
  54206. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54207. - 02111-1307 USA. */
  54208. + License along with the GNU C Library; if not, see
  54209. + <http://www.gnu.org/licenses/>. */
  54210. #ifndef _MATH_H
  54211. # error "Never use <bits/inf.h> directly; include <math.h> instead."
  54212. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/in.h uClibc-git/libc/sysdeps/linux/common/bits/in.h
  54213. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/in.h 2012-05-15 09:20:09.000000000 +0200
  54214. +++ uClibc-git/libc/sysdeps/linux/common/bits/in.h 2014-07-25 20:36:06.769334491 +0200
  54215. @@ -1,4 +1,4 @@
  54216. -/* Copyright (C) 1991-1999, 2000, 2004 Free Software Foundation, Inc.
  54217. +/* Copyright (C) 1991-2013 Free Software Foundation, Inc.
  54218. This file is part of the GNU C Library.
  54219. The GNU C Library is free software; you can redistribute it and/or
  54220. @@ -12,9 +12,8 @@
  54221. Lesser General Public License for more details.
  54222. You should have received a copy of the GNU Lesser General Public
  54223. - License along with the GNU C Library; if not, write to the Free
  54224. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54225. - 02111-1307 USA. */
  54226. + License along with the GNU C Library; if not, see
  54227. + <http://www.gnu.org/licenses/>. */
  54228. /* Linux version. */
  54229. @@ -43,31 +42,49 @@
  54230. #define IP_ADD_SOURCE_MEMBERSHIP 39 /* ip_mreq_source: join source group */
  54231. #define IP_DROP_SOURCE_MEMBERSHIP 40 /* ip_mreq_source: leave source group */
  54232. #define IP_MSFILTER 41
  54233. -#define MCAST_JOIN_GROUP 42 /* group_req: join any-source group */
  54234. -#define MCAST_BLOCK_SOURCE 43 /* group_source_req: block from given group */
  54235. -#define MCAST_UNBLOCK_SOURCE 44 /* group_source_req: unblock from given group*/
  54236. -#define MCAST_LEAVE_GROUP 45 /* group_req: leave any-source group */
  54237. -#define MCAST_JOIN_SOURCE_GROUP 46 /* group_source_req: join source-spec gr */
  54238. -#define MCAST_LEAVE_SOURCE_GROUP 47 /* group_source_req: leave source-spec gr*/
  54239. -#define MCAST_MSFILTER 48
  54240. -
  54241. -#define MCAST_EXCLUDE 0
  54242. -#define MCAST_INCLUDE 1
  54243. -
  54244. -#define IP_ROUTER_ALERT 5 /* bool */
  54245. -#define IP_PKTINFO 8 /* bool */
  54246. -#define IP_PKTOPTIONS 9
  54247. -#define IP_PMTUDISC 10 /* obsolete name? */
  54248. -#define IP_MTU_DISCOVER 10 /* int; see below */
  54249. -#define IP_RECVERR 11 /* bool */
  54250. -#define IP_RECVTTL 12 /* bool */
  54251. -#define IP_RECVTOS 13 /* bool */
  54252. +#if defined __USE_MISC || defined __USE_GNU
  54253. +# define MCAST_JOIN_GROUP 42 /* group_req: join any-source group */
  54254. +# define MCAST_BLOCK_SOURCE 43 /* group_source_req: block from given group */
  54255. +# define MCAST_UNBLOCK_SOURCE 44 /* group_source_req: unblock from given group*/
  54256. +# define MCAST_LEAVE_GROUP 45 /* group_req: leave any-source group */
  54257. +# define MCAST_JOIN_SOURCE_GROUP 46 /* group_source_req: join source-spec gr */
  54258. +# define MCAST_LEAVE_SOURCE_GROUP 47 /* group_source_req: leave source-spec gr*/
  54259. +# define MCAST_MSFILTER 48
  54260. +# define IP_MULTICAST_ALL 49
  54261. +# define IP_UNICAST_IF 50
  54262. +
  54263. +# define MCAST_EXCLUDE 0
  54264. +# define MCAST_INCLUDE 1
  54265. +#endif
  54266. +
  54267. +#define IP_ROUTER_ALERT 5 /* bool */
  54268. +#define IP_PKTINFO 8 /* bool */
  54269. +#define IP_PKTOPTIONS 9
  54270. +#define IP_PMTUDISC 10 /* obsolete name? */
  54271. +#define IP_MTU_DISCOVER 10 /* int; see below */
  54272. +#define IP_RECVERR 11 /* bool */
  54273. +#define IP_RECVTTL 12 /* bool */
  54274. +#define IP_RECVTOS 13 /* bool */
  54275. +#define IP_MTU 14 /* int */
  54276. +#define IP_FREEBIND 15
  54277. +#define IP_IPSEC_POLICY 16
  54278. +#define IP_XFRM_POLICY 17
  54279. +#define IP_PASSSEC 18
  54280. +#define IP_TRANSPARENT 19
  54281. +#define IP_MULTICAST_ALL 49 /* bool */
  54282. +
  54283. +/* TProxy original addresses */
  54284. +#define IP_ORIGDSTADDR 20
  54285. +#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR
  54286. +
  54287. +#define IP_MINTTL 21
  54288. /* IP_MTU_DISCOVER arguments. */
  54289. #define IP_PMTUDISC_DONT 0 /* Never send DF frames. */
  54290. #define IP_PMTUDISC_WANT 1 /* Use per route hints. */
  54291. #define IP_PMTUDISC_DO 2 /* Always DF. */
  54292. +#define IP_PMTUDISC_PROBE 3 /* Ignore dst pmtu. */
  54293. /* To select the IP level. */
  54294. #define SOL_IP 0
  54295. @@ -76,6 +93,7 @@
  54296. #define IP_DEFAULT_MULTICAST_LOOP 1
  54297. #define IP_MAX_MEMBERSHIPS 20
  54298. +#if defined __USE_MISC || defined __USE_GNU
  54299. /* Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS.
  54300. The `ip_dst' field is used for the first-hop gateway when using a
  54301. source route (this gets put into the header proper). */
  54302. @@ -100,6 +118,7 @@
  54303. struct in_addr ipi_spec_dst; /* Routing destination address */
  54304. struct in_addr ipi_addr; /* Header destination address */
  54305. };
  54306. +#endif
  54307. #ifdef __UCLIBC_HAS_IPV6__
  54308. /* Options for use with `getsockopt' and `setsockopt' at the IPv6 level.
  54309. @@ -159,6 +178,7 @@
  54310. #define IPV6_PMTUDISC_DONT 0 /* Never send DF frames. */
  54311. #define IPV6_PMTUDISC_WANT 1 /* Use per route hints. */
  54312. #define IPV6_PMTUDISC_DO 2 /* Always DF. */
  54313. +#define IPV6_PMTUDISC_PROBE 3 /* Ignore dst pmtu. */
  54314. /* Socket level values for IPv6. */
  54315. #define SOL_IPV6 41
  54316. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/initspin.h uClibc-git/libc/sysdeps/linux/common/bits/initspin.h
  54317. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/initspin.h 2012-05-15 09:20:09.000000000 +0200
  54318. +++ uClibc-git/libc/sysdeps/linux/common/bits/initspin.h 2014-07-25 20:36:06.769334491 +0200
  54319. @@ -13,9 +13,8 @@
  54320. Lesser General Public License for more details.
  54321. You should have received a copy of the GNU Lesser General Public
  54322. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  54323. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  54324. - Boston, MA 02111-1307, USA. */
  54325. + License along with the GNU C Library; see the file COPYING.LIB. If
  54326. + not, see <http://www.gnu.org/licenses/>. */
  54327. /* Initial value of a spinlock. Most platforms should use zero,
  54328. unless they only implement a "test and clear" operation instead of
  54329. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/ioctls.h uClibc-git/libc/sysdeps/linux/common/bits/ioctls.h
  54330. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/ioctls.h 2012-05-15 09:20:09.000000000 +0200
  54331. +++ uClibc-git/libc/sysdeps/linux/common/bits/ioctls.h 2014-07-25 20:36:06.769334491 +0200
  54332. @@ -12,9 +12,8 @@
  54333. Lesser General Public License for more details.
  54334. You should have received a copy of the GNU Lesser General Public
  54335. - License along with the GNU C Library; if not, write to the Free
  54336. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54337. - 02111-1307 USA. */
  54338. + License along with the GNU C Library; if not, see
  54339. + <http://www.gnu.org/licenses/>. */
  54340. #ifndef _SYS_IOCTL_H
  54341. # error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
  54342. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/ioctl-types.h uClibc-git/libc/sysdeps/linux/common/bits/ioctl-types.h
  54343. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/ioctl-types.h 2012-05-15 09:20:09.000000000 +0200
  54344. +++ uClibc-git/libc/sysdeps/linux/common/bits/ioctl-types.h 2014-07-25 20:36:06.769334491 +0200
  54345. @@ -13,9 +13,8 @@
  54346. Lesser General Public License for more details.
  54347. You should have received a copy of the GNU Lesser General Public
  54348. - License along with the GNU C Library; if not, write to the Free
  54349. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54350. - 02111-1307 USA. */
  54351. + License along with the GNU C Library; if not, see
  54352. + <http://www.gnu.org/licenses/>. */
  54353. #ifndef _SYS_IOCTL_H
  54354. # error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
  54355. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/ipc.h uClibc-git/libc/sysdeps/linux/common/bits/ipc.h
  54356. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/ipc.h 2012-05-15 09:20:09.000000000 +0200
  54357. +++ uClibc-git/libc/sysdeps/linux/common/bits/ipc.h 2014-07-25 20:36:06.769334491 +0200
  54358. @@ -12,9 +12,8 @@
  54359. Lesser General Public License for more details.
  54360. You should have received a copy of the GNU Lesser General Public
  54361. - License along with the GNU C Library; if not, write to the Free
  54362. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54363. - 02111-1307 USA. */
  54364. + License along with the GNU C Library; if not, see
  54365. + <http://www.gnu.org/licenses/>. */
  54366. #ifndef _SYS_IPC_H
  54367. # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
  54368. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/kernel-features.h uClibc-git/libc/sysdeps/linux/common/bits/kernel-features.h
  54369. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/kernel-features.h 2012-05-15 09:20:09.000000000 +0200
  54370. +++ uClibc-git/libc/sysdeps/linux/common/bits/kernel-features.h 2014-07-25 20:36:06.769334491 +0200
  54371. @@ -14,9 +14,8 @@
  54372. Lesser General Public License for more details.
  54373. You should have received a copy of the GNU Lesser General Public
  54374. - License along with the GNU C Library; if not, write to the Free
  54375. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54376. - 02111-1307 USA. */
  54377. + License along with the GNU C Library; if not, see
  54378. + <http://www.gnu.org/licenses/>. */
  54379. /* This file must not contain any C code. At least it must be protected
  54380. to allow using the file also in assembler files. */
  54381. @@ -311,17 +310,19 @@
  54382. /* Support for various CLOEXEC and NONBLOCK flags was added for x86,
  54383. * x86-64, PPC, IA-64, and SPARC in 2.6.27. */
  54384. -#if __LINUX_KERNEL_VERSION >= 0x02061b \
  54385. - && (defined __i386__ || defined __x86_64__ || defined __powerpc__ \
  54386. - || defined __ia64__ || defined __sparc__ || defined __s390__)
  54387. +#if (__LINUX_KERNEL_VERSION >= 0x02061b \
  54388. + && (defined __i386__ || defined __x86_64__ || defined __powerpc__ \
  54389. + || defined __ia64__ || defined __sparc__ || defined __s390__) \
  54390. + ) || (__LINUX_KERNEL_VERSION >= 0x020621 && defined __alpha__) \
  54391. + || defined __aarch64__ || defined __tile__
  54392. /* # define __ASSUME_SOCK_CLOEXEC 1 */
  54393. /* # define __ASSUME_IN_NONBLOCK 1 */
  54394. # define __ASSUME_PIPE2 1
  54395. /* # define __ASSUME_EVENTFD2 1 */
  54396. /* # define __ASSUME_SIGNALFD4 1 */
  54397. +/* # define __ASSUME_DUP3 1 */
  54398. #endif
  54399. -
  54400. /* These features were surely available with 2.4.12. */
  54401. #if __LINUX_KERNEL_VERSION >= 132108 && defined __mc68000__
  54402. # define __ASSUME_MMAP2_SYSCALL 1
  54403. @@ -494,6 +495,14 @@
  54404. # define __ASSUME_PRIVATE_FUTEX 1
  54405. #endif
  54406. +/* Support for fallocate was added in 2.6.23,
  54407. + on s390 only after 2.6.23-rc1, on alpha only after 2.6.33-rc1. */
  54408. +#if __LINUX_KERNEL_VERSION >= 0x020617 \
  54409. + && (!defined __s390__ || __LINUX_KERNEL_VERSION >= 0x020618) \
  54410. + && (!defined __alpha__ || __LINUX_KERNEL_VERSION >= 0x020621)
  54411. +# define __ASSUME_FALLOCATE 1
  54412. +#endif
  54413. +
  54414. /* getcpu is a syscall for x86-64 since 3.1. */
  54415. #if defined __x86_64__ && __LINUX_KERNEL_VERSION >= 0x030100
  54416. # define __ASSUME_GETCPU_SYSCALL 1
  54417. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/kernel_sigaction.h uClibc-git/libc/sysdeps/linux/common/bits/kernel_sigaction.h
  54418. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/kernel_sigaction.h 2012-05-15 09:20:09.000000000 +0200
  54419. +++ uClibc-git/libc/sysdeps/linux/common/bits/kernel_sigaction.h 2014-07-25 20:36:06.769334491 +0200
  54420. @@ -19,18 +19,6 @@
  54421. unsigned long sa_flags;
  54422. void (*sa_restorer)(void);
  54423. };
  54424. -/* In uclibc, userspace struct sigaction is identical to
  54425. - * "new" struct kernel_sigaction (one from the Linux 2.1.68 kernel).
  54426. - * See sigaction.h
  54427. - */
  54428. -
  54429. -extern int __syscall_sigaction(int, const struct old_kernel_sigaction *,
  54430. - struct old_kernel_sigaction *);
  54431. -
  54432. #endif
  54433. -
  54434. -extern int __syscall_rt_sigaction(int, const struct sigaction *,
  54435. - struct sigaction *, size_t);
  54436. -
  54437. #endif /* _BITS_SIGACTION_STRUCT_H */
  54438. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/locale.h uClibc-git/libc/sysdeps/linux/common/bits/locale.h
  54439. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/locale.h 2012-05-15 09:20:09.000000000 +0200
  54440. +++ uClibc-git/libc/sysdeps/linux/common/bits/locale.h 2014-07-25 20:36:06.769334491 +0200
  54441. @@ -13,9 +13,8 @@
  54442. Lesser General Public License for more details.
  54443. You should have received a copy of the GNU Lesser General Public
  54444. - License along with the GNU C Library; if not, write to the Free
  54445. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54446. - 02111-1307 USA. */
  54447. + License along with the GNU C Library; if not, see
  54448. + <http://www.gnu.org/licenses/>. */
  54449. #if !defined _LOCALE_H && !defined _LANGINFO_H
  54450. # error "Never use <bits/locale.h> directly; include <locale.h> instead."
  54451. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/local_lim.h uClibc-git/libc/sysdeps/linux/common/bits/local_lim.h
  54452. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/local_lim.h 2012-05-15 09:20:09.000000000 +0200
  54453. +++ uClibc-git/libc/sysdeps/linux/common/bits/local_lim.h 2014-07-25 20:36:06.769334491 +0200
  54454. @@ -13,9 +13,8 @@
  54455. Lesser General Public License for more details.
  54456. You should have received a copy of the GNU Lesser General Public
  54457. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  54458. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  54459. - Boston, MA 02111-1307, USA. */
  54460. + License along with the GNU C Library; see the file COPYING.LIB. If
  54461. + not, see <http://www.gnu.org/licenses/>. */
  54462. /* The kernel header pollutes the namespace with the NR_OPEN symbol
  54463. and defines LINK_MAX although filesystems have different maxima. A
  54464. @@ -71,6 +70,8 @@
  54465. /* The number of threads per process. */
  54466. #define _POSIX_THREAD_THREADS_MAX 64
  54467. +/* We have no predefined limit on the number of threads. */
  54468. +#undef PTHREAD_THREADS_MAX
  54469. /* Maximum amount by which a process can descrease its asynchronous I/O
  54470. priority level. */
  54471. @@ -93,3 +94,6 @@
  54472. /* Maximum message queue priority level. */
  54473. #define MQ_PRIO_MAX 32768
  54474. +
  54475. +/* Maximum value the semaphore can have. */
  54476. +#define SEM_VALUE_MAX (2147483647)
  54477. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/mathcalls.h uClibc-git/libc/sysdeps/linux/common/bits/mathcalls.h
  54478. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/mathcalls.h 2012-05-15 09:20:09.000000000 +0200
  54479. +++ uClibc-git/libc/sysdeps/linux/common/bits/mathcalls.h 2014-07-25 20:36:06.769334491 +0200
  54480. @@ -13,9 +13,8 @@
  54481. Lesser General Public License for more details.
  54482. You should have received a copy of the GNU Lesser General Public
  54483. - License along with the GNU C Library; if not, write to the Free
  54484. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54485. - 02111-1307 USA. */
  54486. + License along with the GNU C Library; if not, see
  54487. + <http://www.gnu.org/licenses/>. */
  54488. /* NOTE: Because of the special way this file is used by <math.h>, this
  54489. file must NOT be protected from multiple inclusion as header files
  54490. @@ -49,7 +48,7 @@
  54491. /* __MATHCALLX(type,function,[suffix],args,attrib) and
  54492. - * __MATHCALLI(type,function,[suffix],args) include libm_hidden_def
  54493. + * __MATHCALLI(type,function,[suffix],args) include libm_hidden_proto
  54494. * (for "double" versions only, xxxf and xxxl do not get this treatment).
  54495. *
  54496. * __MATHDECL(type,function,[suffix],args) does not.
  54497. @@ -57,7 +56,7 @@
  54498. * (it is just a shortcut to __MATHDECL(_Mdouble_,function,[suffix],args)).
  54499. *
  54500. * __MATHDECL_PRIV(type,function,[suffix],args,attrib)
  54501. - * includes libm_hidden_def (always) and declares __foo, not foo.
  54502. + * includes libm_hidden_proto (always) and declares __foo, not foo.
  54503. */
  54504. @@ -155,7 +154,7 @@
  54505. __MATHCALLI (exp2,, (_Mdouble_ __x))
  54506. /* Compute base-2 logarithm of X. */
  54507. -__MATHCALL (log2,, (_Mdouble_ __x))
  54508. +__MATHCALLI (log2,, (_Mdouble_ __x))
  54509. __END_NAMESPACE_C99
  54510. #endif
  54511. @@ -223,7 +222,7 @@
  54512. /* Return the fractional part of X after dividing out `ilogb (X)'. */
  54513. -__MATHCALL (significand,, (_Mdouble_ __x))
  54514. +__MATHCALLI (significand,, (_Mdouble_ __x))
  54515. #endif /* Use misc. */
  54516. #if defined __USE_MISC || defined __USE_ISOC99
  54517. @@ -236,7 +235,7 @@
  54518. #ifdef __USE_ISOC99
  54519. __BEGIN_NAMESPACE_C99
  54520. /* Return representation of NaN for double type. */
  54521. -__MATHCALLX (nan,, (__const char *__tagb), (__const__))
  54522. +__MATHCALLX (nan,, (const char *__tagb), (__const__))
  54523. __END_NAMESPACE_C99
  54524. #endif
  54525. @@ -278,7 +277,7 @@
  54526. #if defined __USE_MISC || defined __USE_XOPEN
  54527. /* Obsolete alias for `lgamma'. */
  54528. -__MATHCALL (gamma,, (_Mdouble_))
  54529. +__MATHCALLI (gamma,, (_Mdouble_))
  54530. #endif
  54531. #ifdef __USE_MISC
  54532. @@ -286,6 +285,8 @@
  54533. `signgam'. The reentrant version instead takes a pointer and stores
  54534. the value through it. */
  54535. __MATHCALL (lgamma,_r, (_Mdouble_, int *__signgamp))
  54536. +/* __MATHCALLI does not work here, probably due to ,_r, */
  54537. +libm_hidden_proto(lgamma_r)
  54538. #endif
  54539. @@ -376,5 +377,5 @@
  54540. #if (defined __USE_MISC || defined __USE_XOPEN_EXTENDED) \
  54541. && defined __UCLIBC_SUSV3_LEGACY__
  54542. /* Return X times (2 to the Nth power). */
  54543. -__MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n))
  54544. +__MATHCALLI (scalb,, (_Mdouble_ __x, _Mdouble_ __n))
  54545. #endif
  54546. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/mathdef.h uClibc-git/libc/sysdeps/linux/common/bits/mathdef.h
  54547. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
  54548. +++ uClibc-git/libc/sysdeps/linux/common/bits/mathdef.h 2014-07-25 20:36:06.769334491 +0200
  54549. @@ -12,9 +12,8 @@
  54550. Lesser General Public License for more details.
  54551. You should have received a copy of the GNU Lesser General Public
  54552. - License along with the GNU C Library; if not, write to the Free
  54553. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54554. - 02111-1307 USA. */
  54555. + License along with the GNU C Library; if not, see
  54556. + <http://www.gnu.org/licenses/>. */
  54557. #if !defined _MATH_H && !defined _COMPLEX_H
  54558. # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
  54559. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/mman-common.h uClibc-git/libc/sysdeps/linux/common/bits/mman-common.h
  54560. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/mman-common.h 2012-05-15 09:20:09.000000000 +0200
  54561. +++ uClibc-git/libc/sysdeps/linux/common/bits/mman-common.h 2014-07-25 20:36:06.773334513 +0200
  54562. @@ -13,9 +13,8 @@
  54563. Lesser General Public License for more details.
  54564. You should have received a copy of the GNU Lesser General Public
  54565. - License along with the GNU C Library; if not, write to the Free
  54566. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54567. - 02111-1307 USA. */
  54568. + License along with the GNU C Library; if not, see
  54569. + <http://www.gnu.org/licenses/>. */
  54570. #ifndef _SYS_MMAN_H
  54571. # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
  54572. @@ -64,7 +63,7 @@
  54573. # define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */
  54574. # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
  54575. # define MAP_STACK 0x20000 /* Allocation is for a stack. */
  54576. -# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could
  54577. +# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could
  54578. be uninitialized. */
  54579. #endif
  54580. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/mqueue.h uClibc-git/libc/sysdeps/linux/common/bits/mqueue.h
  54581. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/mqueue.h 2012-05-15 09:20:09.000000000 +0200
  54582. +++ uClibc-git/libc/sysdeps/linux/common/bits/mqueue.h 2014-07-25 20:36:06.773334513 +0200
  54583. @@ -12,9 +12,8 @@
  54584. Lesser General Public License for more details.
  54585. You should have received a copy of the GNU Lesser General Public
  54586. - License along with the GNU C Library; if not, write to the Free
  54587. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54588. - 02111-1307 USA. */
  54589. + License along with the GNU C Library; if not, see
  54590. + <http://www.gnu.org/licenses/>. */
  54591. #ifndef _MQUEUE_H
  54592. # error "Never use <bits/mqueue.h> directly; include <mqueue.h> instead."
  54593. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/msq.h uClibc-git/libc/sysdeps/linux/common/bits/msq.h
  54594. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/msq.h 2012-05-15 09:20:09.000000000 +0200
  54595. +++ uClibc-git/libc/sysdeps/linux/common/bits/msq.h 2014-07-25 20:36:06.773334513 +0200
  54596. @@ -12,9 +12,8 @@
  54597. Lesser General Public License for more details.
  54598. You should have received a copy of the GNU Lesser General Public
  54599. - License along with the GNU C Library; if not, write to the Free
  54600. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54601. - 02111-1307 USA. */
  54602. + License along with the GNU C Library; if not, see
  54603. + <http://www.gnu.org/licenses/>. */
  54604. #ifndef _SYS_MSG_H
  54605. # error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
  54606. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/nan.h uClibc-git/libc/sysdeps/linux/common/bits/nan.h
  54607. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/nan.h 2012-05-15 09:20:09.000000000 +0200
  54608. +++ uClibc-git/libc/sysdeps/linux/common/bits/nan.h 2014-07-25 20:36:06.773334513 +0200
  54609. @@ -13,9 +13,8 @@
  54610. Lesser General Public License for more details.
  54611. You should have received a copy of the GNU Lesser General Public
  54612. - License along with the GNU C Library; if not, write to the Free
  54613. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54614. - 02111-1307 USA. */
  54615. + License along with the GNU C Library; if not, see
  54616. + <http://www.gnu.org/licenses/>. */
  54617. #ifndef _MATH_H
  54618. # error "Never use <bits/nan.h> directly; include <math.h> instead."
  54619. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/netdb.h uClibc-git/libc/sysdeps/linux/common/bits/netdb.h
  54620. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/netdb.h 2012-05-15 09:20:09.000000000 +0200
  54621. +++ uClibc-git/libc/sysdeps/linux/common/bits/netdb.h 2014-07-25 20:36:06.773334513 +0200
  54622. @@ -12,9 +12,8 @@
  54623. Lesser General Public License for more details.
  54624. You should have received a copy of the GNU Lesser General Public
  54625. - License along with the GNU C Library; if not, write to the Free
  54626. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54627. - 02111-1307 USA. */
  54628. + License along with the GNU C Library; if not, see
  54629. + <http://www.gnu.org/licenses/>. */
  54630. #ifndef _NETDB_H
  54631. # error "Never include <bits/netdb.h> directly; use <netdb.h> instead."
  54632. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/poll.h uClibc-git/libc/sysdeps/linux/common/bits/poll.h
  54633. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/poll.h 2012-05-15 09:20:09.000000000 +0200
  54634. +++ uClibc-git/libc/sysdeps/linux/common/bits/poll.h 2014-07-25 20:36:06.773334513 +0200
  54635. @@ -12,9 +12,8 @@
  54636. Lesser General Public License for more details.
  54637. You should have received a copy of the GNU Lesser General Public
  54638. - License along with the GNU C Library; if not, write to the Free
  54639. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54640. - 02111-1307 USA. */
  54641. + License along with the GNU C Library; if not, see
  54642. + <http://www.gnu.org/licenses/>. */
  54643. #ifndef _SYS_POLL_H
  54644. # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
  54645. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/posix1_lim.h uClibc-git/libc/sysdeps/linux/common/bits/posix1_lim.h
  54646. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/posix1_lim.h 2012-05-15 09:20:09.000000000 +0200
  54647. +++ uClibc-git/libc/sysdeps/linux/common/bits/posix1_lim.h 2014-07-25 20:36:06.773334513 +0200
  54648. @@ -12,9 +12,8 @@
  54649. Lesser General Public License for more details.
  54650. You should have received a copy of the GNU Lesser General Public
  54651. - License along with the GNU C Library; if not, write to the Free
  54652. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54653. - 02111-1307 USA. */
  54654. + License along with the GNU C Library; if not, see
  54655. + <http://www.gnu.org/licenses/>. */
  54656. /*
  54657. * POSIX Standard: 2.9.2 Minimum Values Added to <limits.h>
  54658. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/posix2_lim.h uClibc-git/libc/sysdeps/linux/common/bits/posix2_lim.h
  54659. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/posix2_lim.h 2012-05-15 09:20:09.000000000 +0200
  54660. +++ uClibc-git/libc/sysdeps/linux/common/bits/posix2_lim.h 2014-07-25 20:36:06.773334513 +0200
  54661. @@ -12,9 +12,8 @@
  54662. Lesser General Public License for more details.
  54663. You should have received a copy of the GNU Lesser General Public
  54664. - License along with the GNU C Library; if not, write to the Free
  54665. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54666. - 02111-1307 USA. */
  54667. + License along with the GNU C Library; if not, see
  54668. + <http://www.gnu.org/licenses/>. */
  54669. /*
  54670. * Never include this file directly; include <limits.h> instead.
  54671. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/posix_opt.h uClibc-git/libc/sysdeps/linux/common/bits/posix_opt.h
  54672. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/posix_opt.h 2012-05-15 09:20:09.000000000 +0200
  54673. +++ uClibc-git/libc/sysdeps/linux/common/bits/posix_opt.h 2014-07-25 20:36:06.773334513 +0200
  54674. @@ -1,5 +1,5 @@
  54675. /* Define POSIX options for Linux.
  54676. - Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc.
  54677. + Copyright (C) 1996-2004, 2006, 2008, 2009 Free Software Foundation, Inc.
  54678. This file is part of the GNU C Library.
  54679. The GNU C Library is free software; you can redistribute it and/or
  54680. @@ -13,12 +13,11 @@
  54681. Lesser General Public License for more details.
  54682. You should have received a copy of the GNU Lesser General Public
  54683. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  54684. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  54685. - Boston, MA 02111-1307, USA. */
  54686. + License along with the GNU C Library; see the file COPYING.LIB. If
  54687. + not, see <http://www.gnu.org/licenses/>. */
  54688. -#ifndef _POSIX_OPT_H
  54689. -#define _POSIX_OPT_H 1
  54690. +#ifndef _BITS_POSIX_OPT_H
  54691. +#define _BITS_POSIX_OPT_H 1
  54692. /* Job control is supported. */
  54693. #define _POSIX_JOB_CONTROL 1
  54694. @@ -27,28 +26,28 @@
  54695. #define _POSIX_SAVED_IDS 1
  54696. /* Priority scheduling is supported. */
  54697. -#define _POSIX_PRIORITY_SCHEDULING 200112L
  54698. +#define _POSIX_PRIORITY_SCHEDULING 200809L
  54699. /* Synchronizing file data is supported. */
  54700. -#define _POSIX_SYNCHRONIZED_IO 200112L
  54701. +#define _POSIX_SYNCHRONIZED_IO 200809L
  54702. /* The fsync function is present. */
  54703. -#define _POSIX_FSYNC 200112L
  54704. +#define _POSIX_FSYNC 200809L
  54705. /* Mapping of files to memory is supported. */
  54706. -#define _POSIX_MAPPED_FILES 200112L
  54707. +#define _POSIX_MAPPED_FILES 200809L
  54708. /* Locking of all memory is supported. */
  54709. -#define _POSIX_MEMLOCK 200112L
  54710. +#define _POSIX_MEMLOCK 200809L
  54711. /* Locking of ranges of memory is supported. */
  54712. -#define _POSIX_MEMLOCK_RANGE 200112L
  54713. +#define _POSIX_MEMLOCK_RANGE 200809L
  54714. /* Setting of memory protections is supported. */
  54715. -#define _POSIX_MEMORY_PROTECTION 200112L
  54716. +#define _POSIX_MEMORY_PROTECTION 200809L
  54717. -/* Only root can change owner of file. */
  54718. -#define _POSIX_CHOWN_RESTRICTED 1
  54719. +/* Some filesystems allow all users to change file ownership. */
  54720. +#define _POSIX_CHOWN_RESTRICTED 0
  54721. /* `c_cc' member of 'struct termios' structure can be disabled by
  54722. using the value _POSIX_VDISABLE. */
  54723. @@ -60,53 +59,67 @@
  54724. /* X/Open realtime support is available. */
  54725. #define _XOPEN_REALTIME 1
  54726. +/* X/Open thread realtime support is available. */
  54727. +#define _XOPEN_REALTIME_THREADS 1
  54728. +
  54729. /* XPG4.2 shared memory is supported. */
  54730. #define _XOPEN_SHM 1
  54731. /* Tell we have POSIX threads. */
  54732. -#define _POSIX_THREADS 200112L
  54733. +#define _POSIX_THREADS 200809L
  54734. /* We have the reentrant functions described in POSIX. */
  54735. #define _POSIX_REENTRANT_FUNCTIONS 1
  54736. -#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L
  54737. +#define _POSIX_THREAD_SAFE_FUNCTIONS 200809L
  54738. /* We provide priority scheduling for threads. */
  54739. -#define _POSIX_THREAD_PRIORITY_SCHEDULING 200112L
  54740. +#define _POSIX_THREAD_PRIORITY_SCHEDULING 200809L
  54741. /* We support user-defined stack sizes. */
  54742. -#define _POSIX_THREAD_ATTR_STACKSIZE 200112L
  54743. +#define _POSIX_THREAD_ATTR_STACKSIZE 200809L
  54744. /* We support user-defined stacks. */
  54745. -#define _POSIX_THREAD_ATTR_STACKADDR 200112L
  54746. +#define _POSIX_THREAD_ATTR_STACKADDR 200809L
  54747. -#ifdef __UCLIBC_HAS_REALTIME__
  54748. -/* We support POSIX.1b semaphores. */
  54749. -#define _POSIX_SEMAPHORES 200112L
  54750. +/* We support priority inheritence. */
  54751. +#define _POSIX_THREAD_PRIO_INHERIT 200809L
  54752. +
  54753. +/* We support priority protection, though only for non-robust
  54754. + mutexes. */
  54755. +#define _POSIX_THREAD_PRIO_PROTECT 200809L
  54756. +
  54757. +#ifdef __USE_XOPEN2K8
  54758. +/* We support priority inheritence for robust mutexes. */
  54759. +# define _POSIX_THREAD_ROBUST_PRIO_INHERIT 200809L
  54760. +
  54761. +/* We do not support priority protection for robust mutexes. */
  54762. +# define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1
  54763. #endif
  54764. +/* We support POSIX.1b semaphores. */
  54765. +#define _POSIX_SEMAPHORES 200809L
  54766. +
  54767. /* Real-time signals are supported. */
  54768. -#define _POSIX_REALTIME_SIGNALS 200112L
  54769. +#define _POSIX_REALTIME_SIGNALS 200809L
  54770. /* We support asynchronous I/O. */
  54771. -#define _POSIX_ASYNCHRONOUS_IO 200112L
  54772. +#define _POSIX_ASYNCHRONOUS_IO 200809L
  54773. #define _POSIX_ASYNC_IO 1
  54774. /* Alternative name for Unix98. */
  54775. #define _LFS_ASYNCHRONOUS_IO 1
  54776. /* Support for prioritization is also available. */
  54777. -#define _POSIX_PRIORITIZED_IO 200112L
  54778. +#define _POSIX_PRIORITIZED_IO 200809L
  54779. /* The LFS support in asynchronous I/O is also available. */
  54780. #define _LFS64_ASYNCHRONOUS_IO 1
  54781. -#ifdef __UCLIBC_HAS_LFS__
  54782. /* The rest of the LFS is also available. */
  54783. #define _LFS_LARGEFILE 1
  54784. #define _LFS64_LARGEFILE 1
  54785. #define _LFS64_STDIO 1
  54786. -#endif
  54787. /* POSIX shared memory objects are implemented. */
  54788. -#define _POSIX_SHARED_MEMORY_OBJECTS 200112L
  54789. +#define _POSIX_SHARED_MEMORY_OBJECTS 200809L
  54790. /* CPU-time clocks support needs to be checked at runtime. */
  54791. #define _POSIX_CPUTIME 0
  54792. @@ -114,61 +127,53 @@
  54793. /* Clock support in threads must be also checked at runtime. */
  54794. #define _POSIX_THREAD_CPUTIME 0
  54795. -#ifdef __UCLIBC_HAS_REGEX__
  54796. /* GNU libc provides regular expression handling. */
  54797. #define _POSIX_REGEXP 1
  54798. -#endif
  54799. /* Reader/Writer locks are available. */
  54800. -#define _POSIX_READER_WRITER_LOCKS 200112L
  54801. +#define _POSIX_READER_WRITER_LOCKS 200809L
  54802. /* We have a POSIX shell. */
  54803. #define _POSIX_SHELL 1
  54804. /* We support the Timeouts option. */
  54805. -#define _POSIX_TIMEOUTS 200112L
  54806. +#define _POSIX_TIMEOUTS 200809L
  54807. /* We support spinlocks. */
  54808. -#define _POSIX_SPIN_LOCKS 200112L
  54809. +#define _POSIX_SPIN_LOCKS 200809L
  54810. /* The `spawn' function family is supported. */
  54811. -#if 0 /* no support in uClibc (yet) */
  54812. -#define _POSIX_SPAWN 200112L
  54813. -#endif
  54814. +#define _POSIX_SPAWN 200809L
  54815. /* We have POSIX timers. */
  54816. -#define _POSIX_TIMERS 200112L
  54817. +#define _POSIX_TIMERS 200809L
  54818. /* The barrier functions are available. */
  54819. -#define _POSIX_BARRIERS 200112L
  54820. +#define _POSIX_BARRIERS 200809L
  54821. /* POSIX message queues are available. */
  54822. -#define _POSIX_MESSAGE_PASSING 200112L
  54823. +#define _POSIX_MESSAGE_PASSING 200809L
  54824. /* Thread process-shared synchronization is supported. */
  54825. -#define _POSIX_THREAD_PROCESS_SHARED 200112L
  54826. +#define _POSIX_THREAD_PROCESS_SHARED 200809L
  54827. /* The monotonic clock might be available. */
  54828. #define _POSIX_MONOTONIC_CLOCK 0
  54829. /* The clock selection interfaces are available. */
  54830. -#define _POSIX_CLOCK_SELECTION 200112L
  54831. +#define _POSIX_CLOCK_SELECTION 200809L
  54832. /* Advisory information interfaces are available. */
  54833. -#define _POSIX_ADVISORY_INFO 200112L
  54834. +#define _POSIX_ADVISORY_INFO 200809L
  54835. -#ifdef __UCLIBC_HAS_IPV6__
  54836. /* IPv6 support is available. */
  54837. -#define _POSIX_IPV6 200112L
  54838. -#endif
  54839. +#define _POSIX_IPV6 200809L
  54840. -#ifdef __UCLIBC_HAS_SOCKET__
  54841. /* Raw socket support is available. */
  54842. -#define _POSIX_RAW_SOCKETS 200112L
  54843. -#endif
  54844. +#define _POSIX_RAW_SOCKETS 200809L
  54845. /* We have at least one terminal. */
  54846. -#define _POSIX2_CHAR_TERM 200112L
  54847. +#define _POSIX2_CHAR_TERM 200809L
  54848. /* Neither process nor thread sporadic server interfaces is available. */
  54849. #define _POSIX_SPORADIC_SERVER -1
  54850. @@ -183,8 +188,4 @@
  54851. /* Typed memory objects are not available. */
  54852. #define _POSIX_TYPED_MEMORY_OBJECTS -1
  54853. -/* No support for priority inheritance or protection so far. */
  54854. -#define _POSIX_THREAD_PRIO_INHERIT -1
  54855. -#define _POSIX_THREAD_PRIO_PROTECT -1
  54856. -
  54857. -#endif /* posix_opt.h */
  54858. +#endif /* bits/posix_opt.h */
  54859. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/resource.h uClibc-git/libc/sysdeps/linux/common/bits/resource.h
  54860. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/resource.h 2012-05-15 09:20:09.000000000 +0200
  54861. +++ uClibc-git/libc/sysdeps/linux/common/bits/resource.h 2014-07-25 20:36:06.773334513 +0200
  54862. @@ -14,9 +14,8 @@
  54863. Lesser General Public License for more details.
  54864. You should have received a copy of the GNU Lesser General Public
  54865. - License along with the GNU C Library; if not, write to the Free
  54866. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54867. - 02111-1307 USA. */
  54868. + License along with the GNU C Library; if not, see
  54869. + <http://www.gnu.org/licenses/>. */
  54870. #ifndef _SYS_RESOURCE_H
  54871. # error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
  54872. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sched.h uClibc-git/libc/sysdeps/linux/common/bits/sched.h
  54873. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sched.h 2012-05-15 09:20:09.000000000 +0200
  54874. +++ uClibc-git/libc/sysdeps/linux/common/bits/sched.h 2014-07-25 20:36:06.773334513 +0200
  54875. @@ -15,9 +15,8 @@
  54876. Lesser General Public License for more details.
  54877. You should have received a copy of the GNU Lesser General Public
  54878. - License along with the GNU C Library; if not, write to the Free
  54879. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54880. - 02111-1307 USA. */
  54881. + License along with the GNU C Library; if not, see
  54882. + <http://www.gnu.org/licenses/>. */
  54883. #ifndef __need_schedparam
  54884. @@ -109,6 +108,7 @@
  54885. /* Size definition for CPU sets. */
  54886. # define __CPU_SETSIZE 1024
  54887. # define __NCPUBITS (8 * sizeof (__cpu_mask))
  54888. +# include <stdlib.h>
  54889. /* Type for array elements in 'cpu_set_t'. */
  54890. typedef unsigned long int __cpu_mask;
  54891. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/select.h uClibc-git/libc/sysdeps/linux/common/bits/select.h
  54892. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/select.h 2012-05-15 09:20:09.000000000 +0200
  54893. +++ uClibc-git/libc/sysdeps/linux/common/bits/select.h 2014-07-25 20:36:06.773334513 +0200
  54894. @@ -12,9 +12,8 @@
  54895. Lesser General Public License for more details.
  54896. You should have received a copy of the GNU Lesser General Public
  54897. - License along with the GNU C Library; if not, write to the Free
  54898. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54899. - 02111-1307 USA. */
  54900. + License along with the GNU C Library; if not, see
  54901. + <http://www.gnu.org/licenses/>. */
  54902. #ifndef _SYS_SELECT_H
  54903. # error "Never use <bits/select.h> directly; include <sys/select.h> instead."
  54904. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sem.h uClibc-git/libc/sysdeps/linux/common/bits/sem.h
  54905. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sem.h 2012-05-15 09:20:09.000000000 +0200
  54906. +++ uClibc-git/libc/sysdeps/linux/common/bits/sem.h 2014-07-25 20:36:06.773334513 +0200
  54907. @@ -12,9 +12,8 @@
  54908. Lesser General Public License for more details.
  54909. You should have received a copy of the GNU Lesser General Public
  54910. - License along with the GNU C Library; if not, write to the Free
  54911. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54912. - 02111-1307 USA. */
  54913. + License along with the GNU C Library; if not, see
  54914. + <http://www.gnu.org/licenses/>. */
  54915. #ifndef _SYS_SEM_H
  54916. # error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
  54917. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/shm.h uClibc-git/libc/sysdeps/linux/common/bits/shm.h
  54918. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
  54919. +++ uClibc-git/libc/sysdeps/linux/common/bits/shm.h 2014-07-25 20:36:06.773334513 +0200
  54920. @@ -12,9 +12,8 @@
  54921. Lesser General Public License for more details.
  54922. You should have received a copy of the GNU Lesser General Public
  54923. - License along with the GNU C Library; if not, write to the Free
  54924. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54925. - 02111-1307 USA. */
  54926. + License along with the GNU C Library; if not, see
  54927. + <http://www.gnu.org/licenses/>. */
  54928. #ifndef _SYS_SHM_H
  54929. # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
  54930. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigaction.h uClibc-git/libc/sysdeps/linux/common/bits/sigaction.h
  54931. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigaction.h 2012-05-15 09:20:09.000000000 +0200
  54932. +++ uClibc-git/libc/sysdeps/linux/common/bits/sigaction.h 2014-07-25 20:36:06.773334513 +0200
  54933. @@ -13,9 +13,8 @@
  54934. Lesser General Public License for more details.
  54935. You should have received a copy of the GNU Lesser General Public
  54936. - License along with the GNU C Library; if not, write to the Free
  54937. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54938. - 02111-1307 USA. */
  54939. + License along with the GNU C Library; if not, see
  54940. + <http://www.gnu.org/licenses/>. */
  54941. #ifndef _SIGNAL_H
  54942. # error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
  54943. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigcontext.h uClibc-git/libc/sysdeps/linux/common/bits/sigcontext.h
  54944. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigcontext.h 2012-05-15 09:20:09.000000000 +0200
  54945. +++ uClibc-git/libc/sysdeps/linux/common/bits/sigcontext.h 2014-07-25 20:36:06.773334513 +0200
  54946. @@ -12,9 +12,8 @@
  54947. Lesser General Public License for more details.
  54948. You should have received a copy of the GNU Lesser General Public
  54949. - License along with the GNU C Library; if not, write to the Free
  54950. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54951. - 02111-1307 USA. */
  54952. + License along with the GNU C Library; if not, see
  54953. + <http://www.gnu.org/licenses/>. */
  54954. #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
  54955. # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
  54956. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigcontextinfo.h uClibc-git/libc/sysdeps/linux/common/bits/sigcontextinfo.h
  54957. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
  54958. +++ uClibc-git/libc/sysdeps/linux/common/bits/sigcontextinfo.h 2014-07-25 20:36:06.773334513 +0200
  54959. @@ -13,9 +13,8 @@
  54960. Lesser General Public License for more details.
  54961. You should have received a copy of the GNU Lesser General Public
  54962. - License along with the GNU C Library; if not, write to the Free
  54963. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54964. - 02111-1307 USA. */
  54965. + License along with the GNU C Library; if not, see
  54966. + <http://www.gnu.org/licenses/>. */
  54967. /* In general we cannot provide any information. */
  54968. #define SIGCONTEXT struct sigcontext *
  54969. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/siginfo.h uClibc-git/libc/sysdeps/linux/common/bits/siginfo.h
  54970. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/siginfo.h 2012-05-15 09:20:09.000000000 +0200
  54971. +++ uClibc-git/libc/sysdeps/linux/common/bits/siginfo.h 2014-07-25 20:36:06.773334513 +0200
  54972. @@ -13,9 +13,8 @@
  54973. Lesser General Public License for more details.
  54974. You should have received a copy of the GNU Lesser General Public
  54975. - License along with the GNU C Library; if not, write to the Free
  54976. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54977. - 02111-1307 USA. */
  54978. + License along with the GNU C Library; if not, see
  54979. + <http://www.gnu.org/licenses/>. */
  54980. #if !defined _SIGNAL_H && !defined __need_siginfo_t \
  54981. && !defined __need_sigevent_t
  54982. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/signum.h uClibc-git/libc/sysdeps/linux/common/bits/signum.h
  54983. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/signum.h 2012-05-15 09:20:09.000000000 +0200
  54984. +++ uClibc-git/libc/sysdeps/linux/common/bits/signum.h 2014-07-25 20:36:06.773334513 +0200
  54985. @@ -13,9 +13,8 @@
  54986. Lesser General Public License for more details.
  54987. You should have received a copy of the GNU Lesser General Public
  54988. - License along with the GNU C Library; if not, write to the Free
  54989. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  54990. - 02111-1307 USA. */
  54991. + License along with the GNU C Library; if not, see
  54992. + <http://www.gnu.org/licenses/>. */
  54993. #ifdef _SIGNAL_H
  54994. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigset.h uClibc-git/libc/sysdeps/linux/common/bits/sigset.h
  54995. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigset.h 2012-05-15 09:20:09.000000000 +0200
  54996. +++ uClibc-git/libc/sysdeps/linux/common/bits/sigset.h 2014-07-25 20:36:06.773334513 +0200
  54997. @@ -13,9 +13,8 @@
  54998. Lesser General Public License for more details.
  54999. You should have received a copy of the GNU Lesser General Public
  55000. - License along with the GNU C Library; if not, write to the Free
  55001. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  55002. - 02111-1307 USA. */
  55003. + License along with the GNU C Library; if not, see
  55004. + <http://www.gnu.org/licenses/>. */
  55005. #ifndef _SIGSET_H_types
  55006. # define _SIGSET_H_types 1
  55007. @@ -153,7 +152,7 @@
  55008. checking is done in the non __ versions. */
  55009. # if !defined __USE_EXTERN_INLINES || defined __PROVIDE_OUT_OF_LINE_SIGSETFN
  55010. -extern int __sigismember (__const __sigset_t *, int);
  55011. +extern int __sigismember (const __sigset_t *, int);
  55012. libc_hidden_proto(__sigismember)
  55013. extern int __sigaddset (__sigset_t *, int);
  55014. libc_hidden_proto(__sigaddset)
  55015. @@ -179,7 +178,7 @@
  55016. return BODY; \
  55017. }
  55018. -__SIGSETFN (__sigismember, (__set->__val[__word] & __mask) ? 1 : 0, __const)
  55019. +__SIGSETFN (__sigismember, (__set->__val[__word] & __mask) ? 1 : 0, const)
  55020. __SIGSETFN (__sigaddset, ((__set->__val[__word] |= __mask), 0), )
  55021. __SIGSETFN (__sigdelset, ((__set->__val[__word] &= ~__mask), 0), )
  55022. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigstack.h uClibc-git/libc/sysdeps/linux/common/bits/sigstack.h
  55023. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigstack.h 2012-05-15 09:20:09.000000000 +0200
  55024. +++ uClibc-git/libc/sysdeps/linux/common/bits/sigstack.h 2014-07-25 20:36:06.773334513 +0200
  55025. @@ -13,9 +13,8 @@
  55026. Lesser General Public License for more details.
  55027. You should have received a copy of the GNU Lesser General Public
  55028. - License along with the GNU C Library; if not, write to the Free
  55029. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  55030. - 02111-1307 USA. */
  55031. + License along with the GNU C Library; if not, see
  55032. + <http://www.gnu.org/licenses/>. */
  55033. #ifndef _SIGNAL_H
  55034. # error "Never include this file directly. Use <signal.h> instead"
  55035. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigthread.h uClibc-git/libc/sysdeps/linux/common/bits/sigthread.h
  55036. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sigthread.h 2012-05-15 09:20:09.000000000 +0200
  55037. +++ uClibc-git/libc/sysdeps/linux/common/bits/sigthread.h 2014-07-25 20:36:06.773334513 +0200
  55038. @@ -13,9 +13,8 @@
  55039. Lesser General Public License for more details.
  55040. You should have received a copy of the GNU Lesser General Public
  55041. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  55042. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  55043. - Boston, MA 02111-1307, USA. */
  55044. + License along with the GNU C Library; see the file COPYING.LIB. If
  55045. + not, see <http://www.gnu.org/licenses/>. */
  55046. #ifndef _BITS_SIGTHREAD_H
  55047. #define _BITS_SIGTHREAD_H 1
  55048. @@ -29,7 +28,7 @@
  55049. /* Modify the signal mask for the calling thread. The arguments have
  55050. the same meaning as for sigprocmask(2). */
  55051. extern int pthread_sigmask (int __how,
  55052. - __const __sigset_t *__restrict __newmask,
  55053. + const __sigset_t *__restrict __newmask,
  55054. __sigset_t *__restrict __oldmask)__THROW;
  55055. /* Send signal SIGNO to the given thread. */
  55056. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sockaddr.h uClibc-git/libc/sysdeps/linux/common/bits/sockaddr.h
  55057. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/sockaddr.h 2012-05-15 09:20:09.000000000 +0200
  55058. +++ uClibc-git/libc/sysdeps/linux/common/bits/sockaddr.h 2014-07-25 20:36:06.773334513 +0200
  55059. @@ -13,9 +13,8 @@
  55060. Lesser General Public License for more details.
  55061. You should have received a copy of the GNU Lesser General Public
  55062. - License along with the GNU C Library; if not, write to the Free
  55063. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  55064. - 02111-1307 USA. */
  55065. + License along with the GNU C Library; if not, see
  55066. + <http://www.gnu.org/licenses/>. */
  55067. /*
  55068. * Never include this file directly; use <sys/socket.h> instead.
  55069. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/socket.h uClibc-git/libc/sysdeps/linux/common/bits/socket.h
  55070. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/socket.h 2012-05-15 09:20:09.000000000 +0200
  55071. +++ uClibc-git/libc/sysdeps/linux/common/bits/socket.h 2014-07-25 20:36:06.773334513 +0200
  55072. @@ -1,5 +1,6 @@
  55073. /* System-specific socket constants and types. Linux version.
  55074. - Copyright (C) 1991,1992,1994-2001,2004,2006 Free Software Foundation, Inc.
  55075. + Copyright (C) 1991,1992,1994-2001,2004,2006-2012
  55076. + Free Software Foundation, Inc.
  55077. This file is part of the GNU C Library.
  55078. The GNU C Library is free software; you can redistribute it and/or
  55079. @@ -13,19 +14,17 @@
  55080. Lesser General Public License for more details.
  55081. You should have received a copy of the GNU Lesser General Public
  55082. - License along with the GNU C Library; if not, write to the Free
  55083. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  55084. - 02111-1307 USA. */
  55085. + License along with the GNU C Library; if not, see
  55086. + <http://www.gnu.org/licenses/>. */
  55087. #ifndef __BITS_SOCKET_H
  55088. #define __BITS_SOCKET_H
  55089. -#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H
  55090. +#ifndef _SYS_SOCKET_H
  55091. # error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
  55092. #endif
  55093. #define __need_size_t
  55094. -#define __need_NULL
  55095. #include <stddef.h>
  55096. #include <limits.h>
  55097. @@ -37,37 +36,8 @@
  55098. # define __socklen_t_defined
  55099. #endif
  55100. -/* Types of sockets. */
  55101. -enum __socket_type
  55102. -{
  55103. - SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
  55104. - byte streams. */
  55105. -#define SOCK_STREAM SOCK_STREAM
  55106. - SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
  55107. - of fixed maximum length. */
  55108. -#define SOCK_DGRAM SOCK_DGRAM
  55109. - SOCK_RAW = 3, /* Raw protocol interface. */
  55110. -#define SOCK_RAW SOCK_RAW
  55111. - SOCK_RDM = 4, /* Reliably-delivered messages. */
  55112. -#define SOCK_RDM SOCK_RDM
  55113. - SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
  55114. - datagrams of fixed maximum length. */
  55115. -#define SOCK_SEQPACKET SOCK_SEQPACKET
  55116. - SOCK_PACKET = 10, /* Linux specific way of getting packets
  55117. - at the dev level. For writing rarp and
  55118. - other similar things on the user level. */
  55119. -#define SOCK_PACKET SOCK_PACKET
  55120. -
  55121. - /* Flags to be ORed into the type parameter of socket and socketpair and
  55122. - used for the flags parameter of paccept. */
  55123. -
  55124. - SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the
  55125. - new descriptor(s). */
  55126. -#define SOCK_CLOEXEC SOCK_CLOEXEC
  55127. - SOCK_NONBLOCK = 04000 /* Atomically mark descriptor(s) as
  55128. - non-blocking. */
  55129. -#define SOCK_NONBLOCK SOCK_NONBLOCK
  55130. -};
  55131. +/* Get the architecture-dependent definition of enum __socket_type. */
  55132. +#include <bits/socket_type.h>
  55133. /* Protocol families. */
  55134. #define PF_UNSPEC 0 /* Unspecified. */
  55135. @@ -94,22 +64,24 @@
  55136. #define PF_ASH 18 /* Ash. */
  55137. #define PF_ECONET 19 /* Acorn Econet. */
  55138. #define PF_ATMSVC 20 /* ATM SVCs. */
  55139. +#define PF_RDS 21 /* RDS sockets. */
  55140. #define PF_SNA 22 /* Linux SNA Project */
  55141. #define PF_IRDA 23 /* IRDA sockets. */
  55142. #define PF_PPPOX 24 /* PPPoX sockets. */
  55143. #define PF_WANPIPE 25 /* Wanpipe API sockets. */
  55144. -#define PF_LLC 26 /* Linux LLC. */
  55145. -#define PF_CAN 29 /* Controller Area Network. */
  55146. -#define PF_TIPC 30 /* TIPC sockets. */
  55147. +#define PF_LLC 26 /* Linux LLC. */
  55148. +#define PF_CAN 29 /* Controller Area Network. */
  55149. +#define PF_TIPC 30 /* TIPC sockets. */
  55150. #define PF_BLUETOOTH 31 /* Bluetooth sockets. */
  55151. #define PF_IUCV 32 /* IUCV sockets. */
  55152. -#define PF_RXRPC 33 /* RxRPC sockets. */
  55153. -#define PF_ISDN 34 /* mISDN sockets. */
  55154. -#define PF_PHONET 35 /* Phonet sockets. */
  55155. -#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */
  55156. -#define PF_CAIF 37 /* CAIF sockets. */
  55157. -#define PF_ALG 38 /* Algorithm sockets. */
  55158. -#define PF_MAX 39 /* For now.. */
  55159. +#define PF_RXRPC 33 /* RxRPC sockets. */
  55160. +#define PF_ISDN 34 /* mISDN sockets. */
  55161. +#define PF_PHONET 35 /* Phonet sockets. */
  55162. +#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */
  55163. +#define PF_CAIF 37 /* CAIF sockets. */
  55164. +#define PF_ALG 38 /* Algorithm sockets. */
  55165. +#define PF_NFC 39 /* NFC sockets. */
  55166. +#define PF_MAX 40 /* For now.. */
  55167. /* Address families. */
  55168. #define AF_UNSPEC PF_UNSPEC
  55169. @@ -136,21 +108,23 @@
  55170. #define AF_ASH PF_ASH
  55171. #define AF_ECONET PF_ECONET
  55172. #define AF_ATMSVC PF_ATMSVC
  55173. +#define AF_RDS PF_RDS
  55174. #define AF_SNA PF_SNA
  55175. #define AF_IRDA PF_IRDA
  55176. #define AF_PPPOX PF_PPPOX
  55177. #define AF_WANPIPE PF_WANPIPE
  55178. -#define AF_LLC PF_LLC
  55179. -#define AF_CAN PF_CAN
  55180. -#define AF_TIPC PF_TIPC
  55181. +#define AF_LLC PF_LLC
  55182. +#define AF_CAN PF_CAN
  55183. +#define AF_TIPC PF_TIPC
  55184. #define AF_BLUETOOTH PF_BLUETOOTH
  55185. -#define AF_IUCV PF_IUCV
  55186. -#define AF_RXRPC PF_RXRPC
  55187. -#define AF_ISDN PF_ISDN
  55188. -#define AF_PHONET PF_PHONET
  55189. -#define AF_IEEE802154 PF_IEEE802154
  55190. -#define AF_CAIF PF_CAIF
  55191. -#define AF_ALG PF_ALG
  55192. +#define AF_IUCV PF_IUCV
  55193. +#define AF_RXRPC PF_RXRPC
  55194. +#define AF_ISDN PF_ISDN
  55195. +#define AF_PHONET PF_PHONET
  55196. +#define AF_IEEE802154 PF_IEEE802154
  55197. +#define AF_CAIF PF_CAIF
  55198. +#define AF_ALG PF_ALG
  55199. +#define AF_NFC PF_NFC
  55200. #define AF_MAX PF_MAX
  55201. /* Socket level values. Others are defined in the appropriate headers.
  55202. @@ -235,8 +209,14 @@
  55203. #define MSG_ERRQUEUE MSG_ERRQUEUE
  55204. MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */
  55205. #define MSG_NOSIGNAL MSG_NOSIGNAL
  55206. - MSG_MORE = 0x8000 /* Sender will send more. */
  55207. + MSG_MORE = 0x8000, /* Sender will send more. */
  55208. #define MSG_MORE MSG_MORE
  55209. + MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/
  55210. +#define MSG_WAITFORONE MSG_WAITFORONE
  55211. + MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file
  55212. + descriptor received through
  55213. + SCM_RIGHTS. */
  55214. +#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC
  55215. };
  55216. @@ -290,7 +270,7 @@
  55217. #define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
  55218. #define CMSG_FIRSTHDR(mhdr) \
  55219. ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
  55220. - ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
  55221. + ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)
  55222. #define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
  55223. & (size_t) ~(sizeof (size_t) - 1))
  55224. #define CMSG_SPACE(len) (CMSG_ALIGN (len) \
  55225. @@ -302,14 +282,14 @@
  55226. libc_hidden_proto(__cmsg_nxthdr)
  55227. #ifdef __USE_EXTERN_INLINES
  55228. # ifndef _EXTERN_INLINE
  55229. -# define _EXTERN_INLINE extern __inline
  55230. +# define _EXTERN_INLINE __extern_inline
  55231. # endif
  55232. _EXTERN_INLINE struct cmsghdr *
  55233. __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
  55234. {
  55235. if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
  55236. /* The kernel header does this so there may be a reason. */
  55237. - return 0;
  55238. + return (struct cmsghdr *) 0;
  55239. __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
  55240. + CMSG_ALIGN (__cmsg->cmsg_len));
  55241. @@ -318,7 +298,7 @@
  55242. || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
  55243. > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
  55244. /* No more entries. */
  55245. - return 0;
  55246. + return (struct cmsghdr *) 0;
  55247. return __cmsg;
  55248. }
  55249. #endif /* Use `extern inline'. */
  55250. @@ -329,20 +309,21 @@
  55251. {
  55252. SCM_RIGHTS = 0x01 /* Transfer file descriptors. */
  55253. #define SCM_RIGHTS SCM_RIGHTS
  55254. -#ifdef __USE_BSD
  55255. +#ifdef __USE_GNU
  55256. , SCM_CREDENTIALS = 0x02 /* Credentials passing. */
  55257. # define SCM_CREDENTIALS SCM_CREDENTIALS
  55258. #endif
  55259. };
  55260. +#ifdef __USE_GNU
  55261. /* User visible structure for SCM_CREDENTIALS message */
  55262. -
  55263. struct ucred
  55264. {
  55265. pid_t pid; /* PID of sending process. */
  55266. uid_t uid; /* UID of sending process. */
  55267. gid_t gid; /* GID of sending process. */
  55268. };
  55269. +#endif
  55270. /* Get socket manipulation related informations from kernel headers. */
  55271. #ifndef __GLIBC__
  55272. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/socket_type.h uClibc-git/libc/sysdeps/linux/common/bits/socket_type.h
  55273. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/socket_type.h 1970-01-01 01:00:00.000000000 +0100
  55274. +++ uClibc-git/libc/sysdeps/linux/common/bits/socket_type.h 2014-07-25 20:36:06.773334513 +0200
  55275. @@ -0,0 +1,54 @@
  55276. +/* Define enum __socket_type for generic Linux.
  55277. + Copyright (C) 1991-2012 Free Software Foundation, Inc.
  55278. + This file is part of the GNU C Library.
  55279. +
  55280. + The GNU C Library is free software; you can redistribute it and/or
  55281. + modify it under the terms of the GNU Lesser General Public
  55282. + License as published by the Free Software Foundation; either
  55283. + version 2.1 of the License, or (at your option) any later version.
  55284. +
  55285. + The GNU C Library is distributed in the hope that it will be useful,
  55286. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  55287. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  55288. + Lesser General Public License for more details.
  55289. +
  55290. + You should have received a copy of the GNU Lesser General Public
  55291. + License along with the GNU C Library; if not, see
  55292. + <http://www.gnu.org/licenses/>. */
  55293. +
  55294. +#ifndef _SYS_SOCKET_H
  55295. +# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
  55296. +#endif
  55297. +
  55298. +/* Types of sockets. */
  55299. +enum __socket_type
  55300. +{
  55301. + SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
  55302. + byte streams. */
  55303. +#define SOCK_STREAM SOCK_STREAM
  55304. + SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
  55305. + of fixed maximum length. */
  55306. +#define SOCK_DGRAM SOCK_DGRAM
  55307. + SOCK_RAW = 3, /* Raw protocol interface. */
  55308. +#define SOCK_RAW SOCK_RAW
  55309. + SOCK_RDM = 4, /* Reliably-delivered messages. */
  55310. +#define SOCK_RDM SOCK_RDM
  55311. + SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
  55312. + datagrams of fixed maximum length. */
  55313. +#define SOCK_SEQPACKET SOCK_SEQPACKET
  55314. + SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */
  55315. +#define SOCK_DCCP SOCK_DCCP
  55316. + SOCK_PACKET = 10, /* Linux specific way of getting packets
  55317. + at the dev level. For writing rarp and
  55318. + other similar things on the user level. */
  55319. +#define SOCK_PACKET SOCK_PACKET
  55320. +
  55321. + /* Flags to be ORed into the type parameter of socket and socketpair. */
  55322. +
  55323. + SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the
  55324. + new descriptor(s). */
  55325. +#define SOCK_CLOEXEC SOCK_CLOEXEC
  55326. + SOCK_NONBLOCK = 00004000 /* Atomically mark descriptor(s) as
  55327. + non-blocking. */
  55328. +#define SOCK_NONBLOCK SOCK_NONBLOCK
  55329. +};
  55330. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/stab.def uClibc-git/libc/sysdeps/linux/common/bits/stab.def
  55331. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/stab.def 2012-05-15 09:20:09.000000000 +0200
  55332. +++ uClibc-git/libc/sysdeps/linux/common/bits/stab.def 2014-07-25 20:36:06.773334513 +0200
  55333. @@ -13,9 +13,8 @@
  55334. Lesser General Public License for more details.
  55335. You should have received a copy of the GNU Lesser General Public
  55336. - License along with the GNU C Library; if not, write to the Free
  55337. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  55338. - 02111-1307 USA. */
  55339. + License along with the GNU C Library; if not, see
  55340. + <http://www.gnu.org/licenses/>. */
  55341. /* This contains contribution from Cygnus Support. */
  55342. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/common/bits/stackinfo.h
  55343. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  55344. +++ uClibc-git/libc/sysdeps/linux/common/bits/stackinfo.h 2014-07-25 20:36:06.773334513 +0200
  55345. @@ -12,9 +12,8 @@
  55346. Lesser General Public License for more details.
  55347. You should have received a copy of the GNU Lesser General Public
  55348. - License along with the GNU C Library; if not, write to the Free
  55349. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  55350. - 02111-1307 USA. */
  55351. + License along with the GNU C Library; if not, see
  55352. + <http://www.gnu.org/licenses/>. */
  55353. /* This file contains a bit of information about the stack allocation
  55354. of the processor. Since there is no general truth we can't say
  55355. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/statfs.h uClibc-git/libc/sysdeps/linux/common/bits/statfs.h
  55356. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/statfs.h 2012-05-15 09:20:09.000000000 +0200
  55357. +++ uClibc-git/libc/sysdeps/linux/common/bits/statfs.h 2014-07-25 20:36:06.773334513 +0200
  55358. @@ -12,9 +12,8 @@
  55359. Lesser General Public License for more details.
  55360. You should have received a copy of the GNU Lesser General Public
  55361. - License along with the GNU C Library; if not, write to the Free
  55362. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  55363. - 02111-1307 USA. */
  55364. + License along with the GNU C Library; if not, see
  55365. + <http://www.gnu.org/licenses/>. */
  55366. #ifndef _SYS_STATFS_H
  55367. # error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
  55368. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/stat.h uClibc-git/libc/sysdeps/linux/common/bits/stat.h
  55369. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
  55370. +++ uClibc-git/libc/sysdeps/linux/common/bits/stat.h 2014-07-25 20:36:06.773334513 +0200
  55371. @@ -12,9 +12,8 @@
  55372. Lesser General Public License for more details.
  55373. You should have received a copy of the GNU Lesser General Public
  55374. - License along with the GNU C Library; if not, write to the Free
  55375. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  55376. - 02111-1307 USA. */
  55377. + License along with the GNU C Library; if not, see
  55378. + <http://www.gnu.org/licenses/>. */
  55379. #ifndef _SYS_STAT_H
  55380. # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
  55381. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/statvfs.h uClibc-git/libc/sysdeps/linux/common/bits/statvfs.h
  55382. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/statvfs.h 2012-05-15 09:20:09.000000000 +0200
  55383. +++ uClibc-git/libc/sysdeps/linux/common/bits/statvfs.h 2014-07-25 20:36:06.773334513 +0200
  55384. @@ -12,9 +12,8 @@
  55385. Lesser General Public License for more details.
  55386. You should have received a copy of the GNU Lesser General Public
  55387. - License along with the GNU C Library; if not, write to the Free
  55388. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  55389. - 02111-1307 USA. */
  55390. + License along with the GNU C Library; if not, see
  55391. + <http://www.gnu.org/licenses/>. */
  55392. #ifndef _SYS_STATVFS_H
  55393. # error "Never include <bits/statvfs.h> directly; use <sys/statvfs.h> instead."
  55394. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/stdio.h uClibc-git/libc/sysdeps/linux/common/bits/stdio.h
  55395. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/stdio.h 2012-05-15 09:20:09.000000000 +0200
  55396. +++ uClibc-git/libc/sysdeps/linux/common/bits/stdio.h 2014-07-25 20:36:06.773334513 +0200
  55397. @@ -13,9 +13,8 @@
  55398. Lesser General Public License for more details.
  55399. You should have received a copy of the GNU Lesser General Public
  55400. - License along with the GNU C Library; if not, write to the Free
  55401. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  55402. - 02111-1307 USA. */
  55403. + License along with the GNU C Library; if not, see
  55404. + <http://www.gnu.org/licenses/>. */
  55405. #ifndef _STDIO_H
  55406. # error "Never include <bits/stdio.h> directly; use <stdio.h> instead."
  55407. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/stdio_lim.h uClibc-git/libc/sysdeps/linux/common/bits/stdio_lim.h
  55408. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/stdio_lim.h 2012-05-15 09:20:09.000000000 +0200
  55409. +++ uClibc-git/libc/sysdeps/linux/common/bits/stdio_lim.h 2014-07-25 20:36:06.773334513 +0200
  55410. @@ -12,9 +12,8 @@
  55411. Lesser General Public License for more details.
  55412. You should have received a copy of the GNU Lesser General Public
  55413. - License along with the GNU C Library; if not, write to the Free
  55414. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  55415. - 02111-1307 USA. */
  55416. + License along with the GNU C Library; if not, see
  55417. + <http://www.gnu.org/licenses/>. */
  55418. #if !defined _STDIO_H && !defined __need_FOPEN_MAX && !defined __need_IOV_MAX
  55419. # error "Never include <bits/stdio_lim.h> directly; use <stdio.h> instead."
  55420. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/syscalls-common.h uClibc-git/libc/sysdeps/linux/common/bits/syscalls-common.h
  55421. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/syscalls-common.h 2012-05-15 09:20:09.000000000 +0200
  55422. +++ uClibc-git/libc/sysdeps/linux/common/bits/syscalls-common.h 2014-07-25 20:36:06.773334513 +0200
  55423. @@ -39,13 +39,13 @@
  55424. /* Just like INLINE_SYSCALL(), but take a non-constant syscall (NCS) argument */
  55425. #ifndef INLINE_SYSCALL_NCS
  55426. -# define INLINE_SYSCALL_NCS(name, nr, args...) \
  55427. +# define INLINE_SYSCALL_NCS(num, nr, args...) \
  55428. (__extension__ \
  55429. ({ \
  55430. INTERNAL_SYSCALL_DECL(__err); \
  55431. (__extension__ \
  55432. ({ \
  55433. - long __res = INTERNAL_SYSCALL_NCS(name, __err, nr, args); \
  55434. + long __res = INTERNAL_SYSCALL_NCS(num, __err, nr, args); \
  55435. if (unlikely(INTERNAL_SYSCALL_ERROR_P(__res, __err))) { \
  55436. __set_errno(INTERNAL_SYSCALL_ERRNO(__res, __err)); \
  55437. __res = -1L; \
  55438. @@ -57,10 +57,10 @@
  55439. )
  55440. #endif
  55441. #ifndef INLINE_SYSCALL_NOERR_NCS
  55442. -# define INLINE_SYSCALL_NOERR_NCS(name, nr, args...) \
  55443. +# define INLINE_SYSCALL_NOERR_NCS(num, nr, args...) \
  55444. ({ \
  55445. INTERNAL_SYSCALL_DECL(__err); \
  55446. - long __res = INTERNAL_SYSCALL_NCS(name, __err, nr, args); \
  55447. + long __res = INTERNAL_SYSCALL_NCS(num, __err, nr, args); \
  55448. __res; \
  55449. })
  55450. #endif
  55451. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/termios.h uClibc-git/libc/sysdeps/linux/common/bits/termios.h
  55452. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/termios.h 2012-05-15 09:20:09.000000000 +0200
  55453. +++ uClibc-git/libc/sysdeps/linux/common/bits/termios.h 2014-07-25 20:36:06.773334513 +0200
  55454. @@ -14,9 +14,8 @@
  55455. Lesser General Public License for more details.
  55456. You should have received a copy of the GNU Lesser General Public
  55457. - License along with the GNU C Library; if not, write to the Free
  55458. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  55459. - 02111-1307 USA. */
  55460. + License along with the GNU C Library; if not, see
  55461. + <http://www.gnu.org/licenses/>. */
  55462. #ifndef _TERMIOS_H
  55463. # error "Never include <bits/termios.h> directly; use <termios.h> instead."
  55464. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/time.h uClibc-git/libc/sysdeps/linux/common/bits/time.h
  55465. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/time.h 2012-05-15 09:20:09.000000000 +0200
  55466. +++ uClibc-git/libc/sysdeps/linux/common/bits/time.h 2014-07-25 20:36:06.773334513 +0200
  55467. @@ -13,9 +13,8 @@
  55468. Lesser General Public License for more details.
  55469. You should have received a copy of the GNU Lesser General Public
  55470. - License along with the GNU C Library; if not, write to the Free
  55471. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  55472. - 02111-1307 USA. */
  55473. + License along with the GNU C Library; if not, see
  55474. + <http://www.gnu.org/licenses/>. */
  55475. /*
  55476. * Never include this file directly; use <time.h> instead.
  55477. @@ -54,6 +53,12 @@
  55478. # define CLOCK_PROCESS_CPUTIME_ID 2
  55479. /* Thread-specific CPU-time clock. */
  55480. # define CLOCK_THREAD_CPUTIME_ID 3
  55481. +/* Monotonic system-wide clock, not adjusted for frequency scaling. */
  55482. +# define CLOCK_MONOTONIC_RAW 4
  55483. +/* Identifier for system-wide realtime clock, updated only on ticks. */
  55484. +# define CLOCK_REALTIME_COARSE 5
  55485. +/* Monotonic system-wide clock, updated only on ticks. */
  55486. +# define CLOCK_MONOTONIC_COARSE 6
  55487. /* Flag to indicate time is absolute. */
  55488. # define TIMER_ABSTIME 1
  55489. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/types.h uClibc-git/libc/sysdeps/linux/common/bits/types.h
  55490. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/types.h 2012-05-15 09:20:09.000000000 +0200
  55491. +++ uClibc-git/libc/sysdeps/linux/common/bits/types.h 2014-07-25 20:36:06.773334513 +0200
  55492. @@ -1,5 +1,5 @@
  55493. /* bits/types.h -- definitions of __*_t types underlying *_t types.
  55494. - Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
  55495. + Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
  55496. This file is part of the GNU C Library.
  55497. The GNU C Library is free software; you can redistribute it and/or
  55498. @@ -13,9 +13,8 @@
  55499. Lesser General Public License for more details.
  55500. You should have received a copy of the GNU Lesser General Public
  55501. - License along with the GNU C Library; if not, write to the Free
  55502. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  55503. - 02111-1307 USA. */
  55504. + License along with the GNU C Library; if not, see
  55505. + <http://www.gnu.org/licenses/>. */
  55506. /*
  55507. * Never include this file directly; use <sys/types.h> instead.
  55508. @@ -27,8 +26,6 @@
  55509. #include <features.h>
  55510. #include <bits/wordsize.h>
  55511. -#define __need_size_t
  55512. -#include <stddef.h>
  55513. #ifdef _LIBC
  55514. #include <bits/kernel_types.h>
  55515. #endif
  55516. @@ -49,7 +46,7 @@
  55517. #if __WORDSIZE == 64
  55518. typedef signed long int __int64_t;
  55519. typedef unsigned long int __uint64_t;
  55520. -#elif defined(__GNUC__)
  55521. +#elif defined(__GNUC__) || defined __ICC || defined __TenDRA__
  55522. __extension__ typedef signed long long int __int64_t;
  55523. __extension__ typedef unsigned long long int __uint64_t;
  55524. #endif
  55525. @@ -58,7 +55,7 @@
  55526. #if __WORDSIZE == 64
  55527. typedef long int __quad_t;
  55528. typedef unsigned long int __u_quad_t;
  55529. -#elif defined(__GNUC__)
  55530. +#elif defined(__GNUC__) || defined __ICC || defined __TenDRA__
  55531. __extension__ typedef long long int __quad_t;
  55532. __extension__ typedef unsigned long long int __u_quad_t;
  55533. #else
  55534. @@ -200,9 +197,4 @@
  55535. #undef __STD_TYPE
  55536. -/* Now add the thread types. */
  55537. -#if defined __UCLIBC_HAS_THREADS__ && (defined __USE_POSIX199506 || defined __USE_UNIX98)
  55538. -# include <bits/pthreadtypes.h>
  55539. -#endif
  55540. -
  55541. #endif /* bits/types.h */
  55542. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/typesizes.h uClibc-git/libc/sysdeps/linux/common/bits/typesizes.h
  55543. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/typesizes.h 2012-05-15 09:20:09.000000000 +0200
  55544. +++ uClibc-git/libc/sysdeps/linux/common/bits/typesizes.h 2014-07-25 20:36:06.773334513 +0200
  55545. @@ -13,9 +13,8 @@
  55546. Lesser General Public License for more details.
  55547. You should have received a copy of the GNU Lesser General Public
  55548. - License along with the GNU C Library; if not, write to the Free
  55549. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  55550. - 02111-1307 USA. */
  55551. + License along with the GNU C Library; if not, see
  55552. + <http://www.gnu.org/licenses/>. */
  55553. #ifndef _BITS_TYPES_H
  55554. # error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
  55555. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/common/bits/uClibc_arch_features.h
  55556. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  55557. +++ uClibc-git/libc/sysdeps/linux/common/bits/uClibc_arch_features.h 2014-07-25 20:36:06.773334513 +0200
  55558. @@ -14,8 +14,8 @@
  55559. /* can your target use syscall6() for mmap ? */
  55560. #undef __UCLIBC_MMAP_HAS_6_ARGS__
  55561. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  55562. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  55563. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  55564. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  55565. /* does your target have a broken create_module() ? */
  55566. #undef __UCLIBC_BROKEN_CREATE_MODULE__
  55567. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_ctype.h uClibc-git/libc/sysdeps/linux/common/bits/uClibc_ctype.h
  55568. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_ctype.h 2012-05-15 09:20:09.000000000 +0200
  55569. +++ uClibc-git/libc/sysdeps/linux/common/bits/uClibc_ctype.h 2014-07-25 20:36:06.773334513 +0200
  55570. @@ -11,9 +11,8 @@
  55571. * Lesser General Public License for more details.
  55572. *
  55573. * You should have received a copy of the GNU Lesser General Public
  55574. - * License along with the GNU C Library; if not, write to the Free
  55575. - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  55576. - * 02111-1307 USA.
  55577. + * License along with the GNU C Library; see the file COPYING.LIB. If
  55578. + * not, see <http://www.gnu.org/licenses/>.
  55579. */
  55580. /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
  55581. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_fpmax.h uClibc-git/libc/sysdeps/linux/common/bits/uClibc_fpmax.h
  55582. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_fpmax.h 2012-05-15 09:20:09.000000000 +0200
  55583. +++ uClibc-git/libc/sysdeps/linux/common/bits/uClibc_fpmax.h 2014-07-25 20:36:06.773334513 +0200
  55584. @@ -12,10 +12,6 @@
  55585. #ifndef _UCLIBC_FPMAX_H
  55586. #define _UCLIBC_FPMAX_H
  55587. -#ifndef _ISOC99_SOURCE
  55588. -#define _ISOC99_SOURCE 1
  55589. -#endif
  55590. -
  55591. #include <features.h>
  55592. #include <float.h>
  55593. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_locale.h uClibc-git/libc/sysdeps/linux/common/bits/uClibc_locale.h
  55594. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_locale.h 2012-05-15 09:20:09.000000000 +0200
  55595. +++ uClibc-git/libc/sysdeps/linux/common/bits/uClibc_locale.h 2014-07-25 20:36:06.773334513 +0200
  55596. @@ -11,9 +11,8 @@
  55597. * Lesser General Public License for more details.
  55598. *
  55599. * You should have received a copy of the GNU Lesser General Public
  55600. - * License along with the GNU C Library; if not, write to the Free
  55601. - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  55602. - * 02111-1307 USA.
  55603. + * License along with the GNU C Library; see the file COPYING.LIB. If
  55604. + * not, see <http://www.gnu.org/licenses/>.
  55605. */
  55606. /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
  55607. @@ -93,7 +92,7 @@
  55608. #ifdef _LIBC
  55609. /* extern void _locale_set(const unsigned char *p); */
  55610. -/* extern void _locale_init(void); */
  55611. +extern void weak_function _locale_init(void) attribute_hidden;
  55612. #include <stddef.h>
  55613. #include <stdint.h>
  55614. @@ -338,7 +337,9 @@
  55615. extern __locale_t __curlocale_var;
  55616. # ifdef __UCLIBC_HAS_THREADS__
  55617. extern __locale_t __curlocale(void) __THROW __attribute__ ((__const__));
  55618. +libc_hidden_proto(__curlocale)
  55619. extern __locale_t __curlocale_set(__locale_t newloc);
  55620. +libc_hidden_proto(__curlocale_set)
  55621. # define __UCLIBC_CURLOCALE (__curlocale())
  55622. # else
  55623. # define __UCLIBC_CURLOCALE (__curlocale_var)
  55624. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_local_lim.h uClibc-git/libc/sysdeps/linux/common/bits/uClibc_local_lim.h
  55625. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_local_lim.h 2012-05-15 09:20:09.000000000 +0200
  55626. +++ uClibc-git/libc/sysdeps/linux/common/bits/uClibc_local_lim.h 2014-07-25 20:36:06.773334513 +0200
  55627. @@ -11,14 +11,22 @@
  55628. #define _BITS_UCLIBC_LOCAL_LIM_H 1
  55629. /* This file works correctly only if local_lim.h is the NPTL version */
  55630. -#if !defined PTHREAD_KEYS_MAX || defined TIMER_MAX
  55631. +#if !defined PTHREAD_KEYS_MAX || defined TIMER_MAX || !defined SEM_VALUE_MAX
  55632. # error local_lim.h was incorrectly updated, use the NPTL version from glibc
  55633. #endif
  55634. /* This should really be moved to thread specific directories */
  55635. #if defined __UCLIBC_HAS_THREADS__ && !defined __UCLIBC_HAS_THREADS_NATIVE__
  55636. +/* glibc uses 16384 */
  55637. # define PTHREAD_THREADS_MAX 1024
  55638. # define TIMER_MAX 256
  55639. +# ifdef __LINUXTHREADS_OLD__
  55640. +# undef SEM_VALUE_MAX
  55641. +# define SEM_VALUE_MAX ((int) ((~0u) >> 1))
  55642. +# endif
  55643. +# undef PTHREAD_STACK_MIN
  55644. +/* glibc uses at least 16364 */
  55645. +# define PTHREAD_STACK_MIN 1024
  55646. #endif
  55647. #ifndef __UCLIBC_HAS_THREADS__
  55648. @@ -28,6 +36,7 @@
  55649. # undef PTHREAD_DESTRUCTOR_ITERATIONS
  55650. # undef PTHREAD_STACK_MIN
  55651. # undef DELAYTIMER_MAX
  55652. +# undef SEM_VALUE_MAX
  55653. #endif
  55654. #endif /* bits/uClibc_local_lim.h */
  55655. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_mutex.h uClibc-git/libc/sysdeps/linux/common/bits/uClibc_mutex.h
  55656. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_mutex.h 2012-05-15 09:20:09.000000000 +0200
  55657. +++ uClibc-git/libc/sysdeps/linux/common/bits/uClibc_mutex.h 2014-07-25 20:36:06.773334513 +0200
  55658. @@ -13,7 +13,9 @@
  55659. #ifdef __UCLIBC_HAS_THREADS__
  55660. #include <pthread.h>
  55661. +#ifdef _LIBC
  55662. #include <bits/uClibc_pthread.h>
  55663. +#endif
  55664. #define __UCLIBC_MUTEX_TYPE pthread_mutex_t
  55665. @@ -108,8 +110,8 @@
  55666. #define __UCLIBC_IO_MUTEX_AUTO_UNLOCK(M,A) __UCLIBC_MUTEX_AUTO_UNLOCK(M,A)
  55667. #define __UCLIBC_IO_MUTEX_LOCK_CANCEL_UNSAFE(M) __UCLIBC_MUTEX_LOCK_CANCEL_UNSAFE(M)
  55668. #define __UCLIBC_IO_MUTEX_UNLOCK_CANCEL_UNSAFE(M) __UCLIBC_MUTEX_UNLOCK_CANCEL_UNSAFE(M)
  55669. -#define __UCLIBC_IO_MUTEX_CONDITIONAL_LOCK(M,C) __UCLIBC_MUTEX_CONDITIONAL_LOCK(M, 1)
  55670. -#define __UCLIBC_IO_MUTEX_CONDITIONAL_UNLOCK(M,C) __UCLIBC_MUTEX_CONDITIONAL_UNLOCK(M, 1)
  55671. +#define __UCLIBC_IO_MUTEX_CONDITIONAL_LOCK(M,C) __UCLIBC_MUTEX_CONDITIONAL_LOCK(M,C)
  55672. +#define __UCLIBC_IO_MUTEX_CONDITIONAL_UNLOCK(M,C) __UCLIBC_MUTEX_CONDITIONAL_UNLOCK(M,C)
  55673. #endif /* of __USE_STDIO_FUTEXES__ */
  55674. @@ -146,8 +148,8 @@
  55675. #define __UCLIBC_IO_MUTEX_AUTO_UNLOCK(M,A) __UCLIBC_MUTEX_AUTO_UNLOCK(M,A)
  55676. #define __UCLIBC_IO_MUTEX_LOCK_CANCEL_UNSAFE(M) __UCLIBC_MUTEX_LOCK_CANCEL_UNSAFE(M)
  55677. #define __UCLIBC_IO_MUTEX_UNLOCK_CANCEL_UNSAFE(M) __UCLIBC_MUTEX_UNLOCK_CANCEL_UNSAFE(M)
  55678. -#define __UCLIBC_IO_MUTEX_CONDITIONAL_LOCK(M,C) __UCLIBC_MUTEX_CONDITIONAL_LOCK(M, 1)
  55679. -#define __UCLIBC_IO_MUTEX_CONDITIONAL_UNLOCK(M,C) __UCLIBC_MUTEX_CONDITIONAL_UNLOCK(M, 1)
  55680. +#define __UCLIBC_IO_MUTEX_CONDITIONAL_LOCK(M,C) __UCLIBC_MUTEX_CONDITIONAL_LOCK(M,C)
  55681. +#define __UCLIBC_IO_MUTEX_CONDITIONAL_UNLOCK(M,C) __UCLIBC_MUTEX_CONDITIONAL_UNLOCK(M,C)
  55682. #endif /* of __UCLIBC_HAS_THREADS__ */
  55683. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_page.h uClibc-git/libc/sysdeps/linux/common/bits/uClibc_page.h
  55684. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_page.h 2012-05-15 09:20:09.000000000 +0200
  55685. +++ uClibc-git/libc/sysdeps/linux/common/bits/uClibc_page.h 2014-07-25 20:36:06.773334513 +0200
  55686. @@ -11,9 +11,8 @@
  55687. * Lesser General Public License for more details.
  55688. *
  55689. * You should have received a copy of the GNU Lesser General Public
  55690. - * License along with the GNU C Library; if not, write to the Free
  55691. - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  55692. - * 02111-1307 USA.
  55693. + * License along with the GNU C Library; see the file COPYING.LIB. If
  55694. + * not, see <http://www.gnu.org/licenses/>.
  55695. */
  55696. /* Supply an architecture specific value for PAGE_SIZE and friends. */
  55697. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_posix_opt.h uClibc-git/libc/sysdeps/linux/common/bits/uClibc_posix_opt.h
  55698. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_posix_opt.h 1970-01-01 01:00:00.000000000 +0100
  55699. +++ uClibc-git/libc/sysdeps/linux/common/bits/uClibc_posix_opt.h 2014-07-25 20:36:06.773334513 +0200
  55700. @@ -0,0 +1,136 @@
  55701. +/*
  55702. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  55703. + *
  55704. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  55705. + */
  55706. +/*
  55707. + * Never include this file directly; use <unistd.h> instead.
  55708. + */
  55709. +
  55710. +#ifndef _BITS_UCLIBC_POSIX_OPT_H
  55711. +#define _BITS_UCLIBC_POSIX_OPT_H 1
  55712. +
  55713. +/* This file works correctly only if posix_opt.h is the NPTL version */
  55714. +#ifndef _POSIX_THREADS
  55715. +# error posix_opt.h was incorrectly updated, use the NPTL version from glibc
  55716. +#endif
  55717. +
  55718. +/* change first options based on what glibc does */
  55719. +
  55720. +#ifndef __UCLIBC_HAS_THREADS_NATIVE__
  55721. +# undef _POSIX_THREAD_PROCESS_SHARED
  55722. +# define _POSIX_THREAD_PROCESS_SHARED -1
  55723. +# undef _POSIX_CLOCK_SELECTION
  55724. +# define _POSIX_CLOCK_SELECTION -1
  55725. +# undef _POSIX_THREAD_PRIO_INHERIT
  55726. +# define _POSIX_THREAD_PRIO_INHERIT -1
  55727. +# undef _POSIX_THREAD_PRIO_PROTECT
  55728. +# define _POSIX_THREAD_PRIO_PROTECT -1
  55729. +# undef _POSIX_THREAD_ROBUST_PRIO_INHERIT
  55730. +# undef _POSIX_THREAD_ROBUST_PRIO_PROTECT
  55731. +#endif
  55732. +
  55733. +/* this has to be adapted to uClibc, not all are thread related */
  55734. +#ifndef __UCLIBC_HAS_THREADS__
  55735. +# undef _XOPEN_REALTIME_THREADS
  55736. +# undef _POSIX_THREADS
  55737. +# undef _POSIX_REENTRANT_FUNCTIONS
  55738. +# undef _POSIX_THREAD_SAFE_FUNCTIONS
  55739. +# undef _POSIX_THREAD_PRIORITY_SCHEDULING
  55740. +# undef _POSIX_THREAD_ATTR_STACKSIZE
  55741. +# undef _POSIX_THREAD_ATTR_STACKADDR
  55742. +# undef _POSIX_THREAD_PRIO_INHERIT
  55743. +# undef _POSIX_THREAD_PRIO_PROTECT
  55744. +# undef _POSIX_SEMAPHORES
  55745. +# undef _POSIX_ASYNCHRONOUS_IO
  55746. +# undef _POSIX_ASYNC_IO
  55747. +# undef _LFS_ASYNCHRONOUS_IO
  55748. +# undef _POSIX_PRIORITIZED_IO
  55749. +# undef _LFS64_ASYNCHRONOUS_IO
  55750. +# undef _POSIX_CPUTIME
  55751. +# undef _POSIX_THREAD_CPUTIME
  55752. +# undef _POSIX_READER_WRITER_LOCKS
  55753. +# undef _POSIX_TIMEOUTS
  55754. +# undef _POSIX_SPIN_LOCKS
  55755. +# undef _POSIX_BARRIERS
  55756. +# undef _POSIX_MESSAGE_PASSING
  55757. +# undef _POSIX_THREAD_PROCESS_SHARED
  55758. +# undef _POSIX_CLOCK_SELECTION
  55759. +# undef _POSIX_ADVISORY_INFO
  55760. +/*# undef _POSIX_RAW_SOCKETS*/
  55761. +/*# undef _POSIX2_CHAR_TERM*/
  55762. +# undef _POSIX_SPORADIC_SERVER
  55763. +# undef _POSIX_THREAD_SPORADIC_SERVER
  55764. +/*# undef _POSIX_TRACE
  55765. +# undef _POSIX_TRACE_EVENT_FILTER
  55766. +# undef _POSIX_TRACE_INHERIT
  55767. +# undef _POSIX_TRACE_LOG
  55768. +# undef _POSIX_TYPED_MEMORY_OBJECTS*/
  55769. +#endif
  55770. +
  55771. +/* were in earlier version, used by sysconf */
  55772. +#define _POSIX_POLL 1
  55773. +#define _POSIX_SELECT 1
  55774. +
  55775. +/* disable independently unsupported features */
  55776. +#undef _POSIX_TRACE
  55777. +#undef _POSIX_TRACE_EVENT_FILTER
  55778. +#undef _POSIX_TRACE_INHERIT
  55779. +#undef _POSIX_TRACE_LOG
  55780. +#undef _POSIX_TYPED_MEMORY_OBJECTS
  55781. +#undef _POSIX_SPAWN
  55782. +
  55783. +#if 0 /* does uClibc support these? */
  55784. +# undef _POSIX_ASYNCHRONOUS_IO
  55785. +# undef _POSIX_ASYNC_IO
  55786. +# undef _LFS_ASYNCHRONOUS_IO
  55787. +# undef _POSIX_PRIORITIZED_IO
  55788. +# undef _LFS64_ASYNCHRONOUS_IO
  55789. +# undef _POSIX_MESSAGE_PASSING
  55790. +#endif
  55791. +
  55792. +/* change options based on uClibc config options */
  55793. +
  55794. +#if 0 /*ndef __UCLIBC_HAS_POSIX_TIMERS__*/
  55795. +# undef _POSIX_TIMERS
  55796. +# undef _POSIX_THREAD_CPUTIME
  55797. +#endif
  55798. +
  55799. +#if 0 /*ndef __UCLIBC_HAS_POSIX_BARRIERS__*/
  55800. +# undef _POSIX_BARRIERS
  55801. +#endif
  55802. +
  55803. +#if 0 /*ndef __UCLIBC_HAS_POSIX_SPINLOCKS__*/
  55804. +# undef _POSIX_SPIN_LOCKS
  55805. +#endif
  55806. +
  55807. +#ifndef __ARCH_USE_MMU__
  55808. +# undef _POSIX_MEMLOCK
  55809. +# undef _POSIX_MEMLOCK_RANGE
  55810. +# undef _POSIX_MEMORY_PROTECTION
  55811. +#endif
  55812. +
  55813. +#ifndef __UCLIBC_HAS_LFS__
  55814. +# undef _LFS64_ASYNCHRONOUS_IO
  55815. +# undef _LFS_LARGEFILE
  55816. +# undef _LFS64_LARGEFILE
  55817. +# undef _LFS64_STDIO
  55818. +#endif
  55819. +
  55820. +#ifndef __UCLIBC_HAS_REALTIME__
  55821. +# undef _POSIX_SEMAPHORES
  55822. +#endif
  55823. +
  55824. +#ifndef __UCLIBC_HAS_REGEX__
  55825. +# undef _POSIX_REGEXP
  55826. +#endif
  55827. +
  55828. +#ifndef __UCLIBC_HAS_IPV6__
  55829. +# undef _POSIX_IPV6
  55830. +#endif
  55831. +
  55832. +#ifndef __UCLIBC_HAS_SOCKET__
  55833. +# undef _POSIX_RAW_SOCKETS
  55834. +#endif
  55835. +
  55836. +#endif /* bits/uClibc_posix_opt.h */
  55837. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_pthread.h uClibc-git/libc/sysdeps/linux/common/bits/uClibc_pthread.h
  55838. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_pthread.h 2012-05-15 09:20:09.000000000 +0200
  55839. +++ uClibc-git/libc/sysdeps/linux/common/bits/uClibc_pthread.h 2014-07-25 20:36:06.773334513 +0200
  55840. @@ -11,9 +11,8 @@
  55841. * Lesser General Public License for more details.
  55842. *
  55843. * You should have received a copy of the GNU Lesser General Public
  55844. - * License along with the GNU C Library; if not, write to the Free
  55845. - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  55846. - * 02111-1307 USA.
  55847. + * License along with the GNU C Library; see the file COPYING.LIB. If
  55848. + * not, see <http://www.gnu.org/licenses/>.
  55849. */
  55850. /* Supply prototypes for the internal thread functions used by the
  55851. @@ -27,15 +26,12 @@
  55852. # error "Always include <pthread.h> rather than <bits/uClibc_pthread.h>"
  55853. #endif
  55854. -#if defined _LIBC && (defined IS_IN_libc || defined NOT_IN_libc)
  55855. -
  55856. struct _pthread_cleanup_buffer;
  55857. /* Threading functions internal to uClibc. Make these thread functions
  55858. * weak so that we can elide them from single-threaded processes. */
  55859. extern int weak_function __pthread_mutex_init (pthread_mutex_t *__mutex,
  55860. - __const pthread_mutexattr_t *__mutex_attr);
  55861. -extern int weak_function __pthread_mutex_destroy (pthread_mutex_t *__mutex);
  55862. + const pthread_mutexattr_t *__mutex_attr);
  55863. extern int weak_function __pthread_mutex_lock (pthread_mutex_t *__mutex);
  55864. extern int weak_function __pthread_mutex_unlock (pthread_mutex_t *__mutex);
  55865. extern int weak_function __pthread_mutex_trylock (pthread_mutex_t *__mutex);
  55866. @@ -47,5 +43,3 @@
  55867. int __execute);
  55868. #endif
  55869. -
  55870. -#endif
  55871. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_stdio.h uClibc-git/libc/sysdeps/linux/common/bits/uClibc_stdio.h
  55872. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_stdio.h 2012-05-15 09:20:09.000000000 +0200
  55873. +++ uClibc-git/libc/sysdeps/linux/common/bits/uClibc_stdio.h 2014-07-25 20:36:06.773334513 +0200
  55874. @@ -54,27 +54,6 @@
  55875. #endif
  55876. /**********************************************************************/
  55877. -/* Make sure defines related to large files are consistent. */
  55878. -#ifdef _LIBC
  55879. -
  55880. -#ifdef __UCLIBC_HAS_LFS__
  55881. -#undef __USE_LARGEFILE
  55882. -#undef __USE_LARGEFILE64
  55883. -#undef __USE_FILE_OFFSET64
  55884. -/* If we're actually building uClibc with large file support, only define... */
  55885. -#define __USE_LARGEFILE64 1
  55886. -#endif /* __UCLIBC_HAS_LFS__ */
  55887. -
  55888. -#else /* not _LIBC */
  55889. -
  55890. -#ifndef __UCLIBC_HAS_LFS__
  55891. -#if defined(__LARGEFILE64_SOURCE) || defined(__USE_LARGEFILE64) || defined(__USE_FILE_OFFSET64)
  55892. -#error Sorry... uClibc was built without large file support!
  55893. -#endif
  55894. -#endif /* __UCLIBC_HAS_LFS__ */
  55895. -
  55896. -#endif /* _LIBC */
  55897. -/**********************************************************************/
  55898. #ifdef __UCLIBC_HAS_WCHAR__
  55899. #define __need_wchar_t
  55900. @@ -99,22 +78,7 @@
  55901. #define __STDIO_PUTC_MACRO
  55902. #endif
  55903. -
  55904. -/* These are consistency checks on the different options */
  55905. -
  55906. -#ifndef __STDIO_BUFFERS
  55907. -#undef __STDIO_GETC_MACRO
  55908. -#undef __STDIO_PUTC_MACRO
  55909. -#endif
  55910. -
  55911. -#ifdef __BCC__
  55912. -#undef __UCLIBC_HAS_LFS__
  55913. -#endif
  55914. -
  55915. -#ifndef __UCLIBC_HAS_LFS__
  55916. -#undef __UCLIBC_HAS_FOPEN_LARGEFILE_MODE__
  55917. -#endif
  55918. -
  55919. +#ifdef _LIBC
  55920. /**********************************************************************/
  55921. #include <bits/uClibc_mutex.h>
  55922. @@ -169,6 +133,8 @@
  55923. #endif
  55924. #endif
  55925. +#endif /* _LIBC */
  55926. +
  55927. /**********************************************************************/
  55928. #define __STDIO_IOFBF 0 /* Fully buffered. */
  55929. @@ -209,7 +175,7 @@
  55930. typedef __ssize_t __io_read_fn(void *__cookie, char *__buf, size_t __bufsize);
  55931. typedef __ssize_t __io_write_fn(void *__cookie,
  55932. - __const char *__buf, size_t __bufsize);
  55933. + const char *__buf, size_t __bufsize);
  55934. /* NOTE: GLIBC difference!!! -- fopencookie seek function
  55935. * For glibc, the type of pos is always (__off64_t *) but in our case
  55936. * it is type (__off_t *) when the lib is built without large file support.
  55937. @@ -224,7 +190,7 @@
  55938. __io_close_fn *close;
  55939. } _IO_cookie_io_functions_t;
  55940. -#if defined(_LIBC) || defined(_GNU_SOURCE)
  55941. +#ifdef __USE_GNU
  55942. typedef __io_read_fn cookie_read_function_t;
  55943. typedef __io_write_fn cookie_write_function_t;
  55944. @@ -238,6 +204,17 @@
  55945. #endif
  55946. /**********************************************************************/
  55947. +#if defined __UCLIBC_HAS_THREADS__ && !defined __UCLIBC_IO_MUTEX
  55948. +/* keep this in sync with uClibc_mutex.h */
  55949. +# ifdef __USE_STDIO_FUTEXES__
  55950. +# include <bits/stdio-lock.h>
  55951. +# define __UCLIBC_IO_MUTEX(M) _IO_lock_t M
  55952. +# else
  55953. +# include <bits/pthreadtypes.h>
  55954. +# define __UCLIBC_IO_MUTEX(M) pthread_mutex_t M
  55955. +# endif /* __UCLIBC_HAS_THREADS_NATIVE__ */
  55956. +#endif
  55957. +
  55958. struct __STDIO_FILE_STRUCT {
  55959. unsigned short __modeflags;
  55960. /* There could be a hole here, but modeflags is used most.*/
  55961. @@ -351,22 +328,27 @@
  55962. **********************************************************************/
  55963. #if defined _LIBC && (defined IS_IN_libc || defined NOT_IN_libc)
  55964. -extern void _stdio_init(void) attribute_hidden;
  55965. -extern void _stdio_term(void) attribute_hidden;
  55966. +extern void weak_function _stdio_init(void) attribute_hidden;
  55967. +extern void weak_function _stdio_term(void) attribute_hidden;
  55968. #ifdef __STDIO_HAS_OPENLIST
  55969. extern struct __STDIO_FILE_STRUCT *_stdio_openlist;
  55970. #ifdef __UCLIBC_HAS_THREADS__
  55971. -__UCLIBC_IO_MUTEX_EXTERN(_stdio_openlist_add_lock);
  55972. +__UCLIBC_IO_MUTEX_EXTERN(_stdio_openlist_add_lock)
  55973. +# ifndef __UCLIBC_HAS_THREADS_NATIVE__
  55974. + attribute_hidden
  55975. +# endif
  55976. + ;
  55977. #ifdef __STDIO_BUFFERS
  55978. -__UCLIBC_IO_MUTEX_EXTERN(_stdio_openlist_del_lock);
  55979. -extern volatile int _stdio_openlist_use_count; /* _stdio_openlist_del_lock */
  55980. -extern int _stdio_openlist_del_count; /* _stdio_openlist_del_lock */
  55981. +__UCLIBC_IO_MUTEX_EXTERN(_stdio_openlist_del_lock)
  55982. +# ifndef __UCLIBC_HAS_THREADS_NATIVE__
  55983. + attribute_hidden
  55984. +# endif
  55985. + ;
  55986. #endif
  55987. extern int _stdio_user_locking;
  55988. -extern void __stdio_init_mutex(__UCLIBC_MUTEX_TYPE *m) attribute_hidden;
  55989. #endif
  55990. #endif
  55991. @@ -465,6 +447,8 @@
  55992. #else
  55993. +# define __stdin stdin
  55994. +
  55995. #endif /* __STDIO_GETC_MACRO */
  55996. @@ -524,4 +508,8 @@
  55997. # endif
  55998. # endif
  55999. +#else
  56000. +
  56001. +# define __stdout stdout
  56002. +
  56003. #endif /* __STDIO_PUTC_MACRO */
  56004. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_touplow.h uClibc-git/libc/sysdeps/linux/common/bits/uClibc_touplow.h
  56005. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_touplow.h 2012-05-15 09:20:09.000000000 +0200
  56006. +++ uClibc-git/libc/sysdeps/linux/common/bits/uClibc_touplow.h 2014-07-25 20:36:06.777334534 +0200
  56007. @@ -11,9 +11,8 @@
  56008. * Lesser General Public License for more details.
  56009. *
  56010. * You should have received a copy of the GNU Lesser General Public
  56011. - * License along with the GNU C Library; if not, write to the Free
  56012. - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  56013. - * 02111-1307 USA.
  56014. + * License along with the GNU C Library; see the file COPYING.LIB. If
  56015. + * not, see <http://www.gnu.org/licenses/>.
  56016. */
  56017. /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
  56018. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_uintmaxtostr.h uClibc-git/libc/sysdeps/linux/common/bits/uClibc_uintmaxtostr.h
  56019. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_uintmaxtostr.h 2012-05-15 09:20:09.000000000 +0200
  56020. +++ uClibc-git/libc/sysdeps/linux/common/bits/uClibc_uintmaxtostr.h 2014-07-25 20:36:06.777334534 +0200
  56021. @@ -11,9 +11,8 @@
  56022. * Lesser General Public License for more details.
  56023. *
  56024. * You should have received a copy of the GNU Lesser General Public
  56025. - * License along with the GNU C Library; if not, write to the Free
  56026. - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  56027. - * 02111-1307 USA.
  56028. + * License along with the GNU C Library; see the file COPYING.LIB. If
  56029. + * not, see <http://www.gnu.org/licenses/>.
  56030. */
  56031. /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
  56032. @@ -28,16 +27,6 @@
  56033. #ifndef _UINTMAXTOSTR_H
  56034. #define _UINTMAXTOSTR_H 1
  56035. -#ifdef _FEATURES_H
  56036. -# ifndef __USE_ISOC99
  56037. -# error features was included without defining _ISOC99_SOURCE!
  56038. -# endif
  56039. -#else
  56040. -# ifndef _ISOC99_SOURCE
  56041. -# define _ISOC99_SOURCE
  56042. -# endif
  56043. -#endif
  56044. -
  56045. #include <features.h>
  56046. #include <limits.h>
  56047. #include <stdint.h>
  56048. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_uwchar.h uClibc-git/libc/sysdeps/linux/common/bits/uClibc_uwchar.h
  56049. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_uwchar.h 2012-05-15 09:20:09.000000000 +0200
  56050. +++ uClibc-git/libc/sysdeps/linux/common/bits/uClibc_uwchar.h 2014-07-25 20:36:06.777334534 +0200
  56051. @@ -11,9 +11,8 @@
  56052. * Lesser General Public License for more details.
  56053. *
  56054. * You should have received a copy of the GNU Lesser General Public
  56055. - * License along with the GNU C Library; if not, write to the Free
  56056. - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  56057. - * 02111-1307 USA.
  56058. + * License along with the GNU C Library; see the file COPYING.LIB. If
  56059. + * not, see <http://www.gnu.org/licenses/>.
  56060. */
  56061. /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
  56062. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_va_copy.h uClibc-git/libc/sysdeps/linux/common/bits/uClibc_va_copy.h
  56063. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uClibc_va_copy.h 2012-05-15 09:20:09.000000000 +0200
  56064. +++ uClibc-git/libc/sysdeps/linux/common/bits/uClibc_va_copy.h 2014-07-25 20:36:06.777334534 +0200
  56065. @@ -13,9 +13,8 @@
  56066. * Lesser General Public License for more details.
  56067. *
  56068. * You should have received a copy of the GNU Lesser General Public
  56069. - * License along with the GNU C Library; if not, write to the Free
  56070. - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  56071. - * 02111-1307 USA.
  56072. + * License along with the GNU C Library; see the file COPYING.LIB. If
  56073. + * not, see <http://www.gnu.org/licenses/>.
  56074. */
  56075. #ifndef _UCLIBC_VA_COPY_H
  56076. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uio.h uClibc-git/libc/sysdeps/linux/common/bits/uio.h
  56077. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/uio.h 2012-05-15 09:20:09.000000000 +0200
  56078. +++ uClibc-git/libc/sysdeps/linux/common/bits/uio.h 2014-07-25 20:36:06.777334534 +0200
  56079. @@ -12,9 +12,8 @@
  56080. Lesser General Public License for more details.
  56081. You should have received a copy of the GNU Lesser General Public
  56082. - License along with the GNU C Library; if not, write to the Free
  56083. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  56084. - 02111-1307 USA. */
  56085. + License along with the GNU C Library; if not, see
  56086. + <http://www.gnu.org/licenses/>. */
  56087. #if !defined _SYS_UIO_H && !defined _FCNTL_H
  56088. # error "Never include <bits/uio.h> directly; use <sys/uio.h> instead."
  56089. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/ustat.h uClibc-git/libc/sysdeps/linux/common/bits/ustat.h
  56090. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/ustat.h 2012-05-15 09:20:09.000000000 +0200
  56091. +++ uClibc-git/libc/sysdeps/linux/common/bits/ustat.h 2014-07-25 20:36:06.777334534 +0200
  56092. @@ -12,9 +12,8 @@
  56093. Lesser General Public License for more details.
  56094. You should have received a copy of the GNU Lesser General Public
  56095. - License along with the GNU C Library; if not, write to the Free
  56096. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  56097. - 02111-1307 USA. */
  56098. + License along with the GNU C Library; if not, see
  56099. + <http://www.gnu.org/licenses/>. */
  56100. #ifndef _SYS_USTAT_H
  56101. # error "Never include <bits/ustat.h> directly; use <sys/ustat.h> instead."
  56102. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/utmp.h uClibc-git/libc/sysdeps/linux/common/bits/utmp.h
  56103. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/utmp.h 2012-05-15 09:20:09.000000000 +0200
  56104. +++ uClibc-git/libc/sysdeps/linux/common/bits/utmp.h 2014-07-25 20:36:06.777334534 +0200
  56105. @@ -14,9 +14,8 @@
  56106. Lesser General Public License for more details.
  56107. You should have received a copy of the GNU Lesser General Public
  56108. - License along with the GNU C Library; if not, write to the Free
  56109. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  56110. - 02111-1307 USA. */
  56111. + License along with the GNU C Library; if not, see
  56112. + <http://www.gnu.org/licenses/>. */
  56113. #ifndef _UTMP_H
  56114. # error "Never include <bits/utmp.h> directly; use <utmp.h> instead."
  56115. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/utmpx.h uClibc-git/libc/sysdeps/linux/common/bits/utmpx.h
  56116. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/utmpx.h 2012-05-15 09:20:09.000000000 +0200
  56117. +++ uClibc-git/libc/sysdeps/linux/common/bits/utmpx.h 2014-07-25 20:36:06.777334534 +0200
  56118. @@ -13,9 +13,8 @@
  56119. Lesser General Public License for more details.
  56120. You should have received a copy of the GNU Lesser General Public
  56121. - License along with the GNU C Library; if not, write to the Free
  56122. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  56123. - 02111-1307 USA. */
  56124. + License along with the GNU C Library; if not, see
  56125. + <http://www.gnu.org/licenses/>. */
  56126. #ifndef _UTMPX_H
  56127. # error "Never include <bits/utmpx.h> directly; use <utmpx.h> instead."
  56128. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/utsname.h uClibc-git/libc/sysdeps/linux/common/bits/utsname.h
  56129. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/utsname.h 2012-05-15 09:20:09.000000000 +0200
  56130. +++ uClibc-git/libc/sysdeps/linux/common/bits/utsname.h 2014-07-25 20:36:06.777334534 +0200
  56131. @@ -12,9 +12,8 @@
  56132. Lesser General Public License for more details.
  56133. You should have received a copy of the GNU Lesser General Public
  56134. - License along with the GNU C Library; if not, write to the Free
  56135. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  56136. - 02111-1307 USA. */
  56137. + License along with the GNU C Library; if not, see
  56138. + <http://www.gnu.org/licenses/>. */
  56139. #ifndef _SYS_UTSNAME_H
  56140. # error "Never include <bits/utsname.h> directly; use <sys/utsname.h> instead."
  56141. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/waitflags.h uClibc-git/libc/sysdeps/linux/common/bits/waitflags.h
  56142. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/waitflags.h 2012-05-15 09:20:09.000000000 +0200
  56143. +++ uClibc-git/libc/sysdeps/linux/common/bits/waitflags.h 2014-07-25 20:36:06.777334534 +0200
  56144. @@ -13,9 +13,8 @@
  56145. Lesser General Public License for more details.
  56146. You should have received a copy of the GNU Lesser General Public
  56147. - License along with the GNU C Library; if not, write to the Free
  56148. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  56149. - 02111-1307 USA. */
  56150. + License along with the GNU C Library; if not, see
  56151. + <http://www.gnu.org/licenses/>. */
  56152. #if !defined _SYS_WAIT_H && !defined _STDLIB_H
  56153. # error "Never include <bits/waitflags.h> directly; use <sys/wait.h> instead."
  56154. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/waitstatus.h uClibc-git/libc/sysdeps/linux/common/bits/waitstatus.h
  56155. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/waitstatus.h 2012-05-15 09:20:09.000000000 +0200
  56156. +++ uClibc-git/libc/sysdeps/linux/common/bits/waitstatus.h 2014-07-25 20:36:06.777334534 +0200
  56157. @@ -13,9 +13,8 @@
  56158. Lesser General Public License for more details.
  56159. You should have received a copy of the GNU Lesser General Public
  56160. - License along with the GNU C Library; if not, write to the Free
  56161. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  56162. - 02111-1307 USA. */
  56163. + License along with the GNU C Library; if not, see
  56164. + <http://www.gnu.org/licenses/>. */
  56165. #if !defined _SYS_WAIT_H && !defined _STDLIB_H
  56166. # error "Never include <bits/waitstatus.h> directly; use <sys/wait.h> instead."
  56167. @@ -25,7 +24,7 @@
  56168. /* Everything extant so far uses these same bits. */
  56169. -/* If WIFEXITED(STATUS), the low-order 8 bits of the status. */
  56170. +/* If WIFEXITED(STATUS), the low-order 8 bits of exit(N). */
  56171. #define __WEXITSTATUS(status) (((status) & 0xff00) >> 8)
  56172. /* If WIFSIGNALED(STATUS), the terminating signal. */
  56173. @@ -37,12 +36,20 @@
  56174. /* Nonzero if STATUS indicates normal termination. */
  56175. #define __WIFEXITED(status) (__WTERMSIG(status) == 0)
  56176. -/* Nonzero if STATUS indicates termination by a signal. */
  56177. -#define __WIFSIGNALED(status) \
  56178. - (((signed char) (((status) & 0x7f) + 1) >> 1) > 0)
  56179. +/* Nonzero if STATUS indicates termination by a signal.
  56180. + * Note that status 0x007f is "died from signal 127", not "stopped by signal 0".
  56181. + * This does happen on MIPS.
  56182. + * The comparison is "< 0xff", not "< 0x7f", because WCOREDUMP bit (0x80)
  56183. + * can be set too.
  56184. + */
  56185. +#define __WIFSIGNALED(status) (((unsigned)((status) & 0xffff) - 1U) < 0xffU)
  56186. /* Nonzero if STATUS indicates the child is stopped. */
  56187. +#if !defined(__mips__)
  56188. #define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
  56189. +#else
  56190. +#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f && ((status) & 0xff00))
  56191. +#endif
  56192. /* Nonzero if STATUS indicates the child continued after a stop. We only
  56193. define this if <bits/waitflags.h> provides the WCONTINUED flag bit. */
  56194. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/wchar.h uClibc-git/libc/sysdeps/linux/common/bits/wchar.h
  56195. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/wchar.h 2012-05-15 09:20:09.000000000 +0200
  56196. +++ uClibc-git/libc/sysdeps/linux/common/bits/wchar.h 2014-07-25 20:36:06.777334534 +0200
  56197. @@ -13,9 +13,8 @@
  56198. Lesser General Public License for more details.
  56199. You should have received a copy of the GNU Lesser General Public
  56200. - License along with the GNU C Library; if not, write to the Free
  56201. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  56202. - 02111-1307 USA. */
  56203. + License along with the GNU C Library; if not, see
  56204. + <http://www.gnu.org/licenses/>. */
  56205. #ifndef _BITS_WCHAR_H
  56206. #define _BITS_WCHAR_H 1
  56207. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/xopen_lim.h uClibc-git/libc/sysdeps/linux/common/bits/xopen_lim.h
  56208. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/bits/xopen_lim.h 2012-05-15 09:20:09.000000000 +0200
  56209. +++ uClibc-git/libc/sysdeps/linux/common/bits/xopen_lim.h 2014-07-25 20:36:06.777334534 +0200
  56210. @@ -12,9 +12,8 @@
  56211. Lesser General Public License for more details.
  56212. You should have received a copy of the GNU Lesser General Public
  56213. - License along with the GNU C Library; if not, write to the Free
  56214. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  56215. - 02111-1307 USA. */
  56216. + License along with the GNU C Library; if not, see
  56217. + <http://www.gnu.org/licenses/>. */
  56218. /*
  56219. * Never include this file directly; use <limits.h> instead.
  56220. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/brk.c uClibc-git/libc/sysdeps/linux/common/brk.c
  56221. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/brk.c 2012-05-15 09:20:09.000000000 +0200
  56222. +++ uClibc-git/libc/sysdeps/linux/common/brk.c 2014-07-25 20:36:06.777334534 +0200
  56223. @@ -8,10 +8,8 @@
  56224. #include <unistd.h>
  56225. #include <sys/syscall.h>
  56226. -libc_hidden_proto(brk)
  56227. -
  56228. #define __NR___syscall_brk __NR_brk
  56229. -static inline _syscall1(void *, __syscall_brk, void *, end)
  56230. +static __always_inline _syscall1(void *, __syscall_brk, void *, end)
  56231. /* This must be initialized data because commons can't have aliases. */
  56232. void * __curbrk attribute_hidden = 0;
  56233. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/capget.c uClibc-git/libc/sysdeps/linux/common/capget.c
  56234. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/capget.c 2012-05-15 09:20:09.000000000 +0200
  56235. +++ uClibc-git/libc/sysdeps/linux/common/capget.c 2014-07-25 20:36:06.777334534 +0200
  56236. @@ -8,7 +8,8 @@
  56237. */
  56238. #include <sys/syscall.h>
  56239. -int capget(void *header, void *data);
  56240. +
  56241. #ifdef __NR_capget
  56242. +int capget(void *header, void *data);
  56243. _syscall2(int, capget, void *, header, void *, data)
  56244. #endif
  56245. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/capset.c uClibc-git/libc/sysdeps/linux/common/capset.c
  56246. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/capset.c 2012-05-15 09:20:09.000000000 +0200
  56247. +++ uClibc-git/libc/sysdeps/linux/common/capset.c 2014-07-25 20:36:06.777334534 +0200
  56248. @@ -9,7 +9,7 @@
  56249. #include <sys/syscall.h>
  56250. -int capset(void *header, const void *data);
  56251. #ifdef __NR_capset
  56252. +int capset(void *header, const void *data);
  56253. _syscall2(int, capset, void *, header, const void *, data)
  56254. #endif
  56255. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/chdir.c uClibc-git/libc/sysdeps/linux/common/chdir.c
  56256. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/chdir.c 2012-05-15 09:20:09.000000000 +0200
  56257. +++ uClibc-git/libc/sysdeps/linux/common/chdir.c 2014-07-25 20:36:06.777334534 +0200
  56258. @@ -8,15 +8,7 @@
  56259. */
  56260. #include <sys/syscall.h>
  56261. -#include <string.h>
  56262. #include <unistd.h>
  56263. -#include <sys/param.h>
  56264. -
  56265. -#define __NR___syscall_chdir __NR_chdir
  56266. -static __inline__ _syscall1(int, __syscall_chdir, const char *, path)
  56267. -int chdir(const char *path)
  56268. -{
  56269. - return __syscall_chdir(path);
  56270. -}
  56271. +_syscall1(int, chdir, const char *, path)
  56272. libc_hidden_def(chdir)
  56273. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/chmod.c uClibc-git/libc/sysdeps/linux/common/chmod.c
  56274. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/chmod.c 2012-05-15 09:20:09.000000000 +0200
  56275. +++ uClibc-git/libc/sysdeps/linux/common/chmod.c 2014-07-25 20:36:06.777334534 +0200
  56276. @@ -9,13 +9,22 @@
  56277. #include <sys/syscall.h>
  56278. #include <sys/stat.h>
  56279. +#include <unistd.h>
  56280. +#if defined __NR_fchmodat && !defined __NR_chmod
  56281. +# include <fcntl.h>
  56282. +int chmod(const char *path, mode_t mode)
  56283. +{
  56284. + return fchmodat(AT_FDCWD, path, mode, 0);
  56285. +}
  56286. -#define __NR___syscall_chmod __NR_chmod
  56287. +#else
  56288. +# define __NR___syscall_chmod __NR_chmod
  56289. static __inline__ _syscall2(int, __syscall_chmod, const char *, path, __kernel_mode_t, mode)
  56290. int chmod(const char *path, mode_t mode)
  56291. {
  56292. return __syscall_chmod(path, mode);
  56293. }
  56294. +#endif
  56295. libc_hidden_def(chmod)
  56296. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/chown.c uClibc-git/libc/sysdeps/linux/common/chown.c
  56297. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/chown.c 2012-05-15 09:20:09.000000000 +0200
  56298. +++ uClibc-git/libc/sysdeps/linux/common/chown.c 2014-07-25 20:36:06.777334534 +0200
  56299. @@ -11,18 +11,26 @@
  56300. #include <unistd.h>
  56301. #include <bits/wordsize.h>
  56302. +#if defined __NR_fchownat && !defined __NR_chown
  56303. +# include <fcntl.h>
  56304. +int chown(const char *path, uid_t owner, gid_t group)
  56305. +{
  56306. + return fchownat(AT_FDCWD, path, owner, group, 0);
  56307. +}
  56308. -#if (__WORDSIZE == 32 && defined(__NR_chown32)) || __WORDSIZE == 64
  56309. -# ifdef __NR_chown32
  56310. -# undef __NR_chown
  56311. -# define __NR_chown __NR_chown32
  56312. -# endif
  56313. +#else
  56314. +
  56315. +# if (__WORDSIZE == 32 && defined(__NR_chown32)) || __WORDSIZE == 64
  56316. +# ifdef __NR_chown32
  56317. +# undef __NR_chown
  56318. +# define __NR_chown __NR_chown32
  56319. +# endif
  56320. _syscall3(int, chown, const char *, path, uid_t, owner, gid_t, group)
  56321. -#else
  56322. +# else
  56323. -# define __NR___syscall_chown __NR_chown
  56324. +# define __NR___syscall_chown __NR_chown
  56325. static __inline__ _syscall3(int, __syscall_chown, const char *, path,
  56326. __kernel_uid_t, owner, __kernel_gid_t, group)
  56327. @@ -35,6 +43,7 @@
  56328. }
  56329. return (__syscall_chown(path, owner, group));
  56330. }
  56331. -#endif
  56332. +# endif
  56333. +#endif
  56334. libc_hidden_def(chown)
  56335. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/clock_getres.c uClibc-git/libc/sysdeps/linux/common/clock_getres.c
  56336. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/clock_getres.c 2012-05-15 09:20:09.000000000 +0200
  56337. +++ uClibc-git/libc/sysdeps/linux/common/clock_getres.c 2014-07-25 20:36:06.777334534 +0200
  56338. @@ -9,11 +9,11 @@
  56339. #include <sys/syscall.h>
  56340. #include <time.h>
  56341. -#include <unistd.h>
  56342. #ifdef __NR_clock_getres
  56343. _syscall2(int, clock_getres, clockid_t, clock_id, struct timespec*, res)
  56344. #else
  56345. +# include <unistd.h>
  56346. int clock_getres(clockid_t clock_id, struct timespec* res)
  56347. {
  56348. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/clock_gettime.c uClibc-git/libc/sysdeps/linux/common/clock_gettime.c
  56349. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/clock_gettime.c 2012-05-15 09:20:09.000000000 +0200
  56350. +++ uClibc-git/libc/sysdeps/linux/common/clock_gettime.c 2014-07-25 20:36:06.777334534 +0200
  56351. @@ -10,11 +10,11 @@
  56352. #include <sys/syscall.h>
  56353. #include <time.h>
  56354. -#include <sys/time.h>
  56355. #ifdef __NR_clock_gettime
  56356. _syscall2(int, clock_gettime, clockid_t, clock_id, struct timespec*, tp)
  56357. #else
  56358. +# include <sys/time.h>
  56359. int clock_gettime(clockid_t clock_id, struct timespec* tp)
  56360. {
  56361. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/clock_settime.c uClibc-git/libc/sysdeps/linux/common/clock_settime.c
  56362. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/clock_settime.c 2012-05-15 09:20:09.000000000 +0200
  56363. +++ uClibc-git/libc/sysdeps/linux/common/clock_settime.c 2014-07-25 20:36:06.777334534 +0200
  56364. @@ -9,11 +9,11 @@
  56365. #include <sys/syscall.h>
  56366. #include <time.h>
  56367. -#include <sys/time.h>
  56368. #ifdef __NR_clock_settime
  56369. _syscall2(int, clock_settime, clockid_t, clock_id, const struct timespec*, tp)
  56370. #else
  56371. +# include <sys/time.h>
  56372. int clock_settime(clockid_t clock_id, const struct timespec* tp)
  56373. {
  56374. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/close.c uClibc-git/libc/sysdeps/linux/common/close.c
  56375. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/close.c 2012-05-15 09:20:09.000000000 +0200
  56376. +++ uClibc-git/libc/sysdeps/linux/common/close.c 2014-07-25 20:36:06.777334534 +0200
  56377. @@ -9,12 +9,13 @@
  56378. #include <sys/syscall.h>
  56379. #include <unistd.h>
  56380. +#include <cancel.h>
  56381. -_syscall1(int, close, int, fd)
  56382. +#define __NR___close_nocancel __NR_close
  56383. +_syscall1(int, __NC(close), int, fd)
  56384. -#ifndef __LINUXTHREADS_OLD__
  56385. -libc_hidden_def(close)
  56386. -#else
  56387. -libc_hidden_weak(close)
  56388. -strong_alias(close,__libc_close)
  56389. -#endif
  56390. +#define __NR___close_nocancel_no_status __NR_close
  56391. +_syscall_noerr1(void, __close_nocancel_no_status, int, fd)
  56392. +
  56393. +CANCELLABLE_SYSCALL(int, close, (int fd), (fd))
  56394. +lt_libc_hidden(close)
  56395. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/cmsg_nxthdr.c uClibc-git/libc/sysdeps/linux/common/cmsg_nxthdr.c
  56396. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/cmsg_nxthdr.c 2012-05-15 09:20:09.000000000 +0200
  56397. +++ uClibc-git/libc/sysdeps/linux/common/cmsg_nxthdr.c 2014-07-25 20:36:06.777334534 +0200
  56398. @@ -13,12 +13,11 @@
  56399. Lesser General Public License for more details.
  56400. You should have received a copy of the GNU Lesser General Public
  56401. - License along with the GNU C Library; if not, write to the Free
  56402. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  56403. - 02111-1307 USA. */
  56404. + License along with the GNU C Library; if not, see
  56405. + <http://www.gnu.org/licenses/>. */
  56406. -#define __FORCE_GLIBC
  56407. #include <features.h>
  56408. +#include <stddef.h>
  56409. /* Prevent math.h from defining a colliding inline */
  56410. #undef __USE_EXTERN_INLINES
  56411. #include <sys/socket.h>
  56412. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/creat64.c uClibc-git/libc/sysdeps/linux/common/creat64.c
  56413. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/creat64.c 2012-05-15 09:20:09.000000000 +0200
  56414. +++ uClibc-git/libc/sysdeps/linux/common/creat64.c 2014-07-25 20:36:06.777334534 +0200
  56415. @@ -12,19 +12,17 @@
  56416. Lesser General Public License for more details.
  56417. You should have received a copy of the GNU Lesser General Public
  56418. - License along with the GNU C Library; if not, write to the Free
  56419. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  56420. - 02111-1307 USA. */
  56421. + License along with the GNU C Library; if not, see
  56422. + <http://www.gnu.org/licenses/>. */
  56423. #include <_lfs_64.h>
  56424. -
  56425. -#ifdef __UCLIBC_HAS_LFS__
  56426. #include <fcntl.h>
  56427. -#include <sys/types.h>
  56428. +#include <cancel.h>
  56429. /* Create FILE with protections MODE. */
  56430. int creat64(const char *file, mode_t mode)
  56431. {
  56432. - return open64(file, O_WRONLY|O_CREAT|O_TRUNC, mode);
  56433. + return open64(file, O_WRONLY | O_CREAT | O_TRUNC, mode);
  56434. }
  56435. -#endif /* __UCLIBC_HAS_LFS__ */
  56436. +/* open handled cancellation, noop on uClibc */
  56437. +LIBC_CANCEL_HANDLED();
  56438. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/creat.c uClibc-git/libc/sysdeps/linux/common/creat.c
  56439. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/creat.c 2012-05-15 09:20:09.000000000 +0200
  56440. +++ uClibc-git/libc/sysdeps/linux/common/creat.c 2014-07-25 20:36:06.777334534 +0200
  56441. @@ -8,8 +8,11 @@
  56442. */
  56443. #include <fcntl.h>
  56444. +#include <cancel.h>
  56445. int creat(const char *file, mode_t mode)
  56446. {
  56447. return open(file, O_WRONLY | O_CREAT | O_TRUNC, mode);
  56448. }
  56449. +/* open handled cancellation, noop on uClibc */
  56450. +LIBC_CANCEL_HANDLED();
  56451. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/create_module.c uClibc-git/libc/sysdeps/linux/common/create_module.c
  56452. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/create_module.c 2012-05-15 09:20:09.000000000 +0200
  56453. +++ uClibc-git/libc/sysdeps/linux/common/create_module.c 2014-07-25 20:36:06.777334534 +0200
  56454. @@ -7,10 +7,10 @@
  56455. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  56456. */
  56457. -#include <errno.h>
  56458. -#include <unistd.h>
  56459. #include <features.h>
  56460. -#include <sys/types.h>
  56461. +#define __need_size_t
  56462. +#include <stddef.h>
  56463. +#include <errno.h>
  56464. #include <sys/syscall.h>
  56465. #ifdef __NR_create_module
  56466. @@ -22,7 +22,7 @@
  56467. static __inline__ _syscall2(long, __create_module, const char *, name, size_t, size)
  56468. /* By checking the value of errno, we know if we have been fooled
  56469. * by the syscall2 macro making a very high address look like a
  56470. - * negative, so we we fix it up here. */
  56471. + * negative, so we fix it up here. */
  56472. unsigned long create_module(const char *name, size_t size)
  56473. {
  56474. long ret = __create_module(name, size);
  56475. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/delete_module.c uClibc-git/libc/sysdeps/linux/common/delete_module.c
  56476. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/delete_module.c 2012-05-15 09:20:09.000000000 +0200
  56477. +++ uClibc-git/libc/sysdeps/linux/common/delete_module.c 2014-07-25 20:36:06.777334534 +0200
  56478. @@ -7,7 +7,7 @@
  56479. */
  56480. #include <sys/syscall.h>
  56481. -int delete_module(const char *name, unsigned int flags);
  56482. #ifdef __NR_delete_module
  56483. +int delete_module(const char *name, unsigned int flags);
  56484. _syscall2(int, delete_module, const char *, name, unsigned int, flags)
  56485. #endif
  56486. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/dl-osinfo.h uClibc-git/libc/sysdeps/linux/common/dl-osinfo.h
  56487. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/dl-osinfo.h 2012-05-15 09:20:09.000000000 +0200
  56488. +++ uClibc-git/libc/sysdeps/linux/common/dl-osinfo.h 2014-07-25 20:36:06.777334534 +0200
  56489. @@ -17,10 +17,11 @@
  56490. # endif
  56491. # include <stdint.h>
  56492. -# include <sys/time.h>
  56493. # ifdef IS_IN_libc
  56494. -#include <fcntl.h>
  56495. +# include <fcntl.h>
  56496. +# include <unistd.h>
  56497. +# include <sys/time.h>
  56498. # define OPEN open
  56499. # define READ read
  56500. # define CLOSE close
  56501. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/dup2.c uClibc-git/libc/sysdeps/linux/common/dup2.c
  56502. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/dup2.c 2012-05-15 09:20:09.000000000 +0200
  56503. +++ uClibc-git/libc/sysdeps/linux/common/dup2.c 2014-07-25 20:36:06.777334534 +0200
  56504. @@ -9,7 +9,24 @@
  56505. #include <sys/syscall.h>
  56506. #include <unistd.h>
  56507. +#if defined __NR_dup3 && !defined __NR_dup2
  56508. +# include <fcntl.h>
  56509. +extern int __libc_fcntl (int fd, int cmd, ...);
  56510. +libc_hidden_proto(__libc_fcntl);
  56511. +int dup2(int old, int newfd)
  56512. +{
  56513. + /*
  56514. + * Check if old fd is valid before we try
  56515. + * to ducplicate it. Return it if valid
  56516. + * or EBADF otherwise
  56517. + */
  56518. + if (old == newfd)
  56519. + return fcntl(old, F_GETFL, 0) < 0 ? -1 : newfd;
  56520. + return dup3(old, newfd, 0);
  56521. +}
  56522. +#else
  56523. _syscall2(int, dup2, int, oldfd, int, newfd)
  56524. +#endif
  56525. libc_hidden_def(dup2)
  56526. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/dup3.c uClibc-git/libc/sysdeps/linux/common/dup3.c
  56527. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/dup3.c 1970-01-01 01:00:00.000000000 +0100
  56528. +++ uClibc-git/libc/sysdeps/linux/common/dup3.c 2014-07-25 20:36:06.777334534 +0200
  56529. @@ -0,0 +1,16 @@
  56530. +/* vi: set sw=4 ts=4: */
  56531. +/*
  56532. + * dup3() for uClibc
  56533. + *
  56534. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  56535. + *
  56536. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  56537. + */
  56538. +
  56539. +#include <sys/syscall.h>
  56540. +#include <unistd.h>
  56541. +
  56542. +#if defined(__NR_dup3)
  56543. +_syscall3(int, dup3, int, oldfd, int, newfd, int, flags)
  56544. +libc_hidden_def(dup3)
  56545. +#endif
  56546. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/epoll.c uClibc-git/libc/sysdeps/linux/common/epoll.c
  56547. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/epoll.c 2012-05-15 09:20:09.000000000 +0200
  56548. +++ uClibc-git/libc/sysdeps/linux/common/epoll.c 2014-07-25 20:36:06.777334534 +0200
  56549. @@ -1,6 +1,6 @@
  56550. /* vi: set sw=4 ts=4: */
  56551. /*
  56552. - * epoll_create() / epoll_ctl() / epoll_wait() for uClibc
  56553. + * epoll_create() / epoll_ctl() / epoll_wait() / epoll_pwait() for uClibc
  56554. *
  56555. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  56556. *
  56557. @@ -9,75 +9,61 @@
  56558. #include <sys/syscall.h>
  56559. #include <sys/epoll.h>
  56560. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  56561. -# include <sysdep-cancel.h>
  56562. -#else
  56563. -# define SINGLE_THREAD_P 1
  56564. -#endif
  56565. +#include <cancel.h>
  56566. -/*
  56567. - * epoll_create()
  56568. - */
  56569. #ifdef __NR_epoll_create
  56570. _syscall1(int, epoll_create, int, size)
  56571. #endif
  56572. -/*
  56573. - * epoll_create1()
  56574. - */
  56575. #ifdef __NR_epoll_create1
  56576. _syscall1(int, epoll_create1, int, flags)
  56577. #endif
  56578. -/*
  56579. - * epoll_ctl()
  56580. - */
  56581. +#if defined __NR_epoll_create1 && !defined __NR_epoll_create
  56582. +int epoll_create(int size)
  56583. +{
  56584. + return INLINE_SYSCALL(epoll_create1, 1, 0);
  56585. +}
  56586. +
  56587. +#endif
  56588. +
  56589. #ifdef __NR_epoll_ctl
  56590. -_syscall4(int,epoll_ctl, int, epfd, int, op, int, fd, struct epoll_event *, event)
  56591. +_syscall4(int, epoll_ctl, int, epfd, int, op, int, fd, struct epoll_event *, event)
  56592. #endif
  56593. -/*
  56594. - * epoll_wait()
  56595. - */
  56596. #ifdef __NR_epoll_wait
  56597. -extern __typeof(epoll_wait) __libc_epoll_wait;
  56598. -int __libc_epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout)
  56599. +static int __NC(epoll_wait)(int epfd, struct epoll_event *events, int maxevents, int timeout)
  56600. {
  56601. - if (SINGLE_THREAD_P)
  56602. - return INLINE_SYSCALL(epoll_wait, 4, epfd, events, maxevents, timeout);
  56603. -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
  56604. - else {
  56605. - int oldtype = LIBC_CANCEL_ASYNC ();
  56606. - int result = INLINE_SYSCALL(epoll_wait, 4, epfd, events, maxevents, timeout);
  56607. - LIBC_CANCEL_RESET (oldtype);
  56608. - return result;
  56609. - }
  56610. -# endif
  56611. + return INLINE_SYSCALL(epoll_wait, 4, epfd, events, maxevents, timeout);
  56612. }
  56613. -weak_alias(__libc_epoll_wait, epoll_wait)
  56614. +CANCELLABLE_SYSCALL(int, epoll_wait, (int epfd, struct epoll_event *events, int maxevents, int timeout),
  56615. + (epfd, events, maxevents, timeout))
  56616. #endif
  56617. -/*
  56618. - * epoll_pwait()
  56619. - */
  56620. #ifdef __NR_epoll_pwait
  56621. # include <signal.h>
  56622. -extern __typeof(epoll_pwait) __libc_epoll_pwait;
  56623. -int __libc_epoll_pwait(int epfd, struct epoll_event *events, int maxevents,
  56624. - int timeout, const sigset_t *set)
  56625. +# define __NR___syscall_epoll_pwait __NR_epoll_pwait
  56626. +static __always_inline _syscall6(int, __syscall_epoll_pwait, int, epfd, struct epoll_event *, events,
  56627. + int, maxevents, int, timeout, const sigset_t *, sigmask, size_t, sigsetsize)
  56628. +
  56629. +static int __NC(epoll_pwait)(int epfd, struct epoll_event *events, int maxevents, int timeout,
  56630. + const sigset_t *set)
  56631. {
  56632. - int nsig = _NSIG / 8;
  56633. - if (SINGLE_THREAD_P)
  56634. - return INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, nsig);
  56635. -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
  56636. - else {
  56637. - int oldtype = LIBC_CANCEL_ASYNC ();
  56638. - int result = INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, nsig);
  56639. - LIBC_CANCEL_RESET (oldtype);
  56640. - return result;
  56641. - }
  56642. -# endif
  56643. + return __syscall_epoll_pwait(epfd, events, maxevents, timeout, set, __SYSCALL_SIGSET_T_SIZE);
  56644. }
  56645. -weak_alias(__libc_epoll_pwait, epoll_pwait)
  56646. +CANCELLABLE_SYSCALL(int, epoll_pwait, (int epfd, struct epoll_event *events, int maxevents, int timeout,
  56647. + const sigset_t *set),
  56648. + (epfd, events, maxevents, timeout, set))
  56649. +/*
  56650. + * If epoll_wait is not defined, then call epoll_pwait instead using NULL
  56651. + * for sigmask argument
  56652. + */
  56653. +# ifndef __NR_epoll_wait
  56654. +# include <stddef.h>
  56655. +int epoll_wait(int epfd, struct epoll_event *events, int maxevents, int timeout)
  56656. +{
  56657. + return INLINE_SYSCALL(epoll_pwait, 5, epfd, events, maxevents, timeout, NULL);
  56658. +}
  56659. +# endif
  56660. #endif
  56661. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/eventfd.c uClibc-git/libc/sysdeps/linux/common/eventfd.c
  56662. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/eventfd.c 2012-05-15 09:20:09.000000000 +0200
  56663. +++ uClibc-git/libc/sysdeps/linux/common/eventfd.c 2014-07-25 20:36:06.777334534 +0200
  56664. @@ -7,12 +7,24 @@
  56665. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  56666. */
  56667. +#include <errno.h>
  56668. #include <sys/syscall.h>
  56669. #include <sys/eventfd.h>
  56670. /*
  56671. * eventfd()
  56672. */
  56673. -#ifdef __NR_eventfd
  56674. -_syscall2(int, eventfd, int, count, int, flags)
  56675. +#if defined __NR_eventfd || defined __NR_eventfd2
  56676. +int eventfd (int count, int flags)
  56677. +{
  56678. +#if defined __NR_eventfd2
  56679. + return INLINE_SYSCALL (eventfd2, 2, count, flags);
  56680. +#elif defined __NR_eventfd
  56681. + if (flags != 0) {
  56682. + __set_errno (EINVAL);
  56683. + return -1;
  56684. + }
  56685. + return INLINE_SYSCALL (eventfd, 1, count);
  56686. +#endif
  56687. +}
  56688. #endif
  56689. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/_exit.c uClibc-git/libc/sysdeps/linux/common/_exit.c
  56690. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/_exit.c 2012-05-15 09:20:09.000000000 +0200
  56691. +++ uClibc-git/libc/sysdeps/linux/common/_exit.c 2014-07-25 20:36:06.757334429 +0200
  56692. @@ -7,28 +7,36 @@
  56693. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  56694. */
  56695. -#include <features.h>
  56696. -#include <errno.h>
  56697. #include <unistd.h>
  56698. -#include <sys/types.h>
  56699. +#include <stdlib.h>
  56700. #include <sys/syscall.h>
  56701. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  56702. -#include <sysdep.h>
  56703. +#include <bits/kernel-features.h>
  56704. +
  56705. +#ifdef __UCLIBC_ABORT_INSTRUCTION__
  56706. +# define ABORT_INSTRUCTION __asm__(__UCLIBC_ABORT_INSTRUCTION__)
  56707. +#else
  56708. +# warning "no abort instruction defined for this arch"
  56709. #endif
  56710. +/* have to check for kernel 2.5.35 too, since NR was earlier present */
  56711. +#if defined __NR_exit_group && __LINUX_KERNEL_VERSION >= 0x020600 \
  56712. + && defined __UCLIBC_HAS_THREADS__
  56713. +# undef __NR_exit
  56714. +# define __NR_exit __NR_exit_group
  56715. +#endif
  56716. -void attribute_noreturn _exit(int status)
  56717. +void _exit(int status)
  56718. {
  56719. /* The loop is added only to keep gcc happy. */
  56720. while(1)
  56721. {
  56722. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  56723. -# ifdef __NR_exit_group
  56724. - INLINE_SYSCALL(exit_group, 1, status);
  56725. -# endif
  56726. -#endif
  56727. INLINE_SYSCALL(exit, 1, status);
  56728. +#ifdef ABORT_INSTRUCTION
  56729. + ABORT_INSTRUCTION;
  56730. +#endif
  56731. }
  56732. }
  56733. libc_hidden_def(_exit)
  56734. +#ifdef __USE_ISOC99
  56735. weak_alias(_exit,_Exit)
  56736. +#endif
  56737. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/faccessat.c uClibc-git/libc/sysdeps/linux/common/faccessat.c
  56738. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/faccessat.c 2012-05-15 09:20:09.000000000 +0200
  56739. +++ uClibc-git/libc/sysdeps/linux/common/faccessat.c 2014-07-25 20:36:06.777334534 +0200
  56740. @@ -11,6 +11,7 @@
  56741. #ifdef __NR_faccessat
  56742. _syscall4(int, faccessat, int, fd, const char *, file, int, type, int, flag)
  56743. +libc_hidden_def(faccessat)
  56744. #else
  56745. /* should add emulation with faccess() and /proc/self/fd/ ... */
  56746. #endif
  56747. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fchdir.c uClibc-git/libc/sysdeps/linux/common/fchdir.c
  56748. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fchdir.c 2012-05-15 09:20:09.000000000 +0200
  56749. +++ uClibc-git/libc/sysdeps/linux/common/fchdir.c 2014-07-25 20:36:06.777334534 +0200
  56750. @@ -10,6 +10,7 @@
  56751. #include <sys/syscall.h>
  56752. #include <unistd.h>
  56753. -
  56754. +#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
  56755. _syscall1(int, fchdir, int, fd)
  56756. libc_hidden_def(fchdir)
  56757. +#endif
  56758. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fchmodat.c uClibc-git/libc/sysdeps/linux/common/fchmodat.c
  56759. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fchmodat.c 2012-05-15 09:20:09.000000000 +0200
  56760. +++ uClibc-git/libc/sysdeps/linux/common/fchmodat.c 2014-07-25 20:36:06.777334534 +0200
  56761. @@ -32,6 +32,7 @@
  56762. return INLINE_SYSCALL(fchmodat, 3, fd, file, mode);
  56763. }
  56764. +libc_hidden_def(fchmodat)
  56765. #else
  56766. /* should add emulation with fchmod() and /proc/self/fd/ ... */
  56767. #endif
  56768. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fchownat.c uClibc-git/libc/sysdeps/linux/common/fchownat.c
  56769. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fchownat.c 2012-05-15 09:20:09.000000000 +0200
  56770. +++ uClibc-git/libc/sysdeps/linux/common/fchownat.c 2014-07-25 20:36:06.777334534 +0200
  56771. @@ -11,6 +11,7 @@
  56772. #ifdef __NR_fchownat
  56773. _syscall5(int, fchownat, int, fd, const char *, file, uid_t, owner, gid_t, group, int, flag)
  56774. +libc_hidden_def(fchownat)
  56775. #else
  56776. /* should add emulation with fchown() and /proc/self/fd/ ... */
  56777. #endif
  56778. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fdatasync.c uClibc-git/libc/sysdeps/linux/common/fdatasync.c
  56779. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fdatasync.c 2012-05-15 09:20:09.000000000 +0200
  56780. +++ uClibc-git/libc/sysdeps/linux/common/fdatasync.c 2014-07-25 20:36:06.777334534 +0200
  56781. @@ -8,36 +8,17 @@
  56782. */
  56783. #include <sys/syscall.h>
  56784. -#include <unistd.h>
  56785. #if !defined __NR_fdatasync && defined __NR_osf_fdatasync
  56786. # define __NR_fdatasync __NR_osf_fdatasync
  56787. #endif
  56788. #ifdef __NR_fdatasync
  56789. +# include <unistd.h>
  56790. +# include <cancel.h>
  56791. -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
  56792. -# include <sysdep-cancel.h>
  56793. -# else
  56794. -# define SINGLE_THREAD_P 1
  56795. -# endif
  56796. -
  56797. -#define __NR___syscall_fdatasync __NR_fdatasync
  56798. -
  56799. -static __always_inline
  56800. -_syscall1(int, __syscall_fdatasync, int, fd)
  56801. -
  56802. -int fdatasync(int fd)
  56803. -{
  56804. - if (SINGLE_THREAD_P)
  56805. - return __syscall_fdatasync(fd);
  56806. -
  56807. -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
  56808. - int oldtype = LIBC_CANCEL_ASYNC ();
  56809. - int result = __syscall_fdatasync(fd);
  56810. - LIBC_CANCEL_RESET (oldtype);
  56811. - return result;
  56812. -# endif
  56813. -}
  56814. +# define __NR___fdatasync_nocancel __NR_fdatasync
  56815. +static _syscall1(int, __NC(fdatasync), int, fd)
  56816. +CANCELLABLE_SYSCALL(int, fdatasync, (int fd), (fd))
  56817. #endif
  56818. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fork.c uClibc-git/libc/sysdeps/linux/common/fork.c
  56819. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fork.c 2012-05-15 09:20:09.000000000 +0200
  56820. +++ uClibc-git/libc/sysdeps/linux/common/fork.c 2014-07-25 20:36:06.777334534 +0200
  56821. @@ -8,16 +8,35 @@
  56822. */
  56823. #include <sys/syscall.h>
  56824. -#include <unistd.h>
  56825. -#ifdef __ARCH_USE_MMU__
  56826. -
  56827. -#ifdef __NR_fork
  56828. -#define __NR___libc_fork __NR_fork
  56829. +#if defined __ARCH_USE_MMU__
  56830. +# include <unistd.h>
  56831. extern __typeof(fork) __libc_fork;
  56832. -_syscall0(pid_t, __libc_fork)
  56833. -weak_alias(__libc_fork,fork)
  56834. +# if defined __NR_fork
  56835. +# include <cancel.h>
  56836. +# define __NR___libc_fork __NR_fork
  56837. +_syscall0(pid_t, fork)
  56838. +
  56839. +# elif defined __NR_clone && !defined __NR_fork
  56840. +# include <sys/types.h>
  56841. +# include <signal.h>
  56842. +# include <stddef.h>
  56843. +pid_t fork(void)
  56844. +{
  56845. + pid_t pid = INLINE_SYSCALL(clone, 4, SIGCHLD, NULL, NULL, NULL);
  56846. +
  56847. + if (pid < 0)
  56848. + return -1;
  56849. +
  56850. + return pid;
  56851. +}
  56852. +
  56853. +# endif
  56854. +# ifdef __UCLIBC_HAS_THREADS__
  56855. +strong_alias(fork,__libc_fork)
  56856. libc_hidden_weak(fork)
  56857. -#endif
  56858. +# else
  56859. +libc_hidden_def(fork)
  56860. +# endif
  56861. #endif
  56862. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fpu_control.h uClibc-git/libc/sysdeps/linux/common/fpu_control.h
  56863. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
  56864. +++ uClibc-git/libc/sysdeps/linux/common/fpu_control.h 2014-07-25 20:36:06.777334534 +0200
  56865. @@ -13,9 +13,8 @@
  56866. Lesser General Public License for more details.
  56867. You should have received a copy of the GNU Lesser General Public
  56868. - License along with the GNU C Library; if not, write to the Free
  56869. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  56870. - 02111-1307 USA. */
  56871. + License along with the GNU C Library; if not, see
  56872. + <http://www.gnu.org/licenses/>. */
  56873. #ifndef _FPU_CONTROL_H
  56874. #define _FPU_CONTROL_H
  56875. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fstat64.c uClibc-git/libc/sysdeps/linux/common/fstat64.c
  56876. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fstat64.c 2012-05-15 09:20:09.000000000 +0200
  56877. +++ uClibc-git/libc/sysdeps/linux/common/fstat64.c 2014-07-25 20:36:06.777334534 +0200
  56878. @@ -7,20 +7,20 @@
  56879. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  56880. */
  56881. +#include <_lfs_64.h>
  56882. #include <sys/syscall.h>
  56883. -#if defined __UCLIBC_HAS_LFS__ && defined __NR_fstat64
  56884. -#include <unistd.h>
  56885. -#include <sys/stat.h>
  56886. -#include "xstatconv.h"
  56887. -
  56888. -
  56889. -#define __NR___syscall_fstat64 __NR_fstat64
  56890. -static __inline__ _syscall2(int, __syscall_fstat64,
  56891. - int, filedes, struct kernel_stat64 *, buf)
  56892. +#ifdef __NR_fstat64
  56893. +# include <unistd.h>
  56894. +# include <sys/stat.h>
  56895. +# include "xstatconv.h"
  56896. +# define __NR___syscall_fstat64 __NR_fstat64
  56897. +static __always_inline _syscall2(int, __syscall_fstat64,
  56898. + int, filedes, struct kernel_stat64 *, buf)
  56899. int fstat64(int fd, struct stat64 *buf)
  56900. {
  56901. +#ifdef __ARCH_HAS_DEPRECATED_SYSCALLS__
  56902. int result;
  56903. struct kernel_stat64 kbuf;
  56904. @@ -29,6 +29,9 @@
  56905. __xstat64_conv(&kbuf, buf);
  56906. }
  56907. return result;
  56908. +#else
  56909. + return __syscall_fstat64(fd, buf);
  56910. +#endif
  56911. }
  56912. libc_hidden_def(fstat64)
  56913. #endif
  56914. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fstatat64.c uClibc-git/libc/sysdeps/linux/common/fstatat64.c
  56915. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fstatat64.c 2012-05-15 09:20:09.000000000 +0200
  56916. +++ uClibc-git/libc/sysdeps/linux/common/fstatat64.c 2014-07-25 20:36:06.777334534 +0200
  56917. @@ -6,20 +6,21 @@
  56918. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  56919. */
  56920. +#include <_lfs_64.h>
  56921. +#include <bits/wordsize.h>
  56922. #include <sys/syscall.h>
  56923. -#include <sys/stat.h>
  56924. -#include "xstatconv.h"
  56925. -
  56926. -#ifdef __UCLIBC_HAS_LFS__
  56927. /* 64bit ports tend to favor newfstatat() */
  56928. -#ifdef __NR_newfstatat
  56929. +#if __WORDSIZE == 64 && defined __NR_newfstatat
  56930. # define __NR_fstatat64 __NR_newfstatat
  56931. #endif
  56932. #ifdef __NR_fstatat64
  56933. +# include <sys/stat.h>
  56934. +# include "xstatconv.h"
  56935. int fstatat64(int fd, const char *file, struct stat64 *buf, int flag)
  56936. {
  56937. +# ifdef __ARCH_HAS_DEPRECATED_SYSCALLS__
  56938. int ret;
  56939. struct kernel_stat64 kbuf;
  56940. @@ -28,9 +29,11 @@
  56941. __xstat64_conv(&kbuf, buf);
  56942. return ret;
  56943. +# else
  56944. + return INLINE_SYSCALL(fstatat64, 4, fd, file, buf, flag);
  56945. +# endif
  56946. }
  56947. +libc_hidden_def(fstatat64)
  56948. #else
  56949. /* should add emulation with fstat64() and /proc/self/fd/ ... */
  56950. #endif
  56951. -
  56952. -#endif
  56953. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fstatat.c uClibc-git/libc/sysdeps/linux/common/fstatat.c
  56954. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fstatat.c 2012-05-15 09:20:09.000000000 +0200
  56955. +++ uClibc-git/libc/sysdeps/linux/common/fstatat.c 2014-07-25 20:36:06.777334534 +0200
  56956. @@ -11,7 +11,7 @@
  56957. #include "xstatconv.h"
  56958. /* 64bit ports tend to favor newfstatat() */
  56959. -#ifdef __NR_newfstatat
  56960. +#if __WORDSIZE == 64 && defined __NR_newfstatat
  56961. # define __NR_fstatat64 __NR_newfstatat
  56962. #endif
  56963. @@ -19,14 +19,26 @@
  56964. int fstatat(int fd, const char *file, struct stat *buf, int flag)
  56965. {
  56966. int ret;
  56967. +# ifdef __ARCH_HAS_DEPRECATED_SYSCALLS__
  56968. struct kernel_stat64 kbuf;
  56969. -
  56970. ret = INLINE_SYSCALL(fstatat64, 4, fd, file, &kbuf, flag);
  56971. if (ret == 0)
  56972. __xstat32_conv(&kbuf, buf);
  56973. -
  56974. +# else
  56975. + ret = INLINE_SYSCALL(fstatat64, 4, fd, file, buf, flag);
  56976. + if (ret == 0) {
  56977. + /* Did we overflow */
  56978. + if (buf->__pad1 || buf->__pad2 || buf->__pad3
  56979. + || buf->__pad4 || buf->__pad5 || buf->__pad6
  56980. + || buf->__pad7) {
  56981. + __set_errno(EOVERFLOW);
  56982. + return -1;
  56983. + }
  56984. + }
  56985. +# endif /* __ARCH_HAS_DEPRECATED_SYSCALLS__ */
  56986. return ret;
  56987. }
  56988. +libc_hidden_def(fstatat)
  56989. #else
  56990. /* should add emulation with fstat() and /proc/self/fd/ ... */
  56991. #endif
  56992. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fstat.c uClibc-git/libc/sysdeps/linux/common/fstat.c
  56993. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fstat.c 2012-05-15 09:20:09.000000000 +0200
  56994. +++ uClibc-git/libc/sysdeps/linux/common/fstat.c 2014-07-25 20:36:06.777334534 +0200
  56995. @@ -12,10 +12,28 @@
  56996. #include <sys/stat.h>
  56997. #include "xstatconv.h"
  56998. +#if defined __NR_fstat64 && !defined __NR_fstat
  56999. +int fstat(int fd, struct stat *buf)
  57000. +{
  57001. + int result = INLINE_SYSCALL(fstat64, 2, fd, buf);
  57002. + if (result == 0) {
  57003. + /* Did we overflow? */
  57004. + if (buf->__pad1 || buf->__pad2 || buf->__pad3
  57005. + || buf->__pad4 || buf->__pad5
  57006. + || buf->__pad6 || buf->__pad7) {
  57007. + __set_errno(EOVERFLOW);
  57008. + return -1;
  57009. + }
  57010. + }
  57011. + return result;
  57012. +}
  57013. +libc_hidden_def(fstat)
  57014. +
  57015. +#elif defined __NR_fstat
  57016. int fstat(int fd, struct stat *buf)
  57017. {
  57018. int result;
  57019. -#ifdef __NR_fstat64
  57020. +# ifdef __NR_fstat64
  57021. /* normal stat call has limited values for various stat elements
  57022. * e.g. uid device major/minor etc.
  57023. * so we use 64 variant if available
  57024. @@ -26,19 +44,21 @@
  57025. if (result == 0) {
  57026. __xstat32_conv(&kbuf, buf);
  57027. }
  57028. -#else
  57029. +# else
  57030. struct kernel_stat kbuf;
  57031. result = INLINE_SYSCALL(fstat, 2, fd, &kbuf);
  57032. if (result == 0) {
  57033. __xstat_conv(&kbuf, buf);
  57034. }
  57035. -#endif
  57036. +# endif
  57037. return result;
  57038. }
  57039. libc_hidden_def(fstat)
  57040. -#if ! defined __NR_fstat64 && defined __UCLIBC_HAS_LFS__
  57041. +# if ! defined __NR_fstat64 && defined __UCLIBC_HAS_LFS__
  57042. strong_alias_untyped(fstat,fstat64)
  57043. libc_hidden_def(fstat64)
  57044. +# endif
  57045. +
  57046. #endif
  57047. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fstatfs.c uClibc-git/libc/sysdeps/linux/common/fstatfs.c
  57048. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fstatfs.c 2012-05-15 09:20:09.000000000 +0200
  57049. +++ uClibc-git/libc/sysdeps/linux/common/fstatfs.c 2014-07-25 20:36:06.777334534 +0200
  57050. @@ -9,8 +9,9 @@
  57051. #include <sys/syscall.h>
  57052. #include <sys/vfs.h>
  57053. +#include <string.h>
  57054. -#ifndef __USE_FILE_OFFSET64
  57055. +#ifndef __USE_FILE_OFFSET64__
  57056. extern int fstatfs (int __fildes, struct statfs *__buf)
  57057. __THROW __nonnull ((2));
  57058. #else
  57059. @@ -23,8 +24,26 @@
  57060. #endif
  57061. extern __typeof(fstatfs) __libc_fstatfs attribute_hidden;
  57062. -#define __NR___libc_fstatfs __NR_fstatfs
  57063. +#ifdef __NR_fstatfs
  57064. +# define __NR___libc_fstatfs __NR_fstatfs
  57065. _syscall2(int, __libc_fstatfs, int, fd, struct statfs *, buf)
  57066. +#else
  57067. +int __libc_fstatfs (int __fildes, struct statfs *__buf)
  57068. +{
  57069. + int err = INLINE_SYSCALL(fstatfs64, 3, __fildes, sizeof(*__buf), __buf);
  57070. +
  57071. + if (err == 0) {
  57072. + /* Did we overflow? */
  57073. + if (__buf->__pad1 || __buf->__pad2 || __buf->__pad3 ||
  57074. + __buf->__pad4 || __buf->__pad5) {
  57075. + __set_errno(EOVERFLOW);
  57076. + return -1;
  57077. + }
  57078. + }
  57079. + return err;
  57080. +};
  57081. +/* Redefined fstatfs because we need it for backwards compatibility */
  57082. +#endif /* __NR_fstatfs */
  57083. #if defined __UCLIBC_LINUX_SPECIFIC__
  57084. weak_alias(__libc_fstatfs,fstatfs)
  57085. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/fsync.c uClibc-git/libc/sysdeps/linux/common/fsync.c
  57086. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/fsync.c 2012-05-15 09:20:09.000000000 +0200
  57087. +++ uClibc-git/libc/sysdeps/linux/common/fsync.c 2014-07-25 20:36:06.777334534 +0200
  57088. @@ -9,29 +9,9 @@
  57089. #include <sys/syscall.h>
  57090. #include <unistd.h>
  57091. +#include <cancel.h>
  57092. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  57093. -#include "sysdep-cancel.h"
  57094. -#else
  57095. -#define SINGLE_THREAD_P 1
  57096. -#endif
  57097. +#define __NR___fsync_nocancel __NR_fsync
  57098. +static _syscall1(int, __NC(fsync), int, fd)
  57099. -#define __NR___syscall_fsync __NR_fsync
  57100. -static inline _syscall1(int, __syscall_fsync, int, fd)
  57101. -
  57102. -extern __typeof(fsync) __libc_fsync;
  57103. -
  57104. -int __libc_fsync(int fd)
  57105. -{
  57106. - if (SINGLE_THREAD_P)
  57107. - return __syscall_fsync(fd);
  57108. -
  57109. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  57110. - int oldtype = LIBC_CANCEL_ASYNC ();
  57111. - int result = __syscall_fsync(fd);
  57112. - LIBC_CANCEL_RESET (oldtype);
  57113. - return result;
  57114. -#endif
  57115. -}
  57116. -
  57117. -weak_alias(__libc_fsync, fsync)
  57118. +CANCELLABLE_SYSCALL(int, fsync, (int fd), (fd))
  57119. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/ftruncate64.c uClibc-git/libc/sysdeps/linux/common/ftruncate64.c
  57120. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/ftruncate64.c 2012-05-15 09:20:09.000000000 +0200
  57121. +++ uClibc-git/libc/sysdeps/linux/common/ftruncate64.c 2014-07-25 20:36:06.777334534 +0200
  57122. @@ -7,50 +7,41 @@
  57123. * and on 32 bit machines this sends things into the kernel as
  57124. * two 32-bit arguments (high and low 32 bits of length) that
  57125. * are ordered based on endianess. It turns out endian.h has
  57126. - * just the macro we need to order things, __LONG_LONG_PAIR.
  57127. + * just the macro we need to order things, OFF64_HI_LO.
  57128. */
  57129. -#include <features.h>
  57130. +#include <_lfs_64.h>
  57131. +#include <sys/syscall.h>
  57132. +#include <unistd.h>
  57133. -#ifdef __UCLIBC_HAS_LFS__
  57134. +#ifdef __NR_ftruncate64
  57135. +# include <bits/wordsize.h>
  57136. -# include <unistd.h>
  57137. -# include <errno.h>
  57138. -# include <endian.h>
  57139. -# include <stdint.h>
  57140. -# include <sys/types.h>
  57141. -# include <sys/syscall.h>
  57142. -
  57143. -
  57144. -# ifdef __NR_ftruncate64
  57145. -
  57146. -# if __WORDSIZE == 64
  57147. +# if __WORDSIZE == 64
  57148. /* For a 64 bit machine, life is simple... */
  57149. _syscall2(int, ftruncate64, int, fd, __off64_t, length)
  57150. -# elif __WORDSIZE == 32
  57151. +# elif __WORDSIZE == 32
  57152. +# include <endian.h>
  57153. +# include <stdint.h>
  57154. /* The exported ftruncate64 function. */
  57155. int ftruncate64 (int fd, __off64_t length)
  57156. {
  57157. - uint32_t low = length & 0xffffffff;
  57158. - uint32_t high = length >> 32;
  57159. -# if defined(__UCLIBC_TRUNCATE64_HAS_4_ARGS__)
  57160. - return INLINE_SYSCALL(ftruncate64,
  57161. - 4, fd, 0, __LONG_LONG_PAIR (high, low));
  57162. -# else
  57163. - return INLINE_SYSCALL(ftruncate64, 3, fd,
  57164. - __LONG_LONG_PAIR (high, low));
  57165. -# endif
  57166. +# if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
  57167. + return INLINE_SYSCALL(ftruncate64, 4, fd, 0, OFF64_HI_LO(length));
  57168. +# else
  57169. + return INLINE_SYSCALL(ftruncate64, 3, fd, OFF64_HI_LO(length));
  57170. +# endif
  57171. }
  57172. -# else /* __WORDSIZE */
  57173. -# error Your machine is not 64 bit or 32 bit, I am dazed and confused.
  57174. -# endif /* __WORDSIZE */
  57175. -
  57176. -# else /* __NR_ftruncate64 */
  57177. +# else /* __WORDSIZE */
  57178. +# error Your machine is not 64 bit or 32 bit, I am dazed and confused.
  57179. +# endif /* __WORDSIZE */
  57180. +#else /* __NR_ftruncate64 */
  57181. +# include <errno.h>
  57182. int ftruncate64 (int fd, __off64_t length)
  57183. {
  57184. @@ -65,7 +56,5 @@
  57185. return -1;
  57186. }
  57187. -# endif /* __NR_ftruncate64 */
  57188. +#endif /* __NR_ftruncate64 */
  57189. libc_hidden_def(ftruncate64)
  57190. -
  57191. -#endif /* __UCLIBC_HAS_LFS__ */
  57192. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/ftruncate.c uClibc-git/libc/sysdeps/linux/common/ftruncate.c
  57193. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/ftruncate.c 2012-05-15 09:20:09.000000000 +0200
  57194. +++ uClibc-git/libc/sysdeps/linux/common/ftruncate.c 2014-07-25 20:36:06.777334534 +0200
  57195. @@ -10,6 +10,20 @@
  57196. #include <sys/syscall.h>
  57197. #include <unistd.h>
  57198. +#if defined __NR_ftruncate64 && !defined __NR_ftruncate
  57199. +# include <endian.h>
  57200. +# include <stdint.h>
  57201. +int ftruncate(int fd, __off_t length)
  57202. +{
  57203. +# if defined __UCLIBC_HAS_LFS__
  57204. + return ftruncate64(fd, length);
  57205. +# elif __WORDSIZE == 32
  57206. + return INLINE_SYSCALL(ftruncate64, 3, fd, OFF_HI_LO(length));
  57207. +# endif
  57208. +}
  57209. +libc_hidden_def(ftruncate);
  57210. +#else
  57211. _syscall2(int, ftruncate, int, fd, __off_t, length)
  57212. libc_hidden_def(ftruncate)
  57213. +#endif
  57214. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/futimens.c uClibc-git/libc/sysdeps/linux/common/futimens.c
  57215. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/futimens.c 2012-05-15 09:20:09.000000000 +0200
  57216. +++ uClibc-git/libc/sysdeps/linux/common/futimens.c 2014-07-25 20:36:06.777334534 +0200
  57217. @@ -16,13 +16,13 @@
  57218. * Note that due to not including the header, we have to alias the call
  57219. * manually.
  57220. */
  57221. -extern int utimensat (int __fd, __const char *__path,
  57222. - __const struct timespec __times[2],
  57223. +extern int utimensat (int __fd, const char *__path,
  57224. + const struct timespec __times[2],
  57225. int __flags) __THROW;
  57226. libc_hidden_proto(utimensat)
  57227. -int futimens (int __fd, __const struct timespec __times[2]) __THROW;
  57228. -int futimens (int fd, __const struct timespec ts[2])
  57229. +int futimens (int __fd, const struct timespec __times[2]) __THROW;
  57230. +int futimens (int fd, const struct timespec ts[2])
  57231. {
  57232. return utimensat(fd, 0, ts, 0);
  57233. }
  57234. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/getdents64.c uClibc-git/libc/sysdeps/linux/common/getdents64.c
  57235. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/getdents64.c 2012-05-15 09:20:09.000000000 +0200
  57236. +++ uClibc-git/libc/sysdeps/linux/common/getdents64.c 2014-07-25 20:36:06.777334534 +0200
  57237. @@ -4,7 +4,11 @@
  57238. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  57239. */
  57240. -#include <features.h>
  57241. +#include <_lfs_64.h>
  57242. +#include <sys/syscall.h>
  57243. +
  57244. +#ifdef __NR_getdents64
  57245. +
  57246. #include <assert.h>
  57247. #include <errno.h>
  57248. #include <dirent.h>
  57249. @@ -13,17 +17,9 @@
  57250. #include <string.h>
  57251. #include <unistd.h>
  57252. #include <sys/param.h>
  57253. -#include <sys/types.h>
  57254. -#include <sys/syscall.h>
  57255. -#include <bits/kernel_types.h>
  57256. +#include <bits/wordsize.h>
  57257. #include <bits/uClibc_alloc.h>
  57258. -#if defined __UCLIBC_HAS_LFS__ && defined __NR_getdents64
  57259. -
  57260. -# ifndef offsetof
  57261. -# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
  57262. -# endif
  57263. -
  57264. struct kernel_dirent64
  57265. {
  57266. uint64_t d_ino;
  57267. @@ -36,7 +32,6 @@
  57268. # define __NR___syscall_getdents64 __NR_getdents64
  57269. static __inline__ _syscall3(int, __syscall_getdents64, int, fd, unsigned char *, dirp, size_t, count)
  57270. -ssize_t __getdents64 (int fd, char *buf, size_t nbytes) attribute_hidden;
  57271. ssize_t __getdents64 (int fd, char *buf, size_t nbytes)
  57272. {
  57273. struct dirent64 *dp;
  57274. @@ -96,10 +91,10 @@
  57275. return (char *) dp - buf;
  57276. }
  57277. -#if __WORDSIZE == 64
  57278. +#if __WORDSIZE == 64 || (defined __UCLIBC_HAS_LFS__ && !defined __NR_getdents)
  57279. /* since getdents doesnt give us d_type but getdents64 does, try and
  57280. * use getdents64 as much as possible */
  57281. -attribute_hidden strong_alias(__getdents64,__getdents)
  57282. +strong_alias(__getdents64,__getdents)
  57283. #endif
  57284. #endif
  57285. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/getdents.c uClibc-git/libc/sysdeps/linux/common/getdents.c
  57286. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/getdents.c 2012-05-15 09:20:09.000000000 +0200
  57287. +++ uClibc-git/libc/sysdeps/linux/common/getdents.c 2014-07-25 20:36:06.777334534 +0200
  57288. @@ -4,21 +4,17 @@
  57289. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  57290. */
  57291. -#include <assert.h>
  57292. -#include <errno.h>
  57293. +#include <sys/syscall.h>
  57294. +#include <bits/wordsize.h>
  57295. +
  57296. +#if !(defined __UCLIBC_HAS_LFS__ && defined __NR_getdents64 && __WORDSIZE == 64)
  57297. +
  57298. #include <dirent.h>
  57299. -#include <stddef.h>
  57300. -#include <stdint.h>
  57301. #include <string.h>
  57302. -#include <unistd.h>
  57303. -#include <sys/param.h>
  57304. #include <sys/types.h>
  57305. -#include <sys/syscall.h>
  57306. #include <bits/kernel_types.h>
  57307. #include <bits/kernel-features.h>
  57308. -#include <bits/uClibc_alloc.h>
  57309. -#if !(defined __UCLIBC_HAS_LFS__ && defined __NR_getdents64 && __WORDSIZE == 64)
  57310. /* If the condition above is met, __getdents is defined as an alias
  57311. * for __getdents64 (see getdents64.c). Otherwise...
  57312. */
  57313. @@ -30,10 +26,7 @@
  57314. * version / arch details.
  57315. */
  57316. -#ifndef offsetof
  57317. -# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
  57318. -#endif
  57319. -
  57320. +# ifdef __ARCH_HAS_DEPRECATED_SYSCALLS__
  57321. struct kernel_dirent
  57322. {
  57323. long int d_ino;
  57324. @@ -41,13 +34,16 @@
  57325. unsigned short int d_reclen;
  57326. char d_name[256];
  57327. };
  57328. +# else
  57329. +# define kernel_dirent dirent
  57330. +# endif
  57331. -ssize_t __getdents (int fd, char *buf, size_t nbytes) attribute_hidden;
  57332. -
  57333. -#define __NR___syscall_getdents __NR_getdents
  57334. +# if defined __NR_getdents
  57335. +# define __NR___syscall_getdents __NR_getdents
  57336. static __always_inline _syscall3(int, __syscall_getdents, int, fd, unsigned char *, kdirp, size_t, count)
  57337. +# endif
  57338. -#if defined __ASSUME_GETDENTS32_D_TYPE
  57339. +# if defined __ASSUME_GETDENTS32_D_TYPE && defined __NR_getdents
  57340. ssize_t __getdents (int fd, char *buf, size_t nbytes)
  57341. {
  57342. @@ -76,7 +72,14 @@
  57343. return retval;
  57344. }
  57345. -#elif ! defined __UCLIBC_HAS_LFS__ || ! defined __NR_getdents64
  57346. +# elif ! defined __UCLIBC_HAS_LFS__ || !defined __NR_getdents64
  57347. +
  57348. +# include <assert.h>
  57349. +# include <stddef.h>
  57350. +# include <errno.h>
  57351. +# include <unistd.h>
  57352. +# include <sys/param.h>
  57353. +# include <bits/uClibc_alloc.h>
  57354. ssize_t __getdents (int fd, char *buf, size_t nbytes)
  57355. {
  57356. @@ -88,6 +91,7 @@
  57357. const size_t size_diff = (offsetof (struct dirent, d_name)
  57358. - offsetof (struct kernel_dirent, d_name));
  57359. +# ifdef __ARCH_HAS_DEPRECATED_SYSCALLS__
  57360. red_nbytes = MIN (nbytes - ((nbytes /
  57361. (offsetof (struct dirent, d_name) + 14)) * size_diff),
  57362. nbytes - size_diff);
  57363. @@ -96,6 +100,21 @@
  57364. skdp = kdp = stack_heap_alloc(red_nbytes);
  57365. retval = __syscall_getdents(fd, (unsigned char *)kdp, red_nbytes);
  57366. +# else
  57367. +
  57368. + dp = (struct dirent *) buf;
  57369. + skdp = kdp = stack_heap_alloc(nbytes);
  57370. +
  57371. + retval = INLINE_SYSCALL(getdents64, 3, fd, (unsigned char *)kdp, nbytes);
  57372. + if (retval > 0) {
  57373. + /* Did we overflow? */
  57374. + if (kdp->__pad1 || kdp->__pad2) {
  57375. + __set_errno(EINVAL);
  57376. + return -1;
  57377. + }
  57378. + }
  57379. +# endif
  57380. +
  57381. if (retval == -1) {
  57382. stack_heap_free(skdp);
  57383. return -1;
  57384. @@ -137,9 +156,10 @@
  57385. return (char *) dp - buf;
  57386. }
  57387. -#elif __WORDSIZE == 32
  57388. +# elif __WORDSIZE == 32 && !defined __NR_getdents64
  57389. +
  57390. +# include <stddef.h>
  57391. -extern __typeof(__getdents) __getdents64 attribute_hidden;
  57392. ssize_t __getdents (int fd, char *buf, size_t nbytes)
  57393. {
  57394. struct dirent *dp;
  57395. @@ -165,10 +185,10 @@
  57396. return ret;
  57397. }
  57398. -#endif
  57399. +# endif
  57400. -#if defined __UCLIBC_HAS_LFS__ && ! defined __NR_getdents64
  57401. -attribute_hidden strong_alias(__getdents,__getdents64)
  57402. -#endif
  57403. +# if defined __UCLIBC_HAS_LFS__ && ! defined __NR_getdents64
  57404. +strong_alias(__getdents,__getdents64)
  57405. +# endif
  57406. #endif
  57407. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/getdirname.c uClibc-git/libc/sysdeps/linux/common/getdirname.c
  57408. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/getdirname.c 2012-05-15 09:20:09.000000000 +0200
  57409. +++ uClibc-git/libc/sysdeps/linux/common/getdirname.c 2014-07-25 20:36:06.777334534 +0200
  57410. @@ -13,9 +13,8 @@
  57411. Lesser General Public License for more details.
  57412. You should have received a copy of the GNU Lesser General Public
  57413. - License along with the GNU C Library; if not, write to the Free
  57414. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  57415. - 02111-1307 USA. */
  57416. + License along with the GNU C Library; if not, see
  57417. + <http://www.gnu.org/licenses/>. */
  57418. #include <features.h>
  57419. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/getgroups.c uClibc-git/libc/sysdeps/linux/common/getgroups.c
  57420. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/getgroups.c 2012-05-15 09:20:09.000000000 +0200
  57421. +++ uClibc-git/libc/sysdeps/linux/common/getgroups.c 2014-07-25 20:36:06.777334534 +0200
  57422. @@ -8,10 +8,7 @@
  57423. */
  57424. #include <sys/syscall.h>
  57425. -#include <stdlib.h>
  57426. #include <unistd.h>
  57427. -#include <grp.h>
  57428. -
  57429. #if defined(__NR_getgroups32)
  57430. # undef __NR_getgroups
  57431. @@ -22,12 +19,14 @@
  57432. _syscall2(int, getgroups, int, size, gid_t *, list)
  57433. #else
  57434. -
  57435. -#define MIN(a,b) (((a)<(b))?(a):(b))
  57436. -
  57437. -#define __NR___syscall_getgroups __NR_getgroups
  57438. -static __inline__ _syscall2(int, __syscall_getgroups,
  57439. - int, size, __kernel_gid_t *, list)
  57440. +# include <errno.h>
  57441. +# include <stdlib.h>
  57442. +# include <sys/types.h>
  57443. +# include <sys/param.h>
  57444. +
  57445. +# define __NR___syscall_getgroups __NR_getgroups
  57446. +static __always_inline
  57447. +_syscall2(int, __syscall_getgroups, int, size, __kernel_gid_t *, list)
  57448. int getgroups(int size, gid_t groups[])
  57449. {
  57450. @@ -56,5 +55,4 @@
  57451. }
  57452. }
  57453. #endif
  57454. -
  57455. libc_hidden_def(getgroups)
  57456. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/get_kernel_syms.c uClibc-git/libc/sysdeps/linux/common/get_kernel_syms.c
  57457. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/get_kernel_syms.c 2012-05-15 09:20:09.000000000 +0200
  57458. +++ uClibc-git/libc/sysdeps/linux/common/get_kernel_syms.c 2014-07-25 20:36:06.777334534 +0200
  57459. @@ -9,8 +9,8 @@
  57460. #include <sys/syscall.h>
  57461. -struct kernel_sym;
  57462. -int get_kernel_syms(struct kernel_sym *table attribute_unused);
  57463. #ifdef __NR_get_kernel_syms
  57464. +struct kernel_sym;
  57465. +int get_kernel_syms(struct kernel_sym *table);
  57466. _syscall1(int, get_kernel_syms, struct kernel_sym *, table)
  57467. #endif
  57468. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/getpagesize.c uClibc-git/libc/sysdeps/linux/common/getpagesize.c
  57469. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/getpagesize.c 2012-05-15 09:20:09.000000000 +0200
  57470. +++ uClibc-git/libc/sysdeps/linux/common/getpagesize.c 2014-07-25 20:36:06.777334534 +0200
  57471. @@ -12,16 +12,13 @@
  57472. Lesser General Public License for more details.
  57473. You should have received a copy of the GNU Lesser General Public
  57474. - License along with the GNU C Library; if not, write to the Free
  57475. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  57476. - 02111-1307 USA. */
  57477. + License along with the GNU C Library; if not, see
  57478. + <http://www.gnu.org/licenses/>. */
  57479. #include <unistd.h>
  57480. #include <features.h>
  57481. #include <sys/param.h>
  57482. -extern size_t __pagesize;
  57483. -
  57484. /* Return the system page size. */
  57485. /* couldn't make __getpagesize hidden, because shm.h uses it in a macro */
  57486. extern __typeof(getpagesize) __getpagesize;
  57487. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/getrlimit64.c uClibc-git/libc/sysdeps/linux/common/getrlimit64.c
  57488. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/getrlimit64.c 2012-05-15 09:20:09.000000000 +0200
  57489. +++ uClibc-git/libc/sysdeps/linux/common/getrlimit64.c 2014-07-25 20:36:06.781334555 +0200
  57490. @@ -12,20 +12,16 @@
  57491. Lesser General Public License for more details.
  57492. You should have received a copy of the GNU Lesser General Public
  57493. - License along with the GNU C Library; if not, write to the Free
  57494. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  57495. - 02111-1307 USA. */
  57496. + License along with the GNU C Library; if not, see
  57497. + <http://www.gnu.org/licenses/>. */
  57498. #include <_lfs_64.h>
  57499. -
  57500. -#include <sys/types.h>
  57501. -#include <sys/resource.h>
  57502. #include <bits/wordsize.h>
  57503. /* the regular getrlimit will work just fine for 64bit users */
  57504. +#if __WORDSIZE == 32
  57505. -#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 32
  57506. -
  57507. +# include <sys/resource.h>
  57508. /* Put the soft and hard limits for RESOURCE in *RLIMITS.
  57509. Returns 0 if successful, -1 if not (and sets errno). */
  57510. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/getrlimit.c uClibc-git/libc/sysdeps/linux/common/getrlimit.c
  57511. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/getrlimit.c 2012-05-15 09:20:09.000000000 +0200
  57512. +++ uClibc-git/libc/sysdeps/linux/common/getrlimit.c 2014-07-25 20:36:06.777334534 +0200
  57513. @@ -7,12 +7,9 @@
  57514. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  57515. */
  57516. -#define getrlimit64 __hide_getrlimit64
  57517. #include <sys/syscall.h>
  57518. -#include <unistd.h>
  57519. #include <sys/resource.h>
  57520. -#undef getrlimit64
  57521. -
  57522. +#include <bits/wordsize.h>
  57523. /* Only wrap getrlimit if the new ugetrlimit is not present and getrlimit sucks */
  57524. @@ -25,14 +22,14 @@
  57525. struct rlimit *, rlim)
  57526. int getrlimit(__rlimit_resource_t resource, struct rlimit *rlimits)
  57527. {
  57528. - return (__syscall_ugetrlimit(resource, rlimits));
  57529. + return __syscall_ugetrlimit(resource, rlimits);
  57530. }
  57531. #elif !defined(__UCLIBC_HANDLE_OLDER_RLIMIT__)
  57532. /* We don't need to wrap getrlimit() */
  57533. _syscall2(int, getrlimit, __rlimit_resource_t, resource,
  57534. - struct rlimit *, rlim)
  57535. + struct rlimit *, rlim)
  57536. #else
  57537. @@ -59,9 +56,8 @@
  57538. return result;
  57539. }
  57540. #endif
  57541. -
  57542. libc_hidden_def(getrlimit)
  57543. #if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
  57544. -strong_alias(getrlimit, getrlimit64)
  57545. +strong_alias_untyped(getrlimit, getrlimit64)
  57546. #endif
  57547. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/gettimeofday.c uClibc-git/libc/sysdeps/linux/common/gettimeofday.c
  57548. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/gettimeofday.c 2012-05-15 09:20:09.000000000 +0200
  57549. +++ uClibc-git/libc/sysdeps/linux/common/gettimeofday.c 2014-07-25 20:36:06.781334555 +0200
  57550. @@ -10,9 +10,5 @@
  57551. #include <sys/syscall.h>
  57552. #include <sys/time.h>
  57553. -#ifdef __USE_BSD
  57554. -_syscall2(int, gettimeofday, struct timeval *, tv, struct timezone *, tz)
  57555. -#else
  57556. -_syscall2(int, gettimeofday, struct timeval *, tv, void *, tz)
  57557. -#endif
  57558. +_syscall2(int, gettimeofday, struct timeval *, tv, __timezone_ptr_t, tz)
  57559. libc_hidden_def(gettimeofday)
  57560. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/hp-timing.h uClibc-git/libc/sysdeps/linux/common/hp-timing.h
  57561. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/hp-timing.h 2012-05-15 09:20:09.000000000 +0200
  57562. +++ uClibc-git/libc/sysdeps/linux/common/hp-timing.h 2014-07-25 20:36:06.781334555 +0200
  57563. @@ -14,9 +14,8 @@
  57564. Lesser General Public License for more details.
  57565. You should have received a copy of the GNU Lesser General Public
  57566. - License along with the GNU C Library; if not, write to the Free
  57567. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  57568. - 02111-1307 USA. */
  57569. + License along with the GNU C Library; if not, see
  57570. + <http://www.gnu.org/licenses/>. */
  57571. #ifndef _HP_TIMING_H
  57572. #define _HP_TIMING_H 1
  57573. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/init_module.c uClibc-git/libc/sysdeps/linux/common/init_module.c
  57574. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/init_module.c 2012-05-15 09:20:09.000000000 +0200
  57575. +++ uClibc-git/libc/sysdeps/linux/common/init_module.c 2014-07-25 20:36:06.781334555 +0200
  57576. @@ -8,12 +8,13 @@
  57577. */
  57578. #include <sys/syscall.h>
  57579. -int init_module(void *first, void *second, void *third, void *fourth, void *fifth);
  57580. +
  57581. #ifdef __NR_init_module
  57582. +int init_module(void *first, void *second, void *third, void *fourth, void *fifth);
  57583. /* This may have 5 arguments (for old 2.0 kernels) or 2 arguments
  57584. * (for 2.2 and 2.4 kernels). Use the greatest common denominator,
  57585. * and let the kernel cope with whatever it gets. It's good at that. */
  57586. _syscall5(int, init_module, void *, first, void *, second, void *, third,
  57587. - void *, fourth, void *, fifth)
  57588. + void *, fourth, void *, fifth)
  57589. #endif
  57590. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/inotify.c uClibc-git/libc/sysdeps/linux/common/inotify.c
  57591. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/inotify.c 2012-05-15 09:20:09.000000000 +0200
  57592. +++ uClibc-git/libc/sysdeps/linux/common/inotify.c 2014-07-25 20:36:06.781334555 +0200
  57593. @@ -19,6 +19,13 @@
  57594. _syscall1(int, inotify_init1, int, flags)
  57595. #endif
  57596. +#if defined __NR_inotify_init1 && !defined __NR_inotify_init
  57597. +int inotify_init(void)
  57598. +{
  57599. + return INLINE_SYSCALL(inotify_init1, 1, 0);
  57600. +}
  57601. +#endif
  57602. +
  57603. #ifdef __NR_inotify_add_watch
  57604. _syscall3(int, inotify_add_watch, int, fd, const char *, path, uint32_t, mask)
  57605. #endif
  57606. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/ioctl.c uClibc-git/libc/sysdeps/linux/common/ioctl.c
  57607. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/ioctl.c 2012-05-15 09:20:09.000000000 +0200
  57608. +++ uClibc-git/libc/sysdeps/linux/common/ioctl.c 2014-07-25 20:36:06.781334555 +0200
  57609. @@ -10,14 +10,7 @@
  57610. #include <sys/syscall.h>
  57611. #include <stdarg.h>
  57612. #include <sys/ioctl.h>
  57613. -
  57614. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  57615. -#include <sysdep-cancel.h>
  57616. -#else
  57617. -#define SINGLE_THREAD_P 1
  57618. -#endif
  57619. -
  57620. -libc_hidden_proto(ioctl)
  57621. +#include <cancel.h>
  57622. #define __NR___syscall_ioctl __NR_ioctl
  57623. static __always_inline
  57624. @@ -30,17 +23,16 @@
  57625. va_start(list, request);
  57626. arg = va_arg(list, void *);
  57627. -
  57628. va_end(list);
  57629. if (SINGLE_THREAD_P)
  57630. return __syscall_ioctl(fd, request, arg);
  57631. -
  57632. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  57633. +#ifdef __NEW_THREADS
  57634. int oldtype = LIBC_CANCEL_ASYNC ();
  57635. int result = __syscall_ioctl(fd, request, arg);
  57636. LIBC_CANCEL_RESET (oldtype);
  57637. return result;
  57638. #endif
  57639. }
  57640. -libc_hidden_def(ioctl)
  57641. +lt_strong_alias(ioctl)
  57642. +lt_libc_hidden(ioctl)
  57643. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/ioperm.c uClibc-git/libc/sysdeps/linux/common/ioperm.c
  57644. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/ioperm.c 2012-05-15 09:20:09.000000000 +0200
  57645. +++ uClibc-git/libc/sysdeps/linux/common/ioperm.c 2014-07-25 20:36:06.781334555 +0200
  57646. @@ -13,10 +13,6 @@
  57647. /* psm: can't #include <sys/io.h>, some archs miss it */
  57648. extern int ioperm(unsigned long __from, unsigned long __num, int __turn_on) __THROW;
  57649. -/* Not needed internally;
  57650. -libc_hidden_proto(ioperm)
  57651. -*/
  57652. _syscall3(int, ioperm, unsigned long, from, unsigned long, num, int, turn_on)
  57653. -/*libc_hidden_def(ioperm)*/
  57654. #endif
  57655. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/jmpbuf-offsets.h uClibc-git/libc/sysdeps/linux/common/jmpbuf-offsets.h
  57656. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
  57657. +++ uClibc-git/libc/sysdeps/linux/common/jmpbuf-offsets.h 2014-07-25 20:36:06.781334555 +0200
  57658. @@ -0,0 +1,6 @@
  57659. +/* Private macros for accessing __jmp_buf contents. dummy version. */
  57660. +/*
  57661. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  57662. + *
  57663. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  57664. + */
  57665. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/lchown.c uClibc-git/libc/sysdeps/linux/common/lchown.c
  57666. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/lchown.c 2012-05-15 09:20:09.000000000 +0200
  57667. +++ uClibc-git/libc/sysdeps/linux/common/lchown.c 2014-07-25 20:36:06.781334555 +0200
  57668. @@ -11,17 +11,26 @@
  57669. #include <unistd.h>
  57670. #include <bits/wordsize.h>
  57671. -#if (__WORDSIZE == 32 && defined(__NR_lchown32)) || __WORDSIZE == 64
  57672. -# ifdef __NR_lchown32
  57673. -# undef __NR_lchown
  57674. -# define __NR_lchown __NR_lchown32
  57675. -# endif
  57676. +#if defined __NR_fchownat && !defined __NR_lchown
  57677. +# include <fcntl.h>
  57678. +int lchown(const char *path, uid_t owner, gid_t group)
  57679. +{
  57680. + return fchownat(AT_FDCWD, path, owner, group, AT_SYMLINK_NOFOLLOW);
  57681. +}
  57682. +
  57683. +#else
  57684. +
  57685. +# if (__WORDSIZE == 32 && defined(__NR_lchown32)) || __WORDSIZE == 64
  57686. +# ifdef __NR_lchown32
  57687. +# undef __NR_lchown
  57688. +# define __NR_lchown __NR_lchown32
  57689. +# endif
  57690. _syscall3(int, lchown, const char *, path, uid_t, owner, gid_t, group)
  57691. -#else
  57692. +# else
  57693. -# define __NR___syscall_lchown __NR_lchown
  57694. +# define __NR___syscall_lchown __NR_lchown
  57695. static __inline__ _syscall3(int, __syscall_lchown, const char *, path,
  57696. __kernel_uid_t, owner, __kernel_gid_t, group)
  57697. @@ -35,4 +44,6 @@
  57698. return __syscall_lchown(path, owner, group);
  57699. }
  57700. +# endif
  57701. +
  57702. #endif
  57703. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/linkat.c uClibc-git/libc/sysdeps/linux/common/linkat.c
  57704. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/linkat.c 2012-05-15 09:20:09.000000000 +0200
  57705. +++ uClibc-git/libc/sysdeps/linux/common/linkat.c 2014-07-25 20:36:06.781334555 +0200
  57706. @@ -11,6 +11,7 @@
  57707. #ifdef __NR_linkat
  57708. _syscall5(int, linkat, int, fromfd, const char *, from, int, tofd, const char *, to, int, flags)
  57709. +libc_hidden_def(linkat)
  57710. #else
  57711. /* should add emulation with link() and /proc/self/fd/ ... */
  57712. #endif
  57713. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/link.c uClibc-git/libc/sysdeps/linux/common/link.c
  57714. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/link.c 2012-05-15 09:20:09.000000000 +0200
  57715. +++ uClibc-git/libc/sysdeps/linux/common/link.c 2014-07-25 20:36:06.781334555 +0200
  57716. @@ -9,4 +9,13 @@
  57717. #include <sys/syscall.h>
  57718. #include <unistd.h>
  57719. +
  57720. +#if defined __NR_linkat && !defined __NR_link
  57721. +# include <fcntl.h>
  57722. +int link(const char *oldpath, const char *newpath)
  57723. +{
  57724. + return linkat(AT_FDCWD, oldpath, AT_FDCWD, newpath, 0);
  57725. +}
  57726. +#else
  57727. _syscall2(int, link, const char *, oldpath, const char *, newpath)
  57728. +#endif
  57729. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/llseek.c uClibc-git/libc/sysdeps/linux/common/llseek.c
  57730. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/llseek.c 2012-05-15 09:20:09.000000000 +0200
  57731. +++ uClibc-git/libc/sysdeps/linux/common/llseek.c 2014-07-25 20:36:06.781334555 +0200
  57732. @@ -7,36 +7,26 @@
  57733. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  57734. */
  57735. -#include <unistd.h>
  57736. -#include <sys/types.h>
  57737. +#include <_lfs_64.h>
  57738. #include <sys/syscall.h>
  57739. +#include <bits/wordsize.h>
  57740. /* Newer kernel ports have llseek() instead of _llseek() */
  57741. #if !defined __NR__llseek && defined __NR_llseek
  57742. # define __NR__llseek __NR_llseek
  57743. #endif
  57744. -#if defined __NR__llseek && defined __UCLIBC_HAS_LFS__
  57745. -
  57746. -loff_t lseek64(int fd, loff_t offset, int whence)
  57747. -{
  57748. - loff_t result;
  57749. - return (loff_t)(INLINE_SYSCALL(_llseek, 5, fd, (off_t) (offset >> 32),
  57750. - (off_t) (offset & 0xffffffff), &result, whence) ?: result);
  57751. -}
  57752. -
  57753. -#else
  57754. -
  57755. -loff_t lseek64(int fd, loff_t offset, int whence)
  57756. +#if defined __NR__llseek && __WORDSIZE == 32
  57757. +# include <unistd.h>
  57758. +# include <endian.h>
  57759. +# include <cancel.h>
  57760. +off64_t __NC(lseek64)(int fd, off64_t offset, int whence)
  57761. {
  57762. - return (loff_t)(lseek(fd, (off_t) (offset), whence));
  57763. + off64_t result;
  57764. + /* do we not need to handle the offset with __LONG_LONG_PAIR depending on endianness? */
  57765. + return (off64_t)INLINE_SYSCALL(_llseek, 5, fd, (off_t) OFF64_HI(offset),
  57766. + (off_t) OFF64_LO(offset), &result, whence) ?: result;
  57767. }
  57768. -
  57769. -#endif
  57770. -
  57771. -#ifndef __LINUXTHREADS_OLD__
  57772. -libc_hidden_def(lseek64)
  57773. -#else
  57774. -libc_hidden_weak(lseek64)
  57775. -strong_alias(lseek64,__libc_lseek64)
  57776. +CANCELLABLE_SYSCALL(off64_t, lseek64, (int fd, off64_t offset, int whence), (fd, offset, whence))
  57777. +lt_libc_hidden(lseek64)
  57778. #endif
  57779. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/longjmp.c uClibc-git/libc/sysdeps/linux/common/longjmp.c
  57780. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/longjmp.c 2012-05-15 09:20:09.000000000 +0200
  57781. +++ uClibc-git/libc/sysdeps/linux/common/longjmp.c 2014-07-25 20:36:06.781334555 +0200
  57782. @@ -12,23 +12,13 @@
  57783. Lesser General Public License for more details.
  57784. You should have received a copy of the GNU Lesser General Public
  57785. - License along with the GNU C Library; if not, write to the Free
  57786. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  57787. - 02111-1307 USA. */
  57788. + License along with the GNU C Library; if not, see
  57789. + <http://www.gnu.org/licenses/>. */
  57790. #include <stddef.h>
  57791. #include <setjmp.h>
  57792. #include <signal.h>
  57793. -
  57794. -extern void __longjmp (__jmp_buf __env, int __val) attribute_noreturn;
  57795. -libc_hidden_proto(__longjmp)
  57796. -
  57797. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  57798. -extern void _longjmp_unwind (jmp_buf env, int val);
  57799. -#endif
  57800. -
  57801. -extern __typeof(longjmp) __libc_longjmp attribute_noreturn;
  57802. /* Set the signal mask to the one specified in ENV, and jump
  57803. to the position specified in ENV, causing the setjmp
  57804. call there to return VAL, or 1 if VAL is 0. */
  57805. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/lseek.c uClibc-git/libc/sysdeps/linux/common/lseek.c
  57806. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/lseek.c 2012-05-15 09:20:09.000000000 +0200
  57807. +++ uClibc-git/libc/sysdeps/linux/common/lseek.c 2014-07-25 20:36:06.781334555 +0200
  57808. @@ -9,19 +9,55 @@
  57809. #include <sys/syscall.h>
  57810. #include <unistd.h>
  57811. +#include <cancel.h>
  57812. #ifdef __NR_lseek
  57813. -_syscall3(__off_t, lseek, int, fildes, __off_t, offset, int, whence)
  57814. +# define __NR___lseek_nocancel __NR_lseek
  57815. +_syscall3(off_t, __NC(lseek), int, fd, off_t, offset, int, whence)
  57816. +/* Use lseek64 if __NR_lseek is not defined but UCLIBC_HAS_LFS is enabled */
  57817. +#elif !defined __NR_lseek && defined __NR_llseek
  57818. +#include <endian.h>
  57819. +off_t __NC(lseek)(int fd, off_t offset, int whence)
  57820. +{
  57821. +#if defined __UCLIBC_HAS_LFS__
  57822. + return lseek64(fd, offset, whence);
  57823. +#elif __WORDSIZE == 32
  57824. + __off64_t result;
  57825. + __off_t high = 0;
  57826. + return INLINE_SYSCALL(llseek, 5, fd,
  57827. + __LONG_LONG_PAIR(high, offset),
  57828. + &result, whence) ?: result;
  57829. +#endif
  57830. +/* No need to handle __WORDSIZE == 64 as such a kernel won't define __NR_llseek */
  57831. +}
  57832. #else
  57833. -
  57834. -__off_t lseek(int fildes, __off_t offset, int whence)
  57835. +# include <errno.h>
  57836. +off_t __NC(lseek)(int fd, off_t offset attribute_unused, int whence)
  57837. {
  57838. - return lseek64(fildes, offset, whence);
  57839. + if (fd < 0) {
  57840. + __set_errno(EBADF);
  57841. + return -1;
  57842. + }
  57843. +
  57844. + switch(whence) {
  57845. + case SEEK_SET:
  57846. + case SEEK_CUR:
  57847. + case SEEK_END:
  57848. + break;
  57849. + default:
  57850. + __set_errno(EINVAL);
  57851. + return -1;
  57852. + }
  57853. +
  57854. + __set_errno(ENOSYS);
  57855. + return -1;
  57856. }
  57857. #endif
  57858. -#ifndef __LINUXTHREADS_OLD__
  57859. -libc_hidden_def(lseek)
  57860. -#else
  57861. -libc_hidden_weak(lseek)
  57862. -strong_alias(lseek,__libc_lseek)
  57863. +CANCELLABLE_SYSCALL(off_t, lseek, (int fd, off_t offset, int whence), (fd, offset, whence))
  57864. +lt_libc_hidden(lseek)
  57865. +#if defined __UCLIBC_HAS_LFS__ && (__WORDSIZE == 64 || (!defined __NR__llseek && !defined __NR_llseek))
  57866. +strong_alias_untyped(__NC(lseek),__NC(lseek64))
  57867. +strong_alias_untyped(lseek,lseek64)
  57868. +lt_strong_alias(lseek64)
  57869. +lt_libc_hidden(lseek64)
  57870. #endif
  57871. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/lstat64.c uClibc-git/libc/sysdeps/linux/common/lstat64.c
  57872. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/lstat64.c 2012-05-15 09:20:09.000000000 +0200
  57873. +++ uClibc-git/libc/sysdeps/linux/common/lstat64.c 2014-07-25 20:36:06.781334555 +0200
  57874. @@ -7,17 +7,27 @@
  57875. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  57876. */
  57877. +#include <_lfs_64.h>
  57878. #include <sys/syscall.h>
  57879. -#if defined __UCLIBC_HAS_LFS__ && defined __NR_lstat64
  57880. # include <unistd.h>
  57881. # include <sys/stat.h>
  57882. -# include "xstatconv.h"
  57883. +#if defined __NR_fstatat64 && !defined __NR_lstat64
  57884. +# include <fcntl.h>
  57885. +
  57886. +int lstat64(const char *file_name, struct stat64 *buf)
  57887. +{
  57888. + return fstatat64(AT_FDCWD, file_name, buf, AT_SYMLINK_NOFOLLOW);
  57889. +}
  57890. +libc_hidden_def(lstat64)
  57891. +/* For systems which have both, prefer the old one */
  57892. +#elif defined __NR_lstat64
  57893. +# include "xstatconv.h"
  57894. # define __NR___syscall_lstat64 __NR_lstat64
  57895. -static __inline__ _syscall2(int, __syscall_lstat64, const char *, file_name,
  57896. - struct kernel_stat64 *, buf)
  57897. +static __always_inline _syscall2(int, __syscall_lstat64, const char *, file_name,
  57898. + struct kernel_stat64 *, buf)
  57899. int lstat64(const char *file_name, struct stat64 *buf)
  57900. {
  57901. @@ -31,5 +41,4 @@
  57902. return result;
  57903. }
  57904. libc_hidden_def(lstat64)
  57905. -
  57906. #endif
  57907. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/lstat.c uClibc-git/libc/sysdeps/linux/common/lstat.c
  57908. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/lstat.c 2012-05-15 09:20:09.000000000 +0200
  57909. +++ uClibc-git/libc/sysdeps/linux/common/lstat.c 2014-07-25 20:36:06.781334555 +0200
  57910. @@ -10,12 +10,23 @@
  57911. #include <sys/syscall.h>
  57912. #include <unistd.h>
  57913. #include <sys/stat.h>
  57914. -#include "xstatconv.h"
  57915. +
  57916. +#if defined __NR_fstatat64 && !defined __NR_lstat
  57917. +# include <fcntl.h>
  57918. int lstat(const char *file_name, struct stat *buf)
  57919. {
  57920. + return fstatat(AT_FDCWD, file_name, buf, AT_SYMLINK_NOFOLLOW);
  57921. +}
  57922. +libc_hidden_def(lstat)
  57923. +
  57924. +/* For systems which have both, prefer the old one */
  57925. +#else
  57926. +# include "xstatconv.h"
  57927. +int lstat(const char *file_name, struct stat *buf)
  57928. +{
  57929. int result;
  57930. -#ifdef __NR_lstat64
  57931. +# ifdef __NR_lstat64
  57932. /* normal stat call has limited values for various stat elements
  57933. * e.g. uid device major/minor etc.
  57934. * so we use 64 variant if available
  57935. @@ -26,19 +37,22 @@
  57936. if (result == 0) {
  57937. __xstat32_conv(&kbuf, buf);
  57938. }
  57939. -#else
  57940. +# else
  57941. struct kernel_stat kbuf;
  57942. result = INLINE_SYSCALL(lstat, 2, file_name, &kbuf);
  57943. if (result == 0) {
  57944. __xstat_conv(&kbuf, buf);
  57945. }
  57946. -#endif
  57947. +# endif /* __NR_lstat64 */
  57948. return result;
  57949. }
  57950. libc_hidden_def(lstat)
  57951. -#if ! defined __NR_lstat64 && defined __UCLIBC_HAS_LFS__
  57952. +# if ! defined __NR_fstatat64 && ! defined __NR_lstat64 \
  57953. + && defined __UCLIBC_HAS_LFS__
  57954. strong_alias_untyped(lstat,lstat64)
  57955. libc_hidden_def(lstat64)
  57956. -#endif
  57957. +# endif
  57958. +
  57959. +#endif /* __NR_fstatat64 */
  57960. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/Makefile.in uClibc-git/libc/sysdeps/linux/common/Makefile.in
  57961. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  57962. +++ uClibc-git/libc/sysdeps/linux/common/Makefile.in 2014-07-25 20:36:06.757334429 +0200
  57963. @@ -23,6 +23,7 @@
  57964. bdflush.c \
  57965. capget.c \
  57966. capset.c \
  57967. + dup3.c \
  57968. eventfd.c \
  57969. inotify.c \
  57970. ioperm.c \
  57971. @@ -64,24 +65,30 @@
  57972. # NPTL needs these internally: madvise.c
  57973. CSRC-$(findstring y,$(UCLIBC_LINUX_SPECIFIC)$(UCLIBC_HAS_THREADS_NATIVE)) += madvise.c
  57974. ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
  57975. -CSRC- += fork.c getpid.c raise.c open.c close.c read.c write.c
  57976. +CSRC- += fork.c getpid.c raise.c #open.c close.c read.c write.c
  57977. CSRC- += $(if $(findstring =arm=,=$(TARGET_ARCH)=),vfork.c)
  57978. CSRC- += $(if $(findstring =x86_64=,=$(TARGET_ARCH)=),vfork.c)
  57979. -CSRC- += $(if $(findstring =mips=y=,=$(TARGET_ARCH)=$(CONFIG_MIPS_O32_ABI)=),waitpid.c)
  57980. +#CSRC- += $(if $(findstring =mips=y=,=$(TARGET_ARCH)=$(CONFIG_MIPS_O32_ABI)=),waitpid.c)
  57981. +CSRC- += $(if $(findstring =metag=,=$(TARGET_ARCH)=),vfork.c)
  57982. +endif
  57983. +ifneq ($(ARCH_HAS_DEPRECATED_SYSCALLS),y)
  57984. +# No conversion is needed for new architectures
  57985. +CSRC- += xstatconv.c
  57986. endif
  57987. # stubbed out in mman.h
  57988. CSRC-$(ARCH_USE_MMU) += msync.c
  57989. # we need these internally: getdomainname.c
  57990. CSRC-$(UCLIBC_BSD_SPECIFIC) += mincore.c setdomainname.c
  57991. CSRC-$(UCLIBC_NTP_LEGACY) += ntp_gettime.c
  57992. -# aio_cancel|aio_error|aio_fsync|aio_read|aio_return|aio_suspend|aio_write|clock_getres|clock_gettime|clock_settime|clock_settime|fdatasync|lio_listio|mlockall|munlockall|mlock|munlock|mq_close|mq_getattr|mq_notify|mq_open|mq_receive|mq_timedreceive|mq_send|mq_timedsend|mq_setattr|mq_unlink|nanosleep|sched_getparam|sched_get_priority_max|sched_get_priority_min|sched_getscheduler|sched_rr_get_interval|sched_setparam|sched_setscheduler|sem_close|sem_destroy|sem_getvalue|sem_init|sem_open|sem_post|sem_trywait|sem_wait|sem_unlink|sem_wait|shm_open|shm_unlink|sigqueue|sigtimedwait|sigwaitinfo|sigwaitinfo|timer_create|timer_delete|timer_getoverrun|timer_gettime|timer_settime
  57993. +# aio_cancel|aio_error|aio_fsync|aio_read|aio_return|aio_suspend|aio_write|clock_getres|clock_gettime|clock_settime|clock_settime|fdatasync|lio_listio|mlockall|munlockall|mlock|munlock|mq_close|mq_getattr|mq_notify|mq_open|mq_receive|mq_timedreceive|mq_send|mq_timedsend|mq_setattr|mq_unlink|nanosleep|sched_getparam|sched_get_priority_max|sched_get_priority_min|sched_getscheduler|sched_rr_get_interval|sched_setparam|sched_setscheduler|sem_close|sem_destroy|sem_getvalue|sem_init|sem_open|sem_post|sem_trywait|sem_wait|sem_unlink|sem_wait|shm_open|shm_unlink|sigqueue|sigtimedwait|sigwaitinfo|timer_create|timer_delete|timer_getoverrun|timer_gettime|timer_settime
  57994. CSRC-$(UCLIBC_HAS_REALTIME) += clock_getres.c clock_gettime.c clock_settime.c \
  57995. fdatasync.c mlockall.c mlock.c munlockall.c munlock.c \
  57996. nanosleep.c __rt_sigtimedwait.c __rt_sigwaitinfo.c sched_getparam.c \
  57997. sched_get_priority_max.c sched_get_priority_min.c sched_getscheduler.c \
  57998. sched_rr_get_interval.c sched_setparam.c sched_setscheduler.c sigqueue.c
  57999. # clock_getcpuclockid|clock_nanosleep|mq_timedreceive|mq_timedsend|posix_fadvise|posix_fallocate|posix_madvise|posix_memalign|posix_mem_offset|posix_spawnattr_destroy|posix_spawnattr_init|posix_spawnattr_getflags|posix_spawnattr_setflags|posix_spawnattr_getpgroup|posix_spawnattr_setpgroup|posix_spawnattr_getschedparam|posix_spawnattr_setschedparam|posix_spawnattr_getschedpolicy|posix_spawnattr_setschedpolicy|posix_spawnattr_getsigdefault|posix_spawnattr_setsigdefault|posix_spawnattr_getsigmask|posix_spawnattr_setsigmask|posix_spawnattr_init|posix_spawnattr_setflags|posix_spawnattr_setpgroup|posix_spawnattr_setschedparam|posix_spawnattr_setschedpolicy|posix_spawnattr_setsigdefault|posix_spawnattr_setsigmask|posix_spawn_file_actions_addclose|posix_spawn_file_actions_addopen|posix_spawn_file_actions_adddup2|posix_spawn_file_actions_addopen|posix_spawn_file_actions_destroy|posix_spawn_file_actions_init|posix_spawn_file_actions_init|posix_spawn|posix_spawnp|posix_spawnp|posix_typed_mem_get_info|pthread_mutex_timedlock|sem_timedwait
  58000. -CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise64.c posix_fadvise.c
  58001. +CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise64.c posix_fadvise.c posix_madvise.c \
  58002. + posix_fallocate.c posix_fallocate64.c
  58003. CSRC-$(UCLIBC_SUSV4_LEGACY) += utime.c
  58004. CSRC-$(UCLIBC_HAS_EPOLL) += epoll.c
  58005. CSRC-$(UCLIBC_HAS_XATTR) += xattr.c
  58006. @@ -96,11 +103,11 @@
  58007. # provided via pthreads builddir
  58008. CSRC-y := $(filter-out $(libc_a_CSRC) $(notdir $(libpthread_libc_OBJS:.o=.c)),$(CSRC-y))
  58009. -SSRC := $(filter-out $(libc_a_SSRC) $(notdir $(libpthread_libc_OBJS:.o=.S)),$(SSRC))
  58010. +SSRC-y := $(filter-out $(libc_a_SSRC) $(notdir $(libpthread_libc_OBJS:.o=.S)),$(SSRC-y))
  58011. # fails for some reason
  58012. -ifneq ($(strip $(ARCH_OBJS)),)
  58013. -CSRC-y := $(filter-out $(notdir $(ARCH_OBJS:.o=.c)) $(ARCH_OBJ_FILTEROUT),$(CSRC-y))
  58014. +ifneq ($(strip $(ARCH_OBJS-y)),)
  58015. +CSRC-y := $(filter-out $(notdir $(ARCH_OBJS-y:.o=.c)) $(ARCH_OBJ_FILTEROUT-y),$(CSRC-y))
  58016. endif
  58017. CFLAGS-ssp.c := $(SSP_DISABLE_FLAGS)
  58018. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/mkdirat.c uClibc-git/libc/sysdeps/linux/common/mkdirat.c
  58019. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/mkdirat.c 2012-05-15 09:20:09.000000000 +0200
  58020. +++ uClibc-git/libc/sysdeps/linux/common/mkdirat.c 2014-07-25 20:36:06.781334555 +0200
  58021. @@ -11,6 +11,7 @@
  58022. #ifdef __NR_mkdirat
  58023. _syscall3(int, mkdirat, int, fd, const char *, path, mode_t, mode)
  58024. +libc_hidden_def(mkdirat)
  58025. #else
  58026. /* should add emulation with mkdir() and /proc/self/fd/ ... */
  58027. #endif
  58028. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/mkdir.c uClibc-git/libc/sysdeps/linux/common/mkdir.c
  58029. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/mkdir.c 2012-05-15 09:20:09.000000000 +0200
  58030. +++ uClibc-git/libc/sysdeps/linux/common/mkdir.c 2014-07-25 20:36:06.781334555 +0200
  58031. @@ -10,8 +10,15 @@
  58032. #include <sys/syscall.h>
  58033. #include <sys/stat.h>
  58034. +#if defined __NR_mkdirat && !defined __NR_mkdir
  58035. +# include <fcntl.h>
  58036. +int mkdir(const char *pathname, mode_t mode)
  58037. +{
  58038. + return mkdirat(AT_FDCWD, pathname, mode);
  58039. +}
  58040. -#define __NR___syscall_mkdir __NR_mkdir
  58041. +#else
  58042. +# define __NR___syscall_mkdir __NR_mkdir
  58043. static __inline__ _syscall2(int, __syscall_mkdir, const char *, pathname,
  58044. __kernel_mode_t, mode)
  58045. @@ -19,4 +26,5 @@
  58046. {
  58047. return (__syscall_mkdir(pathname, mode));
  58048. }
  58049. +#endif
  58050. libc_hidden_def(mkdir)
  58051. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/mkfifo.c uClibc-git/libc/sysdeps/linux/common/mkfifo.c
  58052. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/mkfifo.c 2012-05-15 09:20:09.000000000 +0200
  58053. +++ uClibc-git/libc/sysdeps/linux/common/mkfifo.c 2014-07-25 20:36:06.781334555 +0200
  58054. @@ -12,9 +12,8 @@
  58055. Lesser General Public License for more details.
  58056. You should have received a copy of the GNU Lesser General Public
  58057. - License along with the GNU C Library; if not, write to the Free
  58058. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  58059. - 02111-1307 USA. */
  58060. + License along with the GNU C Library; if not, see
  58061. + <http://www.gnu.org/licenses/>. */
  58062. #include <errno.h>
  58063. #include <stddef.h>
  58064. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/mknod.c uClibc-git/libc/sysdeps/linux/common/mknod.c
  58065. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/mknod.c 2012-05-15 09:20:09.000000000 +0200
  58066. +++ uClibc-git/libc/sysdeps/linux/common/mknod.c 2014-07-25 20:36:06.781334555 +0200
  58067. @@ -10,6 +10,13 @@
  58068. #include <sys/syscall.h>
  58069. #include <sys/stat.h>
  58070. +#if defined __NR_mknodat && !defined __NR_mknod
  58071. +# include <fcntl.h>
  58072. +int mknod(const char *path, mode_t mode, dev_t dev)
  58073. +{
  58074. + return mknodat(AT_FDCWD, path, mode, dev);
  58075. +}
  58076. +#else
  58077. int mknod(const char *path, mode_t mode, dev_t dev)
  58078. {
  58079. unsigned long long int k_dev;
  58080. @@ -19,4 +26,5 @@
  58081. return INLINE_SYSCALL(mknod, 3, path, mode, (unsigned int)k_dev);
  58082. }
  58083. +#endif
  58084. libc_hidden_def(mknod)
  58085. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/mmap64.c uClibc-git/libc/sysdeps/linux/common/mmap64.c
  58086. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/mmap64.c 2012-05-15 09:20:09.000000000 +0200
  58087. +++ uClibc-git/libc/sysdeps/linux/common/mmap64.c 2014-07-25 20:36:06.781334555 +0200
  58088. @@ -6,18 +6,12 @@
  58089. /* Massivly hacked up for uClibc by Erik Andersen */
  58090. #include <_lfs_64.h>
  58091. -
  58092. -#ifdef __UCLIBC_HAS_LFS__
  58093. -
  58094. -#include <errno.h>
  58095. #include <stdint.h>
  58096. -#include <unistd.h>
  58097. -#include <sys/mman.h>
  58098. #include <sys/syscall.h>
  58099. -#include <bits/uClibc_page.h>
  58100. -
  58101. +#include <errno.h>
  58102. +#include <sys/mman.h>
  58103. -# if !defined __NR_mmap2
  58104. +#ifndef __NR_mmap2
  58105. /*
  58106. * This version is a stub that just chops off everything at the mmap 32 bit
  58107. @@ -27,7 +21,7 @@
  58108. *
  58109. */
  58110. -__ptr_t mmap64(__ptr_t addr, size_t len, int prot, int flags, int fd, __off64_t offset)
  58111. +void *mmap64(void *addr, size_t len, int prot, int flags, int fd, __off64_t offset)
  58112. {
  58113. if (offset != (off_t) offset ||
  58114. (offset + len) != (off_t) (offset + len)) {
  58115. @@ -38,17 +32,18 @@
  58116. return mmap(addr, len, prot, flags, fd, (off_t) offset);
  58117. }
  58118. -# else
  58119. +#else
  58120. +# include <bits/uClibc_page.h>
  58121. -/* Some architectures always use 12 as page shift for mmap2() eventhough the
  58122. +/* Some architectures always use 12 as page shift for mmap2() even though the
  58123. * real PAGE_SHIFT != 12. Other architectures use the same value as
  58124. * PAGE_SHIFT...
  58125. */
  58126. -# ifndef MMAP2_PAGE_SHIFT
  58127. -# define MMAP2_PAGE_SHIFT 12
  58128. -# endif
  58129. +# ifndef MMAP2_PAGE_SHIFT
  58130. +# define MMAP2_PAGE_SHIFT 12
  58131. +# endif
  58132. -__ptr_t mmap64(__ptr_t addr, size_t len, int prot, int flags, int fd, __off64_t offset)
  58133. +void *mmap64(void *addr, size_t len, int prot, int flags, int fd, __off64_t offset)
  58134. {
  58135. /*
  58136. * Some arches check the size in INLINE_SYSCALL() and barf if it's
  58137. @@ -73,8 +68,7 @@
  58138. */
  58139. sysoff = (uint64_t)offset >> MMAP2_PAGE_SHIFT;
  58140. - return (__ptr_t) INLINE_SYSCALL(mmap2, 6, addr, len, prot, flags, fd, sysoff);
  58141. + return (void*) INLINE_SYSCALL(mmap2, 6, addr, len, prot, flags, fd, sysoff);
  58142. }
  58143. -# endif
  58144. -#endif /* __UCLIBC_HAS_LFS__ */
  58145. +#endif
  58146. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/mmap.c uClibc-git/libc/sysdeps/linux/common/mmap.c
  58147. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/mmap.c 2012-05-15 09:20:09.000000000 +0200
  58148. +++ uClibc-git/libc/sysdeps/linux/common/mmap.c 2014-07-25 20:36:06.781334555 +0200
  58149. @@ -7,25 +7,57 @@
  58150. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  58151. */
  58152. -#include <sys/syscall.h>
  58153. -#include <unistd.h>
  58154. #include <sys/mman.h>
  58155. -#include <bits/uClibc_page.h>
  58156. +#include <sys/syscall.h>
  58157. -#ifdef __NR_mmap
  58158. +#if defined __UCLIBC_MMAP_HAS_6_ARGS__ && defined __NR_mmap
  58159. +# ifndef _syscall6
  58160. +# error disable __UCLIBC_MMAP_HAS_6_ARGS__ for this arch
  58161. +# endif
  58162. -#ifdef __UCLIBC_MMAP_HAS_6_ARGS__
  58163. +# define __NR__mmap __NR_mmap
  58164. +static _syscall6(void *, _mmap, void *, addr, size_t, len,
  58165. + int, prot, int, flags, int, fd, __off_t, offset)
  58166. -_syscall6(void *, mmap, void *, start, size_t, length,
  58167. - int, prot, int, flags, int, fd, off_t, offset)
  58168. +#elif defined __NR_mmap2 && defined _syscall6
  58169. -#else
  58170. +# include <errno.h>
  58171. +# include <bits/uClibc_page.h>
  58172. +# ifndef MMAP2_PAGE_SHIFT
  58173. +# define MMAP2_PAGE_SHIFT 12
  58174. +# endif
  58175. -# define __NR__mmap __NR_mmap
  58176. -static __inline__ _syscall1(__ptr_t, _mmap, unsigned long *, buffer)
  58177. -__ptr_t mmap(__ptr_t addr, size_t len, int prot,
  58178. - int flags, int fd, __off_t offset)
  58179. +# define __NR___syscall_mmap2 __NR_mmap2
  58180. +static __inline__ _syscall6(void *, __syscall_mmap2, void *, addr, size_t, len,
  58181. + int, prot, int, flags, int, fd, __off_t, offset)
  58182. +
  58183. +static void *_mmap(void *addr, size_t len, int prot, int flags,
  58184. + int fd, __off_t offset)
  58185. +{
  58186. + const int mmap2_shift = MMAP2_PAGE_SHIFT;
  58187. + const __off_t mmap2_mask = ((__off_t) 1 << MMAP2_PAGE_SHIFT) - 1;
  58188. + /* check if offset is page aligned */
  58189. + if (offset & mmap2_mask) {
  58190. + __set_errno(EINVAL);
  58191. + return MAP_FAILED;
  58192. + }
  58193. +# ifdef __USE_FILE_OFFSET64
  58194. + return __syscall_mmap2(addr, len, prot, flags, fd,
  58195. + ((__u_quad_t) offset >> mmap2_shift));
  58196. +# else
  58197. + return __syscall_mmap2(addr, len, prot, flags, fd,
  58198. + ((__u_long) offset >> mmap2_shift));
  58199. +# endif
  58200. +}
  58201. +
  58202. +#elif defined __NR_mmap
  58203. +
  58204. +# define __NR___syscall_mmap __NR_mmap
  58205. +static __inline__ _syscall1(void *, __syscall_mmap, unsigned long *, buffer)
  58206. +
  58207. +static void *_mmap(void *addr, size_t len, int prot, int flags,
  58208. + int fd, __off_t offset)
  58209. {
  58210. unsigned long buffer[6];
  58211. @@ -35,37 +67,14 @@
  58212. buffer[3] = (unsigned long) flags;
  58213. buffer[4] = (unsigned long) fd;
  58214. buffer[5] = (unsigned long) offset;
  58215. - return (__ptr_t) _mmap(buffer);
  58216. + return __syscall_mmap(buffer);
  58217. }
  58218. -#endif
  58219. -
  58220. -libc_hidden_def(mmap)
  58221. -
  58222. -#elif defined(__NR_mmap2)
  58223. -
  58224. +#else
  58225. -#define __NR___syscall_mmap2 __NR_mmap2
  58226. -static __inline__ _syscall6(__ptr_t, __syscall_mmap2, __ptr_t, addr,
  58227. - size_t, len, int, prot, int, flags, int, fd, off_t, offset)
  58228. +# error "Your architecture doesn't seem to provide mmap() !?"
  58229. -/* Some architectures always use 12 as page shift for mmap2() eventhough the
  58230. - * real PAGE_SHIFT != 12. Other architectures use the same value as
  58231. - * PAGE_SHIFT...
  58232. - */
  58233. -# ifndef MMAP2_PAGE_SHIFT
  58234. -# define MMAP2_PAGE_SHIFT 12
  58235. -# endif
  58236. -
  58237. -__ptr_t mmap(__ptr_t addr, size_t len, int prot, int flags, int fd, __off_t offset)
  58238. -{
  58239. - if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1)) {
  58240. - __set_errno(EINVAL);
  58241. - return MAP_FAILED;
  58242. - }
  58243. - return __syscall_mmap2(addr, len, prot, flags, fd, offset >> MMAP2_PAGE_SHIFT);
  58244. -}
  58245. +#endif
  58246. +strong_alias(_mmap,mmap)
  58247. libc_hidden_def(mmap)
  58248. -
  58249. -#endif
  58250. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/mount.c uClibc-git/libc/sysdeps/linux/common/mount.c
  58251. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/mount.c 2012-05-15 09:20:09.000000000 +0200
  58252. +++ uClibc-git/libc/sysdeps/linux/common/mount.c 2014-07-25 20:36:06.781334555 +0200
  58253. @@ -10,5 +10,5 @@
  58254. #include <sys/syscall.h>
  58255. #include <sys/mount.h>
  58256. _syscall5(int, mount, const char *, specialfile, const char *, dir,
  58257. - const char *, filesystemtype, unsigned long, rwflag,
  58258. - const void *, data)
  58259. + const char *, filesystemtype, unsigned long, rwflag,
  58260. + const void *, data)
  58261. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/msync.c uClibc-git/libc/sysdeps/linux/common/msync.c
  58262. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/msync.c 2012-05-15 09:20:09.000000000 +0200
  58263. +++ uClibc-git/libc/sysdeps/linux/common/msync.c 2014-07-25 20:36:06.781334555 +0200
  58264. @@ -8,38 +8,14 @@
  58265. */
  58266. #include <sys/syscall.h>
  58267. -#include <unistd.h>
  58268. -#include <sys/mman.h>
  58269. -#ifdef __NR_msync
  58270. +#if defined __NR_msync && defined __ARCH_USE_MMU__
  58271. +# include <sys/mman.h>
  58272. +# include <cancel.h>
  58273. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  58274. -#include <sysdep-cancel.h>
  58275. -#else
  58276. -#define SINGLE_THREAD_P 1
  58277. -#endif
  58278. -
  58279. -#define __NR___syscall_msync __NR_msync
  58280. -static __always_inline _syscall3(int, __syscall_msync, void *, addr, size_t, length,
  58281. - int, flags)
  58282. -
  58283. -extern __typeof(msync) __libc_msync;
  58284. -int __libc_msync(void * addr, size_t length, int flags)
  58285. -{
  58286. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  58287. - int oldtype, result;
  58288. -#endif
  58289. -
  58290. - if (SINGLE_THREAD_P)
  58291. - return __syscall_msync(addr, length, flags);
  58292. -
  58293. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  58294. - oldtype = LIBC_CANCEL_ASYNC ();
  58295. - result = __syscall_msync(addr, length, flags);
  58296. - LIBC_CANCEL_RESET (oldtype);
  58297. - return result;
  58298. -#endif
  58299. -}
  58300. -weak_alias(__libc_msync,msync)
  58301. +# define __NR___msync_nocancel __NR_msync
  58302. +static _syscall3(int, __NC(msync), void *, addr, size_t, length, int, flags)
  58303. +CANCELLABLE_SYSCALL(int, msync, (void *addr, size_t length, int flags),
  58304. + (addr, length, flags))
  58305. #endif
  58306. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/munmap.c uClibc-git/libc/sysdeps/linux/common/munmap.c
  58307. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/munmap.c 2012-05-15 09:20:09.000000000 +0200
  58308. +++ uClibc-git/libc/sysdeps/linux/common/munmap.c 2014-07-25 20:36:06.781334555 +0200
  58309. @@ -8,9 +8,7 @@
  58310. */
  58311. #include <sys/syscall.h>
  58312. -#include <unistd.h>
  58313. #include <sys/mman.h>
  58314. -
  58315. _syscall2(int, munmap, void *, start, size_t, length)
  58316. libc_hidden_def(munmap)
  58317. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/nanosleep.c uClibc-git/libc/sysdeps/linux/common/nanosleep.c
  58318. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/nanosleep.c 2012-05-15 09:20:09.000000000 +0200
  58319. +++ uClibc-git/libc/sysdeps/linux/common/nanosleep.c 2014-07-25 20:36:06.781334555 +0200
  58320. @@ -9,32 +9,13 @@
  58321. #include <sys/syscall.h>
  58322. #include <time.h>
  58323. +#include <cancel.h>
  58324. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  58325. -#include <sysdep-cancel.h>
  58326. -#include <pthreadP.h>
  58327. -#else
  58328. -#define SINGLE_THREAD_P 1
  58329. -#endif
  58330. -
  58331. -#define __NR___syscall_nanosleep __NR_nanosleep
  58332. -static inline _syscall2(int, __syscall_nanosleep, const struct timespec *, req,
  58333. - struct timespec *, rem);
  58334. -
  58335. -extern __typeof(nanosleep) __libc_nanosleep;
  58336. -
  58337. -int __libc_nanosleep(const struct timespec *req, struct timespec *rem)
  58338. -{
  58339. - if (SINGLE_THREAD_P)
  58340. - return __syscall_nanosleep(req, rem);
  58341. -
  58342. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  58343. - int oldtype = LIBC_CANCEL_ASYNC ();
  58344. - int result = __syscall_nanosleep(req, rem);
  58345. - LIBC_CANCEL_RESET (oldtype);
  58346. - return result;
  58347. -#endif
  58348. -}
  58349. -
  58350. -weak_alias(__libc_nanosleep,nanosleep)
  58351. -libc_hidden_weak(nanosleep)
  58352. +#define __NR___nanosleep_nocancel __NR_nanosleep
  58353. +static _syscall2(int, __NC(nanosleep), const struct timespec *, req,
  58354. + struct timespec *, rem);
  58355. +
  58356. +CANCELLABLE_SYSCALL(int, nanosleep,
  58357. + (const struct timespec *req, struct timespec *rem),
  58358. + (req, rem))
  58359. +lt_libc_hidden(nanosleep)
  58360. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/nice.c uClibc-git/libc/sysdeps/linux/common/nice.c
  58361. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/nice.c 2012-05-15 09:20:09.000000000 +0200
  58362. +++ uClibc-git/libc/sysdeps/linux/common/nice.c 2014-07-25 20:36:06.781334555 +0200
  58363. @@ -25,15 +25,15 @@
  58364. static __inline__ int int_add_no_wrap(int a, int b)
  58365. {
  58366. - int s = a + b;
  58367. -
  58368. if (b < 0) {
  58369. - if (s > a) s = INT_MIN;
  58370. + if (a < INT_MIN - b)
  58371. + return INT_MIN;
  58372. } else {
  58373. - if (s < a) s = INT_MAX;
  58374. + if (a > INT_MAX - b)
  58375. + return INT_MAX;
  58376. }
  58377. - return s;
  58378. + return a + b;
  58379. }
  58380. static __inline__ int __syscall_nice(int incr)
  58381. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/noophooks.c uClibc-git/libc/sysdeps/linux/common/noophooks.c
  58382. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/noophooks.c 2012-05-15 09:20:09.000000000 +0200
  58383. +++ uClibc-git/libc/sysdeps/linux/common/noophooks.c 2014-07-25 20:36:06.781334555 +0200
  58384. @@ -14,11 +14,8 @@
  58385. Lesser General Public License for more details.
  58386. You should have received a copy of the GNU Lesser General Public
  58387. - License along with the GNU C Library; if not, write to the Free
  58388. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  58389. - 02111-1307 USA. */
  58390. -
  58391. -#include <libc-internal.h>
  58392. + License along with the GNU C Library; if not, see
  58393. + <http://www.gnu.org/licenses/>. */
  58394. void
  58395. __cyg_profile_func_enter (attribute_unused void *this_fn, attribute_unused void *call_site);
  58396. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/not-cancel.h uClibc-git/libc/sysdeps/linux/common/not-cancel.h
  58397. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/not-cancel.h 2012-05-15 09:20:09.000000000 +0200
  58398. +++ uClibc-git/libc/sysdeps/linux/common/not-cancel.h 2014-07-25 20:36:06.781334555 +0200
  58399. @@ -1,5 +1,5 @@
  58400. /* Uncancelable versions of cancelable interfaces. Linux version.
  58401. - Copyright (C) 2003 Free Software Foundation, Inc.
  58402. + Copyright (C) 2003, 2006 Free Software Foundation, Inc.
  58403. This file is part of the GNU C Library.
  58404. Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
  58405. @@ -14,17 +14,50 @@
  58406. Lesser General Public License for more details.
  58407. You should have received a copy of the GNU Lesser General Public
  58408. - License along with the GNU C Library; if not, write to the Free
  58409. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  58410. - 02111-1307 USA. */
  58411. + License along with the GNU C Library; if not, see
  58412. + <http://www.gnu.org/licenses/>. */
  58413. +#include <sys/types.h>
  58414. #include <sysdep.h>
  58415. +#ifdef NOT_IN_libc
  58416. +
  58417. /* Uncancelable open. */
  58418. +#if defined __NR_openat && !defined __NR_open
  58419. +#define open_not_cancel(name, flags, mode) \
  58420. + INLINE_SYSCALL (openat, 4, AT_FDCWD, (const char *) (name), (flags), (mode))
  58421. +#define open_not_cancel_2(name, flags) \
  58422. + INLINE_SYSCALL (openat, 3, AT_FDCWD, (const char *) (name), (flags))
  58423. +#else
  58424. #define open_not_cancel(name, flags, mode) \
  58425. INLINE_SYSCALL (open, 3, (const char *) (name), (flags), (mode))
  58426. #define open_not_cancel_2(name, flags) \
  58427. INLINE_SYSCALL (open, 2, (const char *) (name), (flags))
  58428. +#endif
  58429. +
  58430. +#if 0
  58431. +/* Uncancelable openat. */
  58432. +#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
  58433. +extern int __openat_nocancel (int fd, const char *fname, int oflag,
  58434. + mode_t mode) attribute_hidden;
  58435. +extern int __openat64_nocancel (int fd, const char *fname, int oflag,
  58436. + mode_t mode) attribute_hidden;
  58437. +#else
  58438. +# define __openat_nocancel(fd, fname, oflag, mode) \
  58439. + openat (fd, fname, oflag, mode)
  58440. +# define __openat64_nocancel(fd, fname, oflag, mode) \
  58441. + openat64 (fd, fname, oflag, mode)
  58442. +#endif
  58443. +
  58444. +#define openat_not_cancel(fd, fname, oflag, mode) \
  58445. + __openat_nocancel (fd, fname, oflag, mode)
  58446. +#define openat_not_cancel_3(fd, fname, oflag) \
  58447. + __openat_nocancel (fd, fname, oflag, 0)
  58448. +#define openat64_not_cancel(fd, fname, oflag, mode) \
  58449. + __openat64_nocancel (fd, fname, oflag, mode)
  58450. +#define openat64_not_cancel_3(fd, fname, oflag) \
  58451. + __openat64_nocancel (fd, fname, oflag, 0)
  58452. +#endif
  58453. /* Uncancelable close. */
  58454. #define close_not_cancel(fd) \
  58455. @@ -37,10 +70,13 @@
  58456. #define read_not_cancel(fd, buf, n) \
  58457. INLINE_SYSCALL (read, 3, (fd), (buf), (n))
  58458. +#ifdef __LINUXTHREADS_NEW__
  58459. /* Uncancelable write. */
  58460. #define write_not_cancel(fd, buf, n) \
  58461. INLINE_SYSCALL (write, 3, (fd), (buf), (n))
  58462. +#endif
  58463. +#if 0
  58464. /* Uncancelable writev. */
  58465. #define writev_not_cancel_no_status(fd, iov, n) \
  58466. (void) ({ INTERNAL_SYSCALL_DECL (err); \
  58467. @@ -49,12 +85,68 @@
  58468. /* Uncancelable fcntl. */
  58469. #define fcntl_not_cancel(fd, cmd, val) \
  58470. __fcntl_nocancel (fd, cmd, val)
  58471. +#endif
  58472. +#ifdef __LINUXTHREADS_NEW__
  58473. /* Uncancelable waitpid. */
  58474. -#ifdef __NR_waitpid
  58475. +#if 0 /*def __NR_waitpid*/
  58476. # define waitpid_not_cancel(pid, stat_loc, options) \
  58477. INLINE_SYSCALL (waitpid, 3, pid, stat_loc, options)
  58478. #else
  58479. # define waitpid_not_cancel(pid, stat_loc, options) \
  58480. INLINE_SYSCALL (wait4, 4, pid, stat_loc, options, NULL)
  58481. #endif
  58482. +#endif
  58483. +
  58484. +/* Uncancelable pause. */
  58485. +#ifdef __NR_pause
  58486. +# define pause_not_cancel() \
  58487. + INLINE_SYSCALL (pause, 0)
  58488. +#else
  58489. +# include <unistd.h>
  58490. +extern __typeof(pause) __pause_nocancel;
  58491. +# define pause_not_cancel() \
  58492. + __pause_nocancel ()
  58493. +#endif
  58494. +
  58495. +/* Uncancelable nanosleep. */
  58496. +#ifdef __NR_nanosleep
  58497. +# define nanosleep_not_cancel(requested_time, remaining) \
  58498. + INLINE_SYSCALL (nanosleep, 2, requested_time, remaining)
  58499. +/*#else
  58500. +# define nanosleep_not_cancel(requested_time, remaining) \
  58501. + __nanosleep_nocancel (requested_time, remaining)*/
  58502. +#endif
  58503. +
  58504. +#if 0
  58505. +/* Uncancelable sigsuspend. */
  58506. +#define sigsuspend_not_cancel(set) \
  58507. + __sigsuspend_nocancel (set)
  58508. +#endif
  58509. +
  58510. +#elif !defined NOT_IN_libc
  58511. +
  58512. +#include <cancel.h>
  58513. +#include <fcntl.h>
  58514. +#include <unistd.h>
  58515. +
  58516. +#define open_not_cancel(name, flags, mode) \
  58517. + __NC(open)(name, flags, mode)
  58518. +#define open_not_cancel_2(name, flags) \
  58519. + __NC(open2)(name, flags)
  58520. +
  58521. +#define close_not_cancel(fd) \
  58522. + __NC(close)(fd)
  58523. +#define close_not_cancel_no_status(fd) \
  58524. + __close_nocancel_no_status(fd)
  58525. +
  58526. +#define read_not_cancel(fd, buf, n) \
  58527. + __NC(read)(fd, buf, n)
  58528. +
  58529. +#define write_not_cancel(fd, buf, n) \
  58530. + __NC(write)(fd, buf, n)
  58531. +
  58532. +#define fcntl_not_cancel(fd, cmd, val) \
  58533. + __NC(fcntl)(fd, cmd, val)
  58534. +
  58535. +#endif
  58536. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/ntp_gettime.c uClibc-git/libc/sysdeps/linux/common/ntp_gettime.c
  58537. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/ntp_gettime.c 2012-05-15 09:20:09.000000000 +0200
  58538. +++ uClibc-git/libc/sysdeps/linux/common/ntp_gettime.c 2014-07-25 20:36:06.781334555 +0200
  58539. @@ -12,9 +12,8 @@
  58540. Lesser General Public License for more details.
  58541. You should have received a copy of the GNU Lesser General Public
  58542. - License along with the GNU C Library; if not, write to the Free
  58543. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  58544. - 02111-1307 USA. */
  58545. + License along with the GNU C Library; if not, see
  58546. + <http://www.gnu.org/licenses/>. */
  58547. #include <sys/timex.h>
  58548. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/open64.c uClibc-git/libc/sysdeps/linux/common/open64.c
  58549. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/open64.c 2012-05-15 09:20:09.000000000 +0200
  58550. +++ uClibc-git/libc/sysdeps/linux/common/open64.c 2014-07-25 20:36:06.781334555 +0200
  58551. @@ -4,54 +4,31 @@
  58552. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  58553. */
  58554. -#include <features.h>
  58555. +#include <_lfs_64.h>
  58556. +#include <sys/syscall.h>
  58557. #include <fcntl.h>
  58558. #include <stdarg.h>
  58559. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  58560. -#include <errno.h>
  58561. -#include <sysdep-cancel.h>
  58562. -#endif
  58563. -
  58564. -#ifdef __UCLIBC_HAS_LFS__
  58565. -
  58566. -#ifndef O_LARGEFILE
  58567. -# define O_LARGEFILE 0100000
  58568. -#endif
  58569. +#include <cancel.h>
  58570. /* Open FILE with access OFLAG. If OFLAG includes O_CREAT,
  58571. a third argument is the file protection. */
  58572. -int open64 (const char *file, int oflag, ...)
  58573. +int open64(const char *file, int oflag, ...)
  58574. {
  58575. - mode_t mode = 0;
  58576. -
  58577. - if (oflag & O_CREAT)
  58578. - {
  58579. - va_list arg;
  58580. - va_start (arg, oflag);
  58581. - mode = va_arg (arg, mode_t);
  58582. - va_end (arg);
  58583. - }
  58584. -
  58585. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  58586. - if (SINGLE_THREAD_P)
  58587. - return INLINE_SYSCALL (open, 3, file, oflag | O_LARGEFILE, mode);
  58588. + mode_t mode = 0;
  58589. - int oldtype = LIBC_CANCEL_ASYNC ();
  58590. -
  58591. - int result = INLINE_SYSCALL (open, 3, file, oflag | O_LARGEFILE, mode);
  58592. -
  58593. - LIBC_CANCEL_RESET (oldtype);
  58594. -
  58595. - return result;
  58596. + if (oflag & O_CREAT) {
  58597. + va_list arg;
  58598. + va_start (arg, oflag);
  58599. + mode = va_arg (arg, mode_t);
  58600. + va_end (arg);
  58601. + }
  58602. +#if defined __NR_openat && !defined __NR_open
  58603. + return openat(AT_FDCWD, file, oflag | O_LARGEFILE, mode);
  58604. #else
  58605. - return open(file, oflag | O_LARGEFILE, mode);
  58606. + return open(file, oflag | O_LARGEFILE, mode);
  58607. #endif
  58608. }
  58609. -#ifndef __LINUXTHREADS_OLD__
  58610. -libc_hidden_def(open64)
  58611. -#else
  58612. -libc_hidden_weak(open64)
  58613. -strong_alias(open64,__libc_open64)
  58614. -#endif
  58615. -
  58616. -#endif /* __UCLIBC_HAS_LFS__ */
  58617. +lt_strong_alias(open64)
  58618. +lt_libc_hidden(open64)
  58619. +/* open handled cancellation, noop on uClibc */
  58620. +LIBC_CANCEL_HANDLED();
  58621. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/openat64.c uClibc-git/libc/sysdeps/linux/common/openat64.c
  58622. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/openat64.c 2012-05-15 09:20:09.000000000 +0200
  58623. +++ uClibc-git/libc/sysdeps/linux/common/openat64.c 2014-07-25 20:36:06.781334555 +0200
  58624. @@ -6,27 +6,16 @@
  58625. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  58626. */
  58627. -#define openat64 __xx_openat
  58628. +#include <_lfs_64.h>
  58629. #include <sys/syscall.h>
  58630. #include <fcntl.h>
  58631. -#undef openat64
  58632. -
  58633. -#ifdef __UCLIBC_HAS_LFS__
  58634. #ifdef __NR_openat
  58635. -/* The openat() prototype is varargs based, but we don't care about that
  58636. - * here, so need to provide our own dedicated signature.
  58637. - */
  58638. -extern int openat64(int fd, const char *file, int oflag, mode_t mode);
  58639. -libc_hidden_proto(openat64)
  58640. -
  58641. -int openat64(int fd, const char *file, int oflag, mode_t mode)
  58642. +static int __openat64(int fd, const char *file, int oflag, mode_t mode)
  58643. {
  58644. return openat(fd, file, oflag | O_LARGEFILE, mode);
  58645. }
  58646. -libc_hidden_def(openat64)
  58647. +strong_alias_untyped(__openat64,openat64)
  58648. #else
  58649. /* should add emulation with open() and /proc/self/fd/ ... */
  58650. #endif
  58651. -
  58652. -#endif
  58653. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/openat.c uClibc-git/libc/sysdeps/linux/common/openat.c
  58654. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/openat.c 2012-05-15 09:20:09.000000000 +0200
  58655. +++ uClibc-git/libc/sysdeps/linux/common/openat.c 2014-07-25 20:36:06.781334555 +0200
  58656. @@ -6,19 +6,13 @@
  58657. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  58658. */
  58659. -#define openat __xx_openat
  58660. #include <sys/syscall.h>
  58661. #include <fcntl.h>
  58662. -#undef openat
  58663. #ifdef __NR_openat
  58664. -/* The openat() prototype is varargs based, but we don't care about that
  58665. - * here, so need to provide our own dedicated signature.
  58666. - */
  58667. -extern int openat(int fd, const char *file, int oflag, mode_t mode);
  58668. -libc_hidden_proto(openat)
  58669. -
  58670. -_syscall4(int, openat, int, fd, const char *, file, int, oflag, mode_t, mode)
  58671. +# define __NR___syscall_openat __NR_openat
  58672. +static __inline__ _syscall4(int, __syscall_openat, int, fd, const char *, file, int, oflag, mode_t, mode)
  58673. +strong_alias_untyped(__syscall_openat,openat)
  58674. libc_hidden_def(openat)
  58675. #else
  58676. /* should add emulation with open() and /proc/self/fd/ ... */
  58677. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/open.c uClibc-git/libc/sysdeps/linux/common/open.c
  58678. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/open.c 2012-05-15 09:20:09.000000000 +0200
  58679. +++ uClibc-git/libc/sysdeps/linux/common/open.c 2014-07-25 20:36:06.781334555 +0200
  58680. @@ -8,15 +8,22 @@
  58681. */
  58682. #include <sys/syscall.h>
  58683. -#include <stdlib.h>
  58684. -#include <stdarg.h>
  58685. #include <fcntl.h>
  58686. -#include <string.h>
  58687. -#include <sys/param.h>
  58688. +#include <stdarg.h>
  58689. +#include <cancel.h>
  58690. +
  58691. +#if defined __NR_open
  58692. +# define __NR___syscall_open __NR_open
  58693. +static __always_inline _syscall3(int, __syscall_open, const char *, file,
  58694. + int, flags, __kernel_mode_t, mode)
  58695. +strong_alias_untyped(__syscall_open,__NC(open))
  58696. -#define __NR___syscall_open __NR_open
  58697. -static __inline__ _syscall3(int, __syscall_open, const char *, file,
  58698. - int, flags, __kernel_mode_t, mode)
  58699. +# define __NR___open2_nocancel __NR_open
  58700. +_syscall2(int, __NC(open2), const char *, file, int, flags)
  58701. +#else
  58702. +int __open2_nocancel(const char *, int) __nonnull ((1)) attribute_hidden;
  58703. +int __open_nocancel(const char *, int, mode_t) __nonnull ((1)) attribute_hidden;
  58704. +#endif
  58705. int open(const char *file, int oflag, ...)
  58706. {
  58707. @@ -29,11 +36,27 @@
  58708. va_end(arg);
  58709. }
  58710. - return __syscall_open(file, oflag, mode);
  58711. + if (SINGLE_THREAD_P)
  58712. +#if defined(__NR_open)
  58713. + return __NC(open)(file, oflag, mode);
  58714. +#elif defined(__NR_openat)
  58715. + return openat(AT_FDCWD, file, oflag, mode);
  58716. +#endif
  58717. +
  58718. +#ifdef __NEW_THREADS
  58719. + int oldtype = LIBC_CANCEL_ASYNC ();
  58720. +# if defined(__NR_open)
  58721. + int result = __NC(open)(file, oflag, mode);
  58722. +# else
  58723. + int result = openat(AT_FDCWD, file, oflag, mode);
  58724. +# endif
  58725. + LIBC_CANCEL_RESET (oldtype);
  58726. + return result;
  58727. +#endif
  58728. }
  58729. -#ifndef __LINUXTHREADS_OLD__
  58730. -libc_hidden_def(open)
  58731. -#else
  58732. -libc_hidden_weak(open)
  58733. -strong_alias(open,__libc_open)
  58734. +lt_strong_alias(open)
  58735. +lt_libc_hidden(open)
  58736. +#if !defined(__NR_open)
  58737. +strong_alias_untyped(open,__open2_nocancel)
  58738. +strong_alias_untyped(open,__open_nocancel)
  58739. #endif
  58740. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/pause.c uClibc-git/libc/sysdeps/linux/common/pause.c
  58741. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/pause.c 2012-05-15 09:20:09.000000000 +0200
  58742. +++ uClibc-git/libc/sysdeps/linux/common/pause.c 2014-07-25 20:36:06.781334555 +0200
  58743. @@ -7,35 +7,35 @@
  58744. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  58745. */
  58746. -#define __UCLIBC_HIDE_DEPRECATED__
  58747. #include <sys/syscall.h>
  58748. #include <unistd.h>
  58749. +#include <cancel.h>
  58750. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  58751. -#include <sysdep-cancel.h>
  58752. -#endif
  58753. -
  58754. -#include <signal.h>
  58755. +#ifdef __NR_pause
  58756. +/* even if it is not obvious, glibc uses the pause syscall, see syscalls.list */
  58757. +# define __NR___pause_nocancel __NR_pause
  58758. +static _syscall0(int, __NC(pause))
  58759. +CANCELLABLE_SYSCALL(int, pause, (void), ())
  58760. +#else
  58761. +# define __need_NULL
  58762. +# include <stddef.h>
  58763. +# include <signal.h>
  58764. -/* Suspend the process until a signal arrives.
  58765. - This always returns -1 and sets errno to EINTR. */
  58766. -extern __typeof(pause) __libc_pause;
  58767. int
  58768. -__libc_pause (void)
  58769. +# ifdef __LINUXTHREADS_OLD__
  58770. +weak_function
  58771. +# endif
  58772. +__NC(pause)(void)
  58773. {
  58774. - sigset_t set;
  58775. -
  58776. - /*__sigemptyset (&set); - why? */
  58777. - sigprocmask (SIG_BLOCK, NULL, &set);
  58778. + sigset_t set;
  58779. - /* pause is a cancellation point, but so is sigsuspend.
  58780. - So no need for anything special here. */
  58781. + /*__sigemptyset (&set); - why? */
  58782. + sigprocmask (SIG_BLOCK, NULL, &set);
  58783. - return sigsuspend (&set);
  58784. + /* pause is a cancellation point, but so is sigsuspend.
  58785. + So no need for anything special here. */
  58786. + return sigsuspend(&set);
  58787. }
  58788. -weak_alias (__libc_pause, pause)
  58789. -
  58790. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  58791. +CANCELLABLE_SYSCALL(int, pause, (void), ())
  58792. LIBC_CANCEL_HANDLED (); /* sigsuspend handles our cancellation. */
  58793. #endif
  58794. -
  58795. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/pipe.c uClibc-git/libc/sysdeps/linux/common/pipe.c
  58796. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/pipe.c 2012-05-15 09:20:09.000000000 +0200
  58797. +++ uClibc-git/libc/sysdeps/linux/common/pipe.c 2014-07-25 20:36:06.781334555 +0200
  58798. @@ -11,5 +11,13 @@
  58799. #include <unistd.h>
  58800. +#if defined __NR_pipe2 && !defined __NR_pipe
  58801. +int pipe(int filedes[2])
  58802. +{
  58803. + return pipe2(filedes, 0);
  58804. +}
  58805. +/* If both are defined then use the pipe syscall */
  58806. +#else
  58807. _syscall1(int, pipe, int *, filedes)
  58808. +#endif
  58809. libc_hidden_def(pipe)
  58810. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/pivot_root.c uClibc-git/libc/sysdeps/linux/common/pivot_root.c
  58811. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/pivot_root.c 2012-05-15 09:20:09.000000000 +0200
  58812. +++ uClibc-git/libc/sysdeps/linux/common/pivot_root.c 2014-07-25 20:36:06.781334555 +0200
  58813. @@ -9,7 +9,7 @@
  58814. #include <sys/syscall.h>
  58815. -int pivot_root(const char *new_root, const char *put_old);
  58816. #ifdef __NR_pivot_root
  58817. +int pivot_root(const char *new_root, const char *put_old);
  58818. _syscall2(int, pivot_root, const char *, new_root, const char *, put_old)
  58819. #endif
  58820. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/poll.c uClibc-git/libc/sysdeps/linux/common/poll.c
  58821. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/poll.c 2012-05-15 09:20:09.000000000 +0200
  58822. +++ uClibc-git/libc/sysdeps/linux/common/poll.c 2014-07-25 20:36:06.781334555 +0200
  58823. @@ -13,40 +13,20 @@
  58824. Lesser General Public License for more details.
  58825. You should have received a copy of the GNU Lesser General Public
  58826. - License along with the GNU C Library; if not, write to the Free
  58827. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  58828. - 02111-1307 USA. */
  58829. + License along with the GNU C Library; if not, see
  58830. + <http://www.gnu.org/licenses/>. */
  58831. #include <sys/syscall.h>
  58832. #include <sys/poll.h>
  58833. #include <bits/kernel-features.h>
  58834. -
  58835. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  58836. -#include <sysdep-cancel.h>
  58837. -#else
  58838. -#define SINGLE_THREAD_P 1
  58839. -#endif
  58840. -
  58841. -libc_hidden_proto(poll)
  58842. +#include <cancel.h>
  58843. #if defined __ASSUME_POLL_SYSCALL && defined __NR_poll
  58844. -#define __NR___syscall_poll __NR_poll
  58845. -static inline _syscall3(int, __syscall_poll, struct pollfd *, fds,
  58846. - unsigned long int, nfds, int, timeout);
  58847. -
  58848. -int poll(struct pollfd *fds, nfds_t nfds, int timeout)
  58849. -{
  58850. - if (SINGLE_THREAD_P)
  58851. - return __syscall_poll(fds, nfds, timeout);
  58852. +#define __NR___poll_nocancel __NR_poll
  58853. +static _syscall3(int, __NC(poll), struct pollfd *, fds,
  58854. + unsigned long int, nfds, int, timeout)
  58855. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  58856. - int oldtype = LIBC_CANCEL_ASYNC ();
  58857. - int result = __syscall_poll(fds, nfds, timeout);
  58858. - LIBC_CANCEL_RESET (oldtype);
  58859. - return result;
  58860. -#endif
  58861. -}
  58862. #else /* !__NR_poll */
  58863. #include <alloca.h>
  58864. @@ -56,9 +36,7 @@
  58865. #include <sys/time.h>
  58866. #include <sys/param.h>
  58867. #include <unistd.h>
  58868. -
  58869. -libc_hidden_proto(getdtablesize)
  58870. -libc_hidden_proto(select)
  58871. +#include <sys/select.h>
  58872. /* uClinux 2.0 doesn't have poll, emulate it using select */
  58873. @@ -68,7 +46,7 @@
  58874. Returns the number of file descriptors with events, zero if timed out,
  58875. or -1 for errors. */
  58876. -int poll(struct pollfd *fds, nfds_t nfds, int timeout)
  58877. +int __NC(poll)(struct pollfd *fds, nfds_t nfds, int timeout)
  58878. {
  58879. static int max_fd_size;
  58880. struct timeval tv;
  58881. @@ -139,7 +117,7 @@
  58882. while (1)
  58883. {
  58884. - ready = select (maxfd + 1, rset, wset, xset,
  58885. + ready = __NC(select) (maxfd + 1, rset, wset, xset,
  58886. timeout == -1 ? NULL : &tv);
  58887. /* It might be that one or more of the file descriptors is invalid.
  58888. @@ -182,7 +160,7 @@
  58889. if (f->events & POLLPRI)
  58890. FD_SET (f->fd, sngl_xset);
  58891. - n = select (f->fd + 1, sngl_rset, sngl_wset, sngl_xset,
  58892. + n = __NC(select) (f->fd + 1, sngl_rset, sngl_wset, sngl_xset,
  58893. &sngl_tv);
  58894. if (n != -1)
  58895. {
  58896. @@ -227,4 +205,6 @@
  58897. }
  58898. #endif
  58899. -libc_hidden_def(poll)
  58900. +CANCELLABLE_SYSCALL(int, poll, (struct pollfd *fds, nfds_t nfds, int timeout),
  58901. + (fds, nfds, timeout))
  58902. +lt_libc_hidden(poll)
  58903. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/posix_fadvise64.c uClibc-git/libc/sysdeps/linux/common/posix_fadvise64.c
  58904. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/posix_fadvise64.c 2012-05-15 09:20:09.000000000 +0200
  58905. +++ uClibc-git/libc/sysdeps/linux/common/posix_fadvise64.c 2014-07-25 20:36:06.781334555 +0200
  58906. @@ -8,63 +8,32 @@
  58907. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  58908. */
  58909. -#include <features.h>
  58910. -#include <unistd.h>
  58911. -#include <errno.h>
  58912. -#include <endian.h>
  58913. -#include <stdint.h>
  58914. -#include <sys/types.h>
  58915. +#include <_lfs_64.h>
  58916. #include <sys/syscall.h>
  58917. -#include <fcntl.h>
  58918. +#include <bits/wordsize.h>
  58919. -#ifdef __UCLIBC_HAS_LFS__
  58920. -#ifdef __NR_fadvise64_64
  58921. -
  58922. -/* 64 bit implementation is cake ... or more like pie ... */
  58923. -#if __WORDSIZE == 64
  58924. -
  58925. -#define __NR_posix_fadvise64 __NR_fadvise64_64
  58926. -
  58927. -int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
  58928. -{
  58929. - if (len != (off_t) len)
  58930. - return EOVERFLOW;
  58931. - INTERNAL_SYSCALL_DECL (err);
  58932. - int ret = INTERNAL_SYSCALL (posix_fadvise64, err, 5, fd,
  58933. - __LONG_LONG_PAIR ((long) (offset >> 32),
  58934. - (long) offset),
  58935. - (off_t) len, advice);
  58936. - if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
  58937. - return 0;
  58938. - return INTERNAL_SYSCALL_ERRNO (ret, err);
  58939. -}
  58940. +#ifdef __NR_arm_fadvise64_64
  58941. +# define __NR_fadvise64_64 __NR_arm_fadvise64_64
  58942. +#endif
  58943. -/* 32 bit implementation is kind of a pita */
  58944. -#elif __WORDSIZE == 32
  58945. +#if defined __NR_fadvise64_64 && __WORDSIZE == 32
  58946. +# include <fcntl.h>
  58947. +# include <endian.h>
  58948. -int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
  58949. +int posix_fadvise64(int fd, off64_t offset, off64_t len, int advice)
  58950. {
  58951. INTERNAL_SYSCALL_DECL (err);
  58952. + /* ARM has always been funky. */
  58953. +# if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__) || defined(__arm__)
  58954. + int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, advice,
  58955. + OFF64_HI_LO (offset), OFF64_HI_LO (len));
  58956. +# else
  58957. int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd,
  58958. - __LONG_LONG_PAIR(offset >> 32, offset & 0xffffffff),
  58959. - __LONG_LONG_PAIR(len >> 32, len & 0xffffffff),
  58960. - advice);
  58961. - if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
  58962. - return 0;
  58963. - return INTERNAL_SYSCALL_ERRNO (ret, err);
  58964. + OFF64_HI_LO (offset), OFF64_HI_LO (len),
  58965. + advice);
  58966. +# endif
  58967. + if (INTERNAL_SYSCALL_ERROR_P (ret, err))
  58968. + return INTERNAL_SYSCALL_ERRNO (ret, err);
  58969. + return 0;
  58970. }
  58971. -
  58972. -#else
  58973. -#error your machine is neither 32 bit or 64 bit ... it must be magical
  58974. #endif
  58975. -
  58976. -#elif !defined __NR_fadvise64 && defined __UCLIBC_HAS_STUBS__
  58977. -/* This is declared as a strong alias in posix_fadvise.c if __NR_fadvise64
  58978. - * is defined.
  58979. - */
  58980. -int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
  58981. -{
  58982. - return ENOSYS;
  58983. -}
  58984. -#endif /* __NR_fadvise64_64 */
  58985. -#endif /* __UCLIBC_HAS_LFS__ */
  58986. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/posix_fadvise.c uClibc-git/libc/sysdeps/linux/common/posix_fadvise.c
  58987. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/posix_fadvise.c 2012-05-15 09:20:09.000000000 +0200
  58988. +++ uClibc-git/libc/sysdeps/linux/common/posix_fadvise.c 2014-07-25 20:36:06.781334555 +0200
  58989. @@ -9,27 +9,46 @@
  58990. */
  58991. #include <sys/syscall.h>
  58992. -#include <fcntl.h>
  58993. -#ifdef __NR_fadvise64
  58994. -#define __NR_posix_fadvise __NR_fadvise64
  58995. +#ifdef __NR_arm_fadvise64_64
  58996. +/* We handle the 64bit alignment issue which is why the arm guys renamed their
  58997. + * syscall in the first place. So rename it back.
  58998. + */
  58999. +# define __NR_fadvise64_64 __NR_arm_fadvise64_64
  59000. +#endif
  59001. +
  59002. +#if defined(__NR_fadvise64) || defined(__NR_fadvise64_64)
  59003. +# include <fcntl.h>
  59004. +# include <endian.h>
  59005. +# include <bits/wordsize.h>
  59006. +
  59007. +# ifdef __NR_fadvise64_64
  59008. +int posix_fadvise64(int fd, off64_t offset, off64_t len, int advice);
  59009. +# endif
  59010. +
  59011. int posix_fadvise(int fd, off_t offset, off_t len, int advice)
  59012. {
  59013. +# ifdef __NR_fadvise64_64
  59014. + return posix_fadvise64(fd, offset, len, advice);
  59015. +# else
  59016. + int ret;
  59017. INTERNAL_SYSCALL_DECL(err);
  59018. - int ret = (int) (INTERNAL_SYSCALL(posix_fadvise, err, 5, fd,
  59019. - __LONG_LONG_PAIR (offset >> 31, offset), len, advice));
  59020. - if (INTERNAL_SYSCALL_ERROR_P (ret, err))
  59021. - return INTERNAL_SYSCALL_ERRNO (ret, err);
  59022. - return 0;
  59023. +# if __WORDSIZE == 64
  59024. + ret = INTERNAL_SYSCALL(fadvise64, err, 4, fd, offset, len, advice);
  59025. +# else
  59026. +# if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
  59027. + ret = INTERNAL_SYSCALL(fadvise64, err, 6, fd, /*unused*/0,
  59028. +# else
  59029. + ret = INTERNAL_SYSCALL(fadvise64, err, 5, fd,
  59030. +# endif
  59031. + OFF_HI_LO (offset), len, advice);
  59032. +# endif
  59033. + if (INTERNAL_SYSCALL_ERROR_P (ret, err))
  59034. + return INTERNAL_SYSCALL_ERRNO (ret, err);
  59035. + return 0;
  59036. +# endif
  59037. }
  59038. -
  59039. -#if defined __UCLIBC_HAS_LFS__ && !defined __NR_fadvise64_64
  59040. +# if defined __UCLIBC_HAS_LFS__ && (!defined __NR_fadvise64_64 || __WORDSIZE == 64)
  59041. strong_alias(posix_fadvise,posix_fadvise64)
  59042. -#endif
  59043. -
  59044. -#elif defined __UCLIBC_HAS_STUBS__
  59045. -int posix_fadvise(int fd attribute_unused, off_t offset attribute_unused, off_t len attribute_unused, int advice attribute_unused)
  59046. -{
  59047. - return ENOSYS;
  59048. -}
  59049. +# endif
  59050. #endif
  59051. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/posix_fallocate64.c uClibc-git/libc/sysdeps/linux/common/posix_fallocate64.c
  59052. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/posix_fallocate64.c 1970-01-01 01:00:00.000000000 +0100
  59053. +++ uClibc-git/libc/sysdeps/linux/common/posix_fallocate64.c 2014-07-25 20:36:06.781334555 +0200
  59054. @@ -0,0 +1,34 @@
  59055. +/* vi: set sw=4 ts=4: */
  59056. +/*
  59057. + * posix_fallocate() for uClibc
  59058. + * http://www.opengroup.org/onlinepubs/9699919799/functions/posix_fallocate.html
  59059. + *
  59060. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  59061. + *
  59062. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  59063. + */
  59064. +
  59065. +#include <sys/syscall.h>
  59066. +#include <fcntl.h>
  59067. +#include <bits/kernel-features.h>
  59068. +#include <stdint.h>
  59069. +
  59070. +#if defined __NR_fallocate
  59071. +
  59072. +# if __WORDSIZE == 64
  59073. +/* Can use normal posix_fallocate() */
  59074. +# elif __WORDSIZE == 32
  59075. +int posix_fallocate64(int fd, __off64_t offset, __off64_t len)
  59076. +{
  59077. + int ret;
  59078. + INTERNAL_SYSCALL_DECL(err);
  59079. + ret = (int) (INTERNAL_SYSCALL(fallocate, err, 6, fd, 0,
  59080. + OFF64_HI_LO (offset), OFF64_HI_LO (len)));
  59081. + if (unlikely(INTERNAL_SYSCALL_ERROR_P (ret, err)))
  59082. + return INTERNAL_SYSCALL_ERRNO (ret, err);
  59083. + return 0;
  59084. +}
  59085. +# else
  59086. +# error your machine is neither 32 bit or 64 bit ... it must be magical
  59087. +# endif
  59088. +#endif
  59089. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/posix_fallocate.c uClibc-git/libc/sysdeps/linux/common/posix_fallocate.c
  59090. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/posix_fallocate.c 1970-01-01 01:00:00.000000000 +0100
  59091. +++ uClibc-git/libc/sysdeps/linux/common/posix_fallocate.c 2014-07-25 20:36:06.781334555 +0200
  59092. @@ -0,0 +1,43 @@
  59093. +/* vi: set sw=4 ts=4: */
  59094. +/*
  59095. + * posix_fallocate() for uClibc
  59096. + * http://www.opengroup.org/onlinepubs/9699919799/functions/posix_fallocate.html
  59097. + *
  59098. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  59099. + *
  59100. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  59101. + */
  59102. +
  59103. +#include <sys/syscall.h>
  59104. +#include <fcntl.h>
  59105. +#include <bits/kernel-features.h>
  59106. +#include <stdint.h>
  59107. +
  59108. +#if defined __NR_fallocate
  59109. +int posix_fallocate(int fd, __off_t offset, __off_t len)
  59110. +{
  59111. + int ret;
  59112. +
  59113. +# if __WORDSIZE == 32
  59114. + uint32_t off_low = offset;
  59115. + uint32_t len_low = len;
  59116. + /* may assert that these >>31 are 0 */
  59117. + uint32_t zero = 0;
  59118. + INTERNAL_SYSCALL_DECL(err);
  59119. + ret = (int) (INTERNAL_SYSCALL(fallocate, err, 6, fd, 0,
  59120. + __LONG_LONG_PAIR (zero, off_low),
  59121. + __LONG_LONG_PAIR (zero, len_low)));
  59122. +# elif __WORDSIZE == 64
  59123. + INTERNAL_SYSCALL_DECL(err);
  59124. + ret = (int) (INTERNAL_SYSCALL(fallocate, err, 4, fd, 0, offset, len));
  59125. +# else
  59126. +# error your machine is neither 32 bit or 64 bit ... it must be magical
  59127. +#endif
  59128. + if (unlikely(INTERNAL_SYSCALL_ERROR_P (ret, err)))
  59129. + return INTERNAL_SYSCALL_ERRNO (ret, err);
  59130. + return 0;
  59131. +}
  59132. +# if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
  59133. +strong_alias(posix_fallocate,posix_fallocate64)
  59134. +# endif
  59135. +#endif
  59136. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/posix_madvise.c uClibc-git/libc/sysdeps/linux/common/posix_madvise.c
  59137. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/posix_madvise.c 1970-01-01 01:00:00.000000000 +0100
  59138. +++ uClibc-git/libc/sysdeps/linux/common/posix_madvise.c 2014-07-25 20:36:06.781334555 +0200
  59139. @@ -0,0 +1,25 @@
  59140. +/* vi: set sw=4 ts=4: */
  59141. +/* Licensed under the LGPL v2.1, see the file LICENSE in this tarball. */
  59142. +
  59143. +#include <sys/mman.h>
  59144. +#include <sys/syscall.h>
  59145. +
  59146. +#if defined __NR_madvise && defined __USE_XOPEN2K && defined __UCLIBC_HAS_ADVANCED_REALTIME__
  59147. +int posix_madvise(void *addr, size_t len, int advice)
  59148. +{
  59149. + int result;
  59150. + /* We have one problem: the kernel's MADV_DONTNEED does not
  59151. + * correspond to POSIX's POSIX_MADV_DONTNEED. The former simply
  59152. + * discards changes made to the memory without writing it back to
  59153. + * disk, if this would be necessary. The POSIX behaviour does not
  59154. + * allow this. There is no functionality mapping for the POSIX
  59155. + * behaviour so far so we ignore that advice for now. */
  59156. + if (advice == POSIX_MADV_DONTNEED)
  59157. + return 0;
  59158. +
  59159. + /* this part might use madvise function */
  59160. + INTERNAL_SYSCALL_DECL (err);
  59161. + result = INTERNAL_SYSCALL (madvise, err, 3, addr, len, advice);
  59162. + return INTERNAL_SYSCALL_ERRNO (result, err);
  59163. +}
  59164. +#endif
  59165. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/ppoll.c uClibc-git/libc/sysdeps/linux/common/ppoll.c
  59166. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/ppoll.c 2012-05-15 09:20:09.000000000 +0200
  59167. +++ uClibc-git/libc/sysdeps/linux/common/ppoll.c 2014-07-25 20:36:06.781334555 +0200
  59168. @@ -13,26 +13,22 @@
  59169. Lesser General Public License for more details.
  59170. You should have received a copy of the GNU Lesser General Public
  59171. - License along with the GNU C Library; if not, write to the Free
  59172. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  59173. - 02111-1307 USA. */
  59174. + License along with the GNU C Library; if not, see
  59175. + <http://www.gnu.org/licenses/>. */
  59176. -#include <signal.h>
  59177. #include <sys/syscall.h>
  59178. -#include <sys/poll.h>
  59179. +
  59180. +#if defined __NR_ppoll && defined __UCLIBC_LINUX_SPECIFIC__ && defined __USE_GNU
  59181. +
  59182. #define __need_NULL
  59183. #include <stddef.h>
  59184. +#include <signal.h>
  59185. +#include <sys/poll.h>
  59186. +#include <cancel.h>
  59187. -#if defined __NR_ppoll && defined __UCLIBC_LINUX_SPECIFIC__
  59188. -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
  59189. -# include <sysdep-cancel.h>
  59190. -# else
  59191. -# define SINGLE_THREAD_P 1
  59192. -# endif
  59193. -
  59194. -int
  59195. -ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout,
  59196. - const sigset_t *sigmask)
  59197. +static int
  59198. +__NC(ppoll)(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout,
  59199. + const sigset_t *sigmask)
  59200. {
  59201. /* The Linux kernel can in some situations update the timeout value.
  59202. We do not want that so use a local variable. */
  59203. @@ -41,15 +37,11 @@
  59204. tval = *timeout;
  59205. timeout = &tval;
  59206. }
  59207. - if (SINGLE_THREAD_P)
  59208. - return INLINE_SYSCALL(ppoll, 5, fds, nfds, timeout, sigmask, _NSIG / 8);
  59209. -
  59210. -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
  59211. - int oldtype = LIBC_CANCEL_ASYNC ();
  59212. - int result = INLINE_SYSCALL(ppoll, 5, fds, nfds, timeout, sigmask, _NSIG / 8);
  59213. - LIBC_CANCEL_RESET (oldtype);
  59214. - return result;
  59215. -# endif
  59216. + return INLINE_SYSCALL(ppoll, 5, fds, nfds, timeout, sigmask, __SYSCALL_SIGSET_T_SIZE);
  59217. }
  59218. -libc_hidden_def(ppoll)
  59219. +
  59220. +CANCELLABLE_SYSCALL(int, ppoll, (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout,
  59221. + const sigset_t *sigmask),
  59222. + (fds, nfds, timeout, sigmask))
  59223. +
  59224. #endif
  59225. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/prctl.c uClibc-git/libc/sysdeps/linux/common/prctl.c
  59226. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/prctl.c 2012-05-15 09:20:09.000000000 +0200
  59227. +++ uClibc-git/libc/sysdeps/linux/common/prctl.c 2014-07-25 20:36:06.781334555 +0200
  59228. @@ -8,10 +8,10 @@
  59229. */
  59230. #include <sys/syscall.h>
  59231. -#include <stdarg.h>
  59232. /* psm: including sys/prctl.h would depend on kernel headers */
  59233. #ifdef __NR_prctl
  59234. -extern int prctl (int, long, long, long, long);
  59235. -_syscall5(int, prctl, int, option, long, _a2, long, _a3, long, _a4, long, _a5)
  59236. +int prctl (int, long, long, long, long);
  59237. +_syscall5(int, prctl, int, option, long, _prctl_a2, long, _prctl_a3,
  59238. + long, _prctl_a4, long, _prctl_a5)
  59239. #endif
  59240. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/pread_write.c uClibc-git/libc/sysdeps/linux/common/pread_write.c
  59241. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/pread_write.c 2012-05-15 09:20:09.000000000 +0200
  59242. +++ uClibc-git/libc/sysdeps/linux/common/pread_write.c 2014-07-25 20:36:06.781334555 +0200
  59243. @@ -15,173 +15,101 @@
  59244. #include <sys/syscall.h>
  59245. #include <unistd.h>
  59246. -#include <stdint.h>
  59247. #include <endian.h>
  59248. +#include <bits/wordsize.h>
  59249. +#include <cancel.h>
  59250. -extern __typeof(pread) __libc_pread;
  59251. -extern __typeof(pwrite) __libc_pwrite;
  59252. -#ifdef __UCLIBC_HAS_LFS__
  59253. -extern __typeof(pread64) __libc_pread64;
  59254. -extern __typeof(pwrite64) __libc_pwrite64;
  59255. +#ifdef __NR_pread64
  59256. +# undef __NR_pread
  59257. +# define __NR_pread __NR_pread64
  59258. +#endif
  59259. +#ifdef __NR_pwrite64
  59260. +# undef __NR_pwrite
  59261. +# define __NR_pwrite __NR_pwrite64
  59262. #endif
  59263. -#include <bits/kernel_types.h>
  59264. -
  59265. -#ifdef __NR_pread
  59266. -
  59267. -# define __NR___syscall_pread __NR_pread
  59268. -static __inline__ _syscall5(ssize_t, __syscall_pread, int, fd, void *, buf,
  59269. - size_t, count, off_t, offset_hi, off_t, offset_lo)
  59270. -
  59271. -ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
  59272. -{
  59273. - return __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset));
  59274. -}
  59275. -weak_alias(__libc_pread,pread)
  59276. -
  59277. -# ifdef __UCLIBC_HAS_LFS__
  59278. -ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
  59279. -{
  59280. - uint32_t low = offset & 0xffffffff;
  59281. - uint32_t high = offset >> 32;
  59282. - return __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(high, low));
  59283. -}
  59284. -weak_alias(__libc_pread64,pread64)
  59285. -# endif /* __UCLIBC_HAS_LFS__ */
  59286. -
  59287. -#endif /* __NR_pread */
  59288. -
  59289. -#ifdef __NR_pwrite
  59290. -
  59291. -# define __NR___syscall_pwrite __NR_pwrite
  59292. -static __inline__ _syscall5(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
  59293. - size_t, count, off_t, offset_hi, off_t, offset_lo)
  59294. -
  59295. -ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
  59296. -{
  59297. - return __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset));
  59298. -}
  59299. -weak_alias(__libc_pwrite,pwrite)
  59300. -
  59301. -# ifdef __UCLIBC_HAS_LFS__
  59302. -ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
  59303. -{
  59304. - uint32_t low = offset & 0xffffffff;
  59305. - uint32_t high = offset >> 32;
  59306. - return __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(high, low));
  59307. -}
  59308. -weak_alias(__libc_pwrite64,pwrite64)
  59309. -# endif /* __UCLIBC_HAS_LFS__ */
  59310. -#endif /* __NR_pwrite */
  59311. -
  59312. -#if ! defined __NR_pread || ! defined __NR_pwrite
  59313. -
  59314. -static ssize_t __fake_pread_write(int fd, void *buf,
  59315. - size_t count, off_t offset, int do_pwrite)
  59316. -{
  59317. - int save_errno;
  59318. - ssize_t result;
  59319. - off_t old_offset;
  59320. -
  59321. - /* Since we must not change the file pointer preserve the
  59322. - * value so that we can restore it later. */
  59323. - if ((old_offset=lseek(fd, 0, SEEK_CUR)) == (off_t) -1)
  59324. - return -1;
  59325. -
  59326. - /* Set to wanted position. */
  59327. - if (lseek(fd, offset, SEEK_SET) == (off_t) -1)
  59328. - return -1;
  59329. -
  59330. - if (do_pwrite == 1) {
  59331. - /* Write the data. */
  59332. - result = write(fd, buf, count);
  59333. - } else {
  59334. - /* Read the data. */
  59335. - result = read(fd, buf, count);
  59336. - }
  59337. -
  59338. - /* Now we have to restore the position. If this fails we
  59339. - * have to return this as an error. */
  59340. - save_errno = errno;
  59341. - if (lseek(fd, old_offset, SEEK_SET) == (off_t) -1)
  59342. - {
  59343. - if (result == -1)
  59344. - __set_errno(save_errno);
  59345. - return -1;
  59346. - }
  59347. - __set_errno(save_errno);
  59348. - return(result);
  59349. -}
  59350. -
  59351. -# ifdef __UCLIBC_HAS_LFS__
  59352. +#ifndef MY_PREAD
  59353. +# ifdef __NR_pread
  59354. +# define __NR___syscall_pread __NR_pread
  59355. +# if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
  59356. +static _syscall6(ssize_t, __syscall_pread, int, fd, void *, buf,
  59357. + size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
  59358. +# define MY_PREAD(fd, buf, count, offset) __syscall_pread(fd, buf, count, 0, OFF_HI_LO(offset))
  59359. +# define MY_PREAD64(fd, buf, count, offset) __syscall_pread(fd, buf, count, 0, OFF64_HI_LO(offset))
  59360. +# elif __WORDSIZE == 32
  59361. +static _syscall5(ssize_t, __syscall_pread, int, fd, void *, buf,
  59362. + size_t, count, off_t, offset_hi, off_t, offset_lo)
  59363. +# define MY_PREAD(fd, buf, count, offset) __syscall_pread(fd, buf, count, OFF_HI_LO(offset))
  59364. +# define MY_PREAD64(fd, buf, count, offset) __syscall_pread(fd, buf, count, OFF64_HI_LO(offset))
  59365. +# else
  59366. +static _syscall4(ssize_t, __syscall_pread, int, fd, void *, buf,
  59367. + size_t, count, off_t, offset)
  59368. +# define MY_PREAD(fd, buf, count, offset) __syscall_pread(fd, buf, count, offset)
  59369. +# define MY_PREAD64(fd, buf, count, offset) __syscall_pread(fd, buf, count, offset)
  59370. +# endif
  59371. +# endif
  59372. +#endif
  59373. -static ssize_t __fake_pread_write64(int fd, void *buf,
  59374. - size_t count, off64_t offset, int do_pwrite)
  59375. -{
  59376. - int save_errno;
  59377. - ssize_t result;
  59378. - off64_t old_offset;
  59379. -
  59380. - /* Since we must not change the file pointer preserve the
  59381. - * value so that we can restore it later. */
  59382. - if ((old_offset=lseek64(fd, 0, SEEK_CUR)) == (off64_t) -1)
  59383. - return -1;
  59384. -
  59385. - /* Set to wanted position. */
  59386. - if (lseek64(fd, offset, SEEK_SET) == (off64_t) -1)
  59387. - return -1;
  59388. -
  59389. - if (do_pwrite == 1) {
  59390. - /* Write the data. */
  59391. - result = write(fd, buf, count);
  59392. - } else {
  59393. - /* Read the data. */
  59394. - result = read(fd, buf, count);
  59395. - }
  59396. -
  59397. - /* Now we have to restore the position. */
  59398. - save_errno = errno;
  59399. - if (lseek64(fd, old_offset, SEEK_SET) == (off64_t) -1) {
  59400. - if (result == -1)
  59401. - __set_errno (save_errno);
  59402. - return -1;
  59403. - }
  59404. - __set_errno (save_errno);
  59405. - return result;
  59406. -}
  59407. -# endif /* __UCLIBC_HAS_LFS__ */
  59408. -#endif /* ! defined __NR_pread || ! defined __NR_pwrite */
  59409. +#ifndef MY_PWRITE
  59410. +# ifdef __NR_pwrite
  59411. +# define __NR___syscall_pwrite __NR_pwrite
  59412. +# if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
  59413. +static _syscall6(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
  59414. + size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
  59415. +# define MY_PWRITE(fd, buf, count, offset) __syscall_pwrite(fd, buf, count, 0, OFF_HI_LO(offset))
  59416. +# define MY_PWRITE64(fd, buf, count, offset) __syscall_pwrite(fd, buf, count, 0, OFF64_HI_LO(offset))
  59417. +# elif __WORDSIZE == 32
  59418. +static _syscall5(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
  59419. + size_t, count, off_t, offset_hi, off_t, offset_lo)
  59420. +# define MY_PWRITE(fd, buf, count, offset) __syscall_pwrite(fd, buf, count, OFF_HI_LO(offset))
  59421. +# define MY_PWRITE64(fd, buf, count, offset) __syscall_pwrite(fd, buf, count, OFF64_HI_LO(offset))
  59422. +# else
  59423. +static _syscall4(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
  59424. + size_t, count, off_t, offset)
  59425. +# define MY_PWRITE(fd, buf, count, offset) __syscall_pwrite(fd, buf, count, offset)
  59426. +# define MY_PWRITE64(fd, buf, count, offset) __syscall_pwrite(fd, buf, count, offset)
  59427. +# endif
  59428. +# endif
  59429. +#endif
  59430. -#ifndef __NR_pread
  59431. -ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
  59432. +static ssize_t __NC(pread)(int fd, void *buf, size_t count, off_t offset)
  59433. {
  59434. - return __fake_pread_write(fd, buf, count, offset, 0);
  59435. + return MY_PREAD(fd, buf, count, offset);
  59436. }
  59437. -weak_alias(__libc_pread,pread)
  59438. +CANCELLABLE_SYSCALL(ssize_t, pread, (int fd, void *buf, size_t count, off_t offset),
  59439. + (fd, buf, count, offset))
  59440. -# ifdef __UCLIBC_HAS_LFS__
  59441. -ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
  59442. +static ssize_t __NC(pwrite)(int fd, const void *buf, size_t count, off_t offset)
  59443. {
  59444. - return __fake_pread_write64(fd, buf, count, offset, 0);
  59445. + return MY_PWRITE(fd, buf, count, offset);
  59446. }
  59447. -weak_alias(__libc_pread64,pread64)
  59448. -# endif /* __UCLIBC_HAS_LFS__ */
  59449. -#endif /* ! __NR_pread */
  59450. +CANCELLABLE_SYSCALL(ssize_t, pwrite, (int fd, const void *buf, size_t count, off_t offset),
  59451. + (fd, buf, count, offset))
  59452. -#ifndef __NR_pwrite
  59453. -ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
  59454. +#ifdef __UCLIBC_HAS_LFS__
  59455. +# if __WORDSIZE == 32
  59456. +static ssize_t __NC(pread64)(int fd, void *buf, size_t count, off64_t offset)
  59457. {
  59458. - /* we won't actually be modifying the buffer,
  59459. - *just cast it to get rid of warnings */
  59460. - return __fake_pread_write(fd, (void*)buf, count, offset, 1);
  59461. + return MY_PREAD64(fd, buf, count, offset);
  59462. }
  59463. -weak_alias(__libc_pwrite,pwrite)
  59464. +CANCELLABLE_SYSCALL(ssize_t, pread64, (int fd, void *buf, size_t count, off64_t offset),
  59465. + (fd, buf, count, offset))
  59466. -# ifdef __UCLIBC_HAS_LFS__
  59467. -ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
  59468. -{
  59469. - return __fake_pread_write64(fd, (void*)buf, count, offset, 1);
  59470. -}
  59471. -weak_alias(__libc_pwrite64,pwrite64)
  59472. -# endif /* __UCLIBC_HAS_LFS__ */
  59473. -#endif /* ! __NR_pwrite */
  59474. +static ssize_t __NC(pwrite64)(int fd, const void *buf, size_t count, off64_t offset)
  59475. +{
  59476. + return MY_PWRITE64(fd, buf, count, offset);
  59477. +}
  59478. +CANCELLABLE_SYSCALL(ssize_t, pwrite64, (int fd, const void *buf, size_t count, off64_t offset),
  59479. + (fd, buf, count, offset))
  59480. +# else
  59481. +# ifdef __LINUXTHREADS_OLD__
  59482. +weak_alias(pread,pread64)
  59483. +weak_alias(pwrite,pwrite64)
  59484. +lt_strong_alias(pread64)
  59485. +lt_strong_alias(pwrite64)
  59486. +# else
  59487. +strong_alias_untyped(pread,pread64)
  59488. +strong_alias_untyped(pwrite,pwrite64)
  59489. +# endif
  59490. +# endif
  59491. +#endif
  59492. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/pselect.c uClibc-git/libc/sysdeps/linux/common/pselect.c
  59493. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/pselect.c 2012-05-15 09:20:09.000000000 +0200
  59494. +++ uClibc-git/libc/sysdeps/linux/common/pselect.c 2014-07-25 20:36:06.781334555 +0200
  59495. @@ -13,82 +13,53 @@
  59496. Lesser General Public License for more details.
  59497. You should have received a copy of the GNU Lesser General Public
  59498. - License along with the GNU C Library; if not, write to the Free
  59499. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  59500. - 02111-1307 USA. */
  59501. + License along with the GNU C Library; if not, see
  59502. + <http://www.gnu.org/licenses/>. */
  59503. -#include <errno.h>
  59504. -#include <signal.h>
  59505. -#include <stddef.h> /* For NULL. */
  59506. -#include <sys/time.h>
  59507. -#include <sys/select.h>
  59508. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  59509. -#include <sysdep-cancel.h>
  59510. -#endif
  59511. +#include <features.h>
  59512. -libc_hidden_proto(sigprocmask)
  59513. -libc_hidden_proto(select)
  59514. +#ifdef __USE_XOPEN2K
  59515. +#include <sys/syscall.h>
  59516. +#include <sys/select.h>
  59517. +#include <sys/time.h>
  59518. +#include <signal.h>
  59519. +#include <cancel.h>
  59520. -/* Check the first NFDS descriptors each in READFDS (if not NULL) for read
  59521. - readiness, in WRITEFDS (if not NULL) for write readiness, and in EXCEPTFDS
  59522. - (if not NULL) for exceptional conditions. If TIMEOUT is not NULL, time out
  59523. - after waiting the interval specified therein. Additionally set the sigmask
  59524. - SIGMASK for this call. Returns the number of ready descriptors, or -1 for
  59525. - errors. */
  59526. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  59527. -static int
  59528. -__pselect (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
  59529. -#else
  59530. -int
  59531. -pselect (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
  59532. -#endif
  59533. - const struct timespec *timeout, const sigset_t *sigmask)
  59534. +static int __NC(pselect)(int nfds, fd_set *readfds, fd_set *writefds,
  59535. + fd_set *exceptfds, const struct timespec *timeout,
  59536. + const sigset_t *sigmask)
  59537. {
  59538. - struct timeval tval;
  59539. - int retval;
  59540. - sigset_t savemask;
  59541. -
  59542. - /* Change nanosecond number to microseconds. This might mean losing
  59543. - precision and therefore the `pselect` should be available. But
  59544. - for now it is hardly found. */
  59545. - if (timeout != NULL)
  59546. - TIMESPEC_TO_TIMEVAL (&tval, timeout);
  59547. -
  59548. - /* The setting and restoring of the signal mask and the select call
  59549. - should be an atomic operation. This can't be done without kernel
  59550. - help. */
  59551. - if (sigmask != NULL)
  59552. - sigprocmask (SIG_SETMASK, sigmask, &savemask);
  59553. -
  59554. - /* Note the pselect() is a cancellation point. But since we call
  59555. - select() which itself is a cancellation point we do not have
  59556. - to do anything here. */
  59557. - retval = select (nfds, readfds, writefds, exceptfds,
  59558. - timeout != NULL ? &tval : NULL);
  59559. + struct timeval tval;
  59560. + int retval;
  59561. + sigset_t savemask;
  59562. +
  59563. + /* Change nanosecond number to microseconds. This might mean losing
  59564. + precision and therefore the `pselect` should be available. But
  59565. + for now it is hardly found. */
  59566. + if (timeout != NULL)
  59567. + TIMESPEC_TO_TIMEVAL (&tval, timeout);
  59568. +
  59569. + /* The setting and restoring of the signal mask and the select call
  59570. + should be an atomic operation. This can't be done without kernel
  59571. + help. */
  59572. + if (sigmask != NULL)
  59573. + sigprocmask (SIG_SETMASK, sigmask, &savemask);
  59574. +
  59575. + /* The comment below does not apply on uClibc, since we use __select_nocancel */
  59576. + /* Note the pselect() is a cancellation point. But since we call
  59577. + select() which itself is a cancellation point we do not have
  59578. + to do anything here. */
  59579. + retval = __NC(select)(nfds, readfds, writefds, exceptfds,
  59580. + timeout != NULL ? &tval : NULL);
  59581. - if (sigmask != NULL)
  59582. - sigprocmask (SIG_SETMASK, &savemask, NULL);
  59583. + if (sigmask != NULL)
  59584. + sigprocmask (SIG_SETMASK, &savemask, NULL);
  59585. - return retval;
  59586. + return retval;
  59587. }
  59588. +CANCELLABLE_SYSCALL(int, pselect, (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
  59589. + const struct timespec *timeout, const sigset_t *sigmask),
  59590. + (nfds, readfds, writefds, exceptfds, timeout, sigmask))
  59591. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  59592. -int
  59593. -pselect (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
  59594. - const struct timespec *timeout, const sigset_t *sigmask)
  59595. -{
  59596. - if (SINGLE_THREAD_P)
  59597. - return __pselect (nfds, readfds, writefds, exceptfds,
  59598. - timeout, sigmask);
  59599. -
  59600. - int oldtype = LIBC_CANCEL_ASYNC ();
  59601. -
  59602. - int result = __pselect (nfds, readfds, writefds, exceptfds,
  59603. - timeout, sigmask);
  59604. -
  59605. - LIBC_CANCEL_RESET (oldtype);
  59606. -
  59607. - return result;
  59608. -}
  59609. #endif
  59610. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/readahead.c uClibc-git/libc/sysdeps/linux/common/readahead.c
  59611. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/readahead.c 2012-05-15 09:20:09.000000000 +0200
  59612. +++ uClibc-git/libc/sysdeps/linux/common/readahead.c 2014-07-25 20:36:06.781334555 +0200
  59613. @@ -13,46 +13,33 @@
  59614. Lesser General Public License for more details.
  59615. You should have received a copy of the GNU Lesser General Public
  59616. - License along with the GNU C Library; if not, write to the Free
  59617. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  59618. - 02111-1307 USA. */
  59619. -
  59620. -#include <errno.h>
  59621. -#include <fcntl.h>
  59622. -#include <sys/types.h>
  59623. -#include <sys/syscall.h>
  59624. -#include <bits/wordsize.h>
  59625. -
  59626. -#ifdef __UCLIBC_HAS_LFS__
  59627. + License along with the GNU C Library; if not, see
  59628. + <http://www.gnu.org/licenses/>. */
  59629. -#include <_lfs_64.h>
  59630. +#include <sys/syscall.h>
  59631. -#ifdef __NR_readahead
  59632. +#if defined __NR_readahead && defined __UCLIBC_HAS_LFS__ && defined __USE_GNU
  59633. -# define __NR___readahead __NR_readahead
  59634. +# include <fcntl.h>
  59635. +# include <bits/wordsize.h>
  59636. # if __WORDSIZE == 64
  59637. -static __inline__ _syscall3(ssize_t, __readahead, int, fd,
  59638. - off_t, offset, size_t, count)
  59639. -
  59640. -ssize_t readahead(int fd, off_t offset, size_t count)
  59641. -{
  59642. - return __readahead(fd, offset, count);
  59643. -}
  59644. +_syscall3(ssize_t, readahead, int, fd, off_t, offset, size_t, count)
  59645. # else
  59646. -static __inline__ _syscall4(ssize_t, __readahead, int, fd,
  59647. - off_t, high_offset, off_t, low_offset, size_t, count)
  59648. -
  59649. ssize_t readahead(int fd, off64_t offset, size_t count)
  59650. {
  59651. - return __readahead(fd, (off_t) (offset >> 32), (off_t) (offset & 0xffffffff), count);
  59652. + return INLINE_SYSCALL(readahead,
  59653. +# if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
  59654. + 5, fd, 0,
  59655. +# else
  59656. + 4, fd,
  59657. +# endif
  59658. + OFF64_HI_LO(offset), count);
  59659. }
  59660. # endif
  59661. #endif
  59662. -
  59663. -#endif /* __UCLIBC_HAS_LFS__ */
  59664. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/read.c uClibc-git/libc/sysdeps/linux/common/read.c
  59665. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/read.c 2012-05-15 09:20:09.000000000 +0200
  59666. +++ uClibc-git/libc/sysdeps/linux/common/read.c 2014-07-25 20:36:06.781334555 +0200
  59667. @@ -9,11 +9,11 @@
  59668. #include <sys/syscall.h>
  59669. #include <unistd.h>
  59670. +#include <cancel.h>
  59671. -_syscall3(ssize_t, read, int, fd, __ptr_t, buf, size_t, count)
  59672. -#ifndef __LINUXTHREADS_OLD__
  59673. -libc_hidden_def(read)
  59674. -#else
  59675. -libc_hidden_weak(read)
  59676. -strong_alias(read,__libc_read)
  59677. -#endif
  59678. +#define __NR___read_nocancel __NR_read
  59679. +_syscall3(ssize_t, __NC(read), int, fd, void *, buf, size_t, count)
  59680. +
  59681. +CANCELLABLE_SYSCALL(ssize_t, read, (int fd, void *buf, size_t count),
  59682. + (fd, buf, count))
  59683. +lt_libc_hidden(read)
  59684. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/readlinkat.c uClibc-git/libc/sysdeps/linux/common/readlinkat.c
  59685. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/readlinkat.c 2012-05-15 09:20:09.000000000 +0200
  59686. +++ uClibc-git/libc/sysdeps/linux/common/readlinkat.c 2014-07-25 20:36:06.781334555 +0200
  59687. @@ -11,6 +11,7 @@
  59688. #ifdef __NR_readlinkat
  59689. _syscall4(ssize_t, readlinkat, int, fd, const char *, path, char *, buf, size_t, len)
  59690. +libc_hidden_def(readlinkat)
  59691. #else
  59692. /* should add emulation with readlink() and /proc/self/fd/ ... */
  59693. #endif
  59694. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/readlink.c uClibc-git/libc/sysdeps/linux/common/readlink.c
  59695. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/readlink.c 2012-05-15 09:20:09.000000000 +0200
  59696. +++ uClibc-git/libc/sysdeps/linux/common/readlink.c 2014-07-25 20:36:06.781334555 +0200
  59697. @@ -10,5 +10,13 @@
  59698. #include <sys/syscall.h>
  59699. #include <unistd.h>
  59700. +#if defined(__NR_readlinkat) && !defined(__NR_readlink)
  59701. +# include <fcntl.h>
  59702. +ssize_t readlink (const char *path, char *buf, size_t len)
  59703. +{
  59704. + return readlinkat(AT_FDCWD, path, buf, len);
  59705. +}
  59706. +#else
  59707. _syscall3(ssize_t, readlink, const char *, path, char *, buf, size_t, bufsiz)
  59708. +#endif
  59709. libc_hidden_def(readlink)
  59710. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/readv.c uClibc-git/libc/sysdeps/linux/common/readv.c
  59711. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/readv.c 2012-05-15 09:20:09.000000000 +0200
  59712. +++ uClibc-git/libc/sysdeps/linux/common/readv.c 2014-07-25 20:36:06.781334555 +0200
  59713. @@ -10,41 +10,21 @@
  59714. #include <sys/syscall.h>
  59715. #include <sys/uio.h>
  59716. -
  59717. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  59718. -#include <sysdep-cancel.h>
  59719. +#include <cancel.h>
  59720. /* We should deal with kernel which have a smaller UIO_FASTIOV as well
  59721. as a very big count. */
  59722. -static ssize_t __readv (int fd, const struct iovec *vector, int count)
  59723. +static ssize_t __NC(readv)(int fd, const struct iovec *vector, int count)
  59724. {
  59725. - ssize_t bytes_read;
  59726. -
  59727. - bytes_read = INLINE_SYSCALL (readv, 3, fd, vector, count);
  59728. -
  59729. - if (bytes_read >= 0 || errno != EINVAL || count <= UIO_FASTIOV)
  59730. - return bytes_read;
  59731. -
  59732. - /* glibc tries again, but we do not. */
  59733. - //return __atomic_readv_replacement (fd, vector, count);
  59734. -
  59735. - return -1;
  59736. -}
  59737. -
  59738. -ssize_t readv (int fd, const struct iovec *vector, int count)
  59739. -{
  59740. - if (SINGLE_THREAD_P)
  59741. - return __readv (fd, vector, count);
  59742. -
  59743. - int oldtype = LIBC_CANCEL_ASYNC ();
  59744. + ssize_t bytes_read = INLINE_SYSCALL(readv, 3, fd, vector, count);
  59745. - int result = __readv (fd, vector, count);
  59746. + if (bytes_read >= 0 || errno != EINVAL || count <= UIO_FASTIOV)
  59747. + return bytes_read;
  59748. - LIBC_CANCEL_RESET (oldtype);
  59749. + /* glibc tries again, but we do not. */
  59750. + /* return __atomic_readv_replacement (fd, vector, count); */
  59751. - return result;
  59752. + return -1;
  59753. }
  59754. -#else
  59755. -_syscall3(ssize_t, readv, int, filedes, const struct iovec *, vector,
  59756. - int, count)
  59757. -#endif
  59758. +CANCELLABLE_SYSCALL(ssize_t, readv, (int fd, const struct iovec *vector, int count),
  59759. + (fd, vector, count))
  59760. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/renameat.c uClibc-git/libc/sysdeps/linux/common/renameat.c
  59761. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/renameat.c 2012-05-15 09:20:09.000000000 +0200
  59762. +++ uClibc-git/libc/sysdeps/linux/common/renameat.c 2014-07-25 20:36:06.781334555 +0200
  59763. @@ -11,6 +11,7 @@
  59764. #ifdef __NR_renameat
  59765. _syscall4(int, renameat, int, oldfd, const char *, old, int, newfd, const char *, new)
  59766. +libc_hidden_def(renameat)
  59767. #else
  59768. /* should add emulation with rename() and /proc/self/fd/ ... */
  59769. #endif
  59770. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/rename.c uClibc-git/libc/sysdeps/linux/common/rename.c
  59771. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/rename.c 2012-05-15 09:20:09.000000000 +0200
  59772. +++ uClibc-git/libc/sysdeps/linux/common/rename.c 2014-07-25 20:36:06.781334555 +0200
  59773. @@ -8,17 +8,15 @@
  59774. */
  59775. #include <sys/syscall.h>
  59776. -#include <unistd.h>
  59777. -#include <string.h>
  59778. -#include <sys/param.h>
  59779. #include <stdio.h>
  59780. +#include <unistd.h>
  59781. -#define __NR___syscall_rename __NR_rename
  59782. -static __inline__ _syscall2(int, __syscall_rename, const char *, oldpath,
  59783. - const char *, newpath)
  59784. -
  59785. -int rename(const char * oldpath, const char * newpath)
  59786. +#if defined __NR_renameat && !defined __NR_rename
  59787. +# include <fcntl.h>
  59788. +int rename(const char *oldpath, const char *newpath)
  59789. {
  59790. - return __syscall_rename(oldpath, newpath);
  59791. + return renameat(AT_FDCWD, oldpath, AT_FDCWD, newpath);
  59792. }
  59793. -
  59794. +#else
  59795. +_syscall2(int, rename, const char *, oldpath, const char *, newpath)
  59796. +#endif
  59797. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/rmdir.c uClibc-git/libc/sysdeps/linux/common/rmdir.c
  59798. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/rmdir.c 2012-05-15 09:20:09.000000000 +0200
  59799. +++ uClibc-git/libc/sysdeps/linux/common/rmdir.c 2014-07-25 20:36:06.781334555 +0200
  59800. @@ -11,5 +11,13 @@
  59801. #include <unistd.h>
  59802. +#if defined __NR_unlinkat && !defined __NR_rmdir
  59803. +# include <fcntl.h>
  59804. +int rmdir(const char *pathname)
  59805. +{
  59806. + return unlinkat(AT_FDCWD, pathname, AT_REMOVEDIR);
  59807. +}
  59808. +#else
  59809. _syscall1(int, rmdir, const char *, pathname)
  59810. +#endif
  59811. libc_hidden_def(rmdir)
  59812. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/__rt_sigtimedwait.c uClibc-git/libc/sysdeps/linux/common/__rt_sigtimedwait.c
  59813. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/__rt_sigtimedwait.c 2012-05-15 09:20:09.000000000 +0200
  59814. +++ uClibc-git/libc/sysdeps/linux/common/__rt_sigtimedwait.c 2014-07-25 20:36:06.757334429 +0200
  59815. @@ -9,42 +9,49 @@
  59816. */
  59817. #include <sys/syscall.h>
  59818. -#include <signal.h>
  59819. -#include <string.h>
  59820. #ifdef __NR_rt_sigtimedwait
  59821. -
  59822. +# include <signal.h>
  59823. +# include <cancel.h>
  59824. # ifdef __UCLIBC_HAS_THREADS_NATIVE__
  59825. -# include <sysdep-cancel.h>
  59826. # include <pthreadP.h> /* SIGCANCEL */
  59827. +# endif
  59828. +# ifdef SIGCANCEL
  59829. +# define __need_NULL
  59830. +# include <stddef.h>
  59831. +# include <string.h>
  59832. +# endif
  59833. -static int do_sigtimedwait(const sigset_t *set, siginfo_t *info,
  59834. - const struct timespec *timeout)
  59835. +int __NC(sigtimedwait)(const sigset_t *set, siginfo_t *info,
  59836. + const struct timespec *timeout)
  59837. {
  59838. -# ifdef SIGCANCEL
  59839. +# ifdef SIGCANCEL
  59840. sigset_t tmpset;
  59841. - if (set != NULL && (__builtin_expect (__sigismember (set, SIGCANCEL), 0)
  59842. -# ifdef SIGSETXID
  59843. - || __builtin_expect (__sigismember (set, SIGSETXID), 0)
  59844. -# endif
  59845. + if (set != NULL && (unlikely (__sigismember (set, SIGCANCEL))
  59846. +# ifdef SIGSETXID
  59847. + || unlikely (__sigismember (set, SIGSETXID))
  59848. +# endif
  59849. ))
  59850. {
  59851. /* Create a temporary mask without the bit for SIGCANCEL set. */
  59852. // We are not copying more than we have to.
  59853. memcpy (&tmpset, set, _NSIG / 8);
  59854. __sigdelset (&tmpset, SIGCANCEL);
  59855. -# ifdef SIGSETXID
  59856. +# ifdef SIGSETXID
  59857. __sigdelset (&tmpset, SIGSETXID);
  59858. -# endif
  59859. +# endif
  59860. set = &tmpset;
  59861. }
  59862. -# endif
  59863. +# endif
  59864. +/* if this is enabled, enable the disabled section in sigwait.c */
  59865. +# if defined SI_TKILL && defined SI_USER
  59866. /* XXX The size argument hopefully will have to be changed to the
  59867. real size of the user-level sigset_t. */
  59868. - int result = INLINE_SYSCALL (rt_sigtimedwait, 4, set, info,
  59869. - timeout, _NSIG / 8);
  59870. + /* on uClibc we use the kernel sigset_t size */
  59871. + int result = INLINE_SYSCALL(rt_sigtimedwait, 4, set, info,
  59872. + timeout, __SYSCALL_SIGSET_T_SIZE);
  59873. /* The kernel generates a SI_TKILL code in si_code in case tkill is
  59874. used. tkill is transparently used in raise(). Since having
  59875. @@ -54,39 +61,14 @@
  59876. info->si_code = SI_USER;
  59877. return result;
  59878. -}
  59879. -
  59880. -/* Return any pending signal or wait for one for the given time. */
  59881. -int attribute_hidden __sigtimedwait(const sigset_t *set, siginfo_t *info,
  59882. - const struct timespec *timeout)
  59883. -{
  59884. - if(SINGLE_THREAD_P)
  59885. - return do_sigtimedwait(set, info, timeout);
  59886. -
  59887. - int oldtype = LIBC_CANCEL_ASYNC();
  59888. -
  59889. - /* XXX The size argument hopefully will have to be changed to the
  59890. - real size of the user-level sigset_t. */
  59891. - int result = do_sigtimedwait(set, info, timeout);
  59892. -
  59893. - LIBC_CANCEL_RESET(oldtype);
  59894. -
  59895. - return result;
  59896. -}
  59897. # else
  59898. -# define __need_NULL
  59899. -# include <stddef.h>
  59900. -# define __NR___rt_sigtimedwait __NR_rt_sigtimedwait
  59901. -static _syscall4(int, __rt_sigtimedwait, const sigset_t *, set,
  59902. - siginfo_t *, info, const struct timespec *, timeout,
  59903. - size_t, setsize);
  59904. -
  59905. -int attribute_hidden __sigtimedwait(const sigset_t * set, siginfo_t * info,
  59906. - const struct timespec *timeout)
  59907. -{
  59908. - return __rt_sigtimedwait(set, info, timeout, _NSIG / 8);
  59909. + /* on uClibc we use the kernel sigset_t size */
  59910. + return INLINE_SYSCALL(rt_sigtimedwait, 4, set, info,
  59911. + timeout, __SYSCALL_SIGSET_T_SIZE);
  59912. +# endif
  59913. }
  59914. -# endif /* !__UCLIBC_HAS_THREADS_NATIVE__ */
  59915. -weak_alias(__sigtimedwait,sigtimedwait)
  59916. -libc_hidden_weak(sigtimedwait)
  59917. +CANCELLABLE_SYSCALL(int, sigtimedwait,
  59918. + (const sigset_t *set, siginfo_t *info, const struct timespec *timeout),
  59919. + (set, info, timeout))
  59920. +lt_libc_hidden(sigtimedwait)
  59921. #endif
  59922. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/__rt_sigwaitinfo.c uClibc-git/libc/sysdeps/linux/common/__rt_sigwaitinfo.c
  59923. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/__rt_sigwaitinfo.c 2012-05-15 09:20:09.000000000 +0200
  59924. +++ uClibc-git/libc/sysdeps/linux/common/__rt_sigwaitinfo.c 2014-07-25 20:36:06.757334429 +0200
  59925. @@ -9,81 +9,17 @@
  59926. */
  59927. #include <sys/syscall.h>
  59928. -#include <signal.h>
  59929. -#include <string.h>
  59930. #ifdef __NR_rt_sigtimedwait
  59931. +# define __need_NULL
  59932. +# include <stddef.h>
  59933. +# include <signal.h>
  59934. +# include <cancel.h>
  59935. -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
  59936. -# include <sysdep-cancel.h>
  59937. -
  59938. -static int do_sigwaitinfo(const sigset_t *set, siginfo_t *info)
  59939. -{
  59940. -# ifdef SIGCANCEL
  59941. - sigset_t tmpset;
  59942. -
  59943. - if (set != NULL && (__builtin_expect (__sigismember (set, SIGCANCEL), 0)
  59944. -# ifdef SIGSETXID
  59945. - || __builtin_expect (__sigismember (set, SIGSETXID), 0)
  59946. -# endif
  59947. - ))
  59948. - {
  59949. - /* Create a temporary mask without the bit for SIGCANCEL set. */
  59950. - // We are not copying more than we have to.
  59951. - memcpy (&tmpset, set, _NSIG / 8);
  59952. - __sigdelset (&tmpset, SIGCANCEL);
  59953. -# ifdef SIGSETXID
  59954. - __sigdelset (&tmpset, SIGSETXID);
  59955. -# endif
  59956. - set = &tmpset;
  59957. - }
  59958. -# endif
  59959. -
  59960. - /* XXX The size argument hopefully will have to be changed to the
  59961. - real size of the user-level sigset_t. */
  59962. - int result = INLINE_SYSCALL (rt_sigtimedwait, 4, set, info,
  59963. - NULL, _NSIG / 8);
  59964. -
  59965. - /* The kernel generates a SI_TKILL code in si_code in case tkill is
  59966. - used. tkill is transparently used in raise(). Since having
  59967. - SI_TKILL as a code is useful in general we fold the results
  59968. - here. */
  59969. - if (result != -1 && info != NULL && info->si_code == SI_TKILL)
  59970. - info->si_code = SI_USER;
  59971. -
  59972. - return result;
  59973. -}
  59974. -
  59975. -/* Return any pending signal or wait for one for the given time. */
  59976. -int __sigwaitinfo(const sigset_t *set, siginfo_t *info)
  59977. -{
  59978. - if(SINGLE_THREAD_P)
  59979. - return do_sigwaitinfo(set, info);
  59980. -
  59981. - int oldtype = LIBC_CANCEL_ASYNC();
  59982. -
  59983. - /* XXX The size argument hopefully will have to be changed to the
  59984. - real size of the user-level sigset_t. */
  59985. - int result = do_sigwaitinfo(set, info);
  59986. -
  59987. - LIBC_CANCEL_RESET(oldtype);
  59988. -
  59989. - return result;
  59990. -}
  59991. -# else
  59992. -# define __need_NULL
  59993. -# include <stddef.h>
  59994. -# define __NR___rt_sigwaitinfo __NR_rt_sigtimedwait
  59995. -static _syscall4(int, __rt_sigwaitinfo, const sigset_t *, set,
  59996. - siginfo_t *, info, const struct timespec *, timeout,
  59997. - size_t, setsize);
  59998. -
  59999. -int attribute_hidden __sigwaitinfo(const sigset_t * set, siginfo_t * info)
  60000. +int sigwaitinfo(const sigset_t *set, siginfo_t *info)
  60001. {
  60002. - return __rt_sigwaitinfo(set, info, NULL, _NSIG / 8);
  60003. + return sigtimedwait(set, info, NULL);
  60004. }
  60005. -# endif
  60006. -libc_hidden_proto(sigwaitinfo)
  60007. -weak_alias (__sigwaitinfo, sigwaitinfo)
  60008. -libc_hidden_weak(sigwaitinfo)
  60009. +/* cancellation handled by sigtimedwait, noop on uClibc */
  60010. +LIBC_CANCEL_HANDLED();
  60011. #endif
  60012. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sched_cpucount.c uClibc-git/libc/sysdeps/linux/common/sched_cpucount.c
  60013. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sched_cpucount.c 2012-05-15 09:20:09.000000000 +0200
  60014. +++ uClibc-git/libc/sysdeps/linux/common/sched_cpucount.c 2014-07-25 20:36:06.781334555 +0200
  60015. @@ -12,9 +12,8 @@
  60016. Lesser General Public License for more details.
  60017. You should have received a copy of the GNU Lesser General Public
  60018. - License along with the GNU C Library; if not, write to the Free
  60019. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  60020. - 02111-1307 USA. */
  60021. + License along with the GNU C Library; if not, see
  60022. + <http://www.gnu.org/licenses/>. */
  60023. #include <limits.h>
  60024. #include <sched.h>
  60025. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sched_getaffinity.c uClibc-git/libc/sysdeps/linux/common/sched_getaffinity.c
  60026. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sched_getaffinity.c 2012-05-15 09:20:09.000000000 +0200
  60027. +++ uClibc-git/libc/sysdeps/linux/common/sched_getaffinity.c 2014-07-25 20:36:06.785334575 +0200
  60028. @@ -12,24 +12,19 @@
  60029. Lesser General Public License for more details.
  60030. You should have received a copy of the GNU Lesser General Public
  60031. - License along with the GNU C Library; if not, write to the Free
  60032. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  60033. - 02111-1307 USA. */
  60034. + License along with the GNU C Library; if not, see
  60035. + <http://www.gnu.org/licenses/>. */
  60036. -#include <features.h>
  60037. -#ifdef __USE_GNU
  60038. -
  60039. -#include <sched.h>
  60040. -#include <sys/types.h>
  60041. #include <sys/syscall.h>
  60042. -#include <string.h>
  60043. -#include <sys/param.h>
  60044. -
  60045. -#if defined __NR_sched_getaffinity
  60046. -#define __NR___syscall_sched_getaffinity __NR_sched_getaffinity
  60047. -static __inline__ _syscall3(int, __syscall_sched_getaffinity, __kernel_pid_t, pid,
  60048. - size_t, cpusetsize, cpu_set_t *, cpuset)
  60049. +#if defined __NR_sched_getaffinity && defined __USE_GNU
  60050. +# include <sched.h>
  60051. +# include <string.h>
  60052. +# include <sys/types.h>
  60053. +# include <sys/param.h>
  60054. +# define __NR___syscall_sched_getaffinity __NR_sched_getaffinity
  60055. +static __always_inline _syscall3(int, __syscall_sched_getaffinity, __kernel_pid_t, pid,
  60056. + size_t, cpusetsize, cpu_set_t *, cpuset)
  60057. int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *cpuset)
  60058. {
  60059. @@ -45,4 +40,3 @@
  60060. return res;
  60061. }
  60062. #endif
  60063. -#endif
  60064. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sched_setaffinity.c uClibc-git/libc/sysdeps/linux/common/sched_setaffinity.c
  60065. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sched_setaffinity.c 2012-05-15 09:20:09.000000000 +0200
  60066. +++ uClibc-git/libc/sysdeps/linux/common/sched_setaffinity.c 2014-07-25 20:36:06.785334575 +0200
  60067. @@ -12,26 +12,20 @@
  60068. Lesser General Public License for more details.
  60069. You should have received a copy of the GNU Lesser General Public
  60070. - License along with the GNU C Library; if not, write to the Free
  60071. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  60072. - 02111-1307 USA. */
  60073. + License along with the GNU C Library; if not, see
  60074. + <http://www.gnu.org/licenses/>. */
  60075. -#include <features.h>
  60076. -#ifdef __USE_GNU
  60077. -
  60078. -#include <sched.h>
  60079. -#include <sys/types.h>
  60080. #include <sys/syscall.h>
  60081. -#include <string.h>
  60082. -#include <unistd.h>
  60083. -#include <sys/param.h>
  60084. -#include <alloca.h>
  60085. -
  60086. -#if defined __NR_sched_setaffinity
  60087. -
  60088. -#define __NR___syscall_sched_setaffinity __NR_sched_setaffinity
  60089. -static __inline__ _syscall3(int, __syscall_sched_setaffinity, __kernel_pid_t, pid,
  60090. - size_t, cpusetsize, cpu_set_t *, cpuset)
  60091. +
  60092. +#if defined __NR_sched_setaffinity && defined __USE_GNU
  60093. +# include <sched.h>
  60094. +# include <sys/types.h>
  60095. +# include <string.h>
  60096. +# include <unistd.h>
  60097. +# include <alloca.h>
  60098. +# define __NR___syscall_sched_setaffinity __NR_sched_setaffinity
  60099. +static __always_inline _syscall3(int, __syscall_sched_setaffinity, __kernel_pid_t, pid,
  60100. + size_t, cpusetsize, const cpu_set_t *, cpuset)
  60101. static size_t __kernel_cpumask_size;
  60102. @@ -68,7 +62,6 @@
  60103. return -1;
  60104. }
  60105. - return INLINE_SYSCALL (sched_setaffinity, 3, pid, cpusetsize, cpuset);
  60106. + return __syscall_sched_setaffinity(pid, cpusetsize, cpuset);
  60107. }
  60108. #endif
  60109. -#endif /* __USE_GNU */
  60110. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/select.c uClibc-git/libc/sysdeps/linux/common/select.c
  60111. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/select.c 2012-05-15 09:20:09.000000000 +0200
  60112. +++ uClibc-git/libc/sysdeps/linux/common/select.c 2014-07-25 20:36:06.785334575 +0200
  60113. @@ -9,27 +9,24 @@
  60114. #include <sys/syscall.h>
  60115. #include <sys/select.h>
  60116. -#include <stdint.h>
  60117. +#include <cancel.h>
  60118. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  60119. -#include <sysdep-cancel.h>
  60120. -#else
  60121. -#define SINGLE_THREAD_P 1
  60122. +#ifdef __NR__newselect
  60123. +# undef __NR_select
  60124. +# define __NR_select __NR__newselect
  60125. #endif
  60126. -#define USEC_PER_SEC 1000000L
  60127. -
  60128. -extern __typeof(select) __libc_select;
  60129. -
  60130. -#if !defined(__NR__newselect) && !defined(__NR_select) && defined __USE_XOPEN2K
  60131. -# define __NR___libc_pselect6 __NR_pselect6
  60132. -static _syscall6(int, __libc_pselect6, int, n, fd_set *, readfds, fd_set *, writefds,
  60133. - fd_set *, exceptfds, const struct timespec *, timeout,
  60134. - const sigset_t *, sigmask)
  60135. +#if !defined __NR_select && defined __NR_pselect6
  60136. +# include <stdint.h>
  60137. +# define USEC_PER_SEC 1000000L
  60138. +#endif
  60139. -int __libc_select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
  60140. - struct timeval *timeout)
  60141. +int __NC(select)(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
  60142. + struct timeval *timeout)
  60143. {
  60144. +#ifdef __NR_select
  60145. + return INLINE_SYSCALL(select, 5, n, readfds, writefds, exceptfds, timeout);
  60146. +#elif defined __NR_pselect6
  60147. struct timespec _ts, *ts = 0;
  60148. if (timeout) {
  60149. uint32_t usec;
  60150. @@ -51,44 +48,14 @@
  60151. ts = &_ts;
  60152. }
  60153. -
  60154. - if (SINGLE_THREAD_P)
  60155. - return __libc_pselect6(n, readfds, writefds, exceptfds, ts, 0);
  60156. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  60157. - int oldtype = LIBC_CANCEL_ASYNC ();
  60158. - int result = __libc_pselect6(n, readfds, writefds, exceptfds, ts, 0);
  60159. - LIBC_CANCEL_RESET (oldtype);
  60160. - return result;
  60161. -#endif
  60162. -
  60163. -}
  60164. -
  60165. -#else
  60166. -
  60167. -#ifdef __NR__newselect
  60168. -# define __NR___syscall_select __NR__newselect
  60169. -#else
  60170. -# define __NR___syscall_select __NR_select
  60171. -#endif
  60172. -
  60173. -static _syscall5(int, __syscall_select, int, n, fd_set *, readfds,
  60174. - fd_set *, writefds, fd_set *, exceptfds, struct timeval *, timeout);
  60175. -
  60176. -int __libc_select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
  60177. - struct timeval *timeout)
  60178. -{
  60179. - if (SINGLE_THREAD_P)
  60180. - return __syscall_select(n, readfds, writefds, exceptfds, timeout);
  60181. -
  60182. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  60183. - int oldtype = LIBC_CANCEL_ASYNC ();
  60184. - int result = __syscall_select(n, readfds, writefds, exceptfds, timeout);
  60185. - LIBC_CANCEL_RESET (oldtype);
  60186. - return result;
  60187. + return INLINE_SYSCALL(pselect6, 6, n, readfds, writefds, exceptfds, ts, 0);
  60188. #endif
  60189. }
  60190. -
  60191. +/* we should guard it, but we need it in other files, so let it fail
  60192. + * if we miss any of the syscalls */
  60193. +#if 1 /*defined __NR_select || defined __NR_pselect6*/
  60194. +CANCELLABLE_SYSCALL(int, select, (int n, fd_set *readfds, fd_set *writefds,
  60195. + fd_set *exceptfds, struct timeval *timeout),
  60196. + (n, readfds, writefds, exceptfds, timeout))
  60197. +lt_libc_hidden(select)
  60198. #endif
  60199. -
  60200. -weak_alias(__libc_select,select)
  60201. -libc_hidden_weak(select)
  60202. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sendfile64.c uClibc-git/libc/sysdeps/linux/common/sendfile64.c
  60203. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sendfile64.c 2012-05-15 09:20:09.000000000 +0200
  60204. +++ uClibc-git/libc/sysdeps/linux/common/sendfile64.c 2014-07-25 20:36:06.785334575 +0200
  60205. @@ -10,15 +10,12 @@
  60206. * just the macro we need to order things, __LONG_LONG_PAIR.
  60207. */
  60208. -#include <features.h>
  60209. -#include <unistd.h>
  60210. -#include <errno.h>
  60211. -#include <endian.h>
  60212. -#include <stdint.h>
  60213. -#include <sys/sendfile.h>
  60214. +#include <_lfs_64.h>
  60215. #include <sys/syscall.h>
  60216. #include <bits/wordsize.h>
  60217. -#if defined __UCLIBC_HAS_LFS__ && defined __NR_sendfile64
  60218. +#if defined __NR_sendfile64 && __WORDSIZE != 64
  60219. +# include <sys/sendfile.h>
  60220. _syscall4(ssize_t,sendfile64, int, out_fd, int, in_fd, __off64_t *, offset, size_t, count)
  60221. +libc_hidden_def(sendfile64)
  60222. #endif
  60223. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sendfile.c uClibc-git/libc/sysdeps/linux/common/sendfile.c
  60224. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sendfile.c 2012-05-15 09:20:09.000000000 +0200
  60225. +++ uClibc-git/libc/sysdeps/linux/common/sendfile.c 2014-07-25 20:36:06.785334575 +0200
  60226. @@ -8,16 +8,57 @@
  60227. */
  60228. #include <sys/syscall.h>
  60229. -#include <unistd.h>
  60230. -#include <sys/sendfile.h>
  60231. -#ifdef __NR_sendfile
  60232. +# include <sys/sendfile.h>
  60233. +# include <bits/wordsize.h>
  60234. +#if defined __NR_sendfile
  60235. _syscall4(ssize_t, sendfile, int, out_fd, int, in_fd, __off_t *, offset,
  60236. - size_t, count)
  60237. + size_t, count)
  60238. +# if defined __UCLIBC_HAS_LFS__ && (!defined __NR_sendfile64 || __WORDSIZE == 64)
  60239. +libc_hidden_def(sendfile64)
  60240. +strong_alias_untyped(sendfile,sendfile64)
  60241. +# endif
  60242. -#if ! defined __NR_sendfile64 && defined __UCLIBC_HAS_LFS__
  60243. -strong_alias(sendfile,sendfile64)
  60244. -#endif
  60245. +#elif defined __NR_sendfile64 && !defined __NR_sendfile
  60246. +# include <unistd.h>
  60247. +# include <stddef.h>
  60248. +
  60249. +ssize_t sendfile(int out_fd, int in_fd, __off_t *offset, size_t count)
  60250. +{
  60251. + __off64_t off64, *off;
  60252. + ssize_t res;
  60253. +
  60254. + /*
  60255. + * Check if valid fds and valid pointers were passed
  60256. + * This does not prevent the user from passing
  60257. + * an arbitrary pointer causing a segfault or
  60258. + * other security issues
  60259. + */
  60260. +
  60261. + if (in_fd < 0 || out_fd < 0) {
  60262. + __set_errno(EBADF);
  60263. + return -1;
  60264. + }
  60265. +
  60266. + if (offset == NULL || (int)offset < 0) {
  60267. + __set_errno(EFAULT);
  60268. + return -1;
  60269. + }
  60270. -#endif /* __NR_sendfile */
  60271. + if (offset) {
  60272. + off = &off64;
  60273. + off64 = *offset;
  60274. + } else {
  60275. + off = NULL;
  60276. + }
  60277. +
  60278. + res = INLINE_SYSCALL(sendfile64, 4, out_fd, in_fd, off, count);
  60279. +
  60280. + if (res >= 0)
  60281. + *offset = off64;
  60282. +
  60283. + return res;
  60284. +}
  60285. +
  60286. +#endif
  60287. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/setgroups.c uClibc-git/libc/sysdeps/linux/common/setgroups.c
  60288. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/setgroups.c 2012-05-15 09:20:09.000000000 +0200
  60289. +++ uClibc-git/libc/sysdeps/linux/common/setgroups.c 2014-07-25 20:36:06.785334575 +0200
  60290. @@ -8,12 +8,9 @@
  60291. */
  60292. #include <sys/syscall.h>
  60293. -#include <stdlib.h>
  60294. -#include <unistd.h>
  60295. -#include <grp.h>
  60296. #ifdef __USE_BSD
  60297. -
  60298. +#include <grp.h>
  60299. #if defined(__NR_setgroups32)
  60300. # undef __NR_setgroups
  60301. @@ -24,11 +21,14 @@
  60302. _syscall2(int, setgroups, size_t, size, const gid_t *, list)
  60303. #else
  60304. -
  60305. -
  60306. -#define __NR___syscall_setgroups __NR_setgroups
  60307. -static __inline__ _syscall2(int, __syscall_setgroups,
  60308. - size_t, size, const __kernel_gid_t *, list)
  60309. +# include <errno.h>
  60310. +# include <stdlib.h>
  60311. +# include <unistd.h>
  60312. +# include <sys/types.h>
  60313. +
  60314. +# define __NR___syscall_setgroups __NR_setgroups
  60315. +static __always_inline _syscall2(int, __syscall_setgroups,
  60316. + size_t, size, const __kernel_gid_t *, list)
  60317. int setgroups(size_t size, const gid_t *groups)
  60318. {
  60319. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/setpgrp.c uClibc-git/libc/sysdeps/linux/common/setpgrp.c
  60320. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/setpgrp.c 2012-05-15 09:20:09.000000000 +0200
  60321. +++ uClibc-git/libc/sysdeps/linux/common/setpgrp.c 2014-07-25 20:36:06.785334575 +0200
  60322. @@ -4,10 +4,8 @@
  60323. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  60324. */
  60325. -#include <syscall.h>
  60326. #include <unistd.h>
  60327. -
  60328. int setpgrp(void)
  60329. {
  60330. return setpgid(0,0);
  60331. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/setrlimit64.c uClibc-git/libc/sysdeps/linux/common/setrlimit64.c
  60332. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/setrlimit64.c 2012-05-15 09:20:09.000000000 +0200
  60333. +++ uClibc-git/libc/sysdeps/linux/common/setrlimit64.c 2014-07-25 20:36:06.785334575 +0200
  60334. @@ -12,20 +12,16 @@
  60335. Lesser General Public License for more details.
  60336. You should have received a copy of the GNU Lesser General Public
  60337. - License along with the GNU C Library; if not, write to the Free
  60338. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  60339. - 02111-1307 USA. */
  60340. + License along with the GNU C Library; if not, see
  60341. + <http://www.gnu.org/licenses/>. */
  60342. #include <_lfs_64.h>
  60343. -
  60344. -#include <sys/types.h>
  60345. -#include <sys/resource.h>
  60346. #include <bits/wordsize.h>
  60347. /* the regular setrlimit will work just fine for 64bit users */
  60348. +#if __WORDSIZE == 32
  60349. -#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 32
  60350. -
  60351. +# include <sys/resource.h>
  60352. /* Set the soft and hard limits for RESOURCE to *RLIMITS.
  60353. Only the super-user can increase hard limits.
  60354. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/setrlimit.c uClibc-git/libc/sysdeps/linux/common/setrlimit.c
  60355. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/setrlimit.c 2012-05-15 09:20:09.000000000 +0200
  60356. +++ uClibc-git/libc/sysdeps/linux/common/setrlimit.c 2014-07-25 20:36:06.785334575 +0200
  60357. @@ -7,12 +7,9 @@
  60358. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  60359. */
  60360. -#define setrlimit64 __hide_setrlimit64
  60361. #include <sys/syscall.h>
  60362. -#include <unistd.h>
  60363. #include <sys/resource.h>
  60364. -#undef setrlimit64
  60365. -
  60366. +#include <bits/wordsize.h>
  60367. /* Only wrap setrlimit if the new usetrlimit is not present and setrlimit sucks */
  60368. @@ -25,7 +22,7 @@
  60369. const struct rlimit *, rlim)
  60370. int setrlimit(__rlimit_resource_t resource, struct rlimit *rlimits)
  60371. {
  60372. - return (__syscall_usetrlimit(resource, rlimits));
  60373. + return __syscall_usetrlimit(resource, rlimits);
  60374. }
  60375. #elif !defined(__UCLIBC_HANDLE_OLDER_RLIMIT__)
  60376. @@ -36,6 +33,11 @@
  60377. #else
  60378. +# define __need_NULL
  60379. +# include <stddef.h>
  60380. +# include <errno.h>
  60381. +# include <sys/param.h>
  60382. +
  60383. /* we have to handle old style setrlimit() */
  60384. # define __NR___syscall_setrlimit __NR_setrlimit
  60385. static __always_inline
  60386. @@ -52,18 +54,15 @@
  60387. /* We might have to correct the limits values. Since the old values
  60388. * were signed the new values might be too large. */
  60389. -# define RMIN(x, y) ((x) < (y) ? (x) : (y))
  60390. - rlimits_small.rlim_cur = RMIN((unsigned long int) rlimits->rlim_cur,
  60391. + rlimits_small.rlim_cur = MIN((unsigned long int) rlimits->rlim_cur,
  60392. RLIM_INFINITY >> 1);
  60393. - rlimits_small.rlim_max = RMIN((unsigned long int) rlimits->rlim_max,
  60394. + rlimits_small.rlim_max = MIN((unsigned long int) rlimits->rlim_max,
  60395. RLIM_INFINITY >> 1);
  60396. -#undef RMIN
  60397. - return (__syscall_setrlimit(resource, &rlimits_small));
  60398. + return __syscall_setrlimit(resource, &rlimits_small);
  60399. }
  60400. #endif
  60401. -
  60402. libc_hidden_def(setrlimit)
  60403. #if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
  60404. -strong_alias(setrlimit, setrlimit64)
  60405. +strong_alias_untyped(setrlimit, setrlimit64)
  60406. #endif
  60407. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/setsid.c uClibc-git/libc/sysdeps/linux/common/setsid.c
  60408. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/setsid.c 2012-05-15 09:20:09.000000000 +0200
  60409. +++ uClibc-git/libc/sysdeps/linux/common/setsid.c 2014-07-25 20:36:06.785334575 +0200
  60410. @@ -10,6 +10,5 @@
  60411. #include <sys/syscall.h>
  60412. #include <unistd.h>
  60413. -
  60414. _syscall0(pid_t, setsid)
  60415. libc_hidden_def(setsid)
  60416. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/settimeofday.c uClibc-git/libc/sysdeps/linux/common/settimeofday.c
  60417. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/settimeofday.c 2012-05-15 09:20:09.000000000 +0200
  60418. +++ uClibc-git/libc/sysdeps/linux/common/settimeofday.c 2014-07-25 20:36:06.785334575 +0200
  60419. @@ -8,12 +8,36 @@
  60420. */
  60421. #include <sys/syscall.h>
  60422. -#include <sys/time.h>
  60423. #ifdef __USE_BSD
  60424. +# include <sys/time.h>
  60425. +# ifdef __NR_settimeofday
  60426. +_syscall2(int, settimeofday, const struct timeval *, tv,
  60427. + const struct timezone *, tz)
  60428. +# elif defined __USE_SVID && defined __NR_stime
  60429. +# define __need_NULL
  60430. +# include <stddef.h>
  60431. +# include <errno.h>
  60432. +# include <time.h>
  60433. +int settimeofday(const struct timeval *tv, const struct timezone *tz)
  60434. +{
  60435. + time_t when;
  60436. + if (tv == NULL) {
  60437. + __set_errno(EINVAL);
  60438. + return -1;
  60439. + }
  60440. -_syscall2(int, settimeofday, const struct timeval *, tv,
  60441. - const struct timezone *, tz)
  60442. + if (tz != NULL || tv->tv_usec % 1000000 != 0) {
  60443. + __set_errno(ENOSYS);
  60444. + return -1;
  60445. + }
  60446. +
  60447. + when = tv->tv_sec + (tv->tv_usec / 1000000);
  60448. + return stime(&when);
  60449. +}
  60450. +# endif
  60451. +# if defined __NR_settimeofday || (defined __USE_SVID && defined __NR_stime)
  60452. libc_hidden_def(settimeofday)
  60453. +# endif
  60454. #endif
  60455. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/setuid.c uClibc-git/libc/sysdeps/linux/common/setuid.c
  60456. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/setuid.c 2012-05-15 09:20:09.000000000 +0200
  60457. +++ uClibc-git/libc/sysdeps/linux/common/setuid.c 2014-07-25 20:36:06.785334575 +0200
  60458. @@ -22,7 +22,7 @@
  60459. #else
  60460. # define __NR___syscall_setuid __NR_setuid
  60461. -static __inline__ _syscall1(int, __syscall_setuid, __kernel_uid_t, uid)
  60462. +static __always_inline _syscall1(int, __syscall_setuid, __kernel_uid_t, uid)
  60463. int setuid(uid_t uid)
  60464. {
  60465. @@ -30,6 +30,6 @@
  60466. __set_errno(EINVAL);
  60467. return -1;
  60468. }
  60469. - return (__syscall_setuid(uid));
  60470. + return __syscall_setuid(uid);
  60471. }
  60472. #endif
  60473. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/signalfd.c uClibc-git/libc/sysdeps/linux/common/signalfd.c
  60474. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/signalfd.c 2012-05-15 09:20:09.000000000 +0200
  60475. +++ uClibc-git/libc/sysdeps/linux/common/signalfd.c 2014-07-25 20:36:06.785334575 +0200
  60476. @@ -25,13 +25,13 @@
  60477. int signalfd (int fd, const sigset_t *mask, int flags)
  60478. {
  60479. #if defined __NR___syscall_signalfd4
  60480. - return __syscall_signalfd4(fd, mask, _NSIG / 8, flags);
  60481. + return __syscall_signalfd4(fd, mask, __SYSCALL_SIGSET_T_SIZE, flags);
  60482. #elif defined __NR___syscall_signalfd
  60483. if (flags != 0) {
  60484. __set_errno(EINVAL);
  60485. return -1;
  60486. }
  60487. - return __syscall_signalfd(fd, mask, _NSIG / 8);
  60488. + return __syscall_signalfd(fd, mask, __SYSCALL_SIGSET_T_SIZE);
  60489. #endif
  60490. }
  60491. #endif
  60492. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sigpending.c uClibc-git/libc/sysdeps/linux/common/sigpending.c
  60493. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sigpending.c 2012-05-15 09:20:09.000000000 +0200
  60494. +++ uClibc-git/libc/sysdeps/linux/common/sigpending.c 2014-07-25 20:36:06.785334575 +0200
  60495. @@ -19,7 +19,7 @@
  60496. int sigpending(sigset_t * set)
  60497. {
  60498. - return __rt_sigpending(set, _NSIG / 8);
  60499. + return __rt_sigpending(set, __SYSCALL_SIGSET_T_SIZE);
  60500. }
  60501. #else
  60502. _syscall1(int, sigpending, sigset_t *, set)
  60503. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sigprocmask.c uClibc-git/libc/sysdeps/linux/common/sigprocmask.c
  60504. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sigprocmask.c 2012-05-15 09:20:09.000000000 +0200
  60505. +++ uClibc-git/libc/sysdeps/linux/common/sigprocmask.c 2014-07-25 20:36:06.785334575 +0200
  60506. @@ -35,9 +35,9 @@
  60507. * The only thing we have to make sure here is that SIGCANCEL and
  60508. * SIGSETXID are not blocked.
  60509. */
  60510. - if (set != NULL && (__builtin_expect (__sigismember (set, SIGCANCEL), 0)
  60511. + if (set != NULL && (unlikely (__sigismember (set, SIGCANCEL))
  60512. # ifdef SIGSETXID
  60513. - || __builtin_expect (__sigismember (set, SIGSETXID), 0)
  60514. + || unlikely (__sigismember (set, SIGSETXID))
  60515. # endif
  60516. ))
  60517. {
  60518. @@ -50,7 +50,7 @@
  60519. }
  60520. #endif
  60521. - return __rt_sigprocmask(how, set, oldset, _NSIG / 8);
  60522. + return __rt_sigprocmask(how, set, oldset, __SYSCALL_SIGSET_T_SIZE);
  60523. }
  60524. @@ -70,9 +70,9 @@
  60525. * The only thing we have to make sure here is that SIGCANCEL and
  60526. * SIGSETXID are not blocked.
  60527. */
  60528. - if (set != NULL && (__builtin_expect (__sigismember (set, SIGCANCEL), 0)
  60529. + if (set != NULL && (unlikely (__sigismember (set, SIGCANCEL))
  60530. # ifdef SIGSETXID
  60531. - || __builtin_expect (__sigismember (set, SIGSETXID), 0)
  60532. + || unlikely (__sigismember (set, SIGSETXID))
  60533. # endif
  60534. ))
  60535. {
  60536. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sigqueue.c uClibc-git/libc/sysdeps/linux/common/sigqueue.c
  60537. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sigqueue.c 2012-05-15 09:20:09.000000000 +0200
  60538. +++ uClibc-git/libc/sysdeps/linux/common/sigqueue.c 2014-07-25 20:36:06.785334575 +0200
  60539. @@ -12,41 +12,35 @@
  60540. Lesser General Public License for more details.
  60541. You should have received a copy of the GNU Lesser General Public
  60542. - License along with the GNU C Library; if not, write to the Free
  60543. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  60544. - 02111-1307 USA. */
  60545. -
  60546. -#include <errno.h>
  60547. -#include <signal.h>
  60548. -#include <unistd.h>
  60549. -#include <string.h>
  60550. + License along with the GNU C Library; if not, see
  60551. + <http://www.gnu.org/licenses/>. */
  60552. #include <sys/syscall.h>
  60553. -#if defined __USE_POSIX199309
  60554. +#if defined __NR_rt_sigqueueinfo && defined __USE_POSIX199309
  60555. +# include <signal.h>
  60556. +# include <unistd.h>
  60557. +# include <string.h>
  60558. -#ifdef __NR_rt_sigqueueinfo
  60559. -
  60560. -# define __NR___libc_rt_sigqueueinfo __NR_rt_sigqueueinfo
  60561. -static __inline__ _syscall3(int, __libc_rt_sigqueueinfo, pid_t, pid, int, sig, void*, value)
  60562. +# define __NR___syscall_rt_sigqueueinfo __NR_rt_sigqueueinfo
  60563. +static __always_inline _syscall3(int, __syscall_rt_sigqueueinfo, pid_t, pid, int, sig, void*, value)
  60564. /* Return any pending signal or wait for one for the given time. */
  60565. int sigqueue (pid_t pid, int sig, const union sigval val)
  60566. {
  60567. - siginfo_t info;
  60568. + siginfo_t info;
  60569. - /* First, clear the siginfo_t structure, so that we don't pass our
  60570. - stack content to other tasks. */
  60571. - memset (&info, 0, sizeof (siginfo_t));
  60572. - /* We must pass the information about the data in a siginfo_t value. */
  60573. - info.si_signo = sig;
  60574. - info.si_code = SI_QUEUE;
  60575. - info.si_pid = getpid ();
  60576. - info.si_uid = getuid ();
  60577. - info.si_value = val;
  60578. + /* First, clear the siginfo_t structure, so that we don't pass our
  60579. + stack content to other tasks. */
  60580. + memset(&info, 0, sizeof(info));
  60581. + /* We must pass the information about the data in a siginfo_t value. */
  60582. + info.si_signo = sig;
  60583. + info.si_code = SI_QUEUE;
  60584. + info.si_pid = getpid ();
  60585. + info.si_uid = getuid ();
  60586. + info.si_value = val;
  60587. - return __libc_rt_sigqueueinfo(pid, sig, &info);
  60588. + return __syscall_rt_sigqueueinfo(pid, sig, &info);
  60589. }
  60590. #endif
  60591. -#endif
  60592. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sigsuspend.c uClibc-git/libc/sysdeps/linux/common/sigsuspend.c
  60593. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sigsuspend.c 2012-05-15 09:20:09.000000000 +0200
  60594. +++ uClibc-git/libc/sysdeps/linux/common/sigsuspend.c 2014-07-25 20:36:06.785334575 +0200
  60595. @@ -9,51 +9,18 @@
  60596. #include <sys/syscall.h>
  60597. -#if defined __USE_POSIX
  60598. +#ifdef __USE_POSIX
  60599. #include <signal.h>
  60600. -#undef sigsuspend
  60601. +#include <cancel.h>
  60602. -libc_hidden_proto(sigsuspend)
  60603. -
  60604. -#ifdef __NR_rt_sigsuspend
  60605. -# define __NR___rt_sigsuspend __NR_rt_sigsuspend
  60606. -
  60607. -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
  60608. -# include <errno.h>
  60609. -# include <sysdep-cancel.h>
  60610. -
  60611. -/* Change the set of blocked signals to SET,
  60612. - wait until a signal arrives, and restore the set of blocked signals. */
  60613. -int sigsuspend (const sigset_t *set)
  60614. +int __NC(sigsuspend)(const sigset_t *set)
  60615. {
  60616. - if (SINGLE_THREAD_P)
  60617. - return INLINE_SYSCALL (rt_sigsuspend, 2, set, _NSIG / 8);
  60618. -
  60619. - int oldtype = LIBC_CANCEL_ASYNC ();
  60620. -
  60621. - int result = INLINE_SYSCALL (rt_sigsuspend, 2, set, _NSIG / 8);
  60622. -
  60623. - LIBC_CANCEL_RESET (oldtype);
  60624. -
  60625. - return result;
  60626. -}
  60627. -# else
  60628. -static inline _syscall2(int, __rt_sigsuspend, const sigset_t *, mask, size_t, size)
  60629. -
  60630. -int sigsuspend(const sigset_t * mask)
  60631. -{
  60632. - return __rt_sigsuspend(mask, _NSIG / 8);
  60633. -}
  60634. -# endif
  60635. +#ifdef __NR_rt_sigsuspend
  60636. + return INLINE_SYSCALL(rt_sigsuspend, 2, set, __SYSCALL_SIGSET_T_SIZE);
  60637. #else
  60638. -# define __NR___syscall_sigsuspend __NR_sigsuspend
  60639. -static __inline__ _syscall3(int, __syscall_sigsuspend, int, a, unsigned long int, b,
  60640. - unsigned long int, c)
  60641. -
  60642. -int sigsuspend(const sigset_t * set)
  60643. -{
  60644. - return __syscall_sigsuspend(0, 0, set->__val[0]);
  60645. -}
  60646. + return INLINE_SYSCALL(sigsuspend, 3, 0, 0, set->__val[0]);
  60647. #endif
  60648. -libc_hidden_def(sigsuspend)
  60649. +}
  60650. +CANCELLABLE_SYSCALL(int, sigsuspend, (const sigset_t *set), (set))
  60651. +lt_libc_hidden(sigsuspend)
  60652. #endif
  60653. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/__socketcall.c uClibc-git/libc/sysdeps/linux/common/__socketcall.c
  60654. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/__socketcall.c 2012-05-15 09:20:09.000000000 +0200
  60655. +++ uClibc-git/libc/sysdeps/linux/common/__socketcall.c 2014-07-25 20:36:06.757334429 +0200
  60656. @@ -8,8 +8,18 @@
  60657. */
  60658. #include <sys/syscall.h>
  60659. +
  60660. +/* At the time of this writing,
  60661. + * several arches provide the individual calls and do _not_ go through
  60662. + * this demuxer.
  60663. + *
  60664. + * Verify all arches supported by your kernel before you remove the
  60665. + * guard below!
  60666. + */
  60667. #ifdef __NR_socketcall
  60668. +#include <sys/socket.h>
  60669. +
  60670. #define __NR___socketcall __NR_socketcall
  60671. -int __socketcall(int __call, unsigned long *__args) attribute_hidden;
  60672. _syscall2(int, __socketcall, int, call, unsigned long *, args)
  60673. +
  60674. #endif
  60675. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/splice.c uClibc-git/libc/sysdeps/linux/common/splice.c
  60676. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/splice.c 2012-05-15 09:20:09.000000000 +0200
  60677. +++ uClibc-git/libc/sysdeps/linux/common/splice.c 2014-07-25 20:36:06.785334575 +0200
  60678. @@ -8,9 +8,10 @@
  60679. */
  60680. #include <sys/syscall.h>
  60681. -#include <fcntl.h>
  60682. -#ifdef __NR_splice
  60683. -_syscall6(ssize_t, splice, int, __fdin, __off64_t *, __offin, int, __fdout,
  60684. - __off64_t *, __offout, size_t, __len, unsigned int, __flags)
  60685. +#if defined __NR_splice && defined __UCLIBC_HAS_LFS__ && defined __USE_GNU
  60686. +# include <fcntl.h>
  60687. +
  60688. +_syscall6(ssize_t, splice, int, __fdin, off64_t *, __offin, int, __fdout,
  60689. + off64_t *, __offout, size_t, __len, unsigned int, __flags)
  60690. #endif
  60691. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/ssp.c uClibc-git/libc/sysdeps/linux/common/ssp.c
  60692. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/ssp.c 2012-05-15 09:20:09.000000000 +0200
  60693. +++ uClibc-git/libc/sysdeps/linux/common/ssp.c 2014-07-25 20:36:06.785334575 +0200
  60694. @@ -20,103 +20,113 @@
  60695. #error "file must not be compiled with stack protection enabled on it. Use -fno-stack-protector"
  60696. #endif
  60697. +#include <string.h>
  60698. +#include <unistd.h>
  60699. +#include <signal.h>
  60700. +#ifdef __UCLIBC_HAS_SYSLOG__
  60701. +#include <sys/syslog.h>
  60702. +#endif
  60703. +
  60704. #ifdef __PROPOLICE_BLOCK_SEGV__
  60705. # define SSP_SIGTYPE SIGSEGV
  60706. #else
  60707. # define SSP_SIGTYPE SIGABRT
  60708. #endif
  60709. -#include <string.h>
  60710. -#include <unistd.h>
  60711. -#include <signal.h>
  60712. -#if defined __UCLIBC_HAS_SYSLOG__
  60713. -#include <sys/syslog.h>
  60714. +static void do_write(const char *msg)
  60715. +{
  60716. + /* could use inlined syscall here to be sure ... */
  60717. + return (void) write(STDERR_FILENO, msg, strlen(msg));
  60718. +}
  60719. +static void __cold do_msg(const char *msg1, const char *msg2, const char *msg3)
  60720. +{
  60721. + do_write(msg1);
  60722. + do_write(msg2);
  60723. + do_write(msg3);
  60724. + do_write("\n");
  60725. +#ifdef __UCLIBC_HAS_SYSLOG__
  60726. + syslog(LOG_INFO, "%s%s%s()", msg1, msg2, msg3);
  60727. #endif
  60728. +}
  60729. -
  60730. -static void block_signals(void)
  60731. +static void __cold attribute_noreturn
  60732. +#ifdef __UCLIBC_HAS_SSP_COMPAT__
  60733. +ssp_handler(char func[])
  60734. +#else
  60735. +ssp_handler(void)
  60736. +#endif
  60737. {
  60738. + pid_t pid;
  60739. + static const char msg_ssd[] = "*** stack smashing detected ***: ";
  60740. + static const char msg_terminated[] = " terminated";
  60741. +#ifdef __UCLIBC_HAS_SSP_COMPAT__
  60742. + static const char msg_ssa[] = ": stack smashing attack in function ";
  60743. +#endif
  60744. +
  60745. +#ifdef __DODEBUG__
  60746. struct sigaction sa;
  60747. sigset_t mask;
  60748. __sigfillset(&mask);
  60749. __sigdelset(&mask, SSP_SIGTYPE); /* Block all signal handlers */
  60750. sigprocmask(SIG_BLOCK, &mask, NULL); /* except SSP_SIGTYPE */
  60751. +#endif
  60752. +
  60753. +#ifdef __UCLIBC_HAS_SSP_COMPAT__
  60754. + if (func != NULL)
  60755. + do_msg(__uclibc_progname, msg_ssa, func);
  60756. + else
  60757. +#endif
  60758. + do_msg(msg_ssd, __uclibc_progname, msg_terminated);
  60759. + pid = getpid();
  60760. +#ifdef __DODEBUG__
  60761. /* Make the default handler associated with the signal handler */
  60762. memset(&sa, 0, sizeof(sa));
  60763. __sigfillset(&sa.sa_mask); /* Block all signals */
  60764. if (SIG_DFL) /* if it's constant zero, it's already done */
  60765. sa.sa_handler = SIG_DFL;
  60766. - sigaction(SSP_SIGTYPE, &sa, NULL);
  60767. -}
  60768. -
  60769. -static void __cold ssp_write(int fd, const char *msg1, const char *msg2, const char *msg3)
  60770. -{
  60771. - write(fd, msg1, strlen(msg1));
  60772. - write(fd, msg2, strlen(msg2));
  60773. - write(fd, msg3, strlen(msg3));
  60774. - write(fd, "()\n", 3);
  60775. -#if defined __UCLIBC_HAS_SYSLOG__
  60776. - openlog("ssp", LOG_CONS | LOG_PID, LOG_USER);
  60777. - syslog(LOG_INFO, "%s%s%s()", msg1, msg2, msg3);
  60778. - closelog();
  60779. + if (sigaction(SSP_SIGTYPE, &sa, NULL) == 0)
  60780. + (void)kill(pid, SSP_SIGTYPE);
  60781. #endif
  60782. -}
  60783. -
  60784. -static attribute_noreturn void terminate(void)
  60785. -{
  60786. - (void) kill(getpid(), SSP_SIGTYPE);
  60787. - _exit(127);
  60788. + (void)kill(pid, SIGKILL);
  60789. + /* The loop is added only to keep gcc happy. */
  60790. + while(1)
  60791. + _exit(127);
  60792. }
  60793. #ifdef __UCLIBC_HAS_SSP_COMPAT__
  60794. -void __stack_smash_handler(char func[], int damaged __attribute__ ((unused))) attribute_noreturn __cold;
  60795. -void __stack_smash_handler(char func[], int damaged)
  60796. +void __stack_smash_handler(char func[], int damaged) attribute_noreturn __cold;
  60797. +void __stack_smash_handler(char func[], int damaged attribute_unused)
  60798. {
  60799. - static const char message[] = ": stack smashing attack in function ";
  60800. -
  60801. - block_signals();
  60802. -
  60803. - ssp_write(STDERR_FILENO, __uclibc_progname, message, func);
  60804. -
  60805. - /* The loop is added only to keep gcc happy. */
  60806. - while(1)
  60807. - terminate();
  60808. + ssp_handler(func);
  60809. }
  60810. -#endif
  60811. -#ifdef __UCLIBC_HAS_SSP__
  60812. -void __stack_chk_fail(void) attribute_noreturn __cold;
  60813. void __stack_chk_fail(void)
  60814. {
  60815. - static const char msg1[] = "stack smashing detected: ";
  60816. - static const char msg3[] = " terminated";
  60817. -
  60818. - block_signals();
  60819. -
  60820. - ssp_write(STDERR_FILENO, msg1, __uclibc_progname, msg3);
  60821. -
  60822. - /* The loop is added only to keep gcc happy. */
  60823. - while(1)
  60824. - terminate();
  60825. + ssp_handler(NULL);
  60826. }
  60827. +#else
  60828. +strong_alias(ssp_handler,__stack_chk_fail)
  60829. #endif
  60830. #ifdef __UCLIBC_HAS_FORTIFY__
  60831. +/* should be redone when activated to use common code above.
  60832. + * for now, it works without debugging support */
  60833. void __chk_fail(void)
  60834. {
  60835. - static const char msg1[] = "buffer overflow detected: ";
  60836. - static const char msg3[] = " terminated";
  60837. -
  60838. - block_signals();
  60839. + static const char msg_fail[] = "*** buffer overflow detected ***: ";
  60840. + static const char msg_terminated[] = " terminated";
  60841. + pid_t pid;
  60842. - ssp_write(STDERR_FILENO, msg1, __uclibc_progname, msg3);
  60843. + do_msg(msg_fail, __uclibc_progname, msg_terminated);
  60844. + pid = getpid();
  60845. + (void)kill(pid, SIGKILL);
  60846. /* The loop is added only to keep gcc happy. */
  60847. while(1)
  60848. - terminate();
  60849. + _exit(127);
  60850. }
  60851. libc_hidden_def(__chk_fail)
  60852. #endif
  60853. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/ssp-local.c uClibc-git/libc/sysdeps/linux/common/ssp-local.c
  60854. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/ssp-local.c 2012-05-15 09:20:09.000000000 +0200
  60855. +++ uClibc-git/libc/sysdeps/linux/common/ssp-local.c 2014-07-25 20:36:06.785334575 +0200
  60856. @@ -12,18 +12,19 @@
  60857. Lesser General Public License for more details.
  60858. You should have received a copy of the GNU Lesser General Public
  60859. - License along with the GNU C Library; if not, write to the Free
  60860. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  60861. - 02111-1307 USA. */
  60862. + License along with the GNU C Library; if not, see
  60863. + <http://www.gnu.org/licenses/>. */
  60864. /*
  60865. * Peter S. Mazinger ps.m[@]gmx.net
  60866. * copied stack_chk_fail_local.c from glibc and adapted for uClibc
  60867. */
  60868. -#include <features.h>
  60869. +#if defined __SSP__ || defined __SSP_ALL__
  60870. +# error "file must not be compiled with stack protection enabled on it. Use -fno-stack-protector"
  60871. +#endif
  60872. -extern void __stack_chk_fail (void) attribute_noreturn;
  60873. +#include <features.h>
  60874. /* On some architectures, this helps needless PIC pointer setup
  60875. that would be needed just for the __stack_chk_fail call. */
  60876. @@ -31,5 +32,5 @@
  60877. void __stack_chk_fail_local (void) attribute_noreturn attribute_hidden;
  60878. void __stack_chk_fail_local (void)
  60879. {
  60880. - __stack_chk_fail ();
  60881. + __stack_chk_fail ();
  60882. }
  60883. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/stat64.c uClibc-git/libc/sysdeps/linux/common/stat64.c
  60884. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/stat64.c 2012-05-15 09:20:09.000000000 +0200
  60885. +++ uClibc-git/libc/sysdeps/linux/common/stat64.c 2014-07-25 20:36:06.785334575 +0200
  60886. @@ -7,17 +7,28 @@
  60887. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  60888. */
  60889. +#include <_lfs_64.h>
  60890. #include <sys/syscall.h>
  60891. #include <sys/stat.h>
  60892. -#if defined __UCLIBC_HAS_LFS__ && defined __NR_stat64
  60893. +#if defined __UCLIBC_HAS_LFS__
  60894. -# define __NR___syscall_stat64 __NR_stat64
  60895. +# if defined __NR_fstatat64 && !defined __NR_stat64
  60896. +# include <fcntl.h>
  60897. # include <unistd.h>
  60898. -# include "xstatconv.h"
  60899. -static __inline__ _syscall2(int, __syscall_stat64,
  60900. - const char *, file_name, struct kernel_stat64 *, buf)
  60901. +int stat64(const char *file_name, struct stat64 *buf)
  60902. +{
  60903. + return fstatat64(AT_FDCWD, file_name, buf, 0);
  60904. +}
  60905. +libc_hidden_def(stat64)
  60906. +
  60907. +/* For systems which have both, prefer the old one */
  60908. +# elif defined __NR_stat64
  60909. +# define __NR___syscall_stat64 __NR_stat64
  60910. +# include "xstatconv.h"
  60911. +static __always_inline _syscall2(int, __syscall_stat64,
  60912. + const char *, file_name, struct kernel_stat64 *, buf)
  60913. int stat64(const char *file_name, struct stat64 *buf)
  60914. {
  60915. @@ -31,4 +42,6 @@
  60916. return result;
  60917. }
  60918. libc_hidden_def(stat64)
  60919. -#endif
  60920. +# endif
  60921. +
  60922. +#endif /* __UCLIBC_HAS_LFS__ */
  60923. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/stat.c uClibc-git/libc/sysdeps/linux/common/stat.c
  60924. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/stat.c 2012-05-15 09:20:09.000000000 +0200
  60925. +++ uClibc-git/libc/sysdeps/linux/common/stat.c 2014-07-25 20:36:06.785334575 +0200
  60926. @@ -10,14 +10,24 @@
  60927. #include <sys/syscall.h>
  60928. #include <unistd.h>
  60929. #include <sys/stat.h>
  60930. -#include "xstatconv.h"
  60931. #undef stat
  60932. +#if defined __NR_fstatat64 && !defined __NR_stat
  60933. +# include <fcntl.h>
  60934. +
  60935. +int stat(const char *file_name, struct stat *buf)
  60936. +{
  60937. + return fstatat(AT_FDCWD, file_name, buf, 0);
  60938. +}
  60939. +
  60940. +#else
  60941. +# include "xstatconv.h"
  60942. +
  60943. int stat(const char *file_name, struct stat *buf)
  60944. {
  60945. int result;
  60946. -#ifdef __NR_stat64
  60947. +# ifdef __NR_stat64
  60948. /* normal stat call has limited values for various stat elements
  60949. * e.g. uid device major/minor etc.
  60950. * so we use 64 variant if available
  60951. @@ -28,19 +38,21 @@
  60952. if (result == 0) {
  60953. __xstat32_conv(&kbuf, buf);
  60954. }
  60955. -#else
  60956. +# else
  60957. struct kernel_stat kbuf;
  60958. result = INLINE_SYSCALL(stat, 2, file_name, &kbuf);
  60959. if (result == 0) {
  60960. __xstat_conv(&kbuf, buf);
  60961. }
  60962. -#endif
  60963. +# endif /* __NR_stat64 */
  60964. return result;
  60965. }
  60966. +#endif /* __NR_fstat64 */
  60967. libc_hidden_def(stat)
  60968. -#if ! defined __NR_stat64 && defined __UCLIBC_HAS_LFS__
  60969. +#if ! defined __NR_stat64 && ! defined __NR_fstatat64 && \
  60970. + defined __UCLIBC_HAS_LFS__
  60971. strong_alias_untyped(stat,stat64)
  60972. libc_hidden_def(stat64)
  60973. #endif
  60974. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/statfs.c uClibc-git/libc/sysdeps/linux/common/statfs.c
  60975. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/statfs.c 2012-05-15 09:20:09.000000000 +0200
  60976. +++ uClibc-git/libc/sysdeps/linux/common/statfs.c 2014-07-25 20:36:06.785334575 +0200
  60977. @@ -13,10 +13,39 @@
  60978. #include <sys/vfs.h>
  60979. extern __typeof(statfs) __libc_statfs attribute_hidden;
  60980. -#define __NR___libc_statfs __NR_statfs
  60981. +
  60982. +#if defined __NR_statfs64 && !defined __NR_statfs
  60983. +
  60984. +int __libc_statfs(const char *path, struct statfs *buf)
  60985. +{
  60986. + int err = INLINE_SYSCALL(statfs64, 3, path, sizeof(*buf), buf);
  60987. +
  60988. + if (err == 0) {
  60989. + /* Did we overflow? */
  60990. + if (buf->__pad1 || buf->__pad2 || buf->__pad3 ||
  60991. + buf->__pad4 || buf->__pad5) {
  60992. + __set_errno(EOVERFLOW);
  60993. + return -1;
  60994. + }
  60995. + }
  60996. +
  60997. + return err;
  60998. +}
  60999. +# if defined __UCLIBC_LINUX_SPECIFIC__ || defined __UCLIBC_HAS_THREADS_NATIVE__
  61000. +/* statfs is used by NPTL, so it must exported in case */
  61001. +weak_alias(__libc_statfs, statfs)
  61002. +# endif
  61003. +
  61004. +/* For systems which have both, prefer the old one */
  61005. +#else
  61006. +
  61007. +# define __NR___libc_statfs __NR_statfs
  61008. _syscall2(int, __libc_statfs, const char *, path, struct statfs *, buf)
  61009. -#if defined __UCLIBC_LINUX_SPECIFIC__ || defined __UCLIBC_HAS_THREADS_NATIVE__
  61010. +# if defined __UCLIBC_LINUX_SPECIFIC__ || defined __UCLIBC_HAS_THREADS_NATIVE__
  61011. /* statfs is used by NPTL, so it must exported in case */
  61012. -weak_alias(__libc_statfs,statfs)
  61013. +weak_alias(__libc_statfs, statfs)
  61014. +# endif
  61015. +
  61016. #endif
  61017. +libc_hidden_def(statfs)
  61018. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/stime.c uClibc-git/libc/sysdeps/linux/common/stime.c
  61019. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/stime.c 2012-05-15 09:20:09.000000000 +0200
  61020. +++ uClibc-git/libc/sysdeps/linux/common/stime.c 2014-07-25 20:36:06.785334575 +0200
  61021. @@ -8,15 +8,17 @@
  61022. */
  61023. #include <sys/syscall.h>
  61024. -#include <time.h>
  61025. -#include <sys/time.h>
  61026. #ifdef __USE_SVID
  61027. -#ifdef __NR_stime
  61028. +# include <time.h>
  61029. +# ifdef __NR_stime
  61030. _syscall1(int, stime, const time_t *, t)
  61031. -#else
  61032. -
  61033. -int stime(const time_t * when)
  61034. +# elif defined __USE_BSD && defined __NR_settimeofday
  61035. +# define __need_NULL
  61036. +# include <stddef.h>
  61037. +# include <errno.h>
  61038. +# include <sys/time.h>
  61039. +int stime(const time_t *when)
  61040. {
  61041. struct timeval tv;
  61042. @@ -28,5 +30,8 @@
  61043. tv.tv_usec = 0;
  61044. return settimeofday(&tv, (struct timezone *) 0);
  61045. }
  61046. -#endif
  61047. +# endif
  61048. +# if defined __NR_stime || (defined __USE_BSD && defined __NR_settimeofday)
  61049. +libc_hidden_def(stime)
  61050. +# endif
  61051. #endif
  61052. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/stubs.c uClibc-git/libc/sysdeps/linux/common/stubs.c
  61053. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/stubs.c 2012-05-15 09:20:09.000000000 +0200
  61054. +++ uClibc-git/libc/sysdeps/linux/common/stubs.c 2014-07-25 20:36:06.785334575 +0200
  61055. @@ -6,31 +6,52 @@
  61056. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  61057. */
  61058. +/* Please keep the list sorted alphabetically, in ascending order
  61059. + * of the stub name! */
  61060. +
  61061. #include <errno.h>
  61062. #include <bits/wordsize.h>
  61063. #include <sys/syscall.h>
  61064. #ifdef __UCLIBC_HAS_STUBS__
  61065. -static int enosys_stub(void) __attribute_used__;
  61066. -static int enosys_stub(void)
  61067. +__attribute_used__ static int enosys_stub(void)
  61068. {
  61069. __set_errno(ENOSYS);
  61070. return -1;
  61071. }
  61072. +__attribute_used__ static int ret_enosys_stub(void)
  61073. +{
  61074. + return ENOSYS;
  61075. +}
  61076. +
  61077. #define make_stub(stub) \
  61078. link_warning(stub, #stub ": this function is not implemented") \
  61079. strong_alias(enosys_stub, stub)
  61080. +#define make_ret_stub(stub) \
  61081. + link_warning(stub, #stub ": this function is not implemented") \
  61082. + strong_alias(ret_enosys_stub, stub)
  61083. +
  61084. #ifndef __ARCH_USE_MMU__
  61085. # undef __NR_fork
  61086. #endif
  61087. -#ifndef __UCLIBC_HAS_LFS__
  61088. -# undef __NR_fadvise64
  61089. -# undef __NR_fadvise64_64
  61090. -# undef __NR_sync_file_range
  61091. +#ifdef __arm__
  61092. +# define __NR_fadvise64_64 __NR_arm_fadvise64_64
  61093. +# define __NR_fadvise64 __NR_arm_fadvise64_64
  61094. +/* ARM always provides funcs w/out syscalls; disable the stubs */
  61095. +# define __NR_ioperm 0
  61096. +# define __NR_iopl 0
  61097. +#endif
  61098. +
  61099. +#ifdef __mips__
  61100. +# define __NR_fadvise64_64 __NR_fadvise64
  61101. +#endif
  61102. +
  61103. +#ifdef __xtensa__
  61104. +# define __NR_fadvise64 __NR_fadvise64_64
  61105. #endif
  61106. #if !defined __NR_accept && !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__
  61107. @@ -45,14 +66,6 @@
  61108. make_stub(arch_prctl)
  61109. #endif
  61110. -#if !defined __NR_capget && defined __UCLIBC_LINUX_SPECIFIC__
  61111. -make_stub(capget)
  61112. -#endif
  61113. -
  61114. -#if !defined __NR_capset && defined __UCLIBC_LINUX_SPECIFIC__
  61115. -make_stub(capset)
  61116. -#endif
  61117. -
  61118. #if !defined __NR_bdflush && defined __UCLIBC_LINUX_SPECIFIC__
  61119. make_stub(bdflush)
  61120. #endif
  61121. @@ -61,11 +74,11 @@
  61122. make_stub(bind)
  61123. #endif
  61124. -#ifndef __NR_capget
  61125. +#if !defined __NR_capget && defined __UCLIBC_LINUX_SPECIFIC__
  61126. make_stub(capget)
  61127. #endif
  61128. -#ifndef __NR_capset
  61129. +#if !defined __NR_capset && defined __UCLIBC_LINUX_SPECIFIC__
  61130. make_stub(capset)
  61131. #endif
  61132. @@ -81,38 +94,44 @@
  61133. make_stub(delete_module)
  61134. #endif
  61135. -#ifndef __NR_epoll_create
  61136. +#if !defined __NR_epoll_create && defined __UCLIBC_HAS_EPOLL__ \
  61137. + && !defined __NR_epoll_create1
  61138. make_stub(epoll_create)
  61139. #endif
  61140. -#ifndef __NR_epoll_ctl
  61141. +#if !defined __NR_epoll_ctl && defined __UCLIBC_HAS_EPOLL__
  61142. make_stub(epoll_ctl)
  61143. #endif
  61144. -#ifndef __NR_epoll_wait
  61145. +#if !defined __NR_epoll_pwait && defined __UCLIBC_HAS_EPOLL__
  61146. +make_stub(epoll_pwait)
  61147. +#endif
  61148. +
  61149. +#if !defined __NR_epoll_wait && defined __UCLIBC_HAS_EPOLL__ \
  61150. + && !defined __NR_epoll_pwait
  61151. make_stub(epoll_wait)
  61152. #endif
  61153. -#if !defined __NR_eventfd && defined __UCLIBC_LINUX_SPECIFIC__
  61154. +#if !defined __NR_eventfd && !defined __NR_eventfd2 && defined __UCLIBC_LINUX_SPECIFIC__
  61155. make_stub(eventfd)
  61156. #endif
  61157. -#ifndef __NR_fdatasync
  61158. +#if !defined __NR_fdatasync && !defined __NR_osf_fdatasync
  61159. make_stub(fdatasync)
  61160. #endif
  61161. +#ifndef __NR_fgetxattr
  61162. +make_stub(fgetxattr)
  61163. +#endif
  61164. +
  61165. #ifndef __NR_flistxattr
  61166. make_stub(flistxattr)
  61167. #endif
  61168. -#ifndef __NR_fork
  61169. +#if !defined __NR_fork && !defined __NR_clone
  61170. make_stub(fork)
  61171. #endif
  61172. -#ifndef __NR_fgetxattr
  61173. -make_stub(fgetxattr)
  61174. -#endif
  61175. -
  61176. #ifndef __NR_fremovexattr
  61177. make_stub(fremovexattr)
  61178. #endif
  61179. @@ -121,7 +140,8 @@
  61180. make_stub(fsetxattr)
  61181. #endif
  61182. -#if !defined __NR_fstatfs && defined __UCLIBC_LINUX_SPECIFIC__
  61183. +#if !defined __NR_fstatfs && !defined __NR_fstatfs64 \
  61184. + && defined __UCLIBC_LINUX_SPECIFIC__
  61185. make_stub(fstatfs)
  61186. #endif
  61187. @@ -129,10 +149,6 @@
  61188. make_stub(get_kernel_syms)
  61189. #endif
  61190. -#if !defined __NR_getcpu && defined __UCLIBC_LINUX_SPECIFIC__ && ((defined __x86_64__ && !defined __UCLIBC_HAS_TLS__) || !defined __x86_64__)
  61191. -make_stub(sched_getcpu)
  61192. -#endif
  61193. -
  61194. #if !defined __NR_getpeername && !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__
  61195. make_stub(getpeername)
  61196. #endif
  61197. @@ -157,7 +173,12 @@
  61198. make_stub(init_module)
  61199. #endif
  61200. -#if !defined __NR_inotify_init && defined __UCLIBC_LINUX_SPECIFIC__
  61201. +#if !defined __NR_inotify_add_watch && defined __UCLIBC_LINUX_SPECIFIC__
  61202. +make_stub(inotify_add_watch)
  61203. +#endif
  61204. +
  61205. +#if !defined __NR_inotify_init && defined __UCLIBC_LINUX_SPECIFIC__ \
  61206. + && !defined __NR_inotify_init1
  61207. make_stub(inotify_init)
  61208. #endif
  61209. @@ -165,19 +186,15 @@
  61210. make_stub(inotify_init1)
  61211. #endif
  61212. -#if !defined __NR_inotify_add_watch && defined __UCLIBC_LINUX_SPECIFIC__
  61213. -make_stub(inotify_add_watch)
  61214. -#endif
  61215. -
  61216. #if !defined __NR_inotify_rm_watch && defined __UCLIBC_LINUX_SPECIFIC__
  61217. make_stub(inotify_rm_watch)
  61218. #endif
  61219. -#if !defined __NR_ioperm && defined __UCLIBC_LINUX_SPECIFIC__ && !defined __arm__
  61220. +#if !defined __NR_ioperm && defined __UCLIBC_LINUX_SPECIFIC__
  61221. make_stub(ioperm)
  61222. #endif
  61223. -#if !defined __NR_iopl && defined __UCLIBC_LINUX_SPECIFIC__ && !defined __arm__
  61224. +#if !defined __NR_iopl && defined __UCLIBC_LINUX_SPECIFIC__
  61225. make_stub(iopl)
  61226. #endif
  61227. @@ -213,6 +230,13 @@
  61228. make_stub(modify_ldt)
  61229. #endif
  61230. +#ifndef __NR_openat
  61231. +make_stub(openat)
  61232. +# ifdef __UCLIBC_HAS_LFS__
  61233. +make_stub(openat64)
  61234. +# endif
  61235. +#endif
  61236. +
  61237. #if !defined __NR_personality && defined __UCLIBC_LINUX_SPECIFIC__
  61238. make_stub(personality)
  61239. #endif
  61240. @@ -225,6 +249,18 @@
  61241. make_stub(pivot_root)
  61242. #endif
  61243. +#if !defined __NR_fadvise64 && defined __UCLIBC_HAS_LFS__
  61244. +make_ret_stub(posix_fadvise)
  61245. +#endif
  61246. +
  61247. +#if !defined __NR_fadvise64_64 && defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 32
  61248. +make_ret_stub(posix_fadvise64)
  61249. +#endif
  61250. +
  61251. +#ifndef __NR_madvise
  61252. +make_ret_stub(posix_madvise)
  61253. +#endif
  61254. +
  61255. #if !defined __NR_ppoll && defined __UCLIBC_LINUX_SPECIFIC__
  61256. make_stub(ppoll)
  61257. #endif
  61258. @@ -233,6 +269,10 @@
  61259. make_stub(prctl)
  61260. #endif
  61261. +#if !defined __NR_query_module && defined __UCLIBC_LINUX_MODULE_24__
  61262. +make_stub(query_module)
  61263. +#endif
  61264. +
  61265. #if !defined __NR_readahead && defined __UCLIBC_LINUX_SPECIFIC__
  61266. make_stub(readahead)
  61267. #endif
  61268. @@ -241,10 +281,6 @@
  61269. make_stub(reboot)
  61270. #endif
  61271. -#if !defined __NR_query_module && defined __UCLIBC_LINUX_MODULE_24__
  61272. -make_stub(query_module)
  61273. -#endif
  61274. -
  61275. #if !defined __NR_recv && !defined __NR_socketcall && !defined __NR_recvfrom && defined __UCLIBC_HAS_SOCKET__
  61276. make_stub(recv)
  61277. #endif
  61278. @@ -265,10 +301,18 @@
  61279. make_stub(removexattr)
  61280. #endif
  61281. +#ifndef __NR_renameat
  61282. +make_stub(renameat)
  61283. +#endif
  61284. +
  61285. #if !defined __NR_sched_getaffinity && defined __UCLIBC_LINUX_SPECIFIC__
  61286. make_stub(sched_getaffinity)
  61287. #endif
  61288. +#if !defined __NR_getcpu && defined __UCLIBC_LINUX_SPECIFIC__ && ((defined __x86_64__ && !defined __UCLIBC_HAS_TLS__) || !defined __x86_64__)
  61289. +make_stub(sched_getcpu)
  61290. +#endif
  61291. +
  61292. #if !defined __NR_sched_setaffinity && defined __UCLIBC_LINUX_SPECIFIC__
  61293. make_stub(sched_setaffinity)
  61294. #endif
  61295. @@ -277,7 +321,8 @@
  61296. make_stub(send)
  61297. #endif
  61298. -#if !defined __NR_sendfile && defined __UCLIBC_LINUX_SPECIFIC__
  61299. +#if !defined __NR_sendfile && !defined __NR_sendfile64 \
  61300. + && defined __UCLIBC_LINUX_SPECIFIC__
  61301. make_stub(sendfile)
  61302. #endif
  61303. @@ -325,6 +370,15 @@
  61304. make_stub(signalfd)
  61305. #endif
  61306. +#ifndef __NR_rt_sigtimedwait
  61307. +make_stub(sigtimedwait)
  61308. +make_stub(sigwaitinfo)
  61309. +#endif
  61310. +
  61311. +#ifndef __NR_rt_sigqueueinfo
  61312. +make_stub(sigqueue)
  61313. +#endif
  61314. +
  61315. #if !defined __NR_socket && !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__
  61316. make_stub(socket)
  61317. #endif
  61318. @@ -337,9 +391,9 @@
  61319. make_stub(socketpair)
  61320. #endif
  61321. -#ifndef __NR_rt_sigtimedwait
  61322. -make_stub(sigtimedwait)
  61323. -make_stub(sigwaitinfo)
  61324. +#if !defined __NR_stime && !defined __NR_settimeofday
  61325. +make_stub(stime)
  61326. +make_stub(settimeofday)
  61327. #endif
  61328. #if !defined __NR_splice && defined __UCLIBC_LINUX_SPECIFIC__
  61329. @@ -354,6 +408,10 @@
  61330. make_stub(swapon)
  61331. #endif
  61332. +#if !defined __NR_symlink && !defined __NR_symlinkat
  61333. +make_stub(symlink)
  61334. +#endif
  61335. +
  61336. #if !defined __NR_sync_file_range && defined __UCLIBC_LINUX_SPECIFIC__
  61337. make_stub(sync_file_range)
  61338. #endif
  61339. @@ -382,6 +440,21 @@
  61340. make_stub(timerfd_gettime)
  61341. #endif
  61342. +#ifndef __NR_utimensat
  61343. +make_stub(futimens)
  61344. +make_stub(utimensat)
  61345. +# ifndef __NR_lutimes
  61346. +make_stub(lutimes)
  61347. +# endif
  61348. +#endif
  61349. +
  61350. +#ifndef __NR_utimensat
  61351. +#if !defined __NR_utime && !defined __NR_utimes
  61352. +/*make_stub(utime) obsoleted */
  61353. +make_stub(utimes)
  61354. +#endif
  61355. +#endif
  61356. +
  61357. #if !defined __NR_umount && !defined __NR_umount2 && defined __UCLIBC_LINUX_SPECIFIC__
  61358. make_stub(umount)
  61359. #endif
  61360. @@ -394,19 +467,15 @@
  61361. make_stub(unshare)
  61362. #endif
  61363. -#ifndef __NR_utimensat
  61364. -make_stub(futimens)
  61365. -make_stub(utimensat)
  61366. -# ifndef __NR_lutimes
  61367. -make_stub(lutimes)
  61368. -# endif
  61369. +#if defined __UCLIBC_SV4_DEPRECATED__ && !defined __NR_ustat
  61370. +make_stub(ustat)
  61371. #endif
  61372. #if !defined __NR_vhangup && defined __UCLIBC_LINUX_SPECIFIC__
  61373. make_stub(vhangup)
  61374. #endif
  61375. -#ifndef __NR_vmsplice
  61376. +#if !defined __NR_vmsplice && defined __UCLIBC_LINUX_SPECIFIC__
  61377. make_stub(vmsplice)
  61378. #endif
  61379. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/symlinkat.c uClibc-git/libc/sysdeps/linux/common/symlinkat.c
  61380. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/symlinkat.c 2012-05-15 09:20:09.000000000 +0200
  61381. +++ uClibc-git/libc/sysdeps/linux/common/symlinkat.c 2014-07-25 20:36:06.785334575 +0200
  61382. @@ -11,6 +11,7 @@
  61383. #ifdef __NR_symlinkat
  61384. _syscall3(int, symlinkat, const char *, from, int, tofd, const char *, to)
  61385. +libc_hidden_def(symlinkat)
  61386. #else
  61387. /* should add emulation with symlink() and /proc/self/fd/ ... */
  61388. #endif
  61389. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/symlink.c uClibc-git/libc/sysdeps/linux/common/symlink.c
  61390. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/symlink.c 2012-05-15 09:20:09.000000000 +0200
  61391. +++ uClibc-git/libc/sysdeps/linux/common/symlink.c 2014-07-25 20:36:06.785334575 +0200
  61392. @@ -9,6 +9,19 @@
  61393. #include <sys/syscall.h>
  61394. #if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K
  61395. -#include <unistd.h>
  61396. +# include <unistd.h>
  61397. +
  61398. +# if defined __NR_symlinkat && !defined __NR_symlink
  61399. +# include <fcntl.h>
  61400. +int symlink(const char *oldpath, const char *newpath)
  61401. +{
  61402. + return symlinkat(oldpath, AT_FDCWD, newpath);
  61403. +}
  61404. +
  61405. +# elif defined(__NR_symlink)
  61406. +
  61407. _syscall2(int, symlink, const char *, oldpath, const char *, newpath)
  61408. +
  61409. +# endif
  61410. +
  61411. #endif
  61412. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sync.c uClibc-git/libc/sysdeps/linux/common/sync.c
  61413. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sync.c 2012-05-15 09:20:09.000000000 +0200
  61414. +++ uClibc-git/libc/sysdeps/linux/common/sync.c 2014-07-25 20:36:06.785334575 +0200
  61415. @@ -8,12 +8,8 @@
  61416. */
  61417. #include <sys/syscall.h>
  61418. -# if defined __USE_BSD || defined __USE_UNIX98
  61419. -#include <sys/types.h>
  61420. -#include <unistd.h>
  61421. -void sync(void)
  61422. -{
  61423. - INLINE_SYSCALL(sync, 0);
  61424. -}
  61425. +#if defined __USE_BSD || defined __USE_UNIX98
  61426. +# include <unistd.h>
  61427. +_syscall0(void, sync)
  61428. #endif
  61429. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sync_file_range.c uClibc-git/libc/sysdeps/linux/common/sync_file_range.c
  61430. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sync_file_range.c 2012-05-15 09:20:09.000000000 +0200
  61431. +++ uClibc-git/libc/sysdeps/linux/common/sync_file_range.c 2014-07-25 20:36:06.785334575 +0200
  61432. @@ -4,24 +4,34 @@
  61433. *
  61434. * Copyright (C) 2008 Bernhard Reutner-Fischer <uclibc@uclibc.org>
  61435. *
  61436. - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  61437. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  61438. */
  61439. #include <sys/syscall.h>
  61440. -#if defined __USE_GNU
  61441. -#include <fcntl.h>
  61442. +#if defined __UCLIBC_HAS_LFS__ && defined __USE_GNU
  61443. +# include <bits/wordsize.h>
  61444. +# include <endian.h>
  61445. +# include <fcntl.h>
  61446. +# include <cancel.h>
  61447. -#if defined __NR_sync_file_range && defined __UCLIBC_HAS_LFS__
  61448. -#define __NR___syscall_sync_file_range __NR_sync_file_range
  61449. -static __inline__ _syscall6(int, __syscall_sync_file_range, int, fd,
  61450. - off_t, offset_hi, off_t, offset_lo,
  61451. - off_t, nbytes_hi, off_t, nbytes_lo, unsigned int, flags)
  61452. -int sync_file_range(int fd, off64_t offset, off64_t nbytes, unsigned int flags)
  61453. +# ifdef __NR_sync_file_range2
  61454. +# undef __NR_sync_file_range
  61455. +# define __NR_sync_file_range __NR_sync_file_range2
  61456. +# endif
  61457. +
  61458. +# ifdef __NR_sync_file_range
  61459. +static int __NC(sync_file_range)(int fd, off64_t offset, off64_t nbytes, unsigned int flags)
  61460. {
  61461. - return __syscall_sync_file_range(fd,
  61462. - __LONG_LONG_PAIR((long)(offset >> 32), (long)(offset & 0xffffffff)),
  61463. - __LONG_LONG_PAIR((long)(nbytes >> 32), (long)(nbytes & 0xffffffff)),
  61464. - flags);
  61465. +# if defined __powerpc__ && __WORDSIZE == 64
  61466. + return INLINE_SYSCALL(sync_file_range, 4, fd, offset, nbytes, flags);
  61467. +# elif defined __mips__ && _MIPS_SIM == _ABIO32
  61468. + return INLINE_SYSCALL(sync_file_range, 7, fd, 0,
  61469. + OFF64_HI_LO(offset), OFF64_HI_LO(nbytes), flags);
  61470. +# else
  61471. + return INLINE_SYSCALL(sync_file_range, 6, fd,
  61472. + OFF64_HI_LO(offset), OFF64_HI_LO(nbytes), flags);
  61473. +# endif
  61474. }
  61475. -#endif
  61476. +CANCELLABLE_SYSCALL(int, sync_file_range, (int fd, off64_t offset, off64_t nbytes, unsigned int flags), (fd, offset, nbytes, flags))
  61477. +# endif
  61478. #endif
  61479. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sys/acct.h uClibc-git/libc/sysdeps/linux/common/sys/acct.h
  61480. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sys/acct.h 2012-05-15 09:20:09.000000000 +0200
  61481. +++ uClibc-git/libc/sysdeps/linux/common/sys/acct.h 2014-07-25 20:36:06.801334659 +0200
  61482. @@ -1,4 +1,4 @@
  61483. -/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
  61484. +/* Copyright (C) 1996, 1997, 1998, 1999, 2007 Free Software Foundation, Inc.
  61485. This file is part of the GNU C Library.
  61486. The GNU C Library is free software; you can redistribute it and/or
  61487. @@ -12,15 +12,15 @@
  61488. Lesser General Public License for more details.
  61489. You should have received a copy of the GNU Lesser General Public
  61490. - License along with the GNU C Library; if not, write to the Free
  61491. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  61492. - 02111-1307 USA. */
  61493. + License along with the GNU C Library; if not, see
  61494. + <http://www.gnu.org/licenses/>. */
  61495. #ifndef _SYS_ACCT_H
  61496. #define _SYS_ACCT_H 1
  61497. #include <features.h>
  61498. +#include <endian.h>
  61499. #define __need_time_t
  61500. #include <time.h>
  61501. #include <sys/types.h>
  61502. @@ -38,25 +38,51 @@
  61503. typedef u_int16_t comp_t;
  61504. struct acct
  61505. - {
  61506. - char ac_flag; /* Accounting flags. */
  61507. - u_int16_t ac_uid; /* Accounting user ID. */
  61508. - u_int16_t ac_gid; /* Accounting group ID. */
  61509. - u_int16_t ac_tty; /* Controlling tty. */
  61510. - u_int32_t ac_btime; /* Beginning time. */
  61511. - comp_t ac_utime; /* Accounting user time. */
  61512. - comp_t ac_stime; /* Accounting system time. */
  61513. - comp_t ac_etime; /* Accounting elapsed time. */
  61514. - comp_t ac_mem; /* Accounting average memory usage. */
  61515. - comp_t ac_io; /* Accounting chars transferred. */
  61516. - comp_t ac_rw; /* Accounting blocks read or written. */
  61517. - comp_t ac_minflt; /* Accounting minor pagefaults. */
  61518. - comp_t ac_majflt; /* Accounting major pagefaults. */
  61519. - comp_t ac_swaps; /* Accounting number of swaps. */
  61520. - u_int32_t ac_exitcode; /* Accounting process exitcode. */
  61521. - char ac_comm[ACCT_COMM+1]; /* Accounting command name. */
  61522. - char ac_pad[10]; /* Accounting padding bytes. */
  61523. - };
  61524. +{
  61525. + char ac_flag; /* Flags. */
  61526. + u_int16_t ac_uid; /* Real user ID. */
  61527. + u_int16_t ac_gid; /* Real group ID. */
  61528. + u_int16_t ac_tty; /* Controlling terminal. */
  61529. + u_int32_t ac_btime; /* Beginning time. */
  61530. + comp_t ac_utime; /* User time. */
  61531. + comp_t ac_stime; /* System time. */
  61532. + comp_t ac_etime; /* Elapsed time. */
  61533. + comp_t ac_mem; /* Average memory usage. */
  61534. + comp_t ac_io; /* Chars transferred. */
  61535. + comp_t ac_rw; /* Blocks read or written. */
  61536. + comp_t ac_minflt; /* Minor pagefaults. */
  61537. + comp_t ac_majflt; /* Major pagefaults. */
  61538. + comp_t ac_swaps; /* Number of swaps. */
  61539. + u_int32_t ac_exitcode; /* Process exitcode. */
  61540. + char ac_comm[ACCT_COMM+1]; /* Command name. */
  61541. + char ac_pad[10]; /* Padding bytes. */
  61542. +};
  61543. +
  61544. +#if 0
  61545. +struct acct_v3
  61546. +{
  61547. + char ac_flag; /* Flags */
  61548. + char ac_version; /* Always set to ACCT_VERSION */
  61549. + u_int16_t ac_tty; /* Control Terminal */
  61550. + u_int32_t ac_exitcode; /* Exitcode */
  61551. + u_int32_t ac_uid; /* Real User ID */
  61552. + u_int32_t ac_gid; /* Real Group ID */
  61553. + u_int32_t ac_pid; /* Process ID */
  61554. + u_int32_t ac_ppid; /* Parent Process ID */
  61555. + u_int32_t ac_btime; /* Process Creation Time */
  61556. + float ac_etime; /* Elapsed Time */
  61557. + comp_t ac_utime; /* User Time */
  61558. + comp_t ac_stime; /* System Time */
  61559. + comp_t ac_mem; /* Average Memory Usage */
  61560. + comp_t ac_io; /* Chars Transferred */
  61561. + comp_t ac_rw; /* Blocks Read or Written */
  61562. + comp_t ac_minflt; /* Minor Pagefaults */
  61563. + comp_t ac_majflt; /* Major Pagefaults */
  61564. + comp_t ac_swaps; /* Number of Swaps */
  61565. + char ac_comm[ACCT_COMM]; /* Command Name */
  61566. +};
  61567. +#endif
  61568. +
  61569. enum
  61570. {
  61571. @@ -66,11 +92,17 @@
  61572. AXSIG = 0x10 /* Killed by a signal. */
  61573. };
  61574. +#if __BYTE_ORDER == __BIG_ENDIAN
  61575. +# define ACCT_BYTEORDER 0x80 /* Accounting file is big endian. */
  61576. +#else
  61577. +# define ACCT_BYTEORDER 0x00 /* Accounting file is little endian. */
  61578. +#endif
  61579. +
  61580. #define AHZ 100
  61581. /* Switch process accounting on and off. */
  61582. -extern int acct (__const char *__filename) __THROW;
  61583. +extern int acct (const char *__filename) __THROW;
  61584. __END_DECLS
  61585. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sys/epoll.h uClibc-git/libc/sysdeps/linux/common/sys/epoll.h
  61586. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sys/epoll.h 2012-05-15 09:20:09.000000000 +0200
  61587. +++ uClibc-git/libc/sysdeps/linux/common/sys/epoll.h 2014-07-25 20:36:06.801334659 +0200
  61588. @@ -36,7 +36,6 @@
  61589. # define __EPOLL_PACKED
  61590. #endif
  61591. -
  61592. enum EPOLL_EVENTS
  61593. {
  61594. EPOLLIN = 0x001,
  61595. @@ -97,7 +96,7 @@
  61596. returned by epoll_create() should be closed with close(). */
  61597. extern int epoll_create (int __size) __THROW;
  61598. -/* Same as epoll_create but with an FLAGS parameter. The unused SIZE
  61599. +/* Same as epoll_create but with a FLAGS parameter. The unused SIZE
  61600. parameter has been dropped. */
  61601. extern int epoll_create1 (int __flags) __THROW;
  61602. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sys/eventfd.h uClibc-git/libc/sysdeps/linux/common/sys/eventfd.h
  61603. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sys/eventfd.h 2012-05-15 09:20:09.000000000 +0200
  61604. +++ uClibc-git/libc/sysdeps/linux/common/sys/eventfd.h 2014-07-25 20:36:06.801334659 +0200
  61605. @@ -1,4 +1,4 @@
  61606. -/* Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
  61607. +/* Copyright (C) 2007-2013 Free Software Foundation, Inc.
  61608. This file is part of the GNU C Library.
  61609. The GNU C Library is free software; you can redistribute it and/or
  61610. @@ -12,30 +12,20 @@
  61611. Lesser General Public License for more details.
  61612. You should have received a copy of the GNU Lesser General Public
  61613. - License along with the GNU C Library; if not, write to the Free
  61614. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  61615. - 02111-1307 USA. */
  61616. + License along with the GNU C Library; if not, see
  61617. + <http://www.gnu.org/licenses/>. */
  61618. #ifndef _SYS_EVENTFD_H
  61619. #define _SYS_EVENTFD_H 1
  61620. #include <stdint.h>
  61621. +/* Get the platform-dependent flags. */
  61622. +#include <bits/eventfd.h>
  61623. /* Type for event counter. */
  61624. typedef uint64_t eventfd_t;
  61625. -/* Flags for signalfd. */
  61626. -enum
  61627. - {
  61628. - EFD_SEMAPHORE = 1,
  61629. -#define EFD_SEMAPHORE EFD_SEMAPHORE
  61630. - EFD_CLOEXEC = 02000000,
  61631. -#define EFD_CLOEXEC EFD_CLOEXEC
  61632. - EFD_NONBLOCK = 04000
  61633. -#define EFD_NONBLOCK EFD_NONBLOCK
  61634. - };
  61635. -
  61636. __BEGIN_DECLS
  61637. @@ -43,6 +33,16 @@
  61638. value to COUNT. */
  61639. extern int eventfd (int __count, int __flags) __THROW;
  61640. +#if 0 /* not (yet) implemented in uClibc */
  61641. +
  61642. +/* Read event counter and possibly wait for events. */
  61643. +extern int eventfd_read (int __fd, eventfd_t *__value);
  61644. +
  61645. +/* Increment event counter. */
  61646. +extern int eventfd_write (int __fd, eventfd_t __value);
  61647. +
  61648. +#endif
  61649. +
  61650. __END_DECLS
  61651. #endif /* sys/eventfd.h */
  61652. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sys/prctl.h uClibc-git/libc/sysdeps/linux/common/sys/prctl.h
  61653. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sys/prctl.h 2012-05-15 09:20:09.000000000 +0200
  61654. +++ uClibc-git/libc/sysdeps/linux/common/sys/prctl.h 2014-07-25 20:36:06.801334659 +0200
  61655. @@ -12,9 +12,8 @@
  61656. Lesser General Public License for more details.
  61657. You should have received a copy of the GNU Lesser General Public
  61658. - License along with the GNU C Library; if not, write to the Free
  61659. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  61660. - 02111-1307 USA. */
  61661. + License along with the GNU C Library; if not, see
  61662. + <http://www.gnu.org/licenses/>. */
  61663. #ifndef _SYS_PRCTL_H
  61664. #define _SYS_PRCTL_H 1
  61665. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sys/ptrace.h uClibc-git/libc/sysdeps/linux/common/sys/ptrace.h
  61666. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sys/ptrace.h 2012-05-15 09:20:09.000000000 +0200
  61667. +++ uClibc-git/libc/sysdeps/linux/common/sys/ptrace.h 2014-07-25 20:36:06.801334659 +0200
  61668. @@ -1,5 +1,5 @@
  61669. /* `ptrace' debugger support interface. Linux version.
  61670. - Copyright (C) 1996-1999,2000,2006,2007 Free Software Foundation, Inc.
  61671. + Copyright (C) 1996-2012 Free Software Foundation, Inc.
  61672. This file is part of the GNU C Library.
  61673. The GNU C Library is free software; you can redistribute it and/or
  61674. @@ -13,9 +13,8 @@
  61675. Lesser General Public License for more details.
  61676. You should have received a copy of the GNU Lesser General Public
  61677. - License along with the GNU C Library; if not, write to the Free
  61678. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  61679. - 02111-1307 USA. */
  61680. + License along with the GNU C Library; if not, see
  61681. + <http://www.gnu.org/licenses/>. */
  61682. #ifndef _SYS_PTRACE_H
  61683. #define _SYS_PTRACE_H 1
  61684. @@ -125,13 +124,40 @@
  61685. #define PT_GETSIGINFO PTRACE_GETSIGINFO
  61686. /* Set new siginfo for process. */
  61687. - PTRACE_SETSIGINFO = 0x4203
  61688. + PTRACE_SETSIGINFO = 0x4203,
  61689. #define PT_SETSIGINFO PTRACE_SETSIGINFO
  61690. +
  61691. + /* Get register content. */
  61692. + PTRACE_GETREGSET = 0x4204,
  61693. +#define PTRACE_GETREGSET PTRACE_GETREGSET
  61694. +
  61695. + /* Set register content. */
  61696. + PTRACE_SETREGSET = 0x4205,
  61697. +#define PTRACE_SETREGSET PTRACE_SETREGSET
  61698. +
  61699. + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect
  61700. + signal or group stop state. */
  61701. + PTRACE_SEIZE = 0x4206,
  61702. +#define PTRACE_SEIZE PTRACE_SEIZE
  61703. +
  61704. + /* Trap seized tracee. */
  61705. + PTRACE_INTERRUPT = 0x4207,
  61706. +#define PTRACE_INTERRUPT PTRACE_INTERRUPT
  61707. +
  61708. + /* Wait for next group event. */
  61709. + PTRACE_LISTEN = 0x4208
  61710. };
  61711. +/* Flag for PTRACE_LISTEN. */
  61712. +enum __ptrace_flags
  61713. +{
  61714. + PTRACE_SEIZE_DEVEL = 0x80000000
  61715. +};
  61716. +
  61717. /* Options set using PTRACE_SETOPTIONS. */
  61718. -enum __ptrace_setoptions {
  61719. +enum __ptrace_setoptions
  61720. +{
  61721. PTRACE_O_TRACESYSGOOD = 0x00000001,
  61722. PTRACE_O_TRACEFORK = 0x00000002,
  61723. PTRACE_O_TRACEVFORK = 0x00000004,
  61724. @@ -139,17 +165,20 @@
  61725. PTRACE_O_TRACEEXEC = 0x00000010,
  61726. PTRACE_O_TRACEVFORKDONE = 0x00000020,
  61727. PTRACE_O_TRACEEXIT = 0x00000040,
  61728. - PTRACE_O_MASK = 0x0000007f
  61729. + PTRACE_O_TRACESECCOMP = 0x00000080,
  61730. + PTRACE_O_MASK = 0x000000ff
  61731. };
  61732. /* Wait extended result codes for the above trace options. */
  61733. -enum __ptrace_eventcodes {
  61734. +enum __ptrace_eventcodes
  61735. +{
  61736. PTRACE_EVENT_FORK = 1,
  61737. PTRACE_EVENT_VFORK = 2,
  61738. PTRACE_EVENT_CLONE = 3,
  61739. PTRACE_EVENT_EXEC = 4,
  61740. PTRACE_EVENT_VFORK_DONE = 5,
  61741. - PTRACE_EVENT_EXIT = 6
  61742. + PTRACE_EVENT_EXIT = 6,
  61743. + PTRAVE_EVENT_SECCOMP = 7
  61744. };
  61745. /* Perform process tracing functions. REQUEST is one of the values
  61746. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/__syscall_fcntl64.c uClibc-git/libc/sysdeps/linux/common/__syscall_fcntl64.c
  61747. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/__syscall_fcntl64.c 2012-05-15 09:20:09.000000000 +0200
  61748. +++ uClibc-git/libc/sysdeps/linux/common/__syscall_fcntl64.c 2014-07-25 20:36:06.757334429 +0200
  61749. @@ -7,14 +7,18 @@
  61750. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  61751. */
  61752. +#include <_lfs_64.h>
  61753. #include <sys/syscall.h>
  61754. -#include <stdarg.h>
  61755. -#include <fcntl.h>
  61756. +#include <bits/wordsize.h>
  61757. -#if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64
  61758. +#if defined __NR_fcntl64 && __WORDSIZE == 32
  61759. +# include <stdarg.h>
  61760. +# include <cancel.h>
  61761. +# include <fcntl.h>
  61762. +
  61763. +# define __NR___fcntl64_nocancel __NR_fcntl64
  61764. +_syscall3(int, __NC(fcntl64), int, fd, int, cmd, long, arg)
  61765. -#define __NR___syscall_fcntl64 __NR_fcntl64
  61766. -static __inline__ _syscall3(int, __syscall_fcntl64, int, fd, int, cmd, long, arg)
  61767. int fcntl64(int fd, int cmd, ...)
  61768. {
  61769. long arg;
  61770. @@ -24,7 +28,15 @@
  61771. arg = va_arg(list, long);
  61772. va_end(list);
  61773. - return (__syscall_fcntl64(fd, cmd, arg));
  61774. + if (SINGLE_THREAD_P || (cmd != F_SETLKW64))
  61775. + return __NC(fcntl64)(fd, cmd, arg);
  61776. +# ifdef __NEW_THREADS
  61777. + int oldtype = LIBC_CANCEL_ASYNC();
  61778. + int result = __NC(fcntl64)(fd, cmd, arg);
  61779. + LIBC_CANCEL_RESET(oldtype);
  61780. + return result;
  61781. +# endif
  61782. }
  61783. -libc_hidden_def(fcntl64)
  61784. +lt_strong_alias(fcntl64)
  61785. +lt_libc_hidden(fcntl64)
  61786. #endif
  61787. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/__syscall_fcntl.c uClibc-git/libc/sysdeps/linux/common/__syscall_fcntl.c
  61788. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/__syscall_fcntl.c 2012-05-15 09:20:09.000000000 +0200
  61789. +++ uClibc-git/libc/sysdeps/linux/common/__syscall_fcntl.c 2014-07-25 20:36:06.757334429 +0200
  61790. @@ -10,82 +10,61 @@
  61791. #include <sys/syscall.h>
  61792. #include <stdarg.h>
  61793. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  61794. -#include <sysdep-cancel.h> /* Must come before <fcntl.h>. */
  61795. -#endif
  61796. +#include <cancel.h> /* Must come before <fcntl.h>. */
  61797. #include <fcntl.h>
  61798. #include <bits/wordsize.h>
  61799. -extern __typeof(fcntl) __libc_fcntl;
  61800. -libc_hidden_proto(__libc_fcntl)
  61801. -
  61802. -int __fcntl_nocancel (int fd, int cmd, ...)
  61803. +int __NC(fcntl)(int fd, int cmd, long arg)
  61804. {
  61805. - va_list ap;
  61806. - void *arg;
  61807. -
  61808. - va_start (ap, cmd);
  61809. - arg = va_arg (ap, void *);
  61810. - va_end (ap);
  61811. -
  61812. -# if __WORDSIZE == 32
  61813. +#if __WORDSIZE == 32
  61814. if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64) {
  61815. -# if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64
  61816. - return INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
  61817. -# else
  61818. +# if (defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64) || !defined __NR_fcntl
  61819. + return INLINE_SYSCALL(fcntl64, 3, fd, cmd, arg);
  61820. +# else
  61821. __set_errno(ENOSYS);
  61822. return -1;
  61823. -# endif
  61824. - }
  61825. # endif
  61826. - return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
  61827. + }
  61828. +#endif
  61829. +
  61830. +#if defined __NR_fcntl
  61831. + return INLINE_SYSCALL(fcntl, 3, fd, cmd, arg);
  61832. +#else
  61833. + __set_errno(ENOSYS);
  61834. + return -1;
  61835. +#endif
  61836. }
  61837. -libc_hidden_def(__fcntl_nocancel)
  61838. -int __libc_fcntl (int fd, int cmd, ...)
  61839. +int fcntl(int fd, int cmd, ...)
  61840. {
  61841. va_list ap;
  61842. - void *arg;
  61843. + long arg;
  61844. va_start (ap, cmd);
  61845. - arg = va_arg (ap, void *);
  61846. + arg = va_arg (ap, long);
  61847. va_end (ap);
  61848. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  61849. if (SINGLE_THREAD_P || (cmd != F_SETLKW && cmd != F_SETLKW64))
  61850. -# if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64
  61851. - return INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
  61852. -# else
  61853. - return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
  61854. -# endif
  61855. -
  61856. +#if defined __NR_fcntl
  61857. + return __NC(fcntl)(fd, cmd, arg);
  61858. +#else
  61859. + return INLINE_SYSCALL(fcntl64, 3, fd, cmd, arg);
  61860. +#endif
  61861. +#ifdef __NEW_THREADS
  61862. int oldtype = LIBC_CANCEL_ASYNC ();
  61863. -
  61864. -# if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64
  61865. - int result = INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
  61866. -# else
  61867. - int result = INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
  61868. -# endif
  61869. -
  61870. +#if defined __NR_fcntl
  61871. + int result = __NC(fcntl)(fd, cmd, arg);
  61872. +#else
  61873. + int result = INLINE_SYSCALL(fcntl64, 3, fd, cmd, arg);
  61874. +#endif
  61875. LIBC_CANCEL_RESET (oldtype);
  61876. -
  61877. return result;
  61878. -#else
  61879. -# if __WORDSIZE == 32
  61880. - if (cmd == F_GETLK64 || cmd == F_SETLK64 || cmd == F_SETLKW64) {
  61881. -# if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64
  61882. - return INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
  61883. -# else
  61884. - __set_errno(ENOSYS);
  61885. - return -1;
  61886. -# endif
  61887. - }
  61888. -# endif
  61889. - return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
  61890. #endif
  61891. }
  61892. -libc_hidden_def(__libc_fcntl)
  61893. -
  61894. -libc_hidden_proto(fcntl)
  61895. -weak_alias(__libc_fcntl,fcntl)
  61896. -libc_hidden_weak(fcntl)
  61897. +lt_strong_alias(fcntl)
  61898. +lt_libc_hidden(fcntl)
  61899. +#if defined __UCLIBC_HAS_LFS__ && !defined __NR_fcntl64 && __WORDSIZE == 32
  61900. +strong_alias_untyped(fcntl,fcntl64)
  61901. +lt_strong_alias(fcntl64)
  61902. +lt_libc_hidden(fcntl64)
  61903. +#endif
  61904. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/__syscall_rt_sigaction.c uClibc-git/libc/sysdeps/linux/common/__syscall_rt_sigaction.c
  61905. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/__syscall_rt_sigaction.c 2012-05-15 09:20:09.000000000 +0200
  61906. +++ uClibc-git/libc/sysdeps/linux/common/__syscall_rt_sigaction.c 2014-07-25 20:36:06.757334429 +0200
  61907. @@ -12,11 +12,8 @@
  61908. #ifdef __NR_rt_sigaction
  61909. #include <signal.h>
  61910. -int __syscall_rt_sigaction (int __signum, const struct sigaction *__act,
  61911. - struct sigaction *__oldact, size_t __size);
  61912. -
  61913. #define __NR___syscall_rt_sigaction __NR_rt_sigaction
  61914. _syscall4(int, __syscall_rt_sigaction, int, signum,
  61915. - const struct sigaction *, act, struct sigaction *, oldact,
  61916. - size_t, size)
  61917. + const struct sigaction *, act, struct sigaction *, oldact,
  61918. + size_t, size)
  61919. #endif
  61920. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/syscalls.h uClibc-git/libc/sysdeps/linux/common/syscalls.h
  61921. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/syscalls.h 2012-05-15 09:20:09.000000000 +0200
  61922. +++ uClibc-git/libc/sysdeps/linux/common/syscalls.h 1970-01-01 01:00:00.000000000 +0100
  61923. @@ -1,24 +0,0 @@
  61924. -/* vi: set sw=4 ts=4: */
  61925. -/*
  61926. - * Common header file for uClibc syscalls
  61927. - *
  61928. - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  61929. - *
  61930. - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  61931. - */
  61932. -
  61933. -#define _LARGEFILE64_SOURCE
  61934. -#include <features.h>
  61935. -#include <errno.h>
  61936. -#include <sys/types.h>
  61937. -#include <sys/syscall.h>
  61938. -#include <endian.h>
  61939. -
  61940. -#undef __OPTIMIZE__
  61941. -/* We absolutely do _NOT_ want interfaces silently
  61942. - * being renamed under us or very bad things will happen... */
  61943. -#ifdef __USE_FILE_OFFSET64
  61944. -# undef __USE_FILE_OFFSET64
  61945. -#endif
  61946. -
  61947. -#include <bits/kernel_types.h>
  61948. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/__syscall_sigaction.c uClibc-git/libc/sysdeps/linux/common/__syscall_sigaction.c
  61949. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/__syscall_sigaction.c 2012-05-15 09:20:09.000000000 +0200
  61950. +++ uClibc-git/libc/sysdeps/linux/common/__syscall_sigaction.c 2014-07-25 20:36:06.757334429 +0200
  61951. @@ -12,8 +12,7 @@
  61952. #ifndef __NR_rt_sigaction
  61953. #define __NR___syscall_sigaction __NR_sigaction
  61954. #include <signal.h>
  61955. -int __syscall_sigaction (int __signum, const struct sigaction *__act, struct sigaction *__oldact) attribute_hidden;
  61956. _syscall3(int, __syscall_sigaction, int, signum, const struct sigaction *,
  61957. - act, struct sigaction *, oldact)
  61958. + act, struct sigaction *, oldact)
  61959. #endif
  61960. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sysdep.h uClibc-git/libc/sysdeps/linux/common/sysdep.h
  61961. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sysdep.h 2012-05-15 09:20:09.000000000 +0200
  61962. +++ uClibc-git/libc/sysdeps/linux/common/sysdep.h 2014-07-25 20:36:06.801334659 +0200
  61963. @@ -13,9 +13,8 @@
  61964. Lesser General Public License for more details.
  61965. You should have received a copy of the GNU Lesser General Public
  61966. - License along with the GNU C Library; if not, write to the Free
  61967. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  61968. - 02111-1307 USA. */
  61969. + License along with the GNU C Library; if not, see
  61970. + <http://www.gnu.org/licenses/>. */
  61971. #include <sys/syscall.h>
  61972. @@ -49,6 +48,8 @@
  61973. #define JUMPTARGET(sym) sym
  61974. #endif
  61975. +#define ret_ERRVAL ret
  61976. +
  61977. /* Macros to generate eh_frame unwind information. */
  61978. # ifdef HAVE_ASM_CFI_DIRECTIVES
  61979. # define cfi_sections(sect...) .cfi_sections sect
  61980. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/sysinfo.c uClibc-git/libc/sysdeps/linux/common/sysinfo.c
  61981. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/sysinfo.c 2012-05-15 09:20:09.000000000 +0200
  61982. +++ uClibc-git/libc/sysdeps/linux/common/sysinfo.c 2014-07-25 20:36:06.801334659 +0200
  61983. @@ -8,5 +8,8 @@
  61984. */
  61985. #include <sys/syscall.h>
  61986. -#include <sys/sysinfo.h>
  61987. +
  61988. +#ifdef __NR_sysinfo
  61989. +# include <sys/sysinfo.h>
  61990. _syscall1(int, sysinfo, struct sysinfo *, info)
  61991. +#endif
  61992. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/tee.c uClibc-git/libc/sysdeps/linux/common/tee.c
  61993. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/tee.c 2012-05-15 09:20:09.000000000 +0200
  61994. +++ uClibc-git/libc/sysdeps/linux/common/tee.c 2014-07-25 20:36:06.801334659 +0200
  61995. @@ -8,9 +8,10 @@
  61996. */
  61997. #include <sys/syscall.h>
  61998. -#include <fcntl.h>
  61999. -#ifdef __NR_tee
  62000. +#if defined __NR_tee && defined __USE_GNU
  62001. +# include <fcntl.h>
  62002. +
  62003. _syscall4(ssize_t, tee, int, __fdin, int, __fdout, size_t, __len,
  62004. - unsigned int, __flags)
  62005. + unsigned int, __flags)
  62006. #endif
  62007. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/time.c uClibc-git/libc/sysdeps/linux/common/time.c
  62008. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/time.c 2012-05-15 09:20:09.000000000 +0200
  62009. +++ uClibc-git/libc/sysdeps/linux/common/time.c 2014-07-25 20:36:06.801334659 +0200
  62010. @@ -9,12 +9,11 @@
  62011. #include <sys/syscall.h>
  62012. #include <time.h>
  62013. -#include <sys/time.h>
  62014. -
  62015. #ifdef __NR_time
  62016. _syscall_noerr1(time_t, time, time_t *, t)
  62017. #else
  62018. +# include <sys/time.h>
  62019. time_t time(time_t * t)
  62020. {
  62021. time_t result;
  62022. @@ -25,9 +24,8 @@
  62023. */
  62024. gettimeofday(&tv, NULL);
  62025. result = (time_t) tv.tv_sec;
  62026. - if (t != NULL) {
  62027. + if (t != NULL)
  62028. *t = result;
  62029. - }
  62030. return result;
  62031. }
  62032. #endif
  62033. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/times.c uClibc-git/libc/sysdeps/linux/common/times.c
  62034. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/times.c 2012-05-15 09:20:09.000000000 +0200
  62035. +++ uClibc-git/libc/sysdeps/linux/common/times.c 2014-07-25 20:36:06.801334659 +0200
  62036. @@ -10,6 +10,5 @@
  62037. #include <sys/syscall.h>
  62038. #include <sys/times.h>
  62039. -
  62040. _syscall_noerr1(clock_t, times, struct tms *, buf)
  62041. libc_hidden_def(times)
  62042. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/truncate64.c uClibc-git/libc/sysdeps/linux/common/truncate64.c
  62043. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/truncate64.c 2012-05-15 09:20:09.000000000 +0200
  62044. +++ uClibc-git/libc/sysdeps/linux/common/truncate64.c 2014-07-25 20:36:06.801334659 +0200
  62045. @@ -7,49 +7,35 @@
  62046. * and on 32 bit machines this sends things into the kernel as
  62047. * two 32-bit arguments (high and low 32 bits of length) that
  62048. * are ordered based on endianess. It turns out endian.h has
  62049. - * just the macro we need to order things, __LONG_LONG_PAIR.
  62050. + * just the macro we need to order things, OFF64_HI_LO.
  62051. */
  62052. -#include <features.h>
  62053. -#include <unistd.h>
  62054. -#include <errno.h>
  62055. -#include <endian.h>
  62056. -#include <stdint.h>
  62057. -#include <sys/types.h>
  62058. +#include <_lfs_64.h>
  62059. #include <sys/syscall.h>
  62060. +#include <unistd.h>
  62061. -#if defined __UCLIBC_HAS_LFS__
  62062. -
  62063. -#if defined __NR_truncate64
  62064. -
  62065. -#if __WORDSIZE == 64
  62066. +#ifdef __NR_truncate64
  62067. +# include <bits/wordsize.h>
  62068. -/* For a 64 bit machine, life is simple... */
  62069. +# if __WORDSIZE == 64
  62070. _syscall2(int, truncate64, const char *, path, __off64_t, length)
  62071. -
  62072. -#elif __WORDSIZE == 32
  62073. -
  62074. -/* The exported truncate64 function. */
  62075. +# elif __WORDSIZE == 32
  62076. +# include <endian.h>
  62077. +# include <stdint.h>
  62078. int truncate64(const char * path, __off64_t length)
  62079. {
  62080. - uint32_t low = length & 0xffffffff;
  62081. - uint32_t high = length >> 32;
  62082. -#if defined(__UCLIBC_TRUNCATE64_HAS_4_ARGS__)
  62083. - return INLINE_SYSCALL(truncate64, 4, path, 0,
  62084. - __LONG_LONG_PAIR(high, low));
  62085. -#else
  62086. - return INLINE_SYSCALL(truncate64, 3, path,
  62087. - __LONG_LONG_PAIR(high, low));
  62088. -#endif
  62089. +# if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
  62090. + return INLINE_SYSCALL(truncate64, 4, path, 0, OFF64_HI_LO(length));
  62091. +# else
  62092. + return INLINE_SYSCALL(truncate64, 3, path, OFF64_HI_LO(length));
  62093. +# endif
  62094. }
  62095. +# else
  62096. +# error Your machine is not 64 bit nor 32 bit, I am dazed and confused.
  62097. +# endif
  62098. -#else /* __WORDSIZE */
  62099. -#error Your machine is not 64 bit nor 32 bit, I am dazed and confused.
  62100. -#endif /* __WORDSIZE */
  62101. -
  62102. -#else /* __NR_truncate64 */
  62103. -
  62104. -
  62105. +#else
  62106. +# include <errno.h>
  62107. int truncate64(const char * path, __off64_t length)
  62108. {
  62109. __off_t x = (__off_t) length;
  62110. @@ -64,5 +50,4 @@
  62111. }
  62112. #endif /* __NR_truncate64 */
  62113. -
  62114. -#endif /* __UCLIBC_HAS_LFS__ */
  62115. +libc_hidden_def(truncate64)
  62116. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/truncate.c uClibc-git/libc/sysdeps/linux/common/truncate.c
  62117. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/truncate.c 2012-05-15 09:20:09.000000000 +0200
  62118. +++ uClibc-git/libc/sysdeps/linux/common/truncate.c 2014-07-25 20:36:06.801334659 +0200
  62119. @@ -10,6 +10,25 @@
  62120. #include <sys/syscall.h>
  62121. #include <unistd.h>
  62122. +#if defined(__NR_truncate64) && !defined(__NR_truncate)
  62123. +# include <endian.h>
  62124. +# include <stdint.h>
  62125. +int truncate(const char *path, __off_t length)
  62126. +{
  62127. +# if defined __UCLIBC_HAS_LFS
  62128. + return truncate64(path, length);
  62129. +# elif __WORDSIZE == 32
  62130. +# if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
  62131. + return INLINE_SYSCALL(truncate64, 4, path, 0, OFF_HI_LO(length));
  62132. +# else
  62133. + return INLINE_SYSCALL(truncate64, 3, path, OFF_HI_LO(length));
  62134. +# endif
  62135. +# endif
  62136. +}
  62137. +libc_hidden_def(truncate);
  62138. +
  62139. +#else
  62140. _syscall2(int, truncate, const char *, path, __off_t, length)
  62141. libc_hidden_def(truncate)
  62142. +#endif
  62143. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/umask.c uClibc-git/libc/sysdeps/linux/common/umask.c
  62144. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/umask.c 2012-05-15 09:20:09.000000000 +0200
  62145. +++ uClibc-git/libc/sysdeps/linux/common/umask.c 2014-07-25 20:36:06.801334659 +0200
  62146. @@ -10,10 +10,4 @@
  62147. #include <sys/syscall.h>
  62148. #include <sys/stat.h>
  62149. -#define __NR___syscall_umask __NR_umask
  62150. -static __inline__ _syscall1(__kernel_mode_t, __syscall_umask, __kernel_mode_t, mode)
  62151. -
  62152. -mode_t umask(mode_t mode)
  62153. -{
  62154. - return __syscall_umask(mode);
  62155. -}
  62156. +_syscall_noerr1(mode_t, umask, mode_t, mode)
  62157. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/umount2.c uClibc-git/libc/sysdeps/linux/common/umount2.c
  62158. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/umount2.c 2012-05-15 09:20:09.000000000 +0200
  62159. +++ uClibc-git/libc/sysdeps/linux/common/umount2.c 2014-07-25 20:36:06.801334659 +0200
  62160. @@ -9,9 +9,8 @@
  62161. #include <sys/syscall.h>
  62162. -#if defined __USE_GNU
  62163. -#include <sys/mount.h>
  62164. -#ifdef __NR_umount2 /* Old kernels don't have umount2 */
  62165. +#if defined __UCLIBC_LINUX_SPECIFIC__ && defined __NR_umount2
  62166. +# include <sys/mount.h>
  62167. _syscall2(int, umount2, const char *, special_file, int, flags)
  62168. -#endif
  62169. +libc_hidden_def(umount2)
  62170. #endif
  62171. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/umount.c uClibc-git/libc/sysdeps/linux/common/umount.c
  62172. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/umount.c 2012-05-15 09:20:09.000000000 +0200
  62173. +++ uClibc-git/libc/sysdeps/linux/common/umount.c 2014-07-25 20:36:06.801334659 +0200
  62174. @@ -9,24 +9,15 @@
  62175. #include <sys/syscall.h>
  62176. -#if defined __USE_GNU
  62177. #include <sys/mount.h>
  62178. -
  62179. -/* arch provides umount() syscall */
  62180. #ifdef __NR_umount
  62181. -
  62182. _syscall1(int, umount, const char *, specialfile)
  62183. -
  62184. -/* arch provides umount2() syscall */
  62185. #elif defined __NR_umount2
  62186. -
  62187. -# define __NR___syscall_umount2 __NR_umount2
  62188. -static __inline__ _syscall2(int, __syscall_umount2, const char *, special_file, int, flags)
  62189. -
  62190. +# ifndef __UCLIBC_LINUX_SPECIFIC__
  62191. +static __always_inline _syscall2(int, umount2, const char *, special_file, int, flags)
  62192. +# endif
  62193. int umount(const char *special_file)
  62194. {
  62195. - return (__syscall_umount2(special_file, 0));
  62196. + return umount2(special_file, 0);
  62197. }
  62198. -
  62199. -#endif
  62200. #endif
  62201. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/uname.c uClibc-git/libc/sysdeps/linux/common/uname.c
  62202. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/uname.c 2012-05-15 09:20:09.000000000 +0200
  62203. +++ uClibc-git/libc/sysdeps/linux/common/uname.c 2014-07-25 20:36:06.801334659 +0200
  62204. @@ -10,6 +10,5 @@
  62205. #include <sys/syscall.h>
  62206. #include <sys/utsname.h>
  62207. -
  62208. _syscall1(int, uname, struct utsname *, buf)
  62209. libc_hidden_def(uname)
  62210. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/unlinkat.c uClibc-git/libc/sysdeps/linux/common/unlinkat.c
  62211. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/unlinkat.c 2012-05-15 09:20:09.000000000 +0200
  62212. +++ uClibc-git/libc/sysdeps/linux/common/unlinkat.c 2014-07-25 20:36:06.801334659 +0200
  62213. @@ -11,6 +11,7 @@
  62214. #ifdef __NR_unlinkat
  62215. _syscall3(int, unlinkat, int, fd, const char *, file, int, flag)
  62216. +libc_hidden_def(unlinkat)
  62217. #else
  62218. /* should add emulation with unlink() and /proc/self/fd/ ... */
  62219. #endif
  62220. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/unlink.c uClibc-git/libc/sysdeps/linux/common/unlink.c
  62221. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/unlink.c 2012-05-15 09:20:09.000000000 +0200
  62222. +++ uClibc-git/libc/sysdeps/linux/common/unlink.c 2014-07-25 20:36:06.801334659 +0200
  62223. @@ -10,6 +10,13 @@
  62224. #include <sys/syscall.h>
  62225. #include <unistd.h>
  62226. -
  62227. +#if defined __NR_unlinkat && !defined __NR_unlink
  62228. +# include <fcntl.h>
  62229. +int unlink(const char *pathname)
  62230. +{
  62231. + return unlinkat(AT_FDCWD, pathname, 0);
  62232. +}
  62233. +#else
  62234. _syscall1(int, unlink, const char *, pathname)
  62235. +#endif
  62236. libc_hidden_def(unlink)
  62237. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/unwind.h uClibc-git/libc/sysdeps/linux/common/unwind.h
  62238. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/unwind.h 2012-05-15 09:20:09.000000000 +0200
  62239. +++ uClibc-git/libc/sysdeps/linux/common/unwind.h 2014-07-25 20:36:06.801334659 +0200
  62240. @@ -14,9 +14,8 @@
  62241. Lesser General Public License for more details.
  62242. You should have received a copy of the GNU Lesser General Public
  62243. - License along with the GNU C Library; if not, write to the Free
  62244. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  62245. - 02111-1307 USA. */
  62246. + License along with the GNU C Library; if not, see
  62247. + <http://www.gnu.org/licenses/>. */
  62248. /* This is derived from the C++ ABI for IA-64. Where we diverge
  62249. for cross-architecture compatibility are noted with "@@@". */
  62250. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/ustat.c uClibc-git/libc/sysdeps/linux/common/ustat.c
  62251. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/ustat.c 2012-05-15 09:20:09.000000000 +0200
  62252. +++ uClibc-git/libc/sysdeps/linux/common/ustat.c 2014-07-25 20:36:06.801334659 +0200
  62253. @@ -11,16 +11,18 @@
  62254. #include <sys/ustat.h>
  62255. #include <sys/sysmacros.h>
  62256. -#define __NR___syscall_ustat __NR_ustat
  62257. +#ifdef __NR_ustat
  62258. +# define __NR___syscall_ustat __NR_ustat
  62259. /* Kernel's fs/super.c defines this:
  62260. * long sys_ustat(unsigned dev, struct ustat __user * ubuf),
  62261. * thus we use unsigned, not __kernel_dev_t.
  62262. */
  62263. -static __inline__ _syscall2(int, __syscall_ustat,
  62264. - unsigned, kdev_t,
  62265. - struct ustat *, ubuf)
  62266. +static __always_inline _syscall2(int, __syscall_ustat,
  62267. + unsigned, kdev_t,
  62268. + struct ustat *, ubuf)
  62269. int ustat(dev_t dev, struct ustat *ubuf)
  62270. {
  62271. return __syscall_ustat(dev, ubuf);
  62272. }
  62273. +#endif
  62274. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/utime.c uClibc-git/libc/sysdeps/linux/common/utime.c
  62275. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/utime.c 2012-05-15 09:20:09.000000000 +0200
  62276. +++ uClibc-git/libc/sysdeps/linux/common/utime.c 2014-07-25 20:36:06.801334659 +0200
  62277. @@ -10,13 +10,33 @@
  62278. #include <sys/syscall.h>
  62279. #include <utime.h>
  62280. +#if defined __NR_utimensat && !defined __NR_utime
  62281. +# include <fcntl.h>
  62282. +# include <stddef.h>
  62283. -#ifdef __NR_utime
  62284. -_syscall2(int, utime, const char *, file, const struct utimbuf *, times)
  62285. -#else
  62286. -#include <stdlib.h>
  62287. -#include <sys/time.h>
  62288. +int utime(const char *file, const struct utimbuf *times)
  62289. +{
  62290. + struct timespec tspecs[2], *ts;
  62291. +
  62292. + if (times) {
  62293. + ts = tspecs;
  62294. + ts[0].tv_sec = times->actime;
  62295. + ts[0].tv_nsec = 0;
  62296. + ts[1].tv_sec = times->modtime;
  62297. + ts[1].tv_nsec = 0;
  62298. + } else {
  62299. + ts = NULL;
  62300. + }
  62301. + return utimensat(AT_FDCWD, file, ts, 0);
  62302. +}
  62303. +
  62304. +#elif defined(__NR_utime)
  62305. +_syscall2(int, utime, const char *, file, const struct utimbuf *, times)
  62306. +#elif defined __NR_utimes /* alpha || ia64 */
  62307. +# define __need_NULL
  62308. +# include <stddef.h>
  62309. +# include <sys/time.h>
  62310. int utime(const char *file, const struct utimbuf *times)
  62311. {
  62312. @@ -25,11 +45,15 @@
  62313. if (times != NULL) {
  62314. timevals[0].tv_usec = 0L;
  62315. timevals[1].tv_usec = 0L;
  62316. - timevals[0].tv_sec = (long int) times->actime;
  62317. - timevals[1].tv_sec = (long int) times->modtime;
  62318. + timevals[0].tv_sec = (time_t) times->actime;
  62319. + timevals[1].tv_sec = (time_t) times->modtime;
  62320. }
  62321. return utimes(file, times ? timevals : NULL);
  62322. }
  62323. #endif
  62324. +
  62325. +#if (defined __NR_utimensat && !defined __NR_utime) || \
  62326. + defined __NR_utime || defined __NR_utimes
  62327. link_warning(utime, "the use of OBSOLESCENT `utime' is discouraged, use `utimes'")
  62328. libc_hidden_def(utime)
  62329. +#endif
  62330. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/utimes.c uClibc-git/libc/sysdeps/linux/common/utimes.c
  62331. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/utimes.c 2012-05-15 09:20:09.000000000 +0200
  62332. +++ uClibc-git/libc/sysdeps/linux/common/utimes.c 2014-07-25 20:36:06.801334659 +0200
  62333. @@ -8,15 +8,33 @@
  62334. */
  62335. #include <sys/syscall.h>
  62336. -#include <utime.h>
  62337. #include <sys/time.h>
  62338. +#if defined __NR_utimensat && !defined __NR_utimes
  62339. +# include <fcntl.h>
  62340. +# include <stddef.h>
  62341. +int utimes(const char *file, const struct timeval tvp[2])
  62342. +{
  62343. + struct timespec ts[2], *times;
  62344. + if (tvp) {
  62345. + times = ts;
  62346. + times[0].tv_sec = tvp[0].tv_sec;
  62347. + times[0].tv_nsec = tvp[0].tv_usec * 1000;
  62348. + times[1].tv_sec = tvp[1].tv_sec;
  62349. + times[1].tv_nsec = tvp[1].tv_usec * 1000;
  62350. + } else {
  62351. + times = NULL;
  62352. + }
  62353. -#ifdef __NR_utimes
  62354. -_syscall2(int, utimes, const char *, file, const struct timeval *, tvp)
  62355. -#else
  62356. -#include <stdlib.h>
  62357. + return utimensat(AT_FDCWD, file, times, 0);
  62358. +}
  62359. +#elif defined __NR_utimes
  62360. +_syscall2(int, utimes, const char *, file, const struct timeval *, tvp)
  62361. +#elif defined __NR_utime
  62362. +# define __need_NULL
  62363. +# include <stddef.h>
  62364. +# include <utime.h>
  62365. int utimes(const char *file, const struct timeval tvp[2])
  62366. {
  62367. @@ -32,4 +50,7 @@
  62368. return utime(file, times);
  62369. }
  62370. #endif
  62371. +
  62372. +#if defined __NR_utimensat || defined __NR_utimes || defined __NR_utime
  62373. libc_hidden_def(utimes)
  62374. +#endif
  62375. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/vfork.c uClibc-git/libc/sysdeps/linux/common/vfork.c
  62376. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/vfork.c 2012-05-15 09:20:09.000000000 +0200
  62377. +++ uClibc-git/libc/sysdeps/linux/common/vfork.c 2014-07-25 20:36:06.801334659 +0200
  62378. @@ -4,30 +4,37 @@
  62379. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  62380. */
  62381. -#include <unistd.h>
  62382. -#include <sys/types.h>
  62383. #include <sys/syscall.h>
  62384. +#if (defined __NR_vfork || defined __NR_clone || (defined __ARCH_USE_MMU__ && defined __NR_fork)) && (defined __USE_BSD || defined __USE_XOPEN_EXTENDED)
  62385. +# include <unistd.h>
  62386. extern __typeof(vfork) __vfork attribute_hidden;
  62387. -#ifdef __NR_vfork
  62388. +# if defined __NR_clone && !defined __NR_vfork
  62389. +# include <signal.h>
  62390. +# include <sys/types.h>
  62391. -# define __NR___vfork __NR_vfork
  62392. -_syscall0(pid_t, __vfork)
  62393. +pid_t __vfork(void)
  62394. +{
  62395. + pid_t pid = INLINE_SYSCALL(clone, 4, SIGCHLD,
  62396. + NULL, NULL, NULL);
  62397. -weak_alias(__vfork,vfork)
  62398. -libc_hidden_weak(vfork)
  62399. + if (pid < 0)
  62400. + return -1;
  62401. -#elif defined __ARCH_USE_MMU__ && defined __NR_fork
  62402. + return pid;
  62403. +}
  62404. +# elif defined __NR_vfork
  62405. +# define __NR___vfork __NR_vfork
  62406. +_syscall0(pid_t, __vfork)
  62407. +# else
  62408. /* Trivial implementation for arches that lack vfork */
  62409. -
  62410. pid_t __vfork(void)
  62411. {
  62412. return fork();
  62413. }
  62414. -
  62415. -weak_alias(__vfork,vfork)
  62416. +# endif
  62417. +strong_alias(__vfork,vfork)
  62418. libc_hidden_weak(vfork)
  62419. -
  62420. #endif
  62421. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/vmsplice.c uClibc-git/libc/sysdeps/linux/common/vmsplice.c
  62422. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/vmsplice.c 2012-05-15 09:20:09.000000000 +0200
  62423. +++ uClibc-git/libc/sysdeps/linux/common/vmsplice.c 2014-07-25 20:36:06.801334659 +0200
  62424. @@ -8,9 +8,10 @@
  62425. */
  62426. #include <sys/syscall.h>
  62427. -#include <fcntl.h>
  62428. -#ifdef __NR_vmsplice
  62429. +#if defined __NR_vmsplice && defined __USE_GNU
  62430. +# include <fcntl.h>
  62431. +
  62432. _syscall4(ssize_t, vmsplice, int, __fdout, const struct iovec *, __iov,
  62433. - size_t, __count, unsigned int, __flags)
  62434. + size_t, __count, unsigned int, __flags)
  62435. #endif
  62436. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/wait3.c uClibc-git/libc/sysdeps/linux/common/wait3.c
  62437. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/wait3.c 2012-05-15 09:20:09.000000000 +0200
  62438. +++ uClibc-git/libc/sysdeps/linux/common/wait3.c 2014-07-25 20:36:06.801334659 +0200
  62439. @@ -5,20 +5,12 @@
  62440. */
  62441. #include <sys/syscall.h>
  62442. -#include <sys/types.h>
  62443. -#include <sys/wait.h>
  62444. -#include <sys/resource.h>
  62445. -#if defined __USE_BSD
  62446. +#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
  62447. +# include <sys/wait.h>
  62448. -
  62449. -/* Wait for a child to exit. When one does, put its status in *STAT_LOC and
  62450. - * return its process ID. For errors return (pid_t) -1. If USAGE is not nil,
  62451. - * store information about the child's resource usage (as a `struct rusage')
  62452. - * there. If the WUNTRACED bit is set in OPTIONS, return status for stopped
  62453. - * children; otherwise don't. */
  62454. -pid_t wait3 (__WAIT_STATUS stat_loc, int options, struct rusage * usage)
  62455. +pid_t wait3(__WAIT_STATUS stat_loc, int options, struct rusage *usage)
  62456. {
  62457. - return wait4 (WAIT_ANY, stat_loc, options, usage);
  62458. + return __wait4_nocancel(WAIT_ANY, stat_loc, options, usage);
  62459. }
  62460. #endif
  62461. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/wait4.c uClibc-git/libc/sysdeps/linux/common/wait4.c
  62462. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/wait4.c 2012-05-15 09:20:09.000000000 +0200
  62463. +++ uClibc-git/libc/sysdeps/linux/common/wait4.c 2014-07-25 20:36:06.801334659 +0200
  62464. @@ -8,18 +8,16 @@
  62465. */
  62466. #include <sys/syscall.h>
  62467. -#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
  62468. #include <sys/wait.h>
  62469. -#include <sys/resource.h>
  62470. +# define __NR___syscall_wait4 __NR_wait4
  62471. +static __always_inline _syscall4(int, __syscall_wait4, __kernel_pid_t, pid,
  62472. + int *, status, int, opts, struct rusage *, rusage)
  62473. -#define __NR___syscall_wait4 __NR_wait4
  62474. -static __inline__ _syscall4(int, __syscall_wait4, __kernel_pid_t, pid,
  62475. - int *, status, int, opts, struct rusage *, rusage)
  62476. -
  62477. -pid_t wait4(pid_t pid, int *status, int opts, struct rusage *rusage)
  62478. +pid_t __wait4_nocancel(pid_t pid, int *status, int opts, struct rusage *rusage)
  62479. {
  62480. - return (__syscall_wait4(pid, status, opts, rusage));
  62481. + return __syscall_wait4(pid, status, opts, rusage);
  62482. }
  62483. -libc_hidden_def(wait4)
  62484. +#ifdef __USE_BSD
  62485. +strong_alias(__wait4_nocancel,wait4)
  62486. #endif
  62487. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/wait.c uClibc-git/libc/sysdeps/linux/common/wait.c
  62488. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/wait.c 2012-05-15 09:20:09.000000000 +0200
  62489. +++ uClibc-git/libc/sysdeps/linux/common/wait.c 2014-07-25 20:36:06.801334659 +0200
  62490. @@ -4,41 +4,11 @@
  62491. *
  62492. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  62493. */
  62494. -#include <stdlib.h>
  62495. -#include <syscall.h>
  62496. -#include <sys/types.h>
  62497. #include <sys/wait.h>
  62498. -#include <sys/resource.h>
  62499. +#include <cancel.h>
  62500. -extern __typeof(wait) __libc_wait;
  62501. -/* Wait for a child to die. When one does, put its status in *STAT_LOC
  62502. - * and return its process ID. For errors, return (pid_t) -1. */
  62503. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  62504. -#include <errno.h>
  62505. -#include <sysdep-cancel.h>
  62506. -
  62507. -pid_t attribute_hidden
  62508. -__libc_wait (__WAIT_STATUS_DEFN stat_loc)
  62509. -{
  62510. - if (SINGLE_THREAD_P)
  62511. - return INLINE_SYSCALL (wait4, 4, WAIT_ANY, stat_loc, 0,
  62512. - (struct rusage *) NULL);
  62513. -
  62514. - int oldtype = LIBC_CANCEL_ASYNC ();
  62515. -
  62516. - pid_t result = INLINE_SYSCALL (wait4, 4, WAIT_ANY, stat_loc, 0,
  62517. - (struct rusage *) NULL);
  62518. -
  62519. - LIBC_CANCEL_RESET (oldtype);
  62520. -
  62521. - return result;
  62522. -}
  62523. -#else
  62524. -/* Wait for a child to die. When one does, put its status in *STAT_LOC
  62525. - * and return its process ID. For errors, return (pid_t) -1. */
  62526. -__pid_t __libc_wait (__WAIT_STATUS_DEFN stat_loc)
  62527. +static pid_t __NC(wait)(__WAIT_STATUS_DEFN stat_loc)
  62528. {
  62529. - return wait4 (WAIT_ANY, stat_loc, 0, (struct rusage *) NULL);
  62530. + return __wait4_nocancel(WAIT_ANY, stat_loc, 0, (struct rusage *)NULL);
  62531. }
  62532. -#endif
  62533. -weak_alias(__libc_wait,wait)
  62534. +CANCELLABLE_SYSCALL(pid_t, wait, (__WAIT_STATUS_DEFN stat_loc), (stat_loc))
  62535. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/waitid.c uClibc-git/libc/sysdeps/linux/common/waitid.c
  62536. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/waitid.c 2012-05-15 09:20:09.000000000 +0200
  62537. +++ uClibc-git/libc/sysdeps/linux/common/waitid.c 2014-07-25 20:36:06.801334659 +0200
  62538. @@ -8,43 +8,19 @@
  62539. #include <features.h>
  62540. #if defined __USE_SVID || defined __USE_XOPEN
  62541. -# include <string.h>
  62542. -# include <sys/types.h>
  62543. -# include <sys/wait.h>
  62544. -# include <sys/syscall.h>
  62545. -
  62546. -# ifdef __NR_waitid
  62547. -
  62548. -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
  62549. -# include <sysdep-cancel.h>
  62550. -# else
  62551. -# define SINGLE_THREAD_P 1
  62552. -# endif
  62553. -/* The waitid() POSIX interface takes 4 arguments, but the kernel function
  62554. - * actually takes 5. The fifth is a pointer to struct rusage. Make sure
  62555. - * we pass NULL rather than letting whatever was in the register bleed up.
  62556. - */
  62557. -#define __NR_waitid5 __NR_waitid
  62558. -static __always_inline
  62559. -_syscall5(int, waitid5, idtype_t, idtype, id_t, id, siginfo_t*, infop,
  62560. - int, options, struct rusage*, ru)
  62561. -# endif
  62562. +#include <sys/syscall.h>
  62563. +#include <sys/wait.h>
  62564. +#include <cancel.h>
  62565. +#ifndef __NR_waitid
  62566. +# include <string.h>
  62567. +#endif
  62568. -int waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options)
  62569. +static int __NC(waitid)(idtype_t idtype, id_t id, siginfo_t *infop, int options)
  62570. {
  62571. -# ifdef __NR_waitid
  62572. - if (SINGLE_THREAD_P)
  62573. - return waitid5(idtype, id, infop, options, NULL);
  62574. -
  62575. -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
  62576. - int oldtype = LIBC_CANCEL_ASYNC ();
  62577. - int result = waitid5(idtype, id, infop, options, NULL);
  62578. - LIBC_CANCEL_RESET (oldtype);
  62579. - return result;
  62580. -# endif
  62581. -
  62582. -# elif defined __NR_waitpid
  62583. +#ifdef __NR_waitid
  62584. + return INLINE_SYSCALL(waitid, 5, idtype, id, infop, options, NULL);
  62585. +#else
  62586. switch (idtype) {
  62587. case P_PID:
  62588. if (id <= 0)
  62589. @@ -65,17 +41,17 @@
  62590. }
  62591. memset(infop, 0, sizeof *infop);
  62592. - infop->si_pid = waitpid(id, &infop->si_status, options
  62593. -# ifdef WEXITED
  62594. + infop->si_pid = __NC(waitpid)(id, &infop->si_status, options
  62595. +# ifdef WEXITED
  62596. &~ WEXITED
  62597. -# endif
  62598. +# endif
  62599. );
  62600. if (infop->si_pid < 0)
  62601. return infop->si_pid;
  62602. return 0;
  62603. -# else
  62604. - __set_errno(ENOSYS);
  62605. - return -1;
  62606. -# endif
  62607. +#endif
  62608. }
  62609. +CANCELLABLE_SYSCALL(int, waitid, (idtype_t idtype, id_t id, siginfo_t *infop, int options),
  62610. + (idtype, id, infop, options))
  62611. +
  62612. #endif
  62613. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/waitpid.c uClibc-git/libc/sysdeps/linux/common/waitpid.c
  62614. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/waitpid.c 2012-05-15 09:20:09.000000000 +0200
  62615. +++ uClibc-git/libc/sysdeps/linux/common/waitpid.c 2014-07-25 20:36:06.801334659 +0200
  62616. @@ -6,32 +6,16 @@
  62617. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  62618. */
  62619. -#include <stdlib.h>
  62620. -#include <sys/types.h>
  62621. #include <sys/wait.h>
  62622. -#include <sys/resource.h>
  62623. +#include <cancel.h>
  62624. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  62625. -#include "sysdep-cancel.h"
  62626. -#else
  62627. -#define SINGLE_THREAD_P 1
  62628. -#endif
  62629. -
  62630. -libc_hidden_proto(wait4)
  62631. -
  62632. -extern __typeof(waitpid) __libc_waitpid;
  62633. -__pid_t __libc_waitpid(__pid_t pid, int *wait_stat, int options)
  62634. +pid_t __NC(waitpid)(pid_t pid, int *wait_stat, int options)
  62635. {
  62636. - if (SINGLE_THREAD_P)
  62637. - return wait4(pid, wait_stat, options, NULL);
  62638. -
  62639. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  62640. - int oldtype = LIBC_CANCEL_ASYNC ();
  62641. - int result = wait4(pid, wait_stat, options, NULL);
  62642. - LIBC_CANCEL_RESET (oldtype);
  62643. - return result;
  62644. +#if 1 /* kernel/exit.c says to avoid waitpid syscall */
  62645. + return __wait4_nocancel(pid, wait_stat, options, NULL);
  62646. +#else
  62647. + return INLINE_SYSCALL(waitpid, 3, pid, wait_stat, options);
  62648. #endif
  62649. }
  62650. -libc_hidden_proto(waitpid)
  62651. -weak_alias(__libc_waitpid,waitpid)
  62652. -libc_hidden_weak(waitpid)
  62653. +CANCELLABLE_SYSCALL(pid_t, waitpid, (pid_t pid, int *wait_stat, int options), (pid, wait_stat, options))
  62654. +lt_libc_hidden(waitpid)
  62655. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/write.c uClibc-git/libc/sysdeps/linux/common/write.c
  62656. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/write.c 2012-05-15 09:20:09.000000000 +0200
  62657. +++ uClibc-git/libc/sysdeps/linux/common/write.c 2014-07-25 20:36:06.801334659 +0200
  62658. @@ -9,17 +9,11 @@
  62659. #include <sys/syscall.h>
  62660. #include <unistd.h>
  62661. +#include <cancel.h>
  62662. -_syscall3(ssize_t, write, int, fd, const __ptr_t, buf, size_t, count)
  62663. -#ifndef __LINUXTHREADS_OLD__
  62664. -libc_hidden_def(write)
  62665. -#else
  62666. -libc_hidden_weak(write)
  62667. -strong_alias(write,__libc_write)
  62668. -#endif
  62669. +#define __NR___write_nocancel __NR_write
  62670. +_syscall3(ssize_t, __NC(write), int, fd, const void *, buf, size_t, count)
  62671. -#if 0
  62672. -/* Stupid libgcc.a from gcc 2.95.x uses __write in pure.o
  62673. - * which is a blatant GNU libc-ism... */
  62674. -strong_alias(write,__write)
  62675. -#endif
  62676. +CANCELLABLE_SYSCALL(ssize_t, write, (int fd, const void *buf, size_t count),
  62677. + (fd, buf, count))
  62678. +lt_libc_hidden(write)
  62679. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/writev.c uClibc-git/libc/sysdeps/linux/common/writev.c
  62680. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/writev.c 2012-05-15 09:20:09.000000000 +0200
  62681. +++ uClibc-git/libc/sysdeps/linux/common/writev.c 2014-07-25 20:36:06.801334659 +0200
  62682. @@ -9,42 +9,20 @@
  62683. #include <sys/syscall.h>
  62684. #include <sys/uio.h>
  62685. -
  62686. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  62687. -#include <errno.h>
  62688. -#include <sysdep-cancel.h>
  62689. +#include <cancel.h>
  62690. /* We should deal with kernel which have a smaller UIO_FASTIOV as well
  62691. as a very big count. */
  62692. -static ssize_t __writev (int fd, const struct iovec *vector, int count)
  62693. +static ssize_t __NC(writev)(int fd, const struct iovec *vector, int count)
  62694. {
  62695. - ssize_t bytes_written;
  62696. -
  62697. - bytes_written = INLINE_SYSCALL (writev, 3, fd, vector, count);
  62698. -
  62699. - if (bytes_written >= 0 || errno != EINVAL || count <= UIO_FASTIOV)
  62700. - return bytes_written;
  62701. -
  62702. - /* glibc tries again, but we do not. */
  62703. - /* return __atomic_writev_replacement (fd, vector, count); */
  62704. -
  62705. - return -1;
  62706. -}
  62707. -
  62708. -ssize_t writev (int fd, const struct iovec *vector, int count)
  62709. -{
  62710. - if (SINGLE_THREAD_P)
  62711. - return __writev (fd, vector, count);
  62712. -
  62713. - int oldtype = LIBC_CANCEL_ASYNC ();
  62714. + ssize_t bytes_written = INLINE_SYSCALL(writev, 3, fd, vector, count);
  62715. - ssize_t result = __writev (fd, vector, count);
  62716. + if (bytes_written >= 0 || errno != EINVAL || count <= UIO_FASTIOV)
  62717. + return bytes_written;
  62718. - LIBC_CANCEL_RESET (oldtype);
  62719. + /* glibc tries again, but we do not. */
  62720. + /* return __atomic_writev_replacement (fd, vector, count); */
  62721. - return result;
  62722. + return -1;
  62723. }
  62724. -#else
  62725. -_syscall3(ssize_t, writev, int, filedes, const struct iovec *, vector,
  62726. - int, count)
  62727. -#endif
  62728. +CANCELLABLE_SYSCALL(ssize_t, writev, (int fd, const struct iovec *vector, int count), (fd, vector, count))
  62729. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/xstatconv.c uClibc-git/libc/sysdeps/linux/common/xstatconv.c
  62730. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/xstatconv.c 2012-05-15 09:20:09.000000000 +0200
  62731. +++ uClibc-git/libc/sysdeps/linux/common/xstatconv.c 2014-07-25 20:36:06.801334659 +0200
  62732. @@ -13,14 +13,12 @@
  62733. Lesser General Public License for more details.
  62734. You should have received a copy of the GNU Lesser General Public
  62735. - License along with the GNU C Library; if not, write to the Free
  62736. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  62737. - 02111-1307 USA.
  62738. + License along with the GNU C Library; if not, see
  62739. + <http://www.gnu.org/licenses/>.
  62740. Modified for uClibc by Erik Andersen <andersen@codepoet.org>
  62741. */
  62742. -#include <sys/syscall.h>
  62743. #include <sys/stat.h>
  62744. #include <string.h>
  62745. #include "xstatconv.h"
  62746. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common/xstatconv.h uClibc-git/libc/sysdeps/linux/common/xstatconv.h
  62747. --- uClibc-0.9.33.2/libc/sysdeps/linux/common/xstatconv.h 2012-05-15 09:20:09.000000000 +0200
  62748. +++ uClibc-git/libc/sysdeps/linux/common/xstatconv.h 2014-07-25 20:36:06.801334659 +0200
  62749. @@ -13,9 +13,8 @@
  62750. Lesser General Public License for more details.
  62751. You should have received a copy of the GNU Lesser General Public
  62752. - License along with the GNU C Library; if not, write to the Free
  62753. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  62754. - 02111-1307 USA.
  62755. + License along with the GNU C Library; if not, see
  62756. + <http://www.gnu.org/licenses/>.
  62757. Modified for uClibc by Erik Andersen <andersen@codepoet.org>
  62758. */
  62759. @@ -23,11 +22,14 @@
  62760. /* Pull in whatever this particular arch's kernel thinks the kernel version of
  62761. * struct stat should look like. It turns out that each arch has a different
  62762. * opinion on the subject, and different kernel revs use different names... */
  62763. +#include <features.h>
  62764. #include <bits/kernel_stat.h>
  62765. +#ifdef __ARCH_HAS_DEPRECATED_SYSCALLS__
  62766. extern void __xstat_conv(struct kernel_stat *kbuf, struct stat *buf) attribute_hidden;
  62767. extern void __xstat32_conv(struct kernel_stat64 *kbuf, struct stat *buf) attribute_hidden;
  62768. #if defined __UCLIBC_HAS_LFS__
  62769. extern void __xstat64_conv(struct kernel_stat64 *kbuf, struct stat64 *buf) attribute_hidden;
  62770. #endif
  62771. +#endif
  62772. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common-generic/bits/align64bit.h uClibc-git/libc/sysdeps/linux/common-generic/bits/align64bit.h
  62773. --- uClibc-0.9.33.2/libc/sysdeps/linux/common-generic/bits/align64bit.h 1970-01-01 01:00:00.000000000 +0100
  62774. +++ uClibc-git/libc/sysdeps/linux/common-generic/bits/align64bit.h 2014-07-25 20:36:06.745334366 +0200
  62775. @@ -0,0 +1,17 @@
  62776. +/*
  62777. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  62778. + *
  62779. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  62780. + */
  62781. +
  62782. +#ifndef _ALIGN_64_BIT_H
  62783. +#define _ALIGN_64_BIT_H
  62784. +
  62785. +/* Simple macro for getting the 64-bit struct arch alignment */
  62786. +
  62787. +struct __longlong_aligned { long long x; };
  62788. +
  62789. +#define __ARCH_64BIT_ALIGNMENT__ \
  62790. + __attribute__((aligned(__alignof__(struct __longlong_aligned))))
  62791. +
  62792. +#endif /* bits/align64bit.h */
  62793. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common-generic/bits/dirent.h uClibc-git/libc/sysdeps/linux/common-generic/bits/dirent.h
  62794. --- uClibc-0.9.33.2/libc/sysdeps/linux/common-generic/bits/dirent.h 1970-01-01 01:00:00.000000000 +0100
  62795. +++ uClibc-git/libc/sysdeps/linux/common-generic/bits/dirent.h 2014-07-25 20:36:06.745334366 +0200
  62796. @@ -0,0 +1,53 @@
  62797. +/*
  62798. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  62799. + *
  62800. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  62801. + */
  62802. +
  62803. +#ifndef _DIRENT_H
  62804. +# error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
  62805. +#endif
  62806. +
  62807. +#include <bits/align64bit.h>
  62808. +#include <endian.h>
  62809. +
  62810. +struct dirent
  62811. + {
  62812. +#ifndef __USE_FILE_OFFSET64
  62813. +# if __BYTE_ORDER == __LITTLE_ENDIAN
  62814. + __U32_TYPE d_ino;
  62815. + __U32_TYPE __pad1;
  62816. + __S32_TYPE d_off;
  62817. + __S32_TYPE __pad2;
  62818. +# else
  62819. + __U32_TYPE __pad1;
  62820. + __U32_TYPE d_ino;
  62821. + __S32_TYPE __pad2;
  62822. + __S32_TYPE d_off;
  62823. +# endif /* __LITTLE_ENDIAN */
  62824. +#else
  62825. + __U64_TYPE d_ino;
  62826. + __S64_TYPE d_off;
  62827. +#endif
  62828. + unsigned short int d_reclen;
  62829. + unsigned char d_type;
  62830. + char d_name[256]; /* We must not include limits.h! */
  62831. + } __ARCH_64BIT_ALIGNMENT__;
  62832. +
  62833. +#ifdef __USE_LARGEFILE64
  62834. +struct dirent64
  62835. + {
  62836. + __U64_TYPE d_ino;
  62837. + __S64_TYPE d_off;
  62838. + unsigned short int d_reclen;
  62839. + unsigned char d_type;
  62840. + char d_name[256]; /* We must not include limits.h! */
  62841. + };
  62842. +#endif
  62843. +
  62844. +#define d_fileno d_ino /* Backwards compatibility. */
  62845. +
  62846. +#undef _DIRENT_HAVE_D_NAMLEN
  62847. +#define _DIRENT_HAVE_D_RECLEN
  62848. +#define _DIRENT_HAVE_D_OFF
  62849. +#define _DIRENT_HAVE_D_TYPE
  62850. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common-generic/bits/kernel_stat.h uClibc-git/libc/sysdeps/linux/common-generic/bits/kernel_stat.h
  62851. --- uClibc-0.9.33.2/libc/sysdeps/linux/common-generic/bits/kernel_stat.h 1970-01-01 01:00:00.000000000 +0100
  62852. +++ uClibc-git/libc/sysdeps/linux/common-generic/bits/kernel_stat.h 2014-07-25 20:36:06.745334366 +0200
  62853. @@ -0,0 +1,28 @@
  62854. +/*
  62855. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  62856. + *
  62857. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  62858. + */
  62859. +
  62860. +#ifndef _BITS_STAT_STRUCT_H
  62861. +#define _BITS_STAT_STRUCT_H
  62862. +
  62863. +#include <sys/stat.h>
  62864. +
  62865. +/*
  62866. + * The stat structure defined in
  62867. + * libc/sysdeps/linux/common-generic/bits/stat.h
  62868. + * is the same as the kernel one for new architectures
  62869. + *
  62870. + * For the common-generic ABI we really don't need this file at all
  62871. + * However that requires more #ifndef in relevant wrappers,
  62872. + * further uglifying them
  62873. + */
  62874. +#if defined __UCLIBC_HAS_LFS__
  62875. +#define kernel_stat64 stat64
  62876. +#else
  62877. +#define kernel_stat64 stat
  62878. +#endif
  62879. +
  62880. +#endif /* _BITS_STAT_STRUCT_H */
  62881. +
  62882. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common-generic/bits/statfs.h uClibc-git/libc/sysdeps/linux/common-generic/bits/statfs.h
  62883. --- uClibc-0.9.33.2/libc/sysdeps/linux/common-generic/bits/statfs.h 1970-01-01 01:00:00.000000000 +0100
  62884. +++ uClibc-git/libc/sysdeps/linux/common-generic/bits/statfs.h 2014-07-25 20:36:06.745334366 +0200
  62885. @@ -0,0 +1,78 @@
  62886. +/*
  62887. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  62888. + *
  62889. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  62890. + */
  62891. +
  62892. +#ifndef _SYS_STATFS_H
  62893. +# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
  62894. +#endif
  62895. +
  62896. +#include <endian.h>
  62897. +#include <bits/align64bit.h>
  62898. +#include <bits/types.h>
  62899. +
  62900. +
  62901. +struct statfs
  62902. + {
  62903. + __U32_TYPE f_type;
  62904. + __U32_TYPE f_bsize;
  62905. +#ifndef __USE_FILE_OFFSET64
  62906. +# if __BYTE_ORDER == __LITTLE_ENDIAN
  62907. + __U32_TYPE f_blocks;
  62908. + __U32_TYPE __pad1;
  62909. + __U32_TYPE f_bfree;
  62910. + __U32_TYPE __pad2;
  62911. + __U32_TYPE f_bavail;
  62912. + __U32_TYPE __pad3;
  62913. + __U32_TYPE f_files;
  62914. + __U32_TYPE __pad4;
  62915. + __U32_TYPE f_ffree;
  62916. + __U32_TYPE __pad5;
  62917. +# else
  62918. + __U32_TYPE __pad1;
  62919. + __U32_TYPE f_blocks;
  62920. + __U32_TYPE __pad2;
  62921. + __U32_TYPE f_bfree;
  62922. + __U32_TYPE __pad3;
  62923. + __U32_TYPE f_bavail;
  62924. + __U32_TYPE __pad4;
  62925. + __U32_TYPE f_files;
  62926. + __U32_TYPE __pad5;
  62927. + __U32_TYPE f_ffree;
  62928. +# endif /* __LITTLE_ENDIAN */
  62929. +#else
  62930. + __U64_TYPE f_blocks;
  62931. + __U64_TYPE f_bfree;
  62932. + __U64_TYPE f_bavail;
  62933. + __U64_TYPE f_files;
  62934. + __U64_TYPE f_ffree;
  62935. +#endif /* __USE_FILE_OFFSET64 */
  62936. + __fsid_t f_fsid;
  62937. + __U32_TYPE f_namelen;
  62938. + __U32_TYPE f_frsize;
  62939. + __U32_TYPE f_flags;
  62940. + __U32_TYPE f_spare[4];
  62941. + } __ARCH_64BIT_ALIGNMENT__;
  62942. +
  62943. +#ifdef __USE_LARGEFILE64
  62944. +struct statfs64
  62945. + {
  62946. + __U32_TYPE f_type;
  62947. + __U32_TYPE f_bsize;
  62948. + __U64_TYPE f_blocks;
  62949. + __U64_TYPE f_bfree;
  62950. + __U64_TYPE f_bavail;
  62951. + __U64_TYPE f_files;
  62952. + __U64_TYPE f_ffree;
  62953. + __fsid_t f_fsid;
  62954. + __U32_TYPE f_namelen;
  62955. + __U32_TYPE f_frsize;
  62956. + __U32_TYPE f_flags;
  62957. + __U32_TYPE f_spare[4];
  62958. + };
  62959. +#endif
  62960. +
  62961. +/* Tell code we have these members. */
  62962. +#define _STATFS_F_NAMELEN
  62963. +#define _STATFS_F_FRSIZE
  62964. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/common-generic/bits/stat.h uClibc-git/libc/sysdeps/linux/common-generic/bits/stat.h
  62965. --- uClibc-0.9.33.2/libc/sysdeps/linux/common-generic/bits/stat.h 1970-01-01 01:00:00.000000000 +0100
  62966. +++ uClibc-git/libc/sysdeps/linux/common-generic/bits/stat.h 2014-07-25 20:36:06.745334366 +0200
  62967. @@ -0,0 +1,195 @@
  62968. +/*
  62969. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  62970. + *
  62971. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  62972. + */
  62973. +
  62974. +#ifndef _SYS_STAT_H
  62975. +# error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
  62976. +#endif
  62977. +
  62978. +#include <bits/align64bit.h>
  62979. +#include <endian.h>
  62980. +
  62981. +/* Versions of the `struct stat' data structure. */
  62982. +#define _STAT_VER_LINUX_OLD 1
  62983. +#define _STAT_VER_KERNEL 1
  62984. +#define _STAT_VER_SVR4 2
  62985. +#define _STAT_VER_LINUX 3
  62986. +#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */
  62987. +
  62988. +/* Versions of the `xmknod' interface. */
  62989. +#define _MKNOD_VER_LINUX 1
  62990. +#define _MKNOD_VER_SVR4 2
  62991. +#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */
  62992. +
  62993. +/*
  62994. + * For 32-bit architectures, this struct is similar to the stat64 but it
  62995. + * uses 32-bit members along with 32-bit padding. For 64-bit architectures
  62996. + * this struct is exactly the same with the stat64 one
  62997. + */
  62998. +struct stat
  62999. + {
  63000. +#ifndef __USE_FILE_OFFSET64
  63001. +# if __BYTE_ORDER == __LITTLE_ENDIAN
  63002. + unsigned long st_dev; /* Device. */
  63003. + unsigned long __pad1;
  63004. + unsigned long st_ino; /* 32bit file serial number. */
  63005. + unsigned long __pad2;
  63006. + unsigned int st_mode; /* File mode. */
  63007. + unsigned int st_nlink; /* Link count. */
  63008. + unsigned int st_uid; /* User ID of the file's owner. */
  63009. + unsigned int st_gid; /* Group ID of the file's group.*/
  63010. + unsigned long st_rdev; /* Device number, if device. */
  63011. + unsigned long __pad3;
  63012. + unsigned long long __pad4;
  63013. + long st_size; /* SIze of file, in bytes. */
  63014. + long __pad5;
  63015. + int st_blksize; /* Optimal block size for I/O. */
  63016. + int __pad6;
  63017. + long st_blocks; /* Number 512-byte blocks allocated */
  63018. + long __pad7;
  63019. +# else
  63020. + unsigned long __pad1;
  63021. + unsigned long st_dev; /* Device. */
  63022. + unsigned long __pad2;
  63023. + unsigned long st_ino; /* 32bit file serial number. */
  63024. + unsigned int st_mode; /* File mode. */
  63025. + unsigned int st_nlink; /* Link count. */
  63026. + unsigned int st_uid; /* User ID of the file's owner. */
  63027. + unsigned int st_gid; /* Group ID of the file's group.*/
  63028. + unsigned long __pad3;
  63029. + unsigned long st_rdev; /* Device number, if device. */
  63030. + unsigned long long __pad4;
  63031. + long __pad5;
  63032. + long st_size; /* Size of file, in bytes. */
  63033. + int st_blksize; /* Optimal block size for I/O. */
  63034. + int __pad6;
  63035. + long __pad7;
  63036. + long st_blocks; /* Number 512-byte blocks allocated */
  63037. +# endif /* __LITTLE_ENDIAN */
  63038. +#else
  63039. + unsigned long long st_dev; /* Device. */
  63040. + unsigned long long st_ino; /* 32bit file serial number. */
  63041. + unsigned int st_mode; /* File mode. */
  63042. + unsigned int st_nlink; /* Link count. */
  63043. + unsigned int st_uid; /* User ID of the file's owner. */
  63044. + unsigned int st_gid; /* Group ID of the file's group.*/
  63045. + unsigned long long st_rdev; /* Device number, if device. */
  63046. + unsigned long long _pad1;
  63047. + long long st_size; /* SIze of file, in bytes. */
  63048. + int st_blksize; /* Optimal block size for I/O. */
  63049. + int __pad2;
  63050. + long long st_blocks; /* Number 512-byte blocks allocated */
  63051. +#endif
  63052. +#ifdef __USE_MISC
  63053. + /* Nanosecond resolution timestamps are stored in a format
  63054. + equivalent to 'struct timespec'. This is the type used
  63055. + whenever possible but the Unix namespace rules do not allow the
  63056. + identifier 'timespec' to appear in the <sys/stat.h> header.
  63057. + Therefore we have to handle the use of this header in strictly
  63058. + standard-compliant sources special. */
  63059. + struct timespec st_atim; /* Time of last access. */
  63060. + struct timespec st_mtim; /* Time of last modification. */
  63061. + struct timespec st_ctim; /* Time of last status change. */
  63062. +# define st_atime st_atim.tv_sec /* Backward compatibility. */
  63063. +# define st_mtime st_mtim.tv_sec
  63064. +# define st_ctime st_ctim.tv_sec
  63065. +#else
  63066. +# ifndef __USE_FILE_OFFSET64
  63067. + long st_atime; /* Time of last access. */
  63068. + unsigned long st_atime_nsec;
  63069. + long st_mtime; /* Time of last modification. */
  63070. + unsigned long st_mtime_nsec;
  63071. + long st_ctime; /* Time of last status change. */
  63072. + unsigned long st_ctime_nsec;
  63073. +# else
  63074. + int st_atime; /* Time of last access. */
  63075. + unsigned int st_atime_nsec;
  63076. + int st_mtime; /* Time of last modification. */
  63077. + unsigned int st_mtime_nsec;
  63078. + int st_ctime; /* Time of last status change. */
  63079. + unsigned int st_ctime_nsec;
  63080. +# endif
  63081. +#endif
  63082. + unsigned int __unused4;
  63083. + unsigned int __unused5;
  63084. + } __ARCH_64BIT_ALIGNMENT__;
  63085. +
  63086. +
  63087. +#ifdef __USE_LARGEFILE64
  63088. +struct stat64
  63089. + {
  63090. + unsigned long long st_dev; /* Device. */
  63091. + unsigned long long st_ino; /* 32bit file serial number. */
  63092. + unsigned int st_mode; /* File mode. */
  63093. + unsigned int st_nlink; /* Link count. */
  63094. + unsigned int st_uid; /* User ID of the file's owner. */
  63095. + unsigned int st_gid; /* Group ID of the file's group.*/
  63096. + unsigned long long st_rdev; /* Device number, if device. */
  63097. + unsigned long long __pad3;
  63098. + long long st_size; /* Size of file, in bytes. */
  63099. + int st_blksize; /* Optimal block size for I/O. */
  63100. + int __pad4;
  63101. + long long st_blocks; /* Number 512-byte blocks allocated */
  63102. +# ifdef __USE_MISC
  63103. + /* Nanosecond resolution timestamps are stored in a format
  63104. + equivalent to 'struct timespec'. This is the type used
  63105. + whenever possible but the Unix namespace rules do not allow the
  63106. + identifier 'timespec' to appear in the <sys/stat.h> header.
  63107. + Therefore we have to handle the use of this header in strictly
  63108. + standard-compliant sources special. */
  63109. + struct timespec st_atim; /* Time of last access. */
  63110. + struct timespec st_mtim; /* Time of last modification. */
  63111. + struct timespec st_ctim; /* Time of last status change. */
  63112. +# else
  63113. + int st_atime; /* Time of last access. */
  63114. + unsigned int st_atime_nsec;
  63115. + int st_mtime; /* Time of last modification. */
  63116. + unsigned int st_mtime_nsec;
  63117. + int st_ctime; /* Time of last status change. */
  63118. + unsigned int st_ctime_nsec;
  63119. +# endif
  63120. + unsigned int __unused4;
  63121. + unsigned int __unused5;
  63122. +};
  63123. +#endif
  63124. +
  63125. +/* Tell code we have these members. */
  63126. +#define _STATBUF_ST_BLKSIZE
  63127. +#define _STATBUF_ST_RDEV
  63128. +/* Nanosecond resolution time values are supported. */
  63129. +#define _STATBUF_ST_NSEC
  63130. +
  63131. +/* Encoding of the file mode. */
  63132. +
  63133. +#define __S_IFMT 0170000 /* These bits determine file type. */
  63134. +
  63135. +/* File types. */
  63136. +#define __S_IFDIR 0040000 /* Directory. */
  63137. +#define __S_IFCHR 0020000 /* Character device. */
  63138. +#define __S_IFBLK 0060000 /* Block device. */
  63139. +#define __S_IFREG 0100000 /* Regular file. */
  63140. +#define __S_IFIFO 0010000 /* FIFO. */
  63141. +#define __S_IFLNK 0120000 /* Symbolic link. */
  63142. +#define __S_IFSOCK 0140000 /* Socket. */
  63143. +
  63144. +/* POSIX.1b objects. Note that these macros always evaluate to zero. But
  63145. + they do it by enforcing the correct use of the macros. */
  63146. +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode)
  63147. +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode)
  63148. +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode)
  63149. +
  63150. +/* Protection bits. */
  63151. +
  63152. +#define __S_ISUID 04000 /* Set user ID on execution. */
  63153. +#define __S_ISGID 02000 /* Set group ID on execution. */
  63154. +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
  63155. +#define __S_IREAD 0400 /* Read by owner. */
  63156. +#define __S_IWRITE 0200 /* Write by owner. */
  63157. +#define __S_IEXEC 0100 /* Execute by owner. */
  63158. +
  63159. +#ifdef __USE_ATFILE
  63160. +# define UTIME_NOW ((1l << 30) - 1l)
  63161. +# define UTIME_OMIT ((1l << 30) - 2l)
  63162. +#endif
  63163. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/fcntl.h uClibc-git/libc/sysdeps/linux/cris/bits/fcntl.h
  63164. --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  63165. +++ uClibc-git/libc/sysdeps/linux/cris/bits/fcntl.h 2014-07-25 20:36:06.833334827 +0200
  63166. @@ -14,9 +14,8 @@
  63167. Lesser General Public License for more details.
  63168. You should have received a copy of the GNU Lesser General Public
  63169. - License along with the GNU C Library; if not, write to the Free
  63170. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  63171. - 02111-1307 USA. */
  63172. + License along with the GNU C Library; if not, see
  63173. + <http://www.gnu.org/licenses/>. */
  63174. #ifndef _FCNTL_H
  63175. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  63176. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/cris/bits/kernel_types.h
  63177. --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
  63178. +++ uClibc-git/libc/sysdeps/linux/cris/bits/kernel_types.h 2014-07-25 20:36:06.833334827 +0200
  63179. @@ -28,6 +28,8 @@
  63180. typedef unsigned short __kernel_old_uid_t;
  63181. typedef unsigned short __kernel_old_gid_t;
  63182. typedef __kernel_dev_t __kernel_old_dev_t;
  63183. +typedef long __kernel_long_t;
  63184. +typedef unsigned long __kernel_ulong_t;
  63185. #ifdef __GNUC__
  63186. typedef long long __kernel_loff_t;
  63187. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/setjmp.h uClibc-git/libc/sysdeps/linux/cris/bits/setjmp.h
  63188. --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  63189. +++ uClibc-git/libc/sysdeps/linux/cris/bits/setjmp.h 2014-07-25 20:36:06.833334827 +0200
  63190. @@ -1,4 +1,4 @@
  63191. -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
  63192. +/* Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
  63193. This file is part of the GNU C Library.
  63194. The GNU C Library is free software; you can redistribute it and/or
  63195. @@ -12,11 +12,10 @@
  63196. Lesser General Public License for more details.
  63197. You should have received a copy of the GNU Lesser General Public
  63198. - License along with the GNU C Library; if not, write to the Free
  63199. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  63200. - 02111-1307 USA. */
  63201. + License along with the GNU C Library; if not, see
  63202. + <http://www.gnu.org/licenses/>. */
  63203. -/* Define the machine-dependent type `jmp_buf'. CRIS version. */
  63204. +/* Define the machine-dependent type `jmp_buf', CRIS version. */
  63205. #ifndef _BITS_SETJMP_H
  63206. #define _BITS_SETJMP_H 1
  63207. @@ -24,10 +23,8 @@
  63208. # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
  63209. #endif
  63210. -/*
  63211. - Note that we save and restore CCR to be able to
  63212. - correctly handle DI/EI. Note also that the "move x,ccr" does NOT affect
  63213. - the DMA enable bits (E and D).
  63214. +/* Note that saving and restoring CCR has no meaning in user mode, so we
  63215. + don't actually do it; the slot is now reserved.
  63216. jmp_buf[0] - PC
  63217. jmp_buf[1] - SP (R14)
  63218. @@ -46,21 +43,8 @@
  63219. jmp_buf[14] - R1
  63220. jmp_buf[15] - R0
  63221. jmp_buf[16] - SRP
  63222. - jmp_buf[17] - CCR
  63223. - */
  63224. + jmp_buf[17] - CCR */
  63225. -#define _JBLEN 18
  63226. -#if defined (__USE_MISC) || defined (_ASM)
  63227. -#define JB_SP 1
  63228. -#endif
  63229. -
  63230. -#ifndef _ASM
  63231. -typedef int __jmp_buf[_JBLEN];
  63232. -#endif
  63233. -
  63234. -/* Test if longjmp to JMPBUF would unwind the frame
  63235. - containing a local variable at ADDRESS. */
  63236. -#define _JMPBUF_UNWINDS(jmpbuf, address) \
  63237. - ((void *) (address) < (void *) (jmpbuf)[JB_SP])
  63238. +typedef int __jmp_buf[18];
  63239. #endif /* bits/setjmp.h */
  63240. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/cris/bits/stackinfo.h
  63241. --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  63242. +++ uClibc-git/libc/sysdeps/linux/cris/bits/stackinfo.h 2014-07-25 20:36:06.833334827 +0200
  63243. @@ -12,9 +12,8 @@
  63244. Lesser General Public License for more details.
  63245. You should have received a copy of the GNU Lesser General Public
  63246. - License along with the GNU C Library; if not, write to the Free
  63247. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  63248. - 02111-1307 USA. */
  63249. + License along with the GNU C Library; if not, see
  63250. + <http://www.gnu.org/licenses/>. */
  63251. /* This file contains a bit of information about the stack allocation
  63252. of the processor. */
  63253. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/termios.h uClibc-git/libc/sysdeps/linux/cris/bits/termios.h
  63254. --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/termios.h 2012-05-15 09:20:09.000000000 +0200
  63255. +++ uClibc-git/libc/sysdeps/linux/cris/bits/termios.h 2014-07-25 20:36:06.833334827 +0200
  63256. @@ -14,9 +14,8 @@
  63257. Lesser General Public License for more details.
  63258. You should have received a copy of the GNU Lesser General Public
  63259. - License along with the GNU C Library; if not, write to the Free
  63260. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  63261. - 02111-1307 USA. */
  63262. + License along with the GNU C Library; if not, see
  63263. + <http://www.gnu.org/licenses/>. */
  63264. #ifndef _TERMIOS_H
  63265. # error "Never include <bits/termios.h> directly; use <termios.h> instead."
  63266. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/cris/bits/uClibc_arch_features.h
  63267. --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  63268. +++ uClibc-git/libc/sysdeps/linux/cris/bits/uClibc_arch_features.h 2014-07-25 20:36:06.833334827 +0200
  63269. @@ -12,8 +12,8 @@
  63270. /* can your target use syscall6() for mmap ? */
  63271. #undef __UCLIBC_MMAP_HAS_6_ARGS__
  63272. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  63273. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  63274. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  63275. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  63276. /* does your target have a broken create_module() ? */
  63277. #define __UCLIBC_BROKEN_CREATE_MODULE__
  63278. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/uClibc_page.h uClibc-git/libc/sysdeps/linux/cris/bits/uClibc_page.h
  63279. --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/uClibc_page.h 2012-05-15 09:20:09.000000000 +0200
  63280. +++ uClibc-git/libc/sysdeps/linux/cris/bits/uClibc_page.h 2014-07-25 20:36:06.833334827 +0200
  63281. @@ -11,8 +11,8 @@
  63282. * Library General Public License for more details.
  63283. *
  63284. * You should have received a copy of the GNU Library General Public
  63285. - * License along with this library; if not, write to the Free
  63286. - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  63287. + * License along with this library; if not, see
  63288. + * <http://www.gnu.org/licenses/>.
  63289. */
  63290. /* Supply an architecture specific value for PAGE_SIZE and friends. */
  63291. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/wordsize.h uClibc-git/libc/sysdeps/linux/cris/bits/wordsize.h
  63292. --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
  63293. +++ uClibc-git/libc/sysdeps/linux/cris/bits/wordsize.h 2014-07-25 20:36:06.833334827 +0200
  63294. @@ -13,7 +13,6 @@
  63295. You should have received a copy of the GNU Library General Public
  63296. License along with the GNU C Library; see the file COPYING.LIB. If not,
  63297. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  63298. - Boston, MA 02111-1307, USA. */
  63299. + see <http://www.gnu.org/licenses/>. */
  63300. #define __WORDSIZE 32
  63301. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/clone.S uClibc-git/libc/sysdeps/linux/cris/clone.S
  63302. --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/clone.S 2012-05-15 09:20:09.000000000 +0200
  63303. +++ uClibc-git/libc/sysdeps/linux/cris/clone.S 2014-07-25 20:36:06.833334827 +0200
  63304. @@ -13,8 +13,7 @@
  63305. You should have received a copy of the GNU Library General Public
  63306. License along with the GNU C Library; see the file COPYING.LIB. If not,
  63307. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  63308. - Boston, MA 02111-1307, USA. */
  63309. + see <http://www.gnu.org/licenses/>. */
  63310. #include <features.h>
  63311. #include <sys/syscall.h>
  63312. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/fork.c uClibc-git/libc/sysdeps/linux/cris/fork.c
  63313. --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/fork.c 2012-05-15 09:20:09.000000000 +0200
  63314. +++ uClibc-git/libc/sysdeps/linux/cris/fork.c 1970-01-01 01:00:00.000000000 +0100
  63315. @@ -1,18 +0,0 @@
  63316. -/*
  63317. - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  63318. - *
  63319. - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  63320. - */
  63321. -
  63322. -#include "sysdep.h"
  63323. -
  63324. -#define __NR___libc_fork __NR_fork
  63325. -SYSCALL__ (__libc_fork, 0)
  63326. - /* R1 is now 0 for the parent and 1 for the child. Decrement it to
  63327. - make it -1 (all bits set) for the parent, and 0 (no bits set)
  63328. - for the child. Then AND it with R0, so the parent gets
  63329. - R0&-1==R0, and the child gets R0&0==0. */
  63330. - /* i dunno what the blurb above is useful for. we just return. */
  63331. -__asm__("ret\n\tnop");
  63332. -weak_alias(__libc_fork,fork)
  63333. -libc_hidden_weak(fork)
  63334. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/jmpbuf-offsets.h uClibc-git/libc/sysdeps/linux/cris/jmpbuf-offsets.h
  63335. --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
  63336. +++ uClibc-git/libc/sysdeps/linux/cris/jmpbuf-offsets.h 2014-07-25 20:36:06.833334827 +0200
  63337. @@ -0,0 +1,8 @@
  63338. +/* Private macros for accessing __jmp_buf contents. BFIN version. */
  63339. +/*
  63340. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  63341. + *
  63342. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  63343. + */
  63344. +
  63345. +#define JB_SP 1
  63346. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/cris/jmpbuf-unwind.h
  63347. --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  63348. +++ uClibc-git/libc/sysdeps/linux/cris/jmpbuf-unwind.h 2014-07-25 20:36:06.833334827 +0200
  63349. @@ -0,0 +1,12 @@
  63350. +/*
  63351. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  63352. + *
  63353. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  63354. + */
  63355. +#include <setjmp.h>
  63356. +#include <jmpbuf-offsets.h>
  63357. +
  63358. +/* Test if longjmp to JMPBUF would unwind the frame
  63359. + containing a local variable at ADDRESS. */
  63360. +#define _JMPBUF_UNWINDS(jmpbuf, address) \
  63361. + ((void *) (address) < (void *) (jmpbuf)[JB_SP])
  63362. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/__longjmp.S uClibc-git/libc/sysdeps/linux/cris/__longjmp.S
  63363. --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
  63364. +++ uClibc-git/libc/sysdeps/linux/cris/__longjmp.S 2014-07-25 20:36:06.813334722 +0200
  63365. @@ -14,14 +14,9 @@
  63366. You should have received a copy of the GNU Library General Public
  63367. License along with the GNU C Library; see the file COPYING.LIB. If not,
  63368. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  63369. - Boston, MA 02111-1307, USA. */
  63370. + see <http://www.gnu.org/licenses/>. */
  63371. -#include <features.h>
  63372. #include "sysdep.h"
  63373. -#define _SETJMP_H
  63374. -#define _ASM
  63375. -#include <bits/setjmp.h>
  63376. .syntax no_register_prefix
  63377. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/Makefile.arch uClibc-git/libc/sysdeps/linux/cris/Makefile.arch
  63378. --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
  63379. +++ uClibc-git/libc/sysdeps/linux/cris/Makefile.arch 2014-07-25 20:36:06.813334722 +0200
  63380. @@ -5,9 +5,7 @@
  63381. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  63382. #
  63383. -CSRC := __init_brk.c brk.c sbrk.c
  63384. +CSRC-y := __init_brk.c brk.c sbrk.c
  63385. -SSRC := setjmp.S __longjmp.S clone.S sysdep.S syscall.S vfork.S
  63386. -ifeq ($(UNIFIED_SYSCALL),y)
  63387. -SSRC += __uClibc_syscall.S
  63388. -endif
  63389. +SSRC-y := setjmp.S __longjmp.S clone.S sysdep.S syscall.S vfork.S
  63390. +SSRC-$(UNIFIED_SYSCALL) += __uClibc_syscall.S
  63391. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/setjmp.S uClibc-git/libc/sysdeps/linux/cris/setjmp.S
  63392. --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/setjmp.S 2012-05-15 09:20:09.000000000 +0200
  63393. +++ uClibc-git/libc/sysdeps/linux/cris/setjmp.S 2014-07-25 20:36:06.833334827 +0200
  63394. @@ -14,13 +14,9 @@
  63395. You should have received a copy of the GNU Library General Public
  63396. License along with the GNU C Library; see the file COPYING.LIB. If not,
  63397. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  63398. - Boston, MA 02111-1307, USA. */
  63399. + see <http://www.gnu.org/licenses/>. */
  63400. #include "sysdep.h"
  63401. -#define _SETJMP_H
  63402. -#define _ASM
  63403. -#include <bits/setjmp.h>
  63404. .syntax no_register_prefix
  63405. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/sys/procfs.h uClibc-git/libc/sysdeps/linux/cris/sys/procfs.h
  63406. --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  63407. +++ uClibc-git/libc/sysdeps/linux/cris/sys/procfs.h 2014-07-25 20:36:06.841334869 +0200
  63408. @@ -13,8 +13,7 @@
  63409. You should have received a copy of the GNU Library General Public
  63410. License along with the GNU C Library; see the file COPYING.LIB. If not,
  63411. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  63412. - Boston, MA 02111-1307, USA. */
  63413. + see <http://www.gnu.org/licenses/>. */
  63414. #ifndef _SYS_PROCFS_H
  63415. #define _SYS_PROCFS_H 1
  63416. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/sys/ucontext.h uClibc-git/libc/sysdeps/linux/cris/sys/ucontext.h
  63417. --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  63418. +++ uClibc-git/libc/sysdeps/linux/cris/sys/ucontext.h 2014-07-25 20:36:06.841334869 +0200
  63419. @@ -12,9 +12,8 @@
  63420. Lesser General Public License for more details.
  63421. You should have received a copy of the GNU Lesser General Public
  63422. - License along with the GNU C Library; if not, write to the Free
  63423. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  63424. - 02111-1307 USA. */
  63425. + License along with the GNU C Library; if not, see
  63426. + <http://www.gnu.org/licenses/>. */
  63427. /* System V/cris ABI compliant context switching support. */
  63428. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/syscall.S uClibc-git/libc/sysdeps/linux/cris/syscall.S
  63429. --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/syscall.S 2012-05-15 09:20:09.000000000 +0200
  63430. +++ uClibc-git/libc/sysdeps/linux/cris/syscall.S 2014-07-25 20:36:06.841334869 +0200
  63431. @@ -13,8 +13,7 @@
  63432. You should have received a copy of the GNU Library General Public
  63433. License along with the GNU C Library; see the file COPYING.LIB. If not,
  63434. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  63435. - Boston, MA 02111-1307, USA. */
  63436. + see <http://www.gnu.org/licenses/>. */
  63437. #include "sysdep.h"
  63438. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/sysdep.h uClibc-git/libc/sysdeps/linux/cris/sysdep.h
  63439. --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/sysdep.h 2012-05-15 09:20:09.000000000 +0200
  63440. +++ uClibc-git/libc/sysdeps/linux/cris/sysdep.h 2014-07-25 20:36:06.841334869 +0200
  63441. @@ -14,13 +14,12 @@
  63442. You should have received a copy of the GNU Library General Public
  63443. License along with the GNU C Library; see the file COPYING.LIB. If not,
  63444. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  63445. - Boston, MA 02111-1307, USA. */
  63446. + see <http://www.gnu.org/licenses/>. */
  63447. #ifndef _SYSDEP_H_
  63448. #define _SYSDEP_H_
  63449. -#include <sys/syscall.h>
  63450. +#include <common/sysdep.h>
  63451. #ifndef C_LABEL
  63452. @@ -126,6 +125,14 @@
  63453. ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME (name), function) @ \
  63454. .align ALIGNARG (2) @ \
  63455. C_LABEL(name)
  63456. +
  63457. +#define HIDDEN_ENTRY(name) \
  63458. + .text @ \
  63459. + ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (name) @ \
  63460. + .hidden C_SYMBOL_NAME (name) @ \
  63461. + ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME (name), function) @ \
  63462. + .align ALIGNARG (2) @ \
  63463. + C_LABEL(name)
  63464. #undef END
  63465. #define END(name) \
  63466. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/sysdep.S uClibc-git/libc/sysdeps/linux/cris/sysdep.S
  63467. --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/sysdep.S 2012-05-15 09:20:09.000000000 +0200
  63468. +++ uClibc-git/libc/sysdeps/linux/cris/sysdep.S 2014-07-25 20:36:06.841334869 +0200
  63469. @@ -13,8 +13,7 @@
  63470. You should have received a copy of the GNU Library General Public
  63471. License along with the GNU C Library; see the file COPYING.LIB. If not,
  63472. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  63473. - Boston, MA 02111-1307, USA. */
  63474. + see <http://www.gnu.org/licenses/>. */
  63475. #include <features.h>
  63476. #include "sysdep.h"
  63477. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/cris/vfork.S uClibc-git/libc/sysdeps/linux/cris/vfork.S
  63478. --- uClibc-0.9.33.2/libc/sysdeps/linux/cris/vfork.S 2012-05-15 09:20:09.000000000 +0200
  63479. +++ uClibc-git/libc/sysdeps/linux/cris/vfork.S 2014-07-25 20:36:06.841334869 +0200
  63480. @@ -16,7 +16,7 @@
  63481. * enclosing function
  63482. */
  63483. -ENTRY(__vfork)
  63484. +HIDDEN_ENTRY(__vfork)
  63485. movu.w __NR_vfork,$r9
  63486. break 13
  63487. cmps.w -4096,$r10
  63488. @@ -27,4 +27,4 @@
  63489. PSEUDO_END(__vfork)
  63490. weak_alias(__vfork,vfork)
  63491. -libc_hidden_weak(vfork)
  63492. +libc_hidden_def(vfork)
  63493. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/fcntl.h uClibc-git/libc/sysdeps/linux/e1/bits/fcntl.h
  63494. --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  63495. +++ uClibc-git/libc/sysdeps/linux/e1/bits/fcntl.h 2014-07-25 20:36:06.865334995 +0200
  63496. @@ -13,9 +13,8 @@
  63497. Lesser General Public License for more details.
  63498. You should have received a copy of the GNU Lesser General Public
  63499. - License along with the GNU C Library; if not, write to the Free
  63500. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  63501. - 02111-1307 USA. */
  63502. + License along with the GNU C Library; if not, see
  63503. + <http://www.gnu.org/licenses/>. */
  63504. #ifndef _FCNTL_H
  63505. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  63506. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/fenv.h uClibc-git/libc/sysdeps/linux/e1/bits/fenv.h
  63507. --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
  63508. +++ uClibc-git/libc/sysdeps/linux/e1/bits/fenv.h 2014-07-25 20:36:06.865334995 +0200
  63509. @@ -15,9 +15,8 @@
  63510. Lesser General Public License for more details.
  63511. You should have received a copy of the GNU Lesser General Public
  63512. - License along with the GNU C Library; if not, write to the Free
  63513. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  63514. - 02111-1307 USA. */
  63515. + License along with the GNU C Library; if not, see
  63516. + <http://www.gnu.org/licenses/>. */
  63517. #ifndef _FENV_H
  63518. # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
  63519. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/fenvinline.h uClibc-git/libc/sysdeps/linux/e1/bits/fenvinline.h
  63520. --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/fenvinline.h 2012-05-15 09:20:09.000000000 +0200
  63521. +++ uClibc-git/libc/sysdeps/linux/e1/bits/fenvinline.h 2014-07-25 20:36:06.865334995 +0200
  63522. @@ -16,9 +16,8 @@
  63523. Lesser General Public License for more details.
  63524. You should have received a copy of the GNU Lesser General Public
  63525. - License along with the GNU C Library; if not, write to the Free
  63526. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  63527. - 02111-1307 USA. */
  63528. + License along with the GNU C Library; if not, see
  63529. + <http://www.gnu.org/licenses/>. */
  63530. #if defined __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_MATH_INLINES
  63531. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/e1/bits/kernel_types.h
  63532. --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
  63533. +++ uClibc-git/libc/sysdeps/linux/e1/bits/kernel_types.h 2014-07-25 20:36:06.865334995 +0200
  63534. @@ -31,6 +31,8 @@
  63535. typedef unsigned short __kernel_old_uid_t;
  63536. typedef unsigned short __kernel_old_gid_t;
  63537. typedef __kernel_dev_t __kernel_old_dev_t;
  63538. +typedef long __kernel_long_t;
  63539. +typedef unsigned long __kernel_ulong_t;
  63540. typedef long long __kernel_loff_t;
  63541. /*
  63542. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/e1/bits/uClibc_arch_features.h
  63543. --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  63544. +++ uClibc-git/libc/sysdeps/linux/e1/bits/uClibc_arch_features.h 2014-07-25 20:36:06.865334995 +0200
  63545. @@ -12,8 +12,8 @@
  63546. /* can your target use syscall6() for mmap ? */
  63547. #undef __UCLIBC_MMAP_HAS_6_ARGS__
  63548. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  63549. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  63550. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  63551. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  63552. /* does your target have a broken create_module() ? */
  63553. #undef __UCLIBC_BROKEN_CREATE_MODULE__
  63554. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/unistd.h uClibc-git/libc/sysdeps/linux/e1/bits/unistd.h
  63555. --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/unistd.h 2012-05-15 09:20:09.000000000 +0200
  63556. +++ uClibc-git/libc/sysdeps/linux/e1/bits/unistd.h 2014-07-25 20:36:06.865334995 +0200
  63557. @@ -378,13 +378,6 @@
  63558. return (type)(par1); \
  63559. }
  63560. -#include <sys/types.h>
  63561. -/* Taken from <bits/errno.h> */
  63562. -#ifndef _LIBC
  63563. -/* We don't support pthreads for the moment*/
  63564. -#define __set_errno(val) ((errno) = (val))
  63565. -#endif
  63566. -
  63567. #if 0
  63568. #define _syscall3(type, name,atype, a , btype, b, ctype, c) \
  63569. type name(atype a, btype b, ctype c,) \
  63570. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/wordsize.h uClibc-git/libc/sysdeps/linux/e1/bits/wordsize.h
  63571. --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
  63572. +++ uClibc-git/libc/sysdeps/linux/e1/bits/wordsize.h 2014-07-25 20:36:06.865334995 +0200
  63573. @@ -15,8 +15,7 @@
  63574. Lesser General Public License for more details.
  63575. You should have received a copy of the GNU Lesser General Public
  63576. - License along with the GNU C Library; if not, write to the Free
  63577. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  63578. - 02111-1307 USA. */
  63579. + License along with the GNU C Library; if not, see
  63580. + <http://www.gnu.org/licenses/>. */
  63581. #define __WORDSIZE 32
  63582. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/crt1.c uClibc-git/libc/sysdeps/linux/e1/crt1.c
  63583. --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/crt1.c 2012-05-15 09:20:09.000000000 +0200
  63584. +++ uClibc-git/libc/sysdeps/linux/e1/crt1.c 2014-07-25 20:36:06.865334995 +0200
  63585. @@ -18,8 +18,8 @@
  63586. * for more details.
  63587. *
  63588. * You should have received a copy of the GNU Library General Public License
  63589. - * along with this program; if not, write to the Free Software Foundation,
  63590. - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  63591. + * along with this program; see the file COPYING.LIB. If not, see
  63592. + * <http://www.gnu.org/licenses/>.
  63593. */
  63594. /* Stick in a dummy reference to main(), so that if an application
  63595. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/Makefile uClibc-git/libc/sysdeps/linux/e1/Makefile
  63596. --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/Makefile 2012-05-15 09:20:09.000000000 +0200
  63597. +++ uClibc-git/libc/sysdeps/linux/e1/Makefile 2014-07-25 20:36:06.853334932 +0200
  63598. @@ -17,7 +17,7 @@
  63599. CTOR_TARGETS := $(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o
  63600. # why is crt1.c listed in CSRC ?
  63601. -CSRC := crt1.c syscalls.c longjmp.c setjmp.c vfork.c
  63602. +CSRC := crt1.c syscalls.c longjmp.c setjmp.c
  63603. OBJS := $(patsubst %.c,%.o, $(CSRC))
  63604. OBJ_LIST := ../../../obj.sysdeps.$(TARGET_ARCH)
  63605. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/sys/procfs.h uClibc-git/libc/sysdeps/linux/e1/sys/procfs.h
  63606. --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  63607. +++ uClibc-git/libc/sysdeps/linux/e1/sys/procfs.h 2014-07-25 20:36:06.877335057 +0200
  63608. @@ -12,9 +12,8 @@
  63609. Lesser General Public License for more details.
  63610. You should have received a copy of the GNU Lesser General Public
  63611. - License along with the GNU C Library; if not, write to the Free
  63612. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  63613. - 02111-1307 USA. */
  63614. + License along with the GNU C Library; if not, see
  63615. + <http://www.gnu.org/licenses/>. */
  63616. #ifndef _SYS_PROCFS_H
  63617. #define _SYS_PROCFS_H 1
  63618. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/sys/reg.h uClibc-git/libc/sysdeps/linux/e1/sys/reg.h
  63619. --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/sys/reg.h 2012-05-15 09:20:09.000000000 +0200
  63620. +++ uClibc-git/libc/sysdeps/linux/e1/sys/reg.h 2014-07-25 20:36:06.877335057 +0200
  63621. @@ -12,9 +12,8 @@
  63622. Lesser General Public License for more details.
  63623. You should have received a copy of the GNU Lesser General Public
  63624. - License along with the GNU C Library; if not, write to the Free
  63625. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  63626. - 02111-1307 USA. */
  63627. + License along with the GNU C Library; if not, see
  63628. + <http://www.gnu.org/licenses/>. */
  63629. #ifndef _SYS_REG_H
  63630. #define _SYS_REG_H 1
  63631. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/sys/ucontext.h uClibc-git/libc/sysdeps/linux/e1/sys/ucontext.h
  63632. --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  63633. +++ uClibc-git/libc/sysdeps/linux/e1/sys/ucontext.h 2014-07-25 20:36:06.877335057 +0200
  63634. @@ -12,9 +12,8 @@
  63635. Lesser General Public License for more details.
  63636. You should have received a copy of the GNU Lesser General Public
  63637. - License along with the GNU C Library; if not, write to the Free
  63638. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  63639. - 02111-1307 USA. */
  63640. + License along with the GNU C Library; if not, see
  63641. + <http://www.gnu.org/licenses/>. */
  63642. /* System V/m68k ABI compliant context switching support. */
  63643. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/e1/vfork.c uClibc-git/libc/sysdeps/linux/e1/vfork.c
  63644. --- uClibc-0.9.33.2/libc/sysdeps/linux/e1/vfork.c 2012-05-15 09:20:09.000000000 +0200
  63645. +++ uClibc-git/libc/sysdeps/linux/e1/vfork.c 1970-01-01 01:00:00.000000000 +0100
  63646. @@ -1,14 +0,0 @@
  63647. -/*
  63648. - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  63649. - *
  63650. - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  63651. - */
  63652. -
  63653. -#include <sys/types.h>
  63654. -#include <sys/syscall.h>
  63655. -#include <errno.h>
  63656. -
  63657. -#define __NR___vfork __NR_vfork
  63658. -attribute_hidden _syscall0(pid_t, __vfork)
  63659. -weak_alias(__vfork,vfork)
  63660. -libc_hidden_weak(vfork)
  63661. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/elf-fdpic.h uClibc-git/libc/sysdeps/linux/frv/bits/elf-fdpic.h
  63662. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/elf-fdpic.h 2012-05-15 09:20:09.000000000 +0200
  63663. +++ uClibc-git/libc/sysdeps/linux/frv/bits/elf-fdpic.h 2014-07-25 20:36:06.905335205 +0200
  63664. @@ -22,8 +22,7 @@
  63665. You should have received a copy of the GNU Lesser General Public
  63666. License along with the GNU C Library; see the file COPYING.LIB. If
  63667. -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  63668. -Cambridge, MA 02139, USA. */
  63669. +not, see <http://www.gnu.org/licenses/>. */
  63670. #ifndef _BITS_ELF_FDPIC_H
  63671. #define _BITS_ELF_FDPIC_H
  63672. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/fcntl.h uClibc-git/libc/sysdeps/linux/frv/bits/fcntl.h
  63673. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  63674. +++ uClibc-git/libc/sysdeps/linux/frv/bits/fcntl.h 2014-07-25 20:36:06.905335205 +0200
  63675. @@ -13,9 +13,8 @@
  63676. Lesser General Public License for more details.
  63677. You should have received a copy of the GNU Lesser General Public
  63678. - License along with the GNU C Library; if not, write to the Free
  63679. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  63680. - 02111-1307 USA. */
  63681. + License along with the GNU C Library; if not, see
  63682. + <http://www.gnu.org/licenses/>. */
  63683. #ifndef _FCNTL_H
  63684. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  63685. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/setjmp.h uClibc-git/libc/sysdeps/linux/frv/bits/setjmp.h
  63686. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  63687. +++ uClibc-git/libc/sysdeps/linux/frv/bits/setjmp.h 2014-07-25 20:36:06.905335205 +0200
  63688. @@ -12,9 +12,8 @@
  63689. Lesser General Public License for more details.
  63690. You should have received a copy of the GNU Lesser General Public
  63691. - License along with the GNU C Library; if not, write to the Free
  63692. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  63693. - 02111-1307 USA. */
  63694. + License along with the GNU C Library; if not, see
  63695. + <http://www.gnu.org/licenses/>. */
  63696. /* Define the machine-dependent type `jmp_buf'. FRV version. */
  63697. @@ -35,7 +34,6 @@
  63698. #define __SETJMP_FP (__SETJMP_SP+1)
  63699. -#ifndef _ASM
  63700. typedef struct
  63701. /* Demand 64-bit alignment such that we can use std/ldd in
  63702. setjmp/longjmp. */
  63703. @@ -48,11 +46,5 @@
  63704. unsigned long __sp; /* stack pointer */
  63705. unsigned long __fp; /* frame pointer */
  63706. } __jmp_buf[1];
  63707. -#endif
  63708. -
  63709. -/* Test if longjmp to JMPBUF would unwind the frame
  63710. - containing a local variable at ADDRESS. */
  63711. -#define _JMPBUF_UNWINDS(jmpbuf, address) \
  63712. - ((void *) (address) < (void *) (jmpbuf)->__sp)
  63713. #endif /* bits/setjmp.h */
  63714. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/frv/bits/stackinfo.h
  63715. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  63716. +++ uClibc-git/libc/sysdeps/linux/frv/bits/stackinfo.h 2014-07-25 20:36:06.905335205 +0200
  63717. @@ -12,9 +12,8 @@
  63718. Lesser General Public License for more details.
  63719. You should have received a copy of the GNU Lesser General Public
  63720. - License along with the GNU C Library; if not, write to the Free
  63721. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  63722. - 02111-1307 USA. */
  63723. + License along with the GNU C Library; if not, see
  63724. + <http://www.gnu.org/licenses/>. */
  63725. /* This file contains a bit of information about the stack allocation
  63726. of the processor. */
  63727. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/stat.h uClibc-git/libc/sysdeps/linux/frv/bits/stat.h
  63728. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
  63729. +++ uClibc-git/libc/sysdeps/linux/frv/bits/stat.h 2014-07-25 20:36:06.905335205 +0200
  63730. @@ -12,9 +12,8 @@
  63731. Lesser General Public License for more details.
  63732. You should have received a copy of the GNU Lesser General Public
  63733. - License along with the GNU C Library; if not, write to the Free
  63734. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  63735. - 02111-1307 USA. */
  63736. + License along with the GNU C Library; if not, see
  63737. + <http://www.gnu.org/licenses/>. */
  63738. #ifndef _SYS_STAT_H
  63739. # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
  63740. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/syscalls.h uClibc-git/libc/sysdeps/linux/frv/bits/syscalls.h
  63741. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/syscalls.h 2012-05-15 09:20:09.000000000 +0200
  63742. +++ uClibc-git/libc/sysdeps/linux/frv/bits/syscalls.h 2014-07-25 20:36:06.905335205 +0200
  63743. @@ -15,8 +15,7 @@
  63744. # define __syscall_return(type, res) \
  63745. do { \
  63746. unsigned long __sr2 = (res); \
  63747. - if (__builtin_expect ((unsigned long)(__sr2) \
  63748. - >= (unsigned long)(-4095), 0)) { \
  63749. + if (unlikely ((unsigned long)(__sr2) >= (unsigned long)(-4095))) { \
  63750. extern int __syscall_error (int); \
  63751. return (type) __syscall_error (__sr2); \
  63752. } \
  63753. @@ -26,8 +25,7 @@
  63754. # define __syscall_return(type, res) \
  63755. do { \
  63756. unsigned long __sr2 = (res); \
  63757. - if (__builtin_expect ((unsigned long)(__sr2) \
  63758. - >= (unsigned long)(-4095), 0)) { \
  63759. + if (unlikely ((unsigned long)(__sr2) >= (unsigned long)(-4095))) { \
  63760. __set_errno (-__sr2); \
  63761. __sr2 = -1; \
  63762. } \
  63763. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/frv/bits/uClibc_arch_features.h
  63764. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  63765. +++ uClibc-git/libc/sysdeps/linux/frv/bits/uClibc_arch_features.h 2014-07-25 20:36:06.905335205 +0200
  63766. @@ -12,8 +12,8 @@
  63767. /* can your target use syscall6() for mmap ? */
  63768. #undef __UCLIBC_MMAP_HAS_6_ARGS__
  63769. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  63770. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  63771. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  63772. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  63773. /* does your target have a broken create_module() ? */
  63774. #undef __UCLIBC_BROKEN_CREATE_MODULE__
  63775. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/uClibc_page.h uClibc-git/libc/sysdeps/linux/frv/bits/uClibc_page.h
  63776. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/uClibc_page.h 2012-05-15 09:20:09.000000000 +0200
  63777. +++ uClibc-git/libc/sysdeps/linux/frv/bits/uClibc_page.h 2014-07-25 20:36:06.905335205 +0200
  63778. @@ -11,8 +11,8 @@
  63779. * Library General Public License for more details.
  63780. *
  63781. * You should have received a copy of the GNU Library General Public
  63782. - * License along with this library; if not, write to the Free
  63783. - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  63784. + * License along with this library; if not, see
  63785. + * <http://www.gnu.org/licenses/>.
  63786. */
  63787. /* Supply an architecture specific value for PAGE_SIZE and friends. */
  63788. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/wordsize.h uClibc-git/libc/sysdeps/linux/frv/bits/wordsize.h
  63789. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
  63790. +++ uClibc-git/libc/sysdeps/linux/frv/bits/wordsize.h 2014-07-25 20:36:06.905335205 +0200
  63791. @@ -12,8 +12,7 @@
  63792. Lesser General Public License for more details.
  63793. You should have received a copy of the GNU Lesser General Public
  63794. - License along with the GNU C Library; if not, write to the Free
  63795. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  63796. - 02111-1307 USA. */
  63797. + License along with the GNU C Library; if not, see
  63798. + <http://www.gnu.org/licenses/>. */
  63799. #define __WORDSIZE 32
  63800. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/clone.S uClibc-git/libc/sysdeps/linux/frv/clone.S
  63801. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/clone.S 2012-05-15 09:20:09.000000000 +0200
  63802. +++ uClibc-git/libc/sysdeps/linux/frv/clone.S 2014-07-25 20:36:06.905335205 +0200
  63803. @@ -13,9 +13,8 @@
  63804. Lesser General Public License for more details.
  63805. You should have received a copy of the GNU Lesser General Public
  63806. - License along with the GNU C Library; if not, write to the Free
  63807. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  63808. - 02111-1307 USA. */
  63809. + License along with the GNU C Library; if not, see
  63810. + <http://www.gnu.org/licenses/>. */
  63811. /* clone() is even more special than fork() as it mucks with stacks
  63812. and invokes a function in the right context after its all over. */
  63813. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/crt0.S uClibc-git/libc/sysdeps/linux/frv/crt0.S
  63814. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/crt0.S 2012-05-15 09:20:09.000000000 +0200
  63815. +++ uClibc-git/libc/sysdeps/linux/frv/crt0.S 2014-07-25 20:36:06.905335205 +0200
  63816. @@ -22,8 +22,7 @@
  63817. You should have received a copy of the GNU Lesser General Public
  63818. License along with the GNU C Library; see the file COPYING.LIB. If
  63819. -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  63820. -Cambridge, MA 02139, USA. */
  63821. +not, see <http://www.gnu.org/licenses/>. */
  63822. /* Based on ../i386/crt0.S and newlib's libgloss/frv/crt0.S */
  63823. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/crti.S uClibc-git/libc/sysdeps/linux/frv/crti.S
  63824. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/crti.S 2012-05-15 09:20:09.000000000 +0200
  63825. +++ uClibc-git/libc/sysdeps/linux/frv/crti.S 2014-07-25 20:36:06.905335205 +0200
  63826. @@ -22,8 +22,7 @@
  63827. You should have received a copy of the GNU Lesser General Public
  63828. License along with the GNU C Library; see the file COPYING.LIB. If
  63829. -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  63830. -Cambridge, MA 02139, USA. */
  63831. +not, see <http://www.gnu.org/licenses/>. */
  63832. .section .init,"x"
  63833. .p2align 2
  63834. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/crtn.S uClibc-git/libc/sysdeps/linux/frv/crtn.S
  63835. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/crtn.S 2012-05-15 09:20:09.000000000 +0200
  63836. +++ uClibc-git/libc/sysdeps/linux/frv/crtn.S 2014-07-25 20:36:06.905335205 +0200
  63837. @@ -22,8 +22,7 @@
  63838. You should have received a copy of the GNU Lesser General Public
  63839. License along with the GNU C Library; see the file COPYING.LIB. If
  63840. -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  63841. -Cambridge, MA 02139, USA. */
  63842. +not, see <http://www.gnu.org/licenses/>. */
  63843. .section .init,"x"
  63844. .globl _init
  63845. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/crtreloc.c uClibc-git/libc/sysdeps/linux/frv/crtreloc.c
  63846. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/crtreloc.c 2012-05-15 09:20:09.000000000 +0200
  63847. +++ uClibc-git/libc/sysdeps/linux/frv/crtreloc.c 2014-07-25 20:36:06.905335205 +0200
  63848. @@ -23,8 +23,7 @@
  63849. You should have received a copy of the GNU Lesser General Public
  63850. License along with the GNU C Library; see the file COPYING.LIB. If
  63851. -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  63852. -Cambridge, MA 02139, USA. */
  63853. +not, see <http://www.gnu.org/licenses/>. */
  63854. #include <sys/types.h>
  63855. #include <link.h>
  63856. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/dl-iterate-phdr.c uClibc-git/libc/sysdeps/linux/frv/dl-iterate-phdr.c
  63857. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/dl-iterate-phdr.c 2012-05-15 09:20:09.000000000 +0200
  63858. +++ uClibc-git/libc/sysdeps/linux/frv/dl-iterate-phdr.c 2014-07-25 20:36:06.905335205 +0200
  63859. @@ -13,8 +13,7 @@
  63860. You should have received a copy of the GNU Lesser General Public
  63861. License along with the GNU C Library; see the file COPYING.LIB. If
  63862. -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  63863. -Cambridge, MA 02139, USA. */
  63864. +not, see <http://www.gnu.org/licenses/>. */
  63865. #include <link.h>
  63866. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/fstat64.c uClibc-git/libc/sysdeps/linux/frv/fstat64.c
  63867. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/fstat64.c 2012-05-15 09:20:09.000000000 +0200
  63868. +++ uClibc-git/libc/sysdeps/linux/frv/fstat64.c 2014-07-25 20:36:06.909335225 +0200
  63869. @@ -9,11 +9,9 @@
  63870. * Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
  63871. */
  63872. +#include <_lfs_64.h>
  63873. #include <sys/syscall.h>
  63874. -#include <unistd.h>
  63875. #include <sys/stat.h>
  63876. -#ifdef __UCLIBC_HAS_LFS__
  63877. _syscall2(int, fstat64, int, fd, struct stat64 *, buf)
  63878. libc_hidden_def(fstat64)
  63879. -#endif
  63880. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/frv/jmpbuf-unwind.h
  63881. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  63882. +++ uClibc-git/libc/sysdeps/linux/frv/jmpbuf-unwind.h 2014-07-25 20:36:06.909335225 +0200
  63883. @@ -0,0 +1,14 @@
  63884. +/*
  63885. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  63886. + *
  63887. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  63888. + */
  63889. +
  63890. +#include <setjmp.h>
  63891. +
  63892. +/* Test if longjmp to JMPBUF would unwind the frame
  63893. + containing a local variable at ADDRESS. */
  63894. +#define _JMPBUF_UNWINDS(jmpbuf, address) \
  63895. + ((void *) (address) < (void *) (jmpbuf)->__sp)
  63896. +
  63897. +#endif /* bits/setjmp.h */
  63898. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/__longjmp.S uClibc-git/libc/sysdeps/linux/frv/__longjmp.S
  63899. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
  63900. +++ uClibc-git/libc/sysdeps/linux/frv/__longjmp.S 2014-07-25 20:36:06.889335121 +0200
  63901. @@ -4,10 +4,6 @@
  63902. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  63903. */
  63904. -#define _SETJMP_H
  63905. -#define _ASM
  63906. -#include <bits/setjmp.h>
  63907. -
  63908. # setjmp/longjmp for Frv. The jmpbuf looks like this:
  63909. #
  63910. # Register jmpbuf offset
  63911. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/lstat64.c uClibc-git/libc/sysdeps/linux/frv/lstat64.c
  63912. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/lstat64.c 2012-05-15 09:20:09.000000000 +0200
  63913. +++ uClibc-git/libc/sysdeps/linux/frv/lstat64.c 2014-07-25 20:36:06.909335225 +0200
  63914. @@ -9,11 +9,9 @@
  63915. * Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
  63916. */
  63917. +#include <_lfs_64.h>
  63918. #include <sys/syscall.h>
  63919. -#include <unistd.h>
  63920. #include <sys/stat.h>
  63921. -#ifdef __UCLIBC_HAS_LFS__
  63922. _syscall2(int, lstat64, const char *, file_name, struct stat64 *, buf)
  63923. libc_hidden_def(lstat64)
  63924. -#endif
  63925. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/Makefile uClibc-git/libc/sysdeps/linux/frv/Makefile
  63926. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/Makefile 2012-05-15 09:20:09.000000000 +0200
  63927. +++ uClibc-git/libc/sysdeps/linux/frv/Makefile 2014-07-25 20:36:06.889335121 +0200
  63928. @@ -17,7 +17,7 @@
  63929. SSRC := __longjmp.S setjmp.S clone.S vfork.S
  63930. SOBJ := $(patsubst %.S,%.o, $(SSRC))
  63931. -CSRC = mmap.c sysdep.c syscall.c brk.c sbrk.c __init_brk.c dl-iterate-phdr.c
  63932. +CSRC = sysdep.c syscall.c brk.c sbrk.c __init_brk.c dl-iterate-phdr.c
  63933. CSRC += xstatconv.c stat.c stat64.c fstat.c fstat64.c lstat.c lstat64.c
  63934. COBJ := $(patsubst %.c,%.o, $(CSRC))
  63935. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/mmap.c uClibc-git/libc/sysdeps/linux/frv/mmap.c
  63936. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/mmap.c 2012-05-15 09:20:09.000000000 +0200
  63937. +++ uClibc-git/libc/sysdeps/linux/frv/mmap.c 1970-01-01 01:00:00.000000000 +0100
  63938. @@ -1,50 +0,0 @@
  63939. -/* Copyright (C) 1997, 1998, 1999, 2002, 2003 Free Software Foundation, Inc.
  63940. - This file is part of the GNU C Library.
  63941. - Contributed by Daniel Jacobowitz <dan@debian.org>, 1999.
  63942. -
  63943. - The GNU C Library is free software; you can redistribute it and/or
  63944. - modify it under the terms of the GNU Lesser General Public
  63945. - License as published by the Free Software Foundation; either
  63946. - version 2.1 of the License, or (at your option) any later version.
  63947. -
  63948. - The GNU C Library is distributed in the hope that it will be useful,
  63949. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  63950. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  63951. - Lesser General Public License for more details.
  63952. -
  63953. - You should have received a copy of the GNU Lesser General Public
  63954. - License along with the GNU C Library; if not, write to the Free
  63955. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  63956. - 02111-1307 USA. */
  63957. -
  63958. -/* Massivly hacked up for uClibc by Erik Andersen */
  63959. -
  63960. -/* Extracted from ../common/mmap64.c by Alexandre Oliva <aoliva@redhat.com>
  63961. -
  63962. - We don't want to use the old mmap interface. */
  63963. -
  63964. -#include <features.h>
  63965. -#include <errno.h>
  63966. -#include <unistd.h>
  63967. -#include <sys/syscall.h>
  63968. -#include <sys/mman.h>
  63969. -
  63970. -
  63971. -#define __NR___syscall_mmap2 __NR_mmap2
  63972. -static __inline__ _syscall6(__ptr_t, __syscall_mmap2, __ptr_t, addr,
  63973. - size_t, len, int, prot, int, flags, int, fd, off_t, offset)
  63974. -
  63975. -/* This is always 12, even on architectures where PAGE_SHIFT != 12. */
  63976. -# ifndef MMAP2_PAGE_SHIFT
  63977. -# define MMAP2_PAGE_SHIFT 12
  63978. -# endif
  63979. -
  63980. -__ptr_t mmap(__ptr_t addr, size_t len, int prot, int flags, int fd, __off_t offset)
  63981. -{
  63982. - if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1)) {
  63983. - __set_errno (EINVAL);
  63984. - return MAP_FAILED;
  63985. - }
  63986. - return(__syscall_mmap2(addr, len, prot, flags, fd, (off_t) (offset >> MMAP2_PAGE_SHIFT)));
  63987. -}
  63988. -libc_hidden_def(mmap)
  63989. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/stat64.c uClibc-git/libc/sysdeps/linux/frv/stat64.c
  63990. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/stat64.c 2012-05-15 09:20:09.000000000 +0200
  63991. +++ uClibc-git/libc/sysdeps/linux/frv/stat64.c 2014-07-25 20:36:06.909335225 +0200
  63992. @@ -9,11 +9,9 @@
  63993. * Adapted to FR-V by Alexandre Oliva <aoliva@redhat.com>
  63994. */
  63995. +#include <_lfs_64.h>
  63996. #include <sys/syscall.h>
  63997. -#include <unistd.h>
  63998. #include <sys/stat.h>
  63999. -#ifdef __UCLIBC_HAS_LFS__
  64000. _syscall2(int, stat64, const char *, file_name, struct stat64 *, buf)
  64001. libc_hidden_def(stat64)
  64002. -#endif
  64003. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/sys/procfs.h uClibc-git/libc/sysdeps/linux/frv/sys/procfs.h
  64004. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  64005. +++ uClibc-git/libc/sysdeps/linux/frv/sys/procfs.h 2014-07-25 20:36:06.921335288 +0200
  64006. @@ -12,9 +12,8 @@
  64007. Lesser General Public License for more details.
  64008. You should have received a copy of the GNU Lesser General Public
  64009. - License along with the GNU C Library; if not, write to the Free
  64010. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64011. - 02111-1307 USA. */
  64012. + License along with the GNU C Library; if not, see
  64013. + <http://www.gnu.org/licenses/>. */
  64014. #ifndef _SYS_PROCFS_H
  64015. #define _SYS_PROCFS_H 1
  64016. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/sys/ptrace.h uClibc-git/libc/sysdeps/linux/frv/sys/ptrace.h
  64017. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/sys/ptrace.h 2012-05-15 09:20:09.000000000 +0200
  64018. +++ uClibc-git/libc/sysdeps/linux/frv/sys/ptrace.h 2014-07-25 20:36:06.921335288 +0200
  64019. @@ -14,9 +14,8 @@
  64020. Lesser General Public License for more details.
  64021. You should have received a copy of the GNU Lesser General Public
  64022. - License along with the GNU C Library; if not, write to the Free
  64023. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64024. - 02111-1307 USA. */
  64025. + License along with the GNU C Library; if not, see
  64026. + <http://www.gnu.org/licenses/>. */
  64027. #ifndef _SYS_PTRACE_H
  64028. #define _SYS_PTRACE_H 1
  64029. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/sys/ucontext.h uClibc-git/libc/sysdeps/linux/frv/sys/ucontext.h
  64030. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  64031. +++ uClibc-git/libc/sysdeps/linux/frv/sys/ucontext.h 2014-07-25 20:36:06.925335309 +0200
  64032. @@ -13,8 +13,7 @@
  64033. You should have received a copy of the GNU Library General Public
  64034. License along with the GNU C Library; see the file COPYING.LIB. If not,
  64035. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  64036. - Boston, MA 02111-1307, USA. */
  64037. + see <http://www.gnu.org/licenses/>. */
  64038. #ifndef _SYS_UCONTEXT_H
  64039. #define _SYS_UCONTEXT_H 1
  64040. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/syscall.c uClibc-git/libc/sysdeps/linux/frv/syscall.c
  64041. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/syscall.c 2012-05-15 09:20:09.000000000 +0200
  64042. +++ uClibc-git/libc/sysdeps/linux/frv/syscall.c 2014-07-25 20:36:06.925335309 +0200
  64043. @@ -13,8 +13,8 @@
  64044. * for more details.
  64045. *
  64046. * You should have received a copy of the GNU Library General Public License
  64047. - * along with this program; if not, write to the Free Software Foundation,
  64048. - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  64049. + * along with this program; see the file COPYING.LIB. If not, see
  64050. + * <http://www.gnu.org/licenses/>.
  64051. */
  64052. #include <features.h>
  64053. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/sysdep.c uClibc-git/libc/sysdeps/linux/frv/sysdep.c
  64054. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/sysdep.c 2012-05-15 09:20:09.000000000 +0200
  64055. +++ uClibc-git/libc/sysdeps/linux/frv/sysdep.c 2014-07-25 20:36:06.925335309 +0200
  64056. @@ -12,9 +12,8 @@
  64057. Lesser General Public License for more details.
  64058. You should have received a copy of the GNU Lesser General Public
  64059. - License along with the GNU C Library; if not, write to the Free
  64060. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64061. - 02111-1307 USA. */
  64062. + License along with the GNU C Library; if not, see
  64063. + <http://www.gnu.org/licenses/>. */
  64064. #include <errno.h>
  64065. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/frv/vfork.S uClibc-git/libc/sysdeps/linux/frv/vfork.S
  64066. --- uClibc-0.9.33.2/libc/sysdeps/linux/frv/vfork.S 2012-05-15 09:20:09.000000000 +0200
  64067. +++ uClibc-git/libc/sysdeps/linux/frv/vfork.S 2014-07-25 20:36:06.925335309 +0200
  64068. @@ -13,15 +13,10 @@
  64069. Lesser General Public License for more details.
  64070. You should have received a copy of the GNU Lesser General Public
  64071. - License along with the GNU C Library; if not, write to the Free
  64072. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64073. - 02111-1307 USA. */
  64074. -
  64075. -#include <features.h>
  64076. -
  64077. -#include <asm/unistd.h>
  64078. -#define _ERRNO_H 1
  64079. -#include <bits/errno.h>
  64080. + License along with the GNU C Library; if not, see
  64081. + <http://www.gnu.org/licenses/>. */
  64082. +
  64083. +#include <sys/syscall.h>
  64084. .text
  64085. .globl __vfork
  64086. @@ -44,4 +39,4 @@
  64087. .size __vfork,.-__vfork
  64088. weak_alias(__vfork,vfork)
  64089. -libc_hidden_weak(vfork)
  64090. +libc_hidden_def(vfork)
  64091. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/byteswap.h uClibc-git/libc/sysdeps/linux/h8300/bits/byteswap.h
  64092. --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/byteswap.h 2012-05-15 09:20:09.000000000 +0200
  64093. +++ uClibc-git/libc/sysdeps/linux/h8300/bits/byteswap.h 2014-07-25 20:36:06.961335497 +0200
  64094. @@ -14,8 +14,7 @@
  64095. You should have received a copy of the GNU Library General Public
  64096. License along with the GNU C Library; see the file COPYING.LIB. If not,
  64097. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  64098. - Boston, MA 02111-1307, USA. */
  64099. + see <http://www.gnu.org/licenses/>. */
  64100. #ifndef _ASM_BITS_BYTESWAP_H
  64101. #define _ASM_BITS_BYTESWAP_H 1
  64102. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/fcntl.h uClibc-git/libc/sysdeps/linux/h8300/bits/fcntl.h
  64103. --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  64104. +++ uClibc-git/libc/sysdeps/linux/h8300/bits/fcntl.h 2014-07-25 20:36:06.969335539 +0200
  64105. @@ -13,9 +13,8 @@
  64106. Lesser General Public License for more details.
  64107. You should have received a copy of the GNU Lesser General Public
  64108. - License along with the GNU C Library; if not, write to the Free
  64109. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64110. - 02111-1307 USA. */
  64111. + License along with the GNU C Library; if not, see
  64112. + <http://www.gnu.org/licenses/>. */
  64113. #ifndef _FCNTL_H
  64114. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  64115. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/h8300/bits/kernel_types.h
  64116. --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
  64117. +++ uClibc-git/libc/sysdeps/linux/h8300/bits/kernel_types.h 2014-07-25 20:36:06.969335539 +0200
  64118. @@ -32,6 +32,8 @@
  64119. typedef unsigned short __kernel_old_gid_t;
  64120. typedef long long __kernel_loff_t;
  64121. typedef __kernel_dev_t __kernel_old_dev_t;
  64122. +typedef long __kernel_long_t;
  64123. +typedef unsigned long __kernel_ulong_t;
  64124. typedef struct {
  64125. #ifdef __USE_ALL
  64126. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/setjmp.h uClibc-git/libc/sysdeps/linux/h8300/bits/setjmp.h
  64127. --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  64128. +++ uClibc-git/libc/sysdeps/linux/h8300/bits/setjmp.h 2014-07-25 20:36:06.969335539 +0200
  64129. @@ -9,24 +9,10 @@
  64130. # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
  64131. #endif
  64132. -#ifndef _ASM
  64133. -
  64134. typedef struct
  64135. {
  64136. unsigned long __regs[4]; /* save er4 - er7(sp) */
  64137. unsigned long __pc; /* the return address */
  64138. } __jmp_buf[1];
  64139. -#endif /* _ASM */
  64140. -
  64141. -#define JB_REGS 0
  64142. -#define JB_PC 16
  64143. -#define JB_SIZE 20
  64144. -
  64145. -
  64146. -/* Test if longjmp to JMPBUF would unwind the frame
  64147. - containing a local variable at ADDRESS. */
  64148. -#define _JMPBUF_UNWINDS(jmpbuf, address) \
  64149. - ((void *) (address) < (void *) (jmpbuf)->__regs[3])
  64150. -
  64151. #endif /* bits/setjmp.h */
  64152. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/sigcontextinfo.h uClibc-git/libc/sysdeps/linux/h8300/bits/sigcontextinfo.h
  64153. --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
  64154. +++ uClibc-git/libc/sysdeps/linux/h8300/bits/sigcontextinfo.h 2014-07-25 20:36:06.969335539 +0200
  64155. @@ -13,9 +13,8 @@
  64156. Lesser General Public License for more details.
  64157. You should have received a copy of the GNU Lesser General Public
  64158. - License along with the GNU C Library; if not, write to the Free
  64159. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64160. - 02111-1307 USA. */
  64161. + License along with the GNU C Library; if not, see
  64162. + <http://www.gnu.org/licenses/>. */
  64163. #define SIGCONTEXT int _code, struct sigcontext *
  64164. #define SIGCONTEXT_EXTRA_ARGS _code,
  64165. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/h8300/bits/stackinfo.h
  64166. --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  64167. +++ uClibc-git/libc/sysdeps/linux/h8300/bits/stackinfo.h 2014-07-25 20:36:06.969335539 +0200
  64168. @@ -12,9 +12,8 @@
  64169. Lesser General Public License for more details.
  64170. You should have received a copy of the GNU Lesser General Public
  64171. - License along with the GNU C Library; if not, write to the Free
  64172. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64173. - 02111-1307 USA. */
  64174. + License along with the GNU C Library; if not, see
  64175. + <http://www.gnu.org/licenses/>. */
  64176. /* This file contains a bit of information about the stack allocation
  64177. of the processor. */
  64178. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h
  64179. --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  64180. +++ uClibc-git/libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h 2014-07-25 20:36:06.969335539 +0200
  64181. @@ -12,8 +12,8 @@
  64182. /* can your target use syscall6() for mmap ? */
  64183. #define __UCLIBC_MMAP_HAS_6_ARGS__
  64184. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  64185. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  64186. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  64187. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  64188. /* does your target have a broken create_module() ? */
  64189. #undef __UCLIBC_BROKEN_CREATE_MODULE__
  64190. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bsd-setjmp.S uClibc-git/libc/sysdeps/linux/h8300/bsd-setjmp.S
  64191. --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bsd-setjmp.S 2012-05-15 09:20:09.000000000 +0200
  64192. +++ uClibc-git/libc/sysdeps/linux/h8300/bsd-setjmp.S 2014-07-25 20:36:06.969335539 +0200
  64193. @@ -1,8 +1,6 @@
  64194. /* BSD `_setjmp' entry point to `sigsetjmp (..., 1)'. H8/300 version. */
  64195. -#define _ASM
  64196. -#define _SETJMP_H
  64197. -#include <bits/setjmp.h>
  64198. +#include <jmpbuf-offsets.h>
  64199. #ifdef __H8300S__
  64200. .h8300s
  64201. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bsd-_setjmp.S uClibc-git/libc/sysdeps/linux/h8300/bsd-_setjmp.S
  64202. --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/bsd-_setjmp.S 2012-05-15 09:20:09.000000000 +0200
  64203. +++ uClibc-git/libc/sysdeps/linux/h8300/bsd-_setjmp.S 2014-07-25 20:36:06.969335539 +0200
  64204. @@ -1,8 +1,6 @@
  64205. /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. H8/300 version. */
  64206. -#define _ASM
  64207. -#define _SETJMP_H
  64208. -#include <bits/setjmp.h>
  64209. +#include <jmpbuf-offsets.h>
  64210. #ifdef __H8300S__
  64211. .h8300s
  64212. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/crt0.S uClibc-git/libc/sysdeps/linux/h8300/crt0.S
  64213. --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/crt0.S 2012-05-15 09:20:09.000000000 +0200
  64214. +++ uClibc-git/libc/sysdeps/linux/h8300/crt0.S 2014-07-25 20:36:06.969335539 +0200
  64215. @@ -14,8 +14,7 @@
  64216. You should have received a copy of the GNU Library General Public
  64217. License along with the GNU C Library; see the file COPYING.LIB. If
  64218. -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  64219. -Cambridge, MA 02139, USA. */
  64220. +not, see <http://www.gnu.org/licenses/>. */
  64221. #include <features.h>
  64222. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/jmpbuf-offsets.h uClibc-git/libc/sysdeps/linux/h8300/jmpbuf-offsets.h
  64223. --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
  64224. +++ uClibc-git/libc/sysdeps/linux/h8300/jmpbuf-offsets.h 2014-07-25 20:36:06.969335539 +0200
  64225. @@ -0,0 +1,9 @@
  64226. +/*
  64227. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  64228. + *
  64229. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  64230. + */
  64231. +
  64232. +#define JB_REGS 0
  64233. +#define JB_PC 16
  64234. +#define JB_SIZE 20
  64235. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/h8300/jmpbuf-unwind.h
  64236. --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  64237. +++ uClibc-git/libc/sysdeps/linux/h8300/jmpbuf-unwind.h 2014-07-25 20:36:06.969335539 +0200
  64238. @@ -0,0 +1,12 @@
  64239. +/*
  64240. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  64241. + *
  64242. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  64243. + */
  64244. +
  64245. +#include <setjmp.h>
  64246. +
  64247. +/* Test if longjmp to JMPBUF would unwind the frame
  64248. + containing a local variable at ADDRESS. */
  64249. +#define _JMPBUF_UNWINDS(jmpbuf, address) \
  64250. + ((void *) (address) < (void *) (jmpbuf)->__regs[3])
  64251. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/__longjmp.S uClibc-git/libc/sysdeps/linux/h8300/__longjmp.S
  64252. --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
  64253. +++ uClibc-git/libc/sysdeps/linux/h8300/__longjmp.S 2014-07-25 20:36:06.937335372 +0200
  64254. @@ -20,3 +20,5 @@
  64255. mov.l @er0+,er3 ; return PC
  64256. adds #4,sp ; adjust return stack
  64257. jmp @er3
  64258. +
  64259. +libc_hidden_def(__longjmp)
  64260. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/setjmp.S uClibc-git/libc/sysdeps/linux/h8300/setjmp.S
  64261. --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/setjmp.S 2012-05-15 09:20:09.000000000 +0200
  64262. +++ uClibc-git/libc/sysdeps/linux/h8300/setjmp.S 2014-07-25 20:36:06.969335539 +0200
  64263. @@ -1,6 +1,4 @@
  64264. -#define _ASM
  64265. -#define _SETJMP_H
  64266. -#include <bits/setjmp.h>
  64267. +#include <jmpbuf-offsets.h>
  64268. #ifdef __H8300S__
  64269. .h8300s
  64270. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/sys/procfs.h uClibc-git/libc/sysdeps/linux/h8300/sys/procfs.h
  64271. --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  64272. +++ uClibc-git/libc/sysdeps/linux/h8300/sys/procfs.h 2014-07-25 20:36:06.981335603 +0200
  64273. @@ -12,9 +12,8 @@
  64274. Lesser General Public License for more details.
  64275. You should have received a copy of the GNU Lesser General Public
  64276. - License along with the GNU C Library; if not, write to the Free
  64277. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64278. - 02111-1307 USA. */
  64279. + License along with the GNU C Library; if not, see
  64280. + <http://www.gnu.org/licenses/>. */
  64281. #ifndef _SYS_PROCFS_H
  64282. #define _SYS_PROCFS_H 1
  64283. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/sys/ucontext.h uClibc-git/libc/sysdeps/linux/h8300/sys/ucontext.h
  64284. --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  64285. +++ uClibc-git/libc/sysdeps/linux/h8300/sys/ucontext.h 2014-07-25 20:36:06.981335603 +0200
  64286. @@ -12,9 +12,8 @@
  64287. Lesser General Public License for more details.
  64288. You should have received a copy of the GNU Lesser General Public
  64289. - License along with the GNU C Library; if not, write to the Free
  64290. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64291. - 02111-1307 USA. */
  64292. + License along with the GNU C Library; if not, see
  64293. + <http://www.gnu.org/licenses/>. */
  64294. /* H8/300 compliant context switching support. */
  64295. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/h8300/vfork.S uClibc-git/libc/sysdeps/linux/h8300/vfork.S
  64296. --- uClibc-0.9.33.2/libc/sysdeps/linux/h8300/vfork.S 2012-05-15 09:20:09.000000000 +0200
  64297. +++ uClibc-git/libc/sysdeps/linux/h8300/vfork.S 2014-07-25 20:36:06.981335603 +0200
  64298. @@ -1,5 +1,5 @@
  64299. -#include <asm/unistd.h>
  64300. +#include <sys/syscall.h>
  64301. #ifndef __NR_vfork
  64302. #define __NR_vfork __NR_fork /* uClinux-2.0 only has fork which is vfork */
  64303. @@ -12,7 +12,6 @@
  64304. #endif
  64305. .text
  64306. .align 2
  64307. - .globl _errno
  64308. .globl ___vfork
  64309. .hidden ___vfork
  64310. .type ___vfork,@function
  64311. @@ -38,4 +37,4 @@
  64312. jmp @er1 /* don't return, just jmp directly */
  64313. weak_alias(__vfork,vfork)
  64314. -libc_hidden_weak(vfork)
  64315. +libc_hidden_def(vfork)
  64316. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/add_n.s uClibc-git/libc/sysdeps/linux/hppa/add_n.s
  64317. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/add_n.s 2012-05-15 09:20:09.000000000 +0200
  64318. +++ uClibc-git/libc/sysdeps/linux/hppa/add_n.s 2014-07-25 20:36:06.989335644 +0200
  64319. @@ -16,9 +16,8 @@
  64320. ;! License for more details.
  64321. ;! You should have received a copy of the GNU Lesser General Public License
  64322. -;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
  64323. -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  64324. -;! MA 02111-1307, USA.
  64325. +;! along with the GNU MP Library; see the file COPYING.LIB. If not, see
  64326. +;! <http://www.gnu.org/licenses/>.
  64327. ;! INPUT PARAMETERS
  64328. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/atomic.h uClibc-git/libc/sysdeps/linux/hppa/bits/atomic.h
  64329. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
  64330. +++ uClibc-git/libc/sysdeps/linux/hppa/bits/atomic.h 2014-07-25 20:36:07.001335707 +0200
  64331. @@ -13,11 +13,11 @@
  64332. Lesser General Public License for more details.
  64333. You should have received a copy of the GNU Lesser General Public
  64334. - License along with the GNU C Library; if not, write to the Free
  64335. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64336. - 02111-1307 USA. */
  64337. + License along with the GNU C Library; if not, see
  64338. + <http://www.gnu.org/licenses/>. */
  64339. #include <stdint.h>
  64340. +#include <errno.h>
  64341. #include <bits/kernel-features.h>
  64342. #define ABORT_INSTRUCTION __asm__(__UCLIBC_ABORT_INSTRUCTION__)
  64343. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/eventfd.h uClibc-git/libc/sysdeps/linux/hppa/bits/eventfd.h
  64344. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/eventfd.h 1970-01-01 01:00:00.000000000 +0100
  64345. +++ uClibc-git/libc/sysdeps/linux/hppa/bits/eventfd.h 2014-07-25 20:36:07.001335707 +0200
  64346. @@ -0,0 +1,32 @@
  64347. +/* Copyright (C) 2007-2013 Free Software Foundation, Inc.
  64348. + This file is part of the GNU C Library.
  64349. +
  64350. + The GNU C Library is free software; you can redistribute it and/or
  64351. + modify it under the terms of the GNU Lesser General Public
  64352. + License as published by the Free Software Foundation; either
  64353. + version 2.1 of the License, or (at your option) any later version.
  64354. +
  64355. + The GNU C Library is distributed in the hope that it will be useful,
  64356. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  64357. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  64358. + Lesser General Public License for more details.
  64359. +
  64360. + You should have received a copy of the GNU Lesser General Public
  64361. + License along with the GNU C Library. If not, see
  64362. + <http://www.gnu.org/licenses/>. */
  64363. +
  64364. +#ifndef _SYS_EVENTFD_H
  64365. +# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
  64366. +#endif
  64367. +
  64368. +/* Flags for signalfd. */
  64369. +enum
  64370. + {
  64371. + EFD_SEMAPHORE = 000000001,
  64372. +#define EFD_SEMAPHORE EFD_SEMAPHORE
  64373. + EFD_CLOEXEC = 010000000,
  64374. +#define EFD_CLOEXEC EFD_CLOEXEC
  64375. +/* the below value looks suspicious, should be 000200004 for consistency */
  64376. + EFD_NONBLOCK = 00200004 /* HPUX has separate NDELAY & NONBLOCK */
  64377. +#define EFD_NONBLOCK EFD_NONBLOCK
  64378. + };
  64379. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/fcntl.h uClibc-git/libc/sysdeps/linux/hppa/bits/fcntl.h
  64380. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  64381. +++ uClibc-git/libc/sysdeps/linux/hppa/bits/fcntl.h 2014-07-25 20:36:07.001335707 +0200
  64382. @@ -14,9 +14,8 @@
  64383. Lesser General Public License for more details.
  64384. You should have received a copy of the GNU Lesser General Public
  64385. - License along with the GNU C Library; if not, write to the Free
  64386. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64387. - 02111-1307 USA. */
  64388. + License along with the GNU C Library; if not, see
  64389. + <http://www.gnu.org/licenses/>. */
  64390. #ifndef _FCNTL_H
  64391. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  64392. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/fenv.h uClibc-git/libc/sysdeps/linux/hppa/bits/fenv.h
  64393. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
  64394. +++ uClibc-git/libc/sysdeps/linux/hppa/bits/fenv.h 2014-07-25 20:36:07.001335707 +0200
  64395. @@ -13,9 +13,8 @@
  64396. Lesser General Public License for more details.
  64397. You should have received a copy of the GNU Lesser General Public
  64398. - License along with the GNU C Library; if not, write to the Free
  64399. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64400. - 02111-1307 USA. */
  64401. + License along with the GNU C Library; if not, see
  64402. + <http://www.gnu.org/licenses/>. */
  64403. #ifndef _FENV_H
  64404. # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
  64405. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/ipc.h uClibc-git/libc/sysdeps/linux/hppa/bits/ipc.h
  64406. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/ipc.h 2012-05-15 09:20:09.000000000 +0200
  64407. +++ uClibc-git/libc/sysdeps/linux/hppa/bits/ipc.h 2014-07-25 20:36:07.001335707 +0200
  64408. @@ -12,9 +12,8 @@
  64409. Lesser General Public License for more details.
  64410. You should have received a copy of the GNU Lesser General Public
  64411. - License along with the GNU C Library; if not, write to the Free
  64412. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64413. - 02111-1307 USA. */
  64414. + License along with the GNU C Library; if not, see
  64415. + <http://www.gnu.org/licenses/>. */
  64416. #ifndef _SYS_IPC_H
  64417. # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
  64418. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/kernel_sigaction.h uClibc-git/libc/sysdeps/linux/hppa/bits/kernel_sigaction.h
  64419. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/kernel_sigaction.h 2012-05-15 09:20:09.000000000 +0200
  64420. +++ uClibc-git/libc/sysdeps/linux/hppa/bits/kernel_sigaction.h 2014-07-25 20:36:07.001335707 +0200
  64421. @@ -12,12 +12,4 @@
  64422. unsigned long sa_flags;
  64423. };
  64424. -/* In uclibc, userspace struct sigaction is identical to
  64425. - * "new" struct kernel_sigaction (one from the Linux 2.1.68 kernel).
  64426. - * See sigaction.h
  64427. - */
  64428. -
  64429. -extern int __syscall_rt_sigaction (int, const struct sigaction *,
  64430. - struct sigaction *, size_t) attribute_hidden;
  64431. -
  64432. #endif
  64433. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/hppa/bits/kernel_types.h
  64434. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
  64435. +++ uClibc-git/libc/sysdeps/linux/hppa/bits/kernel_types.h 2014-07-25 20:36:07.001335707 +0200
  64436. @@ -45,6 +45,8 @@
  64437. typedef unsigned long long __kernel_ino64_t;
  64438. typedef unsigned int __kernel_old_dev_t;
  64439. +typedef long __kernel_long_t;
  64440. +typedef unsigned long __kernel_ulong_t;
  64441. typedef struct {
  64442. #ifdef __USE_ALL
  64443. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/mman.h uClibc-git/libc/sysdeps/linux/hppa/bits/mman.h
  64444. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/mman.h 2012-05-15 09:20:09.000000000 +0200
  64445. +++ uClibc-git/libc/sysdeps/linux/hppa/bits/mman.h 2014-07-25 20:36:07.001335707 +0200
  64446. @@ -13,9 +13,8 @@
  64447. Lesser General Public License for more details.
  64448. You should have received a copy of the GNU Lesser General Public
  64449. - License along with the GNU C Library; if not, write to the Free
  64450. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64451. - 02111-1307 USA. */
  64452. + License along with the GNU C Library; if not, see
  64453. + <http://www.gnu.org/licenses/>. */
  64454. #ifndef _SYS_MMAN_H
  64455. # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
  64456. @@ -45,7 +44,7 @@
  64457. #define MAP_GROWSDOWN 0x8000 /* stack-like segment */
  64458. #define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
  64459. #define MAP_NONBLOCK 0x20000 /* do not block on IO */
  64460. -#define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could
  64461. +#define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could
  64462. be uninitialized. */
  64463. #define MS_SYNC 1 /* synchronous memory sync */
  64464. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/setjmp.h uClibc-git/libc/sysdeps/linux/hppa/bits/setjmp.h
  64465. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  64466. +++ uClibc-git/libc/sysdeps/linux/hppa/bits/setjmp.h 2014-07-25 20:36:07.001335707 +0200
  64467. @@ -1,4 +1,4 @@
  64468. -/* Copyright (C) 2000 Free Software Foundation, Inc.
  64469. +/* Copyright (C) 2000, 2005, 2006 Free Software Foundation, Inc.
  64470. This file is part of the GNU C Library.
  64471. The GNU C Library is free software; you can redistribute it and/or
  64472. @@ -12,9 +12,8 @@
  64473. Lesser General Public License for more details.
  64474. You should have received a copy of the GNU Lesser General Public
  64475. - License along with the GNU C Library; if not, write to the Free
  64476. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64477. - 02111-1307 USA. */
  64478. + License along with the GNU C Library; if not, see
  64479. + <http://www.gnu.org/licenses/>. */
  64480. /* Define the machine-dependent type `jmp_buf'. HPPA version. */
  64481. #ifndef _BITS_SETJMP_H
  64482. @@ -29,17 +28,6 @@
  64483. easier, and to ensure proper alignment. Naturally, user code should
  64484. not depend on either representation. */
  64485. -#if defined __USE_MISC || defined _ASM
  64486. -#define JB_SP (76/4)
  64487. -#endif
  64488. -
  64489. -#ifndef _ASM
  64490. typedef double __jmp_buf[21];
  64491. -#endif
  64492. -
  64493. -/* Test if longjmp to JMPBUF would unwind the frame containing a local
  64494. - variable at ADDRESS. */
  64495. -#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
  64496. - ((void *)(_address) > (void *)(((unsigned long *) _jmpbuf)[JB_SP]))
  64497. #endif /* bits/setjmp.h */
  64498. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/sigaction.h uClibc-git/libc/sysdeps/linux/hppa/bits/sigaction.h
  64499. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/sigaction.h 2012-05-15 09:20:09.000000000 +0200
  64500. +++ uClibc-git/libc/sysdeps/linux/hppa/bits/sigaction.h 2014-07-25 20:36:07.001335707 +0200
  64501. @@ -13,9 +13,8 @@
  64502. Lesser General Public License for more details.
  64503. You should have received a copy of the GNU Lesser General Public
  64504. - License along with the GNU C Library; if not, write to the Free
  64505. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64506. - 02111-1307 USA. */
  64507. + License along with the GNU C Library; if not, see
  64508. + <http://www.gnu.org/licenses/>. */
  64509. #ifndef _SIGNAL_H
  64510. # error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
  64511. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/signum.h uClibc-git/libc/sysdeps/linux/hppa/bits/signum.h
  64512. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/signum.h 2012-05-15 09:20:09.000000000 +0200
  64513. +++ uClibc-git/libc/sysdeps/linux/hppa/bits/signum.h 2014-07-25 20:36:07.001335707 +0200
  64514. @@ -13,9 +13,8 @@
  64515. Lesser General Public License for more details.
  64516. You should have received a copy of the GNU Lesser General Public
  64517. - License along with the GNU C Library; if not, write to the Free
  64518. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64519. - 02111-1307 USA. */
  64520. + License along with the GNU C Library; if not, see
  64521. + <http://www.gnu.org/licenses/>. */
  64522. #ifdef _SIGNAL_H
  64523. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/socket_type.h uClibc-git/libc/sysdeps/linux/hppa/bits/socket_type.h
  64524. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/socket_type.h 1970-01-01 01:00:00.000000000 +0100
  64525. +++ uClibc-git/libc/sysdeps/linux/hppa/bits/socket_type.h 2014-07-25 20:36:07.001335707 +0200
  64526. @@ -0,0 +1,54 @@
  64527. +/* Define enum __socket_type for Linux/HP-PARISC.
  64528. + Copyright (C) 2012 Free Software Foundation, Inc.
  64529. + This file is part of the GNU C Library.
  64530. +
  64531. + The GNU C Library is free software; you can redistribute it and/or
  64532. + modify it under the terms of the GNU Lesser General Public
  64533. + License as published by the Free Software Foundation; either
  64534. + version 2.1 of the License, or (at your option) any later version.
  64535. +
  64536. + The GNU C Library is distributed in the hope that it will be useful,
  64537. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  64538. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  64539. + Lesser General Public License for more details.
  64540. +
  64541. + You should have received a copy of the GNU Lesser General Public
  64542. + License along with the GNU C Library; if not, see
  64543. + <http://www.gnu.org/licenses/>. */
  64544. +
  64545. +#ifndef _SYS_SOCKET_H
  64546. +# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
  64547. +#endif
  64548. +
  64549. +/* Types of sockets. */
  64550. +enum __socket_type
  64551. +{
  64552. + SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
  64553. + byte streams. */
  64554. +#define SOCK_STREAM SOCK_STREAM
  64555. + SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
  64556. + of fixed maximum length. */
  64557. +#define SOCK_DGRAM SOCK_DGRAM
  64558. + SOCK_RAW = 3, /* Raw protocol interface. */
  64559. +#define SOCK_RAW SOCK_RAW
  64560. + SOCK_RDM = 4, /* Reliably-delivered messages. */
  64561. +#define SOCK_RDM SOCK_RDM
  64562. + SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
  64563. + datagrams of fixed maximum length. */
  64564. +#define SOCK_SEQPACKET SOCK_SEQPACKET
  64565. + SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */
  64566. +#define SOCK_DCCP SOCK_DCCP
  64567. + SOCK_PACKET = 10, /* Linux specific way of getting packets
  64568. + at the dev level. For writing rarp and
  64569. + other similar things on the user level. */
  64570. +#define SOCK_PACKET SOCK_PACKET
  64571. +
  64572. + /* Flags to be ORed into the type parameter of socket and socketpair. */
  64573. +
  64574. + SOCK_CLOEXEC = 010000000, /* Atomically set close-on-exec flag for the
  64575. + new descriptor(s). */
  64576. +#define SOCK_CLOEXEC SOCK_CLOEXEC
  64577. + SOCK_NONBLOCK = 0x40000000 /* Atomically mark descriptor(s) as
  64578. + non-blocking. */
  64579. +#define SOCK_NONBLOCK SOCK_NONBLOCK
  64580. +};
  64581. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/hppa/bits/stackinfo.h
  64582. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  64583. +++ uClibc-git/libc/sysdeps/linux/hppa/bits/stackinfo.h 2014-07-25 20:36:07.001335707 +0200
  64584. @@ -12,9 +12,8 @@
  64585. Lesser General Public License for more details.
  64586. You should have received a copy of the GNU Lesser General Public
  64587. - License along with the GNU C Library; if not, write to the Free
  64588. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64589. - 02111-1307 USA. */
  64590. + License along with the GNU C Library; if not, see
  64591. + <http://www.gnu.org/licenses/>. */
  64592. /* This file contains a bit of information about the stack allocation
  64593. of the processor. */
  64594. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/hppa/bits/uClibc_arch_features.h
  64595. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  64596. +++ uClibc-git/libc/sysdeps/linux/hppa/bits/uClibc_arch_features.h 2014-07-25 20:36:07.001335707 +0200
  64597. @@ -9,10 +9,10 @@
  64598. #define __UCLIBC_ABORT_INSTRUCTION__ "iitlbp %r0,(%sr0,%r0)"
  64599. /* can your target use syscall6() for mmap ? */
  64600. -#undef __UCLIBC_MMAP_HAS_6_ARGS__
  64601. +#define __UCLIBC_MMAP_HAS_6_ARGS__
  64602. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  64603. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  64604. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  64605. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  64606. /* does your target have a broken create_module() ? */
  64607. #undef __UCLIBC_BROKEN_CREATE_MODULE__
  64608. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/brk.c uClibc-git/libc/sysdeps/linux/hppa/brk.c
  64609. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/brk.c 2012-05-15 09:20:09.000000000 +0200
  64610. +++ uClibc-git/libc/sysdeps/linux/hppa/brk.c 2014-07-25 20:36:07.001335707 +0200
  64611. @@ -13,9 +13,8 @@
  64612. Lesser General Public License for more details.
  64613. You should have received a copy of the GNU Lesser General Public
  64614. - License along with the GNU C Library; if not, write to the Free
  64615. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64616. - 02111-1307 USA. */
  64617. + License along with the GNU C Library; if not, see
  64618. + <http://www.gnu.org/licenses/>. */
  64619. #include <errno.h>
  64620. #include <sys/syscall.h>
  64621. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bsd-setjmp.S uClibc-git/libc/sysdeps/linux/hppa/bsd-setjmp.S
  64622. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bsd-setjmp.S 2012-05-15 09:20:09.000000000 +0200
  64623. +++ uClibc-git/libc/sysdeps/linux/hppa/bsd-setjmp.S 2014-07-25 20:36:07.001335707 +0200
  64624. @@ -13,9 +13,8 @@
  64625. Lesser General Public License for more details.
  64626. You should have received a copy of the GNU Lesser General Public
  64627. - License along with the GNU C Library; if not, write to the Free
  64628. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64629. - 02111-1307 USA. */
  64630. + License along with the GNU C Library; if not, see
  64631. + <http://www.gnu.org/licenses/>. */
  64632. /* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
  64633. We cannot do it in C because it must be a tail-call, so frame-unwinding
  64634. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bsd-_setjmp.S uClibc-git/libc/sysdeps/linux/hppa/bsd-_setjmp.S
  64635. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/bsd-_setjmp.S 2012-05-15 09:20:09.000000000 +0200
  64636. +++ uClibc-git/libc/sysdeps/linux/hppa/bsd-_setjmp.S 2014-07-25 20:36:07.001335707 +0200
  64637. @@ -13,9 +13,8 @@
  64638. Lesser General Public License for more details.
  64639. You should have received a copy of the GNU Lesser General Public
  64640. - License along with the GNU C Library; if not, write to the Free
  64641. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64642. - 02111-1307 USA. */
  64643. + License along with the GNU C Library; if not, see
  64644. + <http://www.gnu.org/licenses/>. */
  64645. /* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
  64646. We cannot do it in C because it must be a tail-call, so frame-unwinding
  64647. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/clone.S uClibc-git/libc/sysdeps/linux/hppa/clone.S
  64648. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/clone.S 2012-05-15 09:20:09.000000000 +0200
  64649. +++ uClibc-git/libc/sysdeps/linux/hppa/clone.S 2014-07-25 20:36:07.001335707 +0200
  64650. @@ -14,9 +14,8 @@
  64651. Lesser General Public License for more details.
  64652. You should have received a copy of the GNU Lesser General Public
  64653. - License along with the GNU C Library; if not, write to the Free
  64654. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64655. - 02111-1307 USA. */
  64656. + License along with the GNU C Library; if not, see
  64657. + <http://www.gnu.org/licenses/>. */
  64658. /* clone() is even more special than fork() as it mucks with stacks
  64659. and invokes a function in the right context after its all over. */
  64660. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/crt1.S uClibc-git/libc/sysdeps/linux/hppa/crt1.S
  64661. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/crt1.S 2012-05-15 09:20:09.000000000 +0200
  64662. +++ uClibc-git/libc/sysdeps/linux/hppa/crt1.S 2014-07-25 20:36:07.001335707 +0200
  64663. @@ -30,9 +30,8 @@
  64664. Lesser General Public License for more details.
  64665. You should have received a copy of the GNU Lesser General Public
  64666. - License along with the GNU C Library; if not, write to the Free
  64667. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64668. - 02111-1307 USA. */
  64669. + License along with the GNU C Library; if not, see
  64670. + <http://www.gnu.org/licenses/>. */
  64671. .import main, code
  64672. .import $global$, data
  64673. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/jmpbuf-offsets.h uClibc-git/libc/sysdeps/linux/hppa/jmpbuf-offsets.h
  64674. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
  64675. +++ uClibc-git/libc/sysdeps/linux/hppa/jmpbuf-offsets.h 2014-07-25 20:36:07.001335707 +0200
  64676. @@ -0,0 +1,19 @@
  64677. +/* Private macros for accessing __jmp_buf contents. HPPA version.
  64678. + Copyright (C) 2006 Free Software Foundation, Inc.
  64679. + This file is part of the GNU C Library.
  64680. +
  64681. + The GNU C Library is free software; you can redistribute it and/or
  64682. + modify it under the terms of the GNU Lesser General Public
  64683. + License as published by the Free Software Foundation; either
  64684. + version 2.1 of the License, or (at your option) any later version.
  64685. +
  64686. + The GNU C Library is distributed in the hope that it will be useful,
  64687. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  64688. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  64689. + Lesser General Public License for more details.
  64690. +
  64691. + You should have received a copy of the GNU Lesser General Public
  64692. + License along with the GNU C Library; if not, see
  64693. + <http://www.gnu.org/licenses/>. */
  64694. +
  64695. +#define JB_SP (76/4)
  64696. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/hppa/jmpbuf-unwind.h
  64697. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  64698. +++ uClibc-git/libc/sysdeps/linux/hppa/jmpbuf-unwind.h 2014-07-25 20:36:07.001335707 +0200
  64699. @@ -0,0 +1,12 @@
  64700. +/*
  64701. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  64702. + *
  64703. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  64704. + */
  64705. +#include <setjmp.h>
  64706. +#include <jmpbuf-offsets.h>
  64707. +
  64708. +/* Test if longjmp to JMPBUF would unwind the frame containing a local
  64709. + variable at ADDRESS. */
  64710. +#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
  64711. + ((void *)(_address) > (void *)(((unsigned long *) _jmpbuf)[JB_SP]))
  64712. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/__longjmp.S uClibc-git/libc/sysdeps/linux/hppa/__longjmp.S
  64713. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
  64714. +++ uClibc-git/libc/sysdeps/linux/hppa/__longjmp.S 2014-07-25 20:36:06.989335644 +0200
  64715. @@ -13,14 +13,8 @@
  64716. Lesser General Public License for more details.
  64717. You should have received a copy of the GNU Lesser General Public
  64718. - License along with the GNU C Library; if not, write to the Free
  64719. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64720. - 02111-1307 USA. */
  64721. -
  64722. -#include <features.h>
  64723. -#define _SETJMP_H
  64724. -#define _ASM
  64725. -#include <bits/setjmp.h>
  64726. + License along with the GNU C Library; if not, see
  64727. + <http://www.gnu.org/licenses/>. */
  64728. /* __longjmp(jmpbuf, val) */
  64729. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/lshift.s uClibc-git/libc/sysdeps/linux/hppa/lshift.s
  64730. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/lshift.s 2012-05-15 09:20:09.000000000 +0200
  64731. +++ uClibc-git/libc/sysdeps/linux/hppa/lshift.s 2014-07-25 20:36:07.001335707 +0200
  64732. @@ -15,9 +15,8 @@
  64733. ;! License for more details.
  64734. ;! You should have received a copy of the GNU Lesser General Public License
  64735. -;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
  64736. -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  64737. -;! MA 02111-1307, USA.
  64738. +;! along with the GNU MP Library; see the file COPYING.LIB. If not, see
  64739. +;! <http://www.gnu.org/licenses/>.
  64740. ;! INPUT PARAMETERS
  64741. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/Makefile.arch uClibc-git/libc/sysdeps/linux/hppa/Makefile.arch
  64742. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
  64743. +++ uClibc-git/libc/sysdeps/linux/hppa/Makefile.arch 2014-07-25 20:36:06.989335644 +0200
  64744. @@ -5,7 +5,7 @@
  64745. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  64746. #
  64747. -CSRC := __syscall_error.c brk.c mmap.c syscall.c
  64748. +CSRC-y := __syscall_error.c brk.c syscall.c
  64749. -SSRC := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S \
  64750. +SSRC-y := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S \
  64751. add_n.s lshift.s rshift.s sub_n.s udiv_qrnnd.s
  64752. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/mmap.c uClibc-git/libc/sysdeps/linux/hppa/mmap.c
  64753. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/mmap.c 2012-05-15 09:20:09.000000000 +0200
  64754. +++ uClibc-git/libc/sysdeps/linux/hppa/mmap.c 1970-01-01 01:00:00.000000000 +0100
  64755. @@ -1,19 +0,0 @@
  64756. -/* vi: set sw=4 ts=4: */
  64757. -/*
  64758. - * mmap() for uClibc/x86_64
  64759. - *
  64760. - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  64761. - * Copyright (C) 2005 by Mike Frysinger <vapier@gentoo.org>
  64762. - *
  64763. - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  64764. - */
  64765. -
  64766. -#include <errno.h>
  64767. -#include <unistd.h>
  64768. -#include <sys/mman.h>
  64769. -#include <sys/syscall.h>
  64770. -
  64771. -
  64772. -_syscall6(void *, mmap, void *, start, size_t, length, int, prot,
  64773. - int, flags, int, fd, off_t, offset)
  64774. -libc_hidden_def(mmap)
  64775. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/rshift.s uClibc-git/libc/sysdeps/linux/hppa/rshift.s
  64776. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/rshift.s 2012-05-15 09:20:09.000000000 +0200
  64777. +++ uClibc-git/libc/sysdeps/linux/hppa/rshift.s 2014-07-25 20:36:07.001335707 +0200
  64778. @@ -15,9 +15,8 @@
  64779. ;! License for more details.
  64780. ;! You should have received a copy of the GNU Lesser General Public License
  64781. -;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
  64782. -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  64783. -;! MA 02111-1307, USA.
  64784. +;! along with the GNU MP Library; see the file COPYING.LIB. If not, see
  64785. +;! <http://www.gnu.org/licenses/>.
  64786. ;! INPUT PARAMETERS
  64787. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/setjmp.S uClibc-git/libc/sysdeps/linux/hppa/setjmp.S
  64788. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/setjmp.S 2012-05-15 09:20:09.000000000 +0200
  64789. +++ uClibc-git/libc/sysdeps/linux/hppa/setjmp.S 2014-07-25 20:36:07.001335707 +0200
  64790. @@ -13,9 +13,8 @@
  64791. Lesser General Public License for more details.
  64792. You should have received a copy of the GNU Lesser General Public
  64793. - License along with the GNU C Library; if not, write to the Free
  64794. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64795. - 02111-1307 USA. */
  64796. + License along with the GNU C Library; if not, see
  64797. + <http://www.gnu.org/licenses/>. */
  64798. .text
  64799. .align 4
  64800. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/sub_n.s uClibc-git/libc/sysdeps/linux/hppa/sub_n.s
  64801. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/sub_n.s 2012-05-15 09:20:09.000000000 +0200
  64802. +++ uClibc-git/libc/sysdeps/linux/hppa/sub_n.s 2014-07-25 20:36:07.001335707 +0200
  64803. @@ -16,9 +16,8 @@
  64804. ;! License for more details.
  64805. ;! You should have received a copy of the GNU Lesser General Public License
  64806. -;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
  64807. -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  64808. -;! MA 02111-1307, USA.
  64809. +;! along with the GNU MP Library; see the file COPYING.LIB. If not, see
  64810. +;! <http://www.gnu.org/licenses/>.
  64811. ;! INPUT PARAMETERS
  64812. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/sys/procfs.h uClibc-git/libc/sysdeps/linux/hppa/sys/procfs.h
  64813. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  64814. +++ uClibc-git/libc/sysdeps/linux/hppa/sys/procfs.h 2014-07-25 20:36:07.021335811 +0200
  64815. @@ -12,9 +12,8 @@
  64816. Lesser General Public License for more details.
  64817. You should have received a copy of the GNU Lesser General Public
  64818. - License along with the GNU C Library; if not, write to the Free
  64819. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64820. - 02111-1307 USA. */
  64821. + License along with the GNU C Library; if not, see
  64822. + <http://www.gnu.org/licenses/>. */
  64823. #ifndef _SYS_PROCFS_H
  64824. #define _SYS_PROCFS_H 1
  64825. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/sys/ucontext.h uClibc-git/libc/sysdeps/linux/hppa/sys/ucontext.h
  64826. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  64827. +++ uClibc-git/libc/sysdeps/linux/hppa/sys/ucontext.h 2014-07-25 20:36:07.021335811 +0200
  64828. @@ -12,9 +12,8 @@
  64829. Lesser General Public License for more details.
  64830. You should have received a copy of the GNU Lesser General Public
  64831. - License along with the GNU C Library; if not, write to the Free
  64832. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64833. - 02111-1307 USA. */
  64834. + License along with the GNU C Library; if not, see
  64835. + <http://www.gnu.org/licenses/>. */
  64836. /* Don't rely on this, the interface is currently messed up and may need to
  64837. be broken to be fixed. */
  64838. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/syscall.c uClibc-git/libc/sysdeps/linux/hppa/syscall.c
  64839. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/syscall.c 2012-05-15 09:20:09.000000000 +0200
  64840. +++ uClibc-git/libc/sysdeps/linux/hppa/syscall.c 2014-07-25 20:36:07.021335811 +0200
  64841. @@ -12,9 +12,8 @@
  64842. Lesser General Public License for more details.
  64843. You should have received a copy of the GNU Lesser General Public
  64844. - License along with the GNU C Library; if not, write to the Free
  64845. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64846. - 02111-1307 USA. */
  64847. + License along with the GNU C Library; if not, see
  64848. + <http://www.gnu.org/licenses/>. */
  64849. #include <stdarg.h>
  64850. #include <errno.h>
  64851. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/hppa/udiv_qrnnd.s uClibc-git/libc/sysdeps/linux/hppa/udiv_qrnnd.s
  64852. --- uClibc-0.9.33.2/libc/sysdeps/linux/hppa/udiv_qrnnd.s 2012-05-15 09:20:09.000000000 +0200
  64853. +++ uClibc-git/libc/sysdeps/linux/hppa/udiv_qrnnd.s 2014-07-25 20:36:07.021335811 +0200
  64854. @@ -16,9 +16,8 @@
  64855. ;! License for more details.
  64856. ;! You should have received a copy of the GNU Lesser General Public License
  64857. -;! along with the GNU MP Library; see the file COPYING.LIB. If not, write to
  64858. -;! the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  64859. -;! MA 02111-1307, USA.
  64860. +;! along with the GNU MP Library; see the file COPYING.LIB. If not, see
  64861. +;! <http://www.gnu.org/licenses/>.
  64862. ;! INPUT PARAMETERS
  64863. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/atomic.h uClibc-git/libc/sysdeps/linux/i386/bits/atomic.h
  64864. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
  64865. +++ uClibc-git/libc/sysdeps/linux/i386/bits/atomic.h 2014-07-25 20:36:07.049335958 +0200
  64866. @@ -13,9 +13,8 @@
  64867. Lesser General Public License for more details.
  64868. You should have received a copy of the GNU Lesser General Public
  64869. - License along with the GNU C Library; if not, write to the Free
  64870. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64871. - 02111-1307 USA. */
  64872. + License along with the GNU C Library; if not, see
  64873. + <http://www.gnu.org/licenses/>. */
  64874. #include <stdint.h>
  64875. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/byteswap.h uClibc-git/libc/sysdeps/linux/i386/bits/byteswap.h
  64876. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/byteswap.h 2012-05-15 09:20:09.000000000 +0200
  64877. +++ uClibc-git/libc/sysdeps/linux/i386/bits/byteswap.h 2014-07-25 20:36:07.049335958 +0200
  64878. @@ -13,9 +13,8 @@
  64879. Lesser General Public License for more details.
  64880. You should have received a copy of the GNU Lesser General Public
  64881. - License along with the GNU C Library; if not, write to the Free
  64882. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64883. - 02111-1307 USA. */
  64884. + License along with the GNU C Library; if not, see
  64885. + <http://www.gnu.org/licenses/>. */
  64886. #ifndef _ASM_BITS_BYTESWAP_H
  64887. #define _ASM_BITS_BYTESWAP_H 1
  64888. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/fcntl.h uClibc-git/libc/sysdeps/linux/i386/bits/fcntl.h
  64889. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  64890. +++ uClibc-git/libc/sysdeps/linux/i386/bits/fcntl.h 2014-07-25 20:36:07.049335958 +0200
  64891. @@ -14,9 +14,8 @@
  64892. Lesser General Public License for more details.
  64893. You should have received a copy of the GNU Lesser General Public
  64894. - License along with the GNU C Library; if not, write to the Free
  64895. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64896. - 02111-1307 USA. */
  64897. + License along with the GNU C Library; if not, see
  64898. + <http://www.gnu.org/licenses/>. */
  64899. #ifndef _FCNTL_H
  64900. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  64901. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/fenv.h uClibc-git/libc/sysdeps/linux/i386/bits/fenv.h
  64902. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
  64903. +++ uClibc-git/libc/sysdeps/linux/i386/bits/fenv.h 2014-07-25 20:36:07.049335958 +0200
  64904. @@ -12,9 +12,8 @@
  64905. Lesser General Public License for more details.
  64906. You should have received a copy of the GNU Lesser General Public
  64907. - License along with the GNU C Library; if not, write to the Free
  64908. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64909. - 02111-1307 USA. */
  64910. + License along with the GNU C Library; if not, see
  64911. + <http://www.gnu.org/licenses/>. */
  64912. #ifndef _FENV_H
  64913. # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
  64914. @@ -82,9 +81,9 @@
  64915. fenv_t;
  64916. /* If the default argument is used we use this value. */
  64917. -#define FE_DFL_ENV ((__const fenv_t *) -1)
  64918. +#define FE_DFL_ENV ((const fenv_t *) -1)
  64919. #ifdef __USE_GNU
  64920. /* Floating-point environment where none of the exception is masked. */
  64921. -# define FE_NOMASK_ENV ((__const fenv_t *) -2)
  64922. +# define FE_NOMASK_ENV ((const fenv_t *) -2)
  64923. #endif
  64924. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/huge_vall.h uClibc-git/libc/sysdeps/linux/i386/bits/huge_vall.h
  64925. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/huge_vall.h 1970-01-01 01:00:00.000000000 +0100
  64926. +++ uClibc-git/libc/sysdeps/linux/i386/bits/huge_vall.h 2014-07-25 20:36:07.049335958 +0200
  64927. @@ -0,0 +1,42 @@
  64928. +/* `HUGE_VALL' constant for ix86 (where it is infinity).
  64929. + Used by <stdlib.h> and <math.h> functions for overflow.
  64930. + Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000, 2004
  64931. + Free Software Foundation, Inc.
  64932. + This file is part of the GNU C Library.
  64933. +
  64934. + The GNU C Library is free software; you can redistribute it and/or
  64935. + modify it under the terms of the GNU Lesser General Public
  64936. + License as published by the Free Software Foundation; either
  64937. + version 2.1 of the License, or (at your option) any later version.
  64938. +
  64939. + The GNU C Library is distributed in the hope that it will be useful,
  64940. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  64941. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  64942. + Lesser General Public License for more details.
  64943. +
  64944. + You should have received a copy of the GNU Lesser General Public
  64945. + License along with the GNU C Library; if not, see
  64946. + <http://www.gnu.org/licenses/>. */
  64947. +
  64948. +#ifndef _MATH_H
  64949. +# error "Never use <bits/huge_vall.h> directly; include <math.h> instead."
  64950. +#endif
  64951. +
  64952. +#if __GNUC_PREREQ(3,3)
  64953. +# define HUGE_VALL (__builtin_huge_vall())
  64954. +#elif __GNUC_PREREQ(2,96)
  64955. +# define HUGE_VALL (__extension__ 0x1.0p32767L)
  64956. +#else
  64957. +
  64958. +# define __HUGE_VALL_bytes { 0, 0, 0, 0, 0, 0, 0, 0x80, 0xff, 0x7f, 0, 0 }
  64959. +
  64960. +# define __huge_vall_t union { unsigned char __c[12]; long double __ld; }
  64961. +# ifdef __GNUC__
  64962. +# define HUGE_VALL (__extension__ \
  64963. + ((__huge_vall_t) { __c: __HUGE_VALL_bytes }).__ld)
  64964. +# else /* Not GCC. */
  64965. +static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
  64966. +# define HUGE_VALL (__huge_vall.__ld)
  64967. +# endif /* GCC. */
  64968. +
  64969. +#endif /* GCC 2.95 */
  64970. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/i386/bits/kernel_types.h
  64971. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
  64972. +++ uClibc-git/libc/sysdeps/linux/i386/bits/kernel_types.h 2014-07-25 20:36:07.049335958 +0200
  64973. @@ -40,6 +40,8 @@
  64974. typedef unsigned short __kernel_old_uid_t;
  64975. typedef unsigned short __kernel_old_gid_t;
  64976. typedef __kernel_dev_t __kernel_old_dev_t;
  64977. +typedef long __kernel_long_t;
  64978. +typedef unsigned long __kernel_ulong_t;
  64979. typedef long long __kernel_loff_t;
  64980. typedef struct {
  64981. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/mathdef.h uClibc-git/libc/sysdeps/linux/i386/bits/mathdef.h
  64982. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
  64983. +++ uClibc-git/libc/sysdeps/linux/i386/bits/mathdef.h 2014-07-25 20:36:07.049335958 +0200
  64984. @@ -12,9 +12,8 @@
  64985. Lesser General Public License for more details.
  64986. You should have received a copy of the GNU Lesser General Public
  64987. - License along with the GNU C Library; if not, write to the Free
  64988. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  64989. - 02111-1307 USA. */
  64990. + License along with the GNU C Library; if not, see
  64991. + <http://www.gnu.org/licenses/>. */
  64992. #if !defined _MATH_H && !defined _COMPLEX_H
  64993. # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
  64994. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/mathinline.h uClibc-git/libc/sysdeps/linux/i386/bits/mathinline.h
  64995. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/mathinline.h 2012-05-15 09:20:09.000000000 +0200
  64996. +++ uClibc-git/libc/sysdeps/linux/i386/bits/mathinline.h 2014-07-25 20:36:07.049335958 +0200
  64997. @@ -15,9 +15,8 @@
  64998. Lesser General Public License for more details.
  64999. You should have received a copy of the GNU Lesser General Public
  65000. - License along with the GNU C Library; if not, write to the Free
  65001. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65002. - 02111-1307 USA. */
  65003. + License along with the GNU C Library; if not, see
  65004. + <http://www.gnu.org/licenses/>. */
  65005. #ifndef _MATH_H
  65006. # error "Never use <bits/mathinline.h> directly; include <math.h> instead."
  65007. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/select.h uClibc-git/libc/sysdeps/linux/i386/bits/select.h
  65008. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/select.h 2012-05-15 09:20:09.000000000 +0200
  65009. +++ uClibc-git/libc/sysdeps/linux/i386/bits/select.h 2014-07-25 20:36:07.049335958 +0200
  65010. @@ -12,9 +12,8 @@
  65011. Lesser General Public License for more details.
  65012. You should have received a copy of the GNU Lesser General Public
  65013. - License along with the GNU C Library; if not, write to the Free
  65014. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65015. - 02111-1307 USA. */
  65016. + License along with the GNU C Library; if not, see
  65017. + <http://www.gnu.org/licenses/>. */
  65018. #ifndef _SYS_SELECT_H
  65019. # error "Never use <bits/select.h> directly; include <sys/select.h> instead."
  65020. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/setjmp.h uClibc-git/libc/sysdeps/linux/i386/bits/setjmp.h
  65021. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  65022. +++ uClibc-git/libc/sysdeps/linux/i386/bits/setjmp.h 2014-07-25 20:36:07.049335958 +0200
  65023. @@ -1,4 +1,5 @@
  65024. -/* Copyright (C) 1997, 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
  65025. +/* Copyright (C) 1997,1998,2000,2001,2003,2005,2006
  65026. + Free Software Foundation, Inc.
  65027. This file is part of the GNU C Library.
  65028. The GNU C Library is free software; you can redistribute it and/or
  65029. @@ -12,9 +13,8 @@
  65030. Lesser General Public License for more details.
  65031. You should have received a copy of the GNU Lesser General Public
  65032. - License along with the GNU C Library; if not, write to the Free
  65033. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65034. - 02111-1307 USA. */
  65035. + License along with the GNU C Library; if not, see
  65036. + <http://www.gnu.org/licenses/>. */
  65037. /* Define the machine-dependent type `jmp_buf'. Intel 386 version. */
  65038. #ifndef _BITS_SETJMP_H
  65039. @@ -24,23 +24,6 @@
  65040. # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
  65041. #endif
  65042. -#if defined __USE_MISC || defined _ASM
  65043. -# define JB_BX 0
  65044. -# define JB_SI 1
  65045. -# define JB_DI 2
  65046. -# define JB_BP 3
  65047. -# define JB_SP 4
  65048. -# define JB_PC 5
  65049. -# define JB_SIZE 24
  65050. -#endif
  65051. -
  65052. -#ifndef _ASM
  65053. typedef int __jmp_buf[6];
  65054. -#endif
  65055. -
  65056. -/* Test if longjmp to JMPBUF would unwind the frame
  65057. - containing a local variable at ADDRESS. */
  65058. -#define _JMPBUF_UNWINDS(jmpbuf, address) \
  65059. - ((void *) (address) < (void *) (jmpbuf)[JB_SP])
  65060. #endif /* bits/setjmp.h */
  65061. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/sigcontextinfo.h uClibc-git/libc/sysdeps/linux/i386/bits/sigcontextinfo.h
  65062. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
  65063. +++ uClibc-git/libc/sysdeps/linux/i386/bits/sigcontextinfo.h 2014-07-25 20:36:07.049335958 +0200
  65064. @@ -13,9 +13,8 @@
  65065. Lesser General Public License for more details.
  65066. You should have received a copy of the GNU Lesser General Public
  65067. - License along with the GNU C Library; if not, write to the Free
  65068. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65069. - 02111-1307 USA. */
  65070. + License along with the GNU C Library; if not, see
  65071. + <http://www.gnu.org/licenses/>. */
  65072. #define SIGCONTEXT struct sigcontext
  65073. #define SIGCONTEXT_EXTRA_ARGS
  65074. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/i386/bits/stackinfo.h
  65075. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  65076. +++ uClibc-git/libc/sysdeps/linux/i386/bits/stackinfo.h 2014-07-25 20:36:07.049335958 +0200
  65077. @@ -12,9 +12,8 @@
  65078. Lesser General Public License for more details.
  65079. You should have received a copy of the GNU Lesser General Public
  65080. - License along with the GNU C Library; if not, write to the Free
  65081. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65082. - 02111-1307 USA. */
  65083. + License along with the GNU C Library; if not, see
  65084. + <http://www.gnu.org/licenses/>. */
  65085. /* This file contains a bit of information about the stack allocation
  65086. of the processor. */
  65087. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/syscalls.h uClibc-git/libc/sysdeps/linux/i386/bits/syscalls.h
  65088. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/syscalls.h 2012-05-15 09:20:09.000000000 +0200
  65089. +++ uClibc-git/libc/sysdeps/linux/i386/bits/syscalls.h 2014-07-25 20:36:07.049335958 +0200
  65090. @@ -136,7 +136,7 @@
  65091. #define ASMFMT_5(arg1, arg2, arg3, arg4, arg5) \
  65092. , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5)
  65093. #define ASMFMT_6(arg1, arg2, arg3, arg4, arg5, arg6) \
  65094. - , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5), "m" (arg6)
  65095. + , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5), "g" (arg6)
  65096. #else /* !PIC */
  65097. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h
  65098. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  65099. +++ uClibc-git/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h 2014-07-25 20:36:07.049335958 +0200
  65100. @@ -11,8 +11,8 @@
  65101. /* can your target use syscall6() for mmap ? */
  65102. #undef __UCLIBC_MMAP_HAS_6_ARGS__
  65103. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  65104. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  65105. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  65106. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  65107. /* does your target have a broken create_module() ? */
  65108. #define __UCLIBC_BROKEN_CREATE_MODULE__
  65109. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/wchar.h uClibc-git/libc/sysdeps/linux/i386/bits/wchar.h
  65110. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/wchar.h 2012-05-15 09:20:09.000000000 +0200
  65111. +++ uClibc-git/libc/sysdeps/linux/i386/bits/wchar.h 2014-07-25 20:36:07.049335958 +0200
  65112. @@ -13,9 +13,8 @@
  65113. Lesser General Public License for more details.
  65114. You should have received a copy of the GNU Lesser General Public
  65115. - License along with the GNU C Library; if not, write to the Free
  65116. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65117. - 02111-1307 USA. */
  65118. + License along with the GNU C Library; if not, see
  65119. + <http://www.gnu.org/licenses/>. */
  65120. #ifndef _BITS_WCHAR_H
  65121. #define _BITS_WCHAR_H 1
  65122. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/wordsize.h uClibc-git/libc/sysdeps/linux/i386/bits/wordsize.h
  65123. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
  65124. +++ uClibc-git/libc/sysdeps/linux/i386/bits/wordsize.h 2014-07-25 20:36:07.049335958 +0200
  65125. @@ -12,9 +12,8 @@
  65126. Lesser General Public License for more details.
  65127. You should have received a copy of the GNU Lesser General Public
  65128. - License along with the GNU C Library; if not, write to the Free
  65129. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65130. - 02111-1307 USA. */
  65131. + License along with the GNU C Library; if not, see
  65132. + <http://www.gnu.org/licenses/>. */
  65133. #define __WORDSIZE 32
  65134. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/brk.c uClibc-git/libc/sysdeps/linux/i386/brk.c
  65135. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/brk.c 2012-05-15 09:20:09.000000000 +0200
  65136. +++ uClibc-git/libc/sysdeps/linux/i386/brk.c 2014-07-25 20:36:07.049335958 +0200
  65137. @@ -13,9 +13,8 @@
  65138. Lesser General Public License for more details.
  65139. You should have received a copy of the GNU Lesser General Public
  65140. - License along with the GNU C Library; if not, write to the Free
  65141. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65142. - 02111-1307 USA. */
  65143. + License along with the GNU C Library; if not, see
  65144. + <http://www.gnu.org/licenses/>. */
  65145. #include <errno.h>
  65146. #include <unistd.h>
  65147. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bsd-setjmp.S uClibc-git/libc/sysdeps/linux/i386/bsd-setjmp.S
  65148. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bsd-setjmp.S 2012-05-15 09:20:09.000000000 +0200
  65149. +++ uClibc-git/libc/sysdeps/linux/i386/bsd-setjmp.S 2014-07-25 20:36:07.053335979 +0200
  65150. @@ -13,13 +13,8 @@
  65151. Lesser General Public License for more details.
  65152. You should have received a copy of the GNU Lesser General Public
  65153. - License along with the GNU C Library; if not, write to the Free
  65154. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65155. - 02111-1307 USA. */
  65156. -
  65157. -#define _ASM
  65158. -#define _SETJMP_H
  65159. -#include <bits/setjmp.h>
  65160. + License along with the GNU C Library; if not, see
  65161. + <http://www.gnu.org/licenses/>. */
  65162. .global setjmp
  65163. .type setjmp,%function
  65164. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/bsd-_setjmp.S uClibc-git/libc/sysdeps/linux/i386/bsd-_setjmp.S
  65165. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/bsd-_setjmp.S 2012-05-15 09:20:09.000000000 +0200
  65166. +++ uClibc-git/libc/sysdeps/linux/i386/bsd-_setjmp.S 2014-07-25 20:36:07.053335979 +0200
  65167. @@ -13,17 +13,14 @@
  65168. Lesser General Public License for more details.
  65169. You should have received a copy of the GNU Lesser General Public
  65170. - License along with the GNU C Library; if not, write to the Free
  65171. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65172. - 02111-1307 USA. */
  65173. + License along with the GNU C Library; if not, see
  65174. + <http://www.gnu.org/licenses/>. */
  65175. /* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
  65176. We cannot do it in C because it must be a tail-call, so frame-unwinding
  65177. in setjmp doesn't clobber the state restored by longjmp. */
  65178. -#define _ASM
  65179. -#define _SETJMP_H
  65180. -#include <bits/setjmp.h>
  65181. +#include <jmpbuf-offsets.h>
  65182. .global _setjmp
  65183. .type _setjmp,%function
  65184. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/clone.S uClibc-git/libc/sysdeps/linux/i386/clone.S
  65185. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/clone.S 2012-05-15 09:20:09.000000000 +0200
  65186. +++ uClibc-git/libc/sysdeps/linux/i386/clone.S 2014-07-25 20:36:07.053335979 +0200
  65187. @@ -13,9 +13,8 @@
  65188. Lesser General Public License for more details.
  65189. You should have received a copy of the GNU Lesser General Public
  65190. - License along with the GNU C Library; if not, write to the Free
  65191. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65192. - 02111-1307 USA. */
  65193. + License along with the GNU C Library; if not, see
  65194. + <http://www.gnu.org/licenses/>. */
  65195. /* clone() is even more special than fork() as it mucks with stacks
  65196. and invokes a function in the right context after its all over.
  65197. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/crt1.S uClibc-git/libc/sysdeps/linux/i386/crt1.S
  65198. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/crt1.S 2012-05-15 09:20:09.000000000 +0200
  65199. +++ uClibc-git/libc/sysdeps/linux/i386/crt1.S 2014-07-25 20:36:07.053335979 +0200
  65200. @@ -31,9 +31,8 @@
  65201. Lesser General Public License for more details.
  65202. You should have received a copy of the GNU Lesser General Public
  65203. - License along with the GNU C Library; if not, write to the Free
  65204. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65205. - 02111-1307 USA. */
  65206. + License along with the GNU C Library; if not, see
  65207. + <http://www.gnu.org/licenses/>. */
  65208. /* This is the canonical entry point, usually the first thing in the text
  65209. segment. The SVR4/i386 ABI (pages 3-31, 3-32) says that when the entry
  65210. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/fpu_control.h uClibc-git/libc/sysdeps/linux/i386/fpu_control.h
  65211. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
  65212. +++ uClibc-git/libc/sysdeps/linux/i386/fpu_control.h 2014-07-25 20:36:07.053335979 +0200
  65213. @@ -14,9 +14,8 @@
  65214. Lesser General Public License for more details.
  65215. You should have received a copy of the GNU Lesser General Public
  65216. - License along with the GNU C Library; if not, write to the Free
  65217. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65218. - 02111-1307 USA. */
  65219. + License along with the GNU C Library; if not, see
  65220. + <http://www.gnu.org/licenses/>. */
  65221. #ifndef _FPU_CONTROL_H
  65222. #define _FPU_CONTROL_H 1
  65223. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/getcontext.S uClibc-git/libc/sysdeps/linux/i386/getcontext.S
  65224. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/getcontext.S 1970-01-01 01:00:00.000000000 +0100
  65225. +++ uClibc-git/libc/sysdeps/linux/i386/getcontext.S 2014-07-25 20:36:07.053335979 +0200
  65226. @@ -0,0 +1,84 @@
  65227. +/* Save current context.
  65228. + Copyright (C) 2001-2012 Free Software Foundation, Inc.
  65229. + This file is part of the GNU C Library.
  65230. + Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
  65231. +
  65232. + The GNU C Library is free software; you can redistribute it and/or
  65233. + modify it under the terms of the GNU Lesser General Public
  65234. + License as published by the Free Software Foundation; either
  65235. + version 2.1 of the License, or (at your option) any later version.
  65236. +
  65237. + The GNU C Library is distributed in the hope that it will be useful,
  65238. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  65239. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  65240. + Lesser General Public License for more details.
  65241. +
  65242. + You should have received a copy of the GNU Lesser General Public
  65243. + License along with the GNU C Library; if not, see
  65244. + <http://www.gnu.org/licenses/>. */
  65245. +
  65246. +#include <sysdep.h>
  65247. +
  65248. +#include "ucontext_i.h"
  65249. +
  65250. +
  65251. +ENTRY(__getcontext)
  65252. + /* Load address of the context data structure. */
  65253. + movl 4(%esp), %eax
  65254. +
  65255. + /* Return value of getcontext. EAX is the only register whose
  65256. + value is not preserved. */
  65257. + movl $0, oEAX(%eax)
  65258. +
  65259. + /* Save the 32-bit register values and the return address. */
  65260. + movl %ecx, oECX(%eax)
  65261. + movl %edx, oEDX(%eax)
  65262. + movl %edi, oEDI(%eax)
  65263. + movl %esi, oESI(%eax)
  65264. + movl %ebp, oEBP(%eax)
  65265. + movl (%esp), %ecx
  65266. + movl %ecx, oEIP(%eax)
  65267. + leal 4(%esp), %ecx /* Exclude the return address. */
  65268. + movl %ecx, oESP(%eax)
  65269. + movl %ebx, oEBX(%eax)
  65270. +
  65271. + /* Save the FS segment register. We don't touch the GS register
  65272. + since it is used for threads. */
  65273. + xorl %edx, %edx
  65274. + movw %fs, %dx
  65275. + movl %edx, oFS(%eax)
  65276. +
  65277. + /* We have separate floating-point register content memory on the
  65278. + stack. We use the __fpregs_mem block in the context. Set the
  65279. + links up correctly. */
  65280. + leal oFPREGSMEM(%eax), %ecx
  65281. + movl %ecx, oFPREGS(%eax)
  65282. + /* Save the floating-point context. */
  65283. + fnstenv (%ecx)
  65284. + /* And load it right back since the processor changes the mask.
  65285. + Intel thought this opcode to be used in interrupt handlers which
  65286. + would block all exceptions. */
  65287. + fldenv (%ecx)
  65288. +
  65289. + /* Save the current signal mask. */
  65290. + pushl %ebx
  65291. + cfi_adjust_cfa_offset (4)
  65292. + cfi_rel_offset (ebx, 0)
  65293. + leal oSIGMASK(%eax), %edx
  65294. + xorl %ecx, %ecx
  65295. + movl $SIG_BLOCK, %ebx
  65296. + movl $__NR_sigprocmask, %eax
  65297. + ENTER_KERNEL
  65298. + popl %ebx
  65299. + cfi_adjust_cfa_offset (-4)
  65300. + cfi_restore (ebx)
  65301. + cmpl $-4095, %eax /* Check %eax for error. */
  65302. + jae SYSCALL_ERROR_LABEL /* Jump to error handler if error. */
  65303. +
  65304. + /* All done, return 0 for success. */
  65305. + xorl %eax, %eax
  65306. +L(pseudo_end):
  65307. + ret
  65308. +PSEUDO_END(__getcontext)
  65309. +
  65310. +weak_alias (__getcontext, getcontext)
  65311. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/jmpbuf-offsets.h uClibc-git/libc/sysdeps/linux/i386/jmpbuf-offsets.h
  65312. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
  65313. +++ uClibc-git/libc/sysdeps/linux/i386/jmpbuf-offsets.h 2014-07-25 20:36:07.053335979 +0200
  65314. @@ -0,0 +1,25 @@
  65315. +/* Private macros for accessing __jmp_buf contents. i386 version.
  65316. + Copyright (C) 2006 Free Software Foundation, Inc.
  65317. + This file is part of the GNU C Library.
  65318. +
  65319. + The GNU C Library is free software; you can redistribute it and/or
  65320. + modify it under the terms of the GNU Lesser General Public
  65321. + License as published by the Free Software Foundation; either
  65322. + version 2.1 of the License, or (at your option) any later version.
  65323. +
  65324. + The GNU C Library is distributed in the hope that it will be useful,
  65325. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  65326. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  65327. + Lesser General Public License for more details.
  65328. +
  65329. + You should have received a copy of the GNU Lesser General Public
  65330. + License along with the GNU C Library; if not, see
  65331. + <http://www.gnu.org/licenses/>. */
  65332. +
  65333. +#define JB_BX 0
  65334. +#define JB_SI 1
  65335. +#define JB_DI 2
  65336. +#define JB_BP 3
  65337. +#define JB_SP 4
  65338. +#define JB_PC 5
  65339. +#define JB_SIZE 24
  65340. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/i386/jmpbuf-unwind.h
  65341. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  65342. +++ uClibc-git/libc/sysdeps/linux/i386/jmpbuf-unwind.h 2014-07-25 20:36:07.053335979 +0200
  65343. @@ -0,0 +1,23 @@
  65344. +/*
  65345. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  65346. + *
  65347. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  65348. + */
  65349. +#include <setjmp.h>
  65350. +#include <jmpbuf-offsets.h>
  65351. +
  65352. +/* Test if longjmp to JMPBUF would unwind the frame
  65353. + containing a local variable at ADDRESS. */
  65354. +#define _JMPBUF_UNWINDS(jmpbuf, address) \
  65355. + ((void *) (address) < (void *) (jmpbuf)[JB_SP])
  65356. +
  65357. +#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  65358. +#include <stdint.h>
  65359. +#include <unwind.h>
  65360. +
  65361. +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
  65362. + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
  65363. +
  65364. +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
  65365. + ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
  65366. +#endif
  65367. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/__longjmp.S uClibc-git/libc/sysdeps/linux/i386/__longjmp.S
  65368. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
  65369. +++ uClibc-git/libc/sysdeps/linux/i386/__longjmp.S 2014-07-25 20:36:07.037335895 +0200
  65370. @@ -14,13 +14,9 @@
  65371. You should have received a copy of the GNU Library General Public
  65372. License along with the GNU C Library; see the file COPYING.LIB. If not,
  65373. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  65374. - Boston, MA 02111-1307, USA. */
  65375. + see <http://www.gnu.org/licenses/>. */
  65376. -#include <features.h>
  65377. -#define _ASM
  65378. -#define _SETJMP_H
  65379. -#include <bits/setjmp.h>
  65380. +#include <jmpbuf-offsets.h>
  65381. .global __longjmp
  65382. .type __longjmp,%function
  65383. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/makecontext.S uClibc-git/libc/sysdeps/linux/i386/makecontext.S
  65384. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/makecontext.S 1970-01-01 01:00:00.000000000 +0100
  65385. +++ uClibc-git/libc/sysdeps/linux/i386/makecontext.S 2014-07-25 20:36:07.053335979 +0200
  65386. @@ -0,0 +1,123 @@
  65387. +/* Create new context.
  65388. + Copyright (C) 2001,2002,2005,2007,2008,2009 Free Software Foundation, Inc.
  65389. + This file is part of the GNU C Library.
  65390. + Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
  65391. +
  65392. + The GNU C Library is free software; you can redistribute it and/or
  65393. + modify it under the terms of the GNU Lesser General Public
  65394. + License as published by the Free Software Foundation; either
  65395. + version 2.1 of the License, or (at your option) any later version.
  65396. +
  65397. + The GNU C Library is distributed in the hope that it will be useful,
  65398. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  65399. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  65400. + Lesser General Public License for more details.
  65401. +
  65402. + You should have received a copy of the GNU Lesser General Public
  65403. + License along with the GNU C Library; if not, see
  65404. + <http://www.gnu.org/licenses/>. */
  65405. +
  65406. +#include <sysdep.h>
  65407. +
  65408. +#include "ucontext_i.h"
  65409. +
  65410. +
  65411. +ENTRY(__makecontext)
  65412. + movl 4(%esp), %eax
  65413. +
  65414. + /* Load the address of the function we are supposed to run. */
  65415. + movl 8(%esp), %ecx
  65416. +
  65417. + /* Compute the address of the stack. The information comes from
  65418. + to us_stack element. */
  65419. + movl oSS_SP(%eax), %edx
  65420. + movl %ecx, oEIP(%eax)
  65421. + addl oSS_SIZE(%eax), %edx
  65422. +
  65423. + /* Remember the number of parameters for the exit handler since
  65424. + it has to remove them. We store the number in the EBX register
  65425. + which the function we will call must preserve. */
  65426. + movl 12(%esp), %ecx
  65427. + movl %ecx, oEBX(%eax)
  65428. +
  65429. + /* Make room on the new stack for the parameters.
  65430. + Room for the arguments, return address (== L(exitcode)) and
  65431. + oLINK pointer is needed. One of the pointer sizes is subtracted
  65432. + after aligning the stack. */
  65433. + negl %ecx
  65434. + leal -4(%edx,%ecx,4), %edx
  65435. + negl %ecx
  65436. +
  65437. + /* Align the stack. */
  65438. + andl $0xfffffff0, %edx
  65439. + subl $4, %edx
  65440. +
  65441. + /* Store the future stack pointer. */
  65442. + movl %edx, oESP(%eax)
  65443. +
  65444. + /* Put the next context on the new stack (from the uc_link
  65445. + element). */
  65446. + movl oLINK(%eax), %eax
  65447. + movl %eax, 4(%edx,%ecx,4)
  65448. +
  65449. + /* Copy all the parameters. */
  65450. + jecxz 2f
  65451. +1: movl 12(%esp,%ecx,4), %eax
  65452. + movl %eax, (%edx,%ecx,4)
  65453. + decl %ecx
  65454. + jnz 1b
  65455. +2:
  65456. +
  65457. + /* If the function we call returns we must continue with the
  65458. + context which is given in the uc_link element. To do this
  65459. + set the return address for the function the user provides
  65460. + to a little bit of helper code which does the magic (see
  65461. + below). */
  65462. +#ifdef __PIC__
  65463. + call 1f
  65464. + cfi_adjust_cfa_offset (4)
  65465. +1: popl %ecx
  65466. + cfi_adjust_cfa_offset (-4)
  65467. + addl $L(exitcode)-1b, %ecx
  65468. + movl %ecx, (%edx)
  65469. +#else
  65470. + movl $L(exitcode), (%edx)
  65471. +#endif
  65472. + /* 'makecontext' returns no value. */
  65473. +L(pseudo_end):
  65474. + ret
  65475. +
  65476. + /* This is the helper code which gets called if a function which
  65477. + is registered with 'makecontext' returns. In this case we
  65478. + have to install the context listed in the uc_link element of
  65479. + the context 'makecontext' manipulated at the time of the
  65480. + 'makecontext' call. If the pointer is NULL the process must
  65481. + terminate. */
  65482. + cfi_endproc
  65483. +L(exitcode):
  65484. + /* This removes the parameters passed to the function given to
  65485. + 'makecontext' from the stack. EBX contains the number of
  65486. + parameters (see above). */
  65487. + leal (%esp,%ebx,4), %esp
  65488. +
  65489. +#ifdef __PIC__
  65490. + call 1f
  65491. +1: popl %ebx
  65492. + addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %ebx
  65493. +#endif
  65494. + cmpl $0, (%esp) /* Check the next context. */
  65495. + je 2f /* If it is zero exit. */
  65496. +
  65497. + call JUMPTARGET(__setcontext)
  65498. + /* If this returns (which can happen if the syscall fails) we'll
  65499. + exit the program with the return error value (-1). */
  65500. +
  65501. + movl %eax, (%esp)
  65502. +2: call HIDDEN_JUMPTARGET(exit)
  65503. + /* The 'exit' call should never return. In case it does cause
  65504. + the process to terminate. */
  65505. + hlt
  65506. + cfi_startproc
  65507. +END(__makecontext)
  65508. +
  65509. +weak_alias (__makecontext, makecontext)
  65510. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/Makefile.arch uClibc-git/libc/sysdeps/linux/i386/Makefile.arch
  65511. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
  65512. +++ uClibc-git/libc/sysdeps/linux/i386/Makefile.arch 2014-07-25 20:36:07.037335895 +0200
  65513. @@ -5,13 +5,13 @@
  65514. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  65515. #
  65516. -CSRC := brk.c __syscall_error.c sigaction.c
  65517. +CSRC-y := brk.c __syscall_error.c sigaction.c
  65518. -SSRC := \
  65519. +SSRC-y := \
  65520. __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \
  65521. - sync_file_range.S syscall.S mmap.S mmap64.S posix_fadvise64.S
  65522. + sync_file_range.S syscall.S mmap.S
  65523. -
  65524. -ifneq ($(UCLIBC_HAS_THREADS_NATIVE),y)
  65525. -SSRC += vfork.S clone.S
  65526. -endif
  65527. +SSRC-$(UCLIBC_HAS_LFS) += mmap64.S
  65528. +SSRC-$(if $(findstring yy,$(UCLIBC_HAS_ADVANCED_REALTIME)$(UCLIBC_HAS_LFS)),y) += posix_fadvise64.S
  65529. +SSRC-$(if $(UCLIBC_HAS_THREADS_NATIVE),,y) += vfork.S clone.S
  65530. +SSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += makecontext.S setcontext.S getcontext.S swapcontext.S
  65531. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/mmap64.S uClibc-git/libc/sysdeps/linux/i386/mmap64.S
  65532. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/mmap64.S 2012-05-15 09:20:09.000000000 +0200
  65533. +++ uClibc-git/libc/sysdeps/linux/i386/mmap64.S 2014-07-25 20:36:07.053335979 +0200
  65534. @@ -12,18 +12,16 @@
  65535. Lesser General Public License for more details.
  65536. You should have received a copy of the GNU Lesser General Public
  65537. - License along with the GNU C Library; if not, write to the Free
  65538. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65539. - 02111-1307 USA. */
  65540. + License along with the GNU C Library; if not, see
  65541. + <http://www.gnu.org/licenses/>. */
  65542. +#include <_lfs_64.h>
  65543. #define _ERRNO_H 1
  65544. -#include <features.h>
  65545. #include <bits/errno.h>
  65546. #include <sys/syscall.h>
  65547. -#if defined __UCLIBC_HAS_LFS__ && defined __NR_mmap2
  65548. -
  65549. +#ifdef __NR_mmap2
  65550. #define LINKAGE 4
  65551. #define PTR_SIZE 4
  65552. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/mmap.S uClibc-git/libc/sysdeps/linux/i386/mmap.S
  65553. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/mmap.S 2012-05-15 09:20:09.000000000 +0200
  65554. +++ uClibc-git/libc/sysdeps/linux/i386/mmap.S 2014-07-25 20:36:07.053335979 +0200
  65555. @@ -12,9 +12,8 @@
  65556. Lesser General Public License for more details.
  65557. You should have received a copy of the GNU Lesser General Public
  65558. - License along with the GNU C Library; if not, write to the Free
  65559. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65560. - 02111-1307 USA. */
  65561. + License along with the GNU C Library; if not, see
  65562. + <http://www.gnu.org/licenses/>. */
  65563. #define _ERRNO_H 1
  65564. #include <features.h>
  65565. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/posix_fadvise64.S uClibc-git/libc/sysdeps/linux/i386/posix_fadvise64.S
  65566. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/posix_fadvise64.S 2012-05-15 09:20:09.000000000 +0200
  65567. +++ uClibc-git/libc/sysdeps/linux/i386/posix_fadvise64.S 2014-07-25 20:36:07.053335979 +0200
  65568. @@ -13,29 +13,18 @@
  65569. Lesser General Public License for more details.
  65570. You should have received a copy of the GNU Lesser General Public
  65571. - License along with the GNU C Library; if not, write to the Free
  65572. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65573. - 02111-1307 USA. */
  65574. -
  65575. -#define _ERRNO_H 1
  65576. -#include <features.h>
  65577. -#include <bits/errno.h>
  65578. -#include <sys/syscall.h>
  65579. + License along with the GNU C Library; if not, see
  65580. + <http://www.gnu.org/licenses/>. */
  65581. -#if defined __NR_fadvise64_64 || defined __NR_fadvise64
  65582. +#include <_lfs_64.h>
  65583. +#include <sys/syscall.h>
  65584. -/* Was named __libc_posix_fadvise64 for some inexplicable reason.
  65585. -** google says only uclibc has *__libc*_posix_fadviseXXX,
  65586. -** so it cannot be compat with anything.
  65587. -**
  65588. -** Remove this comment and one at the end after 0.9.31
  65589. -*/
  65590. +#ifdef __NR_fadvise64_64
  65591. .text
  65592. .global posix_fadvise64
  65593. .type posix_fadvise64,%function
  65594. posix_fadvise64:
  65595. -#if defined __NR_fadvise64_64
  65596. /* Save regs */
  65597. pushl %ebp
  65598. pushl %ebx
  65599. @@ -63,47 +52,7 @@
  65600. /* Returns 0 on success, else an error code. */
  65601. negl %eax
  65602. -#elif defined __NR_fadvise64
  65603. - /* Save regs */
  65604. - pushl %ebx
  65605. - pushl %esi
  65606. - pushl %edi
  65607. -#if 0
  65608. - /* does len overflow long? */
  65609. - cmpl $0, 28(%esp)
  65610. - movl $-EOVERFLOW, %eax
  65611. - jne overflow
  65612. -#endif
  65613. - movl $__NR_fadvise64, %eax /* Syscall number in %eax. */
  65614. -
  65615. - movl 16(%esp), %ebx
  65616. - movl 20(%esp), %ecx
  65617. - movl 24(%esp), %edx
  65618. - movl 28(%esp), %esi
  65619. - movl 32(%esp), %edi
  65620. -
  65621. - /* Do the system call trap. */
  65622. - int $0x80
  65623. -overflow:
  65624. - /* Restore regs */
  65625. - popl %edi
  65626. - popl %esi
  65627. - popl %ebx
  65628. -
  65629. - /* Returns 0 on success, else an error code. */
  65630. - negl %eax
  65631. -#endif
  65632. -
  65633. /* Successful; return the syscall's value. */
  65634. ret
  65635. -
  65636. .size posix_fadvise64,.-posix_fadvise64
  65637. -
  65638. -/*
  65639. -** libc_hidden_def(__libc_posix_fadvise64)
  65640. -** #if defined __UCLIBC_HAS_LFS__ && defined __UCLIBC_HAS_ADVANCED_REALTIME__
  65641. -** weak_alias(__libc_posix_fadvise64,posix_fadvise64)
  65642. -** #endif
  65643. -*/
  65644. -
  65645. #endif
  65646. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/setcontext.S uClibc-git/libc/sysdeps/linux/i386/setcontext.S
  65647. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/setcontext.S 1970-01-01 01:00:00.000000000 +0100
  65648. +++ uClibc-git/libc/sysdeps/linux/i386/setcontext.S 2014-07-25 20:36:07.053335979 +0200
  65649. @@ -0,0 +1,96 @@
  65650. +/* Install given context.
  65651. + Copyright (C) 2001-2012 Free Software Foundation, Inc.
  65652. + This file is part of the GNU C Library.
  65653. + Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
  65654. +
  65655. + The GNU C Library is free software; you can redistribute it and/or
  65656. + modify it under the terms of the GNU Lesser General Public
  65657. + License as published by the Free Software Foundation; either
  65658. + version 2.1 of the License, or (at your option) any later version.
  65659. +
  65660. + The GNU C Library is distributed in the hope that it will be useful,
  65661. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  65662. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  65663. + Lesser General Public License for more details.
  65664. +
  65665. + You should have received a copy of the GNU Lesser General Public
  65666. + License along with the GNU C Library; if not, see
  65667. + <http://www.gnu.org/licenses/>. */
  65668. +
  65669. +#include <sysdep.h>
  65670. +
  65671. +#include "ucontext_i.h"
  65672. +
  65673. +
  65674. +ENTRY(__setcontext)
  65675. + /* Load address of the context data structure. */
  65676. + movl 4(%esp), %eax
  65677. +
  65678. + /* Get the current signal mask. Note that we preserve EBX in case
  65679. + the system call fails and we return from the function with an
  65680. + error. */
  65681. + pushl %ebx
  65682. + cfi_adjust_cfa_offset (4)
  65683. + xorl %edx, %edx
  65684. + leal oSIGMASK(%eax), %ecx
  65685. + movl $SIG_SETMASK, %ebx
  65686. + cfi_rel_offset (ebx, 0)
  65687. + movl $__NR_sigprocmask, %eax
  65688. + ENTER_KERNEL
  65689. + popl %ebx
  65690. + cfi_adjust_cfa_offset (-4)
  65691. + cfi_restore (ebx)
  65692. + cmpl $-4095, %eax /* Check %eax for error. */
  65693. + jae SYSCALL_ERROR_LABEL /* Jump to error handler if error. */
  65694. +
  65695. + /* EAX was modified, reload it. */
  65696. + movl 4(%esp), %eax
  65697. +
  65698. + /* Restore the floating-point context. Not the registers, only the
  65699. + rest. */
  65700. + movl oFPREGS(%eax), %ecx
  65701. + fldenv (%ecx)
  65702. +
  65703. + /* Restore the FS segment register. We don't touch the GS register
  65704. + since it is used for threads. */
  65705. + movl oFS(%eax), %ecx
  65706. + movw %cx, %fs
  65707. +
  65708. + /* Fetch the address to return to. */
  65709. + movl oEIP(%eax), %ecx
  65710. +
  65711. + /* Load the new stack pointer. */
  65712. + cfi_def_cfa (eax, 0)
  65713. + cfi_offset (edi, oEDI)
  65714. + cfi_offset (esi, oESI)
  65715. + cfi_offset (ebp, oEBP)
  65716. + cfi_offset (ebx, oEBX)
  65717. + cfi_offset (edx, oEDX)
  65718. + cfi_offset (ecx, oECX)
  65719. + movl oESP(%eax), %esp
  65720. +
  65721. + /* Push the return address on the new stack so we can return there. */
  65722. + pushl %ecx
  65723. +
  65724. + /* Load the values of all the 32-bit registers (except ESP).
  65725. + Since we are loading from EAX, it must be last. */
  65726. + movl oEDI(%eax), %edi
  65727. + movl oESI(%eax), %esi
  65728. + movl oEBP(%eax), %ebp
  65729. + movl oEBX(%eax), %ebx
  65730. + movl oEDX(%eax), %edx
  65731. + movl oECX(%eax), %ecx
  65732. + movl oEAX(%eax), %eax
  65733. +
  65734. + /* End FDE here, we fall into another context. */
  65735. + cfi_endproc
  65736. + cfi_startproc
  65737. +
  65738. + /* The following 'ret' will pop the address of the code and jump
  65739. + to it. */
  65740. +
  65741. +L(pseudo_end):
  65742. + ret
  65743. +PSEUDO_END(__setcontext)
  65744. +
  65745. +weak_alias (__setcontext, setcontext)
  65746. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/setjmp.S uClibc-git/libc/sysdeps/linux/i386/setjmp.S
  65747. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/setjmp.S 2012-05-15 09:20:09.000000000 +0200
  65748. +++ uClibc-git/libc/sysdeps/linux/i386/setjmp.S 2014-07-25 20:36:07.053335979 +0200
  65749. @@ -13,14 +13,8 @@
  65750. Lesser General Public License for more details.
  65751. You should have received a copy of the GNU Lesser General Public
  65752. - License along with the GNU C Library; if not, write to the Free
  65753. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65754. - 02111-1307 USA. */
  65755. -
  65756. -#define _ASM
  65757. -#define _SETJMP_H
  65758. -#include <bits/setjmp.h>
  65759. -
  65760. + License along with the GNU C Library; if not, see
  65761. + <http://www.gnu.org/licenses/>. */
  65762. .global __sigsetjmp
  65763. .type __sigsetjmp,%function
  65764. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sigaction.c uClibc-git/libc/sysdeps/linux/i386/sigaction.c
  65765. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sigaction.c 2012-05-15 09:20:09.000000000 +0200
  65766. +++ uClibc-git/libc/sysdeps/linux/i386/sigaction.c 2014-07-25 20:36:07.053335979 +0200
  65767. @@ -13,8 +13,7 @@
  65768. You should have received a copy of the GNU Library General Public
  65769. License along with the GNU C Library; see the file COPYING.LIB. If not,
  65770. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  65771. - Boston, MA 02111-1307, USA.
  65772. + see <http://www.gnu.org/licenses/>.
  65773. Totally hacked up for uClibc by Erik Andersen <andersen@codepoet.org>
  65774. */
  65775. @@ -27,9 +26,6 @@
  65776. #define SA_RESTORER 0x04000000
  65777. -extern __typeof(sigaction) __libc_sigaction;
  65778. -
  65779. -
  65780. #if defined __NR_rt_sigaction
  65781. extern void restore_rt(void) __asm__ ("__restore_rt") attribute_hidden;
  65782. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/swapcontext.S uClibc-git/libc/sysdeps/linux/i386/swapcontext.S
  65783. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/swapcontext.S 1970-01-01 01:00:00.000000000 +0100
  65784. +++ uClibc-git/libc/sysdeps/linux/i386/swapcontext.S 2014-07-25 20:36:07.053335979 +0200
  65785. @@ -0,0 +1,110 @@
  65786. +/* Save current context and install the given one.
  65787. + Copyright (C) 2001-2012 Free Software Foundation, Inc.
  65788. + This file is part of the GNU C Library.
  65789. + Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
  65790. +
  65791. + The GNU C Library is free software; you can redistribute it and/or
  65792. + modify it under the terms of the GNU Lesser General Public
  65793. + License as published by the Free Software Foundation; either
  65794. + version 2.1 of the License, or (at your option) any later version.
  65795. +
  65796. + The GNU C Library is distributed in the hope that it will be useful,
  65797. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  65798. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  65799. + Lesser General Public License for more details.
  65800. +
  65801. + You should have received a copy of the GNU Lesser General Public
  65802. + License along with the GNU C Library; if not, see
  65803. + <http://www.gnu.org/licenses/>. */
  65804. +
  65805. +#include <sysdep.h>
  65806. +
  65807. +#include "ucontext_i.h"
  65808. +
  65809. +
  65810. +ENTRY(__swapcontext)
  65811. + /* Load address of the context data structure we save in. */
  65812. + movl 4(%esp), %eax
  65813. +
  65814. + /* Return value of swapcontext. EAX is the only register whose
  65815. + value is not preserved. */
  65816. + movl $0, oEAX(%eax)
  65817. +
  65818. + /* Save the 32-bit register values and the return address. */
  65819. + movl %ecx, oECX(%eax)
  65820. + movl %edx, oEDX(%eax)
  65821. + movl %edi, oEDI(%eax)
  65822. + movl %esi, oESI(%eax)
  65823. + movl %ebp, oEBP(%eax)
  65824. + movl (%esp), %ecx
  65825. + movl %ecx, oEIP(%eax)
  65826. + leal 4(%esp), %ecx
  65827. + movl %ecx, oESP(%eax)
  65828. + movl %ebx, oEBX(%eax)
  65829. +
  65830. + /* Save the FS segment register. */
  65831. + xorl %edx, %edx
  65832. + movw %fs, %dx
  65833. + movl %edx, oFS(%eax)
  65834. +
  65835. + /* We have separate floating-point register content memory on the
  65836. + stack. We use the __fpregs_mem block in the context. Set the
  65837. + links up correctly. */
  65838. + leal oFPREGSMEM(%eax), %ecx
  65839. + movl %ecx, oFPREGS(%eax)
  65840. + /* Save the floating-point context. */
  65841. + fnstenv (%ecx)
  65842. +
  65843. + /* Load address of the context data structure we have to load. */
  65844. + movl 8(%esp), %ecx
  65845. +
  65846. + /* Save the current signal mask and install the new one. */
  65847. + pushl %ebx
  65848. + leal oSIGMASK(%eax), %edx
  65849. + leal oSIGMASK(%ecx), %ecx
  65850. + movl $SIG_SETMASK, %ebx
  65851. + movl $__NR_sigprocmask, %eax
  65852. + ENTER_KERNEL
  65853. + popl %ebx
  65854. + cmpl $-4095, %eax /* Check %eax for error. */
  65855. + jae SYSCALL_ERROR_LABEL /* Jump to error handler if error. */
  65856. +
  65857. + /* EAX was modified, reload it. */
  65858. + movl 8(%esp), %eax
  65859. +
  65860. + /* Restore the floating-point context. Not the registers, only the
  65861. + rest. */
  65862. + movl oFPREGS(%eax), %ecx
  65863. + fldenv (%ecx)
  65864. +
  65865. + /* Restore the FS segment register. We don't touch the GS register
  65866. + since it is used for threads. */
  65867. + movl oFS(%eax), %edx
  65868. + movw %dx, %fs
  65869. +
  65870. + /* Fetch the address to return to. */
  65871. + movl oEIP(%eax), %ecx
  65872. +
  65873. + /* Load the new stack pointer. */
  65874. + movl oESP(%eax), %esp
  65875. +
  65876. + /* Push the return address on the new stack so we can return there. */
  65877. + pushl %ecx
  65878. +
  65879. + /* Load the values of all the 32-bit registers (except ESP).
  65880. + Since we are loading from EAX, it must be last. */
  65881. + movl oEDI(%eax), %edi
  65882. + movl oESI(%eax), %esi
  65883. + movl oEBP(%eax), %ebp
  65884. + movl oEBX(%eax), %ebx
  65885. + movl oEDX(%eax), %edx
  65886. + movl oECX(%eax), %ecx
  65887. + movl oEAX(%eax), %eax
  65888. +
  65889. + /* The following 'ret' will pop the address of the code and jump
  65890. + to it. */
  65891. +L(pseudo_end):
  65892. + ret
  65893. +PSEUDO_END(__swapcontext)
  65894. +
  65895. +weak_alias (__swapcontext, swapcontext)
  65896. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sync_file_range.S uClibc-git/libc/sysdeps/linux/i386/sync_file_range.S
  65897. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sync_file_range.S 2012-05-15 09:20:09.000000000 +0200
  65898. +++ uClibc-git/libc/sysdeps/linux/i386/sync_file_range.S 2014-07-25 20:36:07.053335979 +0200
  65899. @@ -12,9 +12,8 @@
  65900. Lesser General Public License for more details.
  65901. You should have received a copy of the GNU Lesser General Public
  65902. - License along with the GNU C Library; if not, write to the Free
  65903. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65904. - 02111-1307 USA. */
  65905. + License along with the GNU C Library; if not, see
  65906. + <http://www.gnu.org/licenses/>. */
  65907. #define _ERRNO_H 1
  65908. #include <features.h>
  65909. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/debugreg.h uClibc-git/libc/sysdeps/linux/i386/sys/debugreg.h
  65910. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/debugreg.h 2012-05-15 09:20:09.000000000 +0200
  65911. +++ uClibc-git/libc/sysdeps/linux/i386/sys/debugreg.h 2014-07-25 20:36:07.069336063 +0200
  65912. @@ -12,9 +12,8 @@
  65913. Lesser General Public License for more details.
  65914. You should have received a copy of the GNU Lesser General Public
  65915. - License along with the GNU C Library; if not, write to the Free
  65916. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65917. - 02111-1307 USA. */
  65918. + License along with the GNU C Library; if not, see
  65919. + <http://www.gnu.org/licenses/>. */
  65920. #ifndef _SYS_DEBUGREG_H
  65921. #define _SYS_DEBUGREG_H 1
  65922. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/elf.h uClibc-git/libc/sysdeps/linux/i386/sys/elf.h
  65923. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/elf.h 2012-05-15 09:20:09.000000000 +0200
  65924. +++ uClibc-git/libc/sysdeps/linux/i386/sys/elf.h 2014-07-25 20:36:07.069336063 +0200
  65925. @@ -12,9 +12,8 @@
  65926. Lesser General Public License for more details.
  65927. You should have received a copy of the GNU Lesser General Public
  65928. - License along with the GNU C Library; if not, write to the Free
  65929. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65930. - 02111-1307 USA. */
  65931. + License along with the GNU C Library; if not, see
  65932. + <http://www.gnu.org/licenses/>. */
  65933. #ifndef _SYS_ELF_H
  65934. #define _SYS_ELF_H 1
  65935. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/io.h uClibc-git/libc/sysdeps/linux/i386/sys/io.h
  65936. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/io.h 2012-05-15 09:20:09.000000000 +0200
  65937. +++ uClibc-git/libc/sysdeps/linux/i386/sys/io.h 2014-07-25 20:36:07.069336063 +0200
  65938. @@ -12,9 +12,8 @@
  65939. Lesser General Public License for more details.
  65940. You should have received a copy of the GNU Lesser General Public
  65941. - License along with the GNU C Library; if not, write to the Free
  65942. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65943. - 02111-1307 USA. */
  65944. + License along with the GNU C Library; if not, see
  65945. + <http://www.gnu.org/licenses/>. */
  65946. #ifndef _SYS_IO_H
  65947. #define _SYS_IO_H 1
  65948. @@ -33,7 +32,6 @@
  65949. E.g., Linux/Alpha for Alpha PCs supports this. */
  65950. extern int ioperm (unsigned long int __from, unsigned long int __num,
  65951. int __turn_on) __THROW;
  65952. -libc_hidden_proto(ioperm)
  65953. /* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to
  65954. access any I/O port is granted. This call requires root
  65955. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/perm.h uClibc-git/libc/sysdeps/linux/i386/sys/perm.h
  65956. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/perm.h 2012-05-15 09:20:09.000000000 +0200
  65957. +++ uClibc-git/libc/sysdeps/linux/i386/sys/perm.h 2014-07-25 20:36:07.069336063 +0200
  65958. @@ -12,9 +12,8 @@
  65959. Lesser General Public License for more details.
  65960. You should have received a copy of the GNU Lesser General Public
  65961. - License along with the GNU C Library; if not, write to the Free
  65962. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65963. - 02111-1307 USA. */
  65964. + License along with the GNU C Library; if not, see
  65965. + <http://www.gnu.org/licenses/>. */
  65966. #ifndef _SYS_PERM_H
  65967. @@ -26,7 +25,6 @@
  65968. /* Set port input/output permissions. */
  65969. extern int ioperm (unsigned long int __from, unsigned long int __num,
  65970. int __turn_on) __THROW;
  65971. -libc_hidden_proto(ioperm)
  65972. /* Change I/O privilege level. */
  65973. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/procfs.h uClibc-git/libc/sysdeps/linux/i386/sys/procfs.h
  65974. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  65975. +++ uClibc-git/libc/sysdeps/linux/i386/sys/procfs.h 2014-07-25 20:36:07.069336063 +0200
  65976. @@ -12,9 +12,8 @@
  65977. Lesser General Public License for more details.
  65978. You should have received a copy of the GNU Lesser General Public
  65979. - License along with the GNU C Library; if not, write to the Free
  65980. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65981. - 02111-1307 USA. */
  65982. + License along with the GNU C Library; if not, see
  65983. + <http://www.gnu.org/licenses/>. */
  65984. #ifndef _SYS_PROCFS_H
  65985. #define _SYS_PROCFS_H 1
  65986. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/reg.h uClibc-git/libc/sysdeps/linux/i386/sys/reg.h
  65987. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/reg.h 2012-05-15 09:20:09.000000000 +0200
  65988. +++ uClibc-git/libc/sysdeps/linux/i386/sys/reg.h 2014-07-25 20:36:07.069336063 +0200
  65989. @@ -12,9 +12,8 @@
  65990. Lesser General Public License for more details.
  65991. You should have received a copy of the GNU Lesser General Public
  65992. - License along with the GNU C Library; if not, write to the Free
  65993. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  65994. - 02111-1307 USA. */
  65995. + License along with the GNU C Library; if not, see
  65996. + <http://www.gnu.org/licenses/>. */
  65997. #ifndef _SYS_REG_H
  65998. #define _SYS_REG_H 1
  65999. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/ucontext.h uClibc-git/libc/sysdeps/linux/i386/sys/ucontext.h
  66000. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  66001. +++ uClibc-git/libc/sysdeps/linux/i386/sys/ucontext.h 2014-07-25 20:36:07.069336063 +0200
  66002. @@ -12,9 +12,8 @@
  66003. Lesser General Public License for more details.
  66004. You should have received a copy of the GNU Lesser General Public
  66005. - License along with the GNU C Library; if not, write to the Free
  66006. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66007. - 02111-1307 USA. */
  66008. + License along with the GNU C Library; if not, see
  66009. + <http://www.gnu.org/licenses/>. */
  66010. #ifndef _SYS_UCONTEXT_H
  66011. #define _SYS_UCONTEXT_H 1
  66012. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/user.h uClibc-git/libc/sysdeps/linux/i386/sys/user.h
  66013. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/user.h 2012-05-15 09:20:09.000000000 +0200
  66014. +++ uClibc-git/libc/sysdeps/linux/i386/sys/user.h 2014-07-25 20:36:07.069336063 +0200
  66015. @@ -12,9 +12,8 @@
  66016. Lesser General Public License for more details.
  66017. You should have received a copy of the GNU Lesser General Public
  66018. - License along with the GNU C Library; if not, write to the Free
  66019. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66020. - 02111-1307 USA. */
  66021. + License along with the GNU C Library; if not, see
  66022. + <http://www.gnu.org/licenses/>. */
  66023. #ifndef _SYS_USER_H
  66024. #define _SYS_USER_H 1
  66025. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/vm86.h uClibc-git/libc/sysdeps/linux/i386/sys/vm86.h
  66026. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sys/vm86.h 2012-05-15 09:20:09.000000000 +0200
  66027. +++ uClibc-git/libc/sysdeps/linux/i386/sys/vm86.h 2014-07-25 20:36:07.069336063 +0200
  66028. @@ -12,9 +12,8 @@
  66029. Lesser General Public License for more details.
  66030. You should have received a copy of the GNU Lesser General Public
  66031. - License along with the GNU C Library; if not, write to the Free
  66032. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66033. - 02111-1307 USA. */
  66034. + License along with the GNU C Library; if not, see
  66035. + <http://www.gnu.org/licenses/>. */
  66036. #ifndef _SYS_VM86_H
  66037. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/sysdep.h uClibc-git/libc/sysdeps/linux/i386/sysdep.h
  66038. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/sysdep.h 2012-05-15 09:20:09.000000000 +0200
  66039. +++ uClibc-git/libc/sysdeps/linux/i386/sysdep.h 2014-07-25 20:36:07.069336063 +0200
  66040. @@ -14,9 +14,8 @@
  66041. Lesser General Public License for more details.
  66042. You should have received a copy of the GNU Lesser General Public
  66043. - License along with the GNU C Library; if not, write to the Free
  66044. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66045. - 02111-1307 USA. */
  66046. + License along with the GNU C Library; if not, see
  66047. + <http://www.gnu.org/licenses/>. */
  66048. #ifndef _LINUX_I386_SYSDEP_H
  66049. #define _LINUX_I386_SYSDEP_H 1
  66050. @@ -44,12 +43,9 @@
  66051. incomplete stabs information. Fake some entries here which specify
  66052. the current source file. */
  66053. #define ENTRY(name) \
  66054. - STABS_CURRENT_FILE1("") \
  66055. - STABS_CURRENT_FILE(name) \
  66056. ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \
  66057. ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
  66058. .align ALIGNARG(4); \
  66059. - STABS_FUN(name) \
  66060. C_LABEL(name) \
  66061. cfi_startproc; \
  66062. CALL_MCOUNT
  66063. @@ -58,30 +54,6 @@
  66064. #define END(name) \
  66065. cfi_endproc; \
  66066. ASM_SIZE_DIRECTIVE(name) \
  66067. - STABS_FUN_END(name)
  66068. -
  66069. -#ifdef HAVE_CPP_ASM_DEBUGINFO
  66070. -/* Disable that goop, because we just pass -g through to the assembler
  66071. - and it generates proper line number information directly. */
  66072. -# define STABS_CURRENT_FILE1(name)
  66073. -# define STABS_CURRENT_FILE(name)
  66074. -# define STABS_FUN(name)
  66075. -# define STABS_FUN_END(name)
  66076. -#else
  66077. -/* Remove the following two lines once the gdb bug is fixed. */
  66078. -#define STABS_CURRENT_FILE(name) \
  66079. - STABS_CURRENT_FILE1 (#name)
  66080. -#define STABS_CURRENT_FILE1(name) \
  66081. - 1: .stabs name,100,0,0,1b;
  66082. -/* Emit stabs definition lines. We use F(0,1) and define t(0,1) as `int',
  66083. - the same way gcc does it. */
  66084. -#define STABS_FUN(name) STABS_FUN2(name, name##:F(0,1))
  66085. -#define STABS_FUN2(name, namestr) \
  66086. - .stabs "int:t(0,1)=r(0,1);-2147483648;2147483647;",128,0,0,0; \
  66087. - .stabs #namestr,36,0,0,name;
  66088. -#define STABS_FUN_END(name) \
  66089. - 1: .stabs "",36,0,0,1b-name;
  66090. -#endif
  66091. /* If compiled for profiling, call `mcount' at the start of each function. */
  66092. #ifdef PROF
  66093. @@ -150,10 +122,6 @@
  66094. #undef __i686
  66095. #endif /* __ASSEMBLER__ */
  66096. -#ifndef offsetof
  66097. -# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
  66098. -#endif
  66099. -
  66100. /* For Linux we can use the system call table in the header file
  66101. /usr/include/asm/unistd.h
  66102. of the kernel. But these symbols do not follow the SYS_* syntax
  66103. @@ -227,8 +195,6 @@
  66104. #define PSEUDO_END_ERRVAL(name) \
  66105. END (name)
  66106. -#define ret_ERRVAL ret
  66107. -
  66108. #ifndef __PIC__
  66109. # define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
  66110. #else
  66111. @@ -444,6 +410,7 @@
  66112. # define PTR_DEMANGLE(reg) rorl $9, reg; \
  66113. xorl %gs:POINTER_GUARD, reg
  66114. # else
  66115. +# include <stddef.h>
  66116. # define PTR_MANGLE(var) __asm__ ("xorl %%gs:%c2, %0\n" \
  66117. "roll $9, %0" \
  66118. : "=r" (var) \
  66119. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/ucontext_i.sym uClibc-git/libc/sysdeps/linux/i386/ucontext_i.sym
  66120. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/ucontext_i.sym 1970-01-01 01:00:00.000000000 +0100
  66121. +++ uClibc-git/libc/sysdeps/linux/i386/ucontext_i.sym 2014-07-25 20:36:07.069336063 +0200
  66122. @@ -0,0 +1,30 @@
  66123. +#include <stddef.h>
  66124. +#include <signal.h>
  66125. +#include <sys/ucontext.h>
  66126. +
  66127. +--
  66128. +
  66129. +SIG_BLOCK
  66130. +SIG_SETMASK
  66131. +
  66132. +#define ucontext(member) offsetof (ucontext_t, member)
  66133. +#define mcontext(member) ucontext (uc_mcontext.member)
  66134. +#define mreg(reg) mcontext (gregs[REG_##reg])
  66135. +
  66136. +oLINK ucontext (uc_link)
  66137. +oSS_SP ucontext (uc_stack.ss_sp)
  66138. +oSS_SIZE ucontext (uc_stack.ss_size)
  66139. +oGS mreg (GS)
  66140. +oFS mreg (FS)
  66141. +oEDI mreg (EDI)
  66142. +oESI mreg (ESI)
  66143. +oEBP mreg (EBP)
  66144. +oESP mreg (ESP)
  66145. +oEBX mreg (EBX)
  66146. +oEDX mreg (EDX)
  66147. +oECX mreg (ECX)
  66148. +oEAX mreg (EAX)
  66149. +oEIP mreg (EIP)
  66150. +oFPREGS mcontext (fpregs)
  66151. +oSIGMASK ucontext (uc_sigmask)
  66152. +oFPREGSMEM ucontext (__fpregs_mem)
  66153. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i386/vfork.S uClibc-git/libc/sysdeps/linux/i386/vfork.S
  66154. --- uClibc-0.9.33.2/libc/sysdeps/linux/i386/vfork.S 2012-05-15 09:20:09.000000000 +0200
  66155. +++ uClibc-git/libc/sysdeps/linux/i386/vfork.S 2014-07-25 20:36:07.069336063 +0200
  66156. @@ -38,4 +38,4 @@
  66157. .size __vfork,.-__vfork
  66158. weak_alias(__vfork,vfork)
  66159. -libc_hidden_weak(vfork)
  66160. +libc_hidden_def(vfork)
  66161. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i960/bits/fcntl.h uClibc-git/libc/sysdeps/linux/i960/bits/fcntl.h
  66162. --- uClibc-0.9.33.2/libc/sysdeps/linux/i960/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  66163. +++ uClibc-git/libc/sysdeps/linux/i960/bits/fcntl.h 2014-07-25 20:36:07.097336209 +0200
  66164. @@ -13,9 +13,8 @@
  66165. Lesser General Public License for more details.
  66166. You should have received a copy of the GNU Lesser General Public
  66167. - License along with the GNU C Library; if not, write to the Free
  66168. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66169. - 02111-1307 USA. */
  66170. + License along with the GNU C Library; if not, see
  66171. + <http://www.gnu.org/licenses/>. */
  66172. #ifndef _FCNTL_H
  66173. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  66174. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i960/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/i960/bits/uClibc_arch_features.h
  66175. --- uClibc-0.9.33.2/libc/sysdeps/linux/i960/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  66176. +++ uClibc-git/libc/sysdeps/linux/i960/bits/uClibc_arch_features.h 2014-07-25 20:36:07.097336209 +0200
  66177. @@ -12,8 +12,8 @@
  66178. /* can your target use syscall6() for mmap ? */
  66179. #undef __UCLIBC_MMAP_HAS_6_ARGS__
  66180. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  66181. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  66182. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  66183. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  66184. /* does your target have a broken create_module() ? */
  66185. #define __UCLIBC_BROKEN_CREATE_MODULE__
  66186. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i960/bits/wordsize.h uClibc-git/libc/sysdeps/linux/i960/bits/wordsize.h
  66187. --- uClibc-0.9.33.2/libc/sysdeps/linux/i960/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
  66188. +++ uClibc-git/libc/sysdeps/linux/i960/bits/wordsize.h 2014-07-25 20:36:07.097336209 +0200
  66189. @@ -12,8 +12,7 @@
  66190. Lesser General Public License for more details.
  66191. You should have received a copy of the GNU Lesser General Public
  66192. - License along with the GNU C Library; if not, write to the Free
  66193. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66194. - 02111-1307 USA. */
  66195. + License along with the GNU C Library; if not, see
  66196. + <http://www.gnu.org/licenses/>. */
  66197. #define __WORDSIZE 32
  66198. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i960/clone.S uClibc-git/libc/sysdeps/linux/i960/clone.S
  66199. --- uClibc-0.9.33.2/libc/sysdeps/linux/i960/clone.S 2012-05-15 09:20:09.000000000 +0200
  66200. +++ uClibc-git/libc/sysdeps/linux/i960/clone.S 2014-07-25 20:36:07.097336209 +0200
  66201. @@ -14,8 +14,7 @@
  66202. # details.
  66203. #
  66204. # You should have received a copy of the GNU Library General Public License
  66205. -# along with this program; if not, write to the Free Software Foundation, Inc.,
  66206. -# at 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  66207. +# along with this program; if not, see <http://www.gnu.org/licenses/>.
  66208. #
  66209. # Derived from an old port of uC-libc to the i960 by Keith Adams (kma@cse.ogi.edu).
  66210. #
  66211. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i960/crt0.S uClibc-git/libc/sysdeps/linux/i960/crt0.S
  66212. --- uClibc-0.9.33.2/libc/sysdeps/linux/i960/crt0.S 2012-05-15 09:20:09.000000000 +0200
  66213. +++ uClibc-git/libc/sysdeps/linux/i960/crt0.S 2014-07-25 20:36:07.097336209 +0200
  66214. @@ -14,8 +14,7 @@
  66215. # details.
  66216. #
  66217. # You should have received a copy of the GNU Library General Public License
  66218. -# along with this program; if not, write to the Free Software Foundation, Inc.,
  66219. -# at 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  66220. +# along with this program; if not, see <http://www.gnu.org/licenses/>.
  66221. #
  66222. /*
  66223. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i960/mmap.S uClibc-git/libc/sysdeps/linux/i960/mmap.S
  66224. --- uClibc-0.9.33.2/libc/sysdeps/linux/i960/mmap.S 2012-05-15 09:20:09.000000000 +0200
  66225. +++ uClibc-git/libc/sysdeps/linux/i960/mmap.S 2014-07-25 20:36:07.097336209 +0200
  66226. @@ -14,8 +14,7 @@
  66227. # details.
  66228. #
  66229. # You should have received a copy of the GNU Library General Public License
  66230. -# along with this program; if not, write to the Free Software Foundation, Inc.,
  66231. -# at 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  66232. +# along with this program; if not, see <http://www.gnu.org/licenses/>.
  66233. #
  66234. # Derived from an old port of uC-libc to the i960 by Keith Adams (kma@cse.ogi.edu).
  66235. #
  66236. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i960/setjmp.S uClibc-git/libc/sysdeps/linux/i960/setjmp.S
  66237. --- uClibc-0.9.33.2/libc/sysdeps/linux/i960/setjmp.S 2012-05-15 09:20:09.000000000 +0200
  66238. +++ uClibc-git/libc/sysdeps/linux/i960/setjmp.S 2014-07-25 20:36:07.097336209 +0200
  66239. @@ -122,3 +122,5 @@
  66240. mov 1, g0 /* return 1 by default */
  66241. 0:
  66242. ret /* return to caller of __sigsetjmp */
  66243. +
  66244. +libc_hidden_def(__longjmp)
  66245. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i960/sys/procfs.h uClibc-git/libc/sysdeps/linux/i960/sys/procfs.h
  66246. --- uClibc-0.9.33.2/libc/sysdeps/linux/i960/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  66247. +++ uClibc-git/libc/sysdeps/linux/i960/sys/procfs.h 2014-07-25 20:36:07.109336272 +0200
  66248. @@ -12,9 +12,8 @@
  66249. Lesser General Public License for more details.
  66250. You should have received a copy of the GNU Lesser General Public
  66251. - License along with the GNU C Library; if not, write to the Free
  66252. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66253. - 02111-1307 USA. */
  66254. + License along with the GNU C Library; if not, see
  66255. + <http://www.gnu.org/licenses/>. */
  66256. #ifndef _SYS_PROCFS_H
  66257. #define _SYS_PROCFS_H 1
  66258. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i960/sys/ucontext.h uClibc-git/libc/sysdeps/linux/i960/sys/ucontext.h
  66259. --- uClibc-0.9.33.2/libc/sysdeps/linux/i960/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  66260. +++ uClibc-git/libc/sysdeps/linux/i960/sys/ucontext.h 2014-07-25 20:36:07.109336272 +0200
  66261. @@ -12,9 +12,8 @@
  66262. Lesser General Public License for more details.
  66263. You should have received a copy of the GNU Lesser General Public
  66264. - License along with the GNU C Library; if not, write to the Free
  66265. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66266. - 02111-1307 USA. */
  66267. + License along with the GNU C Library; if not, see
  66268. + <http://www.gnu.org/licenses/>. */
  66269. /* Don't rely on this, the interface is currently messed up and may need to
  66270. be broken to be fixed. */
  66271. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/i960/vfork.S uClibc-git/libc/sysdeps/linux/i960/vfork.S
  66272. --- uClibc-0.9.33.2/libc/sysdeps/linux/i960/vfork.S 2012-05-15 09:20:09.000000000 +0200
  66273. +++ uClibc-git/libc/sysdeps/linux/i960/vfork.S 2014-07-25 20:36:07.109336272 +0200
  66274. @@ -18,6 +18,7 @@
  66275. .globl ___vfork
  66276. .hidden ___vfork
  66277. + .type ___vfork,@function
  66278. ___vfork:
  66279. mov g13, r3
  66280. ldconst __NR_vfork, g13
  66281. @@ -30,4 +31,4 @@
  66282. ret
  66283. weak_alias(__vfork,vfork)
  66284. -libc_hidden_weak(vfork)
  66285. +libc_hidden_def(vfork)
  66286. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/atomic.h uClibc-git/libc/sysdeps/linux/ia64/bits/atomic.h
  66287. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
  66288. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/atomic.h 2014-07-25 20:36:07.137336419 +0200
  66289. @@ -12,9 +12,8 @@
  66290. Lesser General Public License for more details.
  66291. You should have received a copy of the GNU Lesser General Public
  66292. - License along with the GNU C Library; if not, write to the Free
  66293. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66294. - 02111-1307 USA. */
  66295. + License along with the GNU C Library; if not, see
  66296. + <http://www.gnu.org/licenses/>. */
  66297. #include <stdint.h>
  66298. #include <ia64intrin.h>
  66299. @@ -92,12 +91,12 @@
  66300. do \
  66301. { \
  66302. __oldval = __val; \
  66303. - if (__builtin_expect (__val <= 0, 0)) \
  66304. + if (unlikely (__val <= 0)) \
  66305. break; \
  66306. __val = atomic_compare_and_exchange_val_acq (__memp, __oldval - 1, \
  66307. __oldval); \
  66308. } \
  66309. - while (__builtin_expect (__val != __oldval, 0)); \
  66310. + while (unlikely (__val != __oldval)); \
  66311. __oldval; })
  66312. #define atomic_bit_test_set(mem, bit) \
  66313. @@ -113,7 +112,7 @@
  66314. __oldval | __mask, \
  66315. __oldval); \
  66316. } \
  66317. - while (__builtin_expect (__val != __oldval, 0)); \
  66318. + while (unlikely (__val != __oldval)); \
  66319. __oldval & __mask; })
  66320. #define atomic_full_barrier() __sync_synchronize ()
  66321. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/byteswap.h uClibc-git/libc/sysdeps/linux/ia64/bits/byteswap.h
  66322. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/byteswap.h 2012-05-15 09:20:09.000000000 +0200
  66323. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/byteswap.h 2014-07-25 20:36:07.137336419 +0200
  66324. @@ -13,9 +13,8 @@
  66325. Lesser General Public License for more details.
  66326. You should have received a copy of the GNU Lesser General Public
  66327. - License along with the GNU C Library; if not, write to the Free
  66328. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66329. - 02111-1307 USA. */
  66330. + License along with the GNU C Library; if not, see
  66331. + <http://www.gnu.org/licenses/>. */
  66332. #ifndef _ASM_BITS_BYTESWAP_H
  66333. #define _ASM_BITS_BYTESWAP_H 1
  66334. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/fcntl.h uClibc-git/libc/sysdeps/linux/ia64/bits/fcntl.h
  66335. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  66336. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/fcntl.h 2014-07-25 20:36:07.137336419 +0200
  66337. @@ -13,9 +13,8 @@
  66338. Lesser General Public License for more details.
  66339. You should have received a copy of the GNU Lesser General Public
  66340. - License along with the GNU C Library; if not, write to the Free
  66341. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66342. - 02111-1307 USA. */
  66343. + License along with the GNU C Library; if not, see
  66344. + <http://www.gnu.org/licenses/>. */
  66345. #ifndef _FCNTL_H
  66346. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  66347. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/fenv.h uClibc-git/libc/sysdeps/linux/ia64/bits/fenv.h
  66348. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
  66349. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/fenv.h 2014-07-25 20:36:07.137336419 +0200
  66350. @@ -12,9 +12,8 @@
  66351. Lesser General Public License for more details.
  66352. You should have received a copy of the GNU Lesser General Public
  66353. - License along with the GNU C Library; if not, write to the Free
  66354. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66355. - 02111-1307 USA. */
  66356. + License along with the GNU C Library; if not, see
  66357. + <http://www.gnu.org/licenses/>. */
  66358. #ifndef _FENV_H
  66359. # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
  66360. @@ -73,15 +72,15 @@
  66361. typedef unsigned long int fenv_t;
  66362. /* If the default argument is used we use this value. */
  66363. -#define FE_DFL_ENV ((__const fenv_t *) 0xc009804c0270033fUL)
  66364. +#define FE_DFL_ENV ((const fenv_t *) 0xc009804c0270033fUL)
  66365. #ifdef __USE_GNU
  66366. /* Floating-point environment where only FE_UNNORMAL is masked since this
  66367. exception is not generally supported by glibc. */
  66368. -# define FE_NOMASK_ENV ((__const fenv_t *) 0xc009804c02700302UL)
  66369. +# define FE_NOMASK_ENV ((const fenv_t *) 0xc009804c02700302UL)
  66370. /* Floating-point environment with (processor-dependent) non-IEEE
  66371. floating point. In this case, turning on flush-to-zero mode for
  66372. s0, s2, and s3. */
  66373. -# define FE_NONIEEE_ENV ((__const fenv_t *) 0xc009a04d0270037fUL)
  66374. +# define FE_NONIEEE_ENV ((const fenv_t *) 0xc009a04d0270037fUL)
  66375. #endif
  66376. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/huge_vall.h uClibc-git/libc/sysdeps/linux/ia64/bits/huge_vall.h
  66377. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/huge_vall.h 1970-01-01 01:00:00.000000000 +0100
  66378. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/huge_vall.h 2014-07-25 20:36:07.137336419 +0200
  66379. @@ -0,0 +1,41 @@
  66380. +/* `HUGE_VALL' constant for ia64 (where it is infinity).
  66381. + Used by <stdlib.h> and <math.h> functions for overflow.
  66382. + Copyright (C) 2000, 2004 Free Software Foundation, Inc.
  66383. + This file is part of the GNU C Library.
  66384. +
  66385. + The GNU C Library is free software; you can redistribute it and/or
  66386. + modify it under the terms of the GNU Lesser General Public
  66387. + License as published by the Free Software Foundation; either
  66388. + version 2.1 of the License, or (at your option) any later version.
  66389. +
  66390. + The GNU C Library is distributed in the hope that it will be useful,
  66391. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  66392. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  66393. + Lesser General Public License for more details.
  66394. +
  66395. + You should have received a copy of the GNU Lesser General Public
  66396. + License along with the GNU C Library; if not, see
  66397. + <http://www.gnu.org/licenses/>. */
  66398. +
  66399. +#ifndef _MATH_H
  66400. +# error "Never use <bits/huge_vall.h> directly; include <math.h> instead."
  66401. +#endif
  66402. +
  66403. +#if __GNUC_PREREQ(3,3)
  66404. +# define HUGE_VALL (__builtin_huge_vall())
  66405. +#elif __GNUC_PREREQ(2,96)
  66406. +# define HUGE_VALL (__extension__ 0x1.0p32767L)
  66407. +#else
  66408. +
  66409. +# define __HUGE_VALL_bytes { 0,0,0,0,0,0,0, 0x80, 0xff, 0x7f, 0,0,0,0,0,0}
  66410. +
  66411. +# define __huge_vall_t union { unsigned char __c[16]; long double __ld; }
  66412. +# ifdef __GNUC__
  66413. +# define HUGE_VALL (__extension__ \
  66414. + ((__huge_vall_t) { __c: __HUGE_VALL_bytes }).__ld)
  66415. +# else /* Not GCC. */
  66416. +static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
  66417. +# define HUGE_VALL (__huge_vall.__ld)
  66418. +# endif /* GCC. */
  66419. +
  66420. +#endif /* GCC 2.95 */
  66421. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/ipc.h uClibc-git/libc/sysdeps/linux/ia64/bits/ipc.h
  66422. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/ipc.h 2012-05-15 09:20:09.000000000 +0200
  66423. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/ipc.h 2014-07-25 20:36:07.137336419 +0200
  66424. @@ -13,9 +13,8 @@
  66425. Lesser General Public License for more details.
  66426. You should have received a copy of the GNU Lesser General Public
  66427. - License along with the GNU C Library; if not, write to the Free
  66428. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66429. - 02111-1307 USA. */
  66430. + License along with the GNU C Library; if not, see
  66431. + <http://www.gnu.org/licenses/>. */
  66432. #ifndef _SYS_IPC_H
  66433. # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
  66434. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/ia64/bits/kernel_types.h
  66435. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
  66436. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/kernel_types.h 2014-07-25 20:36:07.137336419 +0200
  66437. @@ -52,5 +52,7 @@
  66438. typedef unsigned int __kernel_dev_t;
  66439. typedef unsigned int __kernel_old_dev_t;
  66440. +typedef long __kernel_long_t;
  66441. +typedef unsigned long __kernel_ulong_t;
  66442. #endif /* _ASM_IA64_POSIX_TYPES_H */
  66443. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/local_lim.h uClibc-git/libc/sysdeps/linux/ia64/bits/local_lim.h
  66444. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/local_lim.h 1970-01-01 01:00:00.000000000 +0100
  66445. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/local_lim.h 2014-07-25 20:36:07.137336419 +0200
  66446. @@ -0,0 +1,99 @@
  66447. +/* Minimum guaranteed maximum values for system limits. Linux/IA-64 version.
  66448. + Copyright (C) 1993-1998,2000,2002-2004,2008 Free Software Foundation, Inc.
  66449. + This file is part of the GNU C Library.
  66450. +
  66451. + The GNU C Library is free software; you can redistribute it and/or
  66452. + modify it under the terms of the GNU Library General Public License as
  66453. + published by the Free Software Foundation; either version 2 of the
  66454. + License, or (at your option) any later version.
  66455. +
  66456. + The GNU C Library is distributed in the hope that it will be useful,
  66457. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  66458. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  66459. + Library General Public License for more details.
  66460. +
  66461. + You should have received a copy of the GNU Library General Public
  66462. + License along with the GNU C Library; see the file COPYING.LIB. If not,
  66463. + see <http://www.gnu.org/licenses/>. */
  66464. +
  66465. +/* The kernel header pollutes the namespace with the NR_OPEN symbol
  66466. + and defines LINK_MAX although filesystems have different maxima. A
  66467. + similar thing is true for OPEN_MAX: the limit can be changed at
  66468. + runtime and therefore the macro must not be defined. Remove this
  66469. + after including the header if necessary. */
  66470. +#ifndef NR_OPEN
  66471. +# define __undef_NR_OPEN
  66472. +#endif
  66473. +#ifndef LINK_MAX
  66474. +# define __undef_LINK_MAX
  66475. +#endif
  66476. +#ifndef OPEN_MAX
  66477. +# define __undef_OPEN_MAX
  66478. +#endif
  66479. +#ifndef ARG_MAX
  66480. +# define __undef_ARG_MAX
  66481. +#endif
  66482. +
  66483. +/* The kernel sources contain a file with all the needed information. */
  66484. +#include <linux/limits.h>
  66485. +
  66486. +/* Have to remove NR_OPEN? */
  66487. +#ifdef __undef_NR_OPEN
  66488. +# undef NR_OPEN
  66489. +# undef __undef_NR_OPEN
  66490. +#endif
  66491. +/* Have to remove LINK_MAX? */
  66492. +#ifdef __undef_LINK_MAX
  66493. +# undef LINK_MAX
  66494. +# undef __undef_LINK_MAX
  66495. +#endif
  66496. +/* Have to remove OPEN_MAX? */
  66497. +#ifdef __undef_OPEN_MAX
  66498. +# undef OPEN_MAX
  66499. +# undef __undef_OPEN_MAX
  66500. +#endif
  66501. +/* Have to remove ARG_MAX? */
  66502. +#ifdef __undef_ARG_MAX
  66503. +# undef ARG_MAX
  66504. +# undef __undef_ARG_MAX
  66505. +#endif
  66506. +
  66507. +/* The number of data keys per process. */
  66508. +#define _POSIX_THREAD_KEYS_MAX 128
  66509. +/* This is the value this implementation supports. */
  66510. +#define PTHREAD_KEYS_MAX 1024
  66511. +
  66512. +/* Controlling the iterations of destructors for thread-specific data. */
  66513. +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
  66514. +/* Number of iterations this implementation does. */
  66515. +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
  66516. +
  66517. +/* The number of threads per process. */
  66518. +#define _POSIX_THREAD_THREADS_MAX 64
  66519. +/* We have no predefined limit on the number of threads. */
  66520. +#undef PTHREAD_THREADS_MAX
  66521. +
  66522. +/* Maximum amount by which a process can descrease its asynchronous I/O
  66523. + priority level. */
  66524. +#define AIO_PRIO_DELTA_MAX 20
  66525. +
  66526. +/* Minimum size for a thread. We are free to choose a reasonable value. */
  66527. +#define PTHREAD_STACK_MIN 196608
  66528. +
  66529. +/* Maximum number of timer expiration overruns. */
  66530. +#define DELAYTIMER_MAX 2147483647
  66531. +
  66532. +/* Maximum tty name length. */
  66533. +#define TTY_NAME_MAX 32
  66534. +
  66535. +/* Maximum login name length. This is arbitrary. */
  66536. +#define LOGIN_NAME_MAX 256
  66537. +
  66538. +/* Maximum host name length. */
  66539. +#define HOST_NAME_MAX 64
  66540. +
  66541. +/* Maximum message queue priority level. */
  66542. +#define MQ_PRIO_MAX 32768
  66543. +
  66544. +/* Maximum value the semaphore can have. */
  66545. +#define SEM_VALUE_MAX (2147483647)
  66546. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/mathdef.h uClibc-git/libc/sysdeps/linux/ia64/bits/mathdef.h
  66547. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
  66548. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/mathdef.h 2014-07-25 20:36:07.137336419 +0200
  66549. @@ -12,9 +12,8 @@
  66550. Lesser General Public License for more details.
  66551. You should have received a copy of the GNU Lesser General Public
  66552. - License along with the GNU C Library; if not, write to the Free
  66553. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66554. - 02111-1307 USA. */
  66555. + License along with the GNU C Library; if not, see
  66556. + <http://www.gnu.org/licenses/>. */
  66557. #if !defined _MATH_H && !defined _COMPLEX_H
  66558. # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
  66559. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/mathinline.h uClibc-git/libc/sysdeps/linux/ia64/bits/mathinline.h
  66560. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/mathinline.h 2012-05-15 09:20:09.000000000 +0200
  66561. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/mathinline.h 2014-07-25 20:36:07.137336419 +0200
  66562. @@ -13,9 +13,8 @@
  66563. Lesser General Public License for more details.
  66564. You should have received a copy of the GNU Lesser General Public
  66565. - License along with the GNU C Library; if not, write to the Free
  66566. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66567. - 02111-1307 USA. */
  66568. + License along with the GNU C Library; if not, see
  66569. + <http://www.gnu.org/licenses/>. */
  66570. #ifndef _MATH_H
  66571. # error "Never use <bits/mathinline.h> directly; include <math.h> instead."
  66572. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/msq.h uClibc-git/libc/sysdeps/linux/ia64/bits/msq.h
  66573. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/msq.h 2012-05-15 09:20:09.000000000 +0200
  66574. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/msq.h 2014-07-25 20:36:07.137336419 +0200
  66575. @@ -13,9 +13,8 @@
  66576. Lesser General Public License for more details.
  66577. You should have received a copy of the GNU Lesser General Public
  66578. - License along with the GNU C Library; if not, write to the Free
  66579. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66580. - 02111-1307 USA. */
  66581. + License along with the GNU C Library; if not, see
  66582. + <http://www.gnu.org/licenses/>. */
  66583. #ifndef _SYS_MSG_H
  66584. #error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
  66585. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/sem.h uClibc-git/libc/sysdeps/linux/ia64/bits/sem.h
  66586. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/sem.h 2012-05-15 09:20:09.000000000 +0200
  66587. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/sem.h 2014-07-25 20:36:07.137336419 +0200
  66588. @@ -14,9 +14,8 @@
  66589. Lesser General Public License for more details.
  66590. You should have received a copy of the GNU Lesser General Public
  66591. - License along with the GNU C Library; if not, write to the Free
  66592. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66593. - 02111-1307 USA. */
  66594. + License along with the GNU C Library; if not, see
  66595. + <http://www.gnu.org/licenses/>. */
  66596. #ifndef _SYS_SEM_H
  66597. # error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
  66598. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/setjmp.h uClibc-git/libc/sysdeps/linux/ia64/bits/setjmp.h
  66599. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  66600. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/setjmp.h 2014-07-25 20:36:07.137336419 +0200
  66601. @@ -1,5 +1,5 @@
  66602. /* Define the machine-dependent type `jmp_buf'. Linux/IA-64 version.
  66603. - Copyright (C) 1999, 2000, 2003 Free Software Foundation, Inc.
  66604. + Copyright (C) 1999,2000,2003,2005,2006 Free Software Foundation, Inc.
  66605. This file is part of the GNU C Library.
  66606. Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
  66607. @@ -14,9 +14,8 @@
  66608. Lesser General Public License for more details.
  66609. You should have received a copy of the GNU Lesser General Public
  66610. - License along with the GNU C Library; if not, write to the Free
  66611. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66612. - 02111-1307 USA. */
  66613. + License along with the GNU C Library; if not, see
  66614. + <http://www.gnu.org/licenses/>. */
  66615. #ifndef _BITS_SETJMP_H
  66616. #define _BITS_SETJMP_H 1
  66617. @@ -32,9 +31,4 @@
  66618. /* the __jmp_buf element type should be __float80 per ABI... */
  66619. typedef long __jmp_buf[_JBLEN] __attribute__ ((aligned (16))); /* guarantees 128-bit alignment! */
  66620. -/* Test if longjmp to JMPBUF would unwind the frame containing a local
  66621. - variable at ADDRESS. */
  66622. -#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
  66623. - ((void *)(_address) < (void *)(((long *)_jmpbuf)[0]))
  66624. -
  66625. #endif /* bits/setjmp.h */
  66626. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/shm.h uClibc-git/libc/sysdeps/linux/ia64/bits/shm.h
  66627. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
  66628. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/shm.h 2014-07-25 20:36:07.137336419 +0200
  66629. @@ -12,9 +12,8 @@
  66630. Lesser General Public License for more details.
  66631. You should have received a copy of the GNU Lesser General Public
  66632. - License along with the GNU C Library; if not, write to the Free
  66633. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66634. - 02111-1307 USA. */
  66635. + License along with the GNU C Library; if not, see
  66636. + <http://www.gnu.org/licenses/>. */
  66637. #ifndef _SYS_SHM_H
  66638. # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
  66639. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/sigaction.h uClibc-git/libc/sysdeps/linux/ia64/bits/sigaction.h
  66640. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/sigaction.h 2012-05-15 09:20:09.000000000 +0200
  66641. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/sigaction.h 2014-07-25 20:36:07.137336419 +0200
  66642. @@ -13,9 +13,8 @@
  66643. Lesser General Public License for more details.
  66644. You should have received a copy of the GNU Lesser General Public
  66645. - License along with the GNU C Library; if not, write to the Free
  66646. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66647. - 02111-1307 USA. */
  66648. + License along with the GNU C Library; if not, see
  66649. + <http://www.gnu.org/licenses/>. */
  66650. #ifndef _SIGNAL_H
  66651. # error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
  66652. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/sigcontext.h uClibc-git/libc/sysdeps/linux/ia64/bits/sigcontext.h
  66653. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/sigcontext.h 2012-05-15 09:20:09.000000000 +0200
  66654. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/sigcontext.h 2014-07-25 20:36:07.137336419 +0200
  66655. @@ -14,9 +14,8 @@
  66656. Lesser General Public License for more details.
  66657. You should have received a copy of the GNU Lesser General Public
  66658. - License along with the GNU C Library; if not, write to the Free
  66659. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66660. - 02111-1307 USA. */
  66661. + License along with the GNU C Library; if not, see
  66662. + <http://www.gnu.org/licenses/>. */
  66663. #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
  66664. # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
  66665. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/siginfo.h uClibc-git/libc/sysdeps/linux/ia64/bits/siginfo.h
  66666. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/siginfo.h 2012-05-15 09:20:09.000000000 +0200
  66667. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/siginfo.h 2014-07-25 20:36:07.141336440 +0200
  66668. @@ -14,9 +14,8 @@
  66669. Lesser General Public License for more details.
  66670. You should have received a copy of the GNU Lesser General Public
  66671. - License along with the GNU C Library; if not, write to the Free
  66672. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66673. - 02111-1307 USA. */
  66674. + License along with the GNU C Library; if not, see
  66675. + <http://www.gnu.org/licenses/>. */
  66676. #if !defined _SIGNAL_H && !defined __need_siginfo_t \
  66677. && !defined __need_sigevent_t
  66678. @@ -298,7 +297,11 @@
  66679. /* Structure to transport application-defined values with signals. */
  66680. # define __SIGEV_MAX_SIZE 64
  66681. -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
  66682. +# if __WORDSIZE == 64
  66683. +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
  66684. +# else
  66685. +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
  66686. +# endif
  66687. typedef struct sigevent
  66688. {
  66689. @@ -310,6 +313,10 @@
  66690. {
  66691. int _pad[__SIGEV_PAD_SIZE];
  66692. + /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the
  66693. + thread to receive the signal. */
  66694. + __pid_t _tid;
  66695. +
  66696. struct
  66697. {
  66698. void (*_function) (sigval_t); /* Function to start. */
  66699. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/sigstack.h uClibc-git/libc/sysdeps/linux/ia64/bits/sigstack.h
  66700. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/sigstack.h 2012-05-15 09:20:09.000000000 +0200
  66701. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/sigstack.h 2014-07-25 20:36:07.141336440 +0200
  66702. @@ -13,9 +13,8 @@
  66703. Lesser General Public License for more details.
  66704. You should have received a copy of the GNU Lesser General Public
  66705. - License along with the GNU C Library; if not, write to the Free
  66706. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66707. - 02111-1307 USA. */
  66708. + License along with the GNU C Library; if not, see
  66709. + <http://www.gnu.org/licenses/>. */
  66710. #ifndef _SIGNAL_H
  66711. # error "Never include this file directly. Use <signal.h> instead"
  66712. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/ia64/bits/stackinfo.h
  66713. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  66714. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/stackinfo.h 2014-07-25 20:36:07.141336440 +0200
  66715. @@ -12,9 +12,8 @@
  66716. Lesser General Public License for more details.
  66717. You should have received a copy of the GNU Lesser General Public
  66718. - License along with the GNU C Library; if not, write to the Free
  66719. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66720. - 02111-1307 USA. */
  66721. + License along with the GNU C Library; if not, see
  66722. + <http://www.gnu.org/licenses/>. */
  66723. /* This file contains a bit of information about the stack allocation
  66724. of the processor. */
  66725. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/stat.h uClibc-git/libc/sysdeps/linux/ia64/bits/stat.h
  66726. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
  66727. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/stat.h 2014-07-25 20:36:07.141336440 +0200
  66728. @@ -12,9 +12,8 @@
  66729. Lesser General Public License for more details.
  66730. You should have received a copy of the GNU Lesser General Public
  66731. - License along with the GNU C Library; if not, write to the Free
  66732. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66733. - 02111-1307 USA. */
  66734. + License along with the GNU C Library; if not, see
  66735. + <http://www.gnu.org/licenses/>. */
  66736. #ifndef _SYS_STAT_H
  66737. # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
  66738. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/syscalls.h uClibc-git/libc/sysdeps/linux/ia64/bits/syscalls.h
  66739. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/syscalls.h 2012-05-15 09:20:09.000000000 +0200
  66740. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/syscalls.h 2014-07-25 20:36:07.141336440 +0200
  66741. @@ -15,9 +15,8 @@
  66742. Lesser General Public License for more details.
  66743. You should have received a copy of the GNU Lesser General Public
  66744. - License along with the GNU C Library; if not, write to the Free
  66745. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66746. - 02111-1307 USA. */
  66747. + License along with the GNU C Library; if not, see
  66748. + <http://www.gnu.org/licenses/>. */
  66749. #ifndef _BITS_SYSCALLS_H
  66750. #define _BITS_SYSCALLS_H
  66751. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/ia64/bits/uClibc_arch_features.h
  66752. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  66753. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/uClibc_arch_features.h 2014-07-25 20:36:07.141336440 +0200
  66754. @@ -11,8 +11,8 @@
  66755. /* can your target use syscall6() for mmap ? */
  66756. #define __UCLIBC_MMAP_HAS_6_ARGS__
  66757. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  66758. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  66759. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  66760. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  66761. /* does your target have a broken create_module() ? */
  66762. #undef __UCLIBC_BROKEN_CREATE_MODULE__
  66763. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/wordsize.h uClibc-git/libc/sysdeps/linux/ia64/bits/wordsize.h
  66764. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
  66765. +++ uClibc-git/libc/sysdeps/linux/ia64/bits/wordsize.h 2014-07-25 20:36:07.141336440 +0200
  66766. @@ -12,8 +12,7 @@
  66767. Lesser General Public License for more details.
  66768. You should have received a copy of the GNU Lesser General Public
  66769. - License along with the GNU C Library; if not, write to the Free
  66770. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66771. - 02111-1307 USA. */
  66772. + License along with the GNU C Library; if not, see
  66773. + <http://www.gnu.org/licenses/>. */
  66774. #define __WORDSIZE 64
  66775. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/brk.S uClibc-git/libc/sysdeps/linux/ia64/brk.S
  66776. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/brk.S 2012-05-15 09:20:09.000000000 +0200
  66777. +++ uClibc-git/libc/sysdeps/linux/ia64/brk.S 2014-07-25 20:36:07.141336440 +0200
  66778. @@ -15,9 +15,8 @@
  66779. Lesser General Public License for more details.
  66780. You should have received a copy of the GNU Lesser General Public
  66781. - License along with the GNU C Library; if not, write to the Free
  66782. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66783. - 02111-1307 USA. */
  66784. + License along with the GNU C Library; if not, see
  66785. + <http://www.gnu.org/licenses/>. */
  66786. #include "sysdep.h"
  66787. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/clone2.S uClibc-git/libc/sysdeps/linux/ia64/clone2.S
  66788. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/clone2.S 2012-05-15 09:20:09.000000000 +0200
  66789. +++ uClibc-git/libc/sysdeps/linux/ia64/clone2.S 2014-07-25 20:36:07.141336440 +0200
  66790. @@ -12,9 +12,8 @@
  66791. Lesser General Public License for more details.
  66792. You should have received a copy of the GNU Lesser General Public
  66793. - License along with the GNU C Library; if not, write to the Free
  66794. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66795. - 02111-1307 USA. */
  66796. + License along with the GNU C Library; if not, see
  66797. + <http://www.gnu.org/licenses/>. */
  66798. #include "sysdep.h"
  66799. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/crt1.S uClibc-git/libc/sysdeps/linux/ia64/crt1.S
  66800. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/crt1.S 2012-05-15 09:20:09.000000000 +0200
  66801. +++ uClibc-git/libc/sysdeps/linux/ia64/crt1.S 2014-07-25 20:36:07.141336440 +0200
  66802. @@ -30,9 +30,8 @@
  66803. Lesser General Public License for more details.
  66804. You should have received a copy of the GNU Lesser General Public
  66805. - License along with the GNU C Library; if not, write to the Free
  66806. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66807. - 02111-1307 USA. */
  66808. + License along with the GNU C Library; if not, see
  66809. + <http://www.gnu.org/licenses/>. */
  66810. #define __ASSEMBLY__
  66811. #include "sysdep.h"
  66812. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/fork.S uClibc-git/libc/sysdeps/linux/ia64/fork.S
  66813. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/fork.S 2012-05-15 09:20:09.000000000 +0200
  66814. +++ uClibc-git/libc/sysdeps/linux/ia64/fork.S 2014-07-25 20:36:07.145336461 +0200
  66815. @@ -12,9 +12,8 @@
  66816. Lesser General Public License for more details.
  66817. You should have received a copy of the GNU Lesser General Public
  66818. - License along with the GNU C Library; if not, write to the Free
  66819. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66820. - 02111-1307 USA. */
  66821. + License along with the GNU C Library; if not, see
  66822. + <http://www.gnu.org/licenses/>. */
  66823. #include "sysdep.h"
  66824. @@ -24,7 +23,10 @@
  66825. /* pid_t fork(void); */
  66826. /* Implemented as a clone system call with parameters SIGCHLD and 0 */
  66827. -ENTRY(__libc_fork)
  66828. +#ifdef __UCLIBC_HAS_THREADS__
  66829. +.weak fork
  66830. +#endif
  66831. +ENTRY(fork)
  66832. alloc r2=ar.pfs,0,0,2,0
  66833. mov out0=SIGCHLD /* Return SIGCHLD when child finishes */
  66834. /* no other clone flags; nothing shared */
  66835. @@ -34,9 +36,8 @@
  66836. cmp.eq p6,p0=-1,r10
  66837. (p6) br.cond.spnt.few __syscall_error
  66838. ret
  66839. -PSEUDO_END(__libc_fork)
  66840. -
  66841. -weak_alias (__libc_fork, __fork)
  66842. -libc_hidden_def (__fork)
  66843. -weak_alias (__libc_fork, fork)
  66844. -libc_hidden_weak (fork)
  66845. +PSEUDO_END(fork)
  66846. +#ifdef __UCLIBC_HAS_THREADS__
  66847. +strong_alias(fork,__libc_fork)
  66848. +#endif
  66849. +libc_hidden_def(fork)
  66850. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/ia64/jmpbuf-unwind.h
  66851. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  66852. +++ uClibc-git/libc/sysdeps/linux/ia64/jmpbuf-unwind.h 2014-07-25 20:36:07.145336461 +0200
  66853. @@ -0,0 +1,11 @@
  66854. +/*
  66855. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  66856. + *
  66857. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  66858. + */
  66859. +#include <setjmp.h>
  66860. +
  66861. +/* Test if longjmp to JMPBUF would unwind the frame containing a local
  66862. + variable at ADDRESS. */
  66863. +#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
  66864. + ((void *)(_address) < (void *)(((long *)_jmpbuf)[0]))
  66865. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/__longjmp.S uClibc-git/libc/sysdeps/linux/ia64/__longjmp.S
  66866. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
  66867. +++ uClibc-git/libc/sysdeps/linux/ia64/__longjmp.S 2014-07-25 20:36:07.125336356 +0200
  66868. @@ -12,9 +12,8 @@
  66869. Lesser General Public License for more details.
  66870. You should have received a copy of the GNU Lesser General Public
  66871. - License along with the GNU C Library; if not, write to the Free
  66872. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66873. - 02111-1307 USA.
  66874. + License along with the GNU C Library; if not, see
  66875. + <http://www.gnu.org/licenses/>.
  66876. Note that __sigsetjmp() did NOT flush the register stack. Instead,
  66877. we do it here since __longjmp() is usually much less frequently
  66878. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/Makefile.arch uClibc-git/libc/sysdeps/linux/ia64/Makefile.arch
  66879. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
  66880. +++ uClibc-git/libc/sysdeps/linux/ia64/Makefile.arch 2014-07-25 20:36:07.125336356 +0200
  66881. @@ -5,8 +5,8 @@
  66882. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  66883. #
  66884. -CSRC := __syscall_error.c
  66885. +CSRC-y := __syscall_error.c
  66886. -SSRC := \
  66887. +SSRC-y := \
  66888. __longjmp.S brk.S bsd-setjmp.S bsd-_setjmp.S clone2.S fork.S \
  66889. pipe.S setjmp.S syscall.S vfork.S
  66890. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/pipe.S uClibc-git/libc/sysdeps/linux/ia64/pipe.S
  66891. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/pipe.S 2012-05-15 09:20:09.000000000 +0200
  66892. +++ uClibc-git/libc/sysdeps/linux/ia64/pipe.S 2014-07-25 20:36:07.145336461 +0200
  66893. @@ -13,9 +13,8 @@
  66894. Lesser General Public License for more details.
  66895. You should have received a copy of the GNU Lesser General Public
  66896. - License along with the GNU C Library; if not, write to the Free
  66897. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66898. - 02111-1307 USA. */
  66899. + License along with the GNU C Library; if not, see
  66900. + <http://www.gnu.org/licenses/>. */
  66901. /* __pipe is a special syscall since it returns two values. */
  66902. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/setjmp.S uClibc-git/libc/sysdeps/linux/ia64/setjmp.S
  66903. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/setjmp.S 2012-05-15 09:20:09.000000000 +0200
  66904. +++ uClibc-git/libc/sysdeps/linux/ia64/setjmp.S 2014-07-25 20:36:07.145336461 +0200
  66905. @@ -13,9 +13,8 @@
  66906. Lesser General Public License for more details.
  66907. You should have received a copy of the GNU Lesser General Public
  66908. - License along with the GNU C Library; if not, write to the Free
  66909. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66910. - 02111-1307 USA.
  66911. + License along with the GNU C Library; if not, see
  66912. + <http://www.gnu.org/licenses/>.
  66913. The layout of the jmp_buf is as follows. This is subject to change
  66914. and user-code should never depend on the particular layout of
  66915. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sys/io.h uClibc-git/libc/sysdeps/linux/ia64/sys/io.h
  66916. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sys/io.h 2012-05-15 09:20:09.000000000 +0200
  66917. +++ uClibc-git/libc/sysdeps/linux/ia64/sys/io.h 2014-07-25 20:36:07.165336566 +0200
  66918. @@ -13,9 +13,8 @@
  66919. Lesser General Public License for more details.
  66920. You should have received a copy of the GNU Lesser General Public
  66921. - License along with the GNU C Library; if not, write to the Free
  66922. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66923. - 02111-1307 USA. */
  66924. + License along with the GNU C Library; if not, see
  66925. + <http://www.gnu.org/licenses/>. */
  66926. #ifndef _SYS_IO_H
  66927. #define _SYS_IO_H 1
  66928. @@ -24,6 +23,7 @@
  66929. __BEGIN_DECLS
  66930. +#if defined __UCLIBC_LINUX_SPECIFIC__
  66931. /* If TURN_ON is TRUE, request for permission to do direct i/o on the
  66932. port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
  66933. permission off for that range. This call requires root privileges.
  66934. @@ -33,12 +33,12 @@
  66935. E.g., Linux/Alpha for Alpha PCs supports this. */
  66936. extern int ioperm (unsigned long int __from, unsigned long int __num,
  66937. int __turn_on);
  66938. -libc_hidden_proto(ioperm)
  66939. /* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to
  66940. access any I/O port is granted. This call requires root
  66941. privileges. */
  66942. extern int iopl (int __level);
  66943. +#endif /* __UCLIBC_LINUX_SPECIFIC__ */
  66944. extern unsigned int _inb (unsigned long int __port);
  66945. extern unsigned int _inb (unsigned long int __port);
  66946. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sys/procfs.h uClibc-git/libc/sysdeps/linux/ia64/sys/procfs.h
  66947. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  66948. +++ uClibc-git/libc/sysdeps/linux/ia64/sys/procfs.h 2014-07-25 20:36:07.165336566 +0200
  66949. @@ -12,9 +12,8 @@
  66950. Lesser General Public License for more details.
  66951. You should have received a copy of the GNU Lesser General Public
  66952. - License along with the GNU C Library; if not, write to the Free
  66953. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66954. - 02111-1307 USA. */
  66955. + License along with the GNU C Library; if not, see
  66956. + <http://www.gnu.org/licenses/>. */
  66957. #ifndef _SYS_PROCFS_H
  66958. #define _SYS_PROCFS_H 1
  66959. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sys/ptrace.h uClibc-git/libc/sysdeps/linux/ia64/sys/ptrace.h
  66960. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sys/ptrace.h 2012-05-15 09:20:09.000000000 +0200
  66961. +++ uClibc-git/libc/sysdeps/linux/ia64/sys/ptrace.h 2014-07-25 20:36:07.165336566 +0200
  66962. @@ -13,9 +13,8 @@
  66963. Lesser General Public License for more details.
  66964. You should have received a copy of the GNU Lesser General Public
  66965. - License along with the GNU C Library; if not, write to the Free
  66966. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66967. - 02111-1307 USA. */
  66968. + License along with the GNU C Library; if not, see
  66969. + <http://www.gnu.org/licenses/>. */
  66970. #ifndef _SYS_PTRACE_H
  66971. #define _SYS_PTRACE_H 1
  66972. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sys/ucontext.h uClibc-git/libc/sysdeps/linux/ia64/sys/ucontext.h
  66973. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  66974. +++ uClibc-git/libc/sysdeps/linux/ia64/sys/ucontext.h 2014-07-25 20:36:07.165336566 +0200
  66975. @@ -12,9 +12,8 @@
  66976. Lesser General Public License for more details.
  66977. You should have received a copy of the GNU Lesser General Public
  66978. - License along with the GNU C Library; if not, write to the Free
  66979. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66980. - 02111-1307 USA. */
  66981. + License along with the GNU C Library; if not, see
  66982. + <http://www.gnu.org/licenses/>. */
  66983. #ifndef _SYS_UCONTEXT_H
  66984. #define _SYS_UCONTEXT_H 1
  66985. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sys/user.h uClibc-git/libc/sysdeps/linux/ia64/sys/user.h
  66986. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sys/user.h 2012-05-15 09:20:09.000000000 +0200
  66987. +++ uClibc-git/libc/sysdeps/linux/ia64/sys/user.h 2014-07-25 20:36:07.165336566 +0200
  66988. @@ -12,9 +12,8 @@
  66989. Lesser General Public License for more details.
  66990. You should have received a copy of the GNU Lesser General Public
  66991. - License along with the GNU C Library; if not, write to the Free
  66992. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  66993. - 02111-1307 USA. */
  66994. + License along with the GNU C Library; if not, see
  66995. + <http://www.gnu.org/licenses/>. */
  66996. #ifndef _SYS_USER_H
  66997. #define _SYS_USER_H 1
  66998. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/syscall.S uClibc-git/libc/sysdeps/linux/ia64/syscall.S
  66999. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/syscall.S 2012-05-15 09:20:09.000000000 +0200
  67000. +++ uClibc-git/libc/sysdeps/linux/ia64/syscall.S 2014-07-25 20:36:07.165336566 +0200
  67001. @@ -13,9 +13,8 @@
  67002. Lesser General Public License for more details.
  67003. You should have received a copy of the GNU Lesser General Public
  67004. - License along with the GNU C Library; if not, write to the Free
  67005. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  67006. - 02111-1307 USA. */
  67007. + License along with the GNU C Library; if not, see
  67008. + <http://www.gnu.org/licenses/>. */
  67009. #include "sysdep.h"
  67010. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sysdep.h uClibc-git/libc/sysdeps/linux/ia64/sysdep.h
  67011. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/sysdep.h 2012-05-15 09:20:09.000000000 +0200
  67012. +++ uClibc-git/libc/sysdeps/linux/ia64/sysdep.h 2014-07-25 20:36:07.165336566 +0200
  67013. @@ -14,13 +14,13 @@
  67014. Lesser General Public License for more details.
  67015. You should have received a copy of the GNU Lesser General Public
  67016. - License along with the GNU C Library; if not, write to the Free
  67017. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  67018. - 02111-1307 USA. */
  67019. + License along with the GNU C Library; if not, see
  67020. + <http://www.gnu.org/licenses/>. */
  67021. #ifndef _LINUX_IA64_SYSDEP_H
  67022. #define _LINUX_IA64_SYSDEP_H 1
  67023. +#include <common/sysdep.h>
  67024. #include <features.h>
  67025. #include <asm/unistd.h>
  67026. @@ -49,6 +49,15 @@
  67027. C_LABEL(name) \
  67028. CALL_MCOUNT
  67029. +#define HIDDEN_ENTRY(name) \
  67030. + .text; \
  67031. + .align 32; \
  67032. + .proc C_SYMBOL_NAME(name); \
  67033. + .global C_SYMBOL_NAME(name); \
  67034. + .hidden C_SYMBOL_NAME(name); \
  67035. + C_LABEL(name) \
  67036. + CALL_MCOUNT
  67037. +
  67038. #define LEAF(name) \
  67039. .text; \
  67040. .align 32; \
  67041. @@ -161,7 +170,6 @@
  67042. #define ret br.ret.sptk.few b0
  67043. #define ret_NOERRNO ret
  67044. -#define ret_ERRVAL ret
  67045. #endif /* not __ASSEMBLER__ */
  67046. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/ia64/vfork.S uClibc-git/libc/sysdeps/linux/ia64/vfork.S
  67047. --- uClibc-0.9.33.2/libc/sysdeps/linux/ia64/vfork.S 2012-05-15 09:20:09.000000000 +0200
  67048. +++ uClibc-git/libc/sysdeps/linux/ia64/vfork.S 2014-07-25 20:36:07.165336566 +0200
  67049. @@ -12,9 +12,8 @@
  67050. Lesser General Public License for more details.
  67051. You should have received a copy of the GNU Lesser General Public
  67052. - License along with the GNU C Library; if not, write to the Free
  67053. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  67054. - 02111-1307 USA. */
  67055. + License along with the GNU C Library; if not, see
  67056. + <http://www.gnu.org/licenses/>. */
  67057. #include "sysdep.h"
  67058. @@ -29,7 +28,7 @@
  67059. /* pid_t vfork(void); */
  67060. /* Implemented as __clone_syscall(CLONE_VFORK | CLONE_VM | SIGCHLD, 0) */
  67061. -ENTRY(__vfork)
  67062. +HIDDEN_ENTRY(__vfork)
  67063. alloc r2=ar.pfs,0,0,2,0
  67064. mov out0=CLONE_VM+CLONE_VFORK+SIGCHLD
  67065. mov out1=0 /* Standard sp value. */
  67066. @@ -41,4 +40,4 @@
  67067. PSEUDO_END(__vfork)
  67068. weak_alias(__vfork,vfork)
  67069. -libc_hidden_weak(vfork)
  67070. +libc_hidden_def(vfork)
  67071. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/byteswap.h uClibc-git/libc/sysdeps/linux/m68k/bits/byteswap.h
  67072. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/byteswap.h 2012-05-15 09:20:09.000000000 +0200
  67073. +++ uClibc-git/libc/sysdeps/linux/m68k/bits/byteswap.h 2014-07-25 20:36:07.189336691 +0200
  67074. @@ -13,9 +13,8 @@
  67075. Lesser General Public License for more details.
  67076. You should have received a copy of the GNU Lesser General Public
  67077. - License along with the GNU C Library; if not, write to the Free
  67078. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  67079. - 02111-1307 USA. */
  67080. + License along with the GNU C Library; if not, see
  67081. + <http://www.gnu.org/licenses/>. */
  67082. #ifndef _ASM_BITS_BYTESWAP_H
  67083. #define _ASM_BITS_BYTESWAP_H 1
  67084. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/fcntl.h uClibc-git/libc/sysdeps/linux/m68k/bits/fcntl.h
  67085. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  67086. +++ uClibc-git/libc/sysdeps/linux/m68k/bits/fcntl.h 2014-07-25 20:36:07.189336691 +0200
  67087. @@ -13,9 +13,8 @@
  67088. Lesser General Public License for more details.
  67089. You should have received a copy of the GNU Lesser General Public
  67090. - License along with the GNU C Library; if not, write to the Free
  67091. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  67092. - 02111-1307 USA. */
  67093. + License along with the GNU C Library; if not, see
  67094. + <http://www.gnu.org/licenses/>. */
  67095. #ifndef _FCNTL_H
  67096. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  67097. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/fenv.h uClibc-git/libc/sysdeps/linux/m68k/bits/fenv.h
  67098. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
  67099. +++ uClibc-git/libc/sysdeps/linux/m68k/bits/fenv.h 2014-07-25 20:36:07.189336691 +0200
  67100. @@ -12,9 +12,8 @@
  67101. Lesser General Public License for more details.
  67102. You should have received a copy of the GNU Lesser General Public
  67103. - License along with the GNU C Library; if not, write to the Free
  67104. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  67105. - 02111-1307 USA. */
  67106. + License along with the GNU C Library; if not, see
  67107. + <http://www.gnu.org/licenses/>. */
  67108. #ifndef _FENV_H
  67109. # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
  67110. @@ -71,9 +70,9 @@
  67111. fenv_t;
  67112. /* If the default argument is used we use this value. */
  67113. -#define FE_DFL_ENV ((__const fenv_t *) -1)
  67114. +#define FE_DFL_ENV ((const fenv_t *) -1)
  67115. #ifdef __USE_GNU
  67116. /* Floating-point environment where none of the exceptions are masked. */
  67117. -# define FE_NOMASK_ENV ((__const fenv_t *) -2)
  67118. +# define FE_NOMASK_ENV ((const fenv_t *) -2)
  67119. #endif
  67120. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/huge_vall.h uClibc-git/libc/sysdeps/linux/m68k/bits/huge_vall.h
  67121. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/huge_vall.h 1970-01-01 01:00:00.000000000 +0100
  67122. +++ uClibc-git/libc/sysdeps/linux/m68k/bits/huge_vall.h 2014-07-25 20:36:07.189336691 +0200
  67123. @@ -0,0 +1,42 @@
  67124. +/* `HUGE_VALL' constant for m68k (where it is infinity).
  67125. + Used by <stdlib.h> and <math.h> functions for overflow.
  67126. + Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000, 2004
  67127. + Free Software Foundation, Inc.
  67128. + This file is part of the GNU C Library.
  67129. +
  67130. + The GNU C Library is free software; you can redistribute it and/or
  67131. + modify it under the terms of the GNU Lesser General Public
  67132. + License as published by the Free Software Foundation; either
  67133. + version 2.1 of the License, or (at your option) any later version.
  67134. +
  67135. + The GNU C Library is distributed in the hope that it will be useful,
  67136. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  67137. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  67138. + Lesser General Public License for more details.
  67139. +
  67140. + You should have received a copy of the GNU Lesser General Public
  67141. + License along with the GNU C Library; if not, see
  67142. + <http://www.gnu.org/licenses/>. */
  67143. +
  67144. +#ifndef _MATH_H
  67145. +# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
  67146. +#endif
  67147. +
  67148. +#if __GNUC_PREREQ(3,3)
  67149. +# define HUGE_VALL (__builtin_huge_vall ())
  67150. +#elif __GNUC_PREREQ(2,96)
  67151. +# define HUGE_VALL (__extension__ 0x1.0p32767L)
  67152. +#elif defined__GNUC__
  67153. +
  67154. +# define HUGE_VALL \
  67155. + (__extension__ \
  67156. + ((union { unsigned long __l[3]; long double __ld; }) \
  67157. + { __l: { 0x7fff0000UL, 0x80000000UL, 0UL } }).__ld)
  67158. +
  67159. +#else /* not GCC */
  67160. +
  67161. +static union { unsigned char __c[12]; long double __ld; } __huge_vall =
  67162. + { { 0x7f, 0xff, 0, 0, 0x80, 0, 0, 0, 0, 0, 0, 0 } };
  67163. +# define HUGE_VALL (__huge_vall.__ld)
  67164. +
  67165. +#endif /* GCC 2.95. */
  67166. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/m68k/bits/kernel_types.h
  67167. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
  67168. +++ uClibc-git/libc/sysdeps/linux/m68k/bits/kernel_types.h 2014-07-25 20:36:07.189336691 +0200
  67169. @@ -32,6 +32,8 @@
  67170. typedef unsigned short __kernel_old_gid_t;
  67171. typedef long long __kernel_loff_t;
  67172. typedef __kernel_dev_t __kernel_old_dev_t;
  67173. +typedef long __kernel_long_t;
  67174. +typedef unsigned long __kernel_ulong_t;
  67175. typedef struct {
  67176. #ifdef __USE_ALL
  67177. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/mathdef.h uClibc-git/libc/sysdeps/linux/m68k/bits/mathdef.h
  67178. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
  67179. +++ uClibc-git/libc/sysdeps/linux/m68k/bits/mathdef.h 2014-07-25 20:36:07.189336691 +0200
  67180. @@ -12,9 +12,8 @@
  67181. Lesser General Public License for more details.
  67182. You should have received a copy of the GNU Lesser General Public
  67183. - License along with the GNU C Library; if not, write to the Free
  67184. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  67185. - 02111-1307 USA. */
  67186. + License along with the GNU C Library; if not, see
  67187. + <http://www.gnu.org/licenses/>. */
  67188. #if !defined _MATH_H && !defined _COMPLEX_H
  67189. # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
  67190. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/mathinline.h uClibc-git/libc/sysdeps/linux/m68k/bits/mathinline.h
  67191. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/mathinline.h 2012-05-15 09:20:09.000000000 +0200
  67192. +++ uClibc-git/libc/sysdeps/linux/m68k/bits/mathinline.h 2014-07-25 20:36:07.189336691 +0200
  67193. @@ -14,9 +14,8 @@
  67194. Lesser General Public License for more details.
  67195. You should have received a copy of the GNU Lesser General Public
  67196. - License along with the GNU C Library; if not, write to the Free
  67197. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  67198. - 02111-1307 USA. */
  67199. + License along with the GNU C Library; if not, see
  67200. + <http://www.gnu.org/licenses/>. */
  67201. #ifdef __GNUC__
  67202. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/poll.h uClibc-git/libc/sysdeps/linux/m68k/bits/poll.h
  67203. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/poll.h 2012-05-15 09:20:09.000000000 +0200
  67204. +++ uClibc-git/libc/sysdeps/linux/m68k/bits/poll.h 2014-07-25 20:36:07.189336691 +0200
  67205. @@ -12,9 +12,8 @@
  67206. Lesser General Public License for more details.
  67207. You should have received a copy of the GNU Lesser General Public
  67208. - License along with the GNU C Library; if not, write to the Free
  67209. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  67210. - 02111-1307 USA. */
  67211. + License along with the GNU C Library; if not, see
  67212. + <http://www.gnu.org/licenses/>. */
  67213. #ifndef _SYS_POLL_H
  67214. # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
  67215. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/setjmp.h uClibc-git/libc/sysdeps/linux/m68k/bits/setjmp.h
  67216. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  67217. +++ uClibc-git/libc/sysdeps/linux/m68k/bits/setjmp.h 2014-07-25 20:36:07.189336691 +0200
  67218. @@ -13,9 +13,8 @@
  67219. Lesser General Public License for more details.
  67220. You should have received a copy of the GNU Lesser General Public
  67221. - License along with the GNU C Library; if not, write to the Free
  67222. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  67223. - 02111-1307 USA. */
  67224. + License along with the GNU C Library; if not, see
  67225. + <http://www.gnu.org/licenses/>. */
  67226. /* Define the machine-dependent type `jmp_buf'. m68k version. */
  67227. #ifndef _BITS_SETJMP_H
  67228. @@ -25,7 +24,7 @@
  67229. # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
  67230. #endif
  67231. -#ifndef _ASM
  67232. +#include <features.h>
  67233. typedef struct
  67234. {
  67235. @@ -37,7 +36,7 @@
  67236. int *__fp;
  67237. int *__sp;
  67238. -#if defined __HAVE_68881__ || defined __HAVE_FPU__
  67239. +#if defined __HAVE_68881__ || defined __UCLIBC_HAS_FPU__
  67240. /* There are eight floating point registers which
  67241. are saved in IEEE 96-bit extended format. */
  67242. char __fpregs[8 * (96 / 8)];
  67243. @@ -45,24 +44,4 @@
  67244. } __jmp_buf[1];
  67245. -#endif
  67246. -
  67247. -#define JB_REGS 0
  67248. -#define JB_DREGS 0
  67249. -#define JB_AREGS 24
  67250. -#define JB_PC 48
  67251. -#define JB_FPREGS 52
  67252. -
  67253. -#if defined __HAVE_68881__ || defined __HAVE_FPU__
  67254. -# define JB_SIZE 76
  67255. -#else
  67256. -# define JB_SIZE 52
  67257. -#endif
  67258. -
  67259. -
  67260. -/* Test if longjmp to JMPBUF would unwind the frame
  67261. - containing a local variable at ADDRESS. */
  67262. -#define _JMPBUF_UNWINDS(jmpbuf, address) \
  67263. - ((void *) (address) < (void *) (jmpbuf)->__aregs[5])
  67264. -
  67265. #endif /* bits/setjmp.h */
  67266. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/sigcontextinfo.h uClibc-git/libc/sysdeps/linux/m68k/bits/sigcontextinfo.h
  67267. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
  67268. +++ uClibc-git/libc/sysdeps/linux/m68k/bits/sigcontextinfo.h 2014-07-25 20:36:07.189336691 +0200
  67269. @@ -13,9 +13,8 @@
  67270. Lesser General Public License for more details.
  67271. You should have received a copy of the GNU Lesser General Public
  67272. - License along with the GNU C Library; if not, write to the Free
  67273. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  67274. - 02111-1307 USA. */
  67275. + License along with the GNU C Library; if not, see
  67276. + <http://www.gnu.org/licenses/>. */
  67277. #define SIGCONTEXT int _code, struct sigcontext *
  67278. #define SIGCONTEXT_EXTRA_ARGS _code,
  67279. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/m68k/bits/stackinfo.h
  67280. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  67281. +++ uClibc-git/libc/sysdeps/linux/m68k/bits/stackinfo.h 2014-07-25 20:36:07.189336691 +0200
  67282. @@ -12,9 +12,8 @@
  67283. Lesser General Public License for more details.
  67284. You should have received a copy of the GNU Lesser General Public
  67285. - License along with the GNU C Library; if not, write to the Free
  67286. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  67287. - 02111-1307 USA. */
  67288. + License along with the GNU C Library; if not, see
  67289. + <http://www.gnu.org/licenses/>. */
  67290. /* This file contains a bit of information about the stack allocation
  67291. of the processor. */
  67292. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/stat.h uClibc-git/libc/sysdeps/linux/m68k/bits/stat.h
  67293. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
  67294. +++ uClibc-git/libc/sysdeps/linux/m68k/bits/stat.h 2014-07-25 20:36:07.189336691 +0200
  67295. @@ -13,9 +13,8 @@
  67296. Lesser General Public License for more details.
  67297. You should have received a copy of the GNU Lesser General Public
  67298. - License along with the GNU C Library; if not, write to the Free
  67299. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  67300. - 02111-1307 USA. */
  67301. + License along with the GNU C Library; if not, see
  67302. + <http://www.gnu.org/licenses/>. */
  67303. #ifndef _SYS_STAT_H
  67304. # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
  67305. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/m68k/bits/uClibc_arch_features.h
  67306. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  67307. +++ uClibc-git/libc/sysdeps/linux/m68k/bits/uClibc_arch_features.h 2014-07-25 20:36:07.189336691 +0200
  67308. @@ -15,8 +15,8 @@
  67309. /* can your target use syscall6() for mmap ? */
  67310. #undef __UCLIBC_MMAP_HAS_6_ARGS__
  67311. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  67312. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  67313. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  67314. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  67315. /* does your target have a broken create_module() ? */
  67316. #define __UCLIBC_BROKEN_CREATE_MODULE__
  67317. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/uClibc_page.h uClibc-git/libc/sysdeps/linux/m68k/bits/uClibc_page.h
  67318. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/uClibc_page.h 2012-05-15 09:20:09.000000000 +0200
  67319. +++ uClibc-git/libc/sysdeps/linux/m68k/bits/uClibc_page.h 2014-07-25 20:36:07.189336691 +0200
  67320. @@ -11,8 +11,8 @@
  67321. * Library General Public License for more details.
  67322. *
  67323. * You should have received a copy of the GNU Library General Public
  67324. - * License along with this library; if not, write to the Free
  67325. - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  67326. + * License along with this library; if not, see
  67327. + * <http://www.gnu.org/licenses/>.
  67328. */
  67329. /* Supply an architecture specific value for PAGE_SIZE and friends. */
  67330. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/wordsize.h uClibc-git/libc/sysdeps/linux/m68k/bits/wordsize.h
  67331. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
  67332. +++ uClibc-git/libc/sysdeps/linux/m68k/bits/wordsize.h 2014-07-25 20:36:07.189336691 +0200
  67333. @@ -12,8 +12,7 @@
  67334. Lesser General Public License for more details.
  67335. You should have received a copy of the GNU Lesser General Public
  67336. - License along with the GNU C Library; if not, write to the Free
  67337. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  67338. - 02111-1307 USA. */
  67339. + License along with the GNU C Library; if not, see
  67340. + <http://www.gnu.org/licenses/>. */
  67341. #define __WORDSIZE 32
  67342. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bsd-setjmp.S uClibc-git/libc/sysdeps/linux/m68k/bsd-setjmp.S
  67343. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bsd-setjmp.S 2012-05-15 09:20:09.000000000 +0200
  67344. +++ uClibc-git/libc/sysdeps/linux/m68k/bsd-setjmp.S 2014-07-25 20:36:07.189336691 +0200
  67345. @@ -2,9 +2,8 @@
  67346. /* Copyright (C) 2002, David McCullough <davidm@snapgear.com> */
  67347. /* This file is released under the LGPL, any version you like */
  67348. -#define _ASM
  67349. -#define _SETJMP_H
  67350. -#include <bits/setjmp.h>
  67351. +#include <features.h>
  67352. +#include <jmpbuf-offsets.h>
  67353. #include "m68k_pic.S"
  67354. .globl setjmp;
  67355. @@ -15,7 +14,7 @@
  67356. moveal %sp@(4), %a0
  67357. movel %sp@(0), %a0@(JB_PC)
  67358. moveml %d2-%d7/%a2-%a7, %a0@(JB_REGS)
  67359. -#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
  67360. +#if defined __HAVE_68881__ || defined __UCLIBC_HAS_FPU__
  67361. fmovemx %fp2-%fp7, %a0@(JB_FPREGS)
  67362. #endif
  67363. clrl %d0
  67364. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bsd-_setjmp.S uClibc-git/libc/sysdeps/linux/m68k/bsd-_setjmp.S
  67365. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/bsd-_setjmp.S 2012-05-15 09:20:09.000000000 +0200
  67366. +++ uClibc-git/libc/sysdeps/linux/m68k/bsd-_setjmp.S 2014-07-25 20:36:07.189336691 +0200
  67367. @@ -2,9 +2,8 @@
  67368. /* Copyright (C) 2002, David McCullough <davidm@snapgear.com> */
  67369. /* This file is released under the LGPL, any version you like */
  67370. -#define _ASM
  67371. -#define _SETJMP_H
  67372. -#include <bits/setjmp.h>
  67373. +#include <features.h>
  67374. +#include <jmpbuf-offsets.h>
  67375. .globl _setjmp;
  67376. .type _setjmp,@function
  67377. @@ -14,7 +13,7 @@
  67378. moveal %sp@(4), %a0
  67379. movel %sp@(0), %a0@(JB_PC)
  67380. moveml %d2-%d7/%a2-%a7, %a0@(JB_REGS)
  67381. -#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
  67382. +#if defined __HAVE_68881__ || defined __UCLIBC_HAS_FPU__
  67383. fmovemx %fp2-%fp7, %a0@(JB_FPREGS)
  67384. #endif
  67385. clrl %d0
  67386. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/crt1.S uClibc-git/libc/sysdeps/linux/m68k/crt1.S
  67387. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/crt1.S 2012-05-15 09:20:09.000000000 +0200
  67388. +++ uClibc-git/libc/sysdeps/linux/m68k/crt1.S 2014-07-25 20:36:07.189336691 +0200
  67389. @@ -30,9 +30,8 @@
  67390. Lesser General Public License for more details.
  67391. You should have received a copy of the GNU Lesser General Public
  67392. - License along with the GNU C Library; if not, write to the Free
  67393. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  67394. - 02111-1307 USA. */
  67395. + License along with the GNU C Library; if not, see
  67396. + <http://www.gnu.org/licenses/>. */
  67397. #include <features.h>
  67398. #include "m68k_pic.S"
  67399. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/fpu_control.h uClibc-git/libc/sysdeps/linux/m68k/fpu_control.h
  67400. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
  67401. +++ uClibc-git/libc/sysdeps/linux/m68k/fpu_control.h 2014-07-25 20:36:07.193336713 +0200
  67402. @@ -13,9 +13,8 @@
  67403. Lesser General Public License for more details.
  67404. You should have received a copy of the GNU Lesser General Public
  67405. - License along with the GNU C Library; if not, write to the Free
  67406. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  67407. - 02111-1307 USA. */
  67408. + License along with the GNU C Library; if not, see
  67409. + <http://www.gnu.org/licenses/>. */
  67410. #ifndef _FPU_CONTROL_H
  67411. #define _FPU_CONTROL_H
  67412. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/jmpbuf-offsets.h uClibc-git/libc/sysdeps/linux/m68k/jmpbuf-offsets.h
  67413. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
  67414. +++ uClibc-git/libc/sysdeps/linux/m68k/jmpbuf-offsets.h 2014-07-25 20:36:07.193336713 +0200
  67415. @@ -0,0 +1,19 @@
  67416. +/*
  67417. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  67418. + *
  67419. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  67420. + */
  67421. +
  67422. +#include <features.h>
  67423. +
  67424. +#define JB_REGS 0
  67425. +#define JB_DREGS 0
  67426. +#define JB_AREGS 24
  67427. +#define JB_PC 48
  67428. +#define JB_FPREGS 52
  67429. +
  67430. +#if defined __HAVE_68881__ || defined __UCLIBC_HAS_FPU__
  67431. +# define JB_SIZE 76
  67432. +#else
  67433. +# define JB_SIZE 52
  67434. +#endif
  67435. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/m68k/jmpbuf-unwind.h
  67436. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  67437. +++ uClibc-git/libc/sysdeps/linux/m68k/jmpbuf-unwind.h 2014-07-25 20:36:07.193336713 +0200
  67438. @@ -0,0 +1,11 @@
  67439. +/*
  67440. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  67441. + *
  67442. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  67443. + */
  67444. +#include <setjmp.h>
  67445. +
  67446. +/* Test if longjmp to JMPBUF would unwind the frame
  67447. + containing a local variable at ADDRESS. */
  67448. +#define _JMPBUF_UNWINDS(jmpbuf, address) \
  67449. + ((void *) (address) < (void *) (jmpbuf)->__aregs[5])
  67450. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/__longjmp.S uClibc-git/libc/sysdeps/linux/m68k/__longjmp.S
  67451. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
  67452. +++ uClibc-git/libc/sysdeps/linux/m68k/__longjmp.S 2014-07-25 20:36:07.177336629 +0200
  67453. @@ -2,10 +2,8 @@
  67454. /* Copyright (C) 2002, David McCullough <davidm@snapgear.com> */
  67455. /* This file is released under the LGPL, any version you like */
  67456. -#define _ASM
  67457. -#define _SETJMP_H
  67458. #include <features.h>
  67459. -#include <bits/setjmp.h>
  67460. +#include <jmpbuf-offsets.h>
  67461. .globl __longjmp
  67462. .type __longjmp,@function
  67463. @@ -17,7 +15,7 @@
  67464. movel #1, %d0
  67465. 1:
  67466. moveml %a0@(JB_REGS), %d2-%d7/%a2-%a7
  67467. -#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
  67468. +#if defined __HAVE_68881__ || defined __UCLIBC_HAS_FPU__
  67469. fmovemx %a0@(JB_FPREGS), %fp2-%fp7
  67470. #endif
  67471. movel %a0@(JB_PC), %sp@
  67472. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/Makefile.arch uClibc-git/libc/sysdeps/linux/m68k/Makefile.arch
  67473. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
  67474. +++ uClibc-git/libc/sysdeps/linux/m68k/Makefile.arch 2014-07-25 20:36:07.177336629 +0200
  67475. @@ -5,6 +5,6 @@
  67476. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  67477. #
  67478. -CSRC := brk.c __syscall_error.c
  67479. +CSRC-y := brk.c __syscall_error.c
  67480. -SSRC := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S vfork.S
  67481. +SSRC-y := __longjmp.S bsd-_setjmp.S bsd-setjmp.S clone.S setjmp.S vfork.S
  67482. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/setjmp.S uClibc-git/libc/sysdeps/linux/m68k/setjmp.S
  67483. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/setjmp.S 2012-05-15 09:20:09.000000000 +0200
  67484. +++ uClibc-git/libc/sysdeps/linux/m68k/setjmp.S 2014-07-25 20:36:07.193336713 +0200
  67485. @@ -2,9 +2,8 @@
  67486. /* Copyright (C) 2002, David McCullough <davidm@snapgear.com> */
  67487. /* This file is released under the LGPL, any version you like */
  67488. -#define _ASM
  67489. -#define _SETJMP_H
  67490. -#include <bits/setjmp.h>
  67491. +#include <features.h>
  67492. +#include <jmpbuf-offsets.h>
  67493. #include "m68k_pic.S"
  67494. .globl __sigsetjmp;
  67495. @@ -15,7 +14,7 @@
  67496. moveal %sp@(4), %a0
  67497. movel %sp@(0), %a0@(JB_PC)
  67498. moveml %d2-%d7/%a2-%a7, %a0@(JB_REGS)
  67499. -#if defined(__HAVE_68881__) || defined(__HAVE_FPU__)
  67500. +#if defined __HAVE_68881__ || defined __UCLIBC_HAS_FPU__
  67501. fmovemx %fp2-%fp7, %a0@(JB_FPREGS)
  67502. #endif
  67503. clrl %d0
  67504. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/sys/procfs.h uClibc-git/libc/sysdeps/linux/m68k/sys/procfs.h
  67505. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  67506. +++ uClibc-git/libc/sysdeps/linux/m68k/sys/procfs.h 2014-07-25 20:36:07.205336775 +0200
  67507. @@ -12,9 +12,8 @@
  67508. Lesser General Public License for more details.
  67509. You should have received a copy of the GNU Lesser General Public
  67510. - License along with the GNU C Library; if not, write to the Free
  67511. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  67512. - 02111-1307 USA. */
  67513. + License along with the GNU C Library; if not, see
  67514. + <http://www.gnu.org/licenses/>. */
  67515. #ifndef _SYS_PROCFS_H
  67516. #define _SYS_PROCFS_H 1
  67517. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/sys/reg.h uClibc-git/libc/sysdeps/linux/m68k/sys/reg.h
  67518. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/sys/reg.h 2012-05-15 09:20:09.000000000 +0200
  67519. +++ uClibc-git/libc/sysdeps/linux/m68k/sys/reg.h 2014-07-25 20:36:07.205336775 +0200
  67520. @@ -12,9 +12,8 @@
  67521. Lesser General Public License for more details.
  67522. You should have received a copy of the GNU Lesser General Public
  67523. - License along with the GNU C Library; if not, write to the Free
  67524. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  67525. - 02111-1307 USA. */
  67526. + License along with the GNU C Library; if not, see
  67527. + <http://www.gnu.org/licenses/>. */
  67528. #ifndef _SYS_REG_H
  67529. #define _SYS_REG_H 1
  67530. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/sys/ucontext.h uClibc-git/libc/sysdeps/linux/m68k/sys/ucontext.h
  67531. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  67532. +++ uClibc-git/libc/sysdeps/linux/m68k/sys/ucontext.h 2014-07-25 20:36:07.205336775 +0200
  67533. @@ -12,9 +12,8 @@
  67534. Lesser General Public License for more details.
  67535. You should have received a copy of the GNU Lesser General Public
  67536. - License along with the GNU C Library; if not, write to the Free
  67537. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  67538. - 02111-1307 USA. */
  67539. + License along with the GNU C Library; if not, see
  67540. + <http://www.gnu.org/licenses/>. */
  67541. /* System V/m68k ABI compliant context switching support. */
  67542. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/m68k/vfork.S uClibc-git/libc/sysdeps/linux/m68k/vfork.S
  67543. --- uClibc-0.9.33.2/libc/sysdeps/linux/m68k/vfork.S 2012-05-15 09:20:09.000000000 +0200
  67544. +++ uClibc-git/libc/sysdeps/linux/m68k/vfork.S 2014-07-25 20:36:07.205336775 +0200
  67545. @@ -4,9 +4,7 @@
  67546. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  67547. */
  67548. -#include <features.h>
  67549. -
  67550. -#include <asm/unistd.h>
  67551. +#include <sys/syscall.h>
  67552. #ifndef __NR_vfork
  67553. #define __NR_vfork __NR_fork /* uClinux-2.0 only has fork which is vfork */
  67554. @@ -16,7 +14,6 @@
  67555. .text
  67556. .align 2
  67557. - .globl errno
  67558. .globl __vfork
  67559. .hidden __vfork
  67560. .type __vfork,@function
  67561. @@ -42,4 +39,4 @@
  67562. .size __vfork,.-__vfork
  67563. weak_alias(__vfork,vfork)
  67564. -libc_hidden_weak(vfork)
  67565. +libc_hidden_def(vfork)
  67566. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/Makefile.commonarch uClibc-git/libc/sysdeps/linux/Makefile.commonarch
  67567. --- uClibc-0.9.33.2/libc/sysdeps/linux/Makefile.commonarch 2012-05-15 09:20:09.000000000 +0200
  67568. +++ uClibc-git/libc/sysdeps/linux/Makefile.commonarch 2014-07-25 20:36:06.477332962 +0200
  67569. @@ -8,15 +8,15 @@
  67570. ARCH_DIR := $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)
  67571. ARCH_OUT := $(top_builddir)libc/sysdeps/linux/$(TARGET_ARCH)
  67572. -ARCH_CSRC := $(patsubst %.c,$(ARCH_DIR)/%.c,$(CSRC))
  67573. -ARCH_COBJ := $(patsubst %.c,$(ARCH_OUT)/%.o,$(CSRC))
  67574. -ARCH_SSRC = $(patsubst %.s,$(ARCH_DIR)/%.s,$(patsubst %.S,$(ARCH_DIR)/%.S,$(SSRC)))
  67575. -ARCH_SOBJ = $(patsubst %.s,$(ARCH_OUT)/%.o,$(patsubst %.S,$(ARCH_OUT)/%.o,$(SSRC)))
  67576. +ARCH_CSRC := $(addprefix $(ARCH_DIR)/,$(CSRC-y))
  67577. +ARCH_COBJ := $(addprefix $(ARCH_OUT)/,$(CSRC-y:.c=.o))
  67578. +ARCH_SSRC = $(addprefix $(ARCH_DIR)/,$(SSRC-y))
  67579. +ARCH_SOBJ = $(patsubst %.s,%.o,$(patsubst %.S,%.o,$(addprefix $(ARCH_OUT)/,$(SSRC-y))))
  67580. -ARCH_OBJS = $(ARCH_COBJ) $(ARCH_SOBJ)
  67581. +ARCH_OBJS-y = $(ARCH_COBJ) $(ARCH_SOBJ)
  67582. crt-y := FORCE
  67583. -libc-y += $(ARCH_OBJS)
  67584. +libc-y += $(ARCH_OBJS-y)
  67585. libc-nomulti-y += $(ARCH_SOBJ)
  67586. objclean-y += CLEAN_$(subst $(top_builddir),,$(ARCH_OUT))
  67587. @@ -37,5 +37,23 @@
  67588. headers_clean-y += HEADERCLEAN_$(subst $(top_builddir),,$(ARCH_OUT))
  67589. HEADERCLEAN_$(subst $(top_builddir),,$(ARCH_OUT)):
  67590. $(do_rm) $(ARCH_HEADERS_OUT)
  67591. -
  67592. endif
  67593. +
  67594. +CFLAGS-ucontext_i.c = -S
  67595. +
  67596. +$(ARCH_OUT)/ucontext_i.c: $(ARCH_DIR)/ucontext_i.sym
  67597. + $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@
  67598. +
  67599. +$(ARCH_OUT)/ucontext_i.s: $(ARCH_OUT)/ucontext_i.c
  67600. + $(compile.c)
  67601. +
  67602. +$(ARCH_OUT)/ucontext_i.h: $(ARCH_OUT)/ucontext_i.s
  67603. + $(do_sed) $(PTHREAD_GENERATE_MANGLE) $< > $@
  67604. +
  67605. +pregen-headers-$(UCLIBC_HAS_CONTEXT_FUNCS) += $(ARCH_OUT)/ucontext_i.h
  67606. +
  67607. +headers_clean-$(UCLIBC_HAS_CONTEXT_FUNCS) += \
  67608. + HEADERCLEAN_$(subst $(top_builddir),,$(ARCH_OUT)/ucontext_i)
  67609. +
  67610. +HEADERCLEAN_$(subst $(top_builddir),,$(ARCH_OUT)/ucontext_i):
  67611. + $(do_rm) $(addprefix $(ARCH_OUT)/ucontext_i., c h s)
  67612. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/atomic.h uClibc-git/libc/sysdeps/linux/metag/bits/atomic.h
  67613. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/atomic.h 1970-01-01 01:00:00.000000000 +0100
  67614. +++ uClibc-git/libc/sysdeps/linux/metag/bits/atomic.h 2014-07-25 20:36:07.233336922 +0200
  67615. @@ -0,0 +1,66 @@
  67616. +/*
  67617. + * Copyrith (C) 2013 Imagination Technologies Ltd.
  67618. + *
  67619. + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  67620. + *
  67621. + */
  67622. +
  67623. +#include <stdint.h>
  67624. +#include <sysdep.h>
  67625. +
  67626. +typedef int8_t atomic8_t;
  67627. +typedef uint8_t uatomic8_t;
  67628. +typedef int_fast8_t atomic_fast8_t;
  67629. +typedef uint_fast8_t uatomic_fast8_t;
  67630. +
  67631. +typedef int32_t atomic32_t;
  67632. +typedef uint32_t uatomic32_t;
  67633. +typedef int_fast32_t atomic_fast32_t;
  67634. +typedef uint_fast32_t uatomic_fast32_t;
  67635. +
  67636. +typedef intptr_t atomicptr_t;
  67637. +typedef uintptr_t uatomicptr_t;
  67638. +typedef intmax_t atomic_max_t;
  67639. +typedef uintmax_t uatomic_max_t;
  67640. +
  67641. +void __metag_link_error (void);
  67642. +
  67643. +#define atomic_full_barrier() \
  67644. + __asm__ __volatile__("": : :"memory")
  67645. +
  67646. +/* Atomic compare and exchange. This sequence relies on the kernel to
  67647. + provide a compare and exchange operation which is atomic. */
  67648. +
  67649. +#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \
  67650. + ({ __metag_link_error (); oldval; })
  67651. +
  67652. +#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \
  67653. + ({ __metag_link_error (); oldval; })
  67654. +
  67655. +/* This code uses the kernel helper to do cmpxchg. It relies on the fact
  67656. + the helper code only clobbers D0Re0. */
  67657. +#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
  67658. + ({ register __typeof (oldval) a_current __asm__ ("D1Ar1"); \
  67659. + register __typeof (oldval) a_newval __asm__ ("D0Ar2") = (newval); \
  67660. + register __typeof (mem) a_ptr __asm__ ("D1Ar3") = (mem); \
  67661. + register __typeof (oldval) a_oldval __asm__ ("D0Ar4") = (oldval); \
  67662. + __asm__ __volatile__ \
  67663. + ("0:\n\t" \
  67664. + "GETD %[cur], [%[ptr]]\n\t" \
  67665. + "CMP %[cur], %[old]\n\t" \
  67666. + "BNE 1f\n\t" \
  67667. + "MOVT D1RtP, #0x6fff\n\t" \
  67668. + "ADD D1RtP, D1RtP, #0xf040\n\t" \
  67669. + "SWAP D1RtP, PC\n\t" \
  67670. + "MOV %[cur], %[old]\n\t" \
  67671. + "CMP D0Re0, #0\n\t" \
  67672. + "BNE 0b\n\t" \
  67673. + "1:" \
  67674. + : [cur] "=&r" (a_current) \
  67675. + : [new] "r" (a_newval), [ptr] "r" (a_ptr), \
  67676. + [old] "r" (a_oldval) \
  67677. + : "D0Re0", "D1RtP", "cc", "memory"); \
  67678. + a_current; })
  67679. +
  67680. +#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
  67681. + ({ __metag_link_error (); oldval; })
  67682. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/endian.h uClibc-git/libc/sysdeps/linux/metag/bits/endian.h
  67683. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/endian.h 1970-01-01 01:00:00.000000000 +0100
  67684. +++ uClibc-git/libc/sysdeps/linux/metag/bits/endian.h 2014-07-25 20:36:07.233336922 +0200
  67685. @@ -0,0 +1,12 @@
  67686. +/* Meta is little endian
  67687. + *
  67688. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  67689. + *
  67690. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  67691. + */
  67692. +
  67693. +#ifndef _ENDIAN_H
  67694. +# error "Never use <bits/endian.h> directly; include <endian.h> instead."
  67695. +#endif
  67696. +
  67697. +#define __BYTE_ORDER __LITTLE_ENDIAN
  67698. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/fcntl.h uClibc-git/libc/sysdeps/linux/metag/bits/fcntl.h
  67699. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/fcntl.h 1970-01-01 01:00:00.000000000 +0100
  67700. +++ uClibc-git/libc/sysdeps/linux/metag/bits/fcntl.h 2014-07-25 20:36:07.233336922 +0200
  67701. @@ -0,0 +1,238 @@
  67702. +/* O_*, F_*, FD_* bit values for Linux.
  67703. + Copyright (C) 1995-1998, 2000, 2004, 2006, 2007, 2008
  67704. + Free Software Foundation, Inc.
  67705. + This file is part of the GNU C Library.
  67706. +
  67707. + The GNU C Library is free software; you can redistribute it and/or
  67708. + modify it under the terms of the GNU Lesser General Public
  67709. + License as published by the Free Software Foundation; either
  67710. + version 2.1 of the License, or (at your option) any later version.
  67711. +
  67712. + The GNU C Library is distributed in the hope that it will be useful,
  67713. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  67714. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  67715. + Lesser General Public License for more details.
  67716. +
  67717. + You should have received a copy of the GNU Lesser General Public
  67718. + License along with the GNU C Library; if not, write to the Free
  67719. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  67720. + 02111-1307 USA. */
  67721. +
  67722. +#ifndef _FCNTL_H
  67723. +# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  67724. +#endif
  67725. +
  67726. +#include <sys/types.h>
  67727. +#ifdef __USE_GNU
  67728. +# include <bits/uio.h>
  67729. +#endif
  67730. +
  67731. +
  67732. +/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
  67733. + located on an ext2 file system */
  67734. +#define O_ACCMODE 0003
  67735. +#define O_RDONLY 00
  67736. +#define O_WRONLY 01
  67737. +#define O_RDWR 02
  67738. +#define O_CREAT 0100 /* not fcntl */
  67739. +#define O_EXCL 0200 /* not fcntl */
  67740. +#define O_NOCTTY 0400 /* not fcntl */
  67741. +#define O_TRUNC 01000 /* not fcntl */
  67742. +#define O_APPEND 02000
  67743. +#define O_NONBLOCK 04000
  67744. +#define O_NDELAY O_NONBLOCK
  67745. +#define O_SYNC 010000
  67746. +#define O_FSYNC O_SYNC
  67747. +#define O_ASYNC 020000
  67748. +
  67749. +#ifdef __USE_GNU
  67750. +# define O_DIRECT 040000 /* Direct disk access. */
  67751. +# define O_DIRECTORY 0200000 /* Must be a directory. */
  67752. +# define O_NOFOLLOW 0400000 /* Do not follow links. */
  67753. +# define O_NOATIME 01000000 /* Do not set atime. */
  67754. +# define O_CLOEXEC 02000000 /* Set close_on_exec. */
  67755. +#endif
  67756. +
  67757. +/* For now Linux has synchronisity options for data and read operations.
  67758. + We define the symbols here but let them do the same as O_SYNC since
  67759. + this is a superset. */
  67760. +#if defined __USE_POSIX199309 || defined __USE_UNIX98
  67761. +# define O_DSYNC O_SYNC /* Synchronize data. */
  67762. +# define O_RSYNC O_SYNC /* Synchronize read operations. */
  67763. +#endif
  67764. +
  67765. +#ifdef __USE_LARGEFILE64
  67766. +# define O_LARGEFILE 0100000
  67767. +#endif
  67768. +
  67769. +/* Values for the second argument to `fcntl'. */
  67770. +#define F_DUPFD 0 /* Duplicate file descriptor. */
  67771. +#define F_GETFD 1 /* Get file descriptor flags. */
  67772. +#define F_SETFD 2 /* Set file descriptor flags. */
  67773. +#define F_GETFL 3 /* Get file status flags. */
  67774. +#define F_SETFL 4 /* Set file status flags. */
  67775. +#ifndef __USE_FILE_OFFSET64
  67776. +# define F_GETLK 5 /* Get record locking info. */
  67777. +# define F_SETLK 6 /* Set record locking info (non-blocking). */
  67778. +# define F_SETLKW 7 /* Set record locking info (blocking). */
  67779. +#else
  67780. +# define F_GETLK F_GETLK64 /* Get record locking info. */
  67781. +# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/
  67782. +# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */
  67783. +#endif
  67784. +#define F_GETLK64 12 /* Get record locking info. */
  67785. +#define F_SETLK64 13 /* Set record locking info (non-blocking). */
  67786. +#define F_SETLKW64 14 /* Set record locking info (blocking). */
  67787. +
  67788. +#if defined __USE_BSD || defined __USE_UNIX98
  67789. +# define F_SETOWN 8 /* Get owner of socket (receiver of SIGIO). */
  67790. +# define F_GETOWN 9 /* Set owner of socket (receiver of SIGIO). */
  67791. +#endif
  67792. +
  67793. +#ifdef __USE_GNU
  67794. +# define F_SETSIG 10 /* Set number of signal to be sent. */
  67795. +# define F_GETSIG 11 /* Get number of signal to be sent. */
  67796. +#endif
  67797. +
  67798. +#ifdef __USE_GNU
  67799. +# define F_SETLEASE 1024 /* Set a lease. */
  67800. +# define F_GETLEASE 1025 /* Enquire what lease is active. */
  67801. +# define F_NOTIFY 1026 /* Request notfications on a directory. */
  67802. +# define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with
  67803. + close-on-exit set on new fd. */
  67804. +#endif
  67805. +
  67806. +/* For F_[GET|SET]FD. */
  67807. +#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
  67808. +
  67809. +/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */
  67810. +#define F_RDLCK 0 /* Read lock. */
  67811. +#define F_WRLCK 1 /* Write lock. */
  67812. +#define F_UNLCK 2 /* Remove lock. */
  67813. +
  67814. +/* For old implementation of bsd flock(). */
  67815. +#define F_EXLCK 4 /* or 3 */
  67816. +#define F_SHLCK 8 /* or 4 */
  67817. +
  67818. +#ifdef __USE_BSD
  67819. +/* Operations for bsd flock(), also used by the kernel implementation. */
  67820. +# define LOCK_SH 1 /* shared lock */
  67821. +# define LOCK_EX 2 /* exclusive lock */
  67822. +# define LOCK_NB 4 /* or'd with one of the above to prevent
  67823. + blocking */
  67824. +# define LOCK_UN 8 /* remove lock */
  67825. +#endif
  67826. +
  67827. +#ifdef __USE_GNU
  67828. +# define LOCK_MAND 32 /* This is a mandatory flock: */
  67829. +# define LOCK_READ 64 /* ... which allows concurrent read operations. */
  67830. +# define LOCK_WRITE 128 /* ... which allows concurrent write operations. */
  67831. +# define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */
  67832. +#endif
  67833. +
  67834. +#ifdef __USE_GNU
  67835. +/* Types of directory notifications that may be requested with F_NOTIFY. */
  67836. +# define DN_ACCESS 0x00000001 /* File accessed. */
  67837. +# define DN_MODIFY 0x00000002 /* File modified. */
  67838. +# define DN_CREATE 0x00000004 /* File created. */
  67839. +# define DN_DELETE 0x00000008 /* File removed. */
  67840. +# define DN_RENAME 0x00000010 /* File renamed. */
  67841. +# define DN_ATTRIB 0x00000020 /* File changed attibutes. */
  67842. +# define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */
  67843. +#endif
  67844. +
  67845. +struct flock
  67846. + {
  67847. + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
  67848. + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
  67849. +#ifndef __USE_FILE_OFFSET64
  67850. + __off_t l_start; /* Offset where the lock begins. */
  67851. + __off_t l_len; /* Size of the locked area; zero means until EOF. */
  67852. +#else
  67853. + __off64_t l_start; /* Offset where the lock begins. */
  67854. + __off64_t l_len; /* Size of the locked area; zero means until EOF. */
  67855. +#endif
  67856. + __pid_t l_pid; /* Process holding the lock. */
  67857. + };
  67858. +
  67859. +#ifdef __USE_LARGEFILE64
  67860. +struct flock64
  67861. + {
  67862. + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
  67863. + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
  67864. + __off64_t l_start; /* Offset where the lock begins. */
  67865. + __off64_t l_len; /* Size of the locked area; zero means until EOF. */
  67866. + __pid_t l_pid; /* Process holding the lock. */
  67867. + };
  67868. +#endif
  67869. +
  67870. +/* Define some more compatibility macros to be backward compatible with
  67871. + BSD systems which did not managed to hide these kernel macros. */
  67872. +#ifdef __USE_BSD
  67873. +# define FAPPEND O_APPEND
  67874. +# define FFSYNC O_FSYNC
  67875. +# define FASYNC O_ASYNC
  67876. +# define FNONBLOCK O_NONBLOCK
  67877. +# define FNDELAY O_NDELAY
  67878. +#endif /* Use BSD. */
  67879. +
  67880. +/* Advise to `posix_fadvise'. */
  67881. +#ifdef __USE_XOPEN2K
  67882. +# define POSIX_FADV_NORMAL 0 /* No further special treatment. */
  67883. +# define POSIX_FADV_RANDOM 1 /* Expect random page references. */
  67884. +# define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */
  67885. +# define POSIX_FADV_WILLNEED 3 /* Will need these pages. */
  67886. +# define POSIX_FADV_DONTNEED 4 /* Don't need these pages. */
  67887. +# define POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */
  67888. +#endif
  67889. +
  67890. +
  67891. +#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
  67892. +/* Flags for SYNC_FILE_RANGE. */
  67893. +# define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages
  67894. + in the range before performing the
  67895. + write. */
  67896. +# define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those
  67897. + dirty pages in the range which are
  67898. + not presently under writeback. */
  67899. +# define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in
  67900. + the range after performing the
  67901. + write. */
  67902. +
  67903. +/* Flags for SPLICE and VMSPLICE. */
  67904. +# define SPLICE_F_MOVE 1 /* Move pages instead of copying. */
  67905. +# define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing
  67906. + (but we may still block on the fd
  67907. + we splice from/to). */
  67908. +# define SPLICE_F_MORE 4 /* Expect more data. */
  67909. +# define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */
  67910. +#endif
  67911. +
  67912. +__BEGIN_DECLS
  67913. +
  67914. +#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__
  67915. +
  67916. +/* Provide kernel hint to read ahead. */
  67917. +extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
  67918. + __THROW;
  67919. +
  67920. +/* Selective file content synch'ing. */
  67921. +extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to,
  67922. + unsigned int __flags);
  67923. +
  67924. +/* Splice address range into a pipe. */
  67925. +extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
  67926. + size_t __count, unsigned int __flags);
  67927. +
  67928. +/* Splice two files together. */
  67929. +extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
  67930. + __off64_t *__offout, size_t __len,
  67931. + unsigned int __flags);
  67932. +
  67933. +/* In-kernel implementation of tee for pipe buffers. */
  67934. +extern ssize_t tee (int __fdin, int __fdout, size_t __len,
  67935. + unsigned int __flags);
  67936. +
  67937. +#endif
  67938. +__END_DECLS
  67939. +
  67940. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/fenv.h uClibc-git/libc/sysdeps/linux/metag/bits/fenv.h
  67941. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/fenv.h 1970-01-01 01:00:00.000000000 +0100
  67942. +++ uClibc-git/libc/sysdeps/linux/metag/bits/fenv.h 2014-07-25 20:36:07.237336943 +0200
  67943. @@ -0,0 +1,77 @@
  67944. +/* Copyright (C) 2013 Imagination Technologies Ltd.
  67945. + This file is part of the GNU C Library.
  67946. +
  67947. + The GNU C Library is free software; you can redistribute it and/or
  67948. + modify it under the terms of the GNU Lesser General Public
  67949. + License as published by the Free Software Foundation; either
  67950. + version 2.1 of the License, or (at your option) any later version.
  67951. +
  67952. + The GNU C Library is distributed in the hope that it will be useful,
  67953. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  67954. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  67955. + Lesser General Public License for more details.
  67956. +
  67957. + You should have received a copy of the GNU Lesser General Public
  67958. + License along with the GNU C Library; if not, write to the Free
  67959. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  67960. + 02111-1307 USA. */
  67961. +
  67962. +#ifndef _FENV_H
  67963. +# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
  67964. +#endif
  67965. +
  67966. +
  67967. +/* Define bits representing the exception. We use the bit positions
  67968. + of the appropriate bits in TXDEFR. */
  67969. +enum
  67970. + {
  67971. + FE_INEXACT = 0x1,
  67972. +#define FE_INEXACT FE_INEXACT
  67973. + FE_UNDERFLOW = 0x2,
  67974. +#define FE_UNDERFLOW FE_UNDERFLOW
  67975. + FE_OVERFLOW = 0x4,
  67976. +#define FE_OVERFLOW FE_OVERFLOW
  67977. + FE_DIVBYZERO = 0x8,
  67978. +#define FE_DIVBYZERO FE_DIVBYZERO
  67979. + FE_INVALID = 0x10,
  67980. +#define FE_INVALID FE_INVALID
  67981. + };
  67982. +
  67983. +#define FE_ALL_EXCEPT \
  67984. + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
  67985. +
  67986. +/* The Meta FPU supports all of the four defined rounding modes. We
  67987. + use the values of the rounding mode bits in TXMODE as the values
  67988. + for the appropriate macros. */
  67989. +enum
  67990. + {
  67991. + FE_TONEAREST = 0x0,
  67992. +#define FE_TONEAREST FE_TONEAREST
  67993. + FE_TOWARDZERO = 0x1,
  67994. +#define FE_TOWARDZERO FE_TOWARDZERO
  67995. + FE_UPWARD = 0x2,
  67996. +#define FE_UPWARD FE_UPWARD
  67997. + FE_DOWNWARD = 0x3
  67998. +#define FE_DOWNWARD FE_DOWNWARD
  67999. + };
  68000. +
  68001. +
  68002. +/* Type representing exception flags. */
  68003. +typedef unsigned int fexcept_t;
  68004. +
  68005. +
  68006. +/* Type representing floating-point environment. */
  68007. +typedef struct
  68008. + {
  68009. + unsigned int txdefr;
  68010. + unsigned int txmode;
  68011. + }
  68012. +fenv_t;
  68013. +
  68014. +/* If the default argument is used we use this value. */
  68015. +#define FE_DFL_ENV ((__const fenv_t *) -1)
  68016. +
  68017. +#ifdef __USE_GNU
  68018. +/* Floating-point environment where none of the exception is masked. */
  68019. +# define FE_NOMASK_ENV ((__const fenv_t *) -2)
  68020. +#endif
  68021. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/ipc.h uClibc-git/libc/sysdeps/linux/metag/bits/ipc.h
  68022. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/ipc.h 1970-01-01 01:00:00.000000000 +0100
  68023. +++ uClibc-git/libc/sysdeps/linux/metag/bits/ipc.h 2014-07-25 20:36:07.237336943 +0200
  68024. @@ -0,0 +1,55 @@
  68025. +/* Copyright (C) 1995-1999, 2000, 2005, 2007 Free Software Foundation, Inc.
  68026. + This file is part of the GNU C Library.
  68027. +
  68028. + The GNU C Library is free software; you can redistribute it and/or
  68029. + modify it under the terms of the GNU Lesser General Public
  68030. + License as published by the Free Software Foundation; either
  68031. + version 2.1 of the License, or (at your option) any later version.
  68032. +
  68033. + The GNU C Library is distributed in the hope that it will be useful,
  68034. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  68035. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  68036. + Lesser General Public License for more details.
  68037. +
  68038. + You should have received a copy of the GNU Lesser General Public
  68039. + License along with the GNU C Library; if not, write to the Free
  68040. + Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  68041. + Boston, MA 02110-1301, USA. */
  68042. +
  68043. +#ifndef _SYS_IPC_H
  68044. +# error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
  68045. +#endif
  68046. +
  68047. +#include <bits/types.h>
  68048. +
  68049. +/* Mode bits for `msgget', `semget', and `shmget'. */
  68050. +#define IPC_CREAT 01000 /* Create key if key does not exist. */
  68051. +#define IPC_EXCL 02000 /* Fail if key exists. */
  68052. +#define IPC_NOWAIT 04000 /* Return error on wait. */
  68053. +
  68054. +/* Control commands for `msgctl', `semctl', and `shmctl'. */
  68055. +#define IPC_RMID 0 /* Remove identifier. */
  68056. +#define IPC_SET 1 /* Set `ipc_perm' options. */
  68057. +#define IPC_STAT 2 /* Get `ipc_perm' options. */
  68058. +#ifdef __USE_GNU
  68059. +# define IPC_INFO 3 /* See ipcs. */
  68060. +#endif
  68061. +
  68062. +/* Special key values. */
  68063. +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */
  68064. +
  68065. +
  68066. +/* Data structure used to pass permission information to IPC operations. */
  68067. +struct ipc_perm
  68068. + {
  68069. + __key_t __key; /* Key. */
  68070. + __uid_t uid; /* Owner's user ID. */
  68071. + __gid_t gid; /* Owner's group ID. */
  68072. + __uid_t cuid; /* Creator's user ID. */
  68073. + __gid_t cgid; /* Creator's group ID. */
  68074. + unsigned int mode; /* Read/write permission. */
  68075. + unsigned short __seq; /* Sequence number. */
  68076. + unsigned short __pad1;
  68077. + unsigned long __unused1;
  68078. + unsigned long __unused2;
  68079. + };
  68080. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/metag/bits/kernel_types.h
  68081. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/kernel_types.h 1970-01-01 01:00:00.000000000 +0100
  68082. +++ uClibc-git/libc/sysdeps/linux/metag/bits/kernel_types.h 2014-07-25 20:36:07.237336943 +0200
  68083. @@ -0,0 +1,47 @@
  68084. +/* Note that we use the exact same include guard #define names
  68085. + * as asm/posix_types.h. This will avoid gratuitous conflicts
  68086. + * with the posix_types.h kernel header, and will ensure that
  68087. + * our private content, and not the kernel header, will win.
  68088. + * -Erik
  68089. + *
  68090. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  68091. + *
  68092. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  68093. + */
  68094. +
  68095. +#ifndef __ASM_GENERIC_POSIX_TYPES_H
  68096. +#define __ASM_GENERIC_POSIX_TYPES_H
  68097. +
  68098. +typedef unsigned int __kernel_dev_t;
  68099. +typedef unsigned int __kernel_ino_t;
  68100. +typedef unsigned int __kernel_mode_t;
  68101. +typedef unsigned long __kernel_nlink_t;
  68102. +typedef long __kernel_off_t;
  68103. +typedef int __kernel_pid_t;
  68104. +typedef unsigned int __kernel_uid_t;
  68105. +typedef unsigned int __kernel_gid_t;
  68106. +typedef unsigned int __kernel_size_t;
  68107. +typedef int __kernel_ssize_t;
  68108. +typedef long __kernel_ptrdiff_t;
  68109. +typedef long __kernel_time_t;
  68110. +typedef long __kernel_suseconds_t;
  68111. +typedef long __kernel_clock_t;
  68112. +typedef int __kernel_daddr_t;
  68113. +typedef char * __kernel_caddr_t;
  68114. +typedef int __kernel_ipc_pid_t;
  68115. +typedef unsigned short __kernel_uid16_t;
  68116. +typedef unsigned short __kernel_gid16_t;
  68117. +typedef unsigned int __kernel_uid32_t;
  68118. +typedef unsigned int __kernel_gid32_t;
  68119. +typedef unsigned int __kernel_old_uid_t;
  68120. +typedef unsigned int __kernel_old_gid_t;
  68121. +typedef __kernel_dev_t __kernel_old_dev_t;
  68122. +typedef long long __kernel_loff_t;
  68123. +typedef long __kernel_long_t;
  68124. +typedef unsigned long __kernel_ulong_t;
  68125. +
  68126. +typedef struct {
  68127. + int val[2];
  68128. +} __kernel_fsid_t;
  68129. +
  68130. +#endif /* __ASM_GENERIC_POSIX_TYPES_H */
  68131. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/profil-counter.h uClibc-git/libc/sysdeps/linux/metag/bits/profil-counter.h
  68132. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/profil-counter.h 1970-01-01 01:00:00.000000000 +0100
  68133. +++ uClibc-git/libc/sysdeps/linux/metag/bits/profil-counter.h 2014-07-25 20:36:07.237336943 +0200
  68134. @@ -0,0 +1,17 @@
  68135. +/*
  68136. + * Low-level statistical profiling support function. Linux/Meta version.
  68137. + *
  68138. + * Copyright (C) 2013, Imagination Technologies Ltd.
  68139. + *
  68140. + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  68141. + *
  68142. + * Based on the SH version from the GNU C Library.
  68143. + */
  68144. +
  68145. +#include <signal.h>
  68146. +
  68147. +static void
  68148. +profil_counter (int signo, struct sigcontext sc)
  68149. +{
  68150. + profil_count (sc.cbuf.ctx.CurrPC);
  68151. +}
  68152. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/setjmp.h uClibc-git/libc/sysdeps/linux/metag/bits/setjmp.h
  68153. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/setjmp.h 1970-01-01 01:00:00.000000000 +0100
  68154. +++ uClibc-git/libc/sysdeps/linux/metag/bits/setjmp.h 2014-07-25 20:36:07.237336943 +0200
  68155. @@ -0,0 +1,44 @@
  68156. +/*
  68157. + * Copyright (C) 2013, Imagination Technologies Ltd.
  68158. + *
  68159. + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  68160. + */
  68161. +
  68162. +/* Define the machine-dependent type `jmp_buf' */
  68163. +#ifndef _BITS_SETJMP_H
  68164. +#define _BITS_SETJMP_H 1
  68165. +
  68166. +#if !defined _SETJMP_H && !defined _PTHREAD_H
  68167. +# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
  68168. +#endif
  68169. +
  68170. +/*
  68171. + jmp_buf[0] - A0StP
  68172. + jmp_buf[1] - A1GbP
  68173. + jmp_buf[2] - A0FrP
  68174. + jmp_buf[3] - A1LbP
  68175. + jmp_buf[4] - D0FrT
  68176. + jmp_buf[5] - D1RtP
  68177. + jmp_buf[6] - D0.5
  68178. + jmp_buf[7] - D1.5
  68179. + jmp_buf[8] - D0.6
  68180. + jmp_buf[9] - D1.6
  68181. + jmp_buf[10] - D0.7
  68182. + jmp_buf[11] - D1.7
  68183. + */
  68184. +
  68185. +#define _JBLEN 24
  68186. +#if defined (__USE_MISC) || defined (_ASM)
  68187. +#define JB_SP 0
  68188. +#endif
  68189. +
  68190. +#ifndef _ASM
  68191. +typedef int __jmp_buf[_JBLEN] __attribute__((aligned (8)));
  68192. +#endif
  68193. +
  68194. +/* Test if longjmp to JMPBUF would unwind the frame
  68195. + containing a local variable at ADDRESS. */
  68196. +#define _JMPBUF_UNWINDS(jmpbuf, address) \
  68197. + ((void *) (address) > (void *) (jmpbuf)[JB_SP])
  68198. +
  68199. +#endif /* bits/setjmp.h */
  68200. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/sigcontextinfo.h uClibc-git/libc/sysdeps/linux/metag/bits/sigcontextinfo.h
  68201. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/sigcontextinfo.h 1970-01-01 01:00:00.000000000 +0100
  68202. +++ uClibc-git/libc/sysdeps/linux/metag/bits/sigcontextinfo.h 2014-07-25 20:36:07.237336943 +0200
  68203. @@ -0,0 +1,14 @@
  68204. +/*
  68205. + * Copyright (C) 2013, Imagination Technologies Ltd.
  68206. + *
  68207. + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  68208. + *
  68209. + */
  68210. +
  68211. +#define SIGCONTEXT struct sigcontext
  68212. +#define SIGCONTEXT_EXTRA_ARGS
  68213. +#define GET_PC(ctx) ((void *) ctx.cbuf.ctx.CurrPC)
  68214. +#define GET_FRAME(ctx) ((void *) ctx.cbuf.ctx.AX[1].U0)
  68215. +#define GET_STACK(ctx) ((void *) ctx.cbuf.ctx.AX[0].U0)
  68216. +#define CALL_SIGHANDLER(handler, signo, ctx) \
  68217. + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx))
  68218. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/metag/bits/stackinfo.h
  68219. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/stackinfo.h 1970-01-01 01:00:00.000000000 +0100
  68220. +++ uClibc-git/libc/sysdeps/linux/metag/bits/stackinfo.h 2014-07-25 20:36:07.237336943 +0200
  68221. @@ -0,0 +1,28 @@
  68222. +/* Copyright (C) 2001 Free Software Foundation, Inc.
  68223. + This file is part of the GNU C Library.
  68224. +
  68225. + The GNU C Library is free software; you can redistribute it and/or
  68226. + modify it under the terms of the GNU Lesser General Public
  68227. + License as published by the Free Software Foundation; either
  68228. + version 2.1 of the License, or (at your option) any later version.
  68229. +
  68230. + The GNU C Library is distributed in the hope that it will be useful,
  68231. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  68232. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  68233. + Lesser General Public License for more details.
  68234. +
  68235. + You should have received a copy of the GNU Lesser General Public
  68236. + License along with the GNU C Library; if not, write to the Free
  68237. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  68238. + 02111-1307 USA. */
  68239. +
  68240. +/* This file contains a bit of information about the stack allocation
  68241. + of the processor. */
  68242. +
  68243. +#ifndef _STACKINFO_H
  68244. +#define _STACKINFO_H 1
  68245. +
  68246. +/* On Meta the stack grows up. */
  68247. +#define _STACK_GROWS_UP 1
  68248. +
  68249. +#endif /* stackinfo.h */
  68250. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/syscalls.h uClibc-git/libc/sysdeps/linux/metag/bits/syscalls.h
  68251. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/syscalls.h 1970-01-01 01:00:00.000000000 +0100
  68252. +++ uClibc-git/libc/sysdeps/linux/metag/bits/syscalls.h 2014-07-25 20:36:07.237336943 +0200
  68253. @@ -0,0 +1,120 @@
  68254. +/*
  68255. + * Copyright (C) 2013 Imagination Technologies Ltd.
  68256. + *
  68257. + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  68258. + *
  68259. + */
  68260. +
  68261. +#ifndef _BITS_SYSCALLS_H
  68262. +#define _BITS_SYSCALLS_H
  68263. +#ifndef _SYSCALL_H
  68264. +# error "Never use <bits/syscalls.h> directly; include <sys/syscall.h> instead."
  68265. +#endif
  68266. +
  68267. +/*
  68268. + Meta version adapted from the ARM version.
  68269. +*/
  68270. +
  68271. +#define SYS_ify(syscall_name) (__NR_##syscall_name)
  68272. +
  68273. +#ifdef __ASSEMBLER__
  68274. +
  68275. +/* Call a given syscall, with arguments loaded. */
  68276. +#undef DO_CALL
  68277. +#define DO_CALL(syscall_name, args) \
  68278. + MOV D1Re0, #SYS_ify (syscall_name); \
  68279. + SWITCH #0x440001
  68280. +
  68281. +#else
  68282. +
  68283. +#include <errno.h>
  68284. +
  68285. +#undef INLINE_SYSCALL_NCS
  68286. +#define INLINE_SYSCALL_NCS(name, nr, args...) \
  68287. +(__extension__ \
  68288. + ({ unsigned int _inline_sys_result = INTERNAL_SYSCALL_NCS (name, , nr, args); \
  68289. + if (unlikely(INTERNAL_SYSCALL_ERROR_P (_inline_sys_result, ))) \
  68290. + { \
  68291. + __set_errno (INTERNAL_SYSCALL_ERRNO (_inline_sys_result, )); \
  68292. + _inline_sys_result = (unsigned int) -1; \
  68293. + } \
  68294. + (int) _inline_sys_result; }) \
  68295. +)
  68296. +
  68297. +#undef INTERNAL_SYSCALL_DECL
  68298. +#define INTERNAL_SYSCALL_DECL(err) do { } while (0)
  68299. +
  68300. +#undef INTERNAL_SYSCALL_NCS
  68301. +#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
  68302. +(__extension__ \
  68303. + ({unsigned int __sys_result; \
  68304. + { \
  68305. + PREP_ARGS_##nr (args); \
  68306. + register int _result __asm__ ("D0Re0"), _nr __asm__ ("D1Re0"); \
  68307. + LOAD_ARGS_##nr; \
  68308. + _nr = (name); \
  68309. + __asm__ volatile ("SWITCH #0x440001 ! syscall " #name \
  68310. + : "=r" (_result) \
  68311. + : "d" (_nr) ASM_ARGS_##nr \
  68312. + : "memory"); \
  68313. + __sys_result = _result; \
  68314. + } \
  68315. + (int) __sys_result; }) \
  68316. +)
  68317. +
  68318. +#undef INTERNAL_SYSCALL_ERROR_P
  68319. +#define INTERNAL_SYSCALL_ERROR_P(val, err) \
  68320. + ((unsigned int) (val) >= 0xfffff001u)
  68321. +
  68322. +#undef INTERNAL_SYSCALL_ERRNO
  68323. +#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val))
  68324. +
  68325. +#define PREP_ARGS_0()
  68326. +#define PREP_ARGS_1(a1) \
  68327. + int _t1 = (int) (a1); \
  68328. + PREP_ARGS_0 ()
  68329. +#define PREP_ARGS_2(a1, a2) \
  68330. + int _t2 = (int) (a2); \
  68331. + PREP_ARGS_1 (a1)
  68332. +#define PREP_ARGS_3(a1, a2, a3) \
  68333. + int _t3 = (int) (a3); \
  68334. + PREP_ARGS_2 (a1, a2)
  68335. +#define PREP_ARGS_4(a1, a2, a3, a4) \
  68336. + int _t4 = (int) (a4); \
  68337. + PREP_ARGS_3 (a1, a2, a3)
  68338. +#define PREP_ARGS_5(a1, a2, a3, a4, a5) \
  68339. + int _t5 = (int) (a5); \
  68340. + PREP_ARGS_4 (a1, a2, a3, a4)
  68341. +#define PREP_ARGS_6(a1, a2, a3, a4, a5, a6) \
  68342. + int _t6 = (int) (a6); \
  68343. + PREP_ARGS_5 (a1, a2, a3, a4, a5)
  68344. +
  68345. +#define LOAD_ARGS_0
  68346. +#define ASM_ARGS_0
  68347. +#define LOAD_ARGS_1 \
  68348. + register int _a1 __asm__ ("D1Ar1") = (int) (_t1); \
  68349. + LOAD_ARGS_0
  68350. +#define ASM_ARGS_1 ASM_ARGS_0, "d" (_a1)
  68351. +#define LOAD_ARGS_2 \
  68352. + register int _a2 __asm__ ("D0Ar2") = (int) (_t2); \
  68353. + LOAD_ARGS_1
  68354. +#define ASM_ARGS_2 ASM_ARGS_1, "d" (_a2)
  68355. +#define LOAD_ARGS_3 \
  68356. + register int _a3 __asm__ ("D1Ar3") = (int) (_t3); \
  68357. + LOAD_ARGS_2
  68358. +#define ASM_ARGS_3 ASM_ARGS_2, "d" (_a3)
  68359. +#define LOAD_ARGS_4 \
  68360. + register int _a4 __asm__ ("D0Ar4") = (int) (_t4); \
  68361. + LOAD_ARGS_3
  68362. +#define ASM_ARGS_4 ASM_ARGS_3, "d" (_a4)
  68363. +#define LOAD_ARGS_5 \
  68364. + register int _a5 __asm__ ("D1Ar5") = (int) (_t5); \
  68365. + LOAD_ARGS_4
  68366. +#define ASM_ARGS_5 ASM_ARGS_4, "d" (_a5)
  68367. +#define LOAD_ARGS_6 \
  68368. + register int _a6 __asm__ ("D0Ar6") = (int) (_t6); \
  68369. + LOAD_ARGS_5
  68370. +#define ASM_ARGS_6 ASM_ARGS_5, "d" (_a6)
  68371. +
  68372. +#endif /* __ASSEMBLER__ */
  68373. +#endif /* _BITS_SYSCALLS_H */
  68374. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/metag/bits/uClibc_arch_features.h
  68375. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/uClibc_arch_features.h 1970-01-01 01:00:00.000000000 +0100
  68376. +++ uClibc-git/libc/sysdeps/linux/metag/bits/uClibc_arch_features.h 2014-07-25 20:36:07.237336943 +0200
  68377. @@ -0,0 +1,46 @@
  68378. +/*
  68379. + * Track misc arch-specific features that aren't config options
  68380. + *
  68381. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  68382. + *
  68383. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  68384. + */
  68385. +
  68386. +#ifndef _BITS_UCLIBC_ARCH_FEATURES_H
  68387. +#define _BITS_UCLIBC_ARCH_FEATURES_H
  68388. +
  68389. +/* instruction used when calling abort() to kill yourself */
  68390. +/*#define __UCLIBC_ABORT_INSTRUCTION__ "asm instruction"*/
  68391. +#undef __UCLIBC_ABORT_INSTRUCTION__
  68392. +
  68393. +/* can your target use syscall6() for mmap ? */
  68394. +#define __UCLIBC_MMAP_HAS_6_ARGS__
  68395. +
  68396. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  68397. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  68398. +
  68399. +/* does your target have a broken create_module() ? */
  68400. +#undef __UCLIBC_BROKEN_CREATE_MODULE__
  68401. +
  68402. +/* does your target have to worry about older [gs]etrlimit() ? */
  68403. +#undef __UCLIBC_HANDLE_OLDER_RLIMIT__
  68404. +
  68405. +/* does your target have an asm .set ? */
  68406. +#define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__
  68407. +
  68408. +/* define if target doesn't like .global */
  68409. +#undef __UCLIBC_ASM_GLOBAL_DIRECTIVE__
  68410. +
  68411. +/* define if target supports .weak */
  68412. +#define __UCLIBC_HAVE_ASM_WEAK_DIRECTIVE__
  68413. +
  68414. +/* define if target supports .weakext */
  68415. +#undef __UCLIBC_HAVE_ASM_WEAKEXT_DIRECTIVE__
  68416. +
  68417. +/* needed probably only for ppc64 */
  68418. +#undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
  68419. +
  68420. +/* define if target supports IEEE signed zero floats */
  68421. +#define __UCLIBC_HAVE_SIGNED_ZERO__
  68422. +
  68423. +#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
  68424. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/wordsize.h uClibc-git/libc/sysdeps/linux/metag/bits/wordsize.h
  68425. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/bits/wordsize.h 1970-01-01 01:00:00.000000000 +0100
  68426. +++ uClibc-git/libc/sysdeps/linux/metag/bits/wordsize.h 2014-07-25 20:36:07.237336943 +0200
  68427. @@ -0,0 +1,19 @@
  68428. +/* Copyright (C) 1999 Free Software Foundation, Inc.
  68429. + This file is part of the GNU C Library.
  68430. +
  68431. + The GNU C Library is free software; you can redistribute it and/or
  68432. + modify it under the terms of the GNU Lesser General Public
  68433. + License as published by the Free Software Foundation; either
  68434. + version 2.1 of the License, or (at your option) any later version.
  68435. +
  68436. + The GNU C Library is distributed in the hope that it will be useful,
  68437. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  68438. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  68439. + Lesser General Public License for more details.
  68440. +
  68441. + You should have received a copy of the GNU Lesser General Public
  68442. + License along with the GNU C Library; if not, write to the Free
  68443. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  68444. + 02111-1307 USA. */
  68445. +
  68446. +#define __WORDSIZE 32
  68447. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/brk.c uClibc-git/libc/sysdeps/linux/metag/brk.c
  68448. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/brk.c 1970-01-01 01:00:00.000000000 +0100
  68449. +++ uClibc-git/libc/sysdeps/linux/metag/brk.c 2014-07-25 20:36:07.237336943 +0200
  68450. @@ -0,0 +1,38 @@
  68451. +/*
  68452. + * Copyright (C) 2013 Imagination Technologies Ltd.
  68453. + *
  68454. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  68455. + */
  68456. +
  68457. +#include <errno.h>
  68458. +#include <unistd.h>
  68459. +#include <sys/syscall.h>
  68460. +
  68461. +libc_hidden_proto(brk)
  68462. +
  68463. +/* This must be initialized data because commons can't have aliases. */
  68464. +void * __curbrk attribute_hidden = 0;
  68465. +
  68466. +int brk (void *addr)
  68467. +{
  68468. + void *newbrk;
  68469. +
  68470. + __asm__ __volatile__ ("MOV D1Re0,%2\n\t"
  68471. + "MOV D1Ar1,%1\n\t"
  68472. + "SWITCH #0x440001\n\t"
  68473. + "MOV %0,D0Re0"
  68474. + : "=r" (newbrk)
  68475. + : "r" (addr), "K" (__NR_brk)
  68476. + : "D0Re0", "D1Re0", "D1Ar1");
  68477. +
  68478. + __curbrk = newbrk;
  68479. +
  68480. + if (newbrk < addr)
  68481. + {
  68482. + __set_errno (ENOMEM);
  68483. + return -1;
  68484. + }
  68485. +
  68486. + return 0;
  68487. +}
  68488. +libc_hidden_def(brk)
  68489. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/clone.S uClibc-git/libc/sysdeps/linux/metag/clone.S
  68490. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/clone.S 1970-01-01 01:00:00.000000000 +0100
  68491. +++ uClibc-git/libc/sysdeps/linux/metag/clone.S 2014-07-25 20:36:07.237336943 +0200
  68492. @@ -0,0 +1,101 @@
  68493. +! Copyright (C) 2013 Imagination Technologies Ltd.
  68494. +
  68495. +! Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  68496. +
  68497. +! clone() is even more special than fork() as it mucks with stacks
  68498. +! and invokes a function in the right context after its all over.
  68499. +
  68500. +#include <asm/errno.h>
  68501. +#include <asm/unistd.h>
  68502. +
  68503. +#define CLONE_VM 0x00000100
  68504. +#define CLONE_THREAD 0x00010000
  68505. +
  68506. +#ifdef __PIC__
  68507. +#define __CLONE_METAG_LOAD_TP ___metag_load_tp@PLT
  68508. +#else
  68509. +#define __CLONE_METAG_LOAD_TP ___metag_load_tp
  68510. +#endif
  68511. +
  68512. +/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg,
  68513. + pid_t *ptid, struct user_desc *tls, pid_t *ctid); */
  68514. +
  68515. + .text
  68516. + .global __clone
  68517. + .type __clone,function
  68518. +__clone:
  68519. + ! sanity check args
  68520. + MOV D0Re0, #-EINVAL
  68521. + CMP D1Ar1, #0
  68522. + BEQ ___error
  68523. + CMP D0Ar2, #0
  68524. + BEQ ___error
  68525. +
  68526. + ! save function pointer
  68527. + MOV D0FrT, D1Ar1
  68528. +
  68529. + ! do the system call
  68530. + MOV D1Ar1, D1Ar3
  68531. + MOV D1Ar3, D1Ar5
  68532. + MOV D1Ar5, D0Ar6
  68533. + MOV D0Ar6, D0Ar4
  68534. + GETD D0Ar4, [A0StP+#-4]
  68535. +
  68536. + ! new sp is already in D0Ar2
  68537. + MOV D1Re0, #__NR_clone
  68538. + SWITCH #0x440001
  68539. + CMP D0Re0,#0
  68540. + ! Error on -1
  68541. + BLT ___error
  68542. + ! If non-zero we are the parent
  68543. + MOVNE PC, D1RtP
  68544. + ! BRKPNT
  68545. +
  68546. + ! We are the child
  68547. +#ifdef RESET_PID
  68548. + SETL [A0StP++], D0FrT, D1RtP
  68549. + MOVT D0FrT, #HI(CLONE_THREAD)
  68550. + ADD D0FrT, D0FrT, #LO(CLONE_THREAD)
  68551. + ANDS D0FrT, D0FrT, D1Ar1
  68552. + BNZ 3f
  68553. + MOVT D0FrT, #HI(CLONE_VM)
  68554. + ADD D0FrT, D0FrT, #LO(CLONE_VM)
  68555. + ANDS D0FrT, D0FrT, D1Ar1
  68556. + BZ 1f
  68557. + MOV D1Ar1, #-1
  68558. + BA 2f
  68559. +1: MOV D1Re0, #__NR_getpid
  68560. + SWITCH #0x440001
  68561. + MOV D1Ar1, D0Re0
  68562. +2: CALLR D1RtP, __CLONE_METAG_LOAD_TP
  68563. + SUB D0Re0, D0Re0, #TLS_PRE_TCB_SIZE
  68564. + SETD [D0Re0 + #PID], D1Ar1
  68565. + SETD [D0Re0 + #TID], D1Ar1
  68566. +3: GETL D0FrT, D1RtP, [--A0StP]
  68567. +#endif
  68568. + ! Rearrange the function arg and call address from registers
  68569. + MOV D0Ar2, D0FrT
  68570. + MOV D1Ar1, D0Ar6
  68571. + MOV D1RtP, PC
  68572. + ADD D1RtP, D1RtP, #8
  68573. + MOV PC, D0Ar2
  68574. +
  68575. + ! and we are done, passing the return value D0Re0 through D1Ar1
  68576. + MOV D1Ar1, D0Re0
  68577. +#ifdef __PIC__
  68578. + B _exit@PLT
  68579. +#else
  68580. + B _exit
  68581. +#endif
  68582. +
  68583. +___error:
  68584. + MOV D1Ar1, D0Re0
  68585. +#ifdef __PIC__
  68586. + B ___syscall_error@PLT
  68587. +#else
  68588. + B ___syscall_error
  68589. +#endif
  68590. + .size __clone, .-__clone
  68591. +
  68592. +.weak _clone
  68593. +_clone = __clone
  68594. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/crt1.S uClibc-git/libc/sysdeps/linux/metag/crt1.S
  68595. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/crt1.S 1970-01-01 01:00:00.000000000 +0100
  68596. +++ uClibc-git/libc/sysdeps/linux/metag/crt1.S 2014-07-25 20:36:07.237336943 +0200
  68597. @@ -0,0 +1,75 @@
  68598. +! Copyright (C) 2013 Imagination Technologies Ltd.
  68599. +
  68600. +! Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  68601. +
  68602. +
  68603. +#include <asm/unistd.h>
  68604. +
  68605. + .text
  68606. + .global __start
  68607. + .type __start,function
  68608. +__start:
  68609. + MOV D0FrT,A0StP
  68610. + MOV A0FrP,A0StP
  68611. +
  68612. + MOV A0.2,#0
  68613. + MOV A0.3,#0
  68614. +
  68615. + MOV A1.1,#0
  68616. + MOV A1.2,#0
  68617. + MOV A1.3,#0
  68618. +
  68619. + MOV D0.5,#0
  68620. + MOV D0.6,#0
  68621. + MOV D0.7,#0
  68622. +
  68623. + MOV D1.5,#0
  68624. + MOV D1.6,#0
  68625. + MOV D1.7,#0
  68626. +
  68627. + MOV D1Ar3,D0Ar2 ! argv
  68628. + MOV D0Ar2,D1Ar1 ! argc
  68629. + MOV D0Ar6,D0Ar4 ! rtld_fini
  68630. +
  68631. +#ifdef __PIC__
  68632. + ADDT A1LbP,CPC1,#HI(__GLOBAL_OFFSET_TABLE__)
  68633. + ADD A1LbP,A1LbP,#LO(__GLOBAL_OFFSET_TABLE__+4)
  68634. +
  68635. + MOV D1Ar1,A1LbP
  68636. + ADDT D1Ar1,D1Ar1,#HI(_main@GOTOFF)
  68637. + ADD D1Ar1,D1Ar1,#LO(_main@GOTOFF)
  68638. +
  68639. + MOV D0Ar4,A1LbP
  68640. + ADDT D0Ar4,D0Ar4,#HI(__init@GOTOFF)
  68641. + ADD D0Ar4,D0Ar4,#LO(__init@GOTOFF)
  68642. +
  68643. + MOV D1Ar5,A1LbP
  68644. + ADDT D1Ar5,D1Ar5,#HI(__fini@GOTOFF)
  68645. + ADD D1Ar5,D1Ar5,#LO(__fini@GOTOFF)
  68646. +#else
  68647. + MOVT D1Ar1,#HI(_main)
  68648. + ADD D1Ar1,D1Ar1,#LO(_main)
  68649. + MOVT D0Ar4,#HI(__init)
  68650. + ADD D0Ar4,D0Ar4,#LO(__init)
  68651. + MOVT D1Ar5,#HI(__fini)
  68652. + ADD D1Ar5,D1Ar5,#LO(__fini)
  68653. +#endif
  68654. +
  68655. + MOVT D1Re0,#0x80
  68656. +
  68657. + SETL [A0StP++],D0Re0,D1Re0 ! stack_end (8Mb)
  68658. +
  68659. + MOV D1Re0,#0
  68660. + MOV D0Re0,#0
  68661. +
  68662. +#ifdef __PIC__
  68663. + CALLR D1RtP, ___uClibc_main@PLT
  68664. +#else
  68665. + CALLR D1RtP, ___uClibc_main
  68666. +#endif
  68667. +
  68668. + MOV D1Re0,#__NR_exit
  68669. + MOV D1Ar1,#0x1
  68670. + SWITCH #0x440001 ! exit syscall
  68671. +
  68672. + .size __start,.-__start
  68673. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/crti.S uClibc-git/libc/sysdeps/linux/metag/crti.S
  68674. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/crti.S 1970-01-01 01:00:00.000000000 +0100
  68675. +++ uClibc-git/libc/sysdeps/linux/metag/crti.S 2014-07-25 20:36:07.237336943 +0200
  68676. @@ -0,0 +1,19 @@
  68677. +! Copyright (C) 2013 Imagination Technologies Ltd.
  68678. +
  68679. +! Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  68680. +
  68681. + .section .init
  68682. + .global __init
  68683. + .type __init,function
  68684. +__init:
  68685. + MOV D0FrT, A0FrP
  68686. + ADD A0FrP, A0StP, #0
  68687. + SETL [A0StP++], D0.4, D1RtP
  68688. +
  68689. + .section .fini
  68690. + .global __fini
  68691. + .type __fini,function
  68692. +__fini:
  68693. + MOV D0FrT, A0FrP
  68694. + ADD A0FrP, A0StP, #0
  68695. + SETL [A0StP++], D0.4, D1RtP
  68696. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/crtn.S uClibc-git/libc/sysdeps/linux/metag/crtn.S
  68697. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/crtn.S 1970-01-01 01:00:00.000000000 +0100
  68698. +++ uClibc-git/libc/sysdeps/linux/metag/crtn.S 2014-07-25 20:36:07.237336943 +0200
  68699. @@ -0,0 +1,19 @@
  68700. +! Copyright (C) 2013 Imagination Technologies Ltd.
  68701. +
  68702. +! Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  68703. +
  68704. + .section .init
  68705. + .global __init
  68706. + .type __init,function
  68707. + GETL D0.4, D1RtP, [A0FrP+#8++]
  68708. + SUB A0StP, A0FrP, #8
  68709. + MOV A0FrP, D0.4
  68710. + MOV PC, D1RtP
  68711. +
  68712. + .section .fini
  68713. + .global __fini
  68714. + .type __fini,function
  68715. + GETL D0.4, D1RtP, [A0FrP+#8++]
  68716. + SUB A0StP, A0FrP, #8
  68717. + MOV A0FrP, D0.4
  68718. + MOV PC, D1RtP
  68719. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/libc-metag_load_tp.S uClibc-git/libc/sysdeps/linux/metag/libc-metag_load_tp.S
  68720. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/libc-metag_load_tp.S 1970-01-01 01:00:00.000000000 +0100
  68721. +++ uClibc-git/libc/sysdeps/linux/metag/libc-metag_load_tp.S 2014-07-25 20:36:07.237336943 +0200
  68722. @@ -0,0 +1,7 @@
  68723. +/*
  68724. + * Copyright (C) 2013 Imagination Technologies Ltd.
  68725. + *
  68726. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  68727. + */
  68728. +
  68729. +#include <ldso/ldso/metag/metag_load_tp.S>
  68730. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/_longjmp.S uClibc-git/libc/sysdeps/linux/metag/_longjmp.S
  68731. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/_longjmp.S 1970-01-01 01:00:00.000000000 +0100
  68732. +++ uClibc-git/libc/sysdeps/linux/metag/_longjmp.S 2014-07-25 20:36:07.221336859 +0200
  68733. @@ -0,0 +1,25 @@
  68734. +! Copyright (C) 2013 Imagination Technologies Ltd.
  68735. +
  68736. +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  68737. +
  68738. +
  68739. + .text
  68740. + .global ___longjmp
  68741. + .type ___longjmp,function
  68742. +
  68743. +___longjmp:
  68744. + !! If val is 0, set it to 1
  68745. + CMP D0Ar2,#0
  68746. + ADDZ D0Ar2,D0Ar2,#1
  68747. +
  68748. + !! Restore A0/A1 regs
  68749. + MGETL A0.0,A0.1,[D1Ar1++]
  68750. + !! Restore D0/D1 regs
  68751. + MOV A0.3,D1Ar1
  68752. + MGETL D0FrT,D0.5,D0.6,D0.7,[A0.3++]
  68753. + !! Move 2nd argument to return value
  68754. + MOV D0Re0,D0Ar2
  68755. + MOV PC,D1RtP
  68756. + .size ___longjmp,.-___longjmp
  68757. +
  68758. +libc_hidden_def(__longjmp)
  68759. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/Makefile uClibc-git/libc/sysdeps/linux/metag/Makefile
  68760. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/Makefile 1970-01-01 01:00:00.000000000 +0100
  68761. +++ uClibc-git/libc/sysdeps/linux/metag/Makefile 2014-07-25 20:36:07.221336859 +0200
  68762. @@ -0,0 +1,13 @@
  68763. +# Makefile for uClibc
  68764. +#
  68765. +# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
  68766. +#
  68767. +# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  68768. +#
  68769. +
  68770. +top_srcdir=../../../../
  68771. +top_builddir=../../../../
  68772. +all: objs
  68773. +include $(top_builddir)Rules.mak
  68774. +include Makefile.arch
  68775. +include $(top_srcdir)Makerules
  68776. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/Makefile.arch uClibc-git/libc/sysdeps/linux/metag/Makefile.arch
  68777. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/Makefile.arch 1970-01-01 01:00:00.000000000 +0100
  68778. +++ uClibc-git/libc/sysdeps/linux/metag/Makefile.arch 2014-07-25 20:36:07.221336859 +0200
  68779. @@ -0,0 +1,12 @@
  68780. +# Makefile for uClibc
  68781. +#
  68782. +# Copyright (C) 2013 Imagination Technologies Ltd.
  68783. +#
  68784. +# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  68785. +#
  68786. +
  68787. +CSRC-y := brk.c syscall.c metag.c __syscall_error.c
  68788. +
  68789. +SSRC-y := _longjmp.S clone.S setjmp.S vfork.S
  68790. +
  68791. +SSRC-$(UCLIBC_HAS_THREADS_NATIVE) += libc-metag_load_tp.S
  68792. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/metag.c uClibc-git/libc/sysdeps/linux/metag/metag.c
  68793. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/metag.c 1970-01-01 01:00:00.000000000 +0100
  68794. +++ uClibc-git/libc/sysdeps/linux/metag/metag.c 2014-07-25 20:36:07.237336943 +0200
  68795. @@ -0,0 +1,11 @@
  68796. +/*
  68797. + * Copyright (C) 2013 Imagination Technologies Ltd.
  68798. + *
  68799. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  68800. + */
  68801. +
  68802. +#include <errno.h>
  68803. +#include <sys/syscall.h>
  68804. +
  68805. +_syscall2(int,metag_setglobalbit,char *,addr,int,mask)
  68806. +_syscall1(void,metag_set_fpu_flags,unsigned int,flags)
  68807. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/setjmp.S uClibc-git/libc/sysdeps/linux/metag/setjmp.S
  68808. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/setjmp.S 1970-01-01 01:00:00.000000000 +0100
  68809. +++ uClibc-git/libc/sysdeps/linux/metag/setjmp.S 2014-07-25 20:36:07.237336943 +0200
  68810. @@ -0,0 +1,52 @@
  68811. +/*
  68812. + * Copyright (C) 2013 Imagination Technologies Ltd.
  68813. + *
  68814. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  68815. + */
  68816. +
  68817. +!!! setjmp and variants
  68818. + .text
  68819. +
  68820. +!! int _setjmp (jmp_buf __env)
  68821. +!! Store the calling environment in ENV, not saving the signal mask.
  68822. +!! Return 0. */
  68823. + .global __setjmp
  68824. + .type __setjmp,function
  68825. +__setjmp:
  68826. + MOV D0Ar2,#0
  68827. + B ___sigsetjmp1
  68828. + .size __setjmp,.-__setjmp
  68829. +
  68830. +!! int setjmp (jmp_buf __env)
  68831. +!! Store the calling environment in ENV, also saving the signal mask.
  68832. +!! Return 0. */
  68833. + .global _setjmp
  68834. + .type _setjmp,function
  68835. +_setjmp:
  68836. + MOV D0Ar2,#1
  68837. + !! fall through to __sigsetjmp
  68838. + .size _setjmp,.-_setjmp
  68839. +
  68840. +!! int __sigsetjmp (jmp_buf __env, int __savemask)
  68841. +!! Store the calling environment in ENV, also saving the
  68842. +!! signal mask if SAVEMASK is nonzero. Return 0.
  68843. +!! This is the internal name for `sigsetjmp'.
  68844. + .global ___sigsetjmp
  68845. + .type ___sigsetjmp,function
  68846. +___sigsetjmp:
  68847. +___sigsetjmp1:
  68848. + !! Save A0/A1 regs
  68849. + MSETL [D1Ar1++],A0.0,A0.1
  68850. + !! Use A0.3 as temp
  68851. + MOV A0.3,D1Ar1
  68852. + !! Rewind D1Ar1 that was modified above
  68853. + SUB D1Ar1,D1Ar1,#(2*8)
  68854. + !! Save D0/D1 regs
  68855. + MSETL [A0.3++],D0FrT,D0.5,D0.6,D0.7
  68856. + !! Tail call __sigjmp_save
  68857. +#ifdef __PIC__
  68858. + B ___sigjmp_save@PLT
  68859. +#else
  68860. + B ___sigjmp_save
  68861. +#endif
  68862. + .size ___sigsetjmp,.-___sigsetjmp
  68863. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/sys/io.h uClibc-git/libc/sysdeps/linux/metag/sys/io.h
  68864. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/sys/io.h 1970-01-01 01:00:00.000000000 +0100
  68865. +++ uClibc-git/libc/sysdeps/linux/metag/sys/io.h 2014-07-25 20:36:07.245336985 +0200
  68866. @@ -0,0 +1,48 @@
  68867. +/* Copyright (C) 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
  68868. + This file is part of the GNU C Library.
  68869. +
  68870. + The GNU C Library is free software; you can redistribute it and/or
  68871. + modify it under the terms of the GNU Lesser General Public
  68872. + License as published by the Free Software Foundation; either
  68873. + version 2.1 of the License, or (at your option) any later version.
  68874. +
  68875. + The GNU C Library is distributed in the hope that it will be useful,
  68876. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  68877. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  68878. + Lesser General Public License for more details.
  68879. +
  68880. + You should have received a copy of the GNU Lesser General Public
  68881. + License along with the GNU C Library; if not, write to the Free
  68882. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  68883. + 02111-1307 USA. */
  68884. +
  68885. +#ifndef _SYS_IO_H
  68886. +
  68887. +#define _SYS_IO_H 1
  68888. +#include <features.h>
  68889. +
  68890. +__BEGIN_DECLS
  68891. +
  68892. +/* If TURN_ON is TRUE, request for permission to do direct i/o on the
  68893. + port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
  68894. + permission off for that range. This call requires root privileges. */
  68895. +extern int ioperm (unsigned long int __from, unsigned long int __num,
  68896. + int __turn_on) __THROW;
  68897. +
  68898. +/* Set the I/O privilege level to LEVEL. If LEVEL is nonzero,
  68899. + permission to access any I/O port is granted. This call requires
  68900. + root privileges. */
  68901. +extern int iopl (int __level) __THROW;
  68902. +
  68903. +/* The functions that actually perform reads and writes. */
  68904. +extern unsigned char inb (unsigned long int port) __THROW;
  68905. +extern unsigned short int inw (unsigned long int port) __THROW;
  68906. +extern unsigned long int inl (unsigned long int port) __THROW;
  68907. +
  68908. +extern void outb (unsigned char value, unsigned long int port) __THROW;
  68909. +extern void outw (unsigned short value, unsigned long int port) __THROW;
  68910. +extern void outl (unsigned long value, unsigned long int port) __THROW;
  68911. +
  68912. +__END_DECLS
  68913. +
  68914. +#endif /* _SYS_IO_H */
  68915. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/sys/procfs.h uClibc-git/libc/sysdeps/linux/metag/sys/procfs.h
  68916. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/sys/procfs.h 1970-01-01 01:00:00.000000000 +0100
  68917. +++ uClibc-git/libc/sysdeps/linux/metag/sys/procfs.h 2014-07-25 20:36:07.245336985 +0200
  68918. @@ -0,0 +1,121 @@
  68919. +/* Copyright (C) 1996, 1997, 1999, 2007 Free Software Foundation, Inc.
  68920. + This file is part of the GNU C Library.
  68921. +
  68922. + The GNU C Library is free software; you can redistribute it and/or
  68923. + modify it under the terms of the GNU Lesser General Public
  68924. + License as published by the Free Software Foundation; either
  68925. + version 2.1 of the License, or (at your option) any later version.
  68926. +
  68927. + The GNU C Library is distributed in the hope that it will be useful,
  68928. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  68929. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  68930. + Lesser General Public License for more details.
  68931. +
  68932. + You should have received a copy of the GNU Lesser General Public
  68933. + License along with the GNU C Library; if not, write to the Free
  68934. + Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  68935. + Boston, MA 02110-1301, USA. */
  68936. +
  68937. +#ifndef _SYS_PROCFS_H
  68938. +#define _SYS_PROCFS_H 1
  68939. +
  68940. +/* This is somewhat modelled after the file of the same name on SVR4
  68941. + systems. It provides a definition of the core file format for ELF
  68942. + used on Linux. It doesn't have anything to do with the /proc file
  68943. + system, even though Linux has one.
  68944. +
  68945. + Anyway, the whole purpose of this file is for GDB and GDB only.
  68946. + Don't read too much into it. Don't use it for anything other than
  68947. + GDB unless you know what you are doing. */
  68948. +
  68949. +#include <features.h>
  68950. +#include <sys/time.h>
  68951. +#include <sys/types.h>
  68952. +#include <sys/user.h>
  68953. +
  68954. +__BEGIN_DECLS
  68955. +
  68956. +/* Type for a general-purpose register. */
  68957. +typedef unsigned long elf_greg_t;
  68958. +
  68959. +#define ELF_NGREG 30
  68960. +typedef elf_greg_t elf_gregset_t[ELF_NGREG];
  68961. +
  68962. +/* Register set for the floating-point registers. */
  68963. +#define ELF_NFPREG 18
  68964. +typedef unsigned long elf_fpreg_t;
  68965. +typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
  68966. +
  68967. +/* Signal info. */
  68968. +struct elf_siginfo
  68969. + {
  68970. + int si_signo; /* Signal number. */
  68971. + int si_code; /* Extra code. */
  68972. + int si_errno; /* Errno. */
  68973. + };
  68974. +
  68975. +/* Definitions to generate Intel SVR4-like core files. These mostly
  68976. + have the same names as the SVR4 types with "elf_" tacked on the
  68977. + front to prevent clashes with Linux definitions, and the typedef
  68978. + forms have been avoided. This is mostly like the SVR4 structure,
  68979. + but more Linuxy, with things that Linux does not support and which
  68980. + GDB doesn't really use excluded. */
  68981. +
  68982. +struct elf_prstatus
  68983. + {
  68984. + struct elf_siginfo pr_info; /* Info associated with signal. */
  68985. + short int pr_cursig; /* Current signal. */
  68986. + unsigned long int pr_sigpend; /* Set of pending signals. */
  68987. + unsigned long int pr_sighold; /* Set of held signals. */
  68988. + __pid_t pr_pid;
  68989. + __pid_t pr_ppid;
  68990. + __pid_t pr_pgrp;
  68991. + __pid_t pr_sid;
  68992. + struct timeval pr_utime; /* User time. */
  68993. + struct timeval pr_stime; /* System time. */
  68994. + struct timeval pr_cutime; /* Cumulative user time. */
  68995. + struct timeval pr_cstime; /* Cumulative system time. */
  68996. + elf_gregset_t pr_reg; /* GP registers. */
  68997. + int pr_fpvalid; /* True if math copro being used. */
  68998. + };
  68999. +
  69000. +
  69001. +#define ELF_PRARGSZ (80) /* Number of chars for args. */
  69002. +
  69003. +struct elf_prpsinfo
  69004. + {
  69005. + char pr_state; /* Numeric process state. */
  69006. + char pr_sname; /* Char for pr_state. */
  69007. + char pr_zomb; /* Zombie. */
  69008. + char pr_nice; /* Nice val. */
  69009. + unsigned long int pr_flag; /* Flags. */
  69010. + unsigned short int pr_uid;
  69011. + unsigned short int pr_gid;
  69012. + int pr_pid, pr_ppid, pr_pgrp, pr_sid;
  69013. + /* Lots missing */
  69014. + char pr_fname[16]; /* Filename of executable. */
  69015. + char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
  69016. + };
  69017. +
  69018. +/* The rest of this file provides the types for emulation of the
  69019. + Solaris <proc_service.h> interfaces that should be implemented by
  69020. + users of libthread_db. */
  69021. +
  69022. +/* Addresses. */
  69023. +typedef void *psaddr_t;
  69024. +
  69025. +/* Register sets. Linux has different names. */
  69026. +typedef elf_gregset_t prgregset_t;
  69027. +typedef elf_fpregset_t prfpregset_t;
  69028. +
  69029. +/* We don't have any differences between processes and threads,
  69030. + therefore have only one PID type. */
  69031. +typedef __pid_t lwpid_t;
  69032. +
  69033. +/* Process status and info. In the end we do provide typedefs for them. */
  69034. +typedef struct elf_prstatus prstatus_t;
  69035. +typedef struct elf_prpsinfo prpsinfo_t;
  69036. +
  69037. +__END_DECLS
  69038. +
  69039. +#endif /* sys/procfs.h */
  69040. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/sys/ucontext.h uClibc-git/libc/sysdeps/linux/metag/sys/ucontext.h
  69041. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/sys/ucontext.h 1970-01-01 01:00:00.000000000 +0100
  69042. +++ uClibc-git/libc/sysdeps/linux/metag/sys/ucontext.h 2014-07-25 20:36:07.249337006 +0200
  69043. @@ -0,0 +1,96 @@
  69044. +/* Copyright (C) 1998, 1999, 2001, 2006 Free Software Foundation, Inc.
  69045. + This file is part of the GNU C Library.
  69046. +
  69047. + The GNU C Library is free software; you can redistribute it and/or
  69048. + modify it under the terms of the GNU Lesser General Public
  69049. + License as published by the Free Software Foundation; either
  69050. + version 2.1 of the License, or (at your option) any later version.
  69051. +
  69052. + The GNU C Library is distributed in the hope that it will be useful,
  69053. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  69054. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  69055. + Lesser General Public License for more details.
  69056. +
  69057. + You should have received a copy of the GNU Lesser General Public
  69058. + License along with the GNU C Library; if not, write to the Free
  69059. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69060. + 02111-1307 USA. */
  69061. +
  69062. +/* Meta ABI compliant context switching support. */
  69063. +
  69064. +#ifndef _SYS_UCONTEXT_H
  69065. +#define _SYS_UCONTEXT_H 1
  69066. +
  69067. +#include <features.h>
  69068. +#include <signal.h>
  69069. +#include <sys/procfs.h>
  69070. +
  69071. +/* We need the signal context definitions even if they are not used
  69072. + included in <signal.h>. */
  69073. +#include <bits/sigcontext.h>
  69074. +
  69075. +typedef int greg_t;
  69076. +
  69077. +/* Number of general registers. */
  69078. +#define NGREG 18
  69079. +
  69080. +/* Container for all general registers. */
  69081. +typedef elf_gregset_t gregset_t;
  69082. +
  69083. +/* Number of each register is the `gregset_t' array. */
  69084. +enum
  69085. +{
  69086. + R0 = 0,
  69087. +#define R0 R0
  69088. + R1 = 1,
  69089. +#define R1 R1
  69090. + R2 = 2,
  69091. +#define R2 R2
  69092. + R3 = 3,
  69093. +#define R3 R3
  69094. + R4 = 4,
  69095. +#define R4 R4
  69096. + R5 = 5,
  69097. +#define R5 R5
  69098. + R6 = 6,
  69099. +#define R6 R6
  69100. + R7 = 7,
  69101. +#define R7 R7
  69102. + R8 = 8,
  69103. +#define R8 R8
  69104. + R9 = 9,
  69105. +#define R9 R9
  69106. + R10 = 10,
  69107. +#define R10 R10
  69108. + R11 = 11,
  69109. +#define R11 R11
  69110. + R12 = 12,
  69111. +#define R12 R12
  69112. + R13 = 13,
  69113. +#define R13 R13
  69114. + R14 = 14,
  69115. +#define R14 R14
  69116. + R15 = 15
  69117. +#define R15 R15
  69118. +};
  69119. +
  69120. +/* Structure to describe FPU registers. */
  69121. +typedef elf_fpregset_t fpregset_t;
  69122. +
  69123. +/* Context to describe whole processor state. This only describes
  69124. + the core registers; coprocessor registers get saved elsewhere
  69125. + (e.g. in uc_regspace, or somewhere unspecified on the stack
  69126. + during non-RT signal handlers). */
  69127. +typedef struct sigcontext mcontext_t;
  69128. +
  69129. +/* Userlevel context. */
  69130. +typedef struct ucontext
  69131. + {
  69132. + unsigned long uc_flags;
  69133. + struct ucontext *uc_link;
  69134. + stack_t uc_stack;
  69135. + mcontext_t uc_mcontext;
  69136. + __sigset_t uc_sigmask;
  69137. + } ucontext_t;
  69138. +
  69139. +#endif /* sys/ucontext.h */
  69140. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/sys/user.h uClibc-git/libc/sysdeps/linux/metag/sys/user.h
  69141. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/sys/user.h 1970-01-01 01:00:00.000000000 +0100
  69142. +++ uClibc-git/libc/sysdeps/linux/metag/sys/user.h 2014-07-25 20:36:07.249337006 +0200
  69143. @@ -0,0 +1,7 @@
  69144. +/*
  69145. + * This file is not needed, but in practice gdb might try to include it.
  69146. + *
  69147. + * Copyright (C) 2013 Imagination Technologies Ltd.
  69148. + *
  69149. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  69150. + */
  69151. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/syscall.c uClibc-git/libc/sysdeps/linux/metag/syscall.c
  69152. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/syscall.c 1970-01-01 01:00:00.000000000 +0100
  69153. +++ uClibc-git/libc/sysdeps/linux/metag/syscall.c 2014-07-25 20:36:07.249337006 +0200
  69154. @@ -0,0 +1,40 @@
  69155. +/* syscall for META/uClibc
  69156. + *
  69157. + * Copyright (C) 2013 Imagination Technologies
  69158. + *
  69159. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  69160. + */
  69161. +
  69162. +#include <features.h>
  69163. +#include <errno.h>
  69164. +#include <sys/types.h>
  69165. +#include <sys/syscall.h>
  69166. +
  69167. +long syscall(long sysnum,
  69168. + long arg1, long arg2, long arg3,
  69169. + long arg4, long arg5, long arg6)
  69170. +{
  69171. +
  69172. + register long __call __asm__ ("D1Re0") = sysnum;
  69173. + register long __res __asm__ ("D0Re0");
  69174. + register long __a __asm__ ("D1Ar1") = arg1;
  69175. + register long __b __asm__ ("D0Ar2") = arg2;
  69176. + register long __c __asm__ ("D1Ar3") = arg3;
  69177. + register long __d __asm__ ("D0Ar4") = arg4;
  69178. + register long __e __asm__ ("D1Ar5") = arg5;
  69179. + register long __f __asm__ ("D0Ar6") = arg6;
  69180. +
  69181. +
  69182. + __asm__ __volatile__ ("SWITCH #0x440001"
  69183. + : "=d" (__res)
  69184. + : "d" (__call), "d" (__a), "d" (__b),
  69185. + "d" (__c), "d" (__d), "d" (__e) , "d" (__f)
  69186. + : "memory");
  69187. +
  69188. + if(__res >= (unsigned long) -4095) {
  69189. + long err = __res;
  69190. + (*__errno_location()) = (-err);
  69191. + __res = (unsigned long) -1;
  69192. + }
  69193. + return (long) __res;
  69194. +}
  69195. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/__syscall_error.c uClibc-git/libc/sysdeps/linux/metag/__syscall_error.c
  69196. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/__syscall_error.c 1970-01-01 01:00:00.000000000 +0100
  69197. +++ uClibc-git/libc/sysdeps/linux/metag/__syscall_error.c 2014-07-25 20:36:07.221336859 +0200
  69198. @@ -0,0 +1,18 @@
  69199. +/* Wrapper for setting errno.
  69200. + *
  69201. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  69202. + *
  69203. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  69204. + */
  69205. +
  69206. +#include <errno.h>
  69207. +#include <features.h>
  69208. +
  69209. +/* This routine is jumped to by all the syscall handlers, to stash
  69210. + * an error number into errno. */
  69211. +int __syscall_error(int err_no) attribute_hidden;
  69212. +int __syscall_error(int err_no)
  69213. +{
  69214. + __set_errno(-err_no);
  69215. + return -1;
  69216. +}
  69217. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/sysdep.h uClibc-git/libc/sysdeps/linux/metag/sysdep.h
  69218. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/sysdep.h 1970-01-01 01:00:00.000000000 +0100
  69219. +++ uClibc-git/libc/sysdeps/linux/metag/sysdep.h 2014-07-25 20:36:07.249337006 +0200
  69220. @@ -0,0 +1,59 @@
  69221. +/*
  69222. + * Assembler macros for Meta.
  69223. + *
  69224. + * Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  69225. + */
  69226. +
  69227. +#include <common/sysdep.h>
  69228. +
  69229. +#include <features.h>
  69230. +#include <libc-internal.h>
  69231. +
  69232. +#ifdef __ASSEMBLER__
  69233. +
  69234. +#ifdef SHARED
  69235. +#define PLTJMP(_x) _x##@PLT
  69236. +#else
  69237. +#define PLTJMP(_x) _x
  69238. +#endif
  69239. +
  69240. +#undef PSEUDO_END
  69241. +#define PSEUDO_END(name) \
  69242. + SYSCALL_ERROR_HANDLER \
  69243. + END (name)
  69244. +
  69245. +#if defined NOT_IN_libc
  69246. +# define SYSCALL_ERROR __local_syscall_error
  69247. +# ifdef RTLD_PRIVATE_ERRNO
  69248. +# define SYSCALL_ERROR_HANDLER \
  69249. +__local_syscall_error: \
  69250. + NEG D0Re0, D0Re0; \
  69251. + ADDT D1Re0, CPC1, #HI(_rtld_errno); \
  69252. + ADD D1Re0, D1Re0, #LO(_rtld_errno) + 4; \
  69253. + SETD [D1Re0], D0Re0; \
  69254. + NEG D0Re0, #0x1; \
  69255. + MOV PC, D1RtP;
  69256. +# else
  69257. +# define SYSCALL_ERROR_HANDLER \
  69258. +__local_syscall_error: \
  69259. + MOV D1Re0, D1RtP; \
  69260. + SETL [A0StP++], D0Re0, D1Re0; \
  69261. + CALLR D1RtP, PLTJMP(___errno_location); \
  69262. + GETD D1Re0, [A0StP+#-8]; \
  69263. + NEG D1Re0, D1Re0; \
  69264. + SETD [D0Re0], D1Re0; \
  69265. + NEG D0Re0, #0x1; \
  69266. + GETD D1RtP, [A0StP+#-4]; \
  69267. + SUB A0StP, A0StP, #0x8; \
  69268. + MOV PC, D1RtP;
  69269. +# endif
  69270. +#else
  69271. +# define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
  69272. +# define SYSCALL_ERROR ___syscall_error
  69273. +#endif
  69274. +
  69275. +#endif /* __ASSEMBLER __*/
  69276. +
  69277. +/* Pointer mangling is not yet supported for META. */
  69278. +#define PTR_MANGLE(var) (void) (var)
  69279. +#define PTR_DEMANGLE(var) (void) (var)
  69280. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/metag/vfork.S uClibc-git/libc/sysdeps/linux/metag/vfork.S
  69281. --- uClibc-0.9.33.2/libc/sysdeps/linux/metag/vfork.S 1970-01-01 01:00:00.000000000 +0100
  69282. +++ uClibc-git/libc/sysdeps/linux/metag/vfork.S 2014-07-25 20:36:07.249337006 +0200
  69283. @@ -0,0 +1,67 @@
  69284. +! Copyright (C) 2013 Imagination Technologies Ltd.
  69285. +
  69286. +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  69287. +
  69288. +#include <asm/unistd.h>
  69289. +
  69290. +#define _ERRNO_H
  69291. +#include <bits/errno.h>
  69292. +#include <sys/syscall.h>
  69293. +
  69294. +#ifndef SAVE_PID
  69295. +#define SAVE_PID
  69296. +#endif
  69297. +
  69298. +#ifndef RESTORE_PID
  69299. +#define RESTORE_PID
  69300. +#endif
  69301. +
  69302. +#ifdef __NR_vfork
  69303. +#define __VFORK_NR __NR_vfork
  69304. +#else
  69305. +#define __VFORK_NR __NR_fork
  69306. +#endif
  69307. +
  69308. +/* Clone the calling process, but without copying the whole address space.
  69309. + The calling process is suspended until the new process exits or is
  69310. + replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
  69311. + and the process ID of the new process to the old process. */
  69312. +
  69313. + .balign 4
  69314. + .global ___vfork
  69315. + .hidden ___vfork
  69316. + .type ___vfork, @function
  69317. +___vfork:
  69318. +
  69319. + SAVE_PID
  69320. +
  69321. + MOV D1Ar1, #0x4111 /* CLONE_VM | CLONE_VFORK | SIGCHLD */
  69322. + MOV D0Ar2, #0
  69323. + MOV D1Ar3, #0
  69324. + MOV D0Ar4, #0
  69325. + MOV D1Ar5, #0
  69326. + MOV D0Ar6, #0
  69327. + MOV D1Re0, #__NR_clone
  69328. + SWITCH #0x440001
  69329. +
  69330. + RESTORE_PID
  69331. +
  69332. + MOVT D1Re0, #HI(-4096)
  69333. + ADD D1Re0, D1Re0, #LO(-4096)
  69334. + CMP D1Re0, D0Re0
  69335. + BCS error
  69336. +
  69337. + /* Syscall worked. Return to child/parent */
  69338. + MOV PC, D1RtP
  69339. +
  69340. +error:
  69341. + MOV D1Ar1, D0Re0
  69342. +#ifdef __PIC__
  69343. + B ___syscall_error@PLT
  69344. +#else
  69345. + B ___syscall_error
  69346. +#endif
  69347. + .size ___vfork,.-___vfork
  69348. +
  69349. +weak_alias(__vfork,vfork)
  69350. +libc_hidden_weak(vfork)
  69351. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/fcntl.h uClibc-git/libc/sysdeps/linux/microblaze/bits/fcntl.h
  69352. --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  69353. +++ uClibc-git/libc/sysdeps/linux/microblaze/bits/fcntl.h 2014-07-25 20:36:07.265337089 +0200
  69354. @@ -13,9 +13,8 @@
  69355. Lesser General Public License for more details.
  69356. You should have received a copy of the GNU Lesser General Public
  69357. - License along with the GNU C Library; if not, write to the Free
  69358. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69359. - 02111-1307 USA. */
  69360. + License along with the GNU C Library; if not, see
  69361. + <http://www.gnu.org/licenses/>. */
  69362. #ifndef _FCNTL_H
  69363. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  69364. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/microblaze/bits/kernel_types.h
  69365. --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
  69366. +++ uClibc-git/libc/sysdeps/linux/microblaze/bits/kernel_types.h 2014-07-25 20:36:07.265337089 +0200
  69367. @@ -44,6 +44,8 @@
  69368. typedef unsigned int __kernel_old_uid_t;
  69369. typedef unsigned int __kernel_old_gid_t;
  69370. typedef unsigned int __kernel_old_dev_t;
  69371. +typedef long __kernel_long_t;
  69372. +typedef unsigned long __kernel_ulong_t;
  69373. #ifdef __GNUC__
  69374. typedef long long __kernel_loff_t;
  69375. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/poll.h uClibc-git/libc/sysdeps/linux/microblaze/bits/poll.h
  69376. --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/poll.h 2012-05-15 09:20:09.000000000 +0200
  69377. +++ uClibc-git/libc/sysdeps/linux/microblaze/bits/poll.h 2014-07-25 20:36:07.265337089 +0200
  69378. @@ -12,9 +12,8 @@
  69379. Lesser General Public License for more details.
  69380. You should have received a copy of the GNU Lesser General Public
  69381. - License along with the GNU C Library; if not, write to the Free
  69382. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69383. - 02111-1307 USA. */
  69384. + License along with the GNU C Library; if not, see
  69385. + <http://www.gnu.org/licenses/>. */
  69386. #ifndef _SYS_POLL_H
  69387. # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
  69388. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/setjmp.h uClibc-git/libc/sysdeps/linux/microblaze/bits/setjmp.h
  69389. --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  69390. +++ uClibc-git/libc/sysdeps/linux/microblaze/bits/setjmp.h 2014-07-25 20:36:07.265337089 +0200
  69391. @@ -19,7 +19,6 @@
  69392. # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
  69393. #endif
  69394. -#ifndef _ASM
  69395. typedef struct
  69396. {
  69397. /* Stack pointer. */
  69398. @@ -35,13 +34,5 @@
  69399. /* Callee-saved registers r18-r31. */
  69400. int __regs[14];
  69401. } __jmp_buf[1];
  69402. -#endif
  69403. -
  69404. -#define JB_SIZE (4 * 18)
  69405. -
  69406. -/* Test if longjmp to JMPBUF would unwind the frame
  69407. - containing a local variable at ADDRESS. */
  69408. -#define _JMPBUF_UNWINDS(jmpbuf, address) \
  69409. - ((void *) (address) < (void *) (jmpbuf)[0].__sp)
  69410. #endif /* bits/setjmp.h */
  69411. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/microblaze/bits/stackinfo.h
  69412. --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  69413. +++ uClibc-git/libc/sysdeps/linux/microblaze/bits/stackinfo.h 2014-07-25 20:36:07.265337089 +0200
  69414. @@ -12,9 +12,8 @@
  69415. Lesser General Public License for more details.
  69416. You should have received a copy of the GNU Lesser General Public
  69417. - License along with the GNU C Library; if not, write to the Free
  69418. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69419. - 02111-1307 USA. */
  69420. + License along with the GNU C Library; if not, see
  69421. + <http://www.gnu.org/licenses/>. */
  69422. /* This file contains a bit of information about the stack allocation
  69423. of the processor. */
  69424. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/microblaze/bits/uClibc_arch_features.h
  69425. --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  69426. +++ uClibc-git/libc/sysdeps/linux/microblaze/bits/uClibc_arch_features.h 2014-07-25 20:36:07.265337089 +0200
  69427. @@ -12,8 +12,8 @@
  69428. /* can your target use syscall6() for mmap ? */
  69429. #define __UCLIBC_MMAP_HAS_6_ARGS__
  69430. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  69431. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  69432. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  69433. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  69434. /* does your target have a broken create_module() ? */
  69435. #undef __UCLIBC_BROKEN_CREATE_MODULE__
  69436. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/uClibc_page.h uClibc-git/libc/sysdeps/linux/microblaze/bits/uClibc_page.h
  69437. --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/uClibc_page.h 2012-05-15 09:20:09.000000000 +0200
  69438. +++ uClibc-git/libc/sysdeps/linux/microblaze/bits/uClibc_page.h 2014-07-25 20:36:07.265337089 +0200
  69439. @@ -11,8 +11,8 @@
  69440. * Library General Public License for more details.
  69441. *
  69442. * You should have received a copy of the GNU Library General Public
  69443. - * License along with this library; if not, write to the Free
  69444. - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  69445. + * License along with this library; if not, see
  69446. + * <http://www.gnu.org/licenses/>.
  69447. */
  69448. /* Supply an architecture specific value for PAGE_SIZE and friends. */
  69449. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/wordsize.h uClibc-git/libc/sysdeps/linux/microblaze/bits/wordsize.h
  69450. --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
  69451. +++ uClibc-git/libc/sysdeps/linux/microblaze/bits/wordsize.h 2014-07-25 20:36:07.265337089 +0200
  69452. @@ -12,8 +12,7 @@
  69453. Lesser General Public License for more details.
  69454. You should have received a copy of the GNU Lesser General Public
  69455. - License along with the GNU C Library; if not, write to the Free
  69456. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69457. - 02111-1307 USA. */
  69458. + License along with the GNU C Library; if not, see
  69459. + <http://www.gnu.org/licenses/>. */
  69460. #define __WORDSIZE 32
  69461. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/jmpbuf-offsets.h uClibc-git/libc/sysdeps/linux/microblaze/jmpbuf-offsets.h
  69462. --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
  69463. +++ uClibc-git/libc/sysdeps/linux/microblaze/jmpbuf-offsets.h 2014-07-25 20:36:07.265337089 +0200
  69464. @@ -0,0 +1,6 @@
  69465. +/*
  69466. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  69467. + *
  69468. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  69469. + */
  69470. +#define JB_SIZE (4 * 18)
  69471. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/microblaze/jmpbuf-unwind.h
  69472. --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  69473. +++ uClibc-git/libc/sysdeps/linux/microblaze/jmpbuf-unwind.h 2014-07-25 20:36:07.265337089 +0200
  69474. @@ -0,0 +1,11 @@
  69475. +/*
  69476. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  69477. + *
  69478. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  69479. + */
  69480. +#include <setjmp.h>
  69481. +
  69482. +/* Test if longjmp to JMPBUF would unwind the frame
  69483. + containing a local variable at ADDRESS. */
  69484. +#define _JMPBUF_UNWINDS(jmpbuf, address) \
  69485. + ((void *) (address) < (void *) (jmpbuf)[0].__sp)
  69486. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/__longjmp.S uClibc-git/libc/sysdeps/linux/microblaze/__longjmp.S
  69487. --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
  69488. +++ uClibc-git/libc/sysdeps/linux/microblaze/__longjmp.S 2014-07-25 20:36:07.257337048 +0200
  69489. @@ -12,10 +12,6 @@
  69490. * Written by Miles Bader <miles@gnu.org>
  69491. */
  69492. -#define _SETJMP_H
  69493. -#define _ASM
  69494. -#include <bits/setjmp.h>
  69495. -
  69496. #include <libc-symbols.h>
  69497. .text
  69498. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/Makefile uClibc-git/libc/sysdeps/linux/microblaze/Makefile
  69499. --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/Makefile 2012-05-15 09:20:09.000000000 +0200
  69500. +++ uClibc-git/libc/sysdeps/linux/microblaze/Makefile 2014-07-25 20:36:07.257337048 +0200
  69501. @@ -13,8 +13,7 @@
  69502. # details.
  69503. #
  69504. # You should have received a copy of the GNU Library General Public License
  69505. -# along with this program; if not, write to the Free Software Foundation, Inc.,
  69506. -# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  69507. +# along with this program; if not, see <http://www.gnu.org/licenses/>.
  69508. top_srcdir=../../../../
  69509. top_builddir=../../../../
  69510. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/Makefile.arch uClibc-git/libc/sysdeps/linux/microblaze/Makefile.arch
  69511. --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
  69512. +++ uClibc-git/libc/sysdeps/linux/microblaze/Makefile.arch 2014-07-25 20:36:07.257337048 +0200
  69513. @@ -5,8 +5,8 @@
  69514. #
  69515. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  69516. -CSRC := mmap.c clone.c fixdfsi.c
  69517. +CSRC-y := clone.c fixdfsi.c
  69518. -SSRC := setjmp.S __longjmp.S vfork.S
  69519. +SSRC-y := setjmp.S __longjmp.S vfork.S
  69520. ARCH_HEADERS := floatlib.h
  69521. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/mmap.c uClibc-git/libc/sysdeps/linux/microblaze/mmap.c
  69522. --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/mmap.c 2012-05-15 09:20:09.000000000 +0200
  69523. +++ uClibc-git/libc/sysdeps/linux/microblaze/mmap.c 1970-01-01 01:00:00.000000000 +0100
  69524. @@ -1,16 +0,0 @@
  69525. -/* Use new style mmap for microblaze */
  69526. -/*
  69527. - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  69528. - *
  69529. - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  69530. - */
  69531. -
  69532. -#include <unistd.h>
  69533. -#include <errno.h>
  69534. -#include <sys/mman.h>
  69535. -#include <sys/syscall.h>
  69536. -
  69537. -
  69538. -_syscall6 (__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot,
  69539. - int, flags, int, fd, __off_t, offset)
  69540. -libc_hidden_def(mmap)
  69541. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/setjmp.S uClibc-git/libc/sysdeps/linux/microblaze/setjmp.S
  69542. --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/setjmp.S 2012-05-15 09:20:09.000000000 +0200
  69543. +++ uClibc-git/libc/sysdeps/linux/microblaze/setjmp.S 2014-07-25 20:36:07.265337089 +0200
  69544. @@ -25,13 +25,8 @@
  69545. Lesser General Public License for more details.
  69546. You should have received a copy of the GNU Lesser General Public
  69547. - License along with the GNU C Library; if not, write to the Free
  69548. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69549. - 02111-1307 USA. */
  69550. -
  69551. -#define _SETJMP_H
  69552. -#define _ASM
  69553. -#include <bits/setjmp.h>
  69554. + License along with the GNU C Library; if not, see
  69555. + <http://www.gnu.org/licenses/>. */
  69556. #include <libc-symbols.h>
  69557. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/sys/procfs.h uClibc-git/libc/sysdeps/linux/microblaze/sys/procfs.h
  69558. --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  69559. +++ uClibc-git/libc/sysdeps/linux/microblaze/sys/procfs.h 2014-07-25 20:36:07.281337173 +0200
  69560. @@ -12,9 +12,8 @@
  69561. Lesser General Public License for more details.
  69562. You should have received a copy of the GNU Lesser General Public
  69563. - License along with the GNU C Library; if not, write to the Free
  69564. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69565. - 02111-1307 USA. */
  69566. + License along with the GNU C Library; if not, see
  69567. + <http://www.gnu.org/licenses/>. */
  69568. #ifndef _SYS_PROCFS_H
  69569. #define _SYS_PROCFS_H 1
  69570. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/sys/ptrace.h uClibc-git/libc/sysdeps/linux/microblaze/sys/ptrace.h
  69571. --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/sys/ptrace.h 2012-05-15 09:20:09.000000000 +0200
  69572. +++ uClibc-git/libc/sysdeps/linux/microblaze/sys/ptrace.h 2014-07-25 20:36:07.281337173 +0200
  69573. @@ -13,9 +13,8 @@
  69574. Lesser General Public License for more details.
  69575. You should have received a copy of the GNU Lesser General Public
  69576. - License along with the GNU C Library; if not, write to the Free
  69577. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69578. - 02111-1307 USA. */
  69579. + License along with the GNU C Library; if not, see
  69580. + <http://www.gnu.org/licenses/>. */
  69581. #ifndef _SYS_PTRACE_H
  69582. #define _SYS_PTRACE_H 1
  69583. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/sys/ucontext.h uClibc-git/libc/sysdeps/linux/microblaze/sys/ucontext.h
  69584. --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  69585. +++ uClibc-git/libc/sysdeps/linux/microblaze/sys/ucontext.h 2014-07-25 20:36:07.281337173 +0200
  69586. @@ -12,9 +12,8 @@
  69587. Lesser General Public License for more details.
  69588. You should have received a copy of the GNU Lesser General Public
  69589. - License along with the GNU C Library; if not, write to the Free
  69590. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69591. - 02111-1307 USA. */
  69592. + License along with the GNU C Library; if not, see
  69593. + <http://www.gnu.org/licenses/>. */
  69594. #ifndef _SYS_UCONTEXT_H
  69595. #define _SYS_UCONTEXT_H 1
  69596. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/sys/user.h uClibc-git/libc/sysdeps/linux/microblaze/sys/user.h
  69597. --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/sys/user.h 2012-05-15 09:20:09.000000000 +0200
  69598. +++ uClibc-git/libc/sysdeps/linux/microblaze/sys/user.h 2014-07-25 20:36:07.281337173 +0200
  69599. @@ -12,9 +12,8 @@
  69600. Lesser General Public License for more details.
  69601. You should have received a copy of the GNU Lesser General Public
  69602. - License along with the GNU C Library; if not, write to the Free
  69603. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69604. - 02111-1307 USA. */
  69605. + License along with the GNU C Library; if not, see
  69606. + <http://www.gnu.org/licenses/>. */
  69607. #ifndef _SYS_USER_H
  69608. #define _SYS_USER_H 1
  69609. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/vfork.S uClibc-git/libc/sysdeps/linux/microblaze/vfork.S
  69610. --- uClibc-0.9.33.2/libc/sysdeps/linux/microblaze/vfork.S 2012-05-15 09:20:09.000000000 +0200
  69611. +++ uClibc-git/libc/sysdeps/linux/microblaze/vfork.S 2014-07-25 20:36:07.281337173 +0200
  69612. @@ -13,21 +13,15 @@
  69613. * Microblaze port by John Williams
  69614. */
  69615. -#define _ERRNO_H 1
  69616. -#include <bits/errno.h>
  69617. -#define _SYSCALL_H
  69618. -#include <bits/sysnum.h>
  69619. -
  69620. -#include <libc-symbols.h>
  69621. +#include <sys/syscall.h>
  69622. /* Clone the calling process, but without copying the whole address space.
  69623. The calling process is suspended until the new process exits or is
  69624. replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
  69625. and the process ID of the new process to the old process. */
  69626. -.global C_SYMBOL_NAME(errno)
  69627. -
  69628. .globl __vfork
  69629. + .hidden __vfork
  69630. .align 4
  69631. __vfork:
  69632. addi r12, r0, SYS_vfork
  69633. @@ -50,4 +44,4 @@
  69634. .size __vfork, .-__vfork
  69635. weak_alias(__vfork,vfork)
  69636. -libc_hidden_weak(vfork)
  69637. +libc_hidden_def(vfork)
  69638. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/atomic.h uClibc-git/libc/sysdeps/linux/mips/bits/atomic.h
  69639. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
  69640. +++ uClibc-git/libc/sysdeps/linux/mips/bits/atomic.h 2014-07-25 20:36:07.309337320 +0200
  69641. @@ -13,9 +13,8 @@
  69642. Lesser General Public License for more details.
  69643. You should have received a copy of the GNU Lesser General Public
  69644. - License along with the GNU C Library; if not, write to the Free
  69645. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69646. - 02111-1307 USA. */
  69647. + License along with the GNU C Library; if not, see
  69648. + <http://www.gnu.org/licenses/>. */
  69649. #ifndef _MIPS_BITS_ATOMIC_H
  69650. #define _MIPS_BITS_ATOMIC_H 1
  69651. @@ -84,10 +83,10 @@
  69652. in which values are returned. */
  69653. #define __arch_compare_and_exchange_xxx_8_int(mem, newval, oldval, rel, acq) \
  69654. - (abort (), __prev = __cmp = 0)
  69655. + (abort (), __prev = 0, __cmp = 0)
  69656. #define __arch_compare_and_exchange_xxx_16_int(mem, newval, oldval, rel, acq) \
  69657. - (abort (), __prev = __cmp = 0)
  69658. + (abort (), __prev = 0, __cmp = 0)
  69659. #define __arch_compare_and_exchange_xxx_32_int(mem, newval, oldval, rel, acq) \
  69660. __asm__ __volatile__ ( \
  69661. @@ -111,7 +110,7 @@
  69662. #if _MIPS_SIM == _ABIO32
  69663. /* We can't do an atomic 64-bit operation in O32. */
  69664. #define __arch_compare_and_exchange_xxx_64_int(mem, newval, oldval, rel, acq) \
  69665. - (abort (), __prev = __cmp = 0)
  69666. + (abort (), __prev = 0, __cmp = 0)
  69667. #else
  69668. #define __arch_compare_and_exchange_xxx_64_int(mem, newval, oldval, rel, acq) \
  69669. __asm__ __volatile__ ("\n" \
  69670. @@ -136,22 +135,22 @@
  69671. /* For all "bool" routines, we return FALSE if exchange succesful. */
  69672. #define __arch_compare_and_exchange_bool_8_int(mem, new, old, rel, acq) \
  69673. -({ __typeof (*mem) __prev; int __cmp; \
  69674. +({ __typeof (*mem) __prev attribute_unused; int __cmp; \
  69675. __arch_compare_and_exchange_xxx_8_int(mem, new, old, rel, acq); \
  69676. !__cmp; })
  69677. #define __arch_compare_and_exchange_bool_16_int(mem, new, old, rel, acq) \
  69678. -({ __typeof (*mem) __prev; int __cmp; \
  69679. +({ __typeof (*mem) __prev attribute_unused; int __cmp; \
  69680. __arch_compare_and_exchange_xxx_16_int(mem, new, old, rel, acq); \
  69681. !__cmp; })
  69682. #define __arch_compare_and_exchange_bool_32_int(mem, new, old, rel, acq) \
  69683. -({ __typeof (*mem) __prev; int __cmp; \
  69684. +({ __typeof (*mem) __prev attribute_unused; int __cmp; \
  69685. __arch_compare_and_exchange_xxx_32_int(mem, new, old, rel, acq); \
  69686. !__cmp; })
  69687. #define __arch_compare_and_exchange_bool_64_int(mem, new, old, rel, acq) \
  69688. -({ __typeof (*mem) __prev; int __cmp; \
  69689. +({ __typeof (*mem) __prev attribute_unused; int __cmp; \
  69690. __arch_compare_and_exchange_xxx_64_int(mem, new, old, rel, acq); \
  69691. !__cmp; })
  69692. @@ -159,22 +158,22 @@
  69693. successful or not. */
  69694. #define __arch_compare_and_exchange_val_8_int(mem, new, old, rel, acq) \
  69695. -({ __typeof (*mem) __prev; int __cmp; \
  69696. +({ __typeof (*mem) __prev attribute_unused; int __cmp attribute_unused; \
  69697. __arch_compare_and_exchange_xxx_8_int(mem, new, old, rel, acq); \
  69698. (__typeof (*mem))__prev; })
  69699. #define __arch_compare_and_exchange_val_16_int(mem, new, old, rel, acq) \
  69700. -({ __typeof (*mem) __prev; int __cmp; \
  69701. +({ __typeof (*mem) __prev attribute_unused; int __cmp attribute_unused; \
  69702. __arch_compare_and_exchange_xxx_16_int(mem, new, old, rel, acq); \
  69703. (__typeof (*mem))__prev; })
  69704. #define __arch_compare_and_exchange_val_32_int(mem, new, old, rel, acq) \
  69705. -({ __typeof (*mem) __prev; int __cmp; \
  69706. +({ __typeof (*mem) __prev attribute_unused; int __cmp attribute_unused; \
  69707. __arch_compare_and_exchange_xxx_32_int(mem, new, old, rel, acq); \
  69708. (__typeof (*mem))__prev; })
  69709. #define __arch_compare_and_exchange_val_64_int(mem, new, old, rel, acq) \
  69710. -({ __typeof (*mem) __prev; int __cmp; \
  69711. +({ __typeof (*mem) __prev attribute_unused; int __cmp attribute_unused; \
  69712. __arch_compare_and_exchange_xxx_64_int(mem, new, old, rel, acq); \
  69713. (__typeof (*mem))__prev; })
  69714. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/dirent.h uClibc-git/libc/sysdeps/linux/mips/bits/dirent.h
  69715. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/dirent.h 2012-05-15 09:20:09.000000000 +0200
  69716. +++ uClibc-git/libc/sysdeps/linux/mips/bits/dirent.h 2014-07-25 20:36:07.309337320 +0200
  69717. @@ -12,9 +12,8 @@
  69718. Lesser General Public License for more details.
  69719. You should have received a copy of the GNU Lesser General Public
  69720. - License along with the GNU C Library; if not, write to the Free
  69721. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69722. - 02111-1307 USA. */
  69723. + License along with the GNU C Library; if not, see
  69724. + <http://www.gnu.org/licenses/>. */
  69725. #ifndef _DIRENT_H
  69726. # error "Never use <bits/dirent.h> directly; include <dirent.h> instead."
  69727. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/dlfcn.h uClibc-git/libc/sysdeps/linux/mips/bits/dlfcn.h
  69728. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/dlfcn.h 2012-05-15 09:20:09.000000000 +0200
  69729. +++ uClibc-git/libc/sysdeps/linux/mips/bits/dlfcn.h 2014-07-25 20:36:07.309337320 +0200
  69730. @@ -14,9 +14,8 @@
  69731. Lesser General Public License for more details.
  69732. You should have received a copy of the GNU Lesser General Public
  69733. - License along with the GNU C Library; if not, write to the Free
  69734. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69735. - 02111-1307 USA. */
  69736. + License along with the GNU C Library; if not, see
  69737. + <http://www.gnu.org/licenses/>. */
  69738. #ifndef _DLFCN_H
  69739. # error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
  69740. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/eventfd.h uClibc-git/libc/sysdeps/linux/mips/bits/eventfd.h
  69741. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/eventfd.h 1970-01-01 01:00:00.000000000 +0100
  69742. +++ uClibc-git/libc/sysdeps/linux/mips/bits/eventfd.h 2014-07-25 20:36:07.309337320 +0200
  69743. @@ -0,0 +1,31 @@
  69744. +/* Copyright (C) 2007-2013 Free Software Foundation, Inc.
  69745. + This file is part of the GNU C Library.
  69746. +
  69747. + The GNU C Library is free software; you can redistribute it and/or
  69748. + modify it under the terms of the GNU Lesser General Public
  69749. + License as published by the Free Software Foundation; either
  69750. + version 2.1 of the License, or (at your option) any later version.
  69751. +
  69752. + The GNU C Library is distributed in the hope that it will be useful,
  69753. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  69754. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  69755. + Lesser General Public License for more details.
  69756. +
  69757. + You should have received a copy of the GNU Lesser General Public
  69758. + License along with the GNU C Library; if not, see
  69759. + <http://www.gnu.org/licenses/>. */
  69760. +
  69761. +#ifndef _SYS_EVENTFD_H
  69762. +# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
  69763. +#endif
  69764. +
  69765. +/* Flags for eventfd. */
  69766. +enum
  69767. + {
  69768. + EFD_SEMAPHORE = 00000001,
  69769. +#define EFD_SEMAPHORE EFD_SEMAPHORE
  69770. + EFD_CLOEXEC = 02000000,
  69771. +#define EFD_CLOEXEC EFD_CLOEXEC
  69772. + EFD_NONBLOCK = 00000200
  69773. +#define EFD_NONBLOCK EFD_NONBLOCK
  69774. + };
  69775. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/fcntl.h uClibc-git/libc/sysdeps/linux/mips/bits/fcntl.h
  69776. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  69777. +++ uClibc-git/libc/sysdeps/linux/mips/bits/fcntl.h 2014-07-25 20:36:07.309337320 +0200
  69778. @@ -14,9 +14,8 @@
  69779. Lesser General Public License for more details.
  69780. You should have received a copy of the GNU Lesser General Public
  69781. - License along with the GNU C Library; if not, write to the Free
  69782. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69783. - 02111-1307 USA. */
  69784. + License along with the GNU C Library; if not, see
  69785. + <http://www.gnu.org/licenses/>. */
  69786. #ifndef _FCNTL_H
  69787. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  69788. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/fenv.h uClibc-git/libc/sysdeps/linux/mips/bits/fenv.h
  69789. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
  69790. +++ uClibc-git/libc/sysdeps/linux/mips/bits/fenv.h 2014-07-25 20:36:07.309337320 +0200
  69791. @@ -12,9 +12,8 @@
  69792. Lesser General Public License for more details.
  69793. You should have received a copy of the GNU Lesser General Public
  69794. - License along with the GNU C Library; if not, write to the Free
  69795. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69796. - 02111-1307 USA. */
  69797. + License along with the GNU C Library; if not, see
  69798. + <http://www.gnu.org/licenses/>. */
  69799. #ifndef _FENV_H
  69800. # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
  69801. @@ -69,9 +68,9 @@
  69802. fenv_t;
  69803. /* If the default argument is used we use this value. */
  69804. -#define FE_DFL_ENV ((__const fenv_t *) -1)
  69805. +#define FE_DFL_ENV ((const fenv_t *) -1)
  69806. #ifdef __USE_GNU
  69807. /* Floating-point environment where none of the exception is masked. */
  69808. -# define FE_NOMASK_ENV ((__const fenv_t *) -2)
  69809. +# define FE_NOMASK_ENV ((const fenv_t *) -2)
  69810. #endif
  69811. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/ioctl-types.h uClibc-git/libc/sysdeps/linux/mips/bits/ioctl-types.h
  69812. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/ioctl-types.h 2012-05-15 09:20:09.000000000 +0200
  69813. +++ uClibc-git/libc/sysdeps/linux/mips/bits/ioctl-types.h 2014-07-25 20:36:07.309337320 +0200
  69814. @@ -13,9 +13,8 @@
  69815. Lesser General Public License for more details.
  69816. You should have received a copy of the GNU Lesser General Public
  69817. - License along with the GNU C Library; if not, write to the Free
  69818. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69819. - 02111-1307 USA. */
  69820. + License along with the GNU C Library; if not, see
  69821. + <http://www.gnu.org/licenses/>. */
  69822. #ifndef _SYS_IOCTL_H
  69823. # error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
  69824. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/ipc.h uClibc-git/libc/sysdeps/linux/mips/bits/ipc.h
  69825. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/ipc.h 2012-05-15 09:20:09.000000000 +0200
  69826. +++ uClibc-git/libc/sysdeps/linux/mips/bits/ipc.h 2014-07-25 20:36:07.309337320 +0200
  69827. @@ -12,9 +12,8 @@
  69828. Lesser General Public License for more details.
  69829. You should have received a copy of the GNU Lesser General Public
  69830. - License along with the GNU C Library; if not, write to the Free
  69831. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69832. - 02111-1307 USA. */
  69833. + License along with the GNU C Library; if not, see
  69834. + <http://www.gnu.org/licenses/>. */
  69835. #ifndef _SYS_IPC_H
  69836. # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
  69837. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/kernel_sigaction.h uClibc-git/libc/sysdeps/linux/mips/bits/kernel_sigaction.h
  69838. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/kernel_sigaction.h 2012-05-15 09:20:09.000000000 +0200
  69839. +++ uClibc-git/libc/sysdeps/linux/mips/bits/kernel_sigaction.h 2014-07-25 20:36:07.309337320 +0200
  69840. @@ -24,12 +24,4 @@
  69841. #endif
  69842. };
  69843. -/* In uclibc, userspace struct sigaction is identical to
  69844. - * "new" struct kernel_sigaction (one from the Linux 2.1.68 kernel).
  69845. - * See sigaction.h
  69846. - */
  69847. -
  69848. -extern int __syscall_rt_sigaction (int, const struct sigaction *,
  69849. - struct sigaction *, size_t) attribute_hidden;
  69850. -
  69851. #endif
  69852. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/mips/bits/kernel_types.h
  69853. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
  69854. +++ uClibc-git/libc/sysdeps/linux/mips/bits/kernel_types.h 2014-07-25 20:36:07.309337320 +0200
  69855. @@ -32,6 +32,8 @@
  69856. typedef __kernel_uid_t __kernel_old_uid_t;
  69857. typedef __kernel_gid_t __kernel_old_gid_t;
  69858. typedef __kernel_dev_t __kernel_old_dev_t;
  69859. +typedef long __kernel_long_t;
  69860. +typedef unsigned long __kernel_ulong_t;
  69861. typedef long long __kernel_loff_t;
  69862. #else
  69863. typedef unsigned int __kernel_dev_t;
  69864. @@ -68,6 +70,8 @@
  69865. typedef __kernel_uid_t __kernel_old_uid_t;
  69866. typedef __kernel_gid_t __kernel_old_gid_t;
  69867. typedef __kernel_dev_t __kernel_old_dev_t;
  69868. +typedef long __kernel_long_t;
  69869. +typedef unsigned long __kernel_ulong_t;
  69870. typedef long long __kernel_loff_t;
  69871. #endif
  69872. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/mathdef.h uClibc-git/libc/sysdeps/linux/mips/bits/mathdef.h
  69873. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
  69874. +++ uClibc-git/libc/sysdeps/linux/mips/bits/mathdef.h 2014-07-25 20:36:07.309337320 +0200
  69875. @@ -13,9 +13,8 @@
  69876. Lesser General Public License for more details.
  69877. You should have received a copy of the GNU Lesser General Public
  69878. - License along with the GNU C Library; if not, write to the Free
  69879. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69880. - 02111-1307 USA. */
  69881. + License along with the GNU C Library; if not, see
  69882. + <http://www.gnu.org/licenses/>. */
  69883. #if !defined _MATH_H && !defined _COMPLEX_H
  69884. # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
  69885. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/mman.h uClibc-git/libc/sysdeps/linux/mips/bits/mman.h
  69886. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/mman.h 2012-05-15 09:20:09.000000000 +0200
  69887. +++ uClibc-git/libc/sysdeps/linux/mips/bits/mman.h 2014-07-25 20:36:07.309337320 +0200
  69888. @@ -14,9 +14,8 @@
  69889. Lesser General Public License for more details.
  69890. You should have received a copy of the GNU Lesser General Public
  69891. - License along with the GNU C Library; if not, write to the Free
  69892. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69893. - 02111-1307 USA. */
  69894. + License along with the GNU C Library; if not, see
  69895. + <http://www.gnu.org/licenses/>. */
  69896. #ifndef _SYS_MMAN_H
  69897. # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
  69898. @@ -66,7 +65,7 @@
  69899. # define MAP_LOCKED 0x8000 /* pages are locked */
  69900. # define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
  69901. # define MAP_NONBLOCK 0x20000 /* do not block on IO */
  69902. -# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could
  69903. +# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could
  69904. be uninitialized. */
  69905. #endif
  69906. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/msq.h uClibc-git/libc/sysdeps/linux/mips/bits/msq.h
  69907. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/msq.h 2012-05-15 09:20:09.000000000 +0200
  69908. +++ uClibc-git/libc/sysdeps/linux/mips/bits/msq.h 2014-07-25 20:36:07.309337320 +0200
  69909. @@ -12,9 +12,8 @@
  69910. Lesser General Public License for more details.
  69911. You should have received a copy of the GNU Lesser General Public
  69912. - License along with the GNU C Library; if not, write to the Free
  69913. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69914. - 02111-1307 USA. */
  69915. + License along with the GNU C Library; if not, see
  69916. + <http://www.gnu.org/licenses/>. */
  69917. #ifndef _SYS_MSG_H
  69918. # error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
  69919. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/poll.h uClibc-git/libc/sysdeps/linux/mips/bits/poll.h
  69920. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/poll.h 2012-05-15 09:20:09.000000000 +0200
  69921. +++ uClibc-git/libc/sysdeps/linux/mips/bits/poll.h 2014-07-25 20:36:07.309337320 +0200
  69922. @@ -12,9 +12,8 @@
  69923. Lesser General Public License for more details.
  69924. You should have received a copy of the GNU Lesser General Public
  69925. - License along with the GNU C Library; if not, write to the Free
  69926. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69927. - 02111-1307 USA. */
  69928. + License along with the GNU C Library; if not, see
  69929. + <http://www.gnu.org/licenses/>. */
  69930. #ifndef _SYS_POLL_H
  69931. # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
  69932. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/resource.h uClibc-git/libc/sysdeps/linux/mips/bits/resource.h
  69933. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/resource.h 2012-05-15 09:20:09.000000000 +0200
  69934. +++ uClibc-git/libc/sysdeps/linux/mips/bits/resource.h 2014-07-25 20:36:07.309337320 +0200
  69935. @@ -14,9 +14,8 @@
  69936. Lesser General Public License for more details.
  69937. You should have received a copy of the GNU Lesser General Public
  69938. - License along with the GNU C Library; if not, write to the Free
  69939. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69940. - 02111-1307 USA. */
  69941. + License along with the GNU C Library; if not, see
  69942. + <http://www.gnu.org/licenses/>. */
  69943. #ifndef _SYS_RESOURCE_H
  69944. # error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
  69945. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/sem.h uClibc-git/libc/sysdeps/linux/mips/bits/sem.h
  69946. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/sem.h 2012-05-15 09:20:09.000000000 +0200
  69947. +++ uClibc-git/libc/sysdeps/linux/mips/bits/sem.h 2014-07-25 20:36:07.309337320 +0200
  69948. @@ -12,9 +12,8 @@
  69949. Lesser General Public License for more details.
  69950. You should have received a copy of the GNU Lesser General Public
  69951. - License along with the GNU C Library; if not, write to the Free
  69952. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69953. - 02111-1307 USA. */
  69954. + License along with the GNU C Library; if not, see
  69955. + <http://www.gnu.org/licenses/>. */
  69956. #ifndef _SYS_SEM_H
  69957. # error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
  69958. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/setjmp.h uClibc-git/libc/sysdeps/linux/mips/bits/setjmp.h
  69959. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  69960. +++ uClibc-git/libc/sysdeps/linux/mips/bits/setjmp.h 2014-07-25 20:36:07.309337320 +0200
  69961. @@ -13,9 +13,8 @@
  69962. Lesser General Public License for more details.
  69963. You should have received a copy of the GNU Lesser General Public
  69964. - License along with the GNU C Library; if not, write to the Free
  69965. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  69966. - 02111-1307 USA. */
  69967. + License along with the GNU C Library; if not, see
  69968. + <http://www.gnu.org/licenses/>. */
  69969. #ifndef _BITS_SETJMP_H
  69970. #define _BITS_SETJMP_H 1
  69971. @@ -26,13 +25,19 @@
  69972. #include <sgidefs.h>
  69973. +#if _MIPS_SIM == _MIPS_SIM_ABI32
  69974. +#define ptrsize void *
  69975. +#else
  69976. +#define ptrsize long long
  69977. +#endif
  69978. +
  69979. typedef struct
  69980. {
  69981. /* Program counter. */
  69982. - void * __pc;
  69983. + ptrsize __pc;
  69984. /* Stack pointer. */
  69985. - void * __sp;
  69986. + ptrsize __sp;
  69987. /* Callee-saved registers s0 through s7. */
  69988. #if _MIPS_SIM == _MIPS_SIM_ABI32
  69989. @@ -42,10 +47,10 @@
  69990. #endif
  69991. /* The frame pointer. */
  69992. - void * __fp;
  69993. + ptrsize __fp;
  69994. /* The global pointer. */
  69995. - void * __gp;
  69996. + ptrsize __gp;
  69997. /* Floating point status register. */
  69998. int __fpc_csr;
  69999. @@ -58,15 +63,4 @@
  70000. #endif /* N32 || O32 */
  70001. } __jmp_buf[1];
  70002. -#ifdef __USE_MISC
  70003. -/* Offset to the program counter in `jmp_buf'. */
  70004. -# define JB_PC 0
  70005. -#endif
  70006. -
  70007. -
  70008. -/* Test if longjmp to JMPBUF would unwind the frame
  70009. - containing a local variable at ADDRESS. */
  70010. -#define _JMPBUF_UNWINDS(jmpbuf, address) \
  70011. - ((void *) (address) < (void *) (jmpbuf)[0].__sp)
  70012. -
  70013. #endif /* bits/setjmp.h */
  70014. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/shm.h uClibc-git/libc/sysdeps/linux/mips/bits/shm.h
  70015. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
  70016. +++ uClibc-git/libc/sysdeps/linux/mips/bits/shm.h 2014-07-25 20:36:07.309337320 +0200
  70017. @@ -12,9 +12,8 @@
  70018. Lesser General Public License for more details.
  70019. You should have received a copy of the GNU Lesser General Public
  70020. - License along with the GNU C Library; if not, write to the Free
  70021. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  70022. - 02111-1307 USA. */
  70023. + License along with the GNU C Library; if not, see
  70024. + <http://www.gnu.org/licenses/>. */
  70025. #ifndef _SYS_SHM_H
  70026. # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
  70027. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/sigaction.h uClibc-git/libc/sysdeps/linux/mips/bits/sigaction.h
  70028. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/sigaction.h 2012-05-15 09:20:09.000000000 +0200
  70029. +++ uClibc-git/libc/sysdeps/linux/mips/bits/sigaction.h 2014-07-25 20:36:07.313337341 +0200
  70030. @@ -14,9 +14,8 @@
  70031. Lesser General Public License for more details.
  70032. You should have received a copy of the GNU Lesser General Public
  70033. - License along with the GNU C Library; if not, write to the Free
  70034. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  70035. - 02111-1307 USA. */
  70036. + License along with the GNU C Library; if not, see
  70037. + <http://www.gnu.org/licenses/>. */
  70038. #ifndef _SIGNAL_H
  70039. # error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
  70040. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/sigcontext.h uClibc-git/libc/sysdeps/linux/mips/bits/sigcontext.h
  70041. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/sigcontext.h 2012-05-15 09:20:09.000000000 +0200
  70042. +++ uClibc-git/libc/sysdeps/linux/mips/bits/sigcontext.h 2014-07-25 20:36:07.313337341 +0200
  70043. @@ -12,9 +12,8 @@
  70044. Lesser General Public License for more details.
  70045. You should have received a copy of the GNU Lesser General Public
  70046. - License along with the GNU C Library; if not, write to the Free
  70047. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  70048. - 02111-1307 USA. */
  70049. + License along with the GNU C Library; if not, see
  70050. + <http://www.gnu.org/licenses/>. */
  70051. #ifndef _BITS_SIGCONTEXT_H
  70052. #define _BITS_SIGCONTEXT_H 1
  70053. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/sigcontextinfo.h uClibc-git/libc/sysdeps/linux/mips/bits/sigcontextinfo.h
  70054. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
  70055. +++ uClibc-git/libc/sysdeps/linux/mips/bits/sigcontextinfo.h 2014-07-25 20:36:07.313337341 +0200
  70056. @@ -13,9 +13,8 @@
  70057. Lesser General Public License for more details.
  70058. You should have received a copy of the GNU Lesser General Public
  70059. - License along with the GNU C Library; if not, write to the Free
  70060. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  70061. - 02111-1307 USA. */
  70062. + License along with the GNU C Library; if not, see
  70063. + <http://www.gnu.org/licenses/>. */
  70064. #include <sgidefs.h>
  70065. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/siginfo.h uClibc-git/libc/sysdeps/linux/mips/bits/siginfo.h
  70066. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/siginfo.h 2012-05-15 09:20:09.000000000 +0200
  70067. +++ uClibc-git/libc/sysdeps/linux/mips/bits/siginfo.h 2014-07-25 20:36:07.313337341 +0200
  70068. @@ -14,9 +14,8 @@
  70069. Lesser General Public License for more details.
  70070. You should have received a copy of the GNU Lesser General Public
  70071. - License along with the GNU C Library; if not, write to the Free
  70072. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  70073. - 02111-1307 USA. */
  70074. + License along with the GNU C Library; if not, see
  70075. + <http://www.gnu.org/licenses/>. */
  70076. #if !defined _SIGNAL_H && !defined __need_siginfo_t \
  70077. && !defined __need_sigevent_t
  70078. @@ -265,8 +264,11 @@
  70079. /* Structure to transport application-defined values with signals. */
  70080. # define __SIGEV_MAX_SIZE 64
  70081. -# define __SIGEV_HEAD_SIZE (sizeof(long) + 2*sizeof(int))
  70082. -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE - __SIGEV_HEAD_SIZE) / sizeof (int))
  70083. +# if __WORDSIZE == 64
  70084. +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
  70085. +# else
  70086. +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
  70087. +# endif
  70088. /* Forward declaration of the `pthread_attr_t' type. */
  70089. struct __pthread_attr_s;
  70090. @@ -282,6 +284,10 @@
  70091. {
  70092. int _pad[__SIGEV_PAD_SIZE];
  70093. + /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the
  70094. + thread to receive the signal. */
  70095. + __pid_t _tid;
  70096. +
  70097. struct
  70098. {
  70099. void (*_function) (sigval_t); /* Function to start. */
  70100. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/signum.h uClibc-git/libc/sysdeps/linux/mips/bits/signum.h
  70101. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/signum.h 2012-05-15 09:20:09.000000000 +0200
  70102. +++ uClibc-git/libc/sysdeps/linux/mips/bits/signum.h 2014-07-25 20:36:07.313337341 +0200
  70103. @@ -13,9 +13,8 @@
  70104. Lesser General Public License for more details.
  70105. You should have received a copy of the GNU Lesser General Public
  70106. - License along with the GNU C Library; if not, write to the Free
  70107. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  70108. - 02111-1307 USA. */
  70109. + License along with the GNU C Library; if not, see
  70110. + <http://www.gnu.org/licenses/>. */
  70111. #ifdef _SIGNAL_H
  70112. @@ -54,7 +53,20 @@
  70113. #define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */
  70114. #define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */
  70115. -/* Biggest signal number + 1 (including real-time signals). */
  70116. -#define _NSIG 129
  70117. +/* MIPS is special by having 128 signals.
  70118. + * All (?) other architectures have at most 64 signals.
  70119. + * Having 128 signals is problematic because signal nos are 1-based
  70120. + * and last signal number is then 128.
  70121. + * This plays havoc with WIFSIGNALED and WCOREDUMP in waitpid status word,
  70122. + * when process dies from signal 128.
  70123. + * Linux kernel 3.9 accepts signal 128, with awful results :/
  70124. + * It is being fixed.
  70125. + *
  70126. + * glibc (accidentally?) papers over this issue by declaring _NSIG to be 128,
  70127. + * not 129 (despite claiming that _NSIG is "biggest signal number + 1"
  70128. + * in the comment above that definition). We follow suit.
  70129. + * Note that this results in __SIGRTMAX == 127. It is intended.
  70130. + */
  70131. +#define _NSIG 128
  70132. #endif /* <signal.h> included. */
  70133. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/sigstack.h uClibc-git/libc/sysdeps/linux/mips/bits/sigstack.h
  70134. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/sigstack.h 2012-05-15 09:20:09.000000000 +0200
  70135. +++ uClibc-git/libc/sysdeps/linux/mips/bits/sigstack.h 2014-07-25 20:36:07.313337341 +0200
  70136. @@ -13,9 +13,8 @@
  70137. Lesser General Public License for more details.
  70138. You should have received a copy of the GNU Lesser General Public
  70139. - License along with the GNU C Library; if not, write to the Free
  70140. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  70141. - 02111-1307 USA. */
  70142. + License along with the GNU C Library; if not, see
  70143. + <http://www.gnu.org/licenses/>. */
  70144. #ifndef _SIGNAL_H
  70145. # error "Never include this file directly. Use <signal.h> instead"
  70146. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/socket.h uClibc-git/libc/sysdeps/linux/mips/bits/socket.h
  70147. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/socket.h 2012-05-15 09:20:09.000000000 +0200
  70148. +++ uClibc-git/libc/sysdeps/linux/mips/bits/socket.h 1970-01-01 01:00:00.000000000 +0100
  70149. @@ -1,369 +0,0 @@
  70150. -/* System-specific socket constants and types. Linux/MIPS version.
  70151. - Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006
  70152. - Free Software Foundation, Inc.
  70153. - This file is part of the GNU C Library.
  70154. -
  70155. - The GNU C Library is free software; you can redistribute it and/or
  70156. - modify it under the terms of the GNU Lesser General Public
  70157. - License as published by the Free Software Foundation; either
  70158. - version 2.1 of the License, or (at your option) any later version.
  70159. -
  70160. - The GNU C Library is distributed in the hope that it will be useful,
  70161. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  70162. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  70163. - Lesser General Public License for more details.
  70164. -
  70165. - You should have received a copy of the GNU Lesser General Public
  70166. - License along with the GNU C Library; if not, write to the Free
  70167. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  70168. - 02111-1307 USA. */
  70169. -
  70170. -#ifndef __BITS_SOCKET_H
  70171. -#define __BITS_SOCKET_H
  70172. -
  70173. -#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H
  70174. -# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
  70175. -#endif
  70176. -
  70177. -#define __need_size_t
  70178. -#define __need_NULL
  70179. -#include <stddef.h>
  70180. -
  70181. -#include <limits.h>
  70182. -#include <sys/types.h>
  70183. -
  70184. -/* Type for length arguments in socket calls. */
  70185. -#ifndef __socklen_t_defined
  70186. -typedef __socklen_t socklen_t;
  70187. -# define __socklen_t_defined
  70188. -#endif
  70189. -
  70190. -/* Types of sockets. */
  70191. -enum __socket_type
  70192. -{
  70193. - SOCK_DGRAM = 1, /* Connectionless, unreliable datagrams
  70194. - of fixed maximum length. */
  70195. -#define SOCK_DGRAM SOCK_DGRAM
  70196. - SOCK_STREAM = 2, /* Sequenced, reliable, connection-based
  70197. - byte streams. */
  70198. -#define SOCK_STREAM SOCK_STREAM
  70199. - SOCK_RAW = 3, /* Raw protocol interface. */
  70200. -#define SOCK_RAW SOCK_RAW
  70201. - SOCK_RDM = 4, /* Reliably-delivered messages. */
  70202. -#define SOCK_RDM SOCK_RDM
  70203. - SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
  70204. - datagrams of fixed maximum length. */
  70205. -#define SOCK_SEQPACKET SOCK_SEQPACKET
  70206. - SOCK_DCCP = 6,
  70207. -#define SOCK_DCCP SOCK_DCCP /* Datagram Congestion Control Protocol. */
  70208. - SOCK_PACKET = 10, /* Linux specific way of getting packets
  70209. - at the dev level. For writing rarp and
  70210. - other similar things on the user level. */
  70211. -#define SOCK_PACKET SOCK_PACKET
  70212. - /* Flags to be ORed into the type parameter of socket and socketpair and
  70213. - used for the flags parameter of paccept. */
  70214. -
  70215. - SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the
  70216. - new descriptor(s). */
  70217. -#define SOCK_CLOEXEC SOCK_CLOEXEC
  70218. - SOCK_NONBLOCK = 0200 /* Atomically mark descriptor(s) as
  70219. - non-blocking. */
  70220. -#define SOCK_NONBLOCK SOCK_NONBLOCK
  70221. -};
  70222. -
  70223. -/* Protocol families. */
  70224. -#define PF_UNSPEC 0 /* Unspecified. */
  70225. -#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */
  70226. -#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */
  70227. -#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */
  70228. -#define PF_INET 2 /* IP protocol family. */
  70229. -#define PF_AX25 3 /* Amateur Radio AX.25. */
  70230. -#define PF_IPX 4 /* Novell Internet Protocol. */
  70231. -#define PF_APPLETALK 5 /* Appletalk DDP. */
  70232. -#define PF_NETROM 6 /* Amateur radio NetROM. */
  70233. -#define PF_BRIDGE 7 /* Multiprotocol bridge. */
  70234. -#define PF_ATMPVC 8 /* ATM PVCs. */
  70235. -#define PF_X25 9 /* Reserved for X.25 project. */
  70236. -#define PF_INET6 10 /* IP version 6. */
  70237. -#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */
  70238. -#define PF_DECnet 12 /* Reserved for DECnet project. */
  70239. -#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */
  70240. -#define PF_SECURITY 14 /* Security callback pseudo AF. */
  70241. -#define PF_KEY 15 /* PF_KEY key management API. */
  70242. -#define PF_NETLINK 16
  70243. -#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */
  70244. -#define PF_PACKET 17 /* Packet family. */
  70245. -#define PF_ASH 18 /* Ash. */
  70246. -#define PF_ECONET 19 /* Acorn Econet. */
  70247. -#define PF_ATMSVC 20 /* ATM SVCs. */
  70248. -#define PF_SNA 22 /* Linux SNA Project */
  70249. -#define PF_IRDA 23 /* IRDA sockets. */
  70250. -#define PF_PPPOX 24 /* PPPoX sockets. */
  70251. -#define PF_WANPIPE 25 /* Wanpipe API sockets. */
  70252. -#define PF_LLC 26 /* Linux LLC. */
  70253. -#define PF_CAN 29 /* Controller Area Network. */
  70254. -#define PF_TIPC 30 /* TIPC sockets. */
  70255. -#define PF_BLUETOOTH 31 /* Bluetooth sockets. */
  70256. -#define PF_IUCV 32 /* IUCV sockets. */
  70257. -#define PF_RXRPC 33 /* RxRPC sockets. */
  70258. -#define PF_ISDN 34 /* mISDN sockets. */
  70259. -#define PF_PHONET 35 /* Phonet sockets. */
  70260. -#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */
  70261. -#define PF_CAIF 37 /* CAIF sockets. */
  70262. -#define PF_ALG 38 /* Algorithm sockets. */
  70263. -#define PF_MAX 39 /* For now.. */
  70264. -
  70265. -/* Address families. */
  70266. -#define AF_UNSPEC PF_UNSPEC
  70267. -#define AF_LOCAL PF_LOCAL
  70268. -#define AF_UNIX PF_UNIX
  70269. -#define AF_FILE PF_FILE
  70270. -#define AF_INET PF_INET
  70271. -#define AF_AX25 PF_AX25
  70272. -#define AF_IPX PF_IPX
  70273. -#define AF_APPLETALK PF_APPLETALK
  70274. -#define AF_NETROM PF_NETROM
  70275. -#define AF_BRIDGE PF_BRIDGE
  70276. -#define AF_ATMPVC PF_ATMPVC
  70277. -#define AF_X25 PF_X25
  70278. -#define AF_INET6 PF_INET6
  70279. -#define AF_ROSE PF_ROSE
  70280. -#define AF_DECnet PF_DECnet
  70281. -#define AF_NETBEUI PF_NETBEUI
  70282. -#define AF_SECURITY PF_SECURITY
  70283. -#define AF_KEY PF_KEY
  70284. -#define AF_NETLINK PF_NETLINK
  70285. -#define AF_ROUTE PF_ROUTE
  70286. -#define AF_PACKET PF_PACKET
  70287. -#define AF_ASH PF_ASH
  70288. -#define AF_ECONET PF_ECONET
  70289. -#define AF_ATMSVC PF_ATMSVC
  70290. -#define AF_SNA PF_SNA
  70291. -#define AF_IRDA PF_IRDA
  70292. -#define AF_PPPOX PF_PPPOX
  70293. -#define AF_WANPIPE PF_WANPIPE
  70294. -#define AF_LLC PF_LLC
  70295. -#define AF_CAN PF_CAN
  70296. -#define AF_TIPC PF_TIPC
  70297. -#define AF_BLUETOOTH PF_BLUETOOTH
  70298. -#define AF_IUCV PF_IUCV
  70299. -#define AF_RXRPC PF_RXRPC
  70300. -#define AF_ISDN PF_ISDN
  70301. -#define AF_PHONET PF_PHONET
  70302. -#define AF_IEEE802154 PF_IEEE802154
  70303. -#define AF_CAIF PF_CAIF
  70304. -#define AF_ALG PF_ALG
  70305. -#define AF_MAX PF_MAX
  70306. -
  70307. -/* Socket level values. Others are defined in the appropriate headers.
  70308. -
  70309. - XXX These definitions also should go into the appropriate headers as
  70310. - far as they are available. */
  70311. -#define SOL_RAW 255
  70312. -#define SOL_DECNET 261
  70313. -#define SOL_X25 262
  70314. -#define SOL_PACKET 263
  70315. -#define SOL_ATM 264 /* ATM layer (cell level). */
  70316. -#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */
  70317. -#define SOL_IRDA 266
  70318. -
  70319. -/* Maximum queue length specifiable by listen. */
  70320. -#define SOMAXCONN 128
  70321. -
  70322. -/* Get the definition of the macro to define the common sockaddr members. */
  70323. -#include <bits/sockaddr.h>
  70324. -
  70325. -/* Structure describing a generic socket address. */
  70326. -struct sockaddr
  70327. - {
  70328. - __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */
  70329. - char sa_data[14]; /* Address data. */
  70330. - };
  70331. -
  70332. -
  70333. -/* Structure large enough to hold any socket address (with the historical
  70334. - exception of AF_UNIX). We reserve 128 bytes. */
  70335. -#define __ss_aligntype unsigned long int
  70336. -#define _SS_SIZE 128
  70337. -#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype)))
  70338. -
  70339. -struct sockaddr_storage
  70340. - {
  70341. - __SOCKADDR_COMMON (ss_); /* Address family, etc. */
  70342. - __ss_aligntype __ss_align; /* Force desired alignment. */
  70343. - char __ss_padding[_SS_PADSIZE];
  70344. - };
  70345. -
  70346. -
  70347. -/* Bits in the FLAGS argument to `send', `recv', et al. */
  70348. -enum
  70349. - {
  70350. - MSG_OOB = 0x01, /* Process out-of-band data. */
  70351. -#define MSG_OOB MSG_OOB
  70352. - MSG_PEEK = 0x02, /* Peek at incoming messages. */
  70353. -#define MSG_PEEK MSG_PEEK
  70354. - MSG_DONTROUTE = 0x04, /* Don't use local routing. */
  70355. -#define MSG_DONTROUTE MSG_DONTROUTE
  70356. -#ifdef __USE_GNU
  70357. - /* DECnet uses a different name. */
  70358. - MSG_TRYHARD = MSG_DONTROUTE,
  70359. -# define MSG_TRYHARD MSG_DONTROUTE
  70360. -#endif
  70361. - MSG_CTRUNC = 0x08, /* Control data lost before delivery. */
  70362. -#define MSG_CTRUNC MSG_CTRUNC
  70363. - MSG_PROXY = 0x10, /* Supply or ask second address. */
  70364. -#define MSG_PROXY MSG_PROXY
  70365. - MSG_TRUNC = 0x20,
  70366. -#define MSG_TRUNC MSG_TRUNC
  70367. - MSG_DONTWAIT = 0x40, /* Nonblocking IO. */
  70368. -#define MSG_DONTWAIT MSG_DONTWAIT
  70369. - MSG_EOR = 0x80, /* End of record. */
  70370. -#define MSG_EOR MSG_EOR
  70371. - MSG_WAITALL = 0x100, /* Wait for a full request. */
  70372. -#define MSG_WAITALL MSG_WAITALL
  70373. - MSG_FIN = 0x200,
  70374. -#define MSG_FIN MSG_FIN
  70375. - MSG_SYN = 0x400,
  70376. -#define MSG_SYN MSG_SYN
  70377. - MSG_CONFIRM = 0x800, /* Confirm path validity. */
  70378. -#define MSG_CONFIRM MSG_CONFIRM
  70379. - MSG_RST = 0x1000,
  70380. -#define MSG_RST MSG_RST
  70381. - MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */
  70382. -#define MSG_ERRQUEUE MSG_ERRQUEUE
  70383. - MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */
  70384. -#define MSG_NOSIGNAL MSG_NOSIGNAL
  70385. - MSG_MORE = 0x8000, /* Sender will send more. */
  70386. -#define MSG_MORE MSG_MORE
  70387. - MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/
  70388. -#define MSG_WAITFORONE MSG_WAITFORONE
  70389. -
  70390. - MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file
  70391. - descriptor received through
  70392. - SCM_RIGHTS. */
  70393. -#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC
  70394. - };
  70395. -
  70396. -
  70397. -/* Structure describing messages sent by
  70398. - `sendmsg' and received by `recvmsg'. */
  70399. -/* Note: do not change these members to match glibc; these match the
  70400. - SuSv3 spec already (e.g. msg_iovlen/msg_controllen).
  70401. - http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/socket.h.html */
  70402. -/* Note: linux kernel uses __kernel_size_t (which is 8bytes on 64bit
  70403. - platforms, and 4bytes on 32bit platforms) for msg_iovlen/msg_controllen */
  70404. -struct msghdr
  70405. - {
  70406. - void *msg_name; /* Address to send to/receive from. */
  70407. - socklen_t msg_namelen; /* Length of address data. */
  70408. -
  70409. - struct iovec *msg_iov; /* Vector of data to send/receive into. */
  70410. -#if __WORDSIZE == 32
  70411. - int msg_iovlen; /* Number of elements in the vector. */
  70412. -#else
  70413. - size_t msg_iovlen; /* Number of elements in the vector. */
  70414. -#endif
  70415. -
  70416. - void *msg_control; /* Ancillary data (eg BSD filedesc passing). */
  70417. -#if __WORDSIZE == 32
  70418. - socklen_t msg_controllen; /* Ancillary data buffer length. */
  70419. -#else
  70420. - size_t msg_controllen; /* Ancillary data buffer length. */
  70421. -#endif
  70422. -
  70423. - int msg_flags; /* Flags on received message. */
  70424. - };
  70425. -
  70426. -/* Structure used for storage of ancillary data object information. */
  70427. -struct cmsghdr
  70428. - {
  70429. - size_t cmsg_len; /* Length of data in cmsg_data plus length
  70430. - of cmsghdr structure. */
  70431. - int cmsg_level; /* Originating protocol. */
  70432. - int cmsg_type; /* Protocol specific type. */
  70433. -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
  70434. - __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */
  70435. -#endif
  70436. - };
  70437. -
  70438. -/* Ancillary data object manipulation macros. */
  70439. -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
  70440. -# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
  70441. -#else
  70442. -# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
  70443. -#endif
  70444. -#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
  70445. -#define CMSG_FIRSTHDR(mhdr) \
  70446. - ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
  70447. - ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
  70448. -#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
  70449. - & (size_t) ~(sizeof (size_t) - 1))
  70450. -#define CMSG_SPACE(len) (CMSG_ALIGN (len) \
  70451. - + CMSG_ALIGN (sizeof (struct cmsghdr)))
  70452. -#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
  70453. -
  70454. -extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
  70455. - struct cmsghdr *__cmsg) __THROW;
  70456. -libc_hidden_proto(__cmsg_nxthdr)
  70457. -#ifdef __USE_EXTERN_INLINES
  70458. -# ifndef _EXTERN_INLINE
  70459. -# define _EXTERN_INLINE extern __inline
  70460. -# endif
  70461. -_EXTERN_INLINE struct cmsghdr *
  70462. -__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
  70463. -{
  70464. - if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
  70465. - /* The kernel header does this so there may be a reason. */
  70466. - return 0;
  70467. -
  70468. - __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
  70469. - + CMSG_ALIGN (__cmsg->cmsg_len));
  70470. - if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
  70471. - + __mhdr->msg_controllen)
  70472. - || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
  70473. - > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
  70474. - /* No more entries. */
  70475. - return 0;
  70476. - return __cmsg;
  70477. -}
  70478. -#endif /* Use `extern inline'. */
  70479. -
  70480. -/* Socket level message types. This must match the definitions in
  70481. - <linux/socket.h>. */
  70482. -enum
  70483. - {
  70484. - SCM_RIGHTS = 0x01 /* Transfer file descriptors. */
  70485. -#define SCM_RIGHTS SCM_RIGHTS
  70486. -#ifdef __USE_BSD
  70487. - , SCM_CREDENTIALS = 0x02 /* Credentials passing. */
  70488. -# define SCM_CREDENTIALS SCM_CREDENTIALS
  70489. -#endif
  70490. - };
  70491. -
  70492. -/* User visible structure for SCM_CREDENTIALS message */
  70493. -
  70494. -struct ucred
  70495. -{
  70496. - pid_t pid; /* PID of sending process. */
  70497. - uid_t uid; /* UID of sending process. */
  70498. - gid_t gid; /* GID of sending process. */
  70499. -};
  70500. -
  70501. -/* Get socket manipulation related informations from kernel headers. */
  70502. -#ifndef __GLIBC__
  70503. -#define __GLIBC__ 2
  70504. -#include <asm/socket.h>
  70505. -#undef __GLIBC__
  70506. -#else
  70507. -#include <asm/socket.h>
  70508. -#endif
  70509. -
  70510. -
  70511. -/* Structure used to manipulate the SO_LINGER option. */
  70512. -struct linger
  70513. - {
  70514. - int l_onoff; /* Nonzero to linger on close. */
  70515. - int l_linger; /* Time to linger. */
  70516. - };
  70517. -
  70518. -#endif /* bits/socket.h */
  70519. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/socket_type.h uClibc-git/libc/sysdeps/linux/mips/bits/socket_type.h
  70520. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/socket_type.h 1970-01-01 01:00:00.000000000 +0100
  70521. +++ uClibc-git/libc/sysdeps/linux/mips/bits/socket_type.h 2014-07-25 20:36:07.313337341 +0200
  70522. @@ -0,0 +1,55 @@
  70523. +/* System-specific socket constants and types. Linux/MIPS version.
  70524. + Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004, 2005, 2006
  70525. + Free Software Foundation, Inc.
  70526. + This file is part of the GNU C Library.
  70527. +
  70528. + The GNU C Library is free software; you can redistribute it and/or
  70529. + modify it under the terms of the GNU Lesser General Public
  70530. + License as published by the Free Software Foundation; either
  70531. + version 2.1 of the License, or (at your option) any later version.
  70532. +
  70533. + The GNU C Library is distributed in the hope that it will be useful,
  70534. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  70535. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  70536. + Lesser General Public License for more details.
  70537. +
  70538. + You should have received a copy of the GNU Lesser General Public
  70539. + License along with the GNU C Library; if not, see
  70540. + <http://www.gnu.org/licenses/>. */
  70541. +
  70542. +#ifndef _SYS_SOCKET_H
  70543. +# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
  70544. +#endif
  70545. +
  70546. +/* Types of sockets. */
  70547. +enum __socket_type
  70548. +{
  70549. + SOCK_DGRAM = 1, /* Connectionless, unreliable datagrams
  70550. + of fixed maximum length. */
  70551. +#define SOCK_DGRAM SOCK_DGRAM
  70552. + SOCK_STREAM = 2, /* Sequenced, reliable, connection-based
  70553. + byte streams. */
  70554. +#define SOCK_STREAM SOCK_STREAM
  70555. + SOCK_RAW = 3, /* Raw protocol interface. */
  70556. +#define SOCK_RAW SOCK_RAW
  70557. + SOCK_RDM = 4, /* Reliably-delivered messages. */
  70558. +#define SOCK_RDM SOCK_RDM
  70559. + SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
  70560. + datagrams of fixed maximum length. */
  70561. +#define SOCK_SEQPACKET SOCK_SEQPACKET
  70562. + SOCK_DCCP = 6,
  70563. +#define SOCK_DCCP SOCK_DCCP /* Datagram Congestion Control Protocol. */
  70564. + SOCK_PACKET = 10, /* Linux specific way of getting packets
  70565. + at the dev level. For writing rarp and
  70566. + other similar things on the user level. */
  70567. +#define SOCK_PACKET SOCK_PACKET
  70568. +
  70569. + /* Flags to be ORed into the type parameter of socket and socketpair. */
  70570. +
  70571. + SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the
  70572. + new descriptor(s). */
  70573. +#define SOCK_CLOEXEC SOCK_CLOEXEC
  70574. + SOCK_NONBLOCK = 00000200 /* Atomically mark descriptor(s) as
  70575. + non-blocking. */
  70576. +#define SOCK_NONBLOCK SOCK_NONBLOCK
  70577. +};
  70578. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/mips/bits/stackinfo.h
  70579. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  70580. +++ uClibc-git/libc/sysdeps/linux/mips/bits/stackinfo.h 2014-07-25 20:36:07.313337341 +0200
  70581. @@ -12,9 +12,8 @@
  70582. Lesser General Public License for more details.
  70583. You should have received a copy of the GNU Lesser General Public
  70584. - License along with the GNU C Library; if not, write to the Free
  70585. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  70586. - 02111-1307 USA. */
  70587. + License along with the GNU C Library; if not, see
  70588. + <http://www.gnu.org/licenses/>. */
  70589. /* This file contains a bit of information about the stack allocation
  70590. of the processor. */
  70591. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/statfs.h uClibc-git/libc/sysdeps/linux/mips/bits/statfs.h
  70592. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/statfs.h 2012-05-15 09:20:09.000000000 +0200
  70593. +++ uClibc-git/libc/sysdeps/linux/mips/bits/statfs.h 2014-07-25 20:36:07.313337341 +0200
  70594. @@ -12,9 +12,8 @@
  70595. Lesser General Public License for more details.
  70596. You should have received a copy of the GNU Lesser General Public
  70597. - License along with the GNU C Library; if not, write to the Free
  70598. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  70599. - 02111-1307 USA. */
  70600. + License along with the GNU C Library; if not, see
  70601. + <http://www.gnu.org/licenses/>. */
  70602. #ifndef _SYS_STATFS_H
  70603. # error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
  70604. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/stat.h uClibc-git/libc/sysdeps/linux/mips/bits/stat.h
  70605. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
  70606. +++ uClibc-git/libc/sysdeps/linux/mips/bits/stat.h 2014-07-25 20:36:07.313337341 +0200
  70607. @@ -13,9 +13,8 @@
  70608. Lesser General Public License for more details.
  70609. You should have received a copy of the GNU Lesser General Public
  70610. - License along with the GNU C Library; if not, write to the Free
  70611. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  70612. - 02111-1307 USA. */
  70613. + License along with the GNU C Library; if not, see
  70614. + <http://www.gnu.org/licenses/>. */
  70615. #ifndef _SYS_STAT_H
  70616. # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
  70617. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/syscalls.h uClibc-git/libc/sysdeps/linux/mips/bits/syscalls.h
  70618. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/syscalls.h 2012-05-15 09:20:09.000000000 +0200
  70619. +++ uClibc-git/libc/sysdeps/linux/mips/bits/syscalls.h 2014-07-25 20:36:07.313337341 +0200
  70620. @@ -29,7 +29,7 @@
  70621. } \
  70622. result_var; })
  70623. -#define INTERNAL_SYSCALL_DECL(err) long err
  70624. +#define INTERNAL_SYSCALL_DECL(err) long err attribute_unused
  70625. #define INTERNAL_SYSCALL_ERROR_P(val, err) ((long) (err))
  70626. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/termios.h uClibc-git/libc/sysdeps/linux/mips/bits/termios.h
  70627. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/termios.h 2012-05-15 09:20:09.000000000 +0200
  70628. +++ uClibc-git/libc/sysdeps/linux/mips/bits/termios.h 2014-07-25 20:36:07.313337341 +0200
  70629. @@ -13,9 +13,8 @@
  70630. Lesser General Public License for more details.
  70631. You should have received a copy of the GNU Lesser General Public
  70632. - License along with the GNU C Library; if not, write to the Free
  70633. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  70634. - 02111-1307 USA. */
  70635. + License along with the GNU C Library; if not, see
  70636. + <http://www.gnu.org/licenses/>. */
  70637. #ifndef _TERMIOS_H
  70638. # error "Never include <bits/termios.h> directly; use <termios.h> instead."
  70639. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/mips/bits/uClibc_arch_features.h
  70640. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  70641. +++ uClibc-git/libc/sysdeps/linux/mips/bits/uClibc_arch_features.h 2014-07-25 20:36:07.313337341 +0200
  70642. @@ -4,6 +4,7 @@
  70643. #ifndef _BITS_UCLIBC_ARCH_FEATURES_H
  70644. #define _BITS_UCLIBC_ARCH_FEATURES_H
  70645. +#include <sgidefs.h>
  70646. /* instruction used when calling abort() to kill yourself */
  70647. #define __UCLIBC_ABORT_INSTRUCTION__ "break 255"
  70648. @@ -11,8 +12,12 @@
  70649. /* can your target use syscall6() for mmap ? */
  70650. #define __UCLIBC_MMAP_HAS_6_ARGS__
  70651. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  70652. -#define __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  70653. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  70654. +#if _MIPS_SIM == _ABIO32
  70655. +#define __UCLIBC_SYSCALL_ALIGN_64BIT__
  70656. +#else
  70657. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  70658. +#endif
  70659. /* does your target have a broken create_module() ? */
  70660. #undef __UCLIBC_BROKEN_CREATE_MODULE__
  70661. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/uClibc_page.h uClibc-git/libc/sysdeps/linux/mips/bits/uClibc_page.h
  70662. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/uClibc_page.h 2012-05-15 09:20:09.000000000 +0200
  70663. +++ uClibc-git/libc/sysdeps/linux/mips/bits/uClibc_page.h 2014-07-25 20:36:07.313337341 +0200
  70664. @@ -11,8 +11,8 @@
  70665. * Library General Public License for more details.
  70666. *
  70667. * You should have received a copy of the GNU Library General Public
  70668. - * License along with this library; if not, write to the Free
  70669. - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  70670. + * License along with this library; if not, see
  70671. + * <http://www.gnu.org/licenses/>.
  70672. */
  70673. /* Supply an architecture specific value for PAGE_SIZE and friends. */
  70674. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/wordsize.h uClibc-git/libc/sysdeps/linux/mips/bits/wordsize.h
  70675. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
  70676. +++ uClibc-git/libc/sysdeps/linux/mips/bits/wordsize.h 2014-07-25 20:36:07.313337341 +0200
  70677. @@ -12,8 +12,7 @@
  70678. Lesser General Public License for more details.
  70679. You should have received a copy of the GNU Lesser General Public
  70680. - License along with the GNU C Library; if not, write to the Free
  70681. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  70682. - 02111-1307 USA. */
  70683. + License along with the GNU C Library; if not, see
  70684. + <http://www.gnu.org/licenses/>. */
  70685. #define __WORDSIZE _MIPS_SZPTR
  70686. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/brk.c uClibc-git/libc/sysdeps/linux/mips/brk.c
  70687. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/brk.c 2012-05-15 09:20:09.000000000 +0200
  70688. +++ uClibc-git/libc/sysdeps/linux/mips/brk.c 2014-07-25 20:36:07.313337341 +0200
  70689. @@ -13,9 +13,8 @@
  70690. Lesser General Public License for more details.
  70691. You should have received a copy of the GNU Lesser General Public
  70692. - License along with the GNU C Library; if not, write to the Free
  70693. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  70694. - 02111-1307 USA. */
  70695. + License along with the GNU C Library; if not, see
  70696. + <http://www.gnu.org/licenses/>. */
  70697. #include <errno.h>
  70698. #include <unistd.h>
  70699. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bsd-setjmp.S uClibc-git/libc/sysdeps/linux/mips/bsd-setjmp.S
  70700. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bsd-setjmp.S 2012-05-15 09:20:09.000000000 +0200
  70701. +++ uClibc-git/libc/sysdeps/linux/mips/bsd-setjmp.S 2014-07-25 20:36:07.313337341 +0200
  70702. @@ -13,9 +13,8 @@
  70703. Lesser General Public License for more details.
  70704. You should have received a copy of the GNU Lesser General Public
  70705. - License along with the GNU C Library; if not, write to the Free
  70706. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  70707. - 02111-1307 USA. */
  70708. + License along with the GNU C Library; if not, see
  70709. + <http://www.gnu.org/licenses/>. */
  70710. /* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
  70711. We cannot do it in C because it must be a tail-call, so frame-unwinding
  70712. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/bsd-_setjmp.S uClibc-git/libc/sysdeps/linux/mips/bsd-_setjmp.S
  70713. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/bsd-_setjmp.S 2012-05-15 09:20:09.000000000 +0200
  70714. +++ uClibc-git/libc/sysdeps/linux/mips/bsd-_setjmp.S 2014-07-25 20:36:07.313337341 +0200
  70715. @@ -13,9 +13,8 @@
  70716. Lesser General Public License for more details.
  70717. You should have received a copy of the GNU Lesser General Public
  70718. - License along with the GNU C Library; if not, write to the Free
  70719. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  70720. - 02111-1307 USA. */
  70721. + License along with the GNU C Library; if not, see
  70722. + <http://www.gnu.org/licenses/>. */
  70723. /* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
  70724. We cannot do it in C because it must be a tail-call, so frame-unwinding
  70725. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/cacheflush.c uClibc-git/libc/sysdeps/linux/mips/cacheflush.c
  70726. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/cacheflush.c 2012-05-15 09:20:09.000000000 +0200
  70727. +++ uClibc-git/libc/sysdeps/linux/mips/cacheflush.c 2014-07-25 20:36:07.313337341 +0200
  70728. @@ -12,19 +12,18 @@
  70729. Lesser General Public License for more details.
  70730. You should have received a copy of the GNU Lesser General Public
  70731. - License along with the uClibc Library; if not, write to the Free
  70732. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  70733. - 02111-1307 USA. */
  70734. + License along with the uClibc Library; if not, see
  70735. + <http://www.gnu.org/licenses/>. */
  70736. -#include <errno.h>
  70737. -#include <unistd.h>
  70738. #include <sys/syscall.h>
  70739. #ifdef __NR_cacheflush
  70740. +# include <sys/cachectl.h>
  70741. _syscall3(int, cacheflush, void *, addr, const int, nbytes, const int, op)
  70742. -strong_alias(cacheflush, _flush_cache)
  70743. +strong_alias_untyped(cacheflush, _flush_cache)
  70744. #endif
  70745. #ifdef __NR_cachectl
  70746. +# include <sys/cachectl.h>
  70747. _syscall3(int, cachectl, void *, addr, const int, nbytes, const int, op)
  70748. #endif
  70749. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/clone.S uClibc-git/libc/sysdeps/linux/mips/clone.S
  70750. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/clone.S 2012-05-15 09:20:09.000000000 +0200
  70751. +++ uClibc-git/libc/sysdeps/linux/mips/clone.S 2014-07-25 20:36:07.313337341 +0200
  70752. @@ -13,9 +13,8 @@
  70753. Lesser General Public License for more details.
  70754. You should have received a copy of the GNU Lesser General Public
  70755. - License along with the GNU C Library; if not, write to the Free
  70756. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  70757. - 02111-1307 USA. */
  70758. + License along with the GNU C Library; if not, see
  70759. + <http://www.gnu.org/licenses/>. */
  70760. /* clone() is even more special than fork() as it mucks with stacks
  70761. and invokes a function in the right context after its all over. */
  70762. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/crt1.S uClibc-git/libc/sysdeps/linux/mips/crt1.S
  70763. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/crt1.S 2012-05-15 09:20:09.000000000 +0200
  70764. +++ uClibc-git/libc/sysdeps/linux/mips/crt1.S 2014-07-25 20:36:07.313337341 +0200
  70765. @@ -31,9 +31,8 @@
  70766. Lesser General Public License for more details.
  70767. You should have received a copy of the GNU Lesser General Public
  70768. - License along with the GNU C Library; if not, write to the Free
  70769. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  70770. - 02111-1307 USA. */
  70771. + License along with the GNU C Library; if not, see
  70772. + <http://www.gnu.org/licenses/>. */
  70773. #include <sys/regdef.h>
  70774. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/fpu_control.h uClibc-git/libc/sysdeps/linux/mips/fpu_control.h
  70775. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
  70776. +++ uClibc-git/libc/sysdeps/linux/mips/fpu_control.h 2014-07-25 20:36:07.313337341 +0200
  70777. @@ -14,9 +14,8 @@
  70778. Lesser General Public License for more details.
  70779. You should have received a copy of the GNU Lesser General Public
  70780. - License along with the GNU C Library; if not, write to the Free
  70781. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  70782. - 02111-1307 USA. */
  70783. + License along with the GNU C Library; if not, see
  70784. + <http://www.gnu.org/licenses/>. */
  70785. #ifndef _FPU_CONTROL_H
  70786. #define _FPU_CONTROL_H
  70787. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/getcontext.S uClibc-git/libc/sysdeps/linux/mips/getcontext.S
  70788. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/getcontext.S 1970-01-01 01:00:00.000000000 +0100
  70789. +++ uClibc-git/libc/sysdeps/linux/mips/getcontext.S 2014-07-25 20:36:07.313337341 +0200
  70790. @@ -0,0 +1,148 @@
  70791. +/* Save current context.
  70792. + Copyright (C) 2009 Free Software Foundation, Inc.
  70793. + This file is part of the GNU C Library.
  70794. + Contributed by Maciej W. Rozycki <macro@codesourcery.com>.
  70795. +
  70796. + The GNU C Library is free software; you can redistribute it and/or
  70797. + modify it under the terms of the GNU Lesser General Public
  70798. + License as published by the Free Software Foundation; either
  70799. + version 2.1 of the License, or (at your option) any later version.
  70800. +
  70801. + The GNU C Library is distributed in the hope that it will be useful,
  70802. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  70803. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  70804. + Lesser General Public License for more details.
  70805. +
  70806. + You should have received a copy of the GNU Lesser General Public
  70807. + License along with the GNU C Library. If not, see
  70808. + <http://www.gnu.org/licenses/>. */
  70809. +
  70810. +#include <sysdep.h>
  70811. +#include <sys/asm.h>
  70812. +#include <sys/fpregdef.h>
  70813. +#include <sys/regdef.h>
  70814. +
  70815. +#include "ucontext_i.h"
  70816. +
  70817. +/* int getcontext (ucontext_t *ucp) */
  70818. +
  70819. + .text
  70820. +LOCALSZ = 0
  70821. +MASK = 0x00000000
  70822. +#ifdef __PIC__
  70823. +LOCALSZ = 1 /* save gp */
  70824. +# if _MIPS_SIM != _ABIO32
  70825. +MASK = 0x10000000
  70826. +# endif
  70827. +#endif
  70828. +FRAMESZ = ((LOCALSZ * SZREG) + ALSZ) & ALMASK
  70829. +GPOFF = FRAMESZ - (1 * SZREG)
  70830. +
  70831. +NESTED (__getcontext, FRAMESZ, ra)
  70832. + .mask MASK, 0
  70833. + .fmask 0x00000000, 0
  70834. +
  70835. +#ifdef __PIC__
  70836. + SETUP_GP
  70837. +
  70838. + move a2, sp
  70839. +# define _SP a2
  70840. +
  70841. +# if _MIPS_SIM != _ABIO32
  70842. + move a3, gp
  70843. +# define _GP a3
  70844. +# endif
  70845. +
  70846. + PTR_ADDIU sp, -FRAMESZ
  70847. + SETUP_GP64 (GPOFF, __getcontext)
  70848. + SAVE_GP (GPOFF)
  70849. +
  70850. +#else /* ! __PIC__ */
  70851. +# define _SP sp
  70852. +# define _GP gp
  70853. +
  70854. +#endif /* ! __PIC__ */
  70855. +
  70856. +#ifdef PROF
  70857. + .set noat
  70858. + move AT, ra
  70859. + jal _mcount
  70860. + .set at
  70861. +#endif
  70862. +
  70863. + /* Store a magic flag. */
  70864. + li v1, 1
  70865. + REG_S v1, (0 * SZREG + MCONTEXT_GREGS)(a0) /* zero */
  70866. +
  70867. + REG_S s0, (16 * SZREG + MCONTEXT_GREGS)(a0)
  70868. + REG_S s1, (17 * SZREG + MCONTEXT_GREGS)(a0)
  70869. + REG_S s2, (18 * SZREG + MCONTEXT_GREGS)(a0)
  70870. + REG_S s3, (19 * SZREG + MCONTEXT_GREGS)(a0)
  70871. + REG_S s4, (20 * SZREG + MCONTEXT_GREGS)(a0)
  70872. + REG_S s5, (21 * SZREG + MCONTEXT_GREGS)(a0)
  70873. + REG_S s6, (22 * SZREG + MCONTEXT_GREGS)(a0)
  70874. + REG_S s7, (23 * SZREG + MCONTEXT_GREGS)(a0)
  70875. +#if ! defined (__PIC__) || _MIPS_SIM != _ABIO32
  70876. + REG_S _GP, (28 * SZREG + MCONTEXT_GREGS)(a0)
  70877. +#endif
  70878. + REG_S _SP, (29 * SZREG + MCONTEXT_GREGS)(a0)
  70879. + REG_S fp, (30 * SZREG + MCONTEXT_GREGS)(a0)
  70880. + REG_S ra, (31 * SZREG + MCONTEXT_GREGS)(a0)
  70881. + REG_S ra, MCONTEXT_PC(a0)
  70882. +
  70883. +#ifdef __mips_hard_float
  70884. +# if _MIPS_SIM == _ABI64
  70885. + s.d fs0, (24 * SZREG + MCONTEXT_FPREGS)(a0)
  70886. + s.d fs1, (25 * SZREG + MCONTEXT_FPREGS)(a0)
  70887. + s.d fs2, (26 * SZREG + MCONTEXT_FPREGS)(a0)
  70888. + s.d fs3, (27 * SZREG + MCONTEXT_FPREGS)(a0)
  70889. + s.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(a0)
  70890. + s.d fs5, (29 * SZREG + MCONTEXT_FPREGS)(a0)
  70891. + s.d fs6, (30 * SZREG + MCONTEXT_FPREGS)(a0)
  70892. + s.d fs7, (31 * SZREG + MCONTEXT_FPREGS)(a0)
  70893. +
  70894. +# else /* _MIPS_SIM != _ABI64 */
  70895. + s.d fs0, (20 * SZREG + MCONTEXT_FPREGS)(a0)
  70896. + s.d fs1, (22 * SZREG + MCONTEXT_FPREGS)(a0)
  70897. + s.d fs2, (24 * SZREG + MCONTEXT_FPREGS)(a0)
  70898. + s.d fs3, (26 * SZREG + MCONTEXT_FPREGS)(a0)
  70899. + s.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(a0)
  70900. + s.d fs5, (30 * SZREG + MCONTEXT_FPREGS)(a0)
  70901. +
  70902. +# endif /* _MIPS_SIM != _ABI64 */
  70903. +
  70904. + cfc1 v1, fcr31
  70905. + sw v1, MCONTEXT_FPC_CSR(a0)
  70906. +#endif /* __mips_hard_float */
  70907. +
  70908. +/* rt_sigprocmask (SIG_BLOCK, NULL, &ucp->uc_sigmask, _NSIG8) */
  70909. + li a3, _NSIG8
  70910. + PTR_ADDU a2, a0, UCONTEXT_SIGMASK
  70911. + move a1, zero
  70912. + li a0, SIG_BLOCK
  70913. +
  70914. + li v0, SYS_ify (rt_sigprocmask)
  70915. + syscall
  70916. + bnez a3, 99f
  70917. +
  70918. +#ifdef __PIC__
  70919. + RESTORE_GP64
  70920. + PTR_ADDIU sp, FRAMESZ
  70921. +#endif
  70922. + move v0, zero
  70923. + jr ra
  70924. +
  70925. +99:
  70926. +#ifdef __PIC__
  70927. + PTR_LA t9, JUMPTARGET (__syscall_error)
  70928. + RESTORE_GP64
  70929. + PTR_ADDIU sp, FRAMESZ
  70930. + jr t9
  70931. +
  70932. +#else /* ! __PIC__ */
  70933. +
  70934. + j JUMPTARGET (__syscall_error)
  70935. +#endif /* ! __PIC__ */
  70936. +PSEUDO_END (__getcontext)
  70937. +
  70938. +weak_alias (__getcontext, getcontext)
  70939. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/mips/jmpbuf-unwind.h
  70940. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  70941. +++ uClibc-git/libc/sysdeps/linux/mips/jmpbuf-unwind.h 2014-07-25 20:36:07.313337341 +0200
  70942. @@ -0,0 +1,22 @@
  70943. +/*
  70944. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  70945. + *
  70946. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  70947. + */
  70948. +#include <setjmp.h>
  70949. +
  70950. +/* Test if longjmp to JMPBUF would unwind the frame
  70951. + containing a local variable at ADDRESS. */
  70952. +#define _JMPBUF_UNWINDS(jmpbuf, address) \
  70953. + ((void *) (address) < (void *) (jmpbuf)[0].__sp)
  70954. +
  70955. +#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  70956. +#include <stdint.h>
  70957. +#include <unwind.h>
  70958. +
  70959. +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
  70960. + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
  70961. +
  70962. +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
  70963. + ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[0].__sp - (_adj))
  70964. +#endif
  70965. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/kernel_rt_sigframe.h uClibc-git/libc/sysdeps/linux/mips/kernel_rt_sigframe.h
  70966. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/kernel_rt_sigframe.h 1970-01-01 01:00:00.000000000 +0100
  70967. +++ uClibc-git/libc/sysdeps/linux/mips/kernel_rt_sigframe.h 2014-07-25 20:36:07.313337341 +0200
  70968. @@ -0,0 +1,10 @@
  70969. +/* Linux kernel RT signal frame. */
  70970. +typedef struct kernel_rt_sigframe
  70971. + {
  70972. + uint32_t rs_ass[4];
  70973. + uint32_t rs_code[2];
  70974. + siginfo_t rs_info;
  70975. + struct ucontext rs_uc;
  70976. + uint32_t rs_altcode[8] __attribute__ ((__aligned__ (1 << 7)));
  70977. + }
  70978. +kernel_rt_sigframe_t;
  70979. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/__longjmp.c uClibc-git/libc/sysdeps/linux/mips/__longjmp.c
  70980. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/__longjmp.c 2012-05-15 09:20:09.000000000 +0200
  70981. +++ uClibc-git/libc/sysdeps/linux/mips/__longjmp.c 2014-07-25 20:36:07.297337257 +0200
  70982. @@ -13,9 +13,8 @@
  70983. Lesser General Public License for more details.
  70984. You should have received a copy of the GNU Lesser General Public
  70985. - License along with the GNU C Library; if not, write to the Free
  70986. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  70987. - 02111-1307 USA. */
  70988. + License along with the GNU C Library; if not, see
  70989. + <http://www.gnu.org/licenses/>. */
  70990. #include <features.h>
  70991. #include <setjmp.h>
  70992. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/makecontext.S uClibc-git/libc/sysdeps/linux/mips/makecontext.S
  70993. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/makecontext.S 1970-01-01 01:00:00.000000000 +0100
  70994. +++ uClibc-git/libc/sysdeps/linux/mips/makecontext.S 2014-07-25 20:36:07.313337341 +0200
  70995. @@ -0,0 +1,188 @@
  70996. +/* Modify saved context.
  70997. + Copyright (C) 2009 Free Software Foundation, Inc.
  70998. + This file is part of the GNU C Library.
  70999. + Contributed by Maciej W. Rozycki <macro@codesourcery.com>.
  71000. +
  71001. + The GNU C Library is free software; you can redistribute it and/or
  71002. + modify it under the terms of the GNU Lesser General Public
  71003. + License as published by the Free Software Foundation; either
  71004. + version 2.1 of the License, or (at your option) any later version.
  71005. +
  71006. + The GNU C Library is distributed in the hope that it will be useful,
  71007. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  71008. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  71009. + Lesser General Public License for more details.
  71010. +
  71011. + You should have received a copy of the GNU Lesser General Public
  71012. + License along with the GNU C Library. If not, see
  71013. + <http://www.gnu.org/licenses/>. */
  71014. +
  71015. +#include <sysdep.h>
  71016. +#include <sys/asm.h>
  71017. +#include <sys/fpregdef.h>
  71018. +#include <sys/regdef.h>
  71019. +
  71020. +#include "ucontext_i.h"
  71021. +
  71022. +/* int makecontext (ucontext_t *ucp, (void *func) (), int argc, ...) */
  71023. +
  71024. + .text
  71025. +LOCALSZ = 0
  71026. +ARGSZ = 0
  71027. +MASK = 0x00000000
  71028. +#ifdef __PIC__
  71029. +LOCALSZ = 1 /* save gp */
  71030. +#endif
  71031. +#if _MIPS_SIM != _ABIO32
  71032. +ARGSZ = 5 /* save a3-a7 */
  71033. +# ifdef __PIC__
  71034. +MASK = 0x10000000
  71035. +# endif
  71036. +#endif
  71037. +FRAMESZ = (((ARGSZ + LOCALSZ) * SZREG) + ALSZ) & ALMASK
  71038. +GPOFF = FRAMESZ - ((ARGSZ + 1) * SZREG)
  71039. +#if _MIPS_SIM != _ABIO32
  71040. +A3OFF = FRAMESZ - (5 * SZREG) /* callee-allocated */
  71041. +A4OFF = FRAMESZ - (4 * SZREG)
  71042. +A5OFF = FRAMESZ - (3 * SZREG)
  71043. +A6OFF = FRAMESZ - (2 * SZREG)
  71044. +A7OFF = FRAMESZ - (1 * SZREG)
  71045. +NARGREGS = 8
  71046. +#else
  71047. +A3OFF = FRAMESZ + (3 * SZREG) /* caller-allocated */
  71048. +NARGREGS = 4
  71049. +#endif
  71050. +
  71051. +NESTED (__makecontext, FRAMESZ, ra)
  71052. + .mask MASK, -(ARGSZ * SZREG)
  71053. + .fmask 0x00000000, 0
  71054. +
  71055. +98:
  71056. +#ifdef __PIC__
  71057. + SETUP_GP
  71058. +#endif
  71059. +
  71060. + PTR_ADDIU sp, -FRAMESZ
  71061. +
  71062. +#ifdef __PIC__
  71063. + SETUP_GP64 (GPOFF, __makecontext)
  71064. + SAVE_GP (GPOFF)
  71065. +#endif
  71066. +
  71067. +#ifdef PROF
  71068. + .set noat
  71069. + move AT, ra
  71070. + jal _mcount
  71071. + .set at
  71072. +#endif
  71073. +
  71074. + /* Store args to be passed. */
  71075. + REG_S a3, A3OFF(sp)
  71076. +#if _MIPS_SIM != _ABIO32
  71077. + REG_S a4, A4OFF(sp)
  71078. + REG_S a5, A5OFF(sp)
  71079. + REG_S a6, A6OFF(sp)
  71080. + REG_S a7, A7OFF(sp)
  71081. +#endif
  71082. +
  71083. + /* Store a magic flag. */
  71084. + li v1, 1
  71085. + REG_S v1, (0 * SZREG + MCONTEXT_GREGS)(a0) /* zero */
  71086. +
  71087. + /* Set up the stack. */
  71088. + PTR_L t0, STACK_SP(a0)
  71089. + PTR_L t2, STACK_SIZE(a0)
  71090. + PTR_ADDIU t1, sp, A3OFF
  71091. + PTR_ADDU t0, t2
  71092. + and t0, ALMASK
  71093. + blez a2, 2f /* no arguments */
  71094. +
  71095. + /* Store register arguments. */
  71096. + PTR_ADDIU t2, a0, MCONTEXT_GREGS + 4 * SZREG
  71097. + move t3, zero
  71098. +0:
  71099. + addiu t3, 1
  71100. + REG_L v1, (t1)
  71101. + PTR_ADDIU t1, SZREG
  71102. + REG_S v1, (t2)
  71103. + PTR_ADDIU t2, SZREG
  71104. + bgeu t3, a2, 2f /* all done */
  71105. + bltu t3, NARGREGS, 0b /* next */
  71106. +
  71107. + /* Make room for stack arguments. */
  71108. + PTR_SUBU t2, a2, t3
  71109. + PTR_SLL t2, 3
  71110. + PTR_SUBU t0, t2
  71111. + and t0, ALMASK
  71112. +
  71113. + /* Store stack arguments. */
  71114. + move t2, t0
  71115. +1:
  71116. + addiu t3, 1
  71117. + REG_L v1, (t1)
  71118. + PTR_ADDIU t1, SZREG
  71119. + REG_S v1, (t2)
  71120. + PTR_ADDIU t2, SZREG
  71121. + bltu t3, a2, 1b /* next */
  71122. +
  71123. +2:
  71124. +#if _MIPS_SIM == _ABIO32
  71125. + /* Make room for a0-a3 storage. */
  71126. + PTR_ADDIU t0, -(NARGSAVE * SZREG)
  71127. +#endif
  71128. + PTR_L v1, UCONTEXT_LINK(a0)
  71129. +#ifdef __PIC__
  71130. + PTR_ADDIU t9, 99f - 98b
  71131. +#else
  71132. + PTR_LA t9, 99f
  71133. +#endif
  71134. + REG_S t0, (29 * SZREG + MCONTEXT_GREGS)(a0) /* sp */
  71135. + REG_S v1, (16 * SZREG + MCONTEXT_GREGS)(a0) /* s0 */
  71136. +#ifdef __PIC__
  71137. + REG_S gp, (17 * SZREG + MCONTEXT_GREGS)(a0) /* s1 */
  71138. +#endif
  71139. + REG_S t9, (31 * SZREG + MCONTEXT_GREGS)(a0) /* ra */
  71140. + REG_S a1, MCONTEXT_PC(a0)
  71141. +
  71142. +#ifdef __PIC__
  71143. + RESTORE_GP64
  71144. + PTR_ADDIU sp, FRAMESZ
  71145. +#endif
  71146. + jr ra
  71147. +
  71148. +99:
  71149. +#ifdef __PIC__
  71150. + move gp, s1
  71151. +#endif
  71152. + move a0, zero
  71153. + beqz s0, 0f
  71154. +
  71155. + /* setcontext (ucp) */
  71156. + move a0, s0
  71157. +#ifdef __PIC__
  71158. + PTR_LA t9, JUMPTARGET (__setcontext)
  71159. + jalr t9
  71160. +# if _MIPS_SIM == _ABIO32
  71161. + move gp, s1
  71162. +# endif
  71163. +#else
  71164. + jal JUMPTARGET (__setcontext)
  71165. +#endif
  71166. + move a0, v0
  71167. +
  71168. +0:
  71169. + /* exit (a0) */
  71170. +#ifdef __PIC__
  71171. + PTR_LA t9, HIDDEN_JUMPTARGET (exit)
  71172. + jalr t9
  71173. +#else
  71174. + jal HIDDEN_JUMPTARGET (exit)
  71175. +#endif
  71176. +
  71177. + /* You don't exist, you won't feel anything. */
  71178. +1:
  71179. + lb zero, (zero)
  71180. + b 1b
  71181. +PSEUDO_END (__makecontext)
  71182. +
  71183. +weak_alias (__makecontext, makecontext)
  71184. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/Makefile.arch uClibc-git/libc/sysdeps/linux/mips/Makefile.arch
  71185. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
  71186. +++ uClibc-git/libc/sysdeps/linux/mips/Makefile.arch 2014-07-25 20:36:07.297337257 +0200
  71187. @@ -5,20 +5,18 @@
  71188. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  71189. #
  71190. -CSRC := \
  71191. - __longjmp.c brk.c setjmp_aux.c mmap.c \
  71192. - cacheflush.c pread_write.c sigaction.c sysmips.c _test_and_set.c \
  71193. - readahead.c
  71194. -
  71195. -SSRC := bsd-_setjmp.S bsd-setjmp.S setjmp.S syscall.S pipe.S syscall_error.S
  71196. -
  71197. -ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
  71198. -CSRC += posix_fadvise.c posix_fadvise64.c
  71199. -endif
  71200. -
  71201. -ifneq ($(UCLIBC_HAS_THREADS_NATIVE),y)
  71202. -SSRC += vfork.S clone.S
  71203. -endif
  71204. +CSRC-y := \
  71205. + __longjmp.c brk.c setjmp_aux.c \
  71206. + pread_write.c sigaction.c _test_and_set.c
  71207. +
  71208. +SSRC-y := bsd-_setjmp.S bsd-setjmp.S setjmp.S syscall.S pipe.S syscall_error.S
  71209. +
  71210. +CSRC-$(UCLIBC_LINUX_SPECIFIC) += cacheflush.c sysmips.c
  71211. +CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise.c
  71212. +CSRC-$(if $(findstring yy,$(UCLIBC_HAS_LFS)$(UCLIBC_HAS_ADVANCED_REALTIME)),y) += posix_fadvise64.c
  71213. +SSRC-$(if $(UCLIBC_HAS_THREADS_NATIVE),,y) += vfork.S clone.S
  71214. +SSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += makecontext.S setcontext.S getcontext.S \
  71215. + swapcontext.S
  71216. ASFLAGS-syscall_error.S += -D_LIBC_REENTRANT
  71217. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/mmap.c uClibc-git/libc/sysdeps/linux/mips/mmap.c
  71218. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/mmap.c 2012-05-15 09:20:09.000000000 +0200
  71219. +++ uClibc-git/libc/sysdeps/linux/mips/mmap.c 1970-01-01 01:00:00.000000000 +0100
  71220. @@ -1,26 +0,0 @@
  71221. -/* Use new style mmap for mips */
  71222. -/*
  71223. - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  71224. - *
  71225. - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  71226. - */
  71227. -
  71228. -#include <unistd.h>
  71229. -#include <errno.h>
  71230. -#include <sys/mman.h>
  71231. -#include <sys/syscall.h>
  71232. -
  71233. -
  71234. -#if 0
  71235. -/* For now, leave mmap using mmap1 since mmap2 seems
  71236. - * to have issues (i.e. it doesn't work 100% properly).
  71237. - */
  71238. -#ifdef __NR_mmap2
  71239. -# undef __NR_mmap
  71240. -# define __NR_mmap __NR_mmap2
  71241. -#endif
  71242. -#endif
  71243. -
  71244. -_syscall6 (__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot,
  71245. - int, flags, int, fd, __off_t, offset)
  71246. -libc_hidden_def(mmap)
  71247. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/posix_fadvise64.c uClibc-git/libc/sysdeps/linux/mips/posix_fadvise64.c
  71248. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/posix_fadvise64.c 2012-05-15 09:20:09.000000000 +0200
  71249. +++ uClibc-git/libc/sysdeps/linux/mips/posix_fadvise64.c 2014-07-25 20:36:07.313337341 +0200
  71250. @@ -8,36 +8,28 @@
  71251. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  71252. */
  71253. -#include <features.h>
  71254. -#include <unistd.h>
  71255. -#include <errno.h>
  71256. -#include <endian.h>
  71257. -#include <stdint.h>
  71258. -#include <sys/types.h>
  71259. +#include <_lfs_64.h>
  71260. #include <sys/syscall.h>
  71261. -#include <fcntl.h>
  71262. +#include <bits/wordsize.h>
  71263. -#ifdef __UCLIBC_HAS_LFS__
  71264. +/* MIPS kernel only has NR_fadvise64 which acts as NR_fadvise64_64 */
  71265. +#if defined __NR_fadvise64 && __WORDSIZE == 32
  71266. +# include <fcntl.h>
  71267. +# include <endian.h>
  71268. -int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
  71269. +int posix_fadvise64(int fd, off64_t offset, off64_t len, int advice)
  71270. {
  71271. -/* MIPS kernel only has NR_fadvise64 which acts as NR_fadvise64_64 */
  71272. -#ifdef __NR_fadvise64
  71273. INTERNAL_SYSCALL_DECL(err);
  71274. -# if _MIPS_SIM == _MIPS_SIM_ABI32
  71275. +# if _MIPS_SIM == _ABIO32
  71276. int ret = INTERNAL_SYSCALL(fadvise64, err, 7, fd, 0,
  71277. - __LONG_LONG_PAIR ((long) (offset >> 32), (long) offset),
  71278. - __LONG_LONG_PAIR ((long) (len >> 32), (long) len),
  71279. - advice);
  71280. + __LONG_LONG_PAIR ((long) (offset >> 32), (long) offset),
  71281. + __LONG_LONG_PAIR ((long) (len >> 32), (long) len),
  71282. + advice);
  71283. # else /* N32 || N64 */
  71284. int ret = INTERNAL_SYSCALL(fadvise64, err, 4, fd, offset, len, advice);
  71285. # endif
  71286. if (INTERNAL_SYSCALL_ERROR_P (ret, err))
  71287. return INTERNAL_SYSCALL_ERRNO (ret, err);
  71288. return 0;
  71289. -#else
  71290. - return ENOSYS;
  71291. -#endif
  71292. }
  71293. -
  71294. -#endif /* __UCLIBC_HAS_LFS__ */
  71295. +#endif
  71296. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/posix_fadvise.c uClibc-git/libc/sysdeps/linux/mips/posix_fadvise.c
  71297. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/posix_fadvise.c 2012-05-15 09:20:09.000000000 +0200
  71298. +++ uClibc-git/libc/sysdeps/linux/mips/posix_fadvise.c 2014-07-25 20:36:07.313337341 +0200
  71299. @@ -8,19 +8,16 @@
  71300. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  71301. */
  71302. -#include <features.h>
  71303. -#include <unistd.h>
  71304. -#include <errno.h>
  71305. -#include <endian.h>
  71306. -#include <stdint.h>
  71307. -#include <sys/types.h>
  71308. #include <sys/syscall.h>
  71309. -#include <fcntl.h>
  71310. -int posix_fadvise(int fd, off_t offset, off_t len, int advice)
  71311. -{
  71312. /* MIPS kernel only has NR_fadvise64 which acts as NR_fadvise64_64 */
  71313. #ifdef __NR_fadvise64
  71314. +# include <fcntl.h>
  71315. +# include <endian.h>
  71316. +# include <bits/wordsize.h>
  71317. +
  71318. +int posix_fadvise(int fd, off_t offset, off_t len, int advice)
  71319. +{
  71320. INTERNAL_SYSCALL_DECL(err);
  71321. # if _MIPS_SIM == _ABIO32
  71322. int ret = INTERNAL_SYSCALL(fadvise64, err, 7, fd, 0,
  71323. @@ -33,7 +30,9 @@
  71324. if (INTERNAL_SYSCALL_ERROR_P (ret, err))
  71325. return INTERNAL_SYSCALL_ERRNO (ret, err);
  71326. return 0;
  71327. -#else
  71328. - return ENOSYS;
  71329. -#endif
  71330. }
  71331. +# if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
  71332. +strong_alias(posix_fadvise,posix_fadvise64)
  71333. +# endif
  71334. +
  71335. +#endif
  71336. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/pread_write.c uClibc-git/libc/sysdeps/linux/mips/pread_write.c
  71337. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/pread_write.c 2012-05-15 09:20:09.000000000 +0200
  71338. +++ uClibc-git/libc/sysdeps/linux/mips/pread_write.c 2014-07-25 20:36:07.313337341 +0200
  71339. @@ -4,112 +4,28 @@
  71340. *
  71341. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  71342. */
  71343. -/*
  71344. - * Based in part on the files
  71345. - * ./sysdeps/unix/sysv/linux/pwrite.c,
  71346. - * ./sysdeps/unix/sysv/linux/pread.c,
  71347. - * sysdeps/posix/pread.c
  71348. - * sysdeps/posix/pwrite.c
  71349. - * from GNU libc 2.2.5, but reworked considerably...
  71350. - */
  71351. #include <sys/syscall.h>
  71352. #include <unistd.h>
  71353. -#include <stdint.h>
  71354. #include <endian.h>
  71355. #include <sgidefs.h>
  71356. -#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */
  71357. -# ifdef __NR_pread
  71358. -# error "__NR_pread and __NR_pread64 both defined???"
  71359. -# endif
  71360. -# define __NR_pread __NR_pread64
  71361. -#endif
  71362. -
  71363. -extern __typeof(pread) __libc_pread;
  71364. -extern __typeof(pwrite) __libc_pwrite;
  71365. -#ifdef __UCLIBC_HAS_LFS__
  71366. -extern __typeof(pread64) __libc_pread64;
  71367. -extern __typeof(pwrite64) __libc_pwrite64;
  71368. -#endif
  71369. -
  71370. -#include <bits/kernel_types.h>
  71371. -
  71372. -
  71373. -#ifdef __NR_pread
  71374. -
  71375. -# if _MIPS_SIM == _MIPS_SIM_ABI64
  71376. -# define __NR___libc_pread __NR_pread
  71377. -_syscall4(ssize_t, __libc_pread, int, fd, void *, buf, size_t, count, off_t, offset)
  71378. -weak_alias (__libc_pread, pread)
  71379. -# ifdef __UCLIBC_HAS_LFS__
  71380. -# define __NR___libc_pread64 __NR_pread
  71381. -_syscall4(ssize_t, __libc_pread64, int, fd, void *, buf, size_t, count, off64_t, offset)
  71382. -weak_alias (__libc_pread64, pread64)
  71383. -# endif /* __UCLIBC_HAS_LFS__ */
  71384. -# else /* O32 || N32 */
  71385. -# define __NR___syscall_pread __NR_pread
  71386. -static __inline__ _syscall6(ssize_t, __syscall_pread, int, fd, void *, buf,
  71387. - size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
  71388. -
  71389. -ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
  71390. -{
  71391. - return(__syscall_pread(fd,buf,count,0,__LONG_LONG_PAIR(offset>>31,offset)));
  71392. -}
  71393. -weak_alias(__libc_pread,pread)
  71394. -
  71395. -# ifdef __UCLIBC_HAS_LFS__
  71396. -ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
  71397. -{
  71398. - uint32_t low = offset & 0xffffffff;
  71399. - uint32_t high = offset >> 32;
  71400. - return(__syscall_pread(fd, buf, count, 0, __LONG_LONG_PAIR (high, low)));
  71401. -}
  71402. -weak_alias(__libc_pread64,pread64)
  71403. -# endif /* __UCLIBC_HAS_LFS__ */
  71404. -# endif /* O32 || N32 */
  71405. -
  71406. -#endif /* __NR_pread */
  71407. -
  71408. -/**********************************************************************/
  71409. -
  71410. -#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */
  71411. -# ifdef __NR_pwrite
  71412. -# error "__NR_pwrite and __NR_pwrite64 both defined???"
  71413. -# endif
  71414. -# define __NR_pwrite __NR_pwrite64
  71415. +/* We should generalize this for 32bit userlands w/64bit regs. This applies
  71416. + * to the x86_64 x32 and the mips n32 ABIs. */
  71417. +#if _MIPS_SIM == _MIPS_SIM_NABI32
  71418. +# define __NR___syscall_pread __NR_pread64
  71419. +static _syscall4(ssize_t, __syscall_pread, int, fd, void *, buf, size_t, count, off_t, offset)
  71420. +# define MY_PREAD(fd, buf, count, offset) \
  71421. + __syscall_pread(fd, buf, count, offset)
  71422. +# define MY_PREAD64(fd, buf, count, offset) \
  71423. + __syscall_pread(fd, buf, count, offset)
  71424. +
  71425. +# define __NR___syscall_pwrite __NR_pwrite64
  71426. +static _syscall4(ssize_t, __syscall_pwrite, int, fd, const void *, buf, size_t, count, off_t, offset)
  71427. +# define MY_PWRITE(fd, buf, count, offset) \
  71428. + __syscall_pwrite(fd, buf, count, offset)
  71429. +# define MY_PWRITE64(fd, buf, count, offset) \
  71430. + __syscall_pwrite(fd, buf, count, offset)
  71431. #endif
  71432. -#ifdef __NR_pwrite
  71433. -
  71434. -# if _MIPS_SIM == _MIPS_SIM_ABI64
  71435. -# define __NR___libc_pwrite __NR_pwrite
  71436. -_syscall4(ssize_t, __libc_pwrite, int, fd, const void *, buf, size_t, count, off_t, offset)
  71437. -weak_alias (__libc_pwrite, pwrite)
  71438. -# ifdef __UCLIBC_HAS_LFS__
  71439. -# define __NR___libc_pwrite64 __NR_pwrite
  71440. -_syscall4(ssize_t, __libc_pwrite64, int, fd, const void *, buf, size_t, count, off64_t, offset)
  71441. -weak_alias (__libc_pwrite64, pwrite64)
  71442. -# endif /* __UCLIBC_HAS_LFS__ */
  71443. -# else /* O32 || N32 */
  71444. -# define __NR___syscall_pwrite __NR_pwrite
  71445. -static __inline__ _syscall6(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
  71446. - size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
  71447. -
  71448. -ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
  71449. -{
  71450. - return(__syscall_pwrite(fd,buf,count,0,__LONG_LONG_PAIR(offset>>31,offset)));
  71451. -}
  71452. -weak_alias(__libc_pwrite,pwrite)
  71453. -
  71454. -# ifdef __UCLIBC_HAS_LFS__
  71455. -ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
  71456. -{
  71457. - uint32_t low = offset & 0xffffffff;
  71458. - uint32_t high = offset >> 32;
  71459. - return(__syscall_pwrite(fd, buf, count, 0, __LONG_LONG_PAIR (high, low)));
  71460. -}
  71461. -weak_alias(__libc_pwrite64,pwrite64)
  71462. -# endif /* __UCLIBC_HAS_LFS__ */
  71463. -# endif /* O32 || N32 */
  71464. -#endif /* __NR_pwrite */
  71465. +#include "../common/pread_write.c"
  71466. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/readahead.c uClibc-git/libc/sysdeps/linux/mips/readahead.c
  71467. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/readahead.c 2012-05-15 09:20:09.000000000 +0200
  71468. +++ uClibc-git/libc/sysdeps/linux/mips/readahead.c 1970-01-01 01:00:00.000000000 +0100
  71469. @@ -1,41 +0,0 @@
  71470. -/* Provide kernel hint to read ahead.
  71471. - Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
  71472. - This file is part of the GNU C Library.
  71473. -
  71474. - The GNU C Library is free software; you can redistribute it and/or
  71475. - modify it under the terms of the GNU Lesser General Public
  71476. - License as published by the Free Software Foundation; either
  71477. - version 2.1 of the License, or (at your option) any later version.
  71478. -
  71479. - The GNU C Library is distributed in the hope that it will be useful,
  71480. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  71481. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  71482. - Lesser General Public License for more details.
  71483. -
  71484. - You should have received a copy of the GNU Lesser General Public
  71485. - License along with the GNU C Library; if not, write to the Free
  71486. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  71487. - 02111-1307 USA. */
  71488. -
  71489. -#include <errno.h>
  71490. -#include <fcntl.h>
  71491. -#include <sys/types.h>
  71492. -#include <sys/syscall.h>
  71493. -
  71494. -#ifdef __UCLIBC_HAS_LFS__
  71495. -#include <_lfs_64.h>
  71496. -# ifdef __NR_readahead
  71497. -
  71498. -ssize_t readahead(int fd, off64_t offset, size_t count)
  71499. -{
  71500. -# if _MIPS_SIM == _ABIO32
  71501. - return INLINE_SYSCALL (readahead, 5, fd, 0,
  71502. - __LONG_LONG_PAIR ((off_t) (offset >> 32), (off_t) offset),
  71503. - count);
  71504. -# else /* N32 || N64 */
  71505. - return INLINE_SYSCALL (readahead, 3, fd, offset, count);
  71506. -# endif
  71507. -}
  71508. -
  71509. -# endif
  71510. -#endif
  71511. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/setcontext.S uClibc-git/libc/sysdeps/linux/mips/setcontext.S
  71512. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/setcontext.S 1970-01-01 01:00:00.000000000 +0100
  71513. +++ uClibc-git/libc/sysdeps/linux/mips/setcontext.S 2014-07-25 20:36:07.313337341 +0200
  71514. @@ -0,0 +1,191 @@
  71515. +/* Set current context.
  71516. + Copyright (C) 2009 Free Software Foundation, Inc.
  71517. + This file is part of the GNU C Library.
  71518. + Contributed by Maciej W. Rozycki <macro@codesourcery.com>.
  71519. +
  71520. + The GNU C Library is free software; you can redistribute it and/or
  71521. + modify it under the terms of the GNU Lesser General Public
  71522. + License as published by the Free Software Foundation; either
  71523. + version 2.1 of the License, or (at your option) any later version.
  71524. +
  71525. + The GNU C Library is distributed in the hope that it will be useful,
  71526. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  71527. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  71528. + Lesser General Public License for more details.
  71529. +
  71530. + You should have received a copy of the GNU Lesser General Public
  71531. + License along with the GNU C Library. If not, see
  71532. + <http://www.gnu.org/licenses/>. */
  71533. +
  71534. +#include <sysdep.h>
  71535. +#include <sys/asm.h>
  71536. +#include <sys/fpregdef.h>
  71537. +#include <sys/regdef.h>
  71538. +
  71539. +#include "ucontext_i.h"
  71540. +
  71541. +/* int setcontext (const ucontext_t *ucp) */
  71542. +
  71543. + .text
  71544. +LOCALSZ = 0
  71545. +ARGSZ = 0
  71546. +MASK = 0x00000000
  71547. +#ifdef __PIC__
  71548. +LOCALSZ = 1 /* save gp */
  71549. +#endif
  71550. +#if _MIPS_SIM != _ABIO32
  71551. +ARGSZ = 1 /* save a0 */
  71552. +# ifdef __PIC__
  71553. +MASK = 0x10000000
  71554. +# endif
  71555. +#endif
  71556. +FRAMESZ = (((ARGSZ + LOCALSZ) * SZREG) + ALSZ) & ALMASK
  71557. +GPOFF = FRAMESZ - ((ARGSZ + 1) * SZREG)
  71558. +#if _MIPS_SIM != _ABIO32
  71559. +A0OFF = FRAMESZ - (1 * SZREG) /* callee-allocated */
  71560. +#else
  71561. +A0OFF = FRAMESZ + (0 * SZREG) /* caller-allocated */
  71562. +#endif
  71563. +
  71564. +NESTED (__setcontext, FRAMESZ, ra)
  71565. + .mask MASK, -(ARGSZ * SZREG)
  71566. + .fmask 0x00000000, 0
  71567. +
  71568. +#ifdef __PIC__
  71569. + SETUP_GP
  71570. +#endif
  71571. +
  71572. + PTR_ADDIU sp, -FRAMESZ
  71573. +
  71574. +#ifdef __PIC__
  71575. + SETUP_GP64 (GPOFF, __setcontext)
  71576. + SAVE_GP (GPOFF)
  71577. +#endif
  71578. +
  71579. +#ifdef PROF
  71580. + .set noat
  71581. + move AT, ra
  71582. + jal _mcount
  71583. + .set at
  71584. +#endif
  71585. +
  71586. + /* Check for the magic flag. */
  71587. + li v0, 1
  71588. + REG_L v1, (0 * SZREG + MCONTEXT_GREGS)(a0) /* zero */
  71589. + bne v0, v1, 98f
  71590. +
  71591. + REG_S a0, A0OFF(sp)
  71592. +
  71593. +/* rt_sigprocmask (SIG_SETMASK, &ucp->uc_sigmask, NULL, _NSIG8) */
  71594. + li a3, _NSIG8
  71595. + move a2, zero
  71596. + PTR_ADDU a1, a0, UCONTEXT_SIGMASK
  71597. + li a0, SIG_SETMASK
  71598. +
  71599. + li v0, SYS_ify (rt_sigprocmask)
  71600. + syscall
  71601. + bnez a3, 99f
  71602. +
  71603. + REG_L v0, A0OFF(sp)
  71604. +
  71605. +#ifdef __mips_hard_float
  71606. +# if _MIPS_SIM == _ABI64
  71607. + l.d fs0, (24 * SZREG + MCONTEXT_FPREGS)(v0)
  71608. + l.d fs1, (25 * SZREG + MCONTEXT_FPREGS)(v0)
  71609. + l.d fs2, (26 * SZREG + MCONTEXT_FPREGS)(v0)
  71610. + l.d fs3, (27 * SZREG + MCONTEXT_FPREGS)(v0)
  71611. + l.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(v0)
  71612. + l.d fs5, (29 * SZREG + MCONTEXT_FPREGS)(v0)
  71613. + l.d fs6, (30 * SZREG + MCONTEXT_FPREGS)(v0)
  71614. + l.d fs7, (31 * SZREG + MCONTEXT_FPREGS)(v0)
  71615. +
  71616. +# else /* _MIPS_SIM != _ABI64 */
  71617. + l.d fs0, (20 * SZREG + MCONTEXT_FPREGS)(v0)
  71618. + l.d fs1, (22 * SZREG + MCONTEXT_FPREGS)(v0)
  71619. + l.d fs2, (24 * SZREG + MCONTEXT_FPREGS)(v0)
  71620. + l.d fs3, (26 * SZREG + MCONTEXT_FPREGS)(v0)
  71621. + l.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(v0)
  71622. + l.d fs5, (30 * SZREG + MCONTEXT_FPREGS)(v0)
  71623. +
  71624. +# endif /* _MIPS_SIM != _ABI64 */
  71625. +
  71626. + lw v1, MCONTEXT_FPC_CSR(v0)
  71627. + ctc1 v1, fcr31
  71628. +#endif /* __mips_hard_float */
  71629. +
  71630. + /* Note the contents of argument registers will be random
  71631. + unless makecontext() has been called. */
  71632. + REG_L a0, (4 * SZREG + MCONTEXT_GREGS)(v0)
  71633. + REG_L a1, (5 * SZREG + MCONTEXT_GREGS)(v0)
  71634. + REG_L a2, (6 * SZREG + MCONTEXT_GREGS)(v0)
  71635. + REG_L a3, (7 * SZREG + MCONTEXT_GREGS)(v0)
  71636. +#if _MIPS_SIM != _ABIO32
  71637. + REG_L a4, (8 * SZREG + MCONTEXT_GREGS)(v0)
  71638. + REG_L a5, (9 * SZREG + MCONTEXT_GREGS)(v0)
  71639. + REG_L a6, (10 * SZREG + MCONTEXT_GREGS)(v0)
  71640. + REG_L a7, (11 * SZREG + MCONTEXT_GREGS)(v0)
  71641. +#endif
  71642. +
  71643. + REG_L s0, (16 * SZREG + MCONTEXT_GREGS)(v0)
  71644. + REG_L s1, (17 * SZREG + MCONTEXT_GREGS)(v0)
  71645. + REG_L s2, (18 * SZREG + MCONTEXT_GREGS)(v0)
  71646. + REG_L s3, (19 * SZREG + MCONTEXT_GREGS)(v0)
  71647. + REG_L s4, (20 * SZREG + MCONTEXT_GREGS)(v0)
  71648. + REG_L s5, (21 * SZREG + MCONTEXT_GREGS)(v0)
  71649. + REG_L s6, (22 * SZREG + MCONTEXT_GREGS)(v0)
  71650. + REG_L s7, (23 * SZREG + MCONTEXT_GREGS)(v0)
  71651. +#if ! defined (__PIC__) || _MIPS_SIM != _ABIO32
  71652. + REG_L gp, (28 * SZREG + MCONTEXT_GREGS)(v0)
  71653. +#endif
  71654. + REG_L sp, (29 * SZREG + MCONTEXT_GREGS)(v0)
  71655. + REG_L fp, (30 * SZREG + MCONTEXT_GREGS)(v0)
  71656. + REG_L ra, (31 * SZREG + MCONTEXT_GREGS)(v0)
  71657. + REG_L t9, MCONTEXT_PC(v0)
  71658. +
  71659. + move v0, zero
  71660. + jr t9
  71661. +
  71662. +98:
  71663. + /* This is a context obtained from a signal handler.
  71664. + Perform a full restore by pushing the context
  71665. + passed onto a simulated signal frame on the stack
  71666. + and call the signal return syscall as if a signal
  71667. + handler exited normally. */
  71668. + PTR_ADDIU sp, -((RT_SIGFRAME_SIZE + ALSZ) & ALMASK)
  71669. +
  71670. + /* Only ucontext is referred to from rt_sigreturn,
  71671. + copy it. */
  71672. + PTR_ADDIU t1, sp, RT_SIGFRAME_UCONTEXT
  71673. + li t3, ((UCONTEXT_SIZE + SZREG - 1) / SZREG) - 1
  71674. +0:
  71675. + REG_L t2, (a0)
  71676. + PTR_ADDIU a0, SZREG
  71677. + REG_S t2, (t1)
  71678. + PTR_ADDIU t1, SZREG
  71679. + .set noreorder
  71680. + bgtz t3, 0b
  71681. + addiu t3, -1
  71682. + .set reorder
  71683. +
  71684. +/* rt_sigreturn () -- no arguments, sp points to struct rt_sigframe. */
  71685. + li v0, SYS_ify (rt_sigreturn)
  71686. + syscall
  71687. +
  71688. + /* Restore the stack and fall through to the error
  71689. + path. Successful rt_sigreturn never returns to
  71690. + its calling place. */
  71691. + PTR_ADDIU sp, ((RT_SIGFRAME_SIZE + ALSZ) & ALMASK)
  71692. +99:
  71693. +#ifdef __PIC__
  71694. + PTR_LA t9, JUMPTARGET (__syscall_error)
  71695. + RESTORE_GP64
  71696. + PTR_ADDIU sp, FRAMESZ
  71697. + jr t9
  71698. +
  71699. +#else /* ! __PIC__ */
  71700. +
  71701. + j JUMPTARGET (__syscall_error)
  71702. +#endif /* ! __PIC__ */
  71703. +PSEUDO_END (__setcontext)
  71704. +
  71705. +weak_alias (__setcontext, setcontext)
  71706. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/setjmp_aux.c uClibc-git/libc/sysdeps/linux/mips/setjmp_aux.c
  71707. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/setjmp_aux.c 2012-05-15 09:20:09.000000000 +0200
  71708. +++ uClibc-git/libc/sysdeps/linux/mips/setjmp_aux.c 2014-07-25 20:36:07.313337341 +0200
  71709. @@ -13,9 +13,8 @@
  71710. Lesser General Public License for more details.
  71711. You should have received a copy of the GNU Lesser General Public
  71712. - License along with the GNU C Library; if not, write to the Free
  71713. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  71714. - 02111-1307 USA. */
  71715. + License along with the GNU C Library; if not, see
  71716. + <http://www.gnu.org/licenses/>. */
  71717. #include <features.h>
  71718. #include <setjmp.h>
  71719. @@ -27,11 +26,9 @@
  71720. pointer. We do things this way because it's difficult to reliably
  71721. access them in C. */
  71722. -extern int __sigjmp_save (sigjmp_buf, int);
  71723. -
  71724. int
  71725. #if _MIPS_SIM == _MIPS_SIM_ABI64
  71726. -__sigsetjmp_aux (jmp_buf env, int savemask, long sp, long fp)
  71727. +__sigsetjmp_aux (jmp_buf env, int savemask, long long sp, long long fp, long long gp)
  71728. #else /* O32 || N32 */
  71729. __sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp)
  71730. #endif /* O32 || N32 */
  71731. @@ -65,14 +62,14 @@
  71732. #endif
  71733. /* .. and the stack pointer; */
  71734. - env[0].__jmpbuf[0].__sp = (void *) sp;
  71735. + env[0].__jmpbuf[0].__sp = (ptrsize) sp;
  71736. /* .. and the FP; it'll be in s8. */
  71737. - env[0].__jmpbuf[0].__fp = (void *) fp;
  71738. + env[0].__jmpbuf[0].__fp = (ptrsize) fp;
  71739. /* .. and the GP; */
  71740. #if _MIPS_SIM == _MIPS_SIM_ABI64
  71741. - __asm__ __volatile__ ("sd $gp, %0" : : "m" (env[0].__jmpbuf[0].__gp));
  71742. + env[0].__jmpbuf[0].__gp = (ptrsize) gp;
  71743. #else
  71744. __asm__ __volatile__ ("sw $gp, %0" : : "m" (env[0].__jmpbuf[0].__gp));
  71745. #endif
  71746. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/setjmp.S uClibc-git/libc/sysdeps/linux/mips/setjmp.S
  71747. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/setjmp.S 2012-05-15 09:20:09.000000000 +0200
  71748. +++ uClibc-git/libc/sysdeps/linux/mips/setjmp.S 2014-07-25 20:36:07.313337341 +0200
  71749. @@ -12,9 +12,8 @@
  71750. Lesser General Public License for more details.
  71751. You should have received a copy of the GNU Lesser General Public
  71752. - License along with the GNU C Library; if not, write to the Free
  71753. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  71754. - 02111-1307 USA. */
  71755. + License along with the GNU C Library; if not, see
  71756. + <http://www.gnu.org/licenses/>. */
  71757. #include <sys/regdef.h>
  71758. #include <sys/asm.h>
  71759. @@ -53,6 +52,7 @@
  71760. PTR_LA t9, __sigsetjmp_aux
  71761. #if _MIPS_SIM != _MIPS_SIM_ABI32
  71762. .cpreturn
  71763. + move a4, gp
  71764. #endif
  71765. jr t9
  71766. #else
  71767. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sgidefs.h uClibc-git/libc/sysdeps/linux/mips/sgidefs.h
  71768. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sgidefs.h 2012-05-15 09:20:09.000000000 +0200
  71769. +++ uClibc-git/libc/sysdeps/linux/mips/sgidefs.h 2014-07-25 20:36:07.313337341 +0200
  71770. @@ -13,9 +13,8 @@
  71771. Lesser General Public License for more details.
  71772. You should have received a copy of the GNU Lesser General Public
  71773. - License along with the GNU C Library; if not, write to the Free
  71774. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  71775. - 02111-1307 USA. */
  71776. + License along with the GNU C Library; if not, see
  71777. + <http://www.gnu.org/licenses/>. */
  71778. #ifndef _SGIDEFS_H
  71779. #define _SGIDEFS_H 1
  71780. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sigaction.c uClibc-git/libc/sysdeps/linux/mips/sigaction.c
  71781. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sigaction.c 2012-05-15 09:20:09.000000000 +0200
  71782. +++ uClibc-git/libc/sysdeps/linux/mips/sigaction.c 2014-07-25 20:36:07.313337341 +0200
  71783. @@ -13,8 +13,7 @@
  71784. You should have received a copy of the GNU Library General Public
  71785. License along with the GNU C Library; see the file COPYING.LIB. If not,
  71786. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  71787. - Boston, MA 02111-1307, USA.
  71788. + see <http://www.gnu.org/licenses/>.
  71789. Totally hacked up for uClibc by Erik Andersen <andersen@codepoet.org>
  71790. */
  71791. @@ -27,9 +26,6 @@
  71792. #define SA_RESTORER 0x04000000
  71793. -extern __typeof(sigaction) __libc_sigaction;
  71794. -
  71795. -
  71796. #ifdef __NR_rt_sigaction
  71797. # if _MIPS_SIM != _ABIO32
  71798. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/swapcontext.S uClibc-git/libc/sysdeps/linux/mips/swapcontext.S
  71799. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/swapcontext.S 1970-01-01 01:00:00.000000000 +0100
  71800. +++ uClibc-git/libc/sysdeps/linux/mips/swapcontext.S 2014-07-25 20:36:07.313337341 +0200
  71801. @@ -0,0 +1,211 @@
  71802. +/* Save and set current context.
  71803. + Copyright (C) 2009 Free Software Foundation, Inc.
  71804. + This file is part of the GNU C Library.
  71805. + Contributed by Maciej W. Rozycki <macro@codesourcery.com>.
  71806. +
  71807. + The GNU C Library is free software; you can redistribute it and/or
  71808. + modify it under the terms of the GNU Lesser General Public
  71809. + License as published by the Free Software Foundation; either
  71810. + version 2.1 of the License, or (at your option) any later version.
  71811. +
  71812. + The GNU C Library is distributed in the hope that it will be useful,
  71813. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  71814. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  71815. + Lesser General Public License for more details.
  71816. +
  71817. + You should have received a copy of the GNU Lesser General Public
  71818. + License along with the GNU C Library. If not, see
  71819. + <http://www.gnu.org/licenses/>. */
  71820. +
  71821. +#include <sysdep.h>
  71822. +#include <sys/asm.h>
  71823. +#include <sys/fpregdef.h>
  71824. +#include <sys/regdef.h>
  71825. +
  71826. +#include "ucontext_i.h"
  71827. +
  71828. +/* int swapcontext (ucontext_t *oucp, const ucontext_t *ucp) */
  71829. +
  71830. + .text
  71831. +LOCALSZ = 0
  71832. +ARGSZ = 0
  71833. +MASK = 0x00000000
  71834. +#ifdef __PIC__
  71835. +LOCALSZ = 1 /* save gp */
  71836. +#endif
  71837. +#if _MIPS_SIM != _ABIO32
  71838. +ARGSZ = 1 /* save a1 */
  71839. +# ifdef __PIC__
  71840. +MASK = 0x10000000
  71841. +# endif
  71842. +#endif
  71843. +FRAMESZ = (((ARGSZ + LOCALSZ) * SZREG) + ALSZ) & ALMASK
  71844. +GPOFF = FRAMESZ - ((ARGSZ + 1) * SZREG)
  71845. +#if _MIPS_SIM != _ABIO32
  71846. +A1OFF = FRAMESZ - (1 * SZREG) /* callee-allocated */
  71847. +#else
  71848. +A1OFF = FRAMESZ + (1 * SZREG) /* caller-allocated */
  71849. +#endif
  71850. +
  71851. +NESTED (__swapcontext, FRAMESZ, ra)
  71852. + .mask MASK, -(ARGSZ * SZREG)
  71853. + .fmask 0x00000000, 0
  71854. +
  71855. +#ifdef __PIC__
  71856. + SETUP_GP
  71857. +
  71858. + move a2, sp
  71859. +# define _SP a2
  71860. +
  71861. +# if _MIPS_SIM != _ABIO32
  71862. + move a3, gp
  71863. +# define _GP a3
  71864. +# endif
  71865. +
  71866. + PTR_ADDIU sp, -FRAMESZ
  71867. + SETUP_GP64 (GPOFF, __swapcontext)
  71868. + SAVE_GP (GPOFF)
  71869. +
  71870. +#else /* ! __PIC__ */
  71871. +# define _SP sp
  71872. +# define _GP gp
  71873. +
  71874. +#endif /* ! __PIC__ */
  71875. +
  71876. +#ifdef PROF
  71877. + .set noat
  71878. + move AT, ra
  71879. + jal _mcount
  71880. + .set at
  71881. +#endif
  71882. +
  71883. + /* Store a magic flag. */
  71884. + li v1, 1
  71885. + REG_S v1, (0 * SZREG + MCONTEXT_GREGS)(a0) /* zero */
  71886. +
  71887. + REG_S s0, (16 * SZREG + MCONTEXT_GREGS)(a0)
  71888. + REG_S s1, (17 * SZREG + MCONTEXT_GREGS)(a0)
  71889. + REG_S s2, (18 * SZREG + MCONTEXT_GREGS)(a0)
  71890. + REG_S s3, (19 * SZREG + MCONTEXT_GREGS)(a0)
  71891. + REG_S s4, (20 * SZREG + MCONTEXT_GREGS)(a0)
  71892. + REG_S s5, (21 * SZREG + MCONTEXT_GREGS)(a0)
  71893. + REG_S s6, (22 * SZREG + MCONTEXT_GREGS)(a0)
  71894. + REG_S s7, (23 * SZREG + MCONTEXT_GREGS)(a0)
  71895. +#if ! defined (__PIC__) || _MIPS_SIM != _ABIO32
  71896. + REG_S _GP, (28 * SZREG + MCONTEXT_GREGS)(a0)
  71897. +#endif
  71898. + REG_S _SP, (29 * SZREG + MCONTEXT_GREGS)(a0)
  71899. + REG_S fp, (30 * SZREG + MCONTEXT_GREGS)(a0)
  71900. + REG_S ra, (31 * SZREG + MCONTEXT_GREGS)(a0)
  71901. + REG_S ra, MCONTEXT_PC(a0)
  71902. +
  71903. +#ifdef __mips_hard_float
  71904. +# if _MIPS_SIM == _ABI64
  71905. + s.d fs0, (24 * SZREG + MCONTEXT_FPREGS)(a0)
  71906. + s.d fs1, (25 * SZREG + MCONTEXT_FPREGS)(a0)
  71907. + s.d fs2, (26 * SZREG + MCONTEXT_FPREGS)(a0)
  71908. + s.d fs3, (27 * SZREG + MCONTEXT_FPREGS)(a0)
  71909. + s.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(a0)
  71910. + s.d fs5, (29 * SZREG + MCONTEXT_FPREGS)(a0)
  71911. + s.d fs6, (30 * SZREG + MCONTEXT_FPREGS)(a0)
  71912. + s.d fs7, (31 * SZREG + MCONTEXT_FPREGS)(a0)
  71913. +
  71914. +# else /* _MIPS_SIM != _ABI64 */
  71915. + s.d fs0, (20 * SZREG + MCONTEXT_FPREGS)(a0)
  71916. + s.d fs1, (22 * SZREG + MCONTEXT_FPREGS)(a0)
  71917. + s.d fs2, (24 * SZREG + MCONTEXT_FPREGS)(a0)
  71918. + s.d fs3, (26 * SZREG + MCONTEXT_FPREGS)(a0)
  71919. + s.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(a0)
  71920. + s.d fs5, (30 * SZREG + MCONTEXT_FPREGS)(a0)
  71921. +
  71922. +# endif /* _MIPS_SIM != _ABI64 */
  71923. +
  71924. + cfc1 v1, fcr31
  71925. + sw v1, MCONTEXT_FPC_CSR(a0)
  71926. +#endif /* __mips_hard_float */
  71927. +
  71928. + REG_S a1, A1OFF(sp)
  71929. +
  71930. +/* rt_sigprocmask (SIG_SETMASK, &ucp->uc_sigmask, &oucp->uc_sigmask, _NSIG8) */
  71931. + li a3, _NSIG8
  71932. + PTR_ADDU a2, a0, UCONTEXT_SIGMASK
  71933. + PTR_ADDU a1, a1, UCONTEXT_SIGMASK
  71934. + li a0, SIG_SETMASK
  71935. +
  71936. + li v0, SYS_ify (rt_sigprocmask)
  71937. + syscall
  71938. + bnez a3, 99f
  71939. +
  71940. + REG_L v0, A1OFF(sp)
  71941. +
  71942. +#ifdef __mips_hard_float
  71943. +# if _MIPS_SIM == _ABI64
  71944. + l.d fs0, (24 * SZREG + MCONTEXT_FPREGS)(v0)
  71945. + l.d fs1, (25 * SZREG + MCONTEXT_FPREGS)(v0)
  71946. + l.d fs2, (26 * SZREG + MCONTEXT_FPREGS)(v0)
  71947. + l.d fs3, (27 * SZREG + MCONTEXT_FPREGS)(v0)
  71948. + l.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(v0)
  71949. + l.d fs5, (29 * SZREG + MCONTEXT_FPREGS)(v0)
  71950. + l.d fs6, (30 * SZREG + MCONTEXT_FPREGS)(v0)
  71951. + l.d fs7, (31 * SZREG + MCONTEXT_FPREGS)(v0)
  71952. +
  71953. +# else /* _MIPS_SIM != _ABI64 */
  71954. + l.d fs0, (20 * SZREG + MCONTEXT_FPREGS)(v0)
  71955. + l.d fs1, (22 * SZREG + MCONTEXT_FPREGS)(v0)
  71956. + l.d fs2, (24 * SZREG + MCONTEXT_FPREGS)(v0)
  71957. + l.d fs3, (26 * SZREG + MCONTEXT_FPREGS)(v0)
  71958. + l.d fs4, (28 * SZREG + MCONTEXT_FPREGS)(v0)
  71959. + l.d fs5, (30 * SZREG + MCONTEXT_FPREGS)(v0)
  71960. +
  71961. +# endif /* _MIPS_SIM != _ABI64 */
  71962. +
  71963. + lw v1, MCONTEXT_FPC_CSR(v0)
  71964. + ctc1 v1, fcr31
  71965. +#endif /* __mips_hard_float */
  71966. +
  71967. + /* Note the contents of argument registers will be random
  71968. + unless makecontext() has been called. */
  71969. + REG_L a0, (4 * SZREG + MCONTEXT_GREGS)(v0)
  71970. + REG_L a1, (5 * SZREG + MCONTEXT_GREGS)(v0)
  71971. + REG_L a2, (6 * SZREG + MCONTEXT_GREGS)(v0)
  71972. + REG_L a3, (7 * SZREG + MCONTEXT_GREGS)(v0)
  71973. +#if _MIPS_SIM != _ABIO32
  71974. + REG_L a4, (8 * SZREG + MCONTEXT_GREGS)(v0)
  71975. + REG_L a5, (9 * SZREG + MCONTEXT_GREGS)(v0)
  71976. + REG_L a6, (10 * SZREG + MCONTEXT_GREGS)(v0)
  71977. + REG_L a7, (11 * SZREG + MCONTEXT_GREGS)(v0)
  71978. +#endif
  71979. +
  71980. + REG_L s0, (16 * SZREG + MCONTEXT_GREGS)(v0)
  71981. + REG_L s1, (17 * SZREG + MCONTEXT_GREGS)(v0)
  71982. + REG_L s2, (18 * SZREG + MCONTEXT_GREGS)(v0)
  71983. + REG_L s3, (19 * SZREG + MCONTEXT_GREGS)(v0)
  71984. + REG_L s4, (20 * SZREG + MCONTEXT_GREGS)(v0)
  71985. + REG_L s5, (21 * SZREG + MCONTEXT_GREGS)(v0)
  71986. + REG_L s6, (22 * SZREG + MCONTEXT_GREGS)(v0)
  71987. + REG_L s7, (23 * SZREG + MCONTEXT_GREGS)(v0)
  71988. +#if ! defined (__PIC__) || _MIPS_SIM != _ABIO32
  71989. + REG_L gp, (28 * SZREG + MCONTEXT_GREGS)(v0)
  71990. +#endif
  71991. + REG_L sp, (29 * SZREG + MCONTEXT_GREGS)(v0)
  71992. + REG_L fp, (30 * SZREG + MCONTEXT_GREGS)(v0)
  71993. + REG_L ra, (31 * SZREG + MCONTEXT_GREGS)(v0)
  71994. + REG_L t9, MCONTEXT_PC(v0)
  71995. +
  71996. + move v0, zero
  71997. + jr t9
  71998. +
  71999. +99:
  72000. +#ifdef __PIC__
  72001. + PTR_LA t9, JUMPTARGET (__syscall_error)
  72002. + RESTORE_GP64
  72003. + PTR_ADDIU sp, FRAMESZ
  72004. + jr t9
  72005. +
  72006. +#else /* ! __PIC__ */
  72007. +
  72008. + j JUMPTARGET (__syscall_error)
  72009. +#endif /* ! __PIC__ */
  72010. +PSEUDO_END (__swapcontext)
  72011. +
  72012. +weak_alias (__swapcontext, swapcontext)
  72013. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/asm.h uClibc-git/libc/sysdeps/linux/mips/sys/asm.h
  72014. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/asm.h 2012-05-15 09:20:09.000000000 +0200
  72015. +++ uClibc-git/libc/sysdeps/linux/mips/sys/asm.h 2014-07-25 20:36:07.333337446 +0200
  72016. @@ -13,9 +13,8 @@
  72017. Lesser General Public License for more details.
  72018. You should have received a copy of the GNU Lesser General Public
  72019. - License along with the GNU C Library; if not, write to the Free
  72020. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72021. - 02111-1307 USA. */
  72022. + License along with the GNU C Library; if not, see
  72023. + <http://www.gnu.org/licenses/>. */
  72024. #ifndef _SYS_ASM_H
  72025. #define _SYS_ASM_H
  72026. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/cachectl.h uClibc-git/libc/sysdeps/linux/mips/sys/cachectl.h
  72027. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/cachectl.h 2012-05-15 09:20:09.000000000 +0200
  72028. +++ uClibc-git/libc/sysdeps/linux/mips/sys/cachectl.h 2014-07-25 20:36:07.333337446 +0200
  72029. @@ -12,9 +12,8 @@
  72030. Lesser General Public License for more details.
  72031. You should have received a copy of the GNU Lesser General Public
  72032. - License along with the GNU C Library; if not, write to the Free
  72033. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72034. - 02111-1307 USA. */
  72035. + License along with the GNU C Library; if not, see
  72036. + <http://www.gnu.org/licenses/>. */
  72037. #ifndef _SYS_CACHECTL_H
  72038. #define _SYS_CACHECTL_H 1
  72039. @@ -29,13 +28,15 @@
  72040. __BEGIN_DECLS
  72041. #ifdef __USE_MISC
  72042. -extern int cachectl (void *addr, __const int nbytes, __const int op) __THROW;
  72043. +extern int cachectl (void *addr, const int nbytes, const int op) __THROW;
  72044. +#endif
  72045. +#if 0
  72046. +extern int __cachectl (void *addr, const int nbytes, const int op) __THROW;
  72047. #endif
  72048. -extern int __cachectl (void *addr, __const int nbytes, __const int op) __THROW;
  72049. #ifdef __USE_MISC
  72050. -extern int cacheflush (void *addr, __const int nbytes, __const int op) __THROW;
  72051. +extern int cacheflush (void *addr, const int nbytes, const int op) __THROW;
  72052. #endif
  72053. -extern int _flush_cache (char *addr, __const int nbytes, __const int op) __THROW;
  72054. +extern int _flush_cache (char *addr, const int nbytes, const int op) __THROW;
  72055. __END_DECLS
  72056. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/fpregdef.h uClibc-git/libc/sysdeps/linux/mips/sys/fpregdef.h
  72057. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/fpregdef.h 2012-05-15 09:20:09.000000000 +0200
  72058. +++ uClibc-git/libc/sysdeps/linux/mips/sys/fpregdef.h 2014-07-25 20:36:07.333337446 +0200
  72059. @@ -12,9 +12,8 @@
  72060. Lesser General Public License for more details.
  72061. You should have received a copy of the GNU Lesser General Public
  72062. - License along with the GNU C Library; if not, write to the Free
  72063. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72064. - 02111-1307 USA. */
  72065. + License along with the GNU C Library; if not, see
  72066. + <http://www.gnu.org/licenses/>. */
  72067. #ifndef _SYS_FPREGDEF_H
  72068. #define _SYS_FPREGDEF_H
  72069. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/procfs.h uClibc-git/libc/sysdeps/linux/mips/sys/procfs.h
  72070. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  72071. +++ uClibc-git/libc/sysdeps/linux/mips/sys/procfs.h 2014-07-25 20:36:07.333337446 +0200
  72072. @@ -12,9 +12,8 @@
  72073. Lesser General Public License for more details.
  72074. You should have received a copy of the GNU Lesser General Public
  72075. - License along with the GNU C Library; if not, write to the Free
  72076. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72077. - 02111-1307 USA. */
  72078. + License along with the GNU C Library; if not, see
  72079. + <http://www.gnu.org/licenses/>. */
  72080. #ifndef _SYS_PROCFS_H
  72081. #define _SYS_PROCFS_H 1
  72082. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/regdef.h uClibc-git/libc/sysdeps/linux/mips/sys/regdef.h
  72083. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/regdef.h 2012-05-15 09:20:09.000000000 +0200
  72084. +++ uClibc-git/libc/sysdeps/linux/mips/sys/regdef.h 2014-07-25 20:36:07.333337446 +0200
  72085. @@ -13,9 +13,8 @@
  72086. Lesser General Public License for more details.
  72087. You should have received a copy of the GNU Lesser General Public
  72088. - License along with the GNU C Library; if not, write to the Free
  72089. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72090. - 02111-1307 USA. */
  72091. + License along with the GNU C Library; if not, see
  72092. + <http://www.gnu.org/licenses/>. */
  72093. #ifndef _SYS_REGDEF_H
  72094. #define _SYS_REGDEF_H
  72095. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/sysmips.h uClibc-git/libc/sysdeps/linux/mips/sys/sysmips.h
  72096. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/sysmips.h 2012-05-15 09:20:09.000000000 +0200
  72097. +++ uClibc-git/libc/sysdeps/linux/mips/sys/sysmips.h 2014-07-25 20:36:07.333337446 +0200
  72098. @@ -12,9 +12,8 @@
  72099. Lesser General Public License for more details.
  72100. You should have received a copy of the GNU Lesser General Public
  72101. - License along with the GNU C Library; if not, write to the Free
  72102. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72103. - 02111-1307 USA. */
  72104. + License along with the GNU C Library; if not, see
  72105. + <http://www.gnu.org/licenses/>. */
  72106. #ifndef _SYS_SYSMIPS_H
  72107. #define _SYS_SYSMIPS_H 1
  72108. @@ -36,8 +35,8 @@
  72109. __BEGIN_DECLS
  72110. -extern int sysmips (__const int cmd, __const long arg1,
  72111. - __const int arg2, __const int arg3) __THROW;
  72112. +extern int sysmips (const int cmd, const long arg1,
  72113. + const int arg2, const int arg3) __THROW;
  72114. __END_DECLS
  72115. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/tas.h uClibc-git/libc/sysdeps/linux/mips/sys/tas.h
  72116. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/tas.h 2012-05-15 09:20:09.000000000 +0200
  72117. +++ uClibc-git/libc/sysdeps/linux/mips/sys/tas.h 2014-07-25 20:36:07.333337446 +0200
  72118. @@ -13,9 +13,8 @@
  72119. Lesser General Public License for more details.
  72120. You should have received a copy of the GNU Lesser General Public
  72121. - License along with the GNU C Library; if not, write to the Free
  72122. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72123. - 02111-1307 USA. */
  72124. + License along with the GNU C Library; if not, see
  72125. + <http://www.gnu.org/licenses/>. */
  72126. #ifndef _SYS_TAS_H
  72127. #define _SYS_TAS_H 1
  72128. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/ucontext.h uClibc-git/libc/sysdeps/linux/mips/sys/ucontext.h
  72129. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  72130. +++ uClibc-git/libc/sysdeps/linux/mips/sys/ucontext.h 2014-07-25 20:36:07.333337446 +0200
  72131. @@ -12,9 +12,8 @@
  72132. Lesser General Public License for more details.
  72133. You should have received a copy of the GNU Lesser General Public
  72134. - License along with the GNU C Library; if not, write to the Free
  72135. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72136. - 02111-1307 USA. */
  72137. + License along with the GNU C Library; if not, see
  72138. + <http://www.gnu.org/licenses/>. */
  72139. /* Don't rely on this, the interface is currently messed up and may need to
  72140. be broken to be fixed. */
  72141. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/user.h uClibc-git/libc/sysdeps/linux/mips/sys/user.h
  72142. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sys/user.h 2012-05-15 09:20:09.000000000 +0200
  72143. +++ uClibc-git/libc/sysdeps/linux/mips/sys/user.h 2014-07-25 20:36:07.333337446 +0200
  72144. @@ -12,9 +12,8 @@
  72145. Lesser General Public License for more details.
  72146. You should have received a copy of the GNU Lesser General Public
  72147. - License along with the GNU C Library; if not, write to the Free
  72148. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72149. - 02111-1307 USA. */
  72150. + License along with the GNU C Library; if not, see
  72151. + <http://www.gnu.org/licenses/>. */
  72152. #ifndef _SYS_USER_H
  72153. #define _SYS_USER_H 1
  72154. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/syscall_error.S uClibc-git/libc/sysdeps/linux/mips/syscall_error.S
  72155. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/syscall_error.S 2012-05-15 09:20:09.000000000 +0200
  72156. +++ uClibc-git/libc/sysdeps/linux/mips/syscall_error.S 2014-07-25 20:36:07.333337446 +0200
  72157. @@ -14,9 +14,8 @@
  72158. Lesser General Public License for more details.
  72159. You should have received a copy of the GNU Lesser General Public
  72160. - License along with the GNU C Library; if not, write to the Free
  72161. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72162. - 02111-1307 USA. */
  72163. + License along with the GNU C Library; if not, see
  72164. + <http://www.gnu.org/licenses/>. */
  72165. #include <sys/asm.h>
  72166. #include <sysdep.h>
  72167. @@ -43,7 +42,7 @@
  72168. #ifdef __PIC__
  72169. SAVE_GP(GPOFF)
  72170. #endif
  72171. - REG_S v0, V0OFF(sp)
  72172. + REG_S a0, V0OFF(sp)
  72173. REG_S ra, RAOFF(sp)
  72174. /* Find our per-thread errno address */
  72175. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/syscall.S uClibc-git/libc/sysdeps/linux/mips/syscall.S
  72176. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/syscall.S 2012-05-15 09:20:09.000000000 +0200
  72177. +++ uClibc-git/libc/sysdeps/linux/mips/syscall.S 2014-07-25 20:36:07.333337446 +0200
  72178. @@ -12,9 +12,8 @@
  72179. Lesser General Public License for more details.
  72180. You should have received a copy of the GNU Lesser General Public
  72181. - License along with the GNU C Library; if not, write to the Free
  72182. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72183. - 02111-1307 USA. */
  72184. + License along with the GNU C Library; if not, see
  72185. + <http://www.gnu.org/licenses/>. */
  72186. #include <features.h>
  72187. #include <sys/asm.h>
  72188. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/sysdep.h uClibc-git/libc/sysdeps/linux/mips/sysdep.h
  72189. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/sysdep.h 2012-05-15 09:20:09.000000000 +0200
  72190. +++ uClibc-git/libc/sysdeps/linux/mips/sysdep.h 2014-07-25 20:36:07.333337446 +0200
  72191. @@ -14,9 +14,8 @@
  72192. Lesser General Public License for more details.
  72193. You should have received a copy of the GNU Lesser General Public
  72194. - License along with the GNU C Library; if not, write to the Free
  72195. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72196. - 02111-1307 USA. */
  72197. + License along with the GNU C Library; if not, see
  72198. + <http://www.gnu.org/licenses/>. */
  72199. #ifndef _LINUX_MIPS_SYSDEP_H
  72200. #define _LINUX_MIPS_SYSDEP_H 1
  72201. @@ -78,8 +77,6 @@
  72202. #undef PSEUDO_END_ERRVAL
  72203. #define PSEUDO_END_ERRVAL(sym) .end sym; .size sym,.-sym
  72204. -#define ret_ERRVAL ret
  72205. -
  72206. #define r0 v0
  72207. #define r1 v1
  72208. /* The mips move insn is d,s. */
  72209. @@ -133,258 +130,6 @@
  72210. #else /* ! __ASSEMBLER__ */
  72211. -/* Define a macro which expands into the inline wrapper code for a system
  72212. - call. */
  72213. -#undef INLINE_SYSCALL
  72214. -#define INLINE_SYSCALL(name, nr, args...) \
  72215. - ({ INTERNAL_SYSCALL_DECL(err); \
  72216. - long result_var = INTERNAL_SYSCALL (name, err, nr, args); \
  72217. - if ( INTERNAL_SYSCALL_ERROR_P (result_var, err) ) \
  72218. - { \
  72219. - __set_errno (INTERNAL_SYSCALL_ERRNO (result_var, err)); \
  72220. - result_var = -1L; \
  72221. - } \
  72222. - result_var; })
  72223. -
  72224. -#undef INTERNAL_SYSCALL_DECL
  72225. -#define INTERNAL_SYSCALL_DECL(err) long err
  72226. -
  72227. -#undef INTERNAL_SYSCALL_ERROR_P
  72228. -#define INTERNAL_SYSCALL_ERROR_P(val, err) ((long) (err))
  72229. -
  72230. -#undef INTERNAL_SYSCALL_ERRNO
  72231. -#define INTERNAL_SYSCALL_ERRNO(val, err) (val)
  72232. -
  72233. -#undef INTERNAL_SYSCALL
  72234. -#define INTERNAL_SYSCALL(name, err, nr, args...) \
  72235. - internal_syscall##nr (, "li\t$2, %2\t\t\t# " #name "\n\t", \
  72236. - "i" (SYS_ify (name)), err, args)
  72237. -
  72238. -#undef INTERNAL_SYSCALL_NCS
  72239. -#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \
  72240. - internal_syscall##nr (= number, , "r" (__v0), err, args)
  72241. -#undef internal_syscall0
  72242. -#define internal_syscall0(ncs_init, cs_init, input, err, dummy...) \
  72243. -({ \
  72244. - long _sys_result; \
  72245. - \
  72246. - { \
  72247. - register long __v0 __asm__("$2") ncs_init; \
  72248. - register long __a3 __asm__("$7"); \
  72249. - __asm__ __volatile__ ( \
  72250. - ".set\tnoreorder\n\t" \
  72251. - cs_init \
  72252. - "syscall\n\t" \
  72253. - ".set reorder" \
  72254. - : "=r" (__v0), "=r" (__a3) \
  72255. - : input \
  72256. - : __SYSCALL_CLOBBERS); \
  72257. - err = __a3; \
  72258. - _sys_result = __v0; \
  72259. - } \
  72260. - _sys_result; \
  72261. -})
  72262. -
  72263. -#undef internal_syscall1
  72264. -#define internal_syscall1(ncs_init, cs_init, input, err, arg1) \
  72265. -({ \
  72266. - long _sys_result; \
  72267. - \
  72268. - { \
  72269. - register long __v0 __asm__("$2") ncs_init; \
  72270. - register long __a0 __asm__("$4") = (long) arg1; \
  72271. - register long __a3 __asm__("$7"); \
  72272. - __asm__ __volatile__ ( \
  72273. - ".set\tnoreorder\n\t" \
  72274. - cs_init \
  72275. - "syscall\n\t" \
  72276. - ".set reorder" \
  72277. - : "=r" (__v0), "=r" (__a3) \
  72278. - : input, "r" (__a0) \
  72279. - : __SYSCALL_CLOBBERS); \
  72280. - err = __a3; \
  72281. - _sys_result = __v0; \
  72282. - } \
  72283. - _sys_result; \
  72284. -})
  72285. -
  72286. -#undef internal_syscall2
  72287. -#define internal_syscall2(ncs_init, cs_init, input, err, arg1, arg2) \
  72288. -({ \
  72289. - long _sys_result; \
  72290. - \
  72291. - { \
  72292. - register long __v0 __asm__("$2") ncs_init; \
  72293. - register long __a0 __asm__("$4") = (long) arg1; \
  72294. - register long __a1 __asm__("$5") = (long) arg2; \
  72295. - register long __a3 __asm__("$7"); \
  72296. - __asm__ __volatile__ ( \
  72297. - ".set\tnoreorder\n\t" \
  72298. - cs_init \
  72299. - "syscall\n\t" \
  72300. - ".set\treorder" \
  72301. - : "=r" (__v0), "=r" (__a3) \
  72302. - : input, "r" (__a0), "r" (__a1) \
  72303. - : __SYSCALL_CLOBBERS); \
  72304. - err = __a3; \
  72305. - _sys_result = __v0; \
  72306. - } \
  72307. - _sys_result; \
  72308. -})
  72309. -
  72310. -#undef internal_syscall3
  72311. -#define internal_syscall3(ncs_init, cs_init, input, err, arg1, arg2, arg3)\
  72312. -({ \
  72313. - long _sys_result; \
  72314. - \
  72315. - { \
  72316. - register long __v0 __asm__("$2") ncs_init; \
  72317. - register long __a0 __asm__("$4") = (long) arg1; \
  72318. - register long __a1 __asm__("$5") = (long) arg2; \
  72319. - register long __a2 __asm__("$6") = (long) arg3; \
  72320. - register long __a3 __asm__("$7"); \
  72321. - __asm__ __volatile__ ( \
  72322. - ".set\tnoreorder\n\t" \
  72323. - cs_init \
  72324. - "syscall\n\t" \
  72325. - ".set\treorder" \
  72326. - : "=r" (__v0), "=r" (__a3) \
  72327. - : input, "r" (__a0), "r" (__a1), "r" (__a2) \
  72328. - : __SYSCALL_CLOBBERS); \
  72329. - err = __a3; \
  72330. - _sys_result = __v0; \
  72331. - } \
  72332. - _sys_result; \
  72333. -})
  72334. -
  72335. -#undef internal_syscall4
  72336. -#define internal_syscall4(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4)\
  72337. -({ \
  72338. - long _sys_result; \
  72339. - \
  72340. - { \
  72341. - register long __v0 __asm__("$2") ncs_init; \
  72342. - register long __a0 __asm__("$4") = (long) arg1; \
  72343. - register long __a1 __asm__("$5") = (long) arg2; \
  72344. - register long __a2 __asm__("$6") = (long) arg3; \
  72345. - register long __a3 __asm__("$7") = (long) arg4; \
  72346. - __asm__ __volatile__ ( \
  72347. - ".set\tnoreorder\n\t" \
  72348. - cs_init \
  72349. - "syscall\n\t" \
  72350. - ".set\treorder" \
  72351. - : "=r" (__v0), "+r" (__a3) \
  72352. - : input, "r" (__a0), "r" (__a1), "r" (__a2) \
  72353. - : __SYSCALL_CLOBBERS); \
  72354. - err = __a3; \
  72355. - _sys_result = __v0; \
  72356. - } \
  72357. - _sys_result; \
  72358. -})
  72359. -
  72360. -/* We need to use a frame pointer for the functions in which we
  72361. - adjust $sp around the syscall, or debug information and unwind
  72362. - information will be $sp relative and thus wrong during the syscall. As
  72363. - of GCC 3.4.3, this is sufficient. */
  72364. -#define FORCE_FRAME_POINTER alloca (4)
  72365. -
  72366. -#undef internal_syscall5
  72367. -#define internal_syscall5(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5)\
  72368. -({ \
  72369. - long _sys_result; \
  72370. - \
  72371. - FORCE_FRAME_POINTER; \
  72372. - { \
  72373. - register long __v0 __asm__("$2") ncs_init; \
  72374. - register long __a0 __asm__("$4") = (long) arg1; \
  72375. - register long __a1 __asm__("$5") = (long) arg2; \
  72376. - register long __a2 __asm__("$6") = (long) arg3; \
  72377. - register long __a3 __asm__("$7") = (long) arg4; \
  72378. - __asm__ __volatile__ ( \
  72379. - ".set\tnoreorder\n\t" \
  72380. - "subu\t$29, 32\n\t" \
  72381. - "sw\t%6, 16($29)\n\t" \
  72382. - cs_init \
  72383. - "syscall\n\t" \
  72384. - "addiu\t$29, 32\n\t" \
  72385. - ".set\treorder" \
  72386. - : "=r" (__v0), "+r" (__a3) \
  72387. - : input, "r" (__a0), "r" (__a1), "r" (__a2), \
  72388. - "r" ((long)arg5) \
  72389. - : __SYSCALL_CLOBBERS); \
  72390. - err = __a3; \
  72391. - _sys_result = __v0; \
  72392. - } \
  72393. - _sys_result; \
  72394. -})
  72395. -
  72396. -#undef internal_syscall6
  72397. -#define internal_syscall6(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5, arg6)\
  72398. -({ \
  72399. - long _sys_result; \
  72400. - \
  72401. - FORCE_FRAME_POINTER; \
  72402. - { \
  72403. - register long __v0 __asm__("$2") ncs_init; \
  72404. - register long __a0 __asm__("$4") = (long) arg1; \
  72405. - register long __a1 __asm__("$5") = (long) arg2; \
  72406. - register long __a2 __asm__("$6") = (long) arg3; \
  72407. - register long __a3 __asm__("$7") = (long) arg4; \
  72408. - __asm__ __volatile__ ( \
  72409. - ".set\tnoreorder\n\t" \
  72410. - "subu\t$29, 32\n\t" \
  72411. - "sw\t%6, 16($29)\n\t" \
  72412. - "sw\t%7, 20($29)\n\t" \
  72413. - cs_init \
  72414. - "syscall\n\t" \
  72415. - "addiu\t$29, 32\n\t" \
  72416. - ".set\treorder" \
  72417. - : "=r" (__v0), "+r" (__a3) \
  72418. - : input, "r" (__a0), "r" (__a1), "r" (__a2), \
  72419. - "r" ((long)arg5), "r" ((long)arg6) \
  72420. - : __SYSCALL_CLOBBERS); \
  72421. - err = __a3; \
  72422. - _sys_result = __v0; \
  72423. - } \
  72424. - _sys_result; \
  72425. -})
  72426. -
  72427. -#undef internal_syscall7
  72428. -#define internal_syscall7(ncs_init, cs_init, input, err, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\
  72429. -({ \
  72430. - long _sys_result; \
  72431. - \
  72432. - FORCE_FRAME_POINTER; \
  72433. - { \
  72434. - register long __v0 __asm__("$2") ncs_init; \
  72435. - register long __a0 __asm__("$4") = (long) arg1; \
  72436. - register long __a1 __asm__("$5") = (long) arg2; \
  72437. - register long __a2 __asm__("$6") = (long) arg3; \
  72438. - register long __a3 __asm__("$7") = (long) arg4; \
  72439. - __asm__ __volatile__ ( \
  72440. - ".set\tnoreorder\n\t" \
  72441. - "subu\t$29, 32\n\t" \
  72442. - "sw\t%6, 16($29)\n\t" \
  72443. - "sw\t%7, 20($29)\n\t" \
  72444. - "sw\t%8, 24($29)\n\t" \
  72445. - cs_init \
  72446. - "syscall\n\t" \
  72447. - "addiu\t$29, 32\n\t" \
  72448. - ".set\treorder" \
  72449. - : "=r" (__v0), "+r" (__a3) \
  72450. - : input, "r" (__a0), "r" (__a1), "r" (__a2), \
  72451. - "r" ((long)arg5), "r" ((long)arg6), "r" ((long)arg7) \
  72452. - : __SYSCALL_CLOBBERS); \
  72453. - err = __a3; \
  72454. - _sys_result = __v0; \
  72455. - } \
  72456. - _sys_result; \
  72457. -})
  72458. -
  72459. -#undef __SYSCALL_CLOBBERS
  72460. -#define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \
  72461. - "$14", "$15", "$24", "$25", "memory"
  72462. -
  72463. /* Pointer mangling is not yet supported for MIPS. */
  72464. #define PTR_MANGLE(var) (void) (var)
  72465. #define PTR_DEMANGLE(var) (void) (var)
  72466. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/_test_and_set.c uClibc-git/libc/sysdeps/linux/mips/_test_and_set.c
  72467. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/_test_and_set.c 2012-05-15 09:20:09.000000000 +0200
  72468. +++ uClibc-git/libc/sysdeps/linux/mips/_test_and_set.c 2014-07-25 20:36:07.297337257 +0200
  72469. @@ -13,9 +13,8 @@
  72470. Lesser General Public License for more details.
  72471. You should have received a copy of the GNU Lesser General Public
  72472. - License along with the GNU C Library; if not, write to the Free
  72473. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72474. - 02111-1307 USA. */
  72475. + License along with the GNU C Library; if not, see
  72476. + <http://www.gnu.org/licenses/>. */
  72477. /* Define the real-function versions of all inline functions
  72478. defined in sys/tas.h */
  72479. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/ucontext_i.sym uClibc-git/libc/sysdeps/linux/mips/ucontext_i.sym
  72480. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/ucontext_i.sym 1970-01-01 01:00:00.000000000 +0100
  72481. +++ uClibc-git/libc/sysdeps/linux/mips/ucontext_i.sym 2014-07-25 20:36:07.333337446 +0200
  72482. @@ -0,0 +1,52 @@
  72483. +#include <inttypes.h>
  72484. +#include <signal.h>
  72485. +#include <stddef.h>
  72486. +#include <sys/ucontext.h>
  72487. +
  72488. +#include <kernel_rt_sigframe.h>
  72489. +
  72490. +-- Constants used by the rt_sigprocmask call.
  72491. +
  72492. +SIG_BLOCK
  72493. +SIG_SETMASK
  72494. +
  72495. +_NSIG8 (_NSIG / 8)
  72496. +
  72497. +-- Offsets of the fields in the kernel rt_sigframe_t structure.
  72498. +#define rt_sigframe(member) offsetof (kernel_rt_sigframe_t, member)
  72499. +
  72500. +RT_SIGFRAME_UCONTEXT rt_sigframe (rs_uc)
  72501. +
  72502. +RT_SIGFRAME_SIZE sizeof (kernel_rt_sigframe_t)
  72503. +
  72504. +-- Offsets of the fields in the ucontext_t structure.
  72505. +#define ucontext(member) offsetof (ucontext_t, member)
  72506. +#define stack(member) ucontext (uc_stack.member)
  72507. +#define mcontext(member) ucontext (uc_mcontext.member)
  72508. +
  72509. +UCONTEXT_FLAGS ucontext (uc_flags)
  72510. +UCONTEXT_LINK ucontext (uc_link)
  72511. +UCONTEXT_STACK ucontext (uc_stack)
  72512. +UCONTEXT_MCONTEXT ucontext (uc_mcontext)
  72513. +UCONTEXT_SIGMASK ucontext (uc_sigmask)
  72514. +
  72515. +STACK_SP stack (ss_sp)
  72516. +STACK_SIZE stack (ss_size)
  72517. +STACK_FLAGS stack (ss_flags)
  72518. +
  72519. +MCONTEXT_GREGS mcontext (gregs)
  72520. +MCONTEXT_FPREGS mcontext (fpregs)
  72521. +MCONTEXT_MDHI mcontext (mdhi)
  72522. +MCONTEXT_HI1 mcontext (hi1)
  72523. +MCONTEXT_HI2 mcontext (hi2)
  72524. +MCONTEXT_HI3 mcontext (hi3)
  72525. +MCONTEXT_MDLO mcontext (mdlo)
  72526. +MCONTEXT_LO1 mcontext (lo1)
  72527. +MCONTEXT_LO2 mcontext (lo2)
  72528. +MCONTEXT_LO3 mcontext (lo3)
  72529. +MCONTEXT_PC mcontext (pc)
  72530. +MCONTEXT_FPC_CSR mcontext (fpc_csr)
  72531. +MCONTEXT_USED_MATH mcontext (used_math)
  72532. +MCONTEXT_DSP mcontext (dsp)
  72533. +
  72534. +UCONTEXT_SIZE sizeof (ucontext_t)
  72535. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/mips/vfork.S uClibc-git/libc/sysdeps/linux/mips/vfork.S
  72536. --- uClibc-0.9.33.2/libc/sysdeps/linux/mips/vfork.S 2012-05-15 09:20:09.000000000 +0200
  72537. +++ uClibc-git/libc/sysdeps/linux/mips/vfork.S 2014-07-25 20:36:07.333337446 +0200
  72538. @@ -12,12 +12,12 @@
  72539. Lesser General Public License for more details.
  72540. You should have received a copy of the GNU Lesser General Public
  72541. - License along with the GNU C Library; if not, write to the Free
  72542. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72543. - 02111-1307 USA. */
  72544. + License along with the GNU C Library; if not, see
  72545. + <http://www.gnu.org/licenses/>. */
  72546. /* vfork() is just a special case of clone(). */
  72547. +#include <sys/syscall.h>
  72548. #include <sys/asm.h>
  72549. #include <sysdep.h>
  72550. @@ -34,6 +34,7 @@
  72551. /* int vfork() */
  72552. .text
  72553. + .hidden __vfork
  72554. LOCALSZ= 1
  72555. FRAMESZ= (((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK
  72556. GPOFF= FRAMESZ-(1*SZREG)
  72557. @@ -84,6 +85,7 @@
  72558. /* Something bad happened -- no child created. */
  72559. L(error):
  72560. + move a0, v0
  72561. #ifdef __PIC__
  72562. PTR_LA t9, __syscall_error
  72563. RESTORE_GP64
  72564. @@ -95,6 +97,6 @@
  72565. END(__vfork)
  72566. weak_alias(__vfork,vfork)
  72567. -libc_hidden_weak(vfork)
  72568. +libc_hidden_def(vfork)
  72569. #endif
  72570. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/fcntl.h uClibc-git/libc/sysdeps/linux/nios/bits/fcntl.h
  72571. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  72572. +++ uClibc-git/libc/sysdeps/linux/nios/bits/fcntl.h 2014-07-25 20:36:07.369337634 +0200
  72573. @@ -14,8 +14,7 @@
  72574. You should have received a copy of the GNU Library General Public
  72575. License along with the GNU C Library; see the file COPYING.LIB. If not,
  72576. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  72577. - Boston, MA 02111-1307, USA. */
  72578. + see <http://www.gnu.org/licenses/>. */
  72579. #ifndef _FCNTL_H
  72580. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  72581. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/mathdef.h uClibc-git/libc/sysdeps/linux/nios/bits/mathdef.h
  72582. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
  72583. +++ uClibc-git/libc/sysdeps/linux/nios/bits/mathdef.h 2014-07-25 20:36:07.369337634 +0200
  72584. @@ -12,9 +12,8 @@
  72585. Lesser General Public License for more details.
  72586. You should have received a copy of the GNU Lesser General Public
  72587. - License along with the GNU C Library; if not, write to the Free
  72588. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72589. - 02111-1307 USA. */
  72590. + License along with the GNU C Library; if not, see
  72591. + <http://www.gnu.org/licenses/>. */
  72592. #if !defined _MATH_H && !defined _COMPLEX_H
  72593. # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
  72594. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/setjmp.h uClibc-git/libc/sysdeps/linux/nios/bits/setjmp.h
  72595. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  72596. +++ uClibc-git/libc/sysdeps/linux/nios/bits/setjmp.h 2014-07-25 20:36:07.369337634 +0200
  72597. @@ -12,9 +12,8 @@
  72598. Lesser General Public License for more details.
  72599. You should have received a copy of the GNU Lesser General Public
  72600. - License along with the GNU C Library; if not, write to the Free
  72601. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72602. - 02111-1307 USA. */
  72603. + License along with the GNU C Library; if not, see
  72604. + <http://www.gnu.org/licenses/>. */
  72605. /* Define the machine-dependent type `jmp_buf'. Nios version. */
  72606. #ifndef _BITS_SETJMP_H
  72607. @@ -24,8 +23,6 @@
  72608. # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
  72609. #endif
  72610. -#ifndef _ASM
  72611. -
  72612. #include <signal.h>
  72613. typedef struct
  72614. @@ -44,33 +41,4 @@
  72615. } __jmp_buf[1];
  72616. -/* Test if longjmp to JMPBUF would unwind the frame
  72617. - containing a local variable at ADDRESS. */
  72618. -#define _JMPBUF_UNWINDS(jmpbuf, address) \
  72619. - ((void *) (address) < (void *) (jmpbuf)->__sp)
  72620. -
  72621. -#else /* _ASM */
  72622. -
  72623. -#define jmpbuf_l0 0x00
  72624. -#define jmpbuf_l1 0x01
  72625. -#define jmpbuf_l2 0x02
  72626. -#define jmpbuf_l3 0x03
  72627. -#define jmpbuf_l4 0x04
  72628. -#define jmpbuf_l5 0x05
  72629. -#define jmpbuf_l6 0x06
  72630. -#define jmpbuf_l7 0x07
  72631. -
  72632. -#define jmpbuf_i0 0x08
  72633. -#define jmpbuf_i1 0x09
  72634. -#define jmpbuf_i2 0x0a
  72635. -#define jmpbuf_i3 0x0b
  72636. -#define jmpbuf_i4 0x0c
  72637. -#define jmpbuf_i5 0x0d
  72638. -
  72639. -#define jmpbuf_sp 0x0e
  72640. -#define jmpbuf_jmpret 0x0f
  72641. -#define jmpbuf_callersret 0x10
  72642. -
  72643. -#endif /* _ASM */
  72644. -
  72645. #endif /* bits/setjmp.h */
  72646. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/sigcontextinfo.h uClibc-git/libc/sysdeps/linux/nios/bits/sigcontextinfo.h
  72647. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
  72648. +++ uClibc-git/libc/sysdeps/linux/nios/bits/sigcontextinfo.h 2014-07-25 20:36:07.369337634 +0200
  72649. @@ -13,9 +13,8 @@
  72650. Lesser General Public License for more details.
  72651. You should have received a copy of the GNU Lesser General Public
  72652. - License along with the GNU C Library; if not, write to the Free
  72653. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72654. - 02111-1307 USA. */
  72655. + License along with the GNU C Library; if not, see
  72656. + <http://www.gnu.org/licenses/>. */
  72657. #define SIGCONTEXT struct sigcontext *
  72658. #define SIGCONTEXT_EXTRA_ARGS
  72659. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/nios/bits/stackinfo.h
  72660. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  72661. +++ uClibc-git/libc/sysdeps/linux/nios/bits/stackinfo.h 2014-07-25 20:36:07.369337634 +0200
  72662. @@ -12,9 +12,8 @@
  72663. Lesser General Public License for more details.
  72664. You should have received a copy of the GNU Lesser General Public
  72665. - License along with the GNU C Library; if not, write to the Free
  72666. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72667. - 02111-1307 USA. */
  72668. + License along with the GNU C Library; if not, see
  72669. + <http://www.gnu.org/licenses/>. */
  72670. /* This file contains a bit of information about the stack allocation
  72671. of the processor. */
  72672. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/stat.h uClibc-git/libc/sysdeps/linux/nios/bits/stat.h
  72673. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
  72674. +++ uClibc-git/libc/sysdeps/linux/nios/bits/stat.h 2014-07-25 20:36:07.369337634 +0200
  72675. @@ -12,9 +12,8 @@
  72676. Lesser General Public License for more details.
  72677. You should have received a copy of the GNU Lesser General Public
  72678. - License along with the GNU C Library; if not, write to the Free
  72679. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72680. - 02111-1307 USA. */
  72681. + License along with the GNU C Library; if not, see
  72682. + <http://www.gnu.org/licenses/>. */
  72683. #ifndef _SYS_STAT_H
  72684. # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
  72685. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/nios/bits/uClibc_arch_features.h
  72686. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  72687. +++ uClibc-git/libc/sysdeps/linux/nios/bits/uClibc_arch_features.h 2014-07-25 20:36:07.369337634 +0200
  72688. @@ -12,8 +12,8 @@
  72689. /* can your target use syscall6() for mmap ? */
  72690. #undef __UCLIBC_MMAP_HAS_6_ARGS__
  72691. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  72692. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  72693. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  72694. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  72695. /* does your target have a broken create_module() ? */
  72696. #undef __UCLIBC_BROKEN_CREATE_MODULE__
  72697. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/wordsize.h uClibc-git/libc/sysdeps/linux/nios/bits/wordsize.h
  72698. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
  72699. +++ uClibc-git/libc/sysdeps/linux/nios/bits/wordsize.h 2014-07-25 20:36:07.369337634 +0200
  72700. @@ -12,8 +12,7 @@
  72701. Lesser General Public License for more details.
  72702. You should have received a copy of the GNU Lesser General Public
  72703. - License along with the GNU C Library; if not, write to the Free
  72704. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72705. - 02111-1307 USA. */
  72706. + License along with the GNU C Library; if not, see
  72707. + <http://www.gnu.org/licenses/>. */
  72708. #define __WORDSIZE 32
  72709. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/brk.c uClibc-git/libc/sysdeps/linux/nios/brk.c
  72710. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/brk.c 2012-05-15 09:20:09.000000000 +0200
  72711. +++ uClibc-git/libc/sysdeps/linux/nios/brk.c 2014-07-25 20:36:07.369337634 +0200
  72712. @@ -13,9 +13,8 @@
  72713. Lesser General Public License for more details.
  72714. You should have received a copy of the GNU Lesser General Public
  72715. - License along with the GNU C Library; if not, write to the Free
  72716. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72717. - 02111-1307 USA. */
  72718. + License along with the GNU C Library; if not, see
  72719. + <http://www.gnu.org/licenses/>. */
  72720. #include <unistd.h>
  72721. #include <sys/syscall.h>
  72722. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/clone.S uClibc-git/libc/sysdeps/linux/nios/clone.S
  72723. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/clone.S 2012-05-15 09:20:09.000000000 +0200
  72724. +++ uClibc-git/libc/sysdeps/linux/nios/clone.S 2014-07-25 20:36:07.369337634 +0200
  72725. @@ -13,9 +13,8 @@
  72726. Lesser General Public License for more details.
  72727. You should have received a copy of the GNU Lesser General Public
  72728. - License along with the GNU C Library; if not, write to the Free
  72729. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72730. - 02111-1307 USA. */
  72731. + License along with the GNU C Library; if not, see
  72732. + <http://www.gnu.org/licenses/>. */
  72733. /* clone() is even more special than fork() as it mucks with stacks
  72734. and invokes a function in the right context after its all over. */
  72735. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/crt1.S uClibc-git/libc/sysdeps/linux/nios/crt1.S
  72736. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/crt1.S 2012-05-15 09:20:09.000000000 +0200
  72737. +++ uClibc-git/libc/sysdeps/linux/nios/crt1.S 2014-07-25 20:36:07.369337634 +0200
  72738. @@ -14,8 +14,7 @@
  72739. You should have received a copy of the GNU Library General Public
  72740. License along with the GNU C Library; see the file COPYING.LIB. If
  72741. -not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  72742. -Cambridge, MA 02139, USA. */
  72743. +not, see <http://www.gnu.org/licenses/>. */
  72744. #include <features.h>
  72745. #include <asm/unistd.h>
  72746. @@ -29,9 +28,6 @@
  72747. .weak _fini
  72748. .type main,@function
  72749. .type __uClibc_main,@function
  72750. - .type __h_errno_location, @function
  72751. - .type _stdio_init, @function
  72752. - .type _stdio_term, @function
  72753. .text
  72754. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/fpu_control.h uClibc-git/libc/sysdeps/linux/nios/fpu_control.h
  72755. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
  72756. +++ uClibc-git/libc/sysdeps/linux/nios/fpu_control.h 2014-07-25 20:36:07.369337634 +0200
  72757. @@ -13,9 +13,8 @@
  72758. Lesser General Public License for more details.
  72759. You should have received a copy of the GNU Lesser General Public
  72760. - License along with the GNU C Library; if not, write to the Free
  72761. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72762. - 02111-1307 USA. */
  72763. + License along with the GNU C Library; if not, see
  72764. + <http://www.gnu.org/licenses/>. */
  72765. #ifndef _FPU_CONTROL_H
  72766. #define _FPU_CONTROL_H
  72767. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/jmpbuf-offsets.h uClibc-git/libc/sysdeps/linux/nios/jmpbuf-offsets.h
  72768. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
  72769. +++ uClibc-git/libc/sysdeps/linux/nios/jmpbuf-offsets.h 2014-07-25 20:36:07.369337634 +0200
  72770. @@ -0,0 +1,25 @@
  72771. +/*
  72772. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  72773. + *
  72774. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  72775. + */
  72776. +
  72777. +#define jmpbuf_l0 0x00
  72778. +#define jmpbuf_l1 0x01
  72779. +#define jmpbuf_l2 0x02
  72780. +#define jmpbuf_l3 0x03
  72781. +#define jmpbuf_l4 0x04
  72782. +#define jmpbuf_l5 0x05
  72783. +#define jmpbuf_l6 0x06
  72784. +#define jmpbuf_l7 0x07
  72785. +
  72786. +#define jmpbuf_i0 0x08
  72787. +#define jmpbuf_i1 0x09
  72788. +#define jmpbuf_i2 0x0a
  72789. +#define jmpbuf_i3 0x0b
  72790. +#define jmpbuf_i4 0x0c
  72791. +#define jmpbuf_i5 0x0d
  72792. +
  72793. +#define jmpbuf_sp 0x0e
  72794. +#define jmpbuf_jmpret 0x0f
  72795. +#define jmpbuf_callersret 0x10
  72796. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/nios/jmpbuf-unwind.h
  72797. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  72798. +++ uClibc-git/libc/sysdeps/linux/nios/jmpbuf-unwind.h 2014-07-25 20:36:07.369337634 +0200
  72799. @@ -0,0 +1,11 @@
  72800. +/*
  72801. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  72802. + *
  72803. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  72804. + */
  72805. +#include <setjmp.h>
  72806. +
  72807. +/* Test if longjmp to JMPBUF would unwind the frame
  72808. + containing a local variable at ADDRESS. */
  72809. +#define _JMPBUF_UNWINDS(jmpbuf, address) \
  72810. + ((void *) (address) < (void *) (jmpbuf)->__sp)
  72811. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/__longjmp.S uClibc-git/libc/sysdeps/linux/nios/__longjmp.S
  72812. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
  72813. +++ uClibc-git/libc/sysdeps/linux/nios/__longjmp.S 2014-07-25 20:36:07.353337550 +0200
  72814. @@ -13,14 +13,9 @@
  72815. You should have received a copy of the GNU Library General Public
  72816. License along with the GNU C Library; see the file COPYING.LIB. If not,
  72817. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  72818. - Boston, MA 02111-1307, USA. */
  72819. -
  72820. -#include <features.h>
  72821. -#define _ASM
  72822. -#define _SETJMP_H
  72823. -#include <bits/setjmp.h>
  72824. + see <http://www.gnu.org/licenses/>. */
  72825. +#include <jmpbuf-offsets.h>
  72826. ;----------------------------------------
  72827. ; Name: __longjmp
  72828. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/Makefile.arch uClibc-git/libc/sysdeps/linux/nios/Makefile.arch
  72829. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
  72830. +++ uClibc-git/libc/sysdeps/linux/nios/Makefile.arch 2014-07-25 20:36:07.353337550 +0200
  72831. @@ -5,8 +5,8 @@
  72832. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  72833. #
  72834. -CSRC := brk.c crtbegin.c crtend.c
  72835. +CSRC-y := brk.c crtbegin.c crtend.c
  72836. -SSRC := \
  72837. +SSRC-y := \
  72838. __longjmp.S bsd-_setjmp.S bsd-setjmp.S setjmp.S \
  72839. clone.S vfork.S
  72840. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/setjmp.S uClibc-git/libc/sysdeps/linux/nios/setjmp.S
  72841. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/setjmp.S 2012-05-15 09:20:09.000000000 +0200
  72842. +++ uClibc-git/libc/sysdeps/linux/nios/setjmp.S 2014-07-25 20:36:07.369337634 +0200
  72843. @@ -13,13 +13,9 @@
  72844. You should have received a copy of the GNU Library General Public
  72845. License along with the GNU C Library; see the file COPYING.LIB. If not,
  72846. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  72847. - Boston, MA 02111-1307, USA. */
  72848. + see <http://www.gnu.org/licenses/>. */
  72849. -#include <features.h>
  72850. -#define _ASM
  72851. -#define _SETJMP_H
  72852. -#include <bits/setjmp.h>
  72853. +#include <jmpbuf-offsets.h>
  72854. #include "NM_Macros.S"
  72855. ;----------------------------------------
  72856. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/sys/procfs.h uClibc-git/libc/sysdeps/linux/nios/sys/procfs.h
  72857. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  72858. +++ uClibc-git/libc/sysdeps/linux/nios/sys/procfs.h 2014-07-25 20:36:07.385337718 +0200
  72859. @@ -12,9 +12,8 @@
  72860. Lesser General Public License for more details.
  72861. You should have received a copy of the GNU Lesser General Public
  72862. - License along with the GNU C Library; if not, write to the Free
  72863. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72864. - 02111-1307 USA. */
  72865. + License along with the GNU C Library; if not, see
  72866. + <http://www.gnu.org/licenses/>. */
  72867. #ifndef _SYS_PROCFS_H
  72868. #define _SYS_PROCFS_H 1
  72869. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/sys/ucontext.h uClibc-git/libc/sysdeps/linux/nios/sys/ucontext.h
  72870. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  72871. +++ uClibc-git/libc/sysdeps/linux/nios/sys/ucontext.h 2014-07-25 20:36:07.385337718 +0200
  72872. @@ -12,9 +12,8 @@
  72873. Lesser General Public License for more details.
  72874. You should have received a copy of the GNU Lesser General Public
  72875. - License along with the GNU C Library; if not, write to the Free
  72876. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72877. - 02111-1307 USA. */
  72878. + License along with the GNU C Library; if not, see
  72879. + <http://www.gnu.org/licenses/>. */
  72880. #ifndef _SYS_UCONTEXT_H
  72881. #define _SYS_UCONTEXT_H 1
  72882. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios/vfork.S uClibc-git/libc/sysdeps/linux/nios/vfork.S
  72883. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios/vfork.S 2012-05-15 09:20:09.000000000 +0200
  72884. +++ uClibc-git/libc/sysdeps/linux/nios/vfork.S 2014-07-25 20:36:07.385337718 +0200
  72885. @@ -10,9 +10,6 @@
  72886. * Written by Wentao Xu <wentao@microtronix.com>
  72887. */
  72888. -#include <features.h>
  72889. -
  72890. -#include <bits/errno.h>
  72891. #include <sys/syscall.h>
  72892. #include "NM_Macros.S"
  72893. @@ -51,4 +48,4 @@
  72894. .size __vfork,.-__vfork
  72895. weak_alias(__vfork,vfork)
  72896. -libc_hidden_weak(vfork)
  72897. +libc_hidden_def(vfork)
  72898. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/fcntl.h uClibc-git/libc/sysdeps/linux/nios2/bits/fcntl.h
  72899. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  72900. +++ uClibc-git/libc/sysdeps/linux/nios2/bits/fcntl.h 2014-07-25 20:36:07.417337886 +0200
  72901. @@ -13,9 +13,8 @@
  72902. Lesser General Public License for more details.
  72903. You should have received a copy of the GNU Lesser General Public
  72904. - License along with the GNU C Library; if not, write to the Free
  72905. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72906. - 02111-1307 USA. */
  72907. + License along with the GNU C Library; if not, see
  72908. + <http://www.gnu.org/licenses/>. */
  72909. #ifndef _FCNTL_H
  72910. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  72911. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/nios2/bits/kernel_types.h
  72912. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
  72913. +++ uClibc-git/libc/sysdeps/linux/nios2/bits/kernel_types.h 2014-07-25 20:36:07.417337886 +0200
  72914. @@ -31,6 +31,8 @@
  72915. typedef unsigned short __kernel_old_uid_t;
  72916. typedef unsigned short __kernel_old_gid_t;
  72917. typedef unsigned short __kernel_old_dev_t;
  72918. +typedef long __kernel_long_t;
  72919. +typedef unsigned long __kernel_ulong_t;
  72920. typedef long long __kernel_loff_t;
  72921. typedef struct {
  72922. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/mathdef.h uClibc-git/libc/sysdeps/linux/nios2/bits/mathdef.h
  72923. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
  72924. +++ uClibc-git/libc/sysdeps/linux/nios2/bits/mathdef.h 2014-07-25 20:36:07.417337886 +0200
  72925. @@ -12,9 +12,8 @@
  72926. Lesser General Public License for more details.
  72927. You should have received a copy of the GNU Lesser General Public
  72928. - License along with the GNU C Library; if not, write to the Free
  72929. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72930. - 02111-1307 USA. */
  72931. + License along with the GNU C Library; if not, see
  72932. + <http://www.gnu.org/licenses/>. */
  72933. #if !defined _MATH_H && !defined _COMPLEX_H
  72934. # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
  72935. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/setjmp.h uClibc-git/libc/sysdeps/linux/nios2/bits/setjmp.h
  72936. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  72937. +++ uClibc-git/libc/sysdeps/linux/nios2/bits/setjmp.h 2014-07-25 20:36:07.417337886 +0200
  72938. @@ -13,9 +13,8 @@
  72939. Lesser General Public License for more details.
  72940. You should have received a copy of the GNU Lesser General Public
  72941. - License along with the GNU C Library; if not, write to the Free
  72942. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72943. - 02111-1307 USA. */
  72944. + License along with the GNU C Library; if not, see
  72945. + <http://www.gnu.org/licenses/>. */
  72946. #ifndef _BITS_SETJMP_H
  72947. #define _BITS_SETJMP_H 1
  72948. @@ -24,7 +23,6 @@
  72949. # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
  72950. #endif
  72951. -#ifndef _ASM
  72952. typedef struct
  72953. {
  72954. /* Callee-saved registers r16 through r23. */
  72955. @@ -43,30 +41,9 @@
  72956. unsigned long __gp;
  72957. /* floating point regs, if any */
  72958. -#if defined __HAVE_FPU__
  72959. +#ifdef __UCLIBC_HAS_FPU__
  72960. unsigned long __fpregs[64];
  72961. #endif
  72962. } __jmp_buf[1];
  72963. -#endif
  72964. -
  72965. -#define JB_REGS 0
  72966. -#define JB_PC 32
  72967. -#define JB_SP 36
  72968. -#define JB_FP 40
  72969. -#define JB_GP 44
  72970. -#define JB_FPREGS 48
  72971. -
  72972. -#if defined __HAVE_FPU__
  72973. -# define JB_SIZE 304
  72974. -#else
  72975. -# define JB_SIZE 48
  72976. -#endif
  72977. -
  72978. -
  72979. -/* Test if longjmp to JMPBUF would unwind the frame
  72980. - containing a local variable at ADDRESS. */
  72981. -#define _JMPBUF_UNWINDS(jmpbuf, address) \
  72982. - ((void *) (address) < (void*)(jmpbuf)->__sp)
  72983. -
  72984. #endif /* bits/setjmp.h */
  72985. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/sigcontextinfo.h uClibc-git/libc/sysdeps/linux/nios2/bits/sigcontextinfo.h
  72986. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
  72987. +++ uClibc-git/libc/sysdeps/linux/nios2/bits/sigcontextinfo.h 2014-07-25 20:36:07.417337886 +0200
  72988. @@ -13,9 +13,8 @@
  72989. Lesser General Public License for more details.
  72990. You should have received a copy of the GNU Lesser General Public
  72991. - License along with the GNU C Library; if not, write to the Free
  72992. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  72993. - 02111-1307 USA. */
  72994. + License along with the GNU C Library; if not, see
  72995. + <http://www.gnu.org/licenses/>. */
  72996. #define SIGCONTEXT struct sigcontext *
  72997. #define SIGCONTEXT_EXTRA_ARGS
  72998. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/nios2/bits/stackinfo.h
  72999. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  73000. +++ uClibc-git/libc/sysdeps/linux/nios2/bits/stackinfo.h 2014-07-25 20:36:07.417337886 +0200
  73001. @@ -12,9 +12,8 @@
  73002. Lesser General Public License for more details.
  73003. You should have received a copy of the GNU Lesser General Public
  73004. - License along with the GNU C Library; if not, write to the Free
  73005. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73006. - 02111-1307 USA. */
  73007. + License along with the GNU C Library; if not, see
  73008. + <http://www.gnu.org/licenses/>. */
  73009. /* This file contains a bit of information about the stack allocation
  73010. of the processor. */
  73011. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/stat.h uClibc-git/libc/sysdeps/linux/nios2/bits/stat.h
  73012. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
  73013. +++ uClibc-git/libc/sysdeps/linux/nios2/bits/stat.h 2014-07-25 20:36:07.417337886 +0200
  73014. @@ -12,9 +12,8 @@
  73015. Lesser General Public License for more details.
  73016. You should have received a copy of the GNU Lesser General Public
  73017. - License along with the GNU C Library; if not, write to the Free
  73018. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73019. - 02111-1307 USA. */
  73020. + License along with the GNU C Library; if not, see
  73021. + <http://www.gnu.org/licenses/>. */
  73022. #ifndef _SYS_STAT_H
  73023. # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
  73024. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/nios2/bits/uClibc_arch_features.h
  73025. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  73026. +++ uClibc-git/libc/sysdeps/linux/nios2/bits/uClibc_arch_features.h 2014-07-25 20:36:07.417337886 +0200
  73027. @@ -12,8 +12,8 @@
  73028. /* can your target use syscall6() for mmap ? */
  73029. #undef __UCLIBC_MMAP_HAS_6_ARGS__
  73030. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  73031. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  73032. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  73033. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  73034. /* does your target have a broken create_module() ? */
  73035. #undef __UCLIBC_BROKEN_CREATE_MODULE__
  73036. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/uClibc_page.h uClibc-git/libc/sysdeps/linux/nios2/bits/uClibc_page.h
  73037. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/uClibc_page.h 2012-05-15 09:20:09.000000000 +0200
  73038. +++ uClibc-git/libc/sysdeps/linux/nios2/bits/uClibc_page.h 1970-01-01 01:00:00.000000000 +0100
  73039. @@ -1,29 +0,0 @@
  73040. -/* Copyright (C) 2004 Erik Andersen
  73041. - *
  73042. - * This library is free software; you can redistribute it and/or
  73043. - * modify it under the terms of the GNU Lesser General Public
  73044. - * License as published by the Free Software Foundation; either
  73045. - * version 2.1 of the License, or (at your option) any later version.
  73046. - *
  73047. - * The GNU C Library is distributed in the hope that it will be useful,
  73048. - * but WITHOUT ANY WARRANTY; without even the implied warranty of
  73049. - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  73050. - * Lesser General Public License for more details.
  73051. - *
  73052. - * You should have received a copy of the GNU Lesser General Public
  73053. - * License along with the GNU C Library; if not, write to the Free
  73054. - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73055. - * 02111-1307 USA.
  73056. - */
  73057. -
  73058. -/* Supply an architecture specific value for PAGE_SIZE and friends. */
  73059. -
  73060. -#ifndef _UCLIBC_PAGE_H
  73061. -#define _UCLIBC_PAGE_H
  73062. -
  73063. -/* PAGE_SHIFT determines the page size -- in this case 4096 */
  73064. -#define PAGE_SHIFT (12)
  73065. -#define PAGE_SIZE (1UL << PAGE_SHIFT)
  73066. -#define PAGE_MASK (~(PAGE_SIZE-1))
  73067. -
  73068. -#endif /* _UCLIBC_PAGE_H */
  73069. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/wordsize.h uClibc-git/libc/sysdeps/linux/nios2/bits/wordsize.h
  73070. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
  73071. +++ uClibc-git/libc/sysdeps/linux/nios2/bits/wordsize.h 2014-07-25 20:36:07.417337886 +0200
  73072. @@ -12,8 +12,7 @@
  73073. Lesser General Public License for more details.
  73074. You should have received a copy of the GNU Lesser General Public
  73075. - License along with the GNU C Library; if not, write to the Free
  73076. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73077. - 02111-1307 USA. */
  73078. + License along with the GNU C Library; if not, see
  73079. + <http://www.gnu.org/licenses/>. */
  73080. #define __WORDSIZE 32
  73081. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/brk.c uClibc-git/libc/sysdeps/linux/nios2/brk.c
  73082. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/brk.c 2012-05-15 09:20:09.000000000 +0200
  73083. +++ uClibc-git/libc/sysdeps/linux/nios2/brk.c 2014-07-25 20:36:07.417337886 +0200
  73084. @@ -13,9 +13,8 @@
  73085. Lesser General Public License for more details.
  73086. You should have received a copy of the GNU Lesser General Public
  73087. - License along with the GNU C Library; if not, write to the Free
  73088. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73089. - 02111-1307 USA. */
  73090. + License along with the GNU C Library; if not, see
  73091. + <http://www.gnu.org/licenses/>. */
  73092. #include <unistd.h>
  73093. #include <sys/syscall.h>
  73094. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bsd-setjmp.S uClibc-git/libc/sysdeps/linux/nios2/bsd-setjmp.S
  73095. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bsd-setjmp.S 2012-05-15 09:20:09.000000000 +0200
  73096. +++ uClibc-git/libc/sysdeps/linux/nios2/bsd-setjmp.S 2014-07-25 20:36:07.417337886 +0200
  73097. @@ -12,9 +12,8 @@
  73098. */
  73099. -#define _ASM
  73100. -#define _SETJMP_H
  73101. -#include <bits/setjmp.h>
  73102. +#include <features.h>
  73103. +#include <jmpbuf-offsets.h>
  73104. .globl setjmp
  73105. .type setjmp,@function
  73106. @@ -35,7 +34,7 @@
  73107. stw fp, JB_FP(r4)
  73108. stw gp, JB_GP(r4)
  73109. -#if defined(__HAVE_FPU__)
  73110. +#ifdef __UCLIBC_HAS_FPU__
  73111. SAVE_FPU r4 JB_FPREGS
  73112. #endif
  73113. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bsd-_setjmp.S uClibc-git/libc/sysdeps/linux/nios2/bsd-_setjmp.S
  73114. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/bsd-_setjmp.S 2012-05-15 09:20:09.000000000 +0200
  73115. +++ uClibc-git/libc/sysdeps/linux/nios2/bsd-_setjmp.S 2014-07-25 20:36:07.417337886 +0200
  73116. @@ -11,9 +11,8 @@
  73117. *
  73118. */
  73119. -#define _ASM
  73120. -#define _SETJMP_H
  73121. -#include <bits/setjmp.h>
  73122. +#include <features.h>
  73123. +#include <jmpbuf-offsets.h>
  73124. .globl _setjmp
  73125. .type _setjmp,@function
  73126. @@ -34,7 +33,7 @@
  73127. stw fp, JB_FP(r4)
  73128. stw gp, JB_GP(r4)
  73129. -#if defined(__HAVE_FPU__)
  73130. +#ifdef __UCLIBC_HAS_FPU__
  73131. SAVE_FPU r4 JB_FPREGS
  73132. #endif
  73133. stw r0, JB_SIZE(r4) /* signal mask is not saved */
  73134. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/crt1.S uClibc-git/libc/sysdeps/linux/nios2/crt1.S
  73135. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/crt1.S 2012-05-15 09:20:09.000000000 +0200
  73136. +++ uClibc-git/libc/sysdeps/linux/nios2/crt1.S 2014-07-25 20:36:07.417337886 +0200
  73137. @@ -25,9 +25,6 @@
  73138. #endif
  73139. .type main,@function
  73140. .type __uClibc_main,@function
  73141. - .type __h_errno_location, @function
  73142. - .type _stdio_init, @function
  73143. - .type _stdio_term, @function
  73144. .text
  73145. .balign 4
  73146. _start:
  73147. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/fpu_control.h uClibc-git/libc/sysdeps/linux/nios2/fpu_control.h
  73148. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
  73149. +++ uClibc-git/libc/sysdeps/linux/nios2/fpu_control.h 2014-07-25 20:36:07.417337886 +0200
  73150. @@ -13,9 +13,8 @@
  73151. Lesser General Public License for more details.
  73152. You should have received a copy of the GNU Lesser General Public
  73153. - License along with the GNU C Library; if not, write to the Free
  73154. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73155. - 02111-1307 USA. */
  73156. + License along with the GNU C Library; if not, see
  73157. + <http://www.gnu.org/licenses/>. */
  73158. #ifndef _FPU_CONTROL_H
  73159. #define _FPU_CONTROL_H
  73160. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/jmpbuf-offsets.h uClibc-git/libc/sysdeps/linux/nios2/jmpbuf-offsets.h
  73161. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
  73162. +++ uClibc-git/libc/sysdeps/linux/nios2/jmpbuf-offsets.h 2014-07-25 20:36:07.417337886 +0200
  73163. @@ -0,0 +1,20 @@
  73164. +/*
  73165. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  73166. + *
  73167. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  73168. + */
  73169. +
  73170. +#include <features.h>
  73171. +
  73172. +#define JB_REGS 0
  73173. +#define JB_PC 32
  73174. +#define JB_SP 36
  73175. +#define JB_FP 40
  73176. +#define JB_GP 44
  73177. +#define JB_FPREGS 48
  73178. +
  73179. +#ifdef __UCLIBC_HAS_FPU__
  73180. +# define JB_SIZE 304
  73181. +#else
  73182. +# define JB_SIZE 48
  73183. +#endif
  73184. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/nios2/jmpbuf-unwind.h
  73185. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  73186. +++ uClibc-git/libc/sysdeps/linux/nios2/jmpbuf-unwind.h 2014-07-25 20:36:07.417337886 +0200
  73187. @@ -0,0 +1,11 @@
  73188. +/*
  73189. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  73190. + *
  73191. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  73192. + */
  73193. +#include <setjmp.h>
  73194. +
  73195. +/* Test if longjmp to JMPBUF would unwind the frame
  73196. + containing a local variable at ADDRESS. */
  73197. +#define _JMPBUF_UNWINDS(jmpbuf, address) \
  73198. + ((void *) (address) < (void *) (jmpbuf)->__sp)
  73199. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/__longjmp.S uClibc-git/libc/sysdeps/linux/nios2/__longjmp.S
  73200. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
  73201. +++ uClibc-git/libc/sysdeps/linux/nios2/__longjmp.S 2014-07-25 20:36:07.405337823 +0200
  73202. @@ -12,9 +12,7 @@
  73203. */
  73204. #include <features.h>
  73205. -#define _ASM
  73206. -#define _SETJMP_H
  73207. -#include <bits/setjmp.h>
  73208. +#include <jmpbuf-offsets.h>
  73209. .globl __longjmp
  73210. .type __longjmp,@function
  73211. @@ -39,7 +37,7 @@
  73212. ldw gp, JB_GP(r4)
  73213. ldw sp, JB_SP(r4)
  73214. -#if defined(__HAVE_FPU__)
  73215. +#ifdef __UCLIBC_HAS_FPU__
  73216. RESTORE_FPU r4 JB_FPREGS
  73217. #endif
  73218. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/Makefile.arch uClibc-git/libc/sysdeps/linux/nios2/Makefile.arch
  73219. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
  73220. +++ uClibc-git/libc/sysdeps/linux/nios2/Makefile.arch 2014-07-25 20:36:07.405337823 +0200
  73221. @@ -5,8 +5,8 @@
  73222. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  73223. #
  73224. -CSRC := brk.c syscall.c
  73225. +CSRC-y := brk.c syscall.c
  73226. -SSRC := \
  73227. +SSRC-y := \
  73228. __longjmp.S bsd-_setjmp.S bsd-setjmp.S setjmp.S \
  73229. vfork.S clone.S
  73230. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/setjmp.S uClibc-git/libc/sysdeps/linux/nios2/setjmp.S
  73231. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/setjmp.S 2012-05-15 09:20:09.000000000 +0200
  73232. +++ uClibc-git/libc/sysdeps/linux/nios2/setjmp.S 2014-07-25 20:36:07.417337886 +0200
  73233. @@ -12,9 +12,7 @@
  73234. */
  73235. #include <features.h>
  73236. -#define _ASM
  73237. -#define _SETJMP_H
  73238. -#include <bits/setjmp.h>
  73239. +#include <jmpbuf-offsets.h>
  73240. .globl __sigsetjmp
  73241. .type __sigsetjmp,@function
  73242. @@ -35,7 +33,7 @@
  73243. stw fp, JB_FP(r4)
  73244. stw gp, JB_GP(r4)
  73245. -#if defined(__HAVE_FPU__)
  73246. +#ifdef __UCLIBC_HAS_FPU__
  73247. SAVE_FPU r4 JB_FPREGS
  73248. #endif
  73249. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/sys/procfs.h uClibc-git/libc/sysdeps/linux/nios2/sys/procfs.h
  73250. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  73251. +++ uClibc-git/libc/sysdeps/linux/nios2/sys/procfs.h 2014-07-25 20:36:07.437337991 +0200
  73252. @@ -12,9 +12,8 @@
  73253. Lesser General Public License for more details.
  73254. You should have received a copy of the GNU Lesser General Public
  73255. - License along with the GNU C Library; if not, write to the Free
  73256. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73257. - 02111-1307 USA. */
  73258. + License along with the GNU C Library; if not, see
  73259. + <http://www.gnu.org/licenses/>. */
  73260. #ifndef _SYS_PROCFS_H
  73261. #define _SYS_PROCFS_H 1
  73262. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/sys/ucontext.h uClibc-git/libc/sysdeps/linux/nios2/sys/ucontext.h
  73263. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  73264. +++ uClibc-git/libc/sysdeps/linux/nios2/sys/ucontext.h 2014-07-25 20:36:07.437337991 +0200
  73265. @@ -12,9 +12,8 @@
  73266. Lesser General Public License for more details.
  73267. You should have received a copy of the GNU Lesser General Public
  73268. - License along with the GNU C Library; if not, write to the Free
  73269. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73270. - 02111-1307 USA. */
  73271. + License along with the GNU C Library; if not, see
  73272. + <http://www.gnu.org/licenses/>. */
  73273. #ifndef _SYS_UCONTEXT_H
  73274. #define _SYS_UCONTEXT_H 1
  73275. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/syscall.c uClibc-git/libc/sysdeps/linux/nios2/syscall.c
  73276. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/syscall.c 2012-05-15 09:20:09.000000000 +0200
  73277. +++ uClibc-git/libc/sysdeps/linux/nios2/syscall.c 2014-07-25 20:36:07.437337991 +0200
  73278. @@ -14,8 +14,8 @@
  73279. * for more details.
  73280. *
  73281. * You should have received a copy of the GNU Library General Public License
  73282. - * along with this program; if not, write to the Free Software Foundation,
  73283. - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  73284. + * along with this program; see the file COPYING.LIB. If not, see
  73285. + * <http://www.gnu.org/licenses/>.
  73286. */
  73287. #include <features.h>
  73288. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/nios2/vfork.S uClibc-git/libc/sysdeps/linux/nios2/vfork.S
  73289. --- uClibc-0.9.33.2/libc/sysdeps/linux/nios2/vfork.S 2012-05-15 09:20:09.000000000 +0200
  73290. +++ uClibc-git/libc/sysdeps/linux/nios2/vfork.S 2014-07-25 20:36:07.437337991 +0200
  73291. @@ -10,11 +10,7 @@
  73292. * Written by Wentao Xu <wentao@microtronix.com>
  73293. */
  73294. -#include <features.h>
  73295. -
  73296. -#define _ERRNO_H
  73297. -#include <bits/errno.h>
  73298. -#include <asm/unistd.h>
  73299. +#include <sys/syscall.h>
  73300. #ifndef __NR_vfork
  73301. #define __NR_vfork __NR_fork /* uClinux-2.0 only has fork which is vfork */
  73302. @@ -53,4 +49,4 @@
  73303. .size __vfork,.-__vfork
  73304. weak_alias(__vfork,vfork)
  73305. -libc_hidden_weak(vfork)
  73306. +libc_hidden_def(vfork)
  73307. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/atomic.h uClibc-git/libc/sysdeps/linux/powerpc/bits/atomic.h
  73308. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
  73309. +++ uClibc-git/libc/sysdeps/linux/powerpc/bits/atomic.h 2014-07-25 20:36:07.473338180 +0200
  73310. @@ -14,9 +14,8 @@
  73311. Lesser General Public License for more details.
  73312. You should have received a copy of the GNU Lesser General Public
  73313. - License along with the GNU C Library; if not, write to the Free
  73314. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73315. - 02111-1307 USA. */
  73316. + License along with the GNU C Library; if not, see
  73317. + <http://www.gnu.org/licenses/>. */
  73318. #include <bits/wordsize.h>
  73319. @@ -37,9 +36,8 @@
  73320. Lesser General Public License for more details.
  73321. You should have received a copy of the GNU Lesser General Public
  73322. - License along with the GNU C Library; if not, write to the Free
  73323. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73324. - 02111-1307 USA. */
  73325. + License along with the GNU C Library; if not, see
  73326. + <http://www.gnu.org/licenses/>. */
  73327. /* The 32-bit exchange_bool is different on powerpc64 because the subf
  73328. does signed 64-bit arthmatic while the lwarx is 32-bit unsigned
  73329. @@ -260,9 +258,8 @@
  73330. Lesser General Public License for more details.
  73331. You should have received a copy of the GNU Lesser General Public
  73332. - License along with the GNU C Library; if not, write to the Free
  73333. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73334. - 02111-1307 USA. */
  73335. + License along with the GNU C Library; if not, see
  73336. + <http://www.gnu.org/licenses/>. */
  73337. /*
  73338. * The 32-bit exchange_bool is different on powerpc64 because the subf
  73339. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/endian.h uClibc-git/libc/sysdeps/linux/powerpc/bits/endian.h
  73340. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/endian.h 2012-05-15 09:20:09.000000000 +0200
  73341. +++ uClibc-git/libc/sysdeps/linux/powerpc/bits/endian.h 2014-07-25 20:36:07.473338180 +0200
  73342. @@ -12,9 +12,8 @@
  73343. Lesser General Public License for more details.
  73344. You should have received a copy of the GNU Lesser General Public
  73345. - License along with the GNU C Library; if not, write to the Free
  73346. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73347. - 02111-1307 USA. */
  73348. + License along with the GNU C Library; if not, see
  73349. + <http://www.gnu.org/licenses/>. */
  73350. /* PowerPC can be little or big endian. Hopefully gcc will know... */
  73351. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/fcntl.h uClibc-git/libc/sysdeps/linux/powerpc/bits/fcntl.h
  73352. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  73353. +++ uClibc-git/libc/sysdeps/linux/powerpc/bits/fcntl.h 2014-07-25 20:36:07.473338180 +0200
  73354. @@ -14,9 +14,8 @@
  73355. Lesser General Public License for more details.
  73356. You should have received a copy of the GNU Lesser General Public
  73357. - License along with the GNU C Library; if not, write to the Free
  73358. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73359. - 02111-1307 USA. */
  73360. + License along with the GNU C Library; if not, see
  73361. + <http://www.gnu.org/licenses/>. */
  73362. #ifndef _FCNTL_H
  73363. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  73364. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/fenv.h uClibc-git/libc/sysdeps/linux/powerpc/bits/fenv.h
  73365. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
  73366. +++ uClibc-git/libc/sysdeps/linux/powerpc/bits/fenv.h 2014-07-25 20:36:07.473338180 +0200
  73367. @@ -12,9 +12,8 @@
  73368. Lesser General Public License for more details.
  73369. You should have received a copy of the GNU Lesser General Public
  73370. - License along with the GNU C Library; if not, write to the Free
  73371. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73372. - 02111-1307 USA. */
  73373. + License along with the GNU C Library; if not, see
  73374. + <http://www.gnu.org/licenses/>. */
  73375. #ifndef _FENV_H
  73376. # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
  73377. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/fenvinline.h uClibc-git/libc/sysdeps/linux/powerpc/bits/fenvinline.h
  73378. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/fenvinline.h 2012-05-15 09:20:09.000000000 +0200
  73379. +++ uClibc-git/libc/sysdeps/linux/powerpc/bits/fenvinline.h 2014-07-25 20:36:07.473338180 +0200
  73380. @@ -14,9 +14,8 @@
  73381. Lesser General Public License for more details.
  73382. You should have received a copy of the GNU Lesser General Public
  73383. - License along with the GNU C Library; if not, write to the Free
  73384. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73385. - 02111-1307 USA. */
  73386. + License along with the GNU C Library; if not, see
  73387. + <http://www.gnu.org/licenses/>. */
  73388. #include <features.h>
  73389. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/ipc.h uClibc-git/libc/sysdeps/linux/powerpc/bits/ipc.h
  73390. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/ipc.h 2012-05-15 09:20:09.000000000 +0200
  73391. +++ uClibc-git/libc/sysdeps/linux/powerpc/bits/ipc.h 2014-07-25 20:36:07.477338200 +0200
  73392. @@ -12,9 +12,8 @@
  73393. Lesser General Public License for more details.
  73394. You should have received a copy of the GNU Lesser General Public
  73395. - License along with the GNU C Library; if not, write to the Free
  73396. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73397. - 02111-1307 USA. */
  73398. + License along with the GNU C Library; if not, see
  73399. + <http://www.gnu.org/licenses/>. */
  73400. #ifndef _SYS_IPC_H
  73401. # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
  73402. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/powerpc/bits/kernel_types.h
  73403. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
  73404. +++ uClibc-git/libc/sysdeps/linux/powerpc/bits/kernel_types.h 2014-07-25 20:36:07.477338200 +0200
  73405. @@ -36,6 +36,8 @@
  73406. typedef unsigned int __kernel_old_uid_t;
  73407. typedef unsigned int __kernel_old_gid_t;
  73408. typedef __kernel_dev_t __kernel_old_dev_t;
  73409. +typedef long __kernel_long_t;
  73410. +typedef unsigned long __kernel_ulong_t;
  73411. #else
  73412. typedef unsigned int __kernel_dev_t;
  73413. typedef unsigned int __kernel_ino_t;
  73414. @@ -61,6 +63,8 @@
  73415. typedef unsigned int __kernel_old_uid_t;
  73416. typedef unsigned int __kernel_old_gid_t;
  73417. typedef __kernel_dev_t __kernel_old_dev_t;
  73418. +typedef long __kernel_long_t;
  73419. +typedef unsigned long __kernel_ulong_t;
  73420. typedef long long __kernel_loff_t;
  73421. #endif
  73422. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/local_lim.h uClibc-git/libc/sysdeps/linux/powerpc/bits/local_lim.h
  73423. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/local_lim.h 1970-01-01 01:00:00.000000000 +0100
  73424. +++ uClibc-git/libc/sysdeps/linux/powerpc/bits/local_lim.h 2014-07-25 20:36:07.477338200 +0200
  73425. @@ -0,0 +1,101 @@
  73426. +/* Minimum guaranteed maximum values for system limits. Linux/PPC version.
  73427. + Copyright (C) 1993-1998,2000,2002-2004,2006,2008
  73428. + Free Software Foundation, Inc.
  73429. + This file is part of the GNU C Library.
  73430. +
  73431. + The GNU C Library is free software; you can redistribute it and/or
  73432. + modify it under the terms of the GNU Lesser General Public License as
  73433. + published by the Free Software Foundation; either version 2.1 of the
  73434. + License, or (at your option) any later version.
  73435. +
  73436. + The GNU C Library is distributed in the hope that it will be useful,
  73437. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  73438. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  73439. + Lesser General Public License for more details.
  73440. +
  73441. + You should have received a copy of the GNU Lesser General Public
  73442. + License along with the GNU C Library; see the file COPYING.LIB. If
  73443. + not, see <http://www.gnu.org/licenses/>. */
  73444. +
  73445. +/* The kernel header pollutes the namespace with the NR_OPEN symbol
  73446. + and defines LINK_MAX although filesystems have different maxima. A
  73447. + similar thing is true for OPEN_MAX: the limit can be changed at
  73448. + runtime and therefore the macro must not be defined. Remove this
  73449. + after including the header if necessary. */
  73450. +#ifndef NR_OPEN
  73451. +# define __undef_NR_OPEN
  73452. +#endif
  73453. +#ifndef LINK_MAX
  73454. +# define __undef_LINK_MAX
  73455. +#endif
  73456. +#ifndef OPEN_MAX
  73457. +# define __undef_OPEN_MAX
  73458. +#endif
  73459. +#ifndef ARG_MAX
  73460. +# define __undef_ARG_MAX
  73461. +#endif
  73462. +
  73463. +/* The kernel sources contain a file with all the needed information. */
  73464. +#include <linux/limits.h>
  73465. +
  73466. +/* Have to remove NR_OPEN? */
  73467. +#ifdef __undef_NR_OPEN
  73468. +# undef NR_OPEN
  73469. +# undef __undef_NR_OPEN
  73470. +#endif
  73471. +/* Have to remove LINK_MAX? */
  73472. +#ifdef __undef_LINK_MAX
  73473. +# undef LINK_MAX
  73474. +# undef __undef_LINK_MAX
  73475. +#endif
  73476. +/* Have to remove OPEN_MAX? */
  73477. +#ifdef __undef_OPEN_MAX
  73478. +# undef OPEN_MAX
  73479. +# undef __undef_OPEN_MAX
  73480. +#endif
  73481. +/* Have to remove ARG_MAX? */
  73482. +#ifdef __undef_ARG_MAX
  73483. +# undef ARG_MAX
  73484. +# undef __undef_ARG_MAX
  73485. +#endif
  73486. +
  73487. +/* The number of data keys per process. */
  73488. +#define _POSIX_THREAD_KEYS_MAX 128
  73489. +/* This is the value this implementation supports. */
  73490. +#define PTHREAD_KEYS_MAX 1024
  73491. +
  73492. +/* Controlling the iterations of destructors for thread-specific data. */
  73493. +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
  73494. +/* Number of iterations this implementation does. */
  73495. +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
  73496. +
  73497. +/* The number of threads per process. */
  73498. +#define _POSIX_THREAD_THREADS_MAX 64
  73499. +/* We have no predefined limit on the number of threads. */
  73500. +#undef PTHREAD_THREADS_MAX
  73501. +
  73502. +/* Maximum amount by which a process can descrease its asynchronous I/O
  73503. + priority level. */
  73504. +#define AIO_PRIO_DELTA_MAX 20
  73505. +
  73506. +/* Minimum size for a thread. At least two pages for systems with 64k
  73507. + pages. */
  73508. +#define PTHREAD_STACK_MIN 131072
  73509. +
  73510. +/* Maximum number of timer expiration overruns. */
  73511. +#define DELAYTIMER_MAX 2147483647
  73512. +
  73513. +/* Maximum tty name length. */
  73514. +#define TTY_NAME_MAX 32
  73515. +
  73516. +/* Maximum login name length. This is arbitrary. */
  73517. +#define LOGIN_NAME_MAX 256
  73518. +
  73519. +/* Maximum host name length. */
  73520. +#define HOST_NAME_MAX 64
  73521. +
  73522. +/* Maximum message queue priority level. */
  73523. +#define MQ_PRIO_MAX 32768
  73524. +
  73525. +/* Maximum value the semaphore can have. */
  73526. +#define SEM_VALUE_MAX (2147483647)
  73527. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/mathdef.h uClibc-git/libc/sysdeps/linux/powerpc/bits/mathdef.h
  73528. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
  73529. +++ uClibc-git/libc/sysdeps/linux/powerpc/bits/mathdef.h 2014-07-25 20:36:07.477338200 +0200
  73530. @@ -13,9 +13,8 @@
  73531. Lesser General Public License for more details.
  73532. You should have received a copy of the GNU Lesser General Public
  73533. - License along with the GNU C Library; if not, write to the Free
  73534. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73535. - 02111-1307 USA. */
  73536. + License along with the GNU C Library; if not, see
  73537. + <http://www.gnu.org/licenses/>. */
  73538. #include <features.h>
  73539. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/mathinline.h uClibc-git/libc/sysdeps/linux/powerpc/bits/mathinline.h
  73540. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/mathinline.h 2012-05-15 09:20:09.000000000 +0200
  73541. +++ uClibc-git/libc/sysdeps/linux/powerpc/bits/mathinline.h 2014-07-25 20:36:07.477338200 +0200
  73542. @@ -14,9 +14,8 @@
  73543. Lesser General Public License for more details.
  73544. You should have received a copy of the GNU Lesser General Public
  73545. - License along with the GNU C Library; if not, write to the Free
  73546. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73547. - 02111-1307 USA. */
  73548. + License along with the GNU C Library; if not, see
  73549. + <http://www.gnu.org/licenses/>. */
  73550. #include <features.h>
  73551. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/mman.h uClibc-git/libc/sysdeps/linux/powerpc/bits/mman.h
  73552. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/mman.h 2012-05-15 09:20:09.000000000 +0200
  73553. +++ uClibc-git/libc/sysdeps/linux/powerpc/bits/mman.h 2014-07-25 20:36:07.477338200 +0200
  73554. @@ -13,9 +13,8 @@
  73555. Lesser General Public License for more details.
  73556. You should have received a copy of the GNU Lesser General Public
  73557. - License along with the GNU C Library; if not, write to the Free
  73558. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73559. - 02111-1307 USA. */
  73560. + License along with the GNU C Library; if not, see
  73561. + <http://www.gnu.org/licenses/>. */
  73562. #ifndef _SYS_MMAN_H
  73563. # error "Never use <bits/mman.h> directly; iclude <sys/mman.h> instead."
  73564. @@ -63,7 +62,7 @@
  73565. # define MAP_NORESERVE 0x00040 /* Don't check for reservations. */
  73566. # define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */
  73567. # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
  73568. -# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could
  73569. +# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could
  73570. be uninitialized. */
  73571. #endif
  73572. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/msq.h uClibc-git/libc/sysdeps/linux/powerpc/bits/msq.h
  73573. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/msq.h 2012-05-15 09:20:09.000000000 +0200
  73574. +++ uClibc-git/libc/sysdeps/linux/powerpc/bits/msq.h 2014-07-25 20:36:07.477338200 +0200
  73575. @@ -12,9 +12,8 @@
  73576. Lesser General Public License for more details.
  73577. You should have received a copy of the GNU Lesser General Public
  73578. - License along with the GNU C Library; if not, write to the Free
  73579. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73580. - 02111-1307 USA. */
  73581. + License along with the GNU C Library; if not, see
  73582. + <http://www.gnu.org/licenses/>. */
  73583. #ifndef _SYS_MSG_H
  73584. # error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
  73585. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/sem.h uClibc-git/libc/sysdeps/linux/powerpc/bits/sem.h
  73586. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/sem.h 2012-05-15 09:20:09.000000000 +0200
  73587. +++ uClibc-git/libc/sysdeps/linux/powerpc/bits/sem.h 2014-07-25 20:36:07.477338200 +0200
  73588. @@ -13,9 +13,8 @@
  73589. Lesser General Public License for more details.
  73590. You should have received a copy of the GNU Lesser General Public
  73591. - License along with the GNU C Library; if not, write to the Free
  73592. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73593. - 02111-1307 USA. */
  73594. + License along with the GNU C Library; if not, see
  73595. + <http://www.gnu.org/licenses/>. */
  73596. #ifndef _SYS_SEM_H
  73597. # error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
  73598. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/setjmp.h uClibc-git/libc/sysdeps/linux/powerpc/bits/setjmp.h
  73599. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  73600. +++ uClibc-git/libc/sysdeps/linux/powerpc/bits/setjmp.h 2014-07-25 20:36:07.477338200 +0200
  73601. @@ -1,4 +1,5 @@
  73602. -/* Copyright (C) 1997, 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
  73603. +/* Copyright (C) 1997,1998,2000,2003,2004,2005,2006
  73604. + Free Software Foundation, Inc.
  73605. This file is part of the GNU C Library.
  73606. The GNU C Library is free software; you can redistribute it and/or
  73607. @@ -12,9 +13,8 @@
  73608. Lesser General Public License for more details.
  73609. You should have received a copy of the GNU Lesser General Public
  73610. - License along with the GNU C Library; if not, write to the Free
  73611. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73612. - 02111-1307 USA. */
  73613. + License along with the GNU C Library; if not, see
  73614. + <http://www.gnu.org/licenses/>. */
  73615. /* Define the machine-dependent type `jmp_buf'. PowerPC version. */
  73616. #ifndef _BITS_SETJMP_H
  73617. @@ -31,30 +31,6 @@
  73618. #include <bits/wordsize.h>
  73619. -#if defined __USE_MISC || defined _ASM
  73620. -# define JB_GPR1 0 /* Also known as the stack pointer */
  73621. -# define JB_GPR2 1
  73622. -# define JB_LR 2 /* The address we will return to */
  73623. -# if __WORDSIZE == 64
  73624. -# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18*2 words total. */
  73625. -# define JB_CR 21 /* Condition code registers with the VRSAVE at */
  73626. - /* offset 172 (low half of the double word. */
  73627. -# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total. */
  73628. -# define JB_SIZE (64 * 8) /* As per PPC64-VMX ABI. */
  73629. -# define JB_VRSAVE 21 /* VRSAVE shares a double word with the CR at offset */
  73630. - /* 168 (high half of the double word). */
  73631. -# define JB_VRS 40 /* VRs 20 through 31 are saved, 12*4 words total. */
  73632. -# else
  73633. -# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18 in total. */
  73634. -# define JB_CR 21 /* Condition code registers. */
  73635. -# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total. */
  73636. -# define JB_SIZE ((64 + (12 * 4)) * 4)
  73637. -# define JB_VRSAVE 62
  73638. -# define JB_VRS 64
  73639. -# endif
  73640. -#endif
  73641. -
  73642. -
  73643. /* The current powerpc 32-bit Altivec ABI specifies for SVR4 ABI and EABI
  73644. the vrsave must be at byte 248 & v20 at byte 256. So we must pad this
  73645. correctly on 32 bit. It also insists that vecregs are only gauranteed
  73646. @@ -62,19 +38,12 @@
  73647. We have to version the code because members like int __mask_was_saved
  73648. in the jmp_buf will move as jmp_buf is now larger than 248 bytes. We
  73649. cannot keep the altivec jmp_buf backward compatible with the jmp_buf. */
  73650. -#ifndef _ASM
  73651. -# if __WORDSIZE == 64
  73652. +#if __WORDSIZE == 64
  73653. typedef long int __jmp_buf[64] __attribute__ ((__aligned__ (16)));
  73654. -# else
  73655. +#else
  73656. /* The alignment is not essential, i.e.the buffer can be copied to a 4 byte
  73657. aligned buffer as per the ABI it is just added for performance reasons. */
  73658. typedef long int __jmp_buf[64 + (12 * 4)] __attribute__ ((__aligned__ (16)));
  73659. -# endif
  73660. #endif
  73661. -/* Test if longjmp to JMPBUF would unwind the frame
  73662. - containing a local variable at ADDRESS. */
  73663. -#define _JMPBUF_UNWINDS(jmpbuf, address) \
  73664. - ((void *) (address) < (void *) (jmpbuf)[JB_GPR1])
  73665. -
  73666. -#endif /* bits/setjmp.h */
  73667. +#endif /* bits/setjmp.h */
  73668. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/shm.h uClibc-git/libc/sysdeps/linux/powerpc/bits/shm.h
  73669. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
  73670. +++ uClibc-git/libc/sysdeps/linux/powerpc/bits/shm.h 2014-07-25 20:36:07.477338200 +0200
  73671. @@ -13,9 +13,8 @@
  73672. Lesser General Public License for more details.
  73673. You should have received a copy of the GNU Lesser General Public
  73674. - License along with the GNU C Library; if not, write to the Free
  73675. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73676. - 02111-1307 USA. */
  73677. + License along with the GNU C Library; if not, see
  73678. + <http://www.gnu.org/licenses/>. */
  73679. #ifndef _SYS_SHM_H
  73680. # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
  73681. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/sigcontextinfo.h uClibc-git/libc/sysdeps/linux/powerpc/bits/sigcontextinfo.h
  73682. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
  73683. +++ uClibc-git/libc/sysdeps/linux/powerpc/bits/sigcontextinfo.h 2014-07-25 20:36:07.477338200 +0200
  73684. @@ -12,9 +12,8 @@
  73685. Lesser General Public License for more details.
  73686. You should have received a copy of the GNU Lesser General Public
  73687. - License along with the GNU C Library; if not, write to the Free
  73688. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73689. - 02111-1307 USA. */
  73690. + License along with the GNU C Library; if not, see
  73691. + <http://www.gnu.org/licenses/>. */
  73692. #include <signal.h>
  73693. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/powerpc/bits/stackinfo.h
  73694. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  73695. +++ uClibc-git/libc/sysdeps/linux/powerpc/bits/stackinfo.h 2014-07-25 20:36:07.477338200 +0200
  73696. @@ -12,9 +12,8 @@
  73697. Lesser General Public License for more details.
  73698. You should have received a copy of the GNU Lesser General Public
  73699. - License along with the GNU C Library; if not, write to the Free
  73700. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73701. - 02111-1307 USA. */
  73702. + License along with the GNU C Library; if not, see
  73703. + <http://www.gnu.org/licenses/>. */
  73704. /* This file contains a bit of information about the stack allocation
  73705. of the processor. */
  73706. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/stat.h uClibc-git/libc/sysdeps/linux/powerpc/bits/stat.h
  73707. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
  73708. +++ uClibc-git/libc/sysdeps/linux/powerpc/bits/stat.h 2014-07-25 20:36:07.477338200 +0200
  73709. @@ -13,9 +13,8 @@
  73710. Lesser General Public License for more details.
  73711. You should have received a copy of the GNU Lesser General Public
  73712. - License along with the GNU C Library; if not, write to the Free
  73713. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73714. - 02111-1307 USA. */
  73715. + License along with the GNU C Library; if not, see
  73716. + <http://www.gnu.org/licenses/>. */
  73717. #ifndef _SYS_STAT_H
  73718. # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
  73719. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/syscalls.h uClibc-git/libc/sysdeps/linux/powerpc/bits/syscalls.h
  73720. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/syscalls.h 2012-05-15 09:20:09.000000000 +0200
  73721. +++ uClibc-git/libc/sysdeps/linux/powerpc/bits/syscalls.h 2014-07-25 20:36:07.477338200 +0200
  73722. @@ -12,9 +12,8 @@
  73723. Lesser General Public License for more details.
  73724. You should have received a copy of the GNU Lesser General Public
  73725. - License along with the GNU C Library; if not, write to the Free
  73726. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73727. - 02111-1307 USA. */
  73728. + License along with the GNU C Library; if not, see
  73729. + <http://www.gnu.org/licenses/>. */
  73730. #ifndef _BITS_SYSCALLS_H
  73731. #define _BITS_SYSCALLS_H
  73732. @@ -168,7 +167,7 @@
  73733. }) \
  73734. )
  73735. # define INTERNAL_SYSCALL_ERROR_P(val, err) \
  73736. - ((void) (val), __builtin_expect ((err) & (1 << 28), 0))
  73737. + ((void) (val), unlikely ((err) & (1 << 28)))
  73738. # define INTERNAL_SYSCALL_ERRNO(val, err) (val)
  73739. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/termios.h uClibc-git/libc/sysdeps/linux/powerpc/bits/termios.h
  73740. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/termios.h 2012-05-15 09:20:09.000000000 +0200
  73741. +++ uClibc-git/libc/sysdeps/linux/powerpc/bits/termios.h 2014-07-25 20:36:07.477338200 +0200
  73742. @@ -12,9 +12,8 @@
  73743. Lesser General Public License for more details.
  73744. You should have received a copy of the GNU Lesser General Public
  73745. - License along with the GNU C Library; if not, write to the Free
  73746. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73747. - 02111-1307 USA. */
  73748. + License along with the GNU C Library; if not, see
  73749. + <http://www.gnu.org/licenses/>. */
  73750. #ifndef _TERMIOS_H
  73751. # error "Never include <bits/termios.h> directly; use <termios.h> instead."
  73752. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/powerpc/bits/uClibc_arch_features.h
  73753. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  73754. +++ uClibc-git/libc/sysdeps/linux/powerpc/bits/uClibc_arch_features.h 2014-07-25 20:36:07.477338200 +0200
  73755. @@ -11,8 +11,8 @@
  73756. /* can your target use syscall6() for mmap ? */
  73757. #define __UCLIBC_MMAP_HAS_6_ARGS__
  73758. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  73759. -#define __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  73760. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  73761. +#define __UCLIBC_SYSCALL_ALIGN_64BIT__
  73762. /* does your target have a broken create_module() ? */
  73763. #undef __UCLIBC_BROKEN_CREATE_MODULE__
  73764. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/brk.S uClibc-git/libc/sysdeps/linux/powerpc/brk.S
  73765. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/brk.S 2012-05-15 09:20:09.000000000 +0200
  73766. +++ uClibc-git/libc/sysdeps/linux/powerpc/brk.S 2014-07-25 20:36:07.477338200 +0200
  73767. @@ -13,9 +13,8 @@
  73768. Lesser General Public License for more details.
  73769. You should have received a copy of the GNU Lesser General Public
  73770. - License along with the GNU C Library; if not, write to the Free
  73771. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73772. - 02111-1307 USA. */
  73773. + License along with the GNU C Library; if not, see
  73774. + <http://www.gnu.org/licenses/>. */
  73775. #include <features.h>
  73776. #include "ppc_asm.h"
  73777. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bsd-setjmp.S uClibc-git/libc/sysdeps/linux/powerpc/bsd-setjmp.S
  73778. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bsd-setjmp.S 2012-05-15 09:20:09.000000000 +0200
  73779. +++ uClibc-git/libc/sysdeps/linux/powerpc/bsd-setjmp.S 2014-07-25 20:36:07.477338200 +0200
  73780. @@ -13,9 +13,8 @@
  73781. Lesser General Public License for more details.
  73782. You should have received a copy of the GNU Lesser General Public
  73783. - License along with the GNU C Library; if not, write to the Free
  73784. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73785. - 02111-1307 USA. */
  73786. + License along with the GNU C Library; if not, see
  73787. + <http://www.gnu.org/licenses/>. */
  73788. /* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
  73789. We cannot do it in C because it must be a tail-call, so frame-unwinding
  73790. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bsd-_setjmp.S uClibc-git/libc/sysdeps/linux/powerpc/bsd-_setjmp.S
  73791. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/bsd-_setjmp.S 2012-05-15 09:20:09.000000000 +0200
  73792. +++ uClibc-git/libc/sysdeps/linux/powerpc/bsd-_setjmp.S 2014-07-25 20:36:07.477338200 +0200
  73793. @@ -13,9 +13,8 @@
  73794. Lesser General Public License for more details.
  73795. You should have received a copy of the GNU Lesser General Public
  73796. - License along with the GNU C Library; if not, write to the Free
  73797. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73798. - 02111-1307 USA. */
  73799. + License along with the GNU C Library; if not, see
  73800. + <http://www.gnu.org/licenses/>. */
  73801. /* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
  73802. We cannot do it in C because it must be a tail-call, so frame-unwinding
  73803. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/clone.S uClibc-git/libc/sysdeps/linux/powerpc/clone.S
  73804. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/clone.S 2012-05-15 09:20:09.000000000 +0200
  73805. +++ uClibc-git/libc/sysdeps/linux/powerpc/clone.S 2014-07-25 20:36:07.477338200 +0200
  73806. @@ -13,9 +13,8 @@
  73807. Lesser General Public License for more details.
  73808. You should have received a copy of the GNU Lesser General Public
  73809. - License along with the GNU C Library; if not, write to the Free
  73810. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73811. - 02111-1307 USA. */
  73812. + License along with the GNU C Library; if not, see
  73813. + <http://www.gnu.org/licenses/>. */
  73814. #include <features.h>
  73815. #define _ERRNO_H 1
  73816. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/crt1.S uClibc-git/libc/sysdeps/linux/powerpc/crt1.S
  73817. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/crt1.S 2012-05-15 09:20:09.000000000 +0200
  73818. +++ uClibc-git/libc/sysdeps/linux/powerpc/crt1.S 2014-07-25 20:36:07.477338200 +0200
  73819. @@ -12,8 +12,8 @@
  73820. * for more details.
  73821. *
  73822. * You should have received a copy of the GNU Library General Public License
  73823. - * along with this program; if not, write to the Free Software Foundation,
  73824. - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  73825. + * along with this program; see the file COPYING.LIB. If not, see
  73826. + * <http://www.gnu.org/licenses/>.
  73827. */
  73828. #include <features.h>
  73829. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/fenv.h uClibc-git/libc/sysdeps/linux/powerpc/fenv.h
  73830. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/fenv.h 2012-05-15 09:20:09.000000000 +0200
  73831. +++ uClibc-git/libc/sysdeps/linux/powerpc/fenv.h 2014-07-25 20:36:07.477338200 +0200
  73832. @@ -12,9 +12,8 @@
  73833. Lesser General Public License for more details.
  73834. You should have received a copy of the GNU Lesser General Public
  73835. - License along with the GNU C Library; if not, write to the Free
  73836. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73837. - 02111-1307 USA. */
  73838. + License along with the GNU C Library; if not, see
  73839. + <http://www.gnu.org/licenses/>. */
  73840. /*
  73841. * ISO C99 7.6: Floating-point environment <fenv.h>
  73842. @@ -73,7 +72,7 @@
  73843. /* Set complete status for exceptions indicated by EXCEPTS according to
  73844. the representation in the object pointed to by FLAGP. */
  73845. -extern int fesetexceptflag (__const fexcept_t *__flagp, int __excepts) __THROW;
  73846. +extern int fesetexceptflag (const fexcept_t *__flagp, int __excepts) __THROW;
  73847. /* Determine which of subset of the exceptions specified by EXCEPTS are
  73848. currently set. */
  73849. @@ -102,12 +101,12 @@
  73850. /* Establish the floating-point environment represented by the object
  73851. pointed to by ENVP. */
  73852. -extern int fesetenv (__const fenv_t *__envp) __THROW;
  73853. +extern int fesetenv (const fenv_t *__envp) __THROW;
  73854. /* Save current exceptions in temporary storage, install environment
  73855. represented by object pointed to by ENVP and raise exceptions
  73856. according to saved exceptions. */
  73857. -extern int feupdateenv (__const fenv_t *__envp) __THROW;
  73858. +extern int feupdateenv (const fenv_t *__envp) __THROW;
  73859. /* Include optimization. */
  73860. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/fpu_control.h uClibc-git/libc/sysdeps/linux/powerpc/fpu_control.h
  73861. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
  73862. +++ uClibc-git/libc/sysdeps/linux/powerpc/fpu_control.h 2014-07-25 20:36:07.477338200 +0200
  73863. @@ -14,9 +14,8 @@
  73864. Lesser General Public License for more details.
  73865. You should have received a copy of the GNU Lesser General Public
  73866. - License along with the GNU C Library; if not, write to the Free
  73867. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73868. - 02111-1307 USA. */
  73869. + License along with the GNU C Library; if not, see
  73870. + <http://www.gnu.org/licenses/>. */
  73871. #ifndef _FPU_CONTROL_H
  73872. #define _FPU_CONTROL_H
  73873. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/ioctl.c uClibc-git/libc/sysdeps/linux/powerpc/ioctl.c
  73874. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/ioctl.c 2012-05-15 09:20:09.000000000 +0200
  73875. +++ uClibc-git/libc/sysdeps/linux/powerpc/ioctl.c 2014-07-25 20:36:07.477338200 +0200
  73876. @@ -12,9 +12,8 @@
  73877. Lesser General Public License for more details.
  73878. You should have received a copy of the GNU Lesser General Public
  73879. - License along with the GNU C Library; if not, write to the Free
  73880. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73881. - 02111-1307 USA. */
  73882. + License along with the GNU C Library; if not, see
  73883. + <http://www.gnu.org/licenses/>. */
  73884. #include <stdarg.h>
  73885. #include <termios.h>
  73886. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/jmpbuf-offsets.h uClibc-git/libc/sysdeps/linux/powerpc/jmpbuf-offsets.h
  73887. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
  73888. +++ uClibc-git/libc/sysdeps/linux/powerpc/jmpbuf-offsets.h 2014-07-25 20:36:07.477338200 +0200
  73889. @@ -0,0 +1,40 @@
  73890. +/* Private macros for accessing __jmp_buf contents. PowerPC version.
  73891. + Copyright (C) 2006 Free Software Foundation, Inc.
  73892. + This file is part of the GNU C Library.
  73893. +
  73894. + The GNU C Library is free software; you can redistribute it and/or
  73895. + modify it under the terms of the GNU Lesser General Public
  73896. + License as published by the Free Software Foundation; either
  73897. + version 2.1 of the License, or (at your option) any later version.
  73898. +
  73899. + The GNU C Library is distributed in the hope that it will be useful,
  73900. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  73901. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  73902. + Lesser General Public License for more details.
  73903. +
  73904. + You should have received a copy of the GNU Lesser General Public
  73905. + License along with the GNU C Library; if not, see
  73906. + <http://www.gnu.org/licenses/>. */
  73907. +
  73908. +#include <bits/wordsize.h>
  73909. +
  73910. +#define JB_GPR1 0 /* Also known as the stack pointer */
  73911. +#define JB_GPR2 1
  73912. +#define JB_LR 2 /* The address we will return to */
  73913. +#if __WORDSIZE == 64
  73914. +# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18*2 words total. */
  73915. +# define JB_CR 21 /* Condition code registers with the VRSAVE at */
  73916. + /* offset 172 (low half of the double word. */
  73917. +# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total. */
  73918. +# define JB_SIZE (64 * 8) /* As per PPC64-VMX ABI. */
  73919. +# define JB_VRSAVE 21 /* VRSAVE shares a double word with the CR at offset */
  73920. + /* 168 (high half of the double word). */
  73921. +# define JB_VRS 40 /* VRs 20 through 31 are saved, 12*4 words total. */
  73922. +#else
  73923. +# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18 in total. */
  73924. +# define JB_CR 21 /* Condition code registers. */
  73925. +# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total. */
  73926. +# define JB_SIZE ((64 + (12 * 4)) * 4)
  73927. +# define JB_VRSAVE 62
  73928. +# define JB_VRS 64
  73929. +#endif
  73930. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/powerpc/jmpbuf-unwind.h
  73931. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  73932. +++ uClibc-git/libc/sysdeps/linux/powerpc/jmpbuf-unwind.h 2014-07-25 20:36:07.477338200 +0200
  73933. @@ -0,0 +1,23 @@
  73934. +/*
  73935. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  73936. + *
  73937. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  73938. + */
  73939. +#include <setjmp.h>
  73940. +#include <jmpbuf-offsets.h>
  73941. +
  73942. +/* Test if longjmp to JMPBUF would unwind the frame
  73943. + containing a local variable at ADDRESS. */
  73944. +#define _JMPBUF_UNWINDS(jmpbuf, address) \
  73945. + ((void *) (address) < (void *) (jmpbuf)[JB_GPR1])
  73946. +
  73947. +#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  73948. +#include <stdint.h>
  73949. +#include <unwind.h>
  73950. +
  73951. +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
  73952. + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
  73953. +
  73954. +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
  73955. + ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_GPR1] - (_adj))
  73956. +#endif
  73957. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/__longjmp.S uClibc-git/libc/sysdeps/linux/powerpc/__longjmp.S
  73958. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
  73959. +++ uClibc-git/libc/sysdeps/linux/powerpc/__longjmp.S 2014-07-25 20:36:07.457338096 +0200
  73960. @@ -15,15 +15,12 @@
  73961. Lesser General Public License for more details.
  73962. You should have received a copy of the GNU Lesser General Public
  73963. - License along with the GNU C Library; if not, write to the Free
  73964. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  73965. - 02111-1307 USA. */
  73966. + License along with the GNU C Library; if not, see
  73967. + <http://www.gnu.org/licenses/>. */
  73968. #include <features.h>
  73969. #include "ppc_asm.h"
  73970. -#define _ASM
  73971. -#define _SETJMP_H
  73972. -#include <bits/setjmp.h>
  73973. +#include <jmpbuf-offsets.h>
  73974. #if defined __UCLIBC_HAS_FLOATS__ && ! defined __UCLIBC_HAS_SOFT_FLOAT__
  73975. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/Makefile.arch uClibc-git/libc/sysdeps/linux/powerpc/Makefile.arch
  73976. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
  73977. +++ uClibc-git/libc/sysdeps/linux/powerpc/Makefile.arch 2014-07-25 20:36:07.457338096 +0200
  73978. @@ -5,18 +5,13 @@
  73979. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  73980. #
  73981. -CSRC := __syscall_error.c pread_write.c ioctl.c
  73982. +CSRC-y := __syscall_error.c ioctl.c
  73983. -ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
  73984. -CSRC += posix_fadvise.c posix_fadvise64.c
  73985. -endif
  73986. -
  73987. -SSRC := \
  73988. +SSRC-y := \
  73989. __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S brk.S \
  73990. __uClibc_syscall.S syscall.S
  73991. -ifneq ($(UCLIBC_HAS_THREADS_NATIVE),y)
  73992. -SSRC += clone.S vfork.S
  73993. -endif
  73994. +
  73995. +SSRC-$(if $(UCLIBC_HAS_THREADS_NATIVE),,y) += clone.S vfork.S
  73996. ifeq ($(CONFIG_E500),y)
  73997. ARCH_HEADERS := fenv.h
  73998. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/posix_fadvise64.c uClibc-git/libc/sysdeps/linux/powerpc/posix_fadvise64.c
  73999. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/posix_fadvise64.c 2012-05-15 09:20:09.000000000 +0200
  74000. +++ uClibc-git/libc/sysdeps/linux/powerpc/posix_fadvise64.c 1970-01-01 01:00:00.000000000 +0100
  74001. @@ -1,69 +0,0 @@
  74002. -/* vi: set sw=4 ts=4: */
  74003. -/*
  74004. - * posix_fadvise64() for uClibc
  74005. - * http://www.opengroup.org/onlinepubs/009695399/functions/posix_fadvise.html
  74006. - *
  74007. - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  74008. - *
  74009. - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  74010. - */
  74011. -
  74012. -#include <features.h>
  74013. -#include <unistd.h>
  74014. -#include <errno.h>
  74015. -#include <endian.h>
  74016. -#include <stdint.h>
  74017. -#include <sys/types.h>
  74018. -#include <sys/syscall.h>
  74019. -#include <fcntl.h>
  74020. -
  74021. -#ifdef __UCLIBC_HAS_LFS__
  74022. -#ifdef __NR_fadvise64_64
  74023. -
  74024. -/* 64 bit implementation is cake ... or more like pie ... */
  74025. -#if __WORDSIZE == 64
  74026. -
  74027. -#define __NR_posix_fadvise64 __NR_fadvise64_64
  74028. -
  74029. -int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advise)
  74030. -{
  74031. - if (len != (off_t) len)
  74032. - return EOVERFLOW;
  74033. - INTERNAL_SYSCALL_DECL (err);
  74034. - int ret = INTERNAL_SYSCALL (posix_fadvise64, err, 6, fd, 0,
  74035. - __LONG_LONG_PAIR ((long) (offset >> 32), (long) offset),
  74036. - (off_t) len, advise);
  74037. - if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
  74038. - return 0;
  74039. - return INTERNAL_SYSCALL_ERRNO (ret, err);
  74040. -}
  74041. -
  74042. -/* 32 bit implementation is kind of a pita */
  74043. -#elif __WORDSIZE == 32
  74044. -
  74045. -int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advise)
  74046. -{
  74047. - INTERNAL_SYSCALL_DECL (err);
  74048. - int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, advise,
  74049. - __LONG_LONG_PAIR((long) (offset >> 32), (long) offset ),
  74050. - __LONG_LONG_PAIR((long) (len >> 32), (long) len));
  74051. - if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
  74052. - return 0;
  74053. - return INTERNAL_SYSCALL_ERRNO (ret, err);
  74054. -}
  74055. -
  74056. -#else
  74057. -#error your machine is neither 32 bit or 64 bit ... it must be magical
  74058. -#endif
  74059. -
  74060. -#elif !defined __NR_fadvise64
  74061. -/* This is declared as a strong alias in posix_fadvise.c if __NR_fadvise64
  74062. - * is defined.
  74063. - */
  74064. -int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advise)
  74065. -{
  74066. -#warning This is not correct as far as SUSv3 is concerned.
  74067. - return ENOSYS;
  74068. -}
  74069. -#endif /* __NR_fadvise64_64 */
  74070. -#endif /* __UCLIBC_HAS_LFS__ */
  74071. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/posix_fadvise.c uClibc-git/libc/sysdeps/linux/powerpc/posix_fadvise.c
  74072. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/posix_fadvise.c 2012-05-15 09:20:09.000000000 +0200
  74073. +++ uClibc-git/libc/sysdeps/linux/powerpc/posix_fadvise.c 1970-01-01 01:00:00.000000000 +0100
  74074. @@ -1,36 +0,0 @@
  74075. -/* vi: set sw=4 ts=4: */
  74076. -/*
  74077. - * posix_fadvise() for uClibc
  74078. - * http://www.opengroup.org/onlinepubs/009695399/functions/posix_fadvise.html
  74079. - *
  74080. - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  74081. - *
  74082. - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  74083. - */
  74084. -
  74085. -#include <sys/syscall.h>
  74086. -#include <fcntl.h>
  74087. -
  74088. -#ifdef __NR_fadvise64
  74089. -#define __NR_posix_fadvise __NR_fadvise64
  74090. -int posix_fadvise(int fd, off_t offset, off_t len, int advice)
  74091. -{
  74092. - INTERNAL_SYSCALL_DECL(err);
  74093. - int ret = (int) (INTERNAL_SYSCALL(posix_fadvise, err, 6, fd, 0,
  74094. - __LONG_LONG_PAIR (offset >> 31, offset), len, advice));
  74095. - if (INTERNAL_SYSCALL_ERROR_P (ret, err))
  74096. - return INTERNAL_SYSCALL_ERRNO (ret, err);
  74097. - return 0;
  74098. -}
  74099. -
  74100. -#if defined __UCLIBC_HAS_LFS__ && (!defined __NR_fadvise64_64 || !defined _syscall6)
  74101. -strong_alias(posix_fadvise,posix_fadvise64)
  74102. -#endif
  74103. -
  74104. -#else
  74105. -int posix_fadvise(int fd attribute_unused, off_t offset attribute_unused, off_t len attribute_unused, int advice attribute_unused)
  74106. -{
  74107. -#warning This is not correct as far as SUSv3 is concerned.
  74108. - return ENOSYS;
  74109. -}
  74110. -#endif
  74111. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/powerpc32/sysdep.h uClibc-git/libc/sysdeps/linux/powerpc/powerpc32/sysdep.h
  74112. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/powerpc32/sysdep.h 2012-05-15 09:20:09.000000000 +0200
  74113. +++ uClibc-git/libc/sysdeps/linux/powerpc/powerpc32/sysdep.h 2014-07-25 20:36:07.493338284 +0200
  74114. @@ -13,9 +13,8 @@
  74115. Lesser General Public License for more details.
  74116. You should have received a copy of the GNU Lesser General Public
  74117. - License along with the GNU C Library; if not, write to the Free
  74118. - Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
  74119. - 02110-1301 USA. */
  74120. + License along with the GNU C Library; if not, see
  74121. + <http://www.gnu.org/licenses/>. */
  74122. #ifdef __ASSEMBLER__
  74123. @@ -133,6 +132,7 @@
  74124. #define PSEUDO_RET_ERRVAL \
  74125. blr
  74126. +#undef ret_ERRVAL
  74127. #define ret_ERRVAL PSEUDO_RET_ERRVAL
  74128. #undef PSEUDO_END_ERRVAL
  74129. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/powerpc64/sysdep.h uClibc-git/libc/sysdeps/linux/powerpc/powerpc64/sysdep.h
  74130. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/powerpc64/sysdep.h 2012-05-15 09:20:09.000000000 +0200
  74131. +++ uClibc-git/libc/sysdeps/linux/powerpc/powerpc64/sysdep.h 2014-07-25 20:36:07.505338346 +0200
  74132. @@ -13,9 +13,8 @@
  74133. Lesser General Public License for more details.
  74134. You should have received a copy of the GNU Lesser General Public
  74135. - License along with the GNU C Library; if not, write to the Free
  74136. - Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
  74137. - 02110-1301 USA. */
  74138. + License along with the GNU C Library; if not, see
  74139. + <http://www.gnu.org/licenses/>. */
  74140. #ifdef __ELF__
  74141. @@ -228,6 +227,7 @@
  74142. #define PSEUDO_RET_ERRVAL \
  74143. blr
  74144. +#undef ret_ERRVAL
  74145. #define ret_ERRVAL PSEUDO_RET_ERRVAL
  74146. #undef PSEUDO_END_ERRVAL
  74147. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/ppc_asm.h uClibc-git/libc/sysdeps/linux/powerpc/ppc_asm.h
  74148. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/ppc_asm.h 2012-05-15 09:20:09.000000000 +0200
  74149. +++ uClibc-git/libc/sysdeps/linux/powerpc/ppc_asm.h 2014-07-25 20:36:07.505338346 +0200
  74150. @@ -12,9 +12,8 @@
  74151. Lesser General Public License for more details.
  74152. You should have received a copy of the GNU Lesser General Public
  74153. - License along with the GNU C Library; if not, write to the Free
  74154. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  74155. - 02111-1307 USA. */
  74156. + License along with the GNU C Library; if not, see
  74157. + <http://www.gnu.org/licenses/>. */
  74158. #ifdef __ASSEMBLER__
  74159. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/pread_write.c uClibc-git/libc/sysdeps/linux/powerpc/pread_write.c
  74160. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/pread_write.c 2012-05-15 09:20:09.000000000 +0200
  74161. +++ uClibc-git/libc/sysdeps/linux/powerpc/pread_write.c 1970-01-01 01:00:00.000000000 +0100
  74162. @@ -1,183 +0,0 @@
  74163. -/* vi: set sw=4 ts=4:
  74164. - *
  74165. - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  74166. - *
  74167. - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  74168. - */
  74169. -/* Based in part on the files
  74170. - * ./sysdeps/unix/sysv/linux/pwrite.c,
  74171. - * ./sysdeps/unix/sysv/linux/pread.c,
  74172. - * sysdeps/posix/pread.c
  74173. - * sysdeps/posix/pwrite.c
  74174. - * from GNU libc 2.2.5, but reworked considerably...
  74175. - */
  74176. -
  74177. -#include <sys/syscall.h>
  74178. -#include <unistd.h>
  74179. -#include <endian.h>
  74180. -
  74181. -#ifndef __UCLIBC_HAS_LFS__
  74182. -# define off64_t off_t
  74183. -#endif
  74184. -
  74185. -#ifdef __NR_pread
  74186. -extern __typeof(pread) __libc_pread;
  74187. -# define __NR___syscall_pread __NR_pread
  74188. -static __inline__ _syscall6(ssize_t, __syscall_pread, int, fd,
  74189. - void *, buf, size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
  74190. -
  74191. -ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
  74192. -{
  74193. - return(__syscall_pread(fd, buf, count, 0, __LONG_LONG_PAIR(offset >> 31, offset)));
  74194. -}
  74195. -weak_alias(__libc_pread,pread)
  74196. -
  74197. -# ifdef __UCLIBC_HAS_LFS__
  74198. -extern __typeof(pread64) __libc_pread64;
  74199. -ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
  74200. -{
  74201. - return(__syscall_pread(fd, buf, count, 0, __LONG_LONG_PAIR(offset >> 32, offset)));
  74202. -}
  74203. -weak_alias(__libc_pread64,pread64)
  74204. -# endif /* __UCLIBC_HAS_LFS__ */
  74205. -#endif /* __NR_pread */
  74206. -
  74207. -
  74208. -#ifdef __NR_pwrite
  74209. -extern __typeof(pwrite) __libc_pwrite;
  74210. -# define __NR___syscall_pwrite __NR_pwrite
  74211. -static __inline__ _syscall6(ssize_t, __syscall_pwrite, int, fd,
  74212. - const void *, buf, size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
  74213. -
  74214. -ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
  74215. -{
  74216. - return(__syscall_pwrite(fd, buf, count, 0, __LONG_LONG_PAIR(offset >> 31, offset)));
  74217. -}
  74218. -weak_alias(__libc_pwrite,pwrite)
  74219. -
  74220. -# ifdef __UCLIBC_HAS_LFS__
  74221. -extern __typeof(pwrite64) __libc_pwrite64;
  74222. -ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
  74223. -{
  74224. - return(__syscall_pwrite(fd, buf, count, 0, __LONG_LONG_PAIR(offset >> 32, offset)));
  74225. -}
  74226. -weak_alias(__libc_pwrite64,pwrite64)
  74227. -# endif /* __UCLIBC_HAS_LFS__ */
  74228. -#endif /* __NR_pwrite */
  74229. -
  74230. -
  74231. -
  74232. -#if ! defined __NR_pread || ! defined __NR_pwrite
  74233. -
  74234. -static ssize_t __fake_pread_write(int fd, void *buf,
  74235. - size_t count, off_t offset, int do_pwrite)
  74236. -{
  74237. - int save_errno;
  74238. - ssize_t result;
  74239. - off_t old_offset;
  74240. -
  74241. - /* Since we must not change the file pointer preserve the
  74242. - * value so that we can restore it later. */
  74243. - if ((old_offset=lseek(fd, 0, SEEK_CUR)) == (off_t) -1)
  74244. - return -1;
  74245. -
  74246. - /* Set to wanted position. */
  74247. - if (lseek (fd, offset, SEEK_SET) == (off_t) -1)
  74248. - return -1;
  74249. -
  74250. - if (do_pwrite == 1) {
  74251. - /* Write the data. */
  74252. - result = write(fd, buf, count);
  74253. - } else {
  74254. - /* Read the data. */
  74255. - result = read(fd, buf, count);
  74256. - }
  74257. -
  74258. - /* Now we have to restore the position. If this fails we
  74259. - * have to return this as an error. */
  74260. - save_errno = errno;
  74261. - if (lseek(fd, old_offset, SEEK_SET) == (off_t) -1)
  74262. - {
  74263. - if (result == -1)
  74264. - __set_errno(save_errno);
  74265. - return -1;
  74266. - }
  74267. - __set_errno(save_errno);
  74268. - return(result);
  74269. -}
  74270. -
  74271. -# ifdef __UCLIBC_HAS_LFS__
  74272. -
  74273. -static ssize_t __fake_pread_write64(int fd, void *buf,
  74274. - size_t count, off64_t offset, int do_pwrite)
  74275. -{
  74276. - int save_errno;
  74277. - ssize_t result;
  74278. - off64_t old_offset;
  74279. -
  74280. - /* Since we must not change the file pointer preserve the
  74281. - * value so that we can restore it later. */
  74282. - if ((old_offset=lseek64(fd, 0, SEEK_CUR)) == (off64_t) -1)
  74283. - return -1;
  74284. -
  74285. - /* Set to wanted position. */
  74286. - if (lseek64(fd, offset, SEEK_SET) == (off64_t) -1)
  74287. - return -1;
  74288. -
  74289. - if (do_pwrite == 1) {
  74290. - /* Write the data. */
  74291. - result = write(fd, buf, count);
  74292. - } else {
  74293. - /* Read the data. */
  74294. - result = read(fd, buf, count);
  74295. - }
  74296. -
  74297. - /* Now we have to restore the position. */
  74298. - save_errno = errno;
  74299. - if (lseek64 (fd, old_offset, SEEK_SET) == (off64_t) -1) {
  74300. - if (result == -1)
  74301. - __set_errno (save_errno);
  74302. - return -1;
  74303. - }
  74304. - __set_errno (save_errno);
  74305. - return result;
  74306. -}
  74307. -# endif /* __UCLIBC_HAS_LFS__ */
  74308. -#endif /* ! defined __NR_pread || ! defined __NR_pwrite */
  74309. -
  74310. -#ifndef __NR_pread
  74311. -ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset);
  74312. -ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
  74313. -{
  74314. - return(__fake_pread_write(fd, buf, count, offset, 0));
  74315. -}
  74316. -weak_alias(__libc_pread,pread)
  74317. -
  74318. -# ifdef __UCLIBC_HAS_LFS__
  74319. -ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset);
  74320. -ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
  74321. -{
  74322. - return(__fake_pread_write64(fd, buf, count, offset, 0));
  74323. -}
  74324. -weak_alias(__libc_pread64,pread64)
  74325. -# endif /* __UCLIBC_HAS_LFS__ */
  74326. -#endif /* ! __NR_pread */
  74327. -
  74328. -
  74329. -#ifndef __NR_pwrite
  74330. -ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset);
  74331. -ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
  74332. -{
  74333. - return(__fake_pread_write(fd, (void*)buf, count, offset, 1));
  74334. -}
  74335. -weak_alias(__libc_pwrite,pwrite)
  74336. -
  74337. -# ifdef __UCLIBC_HAS_LFS__
  74338. -ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset);
  74339. -ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
  74340. -{
  74341. - return(__fake_pread_write64(fd, (void*)buf, count, offset, 1));
  74342. -}
  74343. -weak_alias(__libc_pwrite64,pwrite64)
  74344. -# endif /* __UCLIBC_HAS_LFS__ */
  74345. -#endif /* ! __NR_pwrite */
  74346. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/setjmp.S uClibc-git/libc/sysdeps/linux/powerpc/setjmp.S
  74347. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/setjmp.S 2012-05-15 09:20:09.000000000 +0200
  74348. +++ uClibc-git/libc/sysdeps/linux/powerpc/setjmp.S 2014-07-25 20:36:07.505338346 +0200
  74349. @@ -15,15 +15,12 @@
  74350. Lesser General Public License for more details.
  74351. You should have received a copy of the GNU Lesser General Public
  74352. - License along with the GNU C Library; if not, write to the Free
  74353. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  74354. - 02111-1307 USA. */
  74355. + License along with the GNU C Library; if not, see
  74356. + <http://www.gnu.org/licenses/>. */
  74357. #include <features.h>
  74358. #include "ppc_asm.h"
  74359. -#define _ASM
  74360. -#define _SETJMP_H
  74361. -#include <bits/setjmp.h>
  74362. +#include <jmpbuf-offsets.h>
  74363. #if defined __UCLIBC_HAS_FLOATS__ && ! defined __UCLIBC_HAS_SOFT_FLOAT__
  74364. #define FP(x...) x
  74365. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/sys/procfs.h uClibc-git/libc/sysdeps/linux/powerpc/sys/procfs.h
  74366. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  74367. +++ uClibc-git/libc/sysdeps/linux/powerpc/sys/procfs.h 2014-07-25 20:36:07.521338430 +0200
  74368. @@ -12,9 +12,8 @@
  74369. Lesser General Public License for more details.
  74370. You should have received a copy of the GNU Lesser General Public
  74371. - License along with the GNU C Library; if not, write to the Free
  74372. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  74373. - 02111-1307 USA. */
  74374. + License along with the GNU C Library; if not, see
  74375. + <http://www.gnu.org/licenses/>. */
  74376. #ifndef _SYS_PROCFS_H
  74377. #define _SYS_PROCFS_H 1
  74378. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/sys/ptrace.h uClibc-git/libc/sysdeps/linux/powerpc/sys/ptrace.h
  74379. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/sys/ptrace.h 2012-05-15 09:20:09.000000000 +0200
  74380. +++ uClibc-git/libc/sysdeps/linux/powerpc/sys/ptrace.h 2014-07-25 20:36:07.521338430 +0200
  74381. @@ -13,9 +13,8 @@
  74382. Lesser General Public License for more details.
  74383. You should have received a copy of the GNU Lesser General Public
  74384. - License along with the GNU C Library; if not, write to the Free
  74385. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  74386. - 02111-1307 USA. */
  74387. + License along with the GNU C Library; if not, see
  74388. + <http://www.gnu.org/licenses/>. */
  74389. #ifndef _SYS_PTRACE_H
  74390. #define _SYS_PTRACE_H 1
  74391. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/sys/ucontext.h uClibc-git/libc/sysdeps/linux/powerpc/sys/ucontext.h
  74392. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  74393. +++ uClibc-git/libc/sysdeps/linux/powerpc/sys/ucontext.h 2014-07-25 20:36:07.521338430 +0200
  74394. @@ -12,9 +12,8 @@
  74395. Lesser General Public License for more details.
  74396. You should have received a copy of the GNU Lesser General Public
  74397. - License along with the GNU C Library; if not, write to the Free
  74398. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  74399. - 02111-1307 USA. */
  74400. + License along with the GNU C Library; if not, see
  74401. + <http://www.gnu.org/licenses/>. */
  74402. #ifndef _SYS_UCONTEXT_H
  74403. #define _SYS_UCONTEXT_H 1
  74404. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/sys/user.h uClibc-git/libc/sysdeps/linux/powerpc/sys/user.h
  74405. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/sys/user.h 2012-05-15 09:20:09.000000000 +0200
  74406. +++ uClibc-git/libc/sysdeps/linux/powerpc/sys/user.h 2014-07-25 20:36:07.521338430 +0200
  74407. @@ -12,9 +12,8 @@
  74408. Lesser General Public License for more details.
  74409. You should have received a copy of the GNU Lesser General Public
  74410. - License along with the GNU C Library; if not, write to the Free
  74411. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  74412. - 02111-1307 USA. */
  74413. + License along with the GNU C Library; if not, see
  74414. + <http://www.gnu.org/licenses/>. */
  74415. #ifndef _SYS_USER_H
  74416. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/syscall.S uClibc-git/libc/sysdeps/linux/powerpc/syscall.S
  74417. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/syscall.S 2012-05-15 09:20:09.000000000 +0200
  74418. +++ uClibc-git/libc/sysdeps/linux/powerpc/syscall.S 2014-07-25 20:36:07.521338430 +0200
  74419. @@ -12,9 +12,8 @@
  74420. Lesser General Public License for more details.
  74421. You should have received a copy of the GNU Lesser General Public
  74422. - License along with the GNU C Library; if not, write to the Free
  74423. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  74424. - 02111-1307 USA. */
  74425. + License along with the GNU C Library; if not, see
  74426. + <http://www.gnu.org/licenses/>. */
  74427. #include <features.h>
  74428. @@ -30,6 +29,7 @@
  74429. mr 5,6
  74430. mr 6,7
  74431. mr 7,8
  74432. + mr 8,9
  74433. sc
  74434. bnslr;
  74435. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/sysdep.h uClibc-git/libc/sysdeps/linux/powerpc/sysdep.h
  74436. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/sysdep.h 2012-05-15 09:20:09.000000000 +0200
  74437. +++ uClibc-git/libc/sysdeps/linux/powerpc/sysdep.h 2014-07-25 20:36:07.521338430 +0200
  74438. @@ -12,9 +12,8 @@
  74439. Lesser General Public License for more details.
  74440. You should have received a copy of the GNU Lesser General Public
  74441. - License along with the GNU C Library; if not, write to the Free
  74442. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  74443. - 02111-1307 USA. */
  74444. + License along with the GNU C Library; if not, see
  74445. + <http://www.gnu.org/licenses/>. */
  74446. #include <common/sysdep.h>
  74447. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/vfork.S uClibc-git/libc/sysdeps/linux/powerpc/vfork.S
  74448. --- uClibc-0.9.33.2/libc/sysdeps/linux/powerpc/vfork.S 2012-05-15 09:20:09.000000000 +0200
  74449. +++ uClibc-git/libc/sysdeps/linux/powerpc/vfork.S 2014-07-25 20:36:07.521338430 +0200
  74450. @@ -27,4 +27,4 @@
  74451. .size __vfork,.-__vfork
  74452. weak_alias(__vfork,vfork)
  74453. -libc_hidden_weak(vfork)
  74454. +libc_hidden_def(vfork)
  74455. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/README uClibc-git/libc/sysdeps/linux/README
  74456. --- uClibc-0.9.33.2/libc/sysdeps/linux/README 2012-05-15 09:20:09.000000000 +0200
  74457. +++ uClibc-git/libc/sysdeps/linux/README 2014-07-25 20:36:06.477332962 +0200
  74458. @@ -4,4 +4,7 @@
  74459. to add that support.
  74460. All stuff that is not at all dependent on a particular Linux architecture
  74461. -goes in the 'common' directory.
  74462. +goes in the 'common' directory. However, for new architectures which are
  74463. +using the generic syscalls in the Linux Kernel, the 'common-generic'
  74464. +directory should be used instead as they all use identical interfaces for
  74465. +the system calls.
  74466. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/atomic.h uClibc-git/libc/sysdeps/linux/sh/bits/atomic.h
  74467. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
  74468. +++ uClibc-git/libc/sysdeps/linux/sh/bits/atomic.h 2014-07-25 20:36:07.549338578 +0200
  74469. @@ -13,9 +13,8 @@
  74470. Lesser General Public License for more details.
  74471. You should have received a copy of the GNU Lesser General Public
  74472. - License along with the GNU C Library; if not, write to the Free
  74473. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  74474. - 02111-1307 USA. */
  74475. + License along with the GNU C Library; if not, see
  74476. + <http://www.gnu.org/licenses/>. */
  74477. #include <stdint.h>
  74478. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/fcntl.h uClibc-git/libc/sysdeps/linux/sh/bits/fcntl.h
  74479. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  74480. +++ uClibc-git/libc/sysdeps/linux/sh/bits/fcntl.h 2014-07-25 20:36:07.549338578 +0200
  74481. @@ -14,9 +14,8 @@
  74482. Lesser General Public License for more details.
  74483. You should have received a copy of the GNU Lesser General Public
  74484. - License along with the GNU C Library; if not, write to the Free
  74485. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  74486. - 02111-1307 USA. */
  74487. + License along with the GNU C Library; if not, see
  74488. + <http://www.gnu.org/licenses/>. */
  74489. #ifndef _FCNTL_H
  74490. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  74491. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/fenv.h uClibc-git/libc/sysdeps/linux/sh/bits/fenv.h
  74492. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
  74493. +++ uClibc-git/libc/sysdeps/linux/sh/bits/fenv.h 2014-07-25 20:36:07.549338578 +0200
  74494. @@ -12,9 +12,8 @@
  74495. Lesser General Public License for more details.
  74496. You should have received a copy of the GNU Lesser General Public
  74497. - License along with the GNU C Library; if not, write to the Free
  74498. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  74499. - 02111-1307 USA. */
  74500. + License along with the GNU C Library; if not, see
  74501. + <http://www.gnu.org/licenses/>. */
  74502. #ifndef _FENV_H
  74503. # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
  74504. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/huge_val.h uClibc-git/libc/sysdeps/linux/sh/bits/huge_val.h
  74505. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/huge_val.h 2012-05-15 09:20:09.000000000 +0200
  74506. +++ uClibc-git/libc/sysdeps/linux/sh/bits/huge_val.h 2014-07-25 20:36:07.549338578 +0200
  74507. @@ -16,9 +16,8 @@
  74508. Lesser General Public License for more details.
  74509. You should have received a copy of the GNU Lesser General Public
  74510. - License along with the GNU C Library; if not, write to the Free
  74511. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  74512. - 02111-1307 USA. */
  74513. + License along with the GNU C Library; if not, see
  74514. + <http://www.gnu.org/licenses/>. */
  74515. #ifndef _MATH_H
  74516. # error "Never use <bits/huge_val.h> directly; include <math.h> instead."
  74517. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/sh/bits/kernel_types.h
  74518. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
  74519. +++ uClibc-git/libc/sysdeps/linux/sh/bits/kernel_types.h 2014-07-25 20:36:07.549338578 +0200
  74520. @@ -32,6 +32,8 @@
  74521. typedef unsigned short __kernel_old_uid_t;
  74522. typedef unsigned short __kernel_old_gid_t;
  74523. typedef __kernel_dev_t __kernel_old_dev_t;
  74524. +typedef long __kernel_long_t;
  74525. +typedef unsigned long __kernel_ulong_t;
  74526. typedef long long __kernel_loff_t;
  74527. typedef struct {
  74528. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/mathdef.h uClibc-git/libc/sysdeps/linux/sh/bits/mathdef.h
  74529. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
  74530. +++ uClibc-git/libc/sysdeps/linux/sh/bits/mathdef.h 2014-07-25 20:36:07.549338578 +0200
  74531. @@ -12,9 +12,8 @@
  74532. Lesser General Public License for more details.
  74533. You should have received a copy of the GNU Lesser General Public
  74534. - License along with the GNU C Library; if not, write to the Free
  74535. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  74536. - 02111-1307 USA. */
  74537. + License along with the GNU C Library; if not, see
  74538. + <http://www.gnu.org/licenses/>. */
  74539. #if !defined _MATH_H && !defined _COMPLEX_H
  74540. # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
  74541. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/setjmp.h uClibc-git/libc/sysdeps/linux/sh/bits/setjmp.h
  74542. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  74543. +++ uClibc-git/libc/sysdeps/linux/sh/bits/setjmp.h 2014-07-25 20:36:07.549338578 +0200
  74544. @@ -1,4 +1,4 @@
  74545. -/* Copyright (C) 1999, 2000, 2003, 2005 Free Software Foundation, Inc.
  74546. +/* Copyright (C) 1999,2000,2003,2005,2006 Free Software Foundation, Inc.
  74547. This file is part of the GNU C Library.
  74548. The GNU C Library is free software; you can redistribute it and/or
  74549. @@ -12,19 +12,17 @@
  74550. Lesser General Public License for more details.
  74551. You should have received a copy of the GNU Lesser General Public
  74552. - License along with the GNU C Library; if not, write to the Free
  74553. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  74554. - 02111-1307 USA. */
  74555. + License along with the GNU C Library; if not, see
  74556. + <http://www.gnu.org/licenses/>. */
  74557. /* Define the machine-dependent type `jmp_buf'. SH version. */
  74558. #ifndef _BITS_SETJMP_H
  74559. -#define _BITS_SETJMP_H 1
  74560. +#define _BITS_SETJMP_H 1
  74561. #if !defined _SETJMP_H && !defined _PTHREAD_H
  74562. # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
  74563. #endif
  74564. -#ifndef _ASM
  74565. typedef struct
  74566. {
  74567. /* Callee-saved registers r8 through r15. */
  74568. @@ -42,15 +40,5 @@
  74569. /* Callee-saved floating point registers fr12 through fr15. */
  74570. int __fpregs[4];
  74571. } __jmp_buf[1];
  74572. -#endif
  74573. -
  74574. -#if defined __USE_MISC || defined _ASM
  74575. -# define JB_SIZE (4 * 15)
  74576. -#endif
  74577. -
  74578. -/* Test if longjmp to JMPBUF would unwind the frame
  74579. - containing a local variable at ADDRESS. */
  74580. -#define _JMPBUF_UNWINDS(jmpbuf, address) \
  74581. - ((void *) (address) < (void *) (jmpbuf)[0].__regs[7])
  74582. -#endif /* bits/setjmp.h */
  74583. +#endif /* bits/setjmp.h */
  74584. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/shm.h uClibc-git/libc/sysdeps/linux/sh/bits/shm.h
  74585. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
  74586. +++ uClibc-git/libc/sysdeps/linux/sh/bits/shm.h 2014-07-25 20:36:07.549338578 +0200
  74587. @@ -12,9 +12,8 @@
  74588. Lesser General Public License for more details.
  74589. You should have received a copy of the GNU Lesser General Public
  74590. - License along with the GNU C Library; if not, write to the Free
  74591. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  74592. - 02111-1307 USA. */
  74593. + License along with the GNU C Library; if not, see
  74594. + <http://www.gnu.org/licenses/>. */
  74595. #ifndef _SYS_SHM_H
  74596. # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
  74597. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/sigcontextinfo.h uClibc-git/libc/sysdeps/linux/sh/bits/sigcontextinfo.h
  74598. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
  74599. +++ uClibc-git/libc/sysdeps/linux/sh/bits/sigcontextinfo.h 2014-07-25 20:36:07.549338578 +0200
  74600. @@ -13,9 +13,8 @@
  74601. Lesser General Public License for more details.
  74602. You should have received a copy of the GNU Lesser General Public
  74603. - License along with the GNU C Library; if not, write to the Free
  74604. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  74605. - 02111-1307 USA. */
  74606. + License along with the GNU C Library; if not, see
  74607. + <http://www.gnu.org/licenses/>. */
  74608. #define SIGCONTEXT int _a2, int _a3, int _a4, struct sigcontext
  74609. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/sh/bits/stackinfo.h
  74610. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  74611. +++ uClibc-git/libc/sysdeps/linux/sh/bits/stackinfo.h 2014-07-25 20:36:07.549338578 +0200
  74612. @@ -12,9 +12,8 @@
  74613. Lesser General Public License for more details.
  74614. You should have received a copy of the GNU Lesser General Public
  74615. - License along with the GNU C Library; if not, write to the Free
  74616. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  74617. - 02111-1307 USA. */
  74618. + License along with the GNU C Library; if not, see
  74619. + <http://www.gnu.org/licenses/>. */
  74620. /* This file contains a bit of information about the stack allocation
  74621. of the processor. */
  74622. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h
  74623. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  74624. +++ uClibc-git/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h 2014-07-25 20:36:07.549338578 +0200
  74625. @@ -15,8 +15,8 @@
  74626. /* can your target use syscall6() for mmap ? */
  74627. #define __UCLIBC_MMAP_HAS_6_ARGS__
  74628. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  74629. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  74630. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  74631. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  74632. /* does your target have a broken create_module() ? */
  74633. #undef __UCLIBC_BROKEN_CREATE_MODULE__
  74634. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/wordsize.h uClibc-git/libc/sysdeps/linux/sh/bits/wordsize.h
  74635. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
  74636. +++ uClibc-git/libc/sysdeps/linux/sh/bits/wordsize.h 2014-07-25 20:36:07.549338578 +0200
  74637. @@ -12,8 +12,7 @@
  74638. Lesser General Public License for more details.
  74639. You should have received a copy of the GNU Lesser General Public
  74640. - License along with the GNU C Library; if not, write to the Free
  74641. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  74642. - 02111-1307 USA. */
  74643. + License along with the GNU C Library; if not, see
  74644. + <http://www.gnu.org/licenses/>. */
  74645. #define __WORDSIZE 32
  74646. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/cacheflush.c uClibc-git/libc/sysdeps/linux/sh/cacheflush.c
  74647. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/cacheflush.c 2012-05-15 09:20:09.000000000 +0200
  74648. +++ uClibc-git/libc/sysdeps/linux/sh/cacheflush.c 2014-07-25 20:36:07.553338598 +0200
  74649. @@ -6,10 +6,9 @@
  74650. *
  74651. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  74652. */
  74653. -#include <errno.h>
  74654. -#include <unistd.h>
  74655. #include <sys/syscall.h>
  74656. #ifdef __NR_cacheflush
  74657. -_syscall3(int, cacheflush, char *, addr, int, nbytes, int, op)
  74658. +int cacheflush(void *addr, const int nbytes, int op);
  74659. +_syscall3(int, cacheflush, void *, addr, const int, nbytes, const int, op)
  74660. #endif
  74661. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/clone.S uClibc-git/libc/sysdeps/linux/sh/clone.S
  74662. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/clone.S 2012-05-15 09:20:09.000000000 +0200
  74663. +++ uClibc-git/libc/sysdeps/linux/sh/clone.S 2014-07-25 20:36:07.553338598 +0200
  74664. @@ -12,9 +12,8 @@
  74665. Lesser General Public License for more details.
  74666. You should have received a copy of the GNU Lesser General Public
  74667. - License along with the GNU C Library; if not, write to the Free
  74668. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  74669. - 02111-1307 USA. */
  74670. + License along with the GNU C Library; if not, see
  74671. + <http://www.gnu.org/licenses/>. */
  74672. /* clone() is even more special than fork() as it mucks with stacks
  74673. and invokes a function in the right context after its all over. */
  74674. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/crt1.S uClibc-git/libc/sysdeps/linux/sh/crt1.S
  74675. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/crt1.S 2012-05-15 09:20:09.000000000 +0200
  74676. +++ uClibc-git/libc/sysdeps/linux/sh/crt1.S 2014-07-25 20:36:07.553338598 +0200
  74677. @@ -14,8 +14,7 @@
  74678. details.
  74679. You should have received a copy of the GNU Library General Public License
  74680. - along with this program; if not, write to the Free Software Foundation, Inc.,
  74681. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  74682. + along with this program; if not, see <http://www.gnu.org/licenses/>.
  74683. */
  74684. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/___fpscr_values.S uClibc-git/libc/sysdeps/linux/sh/___fpscr_values.S
  74685. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/___fpscr_values.S 2012-05-15 09:20:09.000000000 +0200
  74686. +++ uClibc-git/libc/sysdeps/linux/sh/___fpscr_values.S 2014-07-25 20:36:07.537338514 +0200
  74687. @@ -14,8 +14,7 @@
  74688. details.
  74689. You should have received a copy of the GNU Library General Public License
  74690. - along with this program; if not, write to the Free Software Foundation, Inc.,
  74691. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  74692. + along with this program; if not, see <http://www.gnu.org/licenses/>.
  74693. */
  74694. #include <features.h>
  74695. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/fpu_control.h uClibc-git/libc/sysdeps/linux/sh/fpu_control.h
  74696. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
  74697. +++ uClibc-git/libc/sysdeps/linux/sh/fpu_control.h 2014-07-25 20:36:07.553338598 +0200
  74698. @@ -13,9 +13,8 @@
  74699. Lesser General Public License for more details.
  74700. You should have received a copy of the GNU Lesser General Public
  74701. - License along with the GNU C Library; if not, write to the Free
  74702. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  74703. - 02111-1307 USA. */
  74704. + License along with the GNU C Library; if not, see
  74705. + <http://www.gnu.org/licenses/>. */
  74706. #ifndef _FPU_CONTROL_H
  74707. #define _FPU_CONTROL_H
  74708. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/jmpbuf-offsets.h uClibc-git/libc/sysdeps/linux/sh/jmpbuf-offsets.h
  74709. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
  74710. +++ uClibc-git/libc/sysdeps/linux/sh/jmpbuf-offsets.h 2014-07-25 20:36:07.553338598 +0200
  74711. @@ -0,0 +1,19 @@
  74712. +/* Private macros for accessing __jmp_buf contents. SH version.
  74713. + Copyright (C) 2006 Free Software Foundation, Inc.
  74714. + This file is part of the GNU C Library.
  74715. +
  74716. + The GNU C Library is free software; you can redistribute it and/or
  74717. + modify it under the terms of the GNU Lesser General Public
  74718. + License as published by the Free Software Foundation; either
  74719. + version 2.1 of the License, or (at your option) any later version.
  74720. +
  74721. + The GNU C Library is distributed in the hope that it will be useful,
  74722. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  74723. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  74724. + Lesser General Public License for more details.
  74725. +
  74726. + You should have received a copy of the GNU Lesser General Public
  74727. + License along with the GNU C Library; if not, see
  74728. + <http://www.gnu.org/licenses/>. */
  74729. +
  74730. +#define JB_SIZE (4 * 15)
  74731. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/sh/jmpbuf-unwind.h
  74732. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  74733. +++ uClibc-git/libc/sysdeps/linux/sh/jmpbuf-unwind.h 2014-07-25 20:36:07.553338598 +0200
  74734. @@ -0,0 +1,22 @@
  74735. +/*
  74736. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  74737. + *
  74738. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  74739. + */
  74740. +#include <setjmp.h>
  74741. +
  74742. +/* Test if longjmp to JMPBUF would unwind the frame
  74743. + containing a local variable at ADDRESS. */
  74744. +#define _JMPBUF_UNWINDS(jmpbuf, address) \
  74745. + ((void *) (address) < (void *) (jmpbuf)[0].__regs[7])
  74746. +
  74747. +#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  74748. +#include <stdint.h>
  74749. +#include <unwind.h>
  74750. +
  74751. +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
  74752. + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
  74753. +
  74754. +#define _JMPBUF_UNWINDS_ADJ(jmpbuf, address, adj) \
  74755. + ((uintptr_t) (address) - (adj) < (uintptr_t) (jmpbuf)[0].__regs[7] - (adj))
  74756. +#endif
  74757. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/__longjmp.S uClibc-git/libc/sysdeps/linux/sh/__longjmp.S
  74758. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
  74759. +++ uClibc-git/libc/sysdeps/linux/sh/__longjmp.S 2014-07-25 20:36:07.537338514 +0200
  74760. @@ -14,12 +14,8 @@
  74761. You should have received a copy of the GNU Library General Public
  74762. License along with the GNU C Library; see the file COPYING.LIB. If not,
  74763. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  74764. - Boston, MA 02111-1307, USA. */
  74765. + see <http://www.gnu.org/licenses/>. */
  74766. -#define _SETJMP_H
  74767. -#define _ASM
  74768. -#include <bits/setjmp.h>
  74769. #include <features.h>
  74770. /* __longjmp(jmpbuf, val) */
  74771. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/Makefile.arch uClibc-git/libc/sysdeps/linux/sh/Makefile.arch
  74772. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
  74773. +++ uClibc-git/libc/sysdeps/linux/sh/Makefile.arch 2014-07-25 20:36:07.537338514 +0200
  74774. @@ -6,7 +6,10 @@
  74775. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  74776. #
  74777. -CSRC := \
  74778. - mmap.c pipe.c __init_brk.c brk.c sbrk.c pread_write.c cacheflush.c
  74779. +CSRC-y := \
  74780. + pipe.c __init_brk.c brk.c sbrk.c pread_write.c
  74781. -SSRC := setjmp.S __longjmp.S ___fpscr_values.S vfork.S clone.S
  74782. +SSRC-y := setjmp.S __longjmp.S ___fpscr_values.S
  74783. +
  74784. +CSRC-$(UCLIBC_LINUX_SPECIFIC) += cacheflush.c
  74785. +SSRC-$(if $(UCLIBC_HAS_THREADS_NATIVE),,y) += clone.S vfork.S
  74786. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/mmap.c uClibc-git/libc/sysdeps/linux/sh/mmap.c
  74787. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/mmap.c 2012-05-15 09:20:09.000000000 +0200
  74788. +++ uClibc-git/libc/sysdeps/linux/sh/mmap.c 1970-01-01 01:00:00.000000000 +0100
  74789. @@ -1,34 +0,0 @@
  74790. -/* Copyright (C) 2001 Hewlett-Packard
  74791. -
  74792. - This program is free software; you can redistribute it and/or modify it under
  74793. - the terms of the GNU Library General Public License as published by the Free
  74794. - Software Foundation; either version 2 of the License, or (at your option) any
  74795. - later version.
  74796. -
  74797. - This program is distributed in the hope that it will be useful, but WITHOUT
  74798. - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  74799. - FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
  74800. - details.
  74801. -
  74802. - You should have received a copy of the GNU Library General Public License
  74803. - along with this program; if not, write to the Free Software Foundation, Inc.,
  74804. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  74805. -
  74806. - Derived in part from the Linux-8086 C library, the GNU C Library, and several
  74807. - other sundry sources. Files within this library are copyright by their
  74808. - respective copyright holders.
  74809. -*/
  74810. -
  74811. -#include <unistd.h>
  74812. -#include <errno.h>
  74813. -#include <sys/mman.h>
  74814. -
  74815. -
  74816. -#ifdef HIOS
  74817. -# define __SH_SYSCALL6_TRAPA 0x2E
  74818. -#endif
  74819. -
  74820. -#include <sys/syscall.h>
  74821. -
  74822. -_syscall6(__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot, int, flags, int, fd, __off_t, offset)
  74823. -libc_hidden_def(mmap)
  74824. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/pread_write.c uClibc-git/libc/sysdeps/linux/sh/pread_write.c
  74825. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/pread_write.c 2012-05-15 09:20:09.000000000 +0200
  74826. +++ uClibc-git/libc/sysdeps/linux/sh/pread_write.c 2014-07-25 20:36:07.553338598 +0200
  74827. @@ -4,122 +4,8 @@
  74828. *
  74829. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  74830. */
  74831. -/*
  74832. - * Based in part on the files
  74833. - * ./sysdeps/unix/sysv/linux/pwrite.c,
  74834. - * ./sysdeps/unix/sysv/linux/pread.c,
  74835. - * sysdeps/posix/pread.c
  74836. - * sysdeps/posix/pwrite.c
  74837. - * from GNU libc 2.2.5, but reworked considerably...
  74838. - */
  74839. -
  74840. -#include <sys/syscall.h>
  74841. -#include <unistd.h>
  74842. -#include <stdint.h>
  74843. -#include <endian.h>
  74844. -
  74845. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  74846. -#include <sysdep-cancel.h>
  74847. -#else
  74848. -#define SINGLE_THREAD_P 1
  74849. -#endif
  74850. -
  74851. -
  74852. -#ifdef __NR_pread64 /* Newer kernels renamed but it's the same. */
  74853. -# ifdef __NR_pread
  74854. -# error "__NR_pread and __NR_pread64 both defined???"
  74855. -# endif
  74856. -# define __NR_pread __NR_pread64
  74857. -#endif
  74858. -
  74859. -#ifdef __NR_pread
  74860. -extern __typeof(pread) __libc_pread;
  74861. -# define __NR___syscall_pread __NR_pread
  74862. -static __inline__ _syscall6(ssize_t, __syscall_pread, int, fd, void *, buf,
  74863. - size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
  74864. -
  74865. -ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
  74866. -{
  74867. - if (SINGLE_THREAD_P)
  74868. - return(__syscall_pread(fd,buf,count,0,__LONG_LONG_PAIR(offset >> 31,offset)));
  74869. -
  74870. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  74871. - int oldtype = LIBC_CANCEL_ASYNC ();
  74872. - ssize_t result = __syscall_pread(fd,buf,count,0,__LONG_LONG_PAIR(offset >> 31,offset));
  74873. - LIBC_CANCEL_RESET (oldtype);
  74874. - return result;
  74875. -#endif
  74876. -}
  74877. -weak_alias(__libc_pread,pread)
  74878. -
  74879. -# ifdef __UCLIBC_HAS_LFS__
  74880. -extern __typeof(pread64) __libc_pread64;
  74881. -ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
  74882. -{
  74883. - uint32_t low = offset & 0xffffffff;
  74884. - uint32_t high = offset >> 32;
  74885. -
  74886. - if (SINGLE_THREAD_P)
  74887. - return __syscall_pread(fd, buf, count, 0, __LONG_LONG_PAIR (high, low));
  74888. -
  74889. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  74890. - int oldtype = LIBC_CANCEL_ASYNC ();
  74891. - ssize_t result = __syscall_pread(fd, buf, count, 0, __LONG_LONG_PAIR (high, low));
  74892. - LIBC_CANCEL_RESET (oldtype);
  74893. - return result;
  74894. -#endif
  74895. -}
  74896. -weak_alias(__libc_pread64,pread64)
  74897. -# endif /* __UCLIBC_HAS_LFS__ */
  74898. -#endif /* __NR_pread */
  74899. -
  74900. -/**********************************************************************/
  74901. -
  74902. -#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */
  74903. -# ifdef __NR_pwrite
  74904. -# error "__NR_pwrite and __NR_pwrite64 both defined???"
  74905. -# endif
  74906. -# define __NR_pwrite __NR_pwrite64
  74907. -#endif
  74908. -
  74909. -#ifdef __NR_pwrite
  74910. -extern __typeof(pwrite) __libc_pwrite;
  74911. -# define __NR___syscall_pwrite __NR_pwrite
  74912. -static __inline__ _syscall6(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
  74913. - size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
  74914. -
  74915. -ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
  74916. -{
  74917. - if (SINGLE_THREAD_P)
  74918. - return __syscall_pwrite(fd,buf,count,0,__LONG_LONG_PAIR(offset >> 31,offset));
  74919. -
  74920. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  74921. - int oldtype = LIBC_CANCEL_ASYNC ();
  74922. - ssize_t result = __syscall_pwrite(fd,buf,count,0,__LONG_LONG_PAIR(offset >> 31,offset));
  74923. - LIBC_CANCEL_RESET (oldtype);
  74924. - return result;
  74925. -#endif
  74926. -
  74927. -}
  74928. -weak_alias(__libc_pwrite,pwrite)
  74929. -
  74930. -# ifdef __UCLIBC_HAS_LFS__
  74931. -extern __typeof(pwrite64) __libc_pwrite64;
  74932. -ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
  74933. -{
  74934. - uint32_t low = offset & 0xffffffff;
  74935. - uint32_t high = offset >> 32;
  74936. -
  74937. - if (SINGLE_THREAD_P)
  74938. - return __syscall_pwrite(fd, buf, count, 0, __LONG_LONG_PAIR (high, low));
  74939. -#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  74940. - int oldtype = LIBC_CANCEL_ASYNC ();
  74941. - ssize_t result = __syscall_pwrite(fd, buf, count, 0, __LONG_LONG_PAIR (high, low));
  74942. - LIBC_CANCEL_RESET (oldtype);
  74943. - return result;
  74944. -#endif
  74945. -}
  74946. -weak_alias(__libc_pwrite64,pwrite64)
  74947. -# endif /* __UCLIBC_HAS_LFS__ */
  74948. -#endif /* __NR_pwrite */
  74949. +/* SuperH doesn't have this alignment issue. It just decided to copy
  74950. + * the syscall interface from another arch for no good reason. */
  74951. +#define __UCLIBC_SYSCALL_ALIGN_64BIT__
  74952. +#include "../common/pread_write.c"
  74953. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/setjmp.S uClibc-git/libc/sysdeps/linux/sh/setjmp.S
  74954. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/setjmp.S 2012-05-15 09:20:09.000000000 +0200
  74955. +++ uClibc-git/libc/sysdeps/linux/sh/setjmp.S 2014-07-25 20:36:07.553338598 +0200
  74956. @@ -14,13 +14,10 @@
  74957. You should have received a copy of the GNU Library General Public
  74958. License along with the GNU C Library; see the file COPYING.LIB. If not,
  74959. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  74960. - Boston, MA 02111-1307, USA. */
  74961. + see <http://www.gnu.org/licenses/>. */
  74962. #include <features.h>
  74963. -#define _SETJMP_H
  74964. -#define _ASM
  74965. -#include <bits/setjmp.h>
  74966. +#include <jmpbuf-offsets.h>
  74967. .text
  74968. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/sys/io.h uClibc-git/libc/sysdeps/linux/sh/sys/io.h
  74969. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/sys/io.h 2012-05-15 09:20:09.000000000 +0200
  74970. +++ uClibc-git/libc/sysdeps/linux/sh/sys/io.h 2014-07-25 20:36:07.553338598 +0200
  74971. @@ -12,9 +12,8 @@
  74972. Lesser General Public License for more details.
  74973. You should have received a copy of the GNU Lesser General Public
  74974. - License along with the GNU C Library; if not, write to the Free
  74975. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  74976. - 02111-1307 USA. */
  74977. + License along with the GNU C Library; if not, see
  74978. + <http://www.gnu.org/licenses/>. */
  74979. #ifndef _SYS_IO_H
  74980. @@ -23,17 +22,18 @@
  74981. __BEGIN_DECLS
  74982. +#if defined __UCLIBC_LINUX_SPECIFIC__
  74983. /* If TURN_ON is TRUE, request for permission to do direct i/o on the
  74984. port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
  74985. permission off for that range. This call requires root privileges. */
  74986. extern int ioperm (unsigned long int __from, unsigned long int __num,
  74987. int __turn_on) __THROW;
  74988. -libc_hidden_proto(ioperm)
  74989. /* Set the I/O privilege level to LEVEL. If LEVEL is nonzero,
  74990. permission to access any I/O port is granted. This call requires
  74991. root privileges. */
  74992. extern int iopl (int __level) __THROW;
  74993. +#endif /* __UCLIBC_LINUX_SPECIFIC__ */
  74994. /* The functions that actually perform reads and writes. */
  74995. extern unsigned char inb (unsigned long int port) __THROW;
  74996. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/sys/procfs.h uClibc-git/libc/sysdeps/linux/sh/sys/procfs.h
  74997. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  74998. +++ uClibc-git/libc/sysdeps/linux/sh/sys/procfs.h 2014-07-25 20:36:07.553338598 +0200
  74999. @@ -12,9 +12,8 @@
  75000. Lesser General Public License for more details.
  75001. You should have received a copy of the GNU Lesser General Public
  75002. - License along with the GNU C Library; if not, write to the Free
  75003. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75004. - 02111-1307 USA. */
  75005. + License along with the GNU C Library; if not, see
  75006. + <http://www.gnu.org/licenses/>. */
  75007. #ifndef _SYS_PROCFS_H
  75008. #define _SYS_PROCFS_H 1
  75009. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/sys/ucontext.h uClibc-git/libc/sysdeps/linux/sh/sys/ucontext.h
  75010. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  75011. +++ uClibc-git/libc/sysdeps/linux/sh/sys/ucontext.h 2014-07-25 20:36:07.553338598 +0200
  75012. @@ -12,9 +12,8 @@
  75013. Lesser General Public License for more details.
  75014. You should have received a copy of the GNU Lesser General Public
  75015. - License along with the GNU C Library; if not, write to the Free
  75016. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75017. - 02111-1307 USA. */
  75018. + License along with the GNU C Library; if not, see
  75019. + <http://www.gnu.org/licenses/>. */
  75020. /* Where is System V/SH ABI? */
  75021. @@ -32,10 +31,10 @@
  75022. typedef int greg_t;
  75023. /* Number of general registers. */
  75024. -#define NFPREG 16
  75025. +#define NGREG 16
  75026. /* Container for all general registers. */
  75027. -typedef greg_t gregset_t[NFPREG];
  75028. +typedef greg_t gregset_t[NGREG];
  75029. #ifdef __USE_GNU
  75030. /* Number of each register is the `gregset_t' array. */
  75031. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/sys/user.h uClibc-git/libc/sysdeps/linux/sh/sys/user.h
  75032. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/sys/user.h 2012-05-15 09:20:09.000000000 +0200
  75033. +++ uClibc-git/libc/sysdeps/linux/sh/sys/user.h 2014-07-25 20:36:07.553338598 +0200
  75034. @@ -12,9 +12,8 @@
  75035. Lesser General Public License for more details.
  75036. You should have received a copy of the GNU Lesser General Public
  75037. - License along with the GNU C Library; if not, write to the Free
  75038. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75039. - 02111-1307 USA. */
  75040. + License along with the GNU C Library; if not, see
  75041. + <http://www.gnu.org/licenses/>. */
  75042. #ifndef _SYS_USER_H
  75043. #define _SYS_USER_H 1
  75044. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/sysdep.h uClibc-git/libc/sysdeps/linux/sh/sysdep.h
  75045. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/sysdep.h 2012-05-15 09:20:09.000000000 +0200
  75046. +++ uClibc-git/libc/sysdeps/linux/sh/sysdep.h 2014-07-25 20:36:07.557338620 +0200
  75047. @@ -13,14 +13,12 @@
  75048. Lesser General Public License for more details.
  75049. You should have received a copy of the GNU Lesser General Public
  75050. - License along with the GNU C Library; if not, write to the Free
  75051. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75052. - 02111-1307 USA. */
  75053. + License along with the GNU C Library; if not, see
  75054. + <http://www.gnu.org/licenses/>. */
  75055. #include <common/sysdep.h>
  75056. #include <features.h>
  75057. -#include <libc-internal.h>
  75058. #ifdef __ASSEMBLER__
  75059. @@ -143,8 +141,6 @@
  75060. #define PSEUDO_END_ERRVAL(name) \
  75061. END (name)
  75062. -#define ret_ERRVAL ret
  75063. -
  75064. #ifndef __PIC__
  75065. # define SYSCALL_ERROR_HANDLER \
  75066. mov.l 0f,r1; \
  75067. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh/vfork.S uClibc-git/libc/sysdeps/linux/sh/vfork.S
  75068. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh/vfork.S 2012-05-15 09:20:09.000000000 +0200
  75069. +++ uClibc-git/libc/sysdeps/linux/sh/vfork.S 2014-07-25 20:36:07.557338620 +0200
  75070. @@ -12,19 +12,16 @@
  75071. details.
  75072. You should have received a copy of the GNU Library General Public License
  75073. - along with this program; if not, write to the Free Software Foundation, Inc.,
  75074. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  75075. + along with this program; if not, see <http://www.gnu.org/licenses/>.
  75076. Derived in part from the Linux-8086 C library, the GNU C Library, and several
  75077. other sundry sources. Files within this library are copyright by their
  75078. respective copyright holders.
  75079. */
  75080. -#include <features.h>
  75081. #include <sys/syscall.h>
  75082. #define _ERRNO_H
  75083. #include <bits/errno.h>
  75084. -#include <bits/sysnum.h>
  75085. /* Clone the calling process, but without copying the whole address space.
  75086. The calling process is suspended until the new process exits or is
  75087. @@ -109,6 +106,6 @@
  75088. .size __vfork, .-__vfork
  75089. weak_alias(__vfork,vfork)
  75090. -libc_hidden_weak(vfork)
  75091. +libc_hidden_def(vfork)
  75092. #include "syscall_error.S"
  75093. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/fcntl.h uClibc-git/libc/sysdeps/linux/sh64/bits/fcntl.h
  75094. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  75095. +++ uClibc-git/libc/sysdeps/linux/sh64/bits/fcntl.h 2014-07-25 20:36:07.589338787 +0200
  75096. @@ -13,9 +13,8 @@
  75097. Lesser General Public License for more details.
  75098. You should have received a copy of the GNU Lesser General Public
  75099. - License along with the GNU C Library; if not, write to the Free
  75100. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75101. - 02111-1307 USA. */
  75102. + License along with the GNU C Library; if not, see
  75103. + <http://www.gnu.org/licenses/>. */
  75104. #ifndef _FCNTL_H
  75105. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  75106. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/sh64/bits/kernel_types.h
  75107. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
  75108. +++ uClibc-git/libc/sysdeps/linux/sh64/bits/kernel_types.h 2014-07-25 20:36:07.589338787 +0200
  75109. @@ -43,6 +43,8 @@
  75110. typedef unsigned short __kernel_old_uid_t;
  75111. typedef unsigned short __kernel_old_gid_t;
  75112. typedef __kernel_dev_t __kernel_old_dev_t;
  75113. +typedef long __kernel_long_t;
  75114. +typedef unsigned long __kernel_ulong_t;
  75115. typedef long long __kernel_loff_t;
  75116. typedef struct {
  75117. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/setjmp.h uClibc-git/libc/sysdeps/linux/sh64/bits/setjmp.h
  75118. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  75119. +++ uClibc-git/libc/sysdeps/linux/sh64/bits/setjmp.h 2014-07-25 20:36:07.589338787 +0200
  75120. @@ -12,9 +12,8 @@
  75121. Lesser General Public License for more details.
  75122. You should have received a copy of the GNU Lesser General Public
  75123. - License along with the GNU C Library; if not, write to the Free
  75124. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75125. - 02111-1307 USA. */
  75126. + License along with the GNU C Library; if not, see
  75127. + <http://www.gnu.org/licenses/>. */
  75128. /* Define the machine-dependent type `jmp_buf'. SH-5 version. */
  75129. #ifndef _BITS_SETJMP_H
  75130. @@ -33,8 +32,6 @@
  75131. #define __SETJMP_TRG(x) (__SETJMP_NUM_INT+__SETJMP_NUM_DBL+(x))
  75132. #define __SETJMP_LR (__SETJMP_NUM_INT+__SETJMP_NUM_DBL+__SETJMP_NUM_TRG)
  75133. -
  75134. -#ifndef _ASM
  75135. typedef struct
  75136. {
  75137. /* Callee-saved registers. */
  75138. @@ -45,6 +42,5 @@
  75139. unsigned long long __trgs[__SETJMP_NUM_TRG]; /* traget registers */
  75140. unsigned long long __lr; /* linkage register */
  75141. } __jmp_buf[1];
  75142. -#endif
  75143. #endif /* bits/setjmp.h */
  75144. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/shm.h uClibc-git/libc/sysdeps/linux/sh64/bits/shm.h
  75145. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
  75146. +++ uClibc-git/libc/sysdeps/linux/sh64/bits/shm.h 2014-07-25 20:36:07.589338787 +0200
  75147. @@ -12,9 +12,8 @@
  75148. Lesser General Public License for more details.
  75149. You should have received a copy of the GNU Lesser General Public
  75150. - License along with the GNU C Library; if not, write to the Free
  75151. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75152. - 02111-1307 USA. */
  75153. + License along with the GNU C Library; if not, see
  75154. + <http://www.gnu.org/licenses/>. */
  75155. #ifndef _SYS_SHM_H
  75156. # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
  75157. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/sh64/bits/stackinfo.h
  75158. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  75159. +++ uClibc-git/libc/sysdeps/linux/sh64/bits/stackinfo.h 2014-07-25 20:36:07.589338787 +0200
  75160. @@ -12,9 +12,8 @@
  75161. Lesser General Public License for more details.
  75162. You should have received a copy of the GNU Lesser General Public
  75163. - License along with the GNU C Library; if not, write to the Free
  75164. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75165. - 02111-1307 USA. */
  75166. + License along with the GNU C Library; if not, see
  75167. + <http://www.gnu.org/licenses/>. */
  75168. /* This file contains a bit of information about the stack allocation
  75169. of the processor. */
  75170. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h
  75171. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  75172. +++ uClibc-git/libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h 2014-07-25 20:36:07.589338787 +0200
  75173. @@ -11,8 +11,8 @@
  75174. /* can your target use syscall6() for mmap ? */
  75175. #undef __UCLIBC_MMAP_HAS_6_ARGS__
  75176. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  75177. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  75178. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  75179. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  75180. /* does your target have a broken create_module() ? */
  75181. #undef __UCLIBC_BROKEN_CREATE_MODULE__
  75182. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/crt1.S uClibc-git/libc/sysdeps/linux/sh64/crt1.S
  75183. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/crt1.S 2012-05-15 09:20:09.000000000 +0200
  75184. +++ uClibc-git/libc/sysdeps/linux/sh64/crt1.S 2014-07-25 20:36:07.589338787 +0200
  75185. @@ -16,8 +16,7 @@
  75186. You should have received a copy of the GNU Library General Public
  75187. License along with the GNU C Library; see the file COPYING.LIB. If not,
  75188. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  75189. - Boston, MA 02111-1307, USA. */
  75190. + see <http://www.gnu.org/licenses/>. */
  75191. /* This is the canonical entry point, usually the first thing in the text
  75192. segment.
  75193. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/__longjmp.S uClibc-git/libc/sysdeps/linux/sh64/__longjmp.S
  75194. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
  75195. +++ uClibc-git/libc/sysdeps/linux/sh64/__longjmp.S 2014-07-25 20:36:07.573338703 +0200
  75196. @@ -14,8 +14,7 @@
  75197. You should have received a copy of the GNU Library General Public
  75198. License along with the GNU C Library; see the file COPYING.LIB. If not,
  75199. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  75200. - Boston, MA 02111-1307, USA. */
  75201. + see <http://www.gnu.org/licenses/>. */
  75202. #define _SETJMP_H
  75203. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/Makefile.arch uClibc-git/libc/sysdeps/linux/sh64/Makefile.arch
  75204. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
  75205. +++ uClibc-git/libc/sysdeps/linux/sh64/Makefile.arch 2014-07-25 20:36:07.573338703 +0200
  75206. @@ -5,6 +5,6 @@
  75207. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  75208. #
  75209. -CSRC := __init_brk.c brk.c sbrk.c syscall.c
  75210. +CSRC-y := __init_brk.c brk.c sbrk.c syscall.c
  75211. -SSRC := setjmp.S __longjmp.S
  75212. +SSRC-y := setjmp.S __longjmp.S
  75213. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/setjmp.S uClibc-git/libc/sysdeps/linux/sh64/setjmp.S
  75214. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/setjmp.S 2012-05-15 09:20:09.000000000 +0200
  75215. +++ uClibc-git/libc/sysdeps/linux/sh64/setjmp.S 2014-07-25 20:36:07.589338787 +0200
  75216. @@ -14,8 +14,7 @@
  75217. You should have received a copy of the GNU Library General Public
  75218. License along with the GNU C Library; see the file COPYING.LIB. If not,
  75219. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  75220. - Boston, MA 02111-1307, USA. */
  75221. + see <http://www.gnu.org/licenses/>. */
  75222. #define _SETJMP_H
  75223. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/sys/procfs.h uClibc-git/libc/sysdeps/linux/sh64/sys/procfs.h
  75224. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  75225. +++ uClibc-git/libc/sysdeps/linux/sh64/sys/procfs.h 2014-07-25 20:36:07.589338787 +0200
  75226. @@ -12,9 +12,8 @@
  75227. Lesser General Public License for more details.
  75228. You should have received a copy of the GNU Lesser General Public
  75229. - License along with the GNU C Library; if not, write to the Free
  75230. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75231. - 02111-1307 USA. */
  75232. + License along with the GNU C Library; if not, see
  75233. + <http://www.gnu.org/licenses/>. */
  75234. #ifndef _SYS_PROCFS_H
  75235. #define _SYS_PROCFS_H 1
  75236. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sh64/sys/ucontext.h uClibc-git/libc/sysdeps/linux/sh64/sys/ucontext.h
  75237. --- uClibc-0.9.33.2/libc/sysdeps/linux/sh64/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  75238. +++ uClibc-git/libc/sysdeps/linux/sh64/sys/ucontext.h 2014-07-25 20:36:07.589338787 +0200
  75239. @@ -13,8 +13,7 @@
  75240. You should have received a copy of the GNU Library General Public
  75241. License along with the GNU C Library; see the file COPYING.LIB. If not,
  75242. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  75243. - Boston, MA 02111-1307, USA. */
  75244. + see <http://www.gnu.org/licenses/>. */
  75245. /* Where is System V/SH ABI? */
  75246. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/atomic.h uClibc-git/libc/sysdeps/linux/sparc/bits/atomic.h
  75247. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
  75248. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/atomic.h 2014-07-25 20:36:07.625338976 +0200
  75249. @@ -14,9 +14,8 @@
  75250. Lesser General Public License for more details.
  75251. You should have received a copy of the GNU Lesser General Public
  75252. - License along with the GNU C Library; if not, write to the Free
  75253. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75254. - 02111-1307 USA. */
  75255. + License along with the GNU C Library; if not, see
  75256. + <http://www.gnu.org/licenses/>. */
  75257. #ifndef _BITS_ATOMIC_H
  75258. #define _BITS_ATOMIC_H 1
  75259. @@ -290,11 +289,11 @@
  75260. __typeof (*(mem)) __acev_wval = (newval); \
  75261. do \
  75262. __acev_wret = *__acev_wmemp; \
  75263. - while (__builtin_expect \
  75264. + while (unlikely \
  75265. (__v9_compare_and_exchange_val_32_acq (__acev_wmemp,\
  75266. __acev_wval, \
  75267. __acev_wret) \
  75268. - != __acev_wret, 0)); \
  75269. + != __acev_wret)); \
  75270. } \
  75271. else \
  75272. __acev_wret = __v7_exchange_acq (mem, newval); \
  75273. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/eventfd.h uClibc-git/libc/sysdeps/linux/sparc/bits/eventfd.h
  75274. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/eventfd.h 1970-01-01 01:00:00.000000000 +0100
  75275. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/eventfd.h 2014-07-25 20:36:07.625338976 +0200
  75276. @@ -0,0 +1,31 @@
  75277. +/* Copyright (C) 2007-2013 Free Software Foundation, Inc.
  75278. + This file is part of the GNU C Library.
  75279. +
  75280. + The GNU C Library is free software; you can redistribute it and/or
  75281. + modify it under the terms of the GNU Lesser General Public
  75282. + License as published by the Free Software Foundation; either
  75283. + version 2.1 of the License, or (at your option) any later version.
  75284. +
  75285. + The GNU C Library is distributed in the hope that it will be useful,
  75286. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  75287. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  75288. + Lesser General Public License for more details.
  75289. +
  75290. + You should have received a copy of the GNU Lesser General Public
  75291. + License along with the GNU C Library; if not, see
  75292. + <http://www.gnu.org/licenses/>. */
  75293. +
  75294. +#ifndef _SYS_EVENTFD_H
  75295. +# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
  75296. +#endif
  75297. +
  75298. +/* Flags for eventfd. */
  75299. +enum
  75300. + {
  75301. + EFD_SEMAPHORE = 1,
  75302. +#define EFD_SEMAPHORE EFD_SEMAPHORE
  75303. + EFD_CLOEXEC = 0x400000,
  75304. +#define EFD_CLOEXEC EFD_CLOEXEC
  75305. + EFD_NONBLOCK = 0x004000
  75306. +#define EFD_NONBLOCK EFD_NONBLOCK
  75307. + };
  75308. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/fcntl.h uClibc-git/libc/sysdeps/linux/sparc/bits/fcntl.h
  75309. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  75310. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/fcntl.h 2014-07-25 20:36:07.625338976 +0200
  75311. @@ -14,9 +14,8 @@
  75312. Lesser General Public License for more details.
  75313. You should have received a copy of the GNU Lesser General Public
  75314. - License along with the GNU C Library; if not, write to the Free
  75315. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75316. - 02111-1307 USA. */
  75317. + License along with the GNU C Library; if not, see
  75318. + <http://www.gnu.org/licenses/>. */
  75319. #ifndef _FCNTL_H
  75320. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  75321. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/fenv.h uClibc-git/libc/sysdeps/linux/sparc/bits/fenv.h
  75322. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
  75323. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/fenv.h 2014-07-25 20:36:07.625338976 +0200
  75324. @@ -12,9 +12,8 @@
  75325. Lesser General Public License for more details.
  75326. You should have received a copy of the GNU Lesser General Public
  75327. - License along with the GNU C Library; if not, write to the Free
  75328. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75329. - 02111-1307 USA. */
  75330. + License along with the GNU C Library; if not, see
  75331. + <http://www.gnu.org/licenses/>. */
  75332. #ifndef _FENV_H
  75333. # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
  75334. @@ -68,11 +67,11 @@
  75335. typedef unsigned long int fenv_t;
  75336. /* If the default argument is used we use this value. */
  75337. -#define FE_DFL_ENV ((__const fenv_t *) -1)
  75338. +#define FE_DFL_ENV ((const fenv_t *) -1)
  75339. #ifdef __USE_GNU
  75340. /* Floating-point environment where none of the exception is masked. */
  75341. -# define FE_NOMASK_ENV ((__const fenv_t *) -2)
  75342. +# define FE_NOMASK_ENV ((const fenv_t *) -2)
  75343. #endif
  75344. /* For internal use only: access the fp state register. */
  75345. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/huge_vall.h uClibc-git/libc/sysdeps/linux/sparc/bits/huge_vall.h
  75346. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/huge_vall.h 1970-01-01 01:00:00.000000000 +0100
  75347. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/huge_vall.h 2014-07-25 20:36:07.625338976 +0200
  75348. @@ -0,0 +1,48 @@
  75349. +/* `HUGE_VALL' constant for IEEE 754 machines (where it is infinity).
  75350. + Used by <stdlib.h> and <math.h> functions for overflow.
  75351. + Copyright (C) 1992, 1995, 1996, 1997, 1999, 2000, 2004
  75352. + Free Software Foundation, Inc.
  75353. + This file is part of the GNU C Library.
  75354. +
  75355. + The GNU C Library is free software; you can redistribute it and/or
  75356. + modify it under the terms of the GNU Lesser General Public
  75357. + License as published by the Free Software Foundation; either
  75358. + version 2.1 of the License, or (at your option) any later version.
  75359. +
  75360. + The GNU C Library is distributed in the hope that it will be useful,
  75361. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  75362. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  75363. + Lesser General Public License for more details.
  75364. +
  75365. + You should have received a copy of the GNU Lesser General Public
  75366. + License along with the GNU C Library; if not, see
  75367. + <http://www.gnu.org/licenses/>. */
  75368. +
  75369. +#ifndef _MATH_H
  75370. +# error "Never use <bits/huge_vall.h> directly; include <math.h> instead."
  75371. +#endif
  75372. +
  75373. +#if __GNUC_PREREQ(3,3)
  75374. +# define HUGE_VALL (__builtin_huge_vall())
  75375. +#else
  75376. +# include <bits/wordsize.h>
  75377. +# if __WORDSIZE == 32
  75378. +# define HUGE_VALL ((long double) HUGE_VAL)
  75379. +# elif __GNUC_PREREQ(2,96)
  75380. +# define HUGE_VALL (__extension__ 0x1.0p32767L)
  75381. +# elif defined __GNUC__
  75382. +
  75383. +# define HUGE_VALL \
  75384. + (__extension__ \
  75385. + ((union { struct { unsigned long __h, __l; } __i; long double __d; }) \
  75386. + { __i: { __h: 0x7fff000000000000UL, __l: 0 } }).__d)
  75387. +
  75388. +# else /* not GCC */
  75389. +
  75390. +typedef union { unsigned char __c[16]; long double __d; } __huge_vall_t;
  75391. +# define __HUGE_VALL_bytes { 0x7f, 0xff, 0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
  75392. +static __huge_vall_t __huge_vall = { __HUGE_VALL_bytes };
  75393. +# define HUGE_VALL (__huge_vall.__d)
  75394. +
  75395. +# endif /* GCC. */
  75396. +#endif /* GCC 3.3. */
  75397. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/ioctls.h uClibc-git/libc/sysdeps/linux/sparc/bits/ioctls.h
  75398. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/ioctls.h 2012-05-15 09:20:09.000000000 +0200
  75399. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/ioctls.h 2014-07-25 20:36:07.625338976 +0200
  75400. @@ -12,9 +12,8 @@
  75401. Lesser General Public License for more details.
  75402. You should have received a copy of the GNU Lesser General Public
  75403. - License along with the GNU C Library; if not, write to the Free
  75404. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75405. - 02111-1307 USA. */
  75406. + License along with the GNU C Library; if not, see
  75407. + <http://www.gnu.org/licenses/>. */
  75408. #ifndef _SYS_IOCTL_H
  75409. # error "Never use <bits/ioctls.h> directly; include <sys/ioctl.h> instead."
  75410. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/ipc.h uClibc-git/libc/sysdeps/linux/sparc/bits/ipc.h
  75411. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/ipc.h 2012-05-15 09:20:09.000000000 +0200
  75412. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/ipc.h 2014-07-25 20:36:07.625338976 +0200
  75413. @@ -12,9 +12,8 @@
  75414. Lesser General Public License for more details.
  75415. You should have received a copy of the GNU Lesser General Public
  75416. - License along with the GNU C Library; if not, write to the Free
  75417. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75418. - 02111-1307 USA. */
  75419. + License along with the GNU C Library; if not, see
  75420. + <http://www.gnu.org/licenses/>. */
  75421. #ifndef _SYS_IPC_H
  75422. # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
  75423. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/sparc/bits/kernel_types.h
  75424. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
  75425. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/kernel_types.h 2014-07-25 20:36:07.625338976 +0200
  75426. @@ -32,6 +32,8 @@
  75427. typedef __kernel_uid_t __kernel_old_uid_t;
  75428. typedef __kernel_gid_t __kernel_old_gid_t;
  75429. typedef __kernel_dev_t __kernel_old_dev_t;
  75430. +typedef long __kernel_long_t;
  75431. +typedef unsigned long __kernel_ulong_t;
  75432. typedef __kernel_uid_t __kernel_uid32_t;
  75433. typedef __kernel_gid_t __kernel_gid32_t;
  75434. typedef int __kernel_suseconds_t;
  75435. @@ -62,6 +64,8 @@
  75436. typedef unsigned short __kernel_old_uid_t;
  75437. typedef unsigned short __kernel_old_gid_t;
  75438. typedef __kernel_dev_t __kernel_old_dev_t;
  75439. +typedef long __kernel_long_t;
  75440. +typedef unsigned long __kernel_ulong_t;
  75441. typedef long long __kernel_loff_t;
  75442. #endif
  75443. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/local_lim.h uClibc-git/libc/sysdeps/linux/sparc/bits/local_lim.h
  75444. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/local_lim.h 1970-01-01 01:00:00.000000000 +0100
  75445. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/local_lim.h 2014-07-25 20:36:07.625338976 +0200
  75446. @@ -0,0 +1,99 @@
  75447. +/* Minimum guaranteed maximum values for system limits. Linux/SPARC version.
  75448. + Copyright (C) 1993-1998,2000,2002-2004,2008 Free Software Foundation, Inc.
  75449. + This file is part of the GNU C Library.
  75450. +
  75451. + The GNU C Library is free software; you can redistribute it and/or
  75452. + modify it under the terms of the GNU Library General Public License as
  75453. + published by the Free Software Foundation; either version 2 of the
  75454. + License, or (at your option) any later version.
  75455. +
  75456. + The GNU C Library is distributed in the hope that it will be useful,
  75457. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  75458. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  75459. + Library General Public License for more details.
  75460. +
  75461. + You should have received a copy of the GNU Library General Public
  75462. + License along with the GNU C Library; see the file COPYING.LIB. If not,
  75463. + see <http://www.gnu.org/licenses/>. */
  75464. +
  75465. +/* The kernel header pollutes the namespace with the NR_OPEN symbol
  75466. + and defines LINK_MAX although filesystems have different maxima. A
  75467. + similar thing is true for OPEN_MAX: the limit can be changed at
  75468. + runtime and therefore the macro must not be defined. Remove this
  75469. + after including the header if necessary. */
  75470. +#ifndef NR_OPEN
  75471. +# define __undef_NR_OPEN
  75472. +#endif
  75473. +#ifndef LINK_MAX
  75474. +# define __undef_LINK_MAX
  75475. +#endif
  75476. +#ifndef OPEN_MAX
  75477. +# define __undef_OPEN_MAX
  75478. +#endif
  75479. +#ifndef ARG_MAX
  75480. +# define __undef_ARG_MAX
  75481. +#endif
  75482. +
  75483. +/* The kernel sources contain a file with all the needed information. */
  75484. +#include <linux/limits.h>
  75485. +
  75486. +/* Have to remove NR_OPEN? */
  75487. +#ifdef __undef_NR_OPEN
  75488. +# undef NR_OPEN
  75489. +# undef __undef_NR_OPEN
  75490. +#endif
  75491. +/* Have to remove LINK_MAX? */
  75492. +#ifdef __undef_LINK_MAX
  75493. +# undef LINK_MAX
  75494. +# undef __undef_LINK_MAX
  75495. +#endif
  75496. +/* Have to remove OPEN_MAX? */
  75497. +#ifdef __undef_OPEN_MAX
  75498. +# undef OPEN_MAX
  75499. +# undef __undef_OPEN_MAX
  75500. +#endif
  75501. +/* Have to remove ARG_MAX? */
  75502. +#ifdef __undef_ARG_MAX
  75503. +# undef ARG_MAX
  75504. +# undef __undef_ARG_MAX
  75505. +#endif
  75506. +
  75507. +/* The number of data keys per process. */
  75508. +#define _POSIX_THREAD_KEYS_MAX 128
  75509. +/* This is the value this implementation supports. */
  75510. +#define PTHREAD_KEYS_MAX 1024
  75511. +
  75512. +/* Controlling the iterations of destructors for thread-specific data. */
  75513. +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
  75514. +/* Number of iterations this implementation does. */
  75515. +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
  75516. +
  75517. +/* The number of threads per process. */
  75518. +#define _POSIX_THREAD_THREADS_MAX 64
  75519. +/* We have no predefined limit on the number of threads. */
  75520. +#undef PTHREAD_THREADS_MAX
  75521. +
  75522. +/* Maximum amount by which a process can descrease its asynchronous I/O
  75523. + priority level. */
  75524. +#define AIO_PRIO_DELTA_MAX 20
  75525. +
  75526. +/* Minimum size for a thread. We are free to choose a reasonable value. */
  75527. +#define PTHREAD_STACK_MIN 24576
  75528. +
  75529. +/* Maximum number of timer expiration overruns. */
  75530. +#define DELAYTIMER_MAX 2147483647
  75531. +
  75532. +/* Maximum tty name length. */
  75533. +#define TTY_NAME_MAX 32
  75534. +
  75535. +/* Maximum login name length. This is arbitrary. */
  75536. +#define LOGIN_NAME_MAX 256
  75537. +
  75538. +/* Maximum host name length. */
  75539. +#define HOST_NAME_MAX 64
  75540. +
  75541. +/* Maximum message queue priority level. */
  75542. +#define MQ_PRIO_MAX 32768
  75543. +
  75544. +/* Maximum value the semaphore can have. */
  75545. +#define SEM_VALUE_MAX (2147483647)
  75546. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/mathdef.h uClibc-git/libc/sysdeps/linux/sparc/bits/mathdef.h
  75547. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
  75548. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/mathdef.h 2014-07-25 20:36:07.625338976 +0200
  75549. @@ -13,9 +13,8 @@
  75550. Lesser General Public License for more details.
  75551. You should have received a copy of the GNU Lesser General Public
  75552. - License along with the GNU C Library; if not, write to the Free
  75553. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75554. - 02111-1307 USA. */
  75555. + License along with the GNU C Library; if not, see
  75556. + <http://www.gnu.org/licenses/>. */
  75557. #if !defined _MATH_H && !defined _COMPLEX_H
  75558. # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
  75559. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/mathinline.h uClibc-git/libc/sysdeps/linux/sparc/bits/mathinline.h
  75560. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/mathinline.h 2012-05-15 09:20:09.000000000 +0200
  75561. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/mathinline.h 2014-07-25 20:36:07.633339018 +0200
  75562. @@ -15,9 +15,8 @@
  75563. Lesser General Public License for more details.
  75564. You should have received a copy of the GNU Lesser General Public
  75565. - License along with the GNU C Library; if not, write to the Free
  75566. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75567. - 02111-1307 USA. */
  75568. + License along with the GNU C Library; if not, see
  75569. + <http://www.gnu.org/licenses/>. */
  75570. #ifndef _MATH_H
  75571. # error "Never use <bits/mathinline.h> directly; include <math.h> instead."
  75572. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/mman.h uClibc-git/libc/sysdeps/linux/sparc/bits/mman.h
  75573. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/mman.h 2012-05-15 09:20:09.000000000 +0200
  75574. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/mman.h 2014-07-25 20:36:07.633339018 +0200
  75575. @@ -13,9 +13,8 @@
  75576. Lesser General Public License for more details.
  75577. You should have received a copy of the GNU Lesser General Public
  75578. - License along with the GNU C Library; if not, write to the Free
  75579. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75580. - 02111-1307 USA. */
  75581. + License along with the GNU C Library; if not, see
  75582. + <http://www.gnu.org/licenses/>. */
  75583. #ifndef _SYS_MMAN_H
  75584. # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
  75585. @@ -65,7 +64,7 @@
  75586. # define _MAP_NEW 0x80000000 /* Binary compatibility with SunOS. */
  75587. # define MAP_POPULATE 0x8000 /* Populate (prefault) pagetables. */
  75588. # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
  75589. -# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could
  75590. +# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could
  75591. be uninitialized. */
  75592. #endif
  75593. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/msq.h uClibc-git/libc/sysdeps/linux/sparc/bits/msq.h
  75594. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/msq.h 2012-05-15 09:20:09.000000000 +0200
  75595. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/msq.h 2014-07-25 20:36:07.633339018 +0200
  75596. @@ -12,9 +12,8 @@
  75597. Lesser General Public License for more details.
  75598. You should have received a copy of the GNU Lesser General Public
  75599. - License along with the GNU C Library; if not, write to the Free
  75600. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75601. - 02111-1307 USA. */
  75602. + License along with the GNU C Library; if not, see
  75603. + <http://www.gnu.org/licenses/>. */
  75604. #ifndef _SYS_MSG_H
  75605. # error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
  75606. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/poll.h uClibc-git/libc/sysdeps/linux/sparc/bits/poll.h
  75607. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/poll.h 2012-05-15 09:20:09.000000000 +0200
  75608. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/poll.h 2014-07-25 20:36:07.633339018 +0200
  75609. @@ -12,9 +12,8 @@
  75610. Lesser General Public License for more details.
  75611. You should have received a copy of the GNU Lesser General Public
  75612. - License along with the GNU C Library; if not, write to the Free
  75613. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75614. - 02111-1307 USA. */
  75615. + License along with the GNU C Library; if not, see
  75616. + <http://www.gnu.org/licenses/>. */
  75617. #ifndef _SYS_POLL_H
  75618. # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
  75619. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/resource.h uClibc-git/libc/sysdeps/linux/sparc/bits/resource.h
  75620. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/resource.h 2012-05-15 09:20:09.000000000 +0200
  75621. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/resource.h 2014-07-25 20:36:07.637339038 +0200
  75622. @@ -14,9 +14,8 @@
  75623. Lesser General Public License for more details.
  75624. You should have received a copy of the GNU Lesser General Public
  75625. - License along with the GNU C Library; if not, write to the Free
  75626. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75627. - 02111-1307 USA. */
  75628. + License along with the GNU C Library; if not, see
  75629. + <http://www.gnu.org/licenses/>. */
  75630. #ifndef _SYS_RESOURCE_H
  75631. # error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
  75632. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/sem.h uClibc-git/libc/sysdeps/linux/sparc/bits/sem.h
  75633. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/sem.h 2012-05-15 09:20:09.000000000 +0200
  75634. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/sem.h 2014-07-25 20:36:07.637339038 +0200
  75635. @@ -12,9 +12,8 @@
  75636. Lesser General Public License for more details.
  75637. You should have received a copy of the GNU Lesser General Public
  75638. - License along with the GNU C Library; if not, write to the Free
  75639. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75640. - 02111-1307 USA. */
  75641. + License along with the GNU C Library; if not, see
  75642. + <http://www.gnu.org/licenses/>. */
  75643. #ifndef _SYS_SEM_H
  75644. # error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
  75645. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/setjmp.h uClibc-git/libc/sysdeps/linux/sparc/bits/setjmp.h
  75646. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  75647. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/setjmp.h 2014-07-25 20:36:07.637339038 +0200
  75648. @@ -1,4 +1,5 @@
  75649. -/* Copyright (C) 1997,1999,2000,2003 Free Software Foundation, Inc.
  75650. +/* Copyright (C) 1997, 1999, 2000, 2003, 2005, 2006
  75651. + Free Software Foundation, Inc.
  75652. This file is part of the GNU C Library.
  75653. The GNU C Library is free software; you can redistribute it and/or
  75654. @@ -12,9 +13,8 @@
  75655. Lesser General Public License for more details.
  75656. You should have received a copy of the GNU Lesser General Public
  75657. - License along with the GNU C Library; if not, write to the Free
  75658. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75659. - 02111-1307 USA. */
  75660. + License along with the GNU C Library; if not, see
  75661. + <http://www.gnu.org/licenses/>. */
  75662. #ifndef _BITS_SETJMP_H
  75663. #define _BITS_SETJMP_H 1
  75664. @@ -27,7 +27,6 @@
  75665. #if 0 /*__WORDSIZE == 64*/
  75666. -#ifndef _ASM
  75667. typedef struct __sparc64_jmp_buf
  75668. {
  75669. struct __sparc64_jmp_buf *uc_link;
  75670. @@ -55,30 +54,8 @@
  75671. } mc_fpregs;
  75672. } uc_mcontext;
  75673. } __jmp_buf[1];
  75674. -#endif
  75675. -
  75676. -/* Test if longjmp to JMPBUF would unwind the frame
  75677. - containing a local variable at ADDRESS. */
  75678. -#define _JMPBUF_UNWINDS(jmpbuf, address) \
  75679. - ((unsigned long int) (address) < (jmpbuf)->uc_mcontext.mc_fp)
  75680. -
  75681. #else
  75682. -
  75683. -#if defined __USE_MISC || defined _ASM
  75684. -# define JB_SP 0
  75685. -# define JB_FP 1
  75686. -# define JB_PC 2
  75687. -#endif
  75688. -
  75689. -#ifndef _ASM
  75690. typedef int __jmp_buf[3];
  75691. #endif
  75692. -/* Test if longjmp to JMPBUF would unwind the frame
  75693. - containing a local variable at ADDRESS. */
  75694. -#define _JMPBUF_UNWINDS(jmpbuf, address) \
  75695. - ((int) (address) < (jmpbuf)[JB_SP])
  75696. -
  75697. -#endif
  75698. -
  75699. #endif /* bits/setjmp.h */
  75700. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/shm.h uClibc-git/libc/sysdeps/linux/sparc/bits/shm.h
  75701. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
  75702. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/shm.h 2014-07-25 20:36:07.637339038 +0200
  75703. @@ -13,9 +13,8 @@
  75704. Lesser General Public License for more details.
  75705. You should have received a copy of the GNU Lesser General Public
  75706. - License along with the GNU C Library; if not, write to the Free
  75707. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75708. - 02111-1307 USA. */
  75709. + License along with the GNU C Library; if not, see
  75710. + <http://www.gnu.org/licenses/>. */
  75711. #ifndef _SYS_SHM_H
  75712. # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
  75713. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/sigaction.h uClibc-git/libc/sysdeps/linux/sparc/bits/sigaction.h
  75714. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/sigaction.h 2012-05-15 09:20:09.000000000 +0200
  75715. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/sigaction.h 2014-07-25 20:36:07.637339038 +0200
  75716. @@ -13,9 +13,8 @@
  75717. Lesser General Public License for more details.
  75718. You should have received a copy of the GNU Lesser General Public
  75719. - License along with the GNU C Library; if not, write to the Free
  75720. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75721. - 02111-1307 USA. */
  75722. + License along with the GNU C Library; if not, see
  75723. + <http://www.gnu.org/licenses/>. */
  75724. #ifndef _SIGNAL_H
  75725. # error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
  75726. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/sigcontext.h uClibc-git/libc/sysdeps/linux/sparc/bits/sigcontext.h
  75727. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/sigcontext.h 2012-05-15 09:20:09.000000000 +0200
  75728. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/sigcontext.h 2014-07-25 20:36:07.637339038 +0200
  75729. @@ -12,9 +12,8 @@
  75730. Lesser General Public License for more details.
  75731. You should have received a copy of the GNU Lesser General Public
  75732. - License along with the GNU C Library; if not, write to the Free
  75733. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75734. - 02111-1307 USA. */
  75735. + License along with the GNU C Library; if not, see
  75736. + <http://www.gnu.org/licenses/>. */
  75737. #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
  75738. # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
  75739. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/sigcontextinfo.h uClibc-git/libc/sysdeps/linux/sparc/bits/sigcontextinfo.h
  75740. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
  75741. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/sigcontextinfo.h 2014-07-25 20:36:07.637339038 +0200
  75742. @@ -13,9 +13,8 @@
  75743. Lesser General Public License for more details.
  75744. You should have received a copy of the GNU Lesser General Public
  75745. - License along with the GNU C Library; if not, write to the Free
  75746. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75747. - 02111-1307 USA. */
  75748. + License along with the GNU C Library; if not, see
  75749. + <http://www.gnu.org/licenses/>. */
  75750. #define SIGCONTEXT struct sigcontext *
  75751. #define SIGCONTEXT_EXTRA_ARGS
  75752. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/siginfo.h uClibc-git/libc/sysdeps/linux/sparc/bits/siginfo.h
  75753. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/siginfo.h 2012-05-15 09:20:09.000000000 +0200
  75754. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/siginfo.h 2014-07-25 20:36:07.637339038 +0200
  75755. @@ -13,9 +13,8 @@
  75756. Lesser General Public License for more details.
  75757. You should have received a copy of the GNU Lesser General Public
  75758. - License along with the GNU C Library; if not, write to the Free
  75759. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75760. - 02111-1307 USA. */
  75761. + License along with the GNU C Library; if not, see
  75762. + <http://www.gnu.org/licenses/>. */
  75763. #if !defined _SIGNAL_H && !defined __need_siginfo_t \
  75764. && !defined __need_sigevent_t
  75765. @@ -289,6 +288,10 @@
  75766. {
  75767. int _pad[__SIGEV_PAD_SIZE];
  75768. + /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the
  75769. + thread to receive the signal. */
  75770. + __pid_t _tid;
  75771. +
  75772. struct
  75773. {
  75774. void (*_function) (sigval_t); /* Function to start. */
  75775. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/signum.h uClibc-git/libc/sysdeps/linux/sparc/bits/signum.h
  75776. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/signum.h 2012-05-15 09:20:09.000000000 +0200
  75777. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/signum.h 2014-07-25 20:36:07.637339038 +0200
  75778. @@ -13,9 +13,8 @@
  75779. Lesser General Public License for more details.
  75780. You should have received a copy of the GNU Lesser General Public
  75781. - License along with the GNU C Library; if not, write to the Free
  75782. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75783. - 02111-1307 USA. */
  75784. + License along with the GNU C Library; if not, see
  75785. + <http://www.gnu.org/licenses/>. */
  75786. #ifdef _SIGNAL_H
  75787. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/sigstack.h uClibc-git/libc/sysdeps/linux/sparc/bits/sigstack.h
  75788. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/sigstack.h 2012-05-15 09:20:09.000000000 +0200
  75789. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/sigstack.h 2014-07-25 20:36:07.637339038 +0200
  75790. @@ -13,9 +13,8 @@
  75791. Lesser General Public License for more details.
  75792. You should have received a copy of the GNU Lesser General Public
  75793. - License along with the GNU C Library; if not, write to the Free
  75794. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75795. - 02111-1307 USA. */
  75796. + License along with the GNU C Library; if not, see
  75797. + <http://www.gnu.org/licenses/>. */
  75798. #ifndef _SIGNAL_H
  75799. # error "Never include this file directly. Use <signal.h> instead"
  75800. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/socket.h uClibc-git/libc/sysdeps/linux/sparc/bits/socket.h
  75801. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/socket.h 2012-05-15 09:20:09.000000000 +0200
  75802. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/socket.h 1970-01-01 01:00:00.000000000 +0100
  75803. @@ -1,376 +0,0 @@
  75804. -/* System-specific socket constants and types. Linux version.
  75805. - Copyright (C) 1991,1992,1994-2001,2004,2006 Free Software Foundation, Inc.
  75806. - This file is part of the GNU C Library.
  75807. -
  75808. - The GNU C Library is free software; you can redistribute it and/or
  75809. - modify it under the terms of the GNU Lesser General Public
  75810. - License as published by the Free Software Foundation; either
  75811. - version 2.1 of the License, or (at your option) any later version.
  75812. -
  75813. - The GNU C Library is distributed in the hope that it will be useful,
  75814. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  75815. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  75816. - Lesser General Public License for more details.
  75817. -
  75818. - You should have received a copy of the GNU Lesser General Public
  75819. - License along with the GNU C Library; if not, write to the Free
  75820. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  75821. - 02111-1307 USA. */
  75822. -
  75823. -#ifndef __BITS_SOCKET_H
  75824. -#define __BITS_SOCKET_H
  75825. -
  75826. -#if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H
  75827. -# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
  75828. -#endif
  75829. -
  75830. -#define __need_size_t
  75831. -#define __need_NULL
  75832. -#include <stddef.h>
  75833. -
  75834. -#include <limits.h>
  75835. -#include <sys/types.h>
  75836. -
  75837. -/* Type for length arguments in socket calls. */
  75838. -#ifndef __socklen_t_defined
  75839. -typedef __socklen_t socklen_t;
  75840. -# define __socklen_t_defined
  75841. -#endif
  75842. -
  75843. -/* Types of sockets. */
  75844. -enum __socket_type
  75845. -{
  75846. - SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
  75847. - byte streams. */
  75848. -#define SOCK_STREAM SOCK_STREAM
  75849. - SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
  75850. - of fixed maximum length. */
  75851. -#define SOCK_DGRAM SOCK_DGRAM
  75852. - SOCK_RAW = 3, /* Raw protocol interface. */
  75853. -#define SOCK_RAW SOCK_RAW
  75854. - SOCK_RDM = 4, /* Reliably-delivered messages. */
  75855. -#define SOCK_RDM SOCK_RDM
  75856. - SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
  75857. - datagrams of fixed maximum length. */
  75858. -#define SOCK_SEQPACKET SOCK_SEQPACKET
  75859. - SOCK_PACKET = 10 /* Linux specific way of getting packets
  75860. - at the dev level. For writing rarp and
  75861. - other similar things on the user level. */
  75862. -#define SOCK_PACKET SOCK_PACKET
  75863. -};
  75864. -
  75865. -/* Protocol families. */
  75866. -#define PF_UNSPEC 0 /* Unspecified. */
  75867. -#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */
  75868. -#define PF_UNIX PF_LOCAL /* Old BSD name for PF_LOCAL. */
  75869. -#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */
  75870. -#define PF_INET 2 /* IP protocol family. */
  75871. -#define PF_AX25 3 /* Amateur Radio AX.25. */
  75872. -#define PF_IPX 4 /* Novell Internet Protocol. */
  75873. -#define PF_APPLETALK 5 /* Appletalk DDP. */
  75874. -#define PF_NETROM 6 /* Amateur radio NetROM. */
  75875. -#define PF_BRIDGE 7 /* Multiprotocol bridge. */
  75876. -#define PF_ATMPVC 8 /* ATM PVCs. */
  75877. -#define PF_X25 9 /* Reserved for X.25 project. */
  75878. -#define PF_INET6 10 /* IP version 6. */
  75879. -#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */
  75880. -#define PF_DECnet 12 /* Reserved for DECnet project. */
  75881. -#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */
  75882. -#define PF_SECURITY 14 /* Security callback pseudo AF. */
  75883. -#define PF_KEY 15 /* PF_KEY key management API. */
  75884. -#define PF_NETLINK 16
  75885. -#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */
  75886. -#define PF_PACKET 17 /* Packet family. */
  75887. -#define PF_ASH 18 /* Ash. */
  75888. -#define PF_ECONET 19 /* Acorn Econet. */
  75889. -#define PF_ATMSVC 20 /* ATM SVCs. */
  75890. -#define PF_SNA 22 /* Linux SNA Project */
  75891. -#define PF_IRDA 23 /* IRDA sockets. */
  75892. -#define PF_PPPOX 24 /* PPPoX sockets. */
  75893. -#define PF_WANPIPE 25 /* Wanpipe API sockets. */
  75894. -#define PF_LLC 26 /* Linux LLC. */
  75895. -#define PF_CAN 29 /* Controller Area Network. */
  75896. -#define PF_TIPC 30 /* TIPC sockets. */
  75897. -#define PF_BLUETOOTH 31 /* Bluetooth sockets. */
  75898. -#define PF_IUCV 32 /* IUCV sockets. */
  75899. -#define PF_RXRPC 33 /* RxRPC sockets. */
  75900. -#define PF_ISDN 34 /* mISDN sockets. */
  75901. -#define PF_PHONET 35 /* Phonet sockets. */
  75902. -#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */
  75903. -#define PF_CAIF 37 /* CAIF sockets. */
  75904. -#define PF_ALG 38 /* Algorithm sockets. */
  75905. -#define PF_MAX 39 /* For now.. */
  75906. -
  75907. -/* Address families. */
  75908. -#define AF_UNSPEC PF_UNSPEC
  75909. -#define AF_LOCAL PF_LOCAL
  75910. -#define AF_UNIX PF_UNIX
  75911. -#define AF_FILE PF_FILE
  75912. -#define AF_INET PF_INET
  75913. -#define AF_AX25 PF_AX25
  75914. -#define AF_IPX PF_IPX
  75915. -#define AF_APPLETALK PF_APPLETALK
  75916. -#define AF_NETROM PF_NETROM
  75917. -#define AF_BRIDGE PF_BRIDGE
  75918. -#define AF_ATMPVC PF_ATMPVC
  75919. -#define AF_X25 PF_X25
  75920. -#define AF_INET6 PF_INET6
  75921. -#define AF_ROSE PF_ROSE
  75922. -#define AF_DECnet PF_DECnet
  75923. -#define AF_NETBEUI PF_NETBEUI
  75924. -#define AF_SECURITY PF_SECURITY
  75925. -#define AF_KEY PF_KEY
  75926. -#define AF_NETLINK PF_NETLINK
  75927. -#define AF_ROUTE PF_ROUTE
  75928. -#define AF_PACKET PF_PACKET
  75929. -#define AF_ASH PF_ASH
  75930. -#define AF_ECONET PF_ECONET
  75931. -#define AF_ATMSVC PF_ATMSVC
  75932. -#define AF_SNA PF_SNA
  75933. -#define AF_IRDA PF_IRDA
  75934. -#define AF_PPPOX PF_PPPOX
  75935. -#define AF_WANPIPE PF_WANPIPE
  75936. -#define AF_LLC PF_LLC
  75937. -#define AF_CAN PF_CAN
  75938. -#define AF_TIPC PF_TIPC
  75939. -#define AF_BLUETOOTH PF_BLUETOOTH
  75940. -#define AF_IUCV PF_IUCV
  75941. -#define AF_RXRPC PF_RXRPC
  75942. -#define AF_ISDN PF_ISDN
  75943. -#define AF_PHONET PF_PHONET
  75944. -#define AF_IEEE802154 PF_IEEE802154
  75945. -#define AF_CAIF PF_CAIF
  75946. -#define AF_ALG PF_ALG
  75947. -#define AF_MAX PF_MAX
  75948. -
  75949. -/* Socket level values. Others are defined in the appropriate headers.
  75950. -
  75951. - XXX These definitions also should go into the appropriate headers as
  75952. - far as they are available. */
  75953. -#define SOL_RAW 255
  75954. -#define SOL_DECNET 261
  75955. -#define SOL_X25 262
  75956. -#define SOL_PACKET 263
  75957. -#define SOL_ATM 264 /* ATM layer (cell level). */
  75958. -#define SOL_AAL 265 /* ATM Adaption Layer (packet level). */
  75959. -#define SOL_IRDA 266
  75960. -
  75961. -/* Maximum queue length specifiable by listen. */
  75962. -#define SOMAXCONN 128
  75963. -
  75964. -/* Get the definition of the macro to define the common sockaddr members. */
  75965. -#include <bits/sockaddr.h>
  75966. -
  75967. -/* Structure describing a generic socket address. */
  75968. -struct sockaddr
  75969. - {
  75970. - __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */
  75971. - char sa_data[14]; /* Address data. */
  75972. - };
  75973. -
  75974. -
  75975. -/* Structure large enough to hold any socket address (with the historical
  75976. - exception of AF_UNIX). We reserve 128 bytes. */
  75977. -#if ULONG_MAX > 0xffffffff
  75978. -# define __ss_aligntype __uint64_t
  75979. -#else
  75980. -# define __ss_aligntype __uint32_t
  75981. -#endif
  75982. -#define _SS_SIZE 128
  75983. -#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype)))
  75984. -
  75985. -struct sockaddr_storage
  75986. - {
  75987. - __SOCKADDR_COMMON (ss_); /* Address family, etc. */
  75988. - __ss_aligntype __ss_align; /* Force desired alignment. */
  75989. - char __ss_padding[_SS_PADSIZE];
  75990. - };
  75991. -
  75992. -
  75993. -/* Bits in the FLAGS argument to `send', `recv', et al. */
  75994. -enum
  75995. - {
  75996. - MSG_OOB = 0x01, /* Process out-of-band data. */
  75997. -#define MSG_OOB MSG_OOB
  75998. - MSG_PEEK = 0x02, /* Peek at incoming messages. */
  75999. -#define MSG_PEEK MSG_PEEK
  76000. - MSG_DONTROUTE = 0x04, /* Don't use local routing. */
  76001. -#define MSG_DONTROUTE MSG_DONTROUTE
  76002. -#ifdef __USE_GNU
  76003. - /* DECnet uses a different name. */
  76004. - MSG_TRYHARD = MSG_DONTROUTE,
  76005. -# define MSG_TRYHARD MSG_DONTROUTE
  76006. -#endif
  76007. - MSG_CTRUNC = 0x08, /* Control data lost before delivery. */
  76008. -#define MSG_CTRUNC MSG_CTRUNC
  76009. - MSG_PROXY = 0x10, /* Supply or ask second address. */
  76010. -#define MSG_PROXY MSG_PROXY
  76011. - MSG_TRUNC = 0x20,
  76012. -#define MSG_TRUNC MSG_TRUNC
  76013. - MSG_DONTWAIT = 0x40, /* Nonblocking IO. */
  76014. -#define MSG_DONTWAIT MSG_DONTWAIT
  76015. - MSG_EOR = 0x80, /* End of record. */
  76016. -#define MSG_EOR MSG_EOR
  76017. - MSG_WAITALL = 0x100, /* Wait for a full request. */
  76018. -#define MSG_WAITALL MSG_WAITALL
  76019. - MSG_FIN = 0x200,
  76020. -#define MSG_FIN MSG_FIN
  76021. - MSG_SYN = 0x400,
  76022. -#define MSG_SYN MSG_SYN
  76023. - MSG_CONFIRM = 0x800, /* Confirm path validity. */
  76024. -#define MSG_CONFIRM MSG_CONFIRM
  76025. - MSG_RST = 0x1000,
  76026. -#define MSG_RST MSG_RST
  76027. - MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */
  76028. -#define MSG_ERRQUEUE MSG_ERRQUEUE
  76029. - MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */
  76030. -#define MSG_NOSIGNAL MSG_NOSIGNAL
  76031. - MSG_MORE = 0x8000 /* Sender will send more. */
  76032. -#define MSG_MORE MSG_MORE
  76033. - };
  76034. -
  76035. -
  76036. -/* Structure describing messages sent by
  76037. - `sendmsg' and received by `recvmsg'. */
  76038. -/* Note: do not change these members to match glibc; these match the
  76039. - SuSv3 spec already (e.g. msg_iovlen/msg_controllen).
  76040. - http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/socket.h.html */
  76041. -/* Note: linux kernel uses __kernel_size_t (which is 8bytes on 64bit
  76042. - platforms, and 4bytes on 32bit platforms) for msg_iovlen/msg_controllen */
  76043. -struct msghdr
  76044. - {
  76045. - void *msg_name; /* Address to send to/receive from. */
  76046. - socklen_t msg_namelen; /* Length of address data. */
  76047. -
  76048. - struct iovec *msg_iov; /* Vector of data to send/receive into. */
  76049. -#if __WORDSIZE == 32
  76050. - int msg_iovlen; /* Number of elements in the vector. */
  76051. -#else
  76052. - size_t msg_iovlen; /* Number of elements in the vector. */
  76053. -#endif
  76054. -
  76055. - void *msg_control; /* Ancillary data (eg BSD filedesc passing). */
  76056. -#if __WORDSIZE == 32
  76057. - socklen_t msg_controllen; /* Ancillary data buffer length. */
  76058. -#else
  76059. - size_t msg_controllen; /* Ancillary data buffer length. */
  76060. -#endif
  76061. -
  76062. - int msg_flags; /* Flags on received message. */
  76063. - };
  76064. -
  76065. -/* Structure used for storage of ancillary data object information. */
  76066. -struct cmsghdr
  76067. - {
  76068. - size_t cmsg_len; /* Length of data in cmsg_data plus length
  76069. - of cmsghdr structure. */
  76070. - int cmsg_level; /* Originating protocol. */
  76071. - int cmsg_type; /* Protocol specific type. */
  76072. -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
  76073. - __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */
  76074. -#endif
  76075. - };
  76076. -
  76077. -/* Ancillary data object manipulation macros. */
  76078. -#if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
  76079. -# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
  76080. -#else
  76081. -# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
  76082. -#endif
  76083. -#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
  76084. -#define CMSG_FIRSTHDR(mhdr) \
  76085. - ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \
  76086. - ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
  76087. -#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
  76088. - & (size_t) ~(sizeof (size_t) - 1))
  76089. -#define CMSG_SPACE(len) (CMSG_ALIGN (len) \
  76090. - + CMSG_ALIGN (sizeof (struct cmsghdr)))
  76091. -#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
  76092. -
  76093. -extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
  76094. - struct cmsghdr *__cmsg) __THROW;
  76095. -libc_hidden_proto(__cmsg_nxthdr)
  76096. -#ifdef __USE_EXTERN_INLINES
  76097. -# ifndef _EXTERN_INLINE
  76098. -# define _EXTERN_INLINE extern __inline
  76099. -# endif
  76100. -_EXTERN_INLINE struct cmsghdr *
  76101. -__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
  76102. -{
  76103. - if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
  76104. - /* The kernel header does this so there may be a reason. */
  76105. - return 0;
  76106. -
  76107. - __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
  76108. - + CMSG_ALIGN (__cmsg->cmsg_len));
  76109. - if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
  76110. - + __mhdr->msg_controllen)
  76111. - || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
  76112. - > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
  76113. - /* No more entries. */
  76114. - return 0;
  76115. - return __cmsg;
  76116. -}
  76117. -#endif /* Use `extern inline'. */
  76118. -
  76119. -/* Socket level message types. This must match the definitions in
  76120. - <linux/socket.h>. */
  76121. -enum
  76122. - {
  76123. - SCM_RIGHTS = 0x01 /* Transfer file descriptors. */
  76124. -#define SCM_RIGHTS SCM_RIGHTS
  76125. -#ifdef __USE_BSD
  76126. - , SCM_CREDENTIALS = 0x02 /* Credentials passing. */
  76127. -# define SCM_CREDENTIALS SCM_CREDENTIALS
  76128. -#endif
  76129. - };
  76130. -
  76131. -/* User visible structure for SCM_CREDENTIALS message */
  76132. -
  76133. -struct ucred
  76134. -{
  76135. - pid_t pid; /* PID of sending process. */
  76136. - uid_t uid; /* UID of sending process. */
  76137. - gid_t gid; /* GID of sending process. */
  76138. -};
  76139. -
  76140. -/* Get socket manipulation related informations from kernel headers. */
  76141. -#ifndef __GLIBC__
  76142. -#define __GLIBC__ 2
  76143. -#include <asm/socket.h>
  76144. -#undef __GLIBC__
  76145. -#else
  76146. -#include <asm/socket.h>
  76147. -#endif
  76148. -
  76149. -
  76150. -/* Structure used to manipulate the SO_LINGER option. */
  76151. -struct linger
  76152. - {
  76153. - int l_onoff; /* Nonzero to linger on close. */
  76154. - int l_linger; /* Time to linger. */
  76155. - };
  76156. -
  76157. -/* Prefer socketcall over all these for sparc32,
  76158. - since it only has socketcall */
  76159. -#ifndef __arch64__
  76160. - #undef __NR_accept
  76161. - #undef __NR_bind
  76162. - #undef __NR_connect
  76163. - #undef __NR_getpeername
  76164. - #undef __NR_getsockname
  76165. - #undef __NR_getsockopt
  76166. - #undef __NR_listen
  76167. - #undef __NR_recv
  76168. - #undef __NR_recvfrom
  76169. - #undef __NR_recvmsg
  76170. - #undef __NR_send
  76171. - #undef __NR_sendmsg
  76172. - #undef __NR_sendto
  76173. - #undef __NR_setsockopt
  76174. - #undef __NR_shutdown
  76175. - #undef __NR_socket
  76176. - #undef __NR_socketpair
  76177. -#endif
  76178. -
  76179. -#endif /* bits/socket.h */
  76180. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/socket_type.h uClibc-git/libc/sysdeps/linux/sparc/bits/socket_type.h
  76181. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/socket_type.h 1970-01-01 01:00:00.000000000 +0100
  76182. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/socket_type.h 2014-07-25 20:36:07.637339038 +0200
  76183. @@ -0,0 +1,54 @@
  76184. +/* System-specific socket constants and types. Linux version.
  76185. + Copyright (C) 1991,1992,1994-2001,2004,2006 Free Software Foundation, Inc.
  76186. + This file is part of the GNU C Library.
  76187. +
  76188. + The GNU C Library is free software; you can redistribute it and/or
  76189. + modify it under the terms of the GNU Lesser General Public
  76190. + License as published by the Free Software Foundation; either
  76191. + version 2.1 of the License, or (at your option) any later version.
  76192. +
  76193. + The GNU C Library is distributed in the hope that it will be useful,
  76194. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  76195. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  76196. + Lesser General Public License for more details.
  76197. +
  76198. + You should have received a copy of the GNU Lesser General Public
  76199. + License along with the GNU C Library; if not, see
  76200. + <http://www.gnu.org/licenses/>. */
  76201. +
  76202. +#ifndef _SYS_SOCKET_H
  76203. +# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
  76204. +#endif
  76205. +
  76206. +/* Types of sockets. */
  76207. +enum __socket_type
  76208. +{
  76209. + SOCK_STREAM = 1, /* Sequenced, reliable, connection-based
  76210. + byte streams. */
  76211. +#define SOCK_STREAM SOCK_STREAM
  76212. + SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams
  76213. + of fixed maximum length. */
  76214. +#define SOCK_DGRAM SOCK_DGRAM
  76215. + SOCK_RAW = 3, /* Raw protocol interface. */
  76216. +#define SOCK_RAW SOCK_RAW
  76217. + SOCK_RDM = 4, /* Reliably-delivered messages. */
  76218. +#define SOCK_RDM SOCK_RDM
  76219. + SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
  76220. + datagrams of fixed maximum length. */
  76221. +#define SOCK_SEQPACKET SOCK_SEQPACKET
  76222. + SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */
  76223. +#define SOCK_DCCP SOCK_DCCP
  76224. + SOCK_PACKET = 10, /* Linux specific way of getting packets
  76225. + at the dev level. For writing rarp and
  76226. + other similar things on the user level. */
  76227. +#define SOCK_PACKET SOCK_PACKET
  76228. +
  76229. + /* Flags to be ORed into the type parameter of socket and socketpair. */
  76230. +
  76231. + SOCK_CLOEXEC = 0x400000, /* Atomically set close-on-exec flag for the
  76232. + new descriptor(s). */
  76233. +#define SOCK_CLOEXEC SOCK_CLOEXEC
  76234. + SOCK_NONBLOCK = 0x004000 /* Atomically mark descriptor(s) as
  76235. + non-blocking. */
  76236. +#define SOCK_NONBLOCK SOCK_NONBLOCK
  76237. +};
  76238. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/sparc/bits/stackinfo.h
  76239. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  76240. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/stackinfo.h 2014-07-25 20:36:07.637339038 +0200
  76241. @@ -12,9 +12,8 @@
  76242. Lesser General Public License for more details.
  76243. You should have received a copy of the GNU Lesser General Public
  76244. - License along with the GNU C Library; if not, write to the Free
  76245. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76246. - 02111-1307 USA. */
  76247. + License along with the GNU C Library; if not, see
  76248. + <http://www.gnu.org/licenses/>. */
  76249. /* This file contains a bit of information about the stack allocation
  76250. of the processor. */
  76251. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/stat.h uClibc-git/libc/sysdeps/linux/sparc/bits/stat.h
  76252. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
  76253. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/stat.h 2014-07-25 20:36:07.637339038 +0200
  76254. @@ -12,9 +12,8 @@
  76255. Lesser General Public License for more details.
  76256. You should have received a copy of the GNU Lesser General Public
  76257. - License along with the GNU C Library; if not, write to the Free
  76258. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76259. - 02111-1307 USA. */
  76260. + License along with the GNU C Library; if not, see
  76261. + <http://www.gnu.org/licenses/>. */
  76262. #ifndef _SYS_STAT_H
  76263. # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
  76264. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/termios.h uClibc-git/libc/sysdeps/linux/sparc/bits/termios.h
  76265. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/termios.h 2012-05-15 09:20:09.000000000 +0200
  76266. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/termios.h 2014-07-25 20:36:07.637339038 +0200
  76267. @@ -14,9 +14,8 @@
  76268. Lesser General Public License for more details.
  76269. You should have received a copy of the GNU Lesser General Public
  76270. - License along with the GNU C Library; if not, write to the Free
  76271. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76272. - 02111-1307 USA. */
  76273. + License along with the GNU C Library; if not, see
  76274. + <http://www.gnu.org/licenses/>. */
  76275. #ifndef _TERMIOS_H
  76276. # error "Never include <bits/termios.h> directly; use <termios.h> instead."
  76277. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/typesizes.h uClibc-git/libc/sysdeps/linux/sparc/bits/typesizes.h
  76278. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/typesizes.h 2012-05-15 09:20:09.000000000 +0200
  76279. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/typesizes.h 2014-07-25 20:36:07.637339038 +0200
  76280. @@ -13,9 +13,8 @@
  76281. Lesser General Public License for more details.
  76282. You should have received a copy of the GNU Lesser General Public
  76283. - License along with the GNU C Library; if not, write to the Free
  76284. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76285. - 02111-1307 USA. */
  76286. + License along with the GNU C Library; if not, see
  76287. + <http://www.gnu.org/licenses/>. */
  76288. #ifndef _BITS_TYPES_H
  76289. # error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
  76290. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h
  76291. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  76292. +++ uClibc-git/libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h 2014-07-25 20:36:07.637339038 +0200
  76293. @@ -11,8 +11,8 @@
  76294. /* can your target use syscall6() for mmap ? */
  76295. #define __UCLIBC_MMAP_HAS_6_ARGS__
  76296. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  76297. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  76298. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  76299. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  76300. /* does your target have a broken create_module() ? */
  76301. #undef __UCLIBC_BROKEN_CREATE_MODULE__
  76302. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/brk.c uClibc-git/libc/sysdeps/linux/sparc/brk.c
  76303. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/brk.c 2012-05-15 09:20:09.000000000 +0200
  76304. +++ uClibc-git/libc/sysdeps/linux/sparc/brk.c 2014-07-25 20:36:07.637339038 +0200
  76305. @@ -13,9 +13,8 @@
  76306. Lesser General Public License for more details.
  76307. You should have received a copy of the GNU Lesser General Public
  76308. - License along with the GNU C Library; if not, write to the Free
  76309. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76310. - 02111-1307 USA. */
  76311. + License along with the GNU C Library; if not, see
  76312. + <http://www.gnu.org/licenses/>. */
  76313. #include <errno.h>
  76314. #include <unistd.h>
  76315. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/clone.S uClibc-git/libc/sysdeps/linux/sparc/clone.S
  76316. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/clone.S 2012-05-15 09:20:09.000000000 +0200
  76317. +++ uClibc-git/libc/sysdeps/linux/sparc/clone.S 2014-07-25 20:36:07.637339038 +0200
  76318. @@ -14,9 +14,8 @@
  76319. Lesser General Public License for more details.
  76320. You should have received a copy of the GNU Lesser General Public
  76321. - License along with the GNU C Library; if not, write to the Free
  76322. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76323. - 02111-1307 USA. */
  76324. + License along with the GNU C Library; if not, see
  76325. + <http://www.gnu.org/licenses/>. */
  76326. /* clone() is even more special than fork() as it mucks with stacks
  76327. and invokes a function in the right context after its all over. */
  76328. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/crt1.S uClibc-git/libc/sysdeps/linux/sparc/crt1.S
  76329. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/crt1.S 2012-05-15 09:20:09.000000000 +0200
  76330. +++ uClibc-git/libc/sysdeps/linux/sparc/crt1.S 2014-07-25 20:36:07.637339038 +0200
  76331. @@ -31,9 +31,8 @@
  76332. Lesser General Public License for more details.
  76333. You should have received a copy of the GNU Lesser General Public
  76334. - License along with the GNU C Library; if not, write to the Free
  76335. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76336. - 02111-1307 USA. */
  76337. + License along with the GNU C Library; if not, see
  76338. + <http://www.gnu.org/licenses/>. */
  76339. /* Originally based on glibc's sysdeps/sparc/sparc{32,64}/elf/start.S */
  76340. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/fork.S uClibc-git/libc/sysdeps/linux/sparc/fork.S
  76341. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/fork.S 2012-05-15 09:20:09.000000000 +0200
  76342. +++ uClibc-git/libc/sysdeps/linux/sparc/fork.S 2014-07-25 20:36:07.637339038 +0200
  76343. @@ -13,9 +13,8 @@
  76344. Lesser General Public License for more details.
  76345. You should have received a copy of the GNU Lesser General Public
  76346. - License along with the GNU C Library; if not, write to the Free
  76347. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76348. - 02111-1307 USA. */
  76349. + License along with the GNU C Library; if not, see
  76350. + <http://www.gnu.org/licenses/>. */
  76351. /* Code taken from glibc2.2.2/sysdeps/unix/sysv/linux/sparc/vfork.S */
  76352. @@ -23,11 +22,14 @@
  76353. #include <sys/syscall.h>
  76354. .text
  76355. -.global __libc_fork
  76356. -.type __libc_fork,%function
  76357. +.global fork
  76358. +#ifdef __UCLIBC_HAS_THREADS__
  76359. +.weak fork
  76360. +#endif
  76361. +.type fork,%function
  76362. .align 4
  76363. -__libc_fork:
  76364. +fork:
  76365. mov __NR_fork, %g1
  76366. ta 0x10
  76367. bcc,a 9000f
  76368. @@ -44,6 +46,8 @@
  76369. retl
  76370. and %o0, %o1, %o0
  76371. -.size __libc_fork,.-__libc_fork
  76372. -weak_alias(__libc_fork,fork)
  76373. -libc_hidden_weak(fork)
  76374. +.size fork,.-fork
  76375. +#ifdef __UCLIBC_HAS_THREADS__
  76376. +strong_alias(fork,__libc_fork)
  76377. +#endif
  76378. +libc_hidden_def(fork)
  76379. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/fpu_control.h uClibc-git/libc/sysdeps/linux/sparc/fpu_control.h
  76380. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
  76381. +++ uClibc-git/libc/sysdeps/linux/sparc/fpu_control.h 2014-07-25 20:36:07.637339038 +0200
  76382. @@ -14,9 +14,8 @@
  76383. Lesser General Public License for more details.
  76384. You should have received a copy of the GNU Lesser General Public
  76385. - License along with the GNU C Library; if not, write to the Free
  76386. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76387. - 02111-1307 USA. */
  76388. + License along with the GNU C Library; if not, see
  76389. + <http://www.gnu.org/licenses/>. */
  76390. #ifndef _FPU_CONTROL_H
  76391. #define _FPU_CONTROL_H 1
  76392. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/jmpbuf-offsets.h uClibc-git/libc/sysdeps/linux/sparc/jmpbuf-offsets.h
  76393. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
  76394. +++ uClibc-git/libc/sysdeps/linux/sparc/jmpbuf-offsets.h 2014-07-25 20:36:07.637339038 +0200
  76395. @@ -0,0 +1,29 @@
  76396. +/* Private macros for accessing __jmp_buf contents. SPARC version.
  76397. + Copyright (C) 2006 Free Software Foundation, Inc.
  76398. + This file is part of the GNU C Library.
  76399. +
  76400. + The GNU C Library is free software; you can redistribute it and/or
  76401. + modify it under the terms of the GNU Lesser General Public
  76402. + License as published by the Free Software Foundation; either
  76403. + version 2.1 of the License, or (at your option) any later version.
  76404. +
  76405. + The GNU C Library is distributed in the hope that it will be useful,
  76406. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  76407. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  76408. + Lesser General Public License for more details.
  76409. +
  76410. + You should have received a copy of the GNU Lesser General Public
  76411. + License along with the GNU C Library; if not, see
  76412. + <http://www.gnu.org/licenses/>. */
  76413. +
  76414. +#include <bits/wordsize.h>
  76415. +
  76416. +#if __WORDSIZE == 64
  76417. +#define O_mask_was_saved 512
  76418. +#define O_gregs 32
  76419. +#define O_g1 (O_gregs + 4*8)
  76420. +#else
  76421. +#define JB_SP 0
  76422. +#define JB_FP 1
  76423. +#define JB_PC 2
  76424. +#endif
  76425. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/sparc/jmpbuf-unwind.h
  76426. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  76427. +++ uClibc-git/libc/sysdeps/linux/sparc/jmpbuf-unwind.h 2014-07-25 20:36:07.637339038 +0200
  76428. @@ -0,0 +1,31 @@
  76429. +/*
  76430. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  76431. + *
  76432. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  76433. + */
  76434. +#include <setjmp.h>
  76435. +#include <jmpbuf-offsets.h>
  76436. +
  76437. +#if __WORDSIZE == 64
  76438. +
  76439. +/* Test if longjmp to JMPBUF would unwind the frame
  76440. + containing a local variable at ADDRESS. */
  76441. +#define _JMPBUF_UNWINDS(jmpbuf, address) \
  76442. + ((unsigned long int) (address) < (jmpbuf)->uc_mcontext.mc_fp)
  76443. +
  76444. +#else
  76445. +
  76446. +/* Test if longjmp to JMPBUF would unwind the frame
  76447. + containing a local variable at ADDRESS. */
  76448. +#define _JMPBUF_UNWINDS(jmpbuf, address) \
  76449. + ((int) (address) < (jmpbuf)[JB_SP])
  76450. +
  76451. +#endif
  76452. +
  76453. +#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  76454. +#if defined(__arch64__)
  76455. +#include "sparc64/jmpbuf-unwind.h"
  76456. +#else
  76457. +#include "sparc32/jmpbuf-unwind.h"
  76458. +#endif
  76459. +#endif
  76460. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/__longjmp.S uClibc-git/libc/sysdeps/linux/sparc/__longjmp.S
  76461. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
  76462. +++ uClibc-git/libc/sysdeps/linux/sparc/__longjmp.S 2014-07-25 20:36:07.625338976 +0200
  76463. @@ -12,16 +12,11 @@
  76464. Lesser General Public License for more details.
  76465. You should have received a copy of the GNU Lesser General Public
  76466. - License along with the GNU C Library; if not, write to the Free
  76467. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76468. - 02111-1307 USA. */
  76469. + License along with the GNU C Library; if not, see
  76470. + <http://www.gnu.org/licenses/>. */
  76471. -#include <features.h>
  76472. -#include <sys/syscall.h>
  76473. +#include <jmpbuf-offsets.h>
  76474. -#define _ASM 1
  76475. -#define _SETJMP_H
  76476. -#include <bits/setjmp.h>
  76477. #define ENV(base,reg) [%base + (reg * 4)]
  76478. #define ST_FLUSH_WINDOWS 3
  76479. #define RW_FP [%fp + 0x48]
  76480. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/Makefile.arch uClibc-git/libc/sysdeps/linux/sparc/Makefile.arch
  76481. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
  76482. +++ uClibc-git/libc/sysdeps/linux/sparc/Makefile.arch 2014-07-25 20:36:07.621338955 +0200
  76483. @@ -5,25 +5,23 @@
  76484. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  76485. #
  76486. -CSRC := brk.c __syscall_error.c sigaction.c
  76487. +CSRC-y := brk.c __syscall_error.c sigaction.c
  76488. -SSRC := \
  76489. +SSRC-y := \
  76490. __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \
  76491. syscall.S urem.S udiv.S umul.S sdiv.S rem.S pipe.S
  76492. -ifneq ($(UCLIBC_HAS_THREADS_NATIVE),y)
  76493. -SSRC += fork.S vfork.S clone.S
  76494. -endif
  76495. +SSRC-$(if $(UCLIBC_HAS_THREADS_NATIVE),,y) += fork.S vfork.S clone.S
  76496. # check weather __LONG_DOUBLE_128__ is defined (long double support)
  76497. UCLIBC_SPARC_HAS_LONG_DOUBLE=$(shell if [ "x`$(CC) -E -dM -xc /dev/null 2>&1 | grep __LONG_DOUBLE_128__`" != "x" ]; then echo "y"; fi)
  76498. ifeq ($(UCLIBC_SPARC_HAS_LONG_DOUBLE),y)
  76499. -CSRC += $(foreach f, \
  76500. +CSRC-y += $(addprefix soft-fp/, \
  76501. q_div.c q_fle.c q_mul.c q_qtoll.c q_stoq.c \
  76502. mp_clz_tab.c q_dtoq.c q_flt.c q_neg.c q_qtos.c q_sub.c \
  76503. q_add.c q_feq.c q_fne.c q_qtod.c q_qtou.c q_ulltoq.c \
  76504. q_cmp.c q_fge.c q_itoq.c q_qtoull.c q_util.c \
  76505. - q_cmpe.c q_fgt.c q_lltoq.c q_qtoi.c q_sqrt.c q_utoq.c, soft-fp/$(f))
  76506. + q_cmpe.c q_fgt.c q_lltoq.c q_qtoi.c q_sqrt.c q_utoq.c)
  76507. else
  76508. -CSRC += qp_ops.c
  76509. +CSRC-y += qp_ops.c
  76510. endif
  76511. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/pipe.S uClibc-git/libc/sysdeps/linux/sparc/pipe.S
  76512. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/pipe.S 2012-05-15 09:20:09.000000000 +0200
  76513. +++ uClibc-git/libc/sysdeps/linux/sparc/pipe.S 2014-07-25 20:36:07.637339038 +0200
  76514. @@ -13,10 +13,9 @@
  76515. Lesser General Public License for more details.
  76516. You should have received a copy of the GNU Lesser General Public
  76517. - License along with the GNU C Library; if not, write to the Free
  76518. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76519. - 02111-1307 USA.
  76520. -
  76521. + License along with the GNU C Library; if not, see
  76522. + <http://www.gnu.org/licenses/>.
  76523. +
  76524. Ported to uClibc by:
  76525. Austin Foxley, Ceton Corporation <austinf@cetoncorp.com>
  76526. */
  76527. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/setjmp.S uClibc-git/libc/sysdeps/linux/sparc/setjmp.S
  76528. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/setjmp.S 2012-05-15 09:20:09.000000000 +0200
  76529. +++ uClibc-git/libc/sysdeps/linux/sparc/setjmp.S 2014-07-25 20:36:07.637339038 +0200
  76530. @@ -12,15 +12,11 @@
  76531. Lesser General Public License for more details.
  76532. You should have received a copy of the GNU Lesser General Public
  76533. - License along with the GNU C Library; if not, write to the Free
  76534. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76535. - 02111-1307 USA. */
  76536. + License along with the GNU C Library; if not, see
  76537. + <http://www.gnu.org/licenses/>. */
  76538. -#include <sys/syscall.h>
  76539. +#include <jmpbuf-offsets.h>
  76540. -#define _ASM 1
  76541. -#define _SETJMP_H
  76542. -#include <bits/setjmp.h>
  76543. #define ST_FLUSH_WINDOWS 3
  76544. .global _setjmp
  76545. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sigaction.c uClibc-git/libc/sysdeps/linux/sparc/sigaction.c
  76546. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sigaction.c 2012-05-15 09:20:09.000000000 +0200
  76547. +++ uClibc-git/libc/sysdeps/linux/sparc/sigaction.c 2014-07-25 20:36:07.637339038 +0200
  76548. @@ -14,9 +14,8 @@
  76549. Lesser General Public License for more details.
  76550. You should have received a copy of the GNU Lesser General Public
  76551. - License along with the GNU C Library; if not, write to the Free
  76552. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76553. - 02111-1307 USA.
  76554. + License along with the GNU C Library; if not, see
  76555. + <http://www.gnu.org/licenses/>.
  76556. Ported to uClibc from glibc: 090520:
  76557. Jan Buchholz, KIP, Uni Heidelberg <jan.buchholz@kip.uni-heidelberg.de>
  76558. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/double.h uClibc-git/libc/sysdeps/linux/sparc/soft-fp/double.h
  76559. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/double.h 2012-05-15 09:20:09.000000000 +0200
  76560. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/double.h 2014-07-25 20:36:07.653339122 +0200
  76561. @@ -27,9 +27,8 @@
  76562. Lesser General Public License for more details.
  76563. You should have received a copy of the GNU Lesser General Public
  76564. - License along with the GNU C Library; if not, write to the Free
  76565. - Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
  76566. - MA 02110-1301, USA. */
  76567. + License along with the GNU C Library; if not, see
  76568. + <http://www.gnu.org/licenses/>. */
  76569. #if _FP_W_TYPE_SIZE < 32
  76570. #error "Here's a nickel kid. Go buy yourself a real computer."
  76571. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/extended.h uClibc-git/libc/sysdeps/linux/sparc/soft-fp/extended.h
  76572. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/extended.h 2012-05-15 09:20:09.000000000 +0200
  76573. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/extended.h 2014-07-25 20:36:07.653339122 +0200
  76574. @@ -24,9 +24,8 @@
  76575. Lesser General Public License for more details.
  76576. You should have received a copy of the GNU Lesser General Public
  76577. - License along with the GNU C Library; if not, write to the Free
  76578. - Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
  76579. - MA 02110-1301, USA. */
  76580. + License along with the GNU C Library; if not, see
  76581. + <http://www.gnu.org/licenses/>. */
  76582. #if _FP_W_TYPE_SIZE < 32
  76583. #error "Here's a nickel, kid. Go buy yourself a real computer."
  76584. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/longlong.h uClibc-git/libc/sysdeps/linux/sparc/soft-fp/longlong.h
  76585. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/longlong.h 2012-05-15 09:20:09.000000000 +0200
  76586. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/longlong.h 2014-07-25 20:36:07.653339122 +0200
  76587. @@ -15,9 +15,8 @@
  76588. Lesser General Public License for more details.
  76589. You should have received a copy of the GNU Lesser General Public
  76590. - License along with the GNU C Library; if not, write to the Free
  76591. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76592. - 02111-1307 USA. */
  76593. + License along with the GNU C Library; if not, see
  76594. + <http://www.gnu.org/licenses/>. */
  76595. /* You have to define the following before including this file:
  76596. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/mp_clz_tab.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/mp_clz_tab.c
  76597. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/mp_clz_tab.c 2012-05-15 09:20:09.000000000 +0200
  76598. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/mp_clz_tab.c 2014-07-25 20:36:07.653339122 +0200
  76599. @@ -14,9 +14,8 @@
  76600. Lesser General Public License for more details.
  76601. You should have received a copy of the GNU Lesser General Public
  76602. - License along with the GNU C Library; if not, write to the Free
  76603. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76604. - 02111-1307 USA. */
  76605. + License along with the GNU C Library; if not, see
  76606. + <http://www.gnu.org/licenses/>. */
  76607. #if 0
  76608. #include <gmp.h>
  76609. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/op-1.h uClibc-git/libc/sysdeps/linux/sparc/soft-fp/op-1.h
  76610. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/op-1.h 2012-05-15 09:20:09.000000000 +0200
  76611. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/op-1.h 2014-07-25 20:36:07.653339122 +0200
  76612. @@ -27,9 +27,8 @@
  76613. Lesser General Public License for more details.
  76614. You should have received a copy of the GNU Lesser General Public
  76615. - License along with the GNU C Library; if not, write to the Free
  76616. - Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
  76617. - MA 02110-1301, USA. */
  76618. + License along with the GNU C Library; if not, see
  76619. + <http://www.gnu.org/licenses/>. */
  76620. #define _FP_FRAC_DECL_1(X) _FP_W_TYPE X##_f
  76621. #define _FP_FRAC_COPY_1(D,S) (D##_f = S##_f)
  76622. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/op-2.h uClibc-git/libc/sysdeps/linux/sparc/soft-fp/op-2.h
  76623. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/op-2.h 2012-05-15 09:20:09.000000000 +0200
  76624. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/op-2.h 2014-07-25 20:36:07.653339122 +0200
  76625. @@ -27,9 +27,8 @@
  76626. Lesser General Public License for more details.
  76627. You should have received a copy of the GNU Lesser General Public
  76628. - License along with the GNU C Library; if not, write to the Free
  76629. - Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
  76630. - MA 02110-1301, USA. */
  76631. + License along with the GNU C Library; if not, see
  76632. + <http://www.gnu.org/licenses/>. */
  76633. #define _FP_FRAC_DECL_2(X) _FP_W_TYPE X##_f0, X##_f1
  76634. #define _FP_FRAC_COPY_2(D,S) (D##_f0 = S##_f0, D##_f1 = S##_f1)
  76635. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/op-4.h uClibc-git/libc/sysdeps/linux/sparc/soft-fp/op-4.h
  76636. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/op-4.h 2012-05-15 09:20:09.000000000 +0200
  76637. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/op-4.h 2014-07-25 20:36:07.653339122 +0200
  76638. @@ -27,9 +27,8 @@
  76639. Lesser General Public License for more details.
  76640. You should have received a copy of the GNU Lesser General Public
  76641. - License along with the GNU C Library; if not, write to the Free
  76642. - Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
  76643. - MA 02110-1301, USA. */
  76644. + License along with the GNU C Library; if not, see
  76645. + <http://www.gnu.org/licenses/>. */
  76646. #define _FP_FRAC_DECL_4(X) _FP_W_TYPE X##_f[4]
  76647. #define _FP_FRAC_COPY_4(D,S) \
  76648. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/op-8.h uClibc-git/libc/sysdeps/linux/sparc/soft-fp/op-8.h
  76649. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/op-8.h 2012-05-15 09:20:09.000000000 +0200
  76650. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/op-8.h 2014-07-25 20:36:07.653339122 +0200
  76651. @@ -26,9 +26,8 @@
  76652. Lesser General Public License for more details.
  76653. You should have received a copy of the GNU Lesser General Public
  76654. - License along with the GNU C Library; if not, write to the Free
  76655. - Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
  76656. - MA 02110-1301, USA. */
  76657. + License along with the GNU C Library; if not, see
  76658. + <http://www.gnu.org/licenses/>. */
  76659. /* We need just a few things from here for op-4, if we ever need some
  76660. other macros, they can be added. */
  76661. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/op-common.h uClibc-git/libc/sysdeps/linux/sparc/soft-fp/op-common.h
  76662. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/op-common.h 2012-05-15 09:20:09.000000000 +0200
  76663. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/op-common.h 2014-07-25 20:36:07.653339122 +0200
  76664. @@ -26,9 +26,8 @@
  76665. Lesser General Public License for more details.
  76666. You should have received a copy of the GNU Lesser General Public
  76667. - License along with the GNU C Library; if not, write to the Free
  76668. - Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
  76669. - MA 02110-1301, USA. */
  76670. + License along with the GNU C Library; if not, see
  76671. + <http://www.gnu.org/licenses/>. */
  76672. #define _FP_DECL(wc, X) \
  76673. _FP_I_TYPE X##_c __attribute__((unused)), X##_s, X##_e; \
  76674. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_add.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_add.c
  76675. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_add.c 2012-05-15 09:20:09.000000000 +0200
  76676. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_add.c 2014-07-25 20:36:07.653339122 +0200
  76677. @@ -16,9 +16,8 @@
  76678. Lesser General Public License for more details.
  76679. You should have received a copy of the GNU Lesser General Public
  76680. - License along with the GNU C Library; if not, write to the Free
  76681. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76682. - 02111-1307 USA. */
  76683. + License along with the GNU C Library; if not, see
  76684. + <http://www.gnu.org/licenses/>. */
  76685. #include "soft-fp.h"
  76686. #include "quad.h"
  76687. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_cmp.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_cmp.c
  76688. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_cmp.c 2012-05-15 09:20:09.000000000 +0200
  76689. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_cmp.c 2014-07-25 20:36:07.653339122 +0200
  76690. @@ -16,9 +16,8 @@
  76691. Lesser General Public License for more details.
  76692. You should have received a copy of the GNU Lesser General Public
  76693. - License along with the GNU C Library; if not, write to the Free
  76694. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76695. - 02111-1307 USA. */
  76696. + License along with the GNU C Library; if not, see
  76697. + <http://www.gnu.org/licenses/>. */
  76698. #include "soft-fp.h"
  76699. #include "quad.h"
  76700. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_cmpe.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_cmpe.c
  76701. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_cmpe.c 2012-05-15 09:20:09.000000000 +0200
  76702. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_cmpe.c 2014-07-25 20:36:07.653339122 +0200
  76703. @@ -17,9 +17,8 @@
  76704. Lesser General Public License for more details.
  76705. You should have received a copy of the GNU Lesser General Public
  76706. - License along with the GNU C Library; if not, write to the Free
  76707. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76708. - 02111-1307 USA. */
  76709. + License along with the GNU C Library; if not, see
  76710. + <http://www.gnu.org/licenses/>. */
  76711. #include "soft-fp.h"
  76712. #include "quad.h"
  76713. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_div.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_div.c
  76714. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_div.c 2012-05-15 09:20:09.000000000 +0200
  76715. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_div.c 2014-07-25 20:36:07.653339122 +0200
  76716. @@ -16,9 +16,8 @@
  76717. Lesser General Public License for more details.
  76718. You should have received a copy of the GNU Lesser General Public
  76719. - License along with the GNU C Library; if not, write to the Free
  76720. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76721. - 02111-1307 USA. */
  76722. + License along with the GNU C Library; if not, see
  76723. + <http://www.gnu.org/licenses/>. */
  76724. #include "soft-fp.h"
  76725. #include "quad.h"
  76726. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_dtoq.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_dtoq.c
  76727. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_dtoq.c 2012-05-15 09:20:09.000000000 +0200
  76728. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_dtoq.c 2014-07-25 20:36:07.653339122 +0200
  76729. @@ -16,9 +16,8 @@
  76730. Lesser General Public License for more details.
  76731. You should have received a copy of the GNU Lesser General Public
  76732. - License along with the GNU C Library; if not, write to the Free
  76733. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76734. - 02111-1307 USA. */
  76735. + License along with the GNU C Library; if not, see
  76736. + <http://www.gnu.org/licenses/>. */
  76737. #include "soft-fp.h"
  76738. #include "double.h"
  76739. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_feq.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_feq.c
  76740. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_feq.c 2012-05-15 09:20:09.000000000 +0200
  76741. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_feq.c 2014-07-25 20:36:07.653339122 +0200
  76742. @@ -16,9 +16,8 @@
  76743. Lesser General Public License for more details.
  76744. You should have received a copy of the GNU Lesser General Public
  76745. - License along with the GNU C Library; if not, write to the Free
  76746. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76747. - 02111-1307 USA. */
  76748. + License along with the GNU C Library; if not, see
  76749. + <http://www.gnu.org/licenses/>. */
  76750. #include "soft-fp.h"
  76751. #include "quad.h"
  76752. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_fge.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_fge.c
  76753. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_fge.c 2012-05-15 09:20:09.000000000 +0200
  76754. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_fge.c 2014-07-25 20:36:07.653339122 +0200
  76755. @@ -16,9 +16,8 @@
  76756. Lesser General Public License for more details.
  76757. You should have received a copy of the GNU Lesser General Public
  76758. - License along with the GNU C Library; if not, write to the Free
  76759. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76760. - 02111-1307 USA. */
  76761. + License along with the GNU C Library; if not, see
  76762. + <http://www.gnu.org/licenses/>. */
  76763. #include "soft-fp.h"
  76764. #include "quad.h"
  76765. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_fgt.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_fgt.c
  76766. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_fgt.c 2012-05-15 09:20:09.000000000 +0200
  76767. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_fgt.c 2014-07-25 20:36:07.653339122 +0200
  76768. @@ -16,9 +16,8 @@
  76769. Lesser General Public License for more details.
  76770. You should have received a copy of the GNU Lesser General Public
  76771. - License along with the GNU C Library; if not, write to the Free
  76772. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76773. - 02111-1307 USA. */
  76774. + License along with the GNU C Library; if not, see
  76775. + <http://www.gnu.org/licenses/>. */
  76776. #include "soft-fp.h"
  76777. #include "quad.h"
  76778. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_fle.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_fle.c
  76779. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_fle.c 2012-05-15 09:20:09.000000000 +0200
  76780. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_fle.c 2014-07-25 20:36:07.653339122 +0200
  76781. @@ -16,9 +16,8 @@
  76782. Lesser General Public License for more details.
  76783. You should have received a copy of the GNU Lesser General Public
  76784. - License along with the GNU C Library; if not, write to the Free
  76785. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76786. - 02111-1307 USA. */
  76787. + License along with the GNU C Library; if not, see
  76788. + <http://www.gnu.org/licenses/>. */
  76789. #include "soft-fp.h"
  76790. #include "quad.h"
  76791. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_flt.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_flt.c
  76792. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_flt.c 2012-05-15 09:20:09.000000000 +0200
  76793. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_flt.c 2014-07-25 20:36:07.653339122 +0200
  76794. @@ -16,9 +16,8 @@
  76795. Lesser General Public License for more details.
  76796. You should have received a copy of the GNU Lesser General Public
  76797. - License along with the GNU C Library; if not, write to the Free
  76798. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76799. - 02111-1307 USA. */
  76800. + License along with the GNU C Library; if not, see
  76801. + <http://www.gnu.org/licenses/>. */
  76802. #include "soft-fp.h"
  76803. #include "quad.h"
  76804. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_fne.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_fne.c
  76805. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_fne.c 2012-05-15 09:20:09.000000000 +0200
  76806. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_fne.c 2014-07-25 20:36:07.653339122 +0200
  76807. @@ -16,9 +16,8 @@
  76808. Lesser General Public License for more details.
  76809. You should have received a copy of the GNU Lesser General Public
  76810. - License along with the GNU C Library; if not, write to the Free
  76811. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76812. - 02111-1307 USA. */
  76813. + License along with the GNU C Library; if not, see
  76814. + <http://www.gnu.org/licenses/>. */
  76815. #include "soft-fp.h"
  76816. #include "quad.h"
  76817. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_itoq.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_itoq.c
  76818. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_itoq.c 2012-05-15 09:20:09.000000000 +0200
  76819. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_itoq.c 2014-07-25 20:36:07.653339122 +0200
  76820. @@ -16,9 +16,8 @@
  76821. Lesser General Public License for more details.
  76822. You should have received a copy of the GNU Lesser General Public
  76823. - License along with the GNU C Library; if not, write to the Free
  76824. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76825. - 02111-1307 USA. */
  76826. + License along with the GNU C Library; if not, see
  76827. + <http://www.gnu.org/licenses/>. */
  76828. #include "soft-fp.h"
  76829. #include "quad.h"
  76830. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_lltoq.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_lltoq.c
  76831. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_lltoq.c 2012-05-15 09:20:09.000000000 +0200
  76832. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_lltoq.c 2014-07-25 20:36:07.653339122 +0200
  76833. @@ -16,9 +16,8 @@
  76834. Lesser General Public License for more details.
  76835. You should have received a copy of the GNU Lesser General Public
  76836. - License along with the GNU C Library; if not, write to the Free
  76837. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76838. - 02111-1307 USA. */
  76839. + License along with the GNU C Library; if not, see
  76840. + <http://www.gnu.org/licenses/>. */
  76841. #include "soft-fp.h"
  76842. #include "quad.h"
  76843. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_mul.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_mul.c
  76844. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_mul.c 2012-05-15 09:20:09.000000000 +0200
  76845. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_mul.c 2014-07-25 20:36:07.653339122 +0200
  76846. @@ -16,9 +16,8 @@
  76847. Lesser General Public License for more details.
  76848. You should have received a copy of the GNU Lesser General Public
  76849. - License along with the GNU C Library; if not, write to the Free
  76850. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76851. - 02111-1307 USA. */
  76852. + License along with the GNU C Library; if not, see
  76853. + <http://www.gnu.org/licenses/>. */
  76854. #include "soft-fp.h"
  76855. #include "quad.h"
  76856. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_neg.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_neg.c
  76857. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_neg.c 2012-05-15 09:20:09.000000000 +0200
  76858. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_neg.c 2014-07-25 20:36:07.653339122 +0200
  76859. @@ -16,9 +16,8 @@
  76860. Lesser General Public License for more details.
  76861. You should have received a copy of the GNU Lesser General Public
  76862. - License along with the GNU C Library; if not, write to the Free
  76863. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76864. - 02111-1307 USA. */
  76865. + License along with the GNU C Library; if not, see
  76866. + <http://www.gnu.org/licenses/>. */
  76867. #include "soft-fp.h"
  76868. #include "quad.h"
  76869. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtod.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_qtod.c
  76870. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtod.c 2012-05-15 09:20:09.000000000 +0200
  76871. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_qtod.c 2014-07-25 20:36:07.653339122 +0200
  76872. @@ -16,9 +16,8 @@
  76873. Lesser General Public License for more details.
  76874. You should have received a copy of the GNU Lesser General Public
  76875. - License along with the GNU C Library; if not, write to the Free
  76876. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76877. - 02111-1307 USA. */
  76878. + License along with the GNU C Library; if not, see
  76879. + <http://www.gnu.org/licenses/>. */
  76880. #include "soft-fp.h"
  76881. #include "double.h"
  76882. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtoi.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_qtoi.c
  76883. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtoi.c 2012-05-15 09:20:09.000000000 +0200
  76884. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_qtoi.c 2014-07-25 20:36:07.653339122 +0200
  76885. @@ -16,9 +16,8 @@
  76886. Lesser General Public License for more details.
  76887. You should have received a copy of the GNU Lesser General Public
  76888. - License along with the GNU C Library; if not, write to the Free
  76889. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76890. - 02111-1307 USA. */
  76891. + License along with the GNU C Library; if not, see
  76892. + <http://www.gnu.org/licenses/>. */
  76893. #define FP_ROUNDMODE FP_RND_ZERO
  76894. #include "soft-fp.h"
  76895. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtoll.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_qtoll.c
  76896. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtoll.c 2012-05-15 09:20:09.000000000 +0200
  76897. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_qtoll.c 2014-07-25 20:36:07.653339122 +0200
  76898. @@ -16,9 +16,8 @@
  76899. Lesser General Public License for more details.
  76900. You should have received a copy of the GNU Lesser General Public
  76901. - License along with the GNU C Library; if not, write to the Free
  76902. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76903. - 02111-1307 USA. */
  76904. + License along with the GNU C Library; if not, see
  76905. + <http://www.gnu.org/licenses/>. */
  76906. #define FP_ROUNDMODE FP_RND_ZERO
  76907. #include "soft-fp.h"
  76908. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtos.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_qtos.c
  76909. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtos.c 2012-05-15 09:20:09.000000000 +0200
  76910. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_qtos.c 2014-07-25 20:36:07.653339122 +0200
  76911. @@ -16,9 +16,8 @@
  76912. Lesser General Public License for more details.
  76913. You should have received a copy of the GNU Lesser General Public
  76914. - License along with the GNU C Library; if not, write to the Free
  76915. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76916. - 02111-1307 USA. */
  76917. + License along with the GNU C Library; if not, see
  76918. + <http://www.gnu.org/licenses/>. */
  76919. #include "soft-fp.h"
  76920. #include "single.h"
  76921. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtou.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_qtou.c
  76922. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtou.c 2012-05-15 09:20:09.000000000 +0200
  76923. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_qtou.c 2014-07-25 20:36:07.653339122 +0200
  76924. @@ -16,9 +16,8 @@
  76925. Lesser General Public License for more details.
  76926. You should have received a copy of the GNU Lesser General Public
  76927. - License along with the GNU C Library; if not, write to the Free
  76928. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76929. - 02111-1307 USA. */
  76930. + License along with the GNU C Library; if not, see
  76931. + <http://www.gnu.org/licenses/>. */
  76932. #define FP_ROUNDMODE FP_RND_ZERO
  76933. #include "soft-fp.h"
  76934. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtoull.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_qtoull.c
  76935. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_qtoull.c 2012-05-15 09:20:09.000000000 +0200
  76936. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_qtoull.c 2014-07-25 20:36:07.653339122 +0200
  76937. @@ -16,9 +16,8 @@
  76938. Lesser General Public License for more details.
  76939. You should have received a copy of the GNU Lesser General Public
  76940. - License along with the GNU C Library; if not, write to the Free
  76941. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76942. - 02111-1307 USA. */
  76943. + License along with the GNU C Library; if not, see
  76944. + <http://www.gnu.org/licenses/>. */
  76945. #define FP_ROUNDMODE FP_RND_ZERO
  76946. #include "soft-fp.h"
  76947. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_sqrt.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_sqrt.c
  76948. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_sqrt.c 2012-05-15 09:20:09.000000000 +0200
  76949. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_sqrt.c 2014-07-25 20:36:07.653339122 +0200
  76950. @@ -16,9 +16,8 @@
  76951. Lesser General Public License for more details.
  76952. You should have received a copy of the GNU Lesser General Public
  76953. - License along with the GNU C Library; if not, write to the Free
  76954. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76955. - 02111-1307 USA. */
  76956. + License along with the GNU C Library; if not, see
  76957. + <http://www.gnu.org/licenses/>. */
  76958. #include "soft-fp.h"
  76959. #include "quad.h"
  76960. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_stoq.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_stoq.c
  76961. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_stoq.c 2012-05-15 09:20:09.000000000 +0200
  76962. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_stoq.c 2014-07-25 20:36:07.653339122 +0200
  76963. @@ -16,9 +16,8 @@
  76964. Lesser General Public License for more details.
  76965. You should have received a copy of the GNU Lesser General Public
  76966. - License along with the GNU C Library; if not, write to the Free
  76967. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76968. - 02111-1307 USA. */
  76969. + License along with the GNU C Library; if not, see
  76970. + <http://www.gnu.org/licenses/>. */
  76971. #include "soft-fp.h"
  76972. #include "single.h"
  76973. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_sub.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_sub.c
  76974. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_sub.c 2012-05-15 09:20:09.000000000 +0200
  76975. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_sub.c 2014-07-25 20:36:07.653339122 +0200
  76976. @@ -16,9 +16,8 @@
  76977. Lesser General Public License for more details.
  76978. You should have received a copy of the GNU Lesser General Public
  76979. - License along with the GNU C Library; if not, write to the Free
  76980. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  76981. - 02111-1307 USA. */
  76982. + License along with the GNU C Library; if not, see
  76983. + <http://www.gnu.org/licenses/>. */
  76984. #include "soft-fp.h"
  76985. #include "quad.h"
  76986. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/quad.h uClibc-git/libc/sysdeps/linux/sparc/soft-fp/quad.h
  76987. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/quad.h 2012-05-15 09:20:09.000000000 +0200
  76988. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/quad.h 2014-07-25 20:36:07.657339142 +0200
  76989. @@ -27,9 +27,8 @@
  76990. Lesser General Public License for more details.
  76991. You should have received a copy of the GNU Lesser General Public
  76992. - License along with the GNU C Library; if not, write to the Free
  76993. - Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
  76994. - MA 02110-1301, USA. */
  76995. + License along with the GNU C Library; if not, see
  76996. + <http://www.gnu.org/licenses/>. */
  76997. #if _FP_W_TYPE_SIZE < 32
  76998. #error "Here's a nickel, kid. Go buy yourself a real computer."
  76999. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_ulltoq.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_ulltoq.c
  77000. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_ulltoq.c 2012-05-15 09:20:09.000000000 +0200
  77001. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_ulltoq.c 2014-07-25 20:36:07.657339142 +0200
  77002. @@ -16,9 +16,8 @@
  77003. Lesser General Public License for more details.
  77004. You should have received a copy of the GNU Lesser General Public
  77005. - License along with the GNU C Library; if not, write to the Free
  77006. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77007. - 02111-1307 USA. */
  77008. + License along with the GNU C Library; if not, see
  77009. + <http://www.gnu.org/licenses/>. */
  77010. #include "soft-fp.h"
  77011. #include "quad.h"
  77012. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_util.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_util.c
  77013. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_util.c 2012-05-15 09:20:09.000000000 +0200
  77014. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_util.c 2014-07-25 20:36:07.657339142 +0200
  77015. @@ -16,9 +16,8 @@
  77016. Lesser General Public License for more details.
  77017. You should have received a copy of the GNU Lesser General Public
  77018. - License along with the GNU C Library; if not, write to the Free
  77019. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77020. - 02111-1307 USA. */
  77021. + License along with the GNU C Library; if not, see
  77022. + <http://www.gnu.org/licenses/>. */
  77023. #include "soft-fp.h"
  77024. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_utoq.c uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_utoq.c
  77025. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/q_utoq.c 2012-05-15 09:20:09.000000000 +0200
  77026. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/q_utoq.c 2014-07-25 20:36:07.657339142 +0200
  77027. @@ -16,9 +16,8 @@
  77028. Lesser General Public License for more details.
  77029. You should have received a copy of the GNU Lesser General Public
  77030. - License along with the GNU C Library; if not, write to the Free
  77031. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77032. - 02111-1307 USA. */
  77033. + License along with the GNU C Library; if not, see
  77034. + <http://www.gnu.org/licenses/>. */
  77035. #include "soft-fp.h"
  77036. #include "quad.h"
  77037. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/sfp-machine.h uClibc-git/libc/sysdeps/linux/sparc/soft-fp/sfp-machine.h
  77038. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/sfp-machine.h 2012-05-15 09:20:09.000000000 +0200
  77039. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/sfp-machine.h 2014-07-25 20:36:07.657339142 +0200
  77040. @@ -17,9 +17,8 @@
  77041. Lesser General Public License for more details.
  77042. You should have received a copy of the GNU Lesser General Public
  77043. - License along with the GNU C Library; if not, write to the Free
  77044. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77045. - 02111-1307 USA. */
  77046. + License along with the GNU C Library; if not, see
  77047. + <http://www.gnu.org/licenses/>. */
  77048. #include <fpu_control.h>
  77049. #include <stdlib.h>
  77050. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/single.h uClibc-git/libc/sysdeps/linux/sparc/soft-fp/single.h
  77051. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/single.h 2012-05-15 09:20:09.000000000 +0200
  77052. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/single.h 2014-07-25 20:36:07.657339142 +0200
  77053. @@ -27,9 +27,8 @@
  77054. Lesser General Public License for more details.
  77055. You should have received a copy of the GNU Lesser General Public
  77056. - License along with the GNU C Library; if not, write to the Free
  77057. - Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
  77058. - MA 02110-1301, USA. */
  77059. + License along with the GNU C Library; if not, see
  77060. + <http://www.gnu.org/licenses/>. */
  77061. #if _FP_W_TYPE_SIZE < 32
  77062. #error "Here's a nickel kid. Go buy yourself a real computer."
  77063. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/soft-fp.h uClibc-git/libc/sysdeps/linux/sparc/soft-fp/soft-fp.h
  77064. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/soft-fp/soft-fp.h 2012-05-15 09:20:09.000000000 +0200
  77065. +++ uClibc-git/libc/sysdeps/linux/sparc/soft-fp/soft-fp.h 2014-07-25 20:36:07.657339142 +0200
  77066. @@ -27,9 +27,8 @@
  77067. Lesser General Public License for more details.
  77068. You should have received a copy of the GNU Lesser General Public
  77069. - License along with the GNU C Library; if not, write to the Free
  77070. - Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
  77071. - MA 02110-1301, USA. */
  77072. + License along with the GNU C Library; if not, see
  77073. + <http://www.gnu.org/licenses/>. */
  77074. #ifndef SOFT_FP_H
  77075. #define SOFT_FP_H
  77076. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sparcv9/clone.S uClibc-git/libc/sysdeps/linux/sparc/sparcv9/clone.S
  77077. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sparcv9/clone.S 2012-05-15 09:20:09.000000000 +0200
  77078. +++ uClibc-git/libc/sysdeps/linux/sparc/sparcv9/clone.S 2014-07-25 20:36:07.689339310 +0200
  77079. @@ -13,9 +13,8 @@
  77080. Lesser General Public License for more details.
  77081. You should have received a copy of the GNU Lesser General Public
  77082. - License along with the GNU C Library; if not, write to the Free
  77083. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77084. - 02111-1307 USA. */
  77085. + License along with the GNU C Library; if not, see
  77086. + <http://www.gnu.org/licenses/>. */
  77087. /* clone() is even more special than fork() as it mucks with stacks
  77088. and invokes a function in the right context after its all over. */
  77089. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sys/procfs.h uClibc-git/libc/sysdeps/linux/sparc/sys/procfs.h
  77090. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  77091. +++ uClibc-git/libc/sysdeps/linux/sparc/sys/procfs.h 2014-07-25 20:36:07.705339394 +0200
  77092. @@ -12,9 +12,8 @@
  77093. Lesser General Public License for more details.
  77094. You should have received a copy of the GNU Lesser General Public
  77095. - License along with the GNU C Library; if not, write to the Free
  77096. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77097. - 02111-1307 USA. */
  77098. + License along with the GNU C Library; if not, see
  77099. + <http://www.gnu.org/licenses/>. */
  77100. #ifndef _SYS_PROCFS_H
  77101. #define _SYS_PROCFS_H 1
  77102. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sys/ptrace.h uClibc-git/libc/sysdeps/linux/sparc/sys/ptrace.h
  77103. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sys/ptrace.h 2012-05-15 09:20:09.000000000 +0200
  77104. +++ uClibc-git/libc/sysdeps/linux/sparc/sys/ptrace.h 2014-07-25 20:36:07.705339394 +0200
  77105. @@ -13,9 +13,8 @@
  77106. Lesser General Public License for more details.
  77107. You should have received a copy of the GNU Lesser General Public
  77108. - License along with the GNU C Library; if not, write to the Free
  77109. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77110. - 02111-1307 USA. */
  77111. + License along with the GNU C Library; if not, see
  77112. + <http://www.gnu.org/licenses/>. */
  77113. #ifndef _SYS_PTRACE_H
  77114. #define _SYS_PTRACE_H 1
  77115. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sys/ucontext.h uClibc-git/libc/sysdeps/linux/sparc/sys/ucontext.h
  77116. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  77117. +++ uClibc-git/libc/sysdeps/linux/sparc/sys/ucontext.h 2014-07-25 20:36:07.705339394 +0200
  77118. @@ -12,9 +12,8 @@
  77119. Lesser General Public License for more details.
  77120. You should have received a copy of the GNU Lesser General Public
  77121. - License along with the GNU C Library; if not, write to the Free
  77122. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77123. - 02111-1307 USA. */
  77124. + License along with the GNU C Library; if not, see
  77125. + <http://www.gnu.org/licenses/>. */
  77126. #ifndef _SYS_UCONTEXT_H
  77127. #define _SYS_UCONTEXT_H 1
  77128. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sys/user.h uClibc-git/libc/sysdeps/linux/sparc/sys/user.h
  77129. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/sys/user.h 2012-05-15 09:20:09.000000000 +0200
  77130. +++ uClibc-git/libc/sysdeps/linux/sparc/sys/user.h 2014-07-25 20:36:07.705339394 +0200
  77131. @@ -12,9 +12,8 @@
  77132. Lesser General Public License for more details.
  77133. You should have received a copy of the GNU Lesser General Public
  77134. - License along with the GNU C Library; if not, write to the Free
  77135. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77136. - 02111-1307 USA. */
  77137. + License along with the GNU C Library; if not, see
  77138. + <http://www.gnu.org/licenses/>. */
  77139. #ifndef _SYS_USER_H
  77140. #define _SYS_USER_H 1
  77141. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/syscall.S uClibc-git/libc/sysdeps/linux/sparc/syscall.S
  77142. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/syscall.S 2012-05-15 09:20:09.000000000 +0200
  77143. +++ uClibc-git/libc/sysdeps/linux/sparc/syscall.S 2014-07-25 20:36:07.705339394 +0200
  77144. @@ -12,9 +12,8 @@
  77145. Lesser General Public License for more details.
  77146. You should have received a copy of the GNU Lesser General Public
  77147. - License along with the GNU C Library; if not, write to the Free
  77148. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77149. - 02111-1307 USA. */
  77150. + License along with the GNU C Library; if not, see
  77151. + <http://www.gnu.org/licenses/>. */
  77152. #include <features.h>
  77153. #include <sys/syscall.h>
  77154. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/sparc/vfork.S uClibc-git/libc/sysdeps/linux/sparc/vfork.S
  77155. --- uClibc-0.9.33.2/libc/sysdeps/linux/sparc/vfork.S 2012-05-15 09:20:09.000000000 +0200
  77156. +++ uClibc-git/libc/sysdeps/linux/sparc/vfork.S 2014-07-25 20:36:07.705339394 +0200
  77157. @@ -13,9 +13,8 @@
  77158. Lesser General Public License for more details.
  77159. You should have received a copy of the GNU Lesser General Public
  77160. - License along with the GNU C Library; if not, write to the Free
  77161. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77162. - 02111-1307 USA. */
  77163. + License along with the GNU C Library; if not, see
  77164. + <http://www.gnu.org/licenses/>. */
  77165. /* Code taken from glibc2.2.2/sysdeps/unix/sysv/linux/sparc/vfork.S */
  77166. @@ -52,4 +51,4 @@
  77167. .size __vfork,.-__vfork
  77168. weak_alias(__vfork,vfork)
  77169. -libc_hidden_weak(vfork)
  77170. +libc_hidden_def(vfork)
  77171. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/fcntl.h uClibc-git/libc/sysdeps/linux/v850/bits/fcntl.h
  77172. --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  77173. +++ uClibc-git/libc/sysdeps/linux/v850/bits/fcntl.h 2014-07-25 20:36:07.733339541 +0200
  77174. @@ -13,9 +13,8 @@
  77175. Lesser General Public License for more details.
  77176. You should have received a copy of the GNU Lesser General Public
  77177. - License along with the GNU C Library; if not, write to the Free
  77178. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77179. - 02111-1307 USA. */
  77180. + License along with the GNU C Library; if not, see
  77181. + <http://www.gnu.org/licenses/>. */
  77182. #ifndef _FCNTL_H
  77183. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  77184. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/v850/bits/kernel_types.h
  77185. --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
  77186. +++ uClibc-git/libc/sysdeps/linux/v850/bits/kernel_types.h 2014-07-25 20:36:07.733339541 +0200
  77187. @@ -41,6 +41,8 @@
  77188. typedef unsigned short __kernel_old_uid_t;
  77189. typedef unsigned short __kernel_old_gid_t;
  77190. typedef __kernel_dev_t __kernel_old_dev_t;
  77191. +typedef long __kernel_long_t;
  77192. +typedef unsigned long __kernel_ulong_t;
  77193. typedef struct {
  77194. #ifdef __USE_ALL
  77195. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/poll.h uClibc-git/libc/sysdeps/linux/v850/bits/poll.h
  77196. --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/poll.h 2012-05-15 09:20:09.000000000 +0200
  77197. +++ uClibc-git/libc/sysdeps/linux/v850/bits/poll.h 2014-07-25 20:36:07.733339541 +0200
  77198. @@ -12,9 +12,8 @@
  77199. Lesser General Public License for more details.
  77200. You should have received a copy of the GNU Lesser General Public
  77201. - License along with the GNU C Library; if not, write to the Free
  77202. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77203. - 02111-1307 USA. */
  77204. + License along with the GNU C Library; if not, see
  77205. + <http://www.gnu.org/licenses/>. */
  77206. #ifndef _SYS_POLL_H
  77207. # error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
  77208. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/setjmp.h uClibc-git/libc/sysdeps/linux/v850/bits/setjmp.h
  77209. --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  77210. +++ uClibc-git/libc/sysdeps/linux/v850/bits/setjmp.h 2014-07-25 20:36:07.733339541 +0200
  77211. @@ -18,7 +18,6 @@
  77212. # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
  77213. #endif
  77214. -#ifndef _ASM
  77215. typedef struct
  77216. {
  77217. /* Stack pointer. */
  77218. @@ -30,13 +29,5 @@
  77219. /* Callee-saved registers r2 and r20-r29. */
  77220. int __regs[11];
  77221. } __jmp_buf[1];
  77222. -#endif
  77223. -
  77224. -#define JB_SIZE (4 * 13)
  77225. -
  77226. -/* Test if longjmp to JMPBUF would unwind the frame
  77227. - containing a local variable at ADDRESS. */
  77228. -#define _JMPBUF_UNWINDS(jmpbuf, address) \
  77229. - ((void *) (address) < (void *) (jmpbuf)[0].__sp)
  77230. #endif /* bits/setjmp.h */
  77231. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/v850/bits/uClibc_arch_features.h
  77232. --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  77233. +++ uClibc-git/libc/sysdeps/linux/v850/bits/uClibc_arch_features.h 2014-07-25 20:36:07.733339541 +0200
  77234. @@ -10,10 +10,10 @@
  77235. #undef __UCLIBC_ABORT_INSTRUCTION__
  77236. /* can your target use syscall6() for mmap ? */
  77237. -#undef __UCLIBC_MMAP_HAS_6_ARGS__
  77238. +#define __UCLIBC_MMAP_HAS_6_ARGS__
  77239. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  77240. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  77241. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  77242. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  77243. /* does your target have a broken create_module() ? */
  77244. #undef __UCLIBC_BROKEN_CREATE_MODULE__
  77245. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/wordsize.h uClibc-git/libc/sysdeps/linux/v850/bits/wordsize.h
  77246. --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
  77247. +++ uClibc-git/libc/sysdeps/linux/v850/bits/wordsize.h 2014-07-25 20:36:07.733339541 +0200
  77248. @@ -12,8 +12,7 @@
  77249. Lesser General Public License for more details.
  77250. You should have received a copy of the GNU Lesser General Public
  77251. - License along with the GNU C Library; if not, write to the Free
  77252. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77253. - 02111-1307 USA. */
  77254. + License along with the GNU C Library; if not, see
  77255. + <http://www.gnu.org/licenses/>. */
  77256. #define __WORDSIZE 32
  77257. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/jmpbuf-offsets.h uClibc-git/libc/sysdeps/linux/v850/jmpbuf-offsets.h
  77258. --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
  77259. +++ uClibc-git/libc/sysdeps/linux/v850/jmpbuf-offsets.h 2014-07-25 20:36:07.733339541 +0200
  77260. @@ -0,0 +1,6 @@
  77261. +/*
  77262. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  77263. + *
  77264. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  77265. + */
  77266. +#define JB_SIZE (4 * 13)
  77267. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/v850/jmpbuf-unwind.h
  77268. --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  77269. +++ uClibc-git/libc/sysdeps/linux/v850/jmpbuf-unwind.h 2014-07-25 20:36:07.733339541 +0200
  77270. @@ -0,0 +1,11 @@
  77271. +/*
  77272. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  77273. + *
  77274. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  77275. + */
  77276. +#include <setjmp.h>
  77277. +
  77278. +/* Test if longjmp to JMPBUF would unwind the frame
  77279. + containing a local variable at ADDRESS. */
  77280. +#define _JMPBUF_UNWINDS(jmpbuf, address) \
  77281. + ((void *) (address) < (void *) (jmpbuf)[0].__sp)
  77282. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/__longjmp.S uClibc-git/libc/sysdeps/linux/v850/__longjmp.S
  77283. --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
  77284. +++ uClibc-git/libc/sysdeps/linux/v850/__longjmp.S 2014-07-25 20:36:07.717339457 +0200
  77285. @@ -11,11 +11,6 @@
  77286. * Written by Miles Bader <miles@gnu.org>
  77287. */
  77288. -#include <features.h>
  77289. -#define _SETJMP_H
  77290. -#define _ASM
  77291. -#include <bits/setjmp.h>
  77292. -
  77293. #include <clinkage.h>
  77294. .text
  77295. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/Makefile uClibc-git/libc/sysdeps/linux/v850/Makefile
  77296. --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/Makefile 2012-05-15 09:20:09.000000000 +0200
  77297. +++ uClibc-git/libc/sysdeps/linux/v850/Makefile 2014-07-25 20:36:07.717339457 +0200
  77298. @@ -20,7 +20,7 @@
  77299. SSRC := setjmp.S __longjmp.S vfork.S
  77300. SOBJ := $(patsubst %.S,%.o, $(SSRC))
  77301. -CSRC := mmap.c syscall.c clone.c
  77302. +CSRC := syscall.c clone.c
  77303. COBJ := $(patsubst %.c,%.o, $(CSRC))
  77304. OBJS := $(SOBJ) $(COBJ)
  77305. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/mmap.c uClibc-git/libc/sysdeps/linux/v850/mmap.c
  77306. --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/mmap.c 2012-05-15 09:20:09.000000000 +0200
  77307. +++ uClibc-git/libc/sysdeps/linux/v850/mmap.c 1970-01-01 01:00:00.000000000 +0100
  77308. @@ -1,16 +0,0 @@
  77309. -/* Use new style mmap for v850 */
  77310. -/*
  77311. - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  77312. - *
  77313. - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  77314. - */
  77315. -
  77316. -#include <unistd.h>
  77317. -#include <errno.h>
  77318. -#include <sys/mman.h>
  77319. -#include <sys/syscall.h>
  77320. -
  77321. -
  77322. -_syscall6 (__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot,
  77323. - int, flags, int, fd, __off_t, offset)
  77324. -libc_hidden_def(mmap)
  77325. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/setjmp.S uClibc-git/libc/sysdeps/linux/v850/setjmp.S
  77326. --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/setjmp.S 2012-05-15 09:20:09.000000000 +0200
  77327. +++ uClibc-git/libc/sysdeps/linux/v850/setjmp.S 2014-07-25 20:36:07.733339541 +0200
  77328. @@ -11,10 +11,6 @@
  77329. * Written by Miles Bader <miles@gnu.org>
  77330. */
  77331. -#define _SETJMP_H
  77332. -#define _ASM
  77333. -#include <bits/setjmp.h>
  77334. -
  77335. #include <clinkage.h>
  77336. .text
  77337. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/sys/procfs.h uClibc-git/libc/sysdeps/linux/v850/sys/procfs.h
  77338. --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  77339. +++ uClibc-git/libc/sysdeps/linux/v850/sys/procfs.h 2014-07-25 20:36:07.745339604 +0200
  77340. @@ -12,9 +12,8 @@
  77341. Lesser General Public License for more details.
  77342. You should have received a copy of the GNU Lesser General Public
  77343. - License along with the GNU C Library; if not, write to the Free
  77344. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77345. - 02111-1307 USA. */
  77346. + License along with the GNU C Library; if not, see
  77347. + <http://www.gnu.org/licenses/>. */
  77348. #ifndef _SYS_PROCFS_H
  77349. #define _SYS_PROCFS_H 1
  77350. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/sys/ptrace.h uClibc-git/libc/sysdeps/linux/v850/sys/ptrace.h
  77351. --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/sys/ptrace.h 2012-05-15 09:20:09.000000000 +0200
  77352. +++ uClibc-git/libc/sysdeps/linux/v850/sys/ptrace.h 2014-07-25 20:36:07.745339604 +0200
  77353. @@ -13,9 +13,8 @@
  77354. Lesser General Public License for more details.
  77355. You should have received a copy of the GNU Lesser General Public
  77356. - License along with the GNU C Library; if not, write to the Free
  77357. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77358. - 02111-1307 USA. */
  77359. + License along with the GNU C Library; if not, see
  77360. + <http://www.gnu.org/licenses/>. */
  77361. #ifndef _SYS_PTRACE_H
  77362. #define _SYS_PTRACE_H 1
  77363. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/sys/ucontext.h uClibc-git/libc/sysdeps/linux/v850/sys/ucontext.h
  77364. --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  77365. +++ uClibc-git/libc/sysdeps/linux/v850/sys/ucontext.h 2014-07-25 20:36:07.745339604 +0200
  77366. @@ -12,9 +12,8 @@
  77367. Lesser General Public License for more details.
  77368. You should have received a copy of the GNU Lesser General Public
  77369. - License along with the GNU C Library; if not, write to the Free
  77370. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77371. - 02111-1307 USA. */
  77372. + License along with the GNU C Library; if not, see
  77373. + <http://www.gnu.org/licenses/>. */
  77374. #ifndef _SYS_UCONTEXT_H
  77375. #define _SYS_UCONTEXT_H 1
  77376. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/v850/vfork.S uClibc-git/libc/sysdeps/linux/v850/vfork.S
  77377. --- uClibc-0.9.33.2/libc/sysdeps/linux/v850/vfork.S 2012-05-15 09:20:09.000000000 +0200
  77378. +++ uClibc-git/libc/sysdeps/linux/v850/vfork.S 2014-07-25 20:36:07.745339604 +0200
  77379. @@ -11,12 +11,7 @@
  77380. * Written by Miles Bader <miles@gnu.org>
  77381. */
  77382. -#include <features.h>
  77383. -#define _ERRNO_H 1
  77384. -#include <bits/errno.h>
  77385. -#define _SYSCALL_H
  77386. -#include <bits/sysnum.h>
  77387. -
  77388. +#include <sys/syscall.h>
  77389. #include <clinkage.h>
  77390. /* Clone the calling process, but without copying the whole address space.
  77391. @@ -24,8 +19,7 @@
  77392. replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
  77393. and the process ID of the new process to the old process. */
  77394. -.global C_SYMBOL_NAME(errno)
  77395. -
  77396. +/* this should be made hidden */
  77397. C_ENTRY (__vfork):
  77398. addi SYS_vfork, r0, r12
  77399. trap 0
  77400. @@ -39,4 +33,4 @@
  77401. jmp [lp] /* error return */
  77402. C_END(__vfork)
  77403. weak_alias(__vfork,vfork)
  77404. -libc_hidden_weak(vfork)
  77405. +libc_hidden_def(vfork)
  77406. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/fcntl.h uClibc-git/libc/sysdeps/linux/vax/bits/fcntl.h
  77407. --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  77408. +++ uClibc-git/libc/sysdeps/linux/vax/bits/fcntl.h 2014-07-25 20:36:07.773339751 +0200
  77409. @@ -14,8 +14,7 @@
  77410. You should have received a copy of the GNU Library General Public
  77411. License along with the GNU C Library; see the file COPYING.LIB. If not,
  77412. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  77413. - Boston, MA 02111-1307, USA. */
  77414. + see <http://www.gnu.org/licenses/>. */
  77415. #ifndef _FCNTL_H
  77416. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  77417. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/huge_val.h uClibc-git/libc/sysdeps/linux/vax/bits/huge_val.h
  77418. --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/huge_val.h 1970-01-01 01:00:00.000000000 +0100
  77419. +++ uClibc-git/libc/sysdeps/linux/vax/bits/huge_val.h 2014-07-25 20:36:07.773339751 +0200
  77420. @@ -0,0 +1,25 @@
  77421. +/* `HUGE_VAL' constant for Vaxen.
  77422. + Used by <stdlib.h> and <math.h> functions for overflow.
  77423. + Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
  77424. + This file is part of the GNU C Library.
  77425. +
  77426. + The GNU C Library is free software; you can redistribute it and/or
  77427. + modify it under the terms of the GNU Lesser General Public
  77428. + License as published by the Free Software Foundation; either
  77429. + version 2.1 of the License, or (at your option) any later version.
  77430. +
  77431. + The GNU C Library is distributed in the hope that it will be useful,
  77432. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  77433. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  77434. + Lesser General Public License for more details.
  77435. +
  77436. + You should have received a copy of the GNU Lesser General Public
  77437. + License along with the GNU C Library; if not, see
  77438. + <http://www.gnu.org/licenses/>. */
  77439. +
  77440. +#ifndef _MATH_H
  77441. +# error "Never use <bits/huge_val.h> directly; include <math.h> instead."
  77442. +#endif
  77443. +
  77444. +
  77445. +#define HUGE_VAL 1.70141182460469227e38
  77446. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/ipc.h uClibc-git/libc/sysdeps/linux/vax/bits/ipc.h
  77447. --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/ipc.h 2012-05-15 09:20:09.000000000 +0200
  77448. +++ uClibc-git/libc/sysdeps/linux/vax/bits/ipc.h 2014-07-25 20:36:07.773339751 +0200
  77449. @@ -13,8 +13,7 @@
  77450. You should have received a copy of the GNU Library General Public
  77451. License along with the GNU C Library; see the file COPYING.LIB. If not,
  77452. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  77453. - Boston, MA 02111-1307, USA. */
  77454. + see <http://www.gnu.org/licenses/>. */
  77455. #ifndef _SYS_IPC_H
  77456. # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
  77457. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/machine-gmon.h uClibc-git/libc/sysdeps/linux/vax/bits/machine-gmon.h
  77458. --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/machine-gmon.h 2012-05-15 09:20:09.000000000 +0200
  77459. +++ uClibc-git/libc/sysdeps/linux/vax/bits/machine-gmon.h 1970-01-01 01:00:00.000000000 +0100
  77460. @@ -1,41 +0,0 @@
  77461. -/* i386-specific implementation of profiling support.
  77462. - Copyright (C) 1997, 2002 Free Software Foundation, Inc.
  77463. - This file is part of the GNU C Library.
  77464. - Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
  77465. -
  77466. - The GNU C Library is free software; you can redistribute it and/or
  77467. - modify it under the terms of the GNU Lesser General Public
  77468. - License as published by the Free Software Foundation; either
  77469. - version 2.1 of the License, or (at your option) any later version.
  77470. -
  77471. - The GNU C Library is distributed in the hope that it will be useful,
  77472. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  77473. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  77474. - Lesser General Public License for more details.
  77475. -
  77476. - You should have received a copy of the GNU Lesser General Public
  77477. - License along with the GNU C Library; if not, write to the Free
  77478. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77479. - 02111-1307 USA. */
  77480. -
  77481. -#include <sysdep.h>
  77482. -
  77483. -/* We need a special version of the `mcount' function since for ix86 it
  77484. - must not clobber any register. This has several reasons:
  77485. - - there is a bug in gcc as of version 2.7.2.2 which prohibits the
  77486. - use of profiling together with nested functions
  77487. - - the ELF `fixup' function uses GCC's regparm feature
  77488. - - some (future) systems might want to pass parameters in registers. */
  77489. -
  77490. -/* We must not pollute the global namespace. */
  77491. -#define mcount_internal __mcount_internal
  77492. -
  77493. -extern void mcount_internal (u_long frompc, u_long selfpc);
  77494. -
  77495. -#define _MCOUNT_DECL(frompc, selfpc) \
  77496. -void __attribute__ (( regparm (2) )) mcount_internal (u_long frompc, u_long selfpc)
  77497. -
  77498. -
  77499. -/* Define MCOUNT as empty since we have the implementation in another
  77500. - file. */
  77501. -#define MCOUNT
  77502. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/sem.h uClibc-git/libc/sysdeps/linux/vax/bits/sem.h
  77503. --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/sem.h 2012-05-15 09:20:09.000000000 +0200
  77504. +++ uClibc-git/libc/sysdeps/linux/vax/bits/sem.h 2014-07-25 20:36:07.773339751 +0200
  77505. @@ -13,8 +13,7 @@
  77506. You should have received a copy of the GNU Library General Public
  77507. License along with the GNU C Library; see the file COPYING.LIB. If not,
  77508. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  77509. - Boston, MA 02111-1307, USA. */
  77510. + see <http://www.gnu.org/licenses/>. */
  77511. #ifndef _SYS_SEM_H
  77512. # error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
  77513. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/setjmp.h uClibc-git/libc/sysdeps/linux/vax/bits/setjmp.h
  77514. --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  77515. +++ uClibc-git/libc/sysdeps/linux/vax/bits/setjmp.h 2014-07-25 20:36:07.773339751 +0200
  77516. @@ -6,14 +6,8 @@
  77517. /* we want to save enough that we can use this to fool RET,
  77518. * So we basically save all of the CALLS stack frame. Plus regs. */
  77519. -#ifndef _ASM
  77520. typedef int __jmp_buf[16];
  77521. -#endif
  77522. -/* Test if longjmp to JMPBUF would unwind the frame
  77523. - containing a local variable at ADDRESS. */
  77524. -#define _JMPBUF_UNWINDS(jmpbuf, address) \
  77525. - ((void *) (address) < (void *) (jmpbuf[4]))
  77526. /*
  77527. jmp_buf layout. jmp_buf[0]
  77528. void *__cond; The condition handler
  77529. @@ -34,4 +28,3 @@
  77530. void *__rA; regs, r0->r11.
  77531. void *__rB; regs, r0->r11.
  77532. */
  77533. -
  77534. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/shm.h uClibc-git/libc/sysdeps/linux/vax/bits/shm.h
  77535. --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
  77536. +++ uClibc-git/libc/sysdeps/linux/vax/bits/shm.h 2014-07-25 20:36:07.773339751 +0200
  77537. @@ -13,8 +13,7 @@
  77538. You should have received a copy of the GNU Library General Public
  77539. License along with the GNU C Library; see the file COPYING.LIB. If not,
  77540. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  77541. - Boston, MA 02111-1307, USA. */
  77542. + see <http://www.gnu.org/licenses/>. */
  77543. #ifndef _SYS_SHM_H
  77544. # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
  77545. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/sigcontext.h uClibc-git/libc/sysdeps/linux/vax/bits/sigcontext.h
  77546. --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/sigcontext.h 2012-05-15 09:20:09.000000000 +0200
  77547. +++ uClibc-git/libc/sysdeps/linux/vax/bits/sigcontext.h 2014-07-25 20:36:07.773339751 +0200
  77548. @@ -13,8 +13,7 @@
  77549. You should have received a copy of the GNU Library General Public
  77550. License along with the GNU C Library; see the file COPYING.LIB. If not,
  77551. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  77552. - Boston, MA 02111-1307, USA. */
  77553. + see <http://www.gnu.org/licenses/>. */
  77554. #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
  77555. # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
  77556. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/statfs.h uClibc-git/libc/sysdeps/linux/vax/bits/statfs.h
  77557. --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/statfs.h 2012-05-15 09:20:09.000000000 +0200
  77558. +++ uClibc-git/libc/sysdeps/linux/vax/bits/statfs.h 1970-01-01 01:00:00.000000000 +0100
  77559. @@ -1,61 +0,0 @@
  77560. -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
  77561. - This file is part of the GNU C Library.
  77562. -
  77563. - The GNU C Library is free software; you can redistribute it and/or
  77564. - modify it under the terms of the GNU Library General Public License as
  77565. - published by the Free Software Foundation; either version 2 of the
  77566. - License, or (at your option) any later version.
  77567. -
  77568. - The GNU C Library is distributed in the hope that it will be useful,
  77569. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  77570. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  77571. - Library General Public License for more details.
  77572. -
  77573. - You should have received a copy of the GNU Library General Public
  77574. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  77575. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  77576. - Boston, MA 02111-1307, USA. */
  77577. -
  77578. -#ifndef _SYS_STATFS_H
  77579. -# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
  77580. -#endif
  77581. -
  77582. -#include <bits/types.h> /* for __fsid_t and __fsblkcnt_t*/
  77583. -
  77584. -struct statfs
  77585. - {
  77586. - int f_type;
  77587. - int f_bsize;
  77588. -#ifndef __USE_FILE_OFFSET64
  77589. - __fsblkcnt_t f_blocks;
  77590. - __fsblkcnt_t f_bfree;
  77591. - __fsblkcnt_t f_bavail;
  77592. - __fsfilcnt_t f_files;
  77593. - __fsfilcnt_t f_ffree;
  77594. -#else
  77595. - __fsblkcnt64_t f_blocks;
  77596. - __fsblkcnt64_t f_bfree;
  77597. - __fsblkcnt64_t f_bavail;
  77598. - __fsfilcnt64_t f_files;
  77599. - __fsfilcnt64_t f_ffree;
  77600. -#endif
  77601. - __fsid_t f_fsid;
  77602. - int f_namelen;
  77603. - int f_spare[6];
  77604. - };
  77605. -
  77606. -#ifdef __USE_LARGEFILE64
  77607. -struct statfs64
  77608. - {
  77609. - int f_type;
  77610. - int f_bsize;
  77611. - __fsblkcnt64_t f_blocks;
  77612. - __fsblkcnt64_t f_bfree;
  77613. - __fsblkcnt64_t f_bavail;
  77614. - __fsfilcnt64_t f_files;
  77615. - __fsfilcnt64_t f_ffree;
  77616. - __fsid_t f_fsid;
  77617. - int f_namelen;
  77618. - int f_spare[6];
  77619. - };
  77620. -#endif
  77621. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/vax/bits/uClibc_arch_features.h
  77622. --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  77623. +++ uClibc-git/libc/sysdeps/linux/vax/bits/uClibc_arch_features.h 2014-07-25 20:36:07.773339751 +0200
  77624. @@ -11,8 +11,8 @@
  77625. /* can your target use syscall6() for mmap ? */
  77626. #define __UCLIBC_MMAP_HAS_6_ARGS__
  77627. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  77628. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  77629. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  77630. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  77631. /* does your target have a broken create_module() ? */
  77632. #undef __UCLIBC_BROKEN_CREATE_MODULE__
  77633. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/wordsize.h uClibc-git/libc/sysdeps/linux/vax/bits/wordsize.h
  77634. --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
  77635. +++ uClibc-git/libc/sysdeps/linux/vax/bits/wordsize.h 2014-07-25 20:36:07.773339751 +0200
  77636. @@ -13,7 +13,6 @@
  77637. You should have received a copy of the GNU Library General Public
  77638. License along with the GNU C Library; see the file COPYING.LIB. If not,
  77639. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  77640. - Boston, MA 02111-1307, USA. */
  77641. + see <http://www.gnu.org/licenses/>. */
  77642. #define __WORDSIZE 32
  77643. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/brk.c uClibc-git/libc/sysdeps/linux/vax/brk.c
  77644. --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/brk.c 2012-05-15 09:20:09.000000000 +0200
  77645. +++ uClibc-git/libc/sysdeps/linux/vax/brk.c 2014-07-25 20:36:07.773339751 +0200
  77646. @@ -13,9 +13,8 @@
  77647. Lesser General Public License for more details.
  77648. You should have received a copy of the GNU Lesser General Public
  77649. - License along with the GNU C Library; if not, write to the Free
  77650. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77651. - 02111-1307 USA. */
  77652. + License along with the GNU C Library; if not, see
  77653. + <http://www.gnu.org/licenses/>. */
  77654. #include <errno.h>
  77655. #include <unistd.h>
  77656. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/clone.S uClibc-git/libc/sysdeps/linux/vax/clone.S
  77657. --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/clone.S 2012-05-15 09:20:09.000000000 +0200
  77658. +++ uClibc-git/libc/sysdeps/linux/vax/clone.S 2014-07-25 20:36:07.773339751 +0200
  77659. @@ -12,8 +12,7 @@
  77660. You should have received a copy of the GNU Library General Public
  77661. License along with the GNU C Library; see the file COPYING.LIB. If not,
  77662. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  77663. - Boston, MA 02111-1307, USA. */
  77664. + see <http://www.gnu.org/licenses/>. */
  77665. /* clone() is even more special than fork() as it mucks with stacks
  77666. and invokes a function in the right context after its all over. */
  77667. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/vax/jmpbuf-unwind.h
  77668. --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  77669. +++ uClibc-git/libc/sysdeps/linux/vax/jmpbuf-unwind.h 2014-07-25 20:36:07.781339792 +0200
  77670. @@ -0,0 +1,11 @@
  77671. +/*
  77672. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  77673. + *
  77674. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  77675. + */
  77676. +#include <setjmp.h>
  77677. +
  77678. +/* Test if longjmp to JMPBUF would unwind the frame
  77679. + containing a local variable at ADDRESS. */
  77680. +#define _JMPBUF_UNWINDS(jmpbuf, address) \
  77681. + ((void *) (address) < (void *) (jmpbuf[4]))
  77682. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/Makefile.arch uClibc-git/libc/sysdeps/linux/vax/Makefile.arch
  77683. --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
  77684. +++ uClibc-git/libc/sysdeps/linux/vax/Makefile.arch 2014-07-25 20:36:07.757339667 +0200
  77685. @@ -6,5 +6,5 @@
  77686. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  77687. #
  77688. -CSRC := brk.c mmap.c
  77689. -SSRC := __longjmp.S setjmp.S _setjmp.S clone.S
  77690. +CSRC-y := brk.c
  77691. +SSRC-y := __longjmp.S setjmp.S _setjmp.S clone.S
  77692. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/mmap.c uClibc-git/libc/sysdeps/linux/vax/mmap.c
  77693. --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/mmap.c 2012-05-15 09:20:09.000000000 +0200
  77694. +++ uClibc-git/libc/sysdeps/linux/vax/mmap.c 1970-01-01 01:00:00.000000000 +0100
  77695. @@ -1,10 +0,0 @@
  77696. -
  77697. -#include <unistd.h>
  77698. -#include <sys/mman.h>
  77699. -#include <errno.h>
  77700. -#include <sys/syscall.h>
  77701. -
  77702. -_syscall6 (void *, mmap, void *, start, size_t, length, int, prot, int, flags,
  77703. - int, fd, off_t, offset)
  77704. -libc_hidden_def(mmap)
  77705. -
  77706. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/sys/procfs.h uClibc-git/libc/sysdeps/linux/vax/sys/procfs.h
  77707. --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  77708. +++ uClibc-git/libc/sysdeps/linux/vax/sys/procfs.h 2014-07-25 20:36:07.793339855 +0200
  77709. @@ -12,9 +12,8 @@
  77710. Lesser General Public License for more details.
  77711. You should have received a copy of the GNU Lesser General Public
  77712. - License along with the GNU C Library; if not, write to the Free
  77713. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77714. - 02111-1307 USA. */
  77715. + License along with the GNU C Library; if not, see
  77716. + <http://www.gnu.org/licenses/>. */
  77717. #ifndef _SYS_PROCFS_H
  77718. #define _SYS_PROCFS_H 1
  77719. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/vax/sys/ucontext.h uClibc-git/libc/sysdeps/linux/vax/sys/ucontext.h
  77720. --- uClibc-0.9.33.2/libc/sysdeps/linux/vax/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  77721. +++ uClibc-git/libc/sysdeps/linux/vax/sys/ucontext.h 2014-07-25 20:36:07.793339855 +0200
  77722. @@ -12,9 +12,8 @@
  77723. Lesser General Public License for more details.
  77724. You should have received a copy of the GNU Lesser General Public
  77725. - License along with the GNU C Library; if not, write to the Free
  77726. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77727. - 02111-1307 USA. */
  77728. + License along with the GNU C Library; if not, see
  77729. + <http://www.gnu.org/licenses/>. */
  77730. /* Don't rely on this, the interface is currently messed up and may need to
  77731. be broken to be fixed. */
  77732. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/atomic.h uClibc-git/libc/sysdeps/linux/x86_64/bits/atomic.h
  77733. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/atomic.h 2012-05-15 09:20:09.000000000 +0200
  77734. +++ uClibc-git/libc/sysdeps/linux/x86_64/bits/atomic.h 2014-07-25 20:36:07.813339960 +0200
  77735. @@ -13,9 +13,8 @@
  77736. Lesser General Public License for more details.
  77737. You should have received a copy of the GNU Lesser General Public
  77738. - License along with the GNU C Library; if not, write to the Free
  77739. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77740. - 02111-1307 USA. */
  77741. + License along with the GNU C Library; if not, see
  77742. + <http://www.gnu.org/licenses/>. */
  77743. #include <stdint.h>
  77744. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/byteswap.h uClibc-git/libc/sysdeps/linux/x86_64/bits/byteswap.h
  77745. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/byteswap.h 2012-05-15 09:20:09.000000000 +0200
  77746. +++ uClibc-git/libc/sysdeps/linux/x86_64/bits/byteswap.h 2014-07-25 20:36:07.813339960 +0200
  77747. @@ -13,9 +13,8 @@
  77748. Lesser General Public License for more details.
  77749. You should have received a copy of the GNU Lesser General Public
  77750. - License along with the GNU C Library; if not, write to the Free
  77751. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77752. - 02111-1307 USA. */
  77753. + License along with the GNU C Library; if not, see
  77754. + <http://www.gnu.org/licenses/>. */
  77755. #ifndef _ASM_BITS_BYTESWAP_H
  77756. #define _ASM_BITS_BYTESWAP_H 1
  77757. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/environments.h uClibc-git/libc/sysdeps/linux/x86_64/bits/environments.h
  77758. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/environments.h 2012-05-15 09:20:09.000000000 +0200
  77759. +++ uClibc-git/libc/sysdeps/linux/x86_64/bits/environments.h 2014-07-25 20:36:07.813339960 +0200
  77760. @@ -12,9 +12,8 @@
  77761. Lesser General Public License for more details.
  77762. You should have received a copy of the GNU Lesser General Public
  77763. - License along with the GNU C Library; if not, write to the Free
  77764. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77765. - 02111-1307 USA. */
  77766. + License along with the GNU C Library; if not, see
  77767. + <http://www.gnu.org/licenses/>. */
  77768. #ifndef _UNISTD_H
  77769. # error "Never include this file directly. Use <unistd.h> instead"
  77770. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/fcntl.h uClibc-git/libc/sysdeps/linux/x86_64/bits/fcntl.h
  77771. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  77772. +++ uClibc-git/libc/sysdeps/linux/x86_64/bits/fcntl.h 2014-07-25 20:36:07.813339960 +0200
  77773. @@ -13,9 +13,8 @@
  77774. Lesser General Public License for more details.
  77775. You should have received a copy of the GNU Lesser General Public
  77776. - License along with the GNU C Library; if not, write to the Free
  77777. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77778. - 02111-1307 USA. */
  77779. + License along with the GNU C Library; if not, see
  77780. + <http://www.gnu.org/licenses/>. */
  77781. #ifndef _FCNTL_H
  77782. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  77783. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/fenv.h uClibc-git/libc/sysdeps/linux/x86_64/bits/fenv.h
  77784. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/fenv.h 2012-05-15 09:20:09.000000000 +0200
  77785. +++ uClibc-git/libc/sysdeps/linux/x86_64/bits/fenv.h 2014-07-25 20:36:07.813339960 +0200
  77786. @@ -12,9 +12,8 @@
  77787. Lesser General Public License for more details.
  77788. You should have received a copy of the GNU Lesser General Public
  77789. - License along with the GNU C Library; if not, write to the Free
  77790. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77791. - 02111-1307 USA. */
  77792. + License along with the GNU C Library; if not, see
  77793. + <http://www.gnu.org/licenses/>. */
  77794. #ifndef _FENV_H
  77795. # error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
  77796. @@ -89,9 +88,9 @@
  77797. fenv_t;
  77798. /* If the default argument is used we use this value. */
  77799. -#define FE_DFL_ENV ((__const fenv_t *) -1)
  77800. +#define FE_DFL_ENV ((const fenv_t *) -1)
  77801. #ifdef __USE_GNU
  77802. /* Floating-point environment where none of the exception is masked. */
  77803. -# define FE_NOMASK_ENV ((__const fenv_t *) -2)
  77804. +# define FE_NOMASK_ENV ((const fenv_t *) -2)
  77805. #endif
  77806. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/x86_64/bits/kernel_types.h
  77807. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
  77808. +++ uClibc-git/libc/sysdeps/linux/x86_64/bits/kernel_types.h 2014-07-25 20:36:07.813339960 +0200
  77809. @@ -40,6 +40,8 @@
  77810. typedef unsigned short __kernel_old_uid_t;
  77811. typedef unsigned short __kernel_old_gid_t;
  77812. typedef __kernel_dev_t __kernel_old_dev_t;
  77813. +typedef long __kernel_long_t;
  77814. +typedef unsigned long __kernel_ulong_t;
  77815. typedef long long __kernel_loff_t;
  77816. typedef struct {
  77817. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/mathdef.h uClibc-git/libc/sysdeps/linux/x86_64/bits/mathdef.h
  77818. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
  77819. +++ uClibc-git/libc/sysdeps/linux/x86_64/bits/mathdef.h 2014-07-25 20:36:07.813339960 +0200
  77820. @@ -12,9 +12,8 @@
  77821. Lesser General Public License for more details.
  77822. You should have received a copy of the GNU Lesser General Public
  77823. - License along with the GNU C Library; if not, write to the Free
  77824. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77825. - 02111-1307 USA. */
  77826. + License along with the GNU C Library; if not, see
  77827. + <http://www.gnu.org/licenses/>. */
  77828. #if !defined _MATH_H && !defined _COMPLEX_H
  77829. # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
  77830. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/mathinline.h uClibc-git/libc/sysdeps/linux/x86_64/bits/mathinline.h
  77831. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/mathinline.h 2012-05-15 09:20:09.000000000 +0200
  77832. +++ uClibc-git/libc/sysdeps/linux/x86_64/bits/mathinline.h 2014-07-25 20:36:07.813339960 +0200
  77833. @@ -14,9 +14,8 @@
  77834. Lesser General Public License for more details.
  77835. You should have received a copy of the GNU Lesser General Public
  77836. - License along with the GNU C Library; if not, write to the Free
  77837. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77838. - 02111-1307 USA. */
  77839. + License along with the GNU C Library; if not, see
  77840. + <http://www.gnu.org/licenses/>. */
  77841. #ifndef _MATH_H
  77842. # error "Never use <bits/mathinline.h> directly; include <math.h> instead."
  77843. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/msq.h uClibc-git/libc/sysdeps/linux/x86_64/bits/msq.h
  77844. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/msq.h 2012-05-15 09:20:09.000000000 +0200
  77845. +++ uClibc-git/libc/sysdeps/linux/x86_64/bits/msq.h 2014-07-25 20:36:07.813339960 +0200
  77846. @@ -12,9 +12,8 @@
  77847. Lesser General Public License for more details.
  77848. You should have received a copy of the GNU Lesser General Public
  77849. - License along with the GNU C Library; if not, write to the Free
  77850. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77851. - 02111-1307 USA. */
  77852. + License along with the GNU C Library; if not, see
  77853. + <http://www.gnu.org/licenses/>. */
  77854. #ifndef _SYS_MSG_H
  77855. # error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
  77856. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/sem.h uClibc-git/libc/sysdeps/linux/x86_64/bits/sem.h
  77857. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/sem.h 2012-05-15 09:20:09.000000000 +0200
  77858. +++ uClibc-git/libc/sysdeps/linux/x86_64/bits/sem.h 2014-07-25 20:36:07.813339960 +0200
  77859. @@ -12,9 +12,8 @@
  77860. Lesser General Public License for more details.
  77861. You should have received a copy of the GNU Lesser General Public
  77862. - License along with the GNU C Library; if not, write to the Free
  77863. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77864. - 02111-1307 USA. */
  77865. + License along with the GNU C Library; if not, see
  77866. + <http://www.gnu.org/licenses/>. */
  77867. #ifndef _SYS_SEM_H
  77868. # error "Never include <bits/sem.h> directly; use <sys/sem.h> instead."
  77869. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/setjmp.h uClibc-git/libc/sysdeps/linux/x86_64/bits/setjmp.h
  77870. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  77871. +++ uClibc-git/libc/sysdeps/linux/x86_64/bits/setjmp.h 2014-07-25 20:36:07.813339960 +0200
  77872. @@ -1,4 +1,4 @@
  77873. -/* Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
  77874. +/* Copyright (C) 2001,2002,2003,2005,2006 Free Software Foundation, Inc.
  77875. This file is part of the GNU C Library.
  77876. The GNU C Library is free software; you can redistribute it and/or
  77877. @@ -12,13 +12,12 @@
  77878. Lesser General Public License for more details.
  77879. You should have received a copy of the GNU Lesser General Public
  77880. - License along with the GNU C Library; if not, write to the Free
  77881. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77882. - 02111-1307 USA. */
  77883. + License along with the GNU C Library; if not, see
  77884. + <http://www.gnu.org/licenses/>. */
  77885. /* Define the machine-dependent type `jmp_buf'. x86-64 version. */
  77886. #ifndef _BITS_SETJMP_H
  77887. -#define _BITS_SETJMP_H 1
  77888. +#define _BITS_SETJMP_H 1
  77889. #if !defined _SETJMP_H && !defined _PTHREAD_H
  77890. # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
  77891. @@ -27,52 +26,9 @@
  77892. #include <bits/wordsize.h>
  77893. #if __WORDSIZE == 64
  77894. -
  77895. -/* We only need to save callee-saved registers plus stackpointer and
  77896. - program counter. */
  77897. -# if defined __USE_MISC || defined _ASM
  77898. -# define JB_RBX 0
  77899. -# define JB_RBP 1
  77900. -# define JB_R12 2
  77901. -# define JB_R13 3
  77902. -# define JB_R14 4
  77903. -# define JB_R15 5
  77904. -# define JB_RSP 6
  77905. -# define JB_PC 7
  77906. -# define JB_SIZE (8*8)
  77907. -# endif
  77908. -
  77909. -#else
  77910. -
  77911. -# if defined __USE_MISC || defined _ASM
  77912. -# define JB_BX 0
  77913. -# define JB_SI 1
  77914. -# define JB_DI 2
  77915. -# define JB_BP 3
  77916. -# define JB_SP 4
  77917. -# define JB_PC 5
  77918. -# define JB_SIZE 24
  77919. -# endif
  77920. -
  77921. -#endif
  77922. -
  77923. -#ifndef _ASM
  77924. -
  77925. -# if __WORDSIZE == 64
  77926. typedef long int __jmp_buf[8];
  77927. -# else
  77928. +#else
  77929. typedef int __jmp_buf[6];
  77930. -# endif
  77931. -
  77932. -/* Test if longjmp to JMPBUF would unwind the frame
  77933. - containing a local variable at ADDRESS. */
  77934. -# if __WORDSIZE == 64
  77935. -# define _JMPBUF_UNWINDS(jmpbuf, address) \
  77936. - ((void *) (address) < (void *) (jmpbuf)[JB_RSP])
  77937. -# else
  77938. -# define _JMPBUF_UNWINDS(jmpbuf, address) \
  77939. - ((void *) (address) < (void *) (jmpbuf)[JB_SP])
  77940. -# endif
  77941. #endif
  77942. -#endif /* bits/setjmp.h */
  77943. +#endif /* bits/setjmp.h */
  77944. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/shm.h uClibc-git/libc/sysdeps/linux/x86_64/bits/shm.h
  77945. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
  77946. +++ uClibc-git/libc/sysdeps/linux/x86_64/bits/shm.h 2014-07-25 20:36:07.813339960 +0200
  77947. @@ -13,9 +13,8 @@
  77948. Lesser General Public License for more details.
  77949. You should have received a copy of the GNU Lesser General Public
  77950. - License along with the GNU C Library; if not, write to the Free
  77951. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77952. - 02111-1307 USA. */
  77953. + License along with the GNU C Library; if not, see
  77954. + <http://www.gnu.org/licenses/>. */
  77955. #ifndef _SYS_SHM_H
  77956. # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
  77957. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/sigcontext.h uClibc-git/libc/sysdeps/linux/x86_64/bits/sigcontext.h
  77958. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/sigcontext.h 2012-05-15 09:20:09.000000000 +0200
  77959. +++ uClibc-git/libc/sysdeps/linux/x86_64/bits/sigcontext.h 2014-07-25 20:36:07.813339960 +0200
  77960. @@ -12,9 +12,8 @@
  77961. Lesser General Public License for more details.
  77962. You should have received a copy of the GNU Lesser General Public
  77963. - License along with the GNU C Library; if not, write to the Free
  77964. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77965. - 02111-1307 USA. */
  77966. + License along with the GNU C Library; if not, see
  77967. + <http://www.gnu.org/licenses/>. */
  77968. #ifndef _BITS_SIGCONTEXT_H
  77969. #define _BITS_SIGCONTEXT_H 1
  77970. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/sigcontextinfo.h uClibc-git/libc/sysdeps/linux/x86_64/bits/sigcontextinfo.h
  77971. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
  77972. +++ uClibc-git/libc/sysdeps/linux/x86_64/bits/sigcontextinfo.h 2014-07-25 20:36:07.813339960 +0200
  77973. @@ -12,9 +12,8 @@
  77974. Lesser General Public License for more details.
  77975. You should have received a copy of the GNU Lesser General Public
  77976. - License along with the GNU C Library; if not, write to the Free
  77977. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77978. - 02111-1307 USA. */
  77979. + License along with the GNU C Library; if not, see
  77980. + <http://www.gnu.org/licenses/>. */
  77981. #define SIGCONTEXT siginfo_t *_si, struct ucontext *
  77982. #define SIGCONTEXT_EXTRA_ARGS _si,
  77983. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/x86_64/bits/stackinfo.h
  77984. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  77985. +++ uClibc-git/libc/sysdeps/linux/x86_64/bits/stackinfo.h 2014-07-25 20:36:07.813339960 +0200
  77986. @@ -12,9 +12,8 @@
  77987. Lesser General Public License for more details.
  77988. You should have received a copy of the GNU Lesser General Public
  77989. - License along with the GNU C Library; if not, write to the Free
  77990. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  77991. - 02111-1307 USA. */
  77992. + License along with the GNU C Library; if not, see
  77993. + <http://www.gnu.org/licenses/>. */
  77994. /* This file contains a bit of information about the stack allocation
  77995. of the processor. */
  77996. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/stat.h uClibc-git/libc/sysdeps/linux/x86_64/bits/stat.h
  77997. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
  77998. +++ uClibc-git/libc/sysdeps/linux/x86_64/bits/stat.h 2014-07-25 20:36:07.813339960 +0200
  77999. @@ -12,9 +12,8 @@
  78000. Lesser General Public License for more details.
  78001. You should have received a copy of the GNU Lesser General Public
  78002. - License along with the GNU C Library; if not, write to the Free
  78003. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  78004. - 02111-1307 USA. */
  78005. + License along with the GNU C Library; if not, see
  78006. + <http://www.gnu.org/licenses/>. */
  78007. #ifndef _SYS_STAT_H
  78008. # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
  78009. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h
  78010. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  78011. +++ uClibc-git/libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h 2014-07-25 20:36:07.813339960 +0200
  78012. @@ -11,8 +11,8 @@
  78013. /* can your target use syscall6() for mmap ? */
  78014. #define __UCLIBC_MMAP_HAS_6_ARGS__
  78015. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  78016. -#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  78017. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  78018. +#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
  78019. /* does your target have a broken create_module() ? */
  78020. #undef __UCLIBC_BROKEN_CREATE_MODULE__
  78021. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/brk.c uClibc-git/libc/sysdeps/linux/x86_64/brk.c
  78022. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/brk.c 2012-05-15 09:20:09.000000000 +0200
  78023. +++ uClibc-git/libc/sysdeps/linux/x86_64/brk.c 2014-07-25 20:36:07.813339960 +0200
  78024. @@ -13,9 +13,8 @@
  78025. Lesser General Public License for more details.
  78026. You should have received a copy of the GNU Lesser General Public
  78027. - License along with the GNU C Library; if not, write to the Free
  78028. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  78029. - 02111-1307 USA. */
  78030. + License along with the GNU C Library; if not, see
  78031. + <http://www.gnu.org/licenses/>. */
  78032. #include <errno.h>
  78033. #include <unistd.h>
  78034. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bsd-setjmp.S uClibc-git/libc/sysdeps/linux/x86_64/bsd-setjmp.S
  78035. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bsd-setjmp.S 2012-05-15 09:20:09.000000000 +0200
  78036. +++ uClibc-git/libc/sysdeps/linux/x86_64/bsd-setjmp.S 2014-07-25 20:36:07.813339960 +0200
  78037. @@ -13,14 +13,8 @@
  78038. Lesser General Public License for more details.
  78039. You should have received a copy of the GNU Lesser General Public
  78040. - License along with the GNU C Library; if not, write to the Free
  78041. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  78042. - 02111-1307 USA. */
  78043. -
  78044. -#define _ASM
  78045. -#define _SETJMP_H
  78046. -#include <bits/setjmp.h>
  78047. -#include <sysdep.h>
  78048. + License along with the GNU C Library; if not, see
  78049. + <http://www.gnu.org/licenses/>. */
  78050. .global setjmp
  78051. .type setjmp,%function
  78052. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bsd-_setjmp.S uClibc-git/libc/sysdeps/linux/x86_64/bsd-_setjmp.S
  78053. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/bsd-_setjmp.S 2012-05-15 09:20:09.000000000 +0200
  78054. +++ uClibc-git/libc/sysdeps/linux/x86_64/bsd-_setjmp.S 2014-07-25 20:36:07.813339960 +0200
  78055. @@ -13,9 +13,8 @@
  78056. Lesser General Public License for more details.
  78057. You should have received a copy of the GNU Lesser General Public
  78058. - License along with the GNU C Library; if not, write to the Free
  78059. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  78060. - 02111-1307 USA. */
  78061. + License along with the GNU C Library; if not, see
  78062. + <http://www.gnu.org/licenses/>. */
  78063. /* This just does a tail-call to `__sigsetjmp (ARG, 0)'.
  78064. We cannot do it in C because it must be a tail-call, so frame-unwinding
  78065. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/clone.S uClibc-git/libc/sysdeps/linux/x86_64/clone.S
  78066. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/clone.S 2012-05-15 09:20:09.000000000 +0200
  78067. +++ uClibc-git/libc/sysdeps/linux/x86_64/clone.S 2014-07-25 20:36:07.813339960 +0200
  78068. @@ -12,9 +12,8 @@
  78069. Lesser General Public License for more details.
  78070. You should have received a copy of the GNU Lesser General Public
  78071. - License along with the GNU C Library; if not, write to the Free
  78072. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  78073. - 02111-1307 USA. */
  78074. + License along with the GNU C Library; if not, see
  78075. + <http://www.gnu.org/licenses/>. */
  78076. /* clone() is even more special than fork() as it mucks with stacks
  78077. and invokes a function in the right context after its all over. */
  78078. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/crt1.S uClibc-git/libc/sysdeps/linux/x86_64/crt1.S
  78079. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/crt1.S 2012-05-15 09:20:09.000000000 +0200
  78080. +++ uClibc-git/libc/sysdeps/linux/x86_64/crt1.S 2014-07-25 20:36:07.813339960 +0200
  78081. @@ -31,9 +31,8 @@
  78082. Lesser General Public License for more details.
  78083. You should have received a copy of the GNU Lesser General Public
  78084. - License along with the GNU C Library; if not, write to the Free
  78085. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  78086. - 02111-1307 USA. */
  78087. + License along with the GNU C Library; if not, see
  78088. + <http://www.gnu.org/licenses/>. */
  78089. /* Originally based on glibc's sysdeps/x86_64/elf/start.S */
  78090. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/fpu_control.h uClibc-git/libc/sysdeps/linux/x86_64/fpu_control.h
  78091. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/fpu_control.h 2012-05-15 09:20:09.000000000 +0200
  78092. +++ uClibc-git/libc/sysdeps/linux/x86_64/fpu_control.h 2014-07-25 20:36:07.817339982 +0200
  78093. @@ -14,9 +14,8 @@
  78094. Lesser General Public License for more details.
  78095. You should have received a copy of the GNU Lesser General Public
  78096. - License along with the GNU C Library; if not, write to the Free
  78097. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  78098. - 02111-1307 USA. */
  78099. + License along with the GNU C Library; if not, see
  78100. + <http://www.gnu.org/licenses/>. */
  78101. #ifndef _FPU_CONTROL_H
  78102. #define _FPU_CONTROL_H 1
  78103. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/getcontext.S uClibc-git/libc/sysdeps/linux/x86_64/getcontext.S
  78104. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/getcontext.S 1970-01-01 01:00:00.000000000 +0100
  78105. +++ uClibc-git/libc/sysdeps/linux/x86_64/getcontext.S 2014-07-25 20:36:07.817339982 +0200
  78106. @@ -0,0 +1,88 @@
  78107. +/* Save current context.
  78108. + Copyright (C) 2002-2012 Free Software Foundation, Inc.
  78109. + This file is part of the GNU C Library.
  78110. + Contributed by Andreas Jaeger <aj@suse.de>, 2002.
  78111. +
  78112. + The GNU C Library is free software; you can redistribute it and/or
  78113. + modify it under the terms of the GNU Lesser General Public
  78114. + License as published by the Free Software Foundation; either
  78115. + version 2.1 of the License, or (at your option) any later version.
  78116. +
  78117. + The GNU C Library is distributed in the hope that it will be useful,
  78118. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  78119. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  78120. + Lesser General Public License for more details.
  78121. +
  78122. + You should have received a copy of the GNU Lesser General Public
  78123. + License along with the GNU C Library; if not, see
  78124. + <http://www.gnu.org/licenses/>. */
  78125. +
  78126. +#include <sysdep.h>
  78127. +
  78128. +#include "ucontext_i.h"
  78129. +
  78130. +/* int __getcontext (ucontext_t *ucp)
  78131. +
  78132. + Saves the machine context in UCP such that when it is activated,
  78133. + it appears as if __getcontext() returned again.
  78134. +
  78135. + This implementation is intended to be used for *synchronous* context
  78136. + switches only. Therefore, it does not have to save anything
  78137. + other than the PRESERVED state. */
  78138. +
  78139. +
  78140. +ENTRY(__getcontext)
  78141. + /* Save the preserved registers, the registers used for passing
  78142. + args, and the return address. */
  78143. + movq %rbx, oRBX(%rdi)
  78144. + movq %rbp, oRBP(%rdi)
  78145. + movq %r12, oR12(%rdi)
  78146. + movq %r13, oR13(%rdi)
  78147. + movq %r14, oR14(%rdi)
  78148. + movq %r15, oR15(%rdi)
  78149. +
  78150. + movq %rdi, oRDI(%rdi)
  78151. + movq %rsi, oRSI(%rdi)
  78152. + movq %rdx, oRDX(%rdi)
  78153. + movq %rcx, oRCX(%rdi)
  78154. + movq %r8, oR8(%rdi)
  78155. + movq %r9, oR9(%rdi)
  78156. +
  78157. + movq (%rsp), %rcx
  78158. + movq %rcx, oRIP(%rdi)
  78159. + leaq 8(%rsp), %rcx /* Exclude the return address. */
  78160. + movq %rcx, oRSP(%rdi)
  78161. +
  78162. + /* We have separate floating-point register content memory on the
  78163. + stack. We use the __fpregs_mem block in the context. Set the
  78164. + links up correctly. */
  78165. +
  78166. + leaq oFPREGSMEM(%rdi), %rcx
  78167. + movq %rcx, oFPREGS(%rdi)
  78168. + /* Save the floating-point environment. */
  78169. + fnstenv (%rcx)
  78170. + fldenv (%rcx)
  78171. + stmxcsr oMXCSR(%rdi)
  78172. +
  78173. + /* Save the current signal mask with
  78174. + rt_sigprocmask (SIG_BLOCK, NULL, set,_NSIG/8). */
  78175. + leaq oSIGMASK(%rdi), %rdx
  78176. + xorl %esi,%esi
  78177. +#if SIG_BLOCK == 0
  78178. + xorl %edi, %edi
  78179. +#else
  78180. + movl $SIG_BLOCK, %edi
  78181. +#endif
  78182. + movl $_NSIG8,%r10d
  78183. + movl $__NR_rt_sigprocmask, %eax
  78184. + syscall
  78185. + cmpq $-4095, %rax /* Check %rax for error. */
  78186. + jae SYSCALL_ERROR_LABEL /* Jump to error handler if error. */
  78187. +
  78188. + /* All done, return 0 for success. */
  78189. + xorl %eax, %eax
  78190. +L(pseudo_end):
  78191. + ret
  78192. +PSEUDO_END(__getcontext)
  78193. +
  78194. +weak_alias (__getcontext, getcontext)
  78195. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/jmpbuf-offsets.h uClibc-git/libc/sysdeps/linux/x86_64/jmpbuf-offsets.h
  78196. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
  78197. +++ uClibc-git/libc/sysdeps/linux/x86_64/jmpbuf-offsets.h 2014-07-25 20:36:07.817339982 +0200
  78198. @@ -0,0 +1,45 @@
  78199. +/* Private macros for accessing __jmp_buf contents. x86-64 version.
  78200. + Copyright (C) 2006 Free Software Foundation, Inc.
  78201. + This file is part of the GNU C Library.
  78202. +
  78203. + The GNU C Library is free software; you can redistribute it and/or
  78204. + modify it under the terms of the GNU Lesser General Public
  78205. + License as published by the Free Software Foundation; either
  78206. + version 2.1 of the License, or (at your option) any later version.
  78207. +
  78208. + The GNU C Library is distributed in the hope that it will be useful,
  78209. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  78210. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  78211. + Lesser General Public License for more details.
  78212. +
  78213. + You should have received a copy of the GNU Lesser General Public
  78214. + License along with the GNU C Library; if not, see
  78215. + <http://www.gnu.org/licenses/>. */
  78216. +
  78217. +#include <bits/wordsize.h>
  78218. +
  78219. +#if __WORDSIZE == 64
  78220. +
  78221. +/* We only need to save callee-saved registers plus stackpointer and
  78222. + program counter. */
  78223. +# define JB_RBX 0
  78224. +# define JB_RBP 1
  78225. +# define JB_R12 2
  78226. +# define JB_R13 3
  78227. +# define JB_R14 4
  78228. +# define JB_R15 5
  78229. +# define JB_RSP 6
  78230. +# define JB_PC 7
  78231. +# define JB_SIZE (8*8)
  78232. +
  78233. +#else
  78234. +
  78235. +# define JB_BX 0
  78236. +# define JB_SI 1
  78237. +# define JB_DI 2
  78238. +# define JB_BP 3
  78239. +# define JB_SP 4
  78240. +# define JB_PC 5
  78241. +# define JB_SIZE 24
  78242. +
  78243. +#endif
  78244. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/x86_64/jmpbuf-unwind.h
  78245. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  78246. +++ uClibc-git/libc/sysdeps/linux/x86_64/jmpbuf-unwind.h 2014-07-25 20:36:07.817339982 +0200
  78247. @@ -0,0 +1,28 @@
  78248. +/*
  78249. + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  78250. + *
  78251. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  78252. + */
  78253. +#include <setjmp.h>
  78254. +#include <jmpbuf-offsets.h>
  78255. +
  78256. +/* Test if longjmp to JMPBUF would unwind the frame
  78257. + containing a local variable at ADDRESS. */
  78258. +#if __WORDSIZE == 64
  78259. +# define _JMPBUF_UNWINDS(jmpbuf, address) \
  78260. + ((void *) (address) < (void *) (jmpbuf)[JB_RSP])
  78261. +#else
  78262. +# define _JMPBUF_UNWINDS(jmpbuf, address) \
  78263. + ((void *) (address) < (void *) (jmpbuf)[JB_SP])
  78264. +#endif
  78265. +
  78266. +#ifdef __UCLIBC_HAS_THREADS_NATIVE__
  78267. +#include <stdint.h>
  78268. +#include <unwind.h>
  78269. +
  78270. +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
  78271. + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
  78272. +
  78273. +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
  78274. + ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_RSP] - (_adj))
  78275. +#endif
  78276. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/__longjmp.S uClibc-git/libc/sysdeps/linux/x86_64/__longjmp.S
  78277. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
  78278. +++ uClibc-git/libc/sysdeps/linux/x86_64/__longjmp.S 2014-07-25 20:36:07.797339876 +0200
  78279. @@ -12,14 +12,10 @@
  78280. Lesser General Public License for more details.
  78281. You should have received a copy of the GNU Lesser General Public
  78282. - License along with the GNU C Library; if not, write to the Free
  78283. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  78284. - 02111-1307 USA. */
  78285. + License along with the GNU C Library; if not, see
  78286. + <http://www.gnu.org/licenses/>. */
  78287. -#include <features.h>
  78288. -#define _ASM
  78289. -#define _SETJMP_H
  78290. -#include <bits/setjmp.h>
  78291. +#include <jmpbuf-offsets.h>
  78292. /* Jump to the position specified by ENV, causing the
  78293. setjmp call there to return VAL, or 1 if VAL is 0.
  78294. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/makecontext.c uClibc-git/libc/sysdeps/linux/x86_64/makecontext.c
  78295. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/makecontext.c 1970-01-01 01:00:00.000000000 +0100
  78296. +++ uClibc-git/libc/sysdeps/linux/x86_64/makecontext.c 2014-07-25 20:36:07.817339982 +0200
  78297. @@ -0,0 +1,121 @@
  78298. +/* Create new context.
  78299. + Copyright (C) 2002, 2004, 2005, 2008 Free Software Foundation, Inc.
  78300. + This file is part of the GNU C Library.
  78301. + Contributed by Andreas Jaeger <aj@suse.de>, 2002.
  78302. +
  78303. + The GNU C Library is free software; you can redistribute it and/or
  78304. + modify it under the terms of the GNU Lesser General Public
  78305. + License as published by the Free Software Foundation; either
  78306. + version 2.1 of the License, or (at your option) any later version.
  78307. +
  78308. + The GNU C Library is distributed in the hope that it will be useful,
  78309. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  78310. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  78311. + Lesser General Public License for more details.
  78312. +
  78313. + You should have received a copy of the GNU Lesser General Public
  78314. + License along with the GNU C Library; if not, see
  78315. + <http://www.gnu.org/licenses/>. */
  78316. +
  78317. +#include <sysdep.h>
  78318. +#include <stdarg.h>
  78319. +#include <stdint.h>
  78320. +#include <ucontext.h>
  78321. +
  78322. +#include "ucontext_i.h"
  78323. +
  78324. +/* This implementation can handle any ARGC value but only
  78325. + normal integer parameters.
  78326. + makecontext sets up a stack and the registers for the
  78327. + user context. The stack looks like this:
  78328. + +-----------------------+
  78329. + | next context |
  78330. + +-----------------------+
  78331. + | parameter 7-n |
  78332. + +-----------------------+
  78333. + | trampoline address |
  78334. + %rsp -> +-----------------------+
  78335. +
  78336. + The registers are set up like this:
  78337. + %rdi,%rsi,%rdx,%rcx,%r8,%r9: parameter 1 to 6
  78338. + %rbx : address of next context
  78339. + %rsp : stack pointer.
  78340. +*/
  78341. +
  78342. +/* XXX: This implementation currently only handles integer arguments.
  78343. + To handle long int and pointer arguments the va_arg arguments needs
  78344. + to be changed to long and also the stdlib/tst-setcontext.c file needs
  78345. + to be changed to pass long arguments to makecontext. */
  78346. +
  78347. +
  78348. +void
  78349. +__makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
  78350. +{
  78351. + extern void __start_context (void);
  78352. + greg_t *sp;
  78353. + unsigned int idx_uc_link;
  78354. + va_list ap;
  78355. + int i;
  78356. +
  78357. + /* Generate room on stack for parameter if needed and uc_link. */
  78358. + sp = (greg_t *) ((uintptr_t) ucp->uc_stack.ss_sp
  78359. + + ucp->uc_stack.ss_size);
  78360. + sp -= (argc > 6 ? argc - 6 : 0) + 1;
  78361. + /* Align stack and make space for trampoline address. */
  78362. + sp = (greg_t *) ((((uintptr_t) sp) & -16L) - 8);
  78363. +
  78364. + idx_uc_link = (argc > 6 ? argc - 6 : 0) + 1;
  78365. +
  78366. + /* Setup context ucp. */
  78367. + /* Address to jump to. */
  78368. + ucp->uc_mcontext.gregs[REG_RIP] = (uintptr_t) func;
  78369. + /* Setup rbx.*/
  78370. + ucp->uc_mcontext.gregs[REG_RBX] = (uintptr_t) &sp[idx_uc_link];
  78371. + ucp->uc_mcontext.gregs[REG_RSP] = (uintptr_t) sp;
  78372. +
  78373. + /* Setup stack. */
  78374. + sp[0] = (uintptr_t) &__start_context;
  78375. + sp[idx_uc_link] = (uintptr_t) ucp->uc_link;
  78376. +
  78377. + va_start (ap, argc);
  78378. + /* Handle arguments.
  78379. +
  78380. + The standard says the parameters must all be int values. This is
  78381. + an historic accident and would be done differently today. For
  78382. + x86-64 all integer values are passed as 64-bit values and
  78383. + therefore extending the API to copy 64-bit values instead of
  78384. + 32-bit ints makes sense. It does not break existing
  78385. + functionality and it does not violate the standard which says
  78386. + that passing non-int values means undefined behavior. */
  78387. + for (i = 0; i < argc; ++i)
  78388. + switch (i)
  78389. + {
  78390. + case 0:
  78391. + ucp->uc_mcontext.gregs[REG_RDI] = va_arg (ap, greg_t);
  78392. + break;
  78393. + case 1:
  78394. + ucp->uc_mcontext.gregs[REG_RSI] = va_arg (ap, greg_t);
  78395. + break;
  78396. + case 2:
  78397. + ucp->uc_mcontext.gregs[REG_RDX] = va_arg (ap, greg_t);
  78398. + break;
  78399. + case 3:
  78400. + ucp->uc_mcontext.gregs[REG_RCX] = va_arg (ap, greg_t);
  78401. + break;
  78402. + case 4:
  78403. + ucp->uc_mcontext.gregs[REG_R8] = va_arg (ap, greg_t);
  78404. + break;
  78405. + case 5:
  78406. + ucp->uc_mcontext.gregs[REG_R9] = va_arg (ap, greg_t);
  78407. + break;
  78408. + default:
  78409. + /* Put value on stack. */
  78410. + sp[i - 5] = va_arg (ap, greg_t);
  78411. + break;
  78412. + }
  78413. + va_end (ap);
  78414. +
  78415. +}
  78416. +
  78417. +
  78418. +weak_alias (__makecontext, makecontext)
  78419. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/Makefile.arch uClibc-git/libc/sysdeps/linux/x86_64/Makefile.arch
  78420. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
  78421. +++ uClibc-git/libc/sysdeps/linux/x86_64/Makefile.arch 2014-07-25 20:36:07.797339876 +0200
  78422. @@ -5,18 +5,15 @@
  78423. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  78424. #
  78425. -CSRC := brk.c __syscall_error.c sigaction.c mmap.c
  78426. +CSRC-y := brk.c __syscall_error.c sigaction.c
  78427. -SSRC := \
  78428. +SSRC-y := \
  78429. __longjmp.S setjmp.S syscall.S bsd-setjmp.S bsd-_setjmp.S
  78430. -ifneq ($(UCLIBC_HAS_THREADS_NATIVE),y)
  78431. -SSRC += vfork.S clone.S
  78432. -endif
  78433. -
  78434. +SSRC-$(if $(UCLIBC_HAS_THREADS_NATIVE),,y) += vfork.S clone.S
  78435. +ARCH_OBJ_FILTEROUT-$(UCLIBC_LINUX_SPECIFIC) := sched_getcpu.c
  78436. ifeq ($(UCLIBC_LINUX_SPECIFIC),y)
  78437. -ARCH_OBJ_FILTEROUT = sched_getcpu.c
  78438. -ifeq ($(UCLIBC_HAS_TLS),y)
  78439. -SSRC += sched_getcpu.S
  78440. -endif
  78441. +SSRC-$(UCLIBC_HAS_TLS) += sched_getcpu.S
  78442. endif
  78443. +CSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += makecontext.c
  78444. +SSRC-$(UCLIBC_HAS_CONTEXT_FUNCS) += setcontext.S getcontext.S swapcontext.S __start_context.S
  78445. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/mmap.c uClibc-git/libc/sysdeps/linux/x86_64/mmap.c
  78446. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/mmap.c 2012-05-15 09:20:09.000000000 +0200
  78447. +++ uClibc-git/libc/sysdeps/linux/x86_64/mmap.c 1970-01-01 01:00:00.000000000 +0100
  78448. @@ -1,19 +0,0 @@
  78449. -/* vi: set sw=4 ts=4: */
  78450. -/*
  78451. - * mmap() for uClibc/x86_64
  78452. - *
  78453. - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  78454. - * Copyright (C) 2005 by Mike Frysinger <vapier@gentoo.org>
  78455. - *
  78456. - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  78457. - */
  78458. -
  78459. -#include <errno.h>
  78460. -#include <unistd.h>
  78461. -#include <sys/mman.h>
  78462. -#include <sys/syscall.h>
  78463. -
  78464. -
  78465. -_syscall6(void *, mmap, void *, start, size_t, length, int, prot,
  78466. - int, flags, int, fd, off_t, offset)
  78467. -libc_hidden_def(mmap)
  78468. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sched_getcpu.S uClibc-git/libc/sysdeps/linux/x86_64/sched_getcpu.S
  78469. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sched_getcpu.S 2012-05-15 09:20:09.000000000 +0200
  78470. +++ uClibc-git/libc/sysdeps/linux/x86_64/sched_getcpu.S 2014-07-25 20:36:07.817339982 +0200
  78471. @@ -12,9 +12,8 @@
  78472. Lesser General Public License for more details.
  78473. You should have received a copy of the GNU Lesser General Public
  78474. - License along with the GNU C Library; if not, write to the Free
  78475. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  78476. - 02111-1307 USA. */
  78477. + License along with the GNU C Library; if not, see
  78478. + <http://www.gnu.org/licenses/>. */
  78479. #include <sysdep.h>
  78480. #include <tls.h>
  78481. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/setcontext.S uClibc-git/libc/sysdeps/linux/x86_64/setcontext.S
  78482. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/setcontext.S 1970-01-01 01:00:00.000000000 +0100
  78483. +++ uClibc-git/libc/sysdeps/linux/x86_64/setcontext.S 2014-07-25 20:36:07.817339982 +0200
  78484. @@ -0,0 +1,103 @@
  78485. +/* Install given context.
  78486. + Copyright (C) 2002-2012 Free Software Foundation, Inc.
  78487. + This file is part of the GNU C Library.
  78488. + Contributed by Andreas Jaeger <aj@suse.de>, 2002.
  78489. +
  78490. + The GNU C Library is free software; you can redistribute it and/or
  78491. + modify it under the terms of the GNU Lesser General Public
  78492. + License as published by the Free Software Foundation; either
  78493. + version 2.1 of the License, or (at your option) any later version.
  78494. +
  78495. + The GNU C Library is distributed in the hope that it will be useful,
  78496. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  78497. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  78498. + Lesser General Public License for more details.
  78499. +
  78500. + You should have received a copy of the GNU Lesser General Public
  78501. + License along with the GNU C Library; if not, see
  78502. + <http://www.gnu.org/licenses/>. */
  78503. +
  78504. +#include <sysdep.h>
  78505. +
  78506. +#include "ucontext_i.h"
  78507. +
  78508. +
  78509. +/* int __setcontext (const ucontext_t *ucp)
  78510. +
  78511. + Restores the machine context in UCP and thereby resumes execution
  78512. + in that context.
  78513. +
  78514. + This implementation is intended to be used for *synchronous* context
  78515. + switches only. Therefore, it does not have to restore anything
  78516. + other than the PRESERVED state. */
  78517. +
  78518. +ENTRY(__setcontext)
  78519. + /* Save argument since syscall will destroy it. */
  78520. + pushq %rdi
  78521. + cfi_adjust_cfa_offset(8)
  78522. +
  78523. + /* Set the signal mask with
  78524. + rt_sigprocmask (SIG_SETMASK, mask, NULL, _NSIG/8). */
  78525. + leaq oSIGMASK(%rdi), %rsi
  78526. + xorl %edx, %edx
  78527. + movl $SIG_SETMASK, %edi
  78528. + movl $_NSIG8,%r10d
  78529. + movl $__NR_rt_sigprocmask, %eax
  78530. + syscall
  78531. + popq %rdi /* Reload %rdi, adjust stack. */
  78532. + cfi_adjust_cfa_offset(-8)
  78533. + cmpq $-4095, %rax /* Check %rax for error. */
  78534. + jae SYSCALL_ERROR_LABEL /* Jump to error handler if error. */
  78535. +
  78536. + /* Restore the floating-point context. Not the registers, only the
  78537. + rest. */
  78538. + movq oFPREGS(%rdi), %rcx
  78539. + fldenv (%rcx)
  78540. + ldmxcsr oMXCSR(%rdi)
  78541. +
  78542. +
  78543. + /* Load the new stack pointer, the preserved registers and
  78544. + registers used for passing args. */
  78545. + cfi_def_cfa(%rdi, 0)
  78546. + cfi_offset(%rbx,oRBX)
  78547. + cfi_offset(%rbp,oRBP)
  78548. + cfi_offset(%r12,oR12)
  78549. + cfi_offset(%r13,oR13)
  78550. + cfi_offset(%r14,oR14)
  78551. + cfi_offset(%r15,oR15)
  78552. + cfi_offset(%rsp,oRSP)
  78553. + cfi_offset(%rip,oRIP)
  78554. +
  78555. + movq oRSP(%rdi), %rsp
  78556. + movq oRBX(%rdi), %rbx
  78557. + movq oRBP(%rdi), %rbp
  78558. + movq oR12(%rdi), %r12
  78559. + movq oR13(%rdi), %r13
  78560. + movq oR14(%rdi), %r14
  78561. + movq oR15(%rdi), %r15
  78562. +
  78563. + /* The following ret should return to the address set with
  78564. + getcontext. Therefore push the address on the stack. */
  78565. + movq oRIP(%rdi), %rcx
  78566. + pushq %rcx
  78567. +
  78568. + movq oRSI(%rdi), %rsi
  78569. + movq oRDX(%rdi), %rdx
  78570. + movq oRCX(%rdi), %rcx
  78571. + movq oR8(%rdi), %r8
  78572. + movq oR9(%rdi), %r9
  78573. +
  78574. + /* Setup finally %rdi. */
  78575. + movq oRDI(%rdi), %rdi
  78576. +
  78577. + /* End FDE here, we fall into another context. */
  78578. + cfi_endproc
  78579. + cfi_startproc
  78580. +
  78581. + /* Clear rax to indicate success. */
  78582. + xorl %eax, %eax
  78583. +L(pseudo_end):
  78584. + ret
  78585. +PSEUDO_END(__setcontext)
  78586. +
  78587. +weak_alias (__setcontext, setcontext)
  78588. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/setjmp.S uClibc-git/libc/sysdeps/linux/x86_64/setjmp.S
  78589. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/setjmp.S 2012-05-15 09:20:09.000000000 +0200
  78590. +++ uClibc-git/libc/sysdeps/linux/x86_64/setjmp.S 2014-07-25 20:36:07.817339982 +0200
  78591. @@ -13,14 +13,10 @@
  78592. Lesser General Public License for more details.
  78593. You should have received a copy of the GNU Lesser General Public
  78594. - License along with the GNU C Library; if not, write to the Free
  78595. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  78596. - 02111-1307 USA. */
  78597. + License along with the GNU C Library; if not, see
  78598. + <http://www.gnu.org/licenses/>. */
  78599. -#define _ASM
  78600. -#define _SETJMP_H
  78601. -#include <bits/setjmp.h>
  78602. -#include <sysdep.h>
  78603. +#include <jmpbuf-offsets.h>
  78604. .global __sigsetjmp
  78605. .type __sigsetjmp,%function
  78606. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sigaction.c uClibc-git/libc/sysdeps/linux/x86_64/sigaction.c
  78607. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sigaction.c 2012-05-15 09:20:09.000000000 +0200
  78608. +++ uClibc-git/libc/sysdeps/linux/x86_64/sigaction.c 2014-07-25 20:36:07.817339982 +0200
  78609. @@ -13,9 +13,8 @@
  78610. Lesser General Public License for more details.
  78611. You should have received a copy of the GNU Lesser General Public
  78612. - License along with the GNU C Library; if not, write to the Free
  78613. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  78614. - 02111-1307 USA. */
  78615. + License along with the GNU C Library; if not, see
  78616. + <http://www.gnu.org/licenses/>. */
  78617. #include <errno.h>
  78618. @@ -30,9 +29,6 @@
  78619. /* We do not globally define the SA_RESTORER flag so do it here. */
  78620. #define SA_RESTORER 0x04000000
  78621. -extern __typeof(sigaction) __libc_sigaction;
  78622. -
  78623. -
  78624. #ifdef __NR_rt_sigaction
  78625. /* Using the hidden attribute here does not change the code but it
  78626. @@ -115,11 +111,19 @@
  78627. signal handlers work right. Important are both the names
  78628. (__restore_rt) and the exact instruction sequence.
  78629. If you ever feel the need to make any changes, please notify the
  78630. - appropriate GDB maintainer. */
  78631. + appropriate GDB maintainer.
  78632. +
  78633. + The unwind information starts a byte before __restore_rt, so that
  78634. + it is found when unwinding, to get an address the unwinder assumes
  78635. + will be in the middle of a call instruction. See the Linux kernel
  78636. + (the i386 vsyscall, in particular) for an explanation of the complex
  78637. + unwind information used here in order to get the traditional CFA.
  78638. + */
  78639. #define RESTORE(name, syscall) RESTORE2(name, syscall)
  78640. #define RESTORE2(name, syscall) \
  78641. __asm__ ( \
  78642. + "nop\n" \
  78643. ".text\n" \
  78644. "__" #name ":\n" \
  78645. " movq $" #syscall ", %rax\n" \
  78646. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/__start_context.S uClibc-git/libc/sysdeps/linux/x86_64/__start_context.S
  78647. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/__start_context.S 1970-01-01 01:00:00.000000000 +0100
  78648. +++ uClibc-git/libc/sysdeps/linux/x86_64/__start_context.S 2014-07-25 20:36:07.797339876 +0200
  78649. @@ -0,0 +1,49 @@
  78650. +/* Copyright (C) 2002-2012 Free Software Foundation, Inc.
  78651. + This file is part of the GNU C Library.
  78652. + Contributed by Andreas Jaeger <aj@suse.de>, 2002.
  78653. +
  78654. + The GNU C Library is free software; you can redistribute it and/or
  78655. + modify it under the terms of the GNU Lesser General Public
  78656. + License as published by the Free Software Foundation; either
  78657. + version 2.1 of the License, or (at your option) any later version.
  78658. +
  78659. + The GNU C Library is distributed in the hope that it will be useful,
  78660. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  78661. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  78662. + Lesser General Public License for more details.
  78663. +
  78664. + You should have received a copy of the GNU Lesser General Public
  78665. + License along with the GNU C Library; if not, see
  78666. + <http://www.gnu.org/licenses/>. */
  78667. +
  78668. +#include <sysdep.h>
  78669. +
  78670. +/* This is the helper code which gets called if a function which is
  78671. + registered with 'makecontext' returns. In this case we have to
  78672. + install the context listed in the uc_link element of the context
  78673. + 'makecontext' manipulated at the time of the 'makecontext' call.
  78674. + If the pointer is NULL the process must terminate. */
  78675. +
  78676. +
  78677. +ENTRY(__start_context)
  78678. + /* This removes the parameters passed to the function given to
  78679. + 'makecontext' from the stack. RBX contains the address
  78680. + on the stack pointer for the next context. */
  78681. + movq %rbx, %rsp
  78682. +
  78683. + popq %rdi /* This is the next context. */
  78684. + cfi_adjust_cfa_offset(-8)
  78685. + testq %rdi, %rdi
  78686. + je 2f /* If it is zero exit. */
  78687. +
  78688. + call JUMPTARGET(__setcontext)
  78689. + /* If this returns (which can happen if the syscall fails) we'll
  78690. + exit the program with the return error value (-1). */
  78691. + movq %rax,%rdi
  78692. +
  78693. +2:
  78694. + call HIDDEN_JUMPTARGET(exit)
  78695. + /* The 'exit' call should never return. In case it does cause
  78696. + the process to terminate. */
  78697. + hlt
  78698. +END(__start_context)
  78699. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/swapcontext.S uClibc-git/libc/sysdeps/linux/x86_64/swapcontext.S
  78700. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/swapcontext.S 1970-01-01 01:00:00.000000000 +0100
  78701. +++ uClibc-git/libc/sysdeps/linux/x86_64/swapcontext.S 2014-07-25 20:36:07.817339982 +0200
  78702. @@ -0,0 +1,121 @@
  78703. +/* Save current context and install the given one.
  78704. + Copyright (C) 2002-2012 Free Software Foundation, Inc.
  78705. + This file is part of the GNU C Library.
  78706. + Contributed by Andreas Jaeger <aj@suse.de>, 2002.
  78707. +
  78708. + The GNU C Library is free software; you can redistribute it and/or
  78709. + modify it under the terms of the GNU Lesser General Public
  78710. + License as published by the Free Software Foundation; either
  78711. + version 2.1 of the License, or (at your option) any later version.
  78712. +
  78713. + The GNU C Library is distributed in the hope that it will be useful,
  78714. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  78715. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  78716. + Lesser General Public License for more details.
  78717. +
  78718. + You should have received a copy of the GNU Lesser General Public
  78719. + License along with the GNU C Library; if not, see
  78720. + <http://www.gnu.org/licenses/>. */
  78721. +
  78722. +#include <sysdep.h>
  78723. +
  78724. +#include "ucontext_i.h"
  78725. +
  78726. +
  78727. +/* int __swapcontext (ucontext_t *oucp, const ucontext_t *ucp);
  78728. +
  78729. + Saves the machine context in oucp such that when it is activated,
  78730. + it appears as if __swapcontextt() returned again, restores the
  78731. + machine context in ucp and thereby resumes execution in that
  78732. + context.
  78733. +
  78734. + This implementation is intended to be used for *synchronous* context
  78735. + switches only. Therefore, it does not have to save anything
  78736. + other than the PRESERVED state. */
  78737. +
  78738. +ENTRY(__swapcontext)
  78739. + /* Save the preserved registers, the registers used for passing args,
  78740. + and the return address. */
  78741. + movq %rbx, oRBX(%rdi)
  78742. + movq %rbp, oRBP(%rdi)
  78743. + movq %r12, oR12(%rdi)
  78744. + movq %r13, oR13(%rdi)
  78745. + movq %r14, oR14(%rdi)
  78746. + movq %r15, oR15(%rdi)
  78747. +
  78748. + movq %rdi, oRDI(%rdi)
  78749. + movq %rsi, oRSI(%rdi)
  78750. + movq %rdx, oRDX(%rdi)
  78751. + movq %rcx, oRCX(%rdi)
  78752. + movq %r8, oR8(%rdi)
  78753. + movq %r9, oR9(%rdi)
  78754. +
  78755. + movq (%rsp), %rcx
  78756. + movq %rcx, oRIP(%rdi)
  78757. + leaq 8(%rsp), %rcx /* Exclude the return address. */
  78758. + movq %rcx, oRSP(%rdi)
  78759. +
  78760. + /* We have separate floating-point register content memory on the
  78761. + stack. We use the __fpregs_mem block in the context. Set the
  78762. + links up correctly. */
  78763. + leaq oFPREGSMEM(%rdi), %rcx
  78764. + movq %rcx, oFPREGS(%rdi)
  78765. + /* Save the floating-point environment. */
  78766. + fnstenv (%rcx)
  78767. + stmxcsr oMXCSR(%rdi)
  78768. +
  78769. +
  78770. + /* The syscall destroys some registers, save them. */
  78771. + movq %rsi, %r12
  78772. +
  78773. + /* Save the current signal mask and install the new one with
  78774. + rt_sigprocmask (SIG_BLOCK, newset, oldset,_NSIG/8). */
  78775. + leaq oSIGMASK(%rdi), %rdx
  78776. + leaq oSIGMASK(%rsi), %rsi
  78777. + movl $SIG_SETMASK, %edi
  78778. + movl $_NSIG8,%r10d
  78779. + movl $__NR_rt_sigprocmask, %eax
  78780. + syscall
  78781. + cmpq $-4095, %rax /* Check %rax for error. */
  78782. + jae SYSCALL_ERROR_LABEL /* Jump to error handler if error. */
  78783. +
  78784. + /* Restore destroyed registers. */
  78785. + movq %r12, %rsi
  78786. +
  78787. + /* Restore the floating-point context. Not the registers, only the
  78788. + rest. */
  78789. + movq oFPREGS(%rsi), %rcx
  78790. + fldenv (%rcx)
  78791. + ldmxcsr oMXCSR(%rsi)
  78792. +
  78793. + /* Load the new stack pointer and the preserved registers. */
  78794. + movq oRSP(%rsi), %rsp
  78795. + movq oRBX(%rsi), %rbx
  78796. + movq oRBP(%rsi), %rbp
  78797. + movq oR12(%rsi), %r12
  78798. + movq oR13(%rsi), %r13
  78799. + movq oR14(%rsi), %r14
  78800. + movq oR15(%rsi), %r15
  78801. +
  78802. + /* The following ret should return to the address set with
  78803. + getcontext. Therefore push the address on the stack. */
  78804. + movq oRIP(%rsi), %rcx
  78805. + pushq %rcx
  78806. +
  78807. + /* Setup registers used for passing args. */
  78808. + movq oRDI(%rsi), %rdi
  78809. + movq oRDX(%rsi), %rdx
  78810. + movq oRCX(%rsi), %rcx
  78811. + movq oR8(%rsi), %r8
  78812. + movq oR9(%rsi), %r9
  78813. +
  78814. + /* Setup finally %rsi. */
  78815. + movq oRSI(%rsi), %rsi
  78816. +
  78817. + /* Clear rax to indicate success. */
  78818. + xorl %eax, %eax
  78819. +L(pseudo_end):
  78820. + ret
  78821. +PSEUDO_END(__swapcontext)
  78822. +
  78823. +weak_alias (__swapcontext, swapcontext)
  78824. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/debugreg.h uClibc-git/libc/sysdeps/linux/x86_64/sys/debugreg.h
  78825. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/debugreg.h 2012-05-15 09:20:09.000000000 +0200
  78826. +++ uClibc-git/libc/sysdeps/linux/x86_64/sys/debugreg.h 2014-07-25 20:36:07.825340023 +0200
  78827. @@ -12,9 +12,8 @@
  78828. Lesser General Public License for more details.
  78829. You should have received a copy of the GNU Lesser General Public
  78830. - License along with the GNU C Library; if not, write to the Free
  78831. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  78832. - 02111-1307 USA. */
  78833. + License along with the GNU C Library; if not, see
  78834. + <http://www.gnu.org/licenses/>. */
  78835. #ifndef _SYS_DEBUGREG_H
  78836. #define _SYS_DEBUGREG_H 1
  78837. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/io.h uClibc-git/libc/sysdeps/linux/x86_64/sys/io.h
  78838. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/io.h 2012-05-15 09:20:09.000000000 +0200
  78839. +++ uClibc-git/libc/sysdeps/linux/x86_64/sys/io.h 2014-07-25 20:36:07.825340023 +0200
  78840. @@ -12,9 +12,8 @@
  78841. Lesser General Public License for more details.
  78842. You should have received a copy of the GNU Lesser General Public
  78843. - License along with the GNU C Library; if not, write to the Free
  78844. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  78845. - 02111-1307 USA. */
  78846. + License along with the GNU C Library; if not, see
  78847. + <http://www.gnu.org/licenses/>. */
  78848. #ifndef _SYS_IO_H
  78849. #define _SYS_IO_H 1
  78850. @@ -23,6 +22,7 @@
  78851. __BEGIN_DECLS
  78852. +#if defined __UCLIBC_LINUX_SPECIFIC__
  78853. /* If TURN_ON is TRUE, request for permission to do direct i/o on the
  78854. port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O
  78855. permission off for that range. This call requires root privileges.
  78856. @@ -32,12 +32,12 @@
  78857. E.g., Linux/Alpha for Alpha PCs supports this. */
  78858. extern int ioperm (unsigned long int __from, unsigned long int __num,
  78859. int __turn_on) __THROW;
  78860. -libc_hidden_proto(ioperm)
  78861. /* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to
  78862. access any I/O port is granted. This call requires root
  78863. privileges. */
  78864. extern int iopl (int __level) __THROW;
  78865. +#endif /* __UCLIBC_LINUX_SPECIFIC__ */
  78866. #if defined __GNUC__ && __GNUC__ >= 2
  78867. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/perm.h uClibc-git/libc/sysdeps/linux/x86_64/sys/perm.h
  78868. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/perm.h 2012-05-15 09:20:09.000000000 +0200
  78869. +++ uClibc-git/libc/sysdeps/linux/x86_64/sys/perm.h 2014-07-25 20:36:07.825340023 +0200
  78870. @@ -12,9 +12,8 @@
  78871. Lesser General Public License for more details.
  78872. You should have received a copy of the GNU Lesser General Public
  78873. - License along with the GNU C Library; if not, write to the Free
  78874. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  78875. - 02111-1307 USA. */
  78876. + License along with the GNU C Library; if not, see
  78877. + <http://www.gnu.org/licenses/>. */
  78878. #ifndef _SYS_PERM_H
  78879. @@ -26,7 +25,6 @@
  78880. /* Set port input/output permissions. */
  78881. extern int ioperm (unsigned long int __from, unsigned long int __num,
  78882. int __turn_on) __THROW;
  78883. -libc_hidden_proto(ioperm)
  78884. /* Change I/O privilege level. */
  78885. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/procfs.h uClibc-git/libc/sysdeps/linux/x86_64/sys/procfs.h
  78886. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  78887. +++ uClibc-git/libc/sysdeps/linux/x86_64/sys/procfs.h 2014-07-25 20:36:07.825340023 +0200
  78888. @@ -12,9 +12,8 @@
  78889. Lesser General Public License for more details.
  78890. You should have received a copy of the GNU Lesser General Public
  78891. - License along with the GNU C Library; if not, write to the Free
  78892. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  78893. - 02111-1307 USA. */
  78894. + License along with the GNU C Library; if not, see
  78895. + <http://www.gnu.org/licenses/>. */
  78896. #ifndef _SYS_PROCFS_H
  78897. #define _SYS_PROCFS_H 1
  78898. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/reg.h uClibc-git/libc/sysdeps/linux/x86_64/sys/reg.h
  78899. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/reg.h 2012-05-15 09:20:09.000000000 +0200
  78900. +++ uClibc-git/libc/sysdeps/linux/x86_64/sys/reg.h 2014-07-25 20:36:07.825340023 +0200
  78901. @@ -12,9 +12,8 @@
  78902. Lesser General Public License for more details.
  78903. You should have received a copy of the GNU Lesser General Public
  78904. - License along with the GNU C Library; if not, write to the Free
  78905. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  78906. - 02111-1307 USA. */
  78907. + License along with the GNU C Library; if not, see
  78908. + <http://www.gnu.org/licenses/>. */
  78909. #ifndef _SYS_REG_H
  78910. #define _SYS_REG_H 1
  78911. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/ucontext.h uClibc-git/libc/sysdeps/linux/x86_64/sys/ucontext.h
  78912. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  78913. +++ uClibc-git/libc/sysdeps/linux/x86_64/sys/ucontext.h 2014-07-25 20:36:07.825340023 +0200
  78914. @@ -12,9 +12,8 @@
  78915. Lesser General Public License for more details.
  78916. You should have received a copy of the GNU Lesser General Public
  78917. - License along with the GNU C Library; if not, write to the Free
  78918. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  78919. - 02111-1307 USA. */
  78920. + License along with the GNU C Library; if not, see
  78921. + <http://www.gnu.org/licenses/>. */
  78922. #ifndef _SYS_UCONTEXT_H
  78923. #define _SYS_UCONTEXT_H 1
  78924. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/user.h uClibc-git/libc/sysdeps/linux/x86_64/sys/user.h
  78925. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sys/user.h 2012-05-15 09:20:09.000000000 +0200
  78926. +++ uClibc-git/libc/sysdeps/linux/x86_64/sys/user.h 2014-07-25 20:36:07.825340023 +0200
  78927. @@ -12,9 +12,8 @@
  78928. Lesser General Public License for more details.
  78929. You should have received a copy of the GNU Lesser General Public
  78930. - License along with the GNU C Library; if not, write to the Free
  78931. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  78932. - 02111-1307 USA. */
  78933. + License along with the GNU C Library; if not, see
  78934. + <http://www.gnu.org/licenses/>. */
  78935. #ifndef _SYS_USER_H
  78936. #define _SYS_USER_H 1
  78937. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/syscall.S uClibc-git/libc/sysdeps/linux/x86_64/syscall.S
  78938. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/syscall.S 2012-05-15 09:20:09.000000000 +0200
  78939. +++ uClibc-git/libc/sysdeps/linux/x86_64/syscall.S 2014-07-25 20:36:07.825340023 +0200
  78940. @@ -12,9 +12,8 @@
  78941. Lesser General Public License for more details.
  78942. You should have received a copy of the GNU Lesser General Public
  78943. - License along with the GNU C Library; if not, write to the Free
  78944. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  78945. - 02111-1307 USA. */
  78946. + License along with the GNU C Library; if not, see
  78947. + <http://www.gnu.org/licenses/>. */
  78948. /* Please consult the file sysdeps/unix/sysv/linux/x86-64/sysdep.h for
  78949. more information about the value -4095 used below. */
  78950. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sysdep.h uClibc-git/libc/sysdeps/linux/x86_64/sysdep.h
  78951. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/sysdep.h 2012-05-15 09:20:09.000000000 +0200
  78952. +++ uClibc-git/libc/sysdeps/linux/x86_64/sysdep.h 2014-07-25 20:36:07.825340023 +0200
  78953. @@ -12,9 +12,8 @@
  78954. Lesser General Public License for more details.
  78955. You should have received a copy of the GNU Lesser General Public
  78956. - License along with the GNU C Library; if not, write to the Free
  78957. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  78958. - 02111-1307 USA. */
  78959. + License along with the GNU C Library; if not, see
  78960. + <http://www.gnu.org/licenses/>. */
  78961. #ifndef _LINUX_X86_64_SYSDEP_H
  78962. #define _LINUX_X86_64_SYSDEP_H 1
  78963. @@ -183,8 +182,6 @@
  78964. # define PSEUDO_END_ERRVAL(name) \
  78965. END (name)
  78966. -# define ret_ERRVAL ret
  78967. -
  78968. # ifndef __PIC__
  78969. # define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
  78970. # elif defined(RTLD_PRIVATE_ERRNO)
  78971. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/ucontext_i.sym uClibc-git/libc/sysdeps/linux/x86_64/ucontext_i.sym
  78972. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/ucontext_i.sym 1970-01-01 01:00:00.000000000 +0100
  78973. +++ uClibc-git/libc/sysdeps/linux/x86_64/ucontext_i.sym 2014-07-25 20:36:07.825340023 +0200
  78974. @@ -0,0 +1,37 @@
  78975. +#include <stddef.h>
  78976. +#include <signal.h>
  78977. +#include <sys/ucontext.h>
  78978. +
  78979. +--
  78980. +
  78981. +SIG_BLOCK
  78982. +SIG_SETMASK
  78983. +
  78984. +_NSIG8 (_NSIG / 8)
  78985. +
  78986. +#define ucontext(member) offsetof (ucontext_t, member)
  78987. +#define mcontext(member) ucontext (uc_mcontext.member)
  78988. +#define mreg(reg) mcontext (gregs[REG_##reg])
  78989. +
  78990. +oRBP mreg (RBP)
  78991. +oRSP mreg (RSP)
  78992. +oRBX mreg (RBX)
  78993. +oR8 mreg (R8)
  78994. +oR9 mreg (R9)
  78995. +oR10 mreg (R10)
  78996. +oR11 mreg (R11)
  78997. +oR12 mreg (R12)
  78998. +oR13 mreg (R13)
  78999. +oR14 mreg (R14)
  79000. +oR15 mreg (R15)
  79001. +oRDI mreg (RDI)
  79002. +oRSI mreg (RSI)
  79003. +oRDX mreg (RDX)
  79004. +oRAX mreg (RAX)
  79005. +oRCX mreg (RCX)
  79006. +oRIP mreg (RIP)
  79007. +oEFL mreg (EFL)
  79008. +oFPREGS mcontext (fpregs)
  79009. +oSIGMASK ucontext (uc_sigmask)
  79010. +oFPREGSMEM ucontext (__fpregs_mem)
  79011. +oMXCSR ucontext (__fpregs_mem.mxcsr)
  79012. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/vfork.S uClibc-git/libc/sysdeps/linux/x86_64/vfork.S
  79013. --- uClibc-0.9.33.2/libc/sysdeps/linux/x86_64/vfork.S 2012-05-15 09:20:09.000000000 +0200
  79014. +++ uClibc-git/libc/sysdeps/linux/x86_64/vfork.S 2014-07-25 20:36:07.825340023 +0200
  79015. @@ -12,9 +12,8 @@
  79016. Lesser General Public License for more details.
  79017. You should have received a copy of the GNU Lesser General Public
  79018. - License along with the GNU C Library; if not, write to the Free
  79019. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  79020. - 02111-1307 USA. */
  79021. + License along with the GNU C Library; if not, see
  79022. + <http://www.gnu.org/licenses/>. */
  79023. #include <sys/syscall.h>
  79024. @@ -63,4 +62,4 @@
  79025. .size __vfork,.-__vfork
  79026. weak_alias(__vfork,vfork)
  79027. -libc_hidden_weak(vfork)
  79028. +libc_hidden_def(vfork)
  79029. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/atomic.h uClibc-git/libc/sysdeps/linux/xtensa/bits/atomic.h
  79030. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/atomic.h 1970-01-01 01:00:00.000000000 +0100
  79031. +++ uClibc-git/libc/sysdeps/linux/xtensa/bits/atomic.h 2014-07-25 20:36:07.853340170 +0200
  79032. @@ -0,0 +1,232 @@
  79033. +/* Copyright (C) 2012 Free Software Foundation, Inc.
  79034. + This file is part of the GNU C Library.
  79035. +
  79036. + The GNU C Library is free software; you can redistribute it and/or
  79037. + modify it under the terms of the GNU Lesser General Public
  79038. + License as published by the Free Software Foundation; either
  79039. + version 2.1 of the License, or (at your option) any later version.
  79040. +
  79041. + The GNU C Library is distributed in the hope that it will be useful,
  79042. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  79043. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  79044. + Lesser General Public License for more details.
  79045. +
  79046. + You should have received a copy of the GNU Lesser General Public
  79047. + License along with the GNU C Library; if not, see
  79048. + <http://www.gnu.org/licenses/>. */
  79049. +
  79050. +#ifndef _BITS_ATOMIC_H
  79051. +#define _BITS_ATOMIC_H 1
  79052. +
  79053. +#include <inttypes.h>
  79054. +
  79055. +typedef int32_t atomic32_t;
  79056. +typedef uint32_t uatomic32_t;
  79057. +typedef int_fast32_t atomic_fast32_t;
  79058. +typedef uint_fast32_t uatomic_fast32_t;
  79059. +
  79060. +typedef int64_t atomic64_t;
  79061. +typedef uint64_t uatomic64_t;
  79062. +typedef int_fast64_t atomic_fast64_t;
  79063. +typedef uint_fast64_t uatomic_fast64_t;
  79064. +
  79065. +typedef intptr_t atomicptr_t;
  79066. +typedef uintptr_t uatomicptr_t;
  79067. +typedef intmax_t atomic_max_t;
  79068. +typedef uintmax_t uatomic_max_t;
  79069. +
  79070. +
  79071. +/* Xtensa has only a 32-bit form of a store-conditional instruction. */
  79072. +
  79073. +#define __arch_compare_and_exchange_bool_8_acq(mem, newval, oldval) \
  79074. + (abort (), 0)
  79075. +
  79076. +#define __arch_compare_and_exchange_bool_16_acq(mem, newval, oldval) \
  79077. + (abort (), 0)
  79078. +
  79079. +#define __arch_compare_and_exchange_bool_8_rel(mem, newval, oldval) \
  79080. + (abort (), 0)
  79081. +
  79082. +#define __arch_compare_and_exchange_bool_16_rel(mem, newval, oldval) \
  79083. + (abort (), 0)
  79084. +
  79085. +/* Atomically store NEWVAL in *MEM if *MEM is equal to OLDVAL.
  79086. + Return the old *MEM value. */
  79087. +
  79088. +#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
  79089. + ({__typeof__(*(mem)) __tmp, __value; \
  79090. + __asm__ __volatile__( \
  79091. + "1: l32i %1, %2, 0 \n" \
  79092. + " bne %1, %4, 2f \n" \
  79093. + " wsr %1, SCOMPARE1 \n" \
  79094. + " mov %0, %1 \n" \
  79095. + " mov %1, %3 \n" \
  79096. + " s32c1i %1, %2, 0 \n" \
  79097. + " bne %0, %1, 1b \n" \
  79098. + "2: \n" \
  79099. + : "=&a" (__value), "=&a" (__tmp) \
  79100. + : "a" (mem), "a" (newval), "a" (oldval) \
  79101. + : "memory" ); \
  79102. + __tmp; \
  79103. + })
  79104. +
  79105. +/* Atomically store NEWVAL in *MEM if *MEM is equal to OLDVAL.
  79106. + Return zero if *MEM was changed or non-zero if no exchange happened. */
  79107. +
  79108. +#define __arch_compare_and_exchange_bool_32_acq(mem, newval, oldval) \
  79109. + ({__typeof__(*(mem)) __tmp, __value; \
  79110. + __asm__ __volatile__( \
  79111. + "1: l32i %0, %2, 0 \n" \
  79112. + " sub %1, %4, %0 \n" \
  79113. + " bnez %1, 2f \n" \
  79114. + " wsr %0, SCOMPARE1 \n" \
  79115. + " mov %1, %3 \n" \
  79116. + " s32c1i %1, %2, 0 \n" \
  79117. + " bne %0, %1, 1b \n" \
  79118. + " movi %1, 0 \n" \
  79119. + "2: \n" \
  79120. + : "=&a" (__value), "=&a" (__tmp) \
  79121. + : "a" (mem), "a" (newval), "a" (oldval) \
  79122. + : "memory" ); \
  79123. + __tmp != 0; \
  79124. + })
  79125. +
  79126. +/* Store NEWVALUE in *MEM and return the old value. */
  79127. +
  79128. +#define __arch_exchange_32_acq(mem, newval) \
  79129. + ({__typeof__(*(mem)) __tmp, __value; \
  79130. + __asm__ __volatile__( \
  79131. + "1: l32i %0, %2, 0 \n" \
  79132. + " wsr %0, SCOMPARE1 \n" \
  79133. + " mov %1, %3 \n" \
  79134. + " s32c1i %1, %2, 0 \n" \
  79135. + " bne %0, %1, 1b \n" \
  79136. + : "=&a" (__value), "=&a" (__tmp) \
  79137. + : "a" (mem), "a" (newval) \
  79138. + : "memory" ); \
  79139. + __tmp; \
  79140. + })
  79141. +
  79142. +/* Add VALUE to *MEM and return the old value of *MEM. */
  79143. +
  79144. +#define __arch_atomic_exchange_and_add_32(mem, value) \
  79145. + ({__typeof__(*(mem)) __tmp, __value; \
  79146. + __asm__ __volatile__( \
  79147. + "1: l32i %0, %2, 0 \n" \
  79148. + " wsr %0, SCOMPARE1 \n" \
  79149. + " add %1, %0, %3 \n" \
  79150. + " s32c1i %1, %2, 0 \n" \
  79151. + " bne %0, %1, 1b \n" \
  79152. + : "=&a" (__value), "=&a" (__tmp) \
  79153. + : "a" (mem), "a" (value) \
  79154. + : "memory" ); \
  79155. + __tmp; \
  79156. + })
  79157. +
  79158. +/* Subtract VALUE from *MEM and return the old value of *MEM. */
  79159. +
  79160. +#define __arch_atomic_exchange_and_sub_32(mem, value) \
  79161. + ({__typeof__(*(mem)) __tmp, __value; \
  79162. + __asm__ __volatile__( \
  79163. + "1: l32i %0, %2, 0 \n" \
  79164. + " wsr %0, SCOMPARE1 \n" \
  79165. + " sub %1, %0, %3 \n" \
  79166. + " s32c1i %1, %2, 0 \n" \
  79167. + " bne %0, %1, 1b \n" \
  79168. + : "=&a" (__value), "=&a" (__tmp) \
  79169. + : "a" (mem), "a" (value) \
  79170. + : "memory" ); \
  79171. + __tmp; \
  79172. + })
  79173. +
  79174. +/* Decrement *MEM if it is > 0, and return the old value. */
  79175. +
  79176. +#define __arch_atomic_decrement_if_positive_32(mem) \
  79177. + ({__typeof__(*(mem)) __tmp, __value; \
  79178. + __asm__ __volatile__( \
  79179. + "1: l32i %0, %2, 0 \n" \
  79180. + " blti %0, 1, 2f \n" \
  79181. + " wsr %0, SCOMPARE1 \n" \
  79182. + " addi %1, %0, -1 \n" \
  79183. + " s32c1i %1, %2, 0 \n" \
  79184. + " bne %0, %1, 1b \n" \
  79185. + "2: \n" \
  79186. + : "=&a" (__value), "=&a" (__tmp) \
  79187. + : "a" (mem) \
  79188. + : "memory" ); \
  79189. + __value; \
  79190. + })
  79191. +
  79192. +
  79193. +/* These are the preferred public interfaces: */
  79194. +
  79195. +#define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
  79196. + ({ \
  79197. + if (sizeof (*mem) != 4) \
  79198. + abort(); \
  79199. + __arch_compare_and_exchange_val_32_acq(mem, newval, oldval); \
  79200. + })
  79201. +
  79202. +#define atomic_exchange_acq(mem, newval) \
  79203. + ({ \
  79204. + if (sizeof(*(mem)) != 4) \
  79205. + abort(); \
  79206. + __arch_exchange_32_acq(mem, newval); \
  79207. + })
  79208. +
  79209. +#define atomic_exchange_and_add(mem, newval) \
  79210. + ({ \
  79211. + if (sizeof(*(mem)) != 4) \
  79212. + abort(); \
  79213. + __arch_atomic_exchange_and_add_32(mem, newval); \
  79214. + })
  79215. +
  79216. +#define atomic_exchange_and_sub(mem, newval) \
  79217. + ({ \
  79218. + if (sizeof(*(mem)) != 4) \
  79219. + abort(); \
  79220. + __arch_atomic_exchange_and_sub_32(mem, newval); \
  79221. + })
  79222. +
  79223. +#define atomic_decrement_if_positive(mem) \
  79224. + ({ \
  79225. + if (sizeof(*(mem)) != 4) \
  79226. + abort(); \
  79227. + __arch_atomic_decrement_if_positive_32(mem); \
  79228. + })
  79229. +
  79230. +
  79231. +# define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \
  79232. + (abort (), 0)
  79233. +
  79234. +# define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
  79235. + (abort (), (__typeof (*mem)) 0)
  79236. +
  79237. +# define __arch_compare_and_exchange_bool_64_rel(mem, newval, oldval) \
  79238. + (abort (), 0)
  79239. +
  79240. +# define __arch_compare_and_exchange_val_64_rel(mem, newval, oldval) \
  79241. + (abort (), (__typeof (*mem)) 0)
  79242. +
  79243. +# define __arch_atomic_exchange_64_acq(mem, value) \
  79244. + ({ abort (); (*mem) = (value); })
  79245. +
  79246. +# define __arch_atomic_exchange_64_rel(mem, value) \
  79247. + ({ abort (); (*mem) = (value); })
  79248. +
  79249. +# define __arch_atomic_exchange_and_add_64(mem, value) \
  79250. + ({ abort (); (*mem) = (value); })
  79251. +
  79252. +# define __arch_atomic_increment_val_64(mem) \
  79253. + ({ abort (); (*mem)++; })
  79254. +
  79255. +# define __arch_atomic_decrement_val_64(mem) \
  79256. + ({ abort (); (*mem)--; })
  79257. +
  79258. +# define __arch_atomic_decrement_if_positive_64(mem) \
  79259. + ({ abort (); (*mem)--; })
  79260. +
  79261. +
  79262. +
  79263. +#endif /* _BITS_ATOMIC_H */
  79264. +
  79265. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/fcntl.h uClibc-git/libc/sysdeps/linux/xtensa/bits/fcntl.h
  79266. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/fcntl.h 2012-05-15 09:20:09.000000000 +0200
  79267. +++ uClibc-git/libc/sysdeps/linux/xtensa/bits/fcntl.h 2014-07-25 20:36:07.853340170 +0200
  79268. @@ -14,9 +14,8 @@
  79269. Lesser General Public License for more details.
  79270. You should have received a copy of the GNU Lesser General Public
  79271. - License along with the GNU C Library; if not, write to the Free
  79272. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  79273. - Boston, MA 02110-1301, USA. */
  79274. + License along with the GNU C Library; if not, see
  79275. + <http://www.gnu.org/licenses/>. */
  79276. #ifndef _FCNTL_H
  79277. # error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  79278. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/ipc.h uClibc-git/libc/sysdeps/linux/xtensa/bits/ipc.h
  79279. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/ipc.h 2012-05-15 09:20:09.000000000 +0200
  79280. +++ uClibc-git/libc/sysdeps/linux/xtensa/bits/ipc.h 2014-07-25 20:36:07.853340170 +0200
  79281. @@ -12,9 +12,8 @@
  79282. Lesser General Public License for more details.
  79283. You should have received a copy of the GNU Lesser General Public
  79284. - License along with the GNU C Library; if not, write to the Free
  79285. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  79286. - Boston, MA 02110-1301, USA. */
  79287. + License along with the GNU C Library; if not, see
  79288. + <http://www.gnu.org/licenses/>. */
  79289. #ifndef _SYS_IPC_H
  79290. # error "Never use <bits/ipc.h> directly; include <sys/ipc.h> instead."
  79291. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/kernel_types.h uClibc-git/libc/sysdeps/linux/xtensa/bits/kernel_types.h
  79292. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/kernel_types.h 2012-05-15 09:20:09.000000000 +0200
  79293. +++ uClibc-git/libc/sysdeps/linux/xtensa/bits/kernel_types.h 2014-07-25 20:36:07.853340170 +0200
  79294. @@ -33,6 +33,8 @@
  79295. typedef unsigned short __kernel_old_uid_t;
  79296. typedef unsigned short __kernel_old_gid_t;
  79297. typedef unsigned short __kernel_old_dev_t;
  79298. +typedef long __kernel_long_t;
  79299. +typedef unsigned long __kernel_ulong_t;
  79300. typedef long long __kernel_loff_t;
  79301. /* Beginning in 2.6 kernels, which is the first version that includes the
  79302. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/mathdef.h uClibc-git/libc/sysdeps/linux/xtensa/bits/mathdef.h
  79303. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/mathdef.h 2012-05-15 09:20:09.000000000 +0200
  79304. +++ uClibc-git/libc/sysdeps/linux/xtensa/bits/mathdef.h 2014-07-25 20:36:07.853340170 +0200
  79305. @@ -13,9 +13,8 @@
  79306. Lesser General Public License for more details.
  79307. You should have received a copy of the GNU Lesser General Public
  79308. - License along with the GNU C Library; if not, write to the Free
  79309. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  79310. - Boston, MA 02110-1301, USA. */
  79311. + License along with the GNU C Library; if not, see
  79312. + <http://www.gnu.org/licenses/>. */
  79313. #if !defined _MATH_H && !defined _COMPLEX_H
  79314. # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
  79315. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/mman.h uClibc-git/libc/sysdeps/linux/xtensa/bits/mman.h
  79316. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/mman.h 2012-05-15 09:20:09.000000000 +0200
  79317. +++ uClibc-git/libc/sysdeps/linux/xtensa/bits/mman.h 2014-07-25 20:36:07.853340170 +0200
  79318. @@ -13,9 +13,8 @@
  79319. Lesser General Public License for more details.
  79320. You should have received a copy of the GNU Lesser General Public
  79321. - License along with the GNU C Library; if not, write to the Free
  79322. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  79323. - Boston, MA 02110-1301, USA. */
  79324. + License along with the GNU C Library; if not, see
  79325. + <http://www.gnu.org/licenses/>. */
  79326. #ifndef _SYS_MMAN_H
  79327. # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
  79328. @@ -64,7 +63,7 @@
  79329. # define MAP_NORESERVE 0x0400 /* Don't check for reservations. */
  79330. # define MAP_POPULATE 0x10000 /* Populate (prefault) pagetables. */
  79331. # define MAP_NONBLOCK 0x20000 /* Do not block on IO. */
  79332. -# define MAP_UNINITIALIZE 0x4000000 /* For anonymous mmap, memory could
  79333. +# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could
  79334. be uninitialized. */
  79335. #endif
  79336. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/msq.h uClibc-git/libc/sysdeps/linux/xtensa/bits/msq.h
  79337. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/msq.h 2012-05-15 09:20:09.000000000 +0200
  79338. +++ uClibc-git/libc/sysdeps/linux/xtensa/bits/msq.h 2014-07-25 20:36:07.853340170 +0200
  79339. @@ -12,9 +12,8 @@
  79340. Lesser General Public License for more details.
  79341. You should have received a copy of the GNU Lesser General Public
  79342. - License along with the GNU C Library; if not, write to the Free
  79343. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  79344. - Boston, MA 02110-1301, USA. */
  79345. + License along with the GNU C Library; if not, see
  79346. + <http://www.gnu.org/licenses/>. */
  79347. #ifndef _SYS_MSG_H
  79348. # error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
  79349. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/setjmp.h uClibc-git/libc/sysdeps/linux/xtensa/bits/setjmp.h
  79350. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/setjmp.h 2012-05-15 09:20:09.000000000 +0200
  79351. +++ uClibc-git/libc/sysdeps/linux/xtensa/bits/setjmp.h 2014-07-25 20:36:07.853340170 +0200
  79352. @@ -12,9 +12,8 @@
  79353. Lesser General Public License for more details.
  79354. You should have received a copy of the GNU Lesser General Public
  79355. - License along with the GNU C Library; if not, write to the Free
  79356. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  79357. - Boston, MA 02110-1301, USA. */
  79358. + License along with the GNU C Library; if not, see
  79359. + <http://www.gnu.org/licenses/>. */
  79360. /* Define the machine-dependent type `jmp_buf'. Xtensa version. */
  79361. #ifndef _BITS_SETJMP_H
  79362. @@ -30,17 +29,6 @@
  79363. subsequent alloca in proc moves $sp), and the return address within
  79364. proc. Everything else is saved on the stack in the normal save areas. */
  79365. -#ifndef _ASM
  79366. typedef int __jmp_buf[17];
  79367. -#endif
  79368. -
  79369. -#define JB_SP 1
  79370. -#define JB_PC 16
  79371. -
  79372. -/* Test if longjmp to JMPBUF would unwind the frame containing a local
  79373. - variable at ADDRESS. */
  79374. -
  79375. -#define _JMPBUF_UNWINDS(jmpbuf, address) \
  79376. - ((void *) (address) < (void *) (jmpbuf)[JB_SP])
  79377. #endif /* bits/setjmp.h */
  79378. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/shm.h uClibc-git/libc/sysdeps/linux/xtensa/bits/shm.h
  79379. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/shm.h 2012-05-15 09:20:09.000000000 +0200
  79380. +++ uClibc-git/libc/sysdeps/linux/xtensa/bits/shm.h 2014-07-25 20:36:07.853340170 +0200
  79381. @@ -13,9 +13,8 @@
  79382. Lesser General Public License for more details.
  79383. You should have received a copy of the GNU Lesser General Public
  79384. - License along with the GNU C Library; if not, write to the Free
  79385. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  79386. - Boston, MA 02110-1301, USA. */
  79387. + License along with the GNU C Library; if not, see
  79388. + <http://www.gnu.org/licenses/>. */
  79389. #ifndef _SYS_SHM_H
  79390. # error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
  79391. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/sigcontext.h uClibc-git/libc/sysdeps/linux/xtensa/bits/sigcontext.h
  79392. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/sigcontext.h 1970-01-01 01:00:00.000000000 +0100
  79393. +++ uClibc-git/libc/sysdeps/linux/xtensa/bits/sigcontext.h 2014-07-25 20:36:07.853340170 +0200
  79394. @@ -0,0 +1,40 @@
  79395. +/* Copyright (C) 2012 Free Software Foundation, Inc.
  79396. + This file is part of the GNU C Library.
  79397. +
  79398. + The GNU C Library is free software; you can redistribute it and/or
  79399. + modify it under the terms of the GNU Lesser General Public
  79400. + License as published by the Free Software Foundation; either
  79401. + version 2.1 of the License, or (at your option) any later version.
  79402. +
  79403. + The GNU C Library is distributed in the hope that it will be useful,
  79404. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  79405. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  79406. + Lesser General Public License for more details.
  79407. +
  79408. + You should have received a copy of the GNU Lesser General Public
  79409. + License along with the GNU C Library; if not, see
  79410. + <http://www.gnu.org/licenses/>. */
  79411. +
  79412. +#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
  79413. +# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
  79414. +#endif
  79415. +
  79416. +#ifndef _BITS_SIGCONTEXT_H
  79417. +#define _BITS_SIGCONTEXT_H 1
  79418. +
  79419. +struct sigcontext
  79420. +{
  79421. + unsigned long sc_pc;
  79422. + unsigned long sc_ps;
  79423. + unsigned long sc_lbeg;
  79424. + unsigned long sc_lend;
  79425. + unsigned long sc_lcount;
  79426. + unsigned long sc_sar;
  79427. + unsigned long sc_acclo;
  79428. + unsigned long sc_acchi;
  79429. + unsigned long sc_a[16];
  79430. + void *sc_xtregs;
  79431. +};
  79432. +
  79433. +#endif /* _BITS_SIGCONTEXT_H */
  79434. +
  79435. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/sigcontextinfo.h uClibc-git/libc/sysdeps/linux/xtensa/bits/sigcontextinfo.h
  79436. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/sigcontextinfo.h 2012-05-15 09:20:09.000000000 +0200
  79437. +++ uClibc-git/libc/sysdeps/linux/xtensa/bits/sigcontextinfo.h 2014-07-25 20:36:07.853340170 +0200
  79438. @@ -12,9 +12,8 @@
  79439. Lesser General Public License for more details.
  79440. You should have received a copy of the GNU Lesser General Public
  79441. - License along with the GNU C Library; if not, write to the Free
  79442. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  79443. - Boston, MA 02110-1301, USA. */
  79444. + License along with the GNU C Library; if not, see
  79445. + <http://www.gnu.org/licenses/>. */
  79446. /* Also see register-dump.h, where we spill live registers to the
  79447. stack so that we can trace the stack backward. */
  79448. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/stackinfo.h uClibc-git/libc/sysdeps/linux/xtensa/bits/stackinfo.h
  79449. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/stackinfo.h 2012-05-15 09:20:09.000000000 +0200
  79450. +++ uClibc-git/libc/sysdeps/linux/xtensa/bits/stackinfo.h 2014-07-25 20:36:07.853340170 +0200
  79451. @@ -12,9 +12,8 @@
  79452. Lesser General Public License for more details.
  79453. You should have received a copy of the GNU Lesser General Public
  79454. - License along with the GNU C Library; if not, write to the Free
  79455. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  79456. - Boston, MA 02110-1301, USA. */
  79457. + License along with the GNU C Library; if not, see
  79458. + <http://www.gnu.org/licenses/>. */
  79459. /* This file contains a bit of information about the stack allocation
  79460. of the processor. */
  79461. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/stat.h uClibc-git/libc/sysdeps/linux/xtensa/bits/stat.h
  79462. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/stat.h 2012-05-15 09:20:09.000000000 +0200
  79463. +++ uClibc-git/libc/sysdeps/linux/xtensa/bits/stat.h 2014-07-25 20:36:07.853340170 +0200
  79464. @@ -12,9 +12,8 @@
  79465. Lesser General Public License for more details.
  79466. You should have received a copy of the GNU Lesser General Public
  79467. - License along with the GNU C Library; if not, write to the Free
  79468. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  79469. - Boston, MA 02110-1301, USA. */
  79470. + License along with the GNU C Library; if not, see
  79471. + <http://www.gnu.org/licenses/>. */
  79472. #ifndef _SYS_STAT_H
  79473. # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
  79474. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/uClibc_arch_features.h uClibc-git/libc/sysdeps/linux/xtensa/bits/uClibc_arch_features.h
  79475. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/uClibc_arch_features.h 2012-05-15 09:20:09.000000000 +0200
  79476. +++ uClibc-git/libc/sysdeps/linux/xtensa/bits/uClibc_arch_features.h 2014-07-25 20:36:07.853340170 +0200
  79477. @@ -11,8 +11,8 @@
  79478. /* can your target use syscall6() for mmap ? */
  79479. #define __UCLIBC_MMAP_HAS_6_ARGS__
  79480. -/* does your target use syscall4() for truncate64 ? (32bit arches only) */
  79481. -#define __UCLIBC_TRUNCATE64_HAS_4_ARGS__
  79482. +/* does your target align 64bit values in register pairs ? (32bit arches only) */
  79483. +#define __UCLIBC_SYSCALL_ALIGN_64BIT__
  79484. /* does your target have a broken create_module() ? */
  79485. #undef __UCLIBC_BROKEN_CREATE_MODULE__
  79486. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/uClibc_page.h uClibc-git/libc/sysdeps/linux/xtensa/bits/uClibc_page.h
  79487. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/uClibc_page.h 2012-05-15 09:20:09.000000000 +0200
  79488. +++ uClibc-git/libc/sysdeps/linux/xtensa/bits/uClibc_page.h 1970-01-01 01:00:00.000000000 +0100
  79489. @@ -1,31 +0,0 @@
  79490. -/* Copyright (C) 2004 Erik Andersen
  79491. - *
  79492. - * This library is free software; you can redistribute it and/or
  79493. - * modify it under the terms of the GNU Lesser General Public
  79494. - * License as published by the Free Software Foundation; either
  79495. - * version 2.1 of the License, or (at your option) any later version.
  79496. - *
  79497. - * The GNU C Library is distributed in the hope that it will be useful,
  79498. - * but WITHOUT ANY WARRANTY; without even the implied warranty of
  79499. - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  79500. - * Lesser General Public License for more details.
  79501. - *
  79502. - * You should have received a copy of the GNU Lesser General Public
  79503. - * License along with the GNU C Library; if not, write to the Free
  79504. - * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  79505. - * 02111-1307 USA.
  79506. - */
  79507. -
  79508. -/* Supply an architecture specific value for PAGE_SIZE and friends. */
  79509. -
  79510. -#ifndef _UCLIBC_PAGE_H
  79511. -#define _UCLIBC_PAGE_H
  79512. -
  79513. -#include <bits/xtensa-config.h>
  79514. -
  79515. -/* PAGE_SHIFT determines the page size -- in this case 4096 */
  79516. -#define PAGE_SHIFT XCHAL_MMU_MIN_PTE_PAGE_SIZE
  79517. -#define PAGE_SIZE (1UL << PAGE_SHIFT)
  79518. -#define PAGE_MASK (~(PAGE_SIZE-1))
  79519. -
  79520. -#endif /* _UCLIBC_PAGE_H */
  79521. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/wordsize.h uClibc-git/libc/sysdeps/linux/xtensa/bits/wordsize.h
  79522. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/wordsize.h 2012-05-15 09:20:09.000000000 +0200
  79523. +++ uClibc-git/libc/sysdeps/linux/xtensa/bits/wordsize.h 2014-07-25 20:36:07.853340170 +0200
  79524. @@ -12,8 +12,7 @@
  79525. Lesser General Public License for more details.
  79526. You should have received a copy of the GNU Lesser General Public
  79527. - License along with the GNU C Library; if not, write to the Free
  79528. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  79529. - 02111-1307 USA. */
  79530. + License along with the GNU C Library; if not, see
  79531. + <http://www.gnu.org/licenses/>. */
  79532. #define __WORDSIZE 32
  79533. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/xtensa-config.h uClibc-git/libc/sysdeps/linux/xtensa/bits/xtensa-config.h
  79534. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/bits/xtensa-config.h 2012-05-15 09:20:09.000000000 +0200
  79535. +++ uClibc-git/libc/sysdeps/linux/xtensa/bits/xtensa-config.h 2014-07-25 20:36:07.853340170 +0200
  79536. @@ -14,9 +14,8 @@
  79537. Lesser General Public License for more details.
  79538. You should have received a copy of the GNU Lesser General Public
  79539. - License along with the GNU C Library; if not, write to the Free
  79540. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  79541. - Boston, MA 02110-1301, USA. */
  79542. + License along with the GNU C Library; if not, see
  79543. + <http://www.gnu.org/licenses/>. */
  79544. #ifndef XTENSA_CONFIG_H
  79545. #define XTENSA_CONFIG_H
  79546. @@ -44,10 +43,4 @@
  79547. #undef XCHAL_NUM_AREGS
  79548. #define XCHAL_NUM_AREGS 64
  79549. -/* Set a default page size. This is currently needed when bootstrapping
  79550. - the runtime linker. See comments in dl-machine.h where this is used. */
  79551. -
  79552. -#undef XCHAL_MMU_MIN_PTE_PAGE_SIZE
  79553. -#define XCHAL_MMU_MIN_PTE_PAGE_SIZE 12
  79554. -
  79555. #endif /* !XTENSA_CONFIG_H */
  79556. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/brk.c uClibc-git/libc/sysdeps/linux/xtensa/brk.c
  79557. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/brk.c 2012-05-15 09:20:09.000000000 +0200
  79558. +++ uClibc-git/libc/sysdeps/linux/xtensa/brk.c 2014-07-25 20:36:07.853340170 +0200
  79559. @@ -13,9 +13,8 @@
  79560. Lesser General Public License for more details.
  79561. You should have received a copy of the GNU Lesser General Public
  79562. - License along with the GNU C Library; if not, write to the Free
  79563. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  79564. - Boston, MA 02110-1301, USA. */
  79565. + License along with the GNU C Library; if not, see
  79566. + <http://www.gnu.org/licenses/>. */
  79567. #include <errno.h>
  79568. #include <unistd.h>
  79569. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/clone.S uClibc-git/libc/sysdeps/linux/xtensa/clone.S
  79570. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/clone.S 2012-05-15 09:20:09.000000000 +0200
  79571. +++ uClibc-git/libc/sysdeps/linux/xtensa/clone.S 2014-07-25 20:36:07.857340190 +0200
  79572. @@ -11,9 +11,8 @@
  79573. Lesser General Public License for more details.
  79574. You should have received a copy of the GNU Lesser General Public
  79575. - License along with the GNU C Library; if not, write to the Free
  79576. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  79577. - Boston, MA 02110-1301, USA. */
  79578. + License along with the GNU C Library; if not, see
  79579. + <http://www.gnu.org/licenses/>. */
  79580. /* clone is even more special than fork as it mucks with stacks
  79581. and invokes a function in the right context after it's all over. */
  79582. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/crt1.S uClibc-git/libc/sysdeps/linux/xtensa/crt1.S
  79583. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/crt1.S 2012-05-15 09:20:09.000000000 +0200
  79584. +++ uClibc-git/libc/sysdeps/linux/xtensa/crt1.S 2014-07-25 20:36:07.857340190 +0200
  79585. @@ -30,9 +30,8 @@
  79586. Lesser General Public License for more details.
  79587. You should have received a copy of the GNU Lesser General Public
  79588. - License along with the GNU C Library; if not, write to the Free
  79589. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  79590. - Boston, MA 02110-1301, USA. */
  79591. + License along with the GNU C Library; if not, see
  79592. + <http://www.gnu.org/licenses/>. */
  79593. #include <features.h>
  79594. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/fork.c uClibc-git/libc/sysdeps/linux/xtensa/fork.c
  79595. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/fork.c 2012-05-15 09:20:09.000000000 +0200
  79596. +++ uClibc-git/libc/sysdeps/linux/xtensa/fork.c 2014-07-25 20:36:07.857340190 +0200
  79597. @@ -7,19 +7,19 @@
  79598. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  79599. */
  79600. -#include <unistd.h>
  79601. -#include <sys/syscall.h>
  79602. -#define _SIGNAL_H
  79603. -#include <bits/signum.h>
  79604. /* Xtensa doesn't provide a 'fork' system call, so we use 'clone'. */
  79605. +#include <sys/syscall.h>
  79606. -extern __typeof(fork) __libc_fork;
  79607. +#if defined __NR_clone && defined __ARCH_USE_MMU__
  79608. +# include <unistd.h>
  79609. +# include <signal.h>
  79610. +# include <cancel.h>
  79611. -libc_hidden_proto(fork)
  79612. -pid_t __libc_fork(void)
  79613. +pid_t fork(void)
  79614. {
  79615. return (pid_t) INLINE_SYSCALL(clone, 2, SIGCHLD, 0);
  79616. }
  79617. -weak_alias(__libc_fork, fork)
  79618. -libc_hidden_weak(fork)
  79619. +lt_strong_alias(fork)
  79620. +lt_libc_hidden(fork)
  79621. +#endif
  79622. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/jmpbuf-offsets.h uClibc-git/libc/sysdeps/linux/xtensa/jmpbuf-offsets.h
  79623. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/jmpbuf-offsets.h 1970-01-01 01:00:00.000000000 +0100
  79624. +++ uClibc-git/libc/sysdeps/linux/xtensa/jmpbuf-offsets.h 2014-07-25 20:36:07.857340190 +0200
  79625. @@ -0,0 +1,20 @@
  79626. +/* Private macros for accessing __jmp_buf contents. Xtensa version.
  79627. + Copyright (C) 2006 Free Software Foundation, Inc.
  79628. + This file is part of the GNU C Library.
  79629. +
  79630. + The GNU C Library is free software; you can redistribute it and/or
  79631. + modify it under the terms of the GNU Lesser General Public
  79632. + License as published by the Free Software Foundation; either
  79633. + version 2.1 of the License, or (at your option) any later version.
  79634. +
  79635. + The GNU C Library is distributed in the hope that it will be useful,
  79636. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  79637. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  79638. + Lesser General Public License for more details.
  79639. +
  79640. + You should have received a copy of the GNU Lesser General Public
  79641. + License along with the GNU C Library; if not, see
  79642. + <http://www.gnu.org/licenses/>. */
  79643. +
  79644. +#define JB_SP 1
  79645. +#define JB_PC 16
  79646. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/jmpbuf-unwind.h uClibc-git/libc/sysdeps/linux/xtensa/jmpbuf-unwind.h
  79647. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  79648. +++ uClibc-git/libc/sysdeps/linux/xtensa/jmpbuf-unwind.h 2014-07-25 20:36:07.857340190 +0200
  79649. @@ -0,0 +1,25 @@
  79650. +/* Copyright (C) 1997, 1998, 2007 Free Software Foundation, Inc.
  79651. + This file is part of the GNU C Library.
  79652. +
  79653. + The GNU C Library is free software; you can redistribute it and/or
  79654. + modify it under the terms of the GNU Lesser General Public
  79655. + License as published by the Free Software Foundation; either
  79656. + version 2.1 of the License, or (at your option) any later version.
  79657. +
  79658. + The GNU C Library is distributed in the hope that it will be useful,
  79659. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  79660. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  79661. + Lesser General Public License for more details.
  79662. +
  79663. + You should have received a copy of the GNU Lesser General Public
  79664. + License along with the GNU C Library; if not, see
  79665. + <http://www.gnu.org/licenses/>. */
  79666. +
  79667. +/* Test if longjmp to JMPBUF would unwind the frame containing a local
  79668. + variable at ADDRESS. */
  79669. +
  79670. +#include <setjmp.h>
  79671. +#include <jmpbuf-offsets.h>
  79672. +
  79673. +#define _JMPBUF_UNWINDS(jmpbuf, address) \
  79674. + ((void *) (address) < (void *) (jmpbuf)[JB_SP])
  79675. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/__longjmp.S uClibc-git/libc/sysdeps/linux/xtensa/__longjmp.S
  79676. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/__longjmp.S 2012-05-15 09:20:09.000000000 +0200
  79677. +++ uClibc-git/libc/sysdeps/linux/xtensa/__longjmp.S 2014-07-25 20:36:07.841340106 +0200
  79678. @@ -14,9 +14,8 @@
  79679. Lesser General Public License for more details.
  79680. You should have received a copy of the GNU Lesser General Public
  79681. - License along with the GNU C Library; if not, write to the Free
  79682. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  79683. - Boston, MA 02110-1301, USA. */
  79684. + License along with the GNU C Library; if not, see
  79685. + <http://www.gnu.org/licenses/>. */
  79686. /* This implementation relies heavily on the Xtensa register window
  79687. mechanism. Setjmp flushes all the windows except its own to the
  79688. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/Makefile.arch uClibc-git/libc/sysdeps/linux/xtensa/Makefile.arch
  79689. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
  79690. +++ uClibc-git/libc/sysdeps/linux/xtensa/Makefile.arch 2014-07-25 20:36:07.841340106 +0200
  79691. @@ -5,11 +5,7 @@
  79692. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  79693. #
  79694. -CSRC := brk.c fork.c pread_write.c sigaction.c __syscall_error.c
  79695. +CSRC-y := brk.c fork.c sigaction.c __syscall_error.c
  79696. -ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),y)
  79697. - CSRC += posix_fadvise.c posix_fadvise64.c
  79698. -endif
  79699. -
  79700. -SSRC := bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S \
  79701. +SSRC-y := bsd-_setjmp.S bsd-setjmp.S setjmp.S clone.S \
  79702. sigrestorer.S syscall.S mmap.S windowspill.S __longjmp.S vfork.S
  79703. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/mmap.S uClibc-git/libc/sysdeps/linux/xtensa/mmap.S
  79704. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/mmap.S 2012-05-15 09:20:09.000000000 +0200
  79705. +++ uClibc-git/libc/sysdeps/linux/xtensa/mmap.S 2014-07-25 20:36:07.857340190 +0200
  79706. @@ -12,9 +12,8 @@
  79707. Lesser General Public License for more details.
  79708. You should have received a copy of the GNU Lesser General Public
  79709. - License along with the GNU C Library; if not, write to the Free
  79710. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  79711. - Boston, MA 02110-1301, USA. */
  79712. + License along with the GNU C Library; if not, see
  79713. + <http://www.gnu.org/licenses/>. */
  79714. #include "sysdep.h"
  79715. #include <sys/syscall.h>
  79716. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/posix_fadvise64.c uClibc-git/libc/sysdeps/linux/xtensa/posix_fadvise64.c
  79717. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/posix_fadvise64.c 2012-05-15 09:20:09.000000000 +0200
  79718. +++ uClibc-git/libc/sysdeps/linux/xtensa/posix_fadvise64.c 1970-01-01 01:00:00.000000000 +0100
  79719. @@ -1,39 +0,0 @@
  79720. -/* vi: set sw=4 ts=4: */
  79721. -/*
  79722. - * posix_fadvise64() for Xtensa uClibc
  79723. - *
  79724. - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  79725. - * Copyright (C) 2007 Tensilica Inc.
  79726. - *
  79727. - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  79728. - */
  79729. -
  79730. -#include <features.h>
  79731. -#include <unistd.h>
  79732. -#include <errno.h>
  79733. -#include <endian.h>
  79734. -#include <stdint.h>
  79735. -#include <sys/types.h>
  79736. -#include <sys/syscall.h>
  79737. -#include <fcntl.h>
  79738. -
  79739. -#ifdef __UCLIBC_HAS_LFS__
  79740. -
  79741. -int posix_fadvise64 (int fd, __off64_t offset, __off64_t len, int advice)
  79742. -{
  79743. -#ifdef __NR_fadvise64_64
  79744. - INTERNAL_SYSCALL_DECL (err);
  79745. - int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, advice,
  79746. - __LONG_LONG_PAIR ((long) (offset >> 32),
  79747. - (long) offset),
  79748. - __LONG_LONG_PAIR ((long) (len >> 32),
  79749. - (long) len));
  79750. - if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
  79751. - return 0;
  79752. - return INTERNAL_SYSCALL_ERRNO (ret, err);
  79753. -#else
  79754. - return ENOSYS;
  79755. -#endif
  79756. -}
  79757. -
  79758. -#endif /* __UCLIBC_HAS_LFS__ */
  79759. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/posix_fadvise.c uClibc-git/libc/sysdeps/linux/xtensa/posix_fadvise.c
  79760. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/posix_fadvise.c 2012-05-15 09:20:09.000000000 +0200
  79761. +++ uClibc-git/libc/sysdeps/linux/xtensa/posix_fadvise.c 1970-01-01 01:00:00.000000000 +0100
  79762. @@ -1,29 +0,0 @@
  79763. -/* vi: set sw=4 ts=4: */
  79764. -/*
  79765. - * posix_fadvise() for Xtensa uClibc
  79766. - *
  79767. - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  79768. - * Copyright (C) 2007 Tensilica Inc.
  79769. - *
  79770. - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  79771. - */
  79772. -
  79773. -#include <sys/syscall.h>
  79774. -#include <fcntl.h>
  79775. -
  79776. -int posix_fadvise (int fd, off_t offset, off_t len, int advice)
  79777. -{
  79778. -#ifdef __NR_fadvise64_64
  79779. - INTERNAL_SYSCALL_DECL (err);
  79780. - int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, advice,
  79781. - __LONG_LONG_PAIR ((long) (offset >> 31),
  79782. - (long) offset),
  79783. - __LONG_LONG_PAIR ((long) (len >> 31),
  79784. - (long) len));
  79785. - if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
  79786. - return 0;
  79787. - return INTERNAL_SYSCALL_ERRNO (ret, err);
  79788. -#else
  79789. - return ENOSYS;
  79790. -#endif
  79791. -}
  79792. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/pread_write.c uClibc-git/libc/sysdeps/linux/xtensa/pread_write.c
  79793. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/pread_write.c 2012-05-15 09:20:09.000000000 +0200
  79794. +++ uClibc-git/libc/sysdeps/linux/xtensa/pread_write.c 1970-01-01 01:00:00.000000000 +0100
  79795. @@ -1,189 +0,0 @@
  79796. -/* vi: set sw=4 ts=4: */
  79797. -/*
  79798. - * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  79799. - *
  79800. - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  79801. - */
  79802. -/*
  79803. - * Based in part on the files
  79804. - * ./sysdeps/unix/sysv/linux/pwrite.c,
  79805. - * ./sysdeps/unix/sysv/linux/pread.c,
  79806. - * sysdeps/posix/pread.c
  79807. - * sysdeps/posix/pwrite.c
  79808. - * from GNU libc 2.2.5, but reworked considerably...
  79809. - */
  79810. -
  79811. -#include <sys/syscall.h>
  79812. -#include <unistd.h>
  79813. -#include <stdint.h>
  79814. -#include <endian.h>
  79815. -
  79816. -extern __typeof(pread) __libc_pread;
  79817. -extern __typeof(pwrite) __libc_pwrite;
  79818. -#ifdef __UCLIBC_HAS_LFS__
  79819. -extern __typeof(pread64) __libc_pread64;
  79820. -extern __typeof(pwrite64) __libc_pwrite64;
  79821. -#endif
  79822. -
  79823. -#include <bits/kernel_types.h>
  79824. -
  79825. -#ifdef __NR_pread
  79826. -
  79827. -# define __NR___syscall_pread __NR_pread
  79828. -/* On Xtensa, 64-bit values are aligned in even/odd register pairs. */
  79829. -static __inline__ _syscall6(ssize_t, __syscall_pread, int, fd, void *, buf,
  79830. - size_t, count, int, pad, off_t, offset_hi, off_t, offset_lo)
  79831. -
  79832. -ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
  79833. -{
  79834. - return __syscall_pread(fd, buf, count, 0, __LONG_LONG_PAIR(offset >> 31, offset));
  79835. -}
  79836. -weak_alias(__libc_pread,pread)
  79837. -
  79838. -# ifdef __UCLIBC_HAS_LFS__
  79839. -ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
  79840. -{
  79841. - uint32_t low = offset & 0xffffffff;
  79842. - uint32_t high = offset >> 32;
  79843. - return __syscall_pread(fd, buf, count, 0, __LONG_LONG_PAIR(high, low));
  79844. -}
  79845. -weak_alias(__libc_pread64,pread64)
  79846. -# endif /* __UCLIBC_HAS_LFS__ */
  79847. -
  79848. -#endif /* __NR_pread */
  79849. -
  79850. -#ifdef __NR_pwrite
  79851. -
  79852. -# define __NR___syscall_pwrite __NR_pwrite
  79853. -/* On Xtensa, 64-bit values are aligned in even/odd register pairs. */
  79854. -static __inline__ _syscall6(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
  79855. - size_t, count, int, pad, off_t, offset_hi, off_t, offset_lo)
  79856. -
  79857. -ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
  79858. -{
  79859. - return __syscall_pwrite(fd, buf, count, 0, __LONG_LONG_PAIR(offset >> 31, offset));
  79860. -}
  79861. -weak_alias(__libc_pwrite,pwrite)
  79862. -
  79863. -# ifdef __UCLIBC_HAS_LFS__
  79864. -ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
  79865. -{
  79866. - uint32_t low = offset & 0xffffffff;
  79867. - uint32_t high = offset >> 32;
  79868. - return __syscall_pwrite(fd, buf, count, 0, __LONG_LONG_PAIR(high, low));
  79869. -}
  79870. -weak_alias(__libc_pwrite64,pwrite64)
  79871. -# endif /* __UCLIBC_HAS_LFS__ */
  79872. -#endif /* __NR_pwrite */
  79873. -
  79874. -#if ! defined __NR_pread || ! defined __NR_pwrite
  79875. -
  79876. -static ssize_t __fake_pread_write(int fd, void *buf,
  79877. - size_t count, off_t offset, int do_pwrite)
  79878. -{
  79879. - int save_errno;
  79880. - ssize_t result;
  79881. - off_t old_offset;
  79882. -
  79883. - /* Since we must not change the file pointer preserve the
  79884. - * value so that we can restore it later. */
  79885. - if ((old_offset=lseek(fd, 0, SEEK_CUR)) == (off_t) -1)
  79886. - return -1;
  79887. -
  79888. - /* Set to wanted position. */
  79889. - if (lseek(fd, offset, SEEK_SET) == (off_t) -1)
  79890. - return -1;
  79891. -
  79892. - if (do_pwrite == 1) {
  79893. - /* Write the data. */
  79894. - result = write(fd, buf, count);
  79895. - } else {
  79896. - /* Read the data. */
  79897. - result = read(fd, buf, count);
  79898. - }
  79899. -
  79900. - /* Now we have to restore the position. If this fails we
  79901. - * have to return this as an error. */
  79902. - save_errno = errno;
  79903. - if (lseek(fd, old_offset, SEEK_SET) == (off_t) -1)
  79904. - {
  79905. - if (result == -1)
  79906. - __set_errno(save_errno);
  79907. - return -1;
  79908. - }
  79909. - __set_errno(save_errno);
  79910. - return(result);
  79911. -}
  79912. -
  79913. -# ifdef __UCLIBC_HAS_LFS__
  79914. -
  79915. -static ssize_t __fake_pread_write64(int fd, void *buf,
  79916. - size_t count, off64_t offset, int do_pwrite)
  79917. -{
  79918. - int save_errno;
  79919. - ssize_t result;
  79920. - off64_t old_offset;
  79921. -
  79922. - /* Since we must not change the file pointer preserve the
  79923. - * value so that we can restore it later. */
  79924. - if ((old_offset=lseek64(fd, 0, SEEK_CUR)) == (off64_t) -1)
  79925. - return -1;
  79926. -
  79927. - /* Set to wanted position. */
  79928. - if (lseek64(fd, offset, SEEK_SET) == (off64_t) -1)
  79929. - return -1;
  79930. -
  79931. - if (do_pwrite == 1) {
  79932. - /* Write the data. */
  79933. - result = write(fd, buf, count);
  79934. - } else {
  79935. - /* Read the data. */
  79936. - result = read(fd, buf, count);
  79937. - }
  79938. -
  79939. - /* Now we have to restore the position. */
  79940. - save_errno = errno;
  79941. - if (lseek64(fd, old_offset, SEEK_SET) == (off64_t) -1) {
  79942. - if (result == -1)
  79943. - __set_errno (save_errno);
  79944. - return -1;
  79945. - }
  79946. - __set_errno (save_errno);
  79947. - return result;
  79948. -}
  79949. -# endif /* __UCLIBC_HAS_LFS__ */
  79950. -#endif /* ! defined __NR_pread || ! defined __NR_pwrite */
  79951. -
  79952. -#ifndef __NR_pread
  79953. -ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
  79954. -{
  79955. - return __fake_pread_write(fd, buf, count, offset, 0);
  79956. -}
  79957. -weak_alias(__libc_pread,pread)
  79958. -
  79959. -# ifdef __UCLIBC_HAS_LFS__
  79960. -ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
  79961. -{
  79962. - return __fake_pread_write64(fd, buf, count, offset, 0);
  79963. -}
  79964. -weak_alias(__libc_pread64,pread64)
  79965. -# endif /* __UCLIBC_HAS_LFS__ */
  79966. -#endif /* ! __NR_pread */
  79967. -
  79968. -#ifndef __NR_pwrite
  79969. -ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
  79970. -{
  79971. - /* we won't actually be modifying the buffer,
  79972. - *just cast it to get rid of warnings */
  79973. - return __fake_pread_write(fd, (void*)buf, count, offset, 1);
  79974. -}
  79975. -weak_alias(__libc_pwrite,pwrite)
  79976. -
  79977. -# ifdef __UCLIBC_HAS_LFS__
  79978. -ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
  79979. -{
  79980. - return __fake_pread_write64(fd, (void*)buf, count, offset, 1);
  79981. -}
  79982. -weak_alias(__libc_pwrite64,pwrite64)
  79983. -# endif /* __UCLIBC_HAS_LFS__ */
  79984. -#endif /* ! __NR_pwrite */
  79985. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/setjmp.S uClibc-git/libc/sysdeps/linux/xtensa/setjmp.S
  79986. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/setjmp.S 2012-05-15 09:20:09.000000000 +0200
  79987. +++ uClibc-git/libc/sysdeps/linux/xtensa/setjmp.S 2014-07-25 20:36:07.857340190 +0200
  79988. @@ -13,9 +13,8 @@
  79989. Lesser General Public License for more details.
  79990. You should have received a copy of the GNU Lesser General Public
  79991. - License along with the GNU C Library; if not, write to the Free
  79992. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  79993. - Boston, MA 02110-1301, USA. */
  79994. + License along with the GNU C Library; if not, see
  79995. + <http://www.gnu.org/licenses/>. */
  79996. /* This implementation relies heavily on the Xtensa register window
  79997. mechanism. Setjmp flushes all the windows except its own to the
  79998. @@ -25,24 +24,52 @@
  79999. then sets things up so that it will return to the right place,
  80000. using a window underflow to automatically restore the registers.
  80001. - Note that it would probably be sufficient to only copy the
  80002. - registers from setjmp's caller into jmp_buf. However, we also copy
  80003. - the save area located at the stack pointer of setjmp's caller.
  80004. - This save area will typically remain intact until the longjmp call.
  80005. - The one exception is when there is an intervening alloca in
  80006. - setjmp's caller. This is certainly an unusual situation and is
  80007. - likely to cause problems in any case (the storage allocated on the
  80008. - stack cannot be safely accessed following the longjmp). As bad as
  80009. - it is, on most systems this situation would not necessarily lead to
  80010. - a catastrophic failure. If we did not preserve the extra save area
  80011. - on Xtensa, however, it would. When setjmp's caller returns after a
  80012. - longjmp, there will be a window underflow; an invalid return
  80013. - address or stack pointer in the save area will almost certainly
  80014. - lead to a crash. Keeping a copy of the extra save area in the
  80015. - jmp_buf avoids this with only a small additional cost. If setjmp
  80016. - and longjmp are ever time-critical, this could be removed. */
  80017. + Note that we also save the area located just below the stack pointer
  80018. + of the caller. This save area could get overwritten by alloca
  80019. + following the call to setjmp. The alloca moves the stack pointer
  80020. + to allocate memory on the stack. This newly allocated memory
  80021. + includes(!) the original save area (alloca copies the save area
  80022. + before it moves that stack pointer).
  80023. +
  80024. +
  80025. + previous caller SP -> |------------------------------| <-----+
  80026. + | caller-2 registers a0-a3 | | p
  80027. + |------------------------------| | o
  80028. + | caller registers a4-a8/a12 | | i
  80029. + |------------------------------| | n
  80030. + | caller local stack | | t
  80031. + caller SP -> |------------------------------| <-+ | s
  80032. + | caller-1 registers a0-a3 | -:---+
  80033. + callee (setjmp) SP -> |==============================| |
  80034. + | caller registers a0-a3 | --+
  80035. + |------------------------------|
  80036. +
  80037. + In case of an alloca, registers a0-a3 of the previous caller (caller-1)
  80038. + are copied (*), and the original location get likely overwritten.
  80039. +
  80040. + previous caller SP -> |------------------------------| <-----+
  80041. + | caller-2 registers a0-a3 | | p
  80042. + |------------------------------| | o
  80043. + | caller registers a4-a8/a12 | | i
  80044. + |------------------------------| | n
  80045. + | caller local stack | | t
  80046. + caller SP before alloca-> |------------------------------| | s
  80047. + | alloca area (overwrites old | |
  80048. + | copy of caller-1 registers) | |
  80049. + caller SP after alloca -> |------------------------------| <-+ |
  80050. + | caller-1 registers a0-a3 (*) | -:---+
  80051. + callee (setjmp) SP -> |==============================| |
  80052. + | caller registers a0-a3 | --+
  80053. + |------------------------------|
  80054. +
  80055. + So, when longcall returns to the original caller SP, it also needs
  80056. + to restore the save area below the SP.
  80057. +
  80058. + */
  80059. #include "sysdep.h"
  80060. +
  80061. +/* NOTE: The ENTRY macro must allocate exactly 16 bytes (entry a1, 16) */
  80062. /* int setjmp (a2 = jmp_buf env) */
  80063. @@ -57,8 +84,7 @@
  80064. j 1f
  80065. END (setjmp)
  80066. -/* int __sigsetjmp (a2 = jmp_buf env,
  80067. - a3 = int savemask) */
  80068. +/* int __sigsetjmp (a2 = jmp_buf env, a3 = int savemask) */
  80069. ENTRY (__sigsetjmp)
  80070. 1:
  80071. @@ -66,61 +92,56 @@
  80072. movi a4, __window_spill
  80073. callx4 a4
  80074. - /* Preserve the second argument (savemask) in a15. The selection
  80075. - of a15 is arbitrary, except it's otherwise unused. There is no
  80076. - risk of triggering a window overflow since we just returned
  80077. - from __window_spill(). */
  80078. - mov a15, a3
  80079. -
  80080. - /* Copy the register save area at (sp - 16). */
  80081. - addi a5, a1, -16
  80082. - l32i a3, a5, 0
  80083. - l32i a4, a5, 4
  80084. - s32i a3, a2, 0
  80085. - s32i a4, a2, 4
  80086. - l32i a3, a5, 8
  80087. - l32i a4, a5, 12
  80088. - s32i a3, a2, 8
  80089. - s32i a4, a2, 12
  80090. -
  80091. - /* Copy 0-8 words from the register overflow area. */
  80092. - extui a3, a0, 30, 2
  80093. - blti a3, 2, .Lendsj
  80094. - l32i a7, a1, 4
  80095. - slli a4, a3, 4
  80096. - sub a5, a7, a4
  80097. - addi a6, a2, 16
  80098. - addi a7, a7, -16 /* a7 = end of register overflow area */
  80099. + /* Copy the caller register a0-a3 at (sp - 16) to jmpbuf. */
  80100. + addi a7, a1, -16
  80101. + l32i a4, a7, 0
  80102. + l32i a5, a7, 4
  80103. + s32i a4, a2, 0
  80104. + s32i a5, a2, 4
  80105. + l32i a4, a7, 8
  80106. + l32i a5, a7, 12
  80107. + s32i a4, a2, 8
  80108. + s32i a5, a2, 12
  80109. +
  80110. + /* Copy the caller registers a4-a8/a12 from the overflow area. */
  80111. + /* Note that entry moved the SP by 16B, so SP of caller-1 is at 4(sp) */
  80112. + extui a7, a0, 30, 2
  80113. + blti a7, 2, .Lendsj
  80114. + l32i a8, a1, 4 /* a8: SP of 'caller-1' */
  80115. + slli a4, a7, 4
  80116. + sub a6, a8, a4
  80117. + addi a5, a2, 16
  80118. + addi a8, a8, -16 /* a8: end of register overflow area */
  80119. .Lsjloop:
  80120. - l32i a3, a5, 0
  80121. - l32i a4, a5, 4
  80122. - s32i a3, a6, 0
  80123. - s32i a4, a6, 4
  80124. - l32i a3, a5, 8
  80125. - l32i a4, a5, 12
  80126. - s32i a3, a6, 8
  80127. - s32i a4, a6, 12
  80128. - addi a5, a5, 16
  80129. + l32i a7, a6, 0
  80130. + l32i a4, a6, 4
  80131. + s32i a7, a5, 0
  80132. + s32i a4, a5, 4
  80133. + l32i a7, a6, 8
  80134. + l32i a4, a6, 12
  80135. + s32i a7, a5, 8
  80136. + s32i a4, a5, 12
  80137. + addi a5, a6, 16
  80138. addi a6, a6, 16
  80139. - blt a5, a7, .Lsjloop
  80140. + blt a6, a8, .Lsjloop
  80141. .Lendsj:
  80142. - /* Copy the register save area at sp. */
  80143. - l32i a3, a1, 0
  80144. - l32i a4, a1, 4
  80145. - s32i a3, a2, 48
  80146. - s32i a4, a2, 52
  80147. - l32i a3, a1, 8
  80148. - l32i a4, a1, 12
  80149. - s32i a3, a2, 56
  80150. - s32i a4, a2, 60
  80151. + /* Copy previous caller registers (this is assuming 'entry a1,16') */
  80152. + l32i a4, a1, 0
  80153. + l32i a5, a1, 4
  80154. + s32i a4, a2, 48
  80155. + s32i a5, a2, 52
  80156. + l32i a4, a1, 8
  80157. + l32i a5, a1, 12
  80158. + s32i a4, a2, 56
  80159. + s32i a5, a2, 60
  80160. /* Save the return address, including the window size bits. */
  80161. s32i a0, a2, 64
  80162. - /* a2 still addresses jmp_buf. a15 contains savemask. */
  80163. + /* a2 still points to jmp_buf. a3 contains savemask. */
  80164. mov a6, a2
  80165. - mov a7, a15
  80166. + mov a7, a3
  80167. movi a3, __sigjmp_save
  80168. callx4 a3
  80169. mov a2, a6
  80170. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/sys/procfs.h uClibc-git/libc/sysdeps/linux/xtensa/sys/procfs.h
  80171. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/sys/procfs.h 2012-05-15 09:20:09.000000000 +0200
  80172. +++ uClibc-git/libc/sysdeps/linux/xtensa/sys/procfs.h 2014-07-25 20:36:07.873340274 +0200
  80173. @@ -12,9 +12,8 @@
  80174. Lesser General Public License for more details.
  80175. You should have received a copy of the GNU Lesser General Public
  80176. - License along with the GNU C Library; if not, write to the Free
  80177. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  80178. - Boston, MA 02110-1301, USA. */
  80179. + License along with the GNU C Library; if not, see
  80180. + <http://www.gnu.org/licenses/>. */
  80181. #ifndef _SYS_PROCFS_H
  80182. #define _SYS_PROCFS_H 1
  80183. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/sys/ptrace.h uClibc-git/libc/sysdeps/linux/xtensa/sys/ptrace.h
  80184. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/sys/ptrace.h 2012-05-15 09:20:09.000000000 +0200
  80185. +++ uClibc-git/libc/sysdeps/linux/xtensa/sys/ptrace.h 1970-01-01 01:00:00.000000000 +0100
  80186. @@ -1,156 +0,0 @@
  80187. -/* `ptrace' debugger support interface. Linux version.
  80188. - Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007
  80189. - Free Software Foundation, Inc.
  80190. - This file is part of the GNU C Library.
  80191. -
  80192. - The GNU C Library is free software; you can redistribute it and/or
  80193. - modify it under the terms of the GNU Lesser General Public
  80194. - License as published by the Free Software Foundation; either
  80195. - version 2.1 of the License, or (at your option) any later version.
  80196. -
  80197. - The GNU C Library is distributed in the hope that it will be useful,
  80198. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  80199. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  80200. - Lesser General Public License for more details.
  80201. -
  80202. - You should have received a copy of the GNU Lesser General Public
  80203. - License along with the GNU C Library; if not, write to the Free
  80204. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  80205. - Boston, MA 02110-1301, USA. */
  80206. -
  80207. -#ifndef _SYS_PTRACE_H
  80208. -#define _SYS_PTRACE_H 1
  80209. -
  80210. -#include <features.h>
  80211. -
  80212. -/* Kludge away careless namespace pollution from the kernel. */
  80213. -
  80214. -#undef PTRACE_GETREGS
  80215. -#undef PTRACE_SETREGS
  80216. -#undef PTRACE_GETFPREGS
  80217. -#undef PTRACE_SETFPREGS
  80218. -#undef PTRACE_GETFPREGSIZE
  80219. -
  80220. -
  80221. -__BEGIN_DECLS
  80222. -
  80223. -/* Type of the REQUEST argument to `ptrace.' */
  80224. -enum __ptrace_request
  80225. -{
  80226. - /* Indicate that the process making this request should be traced.
  80227. - All signals received by this process can be intercepted by its
  80228. - parent, and its parent can use the other `ptrace' requests. */
  80229. - PTRACE_TRACEME = 0,
  80230. -#define PT_TRACE_ME PTRACE_TRACEME
  80231. -
  80232. - /* Return the word in the process's text space at address ADDR. */
  80233. - PTRACE_PEEKTEXT = 1,
  80234. -#define PT_READ_I PTRACE_PEEKTEXT
  80235. -
  80236. - /* Return the word in the process's data space at address ADDR. */
  80237. - PTRACE_PEEKDATA = 2,
  80238. -#define PT_READ_D PTRACE_PEEKDATA
  80239. -
  80240. - /* Return the word in the process's user area at offset ADDR. */
  80241. - PTRACE_PEEKUSER = 3,
  80242. -#define PT_READ_U PTRACE_PEEKUSER
  80243. -
  80244. - /* Write the word DATA into the process's text space at address ADDR. */
  80245. - PTRACE_POKETEXT = 4,
  80246. -#define PT_WRITE_I PTRACE_POKETEXT
  80247. -
  80248. - /* Write the word DATA into the process's data space at address ADDR. */
  80249. - PTRACE_POKEDATA = 5,
  80250. -#define PT_WRITE_D PTRACE_POKEDATA
  80251. -
  80252. - /* Write the word DATA into the process's user area at offset ADDR. */
  80253. - PTRACE_POKEUSER = 6,
  80254. -#define PT_WRITE_U PTRACE_POKEUSER
  80255. -
  80256. - /* Continue the process. */
  80257. - PTRACE_CONT = 7,
  80258. -#define PT_CONTINUE PTRACE_CONT
  80259. -
  80260. - /* Kill the process. */
  80261. - PTRACE_KILL = 8,
  80262. -#define PT_KILL PTRACE_KILL
  80263. -
  80264. - /* Single step the process.
  80265. - This is not supported on all machines. */
  80266. - PTRACE_SINGLESTEP = 9,
  80267. -#define PT_STEP PTRACE_SINGLESTEP
  80268. -
  80269. - /* Get all general purpose registers used by a processes.
  80270. - This is not supported on all machines. */
  80271. - PTRACE_GETREGS = 12,
  80272. -#define PT_GETREGS PTRACE_GETREGS
  80273. -
  80274. - /* Set all general purpose registers used by a processes.
  80275. - This is not supported on all machines. */
  80276. - PTRACE_SETREGS = 13,
  80277. -#define PT_SETREGS PTRACE_SETREGS
  80278. -
  80279. - /* Get all floating point registers used by a processes.
  80280. - This is not supported on all machines. */
  80281. - PTRACE_GETFPREGS = 14,
  80282. -#define PT_GETFPREGS PTRACE_GETFPREGS
  80283. -
  80284. - /* Set all floating point registers used by a processes.
  80285. - This is not supported on all machines. */
  80286. - PTRACE_SETFPREGS = 15,
  80287. -#define PT_SETFPREGS PTRACE_SETFPREGS
  80288. -
  80289. - /* Attach to a process that is already running. */
  80290. - PTRACE_ATTACH = 16,
  80291. -#define PT_ATTACH PTRACE_ATTACH
  80292. -
  80293. - /* Detach from a process attached to with PTRACE_ATTACH. */
  80294. - PTRACE_DETACH = 17,
  80295. -#define PT_DETACH PTRACE_DETACH
  80296. -
  80297. - /* Get size required for the buffer holding the floating point registers.
  80298. - This is not supported on all machines. */
  80299. - PTRACE_GETFPREGSIZE = 18,
  80300. -#define PT_GETFPREGSIZE PTRACE_GETFPREGSIZE
  80301. -
  80302. - /* Continue and stop at the next (return from) syscall. */
  80303. - PTRACE_SYSCALL = 24
  80304. -#define PT_SYSCALL PTRACE_SYSCALL
  80305. -};
  80306. -
  80307. -/* Options set using PTRACE_SETOPTIONS. */
  80308. -enum __ptrace_setoptions {
  80309. - PTRACE_O_TRACESYSGOOD = 0x00000001,
  80310. - PTRACE_O_TRACEFORK = 0x00000002,
  80311. - PTRACE_O_TRACEVFORK = 0x00000004,
  80312. - PTRACE_O_TRACECLONE = 0x00000008,
  80313. - PTRACE_O_TRACEEXEC = 0x00000010,
  80314. - PTRACE_O_TRACEVFORKDONE = 0x00000020,
  80315. - PTRACE_O_TRACEEXIT = 0x00000040,
  80316. - PTRACE_O_MASK = 0x0000007f
  80317. -};
  80318. -
  80319. -/* Wait extended result codes for the above trace options. */
  80320. -enum __ptrace_eventcodes {
  80321. - PTRACE_EVENT_FORK = 1,
  80322. - PTRACE_EVENT_VFORK = 2,
  80323. - PTRACE_EVENT_CLONE = 3,
  80324. - PTRACE_EVENT_EXEC = 4,
  80325. - PTRACE_EVENT_VFORK_DONE = 5,
  80326. - PTRACE_EVENT_EXIT = 6
  80327. -};
  80328. -
  80329. -/* Perform process tracing functions. REQUEST is one of the values
  80330. - above, and determines the action to be taken.
  80331. - For all requests except PTRACE_TRACEME, PID specifies the process to be
  80332. - traced.
  80333. -
  80334. - PID and the other arguments described above for the various requests should
  80335. - appear (those that are used for the particular request) as:
  80336. - pid_t PID, void *ADDR, int DATA, void *ADDR2
  80337. - after REQUEST. */
  80338. -extern long int ptrace (enum __ptrace_request __request, ...) __THROW;
  80339. -
  80340. -__END_DECLS
  80341. -
  80342. -#endif /* _SYS_PTRACE_H */
  80343. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/sys/ucontext.h uClibc-git/libc/sysdeps/linux/xtensa/sys/ucontext.h
  80344. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/sys/ucontext.h 2012-05-15 09:20:09.000000000 +0200
  80345. +++ uClibc-git/libc/sysdeps/linux/xtensa/sys/ucontext.h 2014-07-25 20:36:07.873340274 +0200
  80346. @@ -12,9 +12,8 @@
  80347. Lesser General Public License for more details.
  80348. You should have received a copy of the GNU Lesser General Public
  80349. - License along with the GNU C Library; if not, write to the Free
  80350. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  80351. - Boston, MA 02110-1301, USA. */
  80352. + License along with the GNU C Library; if not, see
  80353. + <http://www.gnu.org/licenses/>. */
  80354. #ifndef _SYS_UCONTEXT_H
  80355. #define _SYS_UCONTEXT_H 1
  80356. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/sys/user.h uClibc-git/libc/sysdeps/linux/xtensa/sys/user.h
  80357. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/sys/user.h 1970-01-01 01:00:00.000000000 +0100
  80358. +++ uClibc-git/libc/sysdeps/linux/xtensa/sys/user.h 2014-07-25 20:36:07.873340274 +0200
  80359. @@ -0,0 +1,20 @@
  80360. +/*
  80361. + * include/asm-xtensa/user.h
  80362. + *
  80363. + * Xtensa Processor version.
  80364. + *
  80365. + * This file is subject to the terms and conditions of the GNU General Public
  80366. + * License. See the file "COPYING" in the main directory of this archive
  80367. + * for more details.
  80368. + *
  80369. + * Copyright (C) 2001 - 2005 Tensilica Inc.
  80370. + */
  80371. +
  80372. +#ifndef _XTENSA_USER_H
  80373. +#define _XTENSA_USER_H
  80374. +
  80375. +/* This file usually defines a 'struct user' structure. However, it it only
  80376. + * used for a.out file, which are not supported on Xtensa.
  80377. + */
  80378. +
  80379. +#endif /* _XTENSA_USER_H */
  80380. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/syscall.S uClibc-git/libc/sysdeps/linux/xtensa/syscall.S
  80381. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/syscall.S 2012-05-15 09:20:09.000000000 +0200
  80382. +++ uClibc-git/libc/sysdeps/linux/xtensa/syscall.S 2014-07-25 20:36:07.873340274 +0200
  80383. @@ -12,9 +12,8 @@
  80384. Lesser General Public License for more details.
  80385. You should have received a copy of the GNU Lesser General Public
  80386. - License along with the GNU C Library; if not, write to the Free
  80387. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  80388. - Boston, MA 02110-1301, USA. */
  80389. + License along with the GNU C Library; if not, see
  80390. + <http://www.gnu.org/licenses/>. */
  80391. #include "sysdep.h"
  80392. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/sysdep.h uClibc-git/libc/sysdeps/linux/xtensa/sysdep.h
  80393. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/sysdep.h 2012-05-15 09:20:09.000000000 +0200
  80394. +++ uClibc-git/libc/sysdeps/linux/xtensa/sysdep.h 2014-07-25 20:36:07.873340274 +0200
  80395. @@ -13,9 +13,10 @@
  80396. Lesser General Public License for more details.
  80397. You should have received a copy of the GNU Lesser General Public
  80398. - License along with the GNU C Library; if not, write to the Free
  80399. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  80400. - Boston, MA 02110-1301, USA. */
  80401. + License along with the GNU C Library; if not, see
  80402. + <http://www.gnu.org/licenses/>. */
  80403. +
  80404. +#include <sys/syscall.h>
  80405. #ifdef __ASSEMBLER__
  80406. @@ -38,6 +39,16 @@
  80407. entry sp, FRAMESIZE; \
  80408. CALL_MCOUNT
  80409. +#define HIDDEN_ENTRY(name) \
  80410. + ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \
  80411. + .hidden C_SYMBOL_NAME(name); \
  80412. + ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name), @function); \
  80413. + .align ALIGNARG(2); \
  80414. + LITERAL_POSITION; \
  80415. + C_LABEL(name) \
  80416. + entry sp, FRAMESIZE; \
  80417. + CALL_MCOUNT
  80418. +
  80419. #undef END
  80420. #define END(name) ASM_SIZE_DIRECTIVE(name)
  80421. @@ -112,6 +123,7 @@
  80422. #define PSEUDO_END_ERRVAL(name) \
  80423. END (name)
  80424. +#undef ret_ERRVAL
  80425. #define ret_ERRVAL retw
  80426. #if defined RTLD_PRIVATE_ERRNO
  80427. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/vfork.S uClibc-git/libc/sysdeps/linux/xtensa/vfork.S
  80428. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/vfork.S 2012-05-15 09:20:09.000000000 +0200
  80429. +++ uClibc-git/libc/sysdeps/linux/xtensa/vfork.S 2014-07-25 20:36:07.873340274 +0200
  80430. @@ -12,9 +12,8 @@
  80431. Lesser General Public License for more details.
  80432. You should have received a copy of the GNU Lesser General Public
  80433. - License along with the GNU C Library; if not, write to the Free
  80434. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  80435. - Boston, MA 02110-1301, USA. */
  80436. + License along with the GNU C Library; if not, see
  80437. + <http://www.gnu.org/licenses/>. */
  80438. #include "sysdep.h"
  80439. #include <sys/syscall.h>
  80440. @@ -49,7 +48,7 @@
  80441. /* pid_t vfork(void);
  80442. Implemented as __clone_syscall(CLONE_VFORK | CLONE_VM | SIGCHLD, 0) */
  80443. -ENTRY (__vfork)
  80444. +HIDDEN_ENTRY (__vfork)
  80445. movi a6, .Ljumptable
  80446. extui a2, a0, 30, 2 /* call-size: call4/8/12 = 1/2/3 */
  80447. @@ -165,6 +164,5 @@
  80448. .Lpseudo_end:
  80449. retw
  80450. -libc_hidden_def (__vfork)
  80451. -
  80452. weak_alias (__vfork, vfork)
  80453. +libc_hidden_def(vfork)
  80454. diff -Nur uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/windowspill.S uClibc-git/libc/sysdeps/linux/xtensa/windowspill.S
  80455. --- uClibc-0.9.33.2/libc/sysdeps/linux/xtensa/windowspill.S 2012-05-15 09:20:09.000000000 +0200
  80456. +++ uClibc-git/libc/sysdeps/linux/xtensa/windowspill.S 2014-07-25 20:36:07.873340274 +0200
  80457. @@ -13,9 +13,8 @@
  80458. Lesser General Public License for more details.
  80459. You should have received a copy of the GNU Lesser General Public
  80460. - License along with the GNU C Library; if not, write to the Free
  80461. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  80462. - Boston, MA 02110-1301, USA. */
  80463. + License along with the GNU C Library; if not, see
  80464. + <http://www.gnu.org/licenses/>. */
  80465. #include <bits/xtensa-config.h>
  80466. diff -Nur uClibc-0.9.33.2/libc/termios/cfmakeraw.c uClibc-git/libc/termios/cfmakeraw.c
  80467. --- uClibc-0.9.33.2/libc/termios/cfmakeraw.c 2012-05-15 09:20:09.000000000 +0200
  80468. +++ uClibc-git/libc/termios/cfmakeraw.c 2014-07-25 20:36:07.881340316 +0200
  80469. @@ -12,9 +12,8 @@
  80470. Lesser General Public License for more details.
  80471. You should have received a copy of the GNU Lesser General Public
  80472. - License along with the GNU C Library; if not, write to the Free
  80473. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  80474. - 02111-1307 USA. */
  80475. + License along with the GNU C Library; if not, see
  80476. + <http://www.gnu.org/licenses/>. */
  80477. #include <termios.h>
  80478. diff -Nur uClibc-0.9.33.2/libc/termios/cfsetspeed.c uClibc-git/libc/termios/cfsetspeed.c
  80479. --- uClibc-0.9.33.2/libc/termios/cfsetspeed.c 2012-05-15 09:20:09.000000000 +0200
  80480. +++ uClibc-git/libc/termios/cfsetspeed.c 2014-07-25 20:36:07.881340316 +0200
  80481. @@ -12,9 +12,8 @@
  80482. Lesser General Public License for more details.
  80483. You should have received a copy of the GNU Lesser General Public
  80484. - License along with the GNU C Library; if not, write to the Free
  80485. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  80486. - 02111-1307 USA. */
  80487. + License along with the GNU C Library; if not, see
  80488. + <http://www.gnu.org/licenses/>. */
  80489. #include <termios.h>
  80490. #include <errno.h>
  80491. diff -Nur uClibc-0.9.33.2/libc/termios/isatty.c uClibc-git/libc/termios/isatty.c
  80492. --- uClibc-0.9.33.2/libc/termios/isatty.c 2012-05-15 09:20:09.000000000 +0200
  80493. +++ uClibc-git/libc/termios/isatty.c 2014-07-25 20:36:07.881340316 +0200
  80494. @@ -12,9 +12,8 @@
  80495. Lesser General Public License for more details.
  80496. You should have received a copy of the GNU Lesser General Public
  80497. - License along with the GNU C Library; if not, write to the Free
  80498. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  80499. - 02111-1307 USA. */
  80500. + License along with the GNU C Library; if not, see
  80501. + <http://www.gnu.org/licenses/>. */
  80502. #include <unistd.h>
  80503. #include <termios.h>
  80504. diff -Nur uClibc-0.9.33.2/libc/termios/kernel_termios.h uClibc-git/libc/termios/kernel_termios.h
  80505. --- uClibc-0.9.33.2/libc/termios/kernel_termios.h 2012-05-15 09:20:09.000000000 +0200
  80506. +++ uClibc-git/libc/termios/kernel_termios.h 2014-07-25 20:36:07.881340316 +0200
  80507. @@ -12,9 +12,8 @@
  80508. Lesser General Public License for more details.
  80509. You should have received a copy of the GNU Lesser General Public
  80510. - License along with the GNU C Library; if not, write to the Free
  80511. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  80512. - 02111-1307 USA. */
  80513. + License along with the GNU C Library; if not, see
  80514. + <http://www.gnu.org/licenses/>. */
  80515. #ifndef _KERNEL_TERMIOS_H
  80516. #define _KERNEL_TERMIOS_H 1
  80517. diff -Nur uClibc-0.9.33.2/libc/termios/speed.c uClibc-git/libc/termios/speed.c
  80518. --- uClibc-0.9.33.2/libc/termios/speed.c 2012-05-15 09:20:09.000000000 +0200
  80519. +++ uClibc-git/libc/termios/speed.c 2014-07-25 20:36:07.881340316 +0200
  80520. @@ -14,9 +14,8 @@
  80521. Lesser General Public License for more details.
  80522. You should have received a copy of the GNU Lesser General Public
  80523. - License along with the GNU C Library; if not, write to the Free
  80524. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  80525. - 02111-1307 USA. */
  80526. + License along with the GNU C Library; if not, see
  80527. + <http://www.gnu.org/licenses/>. */
  80528. #include <stddef.h>
  80529. #include <errno.h>
  80530. diff -Nur uClibc-0.9.33.2/libc/termios/tcdrain.c uClibc-git/libc/termios/tcdrain.c
  80531. --- uClibc-0.9.33.2/libc/termios/tcdrain.c 2012-05-15 09:20:09.000000000 +0200
  80532. +++ uClibc-git/libc/termios/tcdrain.c 2014-07-25 20:36:07.881340316 +0200
  80533. @@ -12,9 +12,8 @@
  80534. Lesser General Public License for more details.
  80535. You should have received a copy of the GNU Lesser General Public
  80536. - License along with the GNU C Library; if not, write to the Free
  80537. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  80538. - 02111-1307 USA. */
  80539. + License along with the GNU C Library; if not, see
  80540. + <http://www.gnu.org/licenses/>. */
  80541. #include <errno.h>
  80542. #include <termios.h>
  80543. diff -Nur uClibc-0.9.33.2/libc/termios/tcflow.c uClibc-git/libc/termios/tcflow.c
  80544. --- uClibc-0.9.33.2/libc/termios/tcflow.c 2012-05-15 09:20:09.000000000 +0200
  80545. +++ uClibc-git/libc/termios/tcflow.c 2014-07-25 20:36:07.881340316 +0200
  80546. @@ -13,9 +13,8 @@
  80547. Lesser General Public License for more details.
  80548. You should have received a copy of the GNU Lesser General Public
  80549. - License along with the GNU C Library; if not, write to the Free
  80550. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  80551. - 02111-1307 USA. */
  80552. + License along with the GNU C Library; if not, see
  80553. + <http://www.gnu.org/licenses/>. */
  80554. #include <errno.h>
  80555. #include <termios.h>
  80556. diff -Nur uClibc-0.9.33.2/libc/termios/tcflush.c uClibc-git/libc/termios/tcflush.c
  80557. --- uClibc-0.9.33.2/libc/termios/tcflush.c 2012-05-15 09:20:09.000000000 +0200
  80558. +++ uClibc-git/libc/termios/tcflush.c 2014-07-25 20:36:07.881340316 +0200
  80559. @@ -13,9 +13,8 @@
  80560. Lesser General Public License for more details.
  80561. You should have received a copy of the GNU Lesser General Public
  80562. - License along with the GNU C Library; if not, write to the Free
  80563. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  80564. - 02111-1307 USA. */
  80565. + License along with the GNU C Library; if not, see
  80566. + <http://www.gnu.org/licenses/>. */
  80567. #include <errno.h>
  80568. #include <termios.h>
  80569. diff -Nur uClibc-0.9.33.2/libc/termios/tcgetattr.c uClibc-git/libc/termios/tcgetattr.c
  80570. --- uClibc-0.9.33.2/libc/termios/tcgetattr.c 2012-05-15 09:20:09.000000000 +0200
  80571. +++ uClibc-git/libc/termios/tcgetattr.c 2014-07-25 20:36:07.881340316 +0200
  80572. @@ -12,9 +12,8 @@
  80573. Lesser General Public License for more details.
  80574. You should have received a copy of the GNU Lesser General Public
  80575. - License along with the GNU C Library; if not, write to the Free
  80576. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  80577. - 02111-1307 USA. */
  80578. + License along with the GNU C Library; if not, see
  80579. + <http://www.gnu.org/licenses/>. */
  80580. #include <features.h>
  80581. #include <string.h>
  80582. diff -Nur uClibc-0.9.33.2/libc/termios/tcgetpgrp.c uClibc-git/libc/termios/tcgetpgrp.c
  80583. --- uClibc-0.9.33.2/libc/termios/tcgetpgrp.c 2012-05-15 09:20:09.000000000 +0200
  80584. +++ uClibc-git/libc/termios/tcgetpgrp.c 2014-07-25 20:36:07.881340316 +0200
  80585. @@ -12,9 +12,8 @@
  80586. Lesser General Public License for more details.
  80587. You should have received a copy of the GNU Lesser General Public
  80588. - License along with the GNU C Library; if not, write to the Free
  80589. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  80590. - 02111-1307 USA. */
  80591. + License along with the GNU C Library; if not, see
  80592. + <http://www.gnu.org/licenses/>. */
  80593. #include <sys/ioctl.h>
  80594. #include <errno.h>
  80595. diff -Nur uClibc-0.9.33.2/libc/termios/tcgetsid.c uClibc-git/libc/termios/tcgetsid.c
  80596. --- uClibc-0.9.33.2/libc/termios/tcgetsid.c 2012-05-15 09:20:09.000000000 +0200
  80597. +++ uClibc-git/libc/termios/tcgetsid.c 2014-07-25 20:36:07.881340316 +0200
  80598. @@ -12,9 +12,8 @@
  80599. Lesser General Public License for more details.
  80600. You should have received a copy of the GNU Lesser General Public
  80601. - License along with the GNU C Library; if not, write to the Free
  80602. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  80603. - 02111-1307 USA. */
  80604. + License along with the GNU C Library; if not, see
  80605. + <http://www.gnu.org/licenses/>. */
  80606. #include <errno.h>
  80607. #include <termios.h>
  80608. diff -Nur uClibc-0.9.33.2/libc/termios/tcsendbrk.c uClibc-git/libc/termios/tcsendbrk.c
  80609. --- uClibc-0.9.33.2/libc/termios/tcsendbrk.c 2012-05-15 09:20:09.000000000 +0200
  80610. +++ uClibc-git/libc/termios/tcsendbrk.c 2014-07-25 20:36:07.881340316 +0200
  80611. @@ -13,9 +13,8 @@
  80612. Lesser General Public License for more details.
  80613. You should have received a copy of the GNU Lesser General Public
  80614. - License along with the GNU C Library; if not, write to the Free
  80615. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  80616. - 02111-1307 USA. */
  80617. + License along with the GNU C Library; if not, see
  80618. + <http://www.gnu.org/licenses/>. */
  80619. #include <errno.h>
  80620. #include <stddef.h>
  80621. diff -Nur uClibc-0.9.33.2/libc/termios/tcsetattr.c uClibc-git/libc/termios/tcsetattr.c
  80622. --- uClibc-0.9.33.2/libc/termios/tcsetattr.c 2012-05-15 09:20:09.000000000 +0200
  80623. +++ uClibc-git/libc/termios/tcsetattr.c 2014-07-25 20:36:07.881340316 +0200
  80624. @@ -12,9 +12,8 @@
  80625. Lesser General Public License for more details.
  80626. You should have received a copy of the GNU Lesser General Public
  80627. - License along with the GNU C Library; if not, write to the Free
  80628. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  80629. - 02111-1307 USA. */
  80630. + License along with the GNU C Library; if not, see
  80631. + <http://www.gnu.org/licenses/>. */
  80632. #include <errno.h>
  80633. #include <string.h>
  80634. diff -Nur uClibc-0.9.33.2/libc/termios/tcsetpgrp.c uClibc-git/libc/termios/tcsetpgrp.c
  80635. --- uClibc-0.9.33.2/libc/termios/tcsetpgrp.c 2012-05-15 09:20:09.000000000 +0200
  80636. +++ uClibc-git/libc/termios/tcsetpgrp.c 2014-07-25 20:36:07.881340316 +0200
  80637. @@ -12,9 +12,8 @@
  80638. Lesser General Public License for more details.
  80639. You should have received a copy of the GNU Lesser General Public
  80640. - License along with the GNU C Library; if not, write to the Free
  80641. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  80642. - 02111-1307 USA. */
  80643. + License along with the GNU C Library; if not, see
  80644. + <http://www.gnu.org/licenses/>. */
  80645. #include <sys/types.h>
  80646. #include <sys/ioctl.h>
  80647. diff -Nur uClibc-0.9.33.2/libc/unistd/confstr.c uClibc-git/libc/unistd/confstr.c
  80648. --- uClibc-0.9.33.2/libc/unistd/confstr.c 2012-05-15 09:20:09.000000000 +0200
  80649. +++ uClibc-git/libc/unistd/confstr.c 2014-07-25 20:36:07.893340380 +0200
  80650. @@ -13,9 +13,8 @@
  80651. Lesser General Public License for more details.
  80652. You should have received a copy of the GNU Lesser General Public
  80653. - License along with the GNU C Library; if not, write to the Free
  80654. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  80655. - 02111-1307 USA. */
  80656. + License along with the GNU C Library; if not, see
  80657. + <http://www.gnu.org/licenses/>. */
  80658. #include <stddef.h>
  80659. #include <errno.h>
  80660. diff -Nur uClibc-0.9.33.2/libc/unistd/daemon.c uClibc-git/libc/unistd/daemon.c
  80661. --- uClibc-0.9.33.2/libc/unistd/daemon.c 2012-05-15 09:20:09.000000000 +0200
  80662. +++ uClibc-git/libc/unistd/daemon.c 2014-07-25 20:36:07.893340380 +0200
  80663. @@ -118,7 +118,7 @@
  80664. {
  80665. struct STAT st;
  80666. - if ((fd = open_not_cancel(_PATH_DEVNULL, O_RDWR, 0)) != -1
  80667. + if ((fd = open_not_cancel_2(_PATH_DEVNULL, O_RDWR)) != -1
  80668. && (__builtin_expect (FSTAT (fd, &st), 0) == 0))
  80669. {
  80670. if (__builtin_expect (S_ISCHR (st.st_mode), 1) != 0) {
  80671. diff -Nur uClibc-0.9.33.2/libc/unistd/exec.c uClibc-git/libc/unistd/exec.c
  80672. --- uClibc-0.9.33.2/libc/unistd/exec.c 2012-05-15 09:20:09.000000000 +0200
  80673. +++ uClibc-git/libc/unistd/exec.c 2014-07-25 20:36:07.893340380 +0200
  80674. @@ -32,6 +32,8 @@
  80675. /**********************************************************************/
  80676. #define EXEC_FUNC_COMMON 0
  80677. #define EXEC_FUNC_EXECVP 1
  80678. +#define EXEC_FUNC_EXECVPE 2
  80679. +
  80680. #if defined(__ARCH_USE_MMU__)
  80681. /* We have an MMU, so use alloca() to grab space for buffers and arg lists. */
  80682. @@ -58,6 +60,7 @@
  80683. * execle(a) -> execve(-)
  80684. * execv(-) -> execve(-)
  80685. * execvp(a) -> execve(-)
  80686. + * execvpe(a) -> execve(-)
  80687. */
  80688. # define EXEC_ALLOC_SIZE(VAR) /* nothing to do */
  80689. @@ -68,7 +71,7 @@
  80690. # ifdef L___exec_alloc
  80691. -void attribute_hidden *__exec_alloc(size_t size, int func)
  80692. +void *__exec_alloc(size_t size, int func)
  80693. {
  80694. static void *common_cache, *execvp_cache;
  80695. static size_t common_size, execvp_size;
  80696. @@ -135,7 +138,7 @@
  80697. /**********************************************************************/
  80698. #ifdef L_execv
  80699. -int execv(__const char *path, char *__const argv[])
  80700. +int execv(const char *path, char *const argv[])
  80701. {
  80702. return execve(path, argv, __environ);
  80703. }
  80704. @@ -219,15 +222,18 @@
  80705. #endif
  80706. /**********************************************************************/
  80707. -#ifdef L_execvp
  80708. +#if defined (L_execvp) || defined(L_execvpe)
  80709. /* Use a default path that matches glibc behavior, since SUSv3 says
  80710. * this is implementation-defined. The default is current working dir,
  80711. * /bin, and then /usr/bin. */
  80712. static const char default_path[] = ":/bin:/usr/bin";
  80713. -
  80714. +#if defined (L_execvp)
  80715. int execvp(const char *path, char *const argv[])
  80716. +#elif defined (L_execvpe)
  80717. +int execvpe(const char *path, char *const argv[], char *const envp[])
  80718. +#endif
  80719. {
  80720. char *buf = NULL;
  80721. char *p;
  80722. @@ -245,7 +251,11 @@
  80723. }
  80724. if (strchr(path, '/')) {
  80725. +#if defined (L_execvp)
  80726. execve(path, argv, __environ);
  80727. +#elif defined (L_execvpe)
  80728. + execve(path, argv, envp);
  80729. +#endif
  80730. if (errno == ENOEXEC) {
  80731. char **nargv;
  80732. EXEC_ALLOC_SIZE(size2) /* Do NOT add a semicolon! */
  80733. @@ -254,11 +264,19 @@
  80734. /* Need the dimension - 1. We omit counting the trailing
  80735. * NULL but we actually omit the first entry. */
  80736. for (n=0 ; argv[n] ; n++) {}
  80737. +#if defined (L_execvp)
  80738. nargv = (char **) EXEC_ALLOC((n+2) * sizeof(char *), size2, EXEC_FUNC_EXECVP);
  80739. +#elif defined (L_execvpe)
  80740. + nargv = (char **) EXEC_ALLOC((n+2) * sizeof(char *), size2, EXEC_FUNC_EXECVPE);
  80741. +#endif
  80742. nargv[0] = argv[0];
  80743. nargv[1] = (char *)path;
  80744. memcpy(nargv+2, argv+1, n*sizeof(char *));
  80745. +#if defined (L_execvp)
  80746. execve("/bin/sh", nargv, __environ);
  80747. +#elif defined (L_execvpe)
  80748. + execve("/bin/sh", nargv, envp);
  80749. +#endif
  80750. EXEC_FREE(nargv, size2);
  80751. }
  80752. } else {
  80753. @@ -277,8 +295,11 @@
  80754. return -1;
  80755. }
  80756. len = (FILENAME_MAX - 1) - plen;
  80757. -
  80758. +#if defined (L_execvp)
  80759. buf = EXEC_ALLOC(FILENAME_MAX, size, EXEC_FUNC_EXECVP);
  80760. +#elif defined (L_execvpe)
  80761. + buf = EXEC_ALLOC(FILENAME_MAX, size, EXEC_FUNC_EXECVPE);
  80762. +#endif
  80763. {
  80764. int seen_small = 0;
  80765. s0 = buf + len;
  80766. @@ -300,8 +321,11 @@
  80767. s[plen-1] = '/';
  80768. }
  80769. +#if defined (L_execvp)
  80770. execve(s, argv, __environ);
  80771. -
  80772. +#elif defined (L_execvpe)
  80773. + execve(s, argv, envp);
  80774. +#endif
  80775. seen_small = 1;
  80776. if (errno == ENOEXEC) {
  80777. @@ -325,7 +349,11 @@
  80778. return -1;
  80779. }
  80780. +#if defined (L_execvp)
  80781. libc_hidden_def(execvp)
  80782. -
  80783. +#elif defined (L_execvpe)
  80784. +libc_hidden_def(execvpe)
  80785. #endif
  80786. +
  80787. +#endif /* #if defined (L_execvp) || defined(L_execvpe) */
  80788. /**********************************************************************/
  80789. diff -Nur uClibc-0.9.33.2/libc/unistd/execvpe.c uClibc-git/libc/unistd/execvpe.c
  80790. --- uClibc-0.9.33.2/libc/unistd/execvpe.c 1970-01-01 01:00:00.000000000 +0100
  80791. +++ uClibc-git/libc/unistd/execvpe.c 2014-07-25 20:36:07.893340380 +0200
  80792. @@ -0,0 +1,7 @@
  80793. +/* Copyright (C) 2011-2013 Hennning Heinold <heinold@inf.fu-berlin.de>
  80794. + *
  80795. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  80796. + */
  80797. +
  80798. +#define L_execvpe
  80799. +#include "exec.c"
  80800. diff -Nur uClibc-0.9.33.2/libc/unistd/fpathconf.c uClibc-git/libc/unistd/fpathconf.c
  80801. --- uClibc-0.9.33.2/libc/unistd/fpathconf.c 2012-05-15 09:20:09.000000000 +0200
  80802. +++ uClibc-git/libc/unistd/fpathconf.c 2014-07-25 20:36:07.893340380 +0200
  80803. @@ -13,9 +13,8 @@
  80804. Lesser General Public License for more details.
  80805. You should have received a copy of the GNU Lesser General Public
  80806. - License along with the GNU C Library; if not, write to the Free
  80807. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  80808. - 02111-1307 USA. */
  80809. + License along with the GNU C Library; if not, see
  80810. + <http://www.gnu.org/licenses/>. */
  80811. #include <errno.h>
  80812. #include <unistd.h>
  80813. diff -Nur uClibc-0.9.33.2/libc/unistd/getopt.c uClibc-git/libc/unistd/getopt.c
  80814. --- uClibc-0.9.33.2/libc/unistd/getopt.c 2012-05-15 09:20:09.000000000 +0200
  80815. +++ uClibc-git/libc/unistd/getopt.c 2014-07-25 20:36:07.893340380 +0200
  80816. @@ -17,9 +17,8 @@
  80817. Lesser General Public License for more details.
  80818. You should have received a copy of the GNU Lesser General Public
  80819. - License along with the GNU C Library; if not, write to the Free
  80820. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  80821. - 02111-1307 USA. */
  80822. + License along with the GNU C Library; if not, see
  80823. + <http://www.gnu.org/licenses/>. */
  80824. /*
  80825. * Modified for uClibc by Manuel Novoa III on 1/5/01.
  80826. @@ -36,9 +35,6 @@
  80827. # include <config.h>
  80828. #endif
  80829. -#define __FORCE_GLIBC
  80830. -#include <features.h>
  80831. -
  80832. #include <stdio.h>
  80833. /* Comment out all this code if we are using the GNU C Library, and are not
  80834. @@ -62,7 +58,7 @@
  80835. /* This needs to come after some library #include
  80836. to get __GNU_LIBRARY__ defined. */
  80837. -#ifdef __GNU_LIBRARY__
  80838. +#if defined __GNU_LIBRARY__ || defined __UCLIBC__
  80839. /* Don't include stdlib.h for non-GNU C libraries because some of them
  80840. contain conflicting prototypes for getopt. */
  80841. # include <stdlib.h>
  80842. @@ -75,22 +71,12 @@
  80843. # include <unixlib.h>
  80844. #endif
  80845. -#if !defined __UCLIBC__ && !defined __UCLIBC_HAS_GETTEXT_AWARENESS__
  80846. #ifdef _LIBC
  80847. # include <libintl.h>
  80848. #else
  80849. # include "gettext.h"
  80850. # define _(msgid) gettext (msgid)
  80851. #endif
  80852. -#else
  80853. -#ifdef __UCLIBC_MJN3_ONLY__
  80854. -#warning TODO: Enable gettext awareness.
  80855. -#endif /* __UCLIBC_MJN3_ONLY__ */
  80856. -
  80857. -#undef _
  80858. -#define _(X) X
  80859. -
  80860. -#endif
  80861. /* Treat '-W foo' the same as the long option '--foo',
  80862. * disabled for the moment since it costs about 2k... */
  80863. @@ -161,7 +147,7 @@
  80864. static struct _getopt_data getopt_data;
  80865. -#ifndef __GNU_LIBRARY__
  80866. +#if !defined __GNU_LIBRARY__ && !defined __UCLIBC__
  80867. /* Avoid depending on library functions or files
  80868. whose names are inconsistent. */
  80869. @@ -235,7 +221,7 @@
  80870. d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0;
  80871. else
  80872. {
  80873. - memset (__mempcpy (new_str, __getopt_nonoption_flags,
  80874. + memset (mempcpy (new_str, __getopt_nonoption_flags,
  80875. d->__nonoption_flags_max_len),
  80876. '\0', top + 1 - d->__nonoption_flags_max_len);
  80877. d->__nonoption_flags_max_len = top + 1;
  80878. @@ -341,7 +327,7 @@
  80879. if (__getopt_nonoption_flags == NULL)
  80880. d->__nonoption_flags_max_len = -1;
  80881. else
  80882. - memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
  80883. + memset (mempcpy (__getopt_nonoption_flags, orig_str, len),
  80884. '\0', d->__nonoption_flags_max_len - len);
  80885. }
  80886. }
  80887. diff -Nur uClibc-0.9.33.2/libc/unistd/getopt_int.h uClibc-git/libc/unistd/getopt_int.h
  80888. --- uClibc-0.9.33.2/libc/unistd/getopt_int.h 2012-05-15 09:20:09.000000000 +0200
  80889. +++ uClibc-git/libc/unistd/getopt_int.h 2014-07-25 20:36:07.893340380 +0200
  80890. @@ -14,9 +14,8 @@
  80891. Lesser General Public License for more details.
  80892. You should have received a copy of the GNU Lesser General Public
  80893. - License along with the GNU C Library; if not, write to the Free
  80894. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  80895. - 02111-1307 USA. */
  80896. + License along with the GNU C Library; if not, see
  80897. + <http://www.gnu.org/licenses/>. */
  80898. #ifndef _GETOPT_INT_H
  80899. #define _GETOPT_INT_H 1
  80900. diff -Nur uClibc-0.9.33.2/libc/unistd/getopt-susv3.c uClibc-git/libc/unistd/getopt-susv3.c
  80901. --- uClibc-0.9.33.2/libc/unistd/getopt-susv3.c 2012-05-15 09:20:09.000000000 +0200
  80902. +++ uClibc-git/libc/unistd/getopt-susv3.c 2014-07-25 20:36:07.893340380 +0200
  80903. @@ -22,14 +22,7 @@
  80904. #include <string.h>
  80905. #include <stdio.h>
  80906. #include <getopt.h>
  80907. -
  80908. -
  80909. -#ifdef __UCLIBC_MJN3_ONLY__
  80910. -#warning TODO: Enable gettext awareness.
  80911. -#endif /* __UCLIBC_MJN3_ONLY__ */
  80912. -
  80913. -#undef _
  80914. -#define _(X) X
  80915. +#include <libintl.h>
  80916. #ifdef __BCC__
  80917. static const char missing[] = "option requires an argument";
  80918. diff -Nur uClibc-0.9.33.2/libc/unistd/getpass.c uClibc-git/libc/unistd/getpass.c
  80919. --- uClibc-0.9.33.2/libc/unistd/getpass.c 2012-05-15 09:20:09.000000000 +0200
  80920. +++ uClibc-git/libc/unistd/getpass.c 2014-07-25 20:36:07.893340380 +0200
  80921. @@ -12,9 +12,8 @@
  80922. Lesser General Public License for more details.
  80923. You should have received a copy of the GNU Lesser General Public
  80924. - License along with the GNU C Library; if not, write to the Free
  80925. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  80926. - 02111-1307 USA. */
  80927. + License along with the GNU C Library; if not, see
  80928. + <http://www.gnu.org/licenses/>. */
  80929. #include <stdio.h>
  80930. #include <string.h>
  80931. diff -Nur uClibc-0.9.33.2/libc/unistd/getsubopt.c uClibc-git/libc/unistd/getsubopt.c
  80932. --- uClibc-0.9.33.2/libc/unistd/getsubopt.c 2012-05-15 09:20:09.000000000 +0200
  80933. +++ uClibc-git/libc/unistd/getsubopt.c 2014-07-25 20:36:07.893340380 +0200
  80934. @@ -14,9 +14,8 @@
  80935. Lesser General Public License for more details.
  80936. You should have received a copy of the GNU Lesser General Public
  80937. - License along with the GNU C Library; if not, write to the Free
  80938. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  80939. - 02111-1307 USA. */
  80940. + License along with the GNU C Library; if not, see
  80941. + <http://www.gnu.org/licenses/>. */
  80942. #include <stdlib.h>
  80943. #include <string.h>
  80944. diff -Nur uClibc-0.9.33.2/libc/unistd/Makefile.in uClibc-git/libc/unistd/Makefile.in
  80945. --- uClibc-0.9.33.2/libc/unistd/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  80946. +++ uClibc-git/libc/unistd/Makefile.in 2014-07-25 20:36:07.893340380 +0200
  80947. @@ -10,39 +10,21 @@
  80948. UNISTD_DIR := $(top_srcdir)libc/unistd
  80949. UNISTD_OUT := $(top_builddir)libc/unistd
  80950. -CSRC := $(notdir $(wildcard $(UNISTD_DIR)/*.c))
  80951. -# multi source
  80952. -CSRC := $(filter-out exec.c,$(CSRC))
  80953. -
  80954. -ifeq ($(ARCH_USE_MMU),y)
  80955. -CSRC := $(filter-out __exec_alloc.c,$(CSRC))
  80956. -endif
  80957. -
  80958. -ifeq ($(UCLIBC_HAS_GNU_GETOPT),y)
  80959. -CSRC := $(filter-out getopt-susv3.c getopt_long-simple.c,$(CSRC))
  80960. -else
  80961. -CSRC := $(filter-out getopt.c,$(CSRC))
  80962. -ifneq ($(UCLIBC_HAS_GETOPT_LONG),y)
  80963. -CSRC := $(filter-out getopt_long-simple.c,$(CSRC))
  80964. -endif
  80965. -endif
  80966. -
  80967. -ifeq ($(UCLIBC_HAS_GNU_GETSUBOPT),y)
  80968. -CSRC := $(filter-out getsubopt-susv3.c,$(CSRC))
  80969. -else
  80970. -CSRC := $(filter-out getsubopt.c,$(CSRC))
  80971. -endif
  80972. -
  80973. -ifneq ($(UCLIBC_SUSV3_LEGACY),y)
  80974. -CSRC := $(filter-out ualarm.c usleep.c,$(CSRC))
  80975. -endif
  80976. -
  80977. -ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
  80978. -CSRC := $(filter-out sleep.c,$(CSRC))
  80979. -endif
  80980. +CSRC-y := $(notdir $(wildcard $(UNISTD_DIR)/*.c))
  80981. +OMIT-y := exec.c # multi source
  80982. +OMIT-$(ARCH_USE_MMU) += __exec_alloc.c
  80983. +OMIT-$(if $(UCLIBC_SUSV3_LEGACY),,y) += ualarm.c usleep.c
  80984. +#OMIT-$(UCLIBC_HAS_THREADS_NATIVE) += sleep.c
  80985. +
  80986. +# XXX: GNU_GETOPT comes with getopt_long unconditionally, which is wrong
  80987. +GO_LONG := $(if $(UCLIBC_HAS_GNU_GETOPT),getopt_long-simple.c)
  80988. +OMIT-y += $(if $(UCLIBC_HAS_GNU_GETOPT),getopt-susv3.c $(GO_LONG),getopt.c)
  80989. +OMIT-y += $(if $(UCLIBC_HAS_GNU_GETSUBOPT),getsubopt-susv3.c,getsubopt.c)
  80990. -UNISTD_SRC := $(patsubst %.c,$(UNISTD_DIR)/%.c,$(CSRC))
  80991. -UNISTD_OBJ := $(patsubst %.c,$(UNISTD_OUT)/%.o,$(CSRC))
  80992. +CSRC-y := $(filter-out $(OMIT-y),$(CSRC-y))
  80993. +
  80994. +UNISTD_SRC := $(patsubst %.c,$(UNISTD_DIR)/%.c,$(CSRC-y))
  80995. +UNISTD_OBJ := $(patsubst %.c,$(UNISTD_OUT)/%.o,$(CSRC-y))
  80996. libc-y += $(UNISTD_OBJ)
  80997. diff -Nur uClibc-0.9.33.2/libc/unistd/pathconf.c uClibc-git/libc/unistd/pathconf.c
  80998. --- uClibc-0.9.33.2/libc/unistd/pathconf.c 2012-05-15 09:20:09.000000000 +0200
  80999. +++ uClibc-git/libc/unistd/pathconf.c 2014-07-25 20:36:07.893340380 +0200
  81000. @@ -13,9 +13,8 @@
  81001. Lesser General Public License for more details.
  81002. You should have received a copy of the GNU Lesser General Public
  81003. - License along with the GNU C Library; if not, write to the Free
  81004. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81005. - 02111-1307 USA. */
  81006. + License along with the GNU C Library; if not, see
  81007. + <http://www.gnu.org/licenses/>. */
  81008. /* pathconf -- adjusted for busybox */
  81009. diff -Nur uClibc-0.9.33.2/libc/unistd/sleep.c uClibc-git/libc/unistd/sleep.c
  81010. --- uClibc-0.9.33.2/libc/unistd/sleep.c 2012-05-15 09:20:09.000000000 +0200
  81011. +++ uClibc-git/libc/unistd/sleep.c 2014-07-25 20:36:07.893340380 +0200
  81012. @@ -15,8 +15,7 @@
  81013. You should have received a copy of the GNU Library General Public
  81014. License along with the GNU C Library; see the file COPYING.LIB. If not,
  81015. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  81016. - Boston, MA 02111-1307, USA. */
  81017. + see <http://www.gnu.org/licenses/>. */
  81018. #include <errno.h>
  81019. #include <time.h>
  81020. @@ -99,6 +98,7 @@
  81021. /* This is not necessary but some buggy programs depend on this. */
  81022. if (seconds == 0) {
  81023. # ifdef CANCELLATION_P
  81024. + int cancelhandling;
  81025. CANCELLATION_P (THREAD_SELF);
  81026. # endif
  81027. return 0;
  81028. diff -Nur uClibc-0.9.33.2/libc/unistd/sysconf.c uClibc-git/libc/unistd/sysconf.c
  81029. --- uClibc-0.9.33.2/libc/unistd/sysconf.c 2012-05-15 09:20:09.000000000 +0200
  81030. +++ uClibc-git/libc/unistd/sysconf.c 2014-07-25 20:36:07.893340380 +0200
  81031. @@ -14,11 +14,11 @@
  81032. You should have received a copy of the GNU Library General Public
  81033. License along with the GNU C Library; see the file COPYING.LIB. If not,
  81034. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  81035. - Boston, MA 02111-1307, USA. */
  81036. + see <http://www.gnu.org/licenses/>. */
  81037. #define _XOPEN_SOURCE 500
  81038. #include <features.h>
  81039. +#include <ctype.h>
  81040. #include <errno.h>
  81041. #include <limits.h>
  81042. #include <grp.h>
  81043. @@ -981,20 +981,9 @@
  81044. #endif
  81045. case _SC_MONOTONIC_CLOCK:
  81046. -#ifdef __NR_clock_getres
  81047. - /* Check using the clock_getres system call. */
  81048. -# ifdef __UCLIBC_HAS_THREADS_NATIVE__
  81049. - {
  81050. - struct timespec ts;
  81051. - INTERNAL_SYSCALL_DECL (err);
  81052. - int r;
  81053. - r = INTERNAL_SYSCALL (clock_getres, err, 2, CLOCK_MONOTONIC, &ts);
  81054. - return INTERNAL_SYSCALL_ERROR_P (r, err) ? -1 : _POSIX_VERSION;
  81055. - }
  81056. -# elif defined __UCLIBC_HAS_REALTIME__
  81057. +#if defined __UCLIBC_HAS_REALTIME__ && defined __NR_clock_getres
  81058. if (clock_getres(CLOCK_MONOTONIC, NULL) >= 0)
  81059. return _POSIX_VERSION;
  81060. -# endif
  81061. #endif
  81062. RETURN_NEG_1;
  81063. diff -Nur uClibc-0.9.33.2/libcrypt/crypt.c uClibc-git/libcrypt/crypt.c
  81064. --- uClibc-0.9.33.2/libcrypt/crypt.c 2012-05-15 09:20:09.000000000 +0200
  81065. +++ uClibc-git/libcrypt/crypt.c 2014-07-25 20:36:07.909340464 +0200
  81066. @@ -5,7 +5,6 @@
  81067. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  81068. */
  81069. -#define __FORCE_GLIBC
  81070. #include <unistd.h>
  81071. #include <crypt.h>
  81072. #include "libcrypt.h"
  81073. diff -Nur uClibc-0.9.33.2/libcrypt/crypt_stub.c uClibc-git/libcrypt/crypt_stub.c
  81074. --- uClibc-0.9.33.2/libcrypt/crypt_stub.c 2012-05-15 09:20:09.000000000 +0200
  81075. +++ uClibc-git/libcrypt/crypt_stub.c 2014-07-25 20:36:07.909340464 +0200
  81076. @@ -5,7 +5,6 @@
  81077. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  81078. */
  81079. -#define __FORCE_GLIBC
  81080. #include <crypt.h>
  81081. #include <unistd.h>
  81082. #include "libcrypt.h"
  81083. diff -Nur uClibc-0.9.33.2/libcrypt/des.c uClibc-git/libcrypt/des.c
  81084. --- uClibc-0.9.33.2/libcrypt/des.c 2012-05-15 09:20:09.000000000 +0200
  81085. +++ uClibc-git/libcrypt/des.c 2014-07-25 20:36:07.909340464 +0200
  81086. @@ -56,7 +56,6 @@
  81087. * alignment).
  81088. */
  81089. -#define __FORCE_GLIBC
  81090. #include <sys/cdefs.h>
  81091. #include <sys/types.h>
  81092. #include <sys/param.h>
  81093. diff -Nur uClibc-0.9.33.2/libcrypt/sha256.c uClibc-git/libcrypt/sha256.c
  81094. --- uClibc-0.9.33.2/libcrypt/sha256.c 2012-05-15 09:20:09.000000000 +0200
  81095. +++ uClibc-git/libcrypt/sha256.c 2014-07-25 20:36:07.909340464 +0200
  81096. @@ -14,9 +14,8 @@
  81097. Lesser General Public License for more details.
  81098. You should have received a copy of the GNU Lesser General Public
  81099. - License along with the GNU C Library; if not, write to the Free
  81100. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81101. - 02111-1307 USA. */
  81102. + License along with the GNU C Library; if not, see
  81103. + <http://www.gnu.org/licenses/>. */
  81104. /* Written by Ulrich Drepper <drepper@redhat.com>, 2007. */
  81105. diff -Nur uClibc-0.9.33.2/libcrypt/sha256-crypt.c uClibc-git/libcrypt/sha256-crypt.c
  81106. --- uClibc-0.9.33.2/libcrypt/sha256-crypt.c 2012-05-15 09:20:09.000000000 +0200
  81107. +++ uClibc-git/libcrypt/sha256-crypt.c 2014-07-25 20:36:07.909340464 +0200
  81108. @@ -14,9 +14,8 @@
  81109. Lesser General Public License for more details.
  81110. You should have received a copy of the GNU Lesser General Public
  81111. - License along with the GNU C Library; if not, write to the Free
  81112. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81113. - 02111-1307 USA. */
  81114. + License along with the GNU C Library; if not, see
  81115. + <http://www.gnu.org/licenses/>. */
  81116. #include <assert.h>
  81117. #include <errno.h>
  81118. diff -Nur uClibc-0.9.33.2/libcrypt/sha256.h uClibc-git/libcrypt/sha256.h
  81119. --- uClibc-0.9.33.2/libcrypt/sha256.h 2012-05-15 09:20:09.000000000 +0200
  81120. +++ uClibc-git/libcrypt/sha256.h 2014-07-25 20:36:07.909340464 +0200
  81121. @@ -14,9 +14,8 @@
  81122. Lesser General Public License for more details.
  81123. You should have received a copy of the GNU Lesser General Public
  81124. - License along with the GNU C Library; if not, write to the Free
  81125. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81126. - 02111-1307 USA. */
  81127. + License along with the GNU C Library; if not, see
  81128. + <http://www.gnu.org/licenses/>. */
  81129. #ifndef _SHA256_H
  81130. #define _SHA256_H 1
  81131. diff -Nur uClibc-0.9.33.2/libcrypt/sha512.c uClibc-git/libcrypt/sha512.c
  81132. --- uClibc-0.9.33.2/libcrypt/sha512.c 2012-05-15 09:20:09.000000000 +0200
  81133. +++ uClibc-git/libcrypt/sha512.c 2014-07-25 20:36:07.909340464 +0200
  81134. @@ -14,9 +14,8 @@
  81135. Lesser General Public License for more details.
  81136. You should have received a copy of the GNU Lesser General Public
  81137. - License along with the GNU C Library; if not, write to the Free
  81138. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81139. - 02111-1307 USA. */
  81140. + License along with the GNU C Library; if not, see
  81141. + <http://www.gnu.org/licenses/>. */
  81142. /* Written by Ulrich Drepper <drepper@redhat.com>, 2007. */
  81143. diff -Nur uClibc-0.9.33.2/libcrypt/sha512-crypt.c uClibc-git/libcrypt/sha512-crypt.c
  81144. --- uClibc-0.9.33.2/libcrypt/sha512-crypt.c 2012-05-15 09:20:09.000000000 +0200
  81145. +++ uClibc-git/libcrypt/sha512-crypt.c 2014-07-25 20:36:07.909340464 +0200
  81146. @@ -14,9 +14,8 @@
  81147. Lesser General Public License for more details.
  81148. You should have received a copy of the GNU Lesser General Public
  81149. - License along with the GNU C Library; if not, write to the Free
  81150. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81151. - 02111-1307 USA. */
  81152. + License along with the GNU C Library; if not, see
  81153. + <http://www.gnu.org/licenses/>. */
  81154. #include <assert.h>
  81155. #include <errno.h>
  81156. diff -Nur uClibc-0.9.33.2/libcrypt/sha512.h uClibc-git/libcrypt/sha512.h
  81157. --- uClibc-0.9.33.2/libcrypt/sha512.h 2012-05-15 09:20:09.000000000 +0200
  81158. +++ uClibc-git/libcrypt/sha512.h 2014-07-25 20:36:07.909340464 +0200
  81159. @@ -14,9 +14,8 @@
  81160. Lesser General Public License for more details.
  81161. You should have received a copy of the GNU Lesser General Public
  81162. - License along with the GNU C Library; if not, write to the Free
  81163. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81164. - 02111-1307 USA. */
  81165. + License along with the GNU C Library; if not, see
  81166. + <http://www.gnu.org/licenses/>. */
  81167. #ifndef _SHA512_H
  81168. #define _SHA512_H 1
  81169. diff -Nur uClibc-0.9.33.2/libm/carg.c uClibc-git/libm/carg.c
  81170. --- uClibc-0.9.33.2/libm/carg.c 2012-05-15 09:20:09.000000000 +0200
  81171. +++ uClibc-git/libm/carg.c 2014-07-25 20:36:07.933340588 +0200
  81172. @@ -14,9 +14,8 @@
  81173. Lesser General Public License for more details.
  81174. You should have received a copy of the GNU Lesser General Public
  81175. - License along with the GNU C Library; if not, write to the Free
  81176. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81177. - 02111-1307 USA. */
  81178. + License along with the GNU C Library; if not, see
  81179. + <http://www.gnu.org/licenses/>. */
  81180. #include <complex.h>
  81181. #include <math.h>
  81182. diff -Nur uClibc-0.9.33.2/libm/e_acos.c uClibc-git/libm/e_acos.c
  81183. --- uClibc-0.9.33.2/libm/e_acos.c 2012-05-15 09:20:09.000000000 +0200
  81184. +++ uClibc-git/libm/e_acos.c 2014-07-25 20:36:07.933340588 +0200
  81185. @@ -52,7 +52,7 @@
  81186. qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
  81187. qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
  81188. -double attribute_hidden __ieee754_acos(double x)
  81189. +double __ieee754_acos(double x)
  81190. {
  81191. double z,p,q,r,w,s,c,df;
  81192. int32_t hx,ix;
  81193. diff -Nur uClibc-0.9.33.2/libm/e_acosh.c uClibc-git/libm/e_acosh.c
  81194. --- uClibc-0.9.33.2/libm/e_acosh.c 2012-05-15 09:20:09.000000000 +0200
  81195. +++ uClibc-git/libm/e_acosh.c 2014-07-25 20:36:07.937340610 +0200
  81196. @@ -30,7 +30,7 @@
  81197. one = 1.0,
  81198. ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */
  81199. -double attribute_hidden __ieee754_acosh(double x)
  81200. +double __ieee754_acosh(double x)
  81201. {
  81202. double t;
  81203. int32_t hx;
  81204. diff -Nur uClibc-0.9.33.2/libm/e_asin.c uClibc-git/libm/e_asin.c
  81205. --- uClibc-0.9.33.2/libm/e_asin.c 2012-05-15 09:20:09.000000000 +0200
  81206. +++ uClibc-git/libm/e_asin.c 2014-07-25 20:36:07.937340610 +0200
  81207. @@ -60,7 +60,7 @@
  81208. qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
  81209. qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
  81210. -double attribute_hidden __ieee754_asin(double x)
  81211. +double __ieee754_asin(double x)
  81212. {
  81213. double t=0.0,w,p,q,c,r,s;
  81214. int32_t hx,ix;
  81215. diff -Nur uClibc-0.9.33.2/libm/e_atan2.c uClibc-git/libm/e_atan2.c
  81216. --- uClibc-0.9.33.2/libm/e_atan2.c 2012-05-15 09:20:09.000000000 +0200
  81217. +++ uClibc-git/libm/e_atan2.c 2014-07-25 20:36:07.937340610 +0200
  81218. @@ -47,7 +47,7 @@
  81219. pi = 3.1415926535897931160E+00, /* 0x400921FB, 0x54442D18 */
  81220. pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */
  81221. -double attribute_hidden __ieee754_atan2(double y, double x)
  81222. +double __ieee754_atan2(double y, double x)
  81223. {
  81224. double z;
  81225. int32_t k,m,hx,hy,ix,iy;
  81226. diff -Nur uClibc-0.9.33.2/libm/e_atanh.c uClibc-git/libm/e_atanh.c
  81227. --- uClibc-0.9.33.2/libm/e_atanh.c 2012-05-15 09:20:09.000000000 +0200
  81228. +++ uClibc-git/libm/e_atanh.c 2014-07-25 20:36:07.937340610 +0200
  81229. @@ -34,7 +34,7 @@
  81230. static const double zero = 0.0;
  81231. -double attribute_hidden __ieee754_atanh(double x)
  81232. +double __ieee754_atanh(double x)
  81233. {
  81234. double t;
  81235. int32_t hx,ix;
  81236. diff -Nur uClibc-0.9.33.2/libm/e_cosh.c uClibc-git/libm/e_cosh.c
  81237. --- uClibc-0.9.33.2/libm/e_cosh.c 2012-05-15 09:20:09.000000000 +0200
  81238. +++ uClibc-git/libm/e_cosh.c 2014-07-25 20:36:07.937340610 +0200
  81239. @@ -35,7 +35,7 @@
  81240. static const double one = 1.0, half=0.5, huge = 1.0e300;
  81241. -double attribute_hidden __ieee754_cosh(double x)
  81242. +double __ieee754_cosh(double x)
  81243. {
  81244. double t,w;
  81245. int32_t ix;
  81246. diff -Nur uClibc-0.9.33.2/libm/e_exp.c uClibc-git/libm/e_exp.c
  81247. --- uClibc-0.9.33.2/libm/e_exp.c 2012-05-15 09:20:09.000000000 +0200
  81248. +++ uClibc-git/libm/e_exp.c 2014-07-25 20:36:07.937340610 +0200
  81249. @@ -93,7 +93,7 @@
  81250. P4 = -1.65339022054652515390e-06, /* 0xBEBBBD41, 0xC5D26BF1 */
  81251. P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */
  81252. -double attribute_hidden __ieee754_exp(double x) /* default IEEE double exp */
  81253. +double __ieee754_exp(double x) /* default IEEE double exp */
  81254. {
  81255. double y;
  81256. double hi = 0.0;
  81257. diff -Nur uClibc-0.9.33.2/libm/e_fmod.c uClibc-git/libm/e_fmod.c
  81258. --- uClibc-0.9.33.2/libm/e_fmod.c 2012-05-15 09:20:09.000000000 +0200
  81259. +++ uClibc-git/libm/e_fmod.c 2014-07-25 20:36:07.937340610 +0200
  81260. @@ -20,7 +20,7 @@
  81261. static const double one = 1.0, Zero[] = {0.0, -0.0,};
  81262. -double attribute_hidden __ieee754_fmod(double x, double y)
  81263. +double __ieee754_fmod(double x, double y)
  81264. {
  81265. int32_t n,hx,hy,hz,ix,iy,sx,i;
  81266. u_int32_t lx,ly,lz;
  81267. diff -Nur uClibc-0.9.33.2/libm/e_hypot.c uClibc-git/libm/e_hypot.c
  81268. --- uClibc-0.9.33.2/libm/e_hypot.c 2012-05-15 09:20:09.000000000 +0200
  81269. +++ uClibc-git/libm/e_hypot.c 2014-07-25 20:36:07.937340610 +0200
  81270. @@ -44,9 +44,9 @@
  81271. #include "math.h"
  81272. #include "math_private.h"
  81273. -double attribute_hidden __ieee754_hypot(double x, double y)
  81274. +double __ieee754_hypot(double x, double y)
  81275. {
  81276. - double a=x,b=y,t1,t2,y1,y2,w;
  81277. + double a=x,b=y,t1,t2,_y1,y2,w;
  81278. int32_t j,k,ha,hb;
  81279. GET_HIGH_WORD(ha,x);
  81280. @@ -100,13 +100,13 @@
  81281. w = __ieee754_sqrt(t1*t1-(b*(-b)-t2*(a+t1)));
  81282. } else {
  81283. a = a+a;
  81284. - y1 = 0;
  81285. - SET_HIGH_WORD(y1,hb);
  81286. - y2 = b - y1;
  81287. + _y1 = 0;
  81288. + SET_HIGH_WORD(_y1,hb);
  81289. + y2 = b - _y1;
  81290. t1 = 0;
  81291. SET_HIGH_WORD(t1,ha+0x00100000);
  81292. t2 = a - t1;
  81293. - w = __ieee754_sqrt(t1*y1-(w*(-w)-(t1*y2+t2*b)));
  81294. + w = __ieee754_sqrt(t1*_y1-(w*(-w)-(t1*y2+t2*b)));
  81295. }
  81296. if(k!=0) {
  81297. u_int32_t high;
  81298. diff -Nur uClibc-0.9.33.2/libm/e_j0.c uClibc-git/libm/e_j0.c
  81299. --- uClibc-0.9.33.2/libm/e_j0.c 2012-05-15 09:20:09.000000000 +0200
  81300. +++ uClibc-git/libm/e_j0.c 2014-07-25 20:36:07.937340610 +0200
  81301. @@ -76,7 +76,7 @@
  81302. static const double zero = 0.0;
  81303. -double attribute_hidden __ieee754_j0(double x)
  81304. +double __ieee754_j0(double x)
  81305. {
  81306. double z, s,c,ss,cc,r,u,v;
  81307. int32_t hx,ix;
  81308. @@ -153,7 +153,7 @@
  81309. v03 = 2.59150851840457805467e-07, /* 0x3E91642D, 0x7FF202FD */
  81310. v04 = 4.41110311332675467403e-10; /* 0x3DFE5018, 0x3BD6D9EF */
  81311. -double attribute_hidden __ieee754_y0(double x)
  81312. +double __ieee754_y0(double x)
  81313. {
  81314. double z, s,c,ss,cc,u,v;
  81315. int32_t hx,ix,lx;
  81316. diff -Nur uClibc-0.9.33.2/libm/e_j1.c uClibc-git/libm/e_j1.c
  81317. --- uClibc-0.9.33.2/libm/e_j1.c 2012-05-15 09:20:09.000000000 +0200
  81318. +++ uClibc-git/libm/e_j1.c 2014-07-25 20:36:07.937340610 +0200
  81319. @@ -77,7 +77,7 @@
  81320. static const double zero = 0.0;
  81321. -double attribute_hidden __ieee754_j1(double x)
  81322. +double __ieee754_j1(double x)
  81323. {
  81324. double z, s,c,ss,cc,r,u,v,y;
  81325. int32_t hx,ix;
  81326. @@ -150,7 +150,7 @@
  81327. 1.66559246207992079114e-11, /* 0x3DB25039, 0xDACA772A */
  81328. };
  81329. -double attribute_hidden __ieee754_y1(double x)
  81330. +double __ieee754_y1(double x)
  81331. {
  81332. double z, s,c,ss,cc,u,v;
  81333. int32_t hx,ix,lx;
  81334. diff -Nur uClibc-0.9.33.2/libm/e_jn.c uClibc-git/libm/e_jn.c
  81335. --- uClibc-0.9.33.2/libm/e_jn.c 2012-05-15 09:20:09.000000000 +0200
  81336. +++ uClibc-git/libm/e_jn.c 2014-07-25 20:36:07.937340610 +0200
  81337. @@ -45,7 +45,7 @@
  81338. static const double zero = 0.00000000000000000000e+00;
  81339. -double attribute_hidden __ieee754_jn(int n, double x)
  81340. +double __ieee754_jn(int n, double x)
  81341. {
  81342. int32_t i,hx,ix,lx, sgn;
  81343. double a, b, temp=0, di;
  81344. @@ -217,7 +217,7 @@
  81345. strong_alias(__ieee754_jn, jn)
  81346. #endif
  81347. -double attribute_hidden __ieee754_yn(int n, double x)
  81348. +double __ieee754_yn(int n, double x)
  81349. {
  81350. int32_t i,hx,ix,lx;
  81351. int32_t sign;
  81352. diff -Nur uClibc-0.9.33.2/libm/e_lgamma_r.c uClibc-git/libm/e_lgamma_r.c
  81353. --- uClibc-0.9.33.2/libm/e_lgamma_r.c 2012-05-15 09:20:09.000000000 +0200
  81354. +++ uClibc-git/libm/e_lgamma_r.c 2014-07-25 20:36:07.937340610 +0200
  81355. @@ -197,7 +197,7 @@
  81356. return -y;
  81357. }
  81358. -double attribute_hidden __ieee754_lgamma_r(double x, int *signgamp)
  81359. +double __ieee754_lgamma_r(double x, int *signgamp)
  81360. {
  81361. double t,y,z,nadj=0,p,p1,p2,p3,q,r,w;
  81362. int i,hx,lx,ix;
  81363. @@ -314,11 +314,12 @@
  81364. #else
  81365. strong_alias(__ieee754_lgamma_r, lgamma_r)
  81366. #endif
  81367. +libm_hidden_def(lgamma_r)
  81368. /* __ieee754_lgamma(x)
  81369. * Return the logarithm of the Gamma function of x.
  81370. */
  81371. -double attribute_hidden __ieee754_lgamma(double x)
  81372. +double __ieee754_lgamma(double x)
  81373. {
  81374. return __ieee754_lgamma_r(x, &signgam);
  81375. }
  81376. @@ -358,6 +359,7 @@
  81377. strong_alias(__ieee754_lgamma_r, gamma_r)
  81378. strong_alias(__ieee754_lgamma, gamma)
  81379. #endif
  81380. +libm_hidden_def(gamma)
  81381. /* double tgamma(double x)
  81382. diff -Nur uClibc-0.9.33.2/libm/e_log10.c uClibc-git/libm/e_log10.c
  81383. --- uClibc-0.9.33.2/libm/e_log10.c 2012-05-15 09:20:09.000000000 +0200
  81384. +++ uClibc-git/libm/e_log10.c 2014-07-25 20:36:07.937340610 +0200
  81385. @@ -53,7 +53,7 @@
  81386. static const double zero = 0.0;
  81387. -double attribute_hidden __ieee754_log10(double x)
  81388. +double __ieee754_log10(double x)
  81389. {
  81390. double y,z;
  81391. int32_t i,k,hx;
  81392. diff -Nur uClibc-0.9.33.2/libm/e_log2.c uClibc-git/libm/e_log2.c
  81393. --- uClibc-0.9.33.2/libm/e_log2.c 2012-05-15 09:20:09.000000000 +0200
  81394. +++ uClibc-git/libm/e_log2.c 2014-07-25 20:36:07.937340610 +0200
  81395. @@ -116,3 +116,4 @@
  81396. }
  81397. }
  81398. strong_alias(__ieee754_log2,log2)
  81399. +libm_hidden_def(log2)
  81400. diff -Nur uClibc-0.9.33.2/libm/e_log.c uClibc-git/libm/e_log.c
  81401. --- uClibc-0.9.33.2/libm/e_log.c 2012-05-15 09:20:09.000000000 +0200
  81402. +++ uClibc-git/libm/e_log.c 2014-07-25 20:36:07.937340610 +0200
  81403. @@ -77,7 +77,7 @@
  81404. static const double zero = 0.0;
  81405. -double attribute_hidden __ieee754_log(double x)
  81406. +double __ieee754_log(double x)
  81407. {
  81408. double hfsq,f,s,z,R,w,t1,t2,dk;
  81409. int32_t k,hx,i,j;
  81410. diff -Nur uClibc-0.9.33.2/libm/e_pow.c uClibc-git/libm/e_pow.c
  81411. --- uClibc-0.9.33.2/libm/e_pow.c 2012-05-15 09:20:09.000000000 +0200
  81412. +++ uClibc-git/libm/e_pow.c 2014-07-25 20:36:07.937340610 +0200
  81413. @@ -91,10 +91,10 @@
  81414. ivln2_h = 1.44269502162933349609e+00, /* 0x3FF71547, 0x60000000 =24b 1/ln2*/
  81415. ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/
  81416. -double attribute_hidden __ieee754_pow(double x, double y)
  81417. +double __ieee754_pow(double x, double y)
  81418. {
  81419. double z,ax,z_h,z_l,p_h,p_l;
  81420. - double y1,t1,t2,r,s,t,u,v,w;
  81421. + double _y1,t1,t2,r,s,t,u,v,w;
  81422. int32_t i,j,k,yisint,n;
  81423. int32_t hx,hy,ix,iy;
  81424. u_int32_t lx,ly;
  81425. @@ -249,10 +249,10 @@
  81426. s = -one;/* (-ve)**(odd int) */
  81427. /* split up y into y1+y2 and compute (y1+y2)*(t1+t2) */
  81428. - y1 = y;
  81429. - SET_LOW_WORD(y1,0);
  81430. - p_l = (y-y1)*t1+y*t2;
  81431. - p_h = y1*t1;
  81432. + _y1 = y;
  81433. + SET_LOW_WORD(_y1,0);
  81434. + p_l = (y-_y1)*t1+y*t2;
  81435. + p_h = _y1*t1;
  81436. z = p_l+p_h;
  81437. EXTRACT_WORDS(j,i,z);
  81438. if (j>=0x40900000) { /* z >= 1024 */
  81439. diff -Nur uClibc-0.9.33.2/libm/e_remainder.c uClibc-git/libm/e_remainder.c
  81440. --- uClibc-0.9.33.2/libm/e_remainder.c 2012-05-15 09:20:09.000000000 +0200
  81441. +++ uClibc-git/libm/e_remainder.c 2014-07-25 20:36:07.937340610 +0200
  81442. @@ -23,7 +23,7 @@
  81443. static const double zero = 0.0;
  81444. -double attribute_hidden __ieee754_remainder(double x, double p)
  81445. +double __ieee754_remainder(double x, double p)
  81446. {
  81447. int32_t hx,hp;
  81448. u_int32_t sx,lx,lp;
  81449. diff -Nur uClibc-0.9.33.2/libm/e_rem_pio2.c uClibc-git/libm/e_rem_pio2.c
  81450. --- uClibc-0.9.33.2/libm/e_rem_pio2.c 2012-05-15 09:20:09.000000000 +0200
  81451. +++ uClibc-git/libm/e_rem_pio2.c 2014-07-25 20:36:07.937340610 +0200
  81452. @@ -66,7 +66,7 @@
  81453. pio2_3 = 2.02226624871116645580e-21, /* 0x3BA3198A, 0x2E000000 */
  81454. pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
  81455. -int32_t attribute_hidden __ieee754_rem_pio2(double x, double *y)
  81456. +int32_t __ieee754_rem_pio2(double x, double *y)
  81457. {
  81458. double z=0.0,w,t,r,fn;
  81459. double tx[3];
  81460. diff -Nur uClibc-0.9.33.2/libm/e_scalb.c uClibc-git/libm/e_scalb.c
  81461. --- uClibc-0.9.33.2/libm/e_scalb.c 2012-05-15 09:20:09.000000000 +0200
  81462. +++ uClibc-git/libm/e_scalb.c 2014-07-25 20:36:07.937340610 +0200
  81463. @@ -19,7 +19,7 @@
  81464. #include "math_private.h"
  81465. #include <errno.h>
  81466. -double attribute_hidden __ieee754_scalb(double x, double fn)
  81467. +double __ieee754_scalb(double x, double fn)
  81468. {
  81469. if (isnan(x)||isnan(fn)) return x*fn;
  81470. if (!isfinite(fn)) {
  81471. @@ -55,5 +55,6 @@
  81472. #else
  81473. strong_alias(__ieee754_scalb, scalb)
  81474. #endif
  81475. +libm_hidden_def(scalb)
  81476. #endif /* UCLIBC_SUSV3_LEGACY */
  81477. diff -Nur uClibc-0.9.33.2/libm/e_sinh.c uClibc-git/libm/e_sinh.c
  81478. --- uClibc-0.9.33.2/libm/e_sinh.c 2012-05-15 09:20:09.000000000 +0200
  81479. +++ uClibc-git/libm/e_sinh.c 2014-07-25 20:36:07.937340610 +0200
  81480. @@ -32,7 +32,7 @@
  81481. static const double one = 1.0, shuge = 1.0e307;
  81482. -double attribute_hidden __ieee754_sinh(double x)
  81483. +double __ieee754_sinh(double x)
  81484. {
  81485. double t,w,h;
  81486. int32_t ix,jx;
  81487. diff -Nur uClibc-0.9.33.2/libm/e_sqrt.c uClibc-git/libm/e_sqrt.c
  81488. --- uClibc-0.9.33.2/libm/e_sqrt.c 2012-05-15 09:20:09.000000000 +0200
  81489. +++ uClibc-git/libm/e_sqrt.c 2014-07-25 20:36:07.937340610 +0200
  81490. @@ -84,7 +84,7 @@
  81491. static const double one = 1.0, tiny = 1.0e-300;
  81492. -double attribute_hidden __ieee754_sqrt(double x)
  81493. +double __ieee754_sqrt(double x)
  81494. {
  81495. double z;
  81496. int32_t sign = (int)0x80000000;
  81497. diff -Nur uClibc-0.9.33.2/libm/i386/fclrexcpt.c uClibc-git/libm/i386/fclrexcpt.c
  81498. --- uClibc-0.9.33.2/libm/i386/fclrexcpt.c 2012-05-15 09:20:09.000000000 +0200
  81499. +++ uClibc-git/libm/i386/fclrexcpt.c 2014-07-25 20:36:07.941340631 +0200
  81500. @@ -14,9 +14,8 @@
  81501. Lesser General Public License for more details.
  81502. You should have received a copy of the GNU Lesser General Public
  81503. - License along with the GNU C Library; if not, write to the Free
  81504. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81505. - 02111-1307 USA. */
  81506. + License along with the GNU C Library; if not, see
  81507. + <http://www.gnu.org/licenses/>. */
  81508. #include <fenv.h>
  81509. #include <unistd.h>
  81510. diff -Nur uClibc-0.9.33.2/libm/i386/fedisblxcpt.c uClibc-git/libm/i386/fedisblxcpt.c
  81511. --- uClibc-0.9.33.2/libm/i386/fedisblxcpt.c 2012-05-15 09:20:09.000000000 +0200
  81512. +++ uClibc-git/libm/i386/fedisblxcpt.c 2014-07-25 20:36:07.945340651 +0200
  81513. @@ -14,9 +14,8 @@
  81514. Lesser General Public License for more details.
  81515. You should have received a copy of the GNU Lesser General Public
  81516. - License along with the GNU C Library; if not, write to the Free
  81517. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81518. - 02111-1307 USA. */
  81519. + License along with the GNU C Library; if not, see
  81520. + <http://www.gnu.org/licenses/>. */
  81521. #include <fenv.h>
  81522. #include <unistd.h>
  81523. diff -Nur uClibc-0.9.33.2/libm/i386/feenablxcpt.c uClibc-git/libm/i386/feenablxcpt.c
  81524. --- uClibc-0.9.33.2/libm/i386/feenablxcpt.c 2012-05-15 09:20:09.000000000 +0200
  81525. +++ uClibc-git/libm/i386/feenablxcpt.c 2014-07-25 20:36:07.945340651 +0200
  81526. @@ -14,9 +14,8 @@
  81527. Lesser General Public License for more details.
  81528. You should have received a copy of the GNU Lesser General Public
  81529. - License along with the GNU C Library; if not, write to the Free
  81530. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81531. - 02111-1307 USA. */
  81532. + License along with the GNU C Library; if not, see
  81533. + <http://www.gnu.org/licenses/>. */
  81534. #include <fenv.h>
  81535. #include <unistd.h>
  81536. diff -Nur uClibc-0.9.33.2/libm/i386/fegetenv.c uClibc-git/libm/i386/fegetenv.c
  81537. --- uClibc-0.9.33.2/libm/i386/fegetenv.c 2012-05-15 09:20:09.000000000 +0200
  81538. +++ uClibc-git/libm/i386/fegetenv.c 2014-07-25 20:36:07.945340651 +0200
  81539. @@ -14,9 +14,8 @@
  81540. Lesser General Public License for more details.
  81541. You should have received a copy of the GNU Lesser General Public
  81542. - License along with the GNU C Library; if not, write to the Free
  81543. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81544. - 02111-1307 USA. */
  81545. + License along with the GNU C Library; if not, see
  81546. + <http://www.gnu.org/licenses/>. */
  81547. #include <fenv.h>
  81548. diff -Nur uClibc-0.9.33.2/libm/i386/fegetexcept.c uClibc-git/libm/i386/fegetexcept.c
  81549. --- uClibc-0.9.33.2/libm/i386/fegetexcept.c 2012-05-15 09:20:09.000000000 +0200
  81550. +++ uClibc-git/libm/i386/fegetexcept.c 2014-07-25 20:36:07.945340651 +0200
  81551. @@ -14,9 +14,8 @@
  81552. Lesser General Public License for more details.
  81553. You should have received a copy of the GNU Lesser General Public
  81554. - License along with the GNU C Library; if not, write to the Free
  81555. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81556. - 02111-1307 USA. */
  81557. + License along with the GNU C Library; if not, see
  81558. + <http://www.gnu.org/licenses/>. */
  81559. #include <fenv.h>
  81560. diff -Nur uClibc-0.9.33.2/libm/i386/fegetround.c uClibc-git/libm/i386/fegetround.c
  81561. --- uClibc-0.9.33.2/libm/i386/fegetround.c 2012-05-15 09:20:09.000000000 +0200
  81562. +++ uClibc-git/libm/i386/fegetround.c 2014-07-25 20:36:07.945340651 +0200
  81563. @@ -14,9 +14,8 @@
  81564. Lesser General Public License for more details.
  81565. You should have received a copy of the GNU Lesser General Public
  81566. - License along with the GNU C Library; if not, write to the Free
  81567. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81568. - 02111-1307 USA. */
  81569. + License along with the GNU C Library; if not, see
  81570. + <http://www.gnu.org/licenses/>. */
  81571. #include <fenv.h>
  81572. diff -Nur uClibc-0.9.33.2/libm/i386/feholdexcpt.c uClibc-git/libm/i386/feholdexcpt.c
  81573. --- uClibc-0.9.33.2/libm/i386/feholdexcpt.c 2012-05-15 09:20:09.000000000 +0200
  81574. +++ uClibc-git/libm/i386/feholdexcpt.c 2014-07-25 20:36:07.945340651 +0200
  81575. @@ -15,9 +15,8 @@
  81576. Lesser General Public License for more details.
  81577. You should have received a copy of the GNU Lesser General Public
  81578. - License along with the GNU C Library; if not, write to the Free
  81579. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81580. - 02111-1307 USA. */
  81581. + License along with the GNU C Library; if not, see
  81582. + <http://www.gnu.org/licenses/>. */
  81583. #include <fenv.h>
  81584. #include <unistd.h>
  81585. diff -Nur uClibc-0.9.33.2/libm/i386/fesetenv.c uClibc-git/libm/i386/fesetenv.c
  81586. --- uClibc-0.9.33.2/libm/i386/fesetenv.c 2012-05-15 09:20:09.000000000 +0200
  81587. +++ uClibc-git/libm/i386/fesetenv.c 2014-07-25 20:36:07.945340651 +0200
  81588. @@ -14,9 +14,8 @@
  81589. Lesser General Public License for more details.
  81590. You should have received a copy of the GNU Lesser General Public
  81591. - License along with the GNU C Library; if not, write to the Free
  81592. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81593. - 02111-1307 USA. */
  81594. + License along with the GNU C Library; if not, see
  81595. + <http://www.gnu.org/licenses/>. */
  81596. #include <fenv.h>
  81597. #include <assert.h>
  81598. diff -Nur uClibc-0.9.33.2/libm/i386/fesetround.c uClibc-git/libm/i386/fesetround.c
  81599. --- uClibc-0.9.33.2/libm/i386/fesetround.c 2012-05-15 09:20:09.000000000 +0200
  81600. +++ uClibc-git/libm/i386/fesetround.c 2014-07-25 20:36:07.945340651 +0200
  81601. @@ -14,9 +14,8 @@
  81602. Lesser General Public License for more details.
  81603. You should have received a copy of the GNU Lesser General Public
  81604. - License along with the GNU C Library; if not, write to the Free
  81605. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81606. - 02111-1307 USA. */
  81607. + License along with the GNU C Library; if not, see
  81608. + <http://www.gnu.org/licenses/>. */
  81609. #include <fenv.h>
  81610. #include <unistd.h>
  81611. diff -Nur uClibc-0.9.33.2/libm/i386/feupdateenv.c uClibc-git/libm/i386/feupdateenv.c
  81612. --- uClibc-0.9.33.2/libm/i386/feupdateenv.c 2012-05-15 09:20:09.000000000 +0200
  81613. +++ uClibc-git/libm/i386/feupdateenv.c 2014-07-25 20:36:07.945340651 +0200
  81614. @@ -14,9 +14,8 @@
  81615. Lesser General Public License for more details.
  81616. You should have received a copy of the GNU Lesser General Public
  81617. - License along with the GNU C Library; if not, write to the Free
  81618. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81619. - 02111-1307 USA. */
  81620. + License along with the GNU C Library; if not, see
  81621. + <http://www.gnu.org/licenses/>. */
  81622. #include <fenv.h>
  81623. #include <unistd.h>
  81624. diff -Nur uClibc-0.9.33.2/libm/i386/fgetexcptflg.c uClibc-git/libm/i386/fgetexcptflg.c
  81625. --- uClibc-0.9.33.2/libm/i386/fgetexcptflg.c 2012-05-15 09:20:09.000000000 +0200
  81626. +++ uClibc-git/libm/i386/fgetexcptflg.c 2014-07-25 20:36:07.945340651 +0200
  81627. @@ -14,9 +14,8 @@
  81628. Lesser General Public License for more details.
  81629. You should have received a copy of the GNU Lesser General Public
  81630. - License along with the GNU C Library; if not, write to the Free
  81631. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81632. - 02111-1307 USA. */
  81633. + License along with the GNU C Library; if not, see
  81634. + <http://www.gnu.org/licenses/>. */
  81635. #include <fenv.h>
  81636. diff -Nur uClibc-0.9.33.2/libm/i386/fraiseexcpt.c uClibc-git/libm/i386/fraiseexcpt.c
  81637. --- uClibc-0.9.33.2/libm/i386/fraiseexcpt.c 2012-05-15 09:20:09.000000000 +0200
  81638. +++ uClibc-git/libm/i386/fraiseexcpt.c 2014-07-25 20:36:07.945340651 +0200
  81639. @@ -14,9 +14,8 @@
  81640. Lesser General Public License for more details.
  81641. You should have received a copy of the GNU Lesser General Public
  81642. - License along with the GNU C Library; if not, write to the Free
  81643. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81644. - 02111-1307 USA. */
  81645. + License along with the GNU C Library; if not, see
  81646. + <http://www.gnu.org/licenses/>. */
  81647. #include <fenv.h>
  81648. #include <math.h>
  81649. diff -Nur uClibc-0.9.33.2/libm/i386/fsetexcptflg.c uClibc-git/libm/i386/fsetexcptflg.c
  81650. --- uClibc-0.9.33.2/libm/i386/fsetexcptflg.c 2012-05-15 09:20:09.000000000 +0200
  81651. +++ uClibc-git/libm/i386/fsetexcptflg.c 2014-07-25 20:36:07.945340651 +0200
  81652. @@ -14,9 +14,8 @@
  81653. Lesser General Public License for more details.
  81654. You should have received a copy of the GNU Lesser General Public
  81655. - License along with the GNU C Library; if not, write to the Free
  81656. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81657. - 02111-1307 USA. */
  81658. + License along with the GNU C Library; if not, see
  81659. + <http://www.gnu.org/licenses/>. */
  81660. #include <fenv.h>
  81661. #include <math.h>
  81662. diff -Nur uClibc-0.9.33.2/libm/i386/ftestexcept.c uClibc-git/libm/i386/ftestexcept.c
  81663. --- uClibc-0.9.33.2/libm/i386/ftestexcept.c 2012-05-15 09:20:09.000000000 +0200
  81664. +++ uClibc-git/libm/i386/ftestexcept.c 2014-07-25 20:36:07.945340651 +0200
  81665. @@ -14,9 +14,8 @@
  81666. Lesser General Public License for more details.
  81667. You should have received a copy of the GNU Lesser General Public
  81668. - License along with the GNU C Library; if not, write to the Free
  81669. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81670. - 02111-1307 USA. */
  81671. + License along with the GNU C Library; if not, see
  81672. + <http://www.gnu.org/licenses/>. */
  81673. #include <fenv.h>
  81674. #include <unistd.h>
  81675. diff -Nur uClibc-0.9.33.2/libm/k_cos.c uClibc-git/libm/k_cos.c
  81676. --- uClibc-0.9.33.2/libm/k_cos.c 2012-05-15 09:20:09.000000000 +0200
  81677. +++ uClibc-git/libm/k_cos.c 2014-07-25 20:36:07.945340651 +0200
  81678. @@ -56,7 +56,7 @@
  81679. C5 = 2.08757232129817482790e-09, /* 0x3E21EE9E, 0xBDB4B1C4 */
  81680. C6 = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */
  81681. -double attribute_hidden __kernel_cos(double x, double y)
  81682. +double __kernel_cos(double x, double y)
  81683. {
  81684. double a,hz,z,r,qx;
  81685. int32_t ix;
  81686. diff -Nur uClibc-0.9.33.2/libm/k_rem_pio2.c uClibc-git/libm/k_rem_pio2.c
  81687. --- uClibc-0.9.33.2/libm/k_rem_pio2.c 2012-05-15 09:20:09.000000000 +0200
  81688. +++ uClibc-git/libm/k_rem_pio2.c 2014-07-25 20:36:07.945340651 +0200
  81689. @@ -147,7 +147,7 @@
  81690. two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
  81691. twon24 = 5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */
  81692. -int attribute_hidden __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int32_t *ipio2)
  81693. +int __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int32_t *ipio2)
  81694. {
  81695. int32_t jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih;
  81696. double z,fw,f[20],fq[20],q[20];
  81697. diff -Nur uClibc-0.9.33.2/libm/k_sin.c uClibc-git/libm/k_sin.c
  81698. --- uClibc-0.9.33.2/libm/k_sin.c 2012-05-15 09:20:09.000000000 +0200
  81699. +++ uClibc-git/libm/k_sin.c 2014-07-25 20:36:07.945340651 +0200
  81700. @@ -49,7 +49,7 @@
  81701. S5 = -2.50507602534068634195e-08, /* 0xBE5AE5E6, 0x8A2B9CEB */
  81702. S6 = 1.58969099521155010221e-10; /* 0x3DE5D93A, 0x5ACFD57C */
  81703. -double attribute_hidden __kernel_sin(double x, double y, int iy)
  81704. +double __kernel_sin(double x, double y, int iy)
  81705. {
  81706. double z,r,v;
  81707. int32_t ix;
  81708. diff -Nur uClibc-0.9.33.2/libm/k_standard.c uClibc-git/libm/k_standard.c
  81709. --- uClibc-0.9.33.2/libm/k_standard.c 2012-05-15 09:20:09.000000000 +0200
  81710. +++ uClibc-git/libm/k_standard.c 2014-07-25 20:36:07.945340651 +0200
  81711. @@ -598,6 +598,7 @@
  81712. errno = EDOM;
  81713. }
  81714. break;
  81715. +# ifdef __UCLIBC_SUSV3_LEGACY__
  81716. case 32:
  81717. case 132:
  81718. /* scalb overflow; SVID also returns +-HUGE_VAL */
  81719. @@ -622,6 +623,7 @@
  81720. errno = ERANGE;
  81721. }
  81722. break;
  81723. +# endif
  81724. case 34:
  81725. case 134:
  81726. /* j0(|x|>X_TLOSS) */
  81727. diff -Nur uClibc-0.9.33.2/libm/k_tan.c uClibc-git/libm/k_tan.c
  81728. --- uClibc-0.9.33.2/libm/k_tan.c 2012-05-15 09:20:09.000000000 +0200
  81729. +++ uClibc-git/libm/k_tan.c 2014-07-25 20:36:07.945340651 +0200
  81730. @@ -66,7 +66,7 @@
  81731. 2.59073051863633712884e-05, /* 0x3EFB2A70, 0x74BF7AD4 */
  81732. };
  81733. -double attribute_hidden __kernel_tan(double x, double y, int iy)
  81734. +double __kernel_tan(double x, double y, int iy)
  81735. {
  81736. double z,r,v,w,s;
  81737. int32_t ix,hx;
  81738. diff -Nur uClibc-0.9.33.2/libm/metag/fclrexcpt.c uClibc-git/libm/metag/fclrexcpt.c
  81739. --- uClibc-0.9.33.2/libm/metag/fclrexcpt.c 1970-01-01 01:00:00.000000000 +0100
  81740. +++ uClibc-git/libm/metag/fclrexcpt.c 2014-07-25 20:36:07.957340715 +0200
  81741. @@ -0,0 +1,44 @@
  81742. +/* Clear given exceptions in current floating-point environment.
  81743. + Copyright (C) 2013 Imagination Technologies Ltd.
  81744. + This file is part of the GNU C Library.
  81745. +
  81746. + The GNU C Library is free software; you can redistribute it and/or
  81747. + modify it under the terms of the GNU Lesser General Public
  81748. + License as published by the Free Software Foundation; either
  81749. + version 2.1 of the License, or (at your option) any later version.
  81750. +
  81751. + The GNU C Library is distributed in the hope that it will be useful,
  81752. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  81753. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  81754. + Lesser General Public License for more details.
  81755. +
  81756. + You should have received a copy of the GNU Lesser General Public
  81757. + License along with the GNU C Library; if not, write to the Free
  81758. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81759. + 02111-1307 USA. */
  81760. +
  81761. +#include <fenv.h>
  81762. +#include <unistd.h>
  81763. +
  81764. +#include "internal.h"
  81765. +
  81766. +int
  81767. +feclearexcept (int excepts)
  81768. +{
  81769. + unsigned int temp;
  81770. +
  81771. + /* Get the current exceptions. */
  81772. + __asm__ ("MOV %0,TXDEFR" : "=r" (temp));
  81773. +
  81774. + /* Mask out unsupported bits/exceptions. */
  81775. + excepts &= FE_ALL_EXCEPT;
  81776. +
  81777. + excepts <<= 16;
  81778. +
  81779. + temp &= ~excepts;
  81780. +
  81781. + metag_set_fpu_flags(temp);
  81782. +
  81783. + /* Success. */
  81784. + return 0;
  81785. +}
  81786. diff -Nur uClibc-0.9.33.2/libm/metag/fedisblxcpt.c uClibc-git/libm/metag/fedisblxcpt.c
  81787. --- uClibc-0.9.33.2/libm/metag/fedisblxcpt.c 1970-01-01 01:00:00.000000000 +0100
  81788. +++ uClibc-git/libm/metag/fedisblxcpt.c 2014-07-25 20:36:07.957340715 +0200
  81789. @@ -0,0 +1,40 @@
  81790. +/* Disable floating-point exceptions.
  81791. + Copyright (C) 2013 Imagination Technologies Ltd.
  81792. + This file is part of the GNU C Library.
  81793. +
  81794. + The GNU C Library is free software; you can redistribute it and/or
  81795. + modify it under the terms of the GNU Lesser General Public
  81796. + License as published by the Free Software Foundation; either
  81797. + version 2.1 of the License, or (at your option) any later version.
  81798. +
  81799. + The GNU C Library is distributed in the hope that it will be useful,
  81800. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  81801. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  81802. + Lesser General Public License for more details.
  81803. +
  81804. + You should have received a copy of the GNU Lesser General Public
  81805. + License along with the GNU C Library; if not, write to the Free
  81806. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81807. + 02111-1307 USA. */
  81808. +
  81809. +#include <fenv.h>
  81810. +#include <unistd.h>
  81811. +
  81812. +#include "internal.h"
  81813. +
  81814. +int
  81815. +fedisableexcept (int excepts)
  81816. +{
  81817. + unsigned int old_exc;
  81818. +
  81819. + /* Get the current control word. */
  81820. + __asm__ ("MOV %0,TXDEFR" : "=r" (old_exc));
  81821. +
  81822. + old_exc &= FE_ALL_EXCEPT;
  81823. +
  81824. + excepts = old_exc & ~excepts;
  81825. +
  81826. + metag_set_fpu_flags(excepts);
  81827. +
  81828. + return old_exc;
  81829. +}
  81830. diff -Nur uClibc-0.9.33.2/libm/metag/feenablxcpt.c uClibc-git/libm/metag/feenablxcpt.c
  81831. --- uClibc-0.9.33.2/libm/metag/feenablxcpt.c 1970-01-01 01:00:00.000000000 +0100
  81832. +++ uClibc-git/libm/metag/feenablxcpt.c 2014-07-25 20:36:07.957340715 +0200
  81833. @@ -0,0 +1,40 @@
  81834. +/* Enable floating-point exceptions.
  81835. + Copyright (C) 2013 Imagination Technologies Ltd.
  81836. + This file is part of the GNU C Library.
  81837. +
  81838. + The GNU C Library is free software; you can redistribute it and/or
  81839. + modify it under the terms of the GNU Lesser General Public
  81840. + License as published by the Free Software Foundation; either
  81841. + version 2.1 of the License, or (at your option) any later version.
  81842. +
  81843. + The GNU C Library is distributed in the hope that it will be useful,
  81844. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  81845. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  81846. + Lesser General Public License for more details.
  81847. +
  81848. + You should have received a copy of the GNU Lesser General Public
  81849. + License along with the GNU C Library; if not, write to the Free
  81850. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81851. + 02111-1307 USA. */
  81852. +
  81853. +#include <fenv.h>
  81854. +#include <unistd.h>
  81855. +
  81856. +#include "internal.h"
  81857. +
  81858. +int
  81859. +feenableexcept (int excepts)
  81860. +{
  81861. + unsigned int old_exc;
  81862. +
  81863. + /* Get the current control word. */
  81864. + __asm__ ("MOV %0,TXDEFR" : "=r" (old_exc));
  81865. +
  81866. + old_exc &= FE_ALL_EXCEPT;
  81867. +
  81868. + excepts |= old_exc;
  81869. +
  81870. + metag_set_fpu_flags(excepts);
  81871. +
  81872. + return old_exc;
  81873. +}
  81874. diff -Nur uClibc-0.9.33.2/libm/metag/fegetenv.c uClibc-git/libm/metag/fegetenv.c
  81875. --- uClibc-0.9.33.2/libm/metag/fegetenv.c 1970-01-01 01:00:00.000000000 +0100
  81876. +++ uClibc-git/libm/metag/fegetenv.c 2014-07-25 20:36:07.957340715 +0200
  81877. @@ -0,0 +1,36 @@
  81878. +/* Store current floating-point environment.
  81879. + Copyright (C) 2013 Imagination Technologies Ltd.
  81880. + This file is part of the GNU C Library.
  81881. +
  81882. + The GNU C Library is free software; you can redistribute it and/or
  81883. + modify it under the terms of the GNU Lesser General Public
  81884. + License as published by the Free Software Foundation; either
  81885. + version 2.1 of the License, or (at your option) any later version.
  81886. +
  81887. + The GNU C Library is distributed in the hope that it will be useful,
  81888. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  81889. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  81890. + Lesser General Public License for more details.
  81891. +
  81892. + You should have received a copy of the GNU Lesser General Public
  81893. + License along with the GNU C Library; if not, write to the Free
  81894. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81895. + 02111-1307 USA. */
  81896. +
  81897. +#include <fenv.h>
  81898. +
  81899. +int
  81900. +fegetenv (fenv_t *envp)
  81901. +{
  81902. + unsigned int txdefr;
  81903. + unsigned int txmode;
  81904. +
  81905. + __asm__ ("MOV %0,TXDEFR" : "=r" (txdefr));
  81906. + __asm__ ("MOV %0,TXMODE" : "=r" (txmode));
  81907. +
  81908. + envp->txdefr = txdefr;
  81909. + envp->txmode = txmode;
  81910. +
  81911. + /* Success. */
  81912. + return 0;
  81913. +}
  81914. diff -Nur uClibc-0.9.33.2/libm/metag/fegetexcept.c uClibc-git/libm/metag/fegetexcept.c
  81915. --- uClibc-0.9.33.2/libm/metag/fegetexcept.c 1970-01-01 01:00:00.000000000 +0100
  81916. +++ uClibc-git/libm/metag/fegetexcept.c 2014-07-25 20:36:07.957340715 +0200
  81917. @@ -0,0 +1,31 @@
  81918. +/* Get enabled floating-point exceptions.
  81919. + Copyright (C) 2013 Imagination Technologies Ltd.
  81920. + This file is part of the GNU C Library.
  81921. +
  81922. + The GNU C Library is free software; you can redistribute it and/or
  81923. + modify it under the terms of the GNU Lesser General Public
  81924. + License as published by the Free Software Foundation; either
  81925. + version 2.1 of the License, or (at your option) any later version.
  81926. +
  81927. + The GNU C Library is distributed in the hope that it will be useful,
  81928. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  81929. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  81930. + Lesser General Public License for more details.
  81931. +
  81932. + You should have received a copy of the GNU Lesser General Public
  81933. + License along with the GNU C Library; if not, write to the Free
  81934. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81935. + 02111-1307 USA. */
  81936. +
  81937. +#include <fenv.h>
  81938. +
  81939. +int
  81940. +fegetexcept (void)
  81941. +{
  81942. + unsigned int exc;
  81943. +
  81944. + /* Get the current control word. */
  81945. + __asm__ ("MOV %0,TXDEFR" : "=r" (exc));
  81946. +
  81947. + return exc & FE_ALL_EXCEPT;
  81948. +}
  81949. diff -Nur uClibc-0.9.33.2/libm/metag/fegetround.c uClibc-git/libm/metag/fegetround.c
  81950. --- uClibc-0.9.33.2/libm/metag/fegetround.c 1970-01-01 01:00:00.000000000 +0100
  81951. +++ uClibc-git/libm/metag/fegetround.c 2014-07-25 20:36:07.957340715 +0200
  81952. @@ -0,0 +1,30 @@
  81953. +/* Return current rounding direction.
  81954. + Copyright (C) 2013 Imagination Technologies Ltd.
  81955. + This file is part of the GNU C Library.
  81956. +
  81957. + The GNU C Library is free software; you can redistribute it and/or
  81958. + modify it under the terms of the GNU Lesser General Public
  81959. + License as published by the Free Software Foundation; either
  81960. + version 2.1 of the License, or (at your option) any later version.
  81961. +
  81962. + The GNU C Library is distributed in the hope that it will be useful,
  81963. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  81964. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  81965. + Lesser General Public License for more details.
  81966. +
  81967. + You should have received a copy of the GNU Lesser General Public
  81968. + License along with the GNU C Library; if not, write to the Free
  81969. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  81970. + 02111-1307 USA. */
  81971. +
  81972. +#include <fenv.h>
  81973. +
  81974. +int
  81975. +fegetround (void)
  81976. +{
  81977. + unsigned int txmode;
  81978. +
  81979. + __asm__ ("MOV %0,TXMODE" : "=r" (txmode));
  81980. +
  81981. + return (txmode >> 16) & 0x3;
  81982. +}
  81983. diff -Nur uClibc-0.9.33.2/libm/metag/feholdexcpt.c uClibc-git/libm/metag/feholdexcpt.c
  81984. --- uClibc-0.9.33.2/libm/metag/feholdexcpt.c 1970-01-01 01:00:00.000000000 +0100
  81985. +++ uClibc-git/libm/metag/feholdexcpt.c 2014-07-25 20:36:07.957340715 +0200
  81986. @@ -0,0 +1,41 @@
  81987. +/* Store current floating-point environment and clear exceptions.
  81988. + Copyright (C) 2013 Imagination Technologies Ltd.
  81989. + Free Software Foundation, Inc.
  81990. + This file is part of the GNU C Library.
  81991. +
  81992. + The GNU C Library is free software; you can redistribute it and/or
  81993. + modify it under the terms of the GNU Lesser General Public
  81994. + License as published by the Free Software Foundation; either
  81995. + version 2.1 of the License, or (at your option) any later version.
  81996. +
  81997. + The GNU C Library is distributed in the hope that it will be useful,
  81998. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  81999. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  82000. + Lesser General Public License for more details.
  82001. +
  82002. + You should have received a copy of the GNU Lesser General Public
  82003. + License along with the GNU C Library; if not, write to the Free
  82004. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82005. + 02111-1307 USA. */
  82006. +
  82007. +#include <fenv.h>
  82008. +#include <unistd.h>
  82009. +
  82010. +#include "internal.h"
  82011. +
  82012. +int
  82013. +feholdexcept (fenv_t *envp)
  82014. +{
  82015. + unsigned int txdefr;
  82016. + unsigned int txmode;
  82017. +
  82018. + __asm__ ("MOV %0,TXDEFR" : "=r" (txdefr));
  82019. + __asm__ ("MOV %0,TXMODE" : "=r" (txmode));
  82020. +
  82021. + envp->txdefr = txdefr;
  82022. + envp->txmode = txmode;
  82023. +
  82024. + metag_set_fpu_flags(0);
  82025. +
  82026. + return 0;
  82027. +}
  82028. diff -Nur uClibc-0.9.33.2/libm/metag/fesetenv.c uClibc-git/libm/metag/fesetenv.c
  82029. --- uClibc-0.9.33.2/libm/metag/fesetenv.c 1970-01-01 01:00:00.000000000 +0100
  82030. +++ uClibc-git/libm/metag/fesetenv.c 2014-07-25 20:36:07.957340715 +0200
  82031. @@ -0,0 +1,60 @@
  82032. +/* Install given floating-point environment.
  82033. + Copyright (C) 2013 Imagination Technologies Ltd.
  82034. + This file is part of the GNU C Library.
  82035. +
  82036. + The GNU C Library is free software; you can redistribute it and/or
  82037. + modify it under the terms of the GNU Lesser General Public
  82038. + License as published by the Free Software Foundation; either
  82039. + version 2.1 of the License, or (at your option) any later version.
  82040. +
  82041. + The GNU C Library is distributed in the hope that it will be useful,
  82042. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  82043. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  82044. + Lesser General Public License for more details.
  82045. +
  82046. + You should have received a copy of the GNU Lesser General Public
  82047. + License along with the GNU C Library; if not, write to the Free
  82048. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82049. + 02111-1307 USA. */
  82050. +
  82051. +#include <fenv.h>
  82052. +#include <assert.h>
  82053. +
  82054. +#include "internal.h"
  82055. +
  82056. +libm_hidden_proto(fesetenv)
  82057. +
  82058. +int
  82059. +fesetenv (const fenv_t *envp)
  82060. +{
  82061. + unsigned int exc;
  82062. + unsigned int txmode;
  82063. +
  82064. + __asm__ ("MOV %0,TXMODE" : "=r" (txmode));
  82065. +
  82066. + /* Clear rounding mode bits (round to nearest). */
  82067. + txmode &= ~(0x3 << 16);
  82068. +
  82069. + if (envp == FE_DFL_ENV)
  82070. + {
  82071. + exc = 0;
  82072. + }
  82073. + else if (envp == FE_NOMASK_ENV)
  82074. + {
  82075. + exc = 0x1f;
  82076. + }
  82077. + else
  82078. + {
  82079. + exc = envp->txdefr & (FE_ALL_EXCEPT | (FE_ALL_EXCEPT << 16));
  82080. + /* Write rounding mode and guard bit. */
  82081. + txmode |= (0x1 << 18 ) | (envp->txmode & (0x3 << 16));
  82082. + }
  82083. +
  82084. + __asm__ ("MOV TXMODE,%0" : : "r" (txmode));
  82085. +
  82086. + metag_set_fpu_flags(exc);
  82087. +
  82088. + /* Success. */
  82089. + return 0;
  82090. +}
  82091. +libm_hidden_def(fesetenv)
  82092. diff -Nur uClibc-0.9.33.2/libm/metag/fesetround.c uClibc-git/libm/metag/fesetround.c
  82093. --- uClibc-0.9.33.2/libm/metag/fesetround.c 1970-01-01 01:00:00.000000000 +0100
  82094. +++ uClibc-git/libm/metag/fesetround.c 2014-07-25 20:36:07.957340715 +0200
  82095. @@ -0,0 +1,41 @@
  82096. +/* Set current rounding direction.
  82097. + Copyright (C) 2013 Imagination Technologies Ltd.
  82098. + This file is part of the GNU C Library.
  82099. +
  82100. + The GNU C Library is free software; you can redistribute it and/or
  82101. + modify it under the terms of the GNU Lesser General Public
  82102. + License as published by the Free Software Foundation; either
  82103. + version 2.1 of the License, or (at your option) any later version.
  82104. +
  82105. + The GNU C Library is distributed in the hope that it will be useful,
  82106. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  82107. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  82108. + Lesser General Public License for more details.
  82109. +
  82110. + You should have received a copy of the GNU Lesser General Public
  82111. + License along with the GNU C Library; if not, write to the Free
  82112. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82113. + 02111-1307 USA. */
  82114. +
  82115. +#include <fenv.h>
  82116. +#include <unistd.h>
  82117. +
  82118. +int
  82119. +fesetround (int round)
  82120. +{
  82121. + unsigned int txmode;
  82122. +
  82123. + if ((round & ~0x3) != 0)
  82124. + /* ROUND is no valid rounding mode. */
  82125. + return 1;
  82126. +
  82127. + __asm__ ("MOV %0,TXMODE" : "=r" (txmode));
  82128. +
  82129. + txmode &= ~(0x3 << 16);
  82130. + /* Write rounding mode and guard bit. */
  82131. + txmode |= (0x1 << 18 ) | (round << 16);
  82132. +
  82133. + __asm__ ("MOV TXMODE,%0" : : "r" (txmode));
  82134. +
  82135. + return 0;
  82136. +}
  82137. diff -Nur uClibc-0.9.33.2/libm/metag/feupdateenv.c uClibc-git/libm/metag/feupdateenv.c
  82138. --- uClibc-0.9.33.2/libm/metag/feupdateenv.c 1970-01-01 01:00:00.000000000 +0100
  82139. +++ uClibc-git/libm/metag/feupdateenv.c 2014-07-25 20:36:07.957340715 +0200
  82140. @@ -0,0 +1,45 @@
  82141. +/* Install given floating-point environment and raise exceptions.
  82142. + Copyright (C) 2013 Imagination Technologies Ltd.
  82143. + This file is part of the GNU C Library.
  82144. +
  82145. + The GNU C Library is free software; you can redistribute it and/or
  82146. + modify it under the terms of the GNU Lesser General Public
  82147. + License as published by the Free Software Foundation; either
  82148. + version 2.1 of the License, or (at your option) any later version.
  82149. +
  82150. + The GNU C Library is distributed in the hope that it will be useful,
  82151. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  82152. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  82153. + Lesser General Public License for more details.
  82154. +
  82155. + You should have received a copy of the GNU Lesser General Public
  82156. + License along with the GNU C Library; if not, write to the Free
  82157. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82158. + 02111-1307 USA. */
  82159. +
  82160. +#include <fenv.h>
  82161. +#include <unistd.h>
  82162. +
  82163. +libm_hidden_proto(fesetenv)
  82164. +libm_hidden_proto(feraiseexcept)
  82165. +
  82166. +int
  82167. +feupdateenv (const fenv_t *envp)
  82168. +{
  82169. + unsigned int temp;
  82170. +
  82171. + /* Save current exceptions. */
  82172. + __asm__ ("MOV %0,TXDEFR" : "=r" (temp));
  82173. +
  82174. + temp >>= 16;
  82175. + temp &= FE_ALL_EXCEPT;
  82176. +
  82177. + /* Install new environment. */
  82178. + fesetenv (envp);
  82179. +
  82180. + /* Raise the saved exception. */
  82181. + feraiseexcept ((int) temp);
  82182. +
  82183. + /* Success. */
  82184. + return 0;
  82185. +}
  82186. diff -Nur uClibc-0.9.33.2/libm/metag/fgetexcptflg.c uClibc-git/libm/metag/fgetexcptflg.c
  82187. --- uClibc-0.9.33.2/libm/metag/fgetexcptflg.c 1970-01-01 01:00:00.000000000 +0100
  82188. +++ uClibc-git/libm/metag/fgetexcptflg.c 2014-07-25 20:36:07.957340715 +0200
  82189. @@ -0,0 +1,34 @@
  82190. +/* Store current representation for exceptions.
  82191. + Copyright (C) 2013 Imagination Technologies Ltd.
  82192. + This file is part of the GNU C Library.
  82193. +
  82194. + The GNU C Library is free software; you can redistribute it and/or
  82195. + modify it under the terms of the GNU Lesser General Public
  82196. + License as published by the Free Software Foundation; either
  82197. + version 2.1 of the License, or (at your option) any later version.
  82198. +
  82199. + The GNU C Library is distributed in the hope that it will be useful,
  82200. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  82201. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  82202. + Lesser General Public License for more details.
  82203. +
  82204. + You should have received a copy of the GNU Lesser General Public
  82205. + License along with the GNU C Library; if not, write to the Free
  82206. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82207. + 02111-1307 USA. */
  82208. +
  82209. +#include <fenv.h>
  82210. +
  82211. +int
  82212. +fegetexceptflag (fexcept_t *flagp, int excepts)
  82213. +{
  82214. + unsigned int temp;
  82215. +
  82216. + /* Get the current exceptions. */
  82217. + __asm__ ("MOV %0,TXDEFR" : "=r" (temp));
  82218. +
  82219. + *flagp = temp & excepts & FE_ALL_EXCEPT;
  82220. +
  82221. + /* Success. */
  82222. + return 0;
  82223. +}
  82224. diff -Nur uClibc-0.9.33.2/libm/metag/fraiseexcpt.c uClibc-git/libm/metag/fraiseexcpt.c
  82225. --- uClibc-0.9.33.2/libm/metag/fraiseexcpt.c 1970-01-01 01:00:00.000000000 +0100
  82226. +++ uClibc-git/libm/metag/fraiseexcpt.c 2014-07-25 20:36:07.957340715 +0200
  82227. @@ -0,0 +1,92 @@
  82228. +/* Raise given exceptions.
  82229. + Copyright (C) 2013 Imagination Technologies Ltd.
  82230. + This file is part of the GNU C Library.
  82231. +
  82232. + The GNU C Library is free software; you can redistribute it and/or
  82233. + modify it under the terms of the GNU Lesser General Public
  82234. + License as published by the Free Software Foundation; either
  82235. + version 2.1 of the License, or (at your option) any later version.
  82236. +
  82237. + The GNU C Library is distributed in the hope that it will be useful,
  82238. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  82239. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  82240. + Lesser General Public License for more details.
  82241. +
  82242. + You should have received a copy of the GNU Lesser General Public
  82243. + License along with the GNU C Library; if not, write to the Free
  82244. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82245. + 02111-1307 USA. */
  82246. +
  82247. +#include <fenv.h>
  82248. +#include <math.h>
  82249. +
  82250. +libm_hidden_proto(feraiseexcept)
  82251. +
  82252. +int
  82253. +feraiseexcept (int excepts)
  82254. +{
  82255. + /* Raise exceptions represented by EXPECTS. But we must raise only
  82256. + one signal at a time. It is important that if the overflow/underflow
  82257. + exception and the inexact exception are given at the same time,
  82258. + the overflow/underflow exception follows the inexact exception. */
  82259. +
  82260. + /* First: invalid exception. */
  82261. + if ((FE_INVALID & excepts) != 0)
  82262. + {
  82263. + /* Reciprocal square root of a negative number is invalid. */
  82264. + __asm__ volatile(
  82265. + "F MOV FX.0,#0xc000 ! -2\n"
  82266. + "F RSQ FX.1,FX.0\n"
  82267. + );
  82268. + }
  82269. +
  82270. + /* Next: division by zero. */
  82271. + if ((FE_DIVBYZERO & excepts) != 0)
  82272. + {
  82273. + __asm__ volatile(
  82274. + "F MOV FX.0,#0\n"
  82275. + "F RCP FX.1,FX.0\n"
  82276. + );
  82277. + }
  82278. +
  82279. + /* Next: overflow. */
  82280. + if ((FE_OVERFLOW & excepts) != 0)
  82281. + {
  82282. + /* Adding a large number in single precision can cause overflow. */
  82283. + __asm__ volatile(
  82284. + " MOVT D0.0,#0x7f7f\n"
  82285. + " ADD D0.0,D0.0,#0xffff\n"
  82286. + "F MOV FX.0,D0.0\n"
  82287. + "F ADD FX.1,FX.0,FX.0\n"
  82288. + );
  82289. + }
  82290. +
  82291. + /* Next: underflow. */
  82292. + if ((FE_UNDERFLOW & excepts) != 0)
  82293. + {
  82294. + /* Multiplying a small value by 0.5 will cause an underflow. */
  82295. + __asm__ volatile(
  82296. + " MOV D0.0,#1\n"
  82297. + "F MOV FX.0,D0.0\n"
  82298. + " MOVT D0.0,#0x3f00\n"
  82299. + "F MOV FX.1,D0.0\n"
  82300. + "F MUL FX.2,FX.1,FX.0\n"
  82301. + );
  82302. + }
  82303. +
  82304. + /* Last: inexact. */
  82305. + if ((FE_INEXACT & excepts) != 0)
  82306. + {
  82307. + /* Converting a small single precision value to half precision
  82308. + can cause an inexact exception. */
  82309. + __asm__ volatile(
  82310. + " MOV D0.0,#0x0001\n"
  82311. + "F MOV FX.0,D0.0\n"
  82312. + "F FTOH FX.1,FX.0\n"
  82313. + );
  82314. + }
  82315. +
  82316. + /* Success. */
  82317. + return 0;
  82318. +}
  82319. +libm_hidden_def(feraiseexcept)
  82320. diff -Nur uClibc-0.9.33.2/libm/metag/fsetexcptflg.c uClibc-git/libm/metag/fsetexcptflg.c
  82321. --- uClibc-0.9.33.2/libm/metag/fsetexcptflg.c 1970-01-01 01:00:00.000000000 +0100
  82322. +++ uClibc-git/libm/metag/fsetexcptflg.c 2014-07-25 20:36:07.957340715 +0200
  82323. @@ -0,0 +1,44 @@
  82324. +/* Set floating-point environment exception handling.
  82325. + Copyright (C) 2013 Imagination Technologies Ltd.
  82326. + This file is part of the GNU C Library.
  82327. +
  82328. + The GNU C Library is free software; you can redistribute it and/or
  82329. + modify it under the terms of the GNU Lesser General Public
  82330. + License as published by the Free Software Foundation; either
  82331. + version 2.1 of the License, or (at your option) any later version.
  82332. +
  82333. + The GNU C Library is distributed in the hope that it will be useful,
  82334. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  82335. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  82336. + Lesser General Public License for more details.
  82337. +
  82338. + You should have received a copy of the GNU Lesser General Public
  82339. + License along with the GNU C Library; if not, write to the Free
  82340. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82341. + 02111-1307 USA. */
  82342. +
  82343. +#include <fenv.h>
  82344. +#include <math.h>
  82345. +#include <unistd.h>
  82346. +
  82347. +#include "internal.h"
  82348. +
  82349. +int
  82350. +fesetexceptflag (const fexcept_t *flagp, int excepts)
  82351. +{
  82352. + unsigned int temp;
  82353. +
  82354. + /* Get the current exceptions. */
  82355. + __asm__ ("MOV %0,TXDEFR" : "=r" (temp));
  82356. +
  82357. + excepts &= FE_ALL_EXCEPT;
  82358. + excepts <<= 16;
  82359. +
  82360. + temp &= ~excepts;
  82361. + temp |= *flagp & excepts;
  82362. +
  82363. + metag_set_fpu_flags(temp);
  82364. +
  82365. + /* Success. */
  82366. + return 0;
  82367. +}
  82368. diff -Nur uClibc-0.9.33.2/libm/metag/ftestexcept.c uClibc-git/libm/metag/ftestexcept.c
  82369. --- uClibc-0.9.33.2/libm/metag/ftestexcept.c 1970-01-01 01:00:00.000000000 +0100
  82370. +++ uClibc-git/libm/metag/ftestexcept.c 2014-07-25 20:36:07.957340715 +0200
  82371. @@ -0,0 +1,32 @@
  82372. +/* Test exception in current environment.
  82373. + Copyright (C) 2013 Imagination Technologies Ltd.
  82374. + This file is part of the GNU C Library.
  82375. +
  82376. + The GNU C Library is free software; you can redistribute it and/or
  82377. + modify it under the terms of the GNU Lesser General Public
  82378. + License as published by the Free Software Foundation; either
  82379. + version 2.1 of the License, or (at your option) any later version.
  82380. +
  82381. + The GNU C Library is distributed in the hope that it will be useful,
  82382. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  82383. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  82384. + Lesser General Public License for more details.
  82385. +
  82386. + You should have received a copy of the GNU Lesser General Public
  82387. + License along with the GNU C Library; if not, write to the Free
  82388. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82389. + 02111-1307 USA. */
  82390. +
  82391. +#include <fenv.h>
  82392. +#include <unistd.h>
  82393. +
  82394. +int
  82395. +fetestexcept (int excepts)
  82396. +{
  82397. + unsigned int temp;
  82398. +
  82399. + /* Get the current exceptions. */
  82400. + __asm__ ("MOV %0,TXDEFR" : "=r" (temp));
  82401. +
  82402. + return (temp >> 16) & excepts & FE_ALL_EXCEPT;
  82403. +}
  82404. diff -Nur uClibc-0.9.33.2/libm/metag/internal.h uClibc-git/libm/metag/internal.h
  82405. --- uClibc-0.9.33.2/libm/metag/internal.h 1970-01-01 01:00:00.000000000 +0100
  82406. +++ uClibc-git/libm/metag/internal.h 2014-07-25 20:36:07.957340715 +0200
  82407. @@ -0,0 +1,7 @@
  82408. +/*
  82409. + * Copyright (C) 2013 Imagination Technologies Ltd.
  82410. + *
  82411. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  82412. + */
  82413. +
  82414. +void metag_set_fpu_flags(unsigned int flags);
  82415. diff -Nur uClibc-0.9.33.2/libm/metag/Makefile.arch uClibc-git/libm/metag/Makefile.arch
  82416. --- uClibc-0.9.33.2/libm/metag/Makefile.arch 1970-01-01 01:00:00.000000000 +0100
  82417. +++ uClibc-git/libm/metag/Makefile.arch 2014-07-25 20:36:07.957340715 +0200
  82418. @@ -0,0 +1,23 @@
  82419. +# Makefile for uClibc
  82420. +#
  82421. +# Copyright (c) 2013 Imagination Technologies Ltd.
  82422. +#
  82423. +# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  82424. +#
  82425. +
  82426. +ifeq ($(UCLIBC_HAS_FENV),y)
  82427. +ifeq ($(CONFIG_META_2_1),y)
  82428. +libm_ARCH_SRC:=$(wildcard $(libm_ARCH_DIR)/*.c)
  82429. +libm_ARCH_OBJ:=$(patsubst $(libm_ARCH_DIR)/%.c,$(libm_ARCH_OUT)/%.o,$(libm_ARCH_SRC))
  82430. +CFLAGS-libm += -Wa,-mfpu=metac21
  82431. +endif
  82432. +endif
  82433. +
  82434. +libm_ARCH_OBJS:=$(libm_ARCH_OBJ)
  82435. +
  82436. +ifeq ($(DOPIC),y)
  82437. +libm-a-y+=$(libm_ARCH_OBJS:.o=.os)
  82438. +else
  82439. +libm-a-y+=$(libm_ARCH_OBJS)
  82440. +endif
  82441. +libm-so-y+=$(libm_ARCH_OBJS:.o=.os)
  82442. diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fclrexcpt.c uClibc-git/libm/powerpc/e500/fpu/fclrexcpt.c
  82443. --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fclrexcpt.c 2012-05-15 09:20:09.000000000 +0200
  82444. +++ uClibc-git/libm/powerpc/e500/fpu/fclrexcpt.c 2014-07-25 20:36:07.981340840 +0200
  82445. @@ -13,9 +13,8 @@
  82446. Lesser General Public License for more details.
  82447. You should have received a copy of the GNU Lesser General Public
  82448. - License along with the GNU C Library; if not, write to the Free
  82449. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82450. - 02111-1307 USA. */
  82451. + License along with the GNU C Library; if not, see
  82452. + <http://www.gnu.org/licenses/>. */
  82453. #include "fenv_libc.h"
  82454. #undef feclearexcept
  82455. diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fedisblxcpt.c uClibc-git/libm/powerpc/e500/fpu/fedisblxcpt.c
  82456. --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fedisblxcpt.c 2012-05-15 09:20:09.000000000 +0200
  82457. +++ uClibc-git/libm/powerpc/e500/fpu/fedisblxcpt.c 2014-07-25 20:36:07.981340840 +0200
  82458. @@ -14,9 +14,8 @@
  82459. Lesser General Public License for more details.
  82460. You should have received a copy of the GNU Lesser General Public
  82461. - License along with the GNU C Library; if not, write to the Free
  82462. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82463. - 02111-1307 USA. */
  82464. + License along with the GNU C Library; if not, see
  82465. + <http://www.gnu.org/licenses/>. */
  82466. #include "fenv_libc.h"
  82467. #include <syscall.h>
  82468. diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/feenablxcpt.c uClibc-git/libm/powerpc/e500/fpu/feenablxcpt.c
  82469. --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/feenablxcpt.c 2012-05-15 09:20:09.000000000 +0200
  82470. +++ uClibc-git/libm/powerpc/e500/fpu/feenablxcpt.c 2014-07-25 20:36:07.981340840 +0200
  82471. @@ -14,9 +14,8 @@
  82472. Lesser General Public License for more details.
  82473. You should have received a copy of the GNU Lesser General Public
  82474. - License along with the GNU C Library; if not, write to the Free
  82475. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82476. - 02111-1307 USA. */
  82477. + License along with the GNU C Library; if not, see
  82478. + <http://www.gnu.org/licenses/>. */
  82479. #include "fenv_libc.h"
  82480. #include <syscall.h>
  82481. diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fegetenv.c uClibc-git/libm/powerpc/e500/fpu/fegetenv.c
  82482. --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fegetenv.c 2012-05-15 09:20:09.000000000 +0200
  82483. +++ uClibc-git/libm/powerpc/e500/fpu/fegetenv.c 2014-07-25 20:36:07.981340840 +0200
  82484. @@ -14,9 +14,8 @@
  82485. Lesser General Public License for more details.
  82486. You should have received a copy of the GNU Lesser General Public
  82487. - License along with the GNU C Library; if not, write to the Free
  82488. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82489. - 02111-1307 USA. */
  82490. + License along with the GNU C Library; if not, see
  82491. + <http://www.gnu.org/licenses/>. */
  82492. #include "fenv_libc.h"
  82493. #include <syscall.h>
  82494. diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fegetexcept.c uClibc-git/libm/powerpc/e500/fpu/fegetexcept.c
  82495. --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fegetexcept.c 2012-05-15 09:20:09.000000000 +0200
  82496. +++ uClibc-git/libm/powerpc/e500/fpu/fegetexcept.c 2014-07-25 20:36:07.981340840 +0200
  82497. @@ -14,9 +14,8 @@
  82498. Lesser General Public License for more details.
  82499. You should have received a copy of the GNU Lesser General Public
  82500. - License along with the GNU C Library; if not, write to the Free
  82501. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82502. - 02111-1307 USA. */
  82503. + License along with the GNU C Library; if not, see
  82504. + <http://www.gnu.org/licenses/>. */
  82505. #include "fenv_libc.h"
  82506. diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fegetround.c uClibc-git/libm/powerpc/e500/fpu/fegetround.c
  82507. --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fegetround.c 2012-05-15 09:20:09.000000000 +0200
  82508. +++ uClibc-git/libm/powerpc/e500/fpu/fegetround.c 2014-07-25 20:36:07.981340840 +0200
  82509. @@ -14,9 +14,8 @@
  82510. Lesser General Public License for more details.
  82511. You should have received a copy of the GNU Lesser General Public
  82512. - License along with the GNU C Library; if not, write to the Free
  82513. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82514. - 02111-1307 USA. */
  82515. + License along with the GNU C Library; if not, see
  82516. + <http://www.gnu.org/licenses/>. */
  82517. #include "fenv_libc.h"
  82518. diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/feholdexcpt.c uClibc-git/libm/powerpc/e500/fpu/feholdexcpt.c
  82519. --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/feholdexcpt.c 2012-05-15 09:20:09.000000000 +0200
  82520. +++ uClibc-git/libm/powerpc/e500/fpu/feholdexcpt.c 2014-07-25 20:36:07.981340840 +0200
  82521. @@ -14,9 +14,8 @@
  82522. Lesser General Public License for more details.
  82523. You should have received a copy of the GNU Lesser General Public
  82524. - License along with the GNU C Library; if not, write to the Free
  82525. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82526. - 02111-1307 USA. */
  82527. + License along with the GNU C Library; if not, see
  82528. + <http://www.gnu.org/licenses/>. */
  82529. #include "fenv_libc.h"
  82530. #include <syscall.h>
  82531. diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fe_nomask.c uClibc-git/libm/powerpc/e500/fpu/fe_nomask.c
  82532. --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fe_nomask.c 2012-05-15 09:20:09.000000000 +0200
  82533. +++ uClibc-git/libm/powerpc/e500/fpu/fe_nomask.c 2014-07-25 20:36:07.981340840 +0200
  82534. @@ -13,9 +13,8 @@
  82535. Lesser General Public License for more details.
  82536. You should have received a copy of the GNU Lesser General Public
  82537. - License along with the GNU C Library; if not, write to the Free
  82538. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82539. - 02111-1307 USA. */
  82540. + License along with the GNU C Library; if not, see
  82541. + <http://www.gnu.org/licenses/>. */
  82542. #include <fenv.h>
  82543. #include <errno.h>
  82544. diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fenv_const.c uClibc-git/libm/powerpc/e500/fpu/fenv_const.c
  82545. --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fenv_const.c 2012-05-15 09:20:09.000000000 +0200
  82546. +++ uClibc-git/libm/powerpc/e500/fpu/fenv_const.c 2014-07-25 20:36:07.981340840 +0200
  82547. @@ -14,9 +14,8 @@
  82548. Lesser General Public License for more details.
  82549. You should have received a copy of the GNU Lesser General Public
  82550. - License along with the GNU C Library; if not, write to the Free
  82551. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82552. - 02111-1307 USA. */
  82553. + License along with the GNU C Library; if not, see
  82554. + <http://www.gnu.org/licenses/>. */
  82555. /* If the default argument is used we use this value. */
  82556. const unsigned long long __fe_dfl_env __attribute__ ((aligned (8))) =
  82557. diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fenv_libc.h uClibc-git/libm/powerpc/e500/fpu/fenv_libc.h
  82558. --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fenv_libc.h 2012-05-15 09:20:09.000000000 +0200
  82559. +++ uClibc-git/libm/powerpc/e500/fpu/fenv_libc.h 2014-07-25 20:36:07.981340840 +0200
  82560. @@ -14,9 +14,8 @@
  82561. Lesser General Public License for more details.
  82562. You should have received a copy of the GNU Lesser General Public
  82563. - License along with the GNU C Library; if not, write to the Free
  82564. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82565. - 02111-1307 USA. */
  82566. + License along with the GNU C Library; if not, see
  82567. + <http://www.gnu.org/licenses/>. */
  82568. #ifndef _FENV_LIBC_H
  82569. #define _FENV_LIBC_H 1
  82570. diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fesetenv.c uClibc-git/libm/powerpc/e500/fpu/fesetenv.c
  82571. --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fesetenv.c 2012-05-15 09:20:09.000000000 +0200
  82572. +++ uClibc-git/libm/powerpc/e500/fpu/fesetenv.c 2014-07-25 20:36:07.981340840 +0200
  82573. @@ -13,9 +13,8 @@
  82574. Lesser General Public License for more details.
  82575. You should have received a copy of the GNU Lesser General Public
  82576. - License along with the GNU C Library; if not, write to the Free
  82577. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82578. - 02111-1307 USA. */
  82579. + License along with the GNU C Library; if not, see
  82580. + <http://www.gnu.org/licenses/>. */
  82581. #include "fenv_libc.h"
  82582. #include <syscall.h>
  82583. diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fesetround.c uClibc-git/libm/powerpc/e500/fpu/fesetround.c
  82584. --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fesetround.c 2012-05-15 09:20:09.000000000 +0200
  82585. +++ uClibc-git/libm/powerpc/e500/fpu/fesetround.c 2014-07-25 20:36:07.981340840 +0200
  82586. @@ -14,9 +14,8 @@
  82587. Lesser General Public License for more details.
  82588. You should have received a copy of the GNU Lesser General Public
  82589. - License along with the GNU C Library; if not, write to the Free
  82590. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82591. - 02111-1307 USA. */
  82592. + License along with the GNU C Library; if not, see
  82593. + <http://www.gnu.org/licenses/>. */
  82594. #include "fenv_libc.h"
  82595. diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/feupdateenv.c uClibc-git/libm/powerpc/e500/fpu/feupdateenv.c
  82596. --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/feupdateenv.c 2012-05-15 09:20:09.000000000 +0200
  82597. +++ uClibc-git/libm/powerpc/e500/fpu/feupdateenv.c 2014-07-25 20:36:07.981340840 +0200
  82598. @@ -14,9 +14,8 @@
  82599. Lesser General Public License for more details.
  82600. You should have received a copy of the GNU Lesser General Public
  82601. - License along with the GNU C Library; if not, write to the Free
  82602. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82603. - 02111-1307 USA. */
  82604. + License along with the GNU C Library; if not, see
  82605. + <http://www.gnu.org/licenses/>. */
  82606. #include "fenv_libc.h"
  82607. #include <syscall.h>
  82608. diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fgetexcptflg.c uClibc-git/libm/powerpc/e500/fpu/fgetexcptflg.c
  82609. --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fgetexcptflg.c 2012-05-15 09:20:09.000000000 +0200
  82610. +++ uClibc-git/libm/powerpc/e500/fpu/fgetexcptflg.c 2014-07-25 20:36:07.981340840 +0200
  82611. @@ -14,9 +14,8 @@
  82612. Lesser General Public License for more details.
  82613. You should have received a copy of the GNU Lesser General Public
  82614. - License along with the GNU C Library; if not, write to the Free
  82615. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82616. - 02111-1307 USA. */
  82617. + License along with the GNU C Library; if not, see
  82618. + <http://www.gnu.org/licenses/>. */
  82619. #include "fenv_libc.h"
  82620. diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fraiseexcpt.c uClibc-git/libm/powerpc/e500/fpu/fraiseexcpt.c
  82621. --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fraiseexcpt.c 2012-05-15 09:20:09.000000000 +0200
  82622. +++ uClibc-git/libm/powerpc/e500/fpu/fraiseexcpt.c 2014-07-25 20:36:07.981340840 +0200
  82623. @@ -14,9 +14,8 @@
  82624. Lesser General Public License for more details.
  82625. You should have received a copy of the GNU Lesser General Public
  82626. - License along with the GNU C Library; if not, write to the Free
  82627. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82628. - 02111-1307 USA. */
  82629. + License along with the GNU C Library; if not, see
  82630. + <http://www.gnu.org/licenses/>. */
  82631. #include "fenv_libc.h"
  82632. diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/fsetexcptflg.c uClibc-git/libm/powerpc/e500/fpu/fsetexcptflg.c
  82633. --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/fsetexcptflg.c 2012-05-15 09:20:09.000000000 +0200
  82634. +++ uClibc-git/libm/powerpc/e500/fpu/fsetexcptflg.c 2014-07-25 20:36:07.981340840 +0200
  82635. @@ -13,9 +13,8 @@
  82636. Lesser General Public License for more details.
  82637. You should have received a copy of the GNU Lesser General Public
  82638. - License along with the GNU C Library; if not, write to the Free
  82639. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82640. - 02111-1307 USA. */
  82641. + License along with the GNU C Library; if not, see
  82642. + <http://www.gnu.org/licenses/>. */
  82643. #include "fenv_libc.h"
  82644. diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/fpu/ftestexcept.c uClibc-git/libm/powerpc/e500/fpu/ftestexcept.c
  82645. --- uClibc-0.9.33.2/libm/powerpc/e500/fpu/ftestexcept.c 2012-05-15 09:20:09.000000000 +0200
  82646. +++ uClibc-git/libm/powerpc/e500/fpu/ftestexcept.c 2014-07-25 20:36:07.981340840 +0200
  82647. @@ -14,9 +14,8 @@
  82648. Lesser General Public License for more details.
  82649. You should have received a copy of the GNU Lesser General Public
  82650. - License along with the GNU C Library; if not, write to the Free
  82651. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82652. - 02111-1307 USA. */
  82653. + License along with the GNU C Library; if not, see
  82654. + <http://www.gnu.org/licenses/>. */
  82655. #include "fenv_libc.h"
  82656. diff -Nur uClibc-0.9.33.2/libm/powerpc/e500/spe-raise.c uClibc-git/libm/powerpc/e500/spe-raise.c
  82657. --- uClibc-0.9.33.2/libm/powerpc/e500/spe-raise.c 2012-05-15 09:20:09.000000000 +0200
  82658. +++ uClibc-git/libm/powerpc/e500/spe-raise.c 2014-07-25 20:36:07.981340840 +0200
  82659. @@ -13,9 +13,8 @@
  82660. Lesser General Public License for more details.
  82661. You should have received a copy of the GNU Lesser General Public
  82662. - License along with the GNU C Library; if not, write to the Free
  82663. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82664. - 02111-1307 USA. */
  82665. + License along with the GNU C Library; if not, see
  82666. + <http://www.gnu.org/licenses/>. */
  82667. #include "fpu/fenv_libc.h"
  82668. diff -Nur uClibc-0.9.33.2/libm/s_ceil.c uClibc-git/libm/s_ceil.c
  82669. --- uClibc-0.9.33.2/libm/s_ceil.c 2012-05-15 09:20:09.000000000 +0200
  82670. +++ uClibc-git/libm/s_ceil.c 2014-07-25 20:36:07.981340840 +0200
  82671. @@ -28,35 +28,35 @@
  82672. double ceil(double x)
  82673. {
  82674. - int32_t i0,i1,j0;
  82675. + int32_t i0,i1,_j0;
  82676. u_int32_t i,j;
  82677. EXTRACT_WORDS(i0,i1,x);
  82678. - j0 = ((i0>>20)&0x7ff)-0x3ff;
  82679. - if(j0<20) {
  82680. - if(j0<0) { /* raise inexact if x != 0 */
  82681. + _j0 = ((i0>>20)&0x7ff)-0x3ff;
  82682. + if(_j0<20) {
  82683. + if(_j0<0) { /* raise inexact if x != 0 */
  82684. if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */
  82685. if(i0<0) {i0=0x80000000;i1=0;}
  82686. else if((i0|i1)!=0) { i0=0x3ff00000;i1=0;}
  82687. }
  82688. } else {
  82689. - i = (0x000fffff)>>j0;
  82690. + i = (0x000fffff)>>_j0;
  82691. if(((i0&i)|i1)==0) return x; /* x is integral */
  82692. if(huge+x>0.0) { /* raise inexact flag */
  82693. - if(i0>0) i0 += (0x00100000)>>j0;
  82694. + if(i0>0) i0 += (0x00100000)>>_j0;
  82695. i0 &= (~i); i1=0;
  82696. }
  82697. }
  82698. - } else if (j0>51) {
  82699. - if(j0==0x400) return x+x; /* inf or NaN */
  82700. + } else if (_j0>51) {
  82701. + if(_j0==0x400) return x+x; /* inf or NaN */
  82702. else return x; /* x is integral */
  82703. } else {
  82704. - i = ((u_int32_t)(0xffffffff))>>(j0-20);
  82705. + i = ((u_int32_t)(0xffffffff))>>(_j0-20);
  82706. if((i1&i)==0) return x; /* x is integral */
  82707. if(huge+x>0.0) { /* raise inexact flag */
  82708. if(i0>0) {
  82709. - if(j0==20) i0+=1;
  82710. + if(_j0==20) i0+=1;
  82711. else {
  82712. - j = i1 + (1<<(52-j0));
  82713. + j = i1 + (1<<(52-_j0));
  82714. if(j<i1) i0+=1; /* got a carry */
  82715. i1 = j;
  82716. }
  82717. diff -Nur uClibc-0.9.33.2/libm/s_floor.c uClibc-git/libm/s_floor.c
  82718. --- uClibc-0.9.33.2/libm/s_floor.c 2012-05-15 09:20:09.000000000 +0200
  82719. +++ uClibc-git/libm/s_floor.c 2014-07-25 20:36:07.981340840 +0200
  82720. @@ -28,36 +28,36 @@
  82721. double floor(double x)
  82722. {
  82723. - int32_t i0,i1,j0;
  82724. + int32_t i0,i1,_j0;
  82725. u_int32_t i,j;
  82726. EXTRACT_WORDS(i0,i1,x);
  82727. - j0 = ((i0>>20)&0x7ff)-0x3ff;
  82728. - if(j0<20) {
  82729. - if(j0<0) { /* raise inexact if x != 0 */
  82730. + _j0 = ((i0>>20)&0x7ff)-0x3ff;
  82731. + if(_j0<20) {
  82732. + if(_j0<0) { /* raise inexact if x != 0 */
  82733. if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */
  82734. if(i0>=0) {i0=i1=0;}
  82735. else if(((i0&0x7fffffff)|i1)!=0)
  82736. { i0=0xbff00000;i1=0;}
  82737. }
  82738. } else {
  82739. - i = (0x000fffff)>>j0;
  82740. + i = (0x000fffff)>>_j0;
  82741. if(((i0&i)|i1)==0) return x; /* x is integral */
  82742. if(huge+x>0.0) { /* raise inexact flag */
  82743. - if(i0<0) i0 += (0x00100000)>>j0;
  82744. + if(i0<0) i0 += (0x00100000)>>_j0;
  82745. i0 &= (~i); i1=0;
  82746. }
  82747. }
  82748. - } else if (j0>51) {
  82749. - if(j0==0x400) return x+x; /* inf or NaN */
  82750. + } else if (_j0>51) {
  82751. + if(_j0==0x400) return x+x; /* inf or NaN */
  82752. else return x; /* x is integral */
  82753. } else {
  82754. - i = ((u_int32_t)(0xffffffff))>>(j0-20);
  82755. + i = ((u_int32_t)(0xffffffff))>>(_j0-20);
  82756. if((i1&i)==0) return x; /* x is integral */
  82757. if(huge+x>0.0) { /* raise inexact flag */
  82758. if(i0<0) {
  82759. - if(j0==20) i0+=1;
  82760. + if(_j0==20) i0+=1;
  82761. else {
  82762. - j = i1+(1<<(52-j0));
  82763. + j = i1+(1<<(52-_j0));
  82764. if(j<i1) i0 +=1 ; /* got a carry */
  82765. i1=j;
  82766. }
  82767. diff -Nur uClibc-0.9.33.2/libm/s_fma.c uClibc-git/libm/s_fma.c
  82768. --- uClibc-0.9.33.2/libm/s_fma.c 2012-05-15 09:20:09.000000000 +0200
  82769. +++ uClibc-git/libm/s_fma.c 2014-07-25 20:36:07.981340840 +0200
  82770. @@ -14,9 +14,8 @@
  82771. Lesser General Public License for more details.
  82772. You should have received a copy of the GNU Lesser General Public
  82773. - License along with the GNU C Library; if not, write to the Free
  82774. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82775. - 02111-1307 USA. */
  82776. + License along with the GNU C Library; if not, see
  82777. + <http://www.gnu.org/licenses/>. */
  82778. #include <math.h>
  82779. diff -Nur uClibc-0.9.33.2/libm/s_fpclassify.c uClibc-git/libm/s_fpclassify.c
  82780. --- uClibc-0.9.33.2/libm/s_fpclassify.c 2012-05-15 09:20:09.000000000 +0200
  82781. +++ uClibc-git/libm/s_fpclassify.c 2014-07-25 20:36:07.981340840 +0200
  82782. @@ -14,9 +14,8 @@
  82783. Lesser General Public License for more details.
  82784. You should have received a copy of the GNU Lesser General Public
  82785. - License along with the GNU C Library; if not, write to the Free
  82786. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82787. - 02111-1307 USA. */
  82788. + License along with the GNU C Library; if not, see
  82789. + <http://www.gnu.org/licenses/>. */
  82790. #include <math.h>
  82791. diff -Nur uClibc-0.9.33.2/libm/s_fpclassifyf.c uClibc-git/libm/s_fpclassifyf.c
  82792. --- uClibc-0.9.33.2/libm/s_fpclassifyf.c 2012-05-15 09:20:09.000000000 +0200
  82793. +++ uClibc-git/libm/s_fpclassifyf.c 2014-07-25 20:36:07.981340840 +0200
  82794. @@ -14,9 +14,8 @@
  82795. Lesser General Public License for more details.
  82796. You should have received a copy of the GNU Lesser General Public
  82797. - License along with the GNU C Library; if not, write to the Free
  82798. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82799. - 02111-1307 USA. */
  82800. + License along with the GNU C Library; if not, see
  82801. + <http://www.gnu.org/licenses/>. */
  82802. #include <math.h>
  82803. #include "math_private.h"
  82804. diff -Nur uClibc-0.9.33.2/libm/s_llrint.c uClibc-git/libm/s_llrint.c
  82805. --- uClibc-0.9.33.2/libm/s_llrint.c 2012-05-15 09:20:09.000000000 +0200
  82806. +++ uClibc-git/libm/s_llrint.c 2014-07-25 20:36:07.981340840 +0200
  82807. @@ -15,9 +15,8 @@
  82808. Lesser General Public License for more details.
  82809. You should have received a copy of the GNU Lesser General Public
  82810. - License along with the GNU C Library; if not, write to the Free
  82811. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82812. - 02111-1307 USA. */
  82813. + License along with the GNU C Library; if not, see
  82814. + <http://www.gnu.org/licenses/>. */
  82815. #include <features.h>
  82816. /* Prevent math.h from defining a colliding inline */
  82817. @@ -34,7 +33,7 @@
  82818. long long int
  82819. llrint (double x)
  82820. {
  82821. - int32_t j0;
  82822. + int32_t _j0;
  82823. u_int32_t i1, i0;
  82824. long long int result;
  82825. volatile double w;
  82826. @@ -42,39 +41,39 @@
  82827. int sx;
  82828. EXTRACT_WORDS (i0, i1, x);
  82829. - j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
  82830. + _j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
  82831. sx = i0 >> 31;
  82832. i0 &= 0xfffff;
  82833. i0 |= 0x100000;
  82834. - if (j0 < 20)
  82835. + if (_j0 < 20)
  82836. {
  82837. w = two52[sx] + x;
  82838. t = w - two52[sx];
  82839. EXTRACT_WORDS (i0, i1, t);
  82840. - j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
  82841. + _j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
  82842. i0 &= 0xfffff;
  82843. i0 |= 0x100000;
  82844. - result = (j0 < 0 ? 0 : i0 >> (20 - j0));
  82845. + result = (_j0 < 0 ? 0 : i0 >> (20 - _j0));
  82846. }
  82847. - else if (j0 < (int32_t) (8 * sizeof (long long int)) - 1)
  82848. + else if (_j0 < (int32_t) (8 * sizeof (long long int)) - 1)
  82849. {
  82850. - if (j0 >= 52)
  82851. - result = (((long long int) i0 << 32) | i1) << (j0 - 52);
  82852. + if (_j0 >= 52)
  82853. + result = (((long long int) i0 << 32) | i1) << (_j0 - 52);
  82854. else
  82855. {
  82856. w = two52[sx] + x;
  82857. t = w - two52[sx];
  82858. EXTRACT_WORDS (i0, i1, t);
  82859. - j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
  82860. + _j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
  82861. i0 &= 0xfffff;
  82862. i0 |= 0x100000;
  82863. - if (j0 == 20)
  82864. + if (_j0 == 20)
  82865. result = (long long int) i0;
  82866. else
  82867. - result = ((long long int) i0 << (j0 - 20)) | (i1 >> (52 - j0));
  82868. + result = ((long long int) i0 << (_j0 - 20)) | (i1 >> (52 - _j0));
  82869. }
  82870. }
  82871. else
  82872. diff -Nur uClibc-0.9.33.2/libm/s_llround.c uClibc-git/libm/s_llround.c
  82873. --- uClibc-0.9.33.2/libm/s_llround.c 2012-05-15 09:20:09.000000000 +0200
  82874. +++ uClibc-git/libm/s_llround.c 2014-07-25 20:36:07.981340840 +0200
  82875. @@ -14,9 +14,8 @@
  82876. Lesser General Public License for more details.
  82877. You should have received a copy of the GNU Lesser General Public
  82878. - License along with the GNU C Library; if not, write to the Free
  82879. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82880. - 02111-1307 USA. */
  82881. + License along with the GNU C Library; if not, see
  82882. + <http://www.gnu.org/licenses/>. */
  82883. #include <math.h>
  82884. #include "math_private.h"
  82885. @@ -24,42 +23,42 @@
  82886. long long int
  82887. llround (double x)
  82888. {
  82889. - int32_t j0;
  82890. + int32_t _j0;
  82891. u_int32_t i1, i0;
  82892. long long int result;
  82893. int sign;
  82894. EXTRACT_WORDS (i0, i1, x);
  82895. - j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
  82896. + _j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
  82897. sign = (i0 & 0x80000000) != 0 ? -1 : 1;
  82898. i0 &= 0xfffff;
  82899. i0 |= 0x100000;
  82900. - if (j0 < 20)
  82901. + if (_j0 < 20)
  82902. {
  82903. - if (j0 < 0)
  82904. - return j0 < -1 ? 0 : sign;
  82905. + if (_j0 < 0)
  82906. + return _j0 < -1 ? 0 : sign;
  82907. else
  82908. {
  82909. - i0 += 0x80000 >> j0;
  82910. + i0 += 0x80000 >> _j0;
  82911. - result = i0 >> (20 - j0);
  82912. + result = i0 >> (20 - _j0);
  82913. }
  82914. }
  82915. - else if (j0 < (int32_t) (8 * sizeof (long long int)) - 1)
  82916. + else if (_j0 < (int32_t) (8 * sizeof (long long int)) - 1)
  82917. {
  82918. - if (j0 >= 52)
  82919. - result = (((long long int) i0 << 32) | i1) << (j0 - 52);
  82920. + if (_j0 >= 52)
  82921. + result = (((long long int) i0 << 32) | i1) << (_j0 - 52);
  82922. else
  82923. {
  82924. - u_int32_t j = i1 + (0x80000000 >> (j0 - 20));
  82925. + u_int32_t j = i1 + (0x80000000 >> (_j0 - 20));
  82926. if (j < i1)
  82927. ++i0;
  82928. - if (j0 == 20)
  82929. + if (_j0 == 20)
  82930. result = (long long int) i0;
  82931. else
  82932. - result = ((long long int) i0 << (j0 - 20)) | (j >> (52 - j0));
  82933. + result = ((long long int) i0 << (_j0 - 20)) | (j >> (52 - _j0));
  82934. }
  82935. }
  82936. else
  82937. diff -Nur uClibc-0.9.33.2/libm/s_lrint.c uClibc-git/libm/s_lrint.c
  82938. --- uClibc-0.9.33.2/libm/s_lrint.c 2012-05-15 09:20:09.000000000 +0200
  82939. +++ uClibc-git/libm/s_lrint.c 2014-07-25 20:36:07.981340840 +0200
  82940. @@ -15,9 +15,8 @@
  82941. Lesser General Public License for more details.
  82942. You should have received a copy of the GNU Lesser General Public
  82943. - License along with the GNU C Library; if not, write to the Free
  82944. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  82945. - 02111-1307 USA. */
  82946. + License along with the GNU C Library; if not, see
  82947. + <http://www.gnu.org/licenses/>. */
  82948. #include <features.h>
  82949. /* Prevent math.h from defining a colliding inline */
  82950. @@ -35,7 +34,7 @@
  82951. long int
  82952. lrint (double x)
  82953. {
  82954. - int32_t j0;
  82955. + int32_t _j0;
  82956. u_int32_t i0,i1;
  82957. volatile double w;
  82958. double t;
  82959. @@ -43,44 +42,44 @@
  82960. int sx;
  82961. EXTRACT_WORDS (i0, i1, x);
  82962. - j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
  82963. + _j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
  82964. sx = i0 >> 31;
  82965. i0 &= 0xfffff;
  82966. i0 |= 0x100000;
  82967. - if (j0 < 20)
  82968. + if (_j0 < 20)
  82969. {
  82970. - if (j0 < -1)
  82971. + if (_j0 < -1)
  82972. return 0;
  82973. else
  82974. {
  82975. w = two52[sx] + x;
  82976. t = w - two52[sx];
  82977. EXTRACT_WORDS (i0, i1, t);
  82978. - j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
  82979. + _j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
  82980. i0 &= 0xfffff;
  82981. i0 |= 0x100000;
  82982. - result = i0 >> (20 - j0);
  82983. + result = i0 >> (20 - _j0);
  82984. }
  82985. }
  82986. - else if (j0 < (int32_t) (8 * sizeof (long int)) - 1)
  82987. + else if (_j0 < (int32_t) (8 * sizeof (long int)) - 1)
  82988. {
  82989. - if (j0 >= 52)
  82990. - result = ((long int) i0 << (j0 - 20)) | (i1 << (j0 - 52));
  82991. + if (_j0 >= 52)
  82992. + result = ((long int) i0 << (_j0 - 20)) | (i1 << (_j0 - 52));
  82993. else
  82994. {
  82995. w = two52[sx] + x;
  82996. t = w - two52[sx];
  82997. EXTRACT_WORDS (i0, i1, t);
  82998. - j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
  82999. + _j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
  83000. i0 &= 0xfffff;
  83001. i0 |= 0x100000;
  83002. - if (j0 == 20)
  83003. + if (_j0 == 20)
  83004. result = (long int) i0;
  83005. else
  83006. - result = ((long int) i0 << (j0 - 20)) | (i1 >> (52 - j0));
  83007. + result = ((long int) i0 << (_j0 - 20)) | (i1 >> (52 - _j0));
  83008. }
  83009. }
  83010. else
  83011. diff -Nur uClibc-0.9.33.2/libm/s_lround.c uClibc-git/libm/s_lround.c
  83012. --- uClibc-0.9.33.2/libm/s_lround.c 2012-05-15 09:20:09.000000000 +0200
  83013. +++ uClibc-git/libm/s_lround.c 2014-07-25 20:36:07.981340840 +0200
  83014. @@ -14,9 +14,8 @@
  83015. Lesser General Public License for more details.
  83016. You should have received a copy of the GNU Lesser General Public
  83017. - License along with the GNU C Library; if not, write to the Free
  83018. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  83019. - 02111-1307 USA. */
  83020. + License along with the GNU C Library; if not, see
  83021. + <http://www.gnu.org/licenses/>. */
  83022. #include <math.h>
  83023. #include "math_private.h"
  83024. @@ -24,42 +23,42 @@
  83025. long int
  83026. lround (double x)
  83027. {
  83028. - int32_t j0;
  83029. + int32_t _j0;
  83030. u_int32_t i1, i0;
  83031. long int result;
  83032. int sign;
  83033. EXTRACT_WORDS (i0, i1, x);
  83034. - j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
  83035. + _j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
  83036. sign = (i0 & 0x80000000) != 0 ? -1 : 1;
  83037. i0 &= 0xfffff;
  83038. i0 |= 0x100000;
  83039. - if (j0 < 20)
  83040. + if (_j0 < 20)
  83041. {
  83042. - if (j0 < 0)
  83043. - return j0 < -1 ? 0 : sign;
  83044. + if (_j0 < 0)
  83045. + return _j0 < -1 ? 0 : sign;
  83046. else
  83047. {
  83048. - i0 += 0x80000 >> j0;
  83049. + i0 += 0x80000 >> _j0;
  83050. - result = i0 >> (20 - j0);
  83051. + result = i0 >> (20 - _j0);
  83052. }
  83053. }
  83054. - else if (j0 < (int32_t) (8 * sizeof (long int)) - 1)
  83055. + else if (_j0 < (int32_t) (8 * sizeof (long int)) - 1)
  83056. {
  83057. - if (j0 >= 52)
  83058. - result = ((long int) i0 << (j0 - 20)) | (i1 << (j0 - 52));
  83059. + if (_j0 >= 52)
  83060. + result = ((long int) i0 << (_j0 - 20)) | (i1 << (_j0 - 52));
  83061. else
  83062. {
  83063. - u_int32_t j = i1 + (0x80000000 >> (j0 - 20));
  83064. + u_int32_t j = i1 + (0x80000000 >> (_j0 - 20));
  83065. if (j < i1)
  83066. ++i0;
  83067. - if (j0 == 20)
  83068. + if (_j0 == 20)
  83069. result = (long int) i0;
  83070. else
  83071. - result = ((long int) i0 << (j0 - 20)) | (j >> (52 - j0));
  83072. + result = ((long int) i0 << (_j0 - 20)) | (j >> (52 - _j0));
  83073. }
  83074. }
  83075. else
  83076. diff -Nur uClibc-0.9.33.2/libm/s_modf.c uClibc-git/libm/s_modf.c
  83077. --- uClibc-0.9.33.2/libm/s_modf.c 2012-05-15 09:20:09.000000000 +0200
  83078. +++ uClibc-git/libm/s_modf.c 2014-07-25 20:36:07.981340840 +0200
  83079. @@ -26,16 +26,16 @@
  83080. double modf(double x, double *iptr)
  83081. {
  83082. - int32_t i0,i1,j0;
  83083. + int32_t i0,i1,_j0;
  83084. u_int32_t i;
  83085. EXTRACT_WORDS(i0,i1,x);
  83086. - j0 = ((i0>>20)&0x7ff)-0x3ff; /* exponent of x */
  83087. - if(j0<20) { /* integer part in high x */
  83088. - if(j0<0) { /* |x|<1 */
  83089. + _j0 = ((i0>>20)&0x7ff)-0x3ff; /* exponent of x */
  83090. + if(_j0<20) { /* integer part in high x */
  83091. + if(_j0<0) { /* |x|<1 */
  83092. INSERT_WORDS(*iptr,i0&0x80000000,0); /* *iptr = +-0 */
  83093. return x;
  83094. } else {
  83095. - i = (0x000fffff)>>j0;
  83096. + i = (0x000fffff)>>_j0;
  83097. if(((i0&i)|i1)==0) { /* x is integral */
  83098. *iptr = x;
  83099. INSERT_WORDS(x,i0&0x80000000,0); /* return +-0 */
  83100. @@ -45,15 +45,15 @@
  83101. return x - *iptr;
  83102. }
  83103. }
  83104. - } else if (j0>51) { /* no fraction part */
  83105. + } else if (_j0>51) { /* no fraction part */
  83106. *iptr = x*one;
  83107. /* We must handle NaNs separately. */
  83108. - if (j0 == 0x400 && ((i0 & 0xfffff) | i1))
  83109. + if (_j0 == 0x400 && ((i0 & 0xfffff) | i1))
  83110. return x*one;
  83111. INSERT_WORDS(x,i0&0x80000000,0); /* return +-0 */
  83112. return x;
  83113. } else { /* fraction part in low x */
  83114. - i = ((u_int32_t)(0xffffffff))>>(j0-20);
  83115. + i = ((u_int32_t)(0xffffffff))>>(_j0-20);
  83116. if((i1&i)==0) { /* x is integral */
  83117. *iptr = x;
  83118. INSERT_WORDS(x,i0&0x80000000,0); /* return +-0 */
  83119. diff -Nur uClibc-0.9.33.2/libm/s_rint.c uClibc-git/libm/s_rint.c
  83120. --- uClibc-0.9.33.2/libm/s_rint.c 2012-05-15 09:20:09.000000000 +0200
  83121. +++ uClibc-git/libm/s_rint.c 2014-07-25 20:36:07.981340840 +0200
  83122. @@ -30,7 +30,7 @@
  83123. double rint(double x)
  83124. {
  83125. - int32_t i0, j0, sx;
  83126. + int32_t i0, _j0, sx;
  83127. u_int32_t i,i1;
  83128. double t;
  83129. /* We use w = x + 2^52; t = w - 2^52; trick to round x to integer.
  83130. @@ -43,11 +43,11 @@
  83131. EXTRACT_WORDS(i0,i1,x);
  83132. /* Unbiased exponent */
  83133. - j0 = ((((u_int32_t)i0) >> 20)&0x7ff)-0x3ff;
  83134. + _j0 = ((((u_int32_t)i0) >> 20)&0x7ff)-0x3ff;
  83135. - if (j0 > 51) {
  83136. + if (_j0 > 51) {
  83137. //Why bother? Just returning x works too
  83138. - //if (j0 == 0x400) /* inf or NaN */
  83139. + //if (_j0 == 0x400) /* inf or NaN */
  83140. // return x+x;
  83141. return x; /* x is integral */
  83142. }
  83143. @@ -55,8 +55,8 @@
  83144. /* Sign */
  83145. sx = ((u_int32_t)i0) >> 31;
  83146. - if (j0<20) {
  83147. - if (j0<0) { /* |x| < 1 */
  83148. + if (_j0<20) {
  83149. + if (_j0<0) { /* |x| < 1 */
  83150. if (((i0&0x7fffffff)|i1)==0) return x;
  83151. i1 |= (i0&0x0fffff);
  83152. i0 &= 0xfffe0000;
  83153. @@ -68,19 +68,19 @@
  83154. SET_HIGH_WORD(t,(i0&0x7fffffff)|(sx<<31));
  83155. return t;
  83156. } else {
  83157. - i = (0x000fffff)>>j0;
  83158. + i = (0x000fffff)>>_j0;
  83159. if (((i0&i)|i1)==0) return x; /* x is integral */
  83160. i>>=1;
  83161. if (((i0&i)|i1)!=0) {
  83162. - if (j0==19) i1 = 0x40000000;
  83163. - else i0 = (i0&(~i))|((0x20000)>>j0);
  83164. + if (_j0==19) i1 = 0x40000000;
  83165. + else i0 = (i0&(~i))|((0x20000)>>_j0);
  83166. }
  83167. }
  83168. } else {
  83169. - i = ((u_int32_t)(0xffffffff))>>(j0-20);
  83170. + i = ((u_int32_t)(0xffffffff))>>(_j0-20);
  83171. if ((i1&i)==0) return x; /* x is integral */
  83172. i>>=1;
  83173. - if ((i1&i)!=0) i1 = (i1&(~i))|((0x40000000)>>(j0-20));
  83174. + if ((i1&i)!=0) i1 = (i1&(~i))|((0x40000000)>>(_j0-20));
  83175. }
  83176. INSERT_WORDS(x,i0,i1);
  83177. w = TWO52[sx]+x;
  83178. diff -Nur uClibc-0.9.33.2/libm/s_round.c uClibc-git/libm/s_round.c
  83179. --- uClibc-0.9.33.2/libm/s_round.c 2012-05-15 09:20:09.000000000 +0200
  83180. +++ uClibc-git/libm/s_round.c 2014-07-25 20:36:07.985340862 +0200
  83181. @@ -14,9 +14,8 @@
  83182. Lesser General Public License for more details.
  83183. You should have received a copy of the GNU Lesser General Public
  83184. - License along with the GNU C Library; if not, write to the Free
  83185. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  83186. - 02111-1307 USA. */
  83187. + License along with the GNU C Library; if not, see
  83188. + <http://www.gnu.org/licenses/>. */
  83189. #include <math.h>
  83190. #include "math_private.h"
  83191. @@ -26,41 +25,41 @@
  83192. double
  83193. round (double x)
  83194. {
  83195. - int32_t i0, j0;
  83196. + int32_t i0, _j0;
  83197. u_int32_t i1;
  83198. EXTRACT_WORDS (i0, i1, x);
  83199. - j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
  83200. - if (j0 < 20)
  83201. + _j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
  83202. + if (_j0 < 20)
  83203. {
  83204. - if (j0 < 0)
  83205. + if (_j0 < 0)
  83206. {
  83207. if (huge + x > 0.0)
  83208. {
  83209. i0 &= 0x80000000;
  83210. - if (j0 == -1)
  83211. + if (_j0 == -1)
  83212. i0 |= 0x3ff00000;
  83213. i1 = 0;
  83214. }
  83215. }
  83216. else
  83217. {
  83218. - u_int32_t i = 0x000fffff >> j0;
  83219. + u_int32_t i = 0x000fffff >> _j0;
  83220. if (((i0 & i) | i1) == 0)
  83221. /* X is integral. */
  83222. return x;
  83223. if (huge + x > 0.0)
  83224. {
  83225. /* Raise inexact if x != 0. */
  83226. - i0 += 0x00080000 >> j0;
  83227. + i0 += 0x00080000 >> _j0;
  83228. i0 &= ~i;
  83229. i1 = 0;
  83230. }
  83231. }
  83232. }
  83233. - else if (j0 > 51)
  83234. + else if (_j0 > 51)
  83235. {
  83236. - if (j0 == 0x400)
  83237. + if (_j0 == 0x400)
  83238. /* Inf or NaN. */
  83239. return x + x;
  83240. else
  83241. @@ -68,7 +67,7 @@
  83242. }
  83243. else
  83244. {
  83245. - u_int32_t i = 0xffffffff >> (j0 - 20);
  83246. + u_int32_t i = 0xffffffff >> (_j0 - 20);
  83247. if ((i1 & i) == 0)
  83248. /* X is integral. */
  83249. return x;
  83250. @@ -76,7 +75,7 @@
  83251. if (huge + x > 0.0)
  83252. {
  83253. /* Raise inexact if x != 0. */
  83254. - u_int32_t j = i1 + (1 << (51 - j0));
  83255. + u_int32_t j = i1 + (1 << (51 - _j0));
  83256. if (j < i1)
  83257. i0 += 1;
  83258. i1 = j;
  83259. diff -Nur uClibc-0.9.33.2/libm/s_scalbn.c uClibc-git/libm/s_scalbn.c
  83260. --- uClibc-0.9.33.2/libm/s_scalbn.c 2012-05-15 09:20:09.000000000 +0200
  83261. +++ uClibc-git/libm/s_scalbn.c 2014-07-25 20:36:07.985340862 +0200
  83262. @@ -62,12 +62,7 @@
  83263. libm_hidden_def(scalbln)
  83264. #if LONG_MAX == INT_MAX
  83265. -/* strong_alias(scalbln, scalbn) - "error: conflicting types for 'scalbn'"
  83266. - * because it tries to declare "typeof(scalbln) scalbn;"
  83267. - * which tries to give "long" parameter to scalbn.
  83268. - * Doing it by hand:
  83269. - */
  83270. -__typeof(scalbn) scalbn __attribute__((alias("scalbln")));
  83271. +strong_alias_untyped(scalbln,scalbn)
  83272. #else
  83273. double scalbn(double x, int n)
  83274. {
  83275. diff -Nur uClibc-0.9.33.2/libm/s_signbit.c uClibc-git/libm/s_signbit.c
  83276. --- uClibc-0.9.33.2/libm/s_signbit.c 2012-05-15 09:20:09.000000000 +0200
  83277. +++ uClibc-git/libm/s_signbit.c 2014-07-25 20:36:07.985340862 +0200
  83278. @@ -14,9 +14,8 @@
  83279. Lesser General Public License for more details.
  83280. You should have received a copy of the GNU Lesser General Public
  83281. - License along with the GNU C Library; if not, write to the Free
  83282. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  83283. - 02111-1307 USA. */
  83284. + License along with the GNU C Library; if not, see
  83285. + <http://www.gnu.org/licenses/>. */
  83286. #include <features.h>
  83287. /* Prevent math.h from defining a colliding inline */
  83288. diff -Nur uClibc-0.9.33.2/libm/s_signbitf.c uClibc-git/libm/s_signbitf.c
  83289. --- uClibc-0.9.33.2/libm/s_signbitf.c 2012-05-15 09:20:09.000000000 +0200
  83290. +++ uClibc-git/libm/s_signbitf.c 2014-07-25 20:36:07.985340862 +0200
  83291. @@ -14,9 +14,8 @@
  83292. Lesser General Public License for more details.
  83293. You should have received a copy of the GNU Lesser General Public
  83294. - License along with the GNU C Library; if not, write to the Free
  83295. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  83296. - 02111-1307 USA. */
  83297. + License along with the GNU C Library; if not, see
  83298. + <http://www.gnu.org/licenses/>. */
  83299. #include <features.h>
  83300. /* Prevent math.h from defining a colliding inline */
  83301. diff -Nur uClibc-0.9.33.2/libm/s_significand.c uClibc-git/libm/s_significand.c
  83302. --- uClibc-0.9.33.2/libm/s_significand.c 2012-05-15 09:20:09.000000000 +0200
  83303. +++ uClibc-git/libm/s_significand.c 2014-07-25 20:36:07.985340862 +0200
  83304. @@ -22,3 +22,4 @@
  83305. {
  83306. return __ieee754_scalb(x,(double) -ilogb(x));
  83307. }
  83308. +libm_hidden_def(significand)
  83309. diff -Nur uClibc-0.9.33.2/libm/s_trunc.c uClibc-git/libm/s_trunc.c
  83310. --- uClibc-0.9.33.2/libm/s_trunc.c 2012-05-15 09:20:09.000000000 +0200
  83311. +++ uClibc-git/libm/s_trunc.c 2014-07-25 20:36:07.985340862 +0200
  83312. @@ -14,9 +14,8 @@
  83313. Lesser General Public License for more details.
  83314. You should have received a copy of the GNU Lesser General Public
  83315. - License along with the GNU C Library; if not, write to the Free
  83316. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  83317. - 02111-1307 USA. */
  83318. + License along with the GNU C Library; if not, see
  83319. + <http://www.gnu.org/licenses/>. */
  83320. #include <math.h>
  83321. #include "math_private.h"
  83322. @@ -24,30 +23,30 @@
  83323. double
  83324. trunc (double x)
  83325. {
  83326. - int32_t i0, j0;
  83327. + int32_t i0, _j0;
  83328. u_int32_t i1;
  83329. int sx;
  83330. EXTRACT_WORDS (i0, i1, x);
  83331. sx = i0 & 0x80000000;
  83332. - j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
  83333. - if (j0 < 20)
  83334. + _j0 = ((i0 >> 20) & 0x7ff) - 0x3ff;
  83335. + if (_j0 < 20)
  83336. {
  83337. - if (j0 < 0)
  83338. + if (_j0 < 0)
  83339. /* The magnitude of the number is < 1 so the result is +-0. */
  83340. INSERT_WORDS (x, sx, 0);
  83341. else
  83342. - INSERT_WORDS (x, sx | (i0 & ~(0x000fffff >> j0)), 0);
  83343. + INSERT_WORDS (x, sx | (i0 & ~(0x000fffff >> _j0)), 0);
  83344. }
  83345. - else if (j0 > 51)
  83346. + else if (_j0 > 51)
  83347. {
  83348. - if (j0 == 0x400)
  83349. + if (_j0 == 0x400)
  83350. /* x is inf or NaN. */
  83351. return x + x;
  83352. }
  83353. else
  83354. {
  83355. - INSERT_WORDS (x, i0, i1 & ~(0xffffffffu >> (j0 - 20)));
  83356. + INSERT_WORDS (x, i0, i1 & ~(0xffffffffu >> (_j0 - 20)));
  83357. }
  83358. return x;
  83359. diff -Nur uClibc-0.9.33.2/libnsl/nsl.c uClibc-git/libnsl/nsl.c
  83360. --- uClibc-0.9.33.2/libnsl/nsl.c 2012-05-15 09:20:09.000000000 +0200
  83361. +++ uClibc-git/libnsl/nsl.c 2014-07-25 20:36:08.001340946 +0200
  83362. @@ -7,8 +7,6 @@
  83363. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  83364. */
  83365. -#include <features.h>
  83366. -
  83367. void __stub2(void);
  83368. void __stub2(void)
  83369. {
  83370. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/alloca_cutoff.c uClibc-git/libpthread/linuxthreads/alloca_cutoff.c
  83371. --- uClibc-0.9.33.2/libpthread/linuxthreads/alloca_cutoff.c 2012-05-15 09:20:09.000000000 +0200
  83372. +++ uClibc-git/libpthread/linuxthreads/alloca_cutoff.c 2014-07-25 20:36:08.193341950 +0200
  83373. @@ -13,9 +13,8 @@
  83374. Lesser General Public License for more details.
  83375. You should have received a copy of the GNU Lesser General Public
  83376. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  83377. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  83378. - Boston, MA 02111-1307, USA. */
  83379. + License along with the GNU C Library; see the file COPYING.LIB. If
  83380. + not, see <http://www.gnu.org/licenses/>. */
  83381. #include <alloca.h>
  83382. #include <stdlib.h>
  83383. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/attr.c uClibc-git/libpthread/linuxthreads/attr.c
  83384. --- uClibc-0.9.33.2/libpthread/linuxthreads/attr.c 2012-05-15 09:20:09.000000000 +0200
  83385. +++ uClibc-git/libpthread/linuxthreads/attr.c 2014-07-25 20:36:08.193341950 +0200
  83386. @@ -361,7 +361,7 @@
  83387. attr->__scope = PTHREAD_SCOPE_SYSTEM;
  83388. #ifdef _STACK_GROWS_DOWN
  83389. -# ifdef USE_TLS
  83390. +# ifdef __UCLIBC_HAS_TLS__
  83391. attr->__stacksize = descr->p_stackaddr - (char *)descr->p_guardaddr
  83392. - descr->p_guardsize;
  83393. # else
  83394. @@ -369,7 +369,7 @@
  83395. - descr->p_guardsize;
  83396. # endif
  83397. #else
  83398. -# ifdef USE_TLS
  83399. +# ifdef __UCLIBC_HAS_TLS__
  83400. attr->__stacksize = (char *)descr->p_guardaddr - descr->p_stackaddr;
  83401. # else
  83402. attr->__stacksize = (char *)descr->p_guardaddr - (char *)descr;
  83403. @@ -385,7 +385,7 @@
  83404. otherwise the range of the stack area cannot be computed. */
  83405. attr->__stacksize += attr->__guardsize;
  83406. #endif
  83407. -#ifdef USE_TLS
  83408. +#ifdef __UCLIBC_HAS_TLS__
  83409. attr->__stackaddr = descr->p_stackaddr;
  83410. #else
  83411. # ifndef _STACK_GROWS_UP
  83412. @@ -395,7 +395,7 @@
  83413. # endif
  83414. #endif
  83415. -#ifdef USE_TLS
  83416. +#ifdef __UCLIBC_HAS_TLS__
  83417. if (attr->__stackaddr == NULL)
  83418. #else
  83419. if (descr == &__pthread_initial_thread)
  83420. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/barrier.c uClibc-git/libpthread/linuxthreads/barrier.c
  83421. --- uClibc-0.9.33.2/libpthread/linuxthreads/barrier.c 2012-05-15 09:20:09.000000000 +0200
  83422. +++ uClibc-git/libpthread/linuxthreads/barrier.c 2014-07-25 20:36:08.193341950 +0200
  83423. @@ -14,9 +14,8 @@
  83424. Lesser General Public License for more details.
  83425. You should have received a copy of the GNU Lesser General Public
  83426. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  83427. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  83428. - Boston, MA 02111-1307, USA. */
  83429. + License along with the GNU C Library; see the file COPYING.LIB. If
  83430. + not, see <http://www.gnu.org/licenses/>. */
  83431. #include <errno.h>
  83432. #include "pthread.h"
  83433. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/cancel.c uClibc-git/libpthread/linuxthreads/cancel.c
  83434. --- uClibc-0.9.33.2/libpthread/linuxthreads/cancel.c 2012-05-15 09:20:09.000000000 +0200
  83435. +++ uClibc-git/libpthread/linuxthreads/cancel.c 2014-07-25 20:36:08.193341950 +0200
  83436. @@ -15,7 +15,6 @@
  83437. /* Thread cancellation */
  83438. #include <errno.h>
  83439. -#include <libc-internal.h>
  83440. #include "pthread.h"
  83441. #include "internals.h"
  83442. #include "spinlock.h"
  83443. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/.cvsignore uClibc-git/libpthread/linuxthreads/.cvsignore
  83444. --- uClibc-0.9.33.2/libpthread/linuxthreads/.cvsignore 2012-05-15 09:20:09.000000000 +0200
  83445. +++ uClibc-git/libpthread/linuxthreads/.cvsignore 1970-01-01 01:00:00.000000000 +0100
  83446. @@ -1,3 +0,0 @@
  83447. -.cvsignore
  83448. -*.os
  83449. -Makefile.in
  83450. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/descr.h uClibc-git/libpthread/linuxthreads/descr.h
  83451. --- uClibc-0.9.33.2/libpthread/linuxthreads/descr.h 2012-05-15 09:20:09.000000000 +0200
  83452. +++ uClibc-git/libpthread/linuxthreads/descr.h 2014-07-25 20:36:08.193341950 +0200
  83453. @@ -23,7 +23,7 @@
  83454. #include <stdint.h>
  83455. #include <sys/types.h>
  83456. #include <hp-timing.h>
  83457. -#ifdef USE_TLS
  83458. +#ifdef __UCLIBC_HAS_TLS__
  83459. #include <tls.h>
  83460. #endif
  83461. #include "uClibc-glue.h"
  83462. @@ -112,7 +112,7 @@
  83463. struct _pthread_descr_struct
  83464. {
  83465. -#if !defined USE_TLS || !TLS_DTV_AT_TP || INCLUDE_TLS_PADDING
  83466. +#if !defined __UCLIBC_HAS_TLS__ || !TLS_DTV_AT_TP || INCLUDE_TLS_PADDING
  83467. /* This overlaps tcbhead_t (see tls.h), as used for TLS without threads. */
  83468. union
  83469. {
  83470. @@ -157,7 +157,7 @@
  83471. char p_sigwaiting; /* true if a sigwait() is in progress */
  83472. struct pthread_start_args p_start_args; /* arguments for thread creation */
  83473. void ** p_specific[PTHREAD_KEY_1STLEVEL_SIZE]; /* thread-specific data */
  83474. -#if !(USE_TLS && HAVE___THREAD)
  83475. +#ifndef __UCLIBC_HAS_TLS__
  83476. void * p_libc_specific[_LIBC_TSD_KEY_N]; /* thread-specific data for libc */
  83477. int * p_errnop; /* pointer to used errno variable */
  83478. int p_errno; /* error returned by last system call */
  83479. @@ -185,7 +185,7 @@
  83480. #if HP_TIMING_AVAIL
  83481. hp_timing_t p_cpuclock_offset; /* Initial CPU clock for thread. */
  83482. #endif
  83483. -#ifdef USE_TLS
  83484. +#ifdef __UCLIBC_HAS_TLS__
  83485. char *p_stackaddr; /* Stack address. */
  83486. #endif
  83487. size_t p_alloca_cutoff; /* Maximum size which should be allocated
  83488. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/errno.c uClibc-git/libpthread/linuxthreads/errno.c
  83489. --- uClibc-0.9.33.2/libpthread/linuxthreads/errno.c 2012-05-15 09:20:09.000000000 +0200
  83490. +++ uClibc-git/libpthread/linuxthreads/errno.c 2014-07-25 20:36:08.193341950 +0200
  83491. @@ -20,7 +20,7 @@
  83492. #include "pthread.h"
  83493. #include "internals.h"
  83494. -#if !USE_TLS || !HAVE___THREAD
  83495. +#ifndef __UCLIBC_HAS_TLS__
  83496. /* The definition in libc is sufficient if we use TLS. */
  83497. int *
  83498. __errno_location (void)
  83499. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/events.c uClibc-git/libpthread/linuxthreads/events.c
  83500. --- uClibc-0.9.33.2/libpthread/linuxthreads/events.c 2012-05-15 09:20:09.000000000 +0200
  83501. +++ uClibc-git/libpthread/linuxthreads/events.c 2014-07-25 20:36:08.193341950 +0200
  83502. @@ -13,9 +13,8 @@
  83503. Lesser General Public License for more details.
  83504. You should have received a copy of the GNU Lesser General Public
  83505. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  83506. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  83507. - Boston, MA 02111-1307, USA. */
  83508. + License along with the GNU C Library; see the file COPYING.LIB. If
  83509. + not, see <http://www.gnu.org/licenses/>. */
  83510. /* The functions contained here do nothing, they just return. */
  83511. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/forward.c uClibc-git/libpthread/linuxthreads/forward.c
  83512. --- uClibc-0.9.33.2/libpthread/linuxthreads/forward.c 2012-05-15 09:20:09.000000000 +0200
  83513. +++ uClibc-git/libpthread/linuxthreads/forward.c 2014-07-25 20:36:08.193341950 +0200
  83514. @@ -13,9 +13,8 @@
  83515. Lesser General Public License for more details.
  83516. You should have received a copy of the GNU Lesser General Public
  83517. - License along with the GNU C Library; if not, write to the Free
  83518. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  83519. - 02111-1307 USA. */
  83520. + License along with the GNU C Library; if not, see
  83521. + <http://www.gnu.org/licenses/>. */
  83522. #include <features.h>
  83523. #include <stdlib.h>
  83524. @@ -26,7 +25,7 @@
  83525. #include "internals.h"
  83526. /* Pointers to the libc functions. */
  83527. -struct pthread_functions __libc_pthread_functions attribute_hidden;
  83528. +struct pthread_functions __libc_pthread_functions;
  83529. # define FORWARD2(name, rettype, decl, params, defaction) \
  83530. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/internals.h uClibc-git/libpthread/linuxthreads/internals.h
  83531. --- uClibc-0.9.33.2/libpthread/linuxthreads/internals.h 2012-05-15 09:20:09.000000000 +0200
  83532. +++ uClibc-git/libpthread/linuxthreads/internals.h 2014-07-25 20:36:08.193341950 +0200
  83533. @@ -30,7 +30,7 @@
  83534. #include <bits/sigcontextinfo.h>
  83535. #include <bits/pthreadtypes.h>
  83536. -#ifdef USE_TLS
  83537. +#ifdef __UCLIBC_HAS_TLS__
  83538. #include <tls.h>
  83539. #endif
  83540. #include "descr.h"
  83541. @@ -200,19 +200,17 @@
  83542. /* The page size we can get from the system. This should likely not be
  83543. changed by the machine file but, you never know. */
  83544. -#ifndef PAGE_SIZE
  83545. -#define PAGE_SIZE (sysconf (_SC_PAGE_SIZE))
  83546. -#endif
  83547. +#define __PAGE_SIZE (sysconf (_SC_PAGESIZE))
  83548. -/* The initial size of the thread stack. Must be a multiple of PAGE_SIZE. */
  83549. +/* The initial size of the thread stack. Must be a multiple of __PAGE_SIZE. */
  83550. #ifndef INITIAL_STACK_SIZE
  83551. -#define INITIAL_STACK_SIZE (4 * PAGE_SIZE)
  83552. +#define INITIAL_STACK_SIZE (4 * __PAGE_SIZE)
  83553. #endif
  83554. /* Size of the thread manager stack. The "- 32" avoids wasting space
  83555. with some malloc() implementations. */
  83556. #ifndef THREAD_MANAGER_STACK_SIZE
  83557. -#define THREAD_MANAGER_STACK_SIZE (2 * PAGE_SIZE - 32)
  83558. +#define THREAD_MANAGER_STACK_SIZE (2 * __PAGE_SIZE - 32)
  83559. #endif
  83560. /* The base of the "array" of thread stacks. The array will grow down from
  83561. @@ -285,7 +283,7 @@
  83562. extern void __pthread_perform_cleanup (char *currentframe);
  83563. extern void __pthread_init_max_stacksize (void);
  83564. extern int __pthread_initialize_manager (void);
  83565. -extern void __pthread_message (const char * fmt, ...);
  83566. +extern void __pthread_message (const char * fmt, ...) attribute_hidden;
  83567. extern int __pthread_manager (void *reqfd);
  83568. extern int __pthread_manager_event (void *reqfd);
  83569. extern void __pthread_manager_sighandler (int sig);
  83570. @@ -347,7 +345,7 @@
  83571. int *__kind);
  83572. extern void __pthread_kill_other_threads_np (void);
  83573. extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
  83574. - __const pthread_mutexattr_t *__mutex_attr);
  83575. + const pthread_mutexattr_t *__mutex_attr);
  83576. extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
  83577. extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
  83578. extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex);
  83579. @@ -393,14 +391,14 @@
  83580. extern void __pthread_sigsuspend (const sigset_t *mask) attribute_hidden;
  83581. extern int __pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
  83582. - __const struct timespec *__restrict
  83583. + const struct timespec *__restrict
  83584. __abstime);
  83585. extern int __pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
  83586. - __const struct timespec *__restrict
  83587. + const struct timespec *__restrict
  83588. __abstime);
  83589. extern int __pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr);
  83590. -extern int __pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
  83591. +extern int __pthread_barrierattr_getpshared (const pthread_barrierattr_t *
  83592. __restrict __attr,
  83593. int *__restrict __pshared);
  83594. @@ -440,10 +438,12 @@
  83595. extern void __pthread_initialize (void);
  83596. /* TSD. */
  83597. +#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__
  83598. extern int __pthread_internal_tsd_set (int key, const void * pointer);
  83599. extern void * __pthread_internal_tsd_get (int key);
  83600. extern void ** __attribute__ ((__const__))
  83601. __pthread_internal_tsd_address (int key);
  83602. +#endif
  83603. /* Sighandler wrappers. */
  83604. extern void __pthread_sighandler(int signo, SIGCONTEXT ctx);
  83605. @@ -508,8 +508,6 @@
  83606. # define LIBC_CANCEL_HANDLED() /* Nothing. */
  83607. #endif
  83608. -extern int * __libc_pthread_init (const struct pthread_functions *functions);
  83609. -
  83610. #if !defined NOT_IN_libc && !defined FLOATING_STACKS
  83611. # ifdef SHARED
  83612. # define thread_self() \
  83613. @@ -520,7 +518,7 @@
  83614. # endif
  83615. #endif
  83616. -#ifndef USE_TLS
  83617. +#ifndef __UCLIBC_HAS_TLS__
  83618. # define __manager_thread (&__pthread_manager_thread)
  83619. #else
  83620. # define __manager_thread __pthread_manager_threadp
  83621. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/libc-cancellation.c uClibc-git/libpthread/linuxthreads/libc-cancellation.c
  83622. --- uClibc-0.9.33.2/libpthread/linuxthreads/libc-cancellation.c 2012-05-15 09:20:09.000000000 +0200
  83623. +++ uClibc-git/libpthread/linuxthreads/libc-cancellation.c 2014-07-25 20:36:08.193341950 +0200
  83624. @@ -13,9 +13,8 @@
  83625. Lesser General Public License for more details.
  83626. You should have received a copy of the GNU Lesser General Public
  83627. - License along with the GNU C Library; if not, write to the Free
  83628. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  83629. - 02111-1307 USA. */
  83630. + License along with the GNU C Library; if not, see
  83631. + <http://www.gnu.org/licenses/>. */
  83632. #include <errno.h>
  83633. #include <rpc/rpc.h>
  83634. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/libc_pthread_init.c uClibc-git/libpthread/linuxthreads/libc_pthread_init.c
  83635. --- uClibc-0.9.33.2/libpthread/linuxthreads/libc_pthread_init.c 2012-05-15 09:20:09.000000000 +0200
  83636. +++ uClibc-git/libpthread/linuxthreads/libc_pthread_init.c 2014-07-25 20:36:08.193341950 +0200
  83637. @@ -13,14 +13,13 @@
  83638. Lesser General Public License for more details.
  83639. You should have received a copy of the GNU Lesser General Public
  83640. - License along with the GNU C Library; if not, write to the Free
  83641. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  83642. - 02111-1307 USA. */
  83643. + License along with the GNU C Library; if not, see
  83644. + <http://www.gnu.org/licenses/>. */
  83645. #include <locale.h>
  83646. #include <stdlib.h>
  83647. #include <string.h>
  83648. -#ifdef USE_TLS
  83649. +#ifdef __UCLIBC_HAS_TLS__
  83650. #include <tls.h>
  83651. #endif
  83652. #include "internals.h"
  83653. @@ -31,8 +30,7 @@
  83654. int *
  83655. -__libc_pthread_init (functions)
  83656. - const struct pthread_functions *functions;
  83657. +__libc_pthread_init(const struct pthread_functions *functions)
  83658. {
  83659. #ifdef SHARED
  83660. /* We copy the content of the variable pointed to by the FUNCTIONS
  83661. @@ -42,7 +40,7 @@
  83662. sizeof (__libc_pthread_functions));
  83663. #endif
  83664. -#if !(USE_TLS && HAVE___THREAD)
  83665. +#ifndef __UCLIBC_HAS_TLS__
  83666. /* Initialize thread-locale current locale to point to the global one.
  83667. With __thread support, the variable's initializer takes care of this. */
  83668. __uselocale (LC_GLOBAL_LOCALE);
  83669. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/lockfile.c uClibc-git/libpthread/linuxthreads/lockfile.c
  83670. --- uClibc-0.9.33.2/libpthread/linuxthreads/lockfile.c 2012-05-15 09:20:09.000000000 +0200
  83671. +++ uClibc-git/libpthread/linuxthreads/lockfile.c 2014-07-25 20:36:08.193341950 +0200
  83672. @@ -13,9 +13,8 @@
  83673. Lesser General Public License for more details.
  83674. You should have received a copy of the GNU Lesser General Public
  83675. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  83676. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  83677. - Boston, MA 02111-1307, USA. */
  83678. + License along with the GNU C Library; see the file COPYING.LIB. If
  83679. + not, see <http://www.gnu.org/licenses/>. */
  83680. #include <bits/libc-lock.h>
  83681. #include <stdio.h>
  83682. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/manager.c uClibc-git/libpthread/linuxthreads/manager.c
  83683. --- uClibc-0.9.33.2/libpthread/linuxthreads/manager.c 2012-05-15 09:20:09.000000000 +0200
  83684. +++ uClibc-git/libpthread/linuxthreads/manager.c 2014-07-25 20:36:08.193341950 +0200
  83685. @@ -126,7 +126,7 @@
  83686. #ifdef INIT_THREAD_SELF
  83687. INIT_THREAD_SELF(self, 1);
  83688. #endif
  83689. -#if !(USE_TLS && HAVE___THREAD)
  83690. +#ifndef __UCLIBC_HAS_TLS__
  83691. /* Set the error variable. */
  83692. self->p_errnop = &self->p_errno;
  83693. self->p_h_errnop = &self->p_h_errno;
  83694. @@ -289,7 +289,7 @@
  83695. __sched_setscheduler(THREAD_GETMEM(self, p_pid),
  83696. SCHED_OTHER, &default_params);
  83697. }
  83698. -#if !(USE_TLS && HAVE___THREAD)
  83699. +#ifndef __UCLIBC_HAS_TLS__
  83700. /* Initialize thread-locale current locale to point to the global one.
  83701. With __thread support, the variable's initializer takes care of this. */
  83702. __uselocale (LC_GLOBAL_LOCALE);
  83703. @@ -333,7 +333,7 @@
  83704. pthread_start_thread (arg);
  83705. }
  83706. -#if defined USE_TLS && !FLOATING_STACKS
  83707. +#if defined __UCLIBC_HAS_TLS__ && !FLOATING_STACKS
  83708. # error "TLS can only work with floating stacks"
  83709. #endif
  83710. @@ -351,7 +351,7 @@
  83711. char * guardaddr;
  83712. size_t stacksize, guardsize;
  83713. -#ifdef USE_TLS
  83714. +#ifdef __UCLIBC_HAS_TLS__
  83715. /* TLS cannot work with fixed thread descriptor addresses. */
  83716. assert (default_new_thread == NULL);
  83717. #endif
  83718. @@ -360,7 +360,7 @@
  83719. {
  83720. #ifdef _STACK_GROWS_UP
  83721. /* The user provided a stack. */
  83722. -# ifdef USE_TLS
  83723. +# ifdef __UCLIBC_HAS_TLS__
  83724. /* This value is not needed. */
  83725. new_thread = (pthread_descr) attr->__stackaddr;
  83726. new_thread_bottom = (char *) new_thread;
  83727. @@ -381,7 +381,7 @@
  83728. addresses, stackaddr would be the lowest address in the stack
  83729. segment, so that it is consistently close to the initial sp
  83730. value. */
  83731. -# ifdef USE_TLS
  83732. +# ifdef __UCLIBC_HAS_TLS__
  83733. new_thread = (pthread_descr) attr->__stackaddr;
  83734. # else
  83735. new_thread =
  83736. @@ -394,7 +394,7 @@
  83737. #ifndef THREAD_SELF
  83738. __pthread_nonstandard_stacks = 1;
  83739. #endif
  83740. -#ifndef USE_TLS
  83741. +#ifndef __UCLIBC_HAS_TLS__
  83742. /* Clear the thread data structure. */
  83743. memset (new_thread, '\0', sizeof (*new_thread));
  83744. #endif
  83745. @@ -438,7 +438,7 @@
  83746. mprotect (guardaddr, guardsize, PROT_NONE);
  83747. new_thread_bottom = (char *) map_addr;
  83748. -# ifdef USE_TLS
  83749. +# ifdef __UCLIBC_HAS_TLS__
  83750. new_thread = ((pthread_descr) (new_thread_bottom + stacksize
  83751. + guardsize));
  83752. # else
  83753. @@ -451,7 +451,7 @@
  83754. mprotect (guardaddr, guardsize, PROT_NONE);
  83755. new_thread_bottom = (char *) map_addr + guardsize;
  83756. -# ifdef USE_TLS
  83757. +# ifdef __UCLIBC_HAS_TLS__
  83758. new_thread = ((pthread_descr) (new_thread_bottom + stacksize));
  83759. # else
  83760. new_thread = ((pthread_descr) (new_thread_bottom + stacksize)) - 1;
  83761. @@ -462,7 +462,7 @@
  83762. mprotect (guardaddr, guardsize, PROT_NONE);
  83763. new_thread = (pthread_descr) map_addr;
  83764. -# ifdef USE_TLS
  83765. +# ifdef __UCLIBC_HAS_TLS__
  83766. new_thread_bottom = (char *) new_thread;
  83767. # else
  83768. new_thread_bottom = (char *) (new_thread + 1);
  83769. @@ -597,7 +597,7 @@
  83770. int pagesize = __getpagesize();
  83771. int saved_errno = 0;
  83772. -#ifdef USE_TLS
  83773. +#ifdef __UCLIBC_HAS_TLS__
  83774. new_thread = _dl_allocate_tls (NULL);
  83775. if (new_thread == NULL)
  83776. return EAGAIN;
  83777. @@ -621,7 +621,7 @@
  83778. {
  83779. if (sseg >= PTHREAD_THREADS_MAX)
  83780. {
  83781. -#ifdef USE_TLS
  83782. +#ifdef __UCLIBC_HAS_TLS__
  83783. # if defined(TLS_DTV_AT_TP)
  83784. new_thread = (pthread_descr) ((char *) new_thread + TLS_PRE_TCB_SIZE);
  83785. # endif
  83786. @@ -635,7 +635,7 @@
  83787. pagesize, &stack_addr, &new_thread_bottom,
  83788. &guardaddr, &guardsize, &stksize) == 0)
  83789. {
  83790. -#ifdef USE_TLS
  83791. +#ifdef __UCLIBC_HAS_TLS__
  83792. new_thread->p_stackaddr = stack_addr;
  83793. #else
  83794. new_thread = (pthread_descr) stack_addr;
  83795. @@ -657,18 +657,18 @@
  83796. new_thread_id = sseg + pthread_threads_counter;
  83797. /* Initialize the thread descriptor. Elements which have to be
  83798. initialized to zero already have this value. */
  83799. -#if !defined USE_TLS || !TLS_DTV_AT_TP
  83800. +#if !defined __UCLIBC_HAS_TLS__ || !TLS_DTV_AT_TP
  83801. new_thread->p_header.data.tcb = new_thread;
  83802. new_thread->p_header.data.self = new_thread;
  83803. #endif
  83804. -#if TLS_MULTIPLE_THREADS_IN_TCB || !defined USE_TLS || !TLS_DTV_AT_TP
  83805. +#if TLS_MULTIPLE_THREADS_IN_TCB || !defined __UCLIBC_HAS_TLS__ || !TLS_DTV_AT_TP
  83806. new_thread->p_multiple_threads = 1;
  83807. #endif
  83808. new_thread->p_tid = new_thread_id;
  83809. new_thread->p_lock = &(__pthread_handles[sseg].h_lock);
  83810. new_thread->p_cancelstate = PTHREAD_CANCEL_ENABLE;
  83811. new_thread->p_canceltype = PTHREAD_CANCEL_DEFERRED;
  83812. -#if !(USE_TLS && HAVE___THREAD)
  83813. +#ifndef __UCLIBC_HAS_TLS__
  83814. new_thread->p_errnop = &new_thread->p_errno;
  83815. new_thread->p_h_errnop = &new_thread->p_h_errno;
  83816. new_thread->p_resp = &new_thread->p_res;
  83817. @@ -807,7 +807,7 @@
  83818. munmap((caddr_t)new_thread_bottom,
  83819. 2 * stacksize + new_thread->p_guardsize);
  83820. #elif defined _STACK_GROWS_UP
  83821. -# ifdef USE_TLS
  83822. +# ifdef __UCLIBC_HAS_TLS__
  83823. size_t stacksize = guardaddr - stack_addr;
  83824. munmap(stack_addr, stacksize + guardsize);
  83825. # else
  83826. @@ -815,7 +815,7 @@
  83827. munmap(new_thread, stacksize + guardsize);
  83828. # endif
  83829. #else
  83830. -# ifdef USE_TLS
  83831. +# ifdef __UCLIBC_HAS_TLS__
  83832. size_t stacksize = stack_addr - new_thread_bottom;
  83833. # else
  83834. size_t stacksize = (char *)(new_thread+1) - new_thread_bottom;
  83835. @@ -823,7 +823,7 @@
  83836. munmap(new_thread_bottom - guardsize, guardsize + stacksize);
  83837. #endif
  83838. }
  83839. -#ifdef USE_TLS
  83840. +#ifdef __UCLIBC_HAS_TLS__
  83841. # if defined(TLS_DTV_AT_TP)
  83842. new_thread = (pthread_descr) ((char *) new_thread + TLS_PRE_TCB_SIZE);
  83843. # endif
  83844. @@ -890,7 +890,7 @@
  83845. /* Free the stack and thread descriptor area */
  83846. char *guardaddr = th->p_guardaddr;
  83847. #ifdef _STACK_GROWS_UP
  83848. -# ifdef USE_TLS
  83849. +# ifdef __UCLIBC_HAS_TLS__
  83850. size_t stacksize = guardaddr - th->p_stackaddr;
  83851. guardaddr = th->p_stackaddr;
  83852. # else
  83853. @@ -900,7 +900,7 @@
  83854. #else
  83855. /* Guardaddr is always set, even if guardsize is 0. This allows
  83856. us to compute everything else. */
  83857. -# ifdef USE_TLS
  83858. +# ifdef __UCLIBC_HAS_TLS__
  83859. size_t stacksize = th->p_stackaddr - guardaddr - guardsize;
  83860. # else
  83861. size_t stacksize = (char *)(th+1) - guardaddr - guardsize;
  83862. @@ -916,7 +916,7 @@
  83863. }
  83864. -#ifdef USE_TLS
  83865. +#ifdef __UCLIBC_HAS_TLS__
  83866. # if defined(TLS_DTV_AT_TP)
  83867. th = (pthread_descr) ((char *) th + TLS_PRE_TCB_SIZE);
  83868. # endif
  83869. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/ptcleanup.c uClibc-git/libpthread/linuxthreads/ptcleanup.c
  83870. --- uClibc-0.9.33.2/libpthread/linuxthreads/ptcleanup.c 2012-05-15 09:20:09.000000000 +0200
  83871. +++ uClibc-git/libpthread/linuxthreads/ptcleanup.c 2014-07-25 20:36:08.193341950 +0200
  83872. @@ -20,8 +20,8 @@
  83873. #include <setjmp.h>
  83874. #include "pthread.h"
  83875. #include "internals.h"
  83876. -#ifndef NO_PTR_DEMANGLE
  83877. #include <jmpbuf-unwind.h>
  83878. +#ifndef NO_PTR_DEMANGLE
  83879. #define __JMPBUF_UNWINDS(a,b,c) _JMPBUF_UNWINDS(a,b,c)
  83880. #else
  83881. #define __JMPBUF_UNWINDS(a,b,c) _JMPBUF_UNWINDS(a,b)
  83882. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/ptclock_gettime.c uClibc-git/libpthread/linuxthreads/ptclock_gettime.c
  83883. --- uClibc-0.9.33.2/libpthread/linuxthreads/ptclock_gettime.c 2012-05-15 09:20:09.000000000 +0200
  83884. +++ uClibc-git/libpthread/linuxthreads/ptclock_gettime.c 2014-07-25 20:36:08.193341950 +0200
  83885. @@ -12,13 +12,11 @@
  83886. Lesser General Public License for more details.
  83887. You should have received a copy of the GNU Lesser General Public
  83888. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  83889. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  83890. - Boston, MA 02111-1307, USA. */
  83891. + License along with the GNU C Library; see the file COPYING.LIB. If
  83892. + not, see <http://www.gnu.org/licenses/>. */
  83893. #include <errno.h>
  83894. #include <time.h>
  83895. -#include <libc-internal.h>
  83896. #include "internals.h"
  83897. #include "spinlock.h"
  83898. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/ptclock_settime.c uClibc-git/libpthread/linuxthreads/ptclock_settime.c
  83899. --- uClibc-0.9.33.2/libpthread/linuxthreads/ptclock_settime.c 2012-05-15 09:20:09.000000000 +0200
  83900. +++ uClibc-git/libpthread/linuxthreads/ptclock_settime.c 2014-07-25 20:36:08.193341950 +0200
  83901. @@ -12,13 +12,11 @@
  83902. Lesser General Public License for more details.
  83903. You should have received a copy of the GNU Lesser General Public
  83904. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  83905. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  83906. - Boston, MA 02111-1307, USA. */
  83907. + License along with the GNU C Library; see the file COPYING.LIB. If
  83908. + not, see <http://www.gnu.org/licenses/>. */
  83909. #include <errno.h>
  83910. #include <time.h>
  83911. -#include <libc-internal.h>
  83912. #include "internals.h"
  83913. #include "spinlock.h"
  83914. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/ptfork.c uClibc-git/libpthread/linuxthreads/ptfork.c
  83915. --- uClibc-0.9.33.2/libpthread/linuxthreads/ptfork.c 2012-05-15 09:20:09.000000000 +0200
  83916. +++ uClibc-git/libpthread/linuxthreads/ptfork.c 2014-07-25 20:36:08.193341950 +0200
  83917. @@ -23,8 +23,6 @@
  83918. #include <bits/libc-lock.h>
  83919. #include "fork.h"
  83920. -extern int __libc_fork (void);
  83921. -
  83922. pid_t __pthread_fork (struct fork_block *b)
  83923. {
  83924. pid_t pid;
  83925. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/pthread_atfork.c uClibc-git/libpthread/linuxthreads/pthread_atfork.c
  83926. --- uClibc-0.9.33.2/libpthread/linuxthreads/pthread_atfork.c 2012-05-15 09:20:09.000000000 +0200
  83927. +++ uClibc-git/libpthread/linuxthreads/pthread_atfork.c 2014-07-25 20:36:08.197341972 +0200
  83928. @@ -30,9 +30,8 @@
  83929. Lesser General Public License for more details.
  83930. You should have received a copy of the GNU Lesser General Public
  83931. - License along with the GNU C Library; if not, write to the Free
  83932. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  83933. - 02111-1307 USA. */
  83934. + License along with the GNU C Library; if not, see
  83935. + <http://www.gnu.org/licenses/>. */
  83936. #include "internals.h"
  83937. #include <fork.h>
  83938. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/pthread.c uClibc-git/libpthread/linuxthreads/pthread.c
  83939. --- uClibc-0.9.33.2/libpthread/linuxthreads/pthread.c 2012-05-15 09:20:09.000000000 +0200
  83940. +++ uClibc-git/libpthread/linuxthreads/pthread.c 2014-07-25 20:36:08.193341950 +0200
  83941. @@ -37,10 +37,7 @@
  83942. # error "This must not happen"
  83943. #endif
  83944. -/* mods for uClibc: __libc_sigaction is not in any standard headers */
  83945. -extern __typeof(sigaction) __libc_sigaction;
  83946. -
  83947. -#if !(USE_TLS && HAVE___THREAD)
  83948. +#ifndef __UCLIBC_HAS_TLS__
  83949. /* These variables are used by the setup code. */
  83950. extern int _errno;
  83951. extern int _h_errno;
  83952. @@ -53,7 +50,7 @@
  83953. # endif
  83954. #endif
  83955. -#ifdef USE_TLS
  83956. +#ifdef __UCLIBC_HAS_TLS__
  83957. /* We need only a few variables. */
  83958. #define manager_thread __pthread_manager_threadp
  83959. @@ -70,7 +67,7 @@
  83960. .p_tid = PTHREAD_THREADS_MAX,
  83961. .p_lock = &__pthread_handles[0].h_lock,
  83962. .p_start_args = PTHREAD_START_ARGS_INITIALIZER(NULL),
  83963. -#if !(USE_TLS && HAVE___THREAD)
  83964. +#ifndef __UCLIBC_HAS_TLS__
  83965. .p_errnop = &_errno,
  83966. .p_h_errnop = &_h_errno,
  83967. #endif
  83968. @@ -89,7 +86,7 @@
  83969. .p_header.data.multiple_threads = 1,
  83970. .p_lock = &__pthread_handles[1].h_lock,
  83971. .p_start_args = PTHREAD_START_ARGS_INITIALIZER(__pthread_manager),
  83972. -#if !(USE_TLS && HAVE___THREAD)
  83973. +#ifndef __UCLIBC_HAS_TLS__
  83974. .p_errnop = &__pthread_manager_thread.p_errno,
  83975. #endif
  83976. .p_nr = 1,
  83977. @@ -101,7 +98,7 @@
  83978. /* Pointer to the main thread (the father of the thread manager thread) */
  83979. /* Originally, this is the initial thread, but this changes after fork() */
  83980. -#ifdef USE_TLS
  83981. +#ifdef __UCLIBC_HAS_TLS__
  83982. pthread_descr __pthread_main_thread;
  83983. #else
  83984. pthread_descr __pthread_main_thread = &__pthread_initial_thread;
  83985. @@ -227,13 +224,13 @@
  83986. #endif
  83987. -#if defined USE_TLS && !defined SHARED
  83988. +#if defined __UCLIBC_HAS_TLS__ && !defined SHARED
  83989. extern void __libc_setup_tls (size_t tcbsize, size_t tcbalign);
  83990. #endif
  83991. struct pthread_functions __pthread_functions =
  83992. {
  83993. -#if !(USE_TLS && HAVE___THREAD)
  83994. +#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__
  83995. .ptr_pthread_internal_tsd_set = __pthread_internal_tsd_set,
  83996. .ptr_pthread_internal_tsd_get = __pthread_internal_tsd_get,
  83997. .ptr_pthread_internal_tsd_address = __pthread_internal_tsd_address,
  83998. @@ -295,7 +292,7 @@
  83999. void
  84000. __pthread_initialize_minimal(void)
  84001. {
  84002. -#ifdef USE_TLS
  84003. +#ifdef __UCLIBC_HAS_TLS__
  84004. pthread_descr self;
  84005. /* First of all init __pthread_handles[0] and [1] if needed. */
  84006. @@ -307,7 +304,7 @@
  84007. /* Unlike in the dynamically linked case the dynamic linker has not
  84008. taken care of initializing the TLS data structures. */
  84009. __libc_setup_tls (TLS_TCB_SIZE, TLS_TCB_ALIGN);
  84010. -# elif !USE___THREAD
  84011. +# elif !defined __UCLIBC_HAS_TLS__
  84012. if (__builtin_expect (GL(dl_tls_dtv_slotinfo_list) == NULL, 0))
  84013. {
  84014. tcbhead_t *tcbp;
  84015. @@ -363,7 +360,7 @@
  84016. self->p_nextlive = self->p_prevlive = self;
  84017. self->p_tid = PTHREAD_THREADS_MAX;
  84018. self->p_lock = &__pthread_handles[0].h_lock;
  84019. -# ifndef HAVE___THREAD
  84020. +# ifndef __UCLIBC_HAS_TLS__
  84021. self->p_errnop = &_errno;
  84022. self->p_h_errnop = &_h_errno;
  84023. # endif
  84024. @@ -380,7 +377,7 @@
  84025. /* And fill in the pointer the the thread __pthread_handles array. */
  84026. __pthread_handles[0].h_descr = self;
  84027. -#else /* USE_TLS */
  84028. +#else /* __UCLIBC_HAS_TLS__ */
  84029. /* First of all init __pthread_handles[0] and [1]. */
  84030. # if __LT_SPINLOCK_INIT != 0
  84031. @@ -398,7 +395,7 @@
  84032. #endif
  84033. #if HP_TIMING_AVAIL
  84034. -# ifdef USE_TLS
  84035. +# ifdef __UCLIBC_HAS_TLS__
  84036. self->p_cpuclock_offset = GL(dl_cpuclock_offset);
  84037. # else
  84038. __pthread_initial_thread.p_cpuclock_offset = GL(dl_cpuclock_offset);
  84039. @@ -442,7 +439,7 @@
  84040. __pthread_max_stacksize = max_stack;
  84041. if (max_stack / 4 < __MAX_ALLOCA_CUTOFF)
  84042. {
  84043. -#ifdef USE_TLS
  84044. +#ifdef __UCLIBC_HAS_TLS__
  84045. pthread_descr self = THREAD_SELF;
  84046. self->p_alloca_cutoff = max_stack / 4;
  84047. #else
  84048. @@ -451,10 +448,8 @@
  84049. }
  84050. }
  84051. -/* psm: we do not have any ld.so support yet
  84052. - * remove the USE_TLS guard if nptl is added */
  84053. -#if defined SHARED && defined USE_TLS
  84054. -# if USE___THREAD
  84055. +#if defined SHARED && defined __UCLIBC_HAS_TLS__
  84056. +# ifdef __UCLIBC_HAS_TLS__
  84057. /* When using __thread for this, we do it in libc so as not
  84058. to give libpthread its own TLS segment just for this. */
  84059. extern void **__libc_dl_error_tsd (void) __attribute__ ((const));
  84060. @@ -467,7 +462,7 @@
  84061. # endif
  84062. #endif
  84063. -#ifdef USE_TLS
  84064. +#ifdef __UCLIBC_HAS_TLS__
  84065. static __inline__ void __attribute__((always_inline))
  84066. init_one_static_tls (pthread_descr descr, struct link_map *map)
  84067. {
  84068. @@ -486,7 +481,7 @@
  84069. dtv[map->l_tls_modid].pointer.is_static = true;
  84070. /* Initialize the memory. */
  84071. - memset (__mempcpy (dest, map->l_tls_initimage, map->l_tls_initimage_size),
  84072. + memset (mempcpy (dest, map->l_tls_initimage, map->l_tls_initimage_size),
  84073. '\0', map->l_tls_blocksize - map->l_tls_initimage_size);
  84074. }
  84075. @@ -536,10 +531,10 @@
  84076. (char *)(((long)CURRENT_STACK_FRAME - 2 * STACK_SIZE) & ~(STACK_SIZE - 1));
  84077. # endif
  84078. #endif
  84079. -#ifdef USE_TLS
  84080. +#ifdef __UCLIBC_HAS_TLS__
  84081. /* Update the descriptor for the initial thread. */
  84082. THREAD_SETMEM (((pthread_descr) NULL), p_pid, __getpid());
  84083. -# if !defined HAVE___THREAD && defined __UCLIBC_HAS_RESOLVER_SUPPORT__
  84084. +# if defined __UCLIBC_HAS_RESOLVER_SUPPORT__
  84085. /* Likewise for the resolver state _res. */
  84086. THREAD_SETMEM (((pthread_descr) NULL), p_resp, __resp);
  84087. # endif
  84088. @@ -590,9 +585,7 @@
  84089. /* How many processors. */
  84090. __pthread_smp_kernel = is_smp_system ();
  84091. -/* psm: we do not have any ld.so support yet
  84092. - * remove the USE_TLS guard if nptl is added */
  84093. -#if defined SHARED && defined USE_TLS
  84094. +#if defined SHARED && defined __UCLIBC_HAS_TLS__
  84095. /* Transfer the old value from the dynamic linker's internal location. */
  84096. *__libc_dl_error_tsd () = *(*GL(dl_error_catch_tsd)) ();
  84097. GL(dl_error_catch_tsd) = &__libc_dl_error_tsd;
  84098. @@ -607,7 +600,7 @@
  84099. __pthread_mutex_lock (&GL(dl_load_lock).mutex);
  84100. #endif
  84101. -#ifdef USE_TLS
  84102. +#ifdef __UCLIBC_HAS_TLS__
  84103. GL(dl_init_static_tls) = &__pthread_init_static_tls;
  84104. #endif
  84105. @@ -635,12 +628,12 @@
  84106. struct pthread_request request;
  84107. int report_events;
  84108. pthread_descr mgr;
  84109. -#ifdef USE_TLS
  84110. +#ifdef __UCLIBC_HAS_TLS__
  84111. tcbhead_t *tcbp;
  84112. #endif
  84113. __pthread_multiple_threads = 1;
  84114. -#if TLS_MULTIPLE_THREADS_IN_TCB || !defined USE_TLS || !TLS_DTV_AT_TP
  84115. +#if TLS_MULTIPLE_THREADS_IN_TCB || !defined __UCLIBC_HAS_TLS__ || !TLS_DTV_AT_TP
  84116. __pthread_main_thread->p_multiple_threads = 1;
  84117. #endif
  84118. *__libc_multiple_threads_ptr = 1;
  84119. @@ -667,7 +660,7 @@
  84120. return -1;
  84121. }
  84122. -#ifdef USE_TLS
  84123. +#ifdef __UCLIBC_HAS_TLS__
  84124. /* Allocate memory for the thread descriptor and the dtv. */
  84125. tcbp = _dl_allocate_tls (NULL);
  84126. if (tcbp == NULL) {
  84127. @@ -687,7 +680,7 @@
  84128. __pthread_handles[1].h_descr = manager_thread = mgr;
  84129. /* Initialize the descriptor. */
  84130. -#if !defined USE_TLS || !TLS_DTV_AT_TP
  84131. +#if !defined __UCLIBC_HAS_TLS__ || !TLS_DTV_AT_TP
  84132. mgr->p_header.data.tcb = tcbp;
  84133. mgr->p_header.data.self = mgr;
  84134. mgr->p_header.data.multiple_threads = 1;
  84135. @@ -695,7 +688,7 @@
  84136. mgr->p_multiple_threads = 1;
  84137. #endif
  84138. mgr->p_lock = &__pthread_handles[1].h_lock;
  84139. -# ifndef HAVE___THREAD
  84140. +# ifndef __UCLIBC_HAS_TLS__
  84141. mgr->p_errnop = &mgr->p_errno;
  84142. # endif
  84143. mgr->p_start_args = (struct pthread_start_args) PTHREAD_START_ARGS_INITIALIZER(__pthread_manager);
  84144. @@ -713,7 +706,7 @@
  84145. /* Start the thread manager */
  84146. pid = 0;
  84147. -#ifdef USE_TLS
  84148. +#ifdef __UCLIBC_HAS_TLS__
  84149. if (__linuxthreads_initial_report_events != 0)
  84150. THREAD_SETMEM (((pthread_descr) NULL), p_report_events,
  84151. __linuxthreads_initial_report_events);
  84152. @@ -732,7 +725,7 @@
  84153. uint32_t mask = __td_eventmask (TD_CREATE);
  84154. uint32_t event_bits;
  84155. -#ifdef USE_TLS
  84156. +#ifdef __UCLIBC_HAS_TLS__
  84157. event_bits = THREAD_GETMEM_NC (((pthread_descr) NULL),
  84158. p_eventbuf.eventmask.event_bits[idx]);
  84159. #else
  84160. @@ -798,7 +791,7 @@
  84161. #endif
  84162. }
  84163. if (__builtin_expect (pid, 0) == -1) {
  84164. -#ifdef USE_TLS
  84165. +#ifdef __UCLIBC_HAS_TLS__
  84166. _dl_deallocate_tls (tcbp, true);
  84167. #endif
  84168. free(__pthread_manager_thread_bos);
  84169. @@ -900,7 +893,7 @@
  84170. if (sp >= __pthread_manager_thread_bos && sp < __pthread_manager_thread_tos)
  84171. return manager_thread;
  84172. h = __pthread_handles + 2;
  84173. -# ifdef USE_TLS
  84174. +# ifdef __UCLIBC_HAS_TLS__
  84175. # ifdef _STACK_GROWS_UP
  84176. while (h->h_descr == NULL
  84177. || ! (sp >= h->h_descr->p_stackaddr && sp < h->h_descr->p_guardaddr))
  84178. @@ -994,7 +987,7 @@
  84179. children, so that timings for main thread account for all threads. */
  84180. if (self == __pthread_main_thread)
  84181. {
  84182. -#ifdef USE_TLS
  84183. +#ifdef __UCLIBC_HAS_TLS__
  84184. waitpid(manager_thread->p_pid, NULL, __WCLONE);
  84185. #else
  84186. waitpid(__pthread_manager_thread.p_pid, NULL, __WCLONE);
  84187. @@ -1002,7 +995,7 @@
  84188. /* Since all threads have been asynchronously terminated
  84189. (possibly holding locks), free cannot be used any more.
  84190. For mtrace, we'd like to print something though. */
  84191. - /* #ifdef USE_TLS
  84192. + /* #ifdef __UCLIBC_HAS_TLS__
  84193. tcbhead_t *tcbp = (tcbhead_t *) manager_thread;
  84194. # if defined(TLS_DTV_AT_TP)
  84195. tcbp = (tcbhead_t) ((char *) tcbp + TLS_PRE_TCB_SIZE);
  84196. @@ -1060,7 +1053,7 @@
  84197. /* Main thread should accumulate times for thread manager and its
  84198. children, so that timings for main thread account for all threads. */
  84199. if (self == __pthread_main_thread) {
  84200. -#ifdef USE_TLS
  84201. +#ifdef __UCLIBC_HAS_TLS__
  84202. waitpid(manager_thread->p_pid, NULL, __WCLONE);
  84203. #else
  84204. waitpid(__pthread_manager_thread.p_pid, NULL, __WCLONE);
  84205. @@ -1121,7 +1114,7 @@
  84206. __pthread_main_thread = self;
  84207. THREAD_SETMEM(self, p_nextlive, self);
  84208. THREAD_SETMEM(self, p_prevlive, self);
  84209. -#if !(USE_TLS && HAVE___THREAD)
  84210. +#ifndef __UCLIBC_HAS_TLS__
  84211. /* Now this thread modifies the global variables. */
  84212. THREAD_SETMEM(self, p_errnop, &_errno);
  84213. THREAD_SETMEM(self, p_h_errnop, &_h_errno);
  84214. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setegid.c uClibc-git/libpthread/linuxthreads/pthread_setegid.c
  84215. --- uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setegid.c 2012-05-15 09:20:09.000000000 +0200
  84216. +++ uClibc-git/libpthread/linuxthreads/pthread_setegid.c 2014-07-25 20:36:08.197341972 +0200
  84217. @@ -12,9 +12,8 @@
  84218. Lesser General Public License for more details.
  84219. You should have received a copy of the GNU Lesser General Public
  84220. - License along with the GNU C Library; if not, write to the Free
  84221. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  84222. - 02111-1307 USA. */
  84223. + License along with the GNU C Library; if not, see
  84224. + <http://www.gnu.org/licenses/>. */
  84225. #include <pthread.h>
  84226. #include <unistd.h>
  84227. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/pthread_seteuid.c uClibc-git/libpthread/linuxthreads/pthread_seteuid.c
  84228. --- uClibc-0.9.33.2/libpthread/linuxthreads/pthread_seteuid.c 2012-05-15 09:20:09.000000000 +0200
  84229. +++ uClibc-git/libpthread/linuxthreads/pthread_seteuid.c 2014-07-25 20:36:08.197341972 +0200
  84230. @@ -12,9 +12,8 @@
  84231. Lesser General Public License for more details.
  84232. You should have received a copy of the GNU Lesser General Public
  84233. - License along with the GNU C Library; if not, write to the Free
  84234. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  84235. - 02111-1307 USA. */
  84236. + License along with the GNU C Library; if not, see
  84237. + <http://www.gnu.org/licenses/>. */
  84238. #include <pthread.h>
  84239. #include <unistd.h>
  84240. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setgid.c uClibc-git/libpthread/linuxthreads/pthread_setgid.c
  84241. --- uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setgid.c 2012-05-15 09:20:09.000000000 +0200
  84242. +++ uClibc-git/libpthread/linuxthreads/pthread_setgid.c 2014-07-25 20:36:08.197341972 +0200
  84243. @@ -12,9 +12,8 @@
  84244. Lesser General Public License for more details.
  84245. You should have received a copy of the GNU Lesser General Public
  84246. - License along with the GNU C Library; if not, write to the Free
  84247. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  84248. - 02111-1307 USA. */
  84249. + License along with the GNU C Library; if not, see
  84250. + <http://www.gnu.org/licenses/>. */
  84251. #include <pthread.h>
  84252. #include <unistd.h>
  84253. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setregid.c uClibc-git/libpthread/linuxthreads/pthread_setregid.c
  84254. --- uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setregid.c 2012-05-15 09:20:09.000000000 +0200
  84255. +++ uClibc-git/libpthread/linuxthreads/pthread_setregid.c 2014-07-25 20:36:08.197341972 +0200
  84256. @@ -12,9 +12,8 @@
  84257. Lesser General Public License for more details.
  84258. You should have received a copy of the GNU Lesser General Public
  84259. - License along with the GNU C Library; if not, write to the Free
  84260. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  84261. - 02111-1307 USA. */
  84262. + License along with the GNU C Library; if not, see
  84263. + <http://www.gnu.org/licenses/>. */
  84264. #include <pthread.h>
  84265. #include <unistd.h>
  84266. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setresgid.c uClibc-git/libpthread/linuxthreads/pthread_setresgid.c
  84267. --- uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setresgid.c 2012-05-15 09:20:09.000000000 +0200
  84268. +++ uClibc-git/libpthread/linuxthreads/pthread_setresgid.c 2014-07-25 20:36:08.197341972 +0200
  84269. @@ -12,9 +12,8 @@
  84270. Lesser General Public License for more details.
  84271. You should have received a copy of the GNU Lesser General Public
  84272. - License along with the GNU C Library; if not, write to the Free
  84273. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  84274. - 02111-1307 USA. */
  84275. + License along with the GNU C Library; if not, see
  84276. + <http://www.gnu.org/licenses/>. */
  84277. #include <pthread.h>
  84278. #include <unistd.h>
  84279. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setresuid.c uClibc-git/libpthread/linuxthreads/pthread_setresuid.c
  84280. --- uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setresuid.c 2012-05-15 09:20:09.000000000 +0200
  84281. +++ uClibc-git/libpthread/linuxthreads/pthread_setresuid.c 2014-07-25 20:36:08.197341972 +0200
  84282. @@ -12,9 +12,8 @@
  84283. Lesser General Public License for more details.
  84284. You should have received a copy of the GNU Lesser General Public
  84285. - License along with the GNU C Library; if not, write to the Free
  84286. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  84287. - 02111-1307 USA. */
  84288. + License along with the GNU C Library; if not, see
  84289. + <http://www.gnu.org/licenses/>. */
  84290. #include <pthread.h>
  84291. #include <unistd.h>
  84292. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setreuid.c uClibc-git/libpthread/linuxthreads/pthread_setreuid.c
  84293. --- uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setreuid.c 2012-05-15 09:20:09.000000000 +0200
  84294. +++ uClibc-git/libpthread/linuxthreads/pthread_setreuid.c 2014-07-25 20:36:08.197341972 +0200
  84295. @@ -12,9 +12,8 @@
  84296. Lesser General Public License for more details.
  84297. You should have received a copy of the GNU Lesser General Public
  84298. - License along with the GNU C Library; if not, write to the Free
  84299. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  84300. - 02111-1307 USA. */
  84301. + License along with the GNU C Library; if not, see
  84302. + <http://www.gnu.org/licenses/>. */
  84303. #include <pthread.h>
  84304. #include <unistd.h>
  84305. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setuid.c uClibc-git/libpthread/linuxthreads/pthread_setuid.c
  84306. --- uClibc-0.9.33.2/libpthread/linuxthreads/pthread_setuid.c 2012-05-15 09:20:09.000000000 +0200
  84307. +++ uClibc-git/libpthread/linuxthreads/pthread_setuid.c 2014-07-25 20:36:08.197341972 +0200
  84308. @@ -12,9 +12,8 @@
  84309. Lesser General Public License for more details.
  84310. You should have received a copy of the GNU Lesser General Public
  84311. - License along with the GNU C Library; if not, write to the Free
  84312. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  84313. - 02111-1307 USA. */
  84314. + License along with the GNU C Library; if not, see
  84315. + <http://www.gnu.org/licenses/>. */
  84316. #include <pthread.h>
  84317. #include <unistd.h>
  84318. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/pt-machine.c uClibc-git/libpthread/linuxthreads/pt-machine.c
  84319. --- uClibc-0.9.33.2/libpthread/linuxthreads/pt-machine.c 2012-05-15 09:20:09.000000000 +0200
  84320. +++ uClibc-git/libpthread/linuxthreads/pt-machine.c 2014-07-25 20:36:08.193341950 +0200
  84321. @@ -13,9 +13,8 @@
  84322. Lesser General Public License for more details.
  84323. You should have received a copy of the GNU Lesser General Public
  84324. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  84325. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84326. - Boston, MA 02111-1307, USA. */
  84327. + License along with the GNU C Library; see the file COPYING.LIB. If
  84328. + not, see <http://www.gnu.org/licenses/>. */
  84329. #define PT_EI
  84330. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/rwlock.c uClibc-git/libpthread/linuxthreads/rwlock.c
  84331. --- uClibc-0.9.33.2/libpthread/linuxthreads/rwlock.c 2012-05-15 09:20:09.000000000 +0200
  84332. +++ uClibc-git/libpthread/linuxthreads/rwlock.c 2014-07-25 20:36:08.197341972 +0200
  84333. @@ -15,9 +15,8 @@
  84334. Lesser General Public License for more details.
  84335. You should have received a copy of the GNU Lesser General Public
  84336. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  84337. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84338. - Boston, MA 02111-1307, USA. */
  84339. + License along with the GNU C Library; see the file COPYING.LIB. If
  84340. + not, see <http://www.gnu.org/licenses/>. */
  84341. #include <bits/libc-lock.h>
  84342. #include <errno.h>
  84343. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/semaphore.c uClibc-git/libpthread/linuxthreads/semaphore.c
  84344. --- uClibc-0.9.33.2/libpthread/linuxthreads/semaphore.c 2012-05-15 09:20:09.000000000 +0200
  84345. +++ uClibc-git/libpthread/linuxthreads/semaphore.c 2014-07-25 20:36:08.197341972 +0200
  84346. @@ -15,6 +15,7 @@
  84347. /* Semaphores a la POSIX 1003.1b */
  84348. #include <errno.h>
  84349. +#include <limits.h>
  84350. #include "pthread.h"
  84351. #include "semaphore.h"
  84352. #include "internals.h"
  84353. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/semaphore.h uClibc-git/libpthread/linuxthreads/semaphore.h
  84354. --- uClibc-0.9.33.2/libpthread/linuxthreads/semaphore.h 2012-05-15 09:20:09.000000000 +0200
  84355. +++ uClibc-git/libpthread/linuxthreads/semaphore.h 2014-07-25 20:36:08.197341972 +0200
  84356. @@ -17,6 +17,7 @@
  84357. #include <features.h>
  84358. #include <sys/types.h>
  84359. +#include <limits.h>
  84360. #ifdef __USE_XOPEN2K
  84361. # define __need_timespec
  84362. # include <time.h>
  84363. @@ -42,7 +43,9 @@
  84364. #define SEM_FAILED ((sem_t *) 0)
  84365. /* Maximum value the semaphore can have. */
  84366. +#ifndef SEM_VALUE_MAX
  84367. #define SEM_VALUE_MAX (2147483647)
  84368. +#endif
  84369. __BEGIN_DECLS
  84370. @@ -55,13 +58,13 @@
  84371. extern int sem_destroy (sem_t *__sem) __THROW;
  84372. /* Open a named semaphore NAME with open flags OFLAG. */
  84373. -extern sem_t *sem_open (__const char *__name, int __oflag, ...) __THROW;
  84374. +extern sem_t *sem_open (const char *__name, int __oflag, ...) __THROW;
  84375. /* Close descriptor for named semaphore SEM. */
  84376. extern int sem_close (sem_t *__sem) __THROW;
  84377. /* Remove named semaphore NAME. */
  84378. -extern int sem_unlink (__const char *__name) __THROW;
  84379. +extern int sem_unlink (const char *__name) __THROW;
  84380. /* Wait for SEM being posted.
  84381. @@ -75,7 +78,7 @@
  84382. This function is a cancellation point and therefore not marked with
  84383. __THROW. */
  84384. extern int sem_timedwait (sem_t *__restrict __sem,
  84385. - __const struct timespec *__restrict __abstime);
  84386. + const struct timespec *__restrict __abstime);
  84387. #endif
  84388. /* Test whether SEM is posted. */
  84389. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/signals.c uClibc-git/libpthread/linuxthreads/signals.c
  84390. --- uClibc-0.9.33.2/libpthread/linuxthreads/signals.c 2012-05-15 09:20:09.000000000 +0200
  84391. +++ uClibc-git/libpthread/linuxthreads/signals.c 2014-07-25 20:36:08.197341972 +0200
  84392. @@ -20,9 +20,6 @@
  84393. #include "internals.h"
  84394. #include "spinlock.h"
  84395. -/* mods for uClibc: __libc_sigaction is not in any standard headers */
  84396. -extern __typeof(sigaction) __libc_sigaction;
  84397. -
  84398. int pthread_sigmask(int how, const sigset_t * newmask, sigset_t * oldmask)
  84399. {
  84400. sigset_t mask;
  84401. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/specific.c uClibc-git/libpthread/linuxthreads/specific.c
  84402. --- uClibc-0.9.33.2/libpthread/linuxthreads/specific.c 2012-05-15 09:20:09.000000000 +0200
  84403. +++ uClibc-git/libpthread/linuxthreads/specific.c 2014-07-25 20:36:08.197341972 +0200
  84404. @@ -212,7 +212,7 @@
  84405. __pthread_unlock(THREAD_GETMEM(self, p_lock));
  84406. }
  84407. -#if !(USE_TLS && HAVE___THREAD)
  84408. +#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__
  84409. /* Thread-specific data for libc. */
  84410. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/alpha/elf/pt-initfini.c uClibc-git/libpthread/linuxthreads/sysdeps/alpha/elf/pt-initfini.c
  84411. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/alpha/elf/pt-initfini.c 2012-05-15 09:20:09.000000000 +0200
  84412. +++ uClibc-git/libpthread/linuxthreads/sysdeps/alpha/elf/pt-initfini.c 2014-07-25 20:36:08.213342056 +0200
  84413. @@ -13,9 +13,8 @@
  84414. Lesser General Public License for more details.
  84415. You should have received a copy of the GNU Lesser General Public
  84416. - License along with the GNU C Library; if not, write to the Free
  84417. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  84418. - 02111-1307 USA. */
  84419. + License along with the GNU C Library; if not, see
  84420. + <http://www.gnu.org/licenses/>. */
  84421. /* This file is compiled into assembly code which is then munged by a sed
  84422. script into two files: crti.s and crtn.s.
  84423. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/alpha/pspinlock.c uClibc-git/libpthread/linuxthreads/sysdeps/alpha/pspinlock.c
  84424. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/alpha/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
  84425. +++ uClibc-git/libpthread/linuxthreads/sysdeps/alpha/pspinlock.c 2014-07-25 20:36:08.217342077 +0200
  84426. @@ -13,9 +13,8 @@
  84427. Lesser General Public License for more details.
  84428. You should have received a copy of the GNU Lesser General Public
  84429. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  84430. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84431. - Boston, MA 02111-1307, USA. */
  84432. + License along with the GNU C Library; see the file COPYING.LIB. If
  84433. + not, see <http://www.gnu.org/licenses/>. */
  84434. #include <errno.h>
  84435. #include <pthread.h>
  84436. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/alpha/pt-machine.h uClibc-git/libpthread/linuxthreads/sysdeps/alpha/pt-machine.h
  84437. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/alpha/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  84438. +++ uClibc-git/libpthread/linuxthreads/sysdeps/alpha/pt-machine.h 2014-07-25 20:36:08.217342077 +0200
  84439. @@ -17,8 +17,7 @@
  84440. You should have received a copy of the GNU Lesser General Public
  84441. License along with the GNU C Library; see the file COPYING.LIB. If not,
  84442. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84443. - Boston, MA 02111-1307, USA. */
  84444. + see <http://www.gnu.org/licenses/>. */
  84445. #ifndef _PT_MACHINE_H
  84446. #define _PT_MACHINE_H 1
  84447. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/alpha/tls.h uClibc-git/libpthread/linuxthreads/sysdeps/alpha/tls.h
  84448. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/alpha/tls.h 2012-05-15 09:20:09.000000000 +0200
  84449. +++ uClibc-git/libpthread/linuxthreads/sysdeps/alpha/tls.h 2014-07-25 20:36:08.217342077 +0200
  84450. @@ -13,9 +13,8 @@
  84451. Lesser General Public License for more details.
  84452. You should have received a copy of the GNU Lesser General Public
  84453. - License along with the GNU C Library; if not, write to the Free
  84454. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  84455. - 02111-1307 USA. */
  84456. + License along with the GNU C Library; if not, see
  84457. + <http://www.gnu.org/licenses/>. */
  84458. #ifndef _TLS_H
  84459. #define _TLS_H
  84460. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/arm/pspinlock.c uClibc-git/libpthread/linuxthreads/sysdeps/arm/pspinlock.c
  84461. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/arm/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
  84462. +++ uClibc-git/libpthread/linuxthreads/sysdeps/arm/pspinlock.c 2014-07-25 20:36:08.233342160 +0200
  84463. @@ -13,9 +13,8 @@
  84464. Lesser General Public License for more details.
  84465. You should have received a copy of the GNU Lesser General Public
  84466. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  84467. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84468. - Boston, MA 02111-1307, USA. */
  84469. + License along with the GNU C Library; see the file COPYING.LIB. If
  84470. + not, see <http://www.gnu.org/licenses/>. */
  84471. #include <errno.h>
  84472. #include <pthread.h>
  84473. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/arm/pt-machine.h uClibc-git/libpthread/linuxthreads/sysdeps/arm/pt-machine.h
  84474. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/arm/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  84475. +++ uClibc-git/libpthread/linuxthreads/sysdeps/arm/pt-machine.h 2014-07-25 20:36:08.233342160 +0200
  84476. @@ -15,9 +15,8 @@
  84477. Lesser General Public License for more details.
  84478. You should have received a copy of the GNU Lesser General Public
  84479. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  84480. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84481. - Boston, MA 02111-1307, USA. */
  84482. + License along with the GNU C Library; see the file COPYING.LIB. If
  84483. + not, see <http://www.gnu.org/licenses/>. */
  84484. #ifndef _PT_MACHINE_H
  84485. #define _PT_MACHINE_H 1
  84486. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/arm/sysdep.h uClibc-git/libpthread/linuxthreads/sysdeps/arm/sysdep.h
  84487. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/arm/sysdep.h 2012-05-15 09:20:09.000000000 +0200
  84488. +++ uClibc-git/libpthread/linuxthreads/sysdeps/arm/sysdep.h 1970-01-01 01:00:00.000000000 +0100
  84489. @@ -1,137 +0,0 @@
  84490. -/* Generic asm macros used on many machines.
  84491. - Copyright (C) 1991,92,93,96,98,2002,2003 Free Software Foundation, Inc.
  84492. - This file is part of the GNU C Library.
  84493. -
  84494. - The GNU C Library is free software; you can redistribute it and/or
  84495. - modify it under the terms of the GNU Lesser General Public
  84496. - License as published by the Free Software Foundation; either
  84497. - version 2.1 of the License, or (at your option) any later version.
  84498. -
  84499. - The GNU C Library is distributed in the hope that it will be useful,
  84500. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  84501. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  84502. - Lesser General Public License for more details.
  84503. -
  84504. - You should have received a copy of the GNU Lesser General Public
  84505. - License along with the GNU C Library; if not, write to the Free
  84506. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  84507. - 02111-1307 USA. */
  84508. -
  84509. -#ifndef C_LABEL
  84510. -
  84511. -/* Define a macro we can use to construct the asm name for a C symbol. */
  84512. -#ifdef NO_UNDERSCORES
  84513. -#ifdef __STDC__
  84514. -#define C_LABEL(name) name##:
  84515. -#else
  84516. -#define C_LABEL(name) name/**/:
  84517. -#endif
  84518. -#else
  84519. -#ifdef __STDC__
  84520. -#define C_LABEL(name) _##name##:
  84521. -#else
  84522. -#define C_LABEL(name) _/**/name/**/:
  84523. -#endif
  84524. -#endif
  84525. -
  84526. -#endif
  84527. -
  84528. -#ifdef __ASSEMBLER__
  84529. -/* Mark the end of function named SYM. This is used on some platforms
  84530. - to generate correct debugging information. */
  84531. -#ifndef END
  84532. -#define END(sym)
  84533. -#endif
  84534. -
  84535. -#ifndef JUMPTARGET
  84536. -#define JUMPTARGET(sym) sym
  84537. -#endif
  84538. -
  84539. -/* Makros to generate eh_frame unwind information. */
  84540. -# ifdef HAVE_ASM_CFI_DIRECTIVES
  84541. -# define cfi_startproc .cfi_startproc
  84542. -# define cfi_endproc .cfi_endproc
  84543. -# define cfi_def_cfa(reg, off) .cfi_def_cfa reg, off
  84544. -# define cfi_def_cfa_register(reg) .cfi_def_cfa_register reg
  84545. -# define cfi_def_cfa_offset(off) .cfi_def_cfa_offset off
  84546. -# define cfi_adjust_cfa_offset(off) .cfi_adjust_cfa_offset off
  84547. -# define cfi_offset(reg, off) .cfi_offset reg, off
  84548. -# define cfi_rel_offset(reg, off) .cfi_rel_offset reg, off
  84549. -# define cfi_register(r1, r2) .cfi_register r1, r2
  84550. -# define cfi_return_column(reg) .cfi_return_column reg
  84551. -# define cfi_restore(reg) .cfi_restore reg
  84552. -# define cfi_same_value(reg) .cfi_same_value reg
  84553. -# define cfi_undefined(reg) .cfi_undefined reg
  84554. -# define cfi_remember_state .cfi_remember_state
  84555. -# define cfi_restore_state .cfi_restore_state
  84556. -# define cfi_window_save .cfi_window_save
  84557. -# else
  84558. -# define cfi_startproc
  84559. -# define cfi_endproc
  84560. -# define cfi_def_cfa(reg, off)
  84561. -# define cfi_def_cfa_register(reg)
  84562. -# define cfi_def_cfa_offset(off)
  84563. -# define cfi_adjust_cfa_offset(off)
  84564. -# define cfi_offset(reg, off)
  84565. -# define cfi_rel_offset(reg, off)
  84566. -# define cfi_register(r1, r2)
  84567. -# define cfi_return_column(reg)
  84568. -# define cfi_restore(reg)
  84569. -# define cfi_same_value(reg)
  84570. -# define cfi_undefined(reg)
  84571. -# define cfi_remember_state
  84572. -# define cfi_restore_state
  84573. -# define cfi_window_save
  84574. -# endif
  84575. -
  84576. -#else /* ! ASSEMBLER */
  84577. -# ifdef HAVE_ASM_CFI_DIRECTIVES
  84578. -# define CFI_STRINGIFY(Name) CFI_STRINGIFY2 (Name)
  84579. -# define CFI_STRINGIFY2(Name) #Name
  84580. -# define CFI_STARTPROC ".cfi_startproc"
  84581. -# define CFI_ENDPROC ".cfi_endproc"
  84582. -# define CFI_DEF_CFA(reg, off) \
  84583. - ".cfi_def_cfa " CFI_STRINGIFY(reg) "," CFI_STRINGIFY(off)
  84584. -# define CFI_DEF_CFA_REGISTER(reg) \
  84585. - ".cfi_def_cfa_register " CFI_STRINGIFY(reg)
  84586. -# define CFI_DEF_CFA_OFFSET(off) \
  84587. - ".cfi_def_cfa_offset " CFI_STRINGIFY(off)
  84588. -# define CFI_ADJUST_CFA_OFFSET(off) \
  84589. - ".cfi_adjust_cfa_offset " CFI_STRINGIFY(off)
  84590. -# define CFI_OFFSET(reg, off) \
  84591. - ".cfi_offset " CFI_STRINGIFY(reg) "," CFI_STRINGIFY(off)
  84592. -# define CFI_REL_OFFSET(reg, off) \
  84593. - ".cfi_rel_offset " CFI_STRINGIFY(reg) "," CFI_STRINGIFY(off)
  84594. -# define CFI_REGISTER(r1, r2) \
  84595. - ".cfi_register " CFI_STRINGIFY(r1) "," CFI_STRINGIFY(r2)
  84596. -# define CFI_RETURN_COLUMN(reg) \
  84597. - ".cfi_return_column " CFI_STRINGIFY(reg)
  84598. -# define CFI_RESTORE(reg) \
  84599. - ".cfi_restore " CFI_STRINGIFY(reg)
  84600. -# define CFI_UNDEFINED(reg) \
  84601. - ".cfi_undefined " CFI_STRINGIFY(reg)
  84602. -# define CFI_REMEMBER_STATE \
  84603. - ".cfi_remember_state"
  84604. -# define CFI_RESTORE_STATE \
  84605. - ".cfi_restore_state"
  84606. -# define CFI_WINDOW_SAVE \
  84607. - ".cfi_window_save"
  84608. -# else
  84609. -# define CFI_STARTPROC
  84610. -# define CFI_ENDPROC
  84611. -# define CFI_DEF_CFA(reg, off)
  84612. -# define CFI_DEF_CFA_REGISTER(reg)
  84613. -# define CFI_DEF_CFA_OFFSET(off)
  84614. -# define CFI_ADJUST_CFA_OFFSET(off)
  84615. -# define CFI_OFFSET(reg, off)
  84616. -# define CFI_REL_OFFSET(reg, off)
  84617. -# define CFI_REGISTER(r1, r2)
  84618. -# define CFI_RETURN_COLUMN(reg)
  84619. -# define CFI_RESTORE(reg)
  84620. -# define CFI_UNDEFINED(reg)
  84621. -# define CFI_REMEMBER_STATE
  84622. -# define CFI_RESTORE_STATE
  84623. -# define CFI_WINDOW_SAVE
  84624. -# endif
  84625. -
  84626. -#endif /* __ASSEMBLER__ */
  84627. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/arm/tls.h uClibc-git/libpthread/linuxthreads/sysdeps/arm/tls.h
  84628. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/arm/tls.h 2012-05-15 09:20:09.000000000 +0200
  84629. +++ uClibc-git/libpthread/linuxthreads/sysdeps/arm/tls.h 2014-07-25 20:36:08.233342160 +0200
  84630. @@ -13,9 +13,8 @@
  84631. Lesser General Public License for more details.
  84632. You should have received a copy of the GNU Lesser General Public
  84633. - License along with the GNU C Library; if not, write to the Free
  84634. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  84635. - 02111-1307 USA. */
  84636. + License along with the GNU C Library; if not, see
  84637. + <http://www.gnu.org/licenses/>. */
  84638. #ifndef _TLS_H
  84639. #define _TLS_H
  84640. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/cris/pspinlock.c uClibc-git/libpthread/linuxthreads/sysdeps/cris/pspinlock.c
  84641. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/cris/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
  84642. +++ uClibc-git/libpthread/linuxthreads/sysdeps/cris/pspinlock.c 2014-07-25 20:36:08.245342223 +0200
  84643. @@ -13,9 +13,8 @@
  84644. Lesser General Public License for more details.
  84645. You should have received a copy of the GNU Lesser General Public
  84646. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  84647. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84648. - Boston, MA 02111-1307, USA. */
  84649. + License along with the GNU C Library; see the file COPYING.LIB. If
  84650. + not, see <http://www.gnu.org/licenses/>. */
  84651. #include <errno.h>
  84652. #include <pthread.h>
  84653. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/cris/pt-machine.h uClibc-git/libpthread/linuxthreads/sysdeps/cris/pt-machine.h
  84654. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/cris/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  84655. +++ uClibc-git/libpthread/linuxthreads/sysdeps/cris/pt-machine.h 2014-07-25 20:36:08.245342223 +0200
  84656. @@ -14,9 +14,8 @@
  84657. Lesser General Public License for more details.
  84658. You should have received a copy of the GNU Lesser General Public
  84659. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  84660. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84661. - Boston, MA 02111-1307, USA. */
  84662. + License along with the GNU C Library; see the file COPYING.LIB. If
  84663. + not, see <http://www.gnu.org/licenses/>. */
  84664. #ifndef _PT_MACHINE_H
  84665. #define _PT_MACHINE_H 1
  84666. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/hppa/pspinlock.c uClibc-git/libpthread/linuxthreads/sysdeps/hppa/pspinlock.c
  84667. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/hppa/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
  84668. +++ uClibc-git/libpthread/linuxthreads/sysdeps/hppa/pspinlock.c 2014-07-25 20:36:08.261342307 +0200
  84669. @@ -13,9 +13,8 @@
  84670. Lesser General Public License for more details.
  84671. You should have received a copy of the GNU Lesser General Public
  84672. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  84673. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84674. - Boston, MA 02111-1307, USA. */
  84675. + License along with the GNU C Library; see the file COPYING.LIB. If
  84676. + not, see <http://www.gnu.org/licenses/>. */
  84677. #include <errno.h>
  84678. #include <pthread.h>
  84679. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/hppa/pt-machine.h uClibc-git/libpthread/linuxthreads/sysdeps/hppa/pt-machine.h
  84680. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/hppa/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  84681. +++ uClibc-git/libpthread/linuxthreads/sysdeps/hppa/pt-machine.h 2014-07-25 20:36:08.261342307 +0200
  84682. @@ -15,9 +15,8 @@
  84683. Lesser General Public License for more details.
  84684. You should have received a copy of the GNU Lesser General Public
  84685. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  84686. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84687. - Boston, MA 02111-1307, USA. */
  84688. + License along with the GNU C Library; see the file COPYING.LIB. If
  84689. + not, see <http://www.gnu.org/licenses/>. */
  84690. #ifndef _PT_MACHINE_H
  84691. #define _PT_MACHINE_H 1
  84692. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/i386/i686/pt-machine.h uClibc-git/libpthread/linuxthreads/sysdeps/i386/i686/pt-machine.h
  84693. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/i386/i686/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  84694. +++ uClibc-git/libpthread/linuxthreads/sysdeps/i386/i686/pt-machine.h 2014-07-25 20:36:08.273342370 +0200
  84695. @@ -15,9 +15,8 @@
  84696. Lesser General Public License for more details.
  84697. You should have received a copy of the GNU Lesser General Public
  84698. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  84699. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84700. - Boston, MA 02111-1307, USA. */
  84701. + License along with the GNU C Library; see the file COPYING.LIB. If
  84702. + not, see <http://www.gnu.org/licenses/>. */
  84703. #ifndef _PT_MACHINE_H
  84704. #define _PT_MACHINE_H 1
  84705. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/i386/pspinlock.c uClibc-git/libpthread/linuxthreads/sysdeps/i386/pspinlock.c
  84706. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/i386/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
  84707. +++ uClibc-git/libpthread/linuxthreads/sysdeps/i386/pspinlock.c 2014-07-25 20:36:08.281342411 +0200
  84708. @@ -13,9 +13,8 @@
  84709. Lesser General Public License for more details.
  84710. You should have received a copy of the GNU Lesser General Public
  84711. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  84712. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84713. - Boston, MA 02111-1307, USA. */
  84714. + License along with the GNU C Library; see the file COPYING.LIB. If
  84715. + not, see <http://www.gnu.org/licenses/>. */
  84716. #include <errno.h>
  84717. #include <pthread.h>
  84718. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/i386/pt-machine.h uClibc-git/libpthread/linuxthreads/sysdeps/i386/pt-machine.h
  84719. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/i386/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  84720. +++ uClibc-git/libpthread/linuxthreads/sysdeps/i386/pt-machine.h 2014-07-25 20:36:08.281342411 +0200
  84721. @@ -15,9 +15,8 @@
  84722. Lesser General Public License for more details.
  84723. You should have received a copy of the GNU Lesser General Public
  84724. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  84725. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84726. - Boston, MA 02111-1307, USA. */
  84727. + License along with the GNU C Library; see the file COPYING.LIB. If
  84728. + not, see <http://www.gnu.org/licenses/>. */
  84729. #if defined __pentiumpro__ || defined __pentium4__ || defined __athlon__ || \
  84730. defined __k8__
  84731. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/i386/tls.h uClibc-git/libpthread/linuxthreads/sysdeps/i386/tls.h
  84732. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/i386/tls.h 2012-05-15 09:20:09.000000000 +0200
  84733. +++ uClibc-git/libpthread/linuxthreads/sysdeps/i386/tls.h 2014-07-25 20:36:08.281342411 +0200
  84734. @@ -13,9 +13,8 @@
  84735. Lesser General Public License for more details.
  84736. You should have received a copy of the GNU Lesser General Public
  84737. - License along with the GNU C Library; if not, write to the Free
  84738. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  84739. - 02111-1307 USA. */
  84740. + License along with the GNU C Library; if not, see
  84741. + <http://www.gnu.org/licenses/>. */
  84742. #ifndef _TLS_H
  84743. #define _TLS_H
  84744. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/i386/useldt.h uClibc-git/libpthread/linuxthreads/sysdeps/i386/useldt.h
  84745. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/i386/useldt.h 2012-05-15 09:20:09.000000000 +0200
  84746. +++ uClibc-git/libpthread/linuxthreads/sysdeps/i386/useldt.h 2014-07-25 20:36:08.281342411 +0200
  84747. @@ -16,8 +16,7 @@
  84748. You should have received a copy of the GNU Lesser General Public
  84749. License along with the GNU C Library; see the file COPYING.LIB. If not,
  84750. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84751. - Boston, MA 02111-1307, USA. */
  84752. + see <http://www.gnu.org/licenses/>. */
  84753. #ifndef __ASSEMBLER__
  84754. #include <stddef.h> /* For offsetof. */
  84755. @@ -87,7 +86,7 @@
  84756. because we inherited the value set up in the main thread by TLS setup.
  84757. We need to extract that value and set up the same segment in this
  84758. thread. */
  84759. -#if defined (USE_TLS) && USE_TLS
  84760. +#ifdef __UCLIBC_HAS_TLS__
  84761. # define DO_SET_THREAD_AREA_REUSE(nr) 1
  84762. #else
  84763. /* Without TLS, we do the initialization of the main thread, where NR == 0. */
  84764. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/ia64/pspinlock.c uClibc-git/libpthread/linuxthreads/sysdeps/ia64/pspinlock.c
  84765. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/ia64/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
  84766. +++ uClibc-git/libpthread/linuxthreads/sysdeps/ia64/pspinlock.c 2014-07-25 20:36:08.297342495 +0200
  84767. @@ -14,9 +14,8 @@
  84768. Lesser General Public License for more details.
  84769. You should have received a copy of the GNU Lesser General Public
  84770. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  84771. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84772. - Boston, MA 02111-1307, USA. */
  84773. + License along with the GNU C Library; see the file COPYING.LIB. If
  84774. + not, see <http://www.gnu.org/licenses/>. */
  84775. #include <errno.h>
  84776. #include <pthread.h>
  84777. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/ia64/pt-machine.h uClibc-git/libpthread/linuxthreads/sysdeps/ia64/pt-machine.h
  84778. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/ia64/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  84779. +++ uClibc-git/libpthread/linuxthreads/sysdeps/ia64/pt-machine.h 2014-07-25 20:36:08.297342495 +0200
  84780. @@ -14,9 +14,8 @@
  84781. Lesser General Public License for more details.
  84782. You should have received a copy of the GNU Lesser General Public
  84783. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  84784. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84785. - Boston, MA 02111-1307, USA. */
  84786. + License along with the GNU C Library; see the file COPYING.LIB. If
  84787. + not, see <http://www.gnu.org/licenses/>. */
  84788. #ifndef _PT_MACHINE_H
  84789. #define _PT_MACHINE_H 1
  84790. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/ia64/tcb-offsets.sym uClibc-git/libpthread/linuxthreads/sysdeps/ia64/tcb-offsets.sym
  84791. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/ia64/tcb-offsets.sym 2012-05-15 09:20:09.000000000 +0200
  84792. +++ uClibc-git/libpthread/linuxthreads/sysdeps/ia64/tcb-offsets.sym 2014-07-25 20:36:08.297342495 +0200
  84793. @@ -2,7 +2,7 @@
  84794. #include <tls.h>
  84795. --
  84796. -#ifdef USE_TLS
  84797. +#ifdef __UCLIBC_HAS_TLS__
  84798. MULTIPLE_THREADS_OFFSET offsetof (struct _pthread_descr_struct, p_multiple_threads) - sizeof (struct _pthread_descr_struct)
  84799. #else
  84800. MULTIPLE_THREADS_OFFSET offsetof (tcbhead_t, multiple_threads)
  84801. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/ia64/tls.h uClibc-git/libpthread/linuxthreads/sysdeps/ia64/tls.h
  84802. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/ia64/tls.h 2012-05-15 09:20:09.000000000 +0200
  84803. +++ uClibc-git/libpthread/linuxthreads/sysdeps/ia64/tls.h 2014-07-25 20:36:08.297342495 +0200
  84804. @@ -13,9 +13,8 @@
  84805. Lesser General Public License for more details.
  84806. You should have received a copy of the GNU Lesser General Public
  84807. - License along with the GNU C Library; if not, write to the Free
  84808. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  84809. - 02111-1307 USA. */
  84810. + License along with the GNU C Library; if not, see
  84811. + <http://www.gnu.org/licenses/>. */
  84812. #ifndef _TLS_H
  84813. #define _TLS_H
  84814. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/m68k/pspinlock.c uClibc-git/libpthread/linuxthreads/sysdeps/m68k/pspinlock.c
  84815. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/m68k/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
  84816. +++ uClibc-git/libpthread/linuxthreads/sysdeps/m68k/pspinlock.c 2014-07-25 20:36:08.309342559 +0200
  84817. @@ -13,9 +13,8 @@
  84818. Lesser General Public License for more details.
  84819. You should have received a copy of the GNU Lesser General Public
  84820. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  84821. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84822. - Boston, MA 02111-1307, USA. */
  84823. + License along with the GNU C Library; see the file COPYING.LIB. If
  84824. + not, see <http://www.gnu.org/licenses/>. */
  84825. #include <errno.h>
  84826. #include <pthread.h>
  84827. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h uClibc-git/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h
  84828. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  84829. +++ uClibc-git/libpthread/linuxthreads/sysdeps/m68k/pt-machine.h 2014-07-25 20:36:08.309342559 +0200
  84830. @@ -16,8 +16,7 @@
  84831. You should have received a copy of the GNU Lesser General Public
  84832. License along with the GNU C Library; see the file COPYING.LIB. If
  84833. - not, write to the Free Software Foundation, Inc.,
  84834. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  84835. + not, see <http://www.gnu.org/licenses/>. */
  84836. #ifndef _PT_MACHINE_H
  84837. #define _PT_MACHINE_H 1
  84838. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/mips/pspinlock.c uClibc-git/libpthread/linuxthreads/sysdeps/mips/pspinlock.c
  84839. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/mips/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
  84840. +++ uClibc-git/libpthread/linuxthreads/sysdeps/mips/pspinlock.c 2014-07-25 20:36:08.321342622 +0200
  84841. @@ -13,9 +13,8 @@
  84842. Lesser General Public License for more details.
  84843. You should have received a copy of the GNU Lesser General Public
  84844. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  84845. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84846. - Boston, MA 02111-1307, USA. */
  84847. + License along with the GNU C Library; see the file COPYING.LIB. If
  84848. + not, see <http://www.gnu.org/licenses/>. */
  84849. #include <errno.h>
  84850. #include <pthread.h>
  84851. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/mips/pt-machine.h uClibc-git/libpthread/linuxthreads/sysdeps/mips/pt-machine.h
  84852. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/mips/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  84853. +++ uClibc-git/libpthread/linuxthreads/sysdeps/mips/pt-machine.h 2014-07-25 20:36:08.321342622 +0200
  84854. @@ -18,8 +18,7 @@
  84855. You should have received a copy of the GNU Lesser General Public
  84856. License along with the GNU C Library; see the file COPYING.LIB. If
  84857. - not, write to the Free Software Foundation, Inc.,
  84858. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  84859. + not, see <http://www.gnu.org/licenses/>. */
  84860. #ifndef _PT_MACHINE_H
  84861. #define _PT_MACHINE_H 1
  84862. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/mips/tls.h uClibc-git/libpthread/linuxthreads/sysdeps/mips/tls.h
  84863. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/mips/tls.h 2012-05-15 09:20:09.000000000 +0200
  84864. +++ uClibc-git/libpthread/linuxthreads/sysdeps/mips/tls.h 2014-07-25 20:36:08.321342622 +0200
  84865. @@ -13,9 +13,8 @@
  84866. Lesser General Public License for more details.
  84867. You should have received a copy of the GNU Lesser General Public
  84868. - License along with the GNU C Library; if not, write to the Free
  84869. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  84870. - 02111-1307 USA. */
  84871. + License along with the GNU C Library; if not, see
  84872. + <http://www.gnu.org/licenses/>. */
  84873. #ifndef _TLS_H
  84874. #define _TLS_H
  84875. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/powerpc32/pspinlock.c uClibc-git/libpthread/linuxthreads/sysdeps/powerpc/powerpc32/pspinlock.c
  84876. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/powerpc32/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
  84877. +++ uClibc-git/libpthread/linuxthreads/sysdeps/powerpc/powerpc32/pspinlock.c 2014-07-25 20:36:08.341342726 +0200
  84878. @@ -13,9 +13,8 @@
  84879. Lesser General Public License for more details.
  84880. You should have received a copy of the GNU Lesser General Public
  84881. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  84882. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84883. - Boston, MA 02111-1307, USA. */
  84884. + License along with the GNU C Library; see the file COPYING.LIB. If
  84885. + not, see <http://www.gnu.org/licenses/>. */
  84886. #include <errno.h>
  84887. #include <pthread.h>
  84888. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h uClibc-git/libpthread/linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h
  84889. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  84890. +++ uClibc-git/libpthread/linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h 2014-07-25 20:36:08.341342726 +0200
  84891. @@ -16,8 +16,7 @@
  84892. You should have received a copy of the GNU Lesser General Public
  84893. License along with the GNU C Library; see the file COPYING.LIB. If
  84894. - not, write to the Free Software Foundation, Inc.,
  84895. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  84896. + not, see <http://www.gnu.org/licenses/>. */
  84897. /* These routines are from Appendix G of the 'PowerPC 601 RISC Microprocessor
  84898. User's Manual', by IBM and Motorola. */
  84899. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/powerpc64/pspinlock.c uClibc-git/libpthread/linuxthreads/sysdeps/powerpc/powerpc64/pspinlock.c
  84900. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/powerpc64/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
  84901. +++ uClibc-git/libpthread/linuxthreads/sysdeps/powerpc/powerpc64/pspinlock.c 2014-07-25 20:36:08.341342726 +0200
  84902. @@ -13,9 +13,8 @@
  84903. Lesser General Public License for more details.
  84904. You should have received a copy of the GNU Lesser General Public
  84905. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  84906. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84907. - Boston, MA 02111-1307, USA. */
  84908. + License along with the GNU C Library; see the file COPYING.LIB. If
  84909. + not, see <http://www.gnu.org/licenses/>. */
  84910. #include <errno.h>
  84911. #include <pthread.h>
  84912. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h uClibc-git/libpthread/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h
  84913. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  84914. +++ uClibc-git/libpthread/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h 2014-07-25 20:36:08.341342726 +0200
  84915. @@ -15,8 +15,7 @@
  84916. You should have received a copy of the GNU Library General Public
  84917. License along with the GNU C Library; see the file COPYING.LIB. If
  84918. - not, write to the Free Software Foundation, Inc.,
  84919. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  84920. + not, see <http://www.gnu.org/licenses/>. */
  84921. /* These routines are from Appendix G of the 'PowerPC 601 RISC Microprocessor
  84922. User's Manual', by IBM and Motorola. */
  84923. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/tcb-offsets.sym uClibc-git/libpthread/linuxthreads/sysdeps/powerpc/tcb-offsets.sym
  84924. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/tcb-offsets.sym 2012-05-15 09:20:09.000000000 +0200
  84925. +++ uClibc-git/libpthread/linuxthreads/sysdeps/powerpc/tcb-offsets.sym 2014-07-25 20:36:08.349342767 +0200
  84926. @@ -3,7 +3,7 @@
  84927. -- This line separates the #include lines from conditionals.
  84928. -# ifdef USE_TLS
  84929. +# ifdef __UCLIBC_HAS_TLS__
  84930. -- Abuse tls.h macros to derive offsets relative to the thread register.
  84931. # undef __thread_register
  84932. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/tls.h uClibc-git/libpthread/linuxthreads/sysdeps/powerpc/tls.h
  84933. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/powerpc/tls.h 2012-05-15 09:20:09.000000000 +0200
  84934. +++ uClibc-git/libpthread/linuxthreads/sysdeps/powerpc/tls.h 2014-07-25 20:36:08.349342767 +0200
  84935. @@ -13,9 +13,8 @@
  84936. Lesser General Public License for more details.
  84937. You should have received a copy of the GNU Lesser General Public
  84938. - License along with the GNU C Library; if not, write to the Free
  84939. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  84940. - 02111-1307 USA. */
  84941. + License along with the GNU C Library; if not, see
  84942. + <http://www.gnu.org/licenses/>. */
  84943. #ifndef _TLS_H
  84944. #define _TLS_H
  84945. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/bits/initspin.h uClibc-git/libpthread/linuxthreads/sysdeps/pthread/bits/initspin.h
  84946. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/bits/initspin.h 2012-05-15 09:20:09.000000000 +0200
  84947. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/bits/initspin.h 2014-07-25 20:36:08.369342872 +0200
  84948. @@ -13,9 +13,8 @@
  84949. Lesser General Public License for more details.
  84950. You should have received a copy of the GNU Lesser General Public
  84951. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  84952. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84953. - Boston, MA 02111-1307, USA. */
  84954. + License along with the GNU C Library; see the file COPYING.LIB. If
  84955. + not, see <http://www.gnu.org/licenses/>. */
  84956. /* Initial value of a spinlock. Most platforms should use zero,
  84957. unless they only implement a "test and clear" operation instead of
  84958. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/bits/libc-lock.h uClibc-git/libpthread/linuxthreads/sysdeps/pthread/bits/libc-lock.h
  84959. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/bits/libc-lock.h 2012-05-15 09:20:09.000000000 +0200
  84960. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/bits/libc-lock.h 2014-07-25 20:36:08.369342872 +0200
  84961. @@ -14,9 +14,8 @@
  84962. Lesser General Public License for more details.
  84963. You should have received a copy of the GNU Lesser General Public
  84964. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  84965. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84966. - Boston, MA 02111-1307, USA. */
  84967. + License along with the GNU C Library; see the file COPYING.LIB. If
  84968. + not, see <http://www.gnu.org/licenses/>. */
  84969. #ifndef _BITS_LIBC_LOCK_H
  84970. #define _BITS_LIBC_LOCK_H 1
  84971. @@ -293,7 +292,7 @@
  84972. library. */
  84973. extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
  84974. - __const pthread_mutexattr_t *__mutex_attr);
  84975. + const pthread_mutexattr_t *__mutex_attr);
  84976. extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
  84977. @@ -312,7 +311,7 @@
  84978. #ifdef __USE_UNIX98
  84979. extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock,
  84980. - __const pthread_rwlockattr_t *__attr);
  84981. + const pthread_rwlockattr_t *__attr);
  84982. extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock);
  84983. @@ -331,7 +330,7 @@
  84984. void (*__destr_function) (void *));
  84985. extern int __pthread_setspecific (pthread_key_t __key,
  84986. - __const void *__pointer);
  84987. + const void *__pointer);
  84988. extern void *__pthread_getspecific (pthread_key_t __key);
  84989. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/bits/libc-tsd.h uClibc-git/libpthread/linuxthreads/sysdeps/pthread/bits/libc-tsd.h
  84990. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/bits/libc-tsd.h 2012-05-15 09:20:09.000000000 +0200
  84991. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/bits/libc-tsd.h 2014-07-25 20:36:08.369342872 +0200
  84992. @@ -13,18 +13,16 @@
  84993. Lesser General Public License for more details.
  84994. You should have received a copy of the GNU Lesser General Public
  84995. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  84996. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  84997. - Boston, MA 02111-1307, USA. */
  84998. + License along with the GNU C Library; see the file COPYING.LIB. If
  84999. + not, see <http://www.gnu.org/licenses/>. */
  85000. #ifndef _BITS_LIBC_TSD_H
  85001. #define _BITS_LIBC_TSD_H 1
  85002. #include <linuxthreads/descr.h>
  85003. +#ifdef __UCLIBC_HAS_TLS__
  85004. #include <tls.h>
  85005. -#if USE_TLS && HAVE___THREAD
  85006. -
  85007. /* When __thread works, the generic definition is what we want. */
  85008. # include <sysdeps/generic/bits/libc-tsd.h>
  85009. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h uClibc-git/libpthread/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h
  85010. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h 2012-05-15 09:20:09.000000000 +0200
  85011. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h 2014-07-25 20:36:08.369342872 +0200
  85012. @@ -19,6 +19,9 @@
  85013. #ifndef _BITS_PTHREADTYPES_H
  85014. #define _BITS_PTHREADTYPES_H 1
  85015. +#define __need_size_t
  85016. +#include <stddef.h>
  85017. +
  85018. #define __need_schedparam
  85019. #include <bits/sched.h>
  85020. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/bits/typesizes.h uClibc-git/libpthread/linuxthreads/sysdeps/pthread/bits/typesizes.h
  85021. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/bits/typesizes.h 2012-05-15 09:20:09.000000000 +0200
  85022. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/bits/typesizes.h 2014-07-25 20:36:08.369342872 +0200
  85023. @@ -13,9 +13,8 @@
  85024. Lesser General Public License for more details.
  85025. You should have received a copy of the GNU Lesser General Public
  85026. - License along with the GNU C Library; if not, write to the Free
  85027. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85028. - 02111-1307 USA. */
  85029. + License along with the GNU C Library; if not, see
  85030. + <http://www.gnu.org/licenses/>. */
  85031. #ifndef _BITS_TYPES_H
  85032. # error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
  85033. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/.cvsignore uClibc-git/libpthread/linuxthreads/sysdeps/pthread/.cvsignore
  85034. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/.cvsignore 2012-05-15 09:20:09.000000000 +0200
  85035. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/.cvsignore 1970-01-01 01:00:00.000000000 +0100
  85036. @@ -1,2 +0,0 @@
  85037. -.cvsignore
  85038. -*.os
  85039. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/errno-loc.c uClibc-git/libpthread/linuxthreads/sysdeps/pthread/errno-loc.c
  85040. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/errno-loc.c 2012-05-15 09:20:09.000000000 +0200
  85041. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/errno-loc.c 2014-07-25 20:36:08.381342935 +0200
  85042. @@ -14,26 +14,25 @@
  85043. Lesser General Public License for more details.
  85044. You should have received a copy of the GNU Lesser General Public
  85045. - License along with the GNU C Library; if not, write to the Free
  85046. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85047. - 02111-1307 USA. */
  85048. + License along with the GNU C Library; if not, see
  85049. + <http://www.gnu.org/licenses/>. */
  85050. #include <errno.h>
  85051. #include <linuxthreads/internals.h>
  85052. #include <sysdep-cancel.h>
  85053. -#if ! USE___THREAD && !RTLD_PRIVATE_ERRNO
  85054. +#if !defined __UCLIBC_HAS_TLS__ && !RTLD_PRIVATE_ERRNO
  85055. #undef errno
  85056. extern int errno;
  85057. #endif
  85058. int *
  85059. -#if ! USE___THREAD
  85060. +#ifndef __UCLIBC_HAS_TLS__
  85061. weak_const_function
  85062. #endif
  85063. __errno_location (void)
  85064. {
  85065. -#if ! USE___THREAD && !defined NOT_IN_libc
  85066. +#if !defined __UCLIBC_HAS_TLS__ && !defined NOT_IN_libc
  85067. if (! SINGLE_THREAD_P)
  85068. {
  85069. pthread_descr self = thread_self();
  85070. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/flockfile.c uClibc-git/libpthread/linuxthreads/sysdeps/pthread/flockfile.c
  85071. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/flockfile.c 2012-05-15 09:20:09.000000000 +0200
  85072. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/flockfile.c 2014-07-25 20:36:08.381342935 +0200
  85073. @@ -13,9 +13,8 @@
  85074. Lesser General Public License for more details.
  85075. You should have received a copy of the GNU Lesser General Public
  85076. - License along with the GNU C Library; if not, write to the Free
  85077. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85078. - 02111-1307 USA. */
  85079. + License along with the GNU C Library; if not, see
  85080. + <http://www.gnu.org/licenses/>. */
  85081. #include <pthread.h>
  85082. #include <stdio.h>
  85083. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/ftrylockfile.c uClibc-git/libpthread/linuxthreads/sysdeps/pthread/ftrylockfile.c
  85084. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/ftrylockfile.c 2012-05-15 09:20:09.000000000 +0200
  85085. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/ftrylockfile.c 2014-07-25 20:36:08.381342935 +0200
  85086. @@ -13,9 +13,8 @@
  85087. Lesser General Public License for more details.
  85088. You should have received a copy of the GNU Lesser General Public
  85089. - License along with the GNU C Library; if not, write to the Free
  85090. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85091. - 02111-1307 USA. */
  85092. + License along with the GNU C Library; if not, see
  85093. + <http://www.gnu.org/licenses/>. */
  85094. #include <errno.h>
  85095. #include <pthread.h>
  85096. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/funlockfile.c uClibc-git/libpthread/linuxthreads/sysdeps/pthread/funlockfile.c
  85097. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/funlockfile.c 2012-05-15 09:20:09.000000000 +0200
  85098. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/funlockfile.c 2014-07-25 20:36:08.381342935 +0200
  85099. @@ -13,9 +13,8 @@
  85100. Lesser General Public License for more details.
  85101. You should have received a copy of the GNU Lesser General Public
  85102. - License along with the GNU C Library; if not, write to the Free
  85103. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85104. - 02111-1307 USA. */
  85105. + License along with the GNU C Library; if not, see
  85106. + <http://www.gnu.org/licenses/>. */
  85107. #include <pthread.h>
  85108. #include <stdio.h>
  85109. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/getcpuclockid.c uClibc-git/libpthread/linuxthreads/sysdeps/pthread/getcpuclockid.c
  85110. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/getcpuclockid.c 2012-05-15 09:20:09.000000000 +0200
  85111. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/getcpuclockid.c 2014-07-25 20:36:08.381342935 +0200
  85112. @@ -13,9 +13,8 @@
  85113. Lesser General Public License for more details.
  85114. You should have received a copy of the GNU Lesser General Public
  85115. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  85116. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  85117. - Boston, MA 02111-1307, USA. */
  85118. + License along with the GNU C Library; see the file COPYING.LIB. If
  85119. + not, see <http://www.gnu.org/licenses/>. */
  85120. #include <errno.h>
  85121. #include <pthread.h>
  85122. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/herrno-loc.c uClibc-git/libpthread/linuxthreads/sysdeps/pthread/herrno-loc.c
  85123. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/herrno-loc.c 2012-05-15 09:20:09.000000000 +0200
  85124. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/herrno-loc.c 2014-07-25 20:36:08.381342935 +0200
  85125. @@ -12,16 +12,15 @@
  85126. Lesser General Public License for more details.
  85127. You should have received a copy of the GNU Lesser General Public
  85128. - License along with the GNU C Library; if not, write to the Free
  85129. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85130. - 02111-1307 USA. */
  85131. + License along with the GNU C Library; if not, see
  85132. + <http://www.gnu.org/licenses/>. */
  85133. #include <netdb.h>
  85134. #include <tls.h>
  85135. #include <linuxthreads/internals.h>
  85136. #include <sysdep-cancel.h>
  85137. -#if ! USE___THREAD
  85138. +#ifndef __UCLIBC_HAS_TLS__
  85139. # undef h_errno
  85140. extern int h_errno;
  85141. #endif
  85142. @@ -31,7 +30,7 @@
  85143. weak_const_function
  85144. __h_errno_location (void)
  85145. {
  85146. -#if ! USE___THREAD
  85147. +#ifndef __UCLIBC_HAS_TLS__
  85148. if (! SINGLE_THREAD_P)
  85149. {
  85150. pthread_descr self = thread_self();
  85151. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/list.h uClibc-git/libpthread/linuxthreads/sysdeps/pthread/list.h
  85152. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/list.h 2012-05-15 09:20:09.000000000 +0200
  85153. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/list.h 2014-07-25 20:36:08.381342935 +0200
  85154. @@ -13,9 +13,8 @@
  85155. Lesser General Public License for more details.
  85156. You should have received a copy of the GNU Lesser General Public
  85157. - License along with the GNU C Library; if not, write to the Free
  85158. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85159. - 02111-1307 USA. */
  85160. + License along with the GNU C Library; if not, see
  85161. + <http://www.gnu.org/licenses/>. */
  85162. #ifndef _LIST_H
  85163. #define _LIST_H 1
  85164. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/malloc-machine.h uClibc-git/libpthread/linuxthreads/sysdeps/pthread/malloc-machine.h
  85165. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/malloc-machine.h 2012-05-15 09:20:09.000000000 +0200
  85166. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/malloc-machine.h 2014-07-25 20:36:08.381342935 +0200
  85167. @@ -14,9 +14,8 @@
  85168. Lesser General Public License for more details.
  85169. You should have received a copy of the GNU Lesser General Public
  85170. - License along with the GNU C Library; if not, write to the Free
  85171. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85172. - 02111-1307 USA. */
  85173. + License along with the GNU C Library; if not, see
  85174. + <http://www.gnu.org/licenses/>. */
  85175. #ifndef _MALLOC_MACHINE_H
  85176. #define _MALLOC_MACHINE_H
  85177. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/not-cancel.h uClibc-git/libpthread/linuxthreads/sysdeps/pthread/not-cancel.h
  85178. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/not-cancel.h 2012-05-15 09:20:09.000000000 +0200
  85179. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/not-cancel.h 2014-07-25 20:36:08.381342935 +0200
  85180. @@ -14,18 +14,26 @@
  85181. Lesser General Public License for more details.
  85182. You should have received a copy of the GNU Lesser General Public
  85183. - License along with the GNU C Library; if not, write to the Free
  85184. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85185. - 02111-1307 USA. */
  85186. + License along with the GNU C Library; if not, see
  85187. + <http://www.gnu.org/licenses/>. */
  85188. #include <sys/types.h>
  85189. #include <sysdep.h>
  85190. /* Uncancelable open. */
  85191. +#if defined __NR_openat && !defined __NR_open
  85192. +#define open_not_cancel(name, flags, mode) \
  85193. + INLINE_SYSCALL (openat, 4, (int) (AT_FDCWD), (const char *) (name), \
  85194. + (flags), (mode))
  85195. +#define open_not_cancel_2(name, flags) \
  85196. + INLINE_SYSCALL (openat, 3, (int) (AT_FDCWD), (const char *) (name), \
  85197. + (flags))
  85198. +#else
  85199. #define open_not_cancel(name, flags, mode) \
  85200. INLINE_SYSCALL (open, 3, (const char *) (name), (flags), (mode))
  85201. #define open_not_cancel_2(name, flags) \
  85202. INLINE_SYSCALL (open, 2, (const char *) (name), (flags))
  85203. +#endif
  85204. /* Uncancelable openat. */
  85205. #if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
  85206. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/posix-timer.h uClibc-git/libpthread/linuxthreads/sysdeps/pthread/posix-timer.h
  85207. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/posix-timer.h 2012-05-15 09:20:09.000000000 +0200
  85208. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/posix-timer.h 2014-07-25 20:36:08.381342935 +0200
  85209. @@ -14,9 +14,8 @@
  85210. Lesser General Public License for more details.
  85211. You should have received a copy of the GNU Lesser General Public
  85212. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  85213. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  85214. - Boston, MA 02111-1307, USA. */
  85215. + License along with the GNU C Library; see the file COPYING.LIB. If
  85216. + not, see <http://www.gnu.org/licenses/>. */
  85217. #include <limits.h>
  85218. #include <signal.h>
  85219. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/pthread-functions.h uClibc-git/libpthread/linuxthreads/sysdeps/pthread/pthread-functions.h
  85220. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/pthread-functions.h 2012-05-15 09:20:09.000000000 +0200
  85221. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/pthread-functions.h 2014-07-25 20:36:08.381342935 +0200
  85222. @@ -13,9 +13,8 @@
  85223. Lesser General Public License for more details.
  85224. You should have received a copy of the GNU Lesser General Public
  85225. - License along with the GNU C Library; if not, write to the Free
  85226. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85227. - 02111-1307 USA. */
  85228. + License along with the GNU C Library; if not, see
  85229. + <http://www.gnu.org/licenses/>. */
  85230. #ifndef _PTHREAD_FUNCTIONS_H
  85231. #define _PTHREAD_FUNCTIONS_H 1
  85232. @@ -72,10 +71,12 @@
  85233. void (*ptr_pthread_cleanup_upto) (__jmp_buf target,
  85234. char *targetframe);
  85235. pthread_descr (*ptr_pthread_thread_self) (void);
  85236. +#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__
  85237. int (*ptr_pthread_internal_tsd_set) (int key, const void *pointer);
  85238. void * (*ptr_pthread_internal_tsd_get) (int key);
  85239. void ** __attribute__ ((__const__))
  85240. (*ptr_pthread_internal_tsd_address) (int key);
  85241. +#endif
  85242. int (*ptr_pthread_sigaction) (int sig, const struct sigaction * act,
  85243. struct sigaction *oact);
  85244. int (*ptr_pthread_sigwait) (const sigset_t *set, int *sig);
  85245. @@ -95,4 +96,6 @@
  85246. /* Variable in libc.so. */
  85247. extern struct pthread_functions __libc_pthread_functions attribute_hidden;
  85248. +extern int * __libc_pthread_init (const struct pthread_functions *functions);
  85249. +
  85250. #endif /* pthread-functions.h */
  85251. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/pthread.h uClibc-git/libpthread/linuxthreads/sysdeps/pthread/pthread.h
  85252. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/pthread.h 2012-05-15 09:20:09.000000000 +0200
  85253. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/pthread.h 2014-07-25 20:36:08.381342935 +0200
  85254. @@ -161,7 +161,7 @@
  85255. if ATTR is NULL), and call function START_ROUTINE with given
  85256. arguments ARG. */
  85257. extern int pthread_create (pthread_t *__restrict __threadp,
  85258. - __const pthread_attr_t *__restrict __attr,
  85259. + const pthread_attr_t *__restrict __attr,
  85260. void *(*__start_routine) (void *),
  85261. void *__restrict __arg) __THROW;
  85262. @@ -201,16 +201,16 @@
  85263. int __detachstate) __THROW;
  85264. /* Return in *DETACHSTATE the `detachstate' attribute in *ATTR. */
  85265. -extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
  85266. +extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr,
  85267. int *__detachstate) __THROW;
  85268. /* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */
  85269. extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
  85270. - __const struct sched_param *__restrict
  85271. + const struct sched_param *__restrict
  85272. __param) __THROW;
  85273. /* Return in *PARAM the scheduling parameters of *ATTR. */
  85274. -extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
  85275. +extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict
  85276. __attr,
  85277. struct sched_param *__restrict __param)
  85278. __THROW;
  85279. @@ -220,7 +220,7 @@
  85280. __THROW;
  85281. /* Return in *POLICY the scheduling policy of *ATTR. */
  85282. -extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
  85283. +extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict
  85284. __attr, int *__restrict __policy)
  85285. __THROW;
  85286. @@ -229,7 +229,7 @@
  85287. int __inherit) __THROW;
  85288. /* Return in *INHERIT the scheduling inheritance mode of *ATTR. */
  85289. -extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
  85290. +extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict
  85291. __attr, int *__restrict __inherit)
  85292. __THROW;
  85293. @@ -238,7 +238,7 @@
  85294. __THROW;
  85295. /* Return in *SCOPE the scheduling contention scope of *ATTR. */
  85296. -extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
  85297. +extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr,
  85298. int *__restrict __scope) __THROW;
  85299. #ifdef __USE_UNIX98
  85300. @@ -247,7 +247,7 @@
  85301. size_t __guardsize) __THROW;
  85302. /* Get the size of the guard area at the bottom of the thread. */
  85303. -extern int pthread_attr_getguardsize (__const pthread_attr_t *__restrict
  85304. +extern int pthread_attr_getguardsize (const pthread_attr_t *__restrict
  85305. __attr, size_t *__restrict __guardsize)
  85306. __THROW;
  85307. #endif
  85308. @@ -261,7 +261,7 @@
  85309. void *__stackaddr) __THROW;
  85310. /* Return the previously set address for the stack. */
  85311. -extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
  85312. +extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict
  85313. __attr, void **__restrict __stackaddr)
  85314. __THROW;
  85315. #endif
  85316. @@ -274,7 +274,7 @@
  85317. size_t __stacksize) __THROW;
  85318. /* Return the previously set address for the stack. */
  85319. -extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
  85320. +extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr,
  85321. void **__restrict __stackaddr,
  85322. size_t *__restrict __stacksize) __THROW;
  85323. #endif
  85324. @@ -286,7 +286,7 @@
  85325. size_t __stacksize) __THROW;
  85326. /* Return the currently used minimal stack size. */
  85327. -extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
  85328. +extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict
  85329. __attr, size_t *__restrict __stacksize)
  85330. __THROW;
  85331. @@ -302,7 +302,7 @@
  85332. /* Set the scheduling parameters for TARGET_THREAD according to POLICY
  85333. and *PARAM. */
  85334. extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
  85335. - __const struct sched_param *__param)
  85336. + const struct sched_param *__param)
  85337. __THROW;
  85338. /* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */
  85339. @@ -324,7 +324,7 @@
  85340. /* Initialize MUTEX using attributes in *MUTEX_ATTR, or use the
  85341. default values if later is NULL. */
  85342. extern int pthread_mutex_init (pthread_mutex_t *__restrict __mutex,
  85343. - __const pthread_mutexattr_t *__restrict
  85344. + const pthread_mutexattr_t *__restrict
  85345. __mutex_attr) __THROW;
  85346. /* Destroy MUTEX. */
  85347. @@ -339,7 +339,7 @@
  85348. #ifdef __USE_XOPEN2K
  85349. /* Wait until lock becomes available, or specified time passes. */
  85350. extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
  85351. - __const struct timespec *__restrict
  85352. + const struct timespec *__restrict
  85353. __abstime) __THROW;
  85354. #endif
  85355. @@ -357,7 +357,7 @@
  85356. extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __THROW;
  85357. /* Get the process-shared flag of the mutex attribute ATTR. */
  85358. -extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
  85359. +extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t *
  85360. __restrict __attr,
  85361. int *__restrict __pshared) __THROW;
  85362. @@ -373,7 +373,7 @@
  85363. __THROW;
  85364. /* Return in *KIND the mutex kind attribute in *ATTR. */
  85365. -extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
  85366. +extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict
  85367. __attr, int *__restrict __kind) __THROW;
  85368. #endif
  85369. @@ -383,7 +383,7 @@
  85370. /* Initialize condition variable COND using attributes ATTR, or use
  85371. the default values if later is NULL. */
  85372. extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
  85373. - __const pthread_condattr_t *__restrict
  85374. + const pthread_condattr_t *__restrict
  85375. __cond_attr) __THROW;
  85376. /* Destroy condition variable COND. */
  85377. @@ -406,7 +406,7 @@
  85378. (00:00:00 GMT, January 1, 1970). */
  85379. extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
  85380. pthread_mutex_t *__restrict __mutex,
  85381. - __const struct timespec *__restrict
  85382. + const struct timespec *__restrict
  85383. __abstime);
  85384. /* Functions for handling condition variable attributes. */
  85385. @@ -418,7 +418,7 @@
  85386. extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __THROW;
  85387. /* Get the process-shared flag of the condition variable attribute ATTR. */
  85388. -extern int pthread_condattr_getpshared (__const pthread_condattr_t *
  85389. +extern int pthread_condattr_getpshared (const pthread_condattr_t *
  85390. __restrict __attr,
  85391. int *__restrict __pshared) __THROW;
  85392. @@ -433,7 +433,7 @@
  85393. /* Initialize read-write lock RWLOCK using attributes ATTR, or use
  85394. the default values if later is NULL. */
  85395. extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
  85396. - __const pthread_rwlockattr_t *__restrict
  85397. + const pthread_rwlockattr_t *__restrict
  85398. __attr) __THROW;
  85399. /* Destroy read-write lock RWLOCK. */
  85400. @@ -448,7 +448,7 @@
  85401. # ifdef __USE_XOPEN2K
  85402. /* Try to acquire read lock for RWLOCK or return after specfied time. */
  85403. extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
  85404. - __const struct timespec *__restrict
  85405. + const struct timespec *__restrict
  85406. __abstime) __THROW;
  85407. # endif
  85408. @@ -461,7 +461,7 @@
  85409. # ifdef __USE_XOPEN2K
  85410. /* Try to acquire write lock for RWLOCK or return after specfied time. */
  85411. extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
  85412. - __const struct timespec *__restrict
  85413. + const struct timespec *__restrict
  85414. __abstime) __THROW;
  85415. # endif
  85416. @@ -478,7 +478,7 @@
  85417. extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) __THROW;
  85418. /* Return current setting of process-shared attribute of ATTR in PSHARED. */
  85419. -extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
  85420. +extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *
  85421. __restrict __attr,
  85422. int *__restrict __pshared) __THROW;
  85423. @@ -487,7 +487,7 @@
  85424. int __pshared) __THROW;
  85425. /* Return current setting of reader/writer preference. */
  85426. -extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *__attr,
  85427. +extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *__attr,
  85428. int *__pref) __THROW;
  85429. /* Set reader/write preference. */
  85430. @@ -520,7 +520,7 @@
  85431. /* Barriers are a also a new feature in 1003.1j-2000. */
  85432. extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
  85433. - __const pthread_barrierattr_t *__restrict
  85434. + const pthread_barrierattr_t *__restrict
  85435. __attr, unsigned int __count) __THROW;
  85436. extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) __THROW;
  85437. @@ -529,7 +529,7 @@
  85438. extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) __THROW;
  85439. -extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
  85440. +extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *
  85441. __restrict __attr,
  85442. int *__restrict __pshared) __THROW;
  85443. @@ -556,7 +556,7 @@
  85444. /* Store POINTER in the thread-specific data slot identified by KEY. */
  85445. extern int pthread_setspecific (pthread_key_t __key,
  85446. - __const void *__pointer) __THROW;
  85447. + const void *__pointer) __THROW;
  85448. /* Return current value of the thread-specific data slot identified by KEY. */
  85449. extern void *pthread_getspecific (pthread_key_t __key) __THROW;
  85450. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/pt-initfini.c uClibc-git/libpthread/linuxthreads/sysdeps/pthread/pt-initfini.c
  85451. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/pt-initfini.c 2012-05-15 09:20:09.000000000 +0200
  85452. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/pt-initfini.c 2014-07-25 20:36:08.381342935 +0200
  85453. @@ -23,8 +23,7 @@
  85454. You should have received a copy of the GNU Lesser General Public
  85455. License along with the GNU C Library; see the file COPYING.LIB. If not,
  85456. - write to the Free Software Foundation, 59 Temple Place - Suite 330,
  85457. - Boston, MA 02111-1307, USA. */
  85458. + see <http://www.gnu.org/licenses/>. */
  85459. /* This file is compiled into assembly code which is then munged by a sed
  85460. script into two files: crti.s and crtn.s.
  85461. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/ptlongjmp.c uClibc-git/libpthread/linuxthreads/sysdeps/pthread/ptlongjmp.c
  85462. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/ptlongjmp.c 2012-05-15 09:20:09.000000000 +0200
  85463. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/ptlongjmp.c 2014-07-25 20:36:08.381342935 +0200
  85464. @@ -19,13 +19,6 @@
  85465. #include "pthread.h"
  85466. #include "internals.h"
  85467. -/* These functions are not declared anywhere since they shouldn't be
  85468. - used at another place but here. */
  85469. -extern void __libc_siglongjmp (sigjmp_buf env, int val)
  85470. - __attribute__ ((noreturn));
  85471. -extern void __libc_longjmp (sigjmp_buf env, int val)
  85472. - __attribute__ ((noreturn));
  85473. -
  85474. #ifdef SHARED
  85475. void siglongjmp (sigjmp_buf env, int val)
  85476. {
  85477. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/res-state.c uClibc-git/libpthread/linuxthreads/sysdeps/pthread/res-state.c
  85478. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/res-state.c 2012-05-15 09:20:09.000000000 +0200
  85479. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/res-state.c 2014-07-25 20:36:08.381342935 +0200
  85480. @@ -12,28 +12,27 @@
  85481. Lesser General Public License for more details.
  85482. You should have received a copy of the GNU Lesser General Public
  85483. - License along with the GNU C Library; if not, write to the Free
  85484. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85485. - 02111-1307 USA. */
  85486. + License along with the GNU C Library; if not, see
  85487. + <http://www.gnu.org/licenses/>. */
  85488. #include <resolv.h>
  85489. #include <tls.h>
  85490. #include <linuxthreads/internals.h>
  85491. #include <sysdep-cancel.h>
  85492. -#if ! USE___THREAD
  85493. +#ifndef __UCLIBC_HAS_TLS__
  85494. # undef _res
  85495. extern struct __res_state _res;
  85496. #endif
  85497. /* When threaded, _res may be a per-thread variable. */
  85498. struct __res_state *
  85499. -#if ! USE___THREAD
  85500. +#ifndef __UCLIBC_HAS_TLS__
  85501. weak_const_function
  85502. #endif
  85503. __res_state (void)
  85504. {
  85505. -#if ! USE___THREAD
  85506. +#ifndef __UCLIBC_HAS_TLS__
  85507. if (! SINGLE_THREAD_P)
  85508. {
  85509. pthread_descr self = thread_self();
  85510. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/sigaction.c uClibc-git/libpthread/linuxthreads/sysdeps/pthread/sigaction.c
  85511. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/sigaction.c 2012-05-15 09:20:09.000000000 +0200
  85512. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/sigaction.c 2014-07-25 20:36:08.381342935 +0200
  85513. @@ -13,9 +13,8 @@
  85514. Lesser General Public License for more details.
  85515. You should have received a copy of the GNU Lesser General Public
  85516. - License along with the GNU C Library; if not, write to the Free
  85517. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85518. - 02111-1307 USA. */
  85519. + License along with the GNU C Library; if not, see
  85520. + <http://www.gnu.org/licenses/>. */
  85521. /* Somebody please explain what's going on here. --vda */
  85522. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_create.c uClibc-git/libpthread/linuxthreads/sysdeps/pthread/timer_create.c
  85523. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_create.c 2012-05-15 09:20:09.000000000 +0200
  85524. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/timer_create.c 2014-07-25 20:36:08.381342935 +0200
  85525. @@ -13,9 +13,8 @@
  85526. Lesser General Public License for more details.
  85527. You should have received a copy of the GNU Lesser General Public
  85528. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  85529. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  85530. - Boston, MA 02111-1307, USA. */
  85531. + License along with the GNU C Library; see the file COPYING.LIB. If
  85532. + not, see <http://www.gnu.org/licenses/>. */
  85533. #include <errno.h>
  85534. #include <signal.h>
  85535. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_delete.c uClibc-git/libpthread/linuxthreads/sysdeps/pthread/timer_delete.c
  85536. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_delete.c 2012-05-15 09:20:09.000000000 +0200
  85537. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/timer_delete.c 2014-07-25 20:36:08.381342935 +0200
  85538. @@ -13,9 +13,8 @@
  85539. Lesser General Public License for more details.
  85540. You should have received a copy of the GNU Lesser General Public
  85541. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  85542. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  85543. - Boston, MA 02111-1307, USA. */
  85544. + License along with the GNU C Library; see the file COPYING.LIB. If
  85545. + not, see <http://www.gnu.org/licenses/>. */
  85546. #include <assert.h>
  85547. #include <errno.h>
  85548. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_getoverr.c uClibc-git/libpthread/linuxthreads/sysdeps/pthread/timer_getoverr.c
  85549. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_getoverr.c 2012-05-15 09:20:09.000000000 +0200
  85550. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/timer_getoverr.c 2014-07-25 20:36:08.381342935 +0200
  85551. @@ -13,9 +13,8 @@
  85552. Lesser General Public License for more details.
  85553. You should have received a copy of the GNU Lesser General Public
  85554. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  85555. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  85556. - Boston, MA 02111-1307, USA. */
  85557. + License along with the GNU C Library; see the file COPYING.LIB. If
  85558. + not, see <http://www.gnu.org/licenses/>. */
  85559. #include <errno.h>
  85560. #include <pthread.h>
  85561. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_gettime.c uClibc-git/libpthread/linuxthreads/sysdeps/pthread/timer_gettime.c
  85562. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_gettime.c 2012-05-15 09:20:09.000000000 +0200
  85563. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/timer_gettime.c 2014-07-25 20:36:08.381342935 +0200
  85564. @@ -13,9 +13,8 @@
  85565. Lesser General Public License for more details.
  85566. You should have received a copy of the GNU Lesser General Public
  85567. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  85568. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  85569. - Boston, MA 02111-1307, USA. */
  85570. + License along with the GNU C Library; see the file COPYING.LIB. If
  85571. + not, see <http://www.gnu.org/licenses/>. */
  85572. #include <errno.h>
  85573. #include <pthread.h>
  85574. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_routines.c uClibc-git/libpthread/linuxthreads/sysdeps/pthread/timer_routines.c
  85575. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_routines.c 2012-05-15 09:20:09.000000000 +0200
  85576. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/timer_routines.c 2014-07-25 20:36:08.381342935 +0200
  85577. @@ -14,9 +14,8 @@
  85578. Lesser General Public License for more details.
  85579. You should have received a copy of the GNU Lesser General Public
  85580. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  85581. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  85582. - Boston, MA 02111-1307, USA. */
  85583. + License along with the GNU C Library; see the file COPYING.LIB. If
  85584. + not, see <http://www.gnu.org/licenses/>. */
  85585. #include <assert.h>
  85586. #include <errno.h>
  85587. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_settime.c uClibc-git/libpthread/linuxthreads/sysdeps/pthread/timer_settime.c
  85588. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/timer_settime.c 2012-05-15 09:20:09.000000000 +0200
  85589. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/timer_settime.c 2014-07-25 20:36:08.381342935 +0200
  85590. @@ -13,9 +13,8 @@
  85591. Lesser General Public License for more details.
  85592. You should have received a copy of the GNU Lesser General Public
  85593. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  85594. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  85595. - Boston, MA 02111-1307, USA. */
  85596. + License along with the GNU C Library; see the file COPYING.LIB. If
  85597. + not, see <http://www.gnu.org/licenses/>. */
  85598. #include <errno.h>
  85599. #include <pthread.h>
  85600. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/tst-timer.c uClibc-git/libpthread/linuxthreads/sysdeps/pthread/tst-timer.c
  85601. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/pthread/tst-timer.c 2012-05-15 09:20:09.000000000 +0200
  85602. +++ uClibc-git/libpthread/linuxthreads/sysdeps/pthread/tst-timer.c 2014-07-25 20:36:08.381342935 +0200
  85603. @@ -14,9 +14,8 @@
  85604. Lesser General Public License for more details.
  85605. You should have received a copy of the GNU Lesser General Public
  85606. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  85607. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  85608. - Boston, MA 02111-1307, USA. */
  85609. + License along with the GNU C Library; see the file COPYING.LIB. If
  85610. + not, see <http://www.gnu.org/licenses/>. */
  85611. #include <errno.h>
  85612. #include <signal.h>
  85613. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/s390/pspinlock.c uClibc-git/libpthread/linuxthreads/sysdeps/s390/pspinlock.c
  85614. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/s390/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
  85615. +++ uClibc-git/libpthread/linuxthreads/sysdeps/s390/pspinlock.c 2014-07-25 20:36:08.393342999 +0200
  85616. @@ -14,9 +14,8 @@
  85617. Lesser General Public License for more details.
  85618. You should have received a copy of the GNU Lesser General Public
  85619. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  85620. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  85621. - Boston, MA 02111-1307, USA. */
  85622. + License along with the GNU C Library; see the file COPYING.LIB. If
  85623. + not, see <http://www.gnu.org/licenses/>. */
  85624. #include <errno.h>
  85625. #include <pthread.h>
  85626. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/s390/s390-32/pt-machine.h uClibc-git/libpthread/linuxthreads/sysdeps/s390/s390-32/pt-machine.h
  85627. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/s390/s390-32/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  85628. +++ uClibc-git/libpthread/linuxthreads/sysdeps/s390/s390-32/pt-machine.h 2014-07-25 20:36:08.413343103 +0200
  85629. @@ -15,9 +15,8 @@
  85630. Lesser General Public License for more details.
  85631. You should have received a copy of the GNU Lesser General Public
  85632. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  85633. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  85634. - Boston, MA 02111-1307, USA. */
  85635. + License along with the GNU C Library; see the file COPYING.LIB. If
  85636. + not, see <http://www.gnu.org/licenses/>. */
  85637. #ifndef _PT_MACHINE_H
  85638. #define _PT_MACHINE_H 1
  85639. @@ -58,7 +57,7 @@
  85640. #define CURRENT_STACK_FRAME stack_pointer
  85641. register char * stack_pointer __asm__ ("15");
  85642. -#ifdef USE_TLS
  85643. +#ifdef __UCLIBC_HAS_TLS__
  85644. /* Return the thread descriptor for the current thread. */
  85645. # define THREAD_SELF ((pthread_descr) __builtin_thread_pointer ())
  85646. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/s390/s390-64/pt-machine.h uClibc-git/libpthread/linuxthreads/sysdeps/s390/s390-64/pt-machine.h
  85647. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/s390/s390-64/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  85648. +++ uClibc-git/libpthread/linuxthreads/sysdeps/s390/s390-64/pt-machine.h 2014-07-25 20:36:08.421343145 +0200
  85649. @@ -15,9 +15,8 @@
  85650. Lesser General Public License for more details.
  85651. You should have received a copy of the GNU Lesser General Public
  85652. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  85653. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  85654. - Boston, MA 02111-1307, USA. */
  85655. + License along with the GNU C Library; see the file COPYING.LIB. If
  85656. + not, see <http://www.gnu.org/licenses/>. */
  85657. #ifndef _PT_MACHINE_H
  85658. #define _PT_MACHINE_H 1
  85659. @@ -58,7 +57,7 @@
  85660. #define CURRENT_STACK_FRAME stack_pointer
  85661. register char * stack_pointer __asm__ ("15");
  85662. -#ifdef USE_TLS
  85663. +#ifdef __UCLIBC_HAS_TLS__
  85664. /* Return the thread descriptor for the current thread. */
  85665. # define THREAD_SELF ((pthread_descr) __builtin_thread_pointer ())
  85666. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/s390/tls.h uClibc-git/libpthread/linuxthreads/sysdeps/s390/tls.h
  85667. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/s390/tls.h 2012-05-15 09:20:09.000000000 +0200
  85668. +++ uClibc-git/libpthread/linuxthreads/sysdeps/s390/tls.h 2014-07-25 20:36:08.421343145 +0200
  85669. @@ -13,9 +13,8 @@
  85670. Lesser General Public License for more details.
  85671. You should have received a copy of the GNU Lesser General Public
  85672. - License along with the GNU C Library; if not, write to the Free
  85673. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85674. - 02111-1307 USA. */
  85675. + License along with the GNU C Library; if not, see
  85676. + <http://www.gnu.org/licenses/>. */
  85677. #ifndef _TLS_H
  85678. #define _TLS_H
  85679. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sh/pspinlock.c uClibc-git/libpthread/linuxthreads/sysdeps/sh/pspinlock.c
  85680. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sh/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
  85681. +++ uClibc-git/libpthread/linuxthreads/sysdeps/sh/pspinlock.c 2014-07-25 20:36:08.433343208 +0200
  85682. @@ -13,9 +13,8 @@
  85683. Lesser General Public License for more details.
  85684. You should have received a copy of the GNU Lesser General Public
  85685. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  85686. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  85687. - Boston, MA 02111-1307, USA. */
  85688. + License along with the GNU C Library; see the file COPYING.LIB. If
  85689. + not, see <http://www.gnu.org/licenses/>. */
  85690. #include <errno.h>
  85691. #include <pthread.h>
  85692. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sh/pt-machine.h uClibc-git/libpthread/linuxthreads/sysdeps/sh/pt-machine.h
  85693. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sh/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  85694. +++ uClibc-git/libpthread/linuxthreads/sysdeps/sh/pt-machine.h 2014-07-25 20:36:08.433343208 +0200
  85695. @@ -15,9 +15,8 @@
  85696. Lesser General Public License for more details.
  85697. You should have received a copy of the GNU Lesser General Public
  85698. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  85699. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  85700. - Boston, MA 02111-1307, USA. */
  85701. + License along with the GNU C Library; see the file COPYING.LIB. If
  85702. + not, see <http://www.gnu.org/licenses/>. */
  85703. #ifndef _PT_MACHINE_H
  85704. #define _PT_MACHINE_H 1
  85705. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sh/tcb-offsets.sym uClibc-git/libpthread/linuxthreads/sysdeps/sh/tcb-offsets.sym
  85706. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sh/tcb-offsets.sym 2012-05-15 09:20:09.000000000 +0200
  85707. +++ uClibc-git/libpthread/linuxthreads/sysdeps/sh/tcb-offsets.sym 2014-07-25 20:36:08.433343208 +0200
  85708. @@ -2,7 +2,7 @@
  85709. #include <tls.h>
  85710. --
  85711. -#ifdef USE_TLS
  85712. +#ifdef __UCLIBC_HAS_TLS__
  85713. MULTIPLE_THREADS_OFFSET offsetof (struct _pthread_descr_struct, p_multiple_threads)
  85714. TLS_PRE_TCB_SIZE sizeof (struct _pthread_descr_struct)
  85715. #else
  85716. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sh/tls.h uClibc-git/libpthread/linuxthreads/sysdeps/sh/tls.h
  85717. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sh/tls.h 2012-05-15 09:20:09.000000000 +0200
  85718. +++ uClibc-git/libpthread/linuxthreads/sysdeps/sh/tls.h 2014-07-25 20:36:08.433343208 +0200
  85719. @@ -13,9 +13,8 @@
  85720. Lesser General Public License for more details.
  85721. You should have received a copy of the GNU Lesser General Public
  85722. - License along with the GNU C Library; if not, write to the Free
  85723. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85724. - 02111-1307 USA. */
  85725. + License along with the GNU C Library; if not, see
  85726. + <http://www.gnu.org/licenses/>. */
  85727. #ifndef _TLS_H
  85728. #define _TLS_H
  85729. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/sparc32/pspinlock.c uClibc-git/libpthread/linuxthreads/sysdeps/sparc/sparc32/pspinlock.c
  85730. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/sparc32/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
  85731. +++ uClibc-git/libpthread/linuxthreads/sysdeps/sparc/sparc32/pspinlock.c 2014-07-25 20:36:08.457343333 +0200
  85732. @@ -13,9 +13,8 @@
  85733. Lesser General Public License for more details.
  85734. You should have received a copy of the GNU Lesser General Public
  85735. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  85736. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  85737. - Boston, MA 02111-1307, USA. */
  85738. + License along with the GNU C Library; see the file COPYING.LIB. If
  85739. + not, see <http://www.gnu.org/licenses/>. */
  85740. #include <errno.h>
  85741. #include <pthread.h>
  85742. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h uClibc-git/libpthread/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h
  85743. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  85744. +++ uClibc-git/libpthread/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h 2014-07-25 20:36:08.457343333 +0200
  85745. @@ -15,9 +15,8 @@
  85746. Lesser General Public License for more details.
  85747. You should have received a copy of the GNU Lesser General Public
  85748. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  85749. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  85750. - Boston, MA 02111-1307, USA. */
  85751. + License along with the GNU C Library; see the file COPYING.LIB. If
  85752. + not, see <http://www.gnu.org/licenses/>. */
  85753. #ifndef _PT_MACHINE_H
  85754. #define _PT_MACHINE_H 1
  85755. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/sparc32/sparcv9/pspinlock.c uClibc-git/libpthread/linuxthreads/sysdeps/sparc/sparc32/sparcv9/pspinlock.c
  85756. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/sparc32/sparcv9/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
  85757. +++ uClibc-git/libpthread/linuxthreads/sysdeps/sparc/sparc32/sparcv9/pspinlock.c 2014-07-25 20:36:08.469343397 +0200
  85758. @@ -13,9 +13,8 @@
  85759. Lesser General Public License for more details.
  85760. You should have received a copy of the GNU Lesser General Public
  85761. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  85762. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  85763. - Boston, MA 02111-1307, USA. */
  85764. + License along with the GNU C Library; see the file COPYING.LIB. If
  85765. + not, see <http://www.gnu.org/licenses/>. */
  85766. #include <errno.h>
  85767. #include <pthread.h>
  85768. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/sparc64/pspinlock.c uClibc-git/libpthread/linuxthreads/sysdeps/sparc/sparc64/pspinlock.c
  85769. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/sparc64/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
  85770. +++ uClibc-git/libpthread/linuxthreads/sysdeps/sparc/sparc64/pspinlock.c 2014-07-25 20:36:08.485343481 +0200
  85771. @@ -13,9 +13,8 @@
  85772. Lesser General Public License for more details.
  85773. You should have received a copy of the GNU Lesser General Public
  85774. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  85775. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  85776. - Boston, MA 02111-1307, USA. */
  85777. + License along with the GNU C Library; see the file COPYING.LIB. If
  85778. + not, see <http://www.gnu.org/licenses/>. */
  85779. #include <errno.h>
  85780. #include <pthread.h>
  85781. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h uClibc-git/libpthread/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h
  85782. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  85783. +++ uClibc-git/libpthread/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h 2014-07-25 20:36:08.485343481 +0200
  85784. @@ -16,8 +16,7 @@
  85785. You should have received a copy of the GNU Lesser General Public
  85786. License along with the GNU C Library; see the file COPYING.LIB. If
  85787. - not, write to the Free Software Foundation, Inc.,
  85788. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  85789. + not, see <http://www.gnu.org/licenses/>. */
  85790. #ifndef _PT_MACHINE_H
  85791. #define _PT_MACHINE_H 1
  85792. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/tls.h uClibc-git/libpthread/linuxthreads/sysdeps/sparc/tls.h
  85793. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/sparc/tls.h 2012-05-15 09:20:09.000000000 +0200
  85794. +++ uClibc-git/libpthread/linuxthreads/sysdeps/sparc/tls.h 2014-07-25 20:36:08.485343481 +0200
  85795. @@ -13,9 +13,8 @@
  85796. Lesser General Public License for more details.
  85797. You should have received a copy of the GNU Lesser General Public
  85798. - License along with the GNU C Library; if not, write to the Free
  85799. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85800. - 02111-1307 USA. */
  85801. + License along with the GNU C Library; if not, see
  85802. + <http://www.gnu.org/licenses/>. */
  85803. #ifndef _TLS_H
  85804. #define _TLS_H
  85805. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/allocalim.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/allocalim.h
  85806. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/allocalim.h 2012-05-15 09:20:09.000000000 +0200
  85807. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/allocalim.h 2014-07-25 20:36:08.501343564 +0200
  85808. @@ -14,8 +14,7 @@
  85809. You should have received a copy of the GNU Library General Public
  85810. License along with the GNU C Library; see the file COPYING.LIB. If not,
  85811. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  85812. - Boston, MA 02111-1307, USA. */
  85813. + see <http://www.gnu.org/licenses/>. */
  85814. #include <limits.h>
  85815. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/allocrtsig.c uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/allocrtsig.c
  85816. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/allocrtsig.c 2012-05-15 09:20:09.000000000 +0200
  85817. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/allocrtsig.c 2014-07-25 20:36:08.501343564 +0200
  85818. @@ -14,9 +14,8 @@
  85819. Lesser General Public License for more details.
  85820. You should have received a copy of the GNU Lesser General Public
  85821. - License along with the GNU C Library; if not, write to the Free
  85822. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85823. - 02111-1307 USA. */
  85824. + License along with the GNU C Library; if not, see
  85825. + <http://www.gnu.org/licenses/>. */
  85826. #include <signal.h>
  85827. @@ -70,6 +69,7 @@
  85828. strong_alias (__libc_current_sigrtmax, __libc_current_sigrtmax_private)
  85829. libc_hidden_def (__libc_current_sigrtmax)
  85830. +#if 0
  85831. /* Allocate real-time signal with highest/lowest available
  85832. priority. Please note that we don't use a lock since we assume
  85833. this function to be called at program start. */
  85834. @@ -85,3 +85,4 @@
  85835. return high ? current_rtmin++ : current_rtmax--;
  85836. }
  85837. strong_alias (__libc_allocate_rtsig, __libc_allocate_rtsig_private)
  85838. +#endif
  85839. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h
  85840. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h 2012-05-15 09:20:09.000000000 +0200
  85841. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h 2014-07-25 20:36:08.529343711 +0200
  85842. @@ -13,9 +13,8 @@
  85843. Lesser General Public License for more details.
  85844. You should have received a copy of the GNU Lesser General Public
  85845. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  85846. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  85847. - Boston, MA 02111-1307, USA. */
  85848. + License along with the GNU C Library; see the file COPYING.LIB. If
  85849. + not, see <http://www.gnu.org/licenses/>. */
  85850. /* The kernel header pollutes the namespace with the NR_OPEN symbol
  85851. and defines LINK_MAX although filesystems have different maxima. A
  85852. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
  85853. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h 2012-05-15 09:20:09.000000000 +0200
  85854. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h 2014-07-25 20:36:08.529343711 +0200
  85855. @@ -13,9 +13,8 @@
  85856. Lesser General Public License for more details.
  85857. You should have received a copy of the GNU Lesser General Public
  85858. - License along with the GNU C Library; if not, write to the Free
  85859. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85860. - 02111-1307 USA. */
  85861. + License along with the GNU C Library; if not, see
  85862. + <http://www.gnu.org/licenses/>. */
  85863. #ifndef _BITS_TYPES_H
  85864. # error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
  85865. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S
  85866. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S 2012-05-15 09:20:09.000000000 +0200
  85867. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S 2014-07-25 20:36:08.529343711 +0200
  85868. @@ -13,9 +13,8 @@
  85869. Lesser General Public License for more details.
  85870. You should have received a copy of the GNU Lesser General Public
  85871. - License along with the GNU C Library; if not, write to the Free
  85872. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85873. - 02111-1307 USA. */
  85874. + License along with the GNU C Library; if not, see
  85875. + <http://www.gnu.org/licenses/>. */
  85876. #include <sysdep.h>
  85877. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h
  85878. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  85879. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2014-07-25 20:36:08.529343711 +0200
  85880. @@ -12,9 +12,8 @@
  85881. Lesser General Public License for more details.
  85882. You should have received a copy of the GNU Lesser General Public
  85883. - License along with the GNU C Library; if not, write to the Free
  85884. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85885. - 02111-1307 USA. */
  85886. + License along with the GNU C Library; if not, see
  85887. + <http://www.gnu.org/licenses/>. */
  85888. #include <sysdep.h>
  85889. #ifndef __ASSEMBLER__
  85890. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S
  85891. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S 2012-05-15 09:20:09.000000000 +0200
  85892. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S 2014-07-25 20:36:08.529343711 +0200
  85893. @@ -12,9 +12,8 @@
  85894. Lesser General Public License for more details.
  85895. You should have received a copy of the GNU Lesser General Public
  85896. - License along with the GNU C Library; if not, write to the Free
  85897. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85898. - 02111-1307 USA. */
  85899. + License along with the GNU C Library; if not, see
  85900. + <http://www.gnu.org/licenses/>. */
  85901. #include <sysdep-cancel.h>
  85902. @@ -30,7 +29,7 @@
  85903. #ifdef SHARED
  85904. ldq t0, __libc_pthread_functions(gp) !gprel
  85905. - bne t0, HIDDEN_JUMPTARGET (__fork) !samegp
  85906. + bne t0, HIDDEN_JUMPTARGET (fork) !samegp
  85907. #else
  85908. .weak pthread_create
  85909. ldq t0, pthread_create(gp) !literal
  85910. @@ -50,7 +49,7 @@
  85911. cfi_adjust_cfa_offset(16)
  85912. stq ra, 0(sp)
  85913. cfi_offset(ra, -16)
  85914. - jsr ra, HIDDEN_JUMPTARGET (__fork)
  85915. + jsr ra, HIDDEN_JUMPTARGET (fork)
  85916. ldgp gp, 0(ra)
  85917. ldq ra, 0(sp)
  85918. addq sp, 16, sp
  85919. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
  85920. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  85921. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h 2014-07-25 20:36:08.537343753 +0200
  85922. @@ -13,9 +13,8 @@
  85923. Lesser General Public License for more details.
  85924. You should have received a copy of the GNU Lesser General Public
  85925. - License along with the GNU C Library; if not, write to the Free
  85926. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85927. - 02111-1307 USA. */
  85928. + License along with the GNU C Library; if not, see
  85929. + <http://www.gnu.org/licenses/>. */
  85930. #include <tls.h>
  85931. #include <pt-machine.h>
  85932. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/vfork.S uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/vfork.S
  85933. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/vfork.S 2012-05-15 09:20:09.000000000 +0200
  85934. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm/vfork.S 2014-07-25 20:36:08.537343753 +0200
  85935. @@ -13,9 +13,8 @@
  85936. Lesser General Public License for more details.
  85937. You should have received a copy of the GNU Lesser General Public
  85938. - License along with the GNU C Library; if not, write to the Free
  85939. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85940. - 02111-1307 USA. */
  85941. + License along with the GNU C Library; if not, see
  85942. + <http://www.gnu.org/licenses/>. */
  85943. #include <sysdep-cancel.h>
  85944. #define _ERRNO_H 1
  85945. @@ -40,7 +39,7 @@
  85946. ldr r0, 1f
  85947. #endif
  85948. movs r0, r0
  85949. - bne HIDDEN_JUMPTARGET (__fork)
  85950. + bne HIDDEN_JUMPTARGET (fork)
  85951. DO_CALL (vfork, 0)
  85952. cmn a1, #4096
  85953. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/.cvsignore uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/.cvsignore
  85954. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/.cvsignore 2012-05-15 09:20:09.000000000 +0200
  85955. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/.cvsignore 1970-01-01 01:00:00.000000000 +0100
  85956. @@ -1,2 +0,0 @@
  85957. -.cvsignore
  85958. -*.os
  85959. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/execve.c uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/execve.c
  85960. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/execve.c 2012-05-15 09:20:09.000000000 +0200
  85961. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/execve.c 2014-07-25 20:36:08.537343753 +0200
  85962. @@ -12,9 +12,8 @@
  85963. Lesser General Public License for more details.
  85964. You should have received a copy of the GNU Lesser General Public
  85965. - License along with the GNU C Library; if not, write to the Free
  85966. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85967. - 02111-1307 USA. */
  85968. + License along with the GNU C Library; if not, see
  85969. + <http://www.gnu.org/licenses/>. */
  85970. #include <errno.h>
  85971. #include <unistd.h>
  85972. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.c uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.c
  85973. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.c 2012-05-15 09:20:09.000000000 +0200
  85974. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.c 2014-07-25 20:36:08.537343753 +0200
  85975. @@ -13,9 +13,8 @@
  85976. Lesser General Public License for more details.
  85977. You should have received a copy of the GNU Lesser General Public
  85978. - License along with the GNU C Library; if not, write to the Free
  85979. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85980. - 02111-1307 USA. */
  85981. + License along with the GNU C Library; if not, see
  85982. + <http://www.gnu.org/licenses/>. */
  85983. #include <errno.h>
  85984. #include <fork.h>
  85985. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.h
  85986. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.h 2012-05-15 09:20:09.000000000 +0200
  85987. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/fork.h 2014-07-25 20:36:08.537343753 +0200
  85988. @@ -13,9 +13,8 @@
  85989. Lesser General Public License for more details.
  85990. You should have received a copy of the GNU Lesser General Public
  85991. - License along with the GNU C Library; if not, write to the Free
  85992. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  85993. - 02111-1307 USA. */
  85994. + License along with the GNU C Library; if not, see
  85995. + <http://www.gnu.org/licenses/>. */
  85996. #include <list.h>
  85997. #include <bits/libc-lock.h>
  85998. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/bits/initspin.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/bits/initspin.h
  85999. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/bits/initspin.h 2012-05-15 09:20:09.000000000 +0200
  86000. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/bits/initspin.h 2014-07-25 20:36:08.561343879 +0200
  86001. @@ -13,9 +13,8 @@
  86002. Lesser General Public License for more details.
  86003. You should have received a copy of the GNU Lesser General Public
  86004. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  86005. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  86006. - Boston, MA 02111-1307, USA. */
  86007. + License along with the GNU C Library; see the file COPYING.LIB. If
  86008. + not, see <http://www.gnu.org/licenses/>. */
  86009. /* Initial value of a spinlock. PA-RISC only implements atomic load
  86010. and clear so this must be non-zero. */
  86011. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h
  86012. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h 2012-05-15 09:20:09.000000000 +0200
  86013. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h 2014-07-25 20:36:08.561343879 +0200
  86014. @@ -15,9 +15,8 @@
  86015. Lesser General Public License for more details.
  86016. You should have received a copy of the GNU Lesser General Public
  86017. - License along with the GNU C Library; if not, write to the Free
  86018. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86019. - 02111-1307 USA. */
  86020. + License along with the GNU C Library; if not, see
  86021. + <http://www.gnu.org/licenses/>. */
  86022. #ifndef _MALLOC_MACHINE_H
  86023. #define _MALLOC_MACHINE_H
  86024. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/pt-initfini.c uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/pt-initfini.c
  86025. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/pt-initfini.c 2012-05-15 09:20:09.000000000 +0200
  86026. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/pt-initfini.c 2014-07-25 20:36:08.561343879 +0200
  86027. @@ -23,8 +23,7 @@
  86028. You should have received a copy of the GNU Lesser General Public
  86029. License along with the GNU C Library; see the file COPYING.LIB. If not,
  86030. - write to the Free Software Foundation, 59 Temple Place - Suite 330,
  86031. - Boston, MA 02111-1307, USA. */
  86032. + see <http://www.gnu.org/licenses/>. */
  86033. /* This file is compiled into assembly code which is then munged by a sed
  86034. script into two files: crti.s and crtn.s.
  86035. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h
  86036. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  86037. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h 2014-07-25 20:36:08.561343879 +0200
  86038. @@ -14,9 +14,8 @@
  86039. Lesser General Public License for more details.
  86040. You should have received a copy of the GNU Lesser General Public
  86041. - License along with the GNU C Library; if not, write to the Free
  86042. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86043. - 02111-1307 USA. */
  86044. + License along with the GNU C Library; if not, see
  86045. + <http://www.gnu.org/licenses/>. */
  86046. #include <sysdep.h>
  86047. #ifndef __ASSEMBLER__
  86048. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
  86049. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  86050. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h 2014-07-25 20:36:08.581343983 +0200
  86051. @@ -13,9 +13,8 @@
  86052. Lesser General Public License for more details.
  86053. You should have received a copy of the GNU Lesser General Public
  86054. - License along with the GNU C Library; if not, write to the Free
  86055. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86056. - 02111-1307 USA. */
  86057. + License along with the GNU C Library; if not, see
  86058. + <http://www.gnu.org/licenses/>. */
  86059. #include <tls.h>
  86060. #include <pt-machine.h>
  86061. @@ -139,7 +138,7 @@
  86062. #endif
  86063. # ifndef __ASSEMBLER__
  86064. -# if defined FLOATING_STACKS && USE___THREAD && defined __PIC__
  86065. +# if defined FLOATING_STACKS && defined __UCLIBC_HAS_TLS__ && defined __PIC__
  86066. # define SINGLE_THREAD_P \
  86067. __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
  86068. p_header.data.multiple_threads) == 0, 1)
  86069. @@ -155,7 +154,7 @@
  86070. # else
  86071. # if !defined __PIC__
  86072. # define SINGLE_THREAD_P cmpl $0, __local_multiple_threads
  86073. -# elif defined FLOATING_STACKS && USE___THREAD
  86074. +# elif defined FLOATING_STACKS && defined __UCLIBC_HAS_TLS__
  86075. # define SINGLE_THREAD_P cmpl $0, %gs:MULTIPLE_THREADS_OFFSET
  86076. # else
  86077. # if !defined NOT_IN_libc || defined IS_IN_libpthread
  86078. @@ -165,7 +164,7 @@
  86079. movl __local_multiple_threads@GOT(%ecx), %ecx;\
  86080. cmpl $0, (%ecx)
  86081. # endif
  86082. -# if !defined HAVE_HIDDEN || !USE___THREAD
  86083. +# if !defined HAVE_HIDDEN || !defined __UCLIBC_HAS_TLS__
  86084. # define SINGLE_THREAD_P \
  86085. SETUP_PIC_REG (cx); \
  86086. addl $_GLOBAL_OFFSET_TABLE_, %ecx; \
  86087. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/vfork.S uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/vfork.S
  86088. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/vfork.S 2012-05-15 09:20:09.000000000 +0200
  86089. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/i386/vfork.S 2014-07-25 20:36:08.581343983 +0200
  86090. @@ -13,9 +13,8 @@
  86091. Lesser General Public License for more details.
  86092. You should have received a copy of the GNU Lesser General Public
  86093. - License along with the GNU C Library; if not, write to the Free
  86094. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86095. - 02111-1307 USA. */
  86096. + License along with the GNU C Library; if not, see
  86097. + <http://www.gnu.org/licenses/>. */
  86098. #include <sysdep-cancel.h>
  86099. #define _ERRNO_H 1
  86100. @@ -32,7 +31,7 @@
  86101. #ifdef __NR_vfork
  86102. # ifdef SHARED
  86103. -# if !defined HAVE_HIDDEN || !USE___THREAD
  86104. +# if !defined HAVE_HIDDEN || !defined __UCLIBC_HAS_TLS__
  86105. SETUP_PIC_REG (cx)
  86106. # else
  86107. call __i686.get_pc_thunk.cx
  86108. @@ -44,7 +43,7 @@
  86109. movl $pthread_create, %eax
  86110. testl %eax, %eax
  86111. # endif
  86112. - jne HIDDEN_JUMPTARGET (__fork)
  86113. + jne HIDDEN_JUMPTARGET (fork)
  86114. /* Pop the return PC value into ECX. */
  86115. popl %ecx
  86116. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h
  86117. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h 2012-05-15 09:20:09.000000000 +0200
  86118. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/bits/local_lim.h 2014-07-25 20:36:08.593344046 +0200
  86119. @@ -13,9 +13,8 @@
  86120. Lesser General Public License for more details.
  86121. You should have received a copy of the GNU Lesser General Public
  86122. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  86123. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  86124. - Boston, MA 02111-1307, USA. */
  86125. + License along with the GNU C Library; see the file COPYING.LIB. If
  86126. + not, see <http://www.gnu.org/licenses/>. */
  86127. /* The kernel header pollutes the namespace with the NR_OPEN symbol
  86128. and defines LINK_MAX although filesystems have different maxima. A
  86129. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/fork.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/fork.h
  86130. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/fork.h 2012-05-15 09:20:09.000000000 +0200
  86131. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/fork.h 2014-07-25 20:36:08.605344109 +0200
  86132. @@ -13,9 +13,8 @@
  86133. Lesser General Public License for more details.
  86134. You should have received a copy of the GNU Lesser General Public
  86135. - License along with the GNU C Library; if not, write to the Free
  86136. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86137. - 02111-1307 USA. */
  86138. + License along with the GNU C Library; if not, see
  86139. + <http://www.gnu.org/licenses/>. */
  86140. #include <signal.h>
  86141. #include <sysdep.h>
  86142. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-initfini.c uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-initfini.c
  86143. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-initfini.c 2012-05-15 09:20:09.000000000 +0200
  86144. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-initfini.c 2014-07-25 20:36:08.605344109 +0200
  86145. @@ -23,8 +23,7 @@
  86146. You should have received a copy of the GNU Lesser General Public
  86147. License along with the GNU C Library; see the file COPYING.LIB. If not,
  86148. - write to the Free Software Foundation, 59 Temple Place - Suite 330,
  86149. - Boston, MA 02111-1307, USA. */
  86150. + see <http://www.gnu.org/licenses/>. */
  86151. /* This file is compiled into assembly code which is then munged by a sed
  86152. script into two files: crti.s and crtn.s.
  86153. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c
  86154. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c 2012-05-15 09:20:09.000000000 +0200
  86155. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c 2014-07-25 20:36:08.605344109 +0200
  86156. @@ -13,9 +13,8 @@
  86157. Lesser General Public License for more details.
  86158. You should have received a copy of the GNU Lesser General Public
  86159. - License along with the GNU C Library; if not, write to the Free
  86160. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86161. - 02111-1307 USA. */
  86162. + License along with the GNU C Library; if not, see
  86163. + <http://www.gnu.org/licenses/>. */
  86164. #include <errno.h>
  86165. #include <signal.h>
  86166. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
  86167. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  86168. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h 2014-07-25 20:36:08.605344109 +0200
  86169. @@ -13,9 +13,8 @@
  86170. Lesser General Public License for more details.
  86171. You should have received a copy of the GNU Lesser General Public
  86172. - License along with the GNU C Library; if not, write to the Free
  86173. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86174. - 02111-1307 USA. */
  86175. + License along with the GNU C Library; if not, see
  86176. + <http://www.gnu.org/licenses/>. */
  86177. #include <sysdep.h>
  86178. #include <tls.h>
  86179. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/vfork.S uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/vfork.S
  86180. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/vfork.S 2012-05-15 09:20:09.000000000 +0200
  86181. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/ia64/vfork.S 2014-07-25 20:36:08.605344109 +0200
  86182. @@ -12,9 +12,8 @@
  86183. Lesser General Public License for more details.
  86184. You should have received a copy of the GNU Lesser General Public
  86185. - License along with the GNU C Library; if not, write to the Free
  86186. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86187. - 02111-1307 USA. */
  86188. + License along with the GNU C Library; if not, see
  86189. + <http://www.gnu.org/licenses/>. */
  86190. #include <sysdep-cancel.h>
  86191. @@ -38,7 +37,7 @@
  86192. #endif
  86193. ld8 r14 = [r14];;
  86194. cmp.ne p6, p7 = 0, r14
  86195. -(p6) br.cond.spnt.few HIDDEN_JUMPTARGET (__fork);;
  86196. +(p6) br.cond.spnt.few HIDDEN_JUMPTARGET (fork);;
  86197. alloc r2=ar.pfs,0,0,2,0
  86198. mov out0=CLONE_VM+CLONE_VFORK+SIGCHLD
  86199. mov out1=0 /* Standard sp value. */
  86200. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/jmp-unwind.c uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/jmp-unwind.c
  86201. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/jmp-unwind.c 2012-05-15 09:20:09.000000000 +0200
  86202. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/jmp-unwind.c 2014-07-25 20:36:08.605344109 +0200
  86203. @@ -13,9 +13,8 @@
  86204. Lesser General Public License for more details.
  86205. You should have received a copy of the GNU Lesser General Public
  86206. - License along with the GNU C Library; if not, write to the Free
  86207. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86208. - 02111-1307 USA. */
  86209. + License along with the GNU C Library; if not, see
  86210. + <http://www.gnu.org/licenses/>. */
  86211. #include <setjmp.h>
  86212. #include <stddef.h>
  86213. @@ -32,3 +31,4 @@
  86214. (env->__jmpbuf, __builtin_frame_address (0)),
  86215. (void) 0);
  86216. }
  86217. +libc_hidden_def(_longjmp_unwind)
  86218. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h
  86219. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  86220. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h 2014-07-25 20:36:08.609344130 +0200
  86221. @@ -13,9 +13,8 @@
  86222. Lesser General Public License for more details.
  86223. You should have received a copy of the GNU Lesser General Public
  86224. - License along with the GNU C Library; if not, write to the Free
  86225. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86226. - 02111-1307 USA. */
  86227. + License along with the GNU C Library; if not, see
  86228. + <http://www.gnu.org/licenses/>. */
  86229. #include <sysdep.h>
  86230. #ifndef __ASSEMBLER__
  86231. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/m68k/vfork.S uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/m68k/vfork.S
  86232. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/m68k/vfork.S 2012-05-15 09:20:09.000000000 +0200
  86233. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/m68k/vfork.S 2014-07-25 20:36:08.609344130 +0200
  86234. @@ -13,9 +13,8 @@
  86235. Lesser General Public License for more details.
  86236. You should have received a copy of the GNU Lesser General Public
  86237. - License along with the GNU C Library; if not, write to the Free
  86238. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86239. - 02111-1307 USA. */
  86240. + License along with the GNU C Library; if not, see
  86241. + <http://www.gnu.org/licenses/>. */
  86242. #include <sysdep-cancel.h>
  86243. #define _ERRNO_H 1
  86244. @@ -35,7 +34,7 @@
  86245. .weak pthread_create
  86246. movel #pthread_create, %d0
  86247. #endif
  86248. - jbne HIDDEN_JUMPTARGET (__fork)
  86249. + jbne HIDDEN_JUMPTARGET (fork)
  86250. #ifdef __NR_vfork
  86251. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h
  86252. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  86253. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h 2014-07-25 20:36:08.629344235 +0200
  86254. @@ -15,9 +15,8 @@
  86255. Lesser General Public License for more details.
  86256. You should have received a copy of the GNU Lesser General Public
  86257. - License along with the GNU C Library; if not, write to the Free
  86258. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86259. - 02111-1307 USA. */
  86260. + License along with the GNU C Library; if not, see
  86261. + <http://www.gnu.org/licenses/>. */
  86262. #include <sysdep.h>
  86263. #ifndef __ASSEMBLER__
  86264. @@ -31,7 +30,7 @@
  86265. # undef PSEUDO
  86266. # define PSEUDO(name, syscall_name, args) \
  86267. .align 2; \
  86268. - 99: \
  86269. + 99: move a0, v0; \
  86270. PTR_LA t9,__syscall_error; \
  86271. /* manual cpreturn. */ \
  86272. REG_L gp, STKOFF_GP(sp); \
  86273. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
  86274. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  86275. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h 2014-07-25 20:36:08.641344298 +0200
  86276. @@ -13,9 +13,8 @@
  86277. Lesser General Public License for more details.
  86278. You should have received a copy of the GNU Lesser General Public
  86279. - License along with the GNU C Library; if not, write to the Free
  86280. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86281. - 02111-1307 USA. */
  86282. + License along with the GNU C Library; if not, see
  86283. + <http://www.gnu.org/licenses/>. */
  86284. #include <sysdep.h>
  86285. #ifndef __ASSEMBLER__
  86286. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S
  86287. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S 2012-05-15 09:20:09.000000000 +0200
  86288. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mips/vfork.S 2014-07-25 20:36:08.641344298 +0200
  86289. @@ -12,9 +12,8 @@
  86290. Lesser General Public License for more details.
  86291. You should have received a copy of the GNU Lesser General Public
  86292. - License along with the GNU C Library; if not, write to the Free
  86293. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86294. - 02111-1307 USA. */
  86295. + License along with the GNU C Library; if not, see
  86296. + <http://www.gnu.org/licenses/>. */
  86297. /* vfork() is just a special case of clone(). */
  86298. @@ -80,6 +79,7 @@
  86299. /* Something bad happened -- no child created. */
  86300. L(error):
  86301. + move a0, v0
  86302. #ifdef __PIC__
  86303. PTR_LA t9, __syscall_error
  86304. RESTORE_GP64
  86305. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mq_notify.c uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mq_notify.c
  86306. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mq_notify.c 2012-05-15 09:20:09.000000000 +0200
  86307. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/mq_notify.c 2014-07-25 20:36:08.641344298 +0200
  86308. @@ -13,9 +13,8 @@
  86309. Lesser General Public License for more details.
  86310. You should have received a copy of the GNU Lesser General Public
  86311. - License along with the GNU C Library; if not, write to the Free
  86312. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86313. - 02111-1307 USA. */
  86314. + License along with the GNU C Library; if not, see
  86315. + <http://www.gnu.org/licenses/>. */
  86316. #include <assert.h>
  86317. #include <errno.h>
  86318. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
  86319. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  86320. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h 2014-07-25 20:36:08.657344381 +0200
  86321. @@ -13,9 +13,8 @@
  86322. Lesser General Public License for more details.
  86323. You should have received a copy of the GNU Lesser General Public
  86324. - License along with the GNU C Library; if not, write to the Free
  86325. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86326. - 02111-1307 USA. */
  86327. + License along with the GNU C Library; if not, see
  86328. + <http://www.gnu.org/licenses/>. */
  86329. #include <sysdep.h>
  86330. #include <tls.h>
  86331. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
  86332. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S 2012-05-15 09:20:09.000000000 +0200
  86333. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S 2014-07-25 20:36:08.657344381 +0200
  86334. @@ -12,9 +12,8 @@
  86335. Lesser General Public License for more details.
  86336. You should have received a copy of the GNU Lesser General Public
  86337. - License along with the GNU C Library; if not, write to the Free
  86338. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86339. - 02111-1307 USA. */
  86340. + License along with the GNU C Library; if not, see
  86341. + <http://www.gnu.org/licenses/>. */
  86342. #include <sysdep-cancel.h>
  86343. #define _ERRNO_H 1
  86344. @@ -66,7 +65,7 @@
  86345. # endif
  86346. .Lhidden_fork:
  86347. - b HIDDEN_JUMPTARGET(__fork)
  86348. + b HIDDEN_JUMPTARGET(fork)
  86349. #endif
  86350. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
  86351. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  86352. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h 2014-07-25 20:36:08.673344465 +0200
  86353. @@ -13,9 +13,8 @@
  86354. Lesser General Public License for more details.
  86355. You should have received a copy of the GNU Lesser General Public
  86356. - License along with the GNU C Library; if not, write to the Free
  86357. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86358. - 02111-1307 USA. */
  86359. + License along with the GNU C Library; if not, see
  86360. + <http://www.gnu.org/licenses/>. */
  86361. #include <sysdep.h>
  86362. #include <tls.h>
  86363. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S
  86364. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S 2012-05-15 09:20:09.000000000 +0200
  86365. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S 2014-07-25 20:36:08.673344465 +0200
  86366. @@ -12,9 +12,8 @@
  86367. Lesser General Public License for more details.
  86368. You should have received a copy of the GNU Lesser General Public
  86369. - License along with the GNU C Library; if not, write to the Free
  86370. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86371. - 02111-1307 USA. */
  86372. + License along with the GNU C Library; if not, see
  86373. + <http://www.gnu.org/licenses/>. */
  86374. #include <sysdep-cancel.h>
  86375. #define _ERRNO_H 1
  86376. @@ -42,7 +41,7 @@
  86377. ld 10,.LC0@toc(2)
  86378. ld 10,0(10)
  86379. cmpwi 10,0
  86380. - bne- HIDDEN_JUMPTARGET(__fork)
  86381. + bne- HIDDEN_JUMPTARGET(fork)
  86382. # else
  86383. .weak pthread_create
  86384. lis 10,pthread_create@highest
  86385. @@ -80,7 +79,7 @@
  86386. # ifndef SHARED
  86387. .Lhidden_fork:
  86388. - b HIDDEN_JUMPTARGET(__fork)
  86389. + b HIDDEN_JUMPTARGET(fork)
  86390. .Lsyscall_error:
  86391. b JUMPTARGET(__syscall_error)
  86392. # endif
  86393. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/pt-sigsuspend.c uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/pt-sigsuspend.c
  86394. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/pt-sigsuspend.c 2012-05-15 09:20:09.000000000 +0200
  86395. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/pt-sigsuspend.c 2014-07-25 20:36:08.689344549 +0200
  86396. @@ -13,9 +13,8 @@
  86397. Lesser General Public License for more details.
  86398. You should have received a copy of the GNU Lesser General Public
  86399. - License along with the GNU C Library; if not, write to the Free
  86400. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86401. - 02111-1307 USA. */
  86402. + License along with the GNU C Library; if not, see
  86403. + <http://www.gnu.org/licenses/>. */
  86404. #include <errno.h>
  86405. #include <signal.h>
  86406. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/raise.c uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/raise.c
  86407. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/raise.c 2012-05-15 09:20:09.000000000 +0200
  86408. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/raise.c 2014-07-25 20:36:08.689344549 +0200
  86409. @@ -12,9 +12,8 @@
  86410. Lesser General Public License for more details.
  86411. You should have received a copy of the GNU Lesser General Public
  86412. - License along with the GNU C Library; if not, write to the Free
  86413. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86414. - 02111-1307 USA. */
  86415. + License along with the GNU C Library; if not, see
  86416. + <http://www.gnu.org/licenses/>. */
  86417. #include <signal.h>
  86418. #include <unistd.h>
  86419. @@ -40,4 +39,3 @@
  86420. #endif
  86421. }
  86422. libc_hidden_def (raise)
  86423. -weak_alias (raise, gsignal)
  86424. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/register-atfork.c uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/register-atfork.c
  86425. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/register-atfork.c 2012-05-15 09:20:09.000000000 +0200
  86426. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/register-atfork.c 2014-07-25 20:36:08.689344549 +0200
  86427. @@ -13,9 +13,8 @@
  86428. Lesser General Public License for more details.
  86429. You should have received a copy of the GNU Lesser General Public
  86430. - License along with the GNU C Library; if not, write to the Free
  86431. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86432. - 02111-1307 USA. */
  86433. + License along with the GNU C Library; if not, see
  86434. + <http://www.gnu.org/licenses/>. */
  86435. #include <errno.h>
  86436. #include <stdlib.h>
  86437. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/bits/typesizes.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/bits/typesizes.h
  86438. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/bits/typesizes.h 2012-05-15 09:20:09.000000000 +0200
  86439. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/bits/typesizes.h 2014-07-25 20:36:08.705344633 +0200
  86440. @@ -13,9 +13,8 @@
  86441. Lesser General Public License for more details.
  86442. You should have received a copy of the GNU Lesser General Public
  86443. - License along with the GNU C Library; if not, write to the Free
  86444. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86445. - 02111-1307 USA. */
  86446. + License along with the GNU C Library; if not, see
  86447. + <http://www.gnu.org/licenses/>. */
  86448. #ifndef _BITS_TYPES_H
  86449. # error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
  86450. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c
  86451. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c 2012-05-15 09:20:09.000000000 +0200
  86452. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c 2014-07-25 20:36:08.721344717 +0200
  86453. @@ -23,8 +23,7 @@
  86454. You should have received a copy of the GNU Lesser General Public
  86455. License along with the GNU C Library; see the file COPYING.LIB. If not,
  86456. - write to the Free Software Foundation, 59 Temple Place - Suite 330,
  86457. - Boston, MA 02111-1307, USA. */
  86458. + see <http://www.gnu.org/licenses/>. */
  86459. /* This file is compiled into assembly code which is then munged by a sed
  86460. script into two files: crti.s and crtn.s.
  86461. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
  86462. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  86463. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h 2014-07-25 20:36:08.721344717 +0200
  86464. @@ -13,9 +13,8 @@
  86465. Lesser General Public License for more details.
  86466. You should have received a copy of the GNU Lesser General Public
  86467. - License along with the GNU C Library; if not, write to the Free
  86468. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86469. - 02111-1307 USA. */
  86470. + License along with the GNU C Library; if not, see
  86471. + <http://www.gnu.org/licenses/>. */
  86472. #include <sysdep.h>
  86473. #include <tls.h>
  86474. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S
  86475. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S 2012-05-15 09:20:09.000000000 +0200
  86476. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S 2014-07-25 20:36:08.721344717 +0200
  86477. @@ -13,9 +13,8 @@
  86478. Lesser General Public License for more details.
  86479. You should have received a copy of the GNU Lesser General Public
  86480. - License along with the GNU C Library; if not, write to the Free
  86481. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86482. - 02111-1307 USA. */
  86483. + License along with the GNU C Library; if not, see
  86484. + <http://www.gnu.org/licenses/>. */
  86485. #include <sysdep-cancel.h>
  86486. #define _ERRNO_H 1
  86487. @@ -54,7 +53,7 @@
  86488. al %r1,3f-2b(%r1)
  86489. br %r1
  86490. 3:
  86491. - .long HIDDEN_JUMPTARGET(__fork)-2b
  86492. + .long HIDDEN_JUMPTARGET(fork)-2b
  86493. 4:
  86494. #ifdef SHARED
  86495. .long __libc_pthread_functions-0b
  86496. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c
  86497. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c 2012-05-15 09:20:09.000000000 +0200
  86498. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c 2014-07-25 20:36:08.737344801 +0200
  86499. @@ -24,8 +24,7 @@
  86500. You should have received a copy of the GNU Lesser General Public
  86501. License along with the GNU C Library; see the file COPYING.LIB. If not,
  86502. - write to the Free Software Foundation, 59 Temple Place - Suite 330,
  86503. - Boston, MA 02111-1307, USA. */
  86504. + see <http://www.gnu.org/licenses/>. */
  86505. /* This file is compiled into assembly code which is then munged by a sed
  86506. script into two files: crti.s and crtn.s.
  86507. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
  86508. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  86509. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h 2014-07-25 20:36:08.737344801 +0200
  86510. @@ -13,9 +13,8 @@
  86511. Lesser General Public License for more details.
  86512. You should have received a copy of the GNU Lesser General Public
  86513. - License along with the GNU C Library; if not, write to the Free
  86514. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86515. - 02111-1307 USA. */
  86516. + License along with the GNU C Library; if not, see
  86517. + <http://www.gnu.org/licenses/>. */
  86518. #include <sysdep.h>
  86519. #include <tls.h>
  86520. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S
  86521. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S 2012-05-15 09:20:09.000000000 +0200
  86522. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S 2014-07-25 20:36:08.737344801 +0200
  86523. @@ -13,9 +13,8 @@
  86524. Lesser General Public License for more details.
  86525. You should have received a copy of the GNU Lesser General Public
  86526. - License along with the GNU C Library; if not, write to the Free
  86527. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86528. - 02111-1307 USA. */
  86529. + License along with the GNU C Library; if not, see
  86530. + <http://www.gnu.org/licenses/>. */
  86531. #include <sysdep-cancel.h>
  86532. #define _ERRNO_H 1
  86533. @@ -35,7 +34,7 @@
  86534. larl %r1,pthread_create
  86535. #endif
  86536. ltgr %r1,%r1
  86537. - jgne HIDDEN_JUMPTARGET(__fork)
  86538. + jgne HIDDEN_JUMPTARGET(fork)
  86539. /* Do vfork system call. */
  86540. svc SYS_ify (vfork)
  86541. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c
  86542. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c 2012-05-15 09:20:09.000000000 +0200
  86543. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c 2014-07-25 20:36:08.741344821 +0200
  86544. @@ -23,8 +23,7 @@
  86545. You should have received a copy of the GNU Lesser General Public
  86546. License along with the GNU C Library; see the file COPYING.LIB. If not,
  86547. - write to the Free Software Foundation, 59 Temple Place - Suite 330,
  86548. - Boston, MA 02111-1307, USA. */
  86549. + see <http://www.gnu.org/licenses/>. */
  86550. /* This file is compiled into assembly code which is then munged by a sed
  86551. script into two files: crti.s and crtn.s.
  86552. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/smp.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/smp.h
  86553. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/smp.h 2012-05-15 09:20:09.000000000 +0200
  86554. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/smp.h 2014-07-25 20:36:08.741344821 +0200
  86555. @@ -14,8 +14,7 @@
  86556. You should have received a copy of the GNU Library General Public
  86557. License along with the GNU C Library; see the file COPYING.LIB. If not,
  86558. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  86559. - Boston, MA 02111-1307, USA. */
  86560. + see <http://www.gnu.org/licenses/>. */
  86561. static __inline__ int
  86562. is_smp_system (void)
  86563. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
  86564. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  86565. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h 2014-07-25 20:36:08.741344821 +0200
  86566. @@ -12,9 +12,8 @@
  86567. Lesser General Public License for more details.
  86568. You should have received a copy of the GNU Lesser General Public
  86569. - License along with the GNU C Library; if not, write to the Free
  86570. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86571. - 02111-1307 USA. */
  86572. + License along with the GNU C Library; if not, see
  86573. + <http://www.gnu.org/licenses/>. */
  86574. #include <sysdep.h>
  86575. #include <tls.h>
  86576. @@ -155,7 +154,7 @@
  86577. # endif
  86578. # ifndef __ASSEMBLER__
  86579. -# if defined FLOATING_STACKS && USE___THREAD && defined __PIC__
  86580. +# if defined FLOATING_STACKS && defined __UCLIBC_HAS_TLS__ && defined __PIC__
  86581. # define SINGLE_THREAD_P \
  86582. __builtin_expect (THREAD_GETMEM (THREAD_SELF, p_multiple_threads) == 0, 1)
  86583. # else
  86584. @@ -172,7 +171,7 @@
  86585. .align 2; \
  86586. 1: .long __local_multiple_threads; \
  86587. 2:
  86588. -# elif defined FLOATING_STACKS && USE___THREAD
  86589. +# elif defined FLOATING_STACKS && defined __UCLIBC_HAS_TLS__
  86590. # define SINGLE_THREAD_P \
  86591. stc gbr,r0; \
  86592. mov.w 0f,r1; \
  86593. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S
  86594. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S 2012-05-15 09:20:09.000000000 +0200
  86595. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sh/vfork.S 2014-07-25 20:36:08.741344821 +0200
  86596. @@ -12,9 +12,8 @@
  86597. Lesser General Public License for more details.
  86598. You should have received a copy of the GNU Lesser General Public
  86599. - License along with the GNU C Library; if not, write to the Free
  86600. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86601. - 02111-1307 USA. */
  86602. + License along with the GNU C Library; if not, see
  86603. + <http://www.gnu.org/licenses/>. */
  86604. #include <sysdep-cancel.h>
  86605. #define _ERRNO_H 1
  86606. @@ -70,7 +69,7 @@
  86607. nop
  86608. 1:
  86609. .align 2
  86610. -.L2: .long HIDDEN_JUMPTARGET(__fork)-1b
  86611. +.L2: .long HIDDEN_JUMPTARGET(fork)-1b
  86612. PSEUDO_END (__vfork)
  86613. libc_hidden_def (__vfork)
  86614. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sigwait.c uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sigwait.c
  86615. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sigwait.c 2012-05-15 09:20:09.000000000 +0200
  86616. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sigwait.c 2014-07-25 20:36:08.741344821 +0200
  86617. @@ -12,9 +12,8 @@
  86618. Lesser General Public License for more details.
  86619. You should have received a copy of the GNU Lesser General Public
  86620. - License along with the GNU C Library; if not, write to the Free
  86621. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86622. - 02111-1307 USA. */
  86623. + License along with the GNU C Library; if not, see
  86624. + <http://www.gnu.org/licenses/>. */
  86625. #include <errno.h>
  86626. #include <signal.h>
  86627. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/smp.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/smp.h
  86628. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/smp.h 2012-05-15 09:20:09.000000000 +0200
  86629. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/smp.h 2014-07-25 20:36:08.741344821 +0200
  86630. @@ -14,8 +14,7 @@
  86631. You should have received a copy of the GNU Library General Public
  86632. License along with the GNU C Library; see the file COPYING.LIB. If not,
  86633. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  86634. - Boston, MA 02111-1307, USA. */
  86635. + see <http://www.gnu.org/licenses/>. */
  86636. #include <sys/sysctl.h>
  86637. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h
  86638. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h 2012-05-15 09:20:09.000000000 +0200
  86639. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h 2014-07-25 20:36:08.765344947 +0200
  86640. @@ -13,9 +13,8 @@
  86641. Lesser General Public License for more details.
  86642. You should have received a copy of the GNU Lesser General Public
  86643. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  86644. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  86645. - Boston, MA 02111-1307, USA. */
  86646. + License along with the GNU C Library; see the file COPYING.LIB. If
  86647. + not, see <http://www.gnu.org/licenses/>. */
  86648. /* The kernel header pollutes the namespace with the NR_OPEN symbol
  86649. and defines LINK_MAX although filesystems have different maxima. A
  86650. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
  86651. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h 2012-05-15 09:20:09.000000000 +0200
  86652. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h 2014-07-25 20:36:08.765344947 +0200
  86653. @@ -13,9 +13,8 @@
  86654. Lesser General Public License for more details.
  86655. You should have received a copy of the GNU Lesser General Public
  86656. - License along with the GNU C Library; if not, write to the Free
  86657. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86658. - 02111-1307 USA. */
  86659. + License along with the GNU C Library; if not, see
  86660. + <http://www.gnu.org/licenses/>. */
  86661. #ifndef _BITS_TYPES_H
  86662. # error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
  86663. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/fork.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/fork.h
  86664. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/fork.h 2012-05-15 09:20:09.000000000 +0200
  86665. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/fork.h 2014-07-25 20:36:08.765344947 +0200
  86666. @@ -13,9 +13,8 @@
  86667. Lesser General Public License for more details.
  86668. You should have received a copy of the GNU Lesser General Public
  86669. - License along with the GNU C Library; if not, write to the Free
  86670. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86671. - 02111-1307 USA. */
  86672. + License along with the GNU C Library; if not, see
  86673. + <http://www.gnu.org/licenses/>. */
  86674. #include_next <fork.h>
  86675. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
  86676. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  86677. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h 2014-07-25 20:36:08.785345052 +0200
  86678. @@ -13,9 +13,8 @@
  86679. Lesser General Public License for more details.
  86680. You should have received a copy of the GNU Lesser General Public
  86681. - License along with the GNU C Library; if not, write to the Free
  86682. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86683. - 02111-1307 USA. */
  86684. + License along with the GNU C Library; if not, see
  86685. + <http://www.gnu.org/licenses/>. */
  86686. #include <tls.h>
  86687. #ifndef __ASSEMBLER__
  86688. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S
  86689. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S 2012-05-15 09:20:09.000000000 +0200
  86690. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S 2014-07-25 20:36:08.785345052 +0200
  86691. @@ -13,9 +13,8 @@
  86692. Lesser General Public License for more details.
  86693. You should have received a copy of the GNU Lesser General Public
  86694. - License along with the GNU C Library; if not, write to the Free
  86695. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86696. - 02111-1307 USA. */
  86697. + License along with the GNU C Library; if not, see
  86698. + <http://www.gnu.org/licenses/>. */
  86699. #include <sysdep-cancel.h>
  86700. @@ -43,7 +42,7 @@
  86701. orcc %o0, %lo(pthread_create), %o0
  86702. #endif
  86703. #if defined SHARED && !defined BROKEN_SPARC_WDISP22
  86704. - bne HIDDEN_JUMPTARGET(__fork)
  86705. + bne HIDDEN_JUMPTARGET(fork)
  86706. #else
  86707. bne 1f
  86708. #endif
  86709. @@ -56,7 +55,7 @@
  86710. and %o0, %o1, %o0
  86711. #if !defined SHARED || defined BROKEN_SPARC_WDISP22
  86712. 1: mov %o7, %g1
  86713. - call HIDDEN_JUMPTARGET(__fork)
  86714. + call HIDDEN_JUMPTARGET(fork)
  86715. mov %g1, %o7
  86716. #endif
  86717. SYSCALL_ERROR_HANDLER
  86718. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
  86719. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  86720. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h 2014-07-25 20:36:08.801345136 +0200
  86721. @@ -13,9 +13,8 @@
  86722. Lesser General Public License for more details.
  86723. You should have received a copy of the GNU Lesser General Public
  86724. - License along with the GNU C Library; if not, write to the Free
  86725. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86726. - 02111-1307 USA. */
  86727. + License along with the GNU C Library; if not, see
  86728. + <http://www.gnu.org/licenses/>. */
  86729. #include <tls.h>
  86730. #ifndef __ASSEMBLER__
  86731. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S
  86732. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S 2012-05-15 09:20:09.000000000 +0200
  86733. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S 2014-07-25 20:36:08.801345136 +0200
  86734. @@ -13,9 +13,8 @@
  86735. Lesser General Public License for more details.
  86736. You should have received a copy of the GNU Lesser General Public
  86737. - License along with the GNU C Library; if not, write to the Free
  86738. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86739. - 02111-1307 USA. */
  86740. + License along with the GNU C Library; if not, see
  86741. + <http://www.gnu.org/licenses/>. */
  86742. #include <sysdep-cancel.h>
  86743. @@ -42,7 +41,7 @@
  86744. #endif
  86745. #if defined SHARED && !defined BROKEN_SPARC_WDISP22
  86746. cmp %o0, 0
  86747. - bne HIDDEN_JUMPTARGET(__fork)
  86748. + bne HIDDEN_JUMPTARGET(fork)
  86749. #else
  86750. brnz,pn %o0, 1f
  86751. #endif
  86752. @@ -55,7 +54,7 @@
  86753. and %o0, %o1, %o0
  86754. #if !defined SHARED || defined BROKEN_SPARC_WDISP22
  86755. 1: mov %o7, %g1
  86756. - call HIDDEN_JUMPTARGET(__fork)
  86757. + call HIDDEN_JUMPTARGET(fork)
  86758. mov %g1, %o7
  86759. #endif
  86760. SYSCALL_ERROR_HANDLER
  86761. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/unregister-atfork.c uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/unregister-atfork.c
  86762. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/unregister-atfork.c 2012-05-15 09:20:09.000000000 +0200
  86763. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/unregister-atfork.c 2014-07-25 20:36:08.801345136 +0200
  86764. @@ -13,9 +13,8 @@
  86765. Lesser General Public License for more details.
  86766. You should have received a copy of the GNU Lesser General Public
  86767. - License along with the GNU C Library; if not, write to the Free
  86768. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86769. - 02111-1307 USA. */
  86770. + License along with the GNU C Library; if not, see
  86771. + <http://www.gnu.org/licenses/>. */
  86772. #include <errno.h>
  86773. #include <stdlib.h>
  86774. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
  86775. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  86776. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h 2014-07-25 20:36:08.825345261 +0200
  86777. @@ -13,9 +13,8 @@
  86778. Lesser General Public License for more details.
  86779. You should have received a copy of the GNU Lesser General Public
  86780. - License along with the GNU C Library; if not, write to the Free
  86781. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86782. - 02111-1307 USA. */
  86783. + License along with the GNU C Library; if not, see
  86784. + <http://www.gnu.org/licenses/>. */
  86785. #include <sysdep.h>
  86786. #include <tls.h>
  86787. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/x86_64/vfork.S uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/x86_64/vfork.S
  86788. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/unix/sysv/linux/x86_64/vfork.S 2012-05-15 09:20:09.000000000 +0200
  86789. +++ uClibc-git/libpthread/linuxthreads/sysdeps/unix/sysv/linux/x86_64/vfork.S 2014-07-25 20:36:08.825345261 +0200
  86790. @@ -12,9 +12,8 @@
  86791. Lesser General Public License for more details.
  86792. You should have received a copy of the GNU Lesser General Public
  86793. - License along with the GNU C Library; if not, write to the Free
  86794. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86795. - 02111-1307 USA. */
  86796. + License along with the GNU C Library; if not, see
  86797. + <http://www.gnu.org/licenses/>. */
  86798. #include <sysdep-cancel.h>
  86799. #define _ERRNO_H 1
  86800. @@ -34,7 +33,7 @@
  86801. movq $pthread_create, %rax
  86802. testq %rax, %rax
  86803. #endif
  86804. - jne HIDDEN_JUMPTARGET (__fork)
  86805. + jne HIDDEN_JUMPTARGET (fork)
  86806. /* Pop the return PC value into RDI. We need a register that
  86807. is preserved by the syscall and that we're allowed to destroy. */
  86808. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/x86_64/pspinlock.c uClibc-git/libpthread/linuxthreads/sysdeps/x86_64/pspinlock.c
  86809. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/x86_64/pspinlock.c 2012-05-15 09:20:09.000000000 +0200
  86810. +++ uClibc-git/libpthread/linuxthreads/sysdeps/x86_64/pspinlock.c 2014-07-25 20:36:08.825345261 +0200
  86811. @@ -13,9 +13,8 @@
  86812. Lesser General Public License for more details.
  86813. You should have received a copy of the GNU Lesser General Public
  86814. - License along with the GNU C Library; if not, write to the Free
  86815. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86816. - 02111-1307 USA. */
  86817. + License along with the GNU C Library; if not, see
  86818. + <http://www.gnu.org/licenses/>. */
  86819. #include <errno.h>
  86820. #include <pthread.h>
  86821. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/x86_64/pt-machine.h uClibc-git/libpthread/linuxthreads/sysdeps/x86_64/pt-machine.h
  86822. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/x86_64/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  86823. +++ uClibc-git/libpthread/linuxthreads/sysdeps/x86_64/pt-machine.h 2014-07-25 20:36:08.825345261 +0200
  86824. @@ -14,9 +14,8 @@
  86825. Lesser General Public License for more details.
  86826. You should have received a copy of the GNU Lesser General Public
  86827. - License along with the GNU C Library; if not, write to the Free
  86828. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86829. - 02111-1307 USA. */
  86830. + License along with the GNU C Library; if not, see
  86831. + <http://www.gnu.org/licenses/>. */
  86832. #ifndef _PT_MACHINE_H
  86833. #define _PT_MACHINE_H 1
  86834. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/x86_64/tls.h uClibc-git/libpthread/linuxthreads/sysdeps/x86_64/tls.h
  86835. --- uClibc-0.9.33.2/libpthread/linuxthreads/sysdeps/x86_64/tls.h 2012-05-15 09:20:09.000000000 +0200
  86836. +++ uClibc-git/libpthread/linuxthreads/sysdeps/x86_64/tls.h 2014-07-25 20:36:08.825345261 +0200
  86837. @@ -13,9 +13,8 @@
  86838. Lesser General Public License for more details.
  86839. You should have received a copy of the GNU Lesser General Public
  86840. - License along with the GNU C Library; if not, write to the Free
  86841. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86842. - 02111-1307 USA. */
  86843. + License along with the GNU C Library; if not, see
  86844. + <http://www.gnu.org/licenses/>. */
  86845. #ifndef _TLS_H
  86846. #define _TLS_H
  86847. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/.cvsignore uClibc-git/libpthread/linuxthreads_db/.cvsignore
  86848. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/.cvsignore 2012-05-15 09:20:09.000000000 +0200
  86849. +++ uClibc-git/libpthread/linuxthreads_db/.cvsignore 1970-01-01 01:00:00.000000000 +0100
  86850. @@ -1,5 +0,0 @@
  86851. -.cvsignore
  86852. -.svn
  86853. -*.os
  86854. -Makefile
  86855. -Makefile.in
  86856. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/Makefile.old uClibc-git/libpthread/linuxthreads_db/Makefile.old
  86857. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/Makefile.old 2012-05-15 09:20:09.000000000 +0200
  86858. +++ uClibc-git/libpthread/linuxthreads_db/Makefile.old 2014-07-25 20:36:08.825345261 +0200
  86859. @@ -12,9 +12,8 @@
  86860. # Lesser General Public License for more details.
  86861. # You should have received a copy of the GNU Lesser General Public
  86862. -# License along with the GNU C Library; if not, write to the Free
  86863. -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86864. -# 02111-1307 USA.
  86865. +# License along with the GNU C Library; see the file COPYING.LIB. If
  86866. +# not, see <http://www.gnu.org/licenses/>.
  86867. # Makefile for linuxthreads debug library subdirectory of GNU C Library.
  86868. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/proc_service.h uClibc-git/libpthread/linuxthreads_db/proc_service.h
  86869. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/proc_service.h 2012-05-15 09:20:09.000000000 +0200
  86870. +++ uClibc-git/libpthread/linuxthreads_db/proc_service.h 2014-07-25 20:36:08.825345261 +0200
  86871. @@ -12,9 +12,8 @@
  86872. Lesser General Public License for more details.
  86873. You should have received a copy of the GNU Lesser General Public
  86874. - License along with the GNU C Library; if not, write to the Free
  86875. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86876. - 02111-1307 USA. */
  86877. + License along with the GNU C Library; if not, see
  86878. + <http://www.gnu.org/licenses/>. */
  86879. /* The definitions in this file must correspond to those in the debugger. */
  86880. #include <sys/procfs.h>
  86881. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_init.c uClibc-git/libpthread/linuxthreads_db/td_init.c
  86882. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_init.c 2012-05-15 09:20:09.000000000 +0200
  86883. +++ uClibc-git/libpthread/linuxthreads_db/td_init.c 2014-07-25 20:36:08.825345261 +0200
  86884. @@ -14,9 +14,8 @@
  86885. Lesser General Public License for more details.
  86886. You should have received a copy of the GNU Lesser General Public
  86887. - License along with the GNU C Library; if not, write to the Free
  86888. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86889. - 02111-1307 USA. */
  86890. + License along with the GNU C Library; if not, see
  86891. + <http://www.gnu.org/licenses/>. */
  86892. #include "thread_dbP.h"
  86893. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_log.c uClibc-git/libpthread/linuxthreads_db/td_log.c
  86894. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_log.c 2012-05-15 09:20:09.000000000 +0200
  86895. +++ uClibc-git/libpthread/linuxthreads_db/td_log.c 2014-07-25 20:36:08.825345261 +0200
  86896. @@ -14,9 +14,8 @@
  86897. Lesser General Public License for more details.
  86898. You should have received a copy of the GNU Lesser General Public
  86899. - License along with the GNU C Library; if not, write to the Free
  86900. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86901. - 02111-1307 USA. */
  86902. + License along with the GNU C Library; if not, see
  86903. + <http://www.gnu.org/licenses/>. */
  86904. #include "thread_dbP.h"
  86905. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_symbol_list.c uClibc-git/libpthread/linuxthreads_db/td_symbol_list.c
  86906. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_symbol_list.c 2012-05-15 09:20:09.000000000 +0200
  86907. +++ uClibc-git/libpthread/linuxthreads_db/td_symbol_list.c 2014-07-25 20:36:08.825345261 +0200
  86908. @@ -14,9 +14,8 @@
  86909. Lesser General Public License for more details.
  86910. You should have received a copy of the GNU Lesser General Public
  86911. - License along with the GNU C Library; if not, write to the Free
  86912. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86913. - 02111-1307 USA. */
  86914. + License along with the GNU C Library; if not, see
  86915. + <http://www.gnu.org/licenses/>. */
  86916. #include <assert.h>
  86917. #include "thread_dbP.h"
  86918. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_clear_event.c uClibc-git/libpthread/linuxthreads_db/td_ta_clear_event.c
  86919. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_clear_event.c 2012-05-15 09:20:09.000000000 +0200
  86920. +++ uClibc-git/libpthread/linuxthreads_db/td_ta_clear_event.c 2014-07-25 20:36:08.833345303 +0200
  86921. @@ -14,17 +14,14 @@
  86922. Lesser General Public License for more details.
  86923. You should have received a copy of the GNU Lesser General Public
  86924. - License along with the GNU C Library; if not, write to the Free
  86925. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86926. - 02111-1307 USA. */
  86927. + License along with the GNU C Library; if not, see
  86928. + <http://www.gnu.org/licenses/>. */
  86929. #include "thread_dbP.h"
  86930. td_err_e
  86931. -td_ta_clear_event (ta, event)
  86932. - const td_thragent_t *ta;
  86933. - td_thr_events_t *event;
  86934. +td_ta_clear_event(const td_thragent_t *ta, td_thr_events_t *event)
  86935. {
  86936. td_thr_events_t old_event;
  86937. int i;
  86938. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_delete.c uClibc-git/libpthread/linuxthreads_db/td_ta_delete.c
  86939. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_delete.c 2012-05-15 09:20:09.000000000 +0200
  86940. +++ uClibc-git/libpthread/linuxthreads_db/td_ta_delete.c 2014-07-25 20:36:08.833345303 +0200
  86941. @@ -14,9 +14,8 @@
  86942. Lesser General Public License for more details.
  86943. You should have received a copy of the GNU Lesser General Public
  86944. - License along with the GNU C Library; if not, write to the Free
  86945. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86946. - 02111-1307 USA. */
  86947. + License along with the GNU C Library; if not, see
  86948. + <http://www.gnu.org/licenses/>. */
  86949. #include <stdlib.h>
  86950. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_enable_stats.c uClibc-git/libpthread/linuxthreads_db/td_ta_enable_stats.c
  86951. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_enable_stats.c 2012-05-15 09:20:09.000000000 +0200
  86952. +++ uClibc-git/libpthread/linuxthreads_db/td_ta_enable_stats.c 2014-07-25 20:36:08.833345303 +0200
  86953. @@ -14,9 +14,8 @@
  86954. Lesser General Public License for more details.
  86955. You should have received a copy of the GNU Lesser General Public
  86956. - License along with the GNU C Library; if not, write to the Free
  86957. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86958. - 02111-1307 USA. */
  86959. + License along with the GNU C Library; if not, see
  86960. + <http://www.gnu.org/licenses/>. */
  86961. #include "thread_dbP.h"
  86962. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_event_addr.c uClibc-git/libpthread/linuxthreads_db/td_ta_event_addr.c
  86963. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_event_addr.c 2012-05-15 09:20:09.000000000 +0200
  86964. +++ uClibc-git/libpthread/linuxthreads_db/td_ta_event_addr.c 2014-07-25 20:36:08.833345303 +0200
  86965. @@ -14,9 +14,8 @@
  86966. Lesser General Public License for more details.
  86967. You should have received a copy of the GNU Lesser General Public
  86968. - License along with the GNU C Library; if not, write to the Free
  86969. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86970. - 02111-1307 USA. */
  86971. + License along with the GNU C Library; if not, see
  86972. + <http://www.gnu.org/licenses/>. */
  86973. #include "thread_dbP.h"
  86974. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_event_getmsg.c uClibc-git/libpthread/linuxthreads_db/td_ta_event_getmsg.c
  86975. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_event_getmsg.c 2012-05-15 09:20:09.000000000 +0200
  86976. +++ uClibc-git/libpthread/linuxthreads_db/td_ta_event_getmsg.c 2014-07-25 20:36:08.833345303 +0200
  86977. @@ -14,9 +14,8 @@
  86978. Lesser General Public License for more details.
  86979. You should have received a copy of the GNU Lesser General Public
  86980. - License along with the GNU C Library; if not, write to the Free
  86981. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86982. - 02111-1307 USA. */
  86983. + License along with the GNU C Library; if not, see
  86984. + <http://www.gnu.org/licenses/>. */
  86985. #include <stddef.h>
  86986. #include <string.h>
  86987. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_get_nthreads.c uClibc-git/libpthread/linuxthreads_db/td_ta_get_nthreads.c
  86988. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_get_nthreads.c 2012-05-15 09:20:09.000000000 +0200
  86989. +++ uClibc-git/libpthread/linuxthreads_db/td_ta_get_nthreads.c 2014-07-25 20:36:08.833345303 +0200
  86990. @@ -14,9 +14,8 @@
  86991. Lesser General Public License for more details.
  86992. You should have received a copy of the GNU Lesser General Public
  86993. - License along with the GNU C Library; if not, write to the Free
  86994. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  86995. - 02111-1307 USA. */
  86996. + License along with the GNU C Library; if not, see
  86997. + <http://www.gnu.org/licenses/>. */
  86998. #include "thread_dbP.h"
  86999. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_get_ph.c uClibc-git/libpthread/linuxthreads_db/td_ta_get_ph.c
  87000. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_get_ph.c 2012-05-15 09:20:09.000000000 +0200
  87001. +++ uClibc-git/libpthread/linuxthreads_db/td_ta_get_ph.c 2014-07-25 20:36:08.833345303 +0200
  87002. @@ -14,9 +14,8 @@
  87003. Lesser General Public License for more details.
  87004. You should have received a copy of the GNU Lesser General Public
  87005. - License along with the GNU C Library; if not, write to the Free
  87006. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87007. - 02111-1307 USA. */
  87008. + License along with the GNU C Library; if not, see
  87009. + <http://www.gnu.org/licenses/>. */
  87010. #include "thread_dbP.h"
  87011. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_get_stats.c uClibc-git/libpthread/linuxthreads_db/td_ta_get_stats.c
  87012. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_get_stats.c 2012-05-15 09:20:09.000000000 +0200
  87013. +++ uClibc-git/libpthread/linuxthreads_db/td_ta_get_stats.c 2014-07-25 20:36:08.833345303 +0200
  87014. @@ -14,9 +14,8 @@
  87015. Lesser General Public License for more details.
  87016. You should have received a copy of the GNU Lesser General Public
  87017. - License along with the GNU C Library; if not, write to the Free
  87018. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87019. - 02111-1307 USA. */
  87020. + License along with the GNU C Library; if not, see
  87021. + <http://www.gnu.org/licenses/>. */
  87022. #include "thread_dbP.h"
  87023. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_map_id2thr.c uClibc-git/libpthread/linuxthreads_db/td_ta_map_id2thr.c
  87024. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_map_id2thr.c 2012-05-15 09:20:09.000000000 +0200
  87025. +++ uClibc-git/libpthread/linuxthreads_db/td_ta_map_id2thr.c 2014-07-25 20:36:08.833345303 +0200
  87026. @@ -14,9 +14,8 @@
  87027. Lesser General Public License for more details.
  87028. You should have received a copy of the GNU Lesser General Public
  87029. - License along with the GNU C Library; if not, write to the Free
  87030. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87031. - 02111-1307 USA. */
  87032. + License along with the GNU C Library; if not, see
  87033. + <http://www.gnu.org/licenses/>. */
  87034. #include "thread_dbP.h"
  87035. #include <linuxthreads/internals.h>
  87036. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_map_lwp2thr.c uClibc-git/libpthread/linuxthreads_db/td_ta_map_lwp2thr.c
  87037. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_map_lwp2thr.c 2012-05-15 09:20:09.000000000 +0200
  87038. +++ uClibc-git/libpthread/linuxthreads_db/td_ta_map_lwp2thr.c 2014-07-25 20:36:08.833345303 +0200
  87039. @@ -14,9 +14,8 @@
  87040. Lesser General Public License for more details.
  87041. You should have received a copy of the GNU Lesser General Public
  87042. - License along with the GNU C Library; if not, write to the Free
  87043. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87044. - 02111-1307 USA. */
  87045. + License along with the GNU C Library; if not, see
  87046. + <http://www.gnu.org/licenses/>. */
  87047. #include "thread_dbP.h"
  87048. #include <linuxthreads/internals.h>
  87049. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_new.c uClibc-git/libpthread/linuxthreads_db/td_ta_new.c
  87050. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_new.c 2012-05-15 09:20:09.000000000 +0200
  87051. +++ uClibc-git/libpthread/linuxthreads_db/td_ta_new.c 2014-07-25 20:36:08.833345303 +0200
  87052. @@ -14,9 +14,8 @@
  87053. Lesser General Public License for more details.
  87054. You should have received a copy of the GNU Lesser General Public
  87055. - License along with the GNU C Library; if not, write to the Free
  87056. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87057. - 02111-1307 USA. */
  87058. + License along with the GNU C Library; if not, see
  87059. + <http://www.gnu.org/licenses/>. */
  87060. #include <stddef.h>
  87061. #include <stdlib.h>
  87062. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_reset_stats.c uClibc-git/libpthread/linuxthreads_db/td_ta_reset_stats.c
  87063. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_reset_stats.c 2012-05-15 09:20:09.000000000 +0200
  87064. +++ uClibc-git/libpthread/linuxthreads_db/td_ta_reset_stats.c 2014-07-25 20:36:08.833345303 +0200
  87065. @@ -14,9 +14,8 @@
  87066. Lesser General Public License for more details.
  87067. You should have received a copy of the GNU Lesser General Public
  87068. - License along with the GNU C Library; if not, write to the Free
  87069. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87070. - 02111-1307 USA. */
  87071. + License along with the GNU C Library; if not, see
  87072. + <http://www.gnu.org/licenses/>. */
  87073. #include "thread_dbP.h"
  87074. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_setconcurrency.c uClibc-git/libpthread/linuxthreads_db/td_ta_setconcurrency.c
  87075. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_setconcurrency.c 2012-05-15 09:20:09.000000000 +0200
  87076. +++ uClibc-git/libpthread/linuxthreads_db/td_ta_setconcurrency.c 2014-07-25 20:36:08.833345303 +0200
  87077. @@ -14,9 +14,8 @@
  87078. Lesser General Public License for more details.
  87079. You should have received a copy of the GNU Lesser General Public
  87080. - License along with the GNU C Library; if not, write to the Free
  87081. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87082. - 02111-1307 USA. */
  87083. + License along with the GNU C Library; if not, see
  87084. + <http://www.gnu.org/licenses/>. */
  87085. #include "thread_dbP.h"
  87086. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_set_event.c uClibc-git/libpthread/linuxthreads_db/td_ta_set_event.c
  87087. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_set_event.c 2012-05-15 09:20:09.000000000 +0200
  87088. +++ uClibc-git/libpthread/linuxthreads_db/td_ta_set_event.c 2014-07-25 20:36:08.833345303 +0200
  87089. @@ -14,17 +14,14 @@
  87090. Lesser General Public License for more details.
  87091. You should have received a copy of the GNU Lesser General Public
  87092. - License along with the GNU C Library; if not, write to the Free
  87093. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87094. - 02111-1307 USA. */
  87095. + License along with the GNU C Library; if not, see
  87096. + <http://www.gnu.org/licenses/>. */
  87097. #include "thread_dbP.h"
  87098. td_err_e
  87099. -td_ta_set_event (ta, event)
  87100. - const td_thragent_t *ta;
  87101. - td_thr_events_t *event;
  87102. +td_ta_set_event(const td_thragent_t *ta, td_thr_events_t *event)
  87103. {
  87104. td_thr_events_t old_event;
  87105. int i;
  87106. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_thr_iter.c uClibc-git/libpthread/linuxthreads_db/td_ta_thr_iter.c
  87107. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_thr_iter.c 2012-05-15 09:20:09.000000000 +0200
  87108. +++ uClibc-git/libpthread/linuxthreads_db/td_ta_thr_iter.c 2014-07-25 20:36:08.833345303 +0200
  87109. @@ -14,9 +14,8 @@
  87110. Lesser General Public License for more details.
  87111. You should have received a copy of the GNU Lesser General Public
  87112. - License along with the GNU C Library; if not, write to the Free
  87113. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87114. - 02111-1307 USA. */
  87115. + License along with the GNU C Library; if not, see
  87116. + <http://www.gnu.org/licenses/>. */
  87117. #include "thread_dbP.h"
  87118. #include <linuxthreads/internals.h>
  87119. @@ -40,7 +39,7 @@
  87120. memset (&pds, '\0', sizeof (pds));
  87121. /* Empty thread descriptor the thread library would create. */
  87122. -#if !defined USE_TLS || !TLS_DTV_AT_TP
  87123. +#if !defined __UCLIBC_HAS_TLS__ || !TLS_DTV_AT_TP
  87124. pds.p_header.data.self = &pds;
  87125. #endif
  87126. pds.p_nextlive = pds.p_prevlive = &pds;
  87127. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_tsd_iter.c uClibc-git/libpthread/linuxthreads_db/td_ta_tsd_iter.c
  87128. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_ta_tsd_iter.c 2012-05-15 09:20:09.000000000 +0200
  87129. +++ uClibc-git/libpthread/linuxthreads_db/td_ta_tsd_iter.c 2014-07-25 20:36:08.837345325 +0200
  87130. @@ -14,9 +14,8 @@
  87131. Lesser General Public License for more details.
  87132. You should have received a copy of the GNU Lesser General Public
  87133. - License along with the GNU C Library; if not, write to the Free
  87134. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87135. - 02111-1307 USA. */
  87136. + License along with the GNU C Library; if not, see
  87137. + <http://www.gnu.org/licenses/>. */
  87138. #include "thread_dbP.h"
  87139. #include <linuxthreads/internals.h>
  87140. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_clear_event.c uClibc-git/libpthread/linuxthreads_db/td_thr_clear_event.c
  87141. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_clear_event.c 2012-05-15 09:20:09.000000000 +0200
  87142. +++ uClibc-git/libpthread/linuxthreads_db/td_thr_clear_event.c 2014-07-25 20:36:08.837345325 +0200
  87143. @@ -14,9 +14,8 @@
  87144. Lesser General Public License for more details.
  87145. You should have received a copy of the GNU Lesser General Public
  87146. - License along with the GNU C Library; if not, write to the Free
  87147. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87148. - 02111-1307 USA. */
  87149. + License along with the GNU C Library; if not, see
  87150. + <http://www.gnu.org/licenses/>. */
  87151. #include <stddef.h>
  87152. @@ -24,9 +23,7 @@
  87153. td_err_e
  87154. -td_thr_clear_event (th, event)
  87155. - const td_thrhandle_t *th;
  87156. - td_thr_events_t *event;
  87157. +td_thr_clear_event(const td_thrhandle_t *th, td_thr_events_t *event)
  87158. {
  87159. td_thr_events_t old_event;
  87160. int i;
  87161. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_dbresume.c uClibc-git/libpthread/linuxthreads_db/td_thr_dbresume.c
  87162. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_dbresume.c 2012-05-15 09:20:09.000000000 +0200
  87163. +++ uClibc-git/libpthread/linuxthreads_db/td_thr_dbresume.c 2014-07-25 20:36:08.837345325 +0200
  87164. @@ -14,9 +14,8 @@
  87165. Lesser General Public License for more details.
  87166. You should have received a copy of the GNU Lesser General Public
  87167. - License along with the GNU C Library; if not, write to the Free
  87168. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87169. - 02111-1307 USA. */
  87170. + License along with the GNU C Library; if not, see
  87171. + <http://www.gnu.org/licenses/>. */
  87172. #include "thread_dbP.h"
  87173. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_dbsuspend.c uClibc-git/libpthread/linuxthreads_db/td_thr_dbsuspend.c
  87174. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_dbsuspend.c 2012-05-15 09:20:09.000000000 +0200
  87175. +++ uClibc-git/libpthread/linuxthreads_db/td_thr_dbsuspend.c 2014-07-25 20:36:08.837345325 +0200
  87176. @@ -14,9 +14,8 @@
  87177. Lesser General Public License for more details.
  87178. You should have received a copy of the GNU Lesser General Public
  87179. - License along with the GNU C Library; if not, write to the Free
  87180. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87181. - 02111-1307 USA. */
  87182. + License along with the GNU C Library; if not, see
  87183. + <http://www.gnu.org/licenses/>. */
  87184. #include "thread_dbP.h"
  87185. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_event_enable.c uClibc-git/libpthread/linuxthreads_db/td_thr_event_enable.c
  87186. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_event_enable.c 2012-05-15 09:20:09.000000000 +0200
  87187. +++ uClibc-git/libpthread/linuxthreads_db/td_thr_event_enable.c 2014-07-25 20:36:08.837345325 +0200
  87188. @@ -14,9 +14,8 @@
  87189. Lesser General Public License for more details.
  87190. You should have received a copy of the GNU Lesser General Public
  87191. - License along with the GNU C Library; if not, write to the Free
  87192. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87193. - 02111-1307 USA. */
  87194. + License along with the GNU C Library; if not, see
  87195. + <http://www.gnu.org/licenses/>. */
  87196. #include <stddef.h>
  87197. @@ -24,9 +23,7 @@
  87198. td_err_e
  87199. -td_thr_event_enable (th, onoff)
  87200. - const td_thrhandle_t *th;
  87201. - int onoff;
  87202. +td_thr_event_enable(const td_thrhandle_t *th, int onoff)
  87203. {
  87204. LOG ("td_thr_event_enable");
  87205. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_event_getmsg.c uClibc-git/libpthread/linuxthreads_db/td_thr_event_getmsg.c
  87206. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_event_getmsg.c 2012-05-15 09:20:09.000000000 +0200
  87207. +++ uClibc-git/libpthread/linuxthreads_db/td_thr_event_getmsg.c 2014-07-25 20:36:08.837345325 +0200
  87208. @@ -14,9 +14,8 @@
  87209. Lesser General Public License for more details.
  87210. You should have received a copy of the GNU Lesser General Public
  87211. - License along with the GNU C Library; if not, write to the Free
  87212. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87213. - 02111-1307 USA. */
  87214. + License along with the GNU C Library; if not, see
  87215. + <http://www.gnu.org/licenses/>. */
  87216. #include <stddef.h>
  87217. #include <string.h>
  87218. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_getfpregs.c uClibc-git/libpthread/linuxthreads_db/td_thr_getfpregs.c
  87219. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_getfpregs.c 2012-05-15 09:20:09.000000000 +0200
  87220. +++ uClibc-git/libpthread/linuxthreads_db/td_thr_getfpregs.c 2014-07-25 20:36:08.837345325 +0200
  87221. @@ -14,9 +14,8 @@
  87222. Lesser General Public License for more details.
  87223. You should have received a copy of the GNU Lesser General Public
  87224. - License along with the GNU C Library; if not, write to the Free
  87225. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87226. - 02111-1307 USA. */
  87227. + License along with the GNU C Library; if not, see
  87228. + <http://www.gnu.org/licenses/>. */
  87229. #include "thread_dbP.h"
  87230. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_getgregs.c uClibc-git/libpthread/linuxthreads_db/td_thr_getgregs.c
  87231. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_getgregs.c 2012-05-15 09:20:09.000000000 +0200
  87232. +++ uClibc-git/libpthread/linuxthreads_db/td_thr_getgregs.c 2014-07-25 20:36:08.837345325 +0200
  87233. @@ -14,9 +14,8 @@
  87234. Lesser General Public License for more details.
  87235. You should have received a copy of the GNU Lesser General Public
  87236. - License along with the GNU C Library; if not, write to the Free
  87237. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87238. - 02111-1307 USA. */
  87239. + License along with the GNU C Library; if not, see
  87240. + <http://www.gnu.org/licenses/>. */
  87241. #include "thread_dbP.h"
  87242. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_get_info.c uClibc-git/libpthread/linuxthreads_db/td_thr_get_info.c
  87243. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_get_info.c 2012-05-15 09:20:09.000000000 +0200
  87244. +++ uClibc-git/libpthread/linuxthreads_db/td_thr_get_info.c 2014-07-25 20:36:08.837345325 +0200
  87245. @@ -14,9 +14,8 @@
  87246. Lesser General Public License for more details.
  87247. You should have received a copy of the GNU Lesser General Public
  87248. - License along with the GNU C Library; if not, write to the Free
  87249. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87250. - 02111-1307 USA. */
  87251. + License along with the GNU C Library; if not, see
  87252. + <http://www.gnu.org/licenses/>. */
  87253. #include <stddef.h>
  87254. #include <string.h>
  87255. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_getxregs.c uClibc-git/libpthread/linuxthreads_db/td_thr_getxregs.c
  87256. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_getxregs.c 2012-05-15 09:20:09.000000000 +0200
  87257. +++ uClibc-git/libpthread/linuxthreads_db/td_thr_getxregs.c 2014-07-25 20:36:08.837345325 +0200
  87258. @@ -14,9 +14,8 @@
  87259. Lesser General Public License for more details.
  87260. You should have received a copy of the GNU Lesser General Public
  87261. - License along with the GNU C Library; if not, write to the Free
  87262. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87263. - 02111-1307 USA. */
  87264. + License along with the GNU C Library; if not, see
  87265. + <http://www.gnu.org/licenses/>. */
  87266. #include "thread_dbP.h"
  87267. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_getxregsize.c uClibc-git/libpthread/linuxthreads_db/td_thr_getxregsize.c
  87268. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_getxregsize.c 2012-05-15 09:20:09.000000000 +0200
  87269. +++ uClibc-git/libpthread/linuxthreads_db/td_thr_getxregsize.c 2014-07-25 20:36:08.837345325 +0200
  87270. @@ -14,9 +14,8 @@
  87271. Lesser General Public License for more details.
  87272. You should have received a copy of the GNU Lesser General Public
  87273. - License along with the GNU C Library; if not, write to the Free
  87274. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87275. - 02111-1307 USA. */
  87276. + License along with the GNU C Library; if not, see
  87277. + <http://www.gnu.org/licenses/>. */
  87278. #include "thread_dbP.h"
  87279. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_set_event.c uClibc-git/libpthread/linuxthreads_db/td_thr_set_event.c
  87280. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_set_event.c 2012-05-15 09:20:09.000000000 +0200
  87281. +++ uClibc-git/libpthread/linuxthreads_db/td_thr_set_event.c 2014-07-25 20:36:08.837345325 +0200
  87282. @@ -14,9 +14,8 @@
  87283. Lesser General Public License for more details.
  87284. You should have received a copy of the GNU Lesser General Public
  87285. - License along with the GNU C Library; if not, write to the Free
  87286. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87287. - 02111-1307 USA. */
  87288. + License along with the GNU C Library; if not, see
  87289. + <http://www.gnu.org/licenses/>. */
  87290. #include <stddef.h>
  87291. @@ -24,9 +23,7 @@
  87292. td_err_e
  87293. -td_thr_set_event (th, event)
  87294. - const td_thrhandle_t *th;
  87295. - td_thr_events_t *event;
  87296. +td_thr_set_event(const td_thrhandle_t *th, td_thr_events_t *event)
  87297. {
  87298. td_thr_events_t old_event;
  87299. int i;
  87300. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_setfpregs.c uClibc-git/libpthread/linuxthreads_db/td_thr_setfpregs.c
  87301. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_setfpregs.c 2012-05-15 09:20:09.000000000 +0200
  87302. +++ uClibc-git/libpthread/linuxthreads_db/td_thr_setfpregs.c 2014-07-25 20:36:08.837345325 +0200
  87303. @@ -14,9 +14,8 @@
  87304. Lesser General Public License for more details.
  87305. You should have received a copy of the GNU Lesser General Public
  87306. - License along with the GNU C Library; if not, write to the Free
  87307. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87308. - 02111-1307 USA. */
  87309. + License along with the GNU C Library; if not, see
  87310. + <http://www.gnu.org/licenses/>. */
  87311. #include "thread_dbP.h"
  87312. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_setgregs.c uClibc-git/libpthread/linuxthreads_db/td_thr_setgregs.c
  87313. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_setgregs.c 2012-05-15 09:20:09.000000000 +0200
  87314. +++ uClibc-git/libpthread/linuxthreads_db/td_thr_setgregs.c 2014-07-25 20:36:08.837345325 +0200
  87315. @@ -14,9 +14,8 @@
  87316. Lesser General Public License for more details.
  87317. You should have received a copy of the GNU Lesser General Public
  87318. - License along with the GNU C Library; if not, write to the Free
  87319. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87320. - 02111-1307 USA. */
  87321. + License along with the GNU C Library; if not, see
  87322. + <http://www.gnu.org/licenses/>. */
  87323. #include "thread_dbP.h"
  87324. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_setprio.c uClibc-git/libpthread/linuxthreads_db/td_thr_setprio.c
  87325. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_setprio.c 2012-05-15 09:20:09.000000000 +0200
  87326. +++ uClibc-git/libpthread/linuxthreads_db/td_thr_setprio.c 2014-07-25 20:36:08.837345325 +0200
  87327. @@ -14,9 +14,8 @@
  87328. Lesser General Public License for more details.
  87329. You should have received a copy of the GNU Lesser General Public
  87330. - License along with the GNU C Library; if not, write to the Free
  87331. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87332. - 02111-1307 USA. */
  87333. + License along with the GNU C Library; if not, see
  87334. + <http://www.gnu.org/licenses/>. */
  87335. #include "thread_dbP.h"
  87336. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_setsigpending.c uClibc-git/libpthread/linuxthreads_db/td_thr_setsigpending.c
  87337. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_setsigpending.c 2012-05-15 09:20:09.000000000 +0200
  87338. +++ uClibc-git/libpthread/linuxthreads_db/td_thr_setsigpending.c 2014-07-25 20:36:08.837345325 +0200
  87339. @@ -14,9 +14,8 @@
  87340. Lesser General Public License for more details.
  87341. You should have received a copy of the GNU Lesser General Public
  87342. - License along with the GNU C Library; if not, write to the Free
  87343. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87344. - 02111-1307 USA. */
  87345. + License along with the GNU C Library; if not, see
  87346. + <http://www.gnu.org/licenses/>. */
  87347. #include "thread_dbP.h"
  87348. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_setxregs.c uClibc-git/libpthread/linuxthreads_db/td_thr_setxregs.c
  87349. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_setxregs.c 2012-05-15 09:20:09.000000000 +0200
  87350. +++ uClibc-git/libpthread/linuxthreads_db/td_thr_setxregs.c 2014-07-25 20:36:08.837345325 +0200
  87351. @@ -14,9 +14,8 @@
  87352. Lesser General Public License for more details.
  87353. You should have received a copy of the GNU Lesser General Public
  87354. - License along with the GNU C Library; if not, write to the Free
  87355. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87356. - 02111-1307 USA. */
  87357. + License along with the GNU C Library; if not, see
  87358. + <http://www.gnu.org/licenses/>. */
  87359. #include "thread_dbP.h"
  87360. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_sigsetmask.c uClibc-git/libpthread/linuxthreads_db/td_thr_sigsetmask.c
  87361. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_sigsetmask.c 2012-05-15 09:20:09.000000000 +0200
  87362. +++ uClibc-git/libpthread/linuxthreads_db/td_thr_sigsetmask.c 2014-07-25 20:36:08.837345325 +0200
  87363. @@ -14,9 +14,8 @@
  87364. Lesser General Public License for more details.
  87365. You should have received a copy of the GNU Lesser General Public
  87366. - License along with the GNU C Library; if not, write to the Free
  87367. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87368. - 02111-1307 USA. */
  87369. + License along with the GNU C Library; if not, see
  87370. + <http://www.gnu.org/licenses/>. */
  87371. #include "thread_dbP.h"
  87372. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_tlsbase.c uClibc-git/libpthread/linuxthreads_db/td_thr_tlsbase.c
  87373. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_tlsbase.c 2012-05-15 09:20:09.000000000 +0200
  87374. +++ uClibc-git/libpthread/linuxthreads_db/td_thr_tlsbase.c 2014-07-25 20:36:08.837345325 +0200
  87375. @@ -13,9 +13,8 @@
  87376. Lesser General Public License for more details.
  87377. You should have received a copy of the GNU Lesser General Public
  87378. - License along with the GNU C Library; if not, write to the Free
  87379. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87380. - 02111-1307 USA. */
  87381. + License along with the GNU C Library; if not, see
  87382. + <http://www.gnu.org/licenses/>. */
  87383. #include "thread_dbP.h"
  87384. @@ -30,7 +29,7 @@
  87385. if (modid < 1)
  87386. return TD_NOTLS;
  87387. -#if USE_TLS
  87388. +#ifdef __UCLIBC_HAS_TLS__
  87389. union dtv pdtv, *dtvp;
  87390. LOG ("td_thr_tlsbase");
  87391. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_tls_get_addr.c uClibc-git/libpthread/linuxthreads_db/td_thr_tls_get_addr.c
  87392. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_tls_get_addr.c 2012-05-15 09:20:09.000000000 +0200
  87393. +++ uClibc-git/libpthread/linuxthreads_db/td_thr_tls_get_addr.c 2014-07-25 20:36:08.837345325 +0200
  87394. @@ -14,9 +14,8 @@
  87395. Lesser General Public License for more details.
  87396. You should have received a copy of the GNU Lesser General Public
  87397. - License along with the GNU C Library; if not, write to the Free
  87398. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87399. - 02111-1307 USA. */
  87400. + License along with the GNU C Library; if not, see
  87401. + <http://www.gnu.org/licenses/>. */
  87402. #include <link.h>
  87403. #include "thread_dbP.h"
  87404. @@ -27,7 +26,7 @@
  87405. size_t offset __attribute__ ((unused)),
  87406. void **address __attribute__ ((unused)))
  87407. {
  87408. -#if USE_TLS
  87409. +#ifdef __UCLIBC_HAS_TLS__
  87410. /* Read the module ID from the link_map. */
  87411. size_t modid;
  87412. if (ps_pdread (th->th_ta_p->ph,
  87413. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_tsd.c uClibc-git/libpthread/linuxthreads_db/td_thr_tsd.c
  87414. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_tsd.c 2012-05-15 09:20:09.000000000 +0200
  87415. +++ uClibc-git/libpthread/linuxthreads_db/td_thr_tsd.c 2014-07-25 20:36:08.837345325 +0200
  87416. @@ -14,9 +14,8 @@
  87417. Lesser General Public License for more details.
  87418. You should have received a copy of the GNU Lesser General Public
  87419. - License along with the GNU C Library; if not, write to the Free
  87420. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87421. - 02111-1307 USA. */
  87422. + License along with the GNU C Library; if not, see
  87423. + <http://www.gnu.org/licenses/>. */
  87424. #include "thread_dbP.h"
  87425. #include <linuxthreads/internals.h>
  87426. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_validate.c uClibc-git/libpthread/linuxthreads_db/td_thr_validate.c
  87427. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/td_thr_validate.c 2012-05-15 09:20:09.000000000 +0200
  87428. +++ uClibc-git/libpthread/linuxthreads_db/td_thr_validate.c 2014-07-25 20:36:08.837345325 +0200
  87429. @@ -14,9 +14,8 @@
  87430. Lesser General Public License for more details.
  87431. You should have received a copy of the GNU Lesser General Public
  87432. - License along with the GNU C Library; if not, write to the Free
  87433. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87434. - 02111-1307 USA. */
  87435. + License along with the GNU C Library; if not, see
  87436. + <http://www.gnu.org/licenses/>. */
  87437. #include "thread_dbP.h"
  87438. #include <linuxthreads/internals.h>
  87439. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads_db/thread_db.h uClibc-git/libpthread/linuxthreads_db/thread_db.h
  87440. --- uClibc-0.9.33.2/libpthread/linuxthreads_db/thread_db.h 2012-05-15 09:20:09.000000000 +0200
  87441. +++ uClibc-git/libpthread/linuxthreads_db/thread_db.h 2014-07-25 20:36:08.837345325 +0200
  87442. @@ -13,9 +13,8 @@
  87443. Lesser General Public License for more details.
  87444. You should have received a copy of the GNU Lesser General Public
  87445. - License along with the GNU C Library; if not, write to the Free
  87446. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87447. - 02111-1307 USA. */
  87448. + License along with the GNU C Library; if not, see
  87449. + <http://www.gnu.org/licenses/>. */
  87450. #ifndef _THREAD_DB_H
  87451. #define _THREAD_DB_H 1
  87452. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/cancel.c uClibc-git/libpthread/linuxthreads.old/cancel.c
  87453. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/cancel.c 2012-05-15 09:20:09.000000000 +0200
  87454. +++ uClibc-git/libpthread/linuxthreads.old/cancel.c 2014-07-25 20:36:08.009340986 +0200
  87455. @@ -14,8 +14,6 @@
  87456. /* Thread cancellation */
  87457. -#define __FORCE_GLIBC
  87458. -#include <features.h>
  87459. #include <errno.h>
  87460. #include "pthread.h"
  87461. #include "internals.h"
  87462. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/condvar.c uClibc-git/libpthread/linuxthreads.old/condvar.c
  87463. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/condvar.c 2012-05-15 09:20:09.000000000 +0200
  87464. +++ uClibc-git/libpthread/linuxthreads.old/condvar.c 2014-07-25 20:36:08.009340986 +0200
  87465. @@ -25,16 +25,6 @@
  87466. #include "queue.h"
  87467. #include "restart.h"
  87468. -libpthread_hidden_proto(pthread_cond_broadcast)
  87469. -libpthread_hidden_proto(pthread_cond_destroy)
  87470. -libpthread_hidden_proto(pthread_cond_init)
  87471. -libpthread_hidden_proto(pthread_cond_signal)
  87472. -libpthread_hidden_proto(pthread_cond_wait)
  87473. -libpthread_hidden_proto(pthread_cond_timedwait)
  87474. -
  87475. -libpthread_hidden_proto(pthread_condattr_destroy)
  87476. -libpthread_hidden_proto(pthread_condattr_init)
  87477. -
  87478. int pthread_cond_init(pthread_cond_t *cond,
  87479. const pthread_condattr_t *cond_attr attribute_unused)
  87480. {
  87481. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/errno.c uClibc-git/libpthread/linuxthreads.old/errno.c
  87482. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/errno.c 2012-05-15 09:20:09.000000000 +0200
  87483. +++ uClibc-git/libpthread/linuxthreads.old/errno.c 2014-07-25 20:36:08.009340986 +0200
  87484. @@ -14,8 +14,6 @@
  87485. /* Define the location of errno for the remainder of the C library */
  87486. -#define __FORCE_GLIBC
  87487. -#include <features.h>
  87488. #include <errno.h>
  87489. #include <netdb.h>
  87490. #include "pthread.h"
  87491. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/events.c uClibc-git/libpthread/linuxthreads.old/events.c
  87492. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/events.c 2012-05-15 09:20:09.000000000 +0200
  87493. +++ uClibc-git/libpthread/linuxthreads.old/events.c 2014-07-25 20:36:08.009340986 +0200
  87494. @@ -14,8 +14,7 @@
  87495. You should have received a copy of the GNU Library General Public
  87496. License along with the GNU C Library; see the file COPYING.LIB. If not,
  87497. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  87498. - Boston, MA 02111-1307, USA. */
  87499. + see <http://www.gnu.org/licenses/>. */
  87500. /* The functions contained here do nothing, they just return. */
  87501. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/forward.c uClibc-git/libpthread/linuxthreads.old/forward.c
  87502. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/forward.c 2012-05-15 09:20:09.000000000 +0200
  87503. +++ uClibc-git/libpthread/linuxthreads.old/forward.c 2014-07-25 20:36:08.009340986 +0200
  87504. @@ -13,9 +13,8 @@
  87505. Lesser General Public License for more details.
  87506. You should have received a copy of the GNU Lesser General Public
  87507. - License along with the GNU C Library; if not, write to the Free
  87508. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87509. - 02111-1307 USA. */
  87510. + License along with the GNU C Library; if not, see
  87511. + <http://www.gnu.org/licenses/>. */
  87512. #include <features.h>
  87513. #include <stdlib.h>
  87514. @@ -163,8 +162,12 @@
  87515. FORWARD (pthread_setcanceltype, (int type, int *oldtype), (type, oldtype), 0)
  87516. +#if 0
  87517. FORWARD2 (_pthread_cleanup_push, void, (struct _pthread_cleanup_buffer * buffer, void (*routine)(void *), void * arg), (buffer, routine, arg), return)
  87518. +#endif
  87519. FORWARD2 (_pthread_cleanup_push_defer, void, (struct _pthread_cleanup_buffer * buffer, void (*routine)(void *), void * arg), (buffer, routine, arg), return)
  87520. +#if 0
  87521. FORWARD2 (_pthread_cleanup_pop, void, (struct _pthread_cleanup_buffer * buffer, int execute), (buffer, execute), return)
  87522. +#endif
  87523. FORWARD2 (_pthread_cleanup_pop_restore, void, (struct _pthread_cleanup_buffer * buffer, int execute), (buffer, execute), return)
  87524. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/internals.h uClibc-git/libpthread/linuxthreads.old/internals.h
  87525. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/internals.h 2012-05-15 09:20:09.000000000 +0200
  87526. +++ uClibc-git/libpthread/linuxthreads.old/internals.h 2014-07-25 20:36:08.013341008 +0200
  87527. @@ -327,32 +327,28 @@
  87528. /* The page size we can get from the system. This should likely not be
  87529. changed by the machine file but, you never know. */
  87530. -extern size_t __pagesize;
  87531. -#include <bits/uClibc_page.h>
  87532. -#ifndef PAGE_SIZE
  87533. -#define PAGE_SIZE (sysconf (_SC_PAGESIZE))
  87534. -#endif
  87535. +#define __PAGE_SIZE (sysconf (_SC_PAGESIZE))
  87536. /* The max size of the thread stack segments. If the default
  87537. THREAD_SELF implementation is used, this must be a power of two and
  87538. - a multiple of PAGE_SIZE. */
  87539. + a multiple of __PAGE_SIZE. */
  87540. #ifndef STACK_SIZE
  87541. #ifdef __ARCH_USE_MMU__
  87542. #define STACK_SIZE (2 * 1024 * 1024)
  87543. #else
  87544. -#define STACK_SIZE (4 * __pagesize)
  87545. +#define STACK_SIZE (4 * __PAGE_SIZE)
  87546. #endif
  87547. #endif
  87548. -/* The initial size of the thread stack. Must be a multiple of PAGE_SIZE. */
  87549. +/* The initial size of the thread stack. Must be a multiple of __PAGE_SIZE. */
  87550. #ifndef INITIAL_STACK_SIZE
  87551. -#define INITIAL_STACK_SIZE (4 * __pagesize)
  87552. +#define INITIAL_STACK_SIZE (4 * __PAGE_SIZE)
  87553. #endif
  87554. /* Size of the thread manager stack. The "- 32" avoids wasting space
  87555. with some malloc() implementations. */
  87556. #ifndef THREAD_MANAGER_STACK_SIZE
  87557. -#define THREAD_MANAGER_STACK_SIZE (2 * __pagesize - 32)
  87558. +#define THREAD_MANAGER_STACK_SIZE (2 * __PAGE_SIZE - 32)
  87559. #endif
  87560. /* The base of the "array" of thread stacks. The array will grow down from
  87561. @@ -385,7 +381,7 @@
  87562. /* Recover thread descriptor for the current thread */
  87563. -extern pthread_descr __pthread_find_self (void) __attribute__ ((const));
  87564. +extern pthread_descr __pthread_find_self (void) __attribute__ ((const)) attribute_hidden;
  87565. static __inline__ pthread_descr thread_self (void) __attribute__ ((const));
  87566. static __inline__ pthread_descr thread_self (void)
  87567. @@ -455,18 +451,18 @@
  87568. /* Internal global functions */
  87569. void __pthread_do_exit (void *retval, char *currentframe)
  87570. - __attribute__ ((__noreturn__));
  87571. -void __pthread_destroy_specifics(void);
  87572. -void __pthread_perform_cleanup(char *currentframe);
  87573. -int __pthread_initialize_manager(void);
  87574. + __attribute__ ((__noreturn__)) attribute_hidden;
  87575. +void __pthread_destroy_specifics(void) attribute_hidden;
  87576. +void __pthread_perform_cleanup(char *currentframe) attribute_hidden;
  87577. +int __pthread_initialize_manager(void) attribute_hidden;
  87578. void __pthread_message(char * fmt, ...)
  87579. - __attribute__ ((__format__ (printf, 1, 2)));
  87580. -int __pthread_manager(void *reqfd);
  87581. -int __pthread_manager_event(void *reqfd);
  87582. -void __pthread_manager_sighandler(int sig);
  87583. -void __pthread_reset_main_thread(void);
  87584. -void __fresetlockfiles(void);
  87585. -void __pthread_manager_adjust_prio(int thread_prio);
  87586. + __attribute__ ((__format__ (printf, 1, 2))) attribute_hidden;
  87587. +int __pthread_manager(void *reqfd) attribute_hidden;
  87588. +int __pthread_manager_event(void *reqfd) attribute_hidden;
  87589. +void __pthread_manager_sighandler(int sig) attribute_hidden;
  87590. +void __pthread_reset_main_thread(void) attribute_hidden;
  87591. +void __fresetlockfiles(void) attribute_hidden;
  87592. +void __pthread_manager_adjust_prio(int thread_prio) attribute_hidden;
  87593. void __pthread_initialize_minimal (void);
  87594. extern void __pthread_exit (void *retval)
  87595. @@ -475,36 +471,36 @@
  87596. #endif
  87597. ;
  87598. -extern int __pthread_attr_setguardsize __P ((pthread_attr_t *__attr,
  87599. - size_t __guardsize));
  87600. -extern int __pthread_attr_getguardsize __P ((__const pthread_attr_t *__attr,
  87601. - size_t *__guardsize));
  87602. -extern int __pthread_attr_setstackaddr __P ((pthread_attr_t *__attr,
  87603. - void *__stackaddr));
  87604. -extern int __pthread_attr_getstackaddr __P ((__const pthread_attr_t *__attr,
  87605. - void **__stackaddr));
  87606. -extern int __pthread_attr_setstacksize __P ((pthread_attr_t *__attr,
  87607. - size_t __stacksize));
  87608. -extern int __pthread_attr_getstacksize __P ((__const pthread_attr_t *__attr,
  87609. - size_t *__stacksize));
  87610. -extern int __pthread_getconcurrency __P ((void));
  87611. -extern int __pthread_setconcurrency __P ((int __level));
  87612. -extern void __pthread_kill_other_threads_np __P ((void));
  87613. -
  87614. -extern void __pthread_restart_old(pthread_descr th);
  87615. -extern void __pthread_suspend_old(pthread_descr self);
  87616. -extern int __pthread_timedsuspend_old(pthread_descr self, const struct timespec *abstime);
  87617. -
  87618. -extern void __pthread_restart_new(pthread_descr th);
  87619. -extern void __pthread_suspend_new(pthread_descr self);
  87620. -extern int __pthread_timedsuspend_new(pthread_descr self, const struct timespec *abstime);
  87621. +extern int __pthread_attr_setguardsize(pthread_attr_t *__attr,
  87622. + size_t __guardsize) attribute_hidden;
  87623. +extern int __pthread_attr_getguardsize(const pthread_attr_t *__attr,
  87624. + size_t *__guardsize) attribute_hidden;
  87625. +extern int __pthread_attr_setstackaddr(pthread_attr_t *__attr,
  87626. + void *__stackaddr) attribute_hidden;
  87627. +extern int __pthread_attr_getstackaddr(const pthread_attr_t *__attr,
  87628. + void **__stackaddr) attribute_hidden;
  87629. +extern int __pthread_attr_setstacksize(pthread_attr_t *__attr,
  87630. + size_t __stacksize) attribute_hidden;
  87631. +extern int __pthread_attr_getstacksize(const pthread_attr_t *__attr,
  87632. + size_t *__stacksize) attribute_hidden;
  87633. +extern int __pthread_getconcurrency(void) attribute_hidden;
  87634. +extern int __pthread_setconcurrency(int __level) attribute_hidden;
  87635. +extern void __pthread_kill_other_threads_np(void) attribute_hidden;
  87636. +
  87637. +extern void __pthread_restart_old(pthread_descr th) attribute_hidden;
  87638. +extern void __pthread_suspend_old(pthread_descr self) attribute_hidden;
  87639. +extern int __pthread_timedsuspend_old(pthread_descr self, const struct timespec *abstime) attribute_hidden;
  87640. +
  87641. +extern void __pthread_restart_new(pthread_descr th) attribute_hidden;
  87642. +extern void __pthread_suspend_new(pthread_descr self) attribute_hidden;
  87643. +extern int __pthread_timedsuspend_new(pthread_descr self, const struct timespec *abstime) attribute_hidden;
  87644. -extern void __pthread_wait_for_restart_signal(pthread_descr self);
  87645. +extern void __pthread_wait_for_restart_signal(pthread_descr self) attribute_hidden;
  87646. /* Global pointers to old or new suspend functions */
  87647. -extern void (*__pthread_restart)(pthread_descr);
  87648. -extern void (*__pthread_suspend)(pthread_descr);
  87649. +extern void (*__pthread_restart)(pthread_descr) attribute_hidden;
  87650. +extern void (*__pthread_suspend)(pthread_descr) attribute_hidden;
  87651. #if defined NOT_IN_libc && defined IS_IN_libpthread
  87652. extern __typeof(pthread_mutex_init) __pthread_mutex_init attribute_hidden;
  87653. @@ -515,7 +511,7 @@
  87654. #endif
  87655. /* Prototypes for some of the new semaphore functions. */
  87656. -extern int __new_sem_post (sem_t * sem);
  87657. +/*extern int __new_sem_post (sem_t * sem);*/
  87658. /* TSD. */
  87659. extern int __pthread_internal_tsd_set (int key, const void * pointer);
  87660. @@ -524,12 +520,10 @@
  87661. __pthread_internal_tsd_address (int key);
  87662. /* The functions called the signal events. */
  87663. -extern void __linuxthreads_create_event (void);
  87664. -extern void __linuxthreads_death_event (void);
  87665. -extern void __linuxthreads_reap_event (void);
  87666. +extern void __linuxthreads_create_event (void) attribute_hidden;
  87667. +extern void __linuxthreads_death_event (void) attribute_hidden;
  87668. +extern void __linuxthreads_reap_event (void) attribute_hidden;
  87669. #include <pthread-functions.h>
  87670. -extern int * __libc_pthread_init (const struct pthread_functions *functions);
  87671. -
  87672. #endif /* internals.h */
  87673. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/libc_pthread_init.c uClibc-git/libpthread/linuxthreads.old/libc_pthread_init.c
  87674. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/libc_pthread_init.c 2012-05-15 09:20:09.000000000 +0200
  87675. +++ uClibc-git/libpthread/linuxthreads.old/libc_pthread_init.c 2014-07-25 20:36:08.013341008 +0200
  87676. @@ -13,27 +13,12 @@
  87677. Lesser General Public License for more details.
  87678. You should have received a copy of the GNU Lesser General Public
  87679. - License along with the GNU C Library; if not, write to the Free
  87680. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  87681. - 02111-1307 USA. */
  87682. + License along with the GNU C Library; if not, see
  87683. + <http://www.gnu.org/licenses/>. */
  87684. -#include <features.h>
  87685. #include <locale.h>
  87686. -#include <stdlib.h>
  87687. #include <string.h>
  87688. -
  87689. -/* see comment in forward.c */
  87690. -#define GCC_RENAME_BUG 1
  87691. -#ifdef GCC_RENAME_BUG
  87692. -# include <ctype.h>
  87693. -# include <signal.h>
  87694. -# include <unistd.h>
  87695. -# include <sys/time.h>
  87696. -# include <sys/wait.h>
  87697. -#endif
  87698. -
  87699. -#include "internals.h"
  87700. -#include "sysdeps/pthread/pthread-functions.h"
  87701. +#include <linuxthreads.old/sysdeps/pthread/pthread-functions.h>
  87702. int __libc_multiple_threads attribute_hidden __attribute__((nocommon));
  87703. @@ -48,7 +33,7 @@
  87704. sizeof (__libc_pthread_functions));
  87705. #endif
  87706. -#if ! defined USE___THREAD && defined __UCLIBC_HAS_XLOCALE__
  87707. +#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_XLOCALE__
  87708. /* Initialize thread-locale current locale to point to the global one.
  87709. With __thread support, the variable's initializer takes care of this. */
  87710. uselocale (LC_GLOBAL_LOCALE);
  87711. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/locale.c uClibc-git/libpthread/linuxthreads.old/locale.c
  87712. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/locale.c 2012-05-15 09:20:09.000000000 +0200
  87713. +++ uClibc-git/libpthread/linuxthreads.old/locale.c 2014-07-25 20:36:08.013341008 +0200
  87714. @@ -11,8 +11,8 @@
  87715. * Library General Public License for more details.
  87716. *
  87717. * You should have received a copy of the GNU Library General Public
  87718. - * License along with this library; if not, write to the Free
  87719. - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  87720. + * License along with this library; if not, see
  87721. + * <http://www.gnu.org/licenses/>.
  87722. */
  87723. #include <features.h>
  87724. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/lockfile.c uClibc-git/libpthread/linuxthreads.old/lockfile.c
  87725. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/lockfile.c 2012-05-15 09:20:09.000000000 +0200
  87726. +++ uClibc-git/libpthread/linuxthreads.old/lockfile.c 2014-07-25 20:36:08.013341008 +0200
  87727. @@ -13,9 +13,8 @@
  87728. Lesser General Public License for more details.
  87729. You should have received a copy of the GNU Lesser General Public
  87730. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  87731. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  87732. - Boston, MA 02111-1307, USA. */
  87733. + License along with the GNU C Library; see the file COPYING.LIB. If
  87734. + not, see <http://www.gnu.org/licenses/>. */
  87735. #include <stdio.h>
  87736. #include <pthread.h>
  87737. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/Makefile.in uClibc-git/libpthread/linuxthreads.old/Makefile.in
  87738. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  87739. +++ uClibc-git/libpthread/linuxthreads.old/Makefile.in 2014-07-25 20:36:08.009340986 +0200
  87740. @@ -34,15 +34,12 @@
  87741. libpthread_SRC := \
  87742. attr.c cancel.c condvar.c errno.c events.c join.c lockfile.c manager.c \
  87743. - mutex.c oldsemaphore.c pt-machine.c ptfork.c ptlongjmp.c \
  87744. + mutex.c pt-machine.c ptfork.c pthread.c ptlongjmp.c \
  87745. rwlock.c semaphore.c signals.c specific.c spinlock.c wrapsyscall.c
  87746. ifeq ($(UCLIBC_HAS_XLOCALE),y)
  87747. libpthread_SRC += locale.c
  87748. endif
  87749. -libpthread_SPEC_SRC := pthread.c
  87750. -libpthread_SPEC_SRC := $(patsubst %.c,$(libpthread_DIR)/%.c,$(libpthread_SPEC_SRC))
  87751. -
  87752. # remove generic sources, if arch specific version is present
  87753. ifneq ($(strip $(libpthread_ARCH_SRC)),)
  87754. libpthread_SRC := $(filter-out $(patsubst %.c,$(libpthread_DIR)/%.c,$(notdir $(libpthread_ARCH_SRC))),$(libpthread_SRC))
  87755. @@ -62,15 +59,12 @@
  87756. libc-static-y += $(libpthread_OUT)/libc_pthread_init.o
  87757. libc-shared-y += $(libpthread_libc_OBJ:.o=.oS)
  87758. -libpthread-static-y += $(patsubst $(libpthread_DIR)/%.c,$(libpthread_OUT)/%.o,$(libpthread_SPEC_SRC))
  87759. -libpthread-shared-y += $(patsubst $(libpthread_DIR)/%.c,$(libpthread_OUT)/%.oS,$(libpthread_SPEC_SRC))
  87760. -
  87761. ifeq ($(DOPIC),y)
  87762. -libpthread-a-y += $(libpthread_OBJ:.o=.os) $(libpthread-static-y:.o=.os)
  87763. +libpthread-a-y += $(libpthread_OBJ:.o=.os)
  87764. else
  87765. -libpthread-a-y += $(libpthread_OBJ) $(libpthread-static-y)
  87766. +libpthread-a-y += $(libpthread_OBJ)
  87767. endif
  87768. -libpthread-so-y += $(libpthread_OBJ:.o=.os) $(libpthread-shared-y)
  87769. +libpthread-so-y += $(libpthread_OBJ:.o=.oS)
  87770. lib-a-$(UCLIBC_HAS_THREADS) += $(top_builddir)lib/libpthread.a
  87771. lib-so-$(UCLIBC_HAS_THREADS) += $(top_builddir)lib/libpthread.so
  87772. @@ -93,7 +87,7 @@
  87773. ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
  87774. $(libpthread_OUT)/libpthread.oS: STRIP_FLAGS:=$(STRIP_FLAGS:-x=-X --strip-debug)
  87775. endif
  87776. -$(libpthread_OUT)/libpthread.oS: $(libpthread_SRC) $(libpthread_SPEC_SRC)
  87777. +$(libpthread_OUT)/libpthread.oS: $(libpthread_SRC)
  87778. $(Q)$(RM) $@
  87779. $(compile-m)
  87780. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/manager.c uClibc-git/libpthread/linuxthreads.old/manager.c
  87781. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/manager.c 2012-05-15 09:20:09.000000000 +0200
  87782. +++ uClibc-git/libpthread/linuxthreads.old/manager.c 2014-07-25 20:36:08.013341008 +0200
  87783. @@ -232,7 +232,7 @@
  87784. break;
  87785. case REQ_POST:
  87786. PDEBUG("got REQ_POST\n");
  87787. - __new_sem_post(request.req_args.post);
  87788. + sem_post(request.req_args.post);
  87789. break;
  87790. case REQ_DEBUG:
  87791. PDEBUG("got REQ_DEBUG\n");
  87792. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/oldsemaphore.c uClibc-git/libpthread/linuxthreads.old/oldsemaphore.c
  87793. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/oldsemaphore.c 2012-05-15 09:20:09.000000000 +0200
  87794. +++ uClibc-git/libpthread/linuxthreads.old/oldsemaphore.c 1970-01-01 01:00:00.000000000 +0100
  87795. @@ -1,241 +0,0 @@
  87796. -/*
  87797. - * This file contains the old semaphore code that we need to
  87798. - * preserve for glibc-2.0 backwards compatibility. Port to glibc 2.1
  87799. - * done by Cristian Gafton.
  87800. - */
  87801. -
  87802. -/* Linuxthreads - a simple clone()-based implementation of Posix */
  87803. -/* threads for Linux. */
  87804. -/* Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr) */
  87805. -/* */
  87806. -/* This program is free software; you can redistribute it and/or */
  87807. -/* modify it under the terms of the GNU Library General Public License */
  87808. -/* as published by the Free Software Foundation; either version 2 */
  87809. -/* of the License, or (at your option) any later version. */
  87810. -/* */
  87811. -/* This program is distributed in the hope that it will be useful, */
  87812. -/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
  87813. -/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
  87814. -/* GNU Library General Public License for more details. */
  87815. -
  87816. -/* Semaphores a la POSIX 1003.1b */
  87817. -
  87818. -#include <errno.h>
  87819. -#include "pthread.h"
  87820. -#include "internals.h"
  87821. -#include "spinlock.h"
  87822. -#include "restart.h"
  87823. -#include "queue.h"
  87824. -
  87825. -typedef struct {
  87826. - long int sem_status;
  87827. - int sem_spinlock;
  87828. -} old_sem_t;
  87829. -
  87830. -/* Maximum value the semaphore can have. */
  87831. -#define SEM_VALUE_MAX ((int) ((~0u) >> 1))
  87832. -
  87833. -static __inline__ int sem_compare_and_swap(old_sem_t *sem, long oldval, long newval)
  87834. -{
  87835. - return compare_and_swap(&sem->sem_status, oldval, newval, &sem->sem_spinlock);
  87836. -}
  87837. -
  87838. -/* The state of a semaphore is represented by a long int encoding
  87839. - either the semaphore count if >= 0 and no thread is waiting on it,
  87840. - or the head of the list of threads waiting for the semaphore.
  87841. - To distinguish the two cases, we encode the semaphore count N
  87842. - as 2N+1, so that it has the lowest bit set.
  87843. -
  87844. - A sequence of sem_wait operations on a semaphore initialized to N
  87845. - result in the following successive states:
  87846. - 2N+1, 2N-1, ..., 3, 1, &first_waiting_thread, &second_waiting_thread, ...
  87847. -*/
  87848. -
  87849. -static void sem_restart_list(pthread_descr waiting);
  87850. -
  87851. -int __old_sem_init(old_sem_t *sem, int pshared, unsigned int value);
  87852. -int __old_sem_init(old_sem_t *sem, int pshared, unsigned int value)
  87853. -{
  87854. - if (value > SEM_VALUE_MAX) {
  87855. - errno = EINVAL;
  87856. - return -1;
  87857. - }
  87858. - if (pshared) {
  87859. - errno = ENOSYS;
  87860. - return -1;
  87861. - }
  87862. - sem->sem_spinlock = 0;
  87863. - sem->sem_status = ((long)value << 1) + 1;
  87864. - return 0;
  87865. -}
  87866. -
  87867. -/* Function called by pthread_cancel to remove the thread from
  87868. - waiting inside __old_sem_wait. Here we simply unconditionally
  87869. - indicate that the thread is to be woken, by returning 1. */
  87870. -
  87871. -static int old_sem_extricate_func(void *obj attribute_unused, pthread_descr th attribute_unused)
  87872. -{
  87873. - return 1;
  87874. -}
  87875. -
  87876. -int __old_sem_wait(old_sem_t * sem);
  87877. -int __old_sem_wait(old_sem_t * sem)
  87878. -{
  87879. - long oldstatus, newstatus;
  87880. - volatile pthread_descr self = thread_self();
  87881. - pthread_descr * th;
  87882. - pthread_extricate_if extr;
  87883. -
  87884. - /* Set up extrication interface */
  87885. - extr.pu_object = 0;
  87886. - extr.pu_extricate_func = old_sem_extricate_func;
  87887. -
  87888. - while (1) {
  87889. - /* Register extrication interface */
  87890. - __pthread_set_own_extricate_if(self, &extr);
  87891. - do {
  87892. - oldstatus = sem->sem_status;
  87893. - if ((oldstatus & 1) && (oldstatus != 1))
  87894. - newstatus = oldstatus - 2;
  87895. - else {
  87896. - newstatus = (long) self;
  87897. - self->p_nextwaiting = (pthread_descr) oldstatus;
  87898. - }
  87899. - }
  87900. - while (! sem_compare_and_swap(sem, oldstatus, newstatus));
  87901. - if (newstatus & 1) {
  87902. - /* We got the semaphore. */
  87903. - __pthread_set_own_extricate_if(self, 0);
  87904. - return 0;
  87905. - }
  87906. - /* Wait for sem_post or cancellation */
  87907. - suspend(self);
  87908. - __pthread_set_own_extricate_if(self, 0);
  87909. -
  87910. - /* This is a cancellation point */
  87911. - if (self->p_canceled && self->p_cancelstate == PTHREAD_CANCEL_ENABLE) {
  87912. - /* Remove ourselves from the waiting list if we're still on it */
  87913. - /* First check if we're at the head of the list. */
  87914. - do {
  87915. - oldstatus = sem->sem_status;
  87916. - if (oldstatus != (long) self) break;
  87917. - newstatus = (long) self->p_nextwaiting;
  87918. - }
  87919. - while (! sem_compare_and_swap(sem, oldstatus, newstatus));
  87920. - /* Now, check if we're somewhere in the list.
  87921. - There's a race condition with sem_post here, but it does not matter:
  87922. - the net result is that at the time pthread_exit is called,
  87923. - self is no longer reachable from sem->sem_status. */
  87924. - if (oldstatus != (long) self && (oldstatus & 1) == 0) {
  87925. - for (th = &(((pthread_descr) oldstatus)->p_nextwaiting);
  87926. - *th != NULL && *th != (pthread_descr) 1;
  87927. - th = &((*th)->p_nextwaiting)) {
  87928. - if (*th == self) {
  87929. - *th = self->p_nextwaiting;
  87930. - break;
  87931. - }
  87932. - }
  87933. - }
  87934. - __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
  87935. - }
  87936. - }
  87937. -}
  87938. -
  87939. -int __old_sem_trywait(old_sem_t * sem);
  87940. -int __old_sem_trywait(old_sem_t * sem)
  87941. -{
  87942. - long oldstatus, newstatus;
  87943. -
  87944. - do {
  87945. - oldstatus = sem->sem_status;
  87946. - if ((oldstatus & 1) == 0 || (oldstatus == 1)) {
  87947. - errno = EAGAIN;
  87948. - return -1;
  87949. - }
  87950. - newstatus = oldstatus - 2;
  87951. - }
  87952. - while (! sem_compare_and_swap(sem, oldstatus, newstatus));
  87953. - return 0;
  87954. -}
  87955. -
  87956. -int __old_sem_post(old_sem_t * sem);
  87957. -int __old_sem_post(old_sem_t * sem)
  87958. -{
  87959. - long oldstatus, newstatus;
  87960. -
  87961. - do {
  87962. - oldstatus = sem->sem_status;
  87963. - if ((oldstatus & 1) == 0)
  87964. - newstatus = 3;
  87965. - else {
  87966. - if (oldstatus >= SEM_VALUE_MAX) {
  87967. - /* Overflow */
  87968. - errno = ERANGE;
  87969. - return -1;
  87970. - }
  87971. - newstatus = oldstatus + 2;
  87972. - }
  87973. - }
  87974. - while (! sem_compare_and_swap(sem, oldstatus, newstatus));
  87975. - if ((oldstatus & 1) == 0)
  87976. - sem_restart_list((pthread_descr) oldstatus);
  87977. - return 0;
  87978. -}
  87979. -
  87980. -int __old_sem_getvalue(old_sem_t * sem, int * sval);
  87981. -int __old_sem_getvalue(old_sem_t * sem, int * sval)
  87982. -{
  87983. - long status = sem->sem_status;
  87984. - if (status & 1)
  87985. - *sval = (int)((unsigned long) status >> 1);
  87986. - else
  87987. - *sval = 0;
  87988. - return 0;
  87989. -}
  87990. -
  87991. -int __old_sem_destroy(old_sem_t * sem);
  87992. -int __old_sem_destroy(old_sem_t * sem)
  87993. -{
  87994. - if ((sem->sem_status & 1) == 0) {
  87995. - errno = EBUSY;
  87996. - return -1;
  87997. - }
  87998. - return 0;
  87999. -}
  88000. -
  88001. -/* Auxiliary function for restarting all threads on a waiting list,
  88002. - in priority order. */
  88003. -
  88004. -static void sem_restart_list(pthread_descr waiting)
  88005. -{
  88006. - pthread_descr th, towake, *p;
  88007. -
  88008. - /* Sort list of waiting threads by decreasing priority (insertion sort) */
  88009. - towake = NULL;
  88010. - while (waiting != (pthread_descr) 1) {
  88011. - th = waiting;
  88012. - waiting = waiting->p_nextwaiting;
  88013. - p = &towake;
  88014. - while (*p != NULL && th->p_priority < (*p)->p_priority)
  88015. - p = &((*p)->p_nextwaiting);
  88016. - th->p_nextwaiting = *p;
  88017. - *p = th;
  88018. - }
  88019. - /* Wake up threads in priority order */
  88020. - while (towake != NULL) {
  88021. - th = towake;
  88022. - towake = towake->p_nextwaiting;
  88023. - th->p_nextwaiting = NULL;
  88024. - restart(th);
  88025. - }
  88026. -}
  88027. -
  88028. -#if defined __PIC__ && defined DO_VERSIONING
  88029. -symbol_version (__old_sem_init, sem_init, GLIBC_2.0);
  88030. -symbol_version (__old_sem_wait, sem_wait, GLIBC_2.0);
  88031. -symbol_version (__old_sem_trywait, sem_trywait, GLIBC_2.0);
  88032. -symbol_version (__old_sem_post, sem_post, GLIBC_2.0);
  88033. -symbol_version (__old_sem_getvalue, sem_getvalue, GLIBC_2.0);
  88034. -symbol_version (__old_sem_destroy, sem_destroy, GLIBC_2.0);
  88035. -#endif
  88036. -
  88037. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/ptfork.c uClibc-git/libpthread/linuxthreads.old/ptfork.c
  88038. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/ptfork.c 2012-05-15 09:20:09.000000000 +0200
  88039. +++ uClibc-git/libpthread/linuxthreads.old/ptfork.c 2014-07-25 20:36:08.013341008 +0200
  88040. @@ -93,10 +93,7 @@
  88041. void __pthread_once_fork_child(void);
  88042. void __pthread_once_fork_parent(void);
  88043. -extern __typeof(fork) __libc_fork;
  88044. -
  88045. -pid_t __fork(void) attribute_hidden;
  88046. -pid_t __fork(void)
  88047. +static pid_t __fork(void)
  88048. {
  88049. pid_t pid;
  88050. struct handler_list * prepare, * child, * parent;
  88051. @@ -151,11 +148,7 @@
  88052. return pid;
  88053. }
  88054. strong_alias(__fork,fork)
  88055. -
  88056. -pid_t vfork(void)
  88057. -{
  88058. - return __fork();
  88059. -}
  88060. +strong_alias(__fork,vfork)
  88061. #else
  88062. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/pthread.c uClibc-git/libpthread/linuxthreads.old/pthread.c
  88063. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/pthread.c 2012-05-15 09:20:09.000000000 +0200
  88064. +++ uClibc-git/libpthread/linuxthreads.old/pthread.c 2014-07-25 20:36:08.013341008 +0200
  88065. @@ -14,8 +14,6 @@
  88066. /* Thread creation, initialization, and basic low-level routines */
  88067. -#define __FORCE_GLIBC
  88068. -#include <features.h>
  88069. #include <errno.h>
  88070. #include <netdb.h> /* for h_errno */
  88071. #include <stddef.h>
  88072. @@ -38,8 +36,6 @@
  88073. #include <sys/types.h>
  88074. #include <sys/syscall.h>
  88075. -/* mods for uClibc: __libc_sigaction is not in any standard headers */
  88076. -extern __typeof(sigaction) __libc_sigaction;
  88077. libpthread_hidden_proto(waitpid)
  88078. libpthread_hidden_proto(raise)
  88079. @@ -260,6 +256,7 @@
  88080. return current_rtmax;
  88081. }
  88082. +#if 0
  88083. /* Allocate real-time signal with highest/lowest available
  88084. priority. Please note that we don't use a lock since we assume
  88085. this function to be called at program start. */
  88086. @@ -272,6 +269,7 @@
  88087. return high ? current_rtmin++ : current_rtmax--;
  88088. }
  88089. #endif
  88090. +#endif
  88091. /* Initialize the pthread library.
  88092. Initialization is split in two functions:
  88093. @@ -319,7 +317,7 @@
  88094. struct pthread_functions __pthread_functions =
  88095. {
  88096. -#ifndef USE___THREAD
  88097. +#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__
  88098. .ptr_pthread_internal_tsd_set = __pthread_internal_tsd_set,
  88099. .ptr_pthread_internal_tsd_get = __pthread_internal_tsd_get,
  88100. .ptr_pthread_internal_tsd_address = __pthread_internal_tsd_address,
  88101. @@ -367,10 +365,10 @@
  88102. .ptr_pthread_sigwait = pthread_sigwait,
  88103. .ptr_pthread_raise = pthread_raise,
  88104. .ptr__pthread_cleanup_push = _pthread_cleanup_push,
  88105. - .ptr__pthread_cleanup_pop = _pthread_cleanup_pop
  88106. + .ptr__pthread_cleanup_pop = _pthread_cleanup_pop,
  88107. */
  88108. .ptr__pthread_cleanup_push_defer = __pthread_cleanup_push_defer,
  88109. - .ptr__pthread_cleanup_pop_restore = __pthread_cleanup_pop_restore,
  88110. + .ptr__pthread_cleanup_pop_restore = __pthread_cleanup_pop_restore
  88111. };
  88112. #ifdef SHARED
  88113. # define ptr_pthread_functions &__pthread_functions
  88114. @@ -528,7 +526,7 @@
  88115. /* On non-MMU systems we make sure that the initial thread bounds don't overlap
  88116. * with the manager stack frame */
  88117. NOMMU_INITIAL_THREAD_BOUNDS(__pthread_manager_thread_tos,__pthread_manager_thread_bos);
  88118. - PDEBUG("manager stack: size=%d, bos=%p, tos=%p\n", THREAD_MANAGER_STACK_SIZE,
  88119. + PDEBUG("manager stack: size=%ld, bos=%p, tos=%p\n", THREAD_MANAGER_STACK_SIZE,
  88120. __pthread_manager_thread_bos, __pthread_manager_thread_tos);
  88121. #if 0
  88122. PDEBUG("initial stack: estimate bos=%p, tos=%p\n",
  88123. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/ptlongjmp.c uClibc-git/libpthread/linuxthreads.old/ptlongjmp.c
  88124. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/ptlongjmp.c 2012-05-15 09:20:09.000000000 +0200
  88125. +++ uClibc-git/libpthread/linuxthreads.old/ptlongjmp.c 2014-07-25 20:36:08.013341008 +0200
  88126. @@ -19,11 +19,7 @@
  88127. #include "pthread.h"
  88128. #include "internals.h"
  88129. #include <bits/stackinfo.h>
  88130. -
  88131. -/* These functions are not declared anywhere since they shouldn't be
  88132. - used at another place but here. */
  88133. -extern __typeof(siglongjmp) __libc_siglongjmp attribute_noreturn;
  88134. -extern __typeof(longjmp) __libc_longjmp attribute_noreturn;
  88135. +#include <jmpbuf-unwind.h>
  88136. static void pthread_cleanup_upto(__jmp_buf target)
  88137. {
  88138. @@ -58,13 +54,13 @@
  88139. THREAD_SETMEM(self, p_in_sighandler, NULL);
  88140. }
  88141. -void attribute_noreturn siglongjmp(sigjmp_buf env, int val)
  88142. +void siglongjmp(sigjmp_buf env, int val)
  88143. {
  88144. pthread_cleanup_upto(env->__jmpbuf);
  88145. __libc_siglongjmp(env, val);
  88146. }
  88147. -void attribute_noreturn longjmp(jmp_buf env, int val)
  88148. +void longjmp(jmp_buf env, int val)
  88149. {
  88150. pthread_cleanup_upto(env->__jmpbuf);
  88151. __libc_longjmp(env, val);
  88152. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/pt-machine.c uClibc-git/libpthread/linuxthreads.old/pt-machine.c
  88153. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/pt-machine.c 2012-05-15 09:20:09.000000000 +0200
  88154. +++ uClibc-git/libpthread/linuxthreads.old/pt-machine.c 2014-07-25 20:36:08.013341008 +0200
  88155. @@ -14,8 +14,7 @@
  88156. You should have received a copy of the GNU Library General Public
  88157. License along with the GNU C Library; see the file COPYING.LIB. If not,
  88158. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  88159. - Boston, MA 02111-1307, USA. */
  88160. + see <http://www.gnu.org/licenses/>. */
  88161. #define PT_EI
  88162. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/rwlock.c uClibc-git/libpthread/linuxthreads.old/rwlock.c
  88163. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/rwlock.c 2012-05-15 09:20:09.000000000 +0200
  88164. +++ uClibc-git/libpthread/linuxthreads.old/rwlock.c 2014-07-25 20:36:08.013341008 +0200
  88165. @@ -16,8 +16,7 @@
  88166. You should have received a copy of the GNU Library General Public
  88167. License along with the GNU C Library; see the file COPYING.LIB. If not,
  88168. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  88169. - Boston, MA 02111-1307, USA. */
  88170. + see <http://www.gnu.org/licenses/>. */
  88171. #include <errno.h>
  88172. #include <pthread.h>
  88173. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/semaphore.c uClibc-git/libpthread/linuxthreads.old/semaphore.c
  88174. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/semaphore.c 2012-05-15 09:20:09.000000000 +0200
  88175. +++ uClibc-git/libpthread/linuxthreads.old/semaphore.c 2014-07-25 20:36:08.013341008 +0200
  88176. @@ -15,6 +15,7 @@
  88177. /* Semaphores a la POSIX 1003.1b */
  88178. #include <features.h>
  88179. +#include <limits.h>
  88180. #include <errno.h>
  88181. #include "pthread.h"
  88182. #include "semaphore.h"
  88183. @@ -23,8 +24,7 @@
  88184. #include "restart.h"
  88185. #include "queue.h"
  88186. -int __new_sem_init(sem_t *sem, int pshared, unsigned int value);
  88187. -int __new_sem_init(sem_t *sem, int pshared, unsigned int value)
  88188. +int sem_init(sem_t *sem, int pshared, unsigned int value)
  88189. {
  88190. if (value > SEM_VALUE_MAX) {
  88191. errno = EINVAL;
  88192. @@ -41,7 +41,7 @@
  88193. }
  88194. /* Function called by pthread_cancel to remove the thread from
  88195. - waiting inside __new_sem_wait. */
  88196. + waiting inside sem_wait. */
  88197. static int new_sem_extricate_func(void *obj, pthread_descr th)
  88198. {
  88199. @@ -56,8 +56,7 @@
  88200. return did_remove;
  88201. }
  88202. -int __new_sem_wait(sem_t * sem);
  88203. -int __new_sem_wait(sem_t * sem)
  88204. +int sem_wait(sem_t * sem)
  88205. {
  88206. volatile pthread_descr self = thread_self();
  88207. pthread_extricate_if extr;
  88208. @@ -119,8 +118,7 @@
  88209. return 0;
  88210. }
  88211. -int __new_sem_trywait(sem_t * sem);
  88212. -int __new_sem_trywait(sem_t * sem)
  88213. +int sem_trywait(sem_t * sem)
  88214. {
  88215. int retval;
  88216. @@ -136,8 +134,7 @@
  88217. return retval;
  88218. }
  88219. -int __new_sem_post(sem_t * sem);
  88220. -int __new_sem_post(sem_t * sem)
  88221. +int sem_post(sem_t * sem)
  88222. {
  88223. pthread_descr self = thread_self();
  88224. pthread_descr th;
  88225. @@ -178,15 +175,13 @@
  88226. return 0;
  88227. }
  88228. -int __new_sem_getvalue(sem_t * sem, int * sval);
  88229. -int __new_sem_getvalue(sem_t * sem, int * sval)
  88230. +int sem_getvalue(sem_t * sem, int * sval)
  88231. {
  88232. *sval = sem->__sem_value;
  88233. return 0;
  88234. }
  88235. -int __new_sem_destroy(sem_t * sem);
  88236. -int __new_sem_destroy(sem_t * sem)
  88237. +int sem_destroy(sem_t * sem)
  88238. {
  88239. if (sem->__sem_waiting != NULL) {
  88240. __set_errno (EBUSY);
  88241. @@ -302,12 +297,3 @@
  88242. /* We got the semaphore */
  88243. return 0;
  88244. }
  88245. -
  88246. -
  88247. -weak_alias (__new_sem_init, sem_init)
  88248. -weak_alias (__new_sem_wait, sem_wait)
  88249. -weak_alias (__new_sem_trywait, sem_trywait)
  88250. -weak_alias (__new_sem_post, sem_post)
  88251. -weak_alias (__new_sem_getvalue, sem_getvalue)
  88252. -weak_alias (__new_sem_destroy, sem_destroy)
  88253. -
  88254. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/semaphore.h uClibc-git/libpthread/linuxthreads.old/semaphore.h
  88255. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/semaphore.h 2012-05-15 09:20:09.000000000 +0200
  88256. +++ uClibc-git/libpthread/linuxthreads.old/semaphore.h 2014-07-25 20:36:08.013341008 +0200
  88257. @@ -17,6 +17,7 @@
  88258. #include <features.h>
  88259. #include <sys/types.h>
  88260. +#include <limits.h>
  88261. #ifdef __USE_XOPEN2K
  88262. # define __need_timespec
  88263. # include <time.h>
  88264. @@ -42,7 +43,9 @@
  88265. #define SEM_FAILED ((sem_t *) 0)
  88266. /* Maximum value the semaphore can have. */
  88267. +#ifndef SEM_VALUE_MAX
  88268. #define SEM_VALUE_MAX ((int) ((~0u) >> 1))
  88269. +#endif
  88270. __BEGIN_DECLS
  88271. @@ -55,13 +58,13 @@
  88272. extern int sem_destroy (sem_t *__sem) __THROW;
  88273. /* Open a named semaphore NAME with open flags OFLAG. */
  88274. -extern sem_t *sem_open (__const char *__name, int __oflag, ...) __THROW;
  88275. +extern sem_t *sem_open (const char *__name, int __oflag, ...) __THROW;
  88276. /* Close descriptor for named semaphore SEM. */
  88277. extern int sem_close (sem_t *__sem) __THROW;
  88278. /* Remove named semaphore NAME. */
  88279. -extern int sem_unlink (__const char *__name) __THROW;
  88280. +extern int sem_unlink (const char *__name) __THROW;
  88281. /* Wait for SEM being posted.
  88282. @@ -75,7 +78,7 @@
  88283. This function is a cancellation point and therefore not marked with
  88284. __THROW. */
  88285. extern int sem_timedwait (sem_t *__restrict __sem,
  88286. - __const struct timespec *__restrict __abstime);
  88287. + const struct timespec *__restrict __abstime);
  88288. #endif
  88289. /* Test whether SEM is posted. */
  88290. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/signals.c uClibc-git/libpthread/linuxthreads.old/signals.c
  88291. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/signals.c 2012-05-15 09:20:09.000000000 +0200
  88292. +++ uClibc-git/libpthread/linuxthreads.old/signals.c 2014-07-25 20:36:08.013341008 +0200
  88293. @@ -22,9 +22,6 @@
  88294. #include "spinlock.h"
  88295. #include <bits/sigcontextinfo.h>
  88296. -/* mods for uClibc: __libc_sigaction is not in any standard headers */
  88297. -extern __typeof(sigaction) __libc_sigaction;
  88298. -
  88299. int pthread_sigmask(int how, const sigset_t * newmask, sigset_t * oldmask)
  88300. {
  88301. sigset_t mask;
  88302. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/specific.c uClibc-git/libpthread/linuxthreads.old/specific.c
  88303. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/specific.c 2012-05-15 09:20:09.000000000 +0200
  88304. +++ uClibc-git/libpthread/linuxthreads.old/specific.c 2014-07-25 20:36:08.013341008 +0200
  88305. @@ -167,7 +167,7 @@
  88306. __pthread_unlock(THREAD_GETMEM(self, p_lock));
  88307. }
  88308. -#ifndef USE___THREAD
  88309. +#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__
  88310. /* Thread-specific data for libc. */
  88311. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/spinlock.c uClibc-git/libpthread/linuxthreads.old/spinlock.c
  88312. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/spinlock.c 2012-05-15 09:20:09.000000000 +0200
  88313. +++ uClibc-git/libpthread/linuxthreads.old/spinlock.c 2014-07-25 20:36:08.013341008 +0200
  88314. @@ -14,8 +14,6 @@
  88315. /* Internal locks */
  88316. -#define __FORCE_GLIBC
  88317. -#include <features.h>
  88318. #include <errno.h>
  88319. #include <sched.h>
  88320. #include <time.h>
  88321. @@ -67,7 +65,6 @@
  88322. #if defined HAS_COMPARE_AND_SWAP
  88323. long oldstatus, newstatus;
  88324. int successful_seizure, spurious_wakeup_count;
  88325. - int spin_count;
  88326. #endif
  88327. #if defined TEST_FOR_COMPARE_AND_SWAP
  88328. @@ -87,11 +84,11 @@
  88329. return;
  88330. spurious_wakeup_count = 0;
  88331. - spin_count = 0;
  88332. /* On SMP, try spinning to get the lock. */
  88333. #if 0
  88334. if (__pthread_smp_kernel) {
  88335. + int spin_count;
  88336. int max_count = lock->__spinlock * 2 + 10;
  88337. if (max_count > MAX_ADAPTIVE_SPIN_COUNT)
  88338. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/alpha/pt-machine.h uClibc-git/libpthread/linuxthreads.old/sysdeps/alpha/pt-machine.h
  88339. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/alpha/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  88340. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/alpha/pt-machine.h 2014-07-25 20:36:08.025341071 +0200
  88341. @@ -17,8 +17,7 @@
  88342. You should have received a copy of the GNU Lesser General Public
  88343. License along with the GNU C Library; see the file COPYING.LIB. If not,
  88344. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  88345. - Boston, MA 02111-1307, USA. */
  88346. + see <http://www.gnu.org/licenses/>. */
  88347. #ifndef _PT_MACHINE_H
  88348. #define _PT_MACHINE_H 1
  88349. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/arc/pt-machine.h uClibc-git/libpthread/linuxthreads.old/sysdeps/arc/pt-machine.h
  88350. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/arc/pt-machine.h 1970-01-01 01:00:00.000000000 +0100
  88351. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/arc/pt-machine.h 2014-07-25 20:36:08.025341071 +0200
  88352. @@ -0,0 +1,42 @@
  88353. +/*
  88354. + * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
  88355. + *
  88356. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  88357. + */
  88358. +
  88359. +#ifndef _PT_MACHINE_H
  88360. +#define _PT_MACHINE_H 1
  88361. +#include <features.h>
  88362. +
  88363. +#ifndef PT_EI
  88364. +# define PT_EI __extern_always_inline
  88365. +#endif
  88366. +
  88367. +extern long int testandset (int *spinlock);
  88368. +extern int __compare_and_swap (long int *p, long int oldval, long int newval);
  88369. +
  88370. +PT_EI long int
  88371. +testandset (int *spinlock)
  88372. +{
  88373. + unsigned int old = 1;
  88374. +
  88375. + /* Atomically exchange @spinlock with 1 */
  88376. + __asm__ __volatile__(
  88377. + "ex %0, [%1]"
  88378. + : "+r" (old)
  88379. + : "r" (spinlock)
  88380. + : "memory");
  88381. +
  88382. + return old;
  88383. +
  88384. +}
  88385. +
  88386. +/* Get some notion of the current stack. Need not be exactly the top
  88387. + of the stack, just something somewhere in the current frame.
  88388. + I don't trust register variables, so let's do this the safe way. */
  88389. +#define CURRENT_STACK_FRAME \
  88390. +__extension__ ({ char *__sp; __asm__ ("mov %0,sp" : "=r" (__sp)); __sp; })
  88391. +
  88392. +#else
  88393. +#error PT_MACHINE already defined
  88394. +#endif /* pt-machine.h */
  88395. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h uClibc-git/libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h
  88396. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  88397. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/arm/pt-machine.h 2014-07-25 20:36:08.025341071 +0200
  88398. @@ -15,9 +15,8 @@
  88399. Lesser General Public License for more details.
  88400. You should have received a copy of the GNU Lesser General Public
  88401. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  88402. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  88403. - Boston, MA 02111-1307, USA. */
  88404. + License along with the GNU C Library; see the file COPYING.LIB. If
  88405. + not, see <http://www.gnu.org/licenses/>. */
  88406. #ifndef _PT_MACHINE_H
  88407. #define _PT_MACHINE_H 1
  88408. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/bfin/pt-machine.h uClibc-git/libpthread/linuxthreads.old/sysdeps/bfin/pt-machine.h
  88409. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/bfin/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  88410. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/bfin/pt-machine.h 2014-07-25 20:36:08.029341091 +0200
  88411. @@ -15,8 +15,7 @@
  88412. You should have received a copy of the GNU Lesser General Public
  88413. License along with the GNU C Library; see the file COPYING.LIB. If
  88414. - not, write to the Free Software Foundation, Inc.,
  88415. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  88416. + not, see <http://www.gnu.org/licenses/>. */
  88417. #ifndef _PT_MACHINE_H
  88418. #define _PT_MACHINE_H 1
  88419. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/c6x/pt-machine.h uClibc-git/libpthread/linuxthreads.old/sysdeps/c6x/pt-machine.h
  88420. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/c6x/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  88421. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/c6x/pt-machine.h 2014-07-25 20:36:08.029341091 +0200
  88422. @@ -15,9 +15,8 @@
  88423. Lesser General Public License for more details.
  88424. You should have received a copy of the GNU Lesser General Public
  88425. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  88426. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  88427. - Boston, MA 02111-1307, USA. */
  88428. + License along with the GNU C Library; see the file COPYING.LIB. If
  88429. + not, see <http://www.gnu.org/licenses/>. */
  88430. #ifndef _PT_MACHINE_H
  88431. #define _PT_MACHINE_H 1
  88432. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/cris/pt-machine.h uClibc-git/libpthread/linuxthreads.old/sysdeps/cris/pt-machine.h
  88433. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/cris/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  88434. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/cris/pt-machine.h 2014-07-25 20:36:08.029341091 +0200
  88435. @@ -15,8 +15,7 @@
  88436. You should have received a copy of the GNU Lesser General Public
  88437. License along with the GNU C Library; see the file COPYING.LIB. If not,
  88438. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  88439. - Boston, MA 02111-1307, USA. */
  88440. + see <http://www.gnu.org/licenses/>. */
  88441. #ifndef _PT_MACHINE_H
  88442. #define _PT_MACHINE_H 1
  88443. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/frv/pt-machine.h uClibc-git/libpthread/linuxthreads.old/sysdeps/frv/pt-machine.h
  88444. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/frv/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  88445. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/frv/pt-machine.h 2014-07-25 20:36:08.029341091 +0200
  88446. @@ -16,8 +16,7 @@
  88447. You should have received a copy of the GNU Lesser General Public
  88448. License along with the GNU C Library; see the file COPYING.LIB. If
  88449. - not, write to the Free Software Foundation, Inc.,
  88450. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  88451. + not, see <http://www.gnu.org/licenses/>. */
  88452. #ifndef _PT_MACHINE_H
  88453. #define _PT_MACHINE_H 1
  88454. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/h8300/pt-machine.h uClibc-git/libpthread/linuxthreads.old/sysdeps/h8300/pt-machine.h
  88455. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/h8300/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  88456. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/h8300/pt-machine.h 2014-07-25 20:36:08.029341091 +0200
  88457. @@ -16,8 +16,7 @@
  88458. You should have received a copy of the GNU Lesser General Public
  88459. License along with the GNU C Library; see the file COPYING.LIB. If
  88460. - not, write to the Free Software Foundation, Inc.,
  88461. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  88462. + not, see <http://www.gnu.org/licenses/>. */
  88463. #ifndef _PT_MACHINE_H
  88464. #define _PT_MACHINE_H 1
  88465. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/i386/pt-machine.h uClibc-git/libpthread/linuxthreads.old/sysdeps/i386/pt-machine.h
  88466. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/i386/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  88467. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/i386/pt-machine.h 2014-07-25 20:36:08.029341091 +0200
  88468. @@ -15,9 +15,8 @@
  88469. Lesser General Public License for more details.
  88470. You should have received a copy of the GNU Lesser General Public
  88471. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  88472. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  88473. - Boston, MA 02111-1307, USA. */
  88474. + License along with the GNU C Library; see the file COPYING.LIB. If
  88475. + not, see <http://www.gnu.org/licenses/>. */
  88476. #ifndef _PT_MACHINE_H
  88477. #define _PT_MACHINE_H 1
  88478. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/i386/tls.h uClibc-git/libpthread/linuxthreads.old/sysdeps/i386/tls.h
  88479. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/i386/tls.h 2012-05-15 09:20:09.000000000 +0200
  88480. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/i386/tls.h 2014-07-25 20:36:08.029341091 +0200
  88481. @@ -13,9 +13,8 @@
  88482. Lesser General Public License for more details.
  88483. You should have received a copy of the GNU Lesser General Public
  88484. - License along with the GNU C Library; if not, write to the Free
  88485. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  88486. - 02111-1307 USA. */
  88487. + License along with the GNU C Library; if not, see
  88488. + <http://www.gnu.org/licenses/>. */
  88489. #ifndef _TLS_H
  88490. #define _TLS_H
  88491. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/i386/useldt.h uClibc-git/libpthread/linuxthreads.old/sysdeps/i386/useldt.h
  88492. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/i386/useldt.h 2012-05-15 09:20:09.000000000 +0200
  88493. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/i386/useldt.h 2014-07-25 20:36:08.029341091 +0200
  88494. @@ -16,8 +16,7 @@
  88495. You should have received a copy of the GNU Lesser General Public
  88496. License along with the GNU C Library; see the file COPYING.LIB. If not,
  88497. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  88498. - Boston, MA 02111-1307, USA. */
  88499. + see <http://www.gnu.org/licenses/>. */
  88500. #ifndef __ASSEMBLER__
  88501. #include <stddef.h> /* For offsetof. */
  88502. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/ia64/pt-machine.h uClibc-git/libpthread/linuxthreads.old/sysdeps/ia64/pt-machine.h
  88503. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/ia64/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  88504. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/ia64/pt-machine.h 2014-07-25 20:36:08.029341091 +0200
  88505. @@ -14,9 +14,8 @@
  88506. Lesser General Public License for more details.
  88507. You should have received a copy of the GNU Lesser General Public
  88508. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  88509. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  88510. - Boston, MA 02111-1307, USA. */
  88511. + License along with the GNU C Library; see the file COPYING.LIB. If
  88512. + not, see <http://www.gnu.org/licenses/>. */
  88513. #ifndef _PT_MACHINE_H
  88514. #define _PT_MACHINE_H 1
  88515. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/ia64/tls.h uClibc-git/libpthread/linuxthreads.old/sysdeps/ia64/tls.h
  88516. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/ia64/tls.h 2012-05-15 09:20:09.000000000 +0200
  88517. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/ia64/tls.h 2014-07-25 20:36:08.029341091 +0200
  88518. @@ -13,9 +13,8 @@
  88519. Lesser General Public License for more details.
  88520. You should have received a copy of the GNU Lesser General Public
  88521. - License along with the GNU C Library; if not, write to the Free
  88522. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  88523. - 02111-1307 USA. */
  88524. + License along with the GNU C Library; if not, see
  88525. + <http://www.gnu.org/licenses/>. */
  88526. #ifndef _TLS_H
  88527. #define _TLS_H
  88528. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/m68k/pt-machine.h uClibc-git/libpthread/linuxthreads.old/sysdeps/m68k/pt-machine.h
  88529. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/m68k/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  88530. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/m68k/pt-machine.h 2014-07-25 20:36:08.029341091 +0200
  88531. @@ -16,8 +16,7 @@
  88532. You should have received a copy of the GNU Lesser General Public
  88533. License along with the GNU C Library; see the file COPYING.LIB. If
  88534. - not, write to the Free Software Foundation, Inc.,
  88535. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  88536. + not, see <http://www.gnu.org/licenses/>. */
  88537. #ifndef _PT_MACHINE_H
  88538. #define _PT_MACHINE_H 1
  88539. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/mips/pt-machine.h uClibc-git/libpthread/linuxthreads.old/sysdeps/mips/pt-machine.h
  88540. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/mips/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  88541. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/mips/pt-machine.h 2014-07-25 20:36:08.029341091 +0200
  88542. @@ -18,8 +18,7 @@
  88543. You should have received a copy of the GNU Lesser General Public
  88544. License along with the GNU C Library; see the file COPYING.LIB. If
  88545. - not, write to the Free Software Foundation, Inc.,
  88546. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  88547. + not, see <http://www.gnu.org/licenses/>. */
  88548. #ifndef _PT_MACHINE_H
  88549. #define _PT_MACHINE_H 1
  88550. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/nios/pt-machine.h uClibc-git/libpthread/linuxthreads.old/sysdeps/nios/pt-machine.h
  88551. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/nios/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  88552. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/nios/pt-machine.h 2014-07-25 20:36:08.029341091 +0200
  88553. @@ -16,8 +16,7 @@
  88554. You should have received a copy of the GNU Library General Public
  88555. License along with the GNU C Library; see the file COPYING.LIB. If not,
  88556. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  88557. - Boston, MA 02111-1307, USA. */
  88558. + see <http://www.gnu.org/licenses/>. */
  88559. #ifndef _PT_MACHINE_H
  88560. #define _PT_MACHINE_H 1
  88561. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/nios2/pt-machine.h uClibc-git/libpthread/linuxthreads.old/sysdeps/nios2/pt-machine.h
  88562. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/nios2/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  88563. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/nios2/pt-machine.h 2014-07-25 20:36:08.029341091 +0200
  88564. @@ -15,8 +15,7 @@
  88565. You should have received a copy of the GNU Lesser General Public
  88566. License along with the GNU C Library; see the file COPYING.LIB. If
  88567. - not, write to the Free Software Foundation, Inc.,
  88568. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  88569. + not, see <http://www.gnu.org/licenses/>. */
  88570. #ifndef _PT_MACHINE_H
  88571. #define _PT_MACHINE_H 1
  88572. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/powerpc/pt-machine.h uClibc-git/libpthread/linuxthreads.old/sysdeps/powerpc/pt-machine.h
  88573. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/powerpc/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  88574. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/powerpc/pt-machine.h 2014-07-25 20:36:08.029341091 +0200
  88575. @@ -15,8 +15,7 @@
  88576. You should have received a copy of the GNU Lesser General Public
  88577. License along with the GNU C Library; see the file COPYING.LIB. If
  88578. - not, write to the Free Software Foundation, Inc.,
  88579. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  88580. + not, see <http://www.gnu.org/licenses/>. */
  88581. /* These routines are from Appendix G of the 'PowerPC 601 RISC Microprocessor
  88582. User's Manual', by IBM and Motorola. */
  88583. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h uClibc-git/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h
  88584. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h 2012-05-15 09:20:09.000000000 +0200
  88585. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-lock.h 2014-07-25 20:36:08.029341091 +0200
  88586. @@ -14,9 +14,8 @@
  88587. Lesser General Public License for more details.
  88588. You should have received a copy of the GNU Lesser General Public
  88589. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  88590. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  88591. - Boston, MA 02111-1307, USA. */
  88592. + License along with the GNU C Library; see the file COPYING.LIB. If
  88593. + not, see <http://www.gnu.org/licenses/>. */
  88594. #ifndef _BITS_LIBC_LOCK_H
  88595. #define _BITS_LIBC_LOCK_H 1
  88596. @@ -271,6 +270,7 @@
  88597. _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \
  88598. }
  88599. +#if 0
  88600. #define __libc_cleanup_push(fct, arg) \
  88601. { struct _pthread_cleanup_buffer _buffer; \
  88602. __libc_maybe_call (_pthread_cleanup_push, (&_buffer, (fct), (arg)), 0)
  88603. @@ -278,6 +278,7 @@
  88604. #define __libc_cleanup_pop(execute) \
  88605. __libc_maybe_call (_pthread_cleanup_pop, (&_buffer, execute), 0); \
  88606. }
  88607. +#endif
  88608. /* Create thread-specific key. */
  88609. #define __libc_key_create(KEY, DESTRUCTOR) \
  88610. @@ -300,7 +301,7 @@
  88611. library. */
  88612. extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
  88613. - __const pthread_mutexattr_t *__mutex_attr);
  88614. + const pthread_mutexattr_t *__mutex_attr);
  88615. extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
  88616. @@ -319,7 +320,7 @@
  88617. #ifdef __USE_UNIX98
  88618. extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock,
  88619. - __const pthread_rwlockattr_t *__attr);
  88620. + const pthread_rwlockattr_t *__attr);
  88621. extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock);
  88622. @@ -338,7 +339,7 @@
  88623. void (*__destr_function) (void *));
  88624. extern int __pthread_setspecific (pthread_key_t __key,
  88625. - __const void *__pointer);
  88626. + const void *__pointer);
  88627. extern void *__pthread_getspecific (pthread_key_t __key);
  88628. @@ -375,7 +376,6 @@
  88629. weak_extern (BP_SYM (__pthread_setspecific))
  88630. weak_extern (BP_SYM (__pthread_getspecific))
  88631. weak_extern (BP_SYM (__pthread_once))
  88632. -weak_extern (__pthread_initialize)
  88633. weak_extern (__pthread_atfork)
  88634. weak_extern (BP_SYM (_pthread_cleanup_push))
  88635. weak_extern (BP_SYM (_pthread_cleanup_pop))
  88636. @@ -400,7 +400,6 @@
  88637. # pragma weak __pthread_setspecific
  88638. # pragma weak __pthread_getspecific
  88639. # pragma weak __pthread_once
  88640. -# pragma weak __pthread_initialize
  88641. # pragma weak __pthread_atfork
  88642. # pragma weak _pthread_cleanup_push_defer
  88643. # pragma weak _pthread_cleanup_pop_restore
  88644. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-tsd.h uClibc-git/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-tsd.h
  88645. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-tsd.h 2012-05-15 09:20:09.000000000 +0200
  88646. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/pthread/bits/libc-tsd.h 2014-07-25 20:36:08.029341091 +0200
  88647. @@ -13,15 +13,12 @@
  88648. Lesser General Public License for more details.
  88649. You should have received a copy of the GNU Lesser General Public
  88650. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  88651. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  88652. - Boston, MA 02111-1307, USA. */
  88653. + License along with the GNU C Library; see the file COPYING.LIB. If
  88654. + not, see <http://www.gnu.org/licenses/>. */
  88655. #ifndef _BITS_LIBC_TSD_H
  88656. #define _BITS_LIBC_TSD_H 1
  88657. -#include <libc-internal.h>
  88658. -
  88659. /* Fast thread-specific data internal to libc. */
  88660. enum __libc_tsd_key_t { _LIBC_TSD_KEY_MALLOC = 0,
  88661. _LIBC_TSD_KEY_DL_ERROR,
  88662. @@ -32,12 +29,11 @@
  88663. _LIBC_TSD_KEY_CTYPE_TOUPPER,
  88664. _LIBC_TSD_KEY_N };
  88665. -#include <sys/cdefs.h>
  88666. -#include <tls.h>
  88667. -
  88668. +#include <features.h>
  88669. #include <linuxthreads.old/internals.h>
  88670. -#if defined(USE_TLS) && USE_TLS && HAVE___THREAD
  88671. +#ifdef __UCLIBC_HAS_TLS__
  88672. +#include <tls.h>
  88673. /* When __thread works, the generic definition is what we want. */
  88674. # include <sysdeps/generic/bits/libc-tsd.h>
  88675. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/bits/pthreadtypes.h uClibc-git/libpthread/linuxthreads.old/sysdeps/pthread/bits/pthreadtypes.h
  88676. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/bits/pthreadtypes.h 2012-05-15 09:20:09.000000000 +0200
  88677. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/pthread/bits/pthreadtypes.h 2014-07-25 20:36:08.029341091 +0200
  88678. @@ -19,6 +19,9 @@
  88679. #ifndef _BITS_PTHREADTYPES_H
  88680. #define _BITS_PTHREADTYPES_H 1
  88681. +#define __need_size_t
  88682. +#include <stddef.h>
  88683. +
  88684. #define __need_schedparam
  88685. #include <bits/sched.h>
  88686. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/not-cancel.h uClibc-git/libpthread/linuxthreads.old/sysdeps/pthread/not-cancel.h
  88687. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/not-cancel.h 2012-05-15 09:20:09.000000000 +0200
  88688. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/pthread/not-cancel.h 2014-07-25 20:36:08.041341155 +0200
  88689. @@ -14,18 +14,26 @@
  88690. Lesser General Public License for more details.
  88691. You should have received a copy of the GNU Lesser General Public
  88692. - License along with the GNU C Library; if not, write to the Free
  88693. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  88694. - 02111-1307 USA. */
  88695. + License along with the GNU C Library; if not, see
  88696. + <http://www.gnu.org/licenses/>. */
  88697. #include <sys/types.h>
  88698. #include <sysdep.h>
  88699. /* Uncancelable open. */
  88700. +#if defined __NR_openat && !defined __NR_open
  88701. +#define open_not_cancel(name, flags, mode) \
  88702. + INLINE_SYSCALL (openat, 4, AT_FDCWD, (const char *) (name), \
  88703. + (flags), (mode))
  88704. +#define open_not_cancel_2(name, flags) \
  88705. + INLINE_SYSCALL (openat, 3, AT_FDCWD, (const char *) (name), \
  88706. + (flags))
  88707. +#else
  88708. #define open_not_cancel(name, flags, mode) \
  88709. INLINE_SYSCALL (open, 3, (const char *) (name), (flags), (mode))
  88710. #define open_not_cancel_2(name, flags) \
  88711. INLINE_SYSCALL (open, 2, (const char *) (name), (flags))
  88712. +#endif
  88713. /* Uncancelable openat. */
  88714. #if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
  88715. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/pthread-functions.h uClibc-git/libpthread/linuxthreads.old/sysdeps/pthread/pthread-functions.h
  88716. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/pthread-functions.h 2012-05-15 09:20:09.000000000 +0200
  88717. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/pthread/pthread-functions.h 2014-07-25 20:36:08.041341155 +0200
  88718. @@ -13,25 +13,28 @@
  88719. Lesser General Public License for more details.
  88720. You should have received a copy of the GNU Lesser General Public
  88721. - License along with the GNU C Library; if not, write to the Free
  88722. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  88723. - 02111-1307 USA. */
  88724. + License along with the GNU C Library; if not, see
  88725. + <http://www.gnu.org/licenses/>. */
  88726. #ifndef _PTHREAD_FUNCTIONS_H
  88727. #define _PTHREAD_FUNCTIONS_H 1
  88728. #include <pthread.h>
  88729. +#if 0
  88730. #include <setjmp.h>
  88731. #include <linuxthreads.old/internals.h>
  88732. struct fork_block;
  88733. +#endif
  88734. /* Data type shared with libc. The libc uses it to pass on calls to
  88735. the thread functions. Wine pokes directly into this structure,
  88736. so if possible avoid breaking it and append new hooks to the end. */
  88737. struct pthread_functions
  88738. {
  88739. +#if 0
  88740. pid_t (*ptr_pthread_fork) (struct fork_block *);
  88741. +#endif
  88742. int (*ptr_pthread_attr_destroy) (pthread_attr_t *);
  88743. int (*ptr_pthread_attr_init) (pthread_attr_t *);
  88744. int (*ptr_pthread_attr_getdetachstate) (const pthread_attr_t *, int *);
  88745. @@ -68,26 +71,36 @@
  88746. pthread_t (*ptr_pthread_self) (void);
  88747. int (*ptr_pthread_setcancelstate) (int, int *);
  88748. int (*ptr_pthread_setcanceltype) (int, int *);
  88749. +#if 0
  88750. void (*ptr_pthread_do_exit) (void *retval, char *currentframe);
  88751. void (*ptr_pthread_cleanup_upto) (__jmp_buf target,
  88752. char *targetframe);
  88753. pthread_descr (*ptr_pthread_thread_self) (void);
  88754. +#endif
  88755. +#if !defined __UCLIBC_HAS_TLS__ && defined __UCLIBC_HAS_RPC__
  88756. int (*ptr_pthread_internal_tsd_set) (int key, const void *pointer);
  88757. void * (*ptr_pthread_internal_tsd_get) (int key);
  88758. void ** __attribute__ ((__const__))
  88759. (*ptr_pthread_internal_tsd_address) (int key);
  88760. +#endif
  88761. +#if 0
  88762. int (*ptr_pthread_sigaction) (int sig, const struct sigaction * act,
  88763. struct sigaction *oact);
  88764. int (*ptr_pthread_sigwait) (const sigset_t *set, int *sig);
  88765. int (*ptr_pthread_raise) (int sig);
  88766. +#endif
  88767. int (*ptr_pthread_cond_timedwait) (pthread_cond_t *, pthread_mutex_t *,
  88768. const struct timespec *);
  88769. +#if 0
  88770. void (*ptr__pthread_cleanup_push) (struct _pthread_cleanup_buffer * buffer,
  88771. void (*routine)(void *), void * arg);
  88772. +#endif
  88773. void (*ptr__pthread_cleanup_push_defer) (struct _pthread_cleanup_buffer * buffer,
  88774. void (*routine)(void *), void * arg);
  88775. +#if 0
  88776. void (*ptr__pthread_cleanup_pop) (struct _pthread_cleanup_buffer * buffer,
  88777. int execute);
  88778. +#endif
  88779. void (*ptr__pthread_cleanup_pop_restore) (struct _pthread_cleanup_buffer * buffer,
  88780. int execute);
  88781. };
  88782. @@ -95,4 +108,6 @@
  88783. /* Variable in libc.so. */
  88784. extern struct pthread_functions __libc_pthread_functions attribute_hidden;
  88785. +extern int * __libc_pthread_init (const struct pthread_functions *functions);
  88786. +
  88787. #endif /* pthread-functions.h */
  88788. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h uClibc-git/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h
  88789. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h 2012-05-15 09:20:09.000000000 +0200
  88790. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h 2014-07-25 20:36:08.041341155 +0200
  88791. @@ -161,7 +161,7 @@
  88792. if ATTR is NULL), and call function START_ROUTINE with given
  88793. arguments ARG. */
  88794. extern int pthread_create (pthread_t *__restrict __threadp,
  88795. - __const pthread_attr_t *__restrict __attr,
  88796. + const pthread_attr_t *__restrict __attr,
  88797. void *(*__start_routine) (void *),
  88798. void *__restrict __arg) __THROW;
  88799. @@ -201,16 +201,16 @@
  88800. int __detachstate) __THROW;
  88801. /* Return in *DETACHSTATE the `detachstate' attribute in *ATTR. */
  88802. -extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
  88803. +extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr,
  88804. int *__detachstate) __THROW;
  88805. /* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */
  88806. extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
  88807. - __const struct sched_param *__restrict
  88808. + const struct sched_param *__restrict
  88809. __param) __THROW;
  88810. /* Return in *PARAM the scheduling parameters of *ATTR. */
  88811. -extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
  88812. +extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict
  88813. __attr,
  88814. struct sched_param *__restrict __param)
  88815. __THROW;
  88816. @@ -220,7 +220,7 @@
  88817. __THROW;
  88818. /* Return in *POLICY the scheduling policy of *ATTR. */
  88819. -extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
  88820. +extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict
  88821. __attr, int *__restrict __policy)
  88822. __THROW;
  88823. @@ -229,7 +229,7 @@
  88824. int __inherit) __THROW;
  88825. /* Return in *INHERIT the scheduling inheritance mode of *ATTR. */
  88826. -extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
  88827. +extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict
  88828. __attr, int *__restrict __inherit)
  88829. __THROW;
  88830. @@ -238,7 +238,7 @@
  88831. __THROW;
  88832. /* Return in *SCOPE the scheduling contention scope of *ATTR. */
  88833. -extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
  88834. +extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr,
  88835. int *__restrict __scope) __THROW;
  88836. #ifdef __USE_UNIX98
  88837. @@ -247,7 +247,7 @@
  88838. size_t __guardsize) __THROW;
  88839. /* Get the size of the guard area at the bottom of the thread. */
  88840. -extern int pthread_attr_getguardsize (__const pthread_attr_t *__restrict
  88841. +extern int pthread_attr_getguardsize (const pthread_attr_t *__restrict
  88842. __attr, size_t *__restrict __guardsize)
  88843. __THROW;
  88844. #endif
  88845. @@ -261,7 +261,7 @@
  88846. void *__stackaddr) __THROW;
  88847. /* Return the previously set address for the stack. */
  88848. -extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
  88849. +extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict
  88850. __attr, void **__restrict __stackaddr)
  88851. __THROW;
  88852. #endif
  88853. @@ -274,7 +274,7 @@
  88854. size_t __stacksize) __THROW;
  88855. /* Return the previously set address for the stack. */
  88856. -extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
  88857. +extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr,
  88858. void **__restrict __stackaddr,
  88859. size_t *__restrict __stacksize) __THROW;
  88860. #endif
  88861. @@ -286,7 +286,7 @@
  88862. size_t __stacksize) __THROW;
  88863. /* Return the currently used minimal stack size. */
  88864. -extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
  88865. +extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict
  88866. __attr, size_t *__restrict __stacksize)
  88867. __THROW;
  88868. @@ -306,7 +306,7 @@
  88869. /* Set the scheduling parameters for TARGET_THREAD according to POLICY
  88870. and *PARAM. */
  88871. extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
  88872. - __const struct sched_param *__param)
  88873. + const struct sched_param *__param)
  88874. __THROW;
  88875. /* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */
  88876. @@ -333,7 +333,7 @@
  88877. /* Initialize MUTEX using attributes in *MUTEX_ATTR, or use the
  88878. default values if later is NULL. */
  88879. extern int pthread_mutex_init (pthread_mutex_t *__restrict __mutex,
  88880. - __const pthread_mutexattr_t *__restrict
  88881. + const pthread_mutexattr_t *__restrict
  88882. __mutex_attr) __THROW;
  88883. /* Destroy MUTEX. */
  88884. @@ -348,7 +348,7 @@
  88885. #ifdef __USE_XOPEN2K
  88886. /* Wait until lock becomes available, or specified time passes. */
  88887. extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
  88888. - __const struct timespec *__restrict
  88889. + const struct timespec *__restrict
  88890. __abstime) __THROW;
  88891. #endif
  88892. @@ -366,7 +366,7 @@
  88893. extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __THROW;
  88894. /* Get the process-shared flag of the mutex attribute ATTR. */
  88895. -extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
  88896. +extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t *
  88897. __restrict __attr,
  88898. int *__restrict __pshared) __THROW;
  88899. @@ -382,7 +382,7 @@
  88900. __THROW;
  88901. /* Return in *KIND the mutex kind attribute in *ATTR. */
  88902. -extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
  88903. +extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict
  88904. __attr, int *__restrict __kind) __THROW;
  88905. #endif
  88906. @@ -392,22 +392,27 @@
  88907. /* Initialize condition variable COND using attributes ATTR, or use
  88908. the default values if later is NULL. */
  88909. extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
  88910. - __const pthread_condattr_t *__restrict
  88911. + const pthread_condattr_t *__restrict
  88912. __cond_attr) __THROW;
  88913. +libpthread_hidden_proto(pthread_cond_init)
  88914. /* Destroy condition variable COND. */
  88915. extern int pthread_cond_destroy (pthread_cond_t *__cond) __THROW;
  88916. +libpthread_hidden_proto(pthread_cond_destroy)
  88917. /* Wake up one thread waiting for condition variable COND. */
  88918. extern int pthread_cond_signal (pthread_cond_t *__cond) __THROW;
  88919. +libpthread_hidden_proto(pthread_cond_signal)
  88920. /* Wake up all threads waiting for condition variables COND. */
  88921. extern int pthread_cond_broadcast (pthread_cond_t *__cond) __THROW;
  88922. +libpthread_hidden_proto(pthread_cond_broadcast)
  88923. /* Wait for condition variable COND to be signaled or broadcast.
  88924. MUTEX is assumed to be locked before. */
  88925. extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
  88926. pthread_mutex_t *__restrict __mutex);
  88927. +libpthread_hidden_proto(pthread_cond_wait)
  88928. /* Wait for condition variable COND to be signaled or broadcast until
  88929. ABSTIME. MUTEX is assumed to be locked before. ABSTIME is an
  88930. @@ -415,19 +420,22 @@
  88931. (00:00:00 GMT, January 1, 1970). */
  88932. extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
  88933. pthread_mutex_t *__restrict __mutex,
  88934. - __const struct timespec *__restrict
  88935. + const struct timespec *__restrict
  88936. __abstime);
  88937. +libpthread_hidden_proto(pthread_cond_timedwait)
  88938. /* Functions for handling condition variable attributes. */
  88939. /* Initialize condition variable attribute ATTR. */
  88940. extern int pthread_condattr_init (pthread_condattr_t *__attr) __THROW;
  88941. +libpthread_hidden_proto(pthread_condattr_init)
  88942. /* Destroy condition variable attribute ATTR. */
  88943. extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __THROW;
  88944. +libpthread_hidden_proto(pthread_condattr_destroy)
  88945. /* Get the process-shared flag of the condition variable attribute ATTR. */
  88946. -extern int pthread_condattr_getpshared (__const pthread_condattr_t *
  88947. +extern int pthread_condattr_getpshared (const pthread_condattr_t *
  88948. __restrict __attr,
  88949. int *__restrict __pshared) __THROW;
  88950. @@ -442,7 +450,7 @@
  88951. /* Initialize read-write lock RWLOCK using attributes ATTR, or use
  88952. the default values if later is NULL. */
  88953. extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
  88954. - __const pthread_rwlockattr_t *__restrict
  88955. + const pthread_rwlockattr_t *__restrict
  88956. __attr) __THROW;
  88957. /* Destroy read-write lock RWLOCK. */
  88958. @@ -457,7 +465,7 @@
  88959. # ifdef __USE_XOPEN2K
  88960. /* Try to acquire read lock for RWLOCK or return after specfied time. */
  88961. extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
  88962. - __const struct timespec *__restrict
  88963. + const struct timespec *__restrict
  88964. __abstime) __THROW;
  88965. # endif
  88966. @@ -470,7 +478,7 @@
  88967. # ifdef __USE_XOPEN2K
  88968. /* Try to acquire write lock for RWLOCK or return after specfied time. */
  88969. extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
  88970. - __const struct timespec *__restrict
  88971. + const struct timespec *__restrict
  88972. __abstime) __THROW;
  88973. # endif
  88974. @@ -487,7 +495,7 @@
  88975. extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) __THROW;
  88976. /* Return current setting of process-shared attribute of ATTR in PSHARED. */
  88977. -extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
  88978. +extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *
  88979. __restrict __attr,
  88980. int *__restrict __pshared) __THROW;
  88981. @@ -496,7 +504,7 @@
  88982. int __pshared) __THROW;
  88983. /* Return current setting of reader/writer preference. */
  88984. -extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *__attr,
  88985. +extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *__attr,
  88986. int *__pref) __THROW;
  88987. /* Set reader/write preference. */
  88988. @@ -532,7 +540,7 @@
  88989. /* Barriers are a also a new feature in 1003.1j-2000. */
  88990. extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
  88991. - __const pthread_barrierattr_t *__restrict
  88992. + const pthread_barrierattr_t *__restrict
  88993. __attr, unsigned int __count) __THROW;
  88994. extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) __THROW;
  88995. @@ -541,7 +549,7 @@
  88996. extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) __THROW;
  88997. -extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
  88998. +extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *
  88999. __restrict __attr,
  89000. int *__restrict __pshared) __THROW;
  89001. @@ -569,7 +577,7 @@
  89002. /* Store POINTER in the thread-specific data slot identified by KEY. */
  89003. extern int pthread_setspecific (pthread_key_t __key,
  89004. - __const void *__pointer) __THROW;
  89005. + const void *__pointer) __THROW;
  89006. /* Return current value of the thread-specific data slot identified by KEY. */
  89007. extern void *pthread_getspecific (pthread_key_t __key) __THROW;
  89008. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/tls.h uClibc-git/libpthread/linuxthreads.old/sysdeps/pthread/tls.h
  89009. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/pthread/tls.h 2012-05-15 09:20:09.000000000 +0200
  89010. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/pthread/tls.h 2014-07-25 20:36:08.041341155 +0200
  89011. @@ -13,9 +13,8 @@
  89012. Lesser General Public License for more details.
  89013. You should have received a copy of the GNU Lesser General Public
  89014. - License along with the GNU C Library; if not, write to the Free
  89015. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89016. - 02111-1307 USA. */
  89017. + License along with the GNU C Library; if not, see
  89018. + <http://www.gnu.org/licenses/>. */
  89019. /* By default no TLS support is available. This is signaled by the
  89020. absence of the symbol USE_TLS. */
  89021. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sh/pt-machine.h uClibc-git/libpthread/linuxthreads.old/sysdeps/sh/pt-machine.h
  89022. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sh/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  89023. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/sh/pt-machine.h 2014-07-25 20:36:08.041341155 +0200
  89024. @@ -15,9 +15,8 @@
  89025. Lesser General Public License for more details.
  89026. You should have received a copy of the GNU Lesser General Public
  89027. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  89028. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  89029. - Boston, MA 02111-1307, USA. */
  89030. + License along with the GNU C Library; see the file COPYING.LIB. If
  89031. + not, see <http://www.gnu.org/licenses/>. */
  89032. #ifndef _PT_MACHINE_H
  89033. #define _PT_MACHINE_H 1
  89034. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sh/tls.h uClibc-git/libpthread/linuxthreads.old/sysdeps/sh/tls.h
  89035. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sh/tls.h 2012-05-15 09:20:09.000000000 +0200
  89036. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/sh/tls.h 2014-07-25 20:36:08.041341155 +0200
  89037. @@ -13,9 +13,8 @@
  89038. Lesser General Public License for more details.
  89039. You should have received a copy of the GNU Lesser General Public
  89040. - License along with the GNU C Library; if not, write to the Free
  89041. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89042. - 02111-1307 USA. */
  89043. + License along with the GNU C Library; if not, see
  89044. + <http://www.gnu.org/licenses/>. */
  89045. #ifndef _TLS_H
  89046. #define _TLS_H
  89047. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.c uClibc-git/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.c
  89048. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.c 2012-05-15 09:20:09.000000000 +0200
  89049. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.c 2014-07-25 20:36:08.041341155 +0200
  89050. @@ -19,8 +19,7 @@
  89051. You should have received a copy of the GNU Library General Public
  89052. License along with the GNU C Library; see the file COPYING.LIB. If not,
  89053. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  89054. - Boston, MA 02111-1307, USA. */
  89055. + see <http://www.gnu.org/licenses/>. */
  89056. #include "pt-machine.h"
  89057. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.h uClibc-git/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.h
  89058. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  89059. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/sh64/pt-machine.h 2014-07-25 20:36:08.041341155 +0200
  89060. @@ -19,8 +19,7 @@
  89061. You should have received a copy of the GNU Library General Public
  89062. License along with the GNU C Library; see the file COPYING.LIB. If not,
  89063. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  89064. - Boston, MA 02111-1307, USA. */
  89065. + see <http://www.gnu.org/licenses/>. */
  89066. #ifndef _PT_MACHINE_H
  89067. #define _PT_MACHINE_H 1
  89068. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sparc/sparc32/pt-machine.h uClibc-git/libpthread/linuxthreads.old/sysdeps/sparc/sparc32/pt-machine.h
  89069. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sparc/sparc32/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  89070. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/sparc/sparc32/pt-machine.h 2014-07-25 20:36:08.065341280 +0200
  89071. @@ -15,9 +15,8 @@
  89072. Lesser General Public License for more details.
  89073. You should have received a copy of the GNU Lesser General Public
  89074. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  89075. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  89076. - Boston, MA 02111-1307, USA. */
  89077. + License along with the GNU C Library; see the file COPYING.LIB. If
  89078. + not, see <http://www.gnu.org/licenses/>. */
  89079. #ifndef _PT_MACHINE_H
  89080. #define _PT_MACHINE_H 1
  89081. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sparc/sparc64/pt-machine.h uClibc-git/libpthread/linuxthreads.old/sysdeps/sparc/sparc64/pt-machine.h
  89082. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/sparc/sparc64/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  89083. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/sparc/sparc64/pt-machine.h 2014-07-25 20:36:08.073341322 +0200
  89084. @@ -16,8 +16,7 @@
  89085. You should have received a copy of the GNU Lesser General Public
  89086. License along with the GNU C Library; see the file COPYING.LIB. If
  89087. - not, write to the Free Software Foundation, Inc.,
  89088. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  89089. + not, see <http://www.gnu.org/licenses/>. */
  89090. #ifndef _PT_MACHINE_H
  89091. #define _PT_MACHINE_H 1
  89092. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/x86_64/pt-machine.h uClibc-git/libpthread/linuxthreads.old/sysdeps/x86_64/pt-machine.h
  89093. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/x86_64/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  89094. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/x86_64/pt-machine.h 2014-07-25 20:36:08.109341510 +0200
  89095. @@ -14,9 +14,8 @@
  89096. Lesser General Public License for more details.
  89097. You should have received a copy of the GNU Lesser General Public
  89098. - License along with the GNU C Library; if not, write to the Free
  89099. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89100. - 02111-1307 USA. */
  89101. + License along with the GNU C Library; if not, see
  89102. + <http://www.gnu.org/licenses/>. */
  89103. #ifndef _PT_MACHINE_H
  89104. #define _PT_MACHINE_H 1
  89105. @@ -33,6 +32,9 @@
  89106. # define PT_EI __extern_always_inline
  89107. # endif
  89108. +extern long int testandset (int *);
  89109. +extern int __compare_and_swap (long int *, long int, long int);
  89110. +
  89111. /* Get some notion of the current stack. Need not be exactly the top
  89112. of the stack, just something somewhere in the current frame. */
  89113. # define CURRENT_STACK_FRAME stack_pointer
  89114. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/x86_64/tls.h uClibc-git/libpthread/linuxthreads.old/sysdeps/x86_64/tls.h
  89115. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/x86_64/tls.h 2012-05-15 09:20:09.000000000 +0200
  89116. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/x86_64/tls.h 2014-07-25 20:36:08.109341510 +0200
  89117. @@ -13,9 +13,8 @@
  89118. Lesser General Public License for more details.
  89119. You should have received a copy of the GNU Lesser General Public
  89120. - License along with the GNU C Library; if not, write to the Free
  89121. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89122. - 02111-1307 USA. */
  89123. + License along with the GNU C Library; if not, see
  89124. + <http://www.gnu.org/licenses/>. */
  89125. #ifndef _TLS_H
  89126. #define _TLS_H
  89127. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/xtensa/pt-machine.h uClibc-git/libpthread/linuxthreads.old/sysdeps/xtensa/pt-machine.h
  89128. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/sysdeps/xtensa/pt-machine.h 2012-05-15 09:20:09.000000000 +0200
  89129. +++ uClibc-git/libpthread/linuxthreads.old/sysdeps/xtensa/pt-machine.h 2014-07-25 20:36:08.129341616 +0200
  89130. @@ -15,9 +15,8 @@
  89131. Lesser General Public License for more details.
  89132. You should have received a copy of the GNU Lesser General Public
  89133. - License along with the GNU C Library; if not, write to the Free
  89134. - Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
  89135. - Boston, MA 02110-1301, USA. */
  89136. + License along with the GNU C Library; if not, see
  89137. + <http://www.gnu.org/licenses/>. */
  89138. #ifndef _PT_MACHINE_H
  89139. #define _PT_MACHINE_H 1
  89140. @@ -26,19 +25,51 @@
  89141. #include <asm/unistd.h>
  89142. #ifndef PT_EI
  89143. -# define PT_EI __extern_always_inline
  89144. +# define PT_EI extern inline __attribute__ ((gnu_inline))
  89145. #endif
  89146. -/* Memory barrier. */
  89147. #define MEMORY_BARRIER() __asm__ ("memw" : : : "memory")
  89148. +#define HAS_COMPARE_AND_SWAP
  89149. +
  89150. +extern long int testandset (int *spinlock);
  89151. +extern int __compare_and_swap (long int *p, long int oldval, long int newval);
  89152. /* Spinlock implementation; required. */
  89153. PT_EI long int
  89154. testandset (int *spinlock)
  89155. {
  89156. - int unused = 0;
  89157. - return INTERNAL_SYSCALL (xtensa, , 4, SYS_XTENSA_ATOMIC_SET,
  89158. - spinlock, 1, unused);
  89159. + unsigned long tmp;
  89160. + __asm__ volatile (
  89161. +" movi %0, 0 \n"
  89162. +" wsr %0, SCOMPARE1 \n"
  89163. +" movi %0, 1 \n"
  89164. +" s32c1i %0, %1, 0 \n"
  89165. + : "=&a" (tmp)
  89166. + : "a" (spinlock)
  89167. + : "memory"
  89168. + );
  89169. + return tmp;
  89170. +}
  89171. +
  89172. +PT_EI int
  89173. +__compare_and_swap (long int *p, long int oldval, long int newval)
  89174. +{
  89175. + unsigned long tmp;
  89176. + unsigned long value;
  89177. + __asm__ volatile (
  89178. +"1: l32i %0, %2, 0 \n"
  89179. +" bne %0, %4, 2f \n"
  89180. +" wsr %0, SCOMPARE1 \n"
  89181. +" mov %1, %0 \n"
  89182. +" mov %0, %3 \n"
  89183. +" s32c1i %0, %2, 0 \n"
  89184. +" bne %1, %0, 1b \n"
  89185. +"2: \n"
  89186. + : "=&a" (tmp), "=&a" (value)
  89187. + : "a" (p), "a" (newval), "a" (oldval)
  89188. + : "memory" );
  89189. +
  89190. + return tmp == oldval;
  89191. }
  89192. /* Get some notion of the current stack. Need not be exactly the top
  89193. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old/wrapsyscall.c uClibc-git/libpthread/linuxthreads.old/wrapsyscall.c
  89194. --- uClibc-0.9.33.2/libpthread/linuxthreads.old/wrapsyscall.c 2012-05-15 09:20:09.000000000 +0200
  89195. +++ uClibc-git/libpthread/linuxthreads.old/wrapsyscall.c 2014-07-25 20:36:08.129341616 +0200
  89196. @@ -1,4 +1,4 @@
  89197. -/* Wrapper arpund system calls to provide cancellation points.
  89198. +/* Wrapper around system calls to provide cancellation points.
  89199. Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
  89200. This file is part of the GNU C Library.
  89201. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
  89202. @@ -15,11 +15,8 @@
  89203. You should have received a copy of the GNU Library General Public
  89204. License along with the GNU C Library; see the file COPYING.LIB. If not,
  89205. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  89206. - Boston, MA 02111-1307, USA. */
  89207. + see <http://www.gnu.org/licenses/>. */
  89208. -#define __FORCE_GLIBC
  89209. -#include <features.h>
  89210. #include <fcntl.h>
  89211. #include <sys/mman.h>
  89212. #include <pthread.h>
  89213. @@ -83,6 +80,12 @@
  89214. CANCELABLE_SYSCALL_VA (int, fcntl, (int fd, int cmd, ...),
  89215. (fd, cmd, va_arg (ap, long int)), cmd)
  89216. +#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 32
  89217. +/* fcntl64(2). */
  89218. +CANCELABLE_SYSCALL_VA (int, fcntl64, (int fd, int cmd, ...),
  89219. + (fd, cmd, va_arg (ap, long int)), cmd)
  89220. +#endif
  89221. +
  89222. /* fsync(2). */
  89223. CANCELABLE_SYSCALL (int, fsync, (int fd), (fd))
  89224. @@ -230,12 +233,12 @@
  89225. #endif /* __UCLIBC_HAS_SOCKET__ */
  89226. #ifdef __UCLIBC_HAS_EPOLL__
  89227. +# include <sys/epoll.h>
  89228. # ifdef __NR_epoll_wait
  89229. CANCELABLE_SYSCALL (int, epoll_wait, (int epfd, struct epoll_event *events, int maxevents, int timeout),
  89230. (epfd, events, maxevents, timeout))
  89231. # endif
  89232. # ifdef __NR_epoll_pwait
  89233. -# include <signal.h>
  89234. CANCELABLE_SYSCALL (int, epoll_pwait, (int epfd, struct epoll_event *events, int maxevents, int timeout,
  89235. const sigset_t *set),
  89236. (epfd, events, maxevents, timeout, set))
  89237. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/proc_service.h uClibc-git/libpthread/linuxthreads.old_db/proc_service.h
  89238. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/proc_service.h 2012-05-15 09:20:09.000000000 +0200
  89239. +++ uClibc-git/libpthread/linuxthreads.old_db/proc_service.h 2014-07-25 20:36:08.149341720 +0200
  89240. @@ -12,9 +12,8 @@
  89241. Lesser General Public License for more details.
  89242. You should have received a copy of the GNU Lesser General Public
  89243. - License along with the GNU C Library; if not, write to the Free
  89244. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89245. - 02111-1307 USA. */
  89246. + License along with the GNU C Library; if not, see
  89247. + <http://www.gnu.org/licenses/>. */
  89248. /* The definitions in this file must correspond to those in the debugger. */
  89249. #include <sys/procfs.h>
  89250. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_init.c uClibc-git/libpthread/linuxthreads.old_db/td_init.c
  89251. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_init.c 2012-05-15 09:20:09.000000000 +0200
  89252. +++ uClibc-git/libpthread/linuxthreads.old_db/td_init.c 2014-07-25 20:36:08.149341720 +0200
  89253. @@ -14,9 +14,8 @@
  89254. Lesser General Public License for more details.
  89255. You should have received a copy of the GNU Lesser General Public
  89256. - License along with the GNU C Library; if not, write to the Free
  89257. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89258. - 02111-1307 USA. */
  89259. + License along with the GNU C Library; if not, see
  89260. + <http://www.gnu.org/licenses/>. */
  89261. #include "thread_dbP.h"
  89262. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_log.c uClibc-git/libpthread/linuxthreads.old_db/td_log.c
  89263. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_log.c 2012-05-15 09:20:09.000000000 +0200
  89264. +++ uClibc-git/libpthread/linuxthreads.old_db/td_log.c 2014-07-25 20:36:08.149341720 +0200
  89265. @@ -14,9 +14,8 @@
  89266. Lesser General Public License for more details.
  89267. You should have received a copy of the GNU Lesser General Public
  89268. - License along with the GNU C Library; if not, write to the Free
  89269. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89270. - 02111-1307 USA. */
  89271. + License along with the GNU C Library; if not, see
  89272. + <http://www.gnu.org/licenses/>. */
  89273. #include "thread_dbP.h"
  89274. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_symbol_list.c uClibc-git/libpthread/linuxthreads.old_db/td_symbol_list.c
  89275. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_symbol_list.c 2012-05-15 09:20:09.000000000 +0200
  89276. +++ uClibc-git/libpthread/linuxthreads.old_db/td_symbol_list.c 2014-07-25 20:36:08.149341720 +0200
  89277. @@ -14,9 +14,8 @@
  89278. Lesser General Public License for more details.
  89279. You should have received a copy of the GNU Lesser General Public
  89280. - License along with the GNU C Library; if not, write to the Free
  89281. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89282. - 02111-1307 USA. */
  89283. + License along with the GNU C Library; if not, see
  89284. + <http://www.gnu.org/licenses/>. */
  89285. #include <assert.h>
  89286. #include "thread_dbP.h"
  89287. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_clear_event.c uClibc-git/libpthread/linuxthreads.old_db/td_ta_clear_event.c
  89288. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_clear_event.c 2012-05-15 09:20:09.000000000 +0200
  89289. +++ uClibc-git/libpthread/linuxthreads.old_db/td_ta_clear_event.c 2014-07-25 20:36:08.153341741 +0200
  89290. @@ -14,17 +14,14 @@
  89291. Lesser General Public License for more details.
  89292. You should have received a copy of the GNU Lesser General Public
  89293. - License along with the GNU C Library; if not, write to the Free
  89294. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89295. - 02111-1307 USA. */
  89296. + License along with the GNU C Library; if not, see
  89297. + <http://www.gnu.org/licenses/>. */
  89298. #include "thread_dbP.h"
  89299. td_err_e
  89300. -td_ta_clear_event (ta, event)
  89301. - const td_thragent_t *ta;
  89302. - td_thr_events_t *event;
  89303. +td_ta_clear_event(const td_thragent_t *ta,td_thr_events_t *event)
  89304. {
  89305. td_thr_events_t old_event;
  89306. int i;
  89307. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_delete.c uClibc-git/libpthread/linuxthreads.old_db/td_ta_delete.c
  89308. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_delete.c 2012-05-15 09:20:09.000000000 +0200
  89309. +++ uClibc-git/libpthread/linuxthreads.old_db/td_ta_delete.c 2014-07-25 20:36:08.153341741 +0200
  89310. @@ -14,9 +14,8 @@
  89311. Lesser General Public License for more details.
  89312. You should have received a copy of the GNU Lesser General Public
  89313. - License along with the GNU C Library; if not, write to the Free
  89314. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89315. - 02111-1307 USA. */
  89316. + License along with the GNU C Library; if not, see
  89317. + <http://www.gnu.org/licenses/>. */
  89318. #include <stdlib.h>
  89319. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_enable_stats.c uClibc-git/libpthread/linuxthreads.old_db/td_ta_enable_stats.c
  89320. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_enable_stats.c 2012-05-15 09:20:09.000000000 +0200
  89321. +++ uClibc-git/libpthread/linuxthreads.old_db/td_ta_enable_stats.c 2014-07-25 20:36:08.153341741 +0200
  89322. @@ -14,9 +14,8 @@
  89323. Lesser General Public License for more details.
  89324. You should have received a copy of the GNU Lesser General Public
  89325. - License along with the GNU C Library; if not, write to the Free
  89326. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89327. - 02111-1307 USA. */
  89328. + License along with the GNU C Library; if not, see
  89329. + <http://www.gnu.org/licenses/>. */
  89330. #include "thread_dbP.h"
  89331. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_event_addr.c uClibc-git/libpthread/linuxthreads.old_db/td_ta_event_addr.c
  89332. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_event_addr.c 2012-05-15 09:20:09.000000000 +0200
  89333. +++ uClibc-git/libpthread/linuxthreads.old_db/td_ta_event_addr.c 2014-07-25 20:36:08.153341741 +0200
  89334. @@ -14,9 +14,8 @@
  89335. Lesser General Public License for more details.
  89336. You should have received a copy of the GNU Lesser General Public
  89337. - License along with the GNU C Library; if not, write to the Free
  89338. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89339. - 02111-1307 USA. */
  89340. + License along with the GNU C Library; if not, see
  89341. + <http://www.gnu.org/licenses/>. */
  89342. #include "thread_dbP.h"
  89343. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_event_getmsg.c uClibc-git/libpthread/linuxthreads.old_db/td_ta_event_getmsg.c
  89344. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_event_getmsg.c 2012-05-15 09:20:09.000000000 +0200
  89345. +++ uClibc-git/libpthread/linuxthreads.old_db/td_ta_event_getmsg.c 2014-07-25 20:36:08.153341741 +0200
  89346. @@ -14,9 +14,8 @@
  89347. Lesser General Public License for more details.
  89348. You should have received a copy of the GNU Lesser General Public
  89349. - License along with the GNU C Library; if not, write to the Free
  89350. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89351. - 02111-1307 USA. */
  89352. + License along with the GNU C Library; if not, see
  89353. + <http://www.gnu.org/licenses/>. */
  89354. #include <stddef.h>
  89355. #include <string.h>
  89356. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_get_nthreads.c uClibc-git/libpthread/linuxthreads.old_db/td_ta_get_nthreads.c
  89357. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_get_nthreads.c 2012-05-15 09:20:09.000000000 +0200
  89358. +++ uClibc-git/libpthread/linuxthreads.old_db/td_ta_get_nthreads.c 2014-07-25 20:36:08.153341741 +0200
  89359. @@ -14,9 +14,8 @@
  89360. Lesser General Public License for more details.
  89361. You should have received a copy of the GNU Lesser General Public
  89362. - License along with the GNU C Library; if not, write to the Free
  89363. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89364. - 02111-1307 USA. */
  89365. + License along with the GNU C Library; if not, see
  89366. + <http://www.gnu.org/licenses/>. */
  89367. #include "thread_dbP.h"
  89368. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_get_ph.c uClibc-git/libpthread/linuxthreads.old_db/td_ta_get_ph.c
  89369. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_get_ph.c 2012-05-15 09:20:09.000000000 +0200
  89370. +++ uClibc-git/libpthread/linuxthreads.old_db/td_ta_get_ph.c 2014-07-25 20:36:08.153341741 +0200
  89371. @@ -14,9 +14,8 @@
  89372. Lesser General Public License for more details.
  89373. You should have received a copy of the GNU Lesser General Public
  89374. - License along with the GNU C Library; if not, write to the Free
  89375. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89376. - 02111-1307 USA. */
  89377. + License along with the GNU C Library; if not, see
  89378. + <http://www.gnu.org/licenses/>. */
  89379. #include "thread_dbP.h"
  89380. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_get_stats.c uClibc-git/libpthread/linuxthreads.old_db/td_ta_get_stats.c
  89381. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_get_stats.c 2012-05-15 09:20:09.000000000 +0200
  89382. +++ uClibc-git/libpthread/linuxthreads.old_db/td_ta_get_stats.c 2014-07-25 20:36:08.153341741 +0200
  89383. @@ -14,9 +14,8 @@
  89384. Lesser General Public License for more details.
  89385. You should have received a copy of the GNU Lesser General Public
  89386. - License along with the GNU C Library; if not, write to the Free
  89387. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89388. - 02111-1307 USA. */
  89389. + License along with the GNU C Library; if not, see
  89390. + <http://www.gnu.org/licenses/>. */
  89391. #include "thread_dbP.h"
  89392. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_map_id2thr.c uClibc-git/libpthread/linuxthreads.old_db/td_ta_map_id2thr.c
  89393. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_map_id2thr.c 2012-05-15 09:20:09.000000000 +0200
  89394. +++ uClibc-git/libpthread/linuxthreads.old_db/td_ta_map_id2thr.c 2014-07-25 20:36:08.153341741 +0200
  89395. @@ -14,9 +14,8 @@
  89396. Lesser General Public License for more details.
  89397. You should have received a copy of the GNU Lesser General Public
  89398. - License along with the GNU C Library; if not, write to the Free
  89399. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89400. - 02111-1307 USA. */
  89401. + License along with the GNU C Library; if not, see
  89402. + <http://www.gnu.org/licenses/>. */
  89403. #include "thread_dbP.h"
  89404. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_map_lwp2thr.c uClibc-git/libpthread/linuxthreads.old_db/td_ta_map_lwp2thr.c
  89405. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_map_lwp2thr.c 2012-05-15 09:20:09.000000000 +0200
  89406. +++ uClibc-git/libpthread/linuxthreads.old_db/td_ta_map_lwp2thr.c 2014-07-25 20:36:08.153341741 +0200
  89407. @@ -14,9 +14,8 @@
  89408. Lesser General Public License for more details.
  89409. You should have received a copy of the GNU Lesser General Public
  89410. - License along with the GNU C Library; if not, write to the Free
  89411. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89412. - 02111-1307 USA. */
  89413. + License along with the GNU C Library; if not, see
  89414. + <http://www.gnu.org/licenses/>. */
  89415. #include "thread_dbP.h"
  89416. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_new.c uClibc-git/libpthread/linuxthreads.old_db/td_ta_new.c
  89417. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_new.c 2012-05-15 09:20:09.000000000 +0200
  89418. +++ uClibc-git/libpthread/linuxthreads.old_db/td_ta_new.c 2014-07-25 20:36:08.153341741 +0200
  89419. @@ -14,9 +14,8 @@
  89420. Lesser General Public License for more details.
  89421. You should have received a copy of the GNU Lesser General Public
  89422. - License along with the GNU C Library; if not, write to the Free
  89423. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89424. - 02111-1307 USA. */
  89425. + License along with the GNU C Library; if not, see
  89426. + <http://www.gnu.org/licenses/>. */
  89427. #include <stddef.h>
  89428. #include <stdlib.h>
  89429. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_reset_stats.c uClibc-git/libpthread/linuxthreads.old_db/td_ta_reset_stats.c
  89430. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_reset_stats.c 2012-05-15 09:20:09.000000000 +0200
  89431. +++ uClibc-git/libpthread/linuxthreads.old_db/td_ta_reset_stats.c 2014-07-25 20:36:08.153341741 +0200
  89432. @@ -14,9 +14,8 @@
  89433. Lesser General Public License for more details.
  89434. You should have received a copy of the GNU Lesser General Public
  89435. - License along with the GNU C Library; if not, write to the Free
  89436. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89437. - 02111-1307 USA. */
  89438. + License along with the GNU C Library; if not, see
  89439. + <http://www.gnu.org/licenses/>. */
  89440. #include "thread_dbP.h"
  89441. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_setconcurrency.c uClibc-git/libpthread/linuxthreads.old_db/td_ta_setconcurrency.c
  89442. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_setconcurrency.c 2012-05-15 09:20:09.000000000 +0200
  89443. +++ uClibc-git/libpthread/linuxthreads.old_db/td_ta_setconcurrency.c 2014-07-25 20:36:08.153341741 +0200
  89444. @@ -14,9 +14,8 @@
  89445. Lesser General Public License for more details.
  89446. You should have received a copy of the GNU Lesser General Public
  89447. - License along with the GNU C Library; if not, write to the Free
  89448. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89449. - 02111-1307 USA. */
  89450. + License along with the GNU C Library; if not, see
  89451. + <http://www.gnu.org/licenses/>. */
  89452. #include "thread_dbP.h"
  89453. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_set_event.c uClibc-git/libpthread/linuxthreads.old_db/td_ta_set_event.c
  89454. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_set_event.c 2012-05-15 09:20:09.000000000 +0200
  89455. +++ uClibc-git/libpthread/linuxthreads.old_db/td_ta_set_event.c 2014-07-25 20:36:08.153341741 +0200
  89456. @@ -14,17 +14,14 @@
  89457. Lesser General Public License for more details.
  89458. You should have received a copy of the GNU Lesser General Public
  89459. - License along with the GNU C Library; if not, write to the Free
  89460. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89461. - 02111-1307 USA. */
  89462. + License along with the GNU C Library; if not, see
  89463. + <http://www.gnu.org/licenses/>. */
  89464. #include "thread_dbP.h"
  89465. td_err_e
  89466. -td_ta_set_event (ta, event)
  89467. - const td_thragent_t *ta;
  89468. - td_thr_events_t *event;
  89469. +td_ta_set_event(const td_thragent_t *ta,td_thr_events_t *event)
  89470. {
  89471. td_thr_events_t old_event;
  89472. int i;
  89473. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_thr_iter.c uClibc-git/libpthread/linuxthreads.old_db/td_ta_thr_iter.c
  89474. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_thr_iter.c 2012-05-15 09:20:09.000000000 +0200
  89475. +++ uClibc-git/libpthread/linuxthreads.old_db/td_ta_thr_iter.c 2014-07-25 20:36:08.153341741 +0200
  89476. @@ -14,9 +14,8 @@
  89477. Lesser General Public License for more details.
  89478. You should have received a copy of the GNU Lesser General Public
  89479. - License along with the GNU C Library; if not, write to the Free
  89480. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89481. - 02111-1307 USA. */
  89482. + License along with the GNU C Library; if not, see
  89483. + <http://www.gnu.org/licenses/>. */
  89484. #include "thread_dbP.h"
  89485. #include <alloca.h>
  89486. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_tsd_iter.c uClibc-git/libpthread/linuxthreads.old_db/td_ta_tsd_iter.c
  89487. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_ta_tsd_iter.c 2012-05-15 09:20:09.000000000 +0200
  89488. +++ uClibc-git/libpthread/linuxthreads.old_db/td_ta_tsd_iter.c 2014-07-25 20:36:08.153341741 +0200
  89489. @@ -14,9 +14,8 @@
  89490. Lesser General Public License for more details.
  89491. You should have received a copy of the GNU Lesser General Public
  89492. - License along with the GNU C Library; if not, write to the Free
  89493. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89494. - 02111-1307 USA. */
  89495. + License along with the GNU C Library; if not, see
  89496. + <http://www.gnu.org/licenses/>. */
  89497. #include "thread_dbP.h"
  89498. #include <alloca.h>
  89499. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_clear_event.c uClibc-git/libpthread/linuxthreads.old_db/td_thr_clear_event.c
  89500. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_clear_event.c 2012-05-15 09:20:09.000000000 +0200
  89501. +++ uClibc-git/libpthread/linuxthreads.old_db/td_thr_clear_event.c 2014-07-25 20:36:08.153341741 +0200
  89502. @@ -14,9 +14,8 @@
  89503. Lesser General Public License for more details.
  89504. You should have received a copy of the GNU Lesser General Public
  89505. - License along with the GNU C Library; if not, write to the Free
  89506. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89507. - 02111-1307 USA. */
  89508. + License along with the GNU C Library; if not, see
  89509. + <http://www.gnu.org/licenses/>. */
  89510. #include <stddef.h>
  89511. @@ -24,9 +23,7 @@
  89512. td_err_e
  89513. -td_thr_clear_event (th, event)
  89514. - const td_thrhandle_t *th;
  89515. - td_thr_events_t *event;
  89516. +td_thr_clear_event(const td_thrhandle_t *th,td_thr_events_t *event)
  89517. {
  89518. td_thr_events_t old_event;
  89519. int i;
  89520. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_dbresume.c uClibc-git/libpthread/linuxthreads.old_db/td_thr_dbresume.c
  89521. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_dbresume.c 2012-05-15 09:20:09.000000000 +0200
  89522. +++ uClibc-git/libpthread/linuxthreads.old_db/td_thr_dbresume.c 2014-07-25 20:36:08.153341741 +0200
  89523. @@ -14,9 +14,8 @@
  89524. Lesser General Public License for more details.
  89525. You should have received a copy of the GNU Lesser General Public
  89526. - License along with the GNU C Library; if not, write to the Free
  89527. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89528. - 02111-1307 USA. */
  89529. + License along with the GNU C Library; if not, see
  89530. + <http://www.gnu.org/licenses/>. */
  89531. #include "thread_dbP.h"
  89532. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_dbsuspend.c uClibc-git/libpthread/linuxthreads.old_db/td_thr_dbsuspend.c
  89533. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_dbsuspend.c 2012-05-15 09:20:09.000000000 +0200
  89534. +++ uClibc-git/libpthread/linuxthreads.old_db/td_thr_dbsuspend.c 2014-07-25 20:36:08.153341741 +0200
  89535. @@ -14,9 +14,8 @@
  89536. Lesser General Public License for more details.
  89537. You should have received a copy of the GNU Lesser General Public
  89538. - License along with the GNU C Library; if not, write to the Free
  89539. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89540. - 02111-1307 USA. */
  89541. + License along with the GNU C Library; if not, see
  89542. + <http://www.gnu.org/licenses/>. */
  89543. #include "thread_dbP.h"
  89544. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_event_enable.c uClibc-git/libpthread/linuxthreads.old_db/td_thr_event_enable.c
  89545. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_event_enable.c 2012-05-15 09:20:09.000000000 +0200
  89546. +++ uClibc-git/libpthread/linuxthreads.old_db/td_thr_event_enable.c 2014-07-25 20:36:08.153341741 +0200
  89547. @@ -14,9 +14,8 @@
  89548. Lesser General Public License for more details.
  89549. You should have received a copy of the GNU Lesser General Public
  89550. - License along with the GNU C Library; if not, write to the Free
  89551. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89552. - 02111-1307 USA. */
  89553. + License along with the GNU C Library; if not, see
  89554. + <http://www.gnu.org/licenses/>. */
  89555. #include <stddef.h>
  89556. @@ -24,9 +23,7 @@
  89557. td_err_e
  89558. -td_thr_event_enable (th, onoff)
  89559. - const td_thrhandle_t *th;
  89560. - int onoff;
  89561. +td_thr_event_enable(const td_thrhandle_t *th, int onoff)
  89562. {
  89563. LOG ("td_thr_event_enable");
  89564. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_event_getmsg.c uClibc-git/libpthread/linuxthreads.old_db/td_thr_event_getmsg.c
  89565. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_event_getmsg.c 2012-05-15 09:20:09.000000000 +0200
  89566. +++ uClibc-git/libpthread/linuxthreads.old_db/td_thr_event_getmsg.c 2014-07-25 20:36:08.153341741 +0200
  89567. @@ -14,9 +14,8 @@
  89568. Lesser General Public License for more details.
  89569. You should have received a copy of the GNU Lesser General Public
  89570. - License along with the GNU C Library; if not, write to the Free
  89571. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89572. - 02111-1307 USA. */
  89573. + License along with the GNU C Library; if not, see
  89574. + <http://www.gnu.org/licenses/>. */
  89575. #include <stddef.h>
  89576. #include <string.h>
  89577. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_getfpregs.c uClibc-git/libpthread/linuxthreads.old_db/td_thr_getfpregs.c
  89578. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_getfpregs.c 2012-05-15 09:20:09.000000000 +0200
  89579. +++ uClibc-git/libpthread/linuxthreads.old_db/td_thr_getfpregs.c 2014-07-25 20:36:08.153341741 +0200
  89580. @@ -14,9 +14,8 @@
  89581. Lesser General Public License for more details.
  89582. You should have received a copy of the GNU Lesser General Public
  89583. - License along with the GNU C Library; if not, write to the Free
  89584. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89585. - 02111-1307 USA. */
  89586. + License along with the GNU C Library; if not, see
  89587. + <http://www.gnu.org/licenses/>. */
  89588. #include "thread_dbP.h"
  89589. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_getgregs.c uClibc-git/libpthread/linuxthreads.old_db/td_thr_getgregs.c
  89590. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_getgregs.c 2012-05-15 09:20:09.000000000 +0200
  89591. +++ uClibc-git/libpthread/linuxthreads.old_db/td_thr_getgregs.c 2014-07-25 20:36:08.153341741 +0200
  89592. @@ -14,9 +14,8 @@
  89593. Lesser General Public License for more details.
  89594. You should have received a copy of the GNU Lesser General Public
  89595. - License along with the GNU C Library; if not, write to the Free
  89596. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89597. - 02111-1307 USA. */
  89598. + License along with the GNU C Library; if not, see
  89599. + <http://www.gnu.org/licenses/>. */
  89600. #include "thread_dbP.h"
  89601. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_get_info.c uClibc-git/libpthread/linuxthreads.old_db/td_thr_get_info.c
  89602. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_get_info.c 2012-05-15 09:20:09.000000000 +0200
  89603. +++ uClibc-git/libpthread/linuxthreads.old_db/td_thr_get_info.c 2014-07-25 20:36:08.153341741 +0200
  89604. @@ -14,9 +14,8 @@
  89605. Lesser General Public License for more details.
  89606. You should have received a copy of the GNU Lesser General Public
  89607. - License along with the GNU C Library; if not, write to the Free
  89608. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89609. - 02111-1307 USA. */
  89610. + License along with the GNU C Library; if not, see
  89611. + <http://www.gnu.org/licenses/>. */
  89612. #include <stddef.h>
  89613. #include <string.h>
  89614. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_getxregs.c uClibc-git/libpthread/linuxthreads.old_db/td_thr_getxregs.c
  89615. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_getxregs.c 2012-05-15 09:20:09.000000000 +0200
  89616. +++ uClibc-git/libpthread/linuxthreads.old_db/td_thr_getxregs.c 2014-07-25 20:36:08.153341741 +0200
  89617. @@ -14,9 +14,8 @@
  89618. Lesser General Public License for more details.
  89619. You should have received a copy of the GNU Lesser General Public
  89620. - License along with the GNU C Library; if not, write to the Free
  89621. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89622. - 02111-1307 USA. */
  89623. + License along with the GNU C Library; if not, see
  89624. + <http://www.gnu.org/licenses/>. */
  89625. #include "thread_dbP.h"
  89626. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_getxregsize.c uClibc-git/libpthread/linuxthreads.old_db/td_thr_getxregsize.c
  89627. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_getxregsize.c 2012-05-15 09:20:09.000000000 +0200
  89628. +++ uClibc-git/libpthread/linuxthreads.old_db/td_thr_getxregsize.c 2014-07-25 20:36:08.153341741 +0200
  89629. @@ -14,9 +14,8 @@
  89630. Lesser General Public License for more details.
  89631. You should have received a copy of the GNU Lesser General Public
  89632. - License along with the GNU C Library; if not, write to the Free
  89633. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89634. - 02111-1307 USA. */
  89635. + License along with the GNU C Library; if not, see
  89636. + <http://www.gnu.org/licenses/>. */
  89637. #include "thread_dbP.h"
  89638. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_set_event.c uClibc-git/libpthread/linuxthreads.old_db/td_thr_set_event.c
  89639. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_set_event.c 2012-05-15 09:20:09.000000000 +0200
  89640. +++ uClibc-git/libpthread/linuxthreads.old_db/td_thr_set_event.c 2014-07-25 20:36:08.153341741 +0200
  89641. @@ -14,9 +14,8 @@
  89642. Lesser General Public License for more details.
  89643. You should have received a copy of the GNU Lesser General Public
  89644. - License along with the GNU C Library; if not, write to the Free
  89645. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89646. - 02111-1307 USA. */
  89647. + License along with the GNU C Library; if not, see
  89648. + <http://www.gnu.org/licenses/>. */
  89649. #include <stddef.h>
  89650. @@ -24,9 +23,7 @@
  89651. td_err_e
  89652. -td_thr_set_event (th, event)
  89653. - const td_thrhandle_t *th;
  89654. - td_thr_events_t *event;
  89655. +td_thr_set_event(const td_thrhandle_t *th, td_thr_events_t *event)
  89656. {
  89657. td_thr_events_t old_event;
  89658. int i;
  89659. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_setfpregs.c uClibc-git/libpthread/linuxthreads.old_db/td_thr_setfpregs.c
  89660. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_setfpregs.c 2012-05-15 09:20:09.000000000 +0200
  89661. +++ uClibc-git/libpthread/linuxthreads.old_db/td_thr_setfpregs.c 2014-07-25 20:36:08.153341741 +0200
  89662. @@ -14,9 +14,8 @@
  89663. Lesser General Public License for more details.
  89664. You should have received a copy of the GNU Lesser General Public
  89665. - License along with the GNU C Library; if not, write to the Free
  89666. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89667. - 02111-1307 USA. */
  89668. + License along with the GNU C Library; if not, see
  89669. + <http://www.gnu.org/licenses/>. */
  89670. #include "thread_dbP.h"
  89671. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_setgregs.c uClibc-git/libpthread/linuxthreads.old_db/td_thr_setgregs.c
  89672. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_setgregs.c 2012-05-15 09:20:09.000000000 +0200
  89673. +++ uClibc-git/libpthread/linuxthreads.old_db/td_thr_setgregs.c 2014-07-25 20:36:08.153341741 +0200
  89674. @@ -14,9 +14,8 @@
  89675. Lesser General Public License for more details.
  89676. You should have received a copy of the GNU Lesser General Public
  89677. - License along with the GNU C Library; if not, write to the Free
  89678. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89679. - 02111-1307 USA. */
  89680. + License along with the GNU C Library; if not, see
  89681. + <http://www.gnu.org/licenses/>. */
  89682. #include "thread_dbP.h"
  89683. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_setprio.c uClibc-git/libpthread/linuxthreads.old_db/td_thr_setprio.c
  89684. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_setprio.c 2012-05-15 09:20:09.000000000 +0200
  89685. +++ uClibc-git/libpthread/linuxthreads.old_db/td_thr_setprio.c 2014-07-25 20:36:08.153341741 +0200
  89686. @@ -14,9 +14,8 @@
  89687. Lesser General Public License for more details.
  89688. You should have received a copy of the GNU Lesser General Public
  89689. - License along with the GNU C Library; if not, write to the Free
  89690. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89691. - 02111-1307 USA. */
  89692. + License along with the GNU C Library; if not, see
  89693. + <http://www.gnu.org/licenses/>. */
  89694. #include "thread_dbP.h"
  89695. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_setsigpending.c uClibc-git/libpthread/linuxthreads.old_db/td_thr_setsigpending.c
  89696. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_setsigpending.c 2012-05-15 09:20:09.000000000 +0200
  89697. +++ uClibc-git/libpthread/linuxthreads.old_db/td_thr_setsigpending.c 2014-07-25 20:36:08.153341741 +0200
  89698. @@ -14,9 +14,8 @@
  89699. Lesser General Public License for more details.
  89700. You should have received a copy of the GNU Lesser General Public
  89701. - License along with the GNU C Library; if not, write to the Free
  89702. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89703. - 02111-1307 USA. */
  89704. + License along with the GNU C Library; if not, see
  89705. + <http://www.gnu.org/licenses/>. */
  89706. #include "thread_dbP.h"
  89707. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_setxregs.c uClibc-git/libpthread/linuxthreads.old_db/td_thr_setxregs.c
  89708. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_setxregs.c 2012-05-15 09:20:09.000000000 +0200
  89709. +++ uClibc-git/libpthread/linuxthreads.old_db/td_thr_setxregs.c 2014-07-25 20:36:08.153341741 +0200
  89710. @@ -14,9 +14,8 @@
  89711. Lesser General Public License for more details.
  89712. You should have received a copy of the GNU Lesser General Public
  89713. - License along with the GNU C Library; if not, write to the Free
  89714. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89715. - 02111-1307 USA. */
  89716. + License along with the GNU C Library; if not, see
  89717. + <http://www.gnu.org/licenses/>. */
  89718. #include "thread_dbP.h"
  89719. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_sigsetmask.c uClibc-git/libpthread/linuxthreads.old_db/td_thr_sigsetmask.c
  89720. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_sigsetmask.c 2012-05-15 09:20:09.000000000 +0200
  89721. +++ uClibc-git/libpthread/linuxthreads.old_db/td_thr_sigsetmask.c 2014-07-25 20:36:08.153341741 +0200
  89722. @@ -14,9 +14,8 @@
  89723. Lesser General Public License for more details.
  89724. You should have received a copy of the GNU Lesser General Public
  89725. - License along with the GNU C Library; if not, write to the Free
  89726. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89727. - 02111-1307 USA. */
  89728. + License along with the GNU C Library; if not, see
  89729. + <http://www.gnu.org/licenses/>. */
  89730. #include "thread_dbP.h"
  89731. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c uClibc-git/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c
  89732. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c 2012-05-15 09:20:09.000000000 +0200
  89733. +++ uClibc-git/libpthread/linuxthreads.old_db/td_thr_tls_get_addr.c 2014-07-25 20:36:08.153341741 +0200
  89734. @@ -14,9 +14,8 @@
  89735. Lesser General Public License for more details.
  89736. You should have received a copy of the GNU Lesser General Public
  89737. - License along with the GNU C Library; if not, write to the Free
  89738. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89739. - 02111-1307 USA. */
  89740. + License along with the GNU C Library; if not, see
  89741. + <http://www.gnu.org/licenses/>. */
  89742. #include <link.h>
  89743. #include "thread_dbP.h"
  89744. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_tsd.c uClibc-git/libpthread/linuxthreads.old_db/td_thr_tsd.c
  89745. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_tsd.c 2012-05-15 09:20:09.000000000 +0200
  89746. +++ uClibc-git/libpthread/linuxthreads.old_db/td_thr_tsd.c 2014-07-25 20:36:08.153341741 +0200
  89747. @@ -14,9 +14,8 @@
  89748. Lesser General Public License for more details.
  89749. You should have received a copy of the GNU Lesser General Public
  89750. - License along with the GNU C Library; if not, write to the Free
  89751. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89752. - 02111-1307 USA. */
  89753. + License along with the GNU C Library; if not, see
  89754. + <http://www.gnu.org/licenses/>. */
  89755. #include "thread_dbP.h"
  89756. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_validate.c uClibc-git/libpthread/linuxthreads.old_db/td_thr_validate.c
  89757. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/td_thr_validate.c 2012-05-15 09:20:09.000000000 +0200
  89758. +++ uClibc-git/libpthread/linuxthreads.old_db/td_thr_validate.c 2014-07-25 20:36:08.153341741 +0200
  89759. @@ -14,9 +14,8 @@
  89760. Lesser General Public License for more details.
  89761. You should have received a copy of the GNU Lesser General Public
  89762. - License along with the GNU C Library; if not, write to the Free
  89763. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89764. - 02111-1307 USA. */
  89765. + License along with the GNU C Library; if not, see
  89766. + <http://www.gnu.org/licenses/>. */
  89767. #include "thread_dbP.h"
  89768. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/thread_db.h uClibc-git/libpthread/linuxthreads.old_db/thread_db.h
  89769. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/thread_db.h 2012-05-15 09:20:09.000000000 +0200
  89770. +++ uClibc-git/libpthread/linuxthreads.old_db/thread_db.h 2014-07-25 20:36:08.153341741 +0200
  89771. @@ -13,9 +13,8 @@
  89772. Lesser General Public License for more details.
  89773. You should have received a copy of the GNU Lesser General Public
  89774. - License along with the GNU C Library; if not, write to the Free
  89775. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89776. - 02111-1307 USA. */
  89777. + License along with the GNU C Library; if not, see
  89778. + <http://www.gnu.org/licenses/>. */
  89779. #ifndef _THREAD_DB_H
  89780. #define _THREAD_DB_H 1
  89781. diff -Nur uClibc-0.9.33.2/libpthread/linuxthreads.old_db/thread_dbP.h uClibc-git/libpthread/linuxthreads.old_db/thread_dbP.h
  89782. --- uClibc-0.9.33.2/libpthread/linuxthreads.old_db/thread_dbP.h 2012-05-15 09:20:09.000000000 +0200
  89783. +++ uClibc-git/libpthread/linuxthreads.old_db/thread_dbP.h 2014-07-25 20:36:08.153341741 +0200
  89784. @@ -2,8 +2,6 @@
  89785. #ifndef _THREAD_DBP_H
  89786. #define _THREAD_DBP_H 1
  89787. -#define __FORCE_GLIBC
  89788. -#include <features.h>
  89789. #include <string.h>
  89790. #include <unistd.h>
  89791. #include "proc_service.h"
  89792. diff -Nur uClibc-0.9.33.2/libpthread/nptl/alloca_cutoff.c uClibc-git/libpthread/nptl/alloca_cutoff.c
  89793. --- uClibc-0.9.33.2/libpthread/nptl/alloca_cutoff.c 2012-05-15 09:20:09.000000000 +0200
  89794. +++ uClibc-git/libpthread/nptl/alloca_cutoff.c 2014-07-25 20:36:08.865345471 +0200
  89795. @@ -13,9 +13,8 @@
  89796. Lesser General Public License for more details.
  89797. You should have received a copy of the GNU Lesser General Public
  89798. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  89799. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  89800. - Boston, MA 02111-1307, USA. */
  89801. + License along with the GNU C Library; see the file COPYING.LIB. If
  89802. + not, see <http://www.gnu.org/licenses/>. */
  89803. #include <alloca.h>
  89804. #include <stdlib.h>
  89805. diff -Nur uClibc-0.9.33.2/libpthread/nptl/allocatestack.c uClibc-git/libpthread/nptl/allocatestack.c
  89806. --- uClibc-0.9.33.2/libpthread/nptl/allocatestack.c 2012-05-15 09:20:09.000000000 +0200
  89807. +++ uClibc-git/libpthread/nptl/allocatestack.c 2014-07-25 20:36:08.865345471 +0200
  89808. @@ -13,9 +13,8 @@
  89809. Lesser General Public License for more details.
  89810. You should have received a copy of the GNU Lesser General Public
  89811. - License along with the GNU C Library; if not, write to the Free
  89812. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89813. - 02111-1307 USA. */
  89814. + License along with the GNU C Library; if not, see
  89815. + <http://www.gnu.org/licenses/>. */
  89816. #include <assert.h>
  89817. #include <errno.h>
  89818. @@ -646,7 +645,7 @@
  89819. prot) != 0)
  89820. goto mprot_error;
  89821. #elif defined _STACK_GROWS_UP
  89822. - if (mprotect ((char *) pd - pd->guardsize,
  89823. + if (mprotect ((char *) (((uintptr_t) pd - pd->guardsize) & ~pagesize_m1),
  89824. pd->guardsize - guardsize, prot) != 0)
  89825. goto mprot_error;
  89826. #endif
  89827. diff -Nur uClibc-0.9.33.2/libpthread/nptl/cancellation.c uClibc-git/libpthread/nptl/cancellation.c
  89828. --- uClibc-0.9.33.2/libpthread/nptl/cancellation.c 2012-05-15 09:20:09.000000000 +0200
  89829. +++ uClibc-git/libpthread/nptl/cancellation.c 2014-07-25 20:36:08.865345471 +0200
  89830. @@ -13,9 +13,8 @@
  89831. Lesser General Public License for more details.
  89832. You should have received a copy of the GNU Lesser General Public
  89833. - License along with the GNU C Library; if not, write to the Free
  89834. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89835. - 02111-1307 USA. */
  89836. + License along with the GNU C Library; if not, see
  89837. + <http://www.gnu.org/licenses/>. */
  89838. #include <setjmp.h>
  89839. #include <stdlib.h>
  89840. diff -Nur uClibc-0.9.33.2/libpthread/nptl/cleanup.c uClibc-git/libpthread/nptl/cleanup.c
  89841. --- uClibc-0.9.33.2/libpthread/nptl/cleanup.c 2012-05-15 09:20:09.000000000 +0200
  89842. +++ uClibc-git/libpthread/nptl/cleanup.c 2014-07-25 20:36:08.865345471 +0200
  89843. @@ -13,9 +13,8 @@
  89844. Lesser General Public License for more details.
  89845. You should have received a copy of the GNU Lesser General Public
  89846. - License along with the GNU C Library; if not, write to the Free
  89847. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89848. - 02111-1307 USA. */
  89849. + License along with the GNU C Library; if not, see
  89850. + <http://www.gnu.org/licenses/>. */
  89851. #include <stdlib.h>
  89852. #include "pthreadP.h"
  89853. diff -Nur uClibc-0.9.33.2/libpthread/nptl/cleanup_compat.c uClibc-git/libpthread/nptl/cleanup_compat.c
  89854. --- uClibc-0.9.33.2/libpthread/nptl/cleanup_compat.c 2012-05-15 09:20:09.000000000 +0200
  89855. +++ uClibc-git/libpthread/nptl/cleanup_compat.c 2014-07-25 20:36:08.865345471 +0200
  89856. @@ -13,9 +13,8 @@
  89857. Lesser General Public License for more details.
  89858. You should have received a copy of the GNU Lesser General Public
  89859. - License along with the GNU C Library; if not, write to the Free
  89860. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89861. - 02111-1307 USA. */
  89862. + License along with the GNU C Library; if not, see
  89863. + <http://www.gnu.org/licenses/>. */
  89864. #include <stdlib.h>
  89865. #include "pthreadP.h"
  89866. diff -Nur uClibc-0.9.33.2/libpthread/nptl/cleanup_defer.c uClibc-git/libpthread/nptl/cleanup_defer.c
  89867. --- uClibc-0.9.33.2/libpthread/nptl/cleanup_defer.c 2012-05-15 09:20:09.000000000 +0200
  89868. +++ uClibc-git/libpthread/nptl/cleanup_defer.c 2014-07-25 20:36:08.865345471 +0200
  89869. @@ -13,9 +13,8 @@
  89870. Lesser General Public License for more details.
  89871. You should have received a copy of the GNU Lesser General Public
  89872. - License along with the GNU C Library; if not, write to the Free
  89873. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89874. - 02111-1307 USA. */
  89875. + License along with the GNU C Library; if not, see
  89876. + <http://www.gnu.org/licenses/>. */
  89877. #include <stdlib.h>
  89878. #include "pthreadP.h"
  89879. diff -Nur uClibc-0.9.33.2/libpthread/nptl/cleanup_defer_compat.c uClibc-git/libpthread/nptl/cleanup_defer_compat.c
  89880. --- uClibc-0.9.33.2/libpthread/nptl/cleanup_defer_compat.c 2012-05-15 09:20:09.000000000 +0200
  89881. +++ uClibc-git/libpthread/nptl/cleanup_defer_compat.c 2014-07-25 20:36:08.865345471 +0200
  89882. @@ -13,9 +13,8 @@
  89883. Lesser General Public License for more details.
  89884. You should have received a copy of the GNU Lesser General Public
  89885. - License along with the GNU C Library; if not, write to the Free
  89886. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89887. - 02111-1307 USA. */
  89888. + License along with the GNU C Library; if not, see
  89889. + <http://www.gnu.org/licenses/>. */
  89890. #include "pthreadP.h"
  89891. diff -Nur uClibc-0.9.33.2/libpthread/nptl/cleanup_routine.c uClibc-git/libpthread/nptl/cleanup_routine.c
  89892. --- uClibc-0.9.33.2/libpthread/nptl/cleanup_routine.c 2012-05-15 09:20:09.000000000 +0200
  89893. +++ uClibc-git/libpthread/nptl/cleanup_routine.c 2014-07-25 20:36:08.865345471 +0200
  89894. @@ -13,13 +13,12 @@
  89895. Lesser General Public License for more details.
  89896. You should have received a copy of the GNU Lesser General Public
  89897. - License along with the GNU C Library; if not, write to the Free
  89898. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89899. - 02111-1307 USA. */
  89900. + License along with the GNU C Library; if not, see
  89901. + <http://www.gnu.org/licenses/>. */
  89902. #include <pthread.h>
  89903. -
  89904. +void __pthread_cleanup_routine (struct __pthread_cleanup_frame *f);
  89905. void
  89906. __pthread_cleanup_routine (struct __pthread_cleanup_frame *f)
  89907. {
  89908. diff -Nur uClibc-0.9.33.2/libpthread/nptl/descr.h uClibc-git/libpthread/nptl/descr.h
  89909. --- uClibc-0.9.33.2/libpthread/nptl/descr.h 2012-05-15 09:20:09.000000000 +0200
  89910. +++ uClibc-git/libpthread/nptl/descr.h 2014-07-25 20:36:08.865345471 +0200
  89911. @@ -13,9 +13,8 @@
  89912. Lesser General Public License for more details.
  89913. You should have received a copy of the GNU Lesser General Public
  89914. - License along with the GNU C Library; if not, write to the Free
  89915. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89916. - 02111-1307 USA. */
  89917. + License along with the GNU C Library; if not, see
  89918. + <http://www.gnu.org/licenses/>. */
  89919. #ifndef _DESCR_H
  89920. #define _DESCR_H 1
  89921. diff -Nur uClibc-0.9.33.2/libpthread/nptl/events.c uClibc-git/libpthread/nptl/events.c
  89922. --- uClibc-0.9.33.2/libpthread/nptl/events.c 2012-05-15 09:20:09.000000000 +0200
  89923. +++ uClibc-git/libpthread/nptl/events.c 2014-07-25 20:36:08.865345471 +0200
  89924. @@ -13,9 +13,8 @@
  89925. Lesser General Public License for more details.
  89926. You should have received a copy of the GNU Lesser General Public
  89927. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  89928. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  89929. - Boston, MA 02111-1307, USA. */
  89930. + License along with the GNU C Library; see the file COPYING.LIB. If
  89931. + not, see <http://www.gnu.org/licenses/>. */
  89932. /* The functions contained here do nothing, they just return. */
  89933. diff -Nur uClibc-0.9.33.2/libpthread/nptl/forward.c uClibc-git/libpthread/nptl/forward.c
  89934. --- uClibc-0.9.33.2/libpthread/nptl/forward.c 2012-05-15 09:20:09.000000000 +0200
  89935. +++ uClibc-git/libpthread/nptl/forward.c 2014-07-25 20:36:08.865345471 +0200
  89936. @@ -13,9 +13,8 @@
  89937. Lesser General Public License for more details.
  89938. You should have received a copy of the GNU Lesser General Public
  89939. - License along with the GNU C Library; if not, write to the Free
  89940. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89941. - 02111-1307 USA. */
  89942. + License along with the GNU C Library; if not, see
  89943. + <http://www.gnu.org/licenses/>. */
  89944. #include <dlfcn.h>
  89945. #include <pthreadP.h>
  89946. diff -Nur uClibc-0.9.33.2/libpthread/nptl/.gitignore uClibc-git/libpthread/nptl/.gitignore
  89947. --- uClibc-0.9.33.2/libpthread/nptl/.gitignore 2012-05-15 09:20:09.000000000 +0200
  89948. +++ uClibc-git/libpthread/nptl/.gitignore 2014-07-25 20:36:08.853345408 +0200
  89949. @@ -26,3 +26,5 @@
  89950. #
  89951. # symlinks
  89952. #
  89953. +sysdeps/pthread/pt-sigfillset.c
  89954. +sysdeps/pthread/pt-sigprocmask.c
  89955. diff -Nur uClibc-0.9.33.2/libpthread/nptl/herrno.c uClibc-git/libpthread/nptl/herrno.c
  89956. --- uClibc-0.9.33.2/libpthread/nptl/herrno.c 2012-05-15 09:20:09.000000000 +0200
  89957. +++ uClibc-git/libpthread/nptl/herrno.c 2014-07-25 20:36:08.865345471 +0200
  89958. @@ -12,9 +12,8 @@
  89959. Lesser General Public License for more details.
  89960. You should have received a copy of the GNU Lesser General Public
  89961. - License along with the GNU C Library; if not, write to the Free
  89962. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89963. - 02111-1307 USA. */
  89964. + License along with the GNU C Library; if not, see
  89965. + <http://www.gnu.org/licenses/>. */
  89966. #include <features.h>
  89967. #include <netdb.h>
  89968. diff -Nur uClibc-0.9.33.2/libpthread/nptl/init.c uClibc-git/libpthread/nptl/init.c
  89969. --- uClibc-0.9.33.2/libpthread/nptl/init.c 2012-05-15 09:20:09.000000000 +0200
  89970. +++ uClibc-git/libpthread/nptl/init.c 2014-07-25 20:36:08.865345471 +0200
  89971. @@ -13,9 +13,8 @@
  89972. Lesser General Public License for more details.
  89973. You should have received a copy of the GNU Lesser General Public
  89974. - License along with the GNU C Library; if not, write to the Free
  89975. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89976. - 02111-1307 USA. */
  89977. + License along with the GNU C Library; if not, see
  89978. + <http://www.gnu.org/licenses/>. */
  89979. #include <assert.h>
  89980. #include <errno.h>
  89981. @@ -35,7 +34,6 @@
  89982. #include <lowlevellock.h>
  89983. #include <bits/kernel-features.h>
  89984. #include <stdio.h>
  89985. -extern __typeof(sigaction) __libc_sigaction;
  89986. /* Size and alignment of static TLS block. */
  89987. size_t __static_tls_size;
  89988. diff -Nur uClibc-0.9.33.2/libpthread/nptl/libc-cancellation.c uClibc-git/libpthread/nptl/libc-cancellation.c
  89989. --- uClibc-0.9.33.2/libpthread/nptl/libc-cancellation.c 2012-05-15 09:20:09.000000000 +0200
  89990. +++ uClibc-git/libpthread/nptl/libc-cancellation.c 2014-07-25 20:36:08.865345471 +0200
  89991. @@ -13,9 +13,8 @@
  89992. Lesser General Public License for more details.
  89993. You should have received a copy of the GNU Lesser General Public
  89994. - License along with the GNU C Library; if not, write to the Free
  89995. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  89996. - 02111-1307 USA. */
  89997. + License along with the GNU C Library; if not, see
  89998. + <http://www.gnu.org/licenses/>. */
  89999. #include "pthreadP.h"
  90000. diff -Nur uClibc-0.9.33.2/libpthread/nptl/linux_fsinfo.h uClibc-git/libpthread/nptl/linux_fsinfo.h
  90001. --- uClibc-0.9.33.2/libpthread/nptl/linux_fsinfo.h 2012-05-15 09:20:09.000000000 +0200
  90002. +++ uClibc-git/libpthread/nptl/linux_fsinfo.h 2014-07-25 20:36:08.865345471 +0200
  90003. @@ -13,9 +13,8 @@
  90004. Lesser General Public License for more details.
  90005. You should have received a copy of the GNU Lesser General Public
  90006. - License along with the GNU C Library; if not, write to the Free
  90007. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90008. - 02111-1307 USA. */
  90009. + License along with the GNU C Library; if not, see
  90010. + <http://www.gnu.org/licenses/>. */
  90011. #ifndef _LINUX_FSINFO_H
  90012. #define _LINUX_FSINFO_H 1
  90013. diff -Nur uClibc-0.9.33.2/libpthread/nptl/Makefile.in uClibc-git/libpthread/nptl/Makefile.in
  90014. --- uClibc-0.9.33.2/libpthread/nptl/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  90015. +++ uClibc-git/libpthread/nptl/Makefile.in 2014-07-25 20:36:08.865345471 +0200
  90016. @@ -145,7 +145,7 @@
  90017. endif
  90018. LDFLAGS-libpthread.so += $(top_builddir)lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so $(top_builddir)lib/libdl-$(VERSION).so \
  90019. - -Wl,-z,nodelete,-z,initfirst,-init=__pthread_initialize_minimal_internal
  90020. + -Wl,-z,nodelete,-z,initfirst,-init=$(SYMBOL_PREFIX)__pthread_initialize_minimal_internal
  90021. LIBS-libpthread.so := $(LIBS)
  90022. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pt-cleanup.c uClibc-git/libpthread/nptl/pt-cleanup.c
  90023. --- uClibc-0.9.33.2/libpthread/nptl/pt-cleanup.c 2012-05-15 09:20:09.000000000 +0200
  90024. +++ uClibc-git/libpthread/nptl/pt-cleanup.c 2014-07-25 20:36:08.865345471 +0200
  90025. @@ -13,9 +13,8 @@
  90026. Lesser General Public License for more details.
  90027. You should have received a copy of the GNU Lesser General Public
  90028. - License along with the GNU C Library; if not, write to the Free
  90029. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90030. - 02111-1307 USA. */
  90031. + License along with the GNU C Library; if not, see
  90032. + <http://www.gnu.org/licenses/>. */
  90033. #include <setjmp.h>
  90034. #include <stdlib.h>
  90035. @@ -23,7 +22,7 @@
  90036. #include <jmpbuf-unwind.h>
  90037. void
  90038. -attribute_protected
  90039. +/*does not apply due to hidden_proto(): attribute_protected*/
  90040. __pthread_cleanup_upto (__jmp_buf target, char *targetframe)
  90041. {
  90042. struct pthread *self = THREAD_SELF;
  90043. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_atfork.c uClibc-git/libpthread/nptl/pthread_atfork.c
  90044. --- uClibc-0.9.33.2/libpthread/nptl/pthread_atfork.c 2012-05-15 09:20:09.000000000 +0200
  90045. +++ uClibc-git/libpthread/nptl/pthread_atfork.c 2014-07-25 20:36:08.865345471 +0200
  90046. @@ -30,9 +30,8 @@
  90047. Lesser General Public License for more details.
  90048. You should have received a copy of the GNU Lesser General Public
  90049. - License along with the GNU C Library; if not, write to the Free
  90050. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90051. - 02111-1307 USA. */
  90052. + License along with the GNU C Library; if not, see
  90053. + <http://www.gnu.org/licenses/>. */
  90054. #include "pthreadP.h"
  90055. #include <fork.h>
  90056. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_destroy.c uClibc-git/libpthread/nptl/pthread_attr_destroy.c
  90057. --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_destroy.c 2012-05-15 09:20:09.000000000 +0200
  90058. +++ uClibc-git/libpthread/nptl/pthread_attr_destroy.c 2014-07-25 20:36:08.865345471 +0200
  90059. @@ -13,9 +13,8 @@
  90060. Lesser General Public License for more details.
  90061. You should have received a copy of the GNU Lesser General Public
  90062. - License along with the GNU C Library; if not, write to the Free
  90063. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90064. - 02111-1307 USA. */
  90065. + License along with the GNU C Library; if not, see
  90066. + <http://www.gnu.org/licenses/>. */
  90067. #include <assert.h>
  90068. #include <errno.h>
  90069. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getdetachstate.c uClibc-git/libpthread/nptl/pthread_attr_getdetachstate.c
  90070. --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getdetachstate.c 2012-05-15 09:20:09.000000000 +0200
  90071. +++ uClibc-git/libpthread/nptl/pthread_attr_getdetachstate.c 2014-07-25 20:36:08.865345471 +0200
  90072. @@ -13,9 +13,8 @@
  90073. Lesser General Public License for more details.
  90074. You should have received a copy of the GNU Lesser General Public
  90075. - License along with the GNU C Library; if not, write to the Free
  90076. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90077. - 02111-1307 USA. */
  90078. + License along with the GNU C Library; if not, see
  90079. + <http://www.gnu.org/licenses/>. */
  90080. #include <assert.h>
  90081. #include "pthreadP.h"
  90082. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getguardsize.c uClibc-git/libpthread/nptl/pthread_attr_getguardsize.c
  90083. --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getguardsize.c 2012-05-15 09:20:09.000000000 +0200
  90084. +++ uClibc-git/libpthread/nptl/pthread_attr_getguardsize.c 2014-07-25 20:36:08.865345471 +0200
  90085. @@ -13,9 +13,8 @@
  90086. Lesser General Public License for more details.
  90087. You should have received a copy of the GNU Lesser General Public
  90088. - License along with the GNU C Library; if not, write to the Free
  90089. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90090. - 02111-1307 USA. */
  90091. + License along with the GNU C Library; if not, see
  90092. + <http://www.gnu.org/licenses/>. */
  90093. #include <assert.h>
  90094. #include "pthreadP.h"
  90095. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getinheritsched.c uClibc-git/libpthread/nptl/pthread_attr_getinheritsched.c
  90096. --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getinheritsched.c 2012-05-15 09:20:09.000000000 +0200
  90097. +++ uClibc-git/libpthread/nptl/pthread_attr_getinheritsched.c 2014-07-25 20:36:08.865345471 +0200
  90098. @@ -13,9 +13,8 @@
  90099. Lesser General Public License for more details.
  90100. You should have received a copy of the GNU Lesser General Public
  90101. - License along with the GNU C Library; if not, write to the Free
  90102. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90103. - 02111-1307 USA. */
  90104. + License along with the GNU C Library; if not, see
  90105. + <http://www.gnu.org/licenses/>. */
  90106. #include <assert.h>
  90107. #include "pthreadP.h"
  90108. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getschedparam.c uClibc-git/libpthread/nptl/pthread_attr_getschedparam.c
  90109. --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getschedparam.c 2012-05-15 09:20:09.000000000 +0200
  90110. +++ uClibc-git/libpthread/nptl/pthread_attr_getschedparam.c 2014-07-25 20:36:08.865345471 +0200
  90111. @@ -13,9 +13,8 @@
  90112. Lesser General Public License for more details.
  90113. You should have received a copy of the GNU Lesser General Public
  90114. - License along with the GNU C Library; if not, write to the Free
  90115. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90116. - 02111-1307 USA. */
  90117. + License along with the GNU C Library; if not, see
  90118. + <http://www.gnu.org/licenses/>. */
  90119. #include <assert.h>
  90120. #include <string.h>
  90121. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getschedpolicy.c uClibc-git/libpthread/nptl/pthread_attr_getschedpolicy.c
  90122. --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getschedpolicy.c 2012-05-15 09:20:09.000000000 +0200
  90123. +++ uClibc-git/libpthread/nptl/pthread_attr_getschedpolicy.c 2014-07-25 20:36:08.865345471 +0200
  90124. @@ -13,9 +13,8 @@
  90125. Lesser General Public License for more details.
  90126. You should have received a copy of the GNU Lesser General Public
  90127. - License along with the GNU C Library; if not, write to the Free
  90128. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90129. - 02111-1307 USA. */
  90130. + License along with the GNU C Library; if not, see
  90131. + <http://www.gnu.org/licenses/>. */
  90132. #include <assert.h>
  90133. #include "pthreadP.h"
  90134. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getscope.c uClibc-git/libpthread/nptl/pthread_attr_getscope.c
  90135. --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getscope.c 2012-05-15 09:20:09.000000000 +0200
  90136. +++ uClibc-git/libpthread/nptl/pthread_attr_getscope.c 2014-07-25 20:36:08.865345471 +0200
  90137. @@ -13,9 +13,8 @@
  90138. Lesser General Public License for more details.
  90139. You should have received a copy of the GNU Lesser General Public
  90140. - License along with the GNU C Library; if not, write to the Free
  90141. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90142. - 02111-1307 USA. */
  90143. + License along with the GNU C Library; if not, see
  90144. + <http://www.gnu.org/licenses/>. */
  90145. #include <assert.h>
  90146. #include "pthreadP.h"
  90147. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getstackaddr.c uClibc-git/libpthread/nptl/pthread_attr_getstackaddr.c
  90148. --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getstackaddr.c 2012-05-15 09:20:09.000000000 +0200
  90149. +++ uClibc-git/libpthread/nptl/pthread_attr_getstackaddr.c 2014-07-25 20:36:08.865345471 +0200
  90150. @@ -13,9 +13,8 @@
  90151. Lesser General Public License for more details.
  90152. You should have received a copy of the GNU Lesser General Public
  90153. - License along with the GNU C Library; if not, write to the Free
  90154. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90155. - 02111-1307 USA. */
  90156. + License along with the GNU C Library; if not, see
  90157. + <http://www.gnu.org/licenses/>. */
  90158. #include <assert.h>
  90159. #include <errno.h>
  90160. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getstack.c uClibc-git/libpthread/nptl/pthread_attr_getstack.c
  90161. --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getstack.c 2012-05-15 09:20:09.000000000 +0200
  90162. +++ uClibc-git/libpthread/nptl/pthread_attr_getstack.c 2014-07-25 20:36:08.865345471 +0200
  90163. @@ -13,9 +13,8 @@
  90164. Lesser General Public License for more details.
  90165. You should have received a copy of the GNU Lesser General Public
  90166. - License along with the GNU C Library; if not, write to the Free
  90167. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90168. - 02111-1307 USA. */
  90169. + License along with the GNU C Library; if not, see
  90170. + <http://www.gnu.org/licenses/>. */
  90171. #include <assert.h>
  90172. #include "pthreadP.h"
  90173. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getstacksize.c uClibc-git/libpthread/nptl/pthread_attr_getstacksize.c
  90174. --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_getstacksize.c 2012-05-15 09:20:09.000000000 +0200
  90175. +++ uClibc-git/libpthread/nptl/pthread_attr_getstacksize.c 2014-07-25 20:36:08.865345471 +0200
  90176. @@ -13,9 +13,8 @@
  90177. Lesser General Public License for more details.
  90178. You should have received a copy of the GNU Lesser General Public
  90179. - License along with the GNU C Library; if not, write to the Free
  90180. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90181. - 02111-1307 USA. */
  90182. + License along with the GNU C Library; if not, see
  90183. + <http://www.gnu.org/licenses/>. */
  90184. #include <assert.h>
  90185. #include "pthreadP.h"
  90186. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_init.c uClibc-git/libpthread/nptl/pthread_attr_init.c
  90187. --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_init.c 2012-05-15 09:20:09.000000000 +0200
  90188. +++ uClibc-git/libpthread/nptl/pthread_attr_init.c 2014-07-25 20:36:08.865345471 +0200
  90189. @@ -13,9 +13,8 @@
  90190. Lesser General Public License for more details.
  90191. You should have received a copy of the GNU Lesser General Public
  90192. - License along with the GNU C Library; if not, write to the Free
  90193. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90194. - 02111-1307 USA. */
  90195. + License along with the GNU C Library; if not, see
  90196. + <http://www.gnu.org/licenses/>. */
  90197. #include <assert.h>
  90198. #include <errno.h>
  90199. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setdetachstate.c uClibc-git/libpthread/nptl/pthread_attr_setdetachstate.c
  90200. --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setdetachstate.c 2012-05-15 09:20:09.000000000 +0200
  90201. +++ uClibc-git/libpthread/nptl/pthread_attr_setdetachstate.c 2014-07-25 20:36:08.865345471 +0200
  90202. @@ -13,9 +13,8 @@
  90203. Lesser General Public License for more details.
  90204. You should have received a copy of the GNU Lesser General Public
  90205. - License along with the GNU C Library; if not, write to the Free
  90206. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90207. - 02111-1307 USA. */
  90208. + License along with the GNU C Library; if not, see
  90209. + <http://www.gnu.org/licenses/>. */
  90210. #include <assert.h>
  90211. #include <errno.h>
  90212. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setguardsize.c uClibc-git/libpthread/nptl/pthread_attr_setguardsize.c
  90213. --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setguardsize.c 2012-05-15 09:20:09.000000000 +0200
  90214. +++ uClibc-git/libpthread/nptl/pthread_attr_setguardsize.c 2014-07-25 20:36:08.865345471 +0200
  90215. @@ -13,9 +13,8 @@
  90216. Lesser General Public License for more details.
  90217. You should have received a copy of the GNU Lesser General Public
  90218. - License along with the GNU C Library; if not, write to the Free
  90219. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90220. - 02111-1307 USA. */
  90221. + License along with the GNU C Library; if not, see
  90222. + <http://www.gnu.org/licenses/>. */
  90223. #include <assert.h>
  90224. #include "pthreadP.h"
  90225. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setinheritsched.c uClibc-git/libpthread/nptl/pthread_attr_setinheritsched.c
  90226. --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setinheritsched.c 2012-05-15 09:20:09.000000000 +0200
  90227. +++ uClibc-git/libpthread/nptl/pthread_attr_setinheritsched.c 2014-07-25 20:36:08.865345471 +0200
  90228. @@ -13,9 +13,8 @@
  90229. Lesser General Public License for more details.
  90230. You should have received a copy of the GNU Lesser General Public
  90231. - License along with the GNU C Library; if not, write to the Free
  90232. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90233. - 02111-1307 USA. */
  90234. + License along with the GNU C Library; if not, see
  90235. + <http://www.gnu.org/licenses/>. */
  90236. #include <assert.h>
  90237. #include <errno.h>
  90238. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setschedparam.c uClibc-git/libpthread/nptl/pthread_attr_setschedparam.c
  90239. --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setschedparam.c 2012-05-15 09:20:09.000000000 +0200
  90240. +++ uClibc-git/libpthread/nptl/pthread_attr_setschedparam.c 2014-07-25 20:36:08.865345471 +0200
  90241. @@ -13,9 +13,8 @@
  90242. Lesser General Public License for more details.
  90243. You should have received a copy of the GNU Lesser General Public
  90244. - License along with the GNU C Library; if not, write to the Free
  90245. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90246. - 02111-1307 USA. */
  90247. + License along with the GNU C Library; if not, see
  90248. + <http://www.gnu.org/licenses/>. */
  90249. #include <assert.h>
  90250. #include <errno.h>
  90251. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setschedpolicy.c uClibc-git/libpthread/nptl/pthread_attr_setschedpolicy.c
  90252. --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setschedpolicy.c 2012-05-15 09:20:09.000000000 +0200
  90253. +++ uClibc-git/libpthread/nptl/pthread_attr_setschedpolicy.c 2014-07-25 20:36:08.865345471 +0200
  90254. @@ -13,9 +13,8 @@
  90255. Lesser General Public License for more details.
  90256. You should have received a copy of the GNU Lesser General Public
  90257. - License along with the GNU C Library; if not, write to the Free
  90258. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90259. - 02111-1307 USA. */
  90260. + License along with the GNU C Library; if not, see
  90261. + <http://www.gnu.org/licenses/>. */
  90262. #include <assert.h>
  90263. #include <errno.h>
  90264. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setscope.c uClibc-git/libpthread/nptl/pthread_attr_setscope.c
  90265. --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setscope.c 2012-05-15 09:20:09.000000000 +0200
  90266. +++ uClibc-git/libpthread/nptl/pthread_attr_setscope.c 2014-07-25 20:36:08.865345471 +0200
  90267. @@ -13,9 +13,8 @@
  90268. Lesser General Public License for more details.
  90269. You should have received a copy of the GNU Lesser General Public
  90270. - License along with the GNU C Library; if not, write to the Free
  90271. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90272. - 02111-1307 USA. */
  90273. + License along with the GNU C Library; if not, see
  90274. + <http://www.gnu.org/licenses/>. */
  90275. #include <assert.h>
  90276. #include <errno.h>
  90277. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setstackaddr.c uClibc-git/libpthread/nptl/pthread_attr_setstackaddr.c
  90278. --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setstackaddr.c 2012-05-15 09:20:09.000000000 +0200
  90279. +++ uClibc-git/libpthread/nptl/pthread_attr_setstackaddr.c 2014-07-25 20:36:08.865345471 +0200
  90280. @@ -13,9 +13,8 @@
  90281. Lesser General Public License for more details.
  90282. You should have received a copy of the GNU Lesser General Public
  90283. - License along with the GNU C Library; if not, write to the Free
  90284. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90285. - 02111-1307 USA. */
  90286. + License along with the GNU C Library; if not, see
  90287. + <http://www.gnu.org/licenses/>. */
  90288. #include <assert.h>
  90289. #include <errno.h>
  90290. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setstack.c uClibc-git/libpthread/nptl/pthread_attr_setstack.c
  90291. --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setstack.c 2012-05-15 09:20:09.000000000 +0200
  90292. +++ uClibc-git/libpthread/nptl/pthread_attr_setstack.c 2014-07-25 20:36:08.865345471 +0200
  90293. @@ -13,9 +13,8 @@
  90294. Lesser General Public License for more details.
  90295. You should have received a copy of the GNU Lesser General Public
  90296. - License along with the GNU C Library; if not, write to the Free
  90297. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90298. - 02111-1307 USA. */
  90299. + License along with the GNU C Library; if not, see
  90300. + <http://www.gnu.org/licenses/>. */
  90301. #include <assert.h>
  90302. #include <errno.h>
  90303. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setstacksize.c uClibc-git/libpthread/nptl/pthread_attr_setstacksize.c
  90304. --- uClibc-0.9.33.2/libpthread/nptl/pthread_attr_setstacksize.c 2012-05-15 09:20:09.000000000 +0200
  90305. +++ uClibc-git/libpthread/nptl/pthread_attr_setstacksize.c 2014-07-25 20:36:08.865345471 +0200
  90306. @@ -13,9 +13,8 @@
  90307. Lesser General Public License for more details.
  90308. You should have received a copy of the GNU Lesser General Public
  90309. - License along with the GNU C Library; if not, write to the Free
  90310. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90311. - 02111-1307 USA. */
  90312. + License along with the GNU C Library; if not, see
  90313. + <http://www.gnu.org/licenses/>. */
  90314. #include <assert.h>
  90315. #include <errno.h>
  90316. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_barrierattr_destroy.c uClibc-git/libpthread/nptl/pthread_barrierattr_destroy.c
  90317. --- uClibc-0.9.33.2/libpthread/nptl/pthread_barrierattr_destroy.c 2012-05-15 09:20:09.000000000 +0200
  90318. +++ uClibc-git/libpthread/nptl/pthread_barrierattr_destroy.c 2014-07-25 20:36:08.865345471 +0200
  90319. @@ -13,9 +13,8 @@
  90320. Lesser General Public License for more details.
  90321. You should have received a copy of the GNU Lesser General Public
  90322. - License along with the GNU C Library; if not, write to the Free
  90323. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90324. - 02111-1307 USA. */
  90325. + License along with the GNU C Library; if not, see
  90326. + <http://www.gnu.org/licenses/>. */
  90327. #include "pthreadP.h"
  90328. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_barrierattr_getpshared.c uClibc-git/libpthread/nptl/pthread_barrierattr_getpshared.c
  90329. --- uClibc-0.9.33.2/libpthread/nptl/pthread_barrierattr_getpshared.c 2012-05-15 09:20:09.000000000 +0200
  90330. +++ uClibc-git/libpthread/nptl/pthread_barrierattr_getpshared.c 2014-07-25 20:36:08.865345471 +0200
  90331. @@ -13,9 +13,8 @@
  90332. Lesser General Public License for more details.
  90333. You should have received a copy of the GNU Lesser General Public
  90334. - License along with the GNU C Library; if not, write to the Free
  90335. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90336. - 02111-1307 USA. */
  90337. + License along with the GNU C Library; if not, see
  90338. + <http://www.gnu.org/licenses/>. */
  90339. #include "pthreadP.h"
  90340. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_barrierattr_init.c uClibc-git/libpthread/nptl/pthread_barrierattr_init.c
  90341. --- uClibc-0.9.33.2/libpthread/nptl/pthread_barrierattr_init.c 2012-05-15 09:20:09.000000000 +0200
  90342. +++ uClibc-git/libpthread/nptl/pthread_barrierattr_init.c 2014-07-25 20:36:08.865345471 +0200
  90343. @@ -13,9 +13,8 @@
  90344. Lesser General Public License for more details.
  90345. You should have received a copy of the GNU Lesser General Public
  90346. - License along with the GNU C Library; if not, write to the Free
  90347. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90348. - 02111-1307 USA. */
  90349. + License along with the GNU C Library; if not, see
  90350. + <http://www.gnu.org/licenses/>. */
  90351. #include "pthreadP.h"
  90352. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_barrierattr_setpshared.c uClibc-git/libpthread/nptl/pthread_barrierattr_setpshared.c
  90353. --- uClibc-0.9.33.2/libpthread/nptl/pthread_barrierattr_setpshared.c 2012-05-15 09:20:09.000000000 +0200
  90354. +++ uClibc-git/libpthread/nptl/pthread_barrierattr_setpshared.c 2014-07-25 20:36:08.865345471 +0200
  90355. @@ -13,9 +13,8 @@
  90356. Lesser General Public License for more details.
  90357. You should have received a copy of the GNU Lesser General Public
  90358. - License along with the GNU C Library; if not, write to the Free
  90359. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90360. - 02111-1307 USA. */
  90361. + License along with the GNU C Library; if not, see
  90362. + <http://www.gnu.org/licenses/>. */
  90363. #include <errno.h>
  90364. #include "pthreadP.h"
  90365. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_cancel.c uClibc-git/libpthread/nptl/pthread_cancel.c
  90366. --- uClibc-0.9.33.2/libpthread/nptl/pthread_cancel.c 2012-05-15 09:20:09.000000000 +0200
  90367. +++ uClibc-git/libpthread/nptl/pthread_cancel.c 2014-07-25 20:36:08.865345471 +0200
  90368. @@ -13,9 +13,8 @@
  90369. Lesser General Public License for more details.
  90370. You should have received a copy of the GNU Lesser General Public
  90371. - License along with the GNU C Library; if not, write to the Free
  90372. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90373. - 02111-1307 USA. */
  90374. + License along with the GNU C Library; if not, see
  90375. + <http://www.gnu.org/licenses/>. */
  90376. #include <errno.h>
  90377. #include <signal.h>
  90378. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_clock_gettime.c uClibc-git/libpthread/nptl/pthread_clock_gettime.c
  90379. --- uClibc-0.9.33.2/libpthread/nptl/pthread_clock_gettime.c 2012-05-15 09:20:09.000000000 +0200
  90380. +++ uClibc-git/libpthread/nptl/pthread_clock_gettime.c 2014-07-25 20:36:08.865345471 +0200
  90381. @@ -12,14 +12,12 @@
  90382. Lesser General Public License for more details.
  90383. You should have received a copy of the GNU Lesser General Public
  90384. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  90385. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  90386. - Boston, MA 02111-1307, USA. */
  90387. + License along with the GNU C Library; see the file COPYING.LIB. If
  90388. + not, see <http://www.gnu.org/licenses/>. */
  90389. #include <errno.h>
  90390. #include <stdlib.h>
  90391. #include <time.h>
  90392. -#include <libc-internal.h>
  90393. #include "pthreadP.h"
  90394. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_clock_settime.c uClibc-git/libpthread/nptl/pthread_clock_settime.c
  90395. --- uClibc-0.9.33.2/libpthread/nptl/pthread_clock_settime.c 2012-05-15 09:20:09.000000000 +0200
  90396. +++ uClibc-git/libpthread/nptl/pthread_clock_settime.c 2014-07-25 20:36:08.865345471 +0200
  90397. @@ -12,14 +12,12 @@
  90398. Lesser General Public License for more details.
  90399. You should have received a copy of the GNU Lesser General Public
  90400. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  90401. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  90402. - Boston, MA 02111-1307, USA. */
  90403. + License along with the GNU C Library; see the file COPYING.LIB. If
  90404. + not, see <http://www.gnu.org/licenses/>. */
  90405. #include <errno.h>
  90406. #include <stdlib.h>
  90407. #include <time.h>
  90408. -#include <libc-internal.h>
  90409. #include "pthreadP.h"
  90410. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_destroy.c uClibc-git/libpthread/nptl/pthread_condattr_destroy.c
  90411. --- uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_destroy.c 2012-05-15 09:20:09.000000000 +0200
  90412. +++ uClibc-git/libpthread/nptl/pthread_condattr_destroy.c 2014-07-25 20:36:08.865345471 +0200
  90413. @@ -13,9 +13,8 @@
  90414. Lesser General Public License for more details.
  90415. You should have received a copy of the GNU Lesser General Public
  90416. - License along with the GNU C Library; if not, write to the Free
  90417. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90418. - 02111-1307 USA. */
  90419. + License along with the GNU C Library; if not, see
  90420. + <http://www.gnu.org/licenses/>. */
  90421. #include "pthreadP.h"
  90422. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_getclock.c uClibc-git/libpthread/nptl/pthread_condattr_getclock.c
  90423. --- uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_getclock.c 2012-05-15 09:20:09.000000000 +0200
  90424. +++ uClibc-git/libpthread/nptl/pthread_condattr_getclock.c 2014-07-25 20:36:08.865345471 +0200
  90425. @@ -13,9 +13,8 @@
  90426. Lesser General Public License for more details.
  90427. You should have received a copy of the GNU Lesser General Public
  90428. - License along with the GNU C Library; if not, write to the Free
  90429. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90430. - 02111-1307 USA. */
  90431. + License along with the GNU C Library; if not, see
  90432. + <http://www.gnu.org/licenses/>. */
  90433. #include "pthreadP.h"
  90434. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_getpshared.c uClibc-git/libpthread/nptl/pthread_condattr_getpshared.c
  90435. --- uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_getpshared.c 2012-05-15 09:20:09.000000000 +0200
  90436. +++ uClibc-git/libpthread/nptl/pthread_condattr_getpshared.c 2014-07-25 20:36:08.865345471 +0200
  90437. @@ -13,9 +13,8 @@
  90438. Lesser General Public License for more details.
  90439. You should have received a copy of the GNU Lesser General Public
  90440. - License along with the GNU C Library; if not, write to the Free
  90441. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90442. - 02111-1307 USA. */
  90443. + License along with the GNU C Library; if not, see
  90444. + <http://www.gnu.org/licenses/>. */
  90445. #include "pthreadP.h"
  90446. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_init.c uClibc-git/libpthread/nptl/pthread_condattr_init.c
  90447. --- uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_init.c 2012-05-15 09:20:09.000000000 +0200
  90448. +++ uClibc-git/libpthread/nptl/pthread_condattr_init.c 2014-07-25 20:36:08.865345471 +0200
  90449. @@ -13,9 +13,8 @@
  90450. Lesser General Public License for more details.
  90451. You should have received a copy of the GNU Lesser General Public
  90452. - License along with the GNU C Library; if not, write to the Free
  90453. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90454. - 02111-1307 USA. */
  90455. + License along with the GNU C Library; if not, see
  90456. + <http://www.gnu.org/licenses/>. */
  90457. #include <string.h>
  90458. #include "pthreadP.h"
  90459. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_setclock.c uClibc-git/libpthread/nptl/pthread_condattr_setclock.c
  90460. --- uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_setclock.c 2012-05-15 09:20:09.000000000 +0200
  90461. +++ uClibc-git/libpthread/nptl/pthread_condattr_setclock.c 2014-07-25 20:36:08.865345471 +0200
  90462. @@ -13,9 +13,8 @@
  90463. Lesser General Public License for more details.
  90464. You should have received a copy of the GNU Lesser General Public
  90465. - License along with the GNU C Library; if not, write to the Free
  90466. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90467. - 02111-1307 USA. */
  90468. + License along with the GNU C Library; if not, see
  90469. + <http://www.gnu.org/licenses/>. */
  90470. #include <assert.h>
  90471. #include <errno.h>
  90472. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_setpshared.c uClibc-git/libpthread/nptl/pthread_condattr_setpshared.c
  90473. --- uClibc-0.9.33.2/libpthread/nptl/pthread_condattr_setpshared.c 2012-05-15 09:20:09.000000000 +0200
  90474. +++ uClibc-git/libpthread/nptl/pthread_condattr_setpshared.c 2014-07-25 20:36:08.865345471 +0200
  90475. @@ -13,9 +13,8 @@
  90476. Lesser General Public License for more details.
  90477. You should have received a copy of the GNU Lesser General Public
  90478. - License along with the GNU C Library; if not, write to the Free
  90479. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90480. - 02111-1307 USA. */
  90481. + License along with the GNU C Library; if not, see
  90482. + <http://www.gnu.org/licenses/>. */
  90483. #include <errno.h>
  90484. #include <pthreadP.h>
  90485. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_cond_destroy.c uClibc-git/libpthread/nptl/pthread_cond_destroy.c
  90486. --- uClibc-0.9.33.2/libpthread/nptl/pthread_cond_destroy.c 2012-05-15 09:20:09.000000000 +0200
  90487. +++ uClibc-git/libpthread/nptl/pthread_cond_destroy.c 2014-07-25 20:36:08.865345471 +0200
  90488. @@ -13,9 +13,8 @@
  90489. Lesser General Public License for more details.
  90490. You should have received a copy of the GNU Lesser General Public
  90491. - License along with the GNU C Library; if not, write to the Free
  90492. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90493. - 02111-1307 USA. */
  90494. + License along with the GNU C Library; if not, see
  90495. + <http://www.gnu.org/licenses/>. */
  90496. #include <errno.h>
  90497. #include "pthreadP.h"
  90498. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_cond_init.c uClibc-git/libpthread/nptl/pthread_cond_init.c
  90499. --- uClibc-0.9.33.2/libpthread/nptl/pthread_cond_init.c 2012-05-15 09:20:09.000000000 +0200
  90500. +++ uClibc-git/libpthread/nptl/pthread_cond_init.c 2014-07-25 20:36:08.865345471 +0200
  90501. @@ -14,9 +14,8 @@
  90502. Lesser General Public License for more details.
  90503. You should have received a copy of the GNU Lesser General Public
  90504. - License along with the GNU C Library; if not, write to the Free
  90505. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90506. - 02111-1307 USA. */
  90507. + License along with the GNU C Library; if not, see
  90508. + <http://www.gnu.org/licenses/>. */
  90509. #include "pthreadP.h"
  90510. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_create.c uClibc-git/libpthread/nptl/pthread_create.c
  90511. --- uClibc-0.9.33.2/libpthread/nptl/pthread_create.c 2012-05-15 09:20:09.000000000 +0200
  90512. +++ uClibc-git/libpthread/nptl/pthread_create.c 2014-07-25 20:36:08.869345492 +0200
  90513. @@ -13,9 +13,8 @@
  90514. Lesser General Public License for more details.
  90515. You should have received a copy of the GNU Lesser General Public
  90516. - License along with the GNU C Library; if not, write to the Free
  90517. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90518. - 02111-1307 USA. */
  90519. + License along with the GNU C Library; if not, see
  90520. + <http://www.gnu.org/licenses/>. */
  90521. #include <errno.h>
  90522. #include <stdbool.h>
  90523. @@ -25,7 +24,6 @@
  90524. #include <hp-timing.h>
  90525. #include <ldsodefs.h>
  90526. #include <atomic.h>
  90527. -#include <libc-internal.h>
  90528. #include <resolv.h>
  90529. #include <bits/kernel-features.h>
  90530. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_detach.c uClibc-git/libpthread/nptl/pthread_detach.c
  90531. --- uClibc-0.9.33.2/libpthread/nptl/pthread_detach.c 2012-05-15 09:20:09.000000000 +0200
  90532. +++ uClibc-git/libpthread/nptl/pthread_detach.c 2014-07-25 20:36:08.869345492 +0200
  90533. @@ -13,9 +13,8 @@
  90534. Lesser General Public License for more details.
  90535. You should have received a copy of the GNU Lesser General Public
  90536. - License along with the GNU C Library; if not, write to the Free
  90537. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90538. - 02111-1307 USA. */
  90539. + License along with the GNU C Library; if not, see
  90540. + <http://www.gnu.org/licenses/>. */
  90541. #include <errno.h>
  90542. #include "pthreadP.h"
  90543. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_equal.c uClibc-git/libpthread/nptl/pthread_equal.c
  90544. --- uClibc-0.9.33.2/libpthread/nptl/pthread_equal.c 2012-05-15 09:20:09.000000000 +0200
  90545. +++ uClibc-git/libpthread/nptl/pthread_equal.c 2014-07-25 20:36:08.869345492 +0200
  90546. @@ -13,9 +13,8 @@
  90547. Lesser General Public License for more details.
  90548. You should have received a copy of the GNU Lesser General Public
  90549. - License along with the GNU C Library; if not, write to the Free
  90550. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90551. - 02111-1307 USA. */
  90552. + License along with the GNU C Library; if not, see
  90553. + <http://www.gnu.org/licenses/>. */
  90554. #include "pthreadP.h"
  90555. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_exit.c uClibc-git/libpthread/nptl/pthread_exit.c
  90556. --- uClibc-0.9.33.2/libpthread/nptl/pthread_exit.c 2012-05-15 09:20:09.000000000 +0200
  90557. +++ uClibc-git/libpthread/nptl/pthread_exit.c 2014-07-25 20:36:08.869345492 +0200
  90558. @@ -13,16 +13,15 @@
  90559. Lesser General Public License for more details.
  90560. You should have received a copy of the GNU Lesser General Public
  90561. - License along with the GNU C Library; if not, write to the Free
  90562. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90563. - 02111-1307 USA. */
  90564. + License along with the GNU C Library; if not, see
  90565. + <http://www.gnu.org/licenses/>. */
  90566. #include <stdlib.h>
  90567. #include "pthreadP.h"
  90568. void
  90569. -attribute_protected
  90570. +attribute_protected attribute_noreturn
  90571. __pthread_exit (void* value)
  90572. {
  90573. THREAD_SETMEM (THREAD_SELF, result, value);
  90574. @@ -30,3 +29,9 @@
  90575. __do_cancel ();
  90576. }
  90577. strong_alias (__pthread_exit, pthread_exit)
  90578. +
  90579. +/*
  90580. + * After a thread terminates, __uClibc_main decrements __nptl_nthreads
  90581. + * defined in pthread_create.c.
  90582. + */
  90583. +PTHREAD_STATIC_FN_REQUIRE (pthread_create)
  90584. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_getattr_np.c uClibc-git/libpthread/nptl/pthread_getattr_np.c
  90585. --- uClibc-0.9.33.2/libpthread/nptl/pthread_getattr_np.c 2012-05-15 09:20:09.000000000 +0200
  90586. +++ uClibc-git/libpthread/nptl/pthread_getattr_np.c 2014-07-25 20:36:08.869345492 +0200
  90587. @@ -13,9 +13,8 @@
  90588. Lesser General Public License for more details.
  90589. You should have received a copy of the GNU Lesser General Public
  90590. - License along with the GNU C Library; if not, write to the Free
  90591. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90592. - 02111-1307 USA. */
  90593. + License along with the GNU C Library; if not, see
  90594. + <http://www.gnu.org/licenses/>. */
  90595. #include <assert.h>
  90596. #include <errno.h>
  90597. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_getconcurrency.c uClibc-git/libpthread/nptl/pthread_getconcurrency.c
  90598. --- uClibc-0.9.33.2/libpthread/nptl/pthread_getconcurrency.c 2012-05-15 09:20:09.000000000 +0200
  90599. +++ uClibc-git/libpthread/nptl/pthread_getconcurrency.c 2014-07-25 20:36:08.869345492 +0200
  90600. @@ -13,9 +13,8 @@
  90601. Lesser General Public License for more details.
  90602. You should have received a copy of the GNU Lesser General Public
  90603. - License along with the GNU C Library; if not, write to the Free
  90604. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90605. - 02111-1307 USA. */
  90606. + License along with the GNU C Library; if not, see
  90607. + <http://www.gnu.org/licenses/>. */
  90608. #include "pthreadP.h"
  90609. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_getschedparam.c uClibc-git/libpthread/nptl/pthread_getschedparam.c
  90610. --- uClibc-0.9.33.2/libpthread/nptl/pthread_getschedparam.c 2012-05-15 09:20:09.000000000 +0200
  90611. +++ uClibc-git/libpthread/nptl/pthread_getschedparam.c 2014-07-25 20:36:08.869345492 +0200
  90612. @@ -13,9 +13,8 @@
  90613. Lesser General Public License for more details.
  90614. You should have received a copy of the GNU Lesser General Public
  90615. - License along with the GNU C Library; if not, write to the Free
  90616. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90617. - 02111-1307 USA. */
  90618. + License along with the GNU C Library; if not, see
  90619. + <http://www.gnu.org/licenses/>. */
  90620. #include <errno.h>
  90621. #include <string.h>
  90622. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_getspecific.c uClibc-git/libpthread/nptl/pthread_getspecific.c
  90623. --- uClibc-0.9.33.2/libpthread/nptl/pthread_getspecific.c 2012-05-15 09:20:09.000000000 +0200
  90624. +++ uClibc-git/libpthread/nptl/pthread_getspecific.c 2014-07-25 20:36:08.869345492 +0200
  90625. @@ -13,16 +13,15 @@
  90626. Lesser General Public License for more details.
  90627. You should have received a copy of the GNU Lesser General Public
  90628. - License along with the GNU C Library; if not, write to the Free
  90629. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90630. - 02111-1307 USA. */
  90631. + License along with the GNU C Library; if not, see
  90632. + <http://www.gnu.org/licenses/>. */
  90633. #include <stdlib.h>
  90634. #include "pthreadP.h"
  90635. -void *
  90636. attribute_protected
  90637. +void *
  90638. __pthread_getspecific (pthread_key_t key)
  90639. {
  90640. struct pthread_key_data *data;
  90641. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_join.c uClibc-git/libpthread/nptl/pthread_join.c
  90642. --- uClibc-0.9.33.2/libpthread/nptl/pthread_join.c 2012-05-15 09:20:09.000000000 +0200
  90643. +++ uClibc-git/libpthread/nptl/pthread_join.c 2014-07-25 20:36:08.869345492 +0200
  90644. @@ -13,9 +13,8 @@
  90645. Lesser General Public License for more details.
  90646. You should have received a copy of the GNU Lesser General Public
  90647. - License along with the GNU C Library; if not, write to the Free
  90648. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90649. - 02111-1307 USA. */
  90650. + License along with the GNU C Library; if not, see
  90651. + <http://www.gnu.org/licenses/>. */
  90652. #include <errno.h>
  90653. #include <stdlib.h>
  90654. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_key_create.c uClibc-git/libpthread/nptl/pthread_key_create.c
  90655. --- uClibc-0.9.33.2/libpthread/nptl/pthread_key_create.c 2012-05-15 09:20:09.000000000 +0200
  90656. +++ uClibc-git/libpthread/nptl/pthread_key_create.c 2014-07-25 20:36:08.869345492 +0200
  90657. @@ -13,9 +13,8 @@
  90658. Lesser General Public License for more details.
  90659. You should have received a copy of the GNU Lesser General Public
  90660. - License along with the GNU C Library; if not, write to the Free
  90661. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90662. - 02111-1307 USA. */
  90663. + License along with the GNU C Library; if not, see
  90664. + <http://www.gnu.org/licenses/>. */
  90665. #include <errno.h>
  90666. #include "pthreadP.h"
  90667. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_key_delete.c uClibc-git/libpthread/nptl/pthread_key_delete.c
  90668. --- uClibc-0.9.33.2/libpthread/nptl/pthread_key_delete.c 2012-05-15 09:20:09.000000000 +0200
  90669. +++ uClibc-git/libpthread/nptl/pthread_key_delete.c 2014-07-25 20:36:08.869345492 +0200
  90670. @@ -13,9 +13,8 @@
  90671. Lesser General Public License for more details.
  90672. You should have received a copy of the GNU Lesser General Public
  90673. - License along with the GNU C Library; if not, write to the Free
  90674. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90675. - 02111-1307 USA. */
  90676. + License along with the GNU C Library; if not, see
  90677. + <http://www.gnu.org/licenses/>. */
  90678. #include <errno.h>
  90679. #include "pthreadP.h"
  90680. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_kill_other_threads.c uClibc-git/libpthread/nptl/pthread_kill_other_threads.c
  90681. --- uClibc-0.9.33.2/libpthread/nptl/pthread_kill_other_threads.c 2012-05-15 09:20:09.000000000 +0200
  90682. +++ uClibc-git/libpthread/nptl/pthread_kill_other_threads.c 2014-07-25 20:36:08.869345492 +0200
  90683. @@ -13,11 +13,10 @@
  90684. Lesser General Public License for more details.
  90685. You should have received a copy of the GNU Lesser General Public
  90686. - License along with the GNU C Library; if not, write to the Free
  90687. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90688. - 02111-1307 USA. */
  90689. + License along with the GNU C Library; if not, see
  90690. + <http://www.gnu.org/licenses/>. */
  90691. -#ifdef SHARED
  90692. +#if 0 /*def SHARED*/
  90693. /* This function does not serve a useful purpose in the thread library
  90694. implementation anymore. It used to be necessary when then kernel
  90695. could not shut down "processes" but this is not the case anymore.
  90696. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_destroy.c uClibc-git/libpthread/nptl/pthread_mutexattr_destroy.c
  90697. --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_destroy.c 2012-05-15 09:20:09.000000000 +0200
  90698. +++ uClibc-git/libpthread/nptl/pthread_mutexattr_destroy.c 2014-07-25 20:36:08.869345492 +0200
  90699. @@ -13,9 +13,8 @@
  90700. Lesser General Public License for more details.
  90701. You should have received a copy of the GNU Lesser General Public
  90702. - License along with the GNU C Library; if not, write to the Free
  90703. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90704. - 02111-1307 USA. */
  90705. + License along with the GNU C Library; if not, see
  90706. + <http://www.gnu.org/licenses/>. */
  90707. #include <pthreadP.h>
  90708. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_getprioceiling.c uClibc-git/libpthread/nptl/pthread_mutexattr_getprioceiling.c
  90709. --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_getprioceiling.c 2012-05-15 09:20:09.000000000 +0200
  90710. +++ uClibc-git/libpthread/nptl/pthread_mutexattr_getprioceiling.c 2014-07-25 20:36:08.869345492 +0200
  90711. @@ -14,9 +14,8 @@
  90712. Lesser General Public License for more details.
  90713. You should have received a copy of the GNU Lesser General Public
  90714. - License along with the GNU C Library; if not, write to the Free
  90715. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90716. - 02111-1307 USA. */
  90717. + License along with the GNU C Library; if not, see
  90718. + <http://www.gnu.org/licenses/>. */
  90719. #include <pthreadP.h>
  90720. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_getprotocol.c uClibc-git/libpthread/nptl/pthread_mutexattr_getprotocol.c
  90721. --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_getprotocol.c 2012-05-15 09:20:09.000000000 +0200
  90722. +++ uClibc-git/libpthread/nptl/pthread_mutexattr_getprotocol.c 2014-07-25 20:36:08.869345492 +0200
  90723. @@ -14,9 +14,8 @@
  90724. Lesser General Public License for more details.
  90725. You should have received a copy of the GNU Lesser General Public
  90726. - License along with the GNU C Library; if not, write to the Free
  90727. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90728. - 02111-1307 USA. */
  90729. + License along with the GNU C Library; if not, see
  90730. + <http://www.gnu.org/licenses/>. */
  90731. #include <pthreadP.h>
  90732. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_getpshared.c uClibc-git/libpthread/nptl/pthread_mutexattr_getpshared.c
  90733. --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_getpshared.c 2012-05-15 09:20:09.000000000 +0200
  90734. +++ uClibc-git/libpthread/nptl/pthread_mutexattr_getpshared.c 2014-07-25 20:36:08.869345492 +0200
  90735. @@ -13,9 +13,8 @@
  90736. Lesser General Public License for more details.
  90737. You should have received a copy of the GNU Lesser General Public
  90738. - License along with the GNU C Library; if not, write to the Free
  90739. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90740. - 02111-1307 USA. */
  90741. + License along with the GNU C Library; if not, see
  90742. + <http://www.gnu.org/licenses/>. */
  90743. #include <pthreadP.h>
  90744. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_getrobust.c uClibc-git/libpthread/nptl/pthread_mutexattr_getrobust.c
  90745. --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_getrobust.c 2012-05-15 09:20:09.000000000 +0200
  90746. +++ uClibc-git/libpthread/nptl/pthread_mutexattr_getrobust.c 2014-07-25 20:36:08.869345492 +0200
  90747. @@ -13,9 +13,8 @@
  90748. Lesser General Public License for more details.
  90749. You should have received a copy of the GNU Lesser General Public
  90750. - License along with the GNU C Library; if not, write to the Free
  90751. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90752. - 02111-1307 USA. */
  90753. + License along with the GNU C Library; if not, see
  90754. + <http://www.gnu.org/licenses/>. */
  90755. #include <pthreadP.h>
  90756. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_gettype.c uClibc-git/libpthread/nptl/pthread_mutexattr_gettype.c
  90757. --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_gettype.c 2012-05-15 09:20:09.000000000 +0200
  90758. +++ uClibc-git/libpthread/nptl/pthread_mutexattr_gettype.c 2014-07-25 20:36:08.869345492 +0200
  90759. @@ -13,9 +13,8 @@
  90760. Lesser General Public License for more details.
  90761. You should have received a copy of the GNU Lesser General Public
  90762. - License along with the GNU C Library; if not, write to the Free
  90763. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90764. - 02111-1307 USA. */
  90765. + License along with the GNU C Library; if not, see
  90766. + <http://www.gnu.org/licenses/>. */
  90767. #include <pthreadP.h>
  90768. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_init.c uClibc-git/libpthread/nptl/pthread_mutexattr_init.c
  90769. --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_init.c 2012-05-15 09:20:09.000000000 +0200
  90770. +++ uClibc-git/libpthread/nptl/pthread_mutexattr_init.c 2014-07-25 20:36:08.869345492 +0200
  90771. @@ -13,9 +13,8 @@
  90772. Lesser General Public License for more details.
  90773. You should have received a copy of the GNU Lesser General Public
  90774. - License along with the GNU C Library; if not, write to the Free
  90775. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90776. - 02111-1307 USA. */
  90777. + License along with the GNU C Library; if not, see
  90778. + <http://www.gnu.org/licenses/>. */
  90779. #include <string.h>
  90780. #include <pthreadP.h>
  90781. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_setprioceiling.c uClibc-git/libpthread/nptl/pthread_mutexattr_setprioceiling.c
  90782. --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_setprioceiling.c 2012-05-15 09:20:09.000000000 +0200
  90783. +++ uClibc-git/libpthread/nptl/pthread_mutexattr_setprioceiling.c 2014-07-25 20:36:08.869345492 +0200
  90784. @@ -14,9 +14,8 @@
  90785. Lesser General Public License for more details.
  90786. You should have received a copy of the GNU Lesser General Public
  90787. - License along with the GNU C Library; if not, write to the Free
  90788. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90789. - 02111-1307 USA. */
  90790. + License along with the GNU C Library; if not, see
  90791. + <http://www.gnu.org/licenses/>. */
  90792. #include <errno.h>
  90793. #include <pthreadP.h>
  90794. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_setprotocol.c uClibc-git/libpthread/nptl/pthread_mutexattr_setprotocol.c
  90795. --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_setprotocol.c 2012-05-15 09:20:09.000000000 +0200
  90796. +++ uClibc-git/libpthread/nptl/pthread_mutexattr_setprotocol.c 2014-07-25 20:36:08.869345492 +0200
  90797. @@ -14,9 +14,8 @@
  90798. Lesser General Public License for more details.
  90799. You should have received a copy of the GNU Lesser General Public
  90800. - License along with the GNU C Library; if not, write to the Free
  90801. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90802. - 02111-1307 USA. */
  90803. + License along with the GNU C Library; if not, see
  90804. + <http://www.gnu.org/licenses/>. */
  90805. #include <errno.h>
  90806. #include <pthreadP.h>
  90807. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_setpshared.c uClibc-git/libpthread/nptl/pthread_mutexattr_setpshared.c
  90808. --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_setpshared.c 2012-05-15 09:20:09.000000000 +0200
  90809. +++ uClibc-git/libpthread/nptl/pthread_mutexattr_setpshared.c 2014-07-25 20:36:08.869345492 +0200
  90810. @@ -13,9 +13,8 @@
  90811. Lesser General Public License for more details.
  90812. You should have received a copy of the GNU Lesser General Public
  90813. - License along with the GNU C Library; if not, write to the Free
  90814. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90815. - 02111-1307 USA. */
  90816. + License along with the GNU C Library; if not, see
  90817. + <http://www.gnu.org/licenses/>. */
  90818. #include <errno.h>
  90819. #include <pthreadP.h>
  90820. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_setrobust.c uClibc-git/libpthread/nptl/pthread_mutexattr_setrobust.c
  90821. --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_setrobust.c 2012-05-15 09:20:09.000000000 +0200
  90822. +++ uClibc-git/libpthread/nptl/pthread_mutexattr_setrobust.c 2014-07-25 20:36:08.869345492 +0200
  90823. @@ -13,9 +13,8 @@
  90824. Lesser General Public License for more details.
  90825. You should have received a copy of the GNU Lesser General Public
  90826. - License along with the GNU C Library; if not, write to the Free
  90827. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90828. - 02111-1307 USA. */
  90829. + License along with the GNU C Library; if not, see
  90830. + <http://www.gnu.org/licenses/>. */
  90831. #include <errno.h>
  90832. #include <pthreadP.h>
  90833. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_settype.c uClibc-git/libpthread/nptl/pthread_mutexattr_settype.c
  90834. --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutexattr_settype.c 2012-05-15 09:20:09.000000000 +0200
  90835. +++ uClibc-git/libpthread/nptl/pthread_mutexattr_settype.c 2014-07-25 20:36:08.869345492 +0200
  90836. @@ -13,9 +13,8 @@
  90837. Lesser General Public License for more details.
  90838. You should have received a copy of the GNU Lesser General Public
  90839. - License along with the GNU C Library; if not, write to the Free
  90840. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90841. - 02111-1307 USA. */
  90842. + License along with the GNU C Library; if not, see
  90843. + <http://www.gnu.org/licenses/>. */
  90844. #include <errno.h>
  90845. #include <pthreadP.h>
  90846. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_consistent.c uClibc-git/libpthread/nptl/pthread_mutex_consistent.c
  90847. --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_consistent.c 2012-05-15 09:20:09.000000000 +0200
  90848. +++ uClibc-git/libpthread/nptl/pthread_mutex_consistent.c 2014-07-25 20:36:08.869345492 +0200
  90849. @@ -13,9 +13,8 @@
  90850. Lesser General Public License for more details.
  90851. You should have received a copy of the GNU Lesser General Public
  90852. - License along with the GNU C Library; if not, write to the Free
  90853. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90854. - 02111-1307 USA. */
  90855. + License along with the GNU C Library; if not, see
  90856. + <http://www.gnu.org/licenses/>. */
  90857. #include <errno.h>
  90858. #include <pthreadP.h>
  90859. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_destroy.c uClibc-git/libpthread/nptl/pthread_mutex_destroy.c
  90860. --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_destroy.c 2012-05-15 09:20:09.000000000 +0200
  90861. +++ uClibc-git/libpthread/nptl/pthread_mutex_destroy.c 2014-07-25 20:36:08.869345492 +0200
  90862. @@ -13,9 +13,8 @@
  90863. Lesser General Public License for more details.
  90864. You should have received a copy of the GNU Lesser General Public
  90865. - License along with the GNU C Library; if not, write to the Free
  90866. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90867. - 02111-1307 USA. */
  90868. + License along with the GNU C Library; if not, see
  90869. + <http://www.gnu.org/licenses/>. */
  90870. #include <errno.h>
  90871. #include "pthreadP.h"
  90872. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_getprioceiling.c uClibc-git/libpthread/nptl/pthread_mutex_getprioceiling.c
  90873. --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_getprioceiling.c 2012-05-15 09:20:09.000000000 +0200
  90874. +++ uClibc-git/libpthread/nptl/pthread_mutex_getprioceiling.c 2014-07-25 20:36:08.869345492 +0200
  90875. @@ -14,9 +14,8 @@
  90876. Lesser General Public License for more details.
  90877. You should have received a copy of the GNU Lesser General Public
  90878. - License along with the GNU C Library; if not, write to the Free
  90879. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90880. - 02111-1307 USA. */
  90881. + License along with the GNU C Library; if not, see
  90882. + <http://www.gnu.org/licenses/>. */
  90883. #include <errno.h>
  90884. #include <pthreadP.h>
  90885. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_init.c uClibc-git/libpthread/nptl/pthread_mutex_init.c
  90886. --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_init.c 2012-05-15 09:20:09.000000000 +0200
  90887. +++ uClibc-git/libpthread/nptl/pthread_mutex_init.c 2014-07-25 20:36:08.869345492 +0200
  90888. @@ -14,9 +14,8 @@
  90889. Lesser General Public License for more details.
  90890. You should have received a copy of the GNU Lesser General Public
  90891. - License along with the GNU C Library; if not, write to the Free
  90892. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90893. - 02111-1307 USA. */
  90894. + License along with the GNU C Library; if not, see
  90895. + <http://www.gnu.org/licenses/>. */
  90896. #include <assert.h>
  90897. #include <errno.h>
  90898. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_lock.c uClibc-git/libpthread/nptl/pthread_mutex_lock.c
  90899. --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_lock.c 2012-05-15 09:20:09.000000000 +0200
  90900. +++ uClibc-git/libpthread/nptl/pthread_mutex_lock.c 2014-07-25 20:36:08.869345492 +0200
  90901. @@ -13,9 +13,8 @@
  90902. Lesser General Public License for more details.
  90903. You should have received a copy of the GNU Lesser General Public
  90904. - License along with the GNU C Library; if not, write to the Free
  90905. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90906. - 02111-1307 USA. */
  90907. + License along with the GNU C Library; if not, see
  90908. + <http://www.gnu.org/licenses/>. */
  90909. #include <assert.h>
  90910. #include <errno.h>
  90911. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_setprioceiling.c uClibc-git/libpthread/nptl/pthread_mutex_setprioceiling.c
  90912. --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_setprioceiling.c 2012-05-15 09:20:09.000000000 +0200
  90913. +++ uClibc-git/libpthread/nptl/pthread_mutex_setprioceiling.c 2014-07-25 20:36:08.869345492 +0200
  90914. @@ -14,9 +14,8 @@
  90915. Lesser General Public License for more details.
  90916. You should have received a copy of the GNU Lesser General Public
  90917. - License along with the GNU C Library; if not, write to the Free
  90918. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90919. - 02111-1307 USA. */
  90920. + License along with the GNU C Library; if not, see
  90921. + <http://www.gnu.org/licenses/>. */
  90922. #include <stdbool.h>
  90923. #include <errno.h>
  90924. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_timedlock.c uClibc-git/libpthread/nptl/pthread_mutex_timedlock.c
  90925. --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_timedlock.c 2012-05-15 09:20:09.000000000 +0200
  90926. +++ uClibc-git/libpthread/nptl/pthread_mutex_timedlock.c 2014-07-25 20:36:08.869345492 +0200
  90927. @@ -13,9 +13,8 @@
  90928. Lesser General Public License for more details.
  90929. You should have received a copy of the GNU Lesser General Public
  90930. - License along with the GNU C Library; if not, write to the Free
  90931. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90932. - 02111-1307 USA. */
  90933. + License along with the GNU C Library; if not, see
  90934. + <http://www.gnu.org/licenses/>. */
  90935. #include <assert.h>
  90936. #include <errno.h>
  90937. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_trylock.c uClibc-git/libpthread/nptl/pthread_mutex_trylock.c
  90938. --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_trylock.c 2012-05-15 09:20:09.000000000 +0200
  90939. +++ uClibc-git/libpthread/nptl/pthread_mutex_trylock.c 2014-07-25 20:36:08.869345492 +0200
  90940. @@ -13,9 +13,8 @@
  90941. Lesser General Public License for more details.
  90942. You should have received a copy of the GNU Lesser General Public
  90943. - License along with the GNU C Library; if not, write to the Free
  90944. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90945. - 02111-1307 USA. */
  90946. + License along with the GNU C Library; if not, see
  90947. + <http://www.gnu.org/licenses/>. */
  90948. #include <assert.h>
  90949. #include <errno.h>
  90950. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_unlock.c uClibc-git/libpthread/nptl/pthread_mutex_unlock.c
  90951. --- uClibc-0.9.33.2/libpthread/nptl/pthread_mutex_unlock.c 2012-05-15 09:20:09.000000000 +0200
  90952. +++ uClibc-git/libpthread/nptl/pthread_mutex_unlock.c 2014-07-25 20:36:08.869345492 +0200
  90953. @@ -13,9 +13,8 @@
  90954. Lesser General Public License for more details.
  90955. You should have received a copy of the GNU Lesser General Public
  90956. - License along with the GNU C Library; if not, write to the Free
  90957. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90958. - 02111-1307 USA. */
  90959. + License along with the GNU C Library; if not, see
  90960. + <http://www.gnu.org/licenses/>. */
  90961. #include <assert.h>
  90962. #include <errno.h>
  90963. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthreadP.h uClibc-git/libpthread/nptl/pthreadP.h
  90964. --- uClibc-0.9.33.2/libpthread/nptl/pthreadP.h 2012-05-15 09:20:09.000000000 +0200
  90965. +++ uClibc-git/libpthread/nptl/pthreadP.h 2014-07-25 20:36:08.865345471 +0200
  90966. @@ -13,9 +13,8 @@
  90967. Lesser General Public License for more details.
  90968. You should have received a copy of the GNU Lesser General Public
  90969. - License along with the GNU C Library; if not, write to the Free
  90970. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  90971. - 02111-1307 USA. */
  90972. + License along with the GNU C Library; if not, see
  90973. + <http://www.gnu.org/licenses/>. */
  90974. #ifndef _PTHREADP_H
  90975. #define _PTHREADP_H 1
  90976. @@ -221,7 +220,7 @@
  90977. /* Cancellation test. */
  90978. #define CANCELLATION_P(self) \
  90979. do { \
  90980. - int cancelhandling = THREAD_GETMEM (self, cancelhandling); \
  90981. + cancelhandling = THREAD_GETMEM (self, cancelhandling); \
  90982. if (CANCEL_ENABLED_AND_CANCELED (cancelhandling)) \
  90983. { \
  90984. THREAD_SETMEM (self, result, PTHREAD_CANCELED); \
  90985. @@ -411,9 +410,9 @@
  90986. const struct sched_param *param);
  90987. extern int __pthread_setcancelstate (int state, int *oldstate);
  90988. extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
  90989. - __const pthread_mutexattr_t *__mutexattr);
  90990. + const pthread_mutexattr_t *__mutexattr);
  90991. extern int __pthread_mutex_init_internal (pthread_mutex_t *__mutex,
  90992. - __const pthread_mutexattr_t *__mutexattr)
  90993. + const pthread_mutexattr_t *__mutexattr)
  90994. attribute_hidden;
  90995. extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
  90996. extern int __pthread_mutex_destroy_internal (pthread_mutex_t *__mutex)
  90997. @@ -452,22 +451,22 @@
  90998. extern int __pthread_attr_setschedpolicy (pthread_attr_t *attr, int policy);
  90999. extern int __pthread_attr_getscope (const pthread_attr_t *attr, int *scope);
  91000. extern int __pthread_attr_setscope (pthread_attr_t *attr, int scope);
  91001. -extern int __pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
  91002. +extern int __pthread_attr_getstackaddr (const pthread_attr_t *__restrict
  91003. __attr, void **__restrict __stackaddr);
  91004. extern int __pthread_attr_setstackaddr (pthread_attr_t *__attr,
  91005. void *__stackaddr);
  91006. -extern int __pthread_attr_getstacksize (__const pthread_attr_t *__restrict
  91007. +extern int __pthread_attr_getstacksize (const pthread_attr_t *__restrict
  91008. __attr,
  91009. size_t *__restrict __stacksize);
  91010. extern int __pthread_attr_setstacksize (pthread_attr_t *__attr,
  91011. size_t __stacksize);
  91012. -extern int __pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
  91013. +extern int __pthread_attr_getstack (const pthread_attr_t *__restrict __attr,
  91014. void **__restrict __stackaddr,
  91015. size_t *__restrict __stacksize);
  91016. extern int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
  91017. size_t __stacksize);
  91018. extern int __pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
  91019. - __const pthread_rwlockattr_t *__restrict
  91020. + const pthread_rwlockattr_t *__restrict
  91021. __attr);
  91022. extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock);
  91023. extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock);
  91024. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_destroy.c uClibc-git/libpthread/nptl/pthread_rwlockattr_destroy.c
  91025. --- uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_destroy.c 2012-05-15 09:20:09.000000000 +0200
  91026. +++ uClibc-git/libpthread/nptl/pthread_rwlockattr_destroy.c 2014-07-25 20:36:08.869345492 +0200
  91027. @@ -13,9 +13,8 @@
  91028. Lesser General Public License for more details.
  91029. You should have received a copy of the GNU Lesser General Public
  91030. - License along with the GNU C Library; if not, write to the Free
  91031. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91032. - 02111-1307 USA. */
  91033. + License along with the GNU C Library; if not, see
  91034. + <http://www.gnu.org/licenses/>. */
  91035. #include "pthreadP.h"
  91036. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_getkind_np.c uClibc-git/libpthread/nptl/pthread_rwlockattr_getkind_np.c
  91037. --- uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_getkind_np.c 2012-05-15 09:20:09.000000000 +0200
  91038. +++ uClibc-git/libpthread/nptl/pthread_rwlockattr_getkind_np.c 2014-07-25 20:36:08.869345492 +0200
  91039. @@ -13,9 +13,8 @@
  91040. Lesser General Public License for more details.
  91041. You should have received a copy of the GNU Lesser General Public
  91042. - License along with the GNU C Library; if not, write to the Free
  91043. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91044. - 02111-1307 USA. */
  91045. + License along with the GNU C Library; if not, see
  91046. + <http://www.gnu.org/licenses/>. */
  91047. #include "pthreadP.h"
  91048. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_getpshared.c uClibc-git/libpthread/nptl/pthread_rwlockattr_getpshared.c
  91049. --- uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_getpshared.c 2012-05-15 09:20:09.000000000 +0200
  91050. +++ uClibc-git/libpthread/nptl/pthread_rwlockattr_getpshared.c 2014-07-25 20:36:08.869345492 +0200
  91051. @@ -13,9 +13,8 @@
  91052. Lesser General Public License for more details.
  91053. You should have received a copy of the GNU Lesser General Public
  91054. - License along with the GNU C Library; if not, write to the Free
  91055. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91056. - 02111-1307 USA. */
  91057. + License along with the GNU C Library; if not, see
  91058. + <http://www.gnu.org/licenses/>. */
  91059. #include "pthreadP.h"
  91060. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_init.c uClibc-git/libpthread/nptl/pthread_rwlockattr_init.c
  91061. --- uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_init.c 2012-05-15 09:20:09.000000000 +0200
  91062. +++ uClibc-git/libpthread/nptl/pthread_rwlockattr_init.c 2014-07-25 20:36:08.869345492 +0200
  91063. @@ -13,9 +13,8 @@
  91064. Lesser General Public License for more details.
  91065. You should have received a copy of the GNU Lesser General Public
  91066. - License along with the GNU C Library; if not, write to the Free
  91067. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91068. - 02111-1307 USA. */
  91069. + License along with the GNU C Library; if not, see
  91070. + <http://www.gnu.org/licenses/>. */
  91071. #include "pthreadP.h"
  91072. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_setkind_np.c uClibc-git/libpthread/nptl/pthread_rwlockattr_setkind_np.c
  91073. --- uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_setkind_np.c 2012-05-15 09:20:09.000000000 +0200
  91074. +++ uClibc-git/libpthread/nptl/pthread_rwlockattr_setkind_np.c 2014-07-25 20:36:08.869345492 +0200
  91075. @@ -13,9 +13,8 @@
  91076. Lesser General Public License for more details.
  91077. You should have received a copy of the GNU Lesser General Public
  91078. - License along with the GNU C Library; if not, write to the Free
  91079. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91080. - 02111-1307 USA. */
  91081. + License along with the GNU C Library; if not, see
  91082. + <http://www.gnu.org/licenses/>. */
  91083. #include <errno.h>
  91084. #include "pthreadP.h"
  91085. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_setpshared.c uClibc-git/libpthread/nptl/pthread_rwlockattr_setpshared.c
  91086. --- uClibc-0.9.33.2/libpthread/nptl/pthread_rwlockattr_setpshared.c 2012-05-15 09:20:09.000000000 +0200
  91087. +++ uClibc-git/libpthread/nptl/pthread_rwlockattr_setpshared.c 2014-07-25 20:36:08.869345492 +0200
  91088. @@ -13,9 +13,8 @@
  91089. Lesser General Public License for more details.
  91090. You should have received a copy of the GNU Lesser General Public
  91091. - License along with the GNU C Library; if not, write to the Free
  91092. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91093. - 02111-1307 USA. */
  91094. + License along with the GNU C Library; if not, see
  91095. + <http://www.gnu.org/licenses/>. */
  91096. #include <errno.h>
  91097. #include "pthreadP.h"
  91098. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_rwlock_destroy.c uClibc-git/libpthread/nptl/pthread_rwlock_destroy.c
  91099. --- uClibc-0.9.33.2/libpthread/nptl/pthread_rwlock_destroy.c 2012-05-15 09:20:09.000000000 +0200
  91100. +++ uClibc-git/libpthread/nptl/pthread_rwlock_destroy.c 2014-07-25 20:36:08.869345492 +0200
  91101. @@ -13,9 +13,8 @@
  91102. Lesser General Public License for more details.
  91103. You should have received a copy of the GNU Lesser General Public
  91104. - License along with the GNU C Library; if not, write to the Free
  91105. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91106. - 02111-1307 USA. */
  91107. + License along with the GNU C Library; if not, see
  91108. + <http://www.gnu.org/licenses/>. */
  91109. #include "pthreadP.h"
  91110. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_rwlock_init.c uClibc-git/libpthread/nptl/pthread_rwlock_init.c
  91111. --- uClibc-0.9.33.2/libpthread/nptl/pthread_rwlock_init.c 2012-05-15 09:20:09.000000000 +0200
  91112. +++ uClibc-git/libpthread/nptl/pthread_rwlock_init.c 2014-07-25 20:36:08.869345492 +0200
  91113. @@ -13,9 +13,8 @@
  91114. Lesser General Public License for more details.
  91115. You should have received a copy of the GNU Lesser General Public
  91116. - License along with the GNU C Library; if not, write to the Free
  91117. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91118. - 02111-1307 USA. */
  91119. + License along with the GNU C Library; if not, see
  91120. + <http://www.gnu.org/licenses/>. */
  91121. #include "pthreadP.h"
  91122. #include <bits/kernel-features.h>
  91123. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_rwlock_tryrdlock.c uClibc-git/libpthread/nptl/pthread_rwlock_tryrdlock.c
  91124. --- uClibc-0.9.33.2/libpthread/nptl/pthread_rwlock_tryrdlock.c 2012-05-15 09:20:09.000000000 +0200
  91125. +++ uClibc-git/libpthread/nptl/pthread_rwlock_tryrdlock.c 2014-07-25 20:36:08.869345492 +0200
  91126. @@ -13,9 +13,8 @@
  91127. Lesser General Public License for more details.
  91128. You should have received a copy of the GNU Lesser General Public
  91129. - License along with the GNU C Library; if not, write to the Free
  91130. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91131. - 02111-1307 USA. */
  91132. + License along with the GNU C Library; if not, see
  91133. + <http://www.gnu.org/licenses/>. */
  91134. #include <errno.h>
  91135. #include "pthreadP.h"
  91136. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_rwlock_trywrlock.c uClibc-git/libpthread/nptl/pthread_rwlock_trywrlock.c
  91137. --- uClibc-0.9.33.2/libpthread/nptl/pthread_rwlock_trywrlock.c 2012-05-15 09:20:09.000000000 +0200
  91138. +++ uClibc-git/libpthread/nptl/pthread_rwlock_trywrlock.c 2014-07-25 20:36:08.869345492 +0200
  91139. @@ -13,9 +13,8 @@
  91140. Lesser General Public License for more details.
  91141. You should have received a copy of the GNU Lesser General Public
  91142. - License along with the GNU C Library; if not, write to the Free
  91143. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91144. - 02111-1307 USA. */
  91145. + License along with the GNU C Library; if not, see
  91146. + <http://www.gnu.org/licenses/>. */
  91147. #include <errno.h>
  91148. #include "pthreadP.h"
  91149. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_self.c uClibc-git/libpthread/nptl/pthread_self.c
  91150. --- uClibc-0.9.33.2/libpthread/nptl/pthread_self.c 2012-05-15 09:20:09.000000000 +0200
  91151. +++ uClibc-git/libpthread/nptl/pthread_self.c 2014-07-25 20:36:08.869345492 +0200
  91152. @@ -13,9 +13,8 @@
  91153. Lesser General Public License for more details.
  91154. You should have received a copy of the GNU Lesser General Public
  91155. - License along with the GNU C Library; if not, write to the Free
  91156. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91157. - 02111-1307 USA. */
  91158. + License along with the GNU C Library; if not, see
  91159. + <http://www.gnu.org/licenses/>. */
  91160. #include "pthreadP.h"
  91161. #include <tls.h>
  91162. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_setcancelstate.c uClibc-git/libpthread/nptl/pthread_setcancelstate.c
  91163. --- uClibc-0.9.33.2/libpthread/nptl/pthread_setcancelstate.c 2012-05-15 09:20:09.000000000 +0200
  91164. +++ uClibc-git/libpthread/nptl/pthread_setcancelstate.c 2014-07-25 20:36:08.869345492 +0200
  91165. @@ -13,9 +13,8 @@
  91166. Lesser General Public License for more details.
  91167. You should have received a copy of the GNU Lesser General Public
  91168. - License along with the GNU C Library; if not, write to the Free
  91169. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91170. - 02111-1307 USA. */
  91171. + License along with the GNU C Library; if not, see
  91172. + <http://www.gnu.org/licenses/>. */
  91173. #include <errno.h>
  91174. #include "pthreadP.h"
  91175. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_setcanceltype.c uClibc-git/libpthread/nptl/pthread_setcanceltype.c
  91176. --- uClibc-0.9.33.2/libpthread/nptl/pthread_setcanceltype.c 2012-05-15 09:20:09.000000000 +0200
  91177. +++ uClibc-git/libpthread/nptl/pthread_setcanceltype.c 2014-07-25 20:36:08.869345492 +0200
  91178. @@ -13,9 +13,8 @@
  91179. Lesser General Public License for more details.
  91180. You should have received a copy of the GNU Lesser General Public
  91181. - License along with the GNU C Library; if not, write to the Free
  91182. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91183. - 02111-1307 USA. */
  91184. + License along with the GNU C Library; if not, see
  91185. + <http://www.gnu.org/licenses/>. */
  91186. #include <errno.h>
  91187. #include "pthreadP.h"
  91188. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_setconcurrency.c uClibc-git/libpthread/nptl/pthread_setconcurrency.c
  91189. --- uClibc-0.9.33.2/libpthread/nptl/pthread_setconcurrency.c 2012-05-15 09:20:09.000000000 +0200
  91190. +++ uClibc-git/libpthread/nptl/pthread_setconcurrency.c 2014-07-25 20:36:08.869345492 +0200
  91191. @@ -13,9 +13,8 @@
  91192. Lesser General Public License for more details.
  91193. You should have received a copy of the GNU Lesser General Public
  91194. - License along with the GNU C Library; if not, write to the Free
  91195. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91196. - 02111-1307 USA. */
  91197. + License along with the GNU C Library; if not, see
  91198. + <http://www.gnu.org/licenses/>. */
  91199. #include <errno.h>
  91200. #include "pthreadP.h"
  91201. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_setschedparam.c uClibc-git/libpthread/nptl/pthread_setschedparam.c
  91202. --- uClibc-0.9.33.2/libpthread/nptl/pthread_setschedparam.c 2012-05-15 09:20:09.000000000 +0200
  91203. +++ uClibc-git/libpthread/nptl/pthread_setschedparam.c 2014-07-25 20:36:08.869345492 +0200
  91204. @@ -13,9 +13,8 @@
  91205. Lesser General Public License for more details.
  91206. You should have received a copy of the GNU Lesser General Public
  91207. - License along with the GNU C Library; if not, write to the Free
  91208. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91209. - 02111-1307 USA. */
  91210. + License along with the GNU C Library; if not, see
  91211. + <http://www.gnu.org/licenses/>. */
  91212. #include <errno.h>
  91213. #include <sched.h>
  91214. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_setschedprio.c uClibc-git/libpthread/nptl/pthread_setschedprio.c
  91215. --- uClibc-0.9.33.2/libpthread/nptl/pthread_setschedprio.c 2012-05-15 09:20:09.000000000 +0200
  91216. +++ uClibc-git/libpthread/nptl/pthread_setschedprio.c 2014-07-25 20:36:08.869345492 +0200
  91217. @@ -13,9 +13,8 @@
  91218. Lesser General Public License for more details.
  91219. You should have received a copy of the GNU Lesser General Public
  91220. - License along with the GNU C Library; if not, write to the Free
  91221. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91222. - 02111-1307 USA. */
  91223. + License along with the GNU C Library; if not, see
  91224. + <http://www.gnu.org/licenses/>. */
  91225. #include <errno.h>
  91226. #include <sched.h>
  91227. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_setspecific.c uClibc-git/libpthread/nptl/pthread_setspecific.c
  91228. --- uClibc-0.9.33.2/libpthread/nptl/pthread_setspecific.c 2012-05-15 09:20:09.000000000 +0200
  91229. +++ uClibc-git/libpthread/nptl/pthread_setspecific.c 2014-07-25 20:36:08.869345492 +0200
  91230. @@ -13,9 +13,8 @@
  91231. Lesser General Public License for more details.
  91232. You should have received a copy of the GNU Lesser General Public
  91233. - License along with the GNU C Library; if not, write to the Free
  91234. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91235. - 02111-1307 USA. */
  91236. + License along with the GNU C Library; if not, see
  91237. + <http://www.gnu.org/licenses/>. */
  91238. #include <errno.h>
  91239. #include <stdlib.h>
  91240. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_testcancel.c uClibc-git/libpthread/nptl/pthread_testcancel.c
  91241. --- uClibc-0.9.33.2/libpthread/nptl/pthread_testcancel.c 2012-05-15 09:20:09.000000000 +0200
  91242. +++ uClibc-git/libpthread/nptl/pthread_testcancel.c 2014-07-25 20:36:08.869345492 +0200
  91243. @@ -13,9 +13,8 @@
  91244. Lesser General Public License for more details.
  91245. You should have received a copy of the GNU Lesser General Public
  91246. - License along with the GNU C Library; if not, write to the Free
  91247. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91248. - 02111-1307 USA. */
  91249. + License along with the GNU C Library; if not, see
  91250. + <http://www.gnu.org/licenses/>. */
  91251. #include <stdlib.h>
  91252. #include "pthreadP.h"
  91253. @@ -24,5 +23,6 @@
  91254. void
  91255. pthread_testcancel (void)
  91256. {
  91257. + int cancelhandling;
  91258. CANCELLATION_P (THREAD_SELF);
  91259. }
  91260. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_timedjoin.c uClibc-git/libpthread/nptl/pthread_timedjoin.c
  91261. --- uClibc-0.9.33.2/libpthread/nptl/pthread_timedjoin.c 2012-05-15 09:20:09.000000000 +0200
  91262. +++ uClibc-git/libpthread/nptl/pthread_timedjoin.c 2014-07-25 20:36:08.869345492 +0200
  91263. @@ -13,9 +13,8 @@
  91264. Lesser General Public License for more details.
  91265. You should have received a copy of the GNU Lesser General Public
  91266. - License along with the GNU C Library; if not, write to the Free
  91267. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91268. - 02111-1307 USA. */
  91269. + License along with the GNU C Library; if not, see
  91270. + <http://www.gnu.org/licenses/>. */
  91271. #include <errno.h>
  91272. #include <stdlib.h>
  91273. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pthread_tryjoin.c uClibc-git/libpthread/nptl/pthread_tryjoin.c
  91274. --- uClibc-0.9.33.2/libpthread/nptl/pthread_tryjoin.c 2012-05-15 09:20:09.000000000 +0200
  91275. +++ uClibc-git/libpthread/nptl/pthread_tryjoin.c 2014-07-25 20:36:08.869345492 +0200
  91276. @@ -13,9 +13,8 @@
  91277. Lesser General Public License for more details.
  91278. You should have received a copy of the GNU Lesser General Public
  91279. - License along with the GNU C Library; if not, write to the Free
  91280. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91281. - 02111-1307 USA. */
  91282. + License along with the GNU C Library; if not, see
  91283. + <http://www.gnu.org/licenses/>. */
  91284. #include <errno.h>
  91285. #include <stdlib.h>
  91286. diff -Nur uClibc-0.9.33.2/libpthread/nptl/pt-system.c uClibc-git/libpthread/nptl/pt-system.c
  91287. --- uClibc-0.9.33.2/libpthread/nptl/pt-system.c 2012-05-15 09:20:09.000000000 +0200
  91288. +++ uClibc-git/libpthread/nptl/pt-system.c 2014-07-25 20:36:08.865345471 +0200
  91289. @@ -13,9 +13,8 @@
  91290. Lesser General Public License for more details.
  91291. You should have received a copy of the GNU Lesser General Public
  91292. - License along with the GNU C Library; if not, write to the Free
  91293. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91294. - 02111-1307 USA. */
  91295. + License along with the GNU C Library; if not, see
  91296. + <http://www.gnu.org/licenses/>. */
  91297. #include <errno.h>
  91298. #include <stdlib.h>
  91299. diff -Nur uClibc-0.9.33.2/libpthread/nptl/res.c uClibc-git/libpthread/nptl/res.c
  91300. --- uClibc-0.9.33.2/libpthread/nptl/res.c 2012-05-15 09:20:09.000000000 +0200
  91301. +++ uClibc-git/libpthread/nptl/res.c 2014-07-25 20:36:08.869345492 +0200
  91302. @@ -12,9 +12,8 @@
  91303. Lesser General Public License for more details.
  91304. You should have received a copy of the GNU Lesser General Public
  91305. - License along with the GNU C Library; if not, write to the Free
  91306. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91307. - 02111-1307 USA. */
  91308. + License along with the GNU C Library; if not, see
  91309. + <http://www.gnu.org/licenses/>. */
  91310. #include <features.h>
  91311. #include <tls.h>
  91312. diff -Nur uClibc-0.9.33.2/libpthread/nptl/semaphore.h uClibc-git/libpthread/nptl/semaphore.h
  91313. --- uClibc-0.9.33.2/libpthread/nptl/semaphore.h 2012-05-15 09:20:09.000000000 +0200
  91314. +++ uClibc-git/libpthread/nptl/semaphore.h 2014-07-25 20:36:08.869345492 +0200
  91315. @@ -12,9 +12,8 @@
  91316. Lesser General Public License for more details.
  91317. You should have received a copy of the GNU Lesser General Public
  91318. - License along with the GNU C Library; if not, write to the Free
  91319. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91320. - 02111-1307 USA. */
  91321. + License along with the GNU C Library; if not, see
  91322. + <http://www.gnu.org/licenses/>. */
  91323. #ifndef _SEMAPHORE_H
  91324. #define _SEMAPHORE_H 1
  91325. @@ -40,13 +39,13 @@
  91326. extern int sem_destroy (sem_t *__sem) __THROW;
  91327. /* Open a named semaphore NAME with open flags OFLAG. */
  91328. -extern sem_t *sem_open (__const char *__name, int __oflag, ...) __THROW;
  91329. +extern sem_t *sem_open (const char *__name, int __oflag, ...) __THROW;
  91330. /* Close descriptor for named semaphore SEM. */
  91331. extern int sem_close (sem_t *__sem) __THROW;
  91332. /* Remove named semaphore NAME. */
  91333. -extern int sem_unlink (__const char *__name) __THROW;
  91334. +extern int sem_unlink (const char *__name) __THROW;
  91335. /* Wait for SEM being posted.
  91336. @@ -60,7 +59,7 @@
  91337. This function is a cancellation point and therefore not marked with
  91338. __THROW. */
  91339. extern int sem_timedwait (sem_t *__restrict __sem,
  91340. - __const struct timespec *__restrict __abstime);
  91341. + const struct timespec *__restrict __abstime);
  91342. #endif
  91343. /* Test whether SEM is posted. */
  91344. diff -Nur uClibc-0.9.33.2/libpthread/nptl/semaphoreP.h uClibc-git/libpthread/nptl/semaphoreP.h
  91345. --- uClibc-0.9.33.2/libpthread/nptl/semaphoreP.h 2012-05-15 09:20:09.000000000 +0200
  91346. +++ uClibc-git/libpthread/nptl/semaphoreP.h 2014-07-25 20:36:08.869345492 +0200
  91347. @@ -13,9 +13,8 @@
  91348. Lesser General Public License for more details.
  91349. You should have received a copy of the GNU Lesser General Public
  91350. - License along with the GNU C Library; if not, write to the Free
  91351. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91352. - 02111-1307 USA. */
  91353. + License along with the GNU C Library; if not, see
  91354. + <http://www.gnu.org/licenses/>. */
  91355. #include <semaphore.h>
  91356. #include "pthreadP.h"
  91357. @@ -56,14 +55,3 @@
  91358. /* Comparison function for search in tree with existing mappings. */
  91359. extern int __sem_search (const void *a, const void *b) attribute_hidden;
  91360. -
  91361. -
  91362. -/* Prototypes of functions with multiple interfaces. */
  91363. -extern int __new_sem_init (sem_t *sem, int pshared, unsigned int value);
  91364. -extern int __old_sem_init (sem_t *sem, int pshared, unsigned int value);
  91365. -extern int __new_sem_destroy (sem_t *sem);
  91366. -extern int __new_sem_post (sem_t *sem);
  91367. -extern int __new_sem_wait (sem_t *sem);
  91368. -extern int __old_sem_wait (sem_t *sem);
  91369. -extern int __new_sem_trywait (sem_t *sem);
  91370. -extern int __new_sem_getvalue (sem_t *sem, int *sval);
  91371. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sem_close.c uClibc-git/libpthread/nptl/sem_close.c
  91372. --- uClibc-0.9.33.2/libpthread/nptl/sem_close.c 2012-05-15 09:20:09.000000000 +0200
  91373. +++ uClibc-git/libpthread/nptl/sem_close.c 2014-07-25 20:36:08.869345492 +0200
  91374. @@ -13,9 +13,8 @@
  91375. Lesser General Public License for more details.
  91376. You should have received a copy of the GNU Lesser General Public
  91377. - License along with the GNU C Library; if not, write to the Free
  91378. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91379. - 02111-1307 USA. */
  91380. + License along with the GNU C Library; if not, see
  91381. + <http://www.gnu.org/licenses/>. */
  91382. #include <errno.h>
  91383. #include <search.h>
  91384. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sem_destroy.c uClibc-git/libpthread/nptl/sem_destroy.c
  91385. --- uClibc-0.9.33.2/libpthread/nptl/sem_destroy.c 2012-05-15 09:20:09.000000000 +0200
  91386. +++ uClibc-git/libpthread/nptl/sem_destroy.c 2014-07-25 20:36:08.869345492 +0200
  91387. @@ -13,16 +13,15 @@
  91388. Lesser General Public License for more details.
  91389. You should have received a copy of the GNU Lesser General Public
  91390. - License along with the GNU C Library; if not, write to the Free
  91391. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91392. - 02111-1307 USA. */
  91393. + License along with the GNU C Library; if not, see
  91394. + <http://www.gnu.org/licenses/>. */
  91395. #include <semaphore.h>
  91396. #include "semaphoreP.h"
  91397. int
  91398. -__new_sem_destroy (
  91399. +sem_destroy (
  91400. sem_t *sem)
  91401. {
  91402. /* XXX Check for valid parameter. */
  91403. @@ -30,4 +29,3 @@
  91404. /* Nothing to do. */
  91405. return 0;
  91406. }
  91407. -weak_alias(__new_sem_destroy, sem_destroy)
  91408. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sem_getvalue.c uClibc-git/libpthread/nptl/sem_getvalue.c
  91409. --- uClibc-0.9.33.2/libpthread/nptl/sem_getvalue.c 2012-05-15 09:20:09.000000000 +0200
  91410. +++ uClibc-git/libpthread/nptl/sem_getvalue.c 2014-07-25 20:36:08.869345492 +0200
  91411. @@ -13,16 +13,15 @@
  91412. Lesser General Public License for more details.
  91413. You should have received a copy of the GNU Lesser General Public
  91414. - License along with the GNU C Library; if not, write to the Free
  91415. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91416. - 02111-1307 USA. */
  91417. + License along with the GNU C Library; if not, see
  91418. + <http://www.gnu.org/licenses/>. */
  91419. #include <semaphore.h>
  91420. #include "semaphoreP.h"
  91421. int
  91422. -__new_sem_getvalue (
  91423. +sem_getvalue (
  91424. sem_t *sem,
  91425. int *sval)
  91426. {
  91427. @@ -34,4 +33,3 @@
  91428. return 0;
  91429. }
  91430. -weak_alias(__new_sem_getvalue, sem_getvalue)
  91431. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sem_init.c uClibc-git/libpthread/nptl/sem_init.c
  91432. --- uClibc-0.9.33.2/libpthread/nptl/sem_init.c 2012-05-15 09:20:09.000000000 +0200
  91433. +++ uClibc-git/libpthread/nptl/sem_init.c 2014-07-25 20:36:08.869345492 +0200
  91434. @@ -13,9 +13,8 @@
  91435. Lesser General Public License for more details.
  91436. You should have received a copy of the GNU Lesser General Public
  91437. - License along with the GNU C Library; if not, write to the Free
  91438. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91439. - 02111-1307 USA. */
  91440. + License along with the GNU C Library; if not, see
  91441. + <http://www.gnu.org/licenses/>. */
  91442. #include <errno.h>
  91443. #include <semaphore.h>
  91444. @@ -25,7 +24,7 @@
  91445. int
  91446. -__new_sem_init (
  91447. +sem_init (
  91448. sem_t *sem,
  91449. int pshared,
  91450. unsigned int value)
  91451. @@ -53,4 +52,3 @@
  91452. return 0;
  91453. }
  91454. -weak_alias(__new_sem_init, sem_init)
  91455. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sem_open.c uClibc-git/libpthread/nptl/sem_open.c
  91456. --- uClibc-0.9.33.2/libpthread/nptl/sem_open.c 2012-05-15 09:20:09.000000000 +0200
  91457. +++ uClibc-git/libpthread/nptl/sem_open.c 2014-07-25 20:36:08.869345492 +0200
  91458. @@ -13,9 +13,8 @@
  91459. Lesser General Public License for more details.
  91460. You should have received a copy of the GNU Lesser General Public
  91461. - License along with the GNU C Library; if not, write to the Free
  91462. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91463. - 02111-1307 USA. */
  91464. + License along with the GNU C Library; if not, see
  91465. + <http://www.gnu.org/licenses/>. */
  91466. #include <errno.h>
  91467. #include <fcntl.h>
  91468. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sem_unlink.c uClibc-git/libpthread/nptl/sem_unlink.c
  91469. --- uClibc-0.9.33.2/libpthread/nptl/sem_unlink.c 2012-05-15 09:20:09.000000000 +0200
  91470. +++ uClibc-git/libpthread/nptl/sem_unlink.c 2014-07-25 20:36:08.869345492 +0200
  91471. @@ -13,9 +13,8 @@
  91472. Lesser General Public License for more details.
  91473. You should have received a copy of the GNU Lesser General Public
  91474. - License along with the GNU C Library; if not, write to the Free
  91475. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91476. - 02111-1307 USA. */
  91477. + License along with the GNU C Library; if not, see
  91478. + <http://www.gnu.org/licenses/>. */
  91479. #include <errno.h>
  91480. #include <semaphore.h>
  91481. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/dl-tls.h uClibc-git/libpthread/nptl/sysdeps/alpha/dl-tls.h
  91482. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/dl-tls.h 2012-05-15 09:20:09.000000000 +0200
  91483. +++ uClibc-git/libpthread/nptl/sysdeps/alpha/dl-tls.h 2014-07-25 20:36:08.893345617 +0200
  91484. @@ -13,9 +13,8 @@
  91485. Lesser General Public License for more details.
  91486. You should have received a copy of the GNU Lesser General Public
  91487. - License along with the GNU C Library; if not, write to the Free
  91488. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91489. - 02111-1307 USA. */
  91490. + License along with the GNU C Library; if not, see
  91491. + <http://www.gnu.org/licenses/>. */
  91492. /* Type used for the representation of TLS information in the GOT. */
  91493. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/elf/pt-initfini.c uClibc-git/libpthread/nptl/sysdeps/alpha/elf/pt-initfini.c
  91494. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/elf/pt-initfini.c 2012-05-15 09:20:09.000000000 +0200
  91495. +++ uClibc-git/libpthread/nptl/sysdeps/alpha/elf/pt-initfini.c 2014-07-25 20:36:08.905345680 +0200
  91496. @@ -13,9 +13,8 @@
  91497. Lesser General Public License for more details.
  91498. You should have received a copy of the GNU Lesser General Public
  91499. - License along with the GNU C Library; if not, write to the Free
  91500. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91501. - 02111-1307 USA. */
  91502. + License along with the GNU C Library; if not, see
  91503. + <http://www.gnu.org/licenses/>. */
  91504. /* This file is compiled into assembly code which is then munged by a sed
  91505. script into two files: crti.s and crtn.s.
  91506. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/jmpbuf-unwind.h uClibc-git/libpthread/nptl/sysdeps/alpha/jmpbuf-unwind.h
  91507. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/jmpbuf-unwind.h 2012-05-15 09:20:09.000000000 +0200
  91508. +++ uClibc-git/libpthread/nptl/sysdeps/alpha/jmpbuf-unwind.h 2014-07-25 20:36:08.905345680 +0200
  91509. @@ -13,9 +13,8 @@
  91510. Lesser General Public License for more details.
  91511. You should have received a copy of the GNU Lesser General Public
  91512. - License along with the GNU C Library; if not, write to the Free
  91513. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91514. - 02111-1307 USA. */
  91515. + License along with the GNU C Library; if not, see
  91516. + <http://www.gnu.org/licenses/>. */
  91517. #include <setjmp.h>
  91518. #include <stdint.h>
  91519. @@ -26,6 +25,3 @@
  91520. #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
  91521. ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
  91522. -
  91523. -/* We use the normal lobngjmp for unwinding. */
  91524. -#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
  91525. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/libc-tls.c uClibc-git/libpthread/nptl/sysdeps/alpha/libc-tls.c
  91526. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/libc-tls.c 2012-05-15 09:20:09.000000000 +0200
  91527. +++ uClibc-git/libpthread/nptl/sysdeps/alpha/libc-tls.c 2014-07-25 20:36:08.905345680 +0200
  91528. @@ -13,9 +13,8 @@
  91529. Lesser General Public License for more details.
  91530. You should have received a copy of the GNU Lesser General Public
  91531. - License along with the GNU C Library; if not, write to the Free
  91532. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91533. - 02111-1307 USA. */
  91534. + License along with the GNU C Library; if not, see
  91535. + <http://www.gnu.org/licenses/>. */
  91536. #include <sysdeps/generic/libc-tls.c>
  91537. #include <dl-tls.h>
  91538. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/Makefile uClibc-git/libpthread/nptl/sysdeps/alpha/Makefile
  91539. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/Makefile 2012-05-15 09:20:09.000000000 +0200
  91540. +++ uClibc-git/libpthread/nptl/sysdeps/alpha/Makefile 2014-07-25 20:36:08.893345617 +0200
  91541. @@ -12,9 +12,8 @@
  91542. # Lesser General Public License for more details.
  91543. #
  91544. # You should have received a copy of the GNU Lesser General Public
  91545. -# License along with the GNU C Library; if not, write to the Free
  91546. -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91547. -# 02111-1307 USA.
  91548. +# License along with the GNU C Library; see the file COPYING.LIB. If
  91549. +# not, see <http://www.gnu.org/licenses/>.
  91550. ifeq ($(subdir),csu)
  91551. gen-as-const-headers += tcb-offsets.sym
  91552. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/pthreaddef.h uClibc-git/libpthread/nptl/sysdeps/alpha/pthreaddef.h
  91553. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/pthreaddef.h 2012-05-15 09:20:09.000000000 +0200
  91554. +++ uClibc-git/libpthread/nptl/sysdeps/alpha/pthreaddef.h 2014-07-25 20:36:08.905345680 +0200
  91555. @@ -12,9 +12,8 @@
  91556. Lesser General Public License for more details.
  91557. You should have received a copy of the GNU Lesser General Public
  91558. - License along with the GNU C Library; if not, write to the Free
  91559. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91560. - 02111-1307 USA. */
  91561. + License along with the GNU C Library; if not, see
  91562. + <http://www.gnu.org/licenses/>. */
  91563. /* Default stack size. */
  91564. #define ARCH_STACK_DEFAULT_SIZE (4 * 1024 * 1024)
  91565. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/pthread_spin_lock.S uClibc-git/libpthread/nptl/sysdeps/alpha/pthread_spin_lock.S
  91566. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/pthread_spin_lock.S 2012-05-15 09:20:09.000000000 +0200
  91567. +++ uClibc-git/libpthread/nptl/sysdeps/alpha/pthread_spin_lock.S 2014-07-25 20:36:08.905345680 +0200
  91568. @@ -13,9 +13,8 @@
  91569. Lesser General Public License for more details.
  91570. You should have received a copy of the GNU Lesser General Public
  91571. - License along with the GNU C Library; if not, write to the Free
  91572. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91573. - 02111-1307 USA. */
  91574. + License along with the GNU C Library; if not, see
  91575. + <http://www.gnu.org/licenses/>. */
  91576. .text
  91577. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/pthread_spin_trylock.S uClibc-git/libpthread/nptl/sysdeps/alpha/pthread_spin_trylock.S
  91578. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/pthread_spin_trylock.S 2012-05-15 09:20:09.000000000 +0200
  91579. +++ uClibc-git/libpthread/nptl/sysdeps/alpha/pthread_spin_trylock.S 2014-07-25 20:36:08.905345680 +0200
  91580. @@ -13,9 +13,8 @@
  91581. Lesser General Public License for more details.
  91582. You should have received a copy of the GNU Lesser General Public
  91583. - License along with the GNU C Library; if not, write to the Free
  91584. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91585. - 02111-1307 USA. */
  91586. + License along with the GNU C Library; if not, see
  91587. + <http://www.gnu.org/licenses/>. */
  91588. #define _ERRNO_H 1
  91589. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/tls.h uClibc-git/libpthread/nptl/sysdeps/alpha/tls.h
  91590. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/alpha/tls.h 2012-05-15 09:20:09.000000000 +0200
  91591. +++ uClibc-git/libpthread/nptl/sysdeps/alpha/tls.h 2014-07-25 20:36:08.905345680 +0200
  91592. @@ -13,9 +13,8 @@
  91593. Lesser General Public License for more details.
  91594. You should have received a copy of the GNU Lesser General Public
  91595. - License along with the GNU C Library; if not, write to the Free
  91596. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91597. - 02111-1307 USA. */
  91598. + License along with the GNU C Library; if not, see
  91599. + <http://www.gnu.org/licenses/>. */
  91600. #ifndef _TLS_H
  91601. #define _TLS_H 1
  91602. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/dl-tls.h uClibc-git/libpthread/nptl/sysdeps/arm/dl-tls.h
  91603. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/dl-tls.h 2012-05-15 09:20:09.000000000 +0200
  91604. +++ uClibc-git/libpthread/nptl/sysdeps/arm/dl-tls.h 2014-07-25 20:36:08.921345764 +0200
  91605. @@ -13,9 +13,8 @@
  91606. Lesser General Public License for more details.
  91607. You should have received a copy of the GNU Lesser General Public
  91608. - License along with the GNU C Library; if not, write to the Free
  91609. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91610. - 02111-1307 USA. */
  91611. + License along with the GNU C Library; if not, see
  91612. + <http://www.gnu.org/licenses/>. */
  91613. /* Type used for the representation of TLS information in the GOT. */
  91614. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/jmpbuf-unwind.h uClibc-git/libpthread/nptl/sysdeps/arm/jmpbuf-unwind.h
  91615. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/jmpbuf-unwind.h 2012-05-15 09:20:09.000000000 +0200
  91616. +++ uClibc-git/libpthread/nptl/sysdeps/arm/jmpbuf-unwind.h 2014-07-25 20:36:08.921345764 +0200
  91617. @@ -12,9 +12,8 @@
  91618. Lesser General Public License for more details.
  91619. You should have received a copy of the GNU Lesser General Public
  91620. - License along with the GNU C Library; if not, write to the Free
  91621. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91622. - 02111-1307 USA. */
  91623. + License along with the GNU C Library; if not, see
  91624. + <http://www.gnu.org/licenses/>. */
  91625. #include <setjmp.h>
  91626. #include <stdint.h>
  91627. @@ -31,6 +30,3 @@
  91628. #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
  91629. ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[__JMP_BUF_SP] - (_adj))
  91630. -
  91631. -/* We use the normal longjmp for unwinding. */
  91632. -#define __libc_unwind_longjmp(buf, val) longjmp (buf, val)
  91633. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/libc-tls.c uClibc-git/libpthread/nptl/sysdeps/arm/libc-tls.c
  91634. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/libc-tls.c 2012-05-15 09:20:09.000000000 +0200
  91635. +++ uClibc-git/libpthread/nptl/sysdeps/arm/libc-tls.c 2014-07-25 20:36:08.921345764 +0200
  91636. @@ -13,9 +13,8 @@
  91637. Lesser General Public License for more details.
  91638. You should have received a copy of the GNU Lesser General Public
  91639. - License along with the GNU C Library; if not, write to the Free
  91640. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91641. - 02111-1307 USA. */
  91642. + License along with the GNU C Library; if not, see
  91643. + <http://www.gnu.org/licenses/>. */
  91644. #include <sysdeps/generic/libc-tls.c>
  91645. #include <dl-tls.h>
  91646. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/pthreaddef.h uClibc-git/libpthread/nptl/sysdeps/arm/pthreaddef.h
  91647. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/pthreaddef.h 2012-05-15 09:20:09.000000000 +0200
  91648. +++ uClibc-git/libpthread/nptl/sysdeps/arm/pthreaddef.h 2014-07-25 20:36:08.921345764 +0200
  91649. @@ -12,9 +12,8 @@
  91650. Lesser General Public License for more details.
  91651. You should have received a copy of the GNU Lesser General Public
  91652. - License along with the GNU C Library; if not, write to the Free
  91653. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91654. - 02111-1307 USA. */
  91655. + License along with the GNU C Library; if not, see
  91656. + <http://www.gnu.org/licenses/>. */
  91657. /* Default stack size. */
  91658. #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
  91659. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/pthread_spin_lock.S uClibc-git/libpthread/nptl/sysdeps/arm/pthread_spin_lock.S
  91660. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/pthread_spin_lock.S 2012-05-15 09:20:09.000000000 +0200
  91661. +++ uClibc-git/libpthread/nptl/sysdeps/arm/pthread_spin_lock.S 2014-07-25 20:36:08.921345764 +0200
  91662. @@ -12,9 +12,8 @@
  91663. Lesser General Public License for more details.
  91664. You should have received a copy of the GNU Lesser General Public
  91665. - License along with the GNU C Library; if not, write to the Free
  91666. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91667. - 02111-1307 USA. */
  91668. + License along with the GNU C Library; if not, see
  91669. + <http://www.gnu.org/licenses/>. */
  91670. #include <sysdep.h>
  91671. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/pthread_spin_trylock.S uClibc-git/libpthread/nptl/sysdeps/arm/pthread_spin_trylock.S
  91672. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/pthread_spin_trylock.S 2012-05-15 09:20:09.000000000 +0200
  91673. +++ uClibc-git/libpthread/nptl/sysdeps/arm/pthread_spin_trylock.S 2014-07-25 20:36:08.921345764 +0200
  91674. @@ -12,9 +12,8 @@
  91675. Lesser General Public License for more details.
  91676. You should have received a copy of the GNU Lesser General Public
  91677. - License along with the GNU C Library; if not, write to the Free
  91678. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91679. - 02111-1307 USA. */
  91680. + License along with the GNU C Library; if not, see
  91681. + <http://www.gnu.org/licenses/>. */
  91682. #define _ERRNO_H 1
  91683. #include <bits/errno.h>
  91684. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/tls.h uClibc-git/libpthread/nptl/sysdeps/arm/tls.h
  91685. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/arm/tls.h 2012-05-15 09:20:09.000000000 +0200
  91686. +++ uClibc-git/libpthread/nptl/sysdeps/arm/tls.h 2014-07-25 20:36:08.921345764 +0200
  91687. @@ -13,9 +13,8 @@
  91688. Lesser General Public License for more details.
  91689. You should have received a copy of the GNU Lesser General Public
  91690. - License along with the GNU C Library; if not, write to the Free
  91691. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91692. - 02111-1307 USA. */
  91693. + License along with the GNU C Library; if not, see
  91694. + <http://www.gnu.org/licenses/>. */
  91695. #ifndef _TLS_H
  91696. #define _TLS_H 1
  91697. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/generic/dl-tls.c uClibc-git/libpthread/nptl/sysdeps/generic/dl-tls.c
  91698. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/generic/dl-tls.c 2012-05-15 09:20:09.000000000 +0200
  91699. +++ uClibc-git/libpthread/nptl/sysdeps/generic/dl-tls.c 2014-07-25 20:36:08.937345847 +0200
  91700. @@ -13,9 +13,8 @@
  91701. Lesser General Public License for more details.
  91702. You should have received a copy of the GNU Lesser General Public
  91703. - License along with the GNU C Library; if not, write to the Free
  91704. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91705. - 02111-1307 USA. */
  91706. + License along with the GNU C Library; if not, see
  91707. + <http://www.gnu.org/licenses/>. */
  91708. #if defined SHARED || defined NOT_IN_libc
  91709. # error in buildsystem: This file is for libc.a
  91710. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/generic/libc-tls.c uClibc-git/libpthread/nptl/sysdeps/generic/libc-tls.c
  91711. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/generic/libc-tls.c 2012-05-15 09:20:09.000000000 +0200
  91712. +++ uClibc-git/libpthread/nptl/sysdeps/generic/libc-tls.c 2014-07-25 20:36:08.937345847 +0200
  91713. @@ -13,9 +13,8 @@
  91714. Lesser General Public License for more details.
  91715. You should have received a copy of the GNU Lesser General Public
  91716. - License along with the GNU C Library; if not, write to the Free
  91717. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91718. - 02111-1307 USA. */
  91719. + License along with the GNU C Library; if not, see
  91720. + <http://www.gnu.org/licenses/>. */
  91721. #include <errno.h>
  91722. #include <ldsodefs.h>
  91723. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/generic/lowlevellock.h uClibc-git/libpthread/nptl/sysdeps/generic/lowlevellock.h
  91724. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/generic/lowlevellock.h 2012-05-15 09:20:09.000000000 +0200
  91725. +++ uClibc-git/libpthread/nptl/sysdeps/generic/lowlevellock.h 2014-07-25 20:36:08.937345847 +0200
  91726. @@ -14,9 +14,8 @@
  91727. Lesser General Public License for more details.
  91728. You should have received a copy of the GNU Lesser General Public
  91729. - License along with the GNU C Library; if not, write to the Free
  91730. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91731. - 02111-1307 USA. */
  91732. + License along with the GNU C Library; if not, see
  91733. + <http://www.gnu.org/licenses/>. */
  91734. #include <atomic.h>
  91735. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/dl-tls.h uClibc-git/libpthread/nptl/sysdeps/i386/dl-tls.h
  91736. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/dl-tls.h 2012-05-15 09:20:09.000000000 +0200
  91737. +++ uClibc-git/libpthread/nptl/sysdeps/i386/dl-tls.h 2014-07-25 20:36:08.953345931 +0200
  91738. @@ -13,9 +13,8 @@
  91739. Lesser General Public License for more details.
  91740. You should have received a copy of the GNU Lesser General Public
  91741. - License along with the GNU C Library; if not, write to the Free
  91742. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91743. - 02111-1307 USA. */
  91744. + License along with the GNU C Library; if not, see
  91745. + <http://www.gnu.org/licenses/>. */
  91746. /* Type used for the representation of TLS information in the GOT. */
  91747. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/i486/pthread_spin_trylock.S uClibc-git/libpthread/nptl/sysdeps/i386/i486/pthread_spin_trylock.S
  91748. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/i486/pthread_spin_trylock.S 2012-05-15 09:20:09.000000000 +0200
  91749. +++ uClibc-git/libpthread/nptl/sysdeps/i386/i486/pthread_spin_trylock.S 2014-07-25 20:36:08.969346015 +0200
  91750. @@ -13,9 +13,8 @@
  91751. Lesser General Public License for more details.
  91752. You should have received a copy of the GNU Lesser General Public
  91753. - License along with the GNU C Library; if not, write to the Free
  91754. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91755. - 02111-1307 USA. */
  91756. + License along with the GNU C Library; if not, see
  91757. + <http://www.gnu.org/licenses/>. */
  91758. #include <pthread-errnos.h>
  91759. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/i586/pthread_spin_trylock.S uClibc-git/libpthread/nptl/sysdeps/i386/i586/pthread_spin_trylock.S
  91760. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/i586/pthread_spin_trylock.S 2012-05-15 09:20:09.000000000 +0200
  91761. +++ uClibc-git/libpthread/nptl/sysdeps/i386/i586/pthread_spin_trylock.S 2014-07-25 20:36:08.989346120 +0200
  91762. @@ -13,8 +13,7 @@
  91763. Lesser General Public License for more details.
  91764. You should have received a copy of the GNU Lesser General Public
  91765. - License along with the GNU C Library; if not, write to the Free
  91766. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91767. - 02111-1307 USA. */
  91768. + License along with the GNU C Library; if not, see
  91769. + <http://www.gnu.org/licenses/>. */
  91770. #include "../i486/pthread_spin_trylock.S"
  91771. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/i686/Makefile uClibc-git/libpthread/nptl/sysdeps/i386/i686/Makefile
  91772. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/i686/Makefile 2012-05-15 09:20:09.000000000 +0200
  91773. +++ uClibc-git/libpthread/nptl/sysdeps/i386/i686/Makefile 2014-07-25 20:36:08.997346163 +0200
  91774. @@ -13,9 +13,8 @@
  91775. # Lesser General Public License for more details.
  91776. # You should have received a copy of the GNU Lesser General Public
  91777. -# License along with the GNU C Library; if not, write to the Free
  91778. -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91779. -# 02111-1307 USA.
  91780. +# License along with the GNU C Library; see the file COPYING.LIB. If
  91781. +# not, see <http://www.gnu.org/licenses/>.
  91782. ifeq ($(subdir),nptl)
  91783. # It turns out that stack coloring is in general not good on P4s. Some
  91784. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/i686/pthread_spin_trylock.S uClibc-git/libpthread/nptl/sysdeps/i386/i686/pthread_spin_trylock.S
  91785. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/i686/pthread_spin_trylock.S 2012-05-15 09:20:09.000000000 +0200
  91786. +++ uClibc-git/libpthread/nptl/sysdeps/i386/i686/pthread_spin_trylock.S 2014-07-25 20:36:08.997346163 +0200
  91787. @@ -13,9 +13,8 @@
  91788. Lesser General Public License for more details.
  91789. You should have received a copy of the GNU Lesser General Public
  91790. - License along with the GNU C Library; if not, write to the Free
  91791. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91792. - 02111-1307 USA. */
  91793. + License along with the GNU C Library; if not, see
  91794. + <http://www.gnu.org/licenses/>. */
  91795. #define HAVE_CMOV 1
  91796. #include "../i486/pthread_spin_trylock.S"
  91797. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/i686/tls.h uClibc-git/libpthread/nptl/sysdeps/i386/i686/tls.h
  91798. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/i686/tls.h 2012-05-15 09:20:09.000000000 +0200
  91799. +++ uClibc-git/libpthread/nptl/sysdeps/i386/i686/tls.h 2014-07-25 20:36:08.997346163 +0200
  91800. @@ -13,9 +13,8 @@
  91801. Lesser General Public License for more details.
  91802. You should have received a copy of the GNU Lesser General Public
  91803. - License along with the GNU C Library; if not, write to the Free
  91804. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91805. - 02111-1307 USA. */
  91806. + License along with the GNU C Library; if not, see
  91807. + <http://www.gnu.org/licenses/>. */
  91808. #ifndef _TLS_H
  91809. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/jmpbuf-unwind.h uClibc-git/libpthread/nptl/sysdeps/i386/jmpbuf-unwind.h
  91810. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/jmpbuf-unwind.h 2012-05-15 09:20:09.000000000 +0200
  91811. +++ uClibc-git/libpthread/nptl/sysdeps/i386/jmpbuf-unwind.h 2014-07-25 20:36:08.997346163 +0200
  91812. @@ -13,9 +13,8 @@
  91813. Lesser General Public License for more details.
  91814. You should have received a copy of the GNU Lesser General Public
  91815. - License along with the GNU C Library; if not, write to the Free
  91816. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91817. - 02111-1307 USA. */
  91818. + License along with the GNU C Library; if not, see
  91819. + <http://www.gnu.org/licenses/>. */
  91820. #include <setjmp.h>
  91821. #include <stdint.h>
  91822. @@ -26,7 +25,3 @@
  91823. #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
  91824. ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
  91825. -
  91826. -/* We use the normal lobngjmp for unwinding. */
  91827. -extern __typeof(longjmp) __libc_longjmp attribute_noreturn;
  91828. -#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
  91829. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/Makefile uClibc-git/libpthread/nptl/sysdeps/i386/Makefile
  91830. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/Makefile 2012-05-15 09:20:09.000000000 +0200
  91831. +++ uClibc-git/libpthread/nptl/sysdeps/i386/Makefile 2014-07-25 20:36:08.953345931 +0200
  91832. @@ -12,9 +12,8 @@
  91833. # Lesser General Public License for more details.
  91834. # You should have received a copy of the GNU Lesser General Public
  91835. -# License along with the GNU C Library; if not, write to the Free
  91836. -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91837. -# 02111-1307 USA.
  91838. +# License along with the GNU C Library; see the file COPYING.LIB. If
  91839. +# not, see <http://www.gnu.org/licenses/>.
  91840. ifeq ($(subdir),csu)
  91841. gen-as-const-headers += tcb-offsets.sym
  91842. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/pthreaddef.h uClibc-git/libpthread/nptl/sysdeps/i386/pthreaddef.h
  91843. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/pthreaddef.h 2012-05-15 09:20:09.000000000 +0200
  91844. +++ uClibc-git/libpthread/nptl/sysdeps/i386/pthreaddef.h 2014-07-25 20:36:08.997346163 +0200
  91845. @@ -13,9 +13,8 @@
  91846. Lesser General Public License for more details.
  91847. You should have received a copy of the GNU Lesser General Public
  91848. - License along with the GNU C Library; if not, write to the Free
  91849. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91850. - 02111-1307 USA. */
  91851. + License along with the GNU C Library; if not, see
  91852. + <http://www.gnu.org/licenses/>. */
  91853. /* Default stack size. */
  91854. #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
  91855. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/pthread_spin_init.c uClibc-git/libpthread/nptl/sysdeps/i386/pthread_spin_init.c
  91856. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/pthread_spin_init.c 2012-05-15 09:20:09.000000000 +0200
  91857. +++ uClibc-git/libpthread/nptl/sysdeps/i386/pthread_spin_init.c 2014-07-25 20:36:08.997346163 +0200
  91858. @@ -13,8 +13,7 @@
  91859. Lesser General Public License for more details.
  91860. You should have received a copy of the GNU Lesser General Public
  91861. - License along with the GNU C Library; if not, write to the Free
  91862. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91863. - 02111-1307 USA. */
  91864. + License along with the GNU C Library; if not, see
  91865. + <http://www.gnu.org/licenses/>. */
  91866. /* Not needed. pthread_spin_init is an alias for pthread_spin_unlock. */
  91867. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/pthread_spin_lock.c uClibc-git/libpthread/nptl/sysdeps/i386/pthread_spin_lock.c
  91868. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/pthread_spin_lock.c 2012-05-15 09:20:09.000000000 +0200
  91869. +++ uClibc-git/libpthread/nptl/sysdeps/i386/pthread_spin_lock.c 2014-07-25 20:36:08.997346163 +0200
  91870. @@ -13,9 +13,8 @@
  91871. Lesser General Public License for more details.
  91872. You should have received a copy of the GNU Lesser General Public
  91873. - License along with the GNU C Library; if not, write to the Free
  91874. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91875. - 02111-1307 USA. */
  91876. + License along with the GNU C Library; if not, see
  91877. + <http://www.gnu.org/licenses/>. */
  91878. #include "pthreadP.h"
  91879. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/pthread_spin_unlock.S uClibc-git/libpthread/nptl/sysdeps/i386/pthread_spin_unlock.S
  91880. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/pthread_spin_unlock.S 2012-05-15 09:20:09.000000000 +0200
  91881. +++ uClibc-git/libpthread/nptl/sysdeps/i386/pthread_spin_unlock.S 2014-07-25 20:36:08.997346163 +0200
  91882. @@ -13,9 +13,8 @@
  91883. Lesser General Public License for more details.
  91884. You should have received a copy of the GNU Lesser General Public
  91885. - License along with the GNU C Library; if not, write to the Free
  91886. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91887. - 02111-1307 USA. */
  91888. + License along with the GNU C Library; if not, see
  91889. + <http://www.gnu.org/licenses/>. */
  91890. .globl pthread_spin_unlock
  91891. .type pthread_spin_unlock,@function
  91892. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/tls.h uClibc-git/libpthread/nptl/sysdeps/i386/tls.h
  91893. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/i386/tls.h 2012-05-15 09:20:09.000000000 +0200
  91894. +++ uClibc-git/libpthread/nptl/sysdeps/i386/tls.h 2014-07-25 20:36:09.001346183 +0200
  91895. @@ -13,9 +13,8 @@
  91896. Lesser General Public License for more details.
  91897. You should have received a copy of the GNU Lesser General Public
  91898. - License along with the GNU C Library; if not, write to the Free
  91899. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91900. - 02111-1307 USA. */
  91901. + License along with the GNU C Library; if not, see
  91902. + <http://www.gnu.org/licenses/>. */
  91903. #ifndef _TLS_H
  91904. #define _TLS_H 1
  91905. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/Makefile.commonarch uClibc-git/libpthread/nptl/sysdeps/Makefile.commonarch
  91906. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/Makefile.commonarch 2012-05-15 09:20:09.000000000 +0200
  91907. +++ uClibc-git/libpthread/nptl/sysdeps/Makefile.commonarch 2014-07-25 20:36:08.869345492 +0200
  91908. @@ -47,9 +47,8 @@
  91909. $(libpthread_arch_OUT)/gen_tcb-offsets.s: $(libpthread_arch_OUT)/gen_tcb-offsets.c | headers
  91910. $(compile.c)
  91911. libpthread-generated-y += $(libpthread_arch_OUT)/gen_tcb-offsets.s
  91912. -PTHREAD_TCB_OFFSET_MANGLE ?= -n "s/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*\$$/\#define \1 \2/p"
  91913. $(libpthread_arch_OUT)/tcb-offsets.h: $(libpthread_arch_OUT)/gen_tcb-offsets.s
  91914. - $(do_sed) $(PTHREAD_TCB_OFFSET_MANGLE) $< > $@
  91915. + $(do_sed) $(PTHREAD_GENERATE_MANGLE) $< > $@
  91916. @if test ! -s $@ ; then rm -f $@ ; false ; fi
  91917. pregen-headers-$(UCLIBC_HAS_THREADS_NATIVE) += $(libpthread_arch_OUT)/tcb-offsets.h
  91918. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/dl-tls.h uClibc-git/libpthread/nptl/sysdeps/metag/dl-tls.h
  91919. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/dl-tls.h 1970-01-01 01:00:00.000000000 +0100
  91920. +++ uClibc-git/libpthread/nptl/sysdeps/metag/dl-tls.h 2014-07-25 20:36:09.017346267 +0200
  91921. @@ -0,0 +1,29 @@
  91922. +/* Thread-local storage handling in the ELF dynamic linker. Meta version.
  91923. + Copyright (C) 2002 Free Software Foundation, Inc.
  91924. + This file is part of the GNU C Library.
  91925. +
  91926. + The GNU C Library is free software; you can redistribute it and/or
  91927. + modify it under the terms of the GNU Lesser General Public
  91928. + License as published by the Free Software Foundation; either
  91929. + version 2.1 of the License, or (at your option) any later version.
  91930. +
  91931. + The GNU C Library is distributed in the hope that it will be useful,
  91932. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  91933. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  91934. + Lesser General Public License for more details.
  91935. +
  91936. + You should have received a copy of the GNU Lesser General Public
  91937. + License along with the GNU C Library; if not, write to the Free
  91938. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91939. + 02111-1307 USA. */
  91940. +
  91941. +
  91942. +/* Type used for the representation of TLS information in the GOT. */
  91943. +typedef struct
  91944. +{
  91945. + unsigned long int ti_module;
  91946. + unsigned long int ti_offset;
  91947. +} tls_index;
  91948. +
  91949. +
  91950. +extern void *__tls_get_addr (tls_index *ti);
  91951. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/jmpbuf-unwind.h uClibc-git/libpthread/nptl/sysdeps/metag/jmpbuf-unwind.h
  91952. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/jmpbuf-unwind.h 1970-01-01 01:00:00.000000000 +0100
  91953. +++ uClibc-git/libpthread/nptl/sysdeps/metag/jmpbuf-unwind.h 2014-07-25 20:36:09.017346267 +0200
  91954. @@ -0,0 +1,36 @@
  91955. +/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
  91956. + This file is part of the GNU C Library.
  91957. + Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
  91958. +
  91959. + The GNU C Library is free software; you can redistribute it and/or
  91960. + modify it under the terms of the GNU Lesser General Public
  91961. + License as published by the Free Software Foundation; either
  91962. + version 2.1 of the License, or (at your option) any later version.
  91963. +
  91964. + The GNU C Library is distributed in the hope that it will be useful,
  91965. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  91966. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  91967. + Lesser General Public License for more details.
  91968. +
  91969. + You should have received a copy of the GNU Lesser General Public
  91970. + License along with the GNU C Library; if not, write to the Free
  91971. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  91972. + 02111-1307 USA. */
  91973. +
  91974. +#include <setjmp.h>
  91975. +#include <stdint.h>
  91976. +#include <unwind.h>
  91977. +
  91978. +/* Test if longjmp to JMPBUF would unwind the frame
  91979. + containing a local variable at ADDRESS. */
  91980. +#undef _JMPBUF_UNWINDS
  91981. +#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
  91982. + ((void *) (address) > (void *) demangle (jmpbuf[JB_SP]))
  91983. +
  91984. +#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
  91985. + _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
  91986. +
  91987. +#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
  91988. + ((uintptr_t) (_address) - (_adj) > (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
  91989. +
  91990. +#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
  91991. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/libc-tls.c uClibc-git/libpthread/nptl/sysdeps/metag/libc-tls.c
  91992. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/libc-tls.c 1970-01-01 01:00:00.000000000 +0100
  91993. +++ uClibc-git/libpthread/nptl/sysdeps/metag/libc-tls.c 2014-07-25 20:36:09.017346267 +0200
  91994. @@ -0,0 +1,33 @@
  91995. +/*
  91996. + * Thread-local storage handling in statically linked binaries. Meta version.
  91997. + * Copyright (C) 2009 Free Software Foundation, Inc.
  91998. + *
  91999. + * Based on GNU C Library (file: libc/sysdeps/sh/libc-tls.c)
  92000. + *
  92001. + * Copyright (C) 2010 STMicroelectronics Ltd.
  92002. + * Copyright (C) 2013 Imagination Technologies Ltd.
  92003. + *
  92004. + * Author: Filippo Arcidiacono <filippo.arcidiacono@st.com>
  92005. + *
  92006. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  92007. + *
  92008. + */
  92009. +
  92010. +#include <sysdeps/generic/libc-tls.c>
  92011. +#include <dl-tls.h>
  92012. +
  92013. +#if defined (USE_TLS) && (USE_TLS)
  92014. +
  92015. +/* On Meta, linker optimizations are not required, so __tls_get_addr
  92016. + can be called even in statically linked binaries. In this case module
  92017. + must be always 1 and PT_TLS segment exist in the binary, otherwise it
  92018. + would not link. */
  92019. +
  92020. +void *
  92021. +__tls_get_addr (tls_index *ti)
  92022. +{
  92023. + dtv_t *dtv = THREAD_DTV ();
  92024. + return (char *) dtv[1].pointer.val + ti->ti_offset;
  92025. +}
  92026. +
  92027. +#endif
  92028. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/Makefile.arch uClibc-git/libpthread/nptl/sysdeps/metag/Makefile.arch
  92029. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/Makefile.arch 1970-01-01 01:00:00.000000000 +0100
  92030. +++ uClibc-git/libpthread/nptl/sysdeps/metag/Makefile.arch 2014-07-25 20:36:09.017346267 +0200
  92031. @@ -0,0 +1,17 @@
  92032. +# Makefile for uClibc NPTL
  92033. +#
  92034. +# Copyright (C) 2005 Steven J. Hill <sjhill@uclibc.org>
  92035. +#
  92036. +# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  92037. +#
  92038. +
  92039. +CFLAGS-pthread_spin_init.c = -DNOT_IN_libc -DIS_IN_libpthread
  92040. +ASFLAGS-pthread_spin_lock.S = -DNOT_IN_libc -DIS_IN_libpthread
  92041. +ASFLAGS-pthread_spin_unlock.S = -DNOT_IN_libc -DIS_IN_libpthread
  92042. +ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc -DIS_IN_libpthread
  92043. +
  92044. +ASFLAGS-pthread_spin_lock.c += -D_GNU_SOURCE
  92045. +
  92046. +CFLAGS-metag = $(SSP_ALL_CFLAGS)
  92047. +
  92048. +libc_arch_a_CSRC := libc-tls.c
  92049. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/metag_load_tp.S uClibc-git/libpthread/nptl/sysdeps/metag/metag_load_tp.S
  92050. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/metag_load_tp.S 1970-01-01 01:00:00.000000000 +0100
  92051. +++ uClibc-git/libpthread/nptl/sysdeps/metag/metag_load_tp.S 2014-07-25 20:36:09.017346267 +0200
  92052. @@ -0,0 +1,7 @@
  92053. +/*
  92054. + * Copyright (C) 2013 Imagination Technologies Ltd.
  92055. + *
  92056. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  92057. + */
  92058. +
  92059. +#include <../../../../ldso/ldso/metag/metag_load_tp.S>
  92060. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/pthreaddef.h uClibc-git/libpthread/nptl/sysdeps/metag/pthreaddef.h
  92061. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/pthreaddef.h 1970-01-01 01:00:00.000000000 +0100
  92062. +++ uClibc-git/libpthread/nptl/sysdeps/metag/pthreaddef.h 2014-07-25 20:36:09.017346267 +0200
  92063. @@ -0,0 +1,40 @@
  92064. +/* Copyright (C) 2003 Free Software Foundation, Inc.
  92065. + This file is part of the GNU C Library.
  92066. +
  92067. + The GNU C Library is free software; you can redistribute it and/or
  92068. + modify it under the terms of the GNU Lesser General Public
  92069. + License as published by the Free Software Foundation; either
  92070. + version 2.1 of the License, or (at your option) any later version.
  92071. +
  92072. + The GNU C Library is distributed in the hope that it will be useful,
  92073. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  92074. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  92075. + Lesser General Public License for more details.
  92076. +
  92077. + You should have received a copy of the GNU Lesser General Public
  92078. + License along with the GNU C Library; if not, write to the Free
  92079. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92080. + 02111-1307 USA. */
  92081. +
  92082. +#include <sysdep.h>
  92083. +
  92084. +/* Default stack size. */
  92085. +#define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
  92086. +
  92087. +/* Required stack pointer alignment at beginning. */
  92088. +#define STACK_ALIGN 8
  92089. +
  92090. +/* Minimal stack size after allocating thread descriptor and guard size. */
  92091. +#define MINIMAL_REST_STACK 2048
  92092. +
  92093. +/* Alignment requirement for TCB. */
  92094. +#define TCB_ALIGNMENT 8
  92095. +
  92096. +
  92097. +/* Location of current stack frame. */
  92098. +#define CURRENT_STACK_FRAME __builtin_frame_address (0)
  92099. +
  92100. +
  92101. +/* XXX Until we have a better place keep the definitions here. */
  92102. +#define __exit_thread_inline(val) \
  92103. + INLINE_SYSCALL (exit, 1, (val))
  92104. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/pthread_spin_init.c uClibc-git/libpthread/nptl/sysdeps/metag/pthread_spin_init.c
  92105. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/pthread_spin_init.c 1970-01-01 01:00:00.000000000 +0100
  92106. +++ uClibc-git/libpthread/nptl/sysdeps/metag/pthread_spin_init.c 2014-07-25 20:36:09.017346267 +0200
  92107. @@ -0,0 +1,20 @@
  92108. +/* Copyright (C) 2002 Free Software Foundation, Inc.
  92109. + This file is part of the GNU C Library.
  92110. + Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
  92111. +
  92112. + The GNU C Library is free software; you can redistribute it and/or
  92113. + modify it under the terms of the GNU Lesser General Public
  92114. + License as published by the Free Software Foundation; either
  92115. + version 2.1 of the License, or (at your option) any later version.
  92116. +
  92117. + The GNU C Library is distributed in the hope that it will be useful,
  92118. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  92119. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  92120. + Lesser General Public License for more details.
  92121. +
  92122. + You should have received a copy of the GNU Lesser General Public
  92123. + License along with the GNU C Library; if not, write to the Free
  92124. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92125. + 02111-1307 USA. */
  92126. +
  92127. +/* Not needed. pthread_spin_init is an alias for pthread_spin_unlock. */
  92128. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/pthread_spin_lock.S uClibc-git/libpthread/nptl/sysdeps/metag/pthread_spin_lock.S
  92129. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/pthread_spin_lock.S 1970-01-01 01:00:00.000000000 +0100
  92130. +++ uClibc-git/libpthread/nptl/sysdeps/metag/pthread_spin_lock.S 2014-07-25 20:36:09.017346267 +0200
  92131. @@ -0,0 +1,20 @@
  92132. +! Copyright (C) 2013 Imagination Technologies Ltd.
  92133. +
  92134. +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  92135. +
  92136. + .text
  92137. + .global _pthread_spin_lock
  92138. + .type _pthread_spin_lock,function
  92139. +_pthread_spin_lock:
  92140. +1: LNKGETD D0Ar2, [D1Ar1]
  92141. + CMP D0Ar2, #0
  92142. + ADD D0Ar2, D0Ar2, #1
  92143. + LNKSETDEQ [D1Ar1], D0Ar2
  92144. + BNE 1b
  92145. + DEFR D0Ar2, TXSTAT
  92146. + ANDT D0Ar2, D0Ar2, #HI(0x3f000000)
  92147. + CMPT D0Ar2, #HI(0x02000000)
  92148. + BNZ 1b
  92149. + MOV D0Re0, #0
  92150. + MOV PC, D1RtP
  92151. + .size _pthread_spin_lock,.-_pthread_spin_lock
  92152. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/pthread_spin_trylock.S uClibc-git/libpthread/nptl/sysdeps/metag/pthread_spin_trylock.S
  92153. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/pthread_spin_trylock.S 1970-01-01 01:00:00.000000000 +0100
  92154. +++ uClibc-git/libpthread/nptl/sysdeps/metag/pthread_spin_trylock.S 2014-07-25 20:36:09.017346267 +0200
  92155. @@ -0,0 +1,24 @@
  92156. +! Copyright (C) 2013 Imagination Technologies Ltd.
  92157. +
  92158. +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  92159. +
  92160. +#include <pthread-errnos.h>
  92161. +
  92162. + .text
  92163. + .global _pthread_spin_trylock
  92164. + .type _pthread_spin_trylock,function
  92165. +_pthread_spin_trylock:
  92166. +1: MOVT D0Re0, #HI(#EBUSY)
  92167. + ADD D0Re0, D0Re0, #LO(#EBUSY)
  92168. + LNKGETD D0Ar2, [D1Ar1]
  92169. + CMP D0Ar2, #0
  92170. + ADD D0Ar2, D0Ar2, #1
  92171. + LNKSETDEQ [D1Ar1], D0Ar2
  92172. + BNE 2f
  92173. + DEFR D0Ar2, TXSTAT
  92174. + ANDT D0Ar2, D0Ar2, #HI(0x3f000000)
  92175. + CMPT D0Ar2, #HI(0x02000000)
  92176. + BNZ 1b
  92177. + MOV D0Re0, #0
  92178. +2: MOV PC, D1RtP
  92179. + .size _pthread_spin_trylock,.-_pthread_spin_trylock
  92180. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/pthread_spin_unlock.S uClibc-git/libpthread/nptl/sysdeps/metag/pthread_spin_unlock.S
  92181. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/pthread_spin_unlock.S 1970-01-01 01:00:00.000000000 +0100
  92182. +++ uClibc-git/libpthread/nptl/sysdeps/metag/pthread_spin_unlock.S 2014-07-25 20:36:09.017346267 +0200
  92183. @@ -0,0 +1,16 @@
  92184. +! Copyright (C) 2013 Imagination Technologies Ltd.
  92185. +
  92186. +! Licensed under LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  92187. +
  92188. + .text
  92189. + .global _pthread_spin_unlock
  92190. + .type _pthread_spin_unlock,function
  92191. +_pthread_spin_unlock:
  92192. + MOV D0Re0, #0
  92193. + SETD [D1Ar1], D0Re0
  92194. + MOV PC, D1RtP
  92195. + .size _pthread_spin_unlock,.-_pthread_spin_unlock
  92196. +
  92197. + /* The implementation of pthread_spin_init is identical. */
  92198. + .global _pthread_spin_init
  92199. +_pthread_spin_init = _pthread_spin_unlock
  92200. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/tcb-offsets.sym uClibc-git/libpthread/nptl/sysdeps/metag/tcb-offsets.sym
  92201. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/tcb-offsets.sym 1970-01-01 01:00:00.000000000 +0100
  92202. +++ uClibc-git/libpthread/nptl/sysdeps/metag/tcb-offsets.sym 2014-07-25 20:36:09.017346267 +0200
  92203. @@ -0,0 +1,15 @@
  92204. +#include <sysdep.h>
  92205. +#include <tls.h>
  92206. +
  92207. +RESULT offsetof (struct pthread, result)
  92208. +TID offsetof (struct pthread, tid)
  92209. +PID offsetof (struct pthread, pid)
  92210. +CANCELHANDLING offsetof (struct pthread, cancelhandling)
  92211. +CLEANUP_JMP_BUF offsetof (struct pthread, cleanup_jmp_buf)
  92212. +MULTIPLE_THREADS_OFFSET offsetof (struct pthread, header.multiple_threads)
  92213. +TLS_PRE_TCB_SIZE sizeof (struct pthread)
  92214. +MUTEX_FUTEX offsetof (pthread_mutex_t, __data.__lock)
  92215. +POINTER_GUARD offsetof (tcbhead_t, pointer_guard)
  92216. +#ifndef __ASSUME_PRIVATE_FUTEX
  92217. +PRIVATE_FUTEX offsetof (struct pthread, header.private_futex)
  92218. +#endif
  92219. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/tls.h uClibc-git/libpthread/nptl/sysdeps/metag/tls.h
  92220. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/metag/tls.h 1970-01-01 01:00:00.000000000 +0100
  92221. +++ uClibc-git/libpthread/nptl/sysdeps/metag/tls.h 2014-07-25 20:36:09.017346267 +0200
  92222. @@ -0,0 +1,163 @@
  92223. +/* Definition for thread-local data handling. NPTL/Meta version.
  92224. + Copyright (C) 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
  92225. + This file is part of the GNU C Library.
  92226. +
  92227. + The GNU C Library is free software; you can redistribute it and/or
  92228. + modify it under the terms of the GNU Lesser General Public
  92229. + License as published by the Free Software Foundation; either
  92230. + version 2.1 of the License, or (at your option) any later version.
  92231. +
  92232. + The GNU C Library is distributed in the hope that it will be useful,
  92233. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  92234. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  92235. + Lesser General Public License for more details.
  92236. +
  92237. + You should have received a copy of the GNU Lesser General Public
  92238. + License along with the GNU C Library; if not, write to the Free
  92239. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92240. + 02111-1307 USA. */
  92241. +
  92242. +#ifndef _TLS_H
  92243. +#define _TLS_H
  92244. +
  92245. +#ifndef __ASSEMBLER__
  92246. +# include <stdbool.h>
  92247. +# include <stddef.h>
  92248. +# include <stdint.h>
  92249. +# include <stdlib.h>
  92250. +# include <list.h>
  92251. +# include <sysdep.h>
  92252. +# include <bits/kernel-features.h>
  92253. +
  92254. +/* Type for the dtv. */
  92255. +typedef union dtv
  92256. +{
  92257. + size_t counter;
  92258. + struct
  92259. + {
  92260. + void *val;
  92261. + bool is_static;
  92262. + } pointer;
  92263. +} dtv_t;
  92264. +
  92265. +typedef struct
  92266. +{
  92267. + dtv_t *dtv;
  92268. + uintptr_t pointer_guard;
  92269. +} tcbhead_t;
  92270. +
  92271. +# define TLS_MULTIPLE_THREADS_IN_TCB 1
  92272. +
  92273. +#else /* __ASSEMBLER__ */
  92274. +# include <tcb-offsets.h>
  92275. +#endif /* __ASSEMBLER__ */
  92276. +
  92277. +
  92278. +/* We require TLS support in the tools. */
  92279. +#define HAVE_TLS_SUPPORT
  92280. +#define HAVE___THREAD 1
  92281. +#define HAVE_TLS_MODEL_ATTRIBUTE 1
  92282. +/* Signal that TLS support is available. */
  92283. +# define USE_TLS 1
  92284. +
  92285. +#ifndef __ASSEMBLER__
  92286. +
  92287. +/* Get system call information. */
  92288. +# include <sysdep.h>
  92289. +
  92290. +/* This is the size of the initial TCB. */
  92291. +# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
  92292. +
  92293. +/* Alignment requirements for the initial TCB. */
  92294. +# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t)
  92295. +
  92296. +/* This is the size of the TCB. */
  92297. +# define TLS_TCB_SIZE sizeof (tcbhead_t)
  92298. +
  92299. +/* This is the size we need before TCB. */
  92300. +# define TLS_PRE_TCB_SIZE sizeof (struct pthread)
  92301. +
  92302. +/* Alignment requirements for the TCB. */
  92303. +# define TLS_TCB_ALIGN __alignof__ (struct pthread)
  92304. +
  92305. +/* The TLS blocks start right after the TCB. */
  92306. +# define TLS_DTV_AT_TP 1
  92307. +
  92308. +/* Get the thread descriptor definition. */
  92309. +# include <descr.h>
  92310. +
  92311. +/* Install the dtv pointer. The pointer passed is to the element with
  92312. + index -1 which contain the length. */
  92313. +# define INSTALL_DTV(tcbp, dtvp) \
  92314. + ((tcbhead_t *) (tcbp))->dtv = (dtvp) + 1
  92315. +
  92316. +/* Install new dtv for current thread. */
  92317. +# define INSTALL_NEW_DTV(dtv) \
  92318. + (((tcbhead_t *)__builtin_thread_pointer ())->dtv = (dtv))
  92319. +
  92320. +/* Return dtv of given thread descriptor. */
  92321. +# define GET_DTV(tcbp) \
  92322. + (((tcbhead_t *) (tcbp))->dtv)
  92323. +
  92324. +/* Code to initially initialize the thread pointer. This might need
  92325. + special attention since 'errno' is not yet available and if the
  92326. + operation can cause a failure 'errno' must not be touched. */
  92327. +# define TLS_INIT_TP(tcbp, secondcall) \
  92328. + ({ INTERNAL_SYSCALL_DECL (err); \
  92329. + long result_var; \
  92330. + result_var = INTERNAL_SYSCALL (metag_set_tls, err, 1, (tcbp)); \
  92331. + INTERNAL_SYSCALL_ERROR_P (result_var, err) \
  92332. + ? "unknown error" : NULL; })
  92333. +
  92334. +/* Return the address of the dtv for the current thread. */
  92335. +# define THREAD_DTV() \
  92336. + (((tcbhead_t *)__builtin_thread_pointer ())->dtv)
  92337. +
  92338. +/* Return the thread descriptor for the current thread.
  92339. + The contained asm must *not* be marked volatile since otherwise
  92340. + assignments like
  92341. + struct pthread *self = thread_self();
  92342. + do not get optimized away. */
  92343. +# define THREAD_SELF \
  92344. + ((struct pthread *)__builtin_thread_pointer () - 1)
  92345. +
  92346. +/* Magic for libthread_db to know how to do THREAD_SELF. */
  92347. +# define DB_THREAD_SELF \
  92348. + CONST_THREAD_AREA (32, sizeof (struct pthread))
  92349. +
  92350. +/* Access to data in the thread descriptor is easy. */
  92351. +#define THREAD_GETMEM(descr, member) \
  92352. + descr->member
  92353. +#define THREAD_GETMEM_NC(descr, member, idx) \
  92354. + descr->member[idx]
  92355. +#define THREAD_SETMEM(descr, member, value) \
  92356. + descr->member = (value)
  92357. +#define THREAD_SETMEM_NC(descr, member, idx, value) \
  92358. + descr->member[idx] = (value)
  92359. +
  92360. +/* Get and set the global scope generation counter in struct pthread. */
  92361. +#define THREAD_GSCOPE_FLAG_UNUSED 0
  92362. +#define THREAD_GSCOPE_FLAG_USED 1
  92363. +#define THREAD_GSCOPE_FLAG_WAIT 2
  92364. +#define THREAD_GSCOPE_RESET_FLAG() \
  92365. + do \
  92366. + { int __res \
  92367. + = atomic_exchange_rel (&THREAD_SELF->header.gscope_flag, \
  92368. + THREAD_GSCOPE_FLAG_UNUSED); \
  92369. + if (__res == THREAD_GSCOPE_FLAG_WAIT) \
  92370. + lll_futex_wake (&THREAD_SELF->header.gscope_flag, 1, LLL_PRIVATE); \
  92371. + } \
  92372. + while (0)
  92373. +#define THREAD_GSCOPE_SET_FLAG() \
  92374. + do \
  92375. + { \
  92376. + THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \
  92377. + atomic_write_barrier (); \
  92378. + } \
  92379. + while (0)
  92380. +#define THREAD_GSCOPE_WAIT() \
  92381. + GL(dl_wait_lookup_done) ()
  92382. +
  92383. +#endif /* __ASSEMBLER__ */
  92384. +
  92385. +#endif /* tls.h */
  92386. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/dl-tls.h uClibc-git/libpthread/nptl/sysdeps/mips/dl-tls.h
  92387. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/dl-tls.h 2012-05-15 09:20:09.000000000 +0200
  92388. +++ uClibc-git/libpthread/nptl/sysdeps/mips/dl-tls.h 2014-07-25 20:36:09.033346351 +0200
  92389. @@ -13,9 +13,8 @@
  92390. Lesser General Public License for more details.
  92391. You should have received a copy of the GNU Lesser General Public
  92392. - License along with the GNU C Library; if not, write to the Free
  92393. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92394. - 02111-1307 USA. */
  92395. + License along with the GNU C Library; if not, see
  92396. + <http://www.gnu.org/licenses/>. */
  92397. /* Type used for the representation of TLS information in the GOT. */
  92398. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/jmpbuf-unwind.h uClibc-git/libpthread/nptl/sysdeps/mips/jmpbuf-unwind.h
  92399. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/jmpbuf-unwind.h 2012-05-15 09:20:09.000000000 +0200
  92400. +++ uClibc-git/libpthread/nptl/sysdeps/mips/jmpbuf-unwind.h 2014-07-25 20:36:09.033346351 +0200
  92401. @@ -12,9 +12,8 @@
  92402. Lesser General Public License for more details.
  92403. You should have received a copy of the GNU Lesser General Public
  92404. - License along with the GNU C Library; if not, write to the Free
  92405. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92406. - 02111-1307 USA. */
  92407. + License along with the GNU C Library; if not, see
  92408. + <http://www.gnu.org/licenses/>. */
  92409. #include <setjmp.h>
  92410. #include <stdint.h>
  92411. @@ -25,6 +24,3 @@
  92412. #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
  92413. ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[0].__sp - (_adj))
  92414. -
  92415. -/* We use the normal longjmp for unwinding. */
  92416. -#define __libc_unwind_longjmp(buf, val) longjmp (buf, val)
  92417. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/libc-tls.c uClibc-git/libpthread/nptl/sysdeps/mips/libc-tls.c
  92418. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/libc-tls.c 2012-05-15 09:20:09.000000000 +0200
  92419. +++ uClibc-git/libpthread/nptl/sysdeps/mips/libc-tls.c 2014-07-25 20:36:09.033346351 +0200
  92420. @@ -13,9 +13,8 @@
  92421. Lesser General Public License for more details.
  92422. You should have received a copy of the GNU Lesser General Public
  92423. - License along with the GNU C Library; if not, write to the Free
  92424. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92425. - 02111-1307 USA. */
  92426. + License along with the GNU C Library; if not, see
  92427. + <http://www.gnu.org/licenses/>. */
  92428. #include <sysdeps/generic/libc-tls.c>
  92429. #include <dl-tls.h>
  92430. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/pthreaddef.h uClibc-git/libpthread/nptl/sysdeps/mips/pthreaddef.h
  92431. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/pthreaddef.h 2012-05-15 09:20:09.000000000 +0200
  92432. +++ uClibc-git/libpthread/nptl/sysdeps/mips/pthreaddef.h 2014-07-25 20:36:09.033346351 +0200
  92433. @@ -12,9 +12,8 @@
  92434. Lesser General Public License for more details.
  92435. You should have received a copy of the GNU Lesser General Public
  92436. - License along with the GNU C Library; if not, write to the Free
  92437. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92438. - 02111-1307 USA. */
  92439. + License along with the GNU C Library; if not, see
  92440. + <http://www.gnu.org/licenses/>. */
  92441. /* Default stack size. */
  92442. #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
  92443. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/pthread_spin_lock.S uClibc-git/libpthread/nptl/sysdeps/mips/pthread_spin_lock.S
  92444. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/pthread_spin_lock.S 2012-05-15 09:20:09.000000000 +0200
  92445. +++ uClibc-git/libpthread/nptl/sysdeps/mips/pthread_spin_lock.S 2014-07-25 20:36:09.033346351 +0200
  92446. @@ -12,9 +12,8 @@
  92447. Lesser General Public License for more details.
  92448. You should have received a copy of the GNU Lesser General Public
  92449. - License along with the GNU C Library; if not, write to the Free
  92450. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92451. - 02111-1307 USA. */
  92452. + License along with the GNU C Library; if not, see
  92453. + <http://www.gnu.org/licenses/>. */
  92454. #include <sys/asm.h>
  92455. #include <sysdep.h>
  92456. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/pthread_spin_trylock.S uClibc-git/libpthread/nptl/sysdeps/mips/pthread_spin_trylock.S
  92457. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/pthread_spin_trylock.S 2012-05-15 09:20:09.000000000 +0200
  92458. +++ uClibc-git/libpthread/nptl/sysdeps/mips/pthread_spin_trylock.S 2014-07-25 20:36:09.033346351 +0200
  92459. @@ -12,9 +12,8 @@
  92460. Lesser General Public License for more details.
  92461. You should have received a copy of the GNU Lesser General Public
  92462. - License along with the GNU C Library; if not, write to the Free
  92463. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92464. - 02111-1307 USA. */
  92465. + License along with the GNU C Library; if not, see
  92466. + <http://www.gnu.org/licenses/>. */
  92467. #include <sys/asm.h>
  92468. #include <sysdep.h>
  92469. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/regdef.h uClibc-git/libpthread/nptl/sysdeps/mips/regdef.h
  92470. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/regdef.h 2012-05-15 09:20:09.000000000 +0200
  92471. +++ uClibc-git/libpthread/nptl/sysdeps/mips/regdef.h 2014-07-25 20:36:09.033346351 +0200
  92472. @@ -13,9 +13,8 @@
  92473. Lesser General Public License for more details.
  92474. You should have received a copy of the GNU Lesser General Public
  92475. - License along with the GNU C Library; if not, write to the Free
  92476. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92477. - 02111-1307 USA. */
  92478. + License along with the GNU C Library; if not, see
  92479. + <http://www.gnu.org/licenses/>. */
  92480. #ifndef _REGDEF_H
  92481. #define _REGDEF_H
  92482. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/tls.h uClibc-git/libpthread/nptl/sysdeps/mips/tls.h
  92483. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/mips/tls.h 2012-05-15 09:20:09.000000000 +0200
  92484. +++ uClibc-git/libpthread/nptl/sysdeps/mips/tls.h 2014-07-25 20:36:09.033346351 +0200
  92485. @@ -13,9 +13,8 @@
  92486. Lesser General Public License for more details.
  92487. You should have received a copy of the GNU Lesser General Public
  92488. - License along with the GNU C Library; if not, write to the Free
  92489. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92490. - 02111-1307 USA. */
  92491. + License along with the GNU C Library; if not, see
  92492. + <http://www.gnu.org/licenses/>. */
  92493. #ifndef _TLS_H
  92494. #define _TLS_H 1
  92495. @@ -121,7 +120,7 @@
  92496. operation can cause a failure 'errno' must not be touched. */
  92497. # define TLS_INIT_TP(tcbp, secondcall) \
  92498. ({ INTERNAL_SYSCALL_DECL (err); \
  92499. - long result_var; \
  92500. + long result_var attribute_unused; \
  92501. result_var = INTERNAL_SYSCALL (set_thread_area, err, 1, \
  92502. (char *) (tcbp) + TLS_TCB_OFFSET); \
  92503. INTERNAL_SYSCALL_ERROR_P (result_var, err) \
  92504. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/dl-tls.h uClibc-git/libpthread/nptl/sysdeps/powerpc/dl-tls.h
  92505. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/dl-tls.h 2012-05-15 09:20:09.000000000 +0200
  92506. +++ uClibc-git/libpthread/nptl/sysdeps/powerpc/dl-tls.h 2014-07-25 20:36:09.045346414 +0200
  92507. @@ -13,9 +13,8 @@
  92508. Lesser General Public License for more details.
  92509. You should have received a copy of the GNU Lesser General Public
  92510. - License along with the GNU C Library; if not, write to the Free
  92511. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92512. - 02111-1307 USA. */
  92513. + License along with the GNU C Library; if not, see
  92514. + <http://www.gnu.org/licenses/>. */
  92515. /* Type used for the representation of TLS information in the TOC. */
  92516. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/jmpbuf-unwind.h uClibc-git/libpthread/nptl/sysdeps/powerpc/jmpbuf-unwind.h
  92517. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/jmpbuf-unwind.h 2012-05-15 09:20:09.000000000 +0200
  92518. +++ uClibc-git/libpthread/nptl/sysdeps/powerpc/jmpbuf-unwind.h 2014-07-25 20:36:09.045346414 +0200
  92519. @@ -13,9 +13,8 @@
  92520. Lesser General Public License for more details.
  92521. You should have received a copy of the GNU Lesser General Public
  92522. - License along with the GNU C Library; if not, write to the Free
  92523. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92524. - 02111-1307 USA. */
  92525. + License along with the GNU C Library; if not, see
  92526. + <http://www.gnu.org/licenses/>. */
  92527. #include <setjmp.h>
  92528. #include <stdint.h>
  92529. @@ -26,6 +25,3 @@
  92530. #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
  92531. ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_GPR1] - (_adj))
  92532. -
  92533. -/* We use the normal lobngjmp for unwinding. */
  92534. -#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
  92535. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/pthreaddef.h uClibc-git/libpthread/nptl/sysdeps/powerpc/pthreaddef.h
  92536. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/pthreaddef.h 2012-05-15 09:20:09.000000000 +0200
  92537. +++ uClibc-git/libpthread/nptl/sysdeps/powerpc/pthreaddef.h 2014-07-25 20:36:09.045346414 +0200
  92538. @@ -12,9 +12,8 @@
  92539. Lesser General Public License for more details.
  92540. You should have received a copy of the GNU Lesser General Public
  92541. - License along with the GNU C Library; if not, write to the Free
  92542. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92543. - 02111-1307 USA. */
  92544. + License along with the GNU C Library; if not, see
  92545. + <http://www.gnu.org/licenses/>. */
  92546. /* Default stack size. */
  92547. #define ARCH_STACK_DEFAULT_SIZE (4 * 1024 * 1024)
  92548. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/pthread_spin_lock.c uClibc-git/libpthread/nptl/sysdeps/powerpc/pthread_spin_lock.c
  92549. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/pthread_spin_lock.c 2012-05-15 09:20:09.000000000 +0200
  92550. +++ uClibc-git/libpthread/nptl/sysdeps/powerpc/pthread_spin_lock.c 2014-07-25 20:36:09.045346414 +0200
  92551. @@ -13,9 +13,8 @@
  92552. Lesser General Public License for more details.
  92553. You should have received a copy of the GNU Lesser General Public
  92554. - License along with the GNU C Library; if not, write to the Free
  92555. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92556. - 02111-1307 USA. */
  92557. + License along with the GNU C Library; if not, see
  92558. + <http://www.gnu.org/licenses/>. */
  92559. #include "pthreadP.h"
  92560. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/pthread_spin_trylock.c uClibc-git/libpthread/nptl/sysdeps/powerpc/pthread_spin_trylock.c
  92561. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/pthread_spin_trylock.c 2012-05-15 09:20:09.000000000 +0200
  92562. +++ uClibc-git/libpthread/nptl/sysdeps/powerpc/pthread_spin_trylock.c 2014-07-25 20:36:09.045346414 +0200
  92563. @@ -13,9 +13,8 @@
  92564. Lesser General Public License for more details.
  92565. You should have received a copy of the GNU Lesser General Public
  92566. - License along with the GNU C Library; if not, write to the Free
  92567. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92568. - 02111-1307 USA. */
  92569. + License along with the GNU C Library; if not, see
  92570. + <http://www.gnu.org/licenses/>. */
  92571. #include <errno.h>
  92572. #include "pthreadP.h"
  92573. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/tls.h uClibc-git/libpthread/nptl/sysdeps/powerpc/tls.h
  92574. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/powerpc/tls.h 2012-05-15 09:20:09.000000000 +0200
  92575. +++ uClibc-git/libpthread/nptl/sysdeps/powerpc/tls.h 2014-07-25 20:36:09.045346414 +0200
  92576. @@ -13,9 +13,8 @@
  92577. Lesser General Public License for more details.
  92578. You should have received a copy of the GNU Lesser General Public
  92579. - License along with the GNU C Library; if not, write to the Free
  92580. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92581. - 02111-1307 USA. */
  92582. + License along with the GNU C Library; if not, see
  92583. + <http://www.gnu.org/licenses/>. */
  92584. #ifndef _TLS_H
  92585. #define _TLS_H 1
  92586. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/allocalim.h uClibc-git/libpthread/nptl/sysdeps/pthread/allocalim.h
  92587. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/allocalim.h 2012-05-15 09:20:09.000000000 +0200
  92588. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/allocalim.h 2014-07-25 20:36:09.061346497 +0200
  92589. @@ -13,9 +13,8 @@
  92590. Lesser General Public License for more details.
  92591. You should have received a copy of the GNU Lesser General Public
  92592. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  92593. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  92594. - Boston, MA 02111-1307, USA. */
  92595. + License along with the GNU C Library; see the file COPYING.LIB. If
  92596. + not, see <http://www.gnu.org/licenses/>. */
  92597. #include <alloca.h>
  92598. #include <limits.h>
  92599. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/bits/libc-lock.h uClibc-git/libpthread/nptl/sysdeps/pthread/bits/libc-lock.h
  92600. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/bits/libc-lock.h 2012-05-15 09:20:09.000000000 +0200
  92601. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/bits/libc-lock.h 2014-07-25 20:36:09.081346603 +0200
  92602. @@ -13,9 +13,8 @@
  92603. Lesser General Public License for more details.
  92604. You should have received a copy of the GNU Lesser General Public
  92605. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  92606. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  92607. - Boston, MA 02111-1307, USA. */
  92608. + License along with the GNU C Library; see the file COPYING.LIB. If
  92609. + not, see <http://www.gnu.org/licenses/>. */
  92610. #ifndef _BITS_LIBC_LOCK_H
  92611. #define _BITS_LIBC_LOCK_H 1
  92612. @@ -475,7 +474,7 @@
  92613. library. */
  92614. extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
  92615. - __const pthread_mutexattr_t *__mutex_attr);
  92616. + const pthread_mutexattr_t *__mutex_attr);
  92617. extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
  92618. @@ -494,7 +493,7 @@
  92619. #ifdef __USE_UNIX98
  92620. extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock,
  92621. - __const pthread_rwlockattr_t *__attr);
  92622. + const pthread_rwlockattr_t *__attr);
  92623. extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock);
  92624. @@ -513,7 +512,7 @@
  92625. void (*__destr_function) (void *));
  92626. extern int __pthread_setspecific (pthread_key_t __key,
  92627. - __const void *__pointer);
  92628. + const void *__pointer);
  92629. extern void *__pthread_getspecific (pthread_key_t __key);
  92630. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/bits/libc-tsd.h uClibc-git/libpthread/nptl/sysdeps/pthread/bits/libc-tsd.h
  92631. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/bits/libc-tsd.h 2012-05-15 09:20:09.000000000 +0200
  92632. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/bits/libc-tsd.h 2014-07-25 20:36:09.081346603 +0200
  92633. @@ -13,9 +13,8 @@
  92634. Lesser General Public License for more details.
  92635. You should have received a copy of the GNU Lesser General Public
  92636. - License along with the GNU C Library; if not, write to the Free
  92637. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92638. - 02111-1307 USA. */
  92639. + License along with the GNU C Library; if not, see
  92640. + <http://www.gnu.org/licenses/>. */
  92641. #ifndef _GENERIC_BITS_LIBC_TSD_H
  92642. #define _GENERIC_BITS_LIBC_TSD_H 1
  92643. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/bits/stdio-lock.h uClibc-git/libpthread/nptl/sysdeps/pthread/bits/stdio-lock.h
  92644. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/bits/stdio-lock.h 2012-05-15 09:20:09.000000000 +0200
  92645. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/bits/stdio-lock.h 2014-07-25 20:36:09.081346603 +0200
  92646. @@ -13,9 +13,8 @@
  92647. Lesser General Public License for more details.
  92648. You should have received a copy of the GNU Lesser General Public
  92649. - License along with the GNU C Library; if not, write to the Free
  92650. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92651. - 02111-1307 USA. */
  92652. + License along with the GNU C Library; if not, see
  92653. + <http://www.gnu.org/licenses/>. */
  92654. #ifndef _BITS_STDIO_LOCK_H
  92655. #define _BITS_STDIO_LOCK_H 1
  92656. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/createthread.c uClibc-git/libpthread/nptl/sysdeps/pthread/createthread.c
  92657. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/createthread.c 2012-05-15 09:20:09.000000000 +0200
  92658. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/createthread.c 2014-07-25 20:36:09.081346603 +0200
  92659. @@ -13,9 +13,8 @@
  92660. Lesser General Public License for more details.
  92661. You should have received a copy of the GNU Lesser General Public
  92662. - License along with the GNU C Library; if not, write to the Free
  92663. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92664. - 02111-1307 USA. */
  92665. + License along with the GNU C Library; if not, see
  92666. + <http://www.gnu.org/licenses/>. */
  92667. #include <sched.h>
  92668. #include <setjmp.h>
  92669. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/librt-cancellation.c uClibc-git/libpthread/nptl/sysdeps/pthread/librt-cancellation.c
  92670. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/librt-cancellation.c 2012-05-15 09:20:09.000000000 +0200
  92671. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/librt-cancellation.c 2014-07-25 20:36:09.081346603 +0200
  92672. @@ -13,9 +13,8 @@
  92673. Lesser General Public License for more details.
  92674. You should have received a copy of the GNU Lesser General Public
  92675. - License along with the GNU C Library; if not, write to the Free
  92676. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92677. - 02111-1307 USA. */
  92678. + License along with the GNU C Library; if not, see
  92679. + <http://www.gnu.org/licenses/>. */
  92680. #include "pthreadP.h"
  92681. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/list.h uClibc-git/libpthread/nptl/sysdeps/pthread/list.h
  92682. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/list.h 2012-05-15 09:20:09.000000000 +0200
  92683. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/list.h 2014-07-25 20:36:09.081346603 +0200
  92684. @@ -13,9 +13,8 @@
  92685. Lesser General Public License for more details.
  92686. You should have received a copy of the GNU Lesser General Public
  92687. - License along with the GNU C Library; if not, write to the Free
  92688. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92689. - 02111-1307 USA. */
  92690. + License along with the GNU C Library; if not, see
  92691. + <http://www.gnu.org/licenses/>. */
  92692. #ifndef _LIST_H
  92693. #define _LIST_H 1
  92694. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/Makefile.in uClibc-git/libpthread/nptl/sysdeps/pthread/Makefile.in
  92695. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  92696. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/Makefile.in 2014-07-25 20:36:09.061346497 +0200
  92697. @@ -33,7 +33,6 @@
  92698. pthread_spin_init.c \
  92699. pthread_spin_unlock.c \
  92700. pt-longjmp.c \
  92701. - pt-sigaction.c \
  92702. tpp.c
  92703. CFLAGS-pthread = $(SSP_ALL_CFLAGS) -DNOT_IN_libc -DIS_IN_libpthread
  92704. CFLAGS-pthread_barrier_wait.c = -D_GNU_SOURCE
  92705. @@ -49,8 +48,7 @@
  92706. CFLAGS-rt-unwind-resume.c = -DIS_IN_librt \
  92707. -fexceptions -fasynchronous-unwind-tables
  92708. -libpthread-so-y += $(patsubst %,$(libpthread_pthread_OUT)/%.oS, \
  92709. - unwind-forcedunwind)
  92710. +libpthread-so-y += $(patsubst %,$(libpthread_pthread_OUT)/%.oS, unwind-forcedunwind)
  92711. librt-pt-routines-y = librt-cancellation.c
  92712. librt-pt-shared-only-routines-y = rt-unwind-resume.c
  92713. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/malloc-machine.h uClibc-git/libpthread/nptl/sysdeps/pthread/malloc-machine.h
  92714. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/malloc-machine.h 2012-05-15 09:20:09.000000000 +0200
  92715. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/malloc-machine.h 2014-07-25 20:36:09.081346603 +0200
  92716. @@ -14,9 +14,8 @@
  92717. Lesser General Public License for more details.
  92718. You should have received a copy of the GNU Lesser General Public
  92719. - License along with the GNU C Library; if not, write to the Free
  92720. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92721. - 02111-1307 USA. */
  92722. + License along with the GNU C Library; if not, see
  92723. + <http://www.gnu.org/licenses/>. */
  92724. #ifndef _MALLOC_MACHINE_H
  92725. #define _MALLOC_MACHINE_H
  92726. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/posix-timer.h uClibc-git/libpthread/nptl/sysdeps/pthread/posix-timer.h
  92727. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/posix-timer.h 2012-05-15 09:20:09.000000000 +0200
  92728. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/posix-timer.h 2014-07-25 20:36:09.081346603 +0200
  92729. @@ -14,9 +14,8 @@
  92730. Lesser General Public License for more details.
  92731. You should have received a copy of the GNU Lesser General Public
  92732. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  92733. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  92734. - Boston, MA 02111-1307, USA. */
  92735. + License along with the GNU C Library; see the file COPYING.LIB. If
  92736. + not, see <http://www.gnu.org/licenses/>. */
  92737. #include <limits.h>
  92738. #include <signal.h>
  92739. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_barrier_destroy.c uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_barrier_destroy.c
  92740. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_barrier_destroy.c 2012-05-15 09:20:09.000000000 +0200
  92741. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_barrier_destroy.c 2014-07-25 20:36:09.081346603 +0200
  92742. @@ -13,9 +13,8 @@
  92743. Lesser General Public License for more details.
  92744. You should have received a copy of the GNU Lesser General Public
  92745. - License along with the GNU C Library; if not, write to the Free
  92746. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92747. - 02111-1307 USA. */
  92748. + License along with the GNU C Library; if not, see
  92749. + <http://www.gnu.org/licenses/>. */
  92750. #include <errno.h>
  92751. #include "pthreadP.h"
  92752. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_barrier_init.c uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_barrier_init.c
  92753. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_barrier_init.c 2012-05-15 09:20:09.000000000 +0200
  92754. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_barrier_init.c 2014-07-25 20:36:09.081346603 +0200
  92755. @@ -13,9 +13,8 @@
  92756. Lesser General Public License for more details.
  92757. You should have received a copy of the GNU Lesser General Public
  92758. - License along with the GNU C Library; if not, write to the Free
  92759. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92760. - 02111-1307 USA. */
  92761. + License along with the GNU C Library; if not, see
  92762. + <http://www.gnu.org/licenses/>. */
  92763. #include <errno.h>
  92764. #include "pthreadP.h"
  92765. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_barrier_wait.c uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_barrier_wait.c
  92766. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_barrier_wait.c 2012-05-15 09:20:09.000000000 +0200
  92767. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_barrier_wait.c 2014-07-25 20:36:09.081346603 +0200
  92768. @@ -13,9 +13,8 @@
  92769. Lesser General Public License for more details.
  92770. You should have received a copy of the GNU Lesser General Public
  92771. - License along with the GNU C Library; if not, write to the Free
  92772. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92773. - 02111-1307 USA. */
  92774. + License along with the GNU C Library; if not, see
  92775. + <http://www.gnu.org/licenses/>. */
  92776. #include <errno.h>
  92777. #include <sysdep.h>
  92778. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_cond_broadcast.c uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_cond_broadcast.c
  92779. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_cond_broadcast.c 2012-05-15 09:20:09.000000000 +0200
  92780. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_cond_broadcast.c 2014-07-25 20:36:09.081346603 +0200
  92781. @@ -13,9 +13,8 @@
  92782. Lesser General Public License for more details.
  92783. You should have received a copy of the GNU Lesser General Public
  92784. - License along with the GNU C Library; if not, write to the Free
  92785. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92786. - 02111-1307 USA. */
  92787. + License along with the GNU C Library; if not, see
  92788. + <http://www.gnu.org/licenses/>. */
  92789. #include <endian.h>
  92790. #include <errno.h>
  92791. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_cond_signal.c uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_cond_signal.c
  92792. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_cond_signal.c 2012-05-15 09:20:09.000000000 +0200
  92793. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_cond_signal.c 2014-07-25 20:36:09.081346603 +0200
  92794. @@ -13,9 +13,8 @@
  92795. Lesser General Public License for more details.
  92796. You should have received a copy of the GNU Lesser General Public
  92797. - License along with the GNU C Library; if not, write to the Free
  92798. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92799. - 02111-1307 USA. */
  92800. + License along with the GNU C Library; if not, see
  92801. + <http://www.gnu.org/licenses/>. */
  92802. #include <endian.h>
  92803. #include <errno.h>
  92804. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_cond_timedwait.c uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_cond_timedwait.c
  92805. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_cond_timedwait.c 2012-05-15 09:20:09.000000000 +0200
  92806. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_cond_timedwait.c 2014-07-25 20:36:09.081346603 +0200
  92807. @@ -13,9 +13,8 @@
  92808. Lesser General Public License for more details.
  92809. You should have received a copy of the GNU Lesser General Public
  92810. - License along with the GNU C Library; if not, write to the Free
  92811. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92812. - 02111-1307 USA. */
  92813. + License along with the GNU C Library; if not, see
  92814. + <http://www.gnu.org/licenses/>. */
  92815. #include <endian.h>
  92816. #include <errno.h>
  92817. @@ -100,8 +99,10 @@
  92818. {
  92819. #ifdef __NR_clock_gettime
  92820. INTERNAL_SYSCALL_DECL (err);
  92821. - int ret;
  92822. - ret = INTERNAL_SYSCALL (clock_gettime, err, 2,
  92823. +# ifndef __ASSUME_POSIX_TIMERS
  92824. + int ret =
  92825. +# endif
  92826. + INTERNAL_SYSCALL (clock_gettime, err, 2,
  92827. (cond->__data.__nwaiters
  92828. & ((1 << COND_NWAITERS_SHIFT) - 1)),
  92829. &rt);
  92830. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_cond_wait.c uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_cond_wait.c
  92831. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_cond_wait.c 2012-05-15 09:20:09.000000000 +0200
  92832. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_cond_wait.c 2014-07-25 20:36:09.081346603 +0200
  92833. @@ -13,9 +13,8 @@
  92834. Lesser General Public License for more details.
  92835. You should have received a copy of the GNU Lesser General Public
  92836. - License along with the GNU C Library; if not, write to the Free
  92837. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92838. - 02111-1307 USA. */
  92839. + License along with the GNU C Library; if not, see
  92840. + <http://www.gnu.org/licenses/>. */
  92841. #include <endian.h>
  92842. #include <errno.h>
  92843. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread-functions.h uClibc-git/libpthread/nptl/sysdeps/pthread/pthread-functions.h
  92844. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread-functions.h 2012-05-15 09:20:09.000000000 +0200
  92845. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/pthread-functions.h 2014-07-25 20:36:09.081346603 +0200
  92846. @@ -13,9 +13,8 @@
  92847. Lesser General Public License for more details.
  92848. You should have received a copy of the GNU Lesser General Public
  92849. - License along with the GNU C Library; if not, write to the Free
  92850. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92851. - 02111-1307 USA. */
  92852. + License along with the GNU C Library; if not, see
  92853. + <http://www.gnu.org/licenses/>. */
  92854. #ifndef _PTHREAD_FUNCTIONS_H
  92855. #define _PTHREAD_FUNCTIONS_H 1
  92856. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread.h uClibc-git/libpthread/nptl/sysdeps/pthread/pthread.h
  92857. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread.h 2012-05-15 09:20:09.000000000 +0200
  92858. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/pthread.h 2014-07-25 20:36:09.081346603 +0200
  92859. @@ -13,9 +13,8 @@
  92860. Lesser General Public License for more details.
  92861. You should have received a copy of the GNU Lesser General Public
  92862. - License along with the GNU C Library; if not, write to the Free
  92863. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  92864. - 02111-1307 USA. */
  92865. + License along with the GNU C Library; if not, see
  92866. + <http://www.gnu.org/licenses/>. */
  92867. #ifndef _PTHREAD_H
  92868. #define _PTHREAD_H 1
  92869. @@ -228,7 +227,7 @@
  92870. getting passed ARG. Creation attributed come from ATTR. The new
  92871. handle is stored in *NEWTHREAD. */
  92872. extern int pthread_create (pthread_t *__restrict __newthread,
  92873. - __const pthread_attr_t *__restrict __attr,
  92874. + const pthread_attr_t *__restrict __attr,
  92875. void *(*__start_routine) (void *),
  92876. void *__restrict __arg) __THROW __nonnull ((1, 3));
  92877. @@ -258,7 +257,7 @@
  92878. This function is a cancellation point and therefore not marked with
  92879. __THROW. */
  92880. extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
  92881. - __const struct timespec *__abstime);
  92882. + const struct timespec *__abstime);
  92883. #endif
  92884. /* Indicate that the thread TH is never to be joined with PTHREAD_JOIN.
  92885. @@ -287,7 +286,7 @@
  92886. __THROW __nonnull ((1));
  92887. /* Get detach state attribute. */
  92888. -extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
  92889. +extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr,
  92890. int *__detachstate)
  92891. __THROW __nonnull ((1, 2));
  92892. @@ -298,7 +297,7 @@
  92893. /* Get the size of the guard area created for stack overflow protection. */
  92894. -extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr,
  92895. +extern int pthread_attr_getguardsize (const pthread_attr_t *__attr,
  92896. size_t *__guardsize)
  92897. __THROW __nonnull ((1, 2));
  92898. @@ -309,18 +308,18 @@
  92899. /* Return in *PARAM the scheduling parameters of *ATTR. */
  92900. -extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
  92901. +extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict
  92902. __attr,
  92903. struct sched_param *__restrict __param)
  92904. __THROW __nonnull ((1, 2));
  92905. /* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */
  92906. extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
  92907. - __const struct sched_param *__restrict
  92908. + const struct sched_param *__restrict
  92909. __param) __THROW __nonnull ((1, 2));
  92910. /* Return in *POLICY the scheduling policy of *ATTR. */
  92911. -extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
  92912. +extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict
  92913. __attr, int *__restrict __policy)
  92914. __THROW __nonnull ((1, 2));
  92915. @@ -329,7 +328,7 @@
  92916. __THROW __nonnull ((1));
  92917. /* Return in *INHERIT the scheduling inheritance mode of *ATTR. */
  92918. -extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
  92919. +extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict
  92920. __attr, int *__restrict __inherit)
  92921. __THROW __nonnull ((1, 2));
  92922. @@ -340,7 +339,7 @@
  92923. /* Return in *SCOPE the scheduling contention scope of *ATTR. */
  92924. -extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
  92925. +extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr,
  92926. int *__restrict __scope)
  92927. __THROW __nonnull ((1, 2));
  92928. @@ -349,7 +348,7 @@
  92929. __THROW __nonnull ((1));
  92930. /* Return the previously set address for the stack. */
  92931. -extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
  92932. +extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict
  92933. __attr, void **__restrict __stackaddr)
  92934. __THROW __nonnull ((1, 2)) __attribute_deprecated__;
  92935. @@ -362,7 +361,7 @@
  92936. __THROW __nonnull ((1)) __attribute_deprecated__;
  92937. /* Return the currently used minimal stack size. */
  92938. -extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
  92939. +extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict
  92940. __attr, size_t *__restrict __stacksize)
  92941. __THROW __nonnull ((1, 2));
  92942. @@ -375,7 +374,7 @@
  92943. #ifdef __USE_XOPEN2K
  92944. /* Return the previously set address for the stack. */
  92945. -extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
  92946. +extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr,
  92947. void **__restrict __stackaddr,
  92948. size_t *__restrict __stacksize)
  92949. __THROW __nonnull ((1, 2, 3));
  92950. @@ -392,12 +391,12 @@
  92951. the processors represented in CPUSET. */
  92952. extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr,
  92953. size_t __cpusetsize,
  92954. - __const cpu_set_t *__cpuset)
  92955. + const cpu_set_t *__cpuset)
  92956. __THROW __nonnull ((1, 3));
  92957. /* Get bit set in CPUSET representing the processors threads created with
  92958. ATTR can run on. */
  92959. -extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr,
  92960. +extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr,
  92961. size_t __cpusetsize,
  92962. cpu_set_t *__cpuset)
  92963. __THROW __nonnull ((1, 3));
  92964. @@ -416,7 +415,7 @@
  92965. /* Set the scheduling parameters for TARGET_THREAD according to POLICY
  92966. and *PARAM. */
  92967. extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
  92968. - __const struct sched_param *__param)
  92969. + const struct sched_param *__param)
  92970. __THROW __nonnull ((3));
  92971. /* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */
  92972. @@ -449,7 +448,7 @@
  92973. /* Limit specified thread TH to run only on the processors represented
  92974. in CPUSET. */
  92975. extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize,
  92976. - __const cpu_set_t *__cpuset)
  92977. + const cpu_set_t *__cpuset)
  92978. __THROW __nonnull ((3));
  92979. /* Get bit set in CPUSET representing the processors TH can run on. */
  92980. @@ -581,6 +580,7 @@
  92981. function the compiler is free to decide inlining the change when
  92982. needed or fall back on the copy which must exist somewhere
  92983. else. */
  92984. +void __pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame);
  92985. __extern_inline void
  92986. __pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame)
  92987. {
  92988. @@ -724,7 +724,7 @@
  92989. /* Initialize a mutex. */
  92990. extern int pthread_mutex_init (pthread_mutex_t *__mutex,
  92991. - __const pthread_mutexattr_t *__mutexattr)
  92992. + const pthread_mutexattr_t *__mutexattr)
  92993. __THROW __nonnull ((1));
  92994. /* Destroy a mutex. */
  92995. @@ -742,7 +742,7 @@
  92996. #ifdef __USE_XOPEN2K
  92997. /* Wait until lock becomes available, or specified time passes. */
  92998. extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
  92999. - __const struct timespec *__restrict
  93000. + const struct timespec *__restrict
  93001. __abstime) __THROW __nonnull ((1, 2));
  93002. #endif
  93003. @@ -752,7 +752,7 @@
  93004. /* Get the priority ceiling of MUTEX. */
  93005. -extern int pthread_mutex_getprioceiling (__const pthread_mutex_t *
  93006. +extern int pthread_mutex_getprioceiling (const pthread_mutex_t *
  93007. __restrict __mutex,
  93008. int *__restrict __prioceiling)
  93009. __THROW __nonnull ((1, 2));
  93010. @@ -788,7 +788,7 @@
  93011. __THROW __nonnull ((1));
  93012. /* Get the process-shared flag of the mutex attribute ATTR. */
  93013. -extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
  93014. +extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t *
  93015. __restrict __attr,
  93016. int *__restrict __pshared)
  93017. __THROW __nonnull ((1, 2));
  93018. @@ -800,7 +800,7 @@
  93019. #if defined __USE_UNIX98 || defined __USE_XOPEN2K8
  93020. /* Return in *KIND the mutex kind attribute in *ATTR. */
  93021. -extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
  93022. +extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict
  93023. __attr, int *__restrict __kind)
  93024. __THROW __nonnull ((1, 2));
  93025. @@ -812,7 +812,7 @@
  93026. #endif
  93027. /* Return in *PROTOCOL the mutex protocol attribute in *ATTR. */
  93028. -extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t *
  93029. +extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *
  93030. __restrict __attr,
  93031. int *__restrict __protocol)
  93032. __THROW __nonnull ((1, 2));
  93033. @@ -824,7 +824,7 @@
  93034. __THROW __nonnull ((1));
  93035. /* Return in *PRIOCEILING the mutex prioceiling attribute in *ATTR. */
  93036. -extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t *
  93037. +extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *
  93038. __restrict __attr,
  93039. int *__restrict __prioceiling)
  93040. __THROW __nonnull ((1, 2));
  93041. @@ -836,11 +836,11 @@
  93042. #ifdef __USE_XOPEN2K
  93043. /* Get the robustness flag of the mutex attribute ATTR. */
  93044. -extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr,
  93045. +extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr,
  93046. int *__robustness)
  93047. __THROW __nonnull ((1, 2));
  93048. # ifdef __USE_GNU
  93049. -extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr,
  93050. +extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr,
  93051. int *__robustness)
  93052. __THROW __nonnull ((1, 2));
  93053. # endif
  93054. @@ -863,7 +863,7 @@
  93055. /* Initialize read-write lock RWLOCK using attributes ATTR, or use
  93056. the default values if later is NULL. */
  93057. extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
  93058. - __const pthread_rwlockattr_t *__restrict
  93059. + const pthread_rwlockattr_t *__restrict
  93060. __attr) __THROW __nonnull ((1));
  93061. /* Destroy read-write lock RWLOCK. */
  93062. @@ -881,7 +881,7 @@
  93063. # ifdef __USE_XOPEN2K
  93064. /* Try to acquire read lock for RWLOCK or return after specfied time. */
  93065. extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
  93066. - __const struct timespec *__restrict
  93067. + const struct timespec *__restrict
  93068. __abstime) __THROW __nonnull ((1, 2));
  93069. # endif
  93070. @@ -896,7 +896,7 @@
  93071. # ifdef __USE_XOPEN2K
  93072. /* Try to acquire write lock for RWLOCK or return after specfied time. */
  93073. extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
  93074. - __const struct timespec *__restrict
  93075. + const struct timespec *__restrict
  93076. __abstime) __THROW __nonnull ((1, 2));
  93077. # endif
  93078. @@ -916,7 +916,7 @@
  93079. __THROW __nonnull ((1));
  93080. /* Return current setting of process-shared attribute of ATTR in PSHARED. */
  93081. -extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
  93082. +extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *
  93083. __restrict __attr,
  93084. int *__restrict __pshared)
  93085. __THROW __nonnull ((1, 2));
  93086. @@ -927,7 +927,7 @@
  93087. __THROW __nonnull ((1));
  93088. /* Return current setting of reader/writer preference. */
  93089. -extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *
  93090. +extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *
  93091. __restrict __attr,
  93092. int *__restrict __pref)
  93093. __THROW __nonnull ((1, 2));
  93094. @@ -943,7 +943,7 @@
  93095. /* Initialize condition variable COND using attributes ATTR, or use
  93096. the default values if later is NULL. */
  93097. extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
  93098. - __const pthread_condattr_t *__restrict
  93099. + const pthread_condattr_t *__restrict
  93100. __cond_attr) __THROW __nonnull ((1));
  93101. /* Destroy condition variable COND. */
  93102. @@ -976,7 +976,7 @@
  93103. __THROW. */
  93104. extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
  93105. pthread_mutex_t *__restrict __mutex,
  93106. - __const struct timespec *__restrict
  93107. + const struct timespec *__restrict
  93108. __abstime) __nonnull ((1, 2, 3));
  93109. /* Functions for handling condition variable attributes. */
  93110. @@ -990,7 +990,7 @@
  93111. __THROW __nonnull ((1));
  93112. /* Get the process-shared flag of the condition variable attribute ATTR. */
  93113. -extern int pthread_condattr_getpshared (__const pthread_condattr_t *
  93114. +extern int pthread_condattr_getpshared (const pthread_condattr_t *
  93115. __restrict __attr,
  93116. int *__restrict __pshared)
  93117. __THROW __nonnull ((1, 2));
  93118. @@ -1001,7 +1001,7 @@
  93119. #ifdef __USE_XOPEN2K
  93120. /* Get the clock selected for the conditon variable attribute ATTR. */
  93121. -extern int pthread_condattr_getclock (__const pthread_condattr_t *
  93122. +extern int pthread_condattr_getclock (const pthread_condattr_t *
  93123. __restrict __attr,
  93124. __clockid_t *__restrict __clock_id)
  93125. __THROW __nonnull ((1, 2));
  93126. @@ -1043,7 +1043,7 @@
  93127. /* Initialize BARRIER with the attributes in ATTR. The barrier is
  93128. opened when COUNT waiters arrived. */
  93129. extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
  93130. - __const pthread_barrierattr_t *__restrict
  93131. + const pthread_barrierattr_t *__restrict
  93132. __attr, unsigned int __count)
  93133. __THROW __nonnull ((1));
  93134. @@ -1065,7 +1065,7 @@
  93135. __THROW __nonnull ((1));
  93136. /* Get the process-shared flag of the barrier attribute ATTR. */
  93137. -extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
  93138. +extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *
  93139. __restrict __attr,
  93140. int *__restrict __pshared)
  93141. __THROW __nonnull ((1, 2));
  93142. @@ -1097,7 +1097,7 @@
  93143. /* Store POINTER in the thread-specific data slot identified by KEY. */
  93144. extern int pthread_setspecific (pthread_key_t __key,
  93145. - __const void *__pointer) __THROW ;
  93146. + const void *__pointer) __THROW ;
  93147. #ifdef __USE_XOPEN2K
  93148. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_once.c uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_once.c
  93149. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_once.c 2012-05-15 09:20:09.000000000 +0200
  93150. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_once.c 2014-07-25 20:36:09.081346603 +0200
  93151. @@ -13,9 +13,8 @@
  93152. Lesser General Public License for more details.
  93153. You should have received a copy of the GNU Lesser General Public
  93154. - License along with the GNU C Library; if not, write to the Free
  93155. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93156. - 02111-1307 USA. */
  93157. + License along with the GNU C Library; if not, see
  93158. + <http://www.gnu.org/licenses/>. */
  93159. #include "pthreadP.h"
  93160. #include <lowlevellock.h>
  93161. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_rwlock_rdlock.c uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_rwlock_rdlock.c
  93162. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_rwlock_rdlock.c 2012-05-15 09:20:09.000000000 +0200
  93163. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_rwlock_rdlock.c 2014-07-25 20:36:09.081346603 +0200
  93164. @@ -13,9 +13,8 @@
  93165. Lesser General Public License for more details.
  93166. You should have received a copy of the GNU Lesser General Public
  93167. - License along with the GNU C Library; if not, write to the Free
  93168. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93169. - 02111-1307 USA. */
  93170. + License along with the GNU C Library; if not, see
  93171. + <http://www.gnu.org/licenses/>. */
  93172. #include <errno.h>
  93173. #include <sysdep.h>
  93174. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c
  93175. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c 2012-05-15 09:20:09.000000000 +0200
  93176. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedrdlock.c 2014-07-25 20:36:09.081346603 +0200
  93177. @@ -13,9 +13,8 @@
  93178. Lesser General Public License for more details.
  93179. You should have received a copy of the GNU Lesser General Public
  93180. - License along with the GNU C Library; if not, write to the Free
  93181. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93182. - 02111-1307 USA. */
  93183. + License along with the GNU C Library; if not, see
  93184. + <http://www.gnu.org/licenses/>. */
  93185. #include <errno.h>
  93186. #include <sysdep.h>
  93187. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c
  93188. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c 2012-05-15 09:20:09.000000000 +0200
  93189. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_rwlock_timedwrlock.c 2014-07-25 20:36:09.081346603 +0200
  93190. @@ -13,9 +13,8 @@
  93191. Lesser General Public License for more details.
  93192. You should have received a copy of the GNU Lesser General Public
  93193. - License along with the GNU C Library; if not, write to the Free
  93194. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93195. - 02111-1307 USA. */
  93196. + License along with the GNU C Library; if not, see
  93197. + <http://www.gnu.org/licenses/>. */
  93198. #include <errno.h>
  93199. #include <sysdep.h>
  93200. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_rwlock_unlock.c uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_rwlock_unlock.c
  93201. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_rwlock_unlock.c 2012-05-15 09:20:09.000000000 +0200
  93202. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_rwlock_unlock.c 2014-07-25 20:36:09.081346603 +0200
  93203. @@ -13,9 +13,8 @@
  93204. Lesser General Public License for more details.
  93205. You should have received a copy of the GNU Lesser General Public
  93206. - License along with the GNU C Library; if not, write to the Free
  93207. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93208. - 02111-1307 USA. */
  93209. + License along with the GNU C Library; if not, see
  93210. + <http://www.gnu.org/licenses/>. */
  93211. #include <errno.h>
  93212. #include <sysdep.h>
  93213. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c
  93214. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c 2012-05-15 09:20:09.000000000 +0200
  93215. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_rwlock_wrlock.c 2014-07-25 20:36:09.081346603 +0200
  93216. @@ -13,9 +13,8 @@
  93217. Lesser General Public License for more details.
  93218. You should have received a copy of the GNU Lesser General Public
  93219. - License along with the GNU C Library; if not, write to the Free
  93220. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93221. - 02111-1307 USA. */
  93222. + License along with the GNU C Library; if not, see
  93223. + <http://www.gnu.org/licenses/>. */
  93224. #include <errno.h>
  93225. #include <sysdep.h>
  93226. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_sigmask.c uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_sigmask.c
  93227. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_sigmask.c 2012-05-15 09:20:09.000000000 +0200
  93228. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_sigmask.c 2014-07-25 20:36:09.081346603 +0200
  93229. @@ -13,9 +13,8 @@
  93230. Lesser General Public License for more details.
  93231. You should have received a copy of the GNU Lesser General Public
  93232. - License along with the GNU C Library; if not, write to the Free
  93233. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93234. - 02111-1307 USA. */
  93235. + License along with the GNU C Library; if not, see
  93236. + <http://www.gnu.org/licenses/>. */
  93237. #include <errno.h>
  93238. #include <signal.h>
  93239. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_spin_destroy.c uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_spin_destroy.c
  93240. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_spin_destroy.c 2012-05-15 09:20:09.000000000 +0200
  93241. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_spin_destroy.c 2014-07-25 20:36:09.081346603 +0200
  93242. @@ -13,9 +13,8 @@
  93243. Lesser General Public License for more details.
  93244. You should have received a copy of the GNU Lesser General Public
  93245. - License along with the GNU C Library; if not, write to the Free
  93246. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93247. - 02111-1307 USA. */
  93248. + License along with the GNU C Library; if not, see
  93249. + <http://www.gnu.org/licenses/>. */
  93250. #include "pthreadP.h"
  93251. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_spin_init.c uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_spin_init.c
  93252. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_spin_init.c 2012-05-15 09:20:09.000000000 +0200
  93253. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_spin_init.c 2014-07-25 20:36:09.081346603 +0200
  93254. @@ -14,9 +14,8 @@
  93255. Lesser General Public License for more details.
  93256. You should have received a copy of the GNU Lesser General Public
  93257. - License along with the GNU C Library; if not, write to the Free
  93258. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93259. - 02111-1307 USA. */
  93260. + License along with the GNU C Library; if not, see
  93261. + <http://www.gnu.org/licenses/>. */
  93262. #include "pthreadP.h"
  93263. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_spin_unlock.c uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_spin_unlock.c
  93264. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pthread_spin_unlock.c 2012-05-15 09:20:09.000000000 +0200
  93265. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/pthread_spin_unlock.c 2014-07-25 20:36:09.081346603 +0200
  93266. @@ -14,9 +14,8 @@
  93267. Lesser General Public License for more details.
  93268. You should have received a copy of the GNU Lesser General Public
  93269. - License along with the GNU C Library; if not, write to the Free
  93270. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93271. - 02111-1307 USA. */
  93272. + License along with the GNU C Library; if not, see
  93273. + <http://www.gnu.org/licenses/>. */
  93274. #include "pthreadP.h"
  93275. #include <atomic.h>
  93276. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pt-initfini.c uClibc-git/libpthread/nptl/sysdeps/pthread/pt-initfini.c
  93277. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pt-initfini.c 2012-05-15 09:20:09.000000000 +0200
  93278. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/pt-initfini.c 2014-07-25 20:36:09.081346603 +0200
  93279. @@ -23,8 +23,7 @@
  93280. You should have received a copy of the GNU Lesser General Public
  93281. License along with the GNU C Library; see the file COPYING.LIB. If not,
  93282. - write to the Free Software Foundation, 59 Temple Place - Suite 330,
  93283. - Boston, MA 02111-1307, USA. */
  93284. + see <http://www.gnu.org/licenses/>. */
  93285. /* This file is compiled into assembly code which is then munged by a sed
  93286. script into two files: crti.s and crtn.s.
  93287. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pt-longjmp.c uClibc-git/libpthread/nptl/sysdeps/pthread/pt-longjmp.c
  93288. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pt-longjmp.c 2012-05-15 09:20:09.000000000 +0200
  93289. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/pt-longjmp.c 2014-07-25 20:36:09.081346603 +0200
  93290. @@ -13,14 +13,15 @@
  93291. Lesser General Public License for more details.
  93292. You should have received a copy of the GNU Lesser General Public
  93293. - License along with the GNU C Library; if not, write to the Free
  93294. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93295. - 02111-1307 USA. */
  93296. + License along with the GNU C Library; if not, see
  93297. + <http://www.gnu.org/licenses/>. */
  93298. #include <setjmp.h>
  93299. #include <stdlib.h>
  93300. #include "pthreadP.h"
  93301. +extern __typeof(longjmp) __libc_longjmp attribute_noreturn;
  93302. +
  93303. void
  93304. longjmp (jmp_buf env, int val)
  93305. {
  93306. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pt-sigaction.c uClibc-git/libpthread/nptl/sysdeps/pthread/pt-sigaction.c
  93307. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/pt-sigaction.c 2012-05-15 09:20:09.000000000 +0200
  93308. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/pt-sigaction.c 2014-07-25 20:36:09.081346603 +0200
  93309. @@ -13,9 +13,8 @@
  93310. Lesser General Public License for more details.
  93311. You should have received a copy of the GNU Lesser General Public
  93312. - License along with the GNU C Library; if not, write to the Free
  93313. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93314. - 02111-1307 USA. */
  93315. + License along with the GNU C Library; if not, see
  93316. + <http://www.gnu.org/licenses/>. */
  93317. #include <pthreadP.h>
  93318. #include <signal.h>
  93319. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/setxid.h uClibc-git/libpthread/nptl/sysdeps/pthread/setxid.h
  93320. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/setxid.h 2012-05-15 09:20:09.000000000 +0200
  93321. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/setxid.h 2014-07-25 20:36:09.081346603 +0200
  93322. @@ -12,9 +12,8 @@
  93323. Lesser General Public License for more details.
  93324. You should have received a copy of the GNU Lesser General Public
  93325. - License along with the GNU C Library; if not, write to the Free
  93326. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93327. - 02111-1307 USA. */
  93328. + License along with the GNU C Library; if not, see
  93329. + <http://www.gnu.org/licenses/>. */
  93330. #include <pthreadP.h>
  93331. #include <sysdep.h>
  93332. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/sigfillset.c uClibc-git/libpthread/nptl/sysdeps/pthread/sigfillset.c
  93333. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/sigfillset.c 1970-01-01 01:00:00.000000000 +0100
  93334. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/sigfillset.c 2014-07-25 20:36:09.081346603 +0200
  93335. @@ -0,0 +1,20 @@
  93336. +/* Copyright (C) 2003, 2005 Free Software Foundation, Inc.
  93337. + This file is part of the GNU C Library.
  93338. +
  93339. + The GNU C Library is free software; you can redistribute it and/or
  93340. + modify it under the terms of the GNU Lesser General Public
  93341. + License as published by the Free Software Foundation; either
  93342. + version 2.1 of the License, or (at your option) any later version.
  93343. +
  93344. + The GNU C Library is distributed in the hope that it will be useful,
  93345. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  93346. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  93347. + Lesser General Public License for more details.
  93348. +
  93349. + You should have received a copy of the GNU Lesser General Public
  93350. + License along with the GNU C Library; if not, see
  93351. + <http://www.gnu.org/licenses/>. */
  93352. +
  93353. +#include <pthreadP.h>
  93354. +
  93355. +#include <../../../../libc/signal/sigfillset.c>
  93356. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/sigprocmask.c uClibc-git/libpthread/nptl/sysdeps/pthread/sigprocmask.c
  93357. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/sigprocmask.c 1970-01-01 01:00:00.000000000 +0100
  93358. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/sigprocmask.c 2014-07-25 20:36:09.081346603 +0200
  93359. @@ -0,0 +1,21 @@
  93360. +/* Copyright (C) 1997,1998,1999,2000,2001,2003 Free Software Foundation, Inc.
  93361. + This file is part of the GNU C Library.
  93362. +
  93363. + The GNU C Library is free software; you can redistribute it and/or
  93364. + modify it under the terms of the GNU Lesser General Public
  93365. + License as published by the Free Software Foundation; either
  93366. + version 2.1 of the License, or (at your option) any later version.
  93367. +
  93368. + The GNU C Library is distributed in the hope that it will be useful,
  93369. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  93370. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  93371. + Lesser General Public License for more details.
  93372. +
  93373. + You should have received a copy of the GNU Lesser General Public
  93374. + License along with the GNU C Library; if not, see
  93375. + <http://www.gnu.org/licenses/>. */
  93376. +
  93377. +#include <pthreadP.h>
  93378. +#undef _LARGEFILE64_SOURCE
  93379. +
  93380. +#include <../../../../libc/sysdeps/linux/common/sigprocmask.c>
  93381. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_create.c uClibc-git/libpthread/nptl/sysdeps/pthread/timer_create.c
  93382. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_create.c 2012-05-15 09:20:09.000000000 +0200
  93383. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/timer_create.c 2014-07-25 20:36:09.081346603 +0200
  93384. @@ -13,9 +13,8 @@
  93385. Lesser General Public License for more details.
  93386. You should have received a copy of the GNU Lesser General Public
  93387. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  93388. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  93389. - Boston, MA 02111-1307, USA. */
  93390. + License along with the GNU C Library; see the file COPYING.LIB. If
  93391. + not, see <http://www.gnu.org/licenses/>. */
  93392. #include <errno.h>
  93393. #include <signal.h>
  93394. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_delete.c uClibc-git/libpthread/nptl/sysdeps/pthread/timer_delete.c
  93395. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_delete.c 2012-05-15 09:20:09.000000000 +0200
  93396. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/timer_delete.c 2014-07-25 20:36:09.081346603 +0200
  93397. @@ -13,9 +13,8 @@
  93398. Lesser General Public License for more details.
  93399. You should have received a copy of the GNU Lesser General Public
  93400. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  93401. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  93402. - Boston, MA 02111-1307, USA. */
  93403. + License along with the GNU C Library; see the file COPYING.LIB. If
  93404. + not, see <http://www.gnu.org/licenses/>. */
  93405. #include <assert.h>
  93406. #include <errno.h>
  93407. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_getoverr.c uClibc-git/libpthread/nptl/sysdeps/pthread/timer_getoverr.c
  93408. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_getoverr.c 2012-05-15 09:20:09.000000000 +0200
  93409. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/timer_getoverr.c 2014-07-25 20:36:09.081346603 +0200
  93410. @@ -13,9 +13,8 @@
  93411. Lesser General Public License for more details.
  93412. You should have received a copy of the GNU Lesser General Public
  93413. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  93414. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  93415. - Boston, MA 02111-1307, USA. */
  93416. + License along with the GNU C Library; see the file COPYING.LIB. If
  93417. + not, see <http://www.gnu.org/licenses/>. */
  93418. #include <errno.h>
  93419. #include <pthread.h>
  93420. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_gettime.c uClibc-git/libpthread/nptl/sysdeps/pthread/timer_gettime.c
  93421. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_gettime.c 2012-05-15 09:20:09.000000000 +0200
  93422. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/timer_gettime.c 2014-07-25 20:36:09.081346603 +0200
  93423. @@ -13,9 +13,8 @@
  93424. Lesser General Public License for more details.
  93425. You should have received a copy of the GNU Lesser General Public
  93426. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  93427. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  93428. - Boston, MA 02111-1307, USA. */
  93429. + License along with the GNU C Library; see the file COPYING.LIB. If
  93430. + not, see <http://www.gnu.org/licenses/>. */
  93431. #include <errno.h>
  93432. #include <pthread.h>
  93433. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_routines.c uClibc-git/libpthread/nptl/sysdeps/pthread/timer_routines.c
  93434. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_routines.c 2012-05-15 09:20:09.000000000 +0200
  93435. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/timer_routines.c 2014-07-25 20:36:09.081346603 +0200
  93436. @@ -14,9 +14,8 @@
  93437. Lesser General Public License for more details.
  93438. You should have received a copy of the GNU Lesser General Public
  93439. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  93440. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  93441. - Boston, MA 02111-1307, USA. */
  93442. + License along with the GNU C Library; see the file COPYING.LIB. If
  93443. + not, see <http://www.gnu.org/licenses/>. */
  93444. #include <assert.h>
  93445. #include <errno.h>
  93446. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_settime.c uClibc-git/libpthread/nptl/sysdeps/pthread/timer_settime.c
  93447. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/timer_settime.c 2012-05-15 09:20:09.000000000 +0200
  93448. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/timer_settime.c 2014-07-25 20:36:09.085346623 +0200
  93449. @@ -13,9 +13,8 @@
  93450. Lesser General Public License for more details.
  93451. You should have received a copy of the GNU Lesser General Public
  93452. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  93453. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  93454. - Boston, MA 02111-1307, USA. */
  93455. + License along with the GNU C Library; see the file COPYING.LIB. If
  93456. + not, see <http://www.gnu.org/licenses/>. */
  93457. #include <errno.h>
  93458. #include <pthread.h>
  93459. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/tpp.c uClibc-git/libpthread/nptl/sysdeps/pthread/tpp.c
  93460. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/tpp.c 2012-05-15 09:20:09.000000000 +0200
  93461. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/tpp.c 2014-07-25 20:36:09.085346623 +0200
  93462. @@ -14,9 +14,8 @@
  93463. Lesser General Public License for more details.
  93464. You should have received a copy of the GNU Lesser General Public
  93465. - License along with the GNU C Library; if not, write to the Free
  93466. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93467. - 02111-1307 USA. */
  93468. + License along with the GNU C Library; if not, see
  93469. + <http://www.gnu.org/licenses/>. */
  93470. #include <assert.h>
  93471. #include <atomic.h>
  93472. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/unwind-forcedunwind.c uClibc-git/libpthread/nptl/sysdeps/pthread/unwind-forcedunwind.c
  93473. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/unwind-forcedunwind.c 2012-05-15 09:20:09.000000000 +0200
  93474. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/unwind-forcedunwind.c 2014-07-25 20:36:09.085346623 +0200
  93475. @@ -13,9 +13,8 @@
  93476. Lesser General Public License for more details.
  93477. You should have received a copy of the GNU Lesser General Public
  93478. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  93479. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  93480. - Boston, MA 02111-1307, USA. */
  93481. + License along with the GNU C Library; see the file COPYING.LIB. If
  93482. + not, see <http://www.gnu.org/licenses/>. */
  93483. #include <dlfcn.h>
  93484. #include <stdio.h>
  93485. @@ -112,6 +111,11 @@
  93486. _Unwind_Reason_Code
  93487. __gcc_personality_v0 (int version, _Unwind_Action actions,
  93488. _Unwind_Exception_Class exception_class,
  93489. + struct _Unwind_Exception *ue_header,
  93490. + struct _Unwind_Context *context);
  93491. +_Unwind_Reason_Code
  93492. +__gcc_personality_v0 (int version, _Unwind_Action actions,
  93493. + _Unwind_Exception_Class exception_class,
  93494. struct _Unwind_Exception *ue_header,
  93495. struct _Unwind_Context *context)
  93496. {
  93497. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/unwind-resume.c uClibc-git/libpthread/nptl/sysdeps/pthread/unwind-resume.c
  93498. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/pthread/unwind-resume.c 2012-05-15 09:20:09.000000000 +0200
  93499. +++ uClibc-git/libpthread/nptl/sysdeps/pthread/unwind-resume.c 2014-07-25 20:36:09.085346623 +0200
  93500. @@ -13,9 +13,8 @@
  93501. Lesser General Public License for more details.
  93502. You should have received a copy of the GNU Lesser General Public
  93503. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  93504. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  93505. - Boston, MA 02111-1307, USA. */
  93506. + License along with the GNU C Library; see the file COPYING.LIB. If
  93507. + not, see <http://www.gnu.org/licenses/>. */
  93508. #include <dlfcn.h>
  93509. #include <stdio.h>
  93510. @@ -66,6 +65,11 @@
  93511. _Unwind_Reason_Code
  93512. __gcc_personality_v0 (int version, _Unwind_Action actions,
  93513. _Unwind_Exception_Class exception_class,
  93514. + struct _Unwind_Exception *ue_header,
  93515. + struct _Unwind_Context *context);
  93516. +_Unwind_Reason_Code
  93517. +__gcc_personality_v0 (int version, _Unwind_Action actions,
  93518. + _Unwind_Exception_Class exception_class,
  93519. struct _Unwind_Exception *ue_header,
  93520. struct _Unwind_Context *context)
  93521. {
  93522. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/dl-tls.h uClibc-git/libpthread/nptl/sysdeps/sh/dl-tls.h
  93523. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/dl-tls.h 2012-05-15 09:20:09.000000000 +0200
  93524. +++ uClibc-git/libpthread/nptl/sysdeps/sh/dl-tls.h 2014-07-25 20:36:09.109346749 +0200
  93525. @@ -13,9 +13,8 @@
  93526. Lesser General Public License for more details.
  93527. You should have received a copy of the GNU Lesser General Public
  93528. - License along with the GNU C Library; if not, write to the Free
  93529. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93530. - 02111-1307 USA. */
  93531. + License along with the GNU C Library; if not, see
  93532. + <http://www.gnu.org/licenses/>. */
  93533. /* Type used for the representation of TLS information in the GOT. */
  93534. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/jmpbuf-unwind.h uClibc-git/libpthread/nptl/sysdeps/sh/jmpbuf-unwind.h
  93535. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/jmpbuf-unwind.h 2012-05-15 09:20:09.000000000 +0200
  93536. +++ uClibc-git/libpthread/nptl/sysdeps/sh/jmpbuf-unwind.h 2014-07-25 20:36:09.109346749 +0200
  93537. @@ -13,9 +13,8 @@
  93538. Lesser General Public License for more details.
  93539. You should have received a copy of the GNU Lesser General Public
  93540. - License along with the GNU C Library; if not, write to the Free
  93541. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93542. - 02111-1307 USA. */
  93543. + License along with the GNU C Library; if not, see
  93544. + <http://www.gnu.org/licenses/>. */
  93545. #include <setjmp.h>
  93546. #include <stdint.h>
  93547. @@ -26,8 +25,3 @@
  93548. #define _JMPBUF_UNWINDS_ADJ(jmpbuf, address, adj) \
  93549. ((uintptr_t) (address) - (adj) < (uintptr_t) (jmpbuf)[0].__regs[7] - (adj))
  93550. -
  93551. -extern __typeof(longjmp) __libc_longjmp attribute_noreturn;
  93552. -
  93553. -/* We use the normal lobngjmp for unwinding. */
  93554. -#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
  93555. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/pthreaddef.h uClibc-git/libpthread/nptl/sysdeps/sh/pthreaddef.h
  93556. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/pthreaddef.h 2012-05-15 09:20:09.000000000 +0200
  93557. +++ uClibc-git/libpthread/nptl/sysdeps/sh/pthreaddef.h 2014-07-25 20:36:09.109346749 +0200
  93558. @@ -12,9 +12,8 @@
  93559. Lesser General Public License for more details.
  93560. You should have received a copy of the GNU Lesser General Public
  93561. - License along with the GNU C Library; if not, write to the Free
  93562. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93563. - 02111-1307 USA. */
  93564. + License along with the GNU C Library; if not, see
  93565. + <http://www.gnu.org/licenses/>. */
  93566. #include <sysdep.h>
  93567. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/pthread_spin_init.c uClibc-git/libpthread/nptl/sysdeps/sh/pthread_spin_init.c
  93568. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/pthread_spin_init.c 2012-05-15 09:20:09.000000000 +0200
  93569. +++ uClibc-git/libpthread/nptl/sysdeps/sh/pthread_spin_init.c 2014-07-25 20:36:09.109346749 +0200
  93570. @@ -13,8 +13,7 @@
  93571. Lesser General Public License for more details.
  93572. You should have received a copy of the GNU Lesser General Public
  93573. - License along with the GNU C Library; if not, write to the Free
  93574. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93575. - 02111-1307 USA. */
  93576. + License along with the GNU C Library; if not, see
  93577. + <http://www.gnu.org/licenses/>. */
  93578. /* Not needed. pthread_spin_init is an alias for pthread_spin_unlock. */
  93579. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/pthread_spin_lock.c uClibc-git/libpthread/nptl/sysdeps/sh/pthread_spin_lock.c
  93580. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/pthread_spin_lock.c 2012-05-15 09:20:09.000000000 +0200
  93581. +++ uClibc-git/libpthread/nptl/sysdeps/sh/pthread_spin_lock.c 2014-07-25 20:36:09.109346749 +0200
  93582. @@ -12,9 +12,8 @@
  93583. Lesser General Public License for more details.
  93584. You should have received a copy of the GNU Lesser General Public
  93585. - License along with the GNU C Library; if not, write to the Free
  93586. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93587. - 02111-1307 USA. */
  93588. + License along with the GNU C Library; if not, see
  93589. + <http://www.gnu.org/licenses/>. */
  93590. #include "pthreadP.h"
  93591. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/pthread_spin_trylock.S uClibc-git/libpthread/nptl/sysdeps/sh/pthread_spin_trylock.S
  93592. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/pthread_spin_trylock.S 2012-05-15 09:20:09.000000000 +0200
  93593. +++ uClibc-git/libpthread/nptl/sysdeps/sh/pthread_spin_trylock.S 2014-07-25 20:36:09.109346749 +0200
  93594. @@ -12,9 +12,8 @@
  93595. Lesser General Public License for more details.
  93596. You should have received a copy of the GNU Lesser General Public
  93597. - License along with the GNU C Library; if not, write to the Free
  93598. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93599. - 02111-1307 USA. */
  93600. + License along with the GNU C Library; if not, see
  93601. + <http://www.gnu.org/licenses/>. */
  93602. #include <pthread-errnos.h>
  93603. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/pthread_spin_unlock.S uClibc-git/libpthread/nptl/sysdeps/sh/pthread_spin_unlock.S
  93604. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/pthread_spin_unlock.S 2012-05-15 09:20:09.000000000 +0200
  93605. +++ uClibc-git/libpthread/nptl/sysdeps/sh/pthread_spin_unlock.S 2014-07-25 20:36:09.109346749 +0200
  93606. @@ -12,9 +12,8 @@
  93607. Lesser General Public License for more details.
  93608. You should have received a copy of the GNU Lesser General Public
  93609. - License along with the GNU C Library; if not, write to the Free
  93610. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93611. - 02111-1307 USA. */
  93612. + License along with the GNU C Library; if not, see
  93613. + <http://www.gnu.org/licenses/>. */
  93614. .globl pthread_spin_unlock
  93615. .type pthread_spin_unlock,@function
  93616. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/tls.h uClibc-git/libpthread/nptl/sysdeps/sh/tls.h
  93617. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sh/tls.h 2012-05-15 09:20:09.000000000 +0200
  93618. +++ uClibc-git/libpthread/nptl/sysdeps/sh/tls.h 2014-07-25 20:36:09.113346770 +0200
  93619. @@ -13,9 +13,8 @@
  93620. Lesser General Public License for more details.
  93621. You should have received a copy of the GNU Lesser General Public
  93622. - License along with the GNU C Library; if not, write to the Free
  93623. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93624. - 02111-1307 USA. */
  93625. + License along with the GNU C Library; if not, see
  93626. + <http://www.gnu.org/licenses/>. */
  93627. #ifndef _TLS_H
  93628. #define _TLS_H
  93629. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/dl-tls.h uClibc-git/libpthread/nptl/sysdeps/sparc/dl-tls.h
  93630. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/dl-tls.h 2012-05-15 09:20:09.000000000 +0200
  93631. +++ uClibc-git/libpthread/nptl/sysdeps/sparc/dl-tls.h 2014-07-25 20:36:09.121346811 +0200
  93632. @@ -13,9 +13,8 @@
  93633. Lesser General Public License for more details.
  93634. You should have received a copy of the GNU Lesser General Public
  93635. - License along with the GNU C Library; if not, write to the Free
  93636. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93637. - 02111-1307 USA. */
  93638. + License along with the GNU C Library; if not, see
  93639. + <http://www.gnu.org/licenses/>. */
  93640. /* Type used for the representation of TLS information in the GOT. */
  93641. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc32/jmpbuf-unwind.h uClibc-git/libpthread/nptl/sysdeps/sparc/sparc32/jmpbuf-unwind.h
  93642. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc32/jmpbuf-unwind.h 2012-05-15 09:20:09.000000000 +0200
  93643. +++ uClibc-git/libpthread/nptl/sysdeps/sparc/sparc32/jmpbuf-unwind.h 2014-07-25 20:36:09.133346875 +0200
  93644. @@ -13,9 +13,8 @@
  93645. Lesser General Public License for more details.
  93646. You should have received a copy of the GNU Lesser General Public
  93647. - License along with the GNU C Library; if not, write to the Free
  93648. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93649. - 02111-1307 USA. */
  93650. + License along with the GNU C Library; if not, see
  93651. + <http://www.gnu.org/licenses/>. */
  93652. #include <setjmp.h>
  93653. #include <stdint.h>
  93654. @@ -26,7 +25,3 @@
  93655. #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
  93656. ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
  93657. -
  93658. -/* We use the normal longjmp for unwinding. */
  93659. -extern __typeof(longjmp) __libc_longjmp attribute_noreturn;
  93660. -#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
  93661. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc32/pthreaddef.h uClibc-git/libpthread/nptl/sysdeps/sparc/sparc32/pthreaddef.h
  93662. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc32/pthreaddef.h 2012-05-15 09:20:09.000000000 +0200
  93663. +++ uClibc-git/libpthread/nptl/sysdeps/sparc/sparc32/pthreaddef.h 2014-07-25 20:36:09.133346875 +0200
  93664. @@ -12,9 +12,8 @@
  93665. Lesser General Public License for more details.
  93666. You should have received a copy of the GNU Lesser General Public
  93667. - License along with the GNU C Library; if not, write to the Free
  93668. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93669. - 02111-1307 USA. */
  93670. + License along with the GNU C Library; if not, see
  93671. + <http://www.gnu.org/licenses/>. */
  93672. /* Default stack size. */
  93673. #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
  93674. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.c uClibc-git/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.c
  93675. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.c 2012-05-15 09:20:09.000000000 +0200
  93676. +++ uClibc-git/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.c 2014-07-25 20:36:09.133346875 +0200
  93677. @@ -13,16 +13,15 @@
  93678. Lesser General Public License for more details.
  93679. You should have received a copy of the GNU Lesser General Public
  93680. - License along with the GNU C Library; if not, write to the Free
  93681. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93682. - 02111-1307 USA. */
  93683. + License along with the GNU C Library; if not, see
  93684. + <http://www.gnu.org/licenses/>. */
  93685. #include "pthreadP.h"
  93686. int
  93687. pthread_spin_lock (pthread_spinlock_t *lock)
  93688. {
  93689. - __asm__ __volatile
  93690. + __asm__ __volatile__
  93691. ("1: ldstub [%0], %%g2\n"
  93692. " orcc %%g2, 0x0, %%g0\n"
  93693. " bne,a 2f\n"
  93694. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_trylock.c uClibc-git/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_trylock.c
  93695. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_trylock.c 2012-05-15 09:20:09.000000000 +0200
  93696. +++ uClibc-git/libpthread/nptl/sysdeps/sparc/sparc32/pthread_spin_trylock.c 2014-07-25 20:36:09.133346875 +0200
  93697. @@ -13,9 +13,8 @@
  93698. Lesser General Public License for more details.
  93699. You should have received a copy of the GNU Lesser General Public
  93700. - License along with the GNU C Library; if not, write to the Free
  93701. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93702. - 02111-1307 USA. */
  93703. + License along with the GNU C Library; if not, see
  93704. + <http://www.gnu.org/licenses/>. */
  93705. #include <errno.h>
  93706. #include "pthreadP.h"
  93707. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c uClibc-git/libpthread/nptl/sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c
  93708. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c 2012-05-15 09:20:09.000000000 +0200
  93709. +++ uClibc-git/libpthread/nptl/sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c 2014-07-25 20:36:09.133346875 +0200
  93710. @@ -13,16 +13,15 @@
  93711. Lesser General Public License for more details.
  93712. You should have received a copy of the GNU Lesser General Public
  93713. - License along with the GNU C Library; if not, write to the Free
  93714. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93715. - 02111-1307 USA. */
  93716. + License along with the GNU C Library; if not, see
  93717. + <http://www.gnu.org/licenses/>. */
  93718. #include "pthreadP.h"
  93719. int
  93720. pthread_spin_lock (pthread_spinlock_t *lock)
  93721. {
  93722. - __asm__ __volatile
  93723. + __asm__ __volatile__
  93724. ("1: ldstub [%0], %%g2\n"
  93725. " brnz,pn %%g2, 2f\n"
  93726. " membar #StoreLoad | #StoreStore\n"
  93727. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc64/jmpbuf-unwind.h uClibc-git/libpthread/nptl/sysdeps/sparc/sparc64/jmpbuf-unwind.h
  93728. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc64/jmpbuf-unwind.h 2012-05-15 09:20:09.000000000 +0200
  93729. +++ uClibc-git/libpthread/nptl/sysdeps/sparc/sparc64/jmpbuf-unwind.h 2014-07-25 20:36:09.133346875 +0200
  93730. @@ -13,9 +13,8 @@
  93731. Lesser General Public License for more details.
  93732. You should have received a copy of the GNU Lesser General Public
  93733. - License along with the GNU C Library; if not, write to the Free
  93734. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93735. - 02111-1307 USA. */
  93736. + License along with the GNU C Library; if not, see
  93737. + <http://www.gnu.org/licenses/>. */
  93738. #include <setjmp.h>
  93739. #include <stdint.h>
  93740. @@ -26,6 +25,3 @@
  93741. #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
  93742. ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj))
  93743. -
  93744. -/* We use the normal lobngjmp for unwinding. */
  93745. -#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
  93746. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc64/pthreaddef.h uClibc-git/libpthread/nptl/sysdeps/sparc/sparc64/pthreaddef.h
  93747. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc64/pthreaddef.h 2012-05-15 09:20:09.000000000 +0200
  93748. +++ uClibc-git/libpthread/nptl/sysdeps/sparc/sparc64/pthreaddef.h 2014-07-25 20:36:09.133346875 +0200
  93749. @@ -12,9 +12,8 @@
  93750. Lesser General Public License for more details.
  93751. You should have received a copy of the GNU Lesser General Public
  93752. - License along with the GNU C Library; if not, write to the Free
  93753. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93754. - 02111-1307 USA. */
  93755. + License along with the GNU C Library; if not, see
  93756. + <http://www.gnu.org/licenses/>. */
  93757. /* Default stack size. */
  93758. #define ARCH_STACK_DEFAULT_SIZE (4 * 1024 * 1024)
  93759. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.c uClibc-git/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.c
  93760. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.c 2012-05-15 09:20:09.000000000 +0200
  93761. +++ uClibc-git/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.c 2014-07-25 20:36:09.133346875 +0200
  93762. @@ -13,16 +13,15 @@
  93763. Lesser General Public License for more details.
  93764. You should have received a copy of the GNU Lesser General Public
  93765. - License along with the GNU C Library; if not, write to the Free
  93766. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93767. - 02111-1307 USA. */
  93768. + License along with the GNU C Library; if not, see
  93769. + <http://www.gnu.org/licenses/>. */
  93770. #include "pthreadP.h"
  93771. int
  93772. pthread_spin_lock (pthread_spinlock_t *lock)
  93773. {
  93774. - __asm__ __volatile
  93775. + __asm__ __volatile__
  93776. ("1: ldstub [%0], %%g5\n"
  93777. " brnz,pn %%g5, 2f\n"
  93778. " membar #StoreLoad | #StoreStore\n"
  93779. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_trylock.c uClibc-git/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_trylock.c
  93780. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_trylock.c 2012-05-15 09:20:09.000000000 +0200
  93781. +++ uClibc-git/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_trylock.c 2014-07-25 20:36:09.133346875 +0200
  93782. @@ -13,9 +13,8 @@
  93783. Lesser General Public License for more details.
  93784. You should have received a copy of the GNU Lesser General Public
  93785. - License along with the GNU C Library; if not, write to the Free
  93786. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93787. - 02111-1307 USA. */
  93788. + License along with the GNU C Library; if not, see
  93789. + <http://www.gnu.org/licenses/>. */
  93790. #include <errno.h>
  93791. #include "pthreadP.h"
  93792. @@ -24,7 +23,7 @@
  93793. pthread_spin_trylock (pthread_spinlock_t *lock)
  93794. {
  93795. int res;
  93796. - __asm__ __volatile
  93797. + __asm__ __volatile__
  93798. ("ldstub [%1], %0\n"
  93799. "membar #StoreLoad | #StoreStore"
  93800. : "=r" (res)
  93801. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_unlock.c uClibc-git/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_unlock.c
  93802. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_unlock.c 2012-05-15 09:20:09.000000000 +0200
  93803. +++ uClibc-git/libpthread/nptl/sysdeps/sparc/sparc64/pthread_spin_unlock.c 2014-07-25 20:36:09.133346875 +0200
  93804. @@ -14,9 +14,8 @@
  93805. Lesser General Public License for more details.
  93806. You should have received a copy of the GNU Lesser General Public
  93807. - License along with the GNU C Library; if not, write to the Free
  93808. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93809. - 02111-1307 USA. */
  93810. + License along with the GNU C Library; if not, see
  93811. + <http://www.gnu.org/licenses/>. */
  93812. #include "pthreadP.h"
  93813. #include <atomic.h>
  93814. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/tls.h uClibc-git/libpthread/nptl/sysdeps/sparc/tls.h
  93815. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/sparc/tls.h 2012-05-15 09:20:09.000000000 +0200
  93816. +++ uClibc-git/libpthread/nptl/sysdeps/sparc/tls.h 2014-07-25 20:36:09.133346875 +0200
  93817. @@ -13,9 +13,8 @@
  93818. Lesser General Public License for more details.
  93819. You should have received a copy of the GNU Lesser General Public
  93820. - License along with the GNU C Library; if not, write to the Free
  93821. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93822. - 02111-1307 USA. */
  93823. + License along with the GNU C Library; if not, see
  93824. + <http://www.gnu.org/licenses/>. */
  93825. #ifndef _TLS_H
  93826. #define _TLS_H
  93827. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h
  93828. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h 2012-05-15 09:20:09.000000000 +0200
  93829. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/local_lim.h 2014-07-25 20:36:09.133346875 +0200
  93830. @@ -14,8 +14,7 @@
  93831. You should have received a copy of the GNU Library General Public
  93832. License along with the GNU C Library; see the file COPYING.LIB. If not,
  93833. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  93834. - Boston, MA 02111-1307, USA. */
  93835. + see <http://www.gnu.org/licenses/>. */
  93836. /* The kernel header pollutes the namespace with the NR_OPEN symbol
  93837. and defines LINK_MAX although filesystems have different maxima. A
  93838. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
  93839. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h 2012-05-15 09:20:09.000000000 +0200
  93840. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h 2014-07-25 20:36:09.133346875 +0200
  93841. @@ -13,9 +13,8 @@
  93842. Lesser General Public License for more details.
  93843. You should have received a copy of the GNU Lesser General Public
  93844. - License along with the GNU C Library; if not, write to the Free
  93845. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93846. - 02111-1307 USA. */
  93847. + License along with the GNU C Library; if not, see
  93848. + <http://www.gnu.org/licenses/>. */
  93849. #ifndef _BITS_PTHREADTYPES_H
  93850. #define _BITS_PTHREADTYPES_H 1
  93851. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/semaphore.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/semaphore.h
  93852. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/semaphore.h 2012-05-15 09:20:09.000000000 +0200
  93853. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/bits/semaphore.h 2014-07-25 20:36:09.133346875 +0200
  93854. @@ -13,9 +13,8 @@
  93855. Lesser General Public License for more details.
  93856. You should have received a copy of the GNU Lesser General Public
  93857. - License along with the GNU C Library; if not, write to the Free
  93858. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93859. - 02111-1307 USA. */
  93860. + License along with the GNU C Library; if not, see
  93861. + <http://www.gnu.org/licenses/>. */
  93862. #ifndef _SEMAPHORE_H
  93863. # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
  93864. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/createthread.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/createthread.c
  93865. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/createthread.c 2012-05-15 09:20:09.000000000 +0200
  93866. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/createthread.c 2014-07-25 20:36:09.133346875 +0200
  93867. @@ -12,9 +12,8 @@
  93868. Lesser General Public License for more details.
  93869. You should have received a copy of the GNU Lesser General Public
  93870. - License along with the GNU C Library; if not, write to the Free
  93871. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93872. - 02111-1307 USA. */
  93873. + License along with the GNU C Library; if not, see
  93874. + <http://www.gnu.org/licenses/>. */
  93875. /* Value passed to 'clone' for initialization of the thread register. */
  93876. #define TLS_VALUE (pd + 1)
  93877. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/fork.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/fork.c
  93878. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/fork.c 2012-05-15 09:20:09.000000000 +0200
  93879. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/fork.c 2014-07-25 20:36:09.133346875 +0200
  93880. @@ -12,9 +12,8 @@
  93881. Lesser General Public License for more details.
  93882. You should have received a copy of the GNU Lesser General Public
  93883. - License along with the GNU C Library; if not, write to the Free
  93884. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93885. - 02111-1307 USA. */
  93886. + License along with the GNU C Library; if not, see
  93887. + <http://www.gnu.org/licenses/>. */
  93888. #include <sched.h>
  93889. #include <signal.h>
  93890. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h
  93891. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h 2012-05-15 09:20:09.000000000 +0200
  93892. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h 2014-07-25 20:36:09.133346875 +0200
  93893. @@ -12,9 +12,8 @@
  93894. Lesser General Public License for more details.
  93895. You should have received a copy of the GNU Lesser General Public
  93896. - License along with the GNU C Libr \ary; if not, write to the Free
  93897. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93898. - 02111-1307 USA. */
  93899. + License along with the GNU C Library; see the file COPYING.LIB. If
  93900. + not, see <http://www.gnu.org/licenses/>. */
  93901. #ifndef _LOWLEVELLOCK_H
  93902. #define _LOWLEVELLOCK_H 1
  93903. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pthread_once.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pthread_once.c
  93904. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pthread_once.c 2012-05-15 09:20:09.000000000 +0200
  93905. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pthread_once.c 2014-07-25 20:36:09.133346875 +0200
  93906. @@ -12,9 +12,8 @@
  93907. Lesser General Public License for more details.
  93908. You should have received a copy of the GNU Lesser General Public
  93909. - License along with the GNU C Library; if not, write to the Free
  93910. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93911. - 02111-1307 USA. */
  93912. + License along with the GNU C Library; if not, see
  93913. + <http://www.gnu.org/licenses/>. */
  93914. #include "pthreadP.h"
  93915. #include <lowlevellock.h>
  93916. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S
  93917. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S 2012-05-15 09:20:09.000000000 +0200
  93918. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S 2014-07-25 20:36:09.133346875 +0200
  93919. @@ -12,9 +12,8 @@
  93920. Lesser General Public License for more details.
  93921. You should have received a copy of the GNU Lesser General Public
  93922. - License along with the GNU C Library; if not, write to the Free
  93923. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93924. - 02111-1307 USA. */
  93925. + License along with the GNU C Library; if not, see
  93926. + <http://www.gnu.org/licenses/>. */
  93927. #include <sysdep.h>
  93928. #include <tcb-offsets.h>
  93929. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h
  93930. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  93931. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2014-07-25 20:36:09.133346875 +0200
  93932. @@ -12,9 +12,8 @@
  93933. Lesser General Public License for more details.
  93934. You should have received a copy of the GNU Lesser General Public
  93935. - License along with the GNU C Library; if not, write to the Free
  93936. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93937. - 02111-1307 USA. */
  93938. + License along with the GNU C Library; if not, see
  93939. + <http://www.gnu.org/licenses/>. */
  93940. #include <sysdep.h>
  93941. #include <tls.h>
  93942. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/vfork.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/vfork.S
  93943. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/vfork.S 2012-05-15 09:20:09.000000000 +0200
  93944. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/vfork.S 2014-07-25 20:36:09.137346895 +0200
  93945. @@ -12,9 +12,8 @@
  93946. Lesser General Public License for more details.
  93947. You should have received a copy of the GNU Lesser General Public
  93948. - License along with the GNU C Library; if not, write to the Free
  93949. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93950. - 02111-1307 USA. */
  93951. + License along with the GNU C Library; if not, see
  93952. + <http://www.gnu.org/licenses/>. */
  93953. #include <sysdep.h>
  93954. #include <tcb-offsets.h>
  93955. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/bits/pthreadtypes.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/bits/pthreadtypes.h
  93956. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/bits/pthreadtypes.h 2012-05-15 09:20:09.000000000 +0200
  93957. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/bits/pthreadtypes.h 2014-07-25 20:36:09.137346895 +0200
  93958. @@ -12,9 +12,8 @@
  93959. Lesser General Public License for more details.
  93960. You should have received a copy of the GNU Lesser General Public
  93961. - License along with the GNU C Library; if not, write to the Free
  93962. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93963. - 02111-1307 USA. */
  93964. + License along with the GNU C Library; if not, see
  93965. + <http://www.gnu.org/licenses/>. */
  93966. #ifndef _BITS_PTHREADTYPES_H
  93967. #define _BITS_PTHREADTYPES_H 1
  93968. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/bits/semaphore.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/bits/semaphore.h
  93969. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/bits/semaphore.h 2012-05-15 09:20:09.000000000 +0200
  93970. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/bits/semaphore.h 2014-07-25 20:36:09.137346895 +0200
  93971. @@ -12,9 +12,8 @@
  93972. Lesser General Public License for more details.
  93973. You should have received a copy of the GNU Lesser General Public
  93974. - License along with the GNU C Library; if not, write to the Free
  93975. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93976. - 02111-1307 USA. */
  93977. + License along with the GNU C Library; if not, see
  93978. + <http://www.gnu.org/licenses/>. */
  93979. #ifndef _SEMAPHORE_H
  93980. # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
  93981. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/createthread.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/createthread.c
  93982. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/createthread.c 2012-05-15 09:20:09.000000000 +0200
  93983. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/createthread.c 2014-07-25 20:36:09.137346895 +0200
  93984. @@ -12,9 +12,8 @@
  93985. Lesser General Public License for more details.
  93986. You should have received a copy of the GNU Lesser General Public
  93987. - License along with the GNU C Library; if not, write to the Free
  93988. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  93989. - 02111-1307 USA. */
  93990. + License along with the GNU C Library; if not, see
  93991. + <http://www.gnu.org/licenses/>. */
  93992. /* Value passed to 'clone' for initialization of the thread register. */
  93993. #define TLS_VALUE (pd + 1)
  93994. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/fork.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/fork.c
  93995. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/fork.c 2012-05-15 09:20:09.000000000 +0200
  93996. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/fork.c 2014-07-25 20:36:09.137346895 +0200
  93997. @@ -13,9 +13,8 @@
  93998. Lesser General Public License for more details.
  93999. You should have received a copy of the GNU Lesser General Public
  94000. - License along with the GNU C Library; if not, write to the Free
  94001. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94002. - 02111-1307 USA. */
  94003. + License along with the GNU C Library; if not, see
  94004. + <http://www.gnu.org/licenses/>. */
  94005. #include <sched.h>
  94006. #include <signal.h>
  94007. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/libc-lowlevellock.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/libc-lowlevellock.c
  94008. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/libc-lowlevellock.c 2012-05-15 09:20:09.000000000 +0200
  94009. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/libc-lowlevellock.c 2014-07-25 20:36:09.137346895 +0200
  94010. @@ -13,9 +13,8 @@
  94011. Lesser General Public License for more details.
  94012. You should have received a copy of the GNU Lesser General Public
  94013. - License along with the GNU C Library; if not, write to the Free
  94014. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94015. - 02111-1307 USA. */
  94016. + License along with the GNU C Library; if not, see
  94017. + <http://www.gnu.org/licenses/>. */
  94018. /* No difference to lowlevellock.c, except we lose a couple of functions. */
  94019. #include "lowlevellock.c"
  94020. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/lowlevellock.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/lowlevellock.c
  94021. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/lowlevellock.c 2012-05-15 09:20:09.000000000 +0200
  94022. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/lowlevellock.c 2014-07-25 20:36:09.137346895 +0200
  94023. @@ -13,9 +13,8 @@
  94024. Lesser General Public License for more details.
  94025. You should have received a copy of the GNU Lesser General Public
  94026. - License along with the GNU C Library; if not, write to the Free
  94027. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94028. - 02111-1307 USA. */
  94029. + License along with the GNU C Library; if not, see
  94030. + <http://www.gnu.org/licenses/>. */
  94031. #include <errno.h>
  94032. #include <sysdep.h>
  94033. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/lowlevellock.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/lowlevellock.h
  94034. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/lowlevellock.h 2012-05-15 09:20:09.000000000 +0200
  94035. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/lowlevellock.h 2014-07-25 20:36:09.137346895 +0200
  94036. @@ -12,9 +12,8 @@
  94037. Lesser General Public License for more details.
  94038. You should have received a copy of the GNU Lesser General Public
  94039. - License along with the GNU C Library; if not, write to the Free
  94040. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94041. - 02111-1307 USA. */
  94042. + License along with the GNU C Library; if not, see
  94043. + <http://www.gnu.org/licenses/>. */
  94044. #ifndef _LOWLEVELLOCK_H
  94045. #define _LOWLEVELLOCK_H 1
  94046. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pthread_once.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pthread_once.c
  94047. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pthread_once.c 2012-05-15 09:20:09.000000000 +0200
  94048. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pthread_once.c 2014-07-25 20:36:09.137346895 +0200
  94049. @@ -12,9 +12,8 @@
  94050. Lesser General Public License for more details.
  94051. You should have received a copy of the GNU Lesser General Public
  94052. - License along with the GNU C Library; if not, write to the Free
  94053. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94054. - 02111-1307 USA. */
  94055. + License along with the GNU C Library; if not, see
  94056. + <http://www.gnu.org/licenses/>. */
  94057. #include "pthreadP.h"
  94058. #include <lowlevellock.h>
  94059. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S
  94060. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S 2012-05-15 09:20:09.000000000 +0200
  94061. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S 2014-07-25 20:36:09.137346895 +0200
  94062. @@ -12,9 +12,8 @@
  94063. Lesser General Public License for more details.
  94064. You should have received a copy of the GNU Lesser General Public
  94065. - License along with the GNU C Library; if not, write to the Free
  94066. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94067. - 02111-1307 USA. */
  94068. + License along with the GNU C Library; if not, see
  94069. + <http://www.gnu.org/licenses/>. */
  94070. #include <tcb-offsets.h>
  94071. @@ -35,4 +34,4 @@
  94072. cmp r0, #0; /* If we are the parent... */ \
  94073. strne r3, [r2, #PID_OFFSET] /* ... restore the saved PID. */
  94074. -#INCLUDE <../../../../../../../LIBC/SYSDEPS/LINUX/ARM/VFORK.S>
  94075. +#include "../../../../../../../libc/sysdeps/linux/arm/vfork.S"
  94076. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
  94077. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  94078. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h 2014-07-25 20:36:09.137346895 +0200
  94079. @@ -12,9 +12,8 @@
  94080. Lesser General Public License for more details.
  94081. You should have received a copy of the GNU Lesser General Public
  94082. - License along with the GNU C Library; if not, write to the Free
  94083. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94084. - 02111-1307 USA. */
  94085. + License along with the GNU C Library; if not, see
  94086. + <http://www.gnu.org/licenses/>. */
  94087. #include <sysdep.h>
  94088. #include <tcb-offsets.h>
  94089. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
  94090. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c 2012-05-15 09:20:09.000000000 +0200
  94091. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c 2014-07-25 20:36:09.137346895 +0200
  94092. @@ -13,9 +13,8 @@
  94093. Lesser General Public License for more details.
  94094. You should have received a copy of the GNU Lesser General Public
  94095. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  94096. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  94097. - Boston, MA 02111-1307, USA. */
  94098. + License along with the GNU C Library; see the file COPYING.LIB. If
  94099. + not, see <http://www.gnu.org/licenses/>. */
  94100. #include <dlfcn.h>
  94101. #include <stdio.h>
  94102. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c
  94103. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c 2012-05-15 09:20:09.000000000 +0200
  94104. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c 2014-07-25 20:36:09.137346895 +0200
  94105. @@ -13,9 +13,8 @@
  94106. Lesser General Public License for more details.
  94107. You should have received a copy of the GNU Lesser General Public
  94108. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  94109. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  94110. - Boston, MA 02111-1307, USA. */
  94111. + License along with the GNU C Library; see the file COPYING.LIB. If
  94112. + not, see <http://www.gnu.org/licenses/>. */
  94113. #include <dlfcn.h>
  94114. #include <stdio.h>
  94115. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/vfork.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/vfork.S
  94116. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/arm/vfork.S 2012-05-15 09:20:09.000000000 +0200
  94117. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/arm/vfork.S 2014-07-25 20:36:09.137346895 +0200
  94118. @@ -12,9 +12,8 @@
  94119. Lesser General Public License for more details.
  94120. You should have received a copy of the GNU Lesser General Public
  94121. - License along with the GNU C Library; if not, write to the Free
  94122. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94123. - 02111-1307 USA. */
  94124. + License along with the GNU C Library; if not, see
  94125. + <http://www.gnu.org/licenses/>. */
  94126. #include <tcb-offsets.h>
  94127. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/bits/local_lim.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/bits/local_lim.h
  94128. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/bits/local_lim.h 2012-05-15 09:20:09.000000000 +0200
  94129. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/bits/local_lim.h 2014-07-25 20:36:09.137346895 +0200
  94130. @@ -13,9 +13,8 @@
  94131. Lesser General Public License for more details.
  94132. You should have received a copy of the GNU Lesser General Public
  94133. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  94134. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  94135. - Boston, MA 02111-1307, USA. */
  94136. + License along with the GNU C Library; see the file COPYING.LIB. If
  94137. + not, see <http://www.gnu.org/licenses/>. */
  94138. /* The kernel header pollutes the namespace with the NR_OPEN symbol
  94139. and defines LINK_MAX although filesystems have different maxima. A
  94140. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
  94141. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h 2012-05-15 09:20:09.000000000 +0200
  94142. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h 2014-07-25 20:36:09.137346895 +0200
  94143. @@ -13,9 +13,8 @@
  94144. Lesser General Public License for more details.
  94145. You should have received a copy of the GNU Lesser General Public
  94146. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  94147. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  94148. - Boston, MA 02111-1307, USA. */
  94149. + License along with the GNU C Library; see the file COPYING.LIB. If
  94150. + not, see <http://www.gnu.org/licenses/>. */
  94151. #ifndef _BITS_POSIX_OPT_H
  94152. #define _BITS_POSIX_OPT_H 1
  94153. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/createthread.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/createthread.c
  94154. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/createthread.c 2012-05-15 09:20:09.000000000 +0200
  94155. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/createthread.c 2014-07-25 20:36:09.137346895 +0200
  94156. @@ -13,9 +13,8 @@
  94157. Lesser General Public License for more details.
  94158. You should have received a copy of the GNU Lesser General Public
  94159. - License along with the GNU C Library; if not, write to the Free
  94160. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94161. - 02111-1307 USA. */
  94162. + License along with the GNU C Library; if not, see
  94163. + <http://www.gnu.org/licenses/>. */
  94164. /* Value passed to 'clone' for initialization of the thread register. */
  94165. #define TLS_VALUE pd
  94166. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/exit-thread.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/exit-thread.S
  94167. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/exit-thread.S 2012-05-15 09:20:09.000000000 +0200
  94168. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/exit-thread.S 2014-07-25 20:36:09.137346895 +0200
  94169. @@ -12,9 +12,8 @@
  94170. Lesser General Public License for more details.
  94171. You should have received a copy of the GNU Lesser General Public
  94172. - License along with the GNU C Library; if not, write to the Free
  94173. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94174. - 02111-1307 USA. */
  94175. + License along with the GNU C Library; if not, see
  94176. + <http://www.gnu.org/licenses/>. */
  94177. #include <sysdep.h>
  94178. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c
  94179. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c 2012-05-15 09:20:09.000000000 +0200
  94180. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c 2014-07-25 20:36:09.137346895 +0200
  94181. @@ -13,9 +13,8 @@
  94182. Lesser General Public License for more details.
  94183. You should have received a copy of the GNU Lesser General Public
  94184. - License along with the GNU C Library; if not, write to the Free
  94185. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94186. - 02111-1307 USA. */
  94187. + License along with the GNU C Library; if not, see
  94188. + <http://www.gnu.org/licenses/>. */
  94189. #include <assert.h>
  94190. #include <stdlib.h>
  94191. @@ -58,9 +57,15 @@
  94192. #endif
  94193. }
  94194. -extern __typeof(fork) __libc_fork;
  94195. pid_t
  94196. -__libc_fork (void)
  94197. +#if defined __arm__ && defined __thumb__ && __GNUC_PREREQ (4,6)
  94198. +/* GCC PR target/53735
  94199. + * In thumb1 we run out of registers when compiling with Os so relax that
  94200. + * to have more registers available for spilling by using O2 here.
  94201. + */
  94202. +attribute_optimize("O2")
  94203. +#endif
  94204. +fork (void)
  94205. {
  94206. pid_t pid;
  94207. struct used_handler
  94208. @@ -223,7 +228,4 @@
  94209. return pid;
  94210. }
  94211. -weak_alias(__libc_fork,__fork)
  94212. -libc_hidden_proto(fork)
  94213. -weak_alias(__libc_fork,fork)
  94214. -libc_hidden_weak(fork)
  94215. +libc_hidden_def(fork)
  94216. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/fork.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/fork.h
  94217. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/fork.h 2012-05-15 09:20:09.000000000 +0200
  94218. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/fork.h 2014-07-25 20:36:09.137346895 +0200
  94219. @@ -13,9 +13,8 @@
  94220. Lesser General Public License for more details.
  94221. You should have received a copy of the GNU Lesser General Public
  94222. - License along with the GNU C Library; if not, write to the Free
  94223. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94224. - 02111-1307 USA. */
  94225. + License along with the GNU C Library; if not, see
  94226. + <http://www.gnu.org/licenses/>. */
  94227. #include <lowlevellock.h>
  94228. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c
  94229. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c 2012-05-15 09:20:09.000000000 +0200
  94230. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c 2014-07-25 20:36:09.137346895 +0200
  94231. @@ -13,14 +13,17 @@
  94232. Lesser General Public License for more details.
  94233. You should have received a copy of the GNU Lesser General Public
  94234. - License along with the GNU C Library; if not, write to the Free
  94235. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94236. - 02111-1307 USA. */
  94237. + License along with the GNU C Library; if not, see
  94238. + <http://www.gnu.org/licenses/>. */
  94239. #include <unistd.h>
  94240. #include <tls.h>
  94241. #include <sysdep.h>
  94242. +#ifdef __NR_getxpid
  94243. +# undef __NR_getpid
  94244. +# define __NR_getpid __NR_getxpid
  94245. +#endif
  94246. #ifndef NOT_IN_libc
  94247. static inline __attribute__((always_inline)) pid_t really_getpid (pid_t oldval);
  94248. @@ -46,8 +49,7 @@
  94249. }
  94250. #endif
  94251. -extern __typeof(getpid) __getpid;
  94252. -pid_t
  94253. +static pid_t
  94254. __getpid (void)
  94255. {
  94256. #ifdef NOT_IN_libc
  94257. @@ -60,6 +62,8 @@
  94258. #endif
  94259. return result;
  94260. }
  94261. -libc_hidden_proto(getpid)
  94262. weak_alias(__getpid, getpid)
  94263. libc_hidden_weak(getpid)
  94264. +#if !defined NOT_IN_libc && !defined __NR_getppid
  94265. +strong_alias(getpid,getppid)
  94266. +#endif
  94267. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
  94268. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h 2012-05-15 09:20:09.000000000 +0200
  94269. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h 2014-07-25 20:36:09.137346895 +0200
  94270. @@ -12,9 +12,8 @@
  94271. Lesser General Public License for more details.
  94272. You should have received a copy of the GNU Lesser General Public
  94273. - License along with the GNU C Library; if not, write to the Free
  94274. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94275. - 02111-1307 USA. */
  94276. + License along with the GNU C Library; if not, see
  94277. + <http://www.gnu.org/licenses/>. */
  94278. #ifndef _BITS_PTHREADTYPES_H
  94279. #define _BITS_PTHREADTYPES_H 1
  94280. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h
  94281. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h 2012-05-15 09:20:09.000000000 +0200
  94282. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h 2014-07-25 20:36:09.137346895 +0200
  94283. @@ -13,9 +13,8 @@
  94284. Lesser General Public License for more details.
  94285. You should have received a copy of the GNU Lesser General Public
  94286. - License along with the GNU C Library; if not, write to the Free
  94287. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94288. - 02111-1307 USA. */
  94289. + License along with the GNU C Library; if not, see
  94290. + <http://www.gnu.org/licenses/>. */
  94291. #ifndef _SEMAPHORE_H
  94292. # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
  94293. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/createthread.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/createthread.c
  94294. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/createthread.c 2012-05-15 09:20:09.000000000 +0200
  94295. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/createthread.c 2014-07-25 20:36:09.137346895 +0200
  94296. @@ -13,9 +13,8 @@
  94297. Lesser General Public License for more details.
  94298. You should have received a copy of the GNU Lesser General Public
  94299. - License along with the GNU C Library; if not, write to the Free
  94300. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94301. - 02111-1307 USA. */
  94302. + License along with the GNU C Library; if not, see
  94303. + <http://www.gnu.org/licenses/>. */
  94304. /* The "thread register" gets initialized from a segment descriptor.
  94305. Initialize such a descriptor first. */
  94306. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/fork.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/fork.c
  94307. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/fork.c 2012-05-15 09:20:09.000000000 +0200
  94308. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/fork.c 2014-07-25 20:36:09.137346895 +0200
  94309. @@ -13,9 +13,8 @@
  94310. Lesser General Public License for more details.
  94311. You should have received a copy of the GNU Lesser General Public
  94312. - License along with the GNU C Library; if not, write to the Free
  94313. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94314. - 02111-1307 USA. */
  94315. + License along with the GNU C Library; if not, see
  94316. + <http://www.gnu.org/licenses/>. */
  94317. #include <sched.h>
  94318. #include <signal.h>
  94319. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
  94320. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S 2012-05-15 09:20:09.000000000 +0200
  94321. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S 2014-07-25 20:36:09.137346895 +0200
  94322. @@ -13,8 +13,7 @@
  94323. Lesser General Public License for more details.
  94324. You should have received a copy of the GNU Lesser General Public
  94325. - License along with the GNU C Library; if not, write to the Free
  94326. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94327. - 02111-1307 USA. */
  94328. + License along with the GNU C Library; if not, see
  94329. + <http://www.gnu.org/licenses/>. */
  94330. #include "lowlevellock.S"
  94331. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
  94332. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S 2012-05-15 09:20:09.000000000 +0200
  94333. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S 2014-07-25 20:36:09.137346895 +0200
  94334. @@ -13,9 +13,8 @@
  94335. Lesser General Public License for more details.
  94336. You should have received a copy of the GNU Lesser General Public
  94337. - License along with the GNU C Library; if not, write to the Free
  94338. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94339. - 02111-1307 USA. */
  94340. + License along with the GNU C Library; if not, see
  94341. + <http://www.gnu.org/licenses/>. */
  94342. #include <sysdep.h>
  94343. #include <pthread-errnos.h>
  94344. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
  94345. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S 2012-05-15 09:20:09.000000000 +0200
  94346. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S 2014-07-25 20:36:09.141346917 +0200
  94347. @@ -13,9 +13,8 @@
  94348. Lesser General Public License for more details.
  94349. You should have received a copy of the GNU Lesser General Public
  94350. - License along with the GNU C Library; if not, write to the Free
  94351. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94352. - 02111-1307 USA. */
  94353. + License along with the GNU C Library; if not, see
  94354. + <http://www.gnu.org/licenses/>. */
  94355. #include <sysdep.h>
  94356. #include <pthread-errnos.h>
  94357. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
  94358. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S 2012-05-15 09:20:09.000000000 +0200
  94359. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S 2014-07-25 20:36:09.141346917 +0200
  94360. @@ -13,9 +13,8 @@
  94361. Lesser General Public License for more details.
  94362. You should have received a copy of the GNU Lesser General Public
  94363. - License along with the GNU C Library; if not, write to the Free
  94364. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94365. - 02111-1307 USA. */
  94366. + License along with the GNU C Library; if not, see
  94367. + <http://www.gnu.org/licenses/>. */
  94368. #include <sysdep.h>
  94369. #include <lowlevellock.h>
  94370. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
  94371. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S 2012-05-15 09:20:09.000000000 +0200
  94372. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S 2014-07-25 20:36:09.141346917 +0200
  94373. @@ -13,9 +13,8 @@
  94374. Lesser General Public License for more details.
  94375. You should have received a copy of the GNU Lesser General Public
  94376. - License along with the GNU C Library; if not, write to the Free
  94377. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94378. - 02111-1307 USA. */
  94379. + License along with the GNU C Library; if not, see
  94380. + <http://www.gnu.org/licenses/>. */
  94381. #include <sysdep.h>
  94382. #include <lowlevellock.h>
  94383. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
  94384. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S 2012-05-15 09:20:09.000000000 +0200
  94385. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S 2014-07-25 20:36:09.141346917 +0200
  94386. @@ -13,9 +13,8 @@
  94387. Lesser General Public License for more details.
  94388. You should have received a copy of the GNU Lesser General Public
  94389. - License along with the GNU C Library; if not, write to the Free
  94390. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94391. - 02111-1307 USA. */
  94392. + License along with the GNU C Library; if not, see
  94393. + <http://www.gnu.org/licenses/>. */
  94394. #include <sysdep.h>
  94395. #include <lowlevellock.h>
  94396. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
  94397. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S 2012-05-15 09:20:09.000000000 +0200
  94398. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S 2014-07-25 20:36:09.141346917 +0200
  94399. @@ -13,9 +13,8 @@
  94400. Lesser General Public License for more details.
  94401. You should have received a copy of the GNU Lesser General Public
  94402. - License along with the GNU C Library; if not, write to the Free
  94403. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94404. - 02111-1307 USA. */
  94405. + License along with the GNU C Library; if not, see
  94406. + <http://www.gnu.org/licenses/>. */
  94407. #include <sysdep.h>
  94408. #include <lowlevellock.h>
  94409. @@ -23,6 +22,7 @@
  94410. #include <pthread-errnos.h>
  94411. #include <pthread-pi-defines.h>
  94412. #include <bits/kernel-features.h>
  94413. +#include <tcb-offsets.h>
  94414. .text
  94415. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
  94416. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-05-15 09:20:09.000000000 +0200
  94417. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2014-07-25 20:36:09.141346917 +0200
  94418. @@ -13,9 +13,8 @@
  94419. Lesser General Public License for more details.
  94420. You should have received a copy of the GNU Lesser General Public
  94421. - License along with the GNU C Library; if not, write to the Free
  94422. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94423. - 02111-1307 USA. */
  94424. + License along with the GNU C Library; if not, see
  94425. + <http://www.gnu.org/licenses/>. */
  94426. #include <sysdep.h>
  94427. #include <lowlevellock.h>
  94428. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
  94429. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S 2012-05-15 09:20:09.000000000 +0200
  94430. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S 2014-07-25 20:36:09.141346917 +0200
  94431. @@ -13,9 +13,8 @@
  94432. Lesser General Public License for more details.
  94433. You should have received a copy of the GNU Lesser General Public
  94434. - License along with the GNU C Library; if not, write to the Free
  94435. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94436. - 02111-1307 USA. */
  94437. + License along with the GNU C Library; if not, see
  94438. + <http://www.gnu.org/licenses/>. */
  94439. #include <sysdep.h>
  94440. #include <lowlevellock.h>
  94441. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
  94442. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S 2012-05-15 09:20:09.000000000 +0200
  94443. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S 2014-07-25 20:36:09.141346917 +0200
  94444. @@ -13,9 +13,8 @@
  94445. Lesser General Public License for more details.
  94446. You should have received a copy of the GNU Lesser General Public
  94447. - License along with the GNU C Library; if not, write to the Free
  94448. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94449. - 02111-1307 USA. */
  94450. + License along with the GNU C Library; if not, see
  94451. + <http://www.gnu.org/licenses/>. */
  94452. #include <sysdep.h>
  94453. #include <lowlevellock.h>
  94454. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
  94455. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S 2012-05-15 09:20:09.000000000 +0200
  94456. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S 2014-07-25 20:36:09.141346917 +0200
  94457. @@ -13,9 +13,8 @@
  94458. Lesser General Public License for more details.
  94459. You should have received a copy of the GNU Lesser General Public
  94460. - License along with the GNU C Library; if not, write to the Free
  94461. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94462. - 02111-1307 USA. */
  94463. + License along with the GNU C Library; if not, see
  94464. + <http://www.gnu.org/licenses/>. */
  94465. #include <sysdep.h>
  94466. #include <lowlevellock.h>
  94467. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
  94468. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S 2012-05-15 09:20:09.000000000 +0200
  94469. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S 2014-07-25 20:36:09.141346917 +0200
  94470. @@ -13,9 +13,8 @@
  94471. Lesser General Public License for more details.
  94472. You should have received a copy of the GNU Lesser General Public
  94473. - License along with the GNU C Library; if not, write to the Free
  94474. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94475. - 02111-1307 USA. */
  94476. + License along with the GNU C Library; if not, see
  94477. + <http://www.gnu.org/licenses/>. */
  94478. #include <sysdep.h>
  94479. #include <lowlevellock.h>
  94480. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
  94481. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S 2012-05-15 09:20:09.000000000 +0200
  94482. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S 2014-07-25 20:36:09.141346917 +0200
  94483. @@ -13,9 +13,8 @@
  94484. Lesser General Public License for more details.
  94485. You should have received a copy of the GNU Lesser General Public
  94486. - License along with the GNU C Library; if not, write to the Free
  94487. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94488. - 02111-1307 USA. */
  94489. + License along with the GNU C Library; if not, see
  94490. + <http://www.gnu.org/licenses/>. */
  94491. #include <sysdep.h>
  94492. #include <lowlevellock.h>
  94493. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S
  94494. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S 2012-05-15 09:20:09.000000000 +0200
  94495. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S 2014-07-25 20:36:09.141346917 +0200
  94496. @@ -13,9 +13,8 @@
  94497. Lesser General Public License for more details.
  94498. You should have received a copy of the GNU Lesser General Public
  94499. - License along with the GNU C Library; if not, write to the Free
  94500. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94501. - 02111-1307 USA. */
  94502. + License along with the GNU C Library; if not, see
  94503. + <http://www.gnu.org/licenses/>. */
  94504. #include <sysdep.h>
  94505. #include <pthread-errnos.h>
  94506. @@ -25,10 +24,10 @@
  94507. .text
  94508. - .globl __new_sem_post
  94509. - .type __new_sem_post,@function
  94510. + .globl sem_post
  94511. + .type sem_post,@function
  94512. .align 16
  94513. -__new_sem_post:
  94514. +sem_post:
  94515. cfi_startproc
  94516. pushl %ebx
  94517. cfi_adjust_cfa_offset(4)
  94518. @@ -126,9 +125,7 @@
  94519. cfi_restore(%ebx)
  94520. ret
  94521. cfi_endproc
  94522. - .size __new_sem_post,.-__new_sem_post
  94523. -weak_alias(__new_sem_post, sem_post)
  94524. -
  94525. + .size sem_post,.-sem_post
  94526. #ifdef __PIC__
  94527. .section .gnu.linkonce.t.__x86.get_pc_thunk.bx,"ax",@progbits
  94528. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
  94529. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S 2012-05-15 09:20:09.000000000 +0200
  94530. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S 2014-07-25 20:36:09.141346917 +0200
  94531. @@ -13,9 +13,8 @@
  94532. Lesser General Public License for more details.
  94533. You should have received a copy of the GNU Lesser General Public
  94534. - License along with the GNU C Library; if not, write to the Free
  94535. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94536. - 02111-1307 USA. */
  94537. + License along with the GNU C Library; if not, see
  94538. + <http://www.gnu.org/licenses/>. */
  94539. #include <sysdep.h>
  94540. #include <pthread-errnos.h>
  94541. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S
  94542. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S 2012-05-15 09:20:09.000000000 +0200
  94543. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S 2014-07-25 20:36:09.141346917 +0200
  94544. @@ -13,9 +13,8 @@
  94545. Lesser General Public License for more details.
  94546. You should have received a copy of the GNU Lesser General Public
  94547. - License along with the GNU C Library; if not, write to the Free
  94548. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94549. - 02111-1307 USA. */
  94550. + License along with the GNU C Library; if not, see
  94551. + <http://www.gnu.org/licenses/>. */
  94552. #include <sysdep.h>
  94553. #include <pthread-errnos.h>
  94554. @@ -23,10 +22,10 @@
  94555. .text
  94556. - .globl __new_sem_trywait
  94557. - .type __new_sem_trywait,@function
  94558. + .globl sem_trywait
  94559. + .type sem_trywait,@function
  94560. .align 16
  94561. -__new_sem_trywait:
  94562. +sem_trywait:
  94563. movl 4(%esp), %ecx
  94564. movl (%ecx), %eax
  94565. @@ -63,9 +62,7 @@
  94566. #endif
  94567. orl $-1, %eax
  94568. ret
  94569. - .size __new_sem_trywait,.-__new_sem_trywait
  94570. -weak_alias(__new_sem_trywait, sem_trywait)
  94571. -
  94572. + .size sem_trywait,.-sem_trywait
  94573. #ifdef __PIC__
  94574. .section .gnu.linkonce.t.__x86.get_pc_thunk.cx,"ax",@progbits
  94575. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S
  94576. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S 2012-05-15 09:20:09.000000000 +0200
  94577. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S 2014-07-25 20:36:09.141346917 +0200
  94578. @@ -13,9 +13,8 @@
  94579. Lesser General Public License for more details.
  94580. You should have received a copy of the GNU Lesser General Public
  94581. - License along with the GNU C Library; if not, write to the Free
  94582. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94583. - 02111-1307 USA. */
  94584. + License along with the GNU C Library; if not, see
  94585. + <http://www.gnu.org/licenses/>. */
  94586. #include <sysdep.h>
  94587. #include <pthread-errnos.h>
  94588. @@ -29,10 +28,10 @@
  94589. .text
  94590. - .globl __new_sem_wait
  94591. - .type __new_sem_wait,@function
  94592. + .globl sem_wait
  94593. + .type sem_wait,@function
  94594. .align 16
  94595. -__new_sem_wait:
  94596. +sem_wait:
  94597. .LSTARTCODE:
  94598. pushl %ebx
  94599. .Lpush_ebx:
  94600. @@ -129,8 +128,7 @@
  94601. orl $-1, %eax
  94602. jmp 9b
  94603. - .size __new_sem_wait,.-__new_sem_wait
  94604. -weak_alias(__new_sem_wait, sem_wait)
  94605. + .size sem_wait,.-sem_wait
  94606. .type sem_wait_cleanup,@function
  94607. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/lowlevellock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/lowlevellock.S
  94608. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/lowlevellock.S 2012-05-15 09:20:09.000000000 +0200
  94609. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/lowlevellock.S 2014-07-25 20:36:09.141346917 +0200
  94610. @@ -13,8 +13,7 @@
  94611. Lesser General Public License for more details.
  94612. You should have received a copy of the GNU Lesser General Public
  94613. - License along with the GNU C Library; if not, write to the Free
  94614. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94615. - 02111-1307 USA. */
  94616. + License along with the GNU C Library; if not, see
  94617. + <http://www.gnu.org/licenses/>. */
  94618. #include "../i486/lowlevellock.S"
  94619. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S
  94620. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S 2012-05-15 09:20:09.000000000 +0200
  94621. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S 2014-07-25 20:36:09.141346917 +0200
  94622. @@ -13,8 +13,7 @@
  94623. Lesser General Public License for more details.
  94624. You should have received a copy of the GNU Lesser General Public
  94625. - License along with the GNU C Library; if not, write to the Free
  94626. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94627. - 02111-1307 USA. */
  94628. + License along with the GNU C Library; if not, see
  94629. + <http://www.gnu.org/licenses/>. */
  94630. #include "../i486/lowlevelrobustlock.S"
  94631. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_barrier_wait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_barrier_wait.S
  94632. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_barrier_wait.S 2012-05-15 09:20:09.000000000 +0200
  94633. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_barrier_wait.S 2014-07-25 20:36:09.141346917 +0200
  94634. @@ -13,8 +13,7 @@
  94635. Lesser General Public License for more details.
  94636. You should have received a copy of the GNU Lesser General Public
  94637. - License along with the GNU C Library; if not, write to the Free
  94638. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94639. - 02111-1307 USA. */
  94640. + License along with the GNU C Library; if not, see
  94641. + <http://www.gnu.org/licenses/>. */
  94642. #include "../i486/pthread_barrier_wait.S"
  94643. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S
  94644. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S 2012-05-15 09:20:09.000000000 +0200
  94645. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S 2014-07-25 20:36:09.141346917 +0200
  94646. @@ -13,8 +13,7 @@
  94647. Lesser General Public License for more details.
  94648. You should have received a copy of the GNU Lesser General Public
  94649. - License along with the GNU C Library; if not, write to the Free
  94650. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94651. - 02111-1307 USA. */
  94652. + License along with the GNU C Library; if not, see
  94653. + <http://www.gnu.org/licenses/>. */
  94654. #include "../i486/pthread_cond_broadcast.S"
  94655. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S
  94656. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S 2012-05-15 09:20:09.000000000 +0200
  94657. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S 2014-07-25 20:36:09.141346917 +0200
  94658. @@ -13,8 +13,7 @@
  94659. Lesser General Public License for more details.
  94660. You should have received a copy of the GNU Lesser General Public
  94661. - License along with the GNU C Library; if not, write to the Free
  94662. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94663. - 02111-1307 USA. */
  94664. + License along with the GNU C Library; if not, see
  94665. + <http://www.gnu.org/licenses/>. */
  94666. #include "../i486/pthread_cond_signal.S"
  94667. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S
  94668. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S 2012-05-15 09:20:09.000000000 +0200
  94669. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S 2014-07-25 20:36:09.141346917 +0200
  94670. @@ -13,8 +13,7 @@
  94671. Lesser General Public License for more details.
  94672. You should have received a copy of the GNU Lesser General Public
  94673. - License along with the GNU C Library; if not, write to the Free
  94674. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94675. - 02111-1307 USA. */
  94676. + License along with the GNU C Library; if not, see
  94677. + <http://www.gnu.org/licenses/>. */
  94678. #include "../i486/pthread_cond_timedwait.S"
  94679. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S
  94680. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S 2012-05-15 09:20:09.000000000 +0200
  94681. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S 2014-07-25 20:36:09.141346917 +0200
  94682. @@ -13,8 +13,7 @@
  94683. Lesser General Public License for more details.
  94684. You should have received a copy of the GNU Lesser General Public
  94685. - License along with the GNU C Library; if not, write to the Free
  94686. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94687. - 02111-1307 USA. */
  94688. + License along with the GNU C Library; if not, see
  94689. + <http://www.gnu.org/licenses/>. */
  94690. #include "../i486/pthread_cond_wait.S"
  94691. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S
  94692. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S 2012-05-15 09:20:09.000000000 +0200
  94693. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S 2014-07-25 20:36:09.141346917 +0200
  94694. @@ -13,8 +13,7 @@
  94695. Lesser General Public License for more details.
  94696. You should have received a copy of the GNU Lesser General Public
  94697. - License along with the GNU C Library; if not, write to the Free
  94698. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94699. - 02111-1307 USA. */
  94700. + License along with the GNU C Library; if not, see
  94701. + <http://www.gnu.org/licenses/>. */
  94702. #include "../i486/pthread_rwlock_rdlock.S"
  94703. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S
  94704. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S 2012-05-15 09:20:09.000000000 +0200
  94705. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S 2014-07-25 20:36:09.141346917 +0200
  94706. @@ -13,8 +13,7 @@
  94707. Lesser General Public License for more details.
  94708. You should have received a copy of the GNU Lesser General Public
  94709. - License along with the GNU C Library; if not, write to the Free
  94710. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94711. - 02111-1307 USA. */
  94712. + License along with the GNU C Library; if not, see
  94713. + <http://www.gnu.org/licenses/>. */
  94714. #include "../i486/pthread_rwlock_timedrdlock.S"
  94715. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S
  94716. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S 2012-05-15 09:20:09.000000000 +0200
  94717. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S 2014-07-25 20:36:09.141346917 +0200
  94718. @@ -13,8 +13,7 @@
  94719. Lesser General Public License for more details.
  94720. You should have received a copy of the GNU Lesser General Public
  94721. - License along with the GNU C Library; if not, write to the Free
  94722. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94723. - 02111-1307 USA. */
  94724. + License along with the GNU C Library; if not, see
  94725. + <http://www.gnu.org/licenses/>. */
  94726. #include "../i486/pthread_rwlock_timedwrlock.S"
  94727. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S
  94728. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S 2012-05-15 09:20:09.000000000 +0200
  94729. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S 2014-07-25 20:36:09.141346917 +0200
  94730. @@ -13,8 +13,7 @@
  94731. Lesser General Public License for more details.
  94732. You should have received a copy of the GNU Lesser General Public
  94733. - License along with the GNU C Library; if not, write to the Free
  94734. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94735. - 02111-1307 USA. */
  94736. + License along with the GNU C Library; if not, see
  94737. + <http://www.gnu.org/licenses/>. */
  94738. #include "../i486/pthread_rwlock_unlock.S"
  94739. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S
  94740. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S 2012-05-15 09:20:09.000000000 +0200
  94741. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S 2014-07-25 20:36:09.141346917 +0200
  94742. @@ -13,8 +13,7 @@
  94743. Lesser General Public License for more details.
  94744. You should have received a copy of the GNU Lesser General Public
  94745. - License along with the GNU C Library; if not, write to the Free
  94746. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94747. - 02111-1307 USA. */
  94748. + License along with the GNU C Library; if not, see
  94749. + <http://www.gnu.org/licenses/>. */
  94750. #include "../i486/pthread_rwlock_wrlock.S"
  94751. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_post.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_post.S
  94752. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_post.S 2012-05-15 09:20:09.000000000 +0200
  94753. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_post.S 2014-07-25 20:36:09.141346917 +0200
  94754. @@ -13,8 +13,7 @@
  94755. Lesser General Public License for more details.
  94756. You should have received a copy of the GNU Lesser General Public
  94757. - License along with the GNU C Library; if not, write to the Free
  94758. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94759. - 02111-1307 USA. */
  94760. + License along with the GNU C Library; if not, see
  94761. + <http://www.gnu.org/licenses/>. */
  94762. #include "../i486/sem_post.S"
  94763. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S
  94764. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S 2012-05-15 09:20:09.000000000 +0200
  94765. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S 2014-07-25 20:36:09.141346917 +0200
  94766. @@ -13,8 +13,7 @@
  94767. Lesser General Public License for more details.
  94768. You should have received a copy of the GNU Lesser General Public
  94769. - License along with the GNU C Library; if not, write to the Free
  94770. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94771. - 02111-1307 USA. */
  94772. + License along with the GNU C Library; if not, see
  94773. + <http://www.gnu.org/licenses/>. */
  94774. #include "../i486/sem_timedwait.S"
  94775. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S
  94776. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S 2012-05-15 09:20:09.000000000 +0200
  94777. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S 2014-07-25 20:36:09.141346917 +0200
  94778. @@ -13,8 +13,7 @@
  94779. Lesser General Public License for more details.
  94780. You should have received a copy of the GNU Lesser General Public
  94781. - License along with the GNU C Library; if not, write to the Free
  94782. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94783. - 02111-1307 USA. */
  94784. + License along with the GNU C Library; if not, see
  94785. + <http://www.gnu.org/licenses/>. */
  94786. #include "../i486/sem_trywait.S"
  94787. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_wait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_wait.S
  94788. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_wait.S 2012-05-15 09:20:09.000000000 +0200
  94789. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i586/sem_wait.S 2014-07-25 20:36:09.141346917 +0200
  94790. @@ -13,8 +13,7 @@
  94791. Lesser General Public License for more details.
  94792. You should have received a copy of the GNU Lesser General Public
  94793. - License along with the GNU C Library; if not, write to the Free
  94794. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94795. - 02111-1307 USA. */
  94796. + License along with the GNU C Library; if not, see
  94797. + <http://www.gnu.org/licenses/>. */
  94798. #include "../i486/sem_wait.S"
  94799. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/lowlevellock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/lowlevellock.S
  94800. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/lowlevellock.S 2012-05-15 09:20:09.000000000 +0200
  94801. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/lowlevellock.S 2014-07-25 20:36:09.141346917 +0200
  94802. @@ -13,8 +13,7 @@
  94803. Lesser General Public License for more details.
  94804. You should have received a copy of the GNU Lesser General Public
  94805. - License along with the GNU C Library; if not, write to the Free
  94806. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94807. - 02111-1307 USA. */
  94808. + License along with the GNU C Library; if not, see
  94809. + <http://www.gnu.org/licenses/>. */
  94810. #include "../i486/lowlevellock.S"
  94811. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S
  94812. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S 2012-05-15 09:20:09.000000000 +0200
  94813. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S 2014-07-25 20:36:09.141346917 +0200
  94814. @@ -13,8 +13,7 @@
  94815. Lesser General Public License for more details.
  94816. You should have received a copy of the GNU Lesser General Public
  94817. - License along with the GNU C Library; if not, write to the Free
  94818. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94819. - 02111-1307 USA. */
  94820. + License along with the GNU C Library; if not, see
  94821. + <http://www.gnu.org/licenses/>. */
  94822. #include "../i486/lowlevelrobustlock.S"
  94823. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_barrier_wait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_barrier_wait.S
  94824. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_barrier_wait.S 2012-05-15 09:20:09.000000000 +0200
  94825. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_barrier_wait.S 2014-07-25 20:36:09.141346917 +0200
  94826. @@ -13,8 +13,7 @@
  94827. Lesser General Public License for more details.
  94828. You should have received a copy of the GNU Lesser General Public
  94829. - License along with the GNU C Library; if not, write to the Free
  94830. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94831. - 02111-1307 USA. */
  94832. + License along with the GNU C Library; if not, see
  94833. + <http://www.gnu.org/licenses/>. */
  94834. #include "../i486/pthread_barrier_wait.S"
  94835. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S
  94836. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S 2012-05-15 09:20:09.000000000 +0200
  94837. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S 2014-07-25 20:36:09.141346917 +0200
  94838. @@ -13,8 +13,7 @@
  94839. Lesser General Public License for more details.
  94840. You should have received a copy of the GNU Lesser General Public
  94841. - License along with the GNU C Library; if not, write to the Free
  94842. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94843. - 02111-1307 USA. */
  94844. + License along with the GNU C Library; if not, see
  94845. + <http://www.gnu.org/licenses/>. */
  94846. #include "../i486/pthread_cond_broadcast.S"
  94847. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S
  94848. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S 2012-05-15 09:20:09.000000000 +0200
  94849. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S 2014-07-25 20:36:09.141346917 +0200
  94850. @@ -13,8 +13,7 @@
  94851. Lesser General Public License for more details.
  94852. You should have received a copy of the GNU Lesser General Public
  94853. - License along with the GNU C Library; if not, write to the Free
  94854. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94855. - 02111-1307 USA. */
  94856. + License along with the GNU C Library; if not, see
  94857. + <http://www.gnu.org/licenses/>. */
  94858. #include "../i486/pthread_cond_signal.S"
  94859. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S
  94860. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S 2012-05-15 09:20:09.000000000 +0200
  94861. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S 2014-07-25 20:36:09.141346917 +0200
  94862. @@ -13,9 +13,8 @@
  94863. Lesser General Public License for more details.
  94864. You should have received a copy of the GNU Lesser General Public
  94865. - License along with the GNU C Library; if not, write to the Free
  94866. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94867. - 02111-1307 USA. */
  94868. + License along with the GNU C Library; if not, see
  94869. + <http://www.gnu.org/licenses/>. */
  94870. #define HAVE_CMOV 1
  94871. #include "../i486/pthread_cond_timedwait.S"
  94872. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S
  94873. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S 2012-05-15 09:20:09.000000000 +0200
  94874. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S 2014-07-25 20:36:09.141346917 +0200
  94875. @@ -13,8 +13,7 @@
  94876. Lesser General Public License for more details.
  94877. You should have received a copy of the GNU Lesser General Public
  94878. - License along with the GNU C Library; if not, write to the Free
  94879. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94880. - 02111-1307 USA. */
  94881. + License along with the GNU C Library; if not, see
  94882. + <http://www.gnu.org/licenses/>. */
  94883. #include "../i486/pthread_cond_wait.S"
  94884. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S
  94885. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S 2012-05-15 09:20:09.000000000 +0200
  94886. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S 2014-07-25 20:36:09.141346917 +0200
  94887. @@ -13,8 +13,7 @@
  94888. Lesser General Public License for more details.
  94889. You should have received a copy of the GNU Lesser General Public
  94890. - License along with the GNU C Library; if not, write to the Free
  94891. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94892. - 02111-1307 USA. */
  94893. + License along with the GNU C Library; if not, see
  94894. + <http://www.gnu.org/licenses/>. */
  94895. #include "../i486/pthread_rwlock_rdlock.S"
  94896. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S
  94897. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S 2012-05-15 09:20:09.000000000 +0200
  94898. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S 2014-07-25 20:36:09.141346917 +0200
  94899. @@ -13,8 +13,7 @@
  94900. Lesser General Public License for more details.
  94901. You should have received a copy of the GNU Lesser General Public
  94902. - License along with the GNU C Library; if not, write to the Free
  94903. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94904. - 02111-1307 USA. */
  94905. + License along with the GNU C Library; if not, see
  94906. + <http://www.gnu.org/licenses/>. */
  94907. #include "../i486/pthread_rwlock_timedrdlock.S"
  94908. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S
  94909. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S 2012-05-15 09:20:09.000000000 +0200
  94910. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S 2014-07-25 20:36:09.141346917 +0200
  94911. @@ -13,8 +13,7 @@
  94912. Lesser General Public License for more details.
  94913. You should have received a copy of the GNU Lesser General Public
  94914. - License along with the GNU C Library; if not, write to the Free
  94915. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94916. - 02111-1307 USA. */
  94917. + License along with the GNU C Library; if not, see
  94918. + <http://www.gnu.org/licenses/>. */
  94919. #include "../i486/pthread_rwlock_timedwrlock.S"
  94920. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S
  94921. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S 2012-05-15 09:20:09.000000000 +0200
  94922. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S 2014-07-25 20:36:09.141346917 +0200
  94923. @@ -13,9 +13,8 @@
  94924. Lesser General Public License for more details.
  94925. You should have received a copy of the GNU Lesser General Public
  94926. - License along with the GNU C Library; if not, write to the Free
  94927. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94928. - 02111-1307 USA. */
  94929. + License along with the GNU C Library; if not, see
  94930. + <http://www.gnu.org/licenses/>. */
  94931. #define HAVE_CMOV 1
  94932. #include "../i486/pthread_rwlock_unlock.S"
  94933. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S
  94934. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S 2012-05-15 09:20:09.000000000 +0200
  94935. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S 2014-07-25 20:36:09.141346917 +0200
  94936. @@ -13,8 +13,7 @@
  94937. Lesser General Public License for more details.
  94938. You should have received a copy of the GNU Lesser General Public
  94939. - License along with the GNU C Library; if not, write to the Free
  94940. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94941. - 02111-1307 USA. */
  94942. + License along with the GNU C Library; if not, see
  94943. + <http://www.gnu.org/licenses/>. */
  94944. #include "../i486/pthread_rwlock_wrlock.S"
  94945. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_post.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_post.S
  94946. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_post.S 2012-05-15 09:20:09.000000000 +0200
  94947. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_post.S 2014-07-25 20:36:09.141346917 +0200
  94948. @@ -13,8 +13,7 @@
  94949. Lesser General Public License for more details.
  94950. You should have received a copy of the GNU Lesser General Public
  94951. - License along with the GNU C Library; if not, write to the Free
  94952. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94953. - 02111-1307 USA. */
  94954. + License along with the GNU C Library; if not, see
  94955. + <http://www.gnu.org/licenses/>. */
  94956. #include "../i486/sem_post.S"
  94957. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S
  94958. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S 2012-05-15 09:20:09.000000000 +0200
  94959. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S 2014-07-25 20:36:09.141346917 +0200
  94960. @@ -13,8 +13,7 @@
  94961. Lesser General Public License for more details.
  94962. You should have received a copy of the GNU Lesser General Public
  94963. - License along with the GNU C Library; if not, write to the Free
  94964. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94965. - 02111-1307 USA. */
  94966. + License along with the GNU C Library; if not, see
  94967. + <http://www.gnu.org/licenses/>. */
  94968. #include "../i486/sem_timedwait.S"
  94969. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S
  94970. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S 2012-05-15 09:20:09.000000000 +0200
  94971. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S 2014-07-25 20:36:09.141346917 +0200
  94972. @@ -13,8 +13,7 @@
  94973. Lesser General Public License for more details.
  94974. You should have received a copy of the GNU Lesser General Public
  94975. - License along with the GNU C Library; if not, write to the Free
  94976. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94977. - 02111-1307 USA. */
  94978. + License along with the GNU C Library; if not, see
  94979. + <http://www.gnu.org/licenses/>. */
  94980. #include "../i486/sem_trywait.S"
  94981. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_wait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_wait.S
  94982. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_wait.S 2012-05-15 09:20:09.000000000 +0200
  94983. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i686/sem_wait.S 2014-07-25 20:36:09.141346917 +0200
  94984. @@ -13,8 +13,7 @@
  94985. Lesser General Public License for more details.
  94986. You should have received a copy of the GNU Lesser General Public
  94987. - License along with the GNU C Library; if not, write to the Free
  94988. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  94989. - 02111-1307 USA. */
  94990. + License along with the GNU C Library; if not, see
  94991. + <http://www.gnu.org/licenses/>. */
  94992. #include "../i486/sem_wait.S"
  94993. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
  94994. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h 2012-05-15 09:20:09.000000000 +0200
  94995. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h 2014-07-25 20:36:09.141346917 +0200
  94996. @@ -13,9 +13,8 @@
  94997. Lesser General Public License for more details.
  94998. You should have received a copy of the GNU Lesser General Public
  94999. - License along with the GNU C Library; if not, write to the Free
  95000. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  95001. - 02111-1307 USA. */
  95002. + License along with the GNU C Library; if not, see
  95003. + <http://www.gnu.org/licenses/>. */
  95004. #ifndef _LOWLEVELLOCK_H
  95005. #define _LOWLEVELLOCK_H 1
  95006. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S
  95007. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S 2012-05-15 09:20:09.000000000 +0200
  95008. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pthread_once.S 2014-07-25 20:36:09.141346917 +0200
  95009. @@ -13,9 +13,8 @@
  95010. Lesser General Public License for more details.
  95011. You should have received a copy of the GNU Lesser General Public
  95012. - License along with the GNU C Library; if not, write to the Free
  95013. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  95014. - 02111-1307 USA. */
  95015. + License along with the GNU C Library; if not, see
  95016. + <http://www.gnu.org/licenses/>. */
  95017. #include <unwindbuf.h>
  95018. #include <sysdep.h>
  95019. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S
  95020. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S 2012-05-15 09:20:09.000000000 +0200
  95021. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S 2014-07-25 20:36:09.141346917 +0200
  95022. @@ -13,9 +13,8 @@
  95023. Lesser General Public License for more details.
  95024. You should have received a copy of the GNU Lesser General Public
  95025. - License along with the GNU C Library; if not, write to the Free
  95026. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  95027. - 02111-1307 USA. */
  95028. + License along with the GNU C Library; if not, see
  95029. + <http://www.gnu.org/licenses/>. */
  95030. #include <sysdep.h>
  95031. #define _ERRNO_H 1
  95032. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/smp.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/smp.h
  95033. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/smp.h 2012-05-15 09:20:09.000000000 +0200
  95034. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/smp.h 2014-07-25 20:36:09.141346917 +0200
  95035. @@ -14,8 +14,7 @@
  95036. You should have received a copy of the GNU Library General Public
  95037. License along with the GNU C Library; see the file COPYING.LIB. If not,
  95038. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  95039. - Boston, MA 02111-1307, USA. */
  95040. + see <http://www.gnu.org/licenses/>. */
  95041. #include <errno.h>
  95042. #include <fcntl.h>
  95043. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
  95044. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  95045. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/sysdep-cancel.h 2014-07-25 20:36:09.141346917 +0200
  95046. @@ -13,9 +13,8 @@
  95047. Lesser General Public License for more details.
  95048. You should have received a copy of the GNU Lesser General Public
  95049. - License along with the GNU C Library; if not, write to the Free
  95050. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  95051. - 02111-1307 USA. */
  95052. + License along with the GNU C Library; if not, see
  95053. + <http://www.gnu.org/licenses/>. */
  95054. #include <sysdep.h>
  95055. #include <tls.h>
  95056. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/vfork.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/vfork.S
  95057. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/i386/vfork.S 2012-05-15 09:20:09.000000000 +0200
  95058. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/i386/vfork.S 2014-07-25 20:36:09.141346917 +0200
  95059. @@ -12,9 +12,8 @@
  95060. Lesser General Public License for more details.
  95061. You should have received a copy of the GNU Lesser General Public
  95062. - License along with the GNU C Library; if not, write to the Free
  95063. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  95064. - 02111-1307 USA. */
  95065. + License along with the GNU C Library; if not, see
  95066. + <http://www.gnu.org/licenses/>. */
  95067. #include <tcb-offsets.h>
  95068. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/internaltypes.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/internaltypes.h
  95069. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/internaltypes.h 2012-05-15 09:20:09.000000000 +0200
  95070. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/internaltypes.h 2014-07-25 20:36:09.141346917 +0200
  95071. @@ -13,9 +13,8 @@
  95072. Lesser General Public License for more details.
  95073. You should have received a copy of the GNU Lesser General Public
  95074. - License along with the GNU C Library; if not, write to the Free
  95075. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  95076. - 02111-1307 USA. */
  95077. + License along with the GNU C Library; if not, see
  95078. + <http://www.gnu.org/licenses/>. */
  95079. #ifndef _INTERNALTYPES_H
  95080. #define _INTERNALTYPES_H 1
  95081. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c
  95082. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c 2012-05-15 09:20:09.000000000 +0200
  95083. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/jmp-unwind.c 2014-07-25 20:36:09.141346917 +0200
  95084. @@ -13,9 +13,8 @@
  95085. Lesser General Public License for more details.
  95086. You should have received a copy of the GNU Lesser General Public
  95087. - License along with the GNU C Library; if not, write to the Free
  95088. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  95089. - 02111-1307 USA. */
  95090. + License along with the GNU C Library; if not, see
  95091. + <http://www.gnu.org/licenses/>. */
  95092. #include <setjmp.h>
  95093. #include <stddef.h>
  95094. @@ -25,7 +24,6 @@
  95095. #pragma weak __pthread_cleanup_upto
  95096. -void _longjmp_unwind (jmp_buf env, int val);
  95097. void
  95098. _longjmp_unwind (jmp_buf env, int val)
  95099. {
  95100. @@ -38,3 +36,4 @@
  95101. __pthread_cleanup_upto (env->__jmpbuf, CURRENT_STACK_FRAME);
  95102. #endif
  95103. }
  95104. +libc_hidden_def(_longjmp_unwind)
  95105. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c
  95106. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c 2012-05-15 09:20:09.000000000 +0200
  95107. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c 2014-07-25 20:36:09.141346917 +0200
  95108. @@ -13,9 +13,8 @@
  95109. Lesser General Public License for more details.
  95110. You should have received a copy of the GNU Lesser General Public
  95111. - License along with the GNU C Library; if not, write to the Free
  95112. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  95113. - 02111-1307 USA. */
  95114. + License along with the GNU C Library; if not, see
  95115. + <http://www.gnu.org/licenses/>. */
  95116. /* No difference to lowlevellock.c, except we lose a couple of functions. */
  95117. #include "lowlevellock.c"
  95118. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/libc_multiple_threads.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/libc_multiple_threads.c
  95119. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/libc_multiple_threads.c 2012-05-15 09:20:09.000000000 +0200
  95120. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/libc_multiple_threads.c 2014-07-25 20:36:09.141346917 +0200
  95121. @@ -13,9 +13,8 @@
  95122. Lesser General Public License for more details.
  95123. You should have received a copy of the GNU Lesser General Public
  95124. - License along with the GNU C Library; if not, write to the Free
  95125. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  95126. - 02111-1307 USA. */
  95127. + License along with the GNU C Library; if not, see
  95128. + <http://www.gnu.org/licenses/>. */
  95129. #include <pthreadP.h>
  95130. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c
  95131. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c 2012-05-15 09:20:09.000000000 +0200
  95132. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c 2014-07-25 20:36:09.141346917 +0200
  95133. @@ -13,9 +13,8 @@
  95134. Lesser General Public License for more details.
  95135. You should have received a copy of the GNU Lesser General Public
  95136. - License along with the GNU C Library; if not, write to the Free
  95137. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  95138. - 02111-1307 USA. */
  95139. + License along with the GNU C Library; if not, see
  95140. + <http://www.gnu.org/licenses/>. */
  95141. #include <unistd.h>
  95142. #include <list.h>
  95143. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
  95144. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.c 2012-05-15 09:20:09.000000000 +0200
  95145. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.c 2014-07-25 20:36:09.145346937 +0200
  95146. @@ -14,9 +14,8 @@
  95147. Lesser General Public License for more details.
  95148. You should have received a copy of the GNU Lesser General Public
  95149. - License along with the GNU C Library; if not, write to the Free
  95150. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  95151. - 02111-1307 USA. */
  95152. + License along with the GNU C Library; if not, see
  95153. + <http://www.gnu.org/licenses/>. */
  95154. #include <errno.h>
  95155. #include <sysdep.h>
  95156. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c
  95157. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c 2012-05-15 09:20:09.000000000 +0200
  95158. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevelrobustlock.c 2014-07-25 20:36:09.145346937 +0200
  95159. @@ -13,9 +13,8 @@
  95160. Lesser General Public License for more details.
  95161. You should have received a copy of the GNU Lesser General Public
  95162. - License along with the GNU C Library; if not, write to the Free
  95163. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  95164. - 02111-1307 USA. */
  95165. + License along with the GNU C Library; if not, see
  95166. + <http://www.gnu.org/licenses/>. */
  95167. #include <errno.h>
  95168. #include <sysdep.h>
  95169. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch
  95170. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch 2012-05-15 09:20:09.000000000 +0200
  95171. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch 2014-07-25 20:36:09.133346875 +0200
  95172. @@ -62,22 +62,24 @@
  95173. pthread_getcpuclockid.c pthread_kill.c \
  95174. pthread_mutex_cond_lock.c pthread_yield.c \
  95175. sem_post.c sem_timedwait.c sem_trywait.c sem_wait.c \
  95176. - pt-fork.c pt-sleep.c pthread_sigqueue.c pt-tempname.c \
  95177. - sigtimedwait.c sigwaitinfo.c sigwait.c \
  95178. + pt-tempname.c \
  95179. + pthread_sigqueue.c \
  95180. lowlevellock.c lowlevelrobustlock.c
  95181. +# pt-sleep.c pt-fork.c sigtimedwait.c sigwaitinfo.c sigwait.c
  95182. libpthread_linux_SSRC := #ptw-close.S ptw-open.S ptw-waitid.S ptw-waidpid.S ptw-write.S
  95183. libc_linux_CSRC += libc_pthread_init.c libc_multiple_threads.c \
  95184. register-atfork.c unregister-atfork.c getpid.c \
  95185. - raise.c sleep.c jmp-unwind.c libc-lowlevellock.c
  95186. + raise.c jmp-unwind.c libc-lowlevellock.c
  95187. + #sleep.c
  95188. librt_linux_CSRC += mq_notify.c timer_create.c timer_delete.c \
  95189. timer_getoverr.c timer_gettime.c timer_routines.c \
  95190. timer_settime.c
  95191. # These provide both a cancellable and a not cancellable implementation
  95192. -libc_linux_SSRC = close.S open.S write.S read.S waitpid.S
  95193. +libc_linux_SSRC = #close.S open.S write.S read.S waitpid.S
  95194. libc_linux_SSRC := $(filter-out $(libc_linux_arch_SSRC-OMIT),$(libc_linux_SSRC))
  95195. libpthread_linux_CSRC := $(filter-out $(notdir $(libpthread_linux_arch_OBJS:.o=.c)),$(libpthread_linux_CSRC))
  95196. @@ -141,13 +143,14 @@
  95197. CFLAGS-OMIT-getpid.c = -DNOT_IN_libc -DIS_IN_libpthread
  95198. CFLAGS-OMIT-raise.c = -DNOT_IN_libc -DIS_IN_libpthread
  95199. CFLAGS-OMIT-sleep.c = -DNOT_IN_libc -DIS_IN_libpthread
  95200. +CFLAGS-OMIT-jmp-unwind.c = -DNOT_IN_libc -DIS_IN_libpthread
  95201. CFLAGS-OMIT-libc-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread
  95202. -CFLAGS-OMIT-close.S = -DNOT_IN_libc -DIS_IN_libpthread
  95203. -CFLAGS-OMIT-open.S = -DNOT_IN_libc -DIS_IN_libpthread
  95204. -CFLAGS-OMIT-read.S = -DNOT_IN_libc -DIS_IN_libpthread
  95205. -CFLAGS-OMIT-write.S = -DNOT_IN_libc -DIS_IN_libpthread
  95206. -CFLAGS-OMIT-waitpid.S = -DNOT_IN_libc -DIS_IN_libpthread
  95207. +#CFLAGS-OMIT-close.S = -DNOT_IN_libc -DIS_IN_libpthread
  95208. +#CFLAGS-OMIT-open.S = -DNOT_IN_libc -DIS_IN_libpthread
  95209. +#CFLAGS-OMIT-read.S = -DNOT_IN_libc -DIS_IN_libpthread
  95210. +#CFLAGS-OMIT-write.S = -DNOT_IN_libc -DIS_IN_libpthread
  95211. +#CFLAGS-OMIT-waitpid.S = -DNOT_IN_libc -DIS_IN_libpthread
  95212. CFLAGS-OMIT-mq_notify.c = -DIS_IN_libpthread
  95213. CFLAGS-OMIT-timer_create.c = -DIS_IN_libpthread
  95214. @@ -157,11 +160,11 @@
  95215. CFLAGS-OMIT-timer_routines.c = -DIS_IN_libpthread
  95216. CFLAGS-OMIT-timer_settime.c = -DIS_IN_libpthread
  95217. -ASFLAGS-open.S = -D_LIBC_REENTRANT
  95218. -ASFLAGS-close.S = -D_LIBC_REENTRANT
  95219. -ASFLAGS-read.S = -D_LIBC_REENTRANT
  95220. -ASFLAGS-write.S = -D_LIBC_REENTRANT
  95221. -ASFLAGS-waitpid.S = -D_LIBC_REENTRANT
  95222. +#ASFLAGS-open.S = -D_LIBC_REENTRANT
  95223. +#ASFLAGS-close.S = -D_LIBC_REENTRANT
  95224. +#ASFLAGS-read.S = -D_LIBC_REENTRANT
  95225. +#ASFLAGS-write.S = -D_LIBC_REENTRANT
  95226. +#ASFLAGS-waitpid.S = -D_LIBC_REENTRANT
  95227. #
  95228. # Create header files.
  95229. @@ -174,8 +177,6 @@
  95230. CFLAGS-gen_structsem.c = -S
  95231. CFLAGS-gen_unwindbuf.c = -S
  95232. -PTHREAD_GENERATE_MANGLE ?= -n "s/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*\$$/\#define \1 \2/p"
  95233. -
  95234. PTHREAD_LINUX_SYM := $(notdir $(wildcard $(libpthread_linux_DIR)/*.sym))
  95235. PTHREAD_LINUX_SYM_C := $(addprefix $(libpthread_linux_OUT)/gen_,$(PTHREAD_LINUX_SYM:.sym=.c))
  95236. PTHREAD_LINUX_SYM_S := $(PTHREAD_LINUX_SYM_C:.c=.s)
  95237. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/bits/pthreadtypes.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/bits/pthreadtypes.h
  95238. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/bits/pthreadtypes.h 1970-01-01 01:00:00.000000000 +0100
  95239. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/bits/pthreadtypes.h 2014-07-25 20:36:09.145346937 +0200
  95240. @@ -0,0 +1,181 @@
  95241. +/* Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
  95242. + This file is part of the GNU C Library.
  95243. +
  95244. + The GNU C Library is free software; you can redistribute it and/or
  95245. + modify it under the terms of the GNU Lesser General Public
  95246. + License as published by the Free Software Foundation; either
  95247. + version 2.1 of the License, or (at your option) any later version.
  95248. +
  95249. + The GNU C Library is distributed in the hope that it will be useful,
  95250. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  95251. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  95252. + Lesser General Public License for more details.
  95253. +
  95254. + You should have received a copy of the GNU Lesser General Public
  95255. + License along with the GNU C Library; if not, write to the Free
  95256. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  95257. + 02111-1307 USA. */
  95258. +
  95259. +#ifndef _BITS_PTHREADTYPES_H
  95260. +#define _BITS_PTHREADTYPES_H 1
  95261. +
  95262. +#include <endian.h>
  95263. +
  95264. +#define __SIZEOF_PTHREAD_ATTR_T 36
  95265. +#define __SIZEOF_PTHREAD_MUTEX_T 24
  95266. +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
  95267. +#define __SIZEOF_PTHREAD_COND_T 48
  95268. +#define __SIZEOF_PTHREAD_COND_COMPAT_T 12
  95269. +#define __SIZEOF_PTHREAD_CONDATTR_T 4
  95270. +#define __SIZEOF_PTHREAD_RWLOCK_T 32
  95271. +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
  95272. +#define __SIZEOF_PTHREAD_BARRIER_T 20
  95273. +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
  95274. +
  95275. +
  95276. +/* Thread identifiers. The structure of the attribute type is not
  95277. + exposed on purpose. */
  95278. +typedef unsigned long int pthread_t;
  95279. +
  95280. +
  95281. +typedef union
  95282. +{
  95283. + char __size[__SIZEOF_PTHREAD_ATTR_T];
  95284. + long int __align;
  95285. +} pthread_attr_t;
  95286. +
  95287. +
  95288. +typedef struct __pthread_internal_slist
  95289. +{
  95290. + struct __pthread_internal_slist *__next;
  95291. +} __pthread_slist_t;
  95292. +
  95293. +
  95294. +/* Data structures for mutex handling. The structure of the attribute
  95295. + type is not exposed on purpose. */
  95296. +typedef union
  95297. +{
  95298. + struct __pthread_mutex_s
  95299. + {
  95300. + int __lock;
  95301. + unsigned int __count;
  95302. + int __owner;
  95303. + /* KIND must stay at this position in the structure to maintain
  95304. + binary compatibility. */
  95305. + int __kind;
  95306. + unsigned int __nusers;
  95307. + __extension__ union
  95308. + {
  95309. + int __spins;
  95310. + __pthread_slist_t __list;
  95311. + };
  95312. + } __data;
  95313. + char __size[__SIZEOF_PTHREAD_MUTEX_T];
  95314. + long int __align;
  95315. +} pthread_mutex_t;
  95316. +
  95317. +typedef union
  95318. +{
  95319. + char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
  95320. + long int __align;
  95321. +} pthread_mutexattr_t;
  95322. +
  95323. +
  95324. +/* Data structure for conditional variable handling. The structure of
  95325. + the attribute type is not exposed on purpose. */
  95326. +typedef union
  95327. +{
  95328. + struct
  95329. + {
  95330. + int __lock;
  95331. + unsigned int __futex;
  95332. + __extension__ unsigned long long int __total_seq;
  95333. + __extension__ unsigned long long int __wakeup_seq;
  95334. + __extension__ unsigned long long int __woken_seq;
  95335. + void *__mutex;
  95336. + unsigned int __nwaiters;
  95337. + unsigned int __broadcast_seq;
  95338. + } __data;
  95339. + char __size[__SIZEOF_PTHREAD_COND_T];
  95340. + __extension__ long long int __align;
  95341. +} pthread_cond_t;
  95342. +
  95343. +typedef union
  95344. +{
  95345. + char __size[__SIZEOF_PTHREAD_CONDATTR_T];
  95346. + long int __align;
  95347. +} pthread_condattr_t;
  95348. +
  95349. +
  95350. +/* Keys for thread-specific data */
  95351. +typedef unsigned int pthread_key_t;
  95352. +
  95353. +
  95354. +/* Once-only execution */
  95355. +typedef int pthread_once_t;
  95356. +
  95357. +
  95358. +#if defined __USE_UNIX98 || defined __USE_XOPEN2K
  95359. +/* Data structure for read-write lock variable handling. The
  95360. + structure of the attribute type is not exposed on purpose. */
  95361. +typedef union
  95362. +{
  95363. + struct
  95364. + {
  95365. + int __lock;
  95366. + unsigned int __nr_readers;
  95367. + unsigned int __readers_wakeup;
  95368. + unsigned int __writer_wakeup;
  95369. + unsigned int __nr_readers_queued;
  95370. + unsigned int __nr_writers_queued;
  95371. +#if __BYTE_ORDER == __BIG_ENDIAN
  95372. + unsigned char __pad1;
  95373. + unsigned char __pad2;
  95374. + unsigned char __shared;
  95375. + /* FLAGS must stay at this position in the structure to maintain
  95376. + binary compatibility. */
  95377. + unsigned char __flags;
  95378. +#else
  95379. + /* FLAGS must stay at this position in the structure to maintain
  95380. + binary compatibility. */
  95381. + unsigned char __flags;
  95382. + unsigned char __shared;
  95383. + unsigned char __pad1;
  95384. + unsigned char __pad2;
  95385. +#endif
  95386. + int __writer;
  95387. + } __data;
  95388. + char __size[__SIZEOF_PTHREAD_RWLOCK_T];
  95389. + long int __align;
  95390. +} pthread_rwlock_t;
  95391. +
  95392. +typedef union
  95393. +{
  95394. + char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
  95395. + long int __align;
  95396. +} pthread_rwlockattr_t;
  95397. +#endif
  95398. +
  95399. +
  95400. +#ifdef __USE_XOPEN2K
  95401. +/* POSIX spinlock data type. */
  95402. +typedef volatile int pthread_spinlock_t;
  95403. +
  95404. +
  95405. +/* POSIX barriers data type. The structure of the type is
  95406. + deliberately not exposed. */
  95407. +typedef union
  95408. +{
  95409. + char __size[__SIZEOF_PTHREAD_BARRIER_T];
  95410. + long int __align;
  95411. +} pthread_barrier_t;
  95412. +
  95413. +typedef union
  95414. +{
  95415. + char __size[__SIZEOF_PTHREAD_BARRIERATTR_T];
  95416. + int __align;
  95417. +} pthread_barrierattr_t;
  95418. +#endif
  95419. +
  95420. +
  95421. +#endif /* bits/pthreadtypes.h */
  95422. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/bits/semaphore.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/bits/semaphore.h
  95423. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/bits/semaphore.h 1970-01-01 01:00:00.000000000 +0100
  95424. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/bits/semaphore.h 2014-07-25 20:36:09.145346937 +0200
  95425. @@ -0,0 +1,35 @@
  95426. +/* Copyright (C) 2002, 2005, 2007 Free Software Foundation, Inc.
  95427. + This file is part of the GNU C Library.
  95428. +
  95429. + The GNU C Library is free software; you can redistribute it and/or
  95430. + modify it under the terms of the GNU Lesser General Public
  95431. + License as published by the Free Software Foundation; either
  95432. + version 2.1 of the License, or (at your option) any later version.
  95433. +
  95434. + The GNU C Library is distributed in the hope that it will be useful,
  95435. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  95436. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  95437. + Lesser General Public License for more details.
  95438. +
  95439. + You should have received a copy of the GNU Lesser General Public
  95440. + License along with the GNU C Library; if not, write to the Free
  95441. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  95442. + 02111-1307 USA. */
  95443. +
  95444. +#ifndef _SEMAPHORE_H
  95445. +# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
  95446. +#endif
  95447. +
  95448. +
  95449. +#define __SIZEOF_SEM_T 16
  95450. +
  95451. +
  95452. +/* Value returned if `sem_open' failed. */
  95453. +#define SEM_FAILED ((sem_t *) 0)
  95454. +
  95455. +
  95456. +typedef union
  95457. +{
  95458. + char __size[__SIZEOF_SEM_T];
  95459. + long int __align;
  95460. +} sem_t;
  95461. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/clone.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/clone.S
  95462. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/clone.S 1970-01-01 01:00:00.000000000 +0100
  95463. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/clone.S 2014-07-25 20:36:09.145346937 +0200
  95464. @@ -0,0 +1,9 @@
  95465. +/*
  95466. + * Copyright (C) 2013 Imagination Technologies Ltd.
  95467. + *
  95468. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  95469. + */
  95470. +
  95471. +#define RESET_PID
  95472. +#include <tcb-offsets.h>
  95473. +#include "../../../../../../../libc/sysdeps/linux/metag/clone.S"
  95474. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/createthread.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/createthread.c
  95475. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/createthread.c 1970-01-01 01:00:00.000000000 +0100
  95476. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/createthread.c 2014-07-25 20:36:09.145346937 +0200
  95477. @@ -0,0 +1,23 @@
  95478. +/* Copyright (C) 2005 Free Software Foundation, Inc.
  95479. + This file is part of the GNU C Library.
  95480. +
  95481. + The GNU C Library is free software; you can redistribute it and/or
  95482. + modify it under the terms of the GNU Lesser General Public
  95483. + License as published by the Free Software Foundation; either
  95484. + version 2.1 of the License, or (at your option) any later version.
  95485. +
  95486. + The GNU C Library is distributed in the hope that it will be useful,
  95487. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  95488. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  95489. + Lesser General Public License for more details.
  95490. +
  95491. + You should have received a copy of the GNU Lesser General Public
  95492. + License along with the GNU C Library; if not, write to the Free
  95493. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  95494. + 02111-1307 USA. */
  95495. +
  95496. +/* Value passed to 'clone' for initialization of the thread register. */
  95497. +#define TLS_VALUE (pd + 1)
  95498. +
  95499. +/* Get the real implementation. */
  95500. +#include <sysdeps/pthread/createthread.c>
  95501. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/fork.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/fork.c
  95502. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/fork.c 1970-01-01 01:00:00.000000000 +0100
  95503. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/fork.c 2014-07-25 20:36:09.145346937 +0200
  95504. @@ -0,0 +1,31 @@
  95505. +/* Copyright (C) 2005 Free Software Foundation, Inc.
  95506. + This file is part of the GNU C Library.
  95507. + Contributed by Phil Blundell <pb@nexus.co.uk>, 2005
  95508. +
  95509. + The GNU C Library is free software; you can redistribute it and/or
  95510. + modify it under the terms of the GNU Lesser General Public
  95511. + License as published by the Free Software Foundation; either
  95512. + version 2.1 of the License, or (at your option) any later version.
  95513. +
  95514. + The GNU C Library is distributed in the hope that it will be useful,
  95515. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  95516. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  95517. + Lesser General Public License for more details.
  95518. +
  95519. + You should have received a copy of the GNU Lesser General Public
  95520. + License along with the GNU C Library; if not, write to the Free
  95521. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  95522. + 02111-1307 USA. */
  95523. +
  95524. +#include <sched.h>
  95525. +#include <signal.h>
  95526. +#include <sysdep.h>
  95527. +#include <tls.h>
  95528. +
  95529. +
  95530. +#define ARCH_FORK() \
  95531. + INLINE_SYSCALL (clone, 5, \
  95532. + CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, \
  95533. + NULL, NULL, &THREAD_SELF->tid, NULL)
  95534. +
  95535. +#include "../fork.c"
  95536. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/libc-lowlevellock.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/libc-lowlevellock.c
  95537. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/libc-lowlevellock.c 1970-01-01 01:00:00.000000000 +0100
  95538. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/libc-lowlevellock.c 2014-07-25 20:36:09.145346937 +0200
  95539. @@ -0,0 +1,21 @@
  95540. +/* Copyright (C) 2003 Free Software Foundation, Inc.
  95541. + This file is part of the GNU C Library.
  95542. + Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
  95543. +
  95544. + The GNU C Library is free software; you can redistribute it and/or
  95545. + modify it under the terms of the GNU Lesser General Public
  95546. + License as published by the Free Software Foundation; either
  95547. + version 2.1 of the License, or (at your option) any later version.
  95548. +
  95549. + The GNU C Library is distributed in the hope that it will be useful,
  95550. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  95551. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  95552. + Lesser General Public License for more details.
  95553. +
  95554. + You should have received a copy of the GNU Lesser General Public
  95555. + License along with the GNU C Library; if not, write to the Free
  95556. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  95557. + 02111-1307 USA. */
  95558. +
  95559. +/* No difference to lowlevellock.c, except we lose a couple of functions. */
  95560. +#include "lowlevellock.c"
  95561. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/lowlevellock.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/lowlevellock.c
  95562. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/lowlevellock.c 1970-01-01 01:00:00.000000000 +0100
  95563. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/lowlevellock.c 2014-07-25 20:36:09.145346937 +0200
  95564. @@ -0,0 +1,134 @@
  95565. +/* low level locking for pthread library. Generic futex-using version.
  95566. + Copyright (C) 2003, 2005, 2007 Free Software Foundation, Inc.
  95567. + This file is part of the GNU C Library.
  95568. +
  95569. + The GNU C Library is free software; you can redistribute it and/or
  95570. + modify it under the terms of the GNU Lesser General Public
  95571. + License as published by the Free Software Foundation; either
  95572. + version 2.1 of the License, or (at your option) any later version.
  95573. +
  95574. + The GNU C Library is distributed in the hope that it will be useful,
  95575. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  95576. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  95577. + Lesser General Public License for more details.
  95578. +
  95579. + You should have received a copy of the GNU Lesser General Public
  95580. + License along with the GNU C Library; if not, write to the Free
  95581. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  95582. + 02111-1307 USA. */
  95583. +
  95584. +#include <errno.h>
  95585. +#include <sysdep.h>
  95586. +#include <lowlevellock.h>
  95587. +#include <sys/time.h>
  95588. +#include <tls.h>
  95589. +
  95590. +void
  95591. +__lll_lock_wait_private (int *futex)
  95592. +{
  95593. + do
  95594. + {
  95595. + int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1);
  95596. + if (oldval != 0)
  95597. + lll_futex_wait (futex, 2, LLL_PRIVATE);
  95598. + }
  95599. + while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0);
  95600. +}
  95601. +
  95602. +
  95603. +/* These functions don't get included in libc.so */
  95604. +#ifdef IS_IN_libpthread
  95605. +void
  95606. +__lll_lock_wait (int *futex, int private)
  95607. +{
  95608. + do
  95609. + {
  95610. + int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1);
  95611. + if (oldval != 0)
  95612. + lll_futex_wait (futex, 2, private);
  95613. + }
  95614. + while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0);
  95615. +}
  95616. +
  95617. +
  95618. +int
  95619. +__lll_timedlock_wait (int *futex, const struct timespec *abstime, int private)
  95620. +{
  95621. + struct timespec rt;
  95622. +
  95623. + /* Reject invalid timeouts. */
  95624. + if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
  95625. + return EINVAL;
  95626. +
  95627. + /* Upgrade the lock. */
  95628. + if (atomic_exchange_acq (futex, 2) == 0)
  95629. + return 0;
  95630. +
  95631. + do
  95632. + {
  95633. + struct timeval tv;
  95634. +
  95635. + /* Get the current time. */
  95636. + (void) gettimeofday (&tv, NULL);
  95637. +
  95638. + /* Compute relative timeout. */
  95639. + rt.tv_sec = abstime->tv_sec - tv.tv_sec;
  95640. + rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000;
  95641. + if (rt.tv_nsec < 0)
  95642. + {
  95643. + rt.tv_nsec += 1000000000;
  95644. + --rt.tv_sec;
  95645. + }
  95646. +
  95647. + /* Already timed out? */
  95648. + if (rt.tv_sec < 0)
  95649. + return ETIMEDOUT;
  95650. +
  95651. + // XYZ: Lost the lock to check whether it was private.
  95652. + lll_futex_timed_wait (futex, 2, &rt, private);
  95653. + }
  95654. + while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0);
  95655. +
  95656. + return 0;
  95657. +}
  95658. +
  95659. +
  95660. +int
  95661. +__lll_timedwait_tid (int *tidp, const struct timespec *abstime)
  95662. +{
  95663. + int tid;
  95664. +
  95665. + if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
  95666. + return EINVAL;
  95667. +
  95668. + /* Repeat until thread terminated. */
  95669. + while ((tid = *tidp) != 0)
  95670. + {
  95671. + struct timeval tv;
  95672. + struct timespec rt;
  95673. +
  95674. + /* Get the current time. */
  95675. + (void) gettimeofday (&tv, NULL);
  95676. +
  95677. + /* Compute relative timeout. */
  95678. + rt.tv_sec = abstime->tv_sec - tv.tv_sec;
  95679. + rt.tv_nsec = abstime->tv_nsec - tv.tv_usec * 1000;
  95680. + if (rt.tv_nsec < 0)
  95681. + {
  95682. + rt.tv_nsec += 1000000000;
  95683. + --rt.tv_sec;
  95684. + }
  95685. +
  95686. + /* Already timed out? */
  95687. + if (rt.tv_sec < 0)
  95688. + return ETIMEDOUT;
  95689. +
  95690. + /* Wait until thread terminates. */
  95691. + // XYZ: Lost the lock to check whether it was private.
  95692. + if (lll_futex_timed_wait (tidp, tid, &rt, LLL_SHARED) == -ETIMEDOUT)
  95693. + return ETIMEDOUT;
  95694. + }
  95695. +
  95696. + return 0;
  95697. +}
  95698. +#endif
  95699. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/lowlevellock.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/lowlevellock.h
  95700. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/lowlevellock.h 1970-01-01 01:00:00.000000000 +0100
  95701. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/lowlevellock.h 2014-07-25 20:36:09.145346937 +0200
  95702. @@ -0,0 +1,279 @@
  95703. +/* Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
  95704. + This file is part of the GNU C Library.
  95705. +
  95706. + The GNU C Library is free software; you can redistribute it and/or
  95707. + modify it under the terms of the GNU Lesser General Public
  95708. + License as published by the Free Software Foundation; either
  95709. + version 2.1 of the License, or (at your option) any later version.
  95710. +
  95711. + The GNU C Library is distributed in the hope that it will be useful,
  95712. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  95713. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  95714. + Lesser General Public License for more details.
  95715. +
  95716. + You should have received a copy of the GNU Lesser General Public
  95717. + License along with the GNU C Library; if not, write to the Free
  95718. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  95719. + 02111-1307 USA. */
  95720. +
  95721. +#ifndef _LOWLEVELLOCK_H
  95722. +#define _LOWLEVELLOCK_H 1
  95723. +
  95724. +#include <time.h>
  95725. +#include <sys/param.h>
  95726. +#include <bits/pthreadtypes.h>
  95727. +#include <atomic.h>
  95728. +#include <sysdep.h>
  95729. +#include <bits/kernel-features.h>
  95730. +
  95731. +#define FUTEX_WAIT 0
  95732. +#define FUTEX_WAKE 1
  95733. +#define FUTEX_REQUEUE 3
  95734. +#define FUTEX_CMP_REQUEUE 4
  95735. +#define FUTEX_WAKE_OP 5
  95736. +#define FUTEX_OP_CLEAR_WAKE_IF_GT_ONE ((4 << 24) | 1)
  95737. +#define FUTEX_LOCK_PI 6
  95738. +#define FUTEX_UNLOCK_PI 7
  95739. +#define FUTEX_TRYLOCK_PI 8
  95740. +#define FUTEX_WAIT_BITSET 9
  95741. +#define FUTEX_WAKE_BITSET 10
  95742. +#define FUTEX_PRIVATE_FLAG 128
  95743. +#define FUTEX_CLOCK_REALTIME 256
  95744. +
  95745. +#define FUTEX_BITSET_MATCH_ANY 0xffffffff
  95746. +
  95747. +/* Values for 'private' parameter of locking macros. Yes, the
  95748. + definition seems to be backwards. But it is not. The bit will be
  95749. + reversed before passing to the system call. */
  95750. +#define LLL_PRIVATE 0
  95751. +#define LLL_SHARED FUTEX_PRIVATE_FLAG
  95752. +
  95753. +
  95754. +#if !defined NOT_IN_libc || defined IS_IN_rtld
  95755. +/* In libc.so or ld.so all futexes are private. */
  95756. +# ifdef __ASSUME_PRIVATE_FUTEX
  95757. +# define __lll_private_flag(fl, private) \
  95758. + ((fl) | FUTEX_PRIVATE_FLAG)
  95759. +# else
  95760. +# define __lll_private_flag(fl, private) \
  95761. + ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex))
  95762. +# endif
  95763. +#else
  95764. +# ifdef __ASSUME_PRIVATE_FUTEX
  95765. +# define __lll_private_flag(fl, private) \
  95766. + (((fl) | FUTEX_PRIVATE_FLAG) ^ (private))
  95767. +# else
  95768. +# define __lll_private_flag(fl, private) \
  95769. + (__builtin_constant_p (private) \
  95770. + ? ((private) == 0 \
  95771. + ? ((fl) | THREAD_GETMEM (THREAD_SELF, header.private_futex)) \
  95772. + : (fl)) \
  95773. + : ((fl) | (((private) ^ FUTEX_PRIVATE_FLAG) \
  95774. + & THREAD_GETMEM (THREAD_SELF, header.private_futex))))
  95775. +# endif
  95776. +#endif
  95777. +
  95778. +
  95779. +#define lll_futex_wait(futexp, val, private) \
  95780. + lll_futex_timed_wait(futexp, val, NULL, private)
  95781. +
  95782. +#define lll_futex_timed_wait(futexp, val, timespec, private) \
  95783. + ({ \
  95784. + INTERNAL_SYSCALL_DECL (__err); \
  95785. + long int __ret; \
  95786. + __ret = INTERNAL_SYSCALL (futex, __err, 4, (futexp), \
  95787. + __lll_private_flag (FUTEX_WAIT, private), \
  95788. + (val), (timespec)); \
  95789. + __ret; \
  95790. + })
  95791. +
  95792. +#define lll_futex_wake(futexp, nr, private) \
  95793. + ({ \
  95794. + INTERNAL_SYSCALL_DECL (__err); \
  95795. + long int __ret; \
  95796. + __ret = INTERNAL_SYSCALL (futex, __err, 4, (futexp), \
  95797. + __lll_private_flag (FUTEX_WAKE, private), \
  95798. + (nr), 0); \
  95799. + __ret; \
  95800. + })
  95801. +
  95802. +#define lll_robust_dead(futexv, private) \
  95803. + do \
  95804. + { \
  95805. + int *__futexp = &(futexv); \
  95806. + atomic_or (__futexp, FUTEX_OWNER_DIED); \
  95807. + lll_futex_wake (__futexp, 1, private); \
  95808. + } \
  95809. + while (0)
  95810. +
  95811. +/* Returns non-zero if error happened, zero if success. */
  95812. +#define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val, private) \
  95813. + ({ \
  95814. + INTERNAL_SYSCALL_DECL (__err); \
  95815. + long int __ret; \
  95816. + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \
  95817. + __lll_private_flag (FUTEX_CMP_REQUEUE, private),\
  95818. + (nr_wake), (nr_move), (mutex), (val)); \
  95819. + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
  95820. + })
  95821. +
  95822. +
  95823. +/* Returns non-zero if error happened, zero if success. */
  95824. +#define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2, private) \
  95825. + ({ \
  95826. + INTERNAL_SYSCALL_DECL (__err); \
  95827. + long int __ret; \
  95828. + __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \
  95829. + __lll_private_flag (FUTEX_WAKE_OP, private), \
  95830. + (nr_wake), (nr_wake2), (futexp2), \
  95831. + FUTEX_OP_CLEAR_WAKE_IF_GT_ONE); \
  95832. + INTERNAL_SYSCALL_ERROR_P (__ret, __err); \
  95833. + })
  95834. +
  95835. +
  95836. +#define lll_trylock(lock) \
  95837. + atomic_compare_and_exchange_val_acq(&(lock), 1, 0)
  95838. +
  95839. +#define lll_cond_trylock(lock) \
  95840. + atomic_compare_and_exchange_val_acq(&(lock), 2, 0)
  95841. +
  95842. +#define __lll_robust_trylock(futex, id) \
  95843. + (atomic_compare_and_exchange_val_acq (futex, id, 0) != 0)
  95844. +#define lll_robust_trylock(lock, id) \
  95845. + __lll_robust_trylock (&(lock), id)
  95846. +
  95847. +extern void __lll_lock_wait_private (int *futex) attribute_hidden;
  95848. +extern void __lll_lock_wait (int *futex, int private) attribute_hidden;
  95849. +extern int __lll_robust_lock_wait (int *futex, int private) attribute_hidden;
  95850. +
  95851. +#define __lll_lock(futex, private) \
  95852. + ((void) ({ \
  95853. + int *__futex = (futex); \
  95854. + if (unlikely(atomic_compare_and_exchange_val_acq (__futex, 1, 0))) \
  95855. + { \
  95856. + if (__builtin_constant_p (private) && (private) == LLL_PRIVATE) \
  95857. + __lll_lock_wait_private (__futex); \
  95858. + else \
  95859. + __lll_lock_wait (__futex, private); \
  95860. + } \
  95861. + }))
  95862. +#define lll_lock(futex, private) __lll_lock (&(futex), private)
  95863. +
  95864. +
  95865. +#define __lll_robust_lock(futex, id, private) \
  95866. + ({ \
  95867. + int *__futex = (futex); \
  95868. + int __val = 0; \
  95869. + \
  95870. + if (unlikely(atomic_compare_and_exchange_bool_acq (__futex, id, 0))) \
  95871. + __val = __lll_robust_lock_wait (__futex, private); \
  95872. + __val; \
  95873. + })
  95874. +#define lll_robust_lock(futex, id, private) \
  95875. + __lll_robust_lock (&(futex), id, private)
  95876. +
  95877. +
  95878. +#define __lll_cond_lock(futex, private) \
  95879. + ((void) ({ \
  95880. + int *__futex = (futex); \
  95881. + if (unlikely(atomic_exchange_acq (__futex, 2))) \
  95882. + __lll_lock_wait (__futex, private); \
  95883. + }))
  95884. +#define lll_cond_lock(futex, private) __lll_cond_lock (&(futex), private)
  95885. +
  95886. +
  95887. +#define lll_robust_cond_lock(futex, id, private) \
  95888. + __lll_robust_lock (&(futex), (id) | FUTEX_WAITERS, private)
  95889. +
  95890. +
  95891. +extern int __lll_timedlock_wait (int *futex, const struct timespec *,
  95892. + int private) attribute_hidden;
  95893. +extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *,
  95894. + int private) attribute_hidden;
  95895. +
  95896. +#define __lll_timedlock(futex, abstime, private) \
  95897. + ({ \
  95898. + int *__futex = (futex); \
  95899. + int __val = 0; \
  95900. + \
  95901. + if (unlikely(atomic_exchange_acq (__futex, 1))) \
  95902. + __val = __lll_timedlock_wait (__futex, abstime, private); \
  95903. + __val; \
  95904. + })
  95905. +#define lll_timedlock(futex, abstime, private) \
  95906. + __lll_timedlock (&(futex), abstime, private)
  95907. +
  95908. +
  95909. +#define __lll_robust_timedlock(futex, abstime, id, private) \
  95910. + ({ \
  95911. + int *__futex = (futex); \
  95912. + int __val = 0; \
  95913. + \
  95914. + if (unlikely(atomic_compare_and_exchange_bool_acq (__futex, id, 0))) \
  95915. + __val = __lll_robust_timedlock_wait (__futex, abstime, private); \
  95916. + __val; \
  95917. + })
  95918. +#define lll_robust_timedlock(futex, abstime, id, private) \
  95919. + __lll_robust_timedlock (&(futex), abstime, id, private)
  95920. +
  95921. +
  95922. +#define __lll_unlock(futex, private) \
  95923. + (void) \
  95924. + ({ int *__futex = (futex); \
  95925. + int __oldval = atomic_exchange_rel (__futex, 0); \
  95926. + if (unlikely(__oldval > 1)) \
  95927. + lll_futex_wake (__futex, 1, private); \
  95928. + })
  95929. +#define lll_unlock(futex, private) __lll_unlock(&(futex), private)
  95930. +
  95931. +
  95932. +#define __lll_robust_unlock(futex, private) \
  95933. + (void) \
  95934. + ({ int *__futex = (futex); \
  95935. + int __oldval = atomic_exchange_rel (__futex, 0); \
  95936. + if (unlikely(__oldval & FUTEX_WAITERS)) \
  95937. + lll_futex_wake (__futex, 1, private); \
  95938. + })
  95939. +#define lll_robust_unlock(futex, private) \
  95940. + __lll_robust_unlock(&(futex), private)
  95941. +
  95942. +
  95943. +#define lll_islocked(futex) \
  95944. + (futex != 0)
  95945. +
  95946. +
  95947. +/* Our internal lock implementation is identical to the binary-compatible
  95948. + mutex implementation. */
  95949. +
  95950. +/* Initializers for lock. */
  95951. +#define LLL_LOCK_INITIALIZER (0)
  95952. +#define LLL_LOCK_INITIALIZER_LOCKED (1)
  95953. +
  95954. +/* The states of a lock are:
  95955. + 0 - untaken
  95956. + 1 - taken by one user
  95957. + >1 - taken by more users */
  95958. +
  95959. +/* The kernel notifies a process which uses CLONE_CLEARTID via futex
  95960. + wakeup when the clone terminates. The memory location contains the
  95961. + thread ID while the clone is running and is reset to zero
  95962. + afterwards. */
  95963. +#define lll_wait_tid(tid) \
  95964. + do { \
  95965. + __typeof (tid) __tid; \
  95966. + while ((__tid = (tid)) != 0) \
  95967. + lll_futex_wait (&(tid), __tid, LLL_SHARED);\
  95968. + } while (0)
  95969. +
  95970. +extern int __lll_timedwait_tid (int *, const struct timespec *)
  95971. + attribute_hidden;
  95972. +
  95973. +#define lll_timedwait_tid(tid, abstime) \
  95974. + ({ \
  95975. + int __res = 0; \
  95976. + if ((tid) != 0) \
  95977. + __res = __lll_timedwait_tid (&(tid), (abstime)); \
  95978. + __res; \
  95979. + })
  95980. +
  95981. +#endif /* lowlevellock.h */
  95982. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile
  95983. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile 1970-01-01 01:00:00.000000000 +0100
  95984. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile 2014-07-25 20:36:09.145346937 +0200
  95985. @@ -0,0 +1,13 @@
  95986. +# Makefile for uClibc NPTL
  95987. +#
  95988. +# Copyright (C) 2005 Steven J. Hill <sjhill@uclibc.org>
  95989. +#
  95990. +# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  95991. +#
  95992. +
  95993. +top_srcdir=../../../../../../../
  95994. +top_builddir=../../../../../../../
  95995. +all: objs
  95996. +include $(top_builddir)Rules.mak
  95997. +include Makefile.arch
  95998. +include $(top_srcdir)Makerules
  95999. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch
  96000. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch 1970-01-01 01:00:00.000000000 +0100
  96001. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch 2014-07-25 20:36:09.145346937 +0200
  96002. @@ -0,0 +1,31 @@
  96003. +# Makefile for uClibc NPTL
  96004. +#
  96005. +# Copyright (C) 2006 Steven J. Hill <sjhill@uclibc.org>
  96006. +#
  96007. +# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  96008. +#
  96009. +
  96010. +libpthread_linux_arch_SSRC = pt-vfork.S
  96011. +libpthread_linux_arch_CSRC = pthread_once.c \
  96012. + pt-__syscall_rt_sigaction.c pt-__syscall_error.c \
  96013. + lowlevellock.c
  96014. +
  96015. +libc_linux_arch_CSRC = fork.c libc-lowlevellock.c
  96016. +libc_linux_arch_SSRC = clone.S vfork.S
  96017. +libc_linux_arch_SSRC-OMIT = waitpid.S
  96018. +
  96019. +CFLAGS += $(SSP_ALL_CFLAGS)
  96020. +
  96021. +CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread
  96022. +CFLAGS-pt-__syscall_rt_sigaction.c = -DNOT_IN_libc -DIS_IN_libpthread
  96023. +CFLAGS-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread
  96024. +CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread
  96025. +ASFLAGS-vfork.S = -DIS_IN_libc -DNOT_IN_libpthread
  96026. +ASFLAGS-clone.S = -DIS_IN_libc -DNOT_IN_libpthread
  96027. +ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread
  96028. +
  96029. +ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y)
  96030. +CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__
  96031. +endif
  96032. +CFLAGS-OMIT-fork.c = -DNOT_IN_libc -DIS_IN_libpthread
  96033. +CFLAGS-OMIT-libc-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread
  96034. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-gettimeofday.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-gettimeofday.c
  96035. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-gettimeofday.c 1970-01-01 01:00:00.000000000 +0100
  96036. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-gettimeofday.c 2014-07-25 20:36:09.145346937 +0200
  96037. @@ -0,0 +1,11 @@
  96038. +/*
  96039. + * Copyright (C) 2013 Imagination Technologies Ltd.
  96040. + *
  96041. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  96042. + */
  96043. +
  96044. +#include <sys/syscall.h>
  96045. +#include <sys/time.h>
  96046. +
  96047. +int gettimeofday (struct timeval *, struct timezone *) attribute_hidden;
  96048. +_syscall2(int, gettimeofday, struct timeval *, tv, struct timezone *, tz);
  96049. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pthread_once.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pthread_once.c
  96050. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pthread_once.c 1970-01-01 01:00:00.000000000 +0100
  96051. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pthread_once.c 2014-07-25 20:36:09.145346937 +0200
  96052. @@ -0,0 +1,100 @@
  96053. +/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
  96054. + This file is part of the GNU C Library.
  96055. +
  96056. + The GNU C Library is free software; you can redistribute it and/or
  96057. + modify it under the terms of the GNU Lesser General Public
  96058. + License as published by the Free Software Foundation; either
  96059. + version 2.1 of the License, or (at your option) any later version.
  96060. +
  96061. + The GNU C Library is distributed in the hope that it will be useful,
  96062. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  96063. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  96064. + Lesser General Public License for more details.
  96065. +
  96066. + You should have received a copy of the GNU Lesser General Public
  96067. + License along with the GNU C Library; if not, write to the Free
  96068. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96069. + 02111-1307 USA. */
  96070. +
  96071. +#include "pthreadP.h"
  96072. +#include <lowlevellock.h>
  96073. +
  96074. +unsigned long int __fork_generation attribute_hidden;
  96075. +
  96076. +static void
  96077. +clear_once_control (void *arg)
  96078. +{
  96079. + pthread_once_t *once_control = (pthread_once_t *) arg;
  96080. +
  96081. + *once_control = 0;
  96082. + lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE);
  96083. +}
  96084. +
  96085. +int
  96086. +attribute_protected
  96087. +__pthread_once (pthread_once_t *once_control, void (*init_routine) (void))
  96088. +{
  96089. + for (;;)
  96090. + {
  96091. + int oldval;
  96092. + int newval;
  96093. +
  96094. + /* Pseudo code:
  96095. + newval = __fork_generation | 1;
  96096. + oldval = *once_control;
  96097. + if ((oldval & 2) == 0)
  96098. + *once_control = newval;
  96099. + Do this atomically.
  96100. + */
  96101. + do
  96102. + {
  96103. + newval = __fork_generation | 1;
  96104. + oldval = *once_control;
  96105. + if (oldval & 2)
  96106. + break;
  96107. + } while (atomic_compare_and_exchange_val_acq (once_control, newval, oldval) != oldval);
  96108. +
  96109. + /* Check if the initializer has already been done. */
  96110. + if ((oldval & 2) != 0)
  96111. + return 0;
  96112. +
  96113. + /* Check if another thread already runs the initializer. */
  96114. + if ((oldval & 1) == 0)
  96115. + break;
  96116. +
  96117. + /* Check whether the initializer execution was interrupted by a fork. */
  96118. + if (oldval != newval)
  96119. + break;
  96120. +
  96121. + /* Same generation, some other thread was faster. Wait. */
  96122. + lll_futex_wait (once_control, oldval, LLL_PRIVATE);
  96123. + }
  96124. +
  96125. + /* This thread is the first here. Do the initialization.
  96126. + Register a cleanup handler so that in case the thread gets
  96127. + interrupted the initialization can be restarted. */
  96128. + pthread_cleanup_push (clear_once_control, once_control);
  96129. +
  96130. + init_routine ();
  96131. +
  96132. + pthread_cleanup_pop (0);
  96133. +
  96134. + /* Say that the initialisation is done. */
  96135. + *once_control = __fork_generation | 2;
  96136. +
  96137. + /* Wake up all other threads. */
  96138. + lll_futex_wake (once_control, INT_MAX, LLL_PRIVATE);
  96139. +
  96140. + return 0;
  96141. +}
  96142. +weak_alias (__pthread_once, pthread_once)
  96143. +strong_alias (__pthread_once, __pthread_once_internal)
  96144. +
  96145. +#if defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__PIC__)
  96146. +/* When statically linked, if pthread_create is used, this file
  96147. + will be brought in. The exception handling code in GCC assumes
  96148. + that if pthread_create is available, so are these. */
  96149. +const void *include_pthread_getspecific attribute_hidden = pthread_getspecific;
  96150. +const void *include_pthread_setspecific attribute_hidden = pthread_setspecific;
  96151. +const void *include_pthread_key_create attribute_hidden = pthread_key_create;
  96152. +#endif
  96153. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_error.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_error.c
  96154. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_error.c 1970-01-01 01:00:00.000000000 +0100
  96155. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_error.c 2014-07-25 20:36:09.145346937 +0200
  96156. @@ -0,0 +1,7 @@
  96157. +/*
  96158. + * Copyright (C) 2013 Imagination Technologies Ltd.
  96159. + *
  96160. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  96161. + */
  96162. +
  96163. +#include <../../../../../../../libc/sysdeps/linux/metag/__syscall_error.c>
  96164. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_rt_sigaction.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_rt_sigaction.c
  96165. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_rt_sigaction.c 1970-01-01 01:00:00.000000000 +0100
  96166. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-__syscall_rt_sigaction.c 2014-07-25 20:36:09.145346937 +0200
  96167. @@ -0,0 +1,7 @@
  96168. +/*
  96169. + * Copyright (C) 2013 Imagination Technologies Ltd.
  96170. + *
  96171. + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
  96172. + */
  96173. +
  96174. +#include <../../../../../../../libc/sysdeps/linux/common/__syscall_rt_sigaction.c>
  96175. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-vfork.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-vfork.S
  96176. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-vfork.S 1970-01-01 01:00:00.000000000 +0100
  96177. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/pt-vfork.S 2014-07-25 20:36:09.145346937 +0200
  96178. @@ -0,0 +1,51 @@
  96179. +/* Copyright (C) 2005 Free Software Foundation, Inc.
  96180. + This file is part of the GNU C Library.
  96181. +
  96182. + The GNU C Library is free software; you can redistribute it and/or
  96183. + modify it under the terms of the GNU Lesser General Public
  96184. + License as published by the Free Software Foundation; either
  96185. + version 2.1 of the License, or (at your option) any later version.
  96186. +
  96187. + The GNU C Library is distributed in the hope that it will be useful,
  96188. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  96189. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  96190. + Lesser General Public License for more details.
  96191. +
  96192. + You should have received a copy of the GNU Lesser General Public
  96193. + License along with the GNU C Library; if not, write to the Free
  96194. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96195. + 02111-1307 USA. */
  96196. +
  96197. +#include <tcb-offsets.h>
  96198. +#include <asm/unistd.h>
  96199. +
  96200. +#ifdef __PIC__
  96201. +#define __VFORK_METAG_LOAD_TP ___metag_load_tp@PLT
  96202. +#else
  96203. +#define __VFORK_METAG_LOAD_TP ___metag_load_tp
  96204. +#endif
  96205. +
  96206. +/* Save the PID value. */
  96207. +#define SAVE_PID \
  96208. + SETL [A0StP++], D0FrT, D1RtP; \
  96209. + CALLR D1RtP, __VFORK_METAG_LOAD_TP; \
  96210. + SUB D0Re0, D0Re0, #TLS_PRE_TCB_SIZE; \
  96211. + GETD D0FrT, [D0Re0 + #PID]; \
  96212. + NEG D0FrT, D0FrT; \
  96213. + SETD [D0Re0 + #PID], D0FrT; \
  96214. + GETL D0FrT, D1RtP, [--A0StP];
  96215. +
  96216. +#define RESTORE_PID \
  96217. + CMP D0Re0, #0; \
  96218. + BEQ 1f; \
  96219. + MSETL [A0StP++], D0Re0, D0FrT; \
  96220. + CALLR D1RtP, __VFORK_METAG_LOAD_TP; \
  96221. + SUB D0Re0, D0Re0, #TLS_PRE_TCB_SIZE; \
  96222. + GETD D0FrT, [D0Re0 + #PID]; \
  96223. + NEG D0FrT, D0FrT; \
  96224. + SETD [D0Re0 + #PID], D0FrT; \
  96225. + GETL D0FrT, D1RtP, [--A0StP]; \
  96226. + GETL D0Re0, D1Re0, [--A0StP]; \
  96227. +1:
  96228. +
  96229. +#include <../../../../../../../libc/sysdeps/linux/metag/vfork.S>
  96230. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/sysdep-cancel.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/sysdep-cancel.h
  96231. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/sysdep-cancel.h 1970-01-01 01:00:00.000000000 +0100
  96232. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/sysdep-cancel.h 2014-07-25 20:36:09.145346937 +0200
  96233. @@ -0,0 +1,152 @@
  96234. +/* Copyright (C) 2003, 2004, 2005, 2009 Free Software Foundation, Inc.
  96235. + This file is part of the GNU C Library.
  96236. +
  96237. + The GNU C Library is free software; you can redistribute it and/or
  96238. + modify it under the terms of the GNU Lesser General Public
  96239. + License as published by the Free Software Foundation; either
  96240. + version 2.1 of the License, or (at your option) any later version.
  96241. +
  96242. + The GNU C Library is distributed in the hope that it will be useful,
  96243. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  96244. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  96245. + Lesser General Public License for more details.
  96246. +
  96247. + You should have received a copy of the GNU Lesser General Public
  96248. + License along with the GNU C Library; if not, write to the Free
  96249. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96250. + 02111-1307 USA. */
  96251. +
  96252. +#include <tls.h>
  96253. +#include <sysdep.h>
  96254. +#ifndef __ASSEMBLER__
  96255. +# include <pthreadP.h>
  96256. +#endif
  96257. +
  96258. +#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
  96259. +
  96260. +/* NOTE: We do mark syscalls with unwind annotations, for the benefit of
  96261. + cancellation; but they're really only accurate at the point of the
  96262. + syscall. The ARM unwind directives are not rich enough without adding
  96263. + a custom personality function. */
  96264. +
  96265. +#ifdef __ASSEMBLER__
  96266. +#undef ret
  96267. +#define ret \
  96268. + CMP D0Re0, #-4095; \
  96269. + MOVLO PC, D1RtP; \
  96270. + MOV D1Ar1, D0Re0; \
  96271. + B SYSCALL_ERROR;
  96272. +#endif /* __ASSEMBLER__ */
  96273. +
  96274. +# undef PSEUDO
  96275. +# define PSEUDO(name, syscall_name, args) \
  96276. + .section ".text"; \
  96277. + .type ___##syscall_name##_nocancel,%function; \
  96278. + .globl ___##syscall_name##_nocancel; \
  96279. + ___##syscall_name##_nocancel: \
  96280. + cfi_startproc; \
  96281. + DO_CALL (syscall_name, args); \
  96282. + MOV PC, D1RtP; \
  96283. + cfi_endproc; \
  96284. + .size ___##syscall_name##_nocancel,.-___##syscall_name##_nocancel; \
  96285. + .globl _##name; \
  96286. + .type _##name, @function; \
  96287. +name##: \
  96288. +_##name##: \
  96289. + DOCARGS_##args; \
  96290. + SINGLE_THREAD_P; \
  96291. + UNDOCARGS_##args; \
  96292. + BNE .Lpseudo_cancel; \
  96293. + cfi_remember_state; \
  96294. + DO_CALL (syscall_name, 0); \
  96295. + ret \
  96296. + cfi_restore_state; \
  96297. + .Lpseudo_cancel: \
  96298. + MSETL [A0StP++], D0FrT, D0.5; \
  96299. + DOCARGS_##args; /* save syscall args etc. around CENABLE. */ \
  96300. + CENABLE; \
  96301. + MOV D0FrT, D0Re0; /* put mask in safe place. */ \
  96302. + UNDOCARGS_##args; /* restore syscall args. */ \
  96303. + DO_CALL(syscall_name, 0); /* do the call. */ \
  96304. + MOV D0.5, D0Re0; /* save syscall return value. */ \
  96305. + MOV D1Ar1, D0FrT; /* get mask back. */ \
  96306. + CDISABLE; \
  96307. + MOV D0Re0, D0.5; /* retrieve return value. */ \
  96308. + GETL D0.5, D1.5, [--A0StP]; \
  96309. + GETL D0FrT, D1RtP, [--A0StP];
  96310. +
  96311. +# define DOCARGS_0
  96312. +# define UNDOCARGS_0
  96313. +
  96314. +# define DOCARGS_1 \
  96315. + SETL [A0StP++], D1Ar1, D0Ar2
  96316. +# define UNDOCARGS_1 \
  96317. + GETL D1Ar1, D0Ar2, [--A0StP]
  96318. +
  96319. +# define DOCARGS_2 DOCARGS_1
  96320. +
  96321. +# define UNDOCARGS_2 UNDOCARGS_2
  96322. +
  96323. +# define DOCARGS_3 \
  96324. + MSETL [A0StP++], D1Ar1, D1Ar3
  96325. +
  96326. +# define UNDOCARGS_3 \
  96327. + GETL D1Ar1, D0Ar2, [--A0StP]; \
  96328. + GETL D1Ar3, D0Ar4, [--A0StP]
  96329. +
  96330. +# define DOCARGS_4 DOCARGS_3
  96331. +# define UNDOCARGS_4 UNDOCARGS_3
  96332. +
  96333. +# define DOCARGS_5 \
  96334. + MSETL [A0StP++], D1Ar1, D1Ar3, D1Ar5
  96335. +# define UNDOCARGS_5 \
  96336. + GETL D1Ar1, D0Ar2, [--A0StP]; \
  96337. + GETL D1Ar3, D0Ar4, [--A0StP]; \
  96338. + GETL D1Ar5, D0Ar6, [--A0StP]
  96339. +
  96340. +# define DOCARGS_6 DOCARGS_5
  96341. +# define UNDOCARGS_6 UNDOCARGS_5
  96342. +
  96343. +# ifdef IS_IN_libpthread
  96344. +# define CENABLE CALLR D1RtP, ___pthread_enable_asynccancel@PLT
  96345. +# define CDISABLE CALLR D1RtP, ___pthread_disable_asynccancel@PLT
  96346. +# define __local_multiple_threads __pthread_multiple_threads
  96347. +# elif !defined NOT_IN_libc
  96348. +# define CENABLE CALLR D1RtP, ___libc_enable_asynccancel@PLT
  96349. +# define CDISABLE CALLR D1RtP, ___libc_disable_asynccancel@PLT
  96350. +# define __local_multiple_threads __libc_multiple_threads
  96351. +# elif defined IS_IN_librt
  96352. +# define CENABLE CALLR D1RtP, ___librt_enable_asynccancel@PLT
  96353. +# define CDISABLE CALLR D1RtP, ___librt_disable_asynccancel@PLT
  96354. +# else
  96355. +# error Unsupported library
  96356. +# endif
  96357. +
  96358. +#ifndef __ASSEMBLER__
  96359. +# define SINGLE_THREAD_P \
  96360. + likely(THREAD_GETMEM (THREAD_SELF, \
  96361. + header.multiple_threads) == 0)
  96362. +#else
  96363. +# define SINGLE_THREAD_P \
  96364. + SETL [A0StP++], D0FrT, D1RtP; \
  96365. + CALLR D1RtP, ___metag_load_tp@PLT; \
  96366. + SUB D0Re0, D0Re0, #TLS_PRE_TCB_SIZE; \
  96367. + GETD D0Re0, [D0Re0 + #MULTIPLE_THREADS_OFFSET]; \
  96368. + CMP D0Re0, #0; \
  96369. + GETL D0FrT, D1RtP, [--A0StP]
  96370. +#endif
  96371. +
  96372. +
  96373. +#elif !defined __ASSEMBLER__
  96374. +
  96375. +/* For rtld, et cetera. */
  96376. +# define SINGLE_THREAD_P 1
  96377. +# define NO_CANCELLATION 1
  96378. +
  96379. +#endif
  96380. +
  96381. +#ifndef __ASSEMBLER__
  96382. +# define RTLD_SINGLE_THREAD_P \
  96383. + likely(THREAD_GETMEM (THREAD_SELF, \
  96384. + header.multiple_threads) == 0)
  96385. +#endif
  96386. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/vfork.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/vfork.S
  96387. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/metag/vfork.S 1970-01-01 01:00:00.000000000 +0100
  96388. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/metag/vfork.S 2014-07-25 20:36:09.145346937 +0200
  96389. @@ -0,0 +1,56 @@
  96390. +/* Copyright (C) 2005 Free Software Foundation, Inc.
  96391. + This file is part of the GNU C Library.
  96392. +
  96393. + The GNU C Library is free software; you can redistribute it and/or
  96394. + modify it under the terms of the GNU Lesser General Public
  96395. + License as published by the Free Software Foundation; either
  96396. + version 2.1 of the License, or (at your option) any later version.
  96397. +
  96398. + The GNU C Library is distributed in the hope that it will be useful,
  96399. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  96400. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  96401. + Lesser General Public License for more details.
  96402. +
  96403. + You should have received a copy of the GNU Lesser General Public
  96404. + License along with the GNU C Library; if not, write to the Free
  96405. + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96406. + 02111-1307 USA. */
  96407. +
  96408. +#include <tcb-offsets.h>
  96409. +#include <asm/unistd.h>
  96410. +
  96411. +#ifdef __PIC__
  96412. +#define __VFORK_METAG_LOAD_TP ___metag_load_tp@PLT
  96413. +#else
  96414. +#define __VFORK_METAG_LOAD_TP ___metag_load_tp
  96415. +#endif
  96416. +
  96417. +/* Save the PID value. */
  96418. +#define SAVE_PID \
  96419. + SETL [A0StP++], D0FrT, D1RtP; \
  96420. + CALLR D1RtP, __VFORK_METAG_LOAD_TP; \
  96421. + SUB D0Re0, D0Re0, #TLS_PRE_TCB_SIZE; \
  96422. + GETD D0FrT, [D0Re0 + #PID]; \
  96423. + NEGS D0FrT, D0FrT; \
  96424. + BNZ 1f; \
  96425. + MOVT D0FrT, #0x8000; \
  96426. +1: SETD [D0Re0 + #PID], D0FrT; \
  96427. + GETL D0FrT, D1RtP, [--A0StP];
  96428. +
  96429. +#define RESTORE_PID \
  96430. + CMP D0Re0, #0; \
  96431. + BEQ 1f; \
  96432. + MSETL [A0StP++], D0Re0, D0FrT; \
  96433. + CALLR D1RtP, __VFORK_METAG_LOAD_TP; \
  96434. + SUB D0Re0, D0Re0, #TLS_PRE_TCB_SIZE; \
  96435. + GETD D0FrT, [D0Re0 + #PID]; \
  96436. + NEG D0FrT, D0FrT; \
  96437. + MOVT D1Re0, #0x8000; \
  96438. + CMP D0FrT, D1Re0; \
  96439. + XOREQ D0FrT, D0FrT, D0FrT; \
  96440. + SETD [D0Re0 + #PID], D0FrT; \
  96441. + GETL D0FrT, D1RtP, [--A0StP]; \
  96442. + GETL D0Re0, D1Re0, [--A0StP]; \
  96443. +1:
  96444. +
  96445. +#include <../../../../../../../libc/sysdeps/linux/metag/vfork.S>
  96446. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
  96447. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h 2012-05-15 09:20:09.000000000 +0200
  96448. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h 2014-07-25 20:36:09.145346937 +0200
  96449. @@ -13,9 +13,8 @@
  96450. Lesser General Public License for more details.
  96451. You should have received a copy of the GNU Lesser General Public
  96452. - License along with the GNU C Library; if not, write to the Free
  96453. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96454. - 02111-1307 USA. */
  96455. + License along with the GNU C Library; if not, see
  96456. + <http://www.gnu.org/licenses/>. */
  96457. #ifndef _BITS_PTHREADTYPES_H
  96458. #define _BITS_PTHREADTYPES_H 1
  96459. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/bits/semaphore.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/mips/bits/semaphore.h
  96460. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/bits/semaphore.h 2012-05-15 09:20:09.000000000 +0200
  96461. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/mips/bits/semaphore.h 2014-07-25 20:36:09.145346937 +0200
  96462. @@ -12,9 +12,8 @@
  96463. Lesser General Public License for more details.
  96464. You should have received a copy of the GNU Lesser General Public
  96465. - License along with the GNU C Library; if not, write to the Free
  96466. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96467. - 02111-1307 USA. */
  96468. + License along with the GNU C Library; if not, see
  96469. + <http://www.gnu.org/licenses/>. */
  96470. #ifndef _SEMAPHORE_H
  96471. # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
  96472. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/createthread.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/mips/createthread.c
  96473. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/createthread.c 2012-05-15 09:20:09.000000000 +0200
  96474. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/mips/createthread.c 2014-07-25 20:36:09.145346937 +0200
  96475. @@ -12,9 +12,8 @@
  96476. Lesser General Public License for more details.
  96477. You should have received a copy of the GNU Lesser General Public
  96478. - License along with the GNU C Library; if not, write to the Free
  96479. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96480. - 02111-1307 USA. */
  96481. + License along with the GNU C Library; if not, see
  96482. + <http://www.gnu.org/licenses/>. */
  96483. /* Value passed to 'clone' for initialization of the thread register. */
  96484. #define TLS_VALUE ((void *) (pd) \
  96485. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/lowlevellock.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/mips/lowlevellock.h
  96486. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/lowlevellock.h 2012-05-15 09:20:09.000000000 +0200
  96487. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/mips/lowlevellock.h 2014-07-25 20:36:09.145346937 +0200
  96488. @@ -13,9 +13,8 @@
  96489. Lesser General Public License for more details.
  96490. You should have received a copy of the GNU Lesser General Public
  96491. - License along with the GNU C Library; if not, write to the Free
  96492. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96493. - 02111-1307 USA. */
  96494. + License along with the GNU C Library; if not, see
  96495. + <http://www.gnu.org/licenses/>. */
  96496. #ifndef _LOWLEVELLOCK_H
  96497. #define _LOWLEVELLOCK_H 1
  96498. @@ -81,7 +80,7 @@
  96499. #define lll_futex_timed_wait(futexp, val, timespec, private) \
  96500. ({ \
  96501. INTERNAL_SYSCALL_DECL (__err); \
  96502. - long int __ret; \
  96503. + long int __ret attribute_unused; \
  96504. __ret = INTERNAL_SYSCALL (futex, __err, 4, (long) (futexp), \
  96505. __lll_private_flag (FUTEX_WAIT, private), \
  96506. (val), (timespec)); \
  96507. @@ -91,7 +90,7 @@
  96508. #define lll_futex_wake(futexp, nr, private) \
  96509. ({ \
  96510. INTERNAL_SYSCALL_DECL (__err); \
  96511. - long int __ret; \
  96512. + long int __ret attribute_unused; \
  96513. __ret = INTERNAL_SYSCALL (futex, __err, 4, (long) (futexp), \
  96514. __lll_private_flag (FUTEX_WAKE, private), \
  96515. (nr), 0); \
  96516. @@ -111,7 +110,7 @@
  96517. #define lll_futex_requeue(futexp, nr_wake, nr_move, mutex, val, private) \
  96518. ({ \
  96519. INTERNAL_SYSCALL_DECL (__err); \
  96520. - long int __ret; \
  96521. + long int __ret attribute_unused; \
  96522. __ret = INTERNAL_SYSCALL (futex, __err, 6, (long) (futexp), \
  96523. __lll_private_flag (FUTEX_CMP_REQUEUE, private),\
  96524. (nr_wake), (nr_move), (mutex), (val)); \
  96525. @@ -122,7 +121,7 @@
  96526. #define lll_futex_wake_unlock(futexp, nr_wake, nr_wake2, futexp2, private) \
  96527. ({ \
  96528. INTERNAL_SYSCALL_DECL (__err); \
  96529. - long int __ret; \
  96530. + long int __ret attribute_unused; \
  96531. \
  96532. __ret = INTERNAL_SYSCALL (futex, __err, 6, (futexp), \
  96533. __lll_private_flag (FUTEX_WAKE_OP, private), \
  96534. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pthread_once.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pthread_once.c
  96535. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pthread_once.c 2012-05-15 09:20:09.000000000 +0200
  96536. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pthread_once.c 2014-07-25 20:36:09.149346959 +0200
  96537. @@ -13,9 +13,8 @@
  96538. Lesser General Public License for more details.
  96539. You should have received a copy of the GNU Lesser General Public
  96540. - License along with the GNU C Library; if not, write to the Free
  96541. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96542. - 02111-1307 USA. */
  96543. + License along with the GNU C Library; if not, see
  96544. + <http://www.gnu.org/licenses/>. */
  96545. #include "pthreadP.h"
  96546. #include <lowlevellock.h>
  96547. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S
  96548. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S 2012-05-15 09:20:09.000000000 +0200
  96549. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S 2014-07-25 20:36:09.149346959 +0200
  96550. @@ -12,9 +12,8 @@
  96551. Lesser General Public License for more details.
  96552. You should have received a copy of the GNU Lesser General Public
  96553. - License along with the GNU C Library; if not, write to the Free
  96554. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96555. - 02111-1307 USA. */
  96556. + License along with the GNU C Library; if not, see
  96557. + <http://www.gnu.org/licenses/>. */
  96558. #include <features.h>
  96559. #include <tls.h>
  96560. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
  96561. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  96562. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h 2014-07-25 20:36:09.149346959 +0200
  96563. @@ -12,9 +12,8 @@
  96564. Lesser General Public License for more details.
  96565. You should have received a copy of the GNU Lesser General Public
  96566. - License along with the GNU C Library; if not, write to the Free
  96567. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96568. - 02111-1307 USA. */
  96569. + License along with the GNU C Library; if not, see
  96570. + <http://www.gnu.org/licenses/>. */
  96571. #include <sysdep.h>
  96572. #include <tls.h>
  96573. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/vfork.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/mips/vfork.S
  96574. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mips/vfork.S 2012-05-15 09:20:09.000000000 +0200
  96575. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/mips/vfork.S 2014-07-25 20:36:09.149346959 +0200
  96576. @@ -12,9 +12,8 @@
  96577. Lesser General Public License for more details.
  96578. You should have received a copy of the GNU Lesser General Public
  96579. - License along with the GNU C Library; if not, write to the Free
  96580. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96581. - 02111-1307 USA. */
  96582. + License along with the GNU C Library; if not, see
  96583. + <http://www.gnu.org/licenses/>. */
  96584. #include <features.h>
  96585. #include <tls.h>
  96586. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c
  96587. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c 2012-05-15 09:20:09.000000000 +0200
  96588. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c 2014-07-25 20:36:09.149346959 +0200
  96589. @@ -13,9 +13,8 @@
  96590. Lesser General Public License for more details.
  96591. You should have received a copy of the GNU Lesser General Public
  96592. - License along with the GNU C Library; if not, write to the Free
  96593. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96594. - 02111-1307 USA. */
  96595. + License along with the GNU C Library; if not, see
  96596. + <http://www.gnu.org/licenses/>. */
  96597. #include <assert.h>
  96598. #include <errno.h>
  96599. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/not-cancel.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/not-cancel.h
  96600. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/not-cancel.h 2012-05-15 09:20:09.000000000 +0200
  96601. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/not-cancel.h 2014-07-25 20:36:09.149346959 +0200
  96602. @@ -14,18 +14,26 @@
  96603. Lesser General Public License for more details.
  96604. You should have received a copy of the GNU Lesser General Public
  96605. - License along with the GNU C Library; if not, write to the Free
  96606. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96607. - 02111-1307 USA. */
  96608. + License along with the GNU C Library; if not, see
  96609. + <http://www.gnu.org/licenses/>. */
  96610. #include <sys/types.h>
  96611. #include <sysdep.h>
  96612. /* Uncancelable open. */
  96613. +#if defined __NR_openat && !defined __NR_open
  96614. +#define open_not_cancel(name, flags, mode) \
  96615. + INLINE_SYSCALL (openat, 4, AT_FDCWD, (const char *) (name), \
  96616. + (flags), (mode))
  96617. +#define open_not_cancel_2(name, flags) \
  96618. + INLINE_SYSCALL (openat, 3, AT_FDCWD, (const char *) (name), \
  96619. + (flags))
  96620. +#else
  96621. #define open_not_cancel(name, flags, mode) \
  96622. INLINE_SYSCALL (open, 3, (const char *) (name), (flags), (mode))
  96623. #define open_not_cancel_2(name, flags) \
  96624. INLINE_SYSCALL (open, 2, (const char *) (name), (flags))
  96625. +#endif
  96626. /* Uncancelable openat. */
  96627. #if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
  96628. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
  96629. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h 2012-05-15 09:20:09.000000000 +0200
  96630. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h 2014-07-25 20:36:09.149346959 +0200
  96631. @@ -14,9 +14,8 @@
  96632. Lesser General Public License for more details.
  96633. You should have received a copy of the GNU Lesser General Public
  96634. - License along with the GNU C Library; if not, write to the Free
  96635. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96636. - 02111-1307 USA. */
  96637. + License along with the GNU C Library; if not, see
  96638. + <http://www.gnu.org/licenses/>. */
  96639. #ifndef _BITS_PTHREADTYPES_H
  96640. #define _BITS_PTHREADTYPES_H 1
  96641. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h
  96642. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h 2012-05-15 09:20:09.000000000 +0200
  96643. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h 2014-07-25 20:36:09.149346959 +0200
  96644. @@ -14,9 +14,8 @@
  96645. Lesser General Public License for more details.
  96646. You should have received a copy of the GNU Lesser General Public
  96647. - License along with the GNU C Library; if not, write to the Free
  96648. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96649. - 02111-1307 USA. */
  96650. + License along with the GNU C Library; if not, see
  96651. + <http://www.gnu.org/licenses/>. */
  96652. #ifndef _SEMAPHORE_H
  96653. # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
  96654. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/createthread.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/createthread.c
  96655. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/createthread.c 2012-05-15 09:20:09.000000000 +0200
  96656. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/createthread.c 2014-07-25 20:36:09.149346959 +0200
  96657. @@ -13,9 +13,8 @@
  96658. Lesser General Public License for more details.
  96659. You should have received a copy of the GNU Lesser General Public
  96660. - License along with the GNU C Library; if not, write to the Free
  96661. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96662. - 02111-1307 USA. */
  96663. + License along with the GNU C Library; if not, see
  96664. + <http://www.gnu.org/licenses/>. */
  96665. /* Value passed to 'clone' for initialization of the thread register. */
  96666. #define TLS_VALUE ((void *) (pd) \
  96667. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
  96668. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h 2012-05-15 09:20:09.000000000 +0200
  96669. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h 2014-07-25 20:36:09.149346959 +0200
  96670. @@ -13,9 +13,8 @@
  96671. Lesser General Public License for more details.
  96672. You should have received a copy of the GNU Lesser General Public
  96673. - License along with the GNU C Library; if not, write to the Free
  96674. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96675. - 02111-1307 USA. */
  96676. + License along with the GNU C Library; if not, see
  96677. + <http://www.gnu.org/licenses/>. */
  96678. #ifndef _LOWLEVELLOCK_H
  96679. #define _LOWLEVELLOCK_H 1
  96680. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S
  96681. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S 2012-05-15 09:20:09.000000000 +0200
  96682. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S 2014-07-25 20:36:09.149346959 +0200
  96683. @@ -13,9 +13,8 @@
  96684. Lesser General Public License for more details.
  96685. You should have received a copy of the GNU Lesser General Public
  96686. - License along with the GNU C Library; if not, write to the Free
  96687. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96688. - 02111-1307 USA. */
  96689. + License along with the GNU C Library; if not, see
  96690. + <http://www.gnu.org/licenses/>. */
  96691. #include <sysdep.h>
  96692. #define _ERRNO_H 1
  96693. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
  96694. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  96695. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h 2014-07-25 20:36:09.149346959 +0200
  96696. @@ -14,9 +14,8 @@
  96697. Lesser General Public License for more details.
  96698. You should have received a copy of the GNU Lesser General Public
  96699. - License along with the GNU C Library; if not, write to the Free
  96700. - Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
  96701. - 02110-1301 USA. */
  96702. + License along with the GNU C Library; if not, see
  96703. + <http://www.gnu.org/licenses/>. */
  96704. #include <sysdep.h>
  96705. #include <tls.h>
  96706. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S
  96707. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S 2012-05-15 09:20:09.000000000 +0200
  96708. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S 2014-07-25 20:36:09.149346959 +0200
  96709. @@ -13,9 +13,8 @@
  96710. Lesser General Public License for more details.
  96711. You should have received a copy of the GNU Lesser General Public
  96712. - License along with the GNU C Library; if not, write to the Free
  96713. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96714. - 02111-1307 USA. */
  96715. + License along with the GNU C Library; if not, see
  96716. + <http://www.gnu.org/licenses/>. */
  96717. #include <sysdep.h>
  96718. #define _ERRNO_H 1
  96719. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S
  96720. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S 2012-05-15 09:20:09.000000000 +0200
  96721. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S 2014-07-25 20:36:09.149346959 +0200
  96722. @@ -13,9 +13,8 @@
  96723. Lesser General Public License for more details.
  96724. You should have received a copy of the GNU Lesser General Public
  96725. - License along with the GNU C Library; if not, write to the Free
  96726. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96727. - 02111-1307 USA. */
  96728. + License along with the GNU C Library; if not, see
  96729. + <http://www.gnu.org/licenses/>. */
  96730. #include <sysdep.h>
  96731. #define _ERRNO_H 1
  96732. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
  96733. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  96734. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h 2014-07-25 20:36:09.149346959 +0200
  96735. @@ -14,9 +14,8 @@
  96736. Lesser General Public License for more details.
  96737. You should have received a copy of the GNU Lesser General Public
  96738. - License along with the GNU C Library; if not, write to the Free
  96739. - Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA
  96740. - 02110-1301 USA. */
  96741. + License along with the GNU C Library; if not, see
  96742. + <http://www.gnu.org/licenses/>. */
  96743. #include <sysdep.h>
  96744. #include <tls.h>
  96745. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S
  96746. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S 2012-05-15 09:20:09.000000000 +0200
  96747. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S 2014-07-25 20:36:09.161347021 +0200
  96748. @@ -13,9 +13,8 @@
  96749. Lesser General Public License for more details.
  96750. You should have received a copy of the GNU Lesser General Public
  96751. - License along with the GNU C Library; if not, write to the Free
  96752. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96753. - 02111-1307 USA. */
  96754. + License along with the GNU C Library; if not, see
  96755. + <http://www.gnu.org/licenses/>. */
  96756. #include <sysdep.h>
  96757. #define _ERRNO_H 1
  96758. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c
  96759. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c 2012-05-15 09:20:09.000000000 +0200
  96760. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_once.c 2014-07-25 20:36:09.161347021 +0200
  96761. @@ -13,9 +13,8 @@
  96762. Lesser General Public License for more details.
  96763. You should have received a copy of the GNU Lesser General Public
  96764. - License along with the GNU C Library; if not, write to the Free
  96765. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96766. - 02111-1307 USA. */
  96767. + License along with the GNU C Library; if not, see
  96768. + <http://www.gnu.org/licenses/>. */
  96769. #include "pthreadP.h"
  96770. #include <lowlevellock.h>
  96771. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c
  96772. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c 2012-05-15 09:20:09.000000000 +0200
  96773. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c 2014-07-25 20:36:09.161347021 +0200
  96774. @@ -13,9 +13,8 @@
  96775. Lesser General Public License for more details.
  96776. You should have received a copy of the GNU Lesser General Public
  96777. - License along with the GNU C Library; if not, write to the Free
  96778. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96779. - 02111-1307 USA. */
  96780. + License along with the GNU C Library; if not, see
  96781. + <http://www.gnu.org/licenses/>. */
  96782. #include "pthreadP.h"
  96783. #include <lowlevellock.h>
  96784. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c
  96785. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c 2012-05-15 09:20:09.000000000 +0200
  96786. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c 2014-07-25 20:36:09.161347021 +0200
  96787. @@ -13,9 +13,8 @@
  96788. Lesser General Public License for more details.
  96789. You should have received a copy of the GNU Lesser General Public
  96790. - License along with the GNU C Library; if not, write to the Free
  96791. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96792. - 02111-1307 USA. */
  96793. + License along with the GNU C Library; if not, see
  96794. + <http://www.gnu.org/licenses/>. */
  96795. #include <setjmp.h>
  96796. #include <stdlib.h>
  96797. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/sem_post.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/sem_post.c
  96798. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/sem_post.c 2012-05-15 09:20:09.000000000 +0200
  96799. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/sem_post.c 2014-07-25 20:36:09.161347021 +0200
  96800. @@ -14,9 +14,8 @@
  96801. Lesser General Public License for more details.
  96802. You should have received a copy of the GNU Lesser General Public
  96803. - License along with the GNU C Library; if not, write to the Free
  96804. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96805. - 02111-1307 USA. */
  96806. + License along with the GNU C Library; if not, see
  96807. + <http://www.gnu.org/licenses/>. */
  96808. #include <errno.h>
  96809. #include <sysdep.h>
  96810. @@ -25,7 +24,7 @@
  96811. #include <semaphore.h>
  96812. int
  96813. -__new_sem_post (sem_t *sem)
  96814. +sem_post (sem_t *sem)
  96815. {
  96816. struct new_sem *isem = (struct new_sem *) sem;
  96817. @@ -44,4 +43,3 @@
  96818. }
  96819. return 0;
  96820. }
  96821. -weak_alias(__new_sem_post, sem_post)
  96822. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pt-fork.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/pt-fork.c
  96823. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pt-fork.c 2012-05-15 09:20:09.000000000 +0200
  96824. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/pt-fork.c 2014-07-25 20:36:09.161347021 +0200
  96825. @@ -13,17 +13,16 @@
  96826. Lesser General Public License for more details.
  96827. You should have received a copy of the GNU Lesser General Public
  96828. - License along with the GNU C Library; if not, write to the Free
  96829. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96830. - 02111-1307 USA. */
  96831. + License along with the GNU C Library; if not, see
  96832. + <http://www.gnu.org/licenses/>. */
  96833. #include <unistd.h>
  96834. -extern int __libc_fork (void);
  96835. -
  96836. -pid_t
  96837. +#if 0
  96838. +static pid_t
  96839. __fork (void)
  96840. {
  96841. return __libc_fork ();
  96842. }
  96843. strong_alias (__fork, fork)
  96844. +#endif
  96845. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
  96846. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c 2012-05-15 09:20:09.000000000 +0200
  96847. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c 2014-07-25 20:36:09.173347084 +0200
  96848. @@ -13,9 +13,8 @@
  96849. Lesser General Public License for more details.
  96850. You should have received a copy of the GNU Lesser General Public
  96851. - License along with the GNU C Library; if not, write to the Free
  96852. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96853. - 02111-1307 USA. */
  96854. + License along with the GNU C Library; if not, see
  96855. + <http://www.gnu.org/licenses/>. */
  96856. #include <assert.h>
  96857. #include <errno.h>
  96858. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
  96859. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c 2012-05-15 09:20:09.000000000 +0200
  96860. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c 2014-07-25 20:36:09.173347084 +0200
  96861. @@ -13,9 +13,8 @@
  96862. Lesser General Public License for more details.
  96863. You should have received a copy of the GNU Lesser General Public
  96864. - License along with the GNU C Library; if not, write to the Free
  96865. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96866. - 02111-1307 USA. */
  96867. + License along with the GNU C Library; if not, see
  96868. + <http://www.gnu.org/licenses/>. */
  96869. #include <assert.h>
  96870. #include <errno.h>
  96871. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_getaffinity.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_getaffinity.c
  96872. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_getaffinity.c 2012-05-15 09:20:09.000000000 +0200
  96873. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_getaffinity.c 2014-07-25 20:36:09.173347084 +0200
  96874. @@ -13,9 +13,8 @@
  96875. Lesser General Public License for more details.
  96876. You should have received a copy of the GNU Lesser General Public
  96877. - License along with the GNU C Library; if not, write to the Free
  96878. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96879. - 02111-1307 USA. */
  96880. + License along with the GNU C Library; if not, see
  96881. + <http://www.gnu.org/licenses/>. */
  96882. #include <errno.h>
  96883. #include <limits.h>
  96884. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_getcpuclockid.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
  96885. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_getcpuclockid.c 2012-05-15 09:20:09.000000000 +0200
  96886. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_getcpuclockid.c 2014-07-25 20:36:09.173347084 +0200
  96887. @@ -12,9 +12,8 @@
  96888. Lesser General Public License for more details.
  96889. You should have received a copy of the GNU Lesser General Public
  96890. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  96891. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  96892. - Boston, MA 02111-1307, USA. */
  96893. + License along with the GNU C Library; see the file COPYING.LIB. If
  96894. + not, see <http://www.gnu.org/licenses/>. */
  96895. #include <errno.h>
  96896. #include <pthreadP.h>
  96897. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_kill.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_kill.c
  96898. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_kill.c 2012-05-15 09:20:09.000000000 +0200
  96899. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_kill.c 2014-07-25 20:36:09.173347084 +0200
  96900. @@ -13,9 +13,8 @@
  96901. Lesser General Public License for more details.
  96902. You should have received a copy of the GNU Lesser General Public
  96903. - License along with the GNU C Library; if not, write to the Free
  96904. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96905. - 02111-1307 USA. */
  96906. + License along with the GNU C Library; if not, see
  96907. + <http://www.gnu.org/licenses/>. */
  96908. #include <errno.h>
  96909. #include <signal.h>
  96910. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c
  96911. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c 2012-05-15 09:20:09.000000000 +0200
  96912. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c 2014-07-25 20:36:09.173347084 +0200
  96913. @@ -13,9 +13,8 @@
  96914. Lesser General Public License for more details.
  96915. You should have received a copy of the GNU Lesser General Public
  96916. - License along with the GNU C Library; if not, write to the Free
  96917. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96918. - 02111-1307 USA. */
  96919. + License along with the GNU C Library; if not, see
  96920. + <http://www.gnu.org/licenses/>. */
  96921. #include <alloca.h>
  96922. #include <errno.h>
  96923. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_sigqueue.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_sigqueue.c
  96924. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_sigqueue.c 2012-05-15 09:20:09.000000000 +0200
  96925. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_sigqueue.c 2014-07-25 20:36:09.173347084 +0200
  96926. @@ -13,9 +13,8 @@
  96927. Lesser General Public License for more details.
  96928. You should have received a copy of the GNU Lesser General Public
  96929. - License along with the GNU C Library; if not, write to the Free
  96930. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96931. - 02111-1307 USA. */
  96932. + License along with the GNU C Library; if not, see
  96933. + <http://www.gnu.org/licenses/>. */
  96934. #include <errno.h>
  96935. #include <signal.h>
  96936. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_yield.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_yield.c
  96937. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_yield.c 2012-05-15 09:20:09.000000000 +0200
  96938. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_yield.c 2014-07-25 20:36:09.173347084 +0200
  96939. @@ -13,9 +13,8 @@
  96940. Lesser General Public License for more details.
  96941. You should have received a copy of the GNU Lesser General Public
  96942. - License along with the GNU C Library; if not, write to the Free
  96943. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96944. - 02111-1307 USA. */
  96945. + License along with the GNU C Library; if not, see
  96946. + <http://www.gnu.org/licenses/>. */
  96947. #include <pthread.h>
  96948. #include <sched.h>
  96949. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pt-raise.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/pt-raise.c
  96950. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/pt-raise.c 2012-05-15 09:20:09.000000000 +0200
  96951. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/pt-raise.c 2014-07-25 20:36:09.169347063 +0200
  96952. @@ -13,9 +13,8 @@
  96953. Lesser General Public License for more details.
  96954. You should have received a copy of the GNU Lesser General Public
  96955. - License along with the GNU C Library; if not, write to the Free
  96956. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96957. - 02111-1307 USA. */
  96958. + License along with the GNU C Library; if not, see
  96959. + <http://www.gnu.org/licenses/>. */
  96960. #include <errno.h>
  96961. #include <signal.h>
  96962. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c
  96963. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c 2012-05-15 09:20:09.000000000 +0200
  96964. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c 2014-07-25 20:36:09.173347084 +0200
  96965. @@ -13,9 +13,8 @@
  96966. Lesser General Public License for more details.
  96967. You should have received a copy of the GNU Lesser General Public
  96968. - License along with the GNU C Library; if not, write to the Free
  96969. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96970. - 02111-1307 USA. */
  96971. + License along with the GNU C Library; if not, see
  96972. + <http://www.gnu.org/licenses/>. */
  96973. #include <errno.h>
  96974. #include <limits.h>
  96975. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/register-atfork.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/register-atfork.c
  96976. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/register-atfork.c 2012-05-15 09:20:09.000000000 +0200
  96977. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/register-atfork.c 2014-07-25 20:36:09.173347084 +0200
  96978. @@ -13,9 +13,8 @@
  96979. Lesser General Public License for more details.
  96980. You should have received a copy of the GNU Lesser General Public
  96981. - License along with the GNU C Library; if not, write to the Free
  96982. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96983. - 02111-1307 USA. */
  96984. + License along with the GNU C Library; if not, see
  96985. + <http://www.gnu.org/licenses/>. */
  96986. #include <errno.h>
  96987. #include <stdlib.h>
  96988. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sem_post.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sem_post.c
  96989. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sem_post.c 2012-05-15 09:20:09.000000000 +0200
  96990. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sem_post.c 2014-07-25 20:36:09.173347084 +0200
  96991. @@ -14,9 +14,8 @@
  96992. Lesser General Public License for more details.
  96993. You should have received a copy of the GNU Lesser General Public
  96994. - License along with the GNU C Library; if not, write to the Free
  96995. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  96996. - 02111-1307 USA. */
  96997. + License along with the GNU C Library; if not, see
  96998. + <http://www.gnu.org/licenses/>. */
  96999. #include <errno.h>
  97000. #include <sysdep.h>
  97001. @@ -26,7 +25,7 @@
  97002. #include <tls.h>
  97003. int
  97004. -__new_sem_post (sem_t *sem)
  97005. +sem_post (sem_t *sem)
  97006. {
  97007. struct new_sem *isem = (struct new_sem *) sem;
  97008. @@ -55,4 +54,3 @@
  97009. }
  97010. return 0;
  97011. }
  97012. -weak_alias(__new_sem_post, sem_post)
  97013. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c
  97014. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c 2012-05-15 09:20:09.000000000 +0200
  97015. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sem_timedwait.c 2014-07-25 20:36:09.173347084 +0200
  97016. @@ -14,9 +14,8 @@
  97017. Lesser General Public License for more details.
  97018. You should have received a copy of the GNU Lesser General Public
  97019. - License along with the GNU C Library; if not, write to the Free
  97020. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97021. - 02111-1307 USA. */
  97022. + License along with the GNU C Library; if not, see
  97023. + <http://www.gnu.org/licenses/>. */
  97024. #include <errno.h>
  97025. #include <sysdep.h>
  97026. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sem_trywait.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sem_trywait.c
  97027. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sem_trywait.c 2012-05-15 09:20:09.000000000 +0200
  97028. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sem_trywait.c 2014-07-25 20:36:09.173347084 +0200
  97029. @@ -14,9 +14,8 @@
  97030. Lesser General Public License for more details.
  97031. You should have received a copy of the GNU Lesser General Public
  97032. - License along with the GNU C Library; if not, write to the Free
  97033. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97034. - 02111-1307 USA. */
  97035. + License along with the GNU C Library; if not, see
  97036. + <http://www.gnu.org/licenses/>. */
  97037. #include <errno.h>
  97038. #include <sysdep.h>
  97039. @@ -26,7 +25,7 @@
  97040. int
  97041. -__new_sem_trywait (sem_t *sem)
  97042. +sem_trywait (sem_t *sem)
  97043. {
  97044. int *futex = (int *) sem;
  97045. int val;
  97046. @@ -41,4 +40,3 @@
  97047. __set_errno (EAGAIN);
  97048. return -1;
  97049. }
  97050. -weak_alias(__new_sem_trywait, sem_trywait)
  97051. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sem_wait.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sem_wait.c
  97052. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sem_wait.c 2012-05-15 09:20:09.000000000 +0200
  97053. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sem_wait.c 2014-07-25 20:36:09.173347084 +0200
  97054. @@ -14,9 +14,8 @@
  97055. Lesser General Public License for more details.
  97056. You should have received a copy of the GNU Lesser General Public
  97057. - License along with the GNU C Library; if not, write to the Free
  97058. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97059. - 02111-1307 USA. */
  97060. + License along with the GNU C Library; if not, see
  97061. + <http://www.gnu.org/licenses/>. */
  97062. #include <errno.h>
  97063. #include <sysdep.h>
  97064. @@ -38,7 +37,7 @@
  97065. int
  97066. -__new_sem_wait (sem_t *sem)
  97067. +sem_wait (sem_t *sem)
  97068. {
  97069. struct new_sem *isem = (struct new_sem *) sem;
  97070. int err;
  97071. @@ -81,4 +80,3 @@
  97072. return err;
  97073. }
  97074. -weak_alias(__new_sem_wait, sem_wait)
  97075. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
  97076. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h 2012-05-15 09:20:09.000000000 +0200
  97077. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h 2014-07-25 20:36:09.173347084 +0200
  97078. @@ -14,9 +14,8 @@
  97079. Lesser General Public License for more details.
  97080. You should have received a copy of the GNU Lesser General Public
  97081. - License along with the GNU C Library; if not, write to the Free
  97082. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97083. - 02111-1307 USA. */
  97084. + License along with the GNU C Library; if not, see
  97085. + <http://www.gnu.org/licenses/>. */
  97086. #ifndef _BITS_PTHREADTYPES_H
  97087. #define _BITS_PTHREADTYPES_H 1
  97088. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/bits/semaphore.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/bits/semaphore.h
  97089. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/bits/semaphore.h 2012-05-15 09:20:09.000000000 +0200
  97090. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/bits/semaphore.h 2014-07-25 20:36:09.173347084 +0200
  97091. @@ -13,9 +13,8 @@
  97092. Lesser General Public License for more details.
  97093. You should have received a copy of the GNU Lesser General Public
  97094. - License along with the GNU C Library; if not, write to the Free
  97095. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97096. - 02111-1307 USA. */
  97097. + License along with the GNU C Library; if not, see
  97098. + <http://www.gnu.org/licenses/>. */
  97099. #ifndef _SEMAPHORE_H
  97100. # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
  97101. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/createthread.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/createthread.c
  97102. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/createthread.c 2012-05-15 09:20:09.000000000 +0200
  97103. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/createthread.c 2014-07-25 20:36:09.173347084 +0200
  97104. @@ -12,9 +12,8 @@
  97105. Lesser General Public License for more details.
  97106. You should have received a copy of the GNU Lesser General Public
  97107. - License along with the GNU C Library; if not, write to the Free
  97108. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97109. - 02111-1307 USA. */
  97110. + License along with the GNU C Library; if not, see
  97111. + <http://www.gnu.org/licenses/>. */
  97112. /* Value passed to 'clone' for initialization of the thread register. */
  97113. #define TLS_VALUE (pd + 1)
  97114. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/fork.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/fork.c
  97115. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/fork.c 2012-05-15 09:20:09.000000000 +0200
  97116. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/fork.c 2014-07-25 20:36:09.173347084 +0200
  97117. @@ -12,9 +12,8 @@
  97118. Lesser General Public License for more details.
  97119. You should have received a copy of the GNU Lesser General Public
  97120. - License along with the GNU C Library; if not, write to the Free
  97121. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97122. - 02111-1307 USA. */
  97123. + License along with the GNU C Library; if not, see
  97124. + <http://www.gnu.org/licenses/>. */
  97125. #include <sched.h>
  97126. #include <signal.h>
  97127. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S
  97128. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S 2012-05-15 09:20:09.000000000 +0200
  97129. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S 2014-07-25 20:36:09.173347084 +0200
  97130. @@ -12,8 +12,7 @@
  97131. Lesser General Public License for more details.
  97132. You should have received a copy of the GNU Lesser General Public
  97133. - License along with the GNU C Library; if not, write to the Free
  97134. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97135. - 02111-1307 USA. */
  97136. + License along with the GNU C Library; if not, see
  97137. + <http://www.gnu.org/licenses/>. */
  97138. #include "lowlevellock.S"
  97139. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h
  97140. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h 2012-05-15 09:20:09.000000000 +0200
  97141. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h 2014-07-25 20:36:09.173347084 +0200
  97142. @@ -12,9 +12,8 @@
  97143. Lesser General Public License for more details.
  97144. You should have received a copy of the GNU Lesser General Public
  97145. - License along with the GNU C Library; if not, write to the Free
  97146. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97147. - 02111-1307 USA. */
  97148. + License along with the GNU C Library; if not, see
  97149. + <http://www.gnu.org/licenses/>. */
  97150. #ifdef __ASSEMBLER__
  97151. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
  97152. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h 2012-05-15 09:20:09.000000000 +0200
  97153. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h 2014-07-25 20:36:09.173347084 +0200
  97154. @@ -13,9 +13,8 @@
  97155. Lesser General Public License for more details.
  97156. You should have received a copy of the GNU Lesser General Public
  97157. - License along with the GNU C Library; if not, write to the Free
  97158. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97159. - 02111-1307 USA. */
  97160. + License along with the GNU C Library; if not, see
  97161. + <http://www.gnu.org/licenses/>. */
  97162. #ifndef _LOWLEVELLOCK_H
  97163. #define _LOWLEVELLOCK_H 1
  97164. @@ -396,9 +395,9 @@
  97165. #define lll_wait_tid(tid) \
  97166. do { \
  97167. - __typeof (tid) *__tid = &(tid); \
  97168. - while (*__tid != 0) \
  97169. - lll_futex_wait (__tid, *__tid, LLL_SHARED); \
  97170. + __typeof (tid) __tid; \
  97171. + while ((__tid = (tid)) != 0) \
  97172. + lll_futex_wait (&(tid), __tid, LLL_SHARED); \
  97173. } while (0)
  97174. extern int __lll_timedwait_tid (int *tid, const struct timespec *abstime)
  97175. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
  97176. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S 2012-05-15 09:20:09.000000000 +0200
  97177. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S 2014-07-25 20:36:09.173347084 +0200
  97178. @@ -13,9 +13,8 @@
  97179. Lesser General Public License for more details.
  97180. You should have received a copy of the GNU Lesser General Public
  97181. - License along with the GNU C Library; if not, write to the Free
  97182. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97183. - 02111-1307 USA. */
  97184. + License along with the GNU C Library; if not, see
  97185. + <http://www.gnu.org/licenses/>. */
  97186. #include <sysdep.h>
  97187. #include <pthread-errnos.h>
  97188. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
  97189. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S 2012-05-15 09:20:09.000000000 +0200
  97190. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S 2014-07-25 20:36:09.173347084 +0200
  97191. @@ -13,9 +13,8 @@
  97192. Lesser General Public License for more details.
  97193. You should have received a copy of the GNU Lesser General Public
  97194. - License along with the GNU C Library; if not, write to the Free
  97195. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97196. - 02111-1307 USA. */
  97197. + License along with the GNU C Library; if not, see
  97198. + <http://www.gnu.org/licenses/>. */
  97199. #include <sysdep.h>
  97200. #include <pthread-errnos.h>
  97201. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
  97202. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S 2012-05-15 09:20:09.000000000 +0200
  97203. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S 2014-07-25 20:36:09.173347084 +0200
  97204. @@ -12,9 +12,8 @@
  97205. Lesser General Public License for more details.
  97206. You should have received a copy of the GNU Lesser General Public
  97207. - License along with the GNU C Library; if not, write to the Free
  97208. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97209. - 02111-1307 USA. */
  97210. + License along with the GNU C Library; if not, see
  97211. + <http://www.gnu.org/licenses/>. */
  97212. #include <sysdep.h>
  97213. #include <lowlevellock.h>
  97214. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
  97215. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S 2012-05-15 09:20:09.000000000 +0200
  97216. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S 2014-07-25 20:36:09.173347084 +0200
  97217. @@ -12,9 +12,8 @@
  97218. Lesser General Public License for more details.
  97219. You should have received a copy of the GNU Lesser General Public
  97220. - License along with the GNU C Library; if not, write to the Free
  97221. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97222. - 02111-1307 USA. */
  97223. + License along with the GNU C Library; if not, see
  97224. + <http://www.gnu.org/licenses/>. */
  97225. #include <sysdep.h>
  97226. #include <lowlevellock.h>
  97227. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
  97228. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S 2012-05-15 09:20:09.000000000 +0200
  97229. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S 2014-07-25 20:36:09.173347084 +0200
  97230. @@ -12,9 +12,8 @@
  97231. Lesser General Public License for more details.
  97232. You should have received a copy of the GNU Lesser General Public
  97233. - License along with the GNU C Library; if not, write to the Free
  97234. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97235. - 02111-1307 USA. */
  97236. + License along with the GNU C Library; if not, see
  97237. + <http://www.gnu.org/licenses/>. */
  97238. #include <sysdep.h>
  97239. #include <lowlevellock.h>
  97240. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
  97241. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S 2012-05-15 09:20:09.000000000 +0200
  97242. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S 2014-07-25 20:36:09.173347084 +0200
  97243. @@ -12,9 +12,8 @@
  97244. Lesser General Public License for more details.
  97245. You should have received a copy of the GNU Lesser General Public
  97246. - License along with the GNU C Library; if not, write to the Free
  97247. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97248. - 02111-1307 USA. */
  97249. + License along with the GNU C Library; if not, see
  97250. + <http://www.gnu.org/licenses/>. */
  97251. #include <sysdep.h>
  97252. #include <lowlevellock.h>
  97253. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
  97254. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S 2012-05-15 09:20:09.000000000 +0200
  97255. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S 2014-07-25 20:36:09.173347084 +0200
  97256. @@ -12,9 +12,8 @@
  97257. Lesser General Public License for more details.
  97258. You should have received a copy of the GNU Lesser General Public
  97259. - License along with the GNU C Library; if not, write to the Free
  97260. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97261. - 02111-1307 USA. */
  97262. + License along with the GNU C Library; if not, see
  97263. + <http://www.gnu.org/licenses/>. */
  97264. #include <sysdep.h>
  97265. #include <lowlevellock.h>
  97266. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S
  97267. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S 2012-05-15 09:20:09.000000000 +0200
  97268. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S 2014-07-25 20:36:09.173347084 +0200
  97269. @@ -12,9 +12,8 @@
  97270. Lesser General Public License for more details.
  97271. You should have received a copy of the GNU Lesser General Public
  97272. - License along with the GNU C Library; if not, write to the Free
  97273. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97274. - 02111-1307 USA. */
  97275. + License along with the GNU C Library; if not, see
  97276. + <http://www.gnu.org/licenses/>. */
  97277. #include <unwindbuf.h>
  97278. #include <sysdep.h>
  97279. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
  97280. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S 2012-05-15 09:20:09.000000000 +0200
  97281. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S 2014-07-25 20:36:09.173347084 +0200
  97282. @@ -12,9 +12,8 @@
  97283. Lesser General Public License for more details.
  97284. You should have received a copy of the GNU Lesser General Public
  97285. - License along with the GNU C Library; if not, write to the Free
  97286. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97287. - 02111-1307 USA. */
  97288. + License along with the GNU C Library; if not, see
  97289. + <http://www.gnu.org/licenses/>. */
  97290. #include <sysdep.h>
  97291. #include <lowlevellock.h>
  97292. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
  97293. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S 2012-05-15 09:20:09.000000000 +0200
  97294. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S 2014-07-25 20:36:09.173347084 +0200
  97295. @@ -12,9 +12,8 @@
  97296. Lesser General Public License for more details.
  97297. You should have received a copy of the GNU Lesser General Public
  97298. - License along with the GNU C Library; if not, write to the Free
  97299. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97300. - 02111-1307 USA. */
  97301. + License along with the GNU C Library; if not, see
  97302. + <http://www.gnu.org/licenses/>. */
  97303. #include <sysdep.h>
  97304. #include <lowlevellock.h>
  97305. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
  97306. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S 2012-05-15 09:20:09.000000000 +0200
  97307. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S 2014-07-25 20:36:09.173347084 +0200
  97308. @@ -12,9 +12,8 @@
  97309. Lesser General Public License for more details.
  97310. You should have received a copy of the GNU Lesser General Public
  97311. - License along with the GNU C Library; if not, write to the Free
  97312. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97313. - 02111-1307 USA. */
  97314. + License along with the GNU C Library; if not, see
  97315. + <http://www.gnu.org/licenses/>. */
  97316. #include <sysdep.h>
  97317. #include <lowlevellock.h>
  97318. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
  97319. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S 2012-05-15 09:20:09.000000000 +0200
  97320. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S 2014-07-25 20:36:09.173347084 +0200
  97321. @@ -12,9 +12,8 @@
  97322. Lesser General Public License for more details.
  97323. You should have received a copy of the GNU Lesser General Public
  97324. - License along with the GNU C Library; if not, write to the Free
  97325. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97326. - 02111-1307 USA. */
  97327. + License along with the GNU C Library; if not, see
  97328. + <http://www.gnu.org/licenses/>. */
  97329. #include <sysdep.h>
  97330. #include <lowlevellock.h>
  97331. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
  97332. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S 2012-05-15 09:20:09.000000000 +0200
  97333. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S 2014-07-25 20:36:09.173347084 +0200
  97334. @@ -12,9 +12,8 @@
  97335. Lesser General Public License for more details.
  97336. You should have received a copy of the GNU Lesser General Public
  97337. - License along with the GNU C Library; if not, write to the Free
  97338. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97339. - 02111-1307 USA. */
  97340. + License along with the GNU C Library; if not, see
  97341. + <http://www.gnu.org/licenses/>. */
  97342. #include <sysdep.h>
  97343. #include <lowlevellock.h>
  97344. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-initfini.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-initfini.c
  97345. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-initfini.c 2012-05-15 09:20:09.000000000 +0200
  97346. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-initfini.c 2014-07-25 20:36:09.173347084 +0200
  97347. @@ -23,8 +23,7 @@
  97348. You should have received a copy of the GNU Library General Public
  97349. License along with the GNU C Library; see the file COPYING.LIB. If not,
  97350. - write to the Free Software Foundation, 59 Temple Place - Suite 330,
  97351. - Boston, MA 02111-1307, USA. */
  97352. + see <http://www.gnu.org/licenses/>. */
  97353. /* This file is compiled into assembly code which is then munged by a sed
  97354. script into two files: crti.s and crtn.s.
  97355. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S
  97356. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S 2012-05-15 09:20:09.000000000 +0200
  97357. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S 2014-07-25 20:36:09.173347084 +0200
  97358. @@ -12,9 +12,8 @@
  97359. Lesser General Public License for more details.
  97360. You should have received a copy of the GNU Lesser General Public
  97361. - License along with the GNU C Library; if not, write to the Free
  97362. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97363. - 02111-1307 USA. */
  97364. + License along with the GNU C Library; if not, see
  97365. + <http://www.gnu.org/licenses/>. */
  97366. #include <sysdep.h>
  97367. #define _ERRNO_H 1
  97368. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S
  97369. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S 2012-05-15 09:20:09.000000000 +0200
  97370. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S 2014-07-25 20:36:09.173347084 +0200
  97371. @@ -12,9 +12,8 @@
  97372. Lesser General Public License for more details.
  97373. You should have received a copy of the GNU Lesser General Public
  97374. - License along with the GNU C Library; if not, write to the Free
  97375. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97376. - 02111-1307 USA. */
  97377. + License along with the GNU C Library; if not, see
  97378. + <http://www.gnu.org/licenses/>. */
  97379. #include <sysdep.h>
  97380. #include <pthread-errnos.h>
  97381. @@ -25,10 +24,10 @@
  97382. .text
  97383. - .globl __new_sem_post
  97384. - .type __new_sem_post,@function
  97385. + .globl sem_post
  97386. + .type sem_post,@function
  97387. .align 5
  97388. -__new_sem_post:
  97389. +sem_post:
  97390. mov.l @(VALUE,r4), r2
  97391. 0:
  97392. mov.l .Lmax, r1
  97393. @@ -106,5 +105,4 @@
  97394. .Lerrloc3:
  97395. .long __errno_location@PLT-(.Lerrloc3b-.)
  97396. #endif
  97397. - .size __new_sem_post,.-__new_sem_post
  97398. - weak_alias(__new_sem_post, sem_post)
  97399. + .size sem_post,.-sem_post
  97400. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S
  97401. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S 2012-05-15 09:20:09.000000000 +0200
  97402. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S 2014-07-25 20:36:09.173347084 +0200
  97403. @@ -12,9 +12,8 @@
  97404. Lesser General Public License for more details.
  97405. You should have received a copy of the GNU Lesser General Public
  97406. - License along with the GNU C Library; if not, write to the Free
  97407. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97408. - 02111-1307 USA. */
  97409. + License along with the GNU C Library; if not, see
  97410. + <http://www.gnu.org/licenses/>. */
  97411. #include <sysdep.h>
  97412. #include <pthread-errnos.h>
  97413. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_trywait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_trywait.S
  97414. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_trywait.S 2012-05-15 09:20:09.000000000 +0200
  97415. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_trywait.S 2014-07-25 20:36:09.173347084 +0200
  97416. @@ -12,9 +12,8 @@
  97417. Lesser General Public License for more details.
  97418. You should have received a copy of the GNU Lesser General Public
  97419. - License along with the GNU C Library; if not, write to the Free
  97420. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97421. - 02111-1307 USA. */
  97422. + License along with the GNU C Library; if not, see
  97423. + <http://www.gnu.org/licenses/>. */
  97424. #include <sysdep.h>
  97425. #include <pthread-errnos.h>
  97426. @@ -24,10 +23,10 @@
  97427. .text
  97428. - .globl __new_sem_trywait
  97429. - .type __new_sem_trywait,@function
  97430. + .globl sem_trywait
  97431. + .type sem_trywait,@function
  97432. .align 5
  97433. -__new_sem_trywait:
  97434. +sem_trywait:
  97435. mov.l r12, @-r15
  97436. mov.l r8, @-r15
  97437. sts.l pr, @-r15
  97438. @@ -86,5 +85,4 @@
  97439. .Lerrloc1:
  97440. .long __errno_location@PLT-(.Lerrloc1b-.)
  97441. #endif
  97442. - .size __new_sem_trywait,.-__new_sem_trywait
  97443. - weak_alias(__new_sem_trywait, sem_trywait)
  97444. + .size sem_trywait,.-sem_trywait
  97445. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S
  97446. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S 2012-05-15 09:20:09.000000000 +0200
  97447. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_wait.S 2014-07-25 20:36:09.173347084 +0200
  97448. @@ -12,9 +12,8 @@
  97449. Lesser General Public License for more details.
  97450. You should have received a copy of the GNU Lesser General Public
  97451. - License along with the GNU C Library; if not, write to the Free
  97452. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97453. - 02111-1307 USA. */
  97454. + License along with the GNU C Library; if not, see
  97455. + <http://www.gnu.org/licenses/>. */
  97456. #include <sysdep.h>
  97457. #include <pthread-errnos.h>
  97458. @@ -30,10 +29,10 @@
  97459. .text
  97460. - .globl __new_sem_wait
  97461. - .type __new_sem_wait,@function
  97462. + .globl sem_wait
  97463. + .type sem_wait,@function
  97464. .align 5
  97465. -__new_sem_wait:
  97466. +sem_wait:
  97467. .LSTARTCODE:
  97468. mov.l r8, @-r15
  97469. .Lpush_r8:
  97470. @@ -161,8 +160,7 @@
  97471. .long __pthread_enable_asynccancel-.Lenable0b
  97472. .Ldisable0:
  97473. .long __pthread_disable_asynccancel-.Ldisable0b
  97474. - .size __new_sem_wait,.-__new_sem_wait
  97475. - weak_alias(__new_sem_wait, sem_wait)
  97476. + .size sem_wait,.-sem_wait
  97477. .type sem_wait_cleanup,@function
  97478. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/smp.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/smp.h
  97479. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/smp.h 2012-05-15 09:20:09.000000000 +0200
  97480. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/smp.h 2014-07-25 20:36:09.173347084 +0200
  97481. @@ -14,8 +14,7 @@
  97482. You should have received a copy of the GNU Library General Public
  97483. License along with the GNU C Library; see the file COPYING.LIB. If not,
  97484. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  97485. - Boston, MA 02111-1307, USA. */
  97486. + see <http://www.gnu.org/licenses/>. */
  97487. static inline int
  97488. is_smp_system (void)
  97489. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
  97490. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  97491. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sysdep-cancel.h 2014-07-25 20:36:09.173347084 +0200
  97492. @@ -12,9 +12,8 @@
  97493. Lesser General Public License for more details.
  97494. You should have received a copy of the GNU Lesser General Public
  97495. - License along with the GNU C Library; if not, write to the Free
  97496. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97497. - 02111-1307 USA. */
  97498. + License along with the GNU C Library; if not, see
  97499. + <http://www.gnu.org/licenses/>. */
  97500. #include <tls.h>
  97501. #include <sysdep.h>
  97502. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/vfork.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/vfork.S
  97503. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sh/vfork.S 2012-05-15 09:20:09.000000000 +0200
  97504. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sh/vfork.S 2014-07-25 20:36:09.173347084 +0200
  97505. @@ -12,9 +12,8 @@
  97506. Lesser General Public License for more details.
  97507. You should have received a copy of the GNU Lesser General Public
  97508. - License along with the GNU C Library; if not, write to the Free
  97509. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97510. - 02111-1307 USA. */
  97511. + License along with the GNU C Library; if not, see
  97512. + <http://www.gnu.org/licenses/>. */
  97513. #include <sysdep.h>
  97514. #define _ERRNO_H 1
  97515. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sigtimedwait.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sigtimedwait.c
  97516. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sigtimedwait.c 2012-05-15 09:20:09.000000000 +0200
  97517. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sigtimedwait.c 2014-07-25 20:36:09.173347084 +0200
  97518. @@ -12,9 +12,8 @@
  97519. Lesser General Public License for more details.
  97520. You should have received a copy of the GNU Lesser General Public
  97521. - License along with the GNU C Library; if not, write to the Free
  97522. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97523. - 02111-1307 USA. */
  97524. + License along with the GNU C Library; if not, see
  97525. + <http://www.gnu.org/licenses/>. */
  97526. #include <pthreadP.h>
  97527. #include <errno.h>
  97528. @@ -67,7 +66,7 @@
  97529. /* Return any pending signal or wait for one for the given time. */
  97530. -int attribute_hidden
  97531. +int
  97532. __sigtimedwait (const sigset_t *set, siginfo_t *info,
  97533. const struct timespec *timeout)
  97534. {
  97535. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sigwaitinfo.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sigwaitinfo.c
  97536. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sigwaitinfo.c 2012-05-15 09:20:09.000000000 +0200
  97537. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sigwaitinfo.c 2014-07-25 20:36:09.173347084 +0200
  97538. @@ -12,9 +12,8 @@
  97539. Lesser General Public License for more details.
  97540. You should have received a copy of the GNU Lesser General Public
  97541. - License along with the GNU C Library; if not, write to the Free
  97542. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97543. - 02111-1307 USA. */
  97544. + License along with the GNU C Library; if not, see
  97545. + <http://www.gnu.org/licenses/>. */
  97546. #include <pthreadP.h>
  97547. #include <errno.h>
  97548. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/smp.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/smp.h
  97549. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/smp.h 2012-05-15 09:20:09.000000000 +0200
  97550. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/smp.h 2014-07-25 20:36:09.173347084 +0200
  97551. @@ -14,8 +14,7 @@
  97552. You should have received a copy of the GNU Library General Public
  97553. License along with the GNU C Library; see the file COPYING.LIB. If not,
  97554. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  97555. - Boston, MA 02111-1307, USA. */
  97556. + see <http://www.gnu.org/licenses/>. */
  97557. /* Test whether the machine has more than one processor. This is not the
  97558. best test but good enough. More complicated tests would require `malloc'
  97559. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h
  97560. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h 2012-05-15 09:20:09.000000000 +0200
  97561. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/local_lim.h 2014-07-25 20:36:09.173347084 +0200
  97562. @@ -14,8 +14,7 @@
  97563. You should have received a copy of the GNU Library General Public
  97564. License along with the GNU C Library; see the file COPYING.LIB. If not,
  97565. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  97566. - Boston, MA 02111-1307, USA. */
  97567. + see <http://www.gnu.org/licenses/>. */
  97568. /* The kernel header pollutes the namespace with the NR_OPEN symbol
  97569. and defines LINK_MAX although filesystems have different maxima. A
  97570. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
  97571. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h 2012-05-15 09:20:09.000000000 +0200
  97572. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h 2014-07-25 20:36:09.173347084 +0200
  97573. @@ -14,9 +14,8 @@
  97574. Lesser General Public License for more details.
  97575. You should have received a copy of the GNU Lesser General Public
  97576. - License along with the GNU C Library; if not, write to the Free
  97577. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97578. - 02111-1307 USA. */
  97579. + License along with the GNU C Library; if not, see
  97580. + <http://www.gnu.org/licenses/>. */
  97581. #ifndef _BITS_PTHREADTYPES_H
  97582. #define _BITS_PTHREADTYPES_H 1
  97583. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/semaphore.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/semaphore.h
  97584. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/semaphore.h 2012-05-15 09:20:09.000000000 +0200
  97585. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/bits/semaphore.h 2014-07-25 20:36:09.173347084 +0200
  97586. @@ -14,9 +14,8 @@
  97587. Lesser General Public License for more details.
  97588. You should have received a copy of the GNU Lesser General Public
  97589. - License along with the GNU C Library; if not, write to the Free
  97590. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97591. - 02111-1307 USA. */
  97592. + License along with the GNU C Library; if not, see
  97593. + <http://www.gnu.org/licenses/>. */
  97594. #ifndef _SEMAPHORE_H
  97595. # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
  97596. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/fork.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/fork.c
  97597. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/fork.c 2012-05-15 09:20:09.000000000 +0200
  97598. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/fork.c 2014-07-25 20:36:09.173347084 +0200
  97599. @@ -13,9 +13,8 @@
  97600. Lesser General Public License for more details.
  97601. You should have received a copy of the GNU Lesser General Public
  97602. - License along with the GNU C Library; if not, write to the Free
  97603. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97604. - 02111-1307 USA. */
  97605. + License along with the GNU C Library; if not, see
  97606. + <http://www.gnu.org/licenses/>. */
  97607. #include <sched.h>
  97608. #include <signal.h>
  97609. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/libc-lowlevellock.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/libc-lowlevellock.c
  97610. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/libc-lowlevellock.c 2012-05-15 09:20:09.000000000 +0200
  97611. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/libc-lowlevellock.c 2014-07-25 20:36:09.173347084 +0200
  97612. @@ -13,9 +13,8 @@
  97613. Lesser General Public License for more details.
  97614. You should have received a copy of the GNU Lesser General Public
  97615. - License along with the GNU C Library; if not, write to the Free
  97616. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97617. - 02111-1307 USA. */
  97618. + License along with the GNU C Library; if not, see
  97619. + <http://www.gnu.org/licenses/>. */
  97620. /* No difference to lowlevellock.c, except we lose a couple of functions. */
  97621. #include "lowlevellock.c"
  97622. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.c
  97623. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.c 2012-05-15 09:20:09.000000000 +0200
  97624. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.c 2014-07-25 20:36:09.177347105 +0200
  97625. @@ -14,9 +14,8 @@
  97626. Lesser General Public License for more details.
  97627. You should have received a copy of the GNU Lesser General Public
  97628. - License along with the GNU C Library; if not, write to the Free
  97629. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97630. - 02111-1307 USA. */
  97631. + License along with the GNU C Library; if not, see
  97632. + <http://www.gnu.org/licenses/>. */
  97633. #include <errno.h>
  97634. #include <sysdep.h>
  97635. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
  97636. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h 2012-05-15 09:20:09.000000000 +0200
  97637. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h 2014-07-25 20:36:09.177347105 +0200
  97638. @@ -14,9 +14,8 @@
  97639. Lesser General Public License for more details.
  97640. You should have received a copy of the GNU Lesser General Public
  97641. - License along with the GNU C Libr \ary; if not, write to the Free
  97642. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97643. - 02111-1307 USA. */
  97644. + License along with the GNU C Library; see the file COPYING.LIB. If
  97645. + not, see <http://www.gnu.org/licenses/>. */
  97646. #ifndef _LOWLEVELLOCK_H
  97647. #define _LOWLEVELLOCK_H 1
  97648. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c
  97649. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c 2012-05-15 09:20:09.000000000 +0200
  97650. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c 2014-07-25 20:36:09.177347105 +0200
  97651. @@ -13,9 +13,8 @@
  97652. Lesser General Public License for more details.
  97653. You should have received a copy of the GNU Lesser General Public
  97654. - License along with the GNU C Library; if not, write to the Free
  97655. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97656. - 02111-1307 USA. */
  97657. + License along with the GNU C Library; if not, see
  97658. + <http://www.gnu.org/licenses/>. */
  97659. #include <errno.h>
  97660. #include "pthreadP.h"
  97661. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c
  97662. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c 2012-05-15 09:20:09.000000000 +0200
  97663. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c 2014-07-25 20:36:09.177347105 +0200
  97664. @@ -13,9 +13,8 @@
  97665. Lesser General Public License for more details.
  97666. You should have received a copy of the GNU Lesser General Public
  97667. - License along with the GNU C Library; if not, write to the Free
  97668. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97669. - 02111-1307 USA. */
  97670. + License along with the GNU C Library; if not, see
  97671. + <http://www.gnu.org/licenses/>. */
  97672. #include <errno.h>
  97673. #include "pthreadP.h"
  97674. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_once.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_once.c
  97675. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_once.c 2012-05-15 09:20:09.000000000 +0200
  97676. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pthread_once.c 2014-07-25 20:36:09.177347105 +0200
  97677. @@ -13,9 +13,8 @@
  97678. Lesser General Public License for more details.
  97679. You should have received a copy of the GNU Lesser General Public
  97680. - License along with the GNU C Library; if not, write to the Free
  97681. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97682. - 02111-1307 USA. */
  97683. + License along with the GNU C Library; if not, see
  97684. + <http://www.gnu.org/licenses/>. */
  97685. #include "pthreadP.h"
  97686. #include <lowlevellock.h>
  97687. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sem_init.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sem_init.c
  97688. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sem_init.c 2012-05-15 09:20:09.000000000 +0200
  97689. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sem_init.c 2014-07-25 20:36:09.177347105 +0200
  97690. @@ -13,9 +13,8 @@
  97691. Lesser General Public License for more details.
  97692. You should have received a copy of the GNU Lesser General Public
  97693. - License along with the GNU C Library; if not, write to the Free
  97694. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97695. - 02111-1307 USA. */
  97696. + License along with the GNU C Library; if not, see
  97697. + <http://www.gnu.org/licenses/>. */
  97698. #include <errno.h>
  97699. #include <string.h>
  97700. @@ -26,7 +25,7 @@
  97701. int
  97702. -__new_sem_init (sem, pshared, value)
  97703. +sem_init (sem, pshared, value)
  97704. sem_t *sem;
  97705. int pshared;
  97706. unsigned int value;
  97707. @@ -53,5 +52,3 @@
  97708. return 0;
  97709. }
  97710. -weak_alias(__new_sem_init, sem_init)
  97711. -
  97712. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
  97713. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c 2012-05-15 09:20:09.000000000 +0200
  97714. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c 2014-07-25 20:36:09.177347105 +0200
  97715. @@ -13,9 +13,8 @@
  97716. Lesser General Public License for more details.
  97717. You should have received a copy of the GNU Lesser General Public
  97718. - License along with the GNU C Library; if not, write to the Free
  97719. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97720. - 02111-1307 USA. */
  97721. + License along with the GNU C Library; if not, see
  97722. + <http://www.gnu.org/licenses/>. */
  97723. #include <errno.h>
  97724. #include <sysdep.h>
  97725. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S
  97726. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S 2012-05-15 09:20:09.000000000 +0200
  97727. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S 2014-07-25 20:36:09.177347105 +0200
  97728. @@ -13,9 +13,8 @@
  97729. Lesser General Public License for more details.
  97730. You should have received a copy of the GNU Lesser General Public
  97731. - License along with the GNU C Library; if not, write to the Free
  97732. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97733. - 02111-1307 USA. */
  97734. + License along with the GNU C Library; if not, see
  97735. + <http://www.gnu.org/licenses/>. */
  97736. #include <sysdep.h>
  97737. #include <tcb-offsets.h>
  97738. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c
  97739. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c 2012-05-15 09:20:09.000000000 +0200
  97740. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c 2014-07-25 20:36:09.177347105 +0200
  97741. @@ -14,9 +14,8 @@
  97742. Lesser General Public License for more details.
  97743. You should have received a copy of the GNU Lesser General Public
  97744. - License along with the GNU C Library; if not, write to the Free
  97745. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97746. - 02111-1307 USA. */
  97747. + License along with the GNU C Library; if not, see
  97748. + <http://www.gnu.org/licenses/>. */
  97749. #include <errno.h>
  97750. #include <sysdep.h>
  97751. @@ -25,7 +24,7 @@
  97752. #include <semaphore.h>
  97753. int
  97754. -__new_sem_post (sem_t *sem)
  97755. +sem_post (sem_t *sem)
  97756. {
  97757. struct sparc_new_sem *isem = (struct sparc_new_sem *) sem;
  97758. int nr;
  97759. @@ -51,5 +50,3 @@
  97760. }
  97761. return 0;
  97762. }
  97763. -weak_alias(__new_sem_post, sem_post)
  97764. -
  97765. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
  97766. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c 2012-05-15 09:20:09.000000000 +0200
  97767. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c 2014-07-25 20:36:09.177347105 +0200
  97768. @@ -14,9 +14,8 @@
  97769. Lesser General Public License for more details.
  97770. You should have received a copy of the GNU Lesser General Public
  97771. - License along with the GNU C Library; if not, write to the Free
  97772. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97773. - 02111-1307 USA. */
  97774. + License along with the GNU C Library; if not, see
  97775. + <http://www.gnu.org/licenses/>. */
  97776. #include <errno.h>
  97777. #include <sysdep.h>
  97778. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
  97779. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c 2012-05-15 09:20:09.000000000 +0200
  97780. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c 2014-07-25 20:36:09.177347105 +0200
  97781. @@ -14,9 +14,8 @@
  97782. Lesser General Public License for more details.
  97783. You should have received a copy of the GNU Lesser General Public
  97784. - License along with the GNU C Library; if not, write to the Free
  97785. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97786. - 02111-1307 USA. */
  97787. + License along with the GNU C Library; if not, see
  97788. + <http://www.gnu.org/licenses/>. */
  97789. #include <errno.h>
  97790. #include <sysdep.h>
  97791. @@ -26,7 +25,7 @@
  97792. int
  97793. -__new_sem_trywait (sem_t *sem)
  97794. +sem_trywait (sem_t *sem)
  97795. {
  97796. struct sparc_old_sem *isem = (struct sparc_old_sem *) sem;
  97797. int val;
  97798. @@ -50,5 +49,3 @@
  97799. __set_errno (EAGAIN);
  97800. return -1;
  97801. }
  97802. -weak_alias(__new_sem_trywait, sem_trywait)
  97803. -
  97804. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
  97805. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c 2012-05-15 09:20:09.000000000 +0200
  97806. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c 2014-07-25 20:36:09.177347105 +0200
  97807. @@ -14,9 +14,8 @@
  97808. Lesser General Public License for more details.
  97809. You should have received a copy of the GNU Lesser General Public
  97810. - License along with the GNU C Library; if not, write to the Free
  97811. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97812. - 02111-1307 USA. */
  97813. + License along with the GNU C Library; if not, see
  97814. + <http://www.gnu.org/licenses/>. */
  97815. #include <errno.h>
  97816. #include <sysdep.h>
  97817. @@ -45,7 +44,7 @@
  97818. int
  97819. -__new_sem_wait (sem_t *sem)
  97820. +sem_wait (sem_t *sem)
  97821. {
  97822. struct sparc_new_sem *isem = (struct sparc_new_sem *) sem;
  97823. int err;
  97824. @@ -123,5 +122,3 @@
  97825. return err;
  97826. }
  97827. -weak_alias(__new_sem_wait, sem_wait)
  97828. -
  97829. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
  97830. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  97831. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h 2014-07-25 20:36:09.177347105 +0200
  97832. @@ -13,9 +13,8 @@
  97833. Lesser General Public License for more details.
  97834. You should have received a copy of the GNU Lesser General Public
  97835. - License along with the GNU C Library; if not, write to the Free
  97836. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97837. - 02111-1307 USA. */
  97838. + License along with the GNU C Library; if not, see
  97839. + <http://www.gnu.org/licenses/>. */
  97840. #include <tls.h>
  97841. #include <sysdep.h>
  97842. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S
  97843. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S 2012-05-15 09:20:09.000000000 +0200
  97844. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S 2014-07-25 20:36:09.177347105 +0200
  97845. @@ -13,9 +13,8 @@
  97846. Lesser General Public License for more details.
  97847. You should have received a copy of the GNU Lesser General Public
  97848. - License along with the GNU C Library; if not, write to the Free
  97849. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97850. - 02111-1307 USA. */
  97851. + License along with the GNU C Library; if not, see
  97852. + <http://www.gnu.org/licenses/>. */
  97853. #include <sysdep.h>
  97854. #include <tcb-offsets.h>
  97855. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S
  97856. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S 2012-05-15 09:20:09.000000000 +0200
  97857. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S 2014-07-25 20:36:09.193347189 +0200
  97858. @@ -13,9 +13,8 @@
  97859. Lesser General Public License for more details.
  97860. You should have received a copy of the GNU Lesser General Public
  97861. - License along with the GNU C Library; if not, write to the Free
  97862. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97863. - 02111-1307 USA. */
  97864. + License along with the GNU C Library; if not, see
  97865. + <http://www.gnu.org/licenses/>. */
  97866. #include <sysdep.h>
  97867. #include <tcb-offsets.h>
  97868. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
  97869. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  97870. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h 2014-07-25 20:36:09.193347189 +0200
  97871. @@ -13,9 +13,8 @@
  97872. Lesser General Public License for more details.
  97873. You should have received a copy of the GNU Lesser General Public
  97874. - License along with the GNU C Library; if not, write to the Free
  97875. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97876. - 02111-1307 USA. */
  97877. + License along with the GNU C Library; if not, see
  97878. + <http://www.gnu.org/licenses/>. */
  97879. #include <sysdep.h>
  97880. #include <tls.h>
  97881. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S
  97882. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S 2012-05-15 09:20:09.000000000 +0200
  97883. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S 2014-07-25 20:36:09.193347189 +0200
  97884. @@ -13,9 +13,8 @@
  97885. Lesser General Public License for more details.
  97886. You should have received a copy of the GNU Lesser General Public
  97887. - License along with the GNU C Library; if not, write to the Free
  97888. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  97889. - 02111-1307 USA. */
  97890. + License along with the GNU C Library; if not, see
  97891. + <http://www.gnu.org/licenses/>. */
  97892. #include <sysdep.h>
  97893. #include <tcb-offsets.h>
  97894. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_create.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/timer_create.c
  97895. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_create.c 2012-05-15 09:20:09.000000000 +0200
  97896. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/timer_create.c 2014-07-25 20:36:09.193347189 +0200
  97897. @@ -13,9 +13,8 @@
  97898. Lesser General Public License for more details.
  97899. You should have received a copy of the GNU Lesser General Public
  97900. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  97901. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  97902. - Boston, MA 02111-1307, USA. */
  97903. + License along with the GNU C Library; see the file COPYING.LIB. If
  97904. + not, see <http://www.gnu.org/licenses/>. */
  97905. #include <errno.h>
  97906. #include <pthread.h>
  97907. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_delete.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/timer_delete.c
  97908. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_delete.c 2012-05-15 09:20:09.000000000 +0200
  97909. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/timer_delete.c 2014-07-25 20:36:09.193347189 +0200
  97910. @@ -13,9 +13,8 @@
  97911. Lesser General Public License for more details.
  97912. You should have received a copy of the GNU Lesser General Public
  97913. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  97914. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  97915. - Boston, MA 02111-1307, USA. */
  97916. + License along with the GNU C Library; see the file COPYING.LIB. If
  97917. + not, see <http://www.gnu.org/licenses/>. */
  97918. #include <errno.h>
  97919. #include <stdlib.h>
  97920. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_getoverr.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/timer_getoverr.c
  97921. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_getoverr.c 2012-05-15 09:20:09.000000000 +0200
  97922. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/timer_getoverr.c 2014-07-25 20:36:09.193347189 +0200
  97923. @@ -13,9 +13,8 @@
  97924. Lesser General Public License for more details.
  97925. You should have received a copy of the GNU Lesser General Public
  97926. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  97927. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  97928. - Boston, MA 02111-1307, USA. */
  97929. + License along with the GNU C Library; see the file COPYING.LIB. If
  97930. + not, see <http://www.gnu.org/licenses/>. */
  97931. #include <errno.h>
  97932. #include <time.h>
  97933. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_gettime.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/timer_gettime.c
  97934. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_gettime.c 2012-05-15 09:20:09.000000000 +0200
  97935. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/timer_gettime.c 2014-07-25 20:36:09.193347189 +0200
  97936. @@ -13,9 +13,8 @@
  97937. Lesser General Public License for more details.
  97938. You should have received a copy of the GNU Lesser General Public
  97939. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  97940. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  97941. - Boston, MA 02111-1307, USA. */
  97942. + License along with the GNU C Library; see the file COPYING.LIB. If
  97943. + not, see <http://www.gnu.org/licenses/>. */
  97944. #include <errno.h>
  97945. #include <stdlib.h>
  97946. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c
  97947. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c 2012-05-15 09:20:09.000000000 +0200
  97948. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/timer_routines.c 2014-07-25 20:36:09.193347189 +0200
  97949. @@ -13,9 +13,8 @@
  97950. Lesser General Public License for more details.
  97951. You should have received a copy of the GNU Lesser General Public
  97952. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  97953. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  97954. - Boston, MA 02111-1307, USA. */
  97955. + License along with the GNU C Library; see the file COPYING.LIB. If
  97956. + not, see <http://www.gnu.org/licenses/>. */
  97957. #include <errno.h>
  97958. #include <setjmp.h>
  97959. @@ -49,7 +48,7 @@
  97960. surprising for user code, although valid. We unblock all
  97961. signals. */
  97962. sigset_t ss;
  97963. - sigemptyset (&ss);
  97964. + __sigemptyset (&ss);
  97965. INTERNAL_SYSCALL_DECL (err);
  97966. INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, NULL, _NSIG / 8);
  97967. @@ -69,13 +68,13 @@
  97968. /* Helper function to support starting threads for SIGEV_THREAD. */
  97969. -static void *
  97970. +static attribute_noreturn void *
  97971. timer_helper_thread (void *arg)
  97972. {
  97973. /* Wait for the SIGTIMER signal, allowing the setXid signal, and
  97974. none else. */
  97975. sigset_t ss;
  97976. - sigemptyset (&ss);
  97977. + __sigemptyset (&ss);
  97978. __sigaddset (&ss, SIGTIMER);
  97979. /* Endless loop of waiting for signals. The loop is only ended when
  97980. @@ -175,7 +174,7 @@
  97981. sigset_t ss;
  97982. sigset_t oss;
  97983. sigfillset (&ss);
  97984. - /*__sigaddset (&ss, SIGCANCEL); - already done by sigfillset */
  97985. + __sigaddset (&ss, SIGCANCEL);
  97986. INTERNAL_SYSCALL_DECL (err);
  97987. INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, &ss, &oss, _NSIG / 8);
  97988. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_settime.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/timer_settime.c
  97989. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/timer_settime.c 2012-05-15 09:20:09.000000000 +0200
  97990. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/timer_settime.c 2014-07-25 20:36:09.193347189 +0200
  97991. @@ -13,9 +13,8 @@
  97992. Lesser General Public License for more details.
  97993. You should have received a copy of the GNU Lesser General Public
  97994. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  97995. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  97996. - Boston, MA 02111-1307, USA. */
  97997. + License along with the GNU C Library; see the file COPYING.LIB. If
  97998. + not, see <http://www.gnu.org/licenses/>. */
  97999. #include <errno.h>
  98000. #include <stdlib.h>
  98001. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c
  98002. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c 2012-05-15 09:20:09.000000000 +0200
  98003. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c 2014-07-25 20:36:09.193347189 +0200
  98004. @@ -13,9 +13,8 @@
  98005. Lesser General Public License for more details.
  98006. You should have received a copy of the GNU Lesser General Public
  98007. - License along with the GNU C Library; if not, write to the Free
  98008. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98009. - 02111-1307 USA. */
  98010. + License along with the GNU C Library; if not, see
  98011. + <http://www.gnu.org/licenses/>. */
  98012. #include <errno.h>
  98013. #include <stdlib.h>
  98014. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
  98015. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h 2012-05-15 09:20:09.000000000 +0200
  98016. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h 2014-07-25 20:36:09.221347335 +0200
  98017. @@ -13,9 +13,8 @@
  98018. Lesser General Public License for more details.
  98019. You should have received a copy of the GNU Lesser General Public
  98020. - License along with the GNU C Library; if not, write to the Free
  98021. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98022. - 02111-1307 USA. */
  98023. + License along with the GNU C Library; if not, see
  98024. + <http://www.gnu.org/licenses/>. */
  98025. #ifndef _BITS_PTHREADTYPES_H
  98026. #define _BITS_PTHREADTYPES_H 1
  98027. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
  98028. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h 2012-05-15 09:20:09.000000000 +0200
  98029. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h 2014-07-25 20:36:09.221347335 +0200
  98030. @@ -13,9 +13,8 @@
  98031. Lesser General Public License for more details.
  98032. You should have received a copy of the GNU Lesser General Public
  98033. - License along with the GNU C Library; if not, write to the Free
  98034. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98035. - 02111-1307 USA. */
  98036. + License along with the GNU C Library; if not, see
  98037. + <http://www.gnu.org/licenses/>. */
  98038. #ifndef _SEMAPHORE_H
  98039. # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
  98040. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
  98041. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S 2012-05-15 09:20:09.000000000 +0200
  98042. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S 2014-07-25 20:36:09.221347335 +0200
  98043. @@ -13,9 +13,8 @@
  98044. Lesser General Public License for more details.
  98045. You should have received a copy of the GNU Lesser General Public
  98046. - License along with the GNU C Library; if not, write to the Free
  98047. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98048. - 02111-1307 USA. */
  98049. + License along with the GNU C Library; if not, see
  98050. + <http://www.gnu.org/licenses/>. */
  98051. #include <sysdep.h>
  98052. #include <tcb-offsets.h>
  98053. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/compat-timer.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/compat-timer.h
  98054. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/compat-timer.h 2012-05-15 09:20:09.000000000 +0200
  98055. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/compat-timer.h 2014-07-25 20:36:09.221347335 +0200
  98056. @@ -13,9 +13,8 @@
  98057. Lesser General Public License for more details.
  98058. You should have received a copy of the GNU Lesser General Public
  98059. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  98060. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  98061. - Boston, MA 02111-1307, USA. */
  98062. + License along with the GNU C Library; see the file COPYING.LIB. If
  98063. + not, see <http://www.gnu.org/licenses/>. */
  98064. #include <signal.h>
  98065. #include <time.h>
  98066. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/fork.c uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/fork.c
  98067. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/fork.c 2012-05-15 09:20:09.000000000 +0200
  98068. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/fork.c 2014-07-25 20:36:09.221347335 +0200
  98069. @@ -13,9 +13,8 @@
  98070. Lesser General Public License for more details.
  98071. You should have received a copy of the GNU Lesser General Public
  98072. - License along with the GNU C Library; if not, write to the Free
  98073. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98074. - 02111-1307 USA. */
  98075. + License along with the GNU C Library; if not, see
  98076. + <http://www.gnu.org/licenses/>. */
  98077. #include <sched.h>
  98078. #include <signal.h>
  98079. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S
  98080. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S 2012-05-15 09:20:09.000000000 +0200
  98081. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S 2014-07-25 20:36:09.221347335 +0200
  98082. @@ -13,9 +13,8 @@
  98083. Lesser General Public License for more details.
  98084. You should have received a copy of the GNU Lesser General Public
  98085. - License along with the GNU C Library; if not, write to the Free
  98086. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98087. - 02111-1307 USA. */
  98088. + License along with the GNU C Library; if not, see
  98089. + <http://www.gnu.org/licenses/>. */
  98090. #define __pthread_enable_asynccancel __libc_enable_asynccancel
  98091. #define __pthread_disable_asynccancel __libc_disable_asynccancel
  98092. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S
  98093. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S 2012-05-15 09:20:09.000000000 +0200
  98094. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S 2014-07-25 20:36:09.221347335 +0200
  98095. @@ -13,8 +13,7 @@
  98096. Lesser General Public License for more details.
  98097. You should have received a copy of the GNU Lesser General Public
  98098. - License along with the GNU C Library; if not, write to the Free
  98099. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98100. - 02111-1307 USA. */
  98101. + License along with the GNU C Library; if not, see
  98102. + <http://www.gnu.org/licenses/>. */
  98103. #include "lowlevellock.S"
  98104. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S
  98105. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S 2012-05-15 09:20:09.000000000 +0200
  98106. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S 2014-07-25 20:36:09.221347335 +0200
  98107. @@ -13,9 +13,8 @@
  98108. Lesser General Public License for more details.
  98109. You should have received a copy of the GNU Lesser General Public
  98110. - License along with the GNU C Library; if not, write to the Free
  98111. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98112. - 02111-1307 USA. */
  98113. + License along with the GNU C Library; if not, see
  98114. + <http://www.gnu.org/licenses/>. */
  98115. #define __pthread_enable_asynccancel __librt_enable_asynccancel
  98116. #define __pthread_disable_asynccancel __librt_disable_asynccancel
  98117. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
  98118. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h 2012-05-15 09:20:09.000000000 +0200
  98119. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h 2014-07-25 20:36:09.221347335 +0200
  98120. @@ -13,9 +13,8 @@
  98121. Lesser General Public License for more details.
  98122. You should have received a copy of the GNU Lesser General Public
  98123. - License along with the GNU C Library; if not, write to the Free
  98124. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98125. - 02111-1307 USA. */
  98126. + License along with the GNU C Library; if not, see
  98127. + <http://www.gnu.org/licenses/>. */
  98128. #ifndef _LOWLEVELLOCK_H
  98129. #define _LOWLEVELLOCK_H 1
  98130. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
  98131. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S 2012-05-15 09:20:09.000000000 +0200
  98132. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S 2014-07-25 20:36:09.221347335 +0200
  98133. @@ -13,9 +13,8 @@
  98134. Lesser General Public License for more details.
  98135. You should have received a copy of the GNU Lesser General Public
  98136. - License along with the GNU C Library; if not, write to the Free
  98137. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98138. - 02111-1307 USA. */
  98139. + License along with the GNU C Library; if not, see
  98140. + <http://www.gnu.org/licenses/>. */
  98141. #include <sysdep.h>
  98142. #include <pthread-errnos.h>
  98143. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
  98144. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S 2012-05-15 09:20:09.000000000 +0200
  98145. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S 2014-07-25 20:36:09.221347335 +0200
  98146. @@ -14,9 +14,8 @@
  98147. Lesser General Public License for more details.
  98148. You should have received a copy of the GNU Lesser General Public
  98149. - License along with the GNU C Library; if not, write to the Free
  98150. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98151. - 02111-1307 USA. */
  98152. + License along with the GNU C Library; if not, see
  98153. + <http://www.gnu.org/licenses/>. */
  98154. #include <sysdep.h>
  98155. #include <pthread-errnos.h>
  98156. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
  98157. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S 2012-05-15 09:20:09.000000000 +0200
  98158. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S 2014-07-25 20:36:09.221347335 +0200
  98159. @@ -13,9 +13,8 @@
  98160. Lesser General Public License for more details.
  98161. You should have received a copy of the GNU Lesser General Public
  98162. - License along with the GNU C Library; if not, write to the Free
  98163. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98164. - 02111-1307 USA. */
  98165. + License along with the GNU C Library; if not, see
  98166. + <http://www.gnu.org/licenses/>. */
  98167. #include <sysdep.h>
  98168. #include <lowlevellock.h>
  98169. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
  98170. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S 2012-05-15 09:20:09.000000000 +0200
  98171. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S 2014-07-25 20:36:09.221347335 +0200
  98172. @@ -14,9 +14,8 @@
  98173. Lesser General Public License for more details.
  98174. You should have received a copy of the GNU Lesser General Public
  98175. - License along with the GNU C Library; if not, write to the Free
  98176. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98177. - 02111-1307 USA. */
  98178. + License along with the GNU C Library; if not, see
  98179. + <http://www.gnu.org/licenses/>. */
  98180. #include <sysdep.h>
  98181. #include <lowlevellock.h>
  98182. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
  98183. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S 2012-05-15 09:20:09.000000000 +0200
  98184. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S 2014-07-25 20:36:09.221347335 +0200
  98185. @@ -13,9 +13,8 @@
  98186. Lesser General Public License for more details.
  98187. You should have received a copy of the GNU Lesser General Public
  98188. - License along with the GNU C Library; if not, write to the Free
  98189. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98190. - 02111-1307 USA. */
  98191. + License along with the GNU C Library; if not, see
  98192. + <http://www.gnu.org/licenses/>. */
  98193. #include <sysdep.h>
  98194. #include <lowlevellock.h>
  98195. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
  98196. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S 2012-05-15 09:20:09.000000000 +0200
  98197. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S 2014-07-25 20:36:09.221347335 +0200
  98198. @@ -13,9 +13,8 @@
  98199. Lesser General Public License for more details.
  98200. You should have received a copy of the GNU Lesser General Public
  98201. - License along with the GNU C Library; if not, write to the Free
  98202. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98203. - 02111-1307 USA. */
  98204. + License along with the GNU C Library; if not, see
  98205. + <http://www.gnu.org/licenses/>. */
  98206. #include <sysdep.h>
  98207. #include <lowlevellock.h>
  98208. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
  98209. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-05-15 09:20:09.000000000 +0200
  98210. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2014-07-25 20:36:09.221347335 +0200
  98211. @@ -13,9 +13,8 @@
  98212. Lesser General Public License for more details.
  98213. You should have received a copy of the GNU Lesser General Public
  98214. - License along with the GNU C Library; if not, write to the Free
  98215. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98216. - 02111-1307 USA. */
  98217. + License along with the GNU C Library; if not, see
  98218. + <http://www.gnu.org/licenses/>. */
  98219. #include <sysdep.h>
  98220. #include <lowlevellock.h>
  98221. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S
  98222. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S 2012-05-15 09:20:09.000000000 +0200
  98223. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S 2014-07-25 20:36:09.225347357 +0200
  98224. @@ -13,9 +13,8 @@
  98225. Lesser General Public License for more details.
  98226. You should have received a copy of the GNU Lesser General Public
  98227. - License along with the GNU C Library; if not, write to the Free
  98228. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98229. - 02111-1307 USA. */
  98230. + License along with the GNU C Library; if not, see
  98231. + <http://www.gnu.org/licenses/>. */
  98232. #include <sysdep.h>
  98233. #include <bits/kernel-features.h>
  98234. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
  98235. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S 2012-05-15 09:20:09.000000000 +0200
  98236. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S 2014-07-25 20:36:09.225347357 +0200
  98237. @@ -13,9 +13,8 @@
  98238. Lesser General Public License for more details.
  98239. You should have received a copy of the GNU Lesser General Public
  98240. - License along with the GNU C Library; if not, write to the Free
  98241. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98242. - 02111-1307 USA. */
  98243. + License along with the GNU C Library; if not, see
  98244. + <http://www.gnu.org/licenses/>. */
  98245. #include <sysdep.h>
  98246. #include <lowlevellock.h>
  98247. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
  98248. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S 2012-05-15 09:20:09.000000000 +0200
  98249. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S 2014-07-25 20:36:09.225347357 +0200
  98250. @@ -13,9 +13,8 @@
  98251. Lesser General Public License for more details.
  98252. You should have received a copy of the GNU Lesser General Public
  98253. - License along with the GNU C Library; if not, write to the Free
  98254. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98255. - 02111-1307 USA. */
  98256. + License along with the GNU C Library; if not, see
  98257. + <http://www.gnu.org/licenses/>. */
  98258. #include <sysdep.h>
  98259. #include <lowlevellock.h>
  98260. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
  98261. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S 2012-05-15 09:20:09.000000000 +0200
  98262. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S 2014-07-25 20:36:09.225347357 +0200
  98263. @@ -13,9 +13,8 @@
  98264. Lesser General Public License for more details.
  98265. You should have received a copy of the GNU Lesser General Public
  98266. - License along with the GNU C Library; if not, write to the Free
  98267. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98268. - 02111-1307 USA. */
  98269. + License along with the GNU C Library; if not, see
  98270. + <http://www.gnu.org/licenses/>. */
  98271. #include <sysdep.h>
  98272. #include <lowlevellock.h>
  98273. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
  98274. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S 2012-05-15 09:20:09.000000000 +0200
  98275. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S 2014-07-25 20:36:09.225347357 +0200
  98276. @@ -13,9 +13,8 @@
  98277. Lesser General Public License for more details.
  98278. You should have received a copy of the GNU Lesser General Public
  98279. - License along with the GNU C Library; if not, write to the Free
  98280. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98281. - 02111-1307 USA. */
  98282. + License along with the GNU C Library; if not, see
  98283. + <http://www.gnu.org/licenses/>. */
  98284. #include <sysdep.h>
  98285. #include <lowlevellock.h>
  98286. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
  98287. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S 2012-05-15 09:20:09.000000000 +0200
  98288. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S 2014-07-25 20:36:09.225347357 +0200
  98289. @@ -13,9 +13,8 @@
  98290. Lesser General Public License for more details.
  98291. You should have received a copy of the GNU Lesser General Public
  98292. - License along with the GNU C Library; if not, write to the Free
  98293. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98294. - 02111-1307 USA. */
  98295. + License along with the GNU C Library; if not, see
  98296. + <http://www.gnu.org/licenses/>. */
  98297. #include <sysdep.h>
  98298. #include <lowlevellock.h>
  98299. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S
  98300. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S 2012-05-15 09:20:09.000000000 +0200
  98301. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S 2014-07-25 20:36:09.221347335 +0200
  98302. @@ -12,9 +12,8 @@
  98303. Lesser General Public License for more details.
  98304. You should have received a copy of the GNU Lesser General Public
  98305. - License along with the GNU C Library; if not, write to the Free
  98306. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98307. - 02111-1307 USA. */
  98308. + License along with the GNU C Library; if not, see
  98309. + <http://www.gnu.org/licenses/>. */
  98310. #include <tcb-offsets.h>
  98311. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S
  98312. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S 2012-05-15 09:20:09.000000000 +0200
  98313. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_post.S 2014-07-25 20:36:09.225347357 +0200
  98314. @@ -13,9 +13,8 @@
  98315. Lesser General Public License for more details.
  98316. You should have received a copy of the GNU Lesser General Public
  98317. - License along with the GNU C Library; if not, write to the Free
  98318. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98319. - 02111-1307 USA. */
  98320. + License along with the GNU C Library; if not, see
  98321. + <http://www.gnu.org/licenses/>. */
  98322. #include <sysdep.h>
  98323. #include <lowlevellock.h>
  98324. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
  98325. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S 2012-05-15 09:20:09.000000000 +0200
  98326. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S 2014-07-25 20:36:09.225347357 +0200
  98327. @@ -13,9 +13,8 @@
  98328. Lesser General Public License for more details.
  98329. You should have received a copy of the GNU Lesser General Public
  98330. - License along with the GNU C Library; if not, write to the Free
  98331. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98332. - 02111-1307 USA. */
  98333. + License along with the GNU C Library; if not, see
  98334. + <http://www.gnu.org/licenses/>. */
  98335. #include <sysdep.h>
  98336. #include <bits/kernel-features.h>
  98337. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S
  98338. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S 2012-05-15 09:20:09.000000000 +0200
  98339. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_trywait.S 2014-07-25 20:36:09.225347357 +0200
  98340. @@ -13,9 +13,8 @@
  98341. Lesser General Public License for more details.
  98342. You should have received a copy of the GNU Lesser General Public
  98343. - License along with the GNU C Library; if not, write to the Free
  98344. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98345. - 02111-1307 USA. */
  98346. + License along with the GNU C Library; if not, see
  98347. + <http://www.gnu.org/licenses/>. */
  98348. #include <sysdep.h>
  98349. #include <lowlevellock.h>
  98350. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S
  98351. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S 2012-05-15 09:20:09.000000000 +0200
  98352. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S 2014-07-25 20:36:09.225347357 +0200
  98353. @@ -13,9 +13,8 @@
  98354. Lesser General Public License for more details.
  98355. You should have received a copy of the GNU Lesser General Public
  98356. - License along with the GNU C Library; if not, write to the Free
  98357. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98358. - 02111-1307 USA. */
  98359. + License along with the GNU C Library; if not, see
  98360. + <http://www.gnu.org/licenses/>. */
  98361. #include <sysdep.h>
  98362. #include <lowlevellock.h>
  98363. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
  98364. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h 2012-05-15 09:20:09.000000000 +0200
  98365. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h 2014-07-25 20:36:09.225347357 +0200
  98366. @@ -13,9 +13,8 @@
  98367. Lesser General Public License for more details.
  98368. You should have received a copy of the GNU Lesser General Public
  98369. - License along with the GNU C Library; if not, write to the Free
  98370. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98371. - 02111-1307 USA. */
  98372. + License along with the GNU C Library; if not, see
  98373. + <http://www.gnu.org/licenses/>. */
  98374. #include <sysdep.h>
  98375. #include <tls.h>
  98376. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S
  98377. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S 2012-05-15 09:20:09.000000000 +0200
  98378. +++ uClibc-git/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/vfork.S 2014-07-25 20:36:09.225347357 +0200
  98379. @@ -12,9 +12,8 @@
  98380. Lesser General Public License for more details.
  98381. You should have received a copy of the GNU Lesser General Public
  98382. - License along with the GNU C Library; if not, write to the Free
  98383. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98384. - 02111-1307 USA. */
  98385. + License along with the GNU C Library; if not, see
  98386. + <http://www.gnu.org/licenses/>. */
  98387. /* We want an #include_next, but we are the main source file.
  98388. So, #include ourselves and in that incarnation we can use #include_next. */
  98389. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/dl-tls.h uClibc-git/libpthread/nptl/sysdeps/x86_64/dl-tls.h
  98390. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/dl-tls.h 2012-05-15 09:20:09.000000000 +0200
  98391. +++ uClibc-git/libpthread/nptl/sysdeps/x86_64/dl-tls.h 2014-07-25 20:36:09.237347419 +0200
  98392. @@ -13,9 +13,8 @@
  98393. Lesser General Public License for more details.
  98394. You should have received a copy of the GNU Lesser General Public
  98395. - License along with the GNU C Library; if not, write to the Free
  98396. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98397. - 02111-1307 USA. */
  98398. + License along with the GNU C Library; if not, see
  98399. + <http://www.gnu.org/licenses/>. */
  98400. /* Type used for the representation of TLS information in the GOT. */
  98401. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/jmpbuf-unwind.h uClibc-git/libpthread/nptl/sysdeps/x86_64/jmpbuf-unwind.h
  98402. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/jmpbuf-unwind.h 2012-05-15 09:20:09.000000000 +0200
  98403. +++ uClibc-git/libpthread/nptl/sysdeps/x86_64/jmpbuf-unwind.h 2014-07-25 20:36:09.237347419 +0200
  98404. @@ -13,9 +13,8 @@
  98405. Lesser General Public License for more details.
  98406. You should have received a copy of the GNU Lesser General Public
  98407. - License along with the GNU C Library; if not, write to the Free
  98408. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98409. - 02111-1307 USA. */
  98410. + License along with the GNU C Library; if not, see
  98411. + <http://www.gnu.org/licenses/>. */
  98412. #include <setjmp.h>
  98413. #include <stdint.h>
  98414. @@ -26,6 +25,3 @@
  98415. #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
  98416. ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_RSP] - (_adj))
  98417. -
  98418. -/* We use the normal lobngjmp for unwinding. */
  98419. -#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
  98420. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/pthreaddef.h uClibc-git/libpthread/nptl/sysdeps/x86_64/pthreaddef.h
  98421. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/pthreaddef.h 2012-05-15 09:20:09.000000000 +0200
  98422. +++ uClibc-git/libpthread/nptl/sysdeps/x86_64/pthreaddef.h 2014-07-25 20:36:09.237347419 +0200
  98423. @@ -13,9 +13,8 @@
  98424. Lesser General Public License for more details.
  98425. You should have received a copy of the GNU Lesser General Public
  98426. - License along with the GNU C Library; if not, write to the Free
  98427. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98428. - 02111-1307 USA. */
  98429. + License along with the GNU C Library; if not, see
  98430. + <http://www.gnu.org/licenses/>. */
  98431. /* Default stack size. */
  98432. #define ARCH_STACK_DEFAULT_SIZE (2 * 1024 * 1024)
  98433. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/pthread_spin_trylock.S uClibc-git/libpthread/nptl/sysdeps/x86_64/pthread_spin_trylock.S
  98434. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/pthread_spin_trylock.S 2012-05-15 09:20:09.000000000 +0200
  98435. +++ uClibc-git/libpthread/nptl/sysdeps/x86_64/pthread_spin_trylock.S 2014-07-25 20:36:09.237347419 +0200
  98436. @@ -13,9 +13,8 @@
  98437. Lesser General Public License for more details.
  98438. You should have received a copy of the GNU Lesser General Public
  98439. - License along with the GNU C Library; if not, write to the Free
  98440. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98441. - 02111-1307 USA. */
  98442. + License along with the GNU C Library; if not, see
  98443. + <http://www.gnu.org/licenses/>. */
  98444. #include <pthread-errnos.h>
  98445. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/pthread_spin_unlock.S uClibc-git/libpthread/nptl/sysdeps/x86_64/pthread_spin_unlock.S
  98446. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/pthread_spin_unlock.S 2012-05-15 09:20:09.000000000 +0200
  98447. +++ uClibc-git/libpthread/nptl/sysdeps/x86_64/pthread_spin_unlock.S 2014-07-25 20:36:09.237347419 +0200
  98448. @@ -13,9 +13,8 @@
  98449. Lesser General Public License for more details.
  98450. You should have received a copy of the GNU Lesser General Public
  98451. - License along with the GNU C Library; if not, write to the Free
  98452. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98453. - 02111-1307 USA. */
  98454. + License along with the GNU C Library; if not, see
  98455. + <http://www.gnu.org/licenses/>. */
  98456. .globl pthread_spin_unlock
  98457. .type pthread_spin_unlock,@function
  98458. diff -Nur uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/tls.h uClibc-git/libpthread/nptl/sysdeps/x86_64/tls.h
  98459. --- uClibc-0.9.33.2/libpthread/nptl/sysdeps/x86_64/tls.h 2012-05-15 09:20:09.000000000 +0200
  98460. +++ uClibc-git/libpthread/nptl/sysdeps/x86_64/tls.h 2014-07-25 20:36:09.237347419 +0200
  98461. @@ -13,9 +13,8 @@
  98462. Lesser General Public License for more details.
  98463. You should have received a copy of the GNU Lesser General Public
  98464. - License along with the GNU C Library; if not, write to the Free
  98465. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98466. - 02111-1307 USA. */
  98467. + License along with the GNU C Library; if not, see
  98468. + <http://www.gnu.org/licenses/>. */
  98469. #ifndef _TLS_H
  98470. #define _TLS_H 1
  98471. diff -Nur uClibc-0.9.33.2/libpthread/nptl/unwind.c uClibc-git/libpthread/nptl/unwind.c
  98472. --- uClibc-0.9.33.2/libpthread/nptl/unwind.c 2012-05-15 09:20:09.000000000 +0200
  98473. +++ uClibc-git/libpthread/nptl/unwind.c 2014-07-25 20:36:09.237347419 +0200
  98474. @@ -14,9 +14,8 @@
  98475. Lesser General Public License for more details.
  98476. You should have received a copy of the GNU Lesser General Public
  98477. - License along with the GNU C Library; if not, write to the Free
  98478. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98479. - 02111-1307 USA. */
  98480. + License along with the GNU C Library; if not, see
  98481. + <http://www.gnu.org/licenses/>. */
  98482. #include <setjmp.h>
  98483. #include <stdlib.h>
  98484. @@ -99,7 +98,7 @@
  98485. }
  98486. -static void
  98487. +static attribute_noreturn void
  98488. unwind_cleanup (_Unwind_Reason_Code reason, struct _Unwind_Exception *exc)
  98489. {
  98490. /* When we get here a C++ catch block didn't rethrow the object. We
  98491. @@ -115,7 +114,7 @@
  98492. void
  98493. -attribute_protected
  98494. +/*does not apply due to hidden_proto(): attribute_protected*/
  98495. __cleanup_fct_attribute __attribute ((noreturn))
  98496. #if !defined SHARED && !defined IS_IN_libpthread
  98497. weak_function
  98498. diff -Nur uClibc-0.9.33.2/libpthread/nptl/vars.c uClibc-git/libpthread/nptl/vars.c
  98499. --- uClibc-0.9.33.2/libpthread/nptl/vars.c 2012-05-15 09:20:09.000000000 +0200
  98500. +++ uClibc-git/libpthread/nptl/vars.c 2014-07-25 20:36:09.237347419 +0200
  98501. @@ -12,9 +12,8 @@
  98502. Lesser General Public License for more details.
  98503. You should have received a copy of the GNU Lesser General Public
  98504. - License along with the GNU C Library; if not, write to the Free
  98505. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98506. - 02111-1307 USA. */
  98507. + License along with the GNU C Library; if not, see
  98508. + <http://www.gnu.org/licenses/>. */
  98509. #include <pthreadP.h>
  98510. #include <stdlib.h>
  98511. diff -Nur uClibc-0.9.33.2/libpthread/nptl/version.c uClibc-git/libpthread/nptl/version.c
  98512. --- uClibc-0.9.33.2/libpthread/nptl/version.c 2012-05-15 09:20:09.000000000 +0200
  98513. +++ uClibc-git/libpthread/nptl/version.c 2014-07-25 20:36:09.237347419 +0200
  98514. @@ -13,9 +13,8 @@
  98515. Lesser General Public License for more details.
  98516. You should have received a copy of the GNU Lesser General Public
  98517. - License along with the GNU C Library; if not, write to the Free
  98518. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98519. - 02111-1307 USA. */
  98520. + License along with the GNU C Library; if not, see
  98521. + <http://www.gnu.org/licenses/>. */
  98522. #include <unistd.h>
  98523. #include <sysdep.h>
  98524. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/db_info.c uClibc-git/libpthread/nptl_db/db_info.c
  98525. --- uClibc-0.9.33.2/libpthread/nptl_db/db_info.c 2012-05-15 09:20:09.000000000 +0200
  98526. +++ uClibc-git/libpthread/nptl_db/db_info.c 2014-07-25 20:36:09.381348174 +0200
  98527. @@ -15,9 +15,8 @@
  98528. Lesser General Public License for more details.
  98529. You should have received a copy of the GNU Lesser General Public
  98530. - License along with the GNU C Library; if not, write to the Free
  98531. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98532. - 02111-1307 USA. */
  98533. + License along with the GNU C Library; if not, see
  98534. + <http://www.gnu.org/licenses/>. */
  98535. #include "thread_dbP.h"
  98536. #include <tls.h>
  98537. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/fetch-value.c uClibc-git/libpthread/nptl_db/fetch-value.c
  98538. --- uClibc-0.9.33.2/libpthread/nptl_db/fetch-value.c 2012-05-15 09:20:09.000000000 +0200
  98539. +++ uClibc-git/libpthread/nptl_db/fetch-value.c 2014-07-25 20:36:09.381348174 +0200
  98540. @@ -13,9 +13,8 @@
  98541. Lesser General Public License for more details.
  98542. You should have received a copy of the GNU Lesser General Public
  98543. - License along with the GNU C Library; if not, write to the Free
  98544. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98545. - 02111-1307 USA. */
  98546. + License along with the GNU C Library; if not, see
  98547. + <http://www.gnu.org/licenses/>. */
  98548. #include "thread_dbP.h"
  98549. #include <byteswap.h>
  98550. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/proc_service.h uClibc-git/libpthread/nptl_db/proc_service.h
  98551. --- uClibc-0.9.33.2/libpthread/nptl_db/proc_service.h 2012-05-15 09:20:09.000000000 +0200
  98552. +++ uClibc-git/libpthread/nptl_db/proc_service.h 2014-07-25 20:36:09.381348174 +0200
  98553. @@ -13,9 +13,8 @@
  98554. Lesser General Public License for more details.
  98555. You should have received a copy of the GNU Lesser General Public
  98556. - License along with the GNU C Library; if not, write to the Free
  98557. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98558. - 02111-1307 USA. */
  98559. + License along with the GNU C Library; if not, see
  98560. + <http://www.gnu.org/licenses/>. */
  98561. /* The definitions in this file must correspond to those in the debugger. */
  98562. #include <sys/procfs.h>
  98563. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/structs.def uClibc-git/libpthread/nptl_db/structs.def
  98564. --- uClibc-0.9.33.2/libpthread/nptl_db/structs.def 2012-05-15 09:20:09.000000000 +0200
  98565. +++ uClibc-git/libpthread/nptl_db/structs.def 2014-07-25 20:36:09.381348174 +0200
  98566. @@ -13,9 +13,8 @@
  98567. Lesser General Public License for more details.
  98568. You should have received a copy of the GNU Lesser General Public
  98569. - License along with the GNU C Library; if not, write to the Free
  98570. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98571. - 02111-1307 USA. */
  98572. + License along with the GNU C Library; if not, see
  98573. + <http://www.gnu.org/licenses/>. */
  98574. #ifndef DB_STRUCT_ARRAY_FIELD
  98575. # define DB_STRUCT_ARRAY_FIELD(type, field) DB_STRUCT_FIELD (type, field)
  98576. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_init.c uClibc-git/libpthread/nptl_db/td_init.c
  98577. --- uClibc-0.9.33.2/libpthread/nptl_db/td_init.c 2012-05-15 09:20:09.000000000 +0200
  98578. +++ uClibc-git/libpthread/nptl_db/td_init.c 2014-07-25 20:36:09.381348174 +0200
  98579. @@ -14,9 +14,8 @@
  98580. Lesser General Public License for more details.
  98581. You should have received a copy of the GNU Lesser General Public
  98582. - License along with the GNU C Library; if not, write to the Free
  98583. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98584. - 02111-1307 USA. */
  98585. + License along with the GNU C Library; if not, see
  98586. + <http://www.gnu.org/licenses/>. */
  98587. #include "thread_dbP.h"
  98588. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_log.c uClibc-git/libpthread/nptl_db/td_log.c
  98589. --- uClibc-0.9.33.2/libpthread/nptl_db/td_log.c 2012-05-15 09:20:09.000000000 +0200
  98590. +++ uClibc-git/libpthread/nptl_db/td_log.c 2014-07-25 20:36:09.381348174 +0200
  98591. @@ -14,9 +14,8 @@
  98592. Lesser General Public License for more details.
  98593. You should have received a copy of the GNU Lesser General Public
  98594. - License along with the GNU C Library; if not, write to the Free
  98595. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98596. - 02111-1307 USA. */
  98597. + License along with the GNU C Library; if not, see
  98598. + <http://www.gnu.org/licenses/>. */
  98599. #include "thread_dbP.h"
  98600. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_symbol_list.c uClibc-git/libpthread/nptl_db/td_symbol_list.c
  98601. --- uClibc-0.9.33.2/libpthread/nptl_db/td_symbol_list.c 2012-05-15 09:20:09.000000000 +0200
  98602. +++ uClibc-git/libpthread/nptl_db/td_symbol_list.c 2014-07-25 20:36:09.381348174 +0200
  98603. @@ -14,9 +14,8 @@
  98604. Lesser General Public License for more details.
  98605. You should have received a copy of the GNU Lesser General Public
  98606. - License along with the GNU C Library; if not, write to the Free
  98607. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98608. - 02111-1307 USA. */
  98609. + License along with the GNU C Library; if not, see
  98610. + <http://www.gnu.org/licenses/>. */
  98611. #include <assert.h>
  98612. #ifndef __UCLIBC__
  98613. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_clear_event.c uClibc-git/libpthread/nptl_db/td_ta_clear_event.c
  98614. --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_clear_event.c 2012-05-15 09:20:09.000000000 +0200
  98615. +++ uClibc-git/libpthread/nptl_db/td_ta_clear_event.c 2014-07-25 20:36:09.381348174 +0200
  98616. @@ -14,9 +14,8 @@
  98617. Lesser General Public License for more details.
  98618. You should have received a copy of the GNU Lesser General Public
  98619. - License along with the GNU C Library; if not, write to the Free
  98620. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98621. - 02111-1307 USA. */
  98622. + License along with the GNU C Library; if not, see
  98623. + <http://www.gnu.org/licenses/>. */
  98624. #include "thread_dbP.h"
  98625. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_delete.c uClibc-git/libpthread/nptl_db/td_ta_delete.c
  98626. --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_delete.c 2012-05-15 09:20:09.000000000 +0200
  98627. +++ uClibc-git/libpthread/nptl_db/td_ta_delete.c 2014-07-25 20:36:09.381348174 +0200
  98628. @@ -14,9 +14,8 @@
  98629. Lesser General Public License for more details.
  98630. You should have received a copy of the GNU Lesser General Public
  98631. - License along with the GNU C Library; if not, write to the Free
  98632. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98633. - 02111-1307 USA. */
  98634. + License along with the GNU C Library; if not, see
  98635. + <http://www.gnu.org/licenses/>. */
  98636. #include <stdlib.h>
  98637. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_enable_stats.c uClibc-git/libpthread/nptl_db/td_ta_enable_stats.c
  98638. --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_enable_stats.c 2012-05-15 09:20:09.000000000 +0200
  98639. +++ uClibc-git/libpthread/nptl_db/td_ta_enable_stats.c 2014-07-25 20:36:09.381348174 +0200
  98640. @@ -14,9 +14,8 @@
  98641. Lesser General Public License for more details.
  98642. You should have received a copy of the GNU Lesser General Public
  98643. - License along with the GNU C Library; if not, write to the Free
  98644. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98645. - 02111-1307 USA. */
  98646. + License along with the GNU C Library; if not, see
  98647. + <http://www.gnu.org/licenses/>. */
  98648. #include "thread_dbP.h"
  98649. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_event_addr.c uClibc-git/libpthread/nptl_db/td_ta_event_addr.c
  98650. --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_event_addr.c 2012-05-15 09:20:09.000000000 +0200
  98651. +++ uClibc-git/libpthread/nptl_db/td_ta_event_addr.c 2014-07-25 20:36:09.381348174 +0200
  98652. @@ -14,9 +14,8 @@
  98653. Lesser General Public License for more details.
  98654. You should have received a copy of the GNU Lesser General Public
  98655. - License along with the GNU C Library; if not, write to the Free
  98656. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98657. - 02111-1307 USA. */
  98658. + License along with the GNU C Library; if not, see
  98659. + <http://www.gnu.org/licenses/>. */
  98660. #include "thread_dbP.h"
  98661. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_event_getmsg.c uClibc-git/libpthread/nptl_db/td_ta_event_getmsg.c
  98662. --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_event_getmsg.c 2012-05-15 09:20:09.000000000 +0200
  98663. +++ uClibc-git/libpthread/nptl_db/td_ta_event_getmsg.c 2014-07-25 20:36:09.381348174 +0200
  98664. @@ -14,9 +14,8 @@
  98665. Lesser General Public License for more details.
  98666. You should have received a copy of the GNU Lesser General Public
  98667. - License along with the GNU C Library; if not, write to the Free
  98668. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98669. - 02111-1307 USA. */
  98670. + License along with the GNU C Library; if not, see
  98671. + <http://www.gnu.org/licenses/>. */
  98672. #include <stddef.h>
  98673. #include <string.h>
  98674. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_get_nthreads.c uClibc-git/libpthread/nptl_db/td_ta_get_nthreads.c
  98675. --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_get_nthreads.c 2012-05-15 09:20:09.000000000 +0200
  98676. +++ uClibc-git/libpthread/nptl_db/td_ta_get_nthreads.c 2014-07-25 20:36:09.381348174 +0200
  98677. @@ -14,9 +14,8 @@
  98678. Lesser General Public License for more details.
  98679. You should have received a copy of the GNU Lesser General Public
  98680. - License along with the GNU C Library; if not, write to the Free
  98681. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98682. - 02111-1307 USA. */
  98683. + License along with the GNU C Library; if not, see
  98684. + <http://www.gnu.org/licenses/>. */
  98685. #include "thread_dbP.h"
  98686. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_get_ph.c uClibc-git/libpthread/nptl_db/td_ta_get_ph.c
  98687. --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_get_ph.c 2012-05-15 09:20:09.000000000 +0200
  98688. +++ uClibc-git/libpthread/nptl_db/td_ta_get_ph.c 2014-07-25 20:36:09.381348174 +0200
  98689. @@ -14,9 +14,8 @@
  98690. Lesser General Public License for more details.
  98691. You should have received a copy of the GNU Lesser General Public
  98692. - License along with the GNU C Library; if not, write to the Free
  98693. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98694. - 02111-1307 USA. */
  98695. + License along with the GNU C Library; if not, see
  98696. + <http://www.gnu.org/licenses/>. */
  98697. #include "thread_dbP.h"
  98698. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_get_stats.c uClibc-git/libpthread/nptl_db/td_ta_get_stats.c
  98699. --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_get_stats.c 2012-05-15 09:20:09.000000000 +0200
  98700. +++ uClibc-git/libpthread/nptl_db/td_ta_get_stats.c 2014-07-25 20:36:09.381348174 +0200
  98701. @@ -14,9 +14,8 @@
  98702. Lesser General Public License for more details.
  98703. You should have received a copy of the GNU Lesser General Public
  98704. - License along with the GNU C Library; if not, write to the Free
  98705. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98706. - 02111-1307 USA. */
  98707. + License along with the GNU C Library; if not, see
  98708. + <http://www.gnu.org/licenses/>. */
  98709. #include "thread_dbP.h"
  98710. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_map_id2thr.c uClibc-git/libpthread/nptl_db/td_ta_map_id2thr.c
  98711. --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_map_id2thr.c 2012-05-15 09:20:09.000000000 +0200
  98712. +++ uClibc-git/libpthread/nptl_db/td_ta_map_id2thr.c 2014-07-25 20:36:09.381348174 +0200
  98713. @@ -14,9 +14,8 @@
  98714. Lesser General Public License for more details.
  98715. You should have received a copy of the GNU Lesser General Public
  98716. - License along with the GNU C Library; if not, write to the Free
  98717. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98718. - 02111-1307 USA. */
  98719. + License along with the GNU C Library; if not, see
  98720. + <http://www.gnu.org/licenses/>. */
  98721. #include "thread_dbP.h"
  98722. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_map_lwp2thr.c uClibc-git/libpthread/nptl_db/td_ta_map_lwp2thr.c
  98723. --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_map_lwp2thr.c 2012-05-15 09:20:09.000000000 +0200
  98724. +++ uClibc-git/libpthread/nptl_db/td_ta_map_lwp2thr.c 2014-07-25 20:36:09.381348174 +0200
  98725. @@ -13,9 +13,8 @@
  98726. Lesser General Public License for more details.
  98727. You should have received a copy of the GNU Lesser General Public
  98728. - License along with the GNU C Library; if not, write to the Free
  98729. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98730. - 02111-1307 USA. */
  98731. + License along with the GNU C Library; if not, see
  98732. + <http://www.gnu.org/licenses/>. */
  98733. #include "thread_dbP.h"
  98734. #include <stdlib.h>
  98735. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_new.c uClibc-git/libpthread/nptl_db/td_ta_new.c
  98736. --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_new.c 2012-05-15 09:20:09.000000000 +0200
  98737. +++ uClibc-git/libpthread/nptl_db/td_ta_new.c 2014-07-25 20:36:09.381348174 +0200
  98738. @@ -14,9 +14,8 @@
  98739. Lesser General Public License for more details.
  98740. You should have received a copy of the GNU Lesser General Public
  98741. - License along with the GNU C Library; if not, write to the Free
  98742. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98743. - 02111-1307 USA. */
  98744. + License along with the GNU C Library; if not, see
  98745. + <http://www.gnu.org/licenses/>. */
  98746. #include <stddef.h>
  98747. #include <stdlib.h>
  98748. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_reset_stats.c uClibc-git/libpthread/nptl_db/td_ta_reset_stats.c
  98749. --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_reset_stats.c 2012-05-15 09:20:09.000000000 +0200
  98750. +++ uClibc-git/libpthread/nptl_db/td_ta_reset_stats.c 2014-07-25 20:36:09.381348174 +0200
  98751. @@ -14,9 +14,8 @@
  98752. Lesser General Public License for more details.
  98753. You should have received a copy of the GNU Lesser General Public
  98754. - License along with the GNU C Library; if not, write to the Free
  98755. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98756. - 02111-1307 USA. */
  98757. + License along with the GNU C Library; if not, see
  98758. + <http://www.gnu.org/licenses/>. */
  98759. #include "thread_dbP.h"
  98760. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_setconcurrency.c uClibc-git/libpthread/nptl_db/td_ta_setconcurrency.c
  98761. --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_setconcurrency.c 2012-05-15 09:20:09.000000000 +0200
  98762. +++ uClibc-git/libpthread/nptl_db/td_ta_setconcurrency.c 2014-07-25 20:36:09.381348174 +0200
  98763. @@ -14,9 +14,8 @@
  98764. Lesser General Public License for more details.
  98765. You should have received a copy of the GNU Lesser General Public
  98766. - License along with the GNU C Library; if not, write to the Free
  98767. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98768. - 02111-1307 USA. */
  98769. + License along with the GNU C Library; if not, see
  98770. + <http://www.gnu.org/licenses/>. */
  98771. #include "thread_dbP.h"
  98772. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_set_event.c uClibc-git/libpthread/nptl_db/td_ta_set_event.c
  98773. --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_set_event.c 2012-05-15 09:20:09.000000000 +0200
  98774. +++ uClibc-git/libpthread/nptl_db/td_ta_set_event.c 2014-07-25 20:36:09.381348174 +0200
  98775. @@ -14,9 +14,8 @@
  98776. Lesser General Public License for more details.
  98777. You should have received a copy of the GNU Lesser General Public
  98778. - License along with the GNU C Library; if not, write to the Free
  98779. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98780. - 02111-1307 USA. */
  98781. + License along with the GNU C Library; if not, see
  98782. + <http://www.gnu.org/licenses/>. */
  98783. #include "thread_dbP.h"
  98784. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_thr_iter.c uClibc-git/libpthread/nptl_db/td_ta_thr_iter.c
  98785. --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_thr_iter.c 2012-05-15 09:20:09.000000000 +0200
  98786. +++ uClibc-git/libpthread/nptl_db/td_ta_thr_iter.c 2014-07-25 20:36:09.381348174 +0200
  98787. @@ -14,9 +14,8 @@
  98788. Lesser General Public License for more details.
  98789. You should have received a copy of the GNU Lesser General Public
  98790. - License along with the GNU C Library; if not, write to the Free
  98791. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98792. - 02111-1307 USA. */
  98793. + License along with the GNU C Library; if not, see
  98794. + <http://www.gnu.org/licenses/>. */
  98795. #include "thread_dbP.h"
  98796. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_ta_tsd_iter.c uClibc-git/libpthread/nptl_db/td_ta_tsd_iter.c
  98797. --- uClibc-0.9.33.2/libpthread/nptl_db/td_ta_tsd_iter.c 2012-05-15 09:20:09.000000000 +0200
  98798. +++ uClibc-git/libpthread/nptl_db/td_ta_tsd_iter.c 2014-07-25 20:36:09.381348174 +0200
  98799. @@ -14,9 +14,8 @@
  98800. Lesser General Public License for more details.
  98801. You should have received a copy of the GNU Lesser General Public
  98802. - License along with the GNU C Library; if not, write to the Free
  98803. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98804. - 02111-1307 USA. */
  98805. + License along with the GNU C Library; if not, see
  98806. + <http://www.gnu.org/licenses/>. */
  98807. #include "thread_dbP.h"
  98808. #include <alloca.h>
  98809. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_clear_event.c uClibc-git/libpthread/nptl_db/td_thr_clear_event.c
  98810. --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_clear_event.c 2012-05-15 09:20:09.000000000 +0200
  98811. +++ uClibc-git/libpthread/nptl_db/td_thr_clear_event.c 2014-07-25 20:36:09.381348174 +0200
  98812. @@ -14,9 +14,8 @@
  98813. Lesser General Public License for more details.
  98814. You should have received a copy of the GNU Lesser General Public
  98815. - License along with the GNU C Library; if not, write to the Free
  98816. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98817. - 02111-1307 USA. */
  98818. + License along with the GNU C Library; if not, see
  98819. + <http://www.gnu.org/licenses/>. */
  98820. #include <stddef.h>
  98821. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_dbresume.c uClibc-git/libpthread/nptl_db/td_thr_dbresume.c
  98822. --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_dbresume.c 2012-05-15 09:20:09.000000000 +0200
  98823. +++ uClibc-git/libpthread/nptl_db/td_thr_dbresume.c 2014-07-25 20:36:09.381348174 +0200
  98824. @@ -14,9 +14,8 @@
  98825. Lesser General Public License for more details.
  98826. You should have received a copy of the GNU Lesser General Public
  98827. - License along with the GNU C Library; if not, write to the Free
  98828. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98829. - 02111-1307 USA. */
  98830. + License along with the GNU C Library; if not, see
  98831. + <http://www.gnu.org/licenses/>. */
  98832. #include "thread_dbP.h"
  98833. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_dbsuspend.c uClibc-git/libpthread/nptl_db/td_thr_dbsuspend.c
  98834. --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_dbsuspend.c 2012-05-15 09:20:09.000000000 +0200
  98835. +++ uClibc-git/libpthread/nptl_db/td_thr_dbsuspend.c 2014-07-25 20:36:09.381348174 +0200
  98836. @@ -14,9 +14,8 @@
  98837. Lesser General Public License for more details.
  98838. You should have received a copy of the GNU Lesser General Public
  98839. - License along with the GNU C Library; if not, write to the Free
  98840. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98841. - 02111-1307 USA. */
  98842. + License along with the GNU C Library; if not, see
  98843. + <http://www.gnu.org/licenses/>. */
  98844. #include "thread_dbP.h"
  98845. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_event_enable.c uClibc-git/libpthread/nptl_db/td_thr_event_enable.c
  98846. --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_event_enable.c 2012-05-15 09:20:09.000000000 +0200
  98847. +++ uClibc-git/libpthread/nptl_db/td_thr_event_enable.c 2014-07-25 20:36:09.381348174 +0200
  98848. @@ -14,9 +14,8 @@
  98849. Lesser General Public License for more details.
  98850. You should have received a copy of the GNU Lesser General Public
  98851. - License along with the GNU C Library; if not, write to the Free
  98852. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98853. - 02111-1307 USA. */
  98854. + License along with the GNU C Library; if not, see
  98855. + <http://www.gnu.org/licenses/>. */
  98856. #include "thread_dbP.h"
  98857. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_event_getmsg.c uClibc-git/libpthread/nptl_db/td_thr_event_getmsg.c
  98858. --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_event_getmsg.c 2012-05-15 09:20:09.000000000 +0200
  98859. +++ uClibc-git/libpthread/nptl_db/td_thr_event_getmsg.c 2014-07-25 20:36:09.381348174 +0200
  98860. @@ -14,9 +14,8 @@
  98861. Lesser General Public License for more details.
  98862. You should have received a copy of the GNU Lesser General Public
  98863. - License along with the GNU C Library; if not, write to the Free
  98864. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98865. - 02111-1307 USA. */
  98866. + License along with the GNU C Library; if not, see
  98867. + <http://www.gnu.org/licenses/>. */
  98868. #include "thread_dbP.h"
  98869. #include <assert.h>
  98870. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_getfpregs.c uClibc-git/libpthread/nptl_db/td_thr_getfpregs.c
  98871. --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_getfpregs.c 2012-05-15 09:20:09.000000000 +0200
  98872. +++ uClibc-git/libpthread/nptl_db/td_thr_getfpregs.c 2014-07-25 20:36:09.381348174 +0200
  98873. @@ -14,9 +14,8 @@
  98874. Lesser General Public License for more details.
  98875. You should have received a copy of the GNU Lesser General Public
  98876. - License along with the GNU C Library; if not, write to the Free
  98877. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98878. - 02111-1307 USA. */
  98879. + License along with the GNU C Library; if not, see
  98880. + <http://www.gnu.org/licenses/>. */
  98881. #include "thread_dbP.h"
  98882. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_getgregs.c uClibc-git/libpthread/nptl_db/td_thr_getgregs.c
  98883. --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_getgregs.c 2012-05-15 09:20:09.000000000 +0200
  98884. +++ uClibc-git/libpthread/nptl_db/td_thr_getgregs.c 2014-07-25 20:36:09.381348174 +0200
  98885. @@ -14,9 +14,8 @@
  98886. Lesser General Public License for more details.
  98887. You should have received a copy of the GNU Lesser General Public
  98888. - License along with the GNU C Library; if not, write to the Free
  98889. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98890. - 02111-1307 USA. */
  98891. + License along with the GNU C Library; if not, see
  98892. + <http://www.gnu.org/licenses/>. */
  98893. #include "thread_dbP.h"
  98894. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_get_info.c uClibc-git/libpthread/nptl_db/td_thr_get_info.c
  98895. --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_get_info.c 2012-05-15 09:20:09.000000000 +0200
  98896. +++ uClibc-git/libpthread/nptl_db/td_thr_get_info.c 2014-07-25 20:36:09.381348174 +0200
  98897. @@ -14,9 +14,8 @@
  98898. Lesser General Public License for more details.
  98899. You should have received a copy of the GNU Lesser General Public
  98900. - License along with the GNU C Library; if not, write to the Free
  98901. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98902. - 02111-1307 USA. */
  98903. + License along with the GNU C Library; if not, see
  98904. + <http://www.gnu.org/licenses/>. */
  98905. #include <stddef.h>
  98906. #include <string.h>
  98907. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_getxregs.c uClibc-git/libpthread/nptl_db/td_thr_getxregs.c
  98908. --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_getxregs.c 2012-05-15 09:20:09.000000000 +0200
  98909. +++ uClibc-git/libpthread/nptl_db/td_thr_getxregs.c 2014-07-25 20:36:09.381348174 +0200
  98910. @@ -14,9 +14,8 @@
  98911. Lesser General Public License for more details.
  98912. You should have received a copy of the GNU Lesser General Public
  98913. - License along with the GNU C Library; if not, write to the Free
  98914. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98915. - 02111-1307 USA. */
  98916. + License along with the GNU C Library; if not, see
  98917. + <http://www.gnu.org/licenses/>. */
  98918. #include "thread_dbP.h"
  98919. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_getxregsize.c uClibc-git/libpthread/nptl_db/td_thr_getxregsize.c
  98920. --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_getxregsize.c 2012-05-15 09:20:09.000000000 +0200
  98921. +++ uClibc-git/libpthread/nptl_db/td_thr_getxregsize.c 2014-07-25 20:36:09.381348174 +0200
  98922. @@ -14,9 +14,8 @@
  98923. Lesser General Public License for more details.
  98924. You should have received a copy of the GNU Lesser General Public
  98925. - License along with the GNU C Library; if not, write to the Free
  98926. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98927. - 02111-1307 USA. */
  98928. + License along with the GNU C Library; if not, see
  98929. + <http://www.gnu.org/licenses/>. */
  98930. #include "thread_dbP.h"
  98931. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_set_event.c uClibc-git/libpthread/nptl_db/td_thr_set_event.c
  98932. --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_set_event.c 2012-05-15 09:20:09.000000000 +0200
  98933. +++ uClibc-git/libpthread/nptl_db/td_thr_set_event.c 2014-07-25 20:36:09.381348174 +0200
  98934. @@ -14,9 +14,8 @@
  98935. Lesser General Public License for more details.
  98936. You should have received a copy of the GNU Lesser General Public
  98937. - License along with the GNU C Library; if not, write to the Free
  98938. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98939. - 02111-1307 USA. */
  98940. + License along with the GNU C Library; if not, see
  98941. + <http://www.gnu.org/licenses/>. */
  98942. #include <stddef.h>
  98943. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_setfpregs.c uClibc-git/libpthread/nptl_db/td_thr_setfpregs.c
  98944. --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_setfpregs.c 2012-05-15 09:20:09.000000000 +0200
  98945. +++ uClibc-git/libpthread/nptl_db/td_thr_setfpregs.c 2014-07-25 20:36:09.381348174 +0200
  98946. @@ -14,9 +14,8 @@
  98947. Lesser General Public License for more details.
  98948. You should have received a copy of the GNU Lesser General Public
  98949. - License along with the GNU C Library; if not, write to the Free
  98950. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98951. - 02111-1307 USA. */
  98952. + License along with the GNU C Library; if not, see
  98953. + <http://www.gnu.org/licenses/>. */
  98954. #include "thread_dbP.h"
  98955. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_setgregs.c uClibc-git/libpthread/nptl_db/td_thr_setgregs.c
  98956. --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_setgregs.c 2012-05-15 09:20:09.000000000 +0200
  98957. +++ uClibc-git/libpthread/nptl_db/td_thr_setgregs.c 2014-07-25 20:36:09.381348174 +0200
  98958. @@ -14,9 +14,8 @@
  98959. Lesser General Public License for more details.
  98960. You should have received a copy of the GNU Lesser General Public
  98961. - License along with the GNU C Library; if not, write to the Free
  98962. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98963. - 02111-1307 USA. */
  98964. + License along with the GNU C Library; if not, see
  98965. + <http://www.gnu.org/licenses/>. */
  98966. #include "thread_dbP.h"
  98967. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_setprio.c uClibc-git/libpthread/nptl_db/td_thr_setprio.c
  98968. --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_setprio.c 2012-05-15 09:20:09.000000000 +0200
  98969. +++ uClibc-git/libpthread/nptl_db/td_thr_setprio.c 2014-07-25 20:36:09.381348174 +0200
  98970. @@ -14,9 +14,8 @@
  98971. Lesser General Public License for more details.
  98972. You should have received a copy of the GNU Lesser General Public
  98973. - License along with the GNU C Library; if not, write to the Free
  98974. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98975. - 02111-1307 USA. */
  98976. + License along with the GNU C Library; if not, see
  98977. + <http://www.gnu.org/licenses/>. */
  98978. #include "thread_dbP.h"
  98979. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_setsigpending.c uClibc-git/libpthread/nptl_db/td_thr_setsigpending.c
  98980. --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_setsigpending.c 2012-05-15 09:20:09.000000000 +0200
  98981. +++ uClibc-git/libpthread/nptl_db/td_thr_setsigpending.c 2014-07-25 20:36:09.385348195 +0200
  98982. @@ -14,9 +14,8 @@
  98983. Lesser General Public License for more details.
  98984. You should have received a copy of the GNU Lesser General Public
  98985. - License along with the GNU C Library; if not, write to the Free
  98986. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98987. - 02111-1307 USA. */
  98988. + License along with the GNU C Library; if not, see
  98989. + <http://www.gnu.org/licenses/>. */
  98990. #include "thread_dbP.h"
  98991. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_setxregs.c uClibc-git/libpthread/nptl_db/td_thr_setxregs.c
  98992. --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_setxregs.c 2012-05-15 09:20:09.000000000 +0200
  98993. +++ uClibc-git/libpthread/nptl_db/td_thr_setxregs.c 2014-07-25 20:36:09.385348195 +0200
  98994. @@ -14,9 +14,8 @@
  98995. Lesser General Public License for more details.
  98996. You should have received a copy of the GNU Lesser General Public
  98997. - License along with the GNU C Library; if not, write to the Free
  98998. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  98999. - 02111-1307 USA. */
  99000. + License along with the GNU C Library; if not, see
  99001. + <http://www.gnu.org/licenses/>. */
  99002. #include "thread_dbP.h"
  99003. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_sigsetmask.c uClibc-git/libpthread/nptl_db/td_thr_sigsetmask.c
  99004. --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_sigsetmask.c 2012-05-15 09:20:09.000000000 +0200
  99005. +++ uClibc-git/libpthread/nptl_db/td_thr_sigsetmask.c 2014-07-25 20:36:09.385348195 +0200
  99006. @@ -14,9 +14,8 @@
  99007. Lesser General Public License for more details.
  99008. You should have received a copy of the GNU Lesser General Public
  99009. - License along with the GNU C Library; if not, write to the Free
  99010. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  99011. - 02111-1307 USA. */
  99012. + License along with the GNU C Library; if not, see
  99013. + <http://www.gnu.org/licenses/>. */
  99014. #include "thread_dbP.h"
  99015. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_tlsbase.c uClibc-git/libpthread/nptl_db/td_thr_tlsbase.c
  99016. --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_tlsbase.c 2012-05-15 09:20:09.000000000 +0200
  99017. +++ uClibc-git/libpthread/nptl_db/td_thr_tlsbase.c 2014-07-25 20:36:09.385348195 +0200
  99018. @@ -13,9 +13,8 @@
  99019. Lesser General Public License for more details.
  99020. You should have received a copy of the GNU Lesser General Public
  99021. - License along with the GNU C Library; if not, write to the Free
  99022. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  99023. - 02111-1307 USA. */
  99024. + License along with the GNU C Library; if not, see
  99025. + <http://www.gnu.org/licenses/>. */
  99026. #include "thread_dbP.h"
  99027. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_tls_get_addr.c uClibc-git/libpthread/nptl_db/td_thr_tls_get_addr.c
  99028. --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_tls_get_addr.c 2012-05-15 09:20:09.000000000 +0200
  99029. +++ uClibc-git/libpthread/nptl_db/td_thr_tls_get_addr.c 2014-07-25 20:36:09.385348195 +0200
  99030. @@ -14,9 +14,8 @@
  99031. Lesser General Public License for more details.
  99032. You should have received a copy of the GNU Lesser General Public
  99033. - License along with the GNU C Library; if not, write to the Free
  99034. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  99035. - 02111-1307 USA. */
  99036. + License along with the GNU C Library; if not, see
  99037. + <http://www.gnu.org/licenses/>. */
  99038. #include <link.h>
  99039. #include "thread_dbP.h"
  99040. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_tsd.c uClibc-git/libpthread/nptl_db/td_thr_tsd.c
  99041. --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_tsd.c 2012-05-15 09:20:09.000000000 +0200
  99042. +++ uClibc-git/libpthread/nptl_db/td_thr_tsd.c 2014-07-25 20:36:09.385348195 +0200
  99043. @@ -14,9 +14,8 @@
  99044. Lesser General Public License for more details.
  99045. You should have received a copy of the GNU Lesser General Public
  99046. - License along with the GNU C Library; if not, write to the Free
  99047. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  99048. - 02111-1307 USA. */
  99049. + License along with the GNU C Library; if not, see
  99050. + <http://www.gnu.org/licenses/>. */
  99051. #include "thread_dbP.h"
  99052. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/td_thr_validate.c uClibc-git/libpthread/nptl_db/td_thr_validate.c
  99053. --- uClibc-0.9.33.2/libpthread/nptl_db/td_thr_validate.c 2012-05-15 09:20:09.000000000 +0200
  99054. +++ uClibc-git/libpthread/nptl_db/td_thr_validate.c 2014-07-25 20:36:09.385348195 +0200
  99055. @@ -14,9 +14,8 @@
  99056. Lesser General Public License for more details.
  99057. You should have received a copy of the GNU Lesser General Public
  99058. - License along with the GNU C Library; if not, write to the Free
  99059. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  99060. - 02111-1307 USA. */
  99061. + License along with the GNU C Library; if not, see
  99062. + <http://www.gnu.org/licenses/>. */
  99063. #include "thread_dbP.h"
  99064. #include <stdbool.h>
  99065. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/thread_db.h uClibc-git/libpthread/nptl_db/thread_db.h
  99066. --- uClibc-0.9.33.2/libpthread/nptl_db/thread_db.h 2012-05-15 09:20:09.000000000 +0200
  99067. +++ uClibc-git/libpthread/nptl_db/thread_db.h 2014-07-25 20:36:09.385348195 +0200
  99068. @@ -13,9 +13,8 @@
  99069. Lesser General Public License for more details.
  99070. You should have received a copy of the GNU Lesser General Public
  99071. - License along with the GNU C Library; if not, write to the Free
  99072. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  99073. - 02111-1307 USA. */
  99074. + License along with the GNU C Library; if not, see
  99075. + <http://www.gnu.org/licenses/>. */
  99076. #ifndef _THREAD_DB_H
  99077. #define _THREAD_DB_H 1
  99078. diff -Nur uClibc-0.9.33.2/libpthread/nptl_db/thread_dbP.h uClibc-git/libpthread/nptl_db/thread_dbP.h
  99079. --- uClibc-0.9.33.2/libpthread/nptl_db/thread_dbP.h 2012-05-15 09:20:09.000000000 +0200
  99080. +++ uClibc-git/libpthread/nptl_db/thread_dbP.h 2014-07-25 20:36:09.385348195 +0200
  99081. @@ -13,9 +13,8 @@
  99082. Lesser General Public License for more details.
  99083. You should have received a copy of the GNU Lesser General Public
  99084. - License along with the GNU C Library; if not, write to the Free
  99085. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  99086. - 02111-1307 USA. */
  99087. + License along with the GNU C Library; if not, see
  99088. + <http://www.gnu.org/licenses/>. */
  99089. #ifndef _THREAD_DBP_H
  99090. #define _THREAD_DBP_H 1
  99091. diff -Nur uClibc-0.9.33.2/libresolv/resolv.c uClibc-git/libresolv/resolv.c
  99092. --- uClibc-0.9.33.2/libresolv/resolv.c 2012-05-15 09:20:09.000000000 +0200
  99093. +++ uClibc-git/libresolv/resolv.c 2014-07-25 20:36:09.605349347 +0200
  99094. @@ -7,8 +7,6 @@
  99095. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  99096. */
  99097. -#include <features.h>
  99098. -
  99099. void __stub1(void);
  99100. void __stub1(void)
  99101. {
  99102. diff -Nur uClibc-0.9.33.2/librt/clock_getcpuclockid.c uClibc-git/librt/clock_getcpuclockid.c
  99103. --- uClibc-0.9.33.2/librt/clock_getcpuclockid.c 2012-05-15 09:20:09.000000000 +0200
  99104. +++ uClibc-git/librt/clock_getcpuclockid.c 2014-07-25 20:36:09.605349347 +0200
  99105. @@ -13,9 +13,8 @@
  99106. Lesser General Public License for more details.
  99107. You should have received a copy of the GNU Lesser General Public
  99108. - License along with the GNU C Library; if not, write to the Free
  99109. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  99110. - 02111-1307 USA. */
  99111. + License along with the GNU C Library; if not, see
  99112. + <http://www.gnu.org/licenses/>. */
  99113. #include <errno.h>
  99114. #include <time.h>
  99115. diff -Nur uClibc-0.9.33.2/librt/clock_gettime.c uClibc-git/librt/clock_gettime.c
  99116. --- uClibc-0.9.33.2/librt/clock_gettime.c 2012-05-15 09:20:09.000000000 +0200
  99117. +++ uClibc-git/librt/clock_gettime.c 2014-07-25 20:36:09.605349347 +0200
  99118. @@ -13,9 +13,8 @@
  99119. Lesser General Public License for more details.
  99120. You should have received a copy of the GNU Lesser General Public
  99121. - License along with the GNU C Library; if not, write to the Free
  99122. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  99123. - 02111-1307 USA. */
  99124. + License along with the GNU C Library; if not, see
  99125. + <http://www.gnu.org/licenses/>. */
  99126. #include <sysdep.h>
  99127. #include <errno.h>
  99128. @@ -186,7 +185,6 @@
  99129. #include <stdint.h>
  99130. #include <time.h>
  99131. #include <sys/time.h>
  99132. -#include <libc-internal.h>
  99133. #include <ldsodefs.h>
  99134. diff -Nur uClibc-0.9.33.2/librt/clock_nanosleep.c uClibc-git/librt/clock_nanosleep.c
  99135. --- uClibc-0.9.33.2/librt/clock_nanosleep.c 2012-05-15 09:20:09.000000000 +0200
  99136. +++ uClibc-git/librt/clock_nanosleep.c 2014-07-25 20:36:09.605349347 +0200
  99137. @@ -12,9 +12,8 @@
  99138. Lesser General Public License for more details.
  99139. You should have received a copy of the GNU Lesser General Public
  99140. - License along with the GNU C Library; if not, write to the Free
  99141. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  99142. - 02111-1307 USA. */
  99143. + License along with the GNU C Library; if not, see
  99144. + <http://www.gnu.org/licenses/>. */
  99145. #include <time.h>
  99146. #include <errno.h>
  99147. diff -Nur uClibc-0.9.33.2/librt/Makefile.in uClibc-git/librt/Makefile.in
  99148. --- uClibc-0.9.33.2/librt/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  99149. +++ uClibc-git/librt/Makefile.in 2014-07-25 20:36:09.605349347 +0200
  99150. @@ -28,11 +28,20 @@
  99151. ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
  99152. librt_filter_SRC += mq_notify.c timer_create.c timer_delete.c \
  99153. timer_getoverr.c timer_gettime.c timer_settime.c
  99154. +# these should really be guarded by ADVANCED_REALTIME, we use them in mq_send.c/mq_receive.c
  99155. librt_SSRC := $(wildcard $(librt_DIR)/*.S)
  99156. else
  99157. librt_filter_SRC += clock_nanosleep.c clock_getcpuclockid.c clock_gettime.c
  99158. librt_SSRC :=
  99159. endif
  99160. +
  99161. +librt_filter_SRC += $(if $(UCLIBC_HAS_ADVANCED_REALTIME),, \
  99162. + spawn.c \
  99163. + spawn_faction_addclose.c \
  99164. + spawn_faction_adddup2.c \
  99165. + spawn_faction_addopen.c \
  99166. + spawn_faction_init.c)
  99167. +
  99168. librt_SRC := $(filter-out $(librt_filter_SRC),$(librt_SRC))
  99169. librt_OBJ := $(patsubst %.c,$(librt_OUT)/%.o,$(librt_SRC))
  99170. diff -Nur uClibc-0.9.33.2/librt/mq_receive.c uClibc-git/librt/mq_receive.c
  99171. --- uClibc-0.9.33.2/librt/mq_receive.c 2012-05-15 09:20:09.000000000 +0200
  99172. +++ uClibc-git/librt/mq_receive.c 2014-07-25 20:36:09.605349347 +0200
  99173. @@ -10,13 +10,18 @@
  99174. #include <mqueue.h>
  99175. #ifdef __UCLIBC_HAS_THREADS_NATIVE__
  99176. +# ifndef __UCLIBC_HAS_ADVANCED_REALTIME__
  99177. +extern ssize_t mq_timedreceive(mqd_t mqdes, char *msg_ptr, size_t msg_len,
  99178. + unsigned int *msg_prio,
  99179. + const struct timespec *abs_timeout);
  99180. +# endif
  99181. librt_hidden_proto(mq_timedreceive)
  99182. #else
  99183. # define __NR___syscall_mq_timedreceive __NR_mq_timedreceive
  99184. static _syscall5(int, __syscall_mq_timedreceive, int, mqdes,
  99185. char *, msg_ptr, size_t, msg_len, unsigned int *,
  99186. - msg_prio, const void *, abs_timeout);
  99187. + msg_prio, const void *, abs_timeout)
  99188. # ifdef __UCLIBC_HAS_ADVANCED_REALTIME__
  99189. /*
  99190. diff -Nur uClibc-0.9.33.2/librt/mq_send.c uClibc-git/librt/mq_send.c
  99191. --- uClibc-0.9.33.2/librt/mq_send.c 2012-05-15 09:20:09.000000000 +0200
  99192. +++ uClibc-git/librt/mq_send.c 2014-07-25 20:36:09.605349347 +0200
  99193. @@ -10,13 +10,17 @@
  99194. #include <mqueue.h>
  99195. #ifdef __UCLIBC_HAS_THREADS_NATIVE__
  99196. +# ifndef __UCLIBC_HAS_ADVANCED_REALTIME__
  99197. +extern int mq_timedsend(mqd_t mqdes, const char *msg_ptr, size_t msg_len,
  99198. + unsigned int msg_prio, const struct timespec *abs_timeout);
  99199. +# endif
  99200. librt_hidden_proto(mq_timedsend)
  99201. #else
  99202. # define __NR___syscall_mq_timedsend __NR_mq_timedsend
  99203. static _syscall5(int, __syscall_mq_timedsend, int, mqdes,
  99204. const char *, msg_ptr, size_t, msg_len, unsigned int,
  99205. - msg_prio, const void *, abs_timeout);
  99206. + msg_prio, const void *, abs_timeout)
  99207. # ifdef __UCLIBC_HAS_ADVANCED_REALTIME__
  99208. /*
  99209. diff -Nur uClibc-0.9.33.2/librt/mq_timedreceive.S uClibc-git/librt/mq_timedreceive.S
  99210. --- uClibc-0.9.33.2/librt/mq_timedreceive.S 2012-05-15 09:20:09.000000000 +0200
  99211. +++ uClibc-git/librt/mq_timedreceive.S 2014-07-25 20:36:09.605349347 +0200
  99212. @@ -2,9 +2,7 @@
  99213. #ifndef __NR_mq_timedreceive
  99214. #error Missing definition of NR_timedreceive needed for cancellation.
  99215. #endif
  99216. -PSEUDO (__mq_timedreceive, mq_timedreceive, 5)
  99217. -ret
  99218. -PSEUDO_END(__mq_timedreceive)
  99219. -librt_hidden_def (__mq_timedreceive)
  99220. -weak_alias (__mq_timedreceive, mq_timedreceive)
  99221. -librt_hidden_weak (mq_timedreceive)
  99222. +PSEUDO(mq_timedreceive, mq_timedreceive, 5)
  99223. +ret_ERRVAL
  99224. +PSEUDO_END(mq_timedreceive)
  99225. +librt_hidden_def(mq_timedreceive)
  99226. diff -Nur uClibc-0.9.33.2/librt/mq_timedsend.S uClibc-git/librt/mq_timedsend.S
  99227. --- uClibc-0.9.33.2/librt/mq_timedsend.S 2012-05-15 09:20:09.000000000 +0200
  99228. +++ uClibc-git/librt/mq_timedsend.S 2014-07-25 20:36:09.605349347 +0200
  99229. @@ -2,9 +2,7 @@
  99230. #ifndef __NR_mq_timedsend
  99231. #error Missing definition of NR_timedsend needed for cancellation.
  99232. #endif
  99233. -PSEUDO (__mq_timedsend, mq_timedsend, 5)
  99234. -ret
  99235. -PSEUDO_END(__mq_timedsend)
  99236. -librt_hidden_def (__mq_timedsend)
  99237. -weak_alias (__mq_timedsend, mq_timedsend)
  99238. -librt_hidden_weak (mq_timedsend)
  99239. +PSEUDO(mq_timedsend, mq_timedsend, 5)
  99240. +ret_ERRVAL
  99241. +PSEUDO_END(mq_timedsend)
  99242. +librt_hidden_def(mq_timedsend)
  99243. diff -Nur uClibc-0.9.33.2/librt/spawn.c uClibc-git/librt/spawn.c
  99244. --- uClibc-0.9.33.2/librt/spawn.c 1970-01-01 01:00:00.000000000 +0100
  99245. +++ uClibc-git/librt/spawn.c 2014-07-25 20:36:09.605349347 +0200
  99246. @@ -0,0 +1,266 @@
  99247. +/* Copyright (C) 2000, 2011 Free Software Foundation, Inc.
  99248. + This file is part of the GNU C Library.
  99249. +
  99250. + The GNU C Library is free software; you can redistribute it and/or
  99251. + modify it under the terms of the GNU Lesser General Public
  99252. + License as published by the Free Software Foundation; either
  99253. + version 2.1 of the License, or (at your option) any later version.
  99254. +
  99255. + The GNU C Library is distributed in the hope that it will be useful,
  99256. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  99257. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  99258. + Lesser General Public License for more details.
  99259. +
  99260. + You should have received a copy of the GNU Lesser General Public
  99261. + License along with the GNU C Library; if not, see
  99262. + <http://www.gnu.org/licenses/>. */
  99263. +
  99264. +#include <errno.h>
  99265. +#include <alloca.h>
  99266. +#include <unistd.h>
  99267. +#include <signal.h>
  99268. +#include <stdbool.h>
  99269. +#include <fcntl.h>
  99270. +
  99271. +#include <sys/resource.h>
  99272. +#include <not-cancel.h>
  99273. +
  99274. +#include <spawn.h>
  99275. +#include "spawn_int.h"
  99276. +
  99277. +/* The Unix standard contains a long explanation of the way to signal
  99278. + an error after the fork() was successful. Since no new wait status
  99279. + was wanted there is no way to signal an error using one of the
  99280. + available methods. The committee chose to signal an error by a
  99281. + normal program exit with the exit code 127. */
  99282. +#define SPAWN_ERROR 127
  99283. +
  99284. +/* Execute file actions.
  99285. + * Returns true on error.
  99286. + */
  99287. +inline static bool execute_file_actions(const posix_spawn_file_actions_t *fa)
  99288. +{
  99289. + struct rlimit64 fdlimit;
  99290. + bool have_fdlimit = false;
  99291. + int cnt;
  99292. +
  99293. + for (cnt = 0; cnt < fa->__used; ++cnt) {
  99294. + struct __spawn_action *action = &fa->__actions[cnt];
  99295. +
  99296. + switch (action->tag) {
  99297. + case spawn_do_close:
  99298. + if (close_not_cancel(action->action.close_action.fd) != 0) {
  99299. + if (!have_fdlimit) {
  99300. + getrlimit64(RLIMIT_NOFILE, &fdlimit);
  99301. + have_fdlimit = true;
  99302. + }
  99303. +
  99304. + /* Only signal errors for file descriptors out of range. */
  99305. + if (0 > action->action.close_action.fd
  99306. + || action->action.close_action.fd >= fdlimit.rlim_cur)
  99307. + /* Signal the error. */
  99308. + return true;
  99309. + }
  99310. + break;
  99311. +
  99312. + case spawn_do_open:;
  99313. + int new_fd = open_not_cancel(action->action.open_action.path,
  99314. + action->action.open_action.oflag
  99315. + | O_LARGEFILE,
  99316. + action->action.open_action.mode);
  99317. +
  99318. + if (new_fd == -1)
  99319. + return true;
  99320. +
  99321. + /* Make sure the desired file descriptor is used. */
  99322. + if (new_fd != action->action.open_action.fd) {
  99323. + if (dup2(new_fd, action->action.open_action.fd)
  99324. + != action->action.open_action.fd)
  99325. + return true;
  99326. +
  99327. + if (close_not_cancel(new_fd) != 0)
  99328. + return true;
  99329. + }
  99330. + break;
  99331. +
  99332. + case spawn_do_dup2:
  99333. + if (dup2(action->action.dup2_action.fd,
  99334. + action->action.dup2_action.newfd)
  99335. + != action->action.dup2_action.newfd)
  99336. + return true;
  99337. + break;
  99338. + }
  99339. + }
  99340. +
  99341. + return false;
  99342. +}
  99343. +
  99344. +#define DANGEROUS (POSIX_SPAWN_SETSIGMASK \
  99345. + | POSIX_SPAWN_SETSIGDEF \
  99346. + | POSIX_SPAWN_SETSCHEDPARAM \
  99347. + | POSIX_SPAWN_SETSCHEDULER \
  99348. + | POSIX_SPAWN_SETPGROUP \
  99349. + | POSIX_SPAWN_RESETIDS)
  99350. +inline static bool is_vfork_safe(short int flags)
  99351. +{
  99352. + return ((flags & POSIX_SPAWN_USEVFORK) || !(flags & DANGEROUS));
  99353. +}
  99354. +
  99355. +
  99356. +/* Spawn a new process executing PATH with the attributes describes in *ATTRP.
  99357. + Before running the process perform the actions described in FILE-ACTIONS. */
  99358. +static int
  99359. +__spawni(pid_t *pid, const char *file,
  99360. + const posix_spawn_file_actions_t *fa,
  99361. + const posix_spawnattr_t *attrp, char *const argv[],
  99362. + char *const envp[], const char *path)
  99363. +{
  99364. + short int flags = attrp ? attrp->__flags : 0;
  99365. +
  99366. + pid_t new_pid;
  99367. + if (is_vfork_safe(flags) && !fa)
  99368. + new_pid = vfork();
  99369. + else {
  99370. +#ifdef __ARCH_USE_MMU__
  99371. + new_pid = fork();
  99372. +#else
  99373. + return ENOSYS;
  99374. +#endif
  99375. + }
  99376. +
  99377. + if (new_pid) {
  99378. + if (new_pid < 0)
  99379. + return errno;
  99380. +
  99381. + if (pid)
  99382. + *pid = new_pid;
  99383. +
  99384. + return 0;
  99385. + }
  99386. +
  99387. + if (flags & POSIX_SPAWN_SETSIGMASK) {
  99388. + if (sigprocmask(SIG_SETMASK, &attrp->__ss, NULL) != 0)
  99389. + goto error;
  99390. + }
  99391. +
  99392. + if (flags & POSIX_SPAWN_SETSIGDEF) {
  99393. + /* We have to iterate over all signals. This could possibly be
  99394. + done better but it requires system specific solutions since
  99395. + the sigset_t data type can be very different on different
  99396. + architectures. */
  99397. + struct sigaction sa;
  99398. + int sig;
  99399. +
  99400. + memset(&sa, 0, sizeof(sa));
  99401. + sa.sa_handler = SIG_DFL;
  99402. +
  99403. + for (sig = 1; sig <= _NSIG; ++sig) {
  99404. + if (sigismember(&attrp->__sd, sig)) {
  99405. + if (sigaction(sig, &sa, NULL) != 0)
  99406. + goto error;
  99407. + }
  99408. + }
  99409. + }
  99410. +
  99411. + if (flags & POSIX_SPAWN_SETSCHEDULER) {
  99412. + if (sched_setscheduler(0, attrp->__policy, &attrp->__sp) == -1)
  99413. + goto error;
  99414. + } else if (flags & POSIX_SPAWN_SETSCHEDPARAM) {
  99415. + if (sched_setparam(0, &attrp->__sp) == -1)
  99416. + goto error;
  99417. + }
  99418. +
  99419. + if (flags & POSIX_SPAWN_SETPGROUP) {
  99420. + if (setpgid(0, attrp->__pgrp) != 0)
  99421. + goto error;
  99422. + }
  99423. +
  99424. + if (flags & POSIX_SPAWN_RESETIDS) {
  99425. + if (seteuid(getuid()) || setegid(getgid()))
  99426. + goto error;
  99427. + }
  99428. +
  99429. + if (fa && execute_file_actions(fa))
  99430. + goto error;
  99431. +
  99432. + if (!path || strchr(file, '/')) {
  99433. + execve(file, argv, envp);
  99434. + goto error;
  99435. + }
  99436. +
  99437. +
  99438. + char *name;
  99439. + {
  99440. + size_t filelen = strlen(file) + 1;
  99441. + size_t pathlen = strlen(path) + 1;
  99442. + name = alloca(pathlen + filelen);
  99443. +
  99444. + /* Copy the file name at the top. */
  99445. + name = (char *) memcpy(name + pathlen, file, filelen);
  99446. +
  99447. + /* And add the slash. */
  99448. + *--name = '/';
  99449. + }
  99450. +
  99451. + char *p;
  99452. + do {
  99453. + char *startp;
  99454. + p = strchrnul(path, ':');
  99455. +
  99456. + /* Two adjacent colons, or a colon at the beginning or the end
  99457. + of `PATH' means to search the current directory. */
  99458. + if (p == path)
  99459. + startp = name + 1;
  99460. + else
  99461. + startp = (char *) memcpy(name - (p - path), path, p - path);
  99462. +
  99463. + execve(startp, argv, envp);
  99464. +
  99465. + switch (errno) {
  99466. + case EACCES:
  99467. + case ENOENT:
  99468. + case ESTALE:
  99469. + case ENOTDIR:
  99470. + /* Those errors indicate the file is missing or not
  99471. + executable by us, in which case we want to just try
  99472. + the next path directory. */
  99473. + break;
  99474. + default:
  99475. + /* Some other error means we found an executable file,
  99476. + but something went wrong executing it; return the
  99477. + error to our caller. */
  99478. + goto error;
  99479. + }
  99480. +
  99481. + path = p;
  99482. + } while (*p++ != '\0');
  99483. +
  99484. +error:
  99485. + _exit(SPAWN_ERROR);
  99486. +}
  99487. +
  99488. +/* Spawn a new process executing PATH with the attributes describes in *ATTRP.
  99489. + Before running the process perform the actions described in FILE-ACTIONS. */
  99490. +int posix_spawn (pid_t *pid, const char *path,
  99491. + const posix_spawn_file_actions_t *fa,
  99492. + const posix_spawnattr_t *attrp, char *const argv[],
  99493. + char *const envp[])
  99494. +{
  99495. + return __spawni(pid, path, fa, attrp, argv, envp, NULL);
  99496. +}
  99497. +
  99498. +/* Spawn a new process executing FILE with the attributes describes in *ATTRP.
  99499. + Before running the process perform the actions described in FILE-ACTIONS. */
  99500. +int
  99501. +posix_spawnp(pid_t *pid, const char *file,
  99502. + const posix_spawn_file_actions_t *fa,
  99503. + const posix_spawnattr_t *attrp, char *const argv[],
  99504. + char *const envp[])
  99505. +{
  99506. + const char *path = getenv("PATH");
  99507. +
  99508. + if (!path)
  99509. + path = ":/bin:/usr/bin";
  99510. +
  99511. + return __spawni(pid, file, fa, attrp, argv, envp, path);
  99512. +}
  99513. diff -Nur uClibc-0.9.33.2/librt/spawn_faction_addclose.c uClibc-git/librt/spawn_faction_addclose.c
  99514. --- uClibc-0.9.33.2/librt/spawn_faction_addclose.c 1970-01-01 01:00:00.000000000 +0100
  99515. +++ uClibc-git/librt/spawn_faction_addclose.c 2014-07-25 20:36:09.605349347 +0200
  99516. @@ -0,0 +1,51 @@
  99517. +/* Copyright (C) 2000 Free Software Foundation, Inc.
  99518. + This file is part of the GNU C Library.
  99519. +
  99520. + The GNU C Library is free software; you can redistribute it and/or
  99521. + modify it under the terms of the GNU Lesser General Public
  99522. + License as published by the Free Software Foundation; either
  99523. + version 2.1 of the License, or (at your option) any later version.
  99524. +
  99525. + The GNU C Library is distributed in the hope that it will be useful,
  99526. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  99527. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  99528. + Lesser General Public License for more details.
  99529. +
  99530. + You should have received a copy of the GNU Lesser General Public
  99531. + License along with the GNU C Library; if not, see
  99532. + <http://www.gnu.org/licenses/>. */
  99533. +
  99534. +#include <errno.h>
  99535. +#include <spawn.h>
  99536. +#include <unistd.h>
  99537. +
  99538. +#include "spawn_int.h"
  99539. +
  99540. +/* Add an action to FILE-ACTIONS which tells the implementation to call
  99541. + `close' for the given file descriptor during the `spawn' call. */
  99542. +int
  99543. +posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *file_actions,
  99544. + int fd)
  99545. +{
  99546. + int maxfd = sysconf(_SC_OPEN_MAX);
  99547. + struct __spawn_action *rec;
  99548. +
  99549. + /* Test for the validity of the file descriptor. */
  99550. + if (fd < 0 || fd >= maxfd)
  99551. + return EBADF;
  99552. +
  99553. + /* Allocate more memory if needed. */
  99554. + if (file_actions->__used == file_actions->__allocated
  99555. + && __posix_spawn_file_actions_realloc(file_actions) != 0)
  99556. + /* This can only mean we ran out of memory. */
  99557. + return ENOMEM;
  99558. +
  99559. + /* Add the new value. */
  99560. + rec = &file_actions->__actions[file_actions->__used];
  99561. + rec->tag = spawn_do_close;
  99562. + rec->action.open_action.fd = fd;
  99563. +
  99564. + /* Account for the new entry. */
  99565. + ++file_actions->__used;
  99566. + return 0;
  99567. +}
  99568. diff -Nur uClibc-0.9.33.2/librt/spawn_faction_adddup2.c uClibc-git/librt/spawn_faction_adddup2.c
  99569. --- uClibc-0.9.33.2/librt/spawn_faction_adddup2.c 1970-01-01 01:00:00.000000000 +0100
  99570. +++ uClibc-git/librt/spawn_faction_adddup2.c 2014-07-25 20:36:09.605349347 +0200
  99571. @@ -0,0 +1,52 @@
  99572. +/* Copyright (C) 2000 Free Software Foundation, Inc.
  99573. + This file is part of the GNU C Library.
  99574. +
  99575. + The GNU C Library is free software; you can redistribute it and/or
  99576. + modify it under the terms of the GNU Lesser General Public
  99577. + License as published by the Free Software Foundation; either
  99578. + version 2.1 of the License, or (at your option) any later version.
  99579. +
  99580. + The GNU C Library is distributed in the hope that it will be useful,
  99581. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  99582. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  99583. + Lesser General Public License for more details.
  99584. +
  99585. + You should have received a copy of the GNU Lesser General Public
  99586. + License along with the GNU C Library; if not, see
  99587. + <http://www.gnu.org/licenses/>. */
  99588. +
  99589. +#include <errno.h>
  99590. +#include <spawn.h>
  99591. +#include <unistd.h>
  99592. +
  99593. +#include "spawn_int.h"
  99594. +
  99595. +/* Add an action to FILE-ACTIONS which tells the implementation to call
  99596. + `dup2' for the given file descriptors during the `spawn' call. */
  99597. +int
  99598. +posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *file_actions,
  99599. + int fd, int newfd)
  99600. +{
  99601. + int maxfd = sysconf(_SC_OPEN_MAX);
  99602. + struct __spawn_action *rec;
  99603. +
  99604. + /* Test for the validity of the file descriptor. */
  99605. + if (fd < 0 || newfd < 0 || fd >= maxfd || newfd >= maxfd)
  99606. + return EBADF;
  99607. +
  99608. + /* Allocate more memory if needed. */
  99609. + if (file_actions->__used == file_actions->__allocated
  99610. + && __posix_spawn_file_actions_realloc (file_actions) != 0)
  99611. + /* This can only mean we ran out of memory. */
  99612. + return ENOMEM;
  99613. +
  99614. + /* Add the new value. */
  99615. + rec = &file_actions->__actions[file_actions->__used];
  99616. + rec->tag = spawn_do_dup2;
  99617. + rec->action.dup2_action.fd = fd;
  99618. + rec->action.dup2_action.newfd = newfd;
  99619. +
  99620. + /* Account for the new entry. */
  99621. + ++file_actions->__used;
  99622. + return 0;
  99623. +}
  99624. diff -Nur uClibc-0.9.33.2/librt/spawn_faction_addopen.c uClibc-git/librt/spawn_faction_addopen.c
  99625. --- uClibc-0.9.33.2/librt/spawn_faction_addopen.c 1970-01-01 01:00:00.000000000 +0100
  99626. +++ uClibc-git/librt/spawn_faction_addopen.c 2014-07-25 20:36:09.605349347 +0200
  99627. @@ -0,0 +1,55 @@
  99628. +/* Copyright (C) 2000 Free Software Foundation, Inc.
  99629. + This file is part of the GNU C Library.
  99630. +
  99631. + The GNU C Library is free software; you can redistribute it and/or
  99632. + modify it under the terms of the GNU Lesser General Public
  99633. + License as published by the Free Software Foundation; either
  99634. + version 2.1 of the License, or (at your option) any later version.
  99635. +
  99636. + The GNU C Library is distributed in the hope that it will be useful,
  99637. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  99638. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  99639. + Lesser General Public License for more details.
  99640. +
  99641. + You should have received a copy of the GNU Lesser General Public
  99642. + License along with the GNU C Library; if not, see
  99643. + <http://www.gnu.org/licenses/>. */
  99644. +
  99645. +#include <errno.h>
  99646. +#include <spawn.h>
  99647. +#include <unistd.h>
  99648. +
  99649. +#include "spawn_int.h"
  99650. +
  99651. +/* Add an action to FILE-ACTIONS which tells the implementation to call
  99652. + `open' for the given file during the `spawn' call. */
  99653. +int
  99654. +posix_spawn_file_actions_addopen(posix_spawn_file_actions_t *file_actions,
  99655. + int fd, const char *path, int oflag,
  99656. + mode_t mode)
  99657. +{
  99658. + int maxfd = sysconf(_SC_OPEN_MAX);
  99659. + struct __spawn_action *rec;
  99660. +
  99661. + /* Test for the validity of the file descriptor. */
  99662. + if (fd < 0 || fd >= maxfd)
  99663. + return EBADF;
  99664. +
  99665. + /* Allocate more memory if needed. */
  99666. + if (file_actions->__used == file_actions->__allocated
  99667. + && __posix_spawn_file_actions_realloc (file_actions) != 0)
  99668. + /* This can only mean we ran out of memory. */
  99669. + return ENOMEM;
  99670. +
  99671. + /* Add the new value. */
  99672. + rec = &file_actions->__actions[file_actions->__used];
  99673. + rec->tag = spawn_do_open;
  99674. + rec->action.open_action.fd = fd;
  99675. + rec->action.open_action.path = path;
  99676. + rec->action.open_action.oflag = oflag;
  99677. + rec->action.open_action.mode = mode;
  99678. +
  99679. + /* Account for the new entry. */
  99680. + ++file_actions->__used;
  99681. + return 0;
  99682. +}
  99683. diff -Nur uClibc-0.9.33.2/librt/spawn_faction_init.c uClibc-git/librt/spawn_faction_init.c
  99684. --- uClibc-0.9.33.2/librt/spawn_faction_init.c 1970-01-01 01:00:00.000000000 +0100
  99685. +++ uClibc-git/librt/spawn_faction_init.c 2014-07-25 20:36:09.605349347 +0200
  99686. @@ -0,0 +1,42 @@
  99687. +/* Copyright (C) 2000 Free Software Foundation, Inc.
  99688. + This file is part of the GNU C Library.
  99689. +
  99690. + The GNU C Library is free software; you can redistribute it and/or
  99691. + modify it under the terms of the GNU Lesser General Public
  99692. + License as published by the Free Software Foundation; either
  99693. + version 2.1 of the License, or (at your option) any later version.
  99694. +
  99695. + The GNU C Library is distributed in the hope that it will be useful,
  99696. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  99697. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  99698. + Lesser General Public License for more details.
  99699. +
  99700. + You should have received a copy of the GNU Lesser General Public
  99701. + License along with the GNU C Library; if not, see
  99702. + <http://www.gnu.org/licenses/>. */
  99703. +
  99704. +#include <errno.h>
  99705. +#include <spawn.h>
  99706. +#include <stdlib.h>
  99707. +#include <string.h>
  99708. +
  99709. +#include "spawn_int.h"
  99710. +
  99711. +
  99712. +/* Function used to increase the size of the allocated array. This
  99713. + function is called from the `add'-functions. */
  99714. +int
  99715. +__posix_spawn_file_actions_realloc(posix_spawn_file_actions_t *file_actions)
  99716. +{
  99717. + int newalloc = file_actions->__allocated + 8;
  99718. + void *newmem = realloc(file_actions->__actions,
  99719. + newalloc * sizeof(struct __spawn_action));
  99720. +
  99721. + if (newmem == NULL)
  99722. + /* Not enough memory. */
  99723. + return ENOMEM;
  99724. +
  99725. + file_actions->__actions = (struct __spawn_action *)newmem;
  99726. + file_actions->__allocated = newalloc;
  99727. + return 0;
  99728. +}
  99729. diff -Nur uClibc-0.9.33.2/librt/spawn_int.h uClibc-git/librt/spawn_int.h
  99730. --- uClibc-0.9.33.2/librt/spawn_int.h 1970-01-01 01:00:00.000000000 +0100
  99731. +++ uClibc-git/librt/spawn_int.h 2014-07-25 20:36:09.605349347 +0200
  99732. @@ -0,0 +1,35 @@
  99733. +/* Data structure to contain the action information. */
  99734. +struct __spawn_action {
  99735. + enum {
  99736. + spawn_do_close,
  99737. + spawn_do_dup2,
  99738. + spawn_do_open
  99739. + } tag;
  99740. +
  99741. + union {
  99742. + struct {
  99743. + int fd;
  99744. + } close_action;
  99745. + struct {
  99746. + int fd;
  99747. + int newfd;
  99748. + } dup2_action;
  99749. + struct {
  99750. + int fd;
  99751. + const char *path;
  99752. + int oflag;
  99753. + mode_t mode;
  99754. + } open_action;
  99755. + } action;
  99756. +};
  99757. +
  99758. +int __posix_spawn_file_actions_realloc(posix_spawn_file_actions_t *fa);
  99759. +
  99760. +/* handle !LFS */
  99761. +#ifndef __UCLIBC_HAS_LFS__
  99762. +# define rlimit64 rlimit
  99763. +# define getrlimit64 getrlimit
  99764. +#endif
  99765. +#ifndef O_LARGEFILE
  99766. +# define O_LARGEFILE 0
  99767. +#endif
  99768. diff -Nur uClibc-0.9.33.2/librt/timer_create.c uClibc-git/librt/timer_create.c
  99769. --- uClibc-0.9.33.2/librt/timer_create.c 2012-05-15 09:20:09.000000000 +0200
  99770. +++ uClibc-git/librt/timer_create.c 2014-07-25 20:36:09.605349347 +0200
  99771. @@ -2,6 +2,7 @@
  99772. * timer_create.c - create a per-process timer.
  99773. */
  99774. +#include <stddef.h>
  99775. #include <errno.h>
  99776. #include <signal.h>
  99777. #include <stdlib.h>
  99778. @@ -13,10 +14,6 @@
  99779. #ifdef __NR_timer_create
  99780. -#ifndef offsetof
  99781. -# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
  99782. -#endif
  99783. -
  99784. #define __NR___syscall_timer_create __NR_timer_create
  99785. static __inline__ _syscall3(int, __syscall_timer_create, clockid_t, clock_id,
  99786. struct sigevent *, evp, kernel_timer_t *, ktimerid);
  99787. diff -Nur uClibc-0.9.33.2/libubacktrace/arm/backtrace.c uClibc-git/libubacktrace/arm/backtrace.c
  99788. --- uClibc-0.9.33.2/libubacktrace/arm/backtrace.c 2012-05-15 09:20:09.000000000 +0200
  99789. +++ uClibc-git/libubacktrace/arm/backtrace.c 2014-07-25 20:36:09.949351149 +0200
  99790. @@ -12,6 +12,7 @@
  99791. *
  99792. */
  99793. +#include <libgcc_s.h>
  99794. #include <execinfo.h>
  99795. #include <dlfcn.h>
  99796. #include <stdlib.h>
  99797. @@ -25,6 +26,7 @@
  99798. int cnt, size;
  99799. };
  99800. +#ifdef SHARED
  99801. static _Unwind_Reason_Code (*unwind_backtrace) (_Unwind_Trace_Fn, void *);
  99802. static _Unwind_VRS_Result (*unwind_vrs_get) (_Unwind_Context *,
  99803. _Unwind_VRS_RegClass,
  99804. @@ -34,14 +36,18 @@
  99805. static void backtrace_init (void)
  99806. {
  99807. - void *handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
  99808. + void *handle = dlopen (LIBGCC_S_SO, RTLD_LAZY);
  99809. if (handle == NULL
  99810. || ((unwind_backtrace = dlsym (handle, "_Unwind_Backtrace")) == NULL)
  99811. || ((unwind_vrs_get = dlsym (handle, "_Unwind_VRS_Get")) == NULL)) {
  99812. - printf("libgcc_s.so.1 must be installed for backtrace to work\n");
  99813. + printf(LIBGCC_S_SO " must be installed for backtrace to work\n");
  99814. abort();
  99815. }
  99816. }
  99817. +#else
  99818. +# define unwind_backtrace _Unwind_Backtrace
  99819. +# define unwind_vrs_get _Unwind_VRS_Get
  99820. +#endif
  99821. /* This function is identical to "_Unwind_GetGR", except that it uses
  99822. "unwind_vrs_get" instead of "_Unwind_VRS_Get". */
  99823. static inline _Unwind_Word
  99824. @@ -62,7 +68,7 @@
  99825. {
  99826. struct trace_arg *arg = a;
  99827. - assert (unwind_getip != NULL);
  99828. + assert (unwind_getip(ctx) != NULL);
  99829. /* We are first called with address in the __backtrace function. Skip it. */
  99830. if (arg->cnt != -1)
  99831. @@ -80,8 +86,10 @@
  99832. {
  99833. struct trace_arg arg = { .array = array, .size = size, .cnt = -1 };
  99834. +#ifdef SHARED
  99835. if (unwind_backtrace == NULL)
  99836. backtrace_init();
  99837. +#endif
  99838. if (size >= 1)
  99839. unwind_backtrace (backtrace_helper, &arg);
  99840. diff -Nur uClibc-0.9.33.2/libubacktrace/arm/Makefile.arch uClibc-git/libubacktrace/arm/Makefile.arch
  99841. --- uClibc-0.9.33.2/libubacktrace/arm/Makefile.arch 2012-05-15 09:20:09.000000000 +0200
  99842. +++ uClibc-git/libubacktrace/arm/Makefile.arch 2014-07-25 20:36:09.829350520 +0200
  99843. @@ -14,4 +14,4 @@
  99844. else
  99845. libubacktrace-a-y+=$(libubacktrace_ARCH_OBJS)
  99846. endif
  99847. -libubacktrace-so-y+=$(libubacktrace_ARCH_OBJS:.o=.os)
  99848. +libubacktrace-so-y+=$(libubacktrace_ARCH_OBJS:.o=.oS)
  99849. diff -Nur uClibc-0.9.33.2/libubacktrace/backtrace.c uClibc-git/libubacktrace/backtrace.c
  99850. --- uClibc-0.9.33.2/libubacktrace/backtrace.c 2012-05-15 09:20:09.000000000 +0200
  99851. +++ uClibc-git/libubacktrace/backtrace.c 2014-07-25 20:36:09.949351149 +0200
  99852. @@ -20,6 +20,7 @@
  99853. *
  99854. */
  99855. +#include <libgcc_s.h>
  99856. #include <execinfo.h>
  99857. #include <dlfcn.h>
  99858. #include <stdlib.h>
  99859. @@ -33,20 +34,25 @@
  99860. int cnt, size;
  99861. };
  99862. +#ifdef SHARED
  99863. static _Unwind_Reason_Code (*unwind_backtrace) (_Unwind_Trace_Fn, void *);
  99864. static _Unwind_Ptr (*unwind_getip) (struct _Unwind_Context *);
  99865. static void backtrace_init (void)
  99866. {
  99867. - void *handle = dlopen ("libgcc_s.so.1", RTLD_LAZY);
  99868. + void *handle = dlopen (LIBGCC_S_SO, RTLD_LAZY);
  99869. if (handle == NULL
  99870. || ((unwind_backtrace = dlsym (handle, "_Unwind_Backtrace")) == NULL)
  99871. || ((unwind_getip = dlsym (handle, "_Unwind_GetIP")) == NULL)) {
  99872. - printf("libgcc_s.so.1 must be installed for backtrace to work\n");
  99873. + printf(LIBGCC_S_SO " must be installed for backtrace to work\n");
  99874. abort();
  99875. }
  99876. }
  99877. +#else
  99878. +# define unwind_backtrace _Unwind_Backtrace
  99879. +# define unwind_getip _Unwind_GetIP
  99880. +#endif
  99881. static _Unwind_Reason_Code
  99882. backtrace_helper (struct _Unwind_Context *ctx, void *a)
  99883. @@ -71,8 +77,10 @@
  99884. {
  99885. struct trace_arg arg = { .array = array, .size = size, .cnt = -1 };
  99886. +#ifdef SHARED
  99887. if (unwind_backtrace == NULL)
  99888. backtrace_init();
  99889. +#endif
  99890. if (size >= 1)
  99891. unwind_backtrace (backtrace_helper, &arg);
  99892. diff -Nur uClibc-0.9.33.2/libubacktrace/backtracesyms.c uClibc-git/libubacktrace/backtracesyms.c
  99893. --- uClibc-0.9.33.2/libubacktrace/backtracesyms.c 2012-05-15 09:20:09.000000000 +0200
  99894. +++ uClibc-git/libubacktrace/backtracesyms.c 2014-07-25 20:36:09.949351149 +0200
  99895. @@ -14,9 +14,8 @@
  99896. Lesser General Public License for more details.
  99897. You should have received a copy of the GNU Lesser General Public
  99898. - License along with the GNU C Library; if not, write to the Free
  99899. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  99900. - 02111-1307 USA.
  99901. + License along with the GNU C Library; see the file COPYING.LIB. If
  99902. + not, see <http://www.gnu.org/licenses/>.
  99903. Based on glibc/sysdeps/generic/elf/backtracesyms.c
  99904. diff -Nur uClibc-0.9.33.2/libubacktrace/backtracesymsfd.c uClibc-git/libubacktrace/backtracesymsfd.c
  99905. --- uClibc-0.9.33.2/libubacktrace/backtracesymsfd.c 2012-05-15 09:20:09.000000000 +0200
  99906. +++ uClibc-git/libubacktrace/backtracesymsfd.c 2014-07-25 20:36:09.949351149 +0200
  99907. @@ -14,9 +14,8 @@
  99908. Lesser General Public License for more details.
  99909. You should have received a copy of the GNU Lesser General Public
  99910. - License along with the GNU C Library; if not, write to the Free
  99911. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  99912. - 02111-1307 USA.
  99913. + License along with the GNU C Library; see the file COPYING.LIB. If
  99914. + not, see <http://www.gnu.org/licenses/>.
  99915. Based on glibc/sysdeps/generic/elf/backtracesymsfd.c
  99916. diff -Nur uClibc-0.9.33.2/libubacktrace/Makefile.in uClibc-git/libubacktrace/Makefile.in
  99917. --- uClibc-0.9.33.2/libubacktrace/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  99918. +++ uClibc-git/libubacktrace/Makefile.in 2014-07-25 20:36:09.829350520 +0200
  99919. @@ -25,11 +25,13 @@
  99920. -include $(libubacktrace_ARCH_DIR)/Makefile.arch
  99921. libubacktrace_SRC-y :=
  99922. -libubacktrace_SRC-$(UCLIBC_HAS_BACKTRACE) := backtrace.c backtracesyms.c backtracesymsfd.c
  99923. +libubacktrace_SRC-$(UCLIBC_HAS_BACKTRACE) := backtracesyms.c backtracesymsfd.c
  99924. +libubacktrace_SRC_SHARED-$(UCLIBC_HAS_BACKTRACE) := backtrace.c
  99925. # remove generic sources, if arch specific version is present
  99926. ifneq ($(strip $(libubacktrace_ARCH_SRC-y)),)
  99927. libubacktrace_SRC-y := $(filter-out $(notdir $(libubacktrace_ARCH_SRC-y)),$(libubacktrace_SRC-y))
  99928. +libubacktrace_SRC_SHARED-y := $(filter-out $(notdir $(libubacktrace_ARCH_SRC-y)),$(libubacktrace_SRC_SHARED-y))
  99929. endif
  99930. # -fasynchronous-unwind-tables is required for backtrace to work using dwarf2
  99931. @@ -43,12 +45,19 @@
  99932. libubacktrace_SRCS := $(patsubst %.c,$(libubacktrace_DIR)/%.c,$(libubacktrace_SRC-y))
  99933. libubacktrace_OBJS := $(patsubst $(libubacktrace_DIR)/%.c,$(libubacktrace_OUT)/%.o,$(libubacktrace_SRCS))
  99934. +libubacktrace_SHARED_SRCS := $(patsubst %.c,$(libubacktrace_DIR)/%.c,$(libubacktrace_SRC_SHARED-y))
  99935. +libubacktrace_SHARED_OBJS := $(patsubst $(libubacktrace_DIR)/%.c,$(libubacktrace_OUT)/%.o,$(libubacktrace_SHARED_SRCS))
  99936. +
  99937. +libubacktrace-shared-y := $(libubacktrace_SHARED_OBJS:.o=.oS)
  99938. +libubacktrace-static-y := $(libubacktrace_SHARED_OBJS)
  99939. +
  99940. ifeq ($(DOPIC),y)
  99941. -libubacktrace-a-y += $(libubacktrace_OBJS:.o=.os)
  99942. +libubacktrace-a-y += $(libubacktrace_OBJS:.o=.os) $(libubacktrace-static-y:.o=.os)
  99943. else
  99944. -libubacktrace-a-y += $(libubacktrace_OBJS)
  99945. +libubacktrace-a-y += $(libubacktrace_OBJS) $(libubacktrace-static-y)
  99946. endif
  99947. -libubacktrace-so-y += $(libubacktrace_OBJS:.o=.os)
  99948. +libubacktrace-so-y += $(libubacktrace_OBJS:.o=.os) $(libubacktrace-shared-y)
  99949. +
  99950. lib-a-$(UCLIBC_HAS_BACKTRACE) += $(top_builddir)lib/libubacktrace.a
  99951. lib-so-$(UCLIBC_HAS_BACKTRACE) += $(top_builddir)lib/libubacktrace.so
  99952. @@ -56,11 +65,7 @@
  99953. objclean-y += CLEAN_libubacktrace
  99954. ifeq ($(DOMULTI),n)
  99955. -ifeq ($(DOPIC),y)
  99956. -$(top_builddir)lib/libubacktrace.so: $(top_builddir)lib/libubacktrace.a $(libdl.depend)
  99957. -else
  99958. $(top_builddir)lib/libubacktrace.so: $(libubacktrace_OUT)/libubacktrace_so.a $(libdl.depend)
  99959. -endif
  99960. $(call link.so,$(libubacktrace_FULL_NAME),$(ABI_VERSION))
  99961. else
  99962. $(top_builddir)lib/libubacktrace.so: $(libubacktrace_OUT)/libubacktrace.oS | $(libdl.depend)
  99963. @@ -71,7 +76,7 @@
  99964. $(Q)$(RM) $@
  99965. $(do_ar)
  99966. -$(libubacktrace_OUT)/libubacktrace.oS: $(libubacktrace_SRCS) $(libubacktrace_ARCH_SRCS)
  99967. +$(libubacktrace_OUT)/libubacktrace.oS: $(libubacktrace_SRCS) $(libubacktrace_ARCH_SRCS) $(libubacktrace_SHARED_SRCS)
  99968. $(Q)$(RM) $@
  99969. $(compile-m)
  99970. diff -Nur uClibc-0.9.33.2/libutil/forkpty.c uClibc-git/libutil/forkpty.c
  99971. --- uClibc-0.9.33.2/libutil/forkpty.c 2012-05-15 09:20:09.000000000 +0200
  99972. +++ uClibc-git/libutil/forkpty.c 2014-07-25 20:36:09.949351149 +0200
  99973. @@ -13,9 +13,8 @@
  99974. Lesser General Public License for more details.
  99975. You should have received a copy of the GNU Lesser General Public
  99976. - License along with the GNU C Library; if not, write to the Free
  99977. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  99978. - 02111-1307 USA. */
  99979. + License along with the GNU C Library; if not, see
  99980. + <http://www.gnu.org/licenses/>. */
  99981. #include <sys/types.h>
  99982. #include <termios.h>
  99983. diff -Nur uClibc-0.9.33.2/libutil/logout.c uClibc-git/libutil/logout.c
  99984. --- uClibc-0.9.33.2/libutil/logout.c 2012-05-15 09:20:09.000000000 +0200
  99985. +++ uClibc-git/libutil/logout.c 2014-07-25 20:36:09.949351149 +0200
  99986. @@ -13,9 +13,8 @@
  99987. Lesser General Public License for more details.
  99988. You should have received a copy of the GNU Lesser General Public
  99989. - License along with the GNU C Library; if not, write to the Free
  99990. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  99991. - 02111-1307 USA. */
  99992. + License along with the GNU C Library; if not, see
  99993. + <http://www.gnu.org/licenses/>. */
  99994. #include <errno.h>
  99995. #include <string.h>
  99996. diff -Nur uClibc-0.9.33.2/libutil/openpty.c uClibc-git/libutil/openpty.c
  99997. --- uClibc-0.9.33.2/libutil/openpty.c 2012-05-15 09:20:09.000000000 +0200
  99998. +++ uClibc-git/libutil/openpty.c 2014-07-25 20:36:09.949351149 +0200
  99999. @@ -13,9 +13,8 @@
  100000. Lesser General Public License for more details.
  100001. You should have received a copy of the GNU Lesser General Public
  100002. - License along with the GNU C Library; if not, write to the Free
  100003. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  100004. - 02111-1307 USA. */
  100005. + License along with the GNU C Library; if not, see
  100006. + <http://www.gnu.org/licenses/>. */
  100007. #include <errno.h>
  100008. #include <fcntl.h>
  100009. diff -Nur uClibc-0.9.33.2/Makefile.help uClibc-git/Makefile.help
  100010. --- uClibc-0.9.33.2/Makefile.help 2012-05-15 09:20:09.000000000 +0200
  100011. +++ uClibc-git/Makefile.help 2014-07-25 20:36:04.409322131 +0200
  100012. @@ -27,6 +27,7 @@
  100013. @echo ' menuconfig - interactive curses-based configurator'
  100014. @echo ' oldconfig - resolve any unresolved symbols in .config'
  100015. @echo ' silentoldconfig - resolve any unresolved symbols in .config, silently'
  100016. + @echo ' savedefconfig - Save current config (minimal config)'
  100017. @echo ' randconfig - generate a random .config'
  100018. @$(if $(arch-defconfigs), \
  100019. @echo ''; \
  100020. @@ -58,7 +59,7 @@
  100021. @echo ' ARCH= - Use given arch for config targets'
  100022. @echo ' SHELL= - Shell to use for make'
  100023. @echo ' BUILD_CFLAGS= - extra CFLAGS for compiling host binaries'
  100024. - @echo ' BUILD_LFLAGS= - extra LDFLAGS for linking host binaries'
  100025. + @echo ' BUILD_LDFLAGS= - extra LDFLAGS for linking host binaries'
  100026. @echo ' CONFIG_SHELL= - Shell to use for menuconfig'
  100027. @echo
  100028. @echo ' PREFIX= - Prepended prefix'
  100029. diff -Nur uClibc-0.9.33.2/Makefile.in uClibc-git/Makefile.in
  100030. --- uClibc-0.9.33.2/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  100031. +++ uClibc-git/Makefile.in 2014-07-25 20:36:04.409322131 +0200
  100032. @@ -8,18 +8,8 @@
  100033. #--------------------------------------------------------------
  100034. # You shouldn't need to mess with anything beyond this point...
  100035. #--------------------------------------------------------------
  100036. -clean_targets := clean realclean distclean \
  100037. - objclean-y headers_clean-y CLEAN_utils
  100038. -noconfig_targets := menuconfig config oldconfig silentoldconfig randconfig \
  100039. - defconfig allyesconfig allnoconfig \
  100040. - release dist tags help
  100041. -
  100042. include $(top_srcdir)Rules.mak
  100043. sub_headers := headers
  100044. -ifndef KCONFIG_CONFIG
  100045. -KCONFIG_CONFIG := $(top_builddir).config
  100046. -endif
  100047. -export KCONFIG_CONFIG
  100048. ifeq ($(HAVE_DOT_CONFIG),y)
  100049. @@ -56,6 +46,7 @@
  100050. conf := $(top_builddir)extra/config/conf
  100051. mconf := $(top_builddir)extra/config/mconf
  100052. +nconf := $(top_builddir)extra/config/nconf
  100053. ifeq ($(HAVE_DOT_CONFIG),y)
  100054. # If the .config changes then we have to make sure that our includes are
  100055. @@ -63,9 +54,9 @@
  100056. # have uClibc_config.h as prerequisite but since we _symlink_ the headers
  100057. # and do not (?) want to rely on 'make -L' we better update them right here,
  100058. # on spot to save us from alot of hazzle.
  100059. -$(top_builddir)include/bits/uClibc_config.h: $(conf) $(KCONFIG_CONFIG) $(top_srcdir)extra/scripts/conf-header.sh | $(top_builddir)include/bits $(top_builddir)include/config
  100060. +$(top_builddir)include/bits/uClibc_config.h: $(conf) $(KCONFIG_CONFIG) $(top_srcdir)extra/scripts/conf-header.sh | $(top_builddir)include/bits
  100061. @$(disp_gen)
  100062. - $(Q)@$< -s $(top_srcdir)extra/Configs/Config.in
  100063. + $(Q)$< -s $(Kconfig)
  100064. $(Q)$(top_srcdir)extra/scripts/conf-header.sh $(KCONFIG_CONFIG) > $@
  100065. $(Q)$(MAKE) headers-y
  100066. @@ -76,6 +67,10 @@
  100067. $(top_builddir)include/config/linuxthreads/old.h $(top_builddir)include/config/linuxthreads/new.h:
  100068. @true
  100069. +$(top_builddir)include/generated/unifdef_config.h: $(top_builddir)include/bits/uClibc_config.h | $(top_builddir)include/generated
  100070. + @$(disp_gen)
  100071. + $(Q)$(SED) -e '1,3d' $^ > $@
  100072. +
  100073. # For the moment, we have to keep re-running this target
  100074. # because the fix includes scripts rely on pre-processers
  100075. # in order to generate the headers correctly :(. That
  100076. @@ -87,11 +82,21 @@
  100077. export header_extra_args = -n
  100078. endif
  100079. HEADERS_BITS_COMMON := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common/bits/*.h))
  100080. +ifneq ($(ARCH_HAS_DEPRECATED_SYSCALLS),y)
  100081. +HEADERS_BITS_COMMON_NO_LEGACY := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common-generic/bits/*.h))
  100082. +HEADERS_BITS_COMMON := $(filter-out $(HEADERS_BITS_COMMON_NO_LEGACY),$(HEADERS_BITS_COMMON))
  100083. +ALL_HEADERS_BITS_COMMON_NO_LEGACY := $(addprefix $(top_builddir)include/bits/,$(HEADERS_BITS_COMMON_NO_LEGACY))
  100084. +endif
  100085. +
  100086. HEADERS_BITS_ARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/*.h))
  100087. HEADERS_BITS_SUBARCH :=
  100088. ifneq ($(TARGET_SUBARCH),)
  100089. HEADERS_BITS_SUBARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/*.h))
  100090. endif
  100091. +ifneq ($(HEADERS_BITS_PTHREAD),)
  100092. +HEADERS_BITS_ARCH := $(filter-out $(HEADERS_BITS_PTHREAD),$(HEADERS_BITS_ARCH))
  100093. +HEADERS_BITS_SUBARCH:= $(filter-out $(HEADERS_BITS_PTHREAD),$(HEADERS_BITS_SUBARCH))
  100094. +endif
  100095. HEADERS_BITS_COMMON := $(filter-out $(HEADERS_BITS_ARCH) $(HEADERS_BITS_SUBARCH) $(HEADERS_BITS_PTHREAD),$(HEADERS_BITS_COMMON))
  100096. HEADERS_SYS_COMMON := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common/sys/*.h))
  100097. @@ -99,8 +104,11 @@
  100098. HEADERS_SYS_COMMON := $(filter-out $(HEADERS_SYS_ARCH),$(HEADERS_SYS_COMMON))
  100099. ALL_HEADERS_COMMON := $(top_builddir)include/fpu_control.h \
  100100. + $(top_builddir)include/jmpbuf-offsets.h \
  100101. + $(top_builddir)include/jmpbuf-unwind.h \
  100102. $(top_builddir)include/dl-osinfo.h \
  100103. - $(top_builddir)include/hp-timing.h
  100104. + $(top_builddir)include/hp-timing.h \
  100105. + $(top_builddir)include/not-cancel.h
  100106. ALL_HEADERS_BITS_COMMON := $(addprefix $(top_builddir)include/bits/,$(HEADERS_BITS_COMMON))
  100107. ALL_HEADERS_BITS_ARCH := $(addprefix $(top_builddir)include/bits/,$(HEADERS_BITS_ARCH))
  100108. ifneq ($(TARGET_SUBARCH),)
  100109. @@ -120,13 +128,17 @@
  100110. $(ALL_HEADERS_SYS_ARCH) \
  100111. $(ALL_HEADERS_BITS_PTHREAD)
  100112. -$(top_builddir)include/fpu_control.h:
  100113. +ifneq ($(ARCH_HAS_DEPRECATED_SYSCALLS),y)
  100114. + target-headers-sysdep += $(ALL_HEADERS_BITS_COMMON_NO_LEGACY)
  100115. +endif
  100116. +
  100117. +$(top_builddir)include/fpu_control.h $(top_builddir)include/jmpbuf-offsets.h $(top_builddir)include/jmpbuf-unwind.h:
  100118. @$(disp_ln)
  100119. $(Q)[ -r $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) ] && \
  100120. $(LN) -fs $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) $@ || \
  100121. $(LN) -fs $(call rel_srcdir)libc/sysdeps/linux/common/$(@F) $@
  100122. -$(top_builddir)include/dl-osinfo.h $(top_builddir)include/hp-timing.h:
  100123. +$(top_builddir)include/dl-osinfo.h $(top_builddir)include/hp-timing.h $(top_builddir)include/not-cancel.h:
  100124. $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/common/$(@F) $@
  100125. $(ALL_HEADERS_BITS_COMMON):
  100126. @@ -135,6 +147,11 @@
  100127. $(ALL_HEADERS_BITS_ARCH):
  100128. $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(@F) $@
  100129. +ifneq ($(ARCH_HAS_DEPRECATED_SYSCALLS),y)
  100130. +$(ALL_HEADERS_BITS_COMMON_NO_LEGACY):
  100131. + $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/common-generic/bits/$(@F) $@
  100132. +endif
  100133. +
  100134. ifneq ($(TARGET_SUBARCH),)
  100135. $(ALL_HEADERS_BITS_SUBARCH):
  100136. $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/$(@F) $@
  100137. @@ -155,6 +172,9 @@
  100138. HEADERCLEAN_common:
  100139. $(do_rm) $(ALL_HEADERS_COMMON)
  100140. headers_clean-y += HEADERCLEAN_common
  100141. +HEADERCLEAN_config:
  100142. + $(do_rm) -r $(addprefix $(top_builddir)include/,config generated)
  100143. +menuconfig-clean-y: HEADERCLEAN_config
  100144. # The headers. Arch specific headers are specified via ARCH_HEADERS in
  100145. # libc/sysdeps/linux/$(TARGET_ARCH)/Makefile.arch which appends those via
  100146. @@ -170,27 +190,22 @@
  100147. $(top_builddir)include/bits/sysnum.h: $(top_srcdir)extra/scripts/gen_bits_syscall_h.sh | $(top_builddir)include/bits
  100148. @$(disp_gen)
  100149. $(Q)set -e; \
  100150. - tmp=`mktemp $(top_builddir)include/bits/sysnum.h.XXXXXX 2>/dev/null || true`; \
  100151. - [ -z "$$tmp" ] && tmp='$(top_builddir)include/bits/sysnum.h.new'; \
  100152. - KERNEL_HEADERS="${KERNEL_HEADERS}" top_builddir="$(top_builddir)" CC="$(CC) $(CPU_CFLAGS)" $(SHELL) $< > $$tmp; \
  100153. - if cmp $(top_builddir)include/bits/sysnum.h $$tmp >/dev/null 2>&1; then \
  100154. - $(RM) $$tmp; \
  100155. - else \
  100156. - mv -f $$tmp $(top_builddir)include/bits/sysnum.h; \
  100157. - fi
  100158. + KERNEL_HEADERS="${KERNEL_HEADERS}" CC="$(CC) $(CPU_CFLAGS)" $(SHELL) $< > $@.new; \
  100159. + cmp -s $@ $@.new && $(RM) $@.new || mv -f $@.new $@
  100160. @# Ugly linux specific hack..
  100161. $(Q)if grep -q __NR_ $@; then true; else \
  100162. rm -f $@; \
  100163. echo "ERROR: Could not generate syscalls."; \
  100164. - echo "Make sure that you have proper kernel headers."; \
  100165. - echo "Your .config in KERNEL_HEADERS=\"\" was set to:"; \
  100166. + echo "Make sure that you have properly installed kernel headers."; \
  100167. + echo "Your .config KERNEL_HEADERS=\"\" was set to:"; \
  100168. echo "${KERNEL_HEADERS}"; \
  100169. exit 1; \
  100170. fi
  100171. .PHONY: $(LOCAL_INSTALL_PATH)
  100172. $(LOCAL_INSTALL_PATH):
  100173. - $(Q)$(MAKE) PREFIX=$(shell pwd)/$(LOCAL_INSTALL_PATH) RUNTIME_PREFIX=/ \
  100174. + $(Q)$(MAKE) PREFIX=$(LOCAL_INSTALL_PATH) \
  100175. + RUNTIME_PREFIX=/ \
  100176. DEVEL_PREFIX=/usr/ \
  100177. HOSTCC="$(HOSTCC)" \
  100178. install
  100179. @@ -210,21 +225,34 @@
  100180. # a "y" here means the feature is enabled and so we should *not* rm it.
  100181. # if the option expands to nothing though, we can punt the headers.
  100182. HEADERS_RM- := \
  100183. + config \
  100184. + generated \
  100185. + internal \
  100186. + cancel.h \
  100187. dl-osinfo.h \
  100188. + jmpbuf-offsets.h \
  100189. + jmpbuf-unwind.h \
  100190. hp-timing.h \
  100191. + not-cancel.h \
  100192. _lfs_64.h \
  100193. bits/uClibc_arch_features.h \
  100194. bits/kernel_sigaction.h \
  100195. bits/kernel_stat.h \
  100196. bits/kernel_types.h \
  100197. + bits/libc-lock.h \
  100198. + bits/stdio-lock.h \
  100199. bits/syscalls.h \
  100200. bits/syscalls-common.h \
  100201. bits/uClibc_fpmax.h \
  100202. + bits/uClibc_mutex.h \
  100203. + bits/uClibc_pthread.h \
  100204. bits/uClibc_uintmaxtostr.h \
  100205. bits/uClibc_uwchar.h \
  100206. bits/uClibc_va_copy.h \
  100207. bits/sigcontextinfo.h \
  100208. bits/stackinfo.h \
  100209. + atomic.h \
  100210. + bits/atomic.h \
  100211. tls.h \
  100212. rpc/des_crypt.h \
  100213. rpc/key_prot.h \
  100214. @@ -259,18 +287,23 @@
  100215. HEADERS_RM-$(UCLIBC_HAS_REGEX) += regex.h regexp.h
  100216. HEADERS_RM-$(UCLIBC_HAS_RPC) += rpc
  100217. HEADERS_RM-$(UCLIBC_HAS_SHADOW) += shadow.h
  100218. -HEADERS_RM-$(UCLIBC_HAS_SOCKET) += sys/socket.h bits/socket.h sys/socketvar.h
  100219. +HEADERS_RM-$(UCLIBC_HAS_SOCKET) += sys/socket.h bits/socket.h sys/socketvar.h bits/socket_type.h
  100220. HEADERS_RM-$(UCLIBC_HAS_SYSLOG) += syslog.h sys/syslog.h bits/syslog*.h
  100221. HEADERS_RM-$(UCLIBC_HAS_THREADS) += *thread*.h semaphore.h \
  100222. bits/*thread*.h \
  100223. bits/initspin.h
  100224. HEADERS_RM-$(UCLIBC_HAS_THREADS_NATIVE) += atomic.h bits/atomic.h
  100225. +HEADERS_RM-$(UCLIBC_HAS_OBSTACK) += obstack.h
  100226. HEADERS_RM-$(UCLIBC_HAS_UTMPX) += bits/utmpx.h utmpx.h
  100227. HEADERS_RM-$(UCLIBC_HAS_WCHAR) += wchar.h wctype.h
  100228. HEADERS_RM-$(UCLIBC_HAS_WORDEXP) += wordexp.h
  100229. HEADERS_RM-$(UCLIBC_HAS_XATTR) += sys/xattr.h
  100230. HEADERS_RM-$(UCLIBC_HAS_XLOCALE) += xlocale.h
  100231. -HEADERS_RM-$(UCLIBC_LINUX_SPECIFIC) += sys/eventfd.h sys/fsuid.h \
  100232. +HEADERS_RM-$(UCLIBC_LINUX_SPECIFIC) += \
  100233. + sys/cachectl.h \
  100234. + bits/eventfd.h \
  100235. + sys/eventfd.h \
  100236. + sys/fsuid.h \
  100237. bits/inotify.h \
  100238. sys/inotify.h \
  100239. sys/kdaemon.h \
  100240. @@ -288,11 +321,13 @@
  100241. sys/sysinfo.h \
  100242. bits/timerfd.h \
  100243. sys/timerfd.h \
  100244. + sys/sysmips.h \
  100245. sys/vfs.h
  100246. HEADERS_RM-$(UCLIBC_SUPPORT_AI_ADDRCONFIG) += ifaddrs.h
  100247. HEADERS_RM-$(UCLIBC_SV4_DEPRECATED) += ustat.h sys/ustat.h bits/ustat.h
  100248. HEADERS_RM-$(UCLIBC_SUSV3_LEGACY) += sys/timeb.h regexp.h
  100249. HEADERS_RM-$(UCLIBC_SUSV4_LEGACY) += utime.h ucontext.h
  100250. +HEADERS_RM-$(UCLIBC_HAS_ADVANCED_REALTIME) += spawn.h
  100251. ifneq ($(findstring install,$(MAKECMDGOALS)),)
  100252. $(addprefix $(PREFIX)$(DEVEL_PREFIX),include $(MULTILIB_DIR)):
  100253. @@ -303,7 +338,9 @@
  100254. $(do_mkdir)
  100255. endif
  100256. endif
  100257. -install_headers: headers $(top_builddir)extra/scripts/unifdef | $(PREFIX)$(DEVEL_PREFIX)include
  100258. +
  100259. +
  100260. +install_headers: headers $(top_builddir)extra/scripts/unifdef $(top_builddir)include/generated/unifdef_config.h | $(PREFIX)$(DEVEL_PREFIX)include
  100261. @$(call disp_install,"include -> $(PREFIX)$(DEVEL_PREFIX)include")
  100262. $(Q)top_builddir=$(top_builddir) \
  100263. $(top_srcdir)extra/scripts/install_headers.sh \
  100264. @@ -346,12 +383,7 @@
  100265. else
  100266. -$(INSTALL) -m 755 $(top_builddir)lib/libc.so $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/
  100267. endif
  100268. -ifeq ($(UCLIBC_HAS_BACKTRACE),y)
  100269. -# Add the AS_NEEDED entry for libubacktrace.so
  100270. - if [ -f $(top_builddir)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(SHARED_LIBNAME) ] ; then \
  100271. - echo "GROUP ( $(UBACKTRACE_ASNEEDED) )" >> $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so; \
  100272. - fi
  100273. -endif
  100274. + echo "$(UBACKTRACE_ASNEEDED)" >> $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so
  100275. ifeq ($(UCLIBC_HAS_THREADS),y)
  100276. ifneq ($(LINUXTHREADS_OLD),y)
  100277. ifeq ($(HARDWIRED_ABSPATH),y)
  100278. @@ -422,49 +454,55 @@
  100279. install_hostutils: hostutils
  100280. $(Q)$(MAKE) CROSS_COMPILE="$(CROSS_COMPILE)" CC="$(CC)" HOSTCC="$(HOSTCC)" DOTHOST=.host -C utils utils_install
  100281. -$(addprefix $(top_builddir),include include/bits include/sys include/config lib extra/config/lxdialog extra/locale extra/scripts $(subdirs)):
  100282. +$(addprefix $(top_builddir),include include/bits include/sys include/config include/generated lib extra/config/lxdialog extra/locale extra/scripts $(subdirs)):
  100283. $(do_mkdir)
  100284. # configuration
  100285. # ---------------------------------------------------------------------------
  100286. -$(conf) $(mconf): | $(top_builddir)include/config $(top_builddir)extra/config/lxdialog
  100287. +$(conf) $(mconf) $(nconf): | $(top_builddir)include/config $(top_builddir)include/generated $(top_builddir)extra/config/lxdialog
  100288. $(Q)$(MAKE) -C extra/config $(@F)
  100289. arch-defconfigs := $(notdir $(wildcard $(top_srcdir)extra/Configs/defconfigs/$(ARCH)/*_defconfig))
  100290. menuconfig: $(mconf)
  100291. - $(Q)$< extra/Configs/Config.in
  100292. -
  100293. + $(Q)$< $(Kconfig)
  100294. config: $(conf)
  100295. - $(Q)$< extra/Configs/Config.in
  100296. -
  100297. -oldconfig: $(conf)
  100298. - $(Q)$< -o extra/Configs/Config.in
  100299. + $(Q)$< $(Kconfig)
  100300. +nconfig: $(nconf)
  100301. + $(Q)$< $(Kconfig)
  100302. +oldaskconfig: $(conf)
  100303. + $(Q)$< -a $(Kconfig)
  100304. silentoldconfig: $(conf)
  100305. - $(Q)$< -s extra/Configs/Config.in
  100306. -
  100307. -randconfig: $(conf)
  100308. - $(Q)$< -r extra/Configs/Config.in
  100309. -
  100310. + $(Q)$< -s $(Kconfig)
  100311. +oldconfig: $(conf)
  100312. + $(Q)$< -o $(Kconfig)
  100313. +allnoconfig: $(conf)
  100314. + $(Q)$< -n $(Kconfig)
  100315. allyesconfig: $(conf)
  100316. - $(Q)$< -y extra/Configs/Config.in
  100317. + $(Q)$< -y $(Kconfig)
  100318. $(SED) -i -e "s/^DODEBUG=.*/# DODEBUG is not set/" \
  100319. -e "s/^DOASSERTS=.*/# DOASSERTS is not set/" \
  100320. -e "s/^SUPPORT_LD_DEBUG_EARLY=.*/# SUPPORT_LD_DEBUG_EARLY is not set/" \
  100321. -e "s/^SUPPORT_LD_DEBUG=.*/# SUPPORT_LD_DEBUG is not set/" \
  100322. -e "s/^UCLIBC_MJN3_ONLY=.*/# UCLIBC_MJN3_ONLY is not set/" \
  100323. $(KCONFIG_CONFIG)
  100324. - $(Q)$< -o extra/Configs/Config.in
  100325. -
  100326. -allnoconfig: $(conf)
  100327. - $(Q)$< -n extra/Configs/Config.in
  100328. -
  100329. -defconfig: $(conf)
  100330. - $(Q)$< -D extra/Configs/defconfigs/$(ARCH)/$@ extra/Configs/Config.in
  100331. + $(Q)$< -o $(Kconfig)
  100332. +alldefconfig: $(conf)
  100333. + $(Q)$< -A $(Kconfig)
  100334. +randconfig: $(conf)
  100335. + $(Q)$< -r $(Kconfig)
  100336. -%_defconfig: $(conf)
  100337. - $(Q)$< -D extra/Configs/defconfigs/$(ARCH)/$@ extra/Configs/Config.in
  100338. +cmd_defconfig = $(Q)$< -D extra/Configs/defconfigs/$(ARCH)/$@ $(Kconfig)
  100339. +defconfig: $(conf) ; $(cmd_defconfig)
  100340. +%_defconfig: $(conf) ; $(cmd_defconfig)
  100341. +
  100342. +savedefconfig: $(conf)
  100343. + $(Q)$< -S defconfig $(Kconfig)
  100344. +listnewconfig: $(conf)
  100345. + $(Q)$< -l $(Kconfig)
  100346. +olddefconfig: $(conf)
  100347. + $(Q)$< -d $(Kconfig)
  100348. menuconfig-clean-y:
  100349. $(Q)$(MAKE) -C extra/config CLEAN_extra/config
  100350. @@ -484,11 +522,11 @@
  100351. $(Q)$(RM) $(top_builddir)extra/scripts/unifdef
  100352. $(Q)$(RM) -r $(LOCAL_INSTALL_PATH)
  100353. -distclean: clean
  100354. +distclean: realclean
  100355. -find . \( -name core -o -name \*.orig -o -name \*~ -o -name .\*.dep \) -exec $(RM) {} \;
  100356. $(RM) $(top_builddir).config $(top_builddir).config.old $(top_builddir).config.cmd
  100357. - $(RM) $(top_builddir)extra/locale/*.tgz
  100358. - $(MAKE) -C extra/config distclean
  100359. + $(Q)$(RM) $(top_builddir)extra/locale/*.tgz
  100360. + @$(MAKE) -C extra/config distclean
  100361. dist release:
  100362. $(RM) ../uClibc-$(VERSION).tar
  100363. @@ -499,7 +537,9 @@
  100364. du -b ../uClibc-$(VERSION).tar.{bz2,xz}
  100365. test check: test_compile
  100366. - $(Q)$(MAKE) -C test
  100367. + $(Q)$(MAKE) -C test \
  100368. + $(if $(O),top_builddir=$(O)/)
  100369. test_compile: $(LOCAL_INSTALL_PATH)
  100370. - $(Q)$(MAKE) -C test compile
  100371. + $(Q)$(MAKE) -C test compile \
  100372. + $(if $(O),top_builddir=$(O)/)
  100373. diff -Nur uClibc-0.9.33.2/Makerules uClibc-git/Makerules
  100374. --- uClibc-0.9.33.2/Makerules 2012-05-15 09:20:09.000000000 +0200
  100375. +++ uClibc-git/Makerules 2014-07-25 20:36:04.409322131 +0200
  100376. @@ -50,6 +50,10 @@
  100377. endif
  100378. $(shared_objs) $(ar_objs): | $(sub_headers)
  100379. +define objects_with_syms
  100380. + $(foreach o,$(2),$(if $(shell $(NM) $(1) $(o) | grep .),$(o)))
  100381. +endef
  100382. +
  100383. headers-y: $(headers-y)
  100384. @true
  100385. @@ -243,7 +247,7 @@
  100386. cmd_compile-m = $(CC) $^ -c -o $@ $(CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(notdir $(@D))) $(CFLAGS-$(notdir $@)) $(sort $(foreach d,$(^:$(top_srcdir)=),$(collect_multi_flags)))
  100387. cmd_strip = $(STRIPTOOL) $(STRIP_FLAGS) $^
  100388. cmd_t_strip = $(STRIPTOOL) $(STRIP_FLAGS) $@
  100389. -cmd_ar = $(AR) $(ARFLAGS) $@ $^
  100390. +cmd_ar = $(AR) $(ARFLAGS) $@ $(call objects_with_syms,,$^)
  100391. define do_ln
  100392. @$(disp_ln)
  100393. @@ -300,7 +304,7 @@
  100394. -Wl,-z,relro -Wl,--hash-style=gnu -Wl,-z,defs \
  100395. -Wl,--verbose 2>&1 | LC_ALL=C \
  100396. sed -e '/^=========/,/^=========/!d;/^=========/d' \
  100397. - -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' > $@.lds
  100398. + -e 's/\. = .* + SIZEOF_HEADERS;/& $(SYMBOL_PREFIX)_begin = . - SIZEOF_HEADERS;/' > $@.lds
  100399. endef
  100400. define link.so
  100401. @@ -373,14 +377,9 @@
  100402. $(top_builddir)lib/interp.c: | $(top_builddir)lib
  100403. $(Q)echo "/* Force shared libraries to know about the correct library loader */" > $@.tmp
  100404. $(Q)echo "#include <features.h>" >> $@.tmp
  100405. -ifeq ($(HARDWIRED_ABSPATH),y)
  100406. $(Q)echo "const char __dl_ldso__[] attribute_hidden __attribute__ ((weak)) __attribute__ ((section " \
  100407. "(\".interp\"))) =\""$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(UCLIBC_LDSO)"\";" >> $@.tmp
  100408. $(Q)$(SED) -i -e 's://:/:g' $@.tmp
  100409. -else
  100410. - $(Q)echo "const char __dl_ldso__[] attribute_hidden __attribute__ ((weak)) __attribute__ ((section " \
  100411. - "(\".interp\"))) =\""$(UCLIBC_LDSO)"\";" >> $@.tmp
  100412. -endif
  100413. $(Q)mv $@.tmp $@
  100414. $(interp): $(top_builddir)lib/interp.c | $(sub_headers)
  100415. @@ -470,6 +469,8 @@
  100416. $(libm-a-y) $(libm-so-y) \
  100417. $(libpthread-a-y) $(libpthread-so-y) $(libpthread-nonshared-y) \
  100418. $(libthread_db-a-y) $(libthread_db-so-y) $(libpthread-generated-y) \
  100419. + $(START_FILE-libpthread.so) $(END_FILE-libpthread.so) \
  100420. + $(PTHREAD_INITFINI:.c=.s) \
  100421. $(librt-a-y) $(librt-so-y) $(libresolv-a-y) $(libresolv-so-y) \
  100422. $(libcrypt-a-y) $(libcrypt-so-y) $(libutil-a-y) $(libutil-so-y) \
  100423. $(libnsl-a-y) $(libnsl-so-y) $(ldso-y) $(libdl-a-y) $(libdl-so-y) \
  100424. diff -Nur uClibc-0.9.33.2/Rules.mak uClibc-git/Rules.mak
  100425. --- uClibc-0.9.33.2/Rules.mak 2012-05-15 09:20:09.000000000 +0200
  100426. +++ uClibc-git/Rules.mak 2014-07-25 20:36:04.409322131 +0200
  100427. @@ -27,6 +27,15 @@
  100428. # file named ".config". Don't mess with this file unless
  100429. # you know what you are doing.
  100430. +clean_targets := clean realclean distclean \
  100431. + objclean-y headers_clean-y CLEAN_utils
  100432. +noconfig_targets := menuconfig config nconfig \
  100433. + oldaskconfig silentoldconfig oldconfig allnoconfig allyesconfig \
  100434. + alldefconfig randconfig defconfig savedefconfig listnewconfig \
  100435. + olddefconfig \
  100436. + xconfig gconfig update-po-config mconf qconf gconf nconf conf \
  100437. + release dist tags help
  100438. +
  100439. #-----------------------------------------------------------
  100440. # If you are running a cross compiler, you will want to set
  100441. @@ -63,7 +72,7 @@
  100442. # Select the compiler needed to build binaries for your development system
  100443. HOSTCC = gcc
  100444. -BUILD_CFLAGS = -Os -Wall
  100445. +BUILD_CFLAGS = -Os
  100446. #---------------------------------------------------------
  100447. # Nothing beyond this point should ever be touched by mere
  100448. @@ -74,10 +83,25 @@
  100449. qstrip = $(strip $(subst ",,$(1)))
  100450. #"))
  100451. +# kconfig stuff
  100452. +KCONFIG_CONFIG ?= $(top_builddir).config
  100453. +KCONFIG_CONFIG := $(abspath $(KCONFIG_CONFIG))
  100454. +export KCONFIG_CONFIG
  100455. +KCONFIG_AUTOCONFIG := $(dir $(KCONFIG_CONFIG))include/config/auto.conf
  100456. +export KCONFIG_AUTOCONFIG
  100457. +KCONFIG_TRISTATE := $(dir $(KCONFIG_CONFIG))include/config/tristate.conf
  100458. +export KCONFIG_TRISTATE
  100459. +srctree := $(abspath $(top_srcdir))
  100460. +export srctree
  100461. +KCONFIG_AUTOHEADER := $(dir $(KCONFIG_CONFIG))include/generated/autoconf.h
  100462. +export KCONFIG_AUTOHEADER
  100463. +Kconfig := $(abspath $(top_srcdir)extra/Configs/Config.in)
  100464. +
  100465. # Pull in the user's uClibc configuration
  100466. -ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
  100467. --include $(top_builddir).config
  100468. +ifeq ($(filter $(noconfig_targets) clean CLEAN_%,$(MAKECMDGOALS)),)
  100469. +-include $(KCONFIG_CONFIG)
  100470. endif
  100471. +
  100472. TARGET_ARCH:=$(call qstrip,$(TARGET_ARCH))
  100473. ifeq ($(TARGET_ARCH),)
  100474. ARCH ?= $(shell uname -m | $(SED) -e s/i.86/i386/ \
  100475. @@ -93,19 +117,20 @@
  100476. export ARCH
  100477. # Make certain these contain a final "/", but no "//"s.
  100478. -TARGET_SUBARCH:=$(call qstrip,$(TARGET_SUBARCH))
  100479. -RUNTIME_PREFIX:=$(strip $(subst //,/, $(subst ,/, $(call qstrip,$(RUNTIME_PREFIX)))))
  100480. -DEVEL_PREFIX:=$(strip $(subst //,/, $(subst ,/, $(call qstrip,$(DEVEL_PREFIX)))))
  100481. -MULTILIB_DIR:=$(strip $(subst //,/, $(subst ,/, $(call qstrip,$(MULTILIB_DIR)))))
  100482. -KERNEL_HEADERS:=$(strip $(subst //,/, $(subst ,/, $(call qstrip,$(KERNEL_HEADERS)))))
  100483. +scrub_path = $(strip $(subst //,/, $(subst ,/, $(call qstrip,$(1)))))
  100484. +TARGET_SUBARCH := $(call qstrip,$(TARGET_SUBARCH))
  100485. +RUNTIME_PREFIX := $(call scrub_path,$(RUNTIME_PREFIX))
  100486. +DEVEL_PREFIX := $(call scrub_path,$(DEVEL_PREFIX))
  100487. +MULTILIB_DIR := $(call scrub_path,$(MULTILIB_DIR))
  100488. +KERNEL_HEADERS := $(call scrub_path,$(KERNEL_HEADERS))
  100489. export RUNTIME_PREFIX DEVEL_PREFIX KERNEL_HEADERS MULTILIB_DIR
  100490. # Now config hard core
  100491. MAJOR_VERSION := 0
  100492. MINOR_VERSION := 9
  100493. -SUBLEVEL := 33
  100494. -EXTRAVERSION :=.2
  100495. +SUBLEVEL := 34
  100496. +EXTRAVERSION :=-git
  100497. VERSION := $(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL)
  100498. ABI_VERSION := $(MAJOR_VERSION)
  100499. ifneq ($(EXTRAVERSION),)
  100500. @@ -118,13 +143,19 @@
  100501. LIBC := libc
  100502. SHARED_LIBNAME := $(LIBC).so.$(ABI_VERSION)
  100503. UBACKTRACE_DSO := libubacktrace.so.$(ABI_VERSION)
  100504. -ifneq ($(findstring $(TARGET_ARCH) , hppa64 ia64 mips64 powerpc64 s390x sparc64 x86_64 ),)
  100505. +
  100506. +UCLIBC_LDSO_NAME := ld-uClibc
  100507. +ARCH_NATIVE_BIT := 32
  100508. +ifneq ($(findstring $(TARGET_ARCH) , hppa64 ia64 powerpc64 s390x sparc64 x86_64 ),)
  100509. UCLIBC_LDSO_NAME := ld64-uClibc
  100510. ARCH_NATIVE_BIT := 64
  100511. else
  100512. -UCLIBC_LDSO_NAME := ld-uClibc
  100513. -ARCH_NATIVE_BIT := 32
  100514. +ifeq ($(CONFIG_MIPS_N64_ABI),y)
  100515. +UCLIBC_LDSO_NAME := ld64-uClibc
  100516. +ARCH_NATIVE_BIT := 64
  100517. +endif
  100518. endif
  100519. +
  100520. UCLIBC_LDSO := $(UCLIBC_LDSO_NAME).so.$(ABI_VERSION)
  100521. NONSHARED_LIBNAME := uclibc_nonshared.a
  100522. libc := $(top_builddir)lib/$(SHARED_LIBNAME)
  100523. @@ -170,7 +201,7 @@
  100524. if $(CC) -Wa,$(1) -Wa,-Z -c -o /dev/null -xassembler /dev/null > /dev/null 2>&1; \
  100525. then echo "-Wa,$(1)"; fi)
  100526. check_ld=$(shell \
  100527. - if $(LD) $(1) -o /dev/null -b binary /dev/null > /dev/null 2>&1; \
  100528. + if $(CC) $(LDFLAG-fuse-ld) -Wl,$(1) $(CFLAG_-nostdlib) -o /dev/null -Wl,-b,binary /dev/null > /dev/null 2>&1; \
  100529. then echo "$(1)"; fi)
  100530. # Use variable indirection here so that we can have variable
  100531. @@ -221,6 +252,10 @@
  100532. ARFLAGS:=cr
  100533. +# Note: The check for -nostdlib has to be before all calls to check_ld
  100534. +$(eval $(call check-gcc-var,-nostdlib))
  100535. +LDFLAG-fuse-ld := $(filter -fuse-ld=%,$(EXTRA_UCLIBC_FLAGS))
  100536. +# deliberately not named CFLAG-fuse-ld since unchecked and from user
  100537. # Flags in OPTIMIZATION are used only for non-debug builds
  100538. @@ -246,6 +281,7 @@
  100539. GCC_MAJOR_VER ?= $(word 1,$(GCC_VER))
  100540. #GCC_MINOR_VER ?= $(word 2,$(GCC_VER))
  100541. +ifneq ($(TARGET_ARCH),arc)
  100542. ifeq ($(GCC_MAJOR_VER),4)
  100543. # shrinks code, results are from 4.0.2
  100544. # 0.36%
  100545. @@ -258,7 +294,7 @@
  100546. $(eval $(call check-gcc-var,-fno-strength-reduce))
  100547. OPTIMIZATION += $(CFLAG_-fno-strength-reduce)
  100548. endif
  100549. -
  100550. +endif
  100551. # CPU_CFLAGS-y contain options which are not warnings,
  100552. # not include or library paths, and not optimizations.
  100553. @@ -311,7 +347,9 @@
  100554. $(eval $(call check-gcc-var,-fomit-frame-pointer))
  100555. OPTIMIZATION += $(CFLAG_-fomit-frame-pointer)
  100556. -ifeq ($(CONFIG_386)$(CONFIG_486)$(CONFIG_586)$(CONFIG_586MMX),y)
  100557. +ifeq ($(CONFIG_386)$(CONFIG_486)$(CONFIG_586),y)
  100558. + # TODO: Change this to a gcc version check. This bug
  100559. + # should be fixed with at least gcc-4.3.
  100560. # Non-SSE capable processor.
  100561. # NB: this may make SSE insns segfault!
  100562. # -O1 -march=pentium3, -Os -msse etc are known to be affected.
  100563. @@ -330,18 +368,6 @@
  100564. # -falign-jumps: reachable only by a jump
  100565. # Generic: no alignment at all (smallest code)
  100566. GCC_FALIGN=$(call check_gcc,-falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1,-malign-jumps=1 -malign-loops=1)
  100567. -ifeq ($(CONFIG_K7),y)
  100568. - # Align functions to four bytes, use default for jumps and loops (why?)
  100569. - GCC_FALIGN=$(call check_gcc,-falign-functions=4 -falign-labels=1,-malign-functions=4)
  100570. -endif
  100571. -ifeq ($(CONFIG_CRUSOE),y)
  100572. - # Use compiler's default for functions, jumps and loops (why?)
  100573. - GCC_FALIGN=$(call check_gcc,-falign-functions=0 -falign-labels=1,-malign-functions=0)
  100574. -endif
  100575. -ifeq ($(CONFIG_CYRIXIII),y)
  100576. - # Use compiler's default for functions, jumps and loops (why?)
  100577. - GCC_FALIGN=$(call check_gcc,-falign-functions=0 -falign-labels=1,-malign-functions=0)
  100578. -endif
  100579. OPTIMIZATION+=$(GCC_FALIGN)
  100580. # Putting each function and data object into its own section
  100581. @@ -366,22 +392,6 @@
  100582. CPU_LDFLAGS-y+=-m32
  100583. CPU_CFLAGS-y+=-m32
  100584. - CPU_CFLAGS-$(CONFIG_386)+=-march=i386
  100585. - CPU_CFLAGS-$(CONFIG_486)+=-march=i486
  100586. - CPU_CFLAGS-$(CONFIG_ELAN)+=-march=i486
  100587. - CPU_CFLAGS-$(CONFIG_586)+=-march=i586
  100588. - CPU_CFLAGS-$(CONFIG_586MMX)+=$(call check_gcc,-march=pentium-mmx,-march=i586)
  100589. - CPU_CFLAGS-$(CONFIG_686)+=-march=i686
  100590. - CPU_CFLAGS-$(CONFIG_PENTIUMII)+=$(call check_gcc,-march=pentium2,-march=i686)
  100591. - CPU_CFLAGS-$(CONFIG_PENTIUMIII)+=$(call check_gcc,-march=pentium3,-march=i686)
  100592. - CPU_CFLAGS-$(CONFIG_PENTIUM4)+=$(call check_gcc,-march=pentium4,-march=i686)
  100593. - CPU_CFLAGS-$(CONFIG_K6)+=$(call check_gcc,-march=k6,-march=i586)
  100594. - CPU_CFLAGS-$(CONFIG_K7)+=$(call check_gcc,-march=athlon,-march=i686)
  100595. - CPU_CFLAGS-$(CONFIG_CRUSOE)+=-march=i686
  100596. - CPU_CFLAGS-$(CONFIG_WINCHIPC6)+=$(call check_gcc,-march=winchip-c6,-march=i586)
  100597. - CPU_CFLAGS-$(CONFIG_WINCHIP2)+=$(call check_gcc,-march=winchip2,-march=i586)
  100598. - CPU_CFLAGS-$(CONFIG_CYRIXIII)+=$(call check_gcc,-march=c3,-march=i486)
  100599. - CPU_CFLAGS-$(CONFIG_NEHEMIAH)+=$(call check_gcc,-march=c3-2,-march=i686)
  100600. endif
  100601. ifeq ($(TARGET_ARCH),sparc)
  100602. @@ -397,6 +407,12 @@
  100603. CPU_CFLAGS-$(COMPILE_IN_THUMB_MODE)+=-mthumb
  100604. endif
  100605. +ifeq ($(TARGET_ARCH),metag)
  100606. + SYMBOL_PREFIX=_
  100607. + CPU_CFLAGS-$(CONFIG_META_1_2)+=
  100608. + CPU_CFLAGS-$(CONFIG_META_2_1)+=-Wa,-mcpu=metac21
  100609. +endif
  100610. +
  100611. ifeq ($(TARGET_ARCH),mips)
  100612. OPTIMIZATION+=-mno-split-addresses
  100613. CPU_CFLAGS-$(CONFIG_MIPS_ISA_1)+=-mips1
  100614. @@ -406,6 +422,7 @@
  100615. CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS32)+=-mips32 -mtune=mips32
  100616. CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS32R2)+=-march=mips32r2 -mtune=mips32r2
  100617. CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS64)+=-mips64 -mtune=mips32
  100618. + CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS64R2)+=-mips64r2 -mtune=mips64r2
  100619. ifeq ($(strip $(ARCH_BIG_ENDIAN)),y)
  100620. CPU_LDFLAGS-$(CONFIG_MIPS_N64_ABI)+=-Wl,-melf64btsmip
  100621. CPU_LDFLAGS-$(CONFIG_MIPS_O32_ABI)+=-Wl,-melf32btsmip
  100622. @@ -537,6 +554,12 @@
  100623. CPU_LDFLAGS-y += $(CPU_CFLAGS)
  100624. endif
  100625. +ifeq ($(TARGET_ARCH),arc)
  100626. + CPU_CFLAGS-y += -mlock -mswape
  100627. + CPU_CFLAGS-$(CONFIG_ARC_CPU_700) += -mA7
  100628. + CPU_LDFLAGS-y += $(CPU_CFLAGS) -marclinux
  100629. +endif
  100630. +
  100631. $(eval $(call check-gcc-var,$(PIEFLAG_NAME)))
  100632. PIEFLAG := $(CFLAG_$(PIEFLAG_NAME))
  100633. ifeq ($(PIEFLAG),)
  100634. @@ -546,11 +569,11 @@
  100635. # well as the LD PIE flag (below) because we can't rely on
  100636. # gcc passing -pie if we used -fPIE. We need to directly use -pie
  100637. # instead of -Wl,-pie as gcc picks up the wrong startfile/endfile
  100638. -$(eval $(call cache-output-var,LDPIEFLAG,$(LD) --help 2>/dev/null | grep -q -- -pie && echo "-pie"))
  100639. +$(eval $(call cache-output-var,LDPIEFLAG,$(CC) -Wl$(comma)--help 2>/dev/null | grep -q -- -pie && echo "-pie"))
  100640. # Check for --as-needed support in linker
  100641. ifndef LD_FLAG_ASNEEDED
  100642. -_LD_FLAG_ASNEEDED:=$(shell $(LD) --help 2>/dev/null | grep -- --as-needed)
  100643. +_LD_FLAG_ASNEEDED:=$(shell $(CC) -Wl,--help 2>/dev/null | grep -- --as-needed)
  100644. ifneq ($(_LD_FLAG_ASNEEDED),)
  100645. export LD_FLAG_ASNEEDED:=--as-needed
  100646. endif
  100647. @@ -574,11 +597,18 @@
  100648. # Check for AS_NEEDED support in linker script (binutils>=2.16.1 has it)
  100649. ifndef ASNEEDED
  100650. -export ASNEEDED:=$(shell $(LD) --help 2>/dev/null | grep -q -- --as-needed && echo "AS_NEEDED ( $(UCLIBC_LDSO) )" || echo "$(UCLIBC_LDSO)")
  100651. -ifeq ($(UCLIBC_HAS_BACKTRACE),y)
  100652. +export ASNEEDED:=$(shell $(CC) -Wl,--help 2>/dev/null | grep -q -- --as-needed && echo "AS_NEEDED ( $(UCLIBC_LDSO) )" || echo "$(UCLIBC_LDSO)")
  100653. +
  100654. # Only used in installed libc.so linker script
  100655. -UBACKTRACE_FULL_NAME := $(RUNTIME_PREFIX)lib/$(UBACKTRACE_DSO)
  100656. -export UBACKTRACE_ASNEEDED:=$(shell $(LD) --help 2>/dev/null | grep -q -- --as-needed && echo "AS_NEEDED ( $(UBACKTRACE_FULL_NAME) )" || echo "$(UBACKTRACE_FULL_NAME)")
  100657. +ifeq ($(UCLIBC_HAS_BACKTRACE),y)
  100658. +ifeq ($(HARDWIRED_ABSPATH),y)
  100659. +UBACKTRACE_FULL_NAME := $(subst //,/,$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(UBACKTRACE_DSO))
  100660. +else
  100661. +UBACKTRACE_FULL_NAME := $(UBACKTRACE_DSO)
  100662. +endif
  100663. +export UBACKTRACE_ASNEEDED:=$(shell $(CC) -Wl,--help 2>/dev/null | grep -q -- --as-needed && \
  100664. + echo "GROUP ( AS_NEEDED ( $(UBACKTRACE_FULL_NAME) ) )" || \
  100665. + echo "GROUP ( $(UBACKTRACE_FULL_NAME) )")
  100666. else
  100667. export UBACKTRACE_ASNEEDED:=""
  100668. endif
  100669. @@ -623,14 +653,17 @@
  100670. SSP_CFLAGS := $(SSP_DISABLE_FLAGS)
  100671. endif
  100672. -$(eval $(call check-gcc-var,-nostdlib))
  100673. -
  100674. # Collect all CFLAGS components
  100675. -CFLAGS := -include $(top_srcdir)include/libc-symbols.h \
  100676. - $(XWARNINGS) $(CPU_CFLAGS) $(SSP_CFLAGS) \
  100677. - -nostdinc -I$(top_builddir)include -I$(top_srcdir)include -I. \
  100678. +CFLAGS := $(XWARNINGS) $(CPU_CFLAGS) $(SSP_CFLAGS) \
  100679. + -nostdinc -I$(top_builddir)include \
  100680. + -I$(top_srcdir)include -include libc-symbols.h \
  100681. + -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH) \
  100682. -I$(top_srcdir)libc/sysdeps/linux \
  100683. - -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)
  100684. + -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) \
  100685. + -I$(top_srcdir)ldso/include -I.
  100686. +ifneq ($(strip $(UCLIBC_EXTRA_CFLAGS)),"")
  100687. +CFLAGS += $(call qstrip,$(UCLIBC_EXTRA_CFLAGS))
  100688. +endif
  100689. # We need this to be checked within libc-symbols.h
  100690. ifneq ($(HAVE_SHARED),y)
  100691. @@ -640,7 +673,7 @@
  100692. $(eval $(call check-ld-var,--warn-once))
  100693. $(eval $(call check-ld-var,--sort-common))
  100694. $(eval $(call check-ld-var,--discard-all))
  100695. -LDFLAGS_NOSTRIP:=$(CPU_LDFLAGS-y) -shared \
  100696. +LDFLAGS_NOSTRIP:=$(LDFLAG-fuse-ld) $(CPU_LDFLAGS-y) -shared \
  100697. -Wl,--warn-common $(CFLAG_-Wl--warn-once) -Wl,-z,combreloc
  100698. # binutils-2.16.1 warns about ignored sections, 2.16.91.0.3 and newer are ok
  100699. #$(eval $(call check-ld-var,--gc-sections))
  100700. @@ -720,7 +753,7 @@
  100701. ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
  100702. PTINC:= -I$(top_builddir)$(PTDIR) \
  100703. -I$(top_srcdir)$(PTDIR) \
  100704. - $(if $(TARGET_ARCH),-I$(top_srcdir)$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH)/$(TARGET_SUBARCH)) \
  100705. + $(if $(TARGET_SUBARCH),-I$(top_srcdir)$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH)/$(TARGET_SUBARCH)) \
  100706. -I$(top_srcdir)$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH) \
  100707. -I$(top_builddir)$(PTDIR)/sysdeps/$(TARGET_ARCH) \
  100708. -I$(top_srcdir)$(PTDIR)/sysdeps/$(TARGET_ARCH) \
  100709. @@ -728,9 +761,7 @@
  100710. -I$(top_srcdir)$(PTDIR)/sysdeps/unix/sysv/linux \
  100711. -I$(top_srcdir)$(PTDIR)/sysdeps/pthread \
  100712. -I$(top_srcdir)$(PTDIR)/sysdeps/pthread/bits \
  100713. - -I$(top_srcdir)$(PTDIR)/sysdeps/generic \
  100714. - -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) \
  100715. - -I$(top_srcdir)ldso/include
  100716. + -I$(top_srcdir)$(PTDIR)/sysdeps/generic
  100717. #
  100718. # Test for TLS if NPTL support was selected.
  100719. #
  100720. @@ -763,13 +794,14 @@
  100721. PTINC :=
  100722. endif
  100723. CFLAGS += -I$(top_srcdir)libc/sysdeps/linux/common
  100724. -CFLAGS += -I$(KERNEL_HEADERS)
  100725. #CFLAGS += -iwithprefix include-fixed -iwithprefix include
  100726. $(eval $(call cache-output-var,CC_IPREFIX,$(CC) -print-file-name=include))
  100727. CC_INC := -isystem $(dir $(CC_IPREFIX))include-fixed -isystem $(CC_IPREFIX)
  100728. CFLAGS += $(CC_INC)
  100729. +CFLAGS += -I$(KERNEL_HEADERS)
  100730. +
  100731. ifneq ($(DOASSERTS),y)
  100732. CFLAGS+=-DNDEBUG
  100733. endif
  100734. @@ -786,7 +818,11 @@
  100735. LIBGCC_CFLAGS ?= $(CFLAGS) $(CPU_CFLAGS-y)
  100736. $(eval $(call cache-output-var,LIBGCC,$(CC) $(LIBGCC_CFLAGS) -print-libgcc-file-name))
  100737. +$(eval $(call cache-output-var,LIBGCC_EH,$(CC) $(LIBGCC_CFLAGS) -print-file-name=libgcc_eh.a))
  100738. +# with -O0 we (e.g. lockf) might end up with references to
  100739. +# _Unwind_Resume, so pull in gcc_eh in this case..
  100740. LIBGCC_DIR:=$(dir $(LIBGCC))
  100741. +LIBGCC += $(if $(DODEBUG),$(LIBGCC_EH))
  100742. # moved from libpthread/linuxthreads
  100743. ifeq ($(UCLIBC_CTOR_DTOR),y)
  100744. @@ -794,4 +830,6 @@
  100745. SHARED_END_FILES:=$(LIBGCC_DIR)crtendS.o $(top_builddir)lib/crtn.o
  100746. endif
  100747. -LOCAL_INSTALL_PATH := install_dir
  100748. +LOCAL_INSTALL_PATH := $(if $(O),$(O)/)install_dir
  100749. +
  100750. +PTHREAD_GENERATE_MANGLE ?= -n "s/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*\$$/\#define \1 \2/p"
  100751. diff -Nur uClibc-0.9.33.2/test/API/Makefile uClibc-git/test/API/Makefile
  100752. --- uClibc-0.9.33.2/test/API/Makefile 2012-05-15 09:20:09.000000000 +0200
  100753. +++ uClibc-git/test/API/Makefile 2014-07-25 20:36:10.365353328 +0200
  100754. @@ -2,6 +2,7 @@
  100755. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  100756. top_builddir=../../
  100757. +top_srcdir=../../
  100758. include ../Rules.mak
  100759. -include Makefile.in
  100760. include ../Test.mak
  100761. diff -Nur uClibc-0.9.33.2/test/args/Makefile uClibc-git/test/args/Makefile
  100762. --- uClibc-0.9.33.2/test/args/Makefile 2012-05-15 09:20:09.000000000 +0200
  100763. +++ uClibc-git/test/args/Makefile 2014-07-25 20:36:10.925356263 +0200
  100764. @@ -2,6 +2,7 @@
  100765. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  100766. top_builddir=../../
  100767. +top_srcdir=../../
  100768. include ../Rules.mak
  100769. -include Makefile.in
  100770. include ../Test.mak
  100771. diff -Nur uClibc-0.9.33.2/test/assert/Makefile uClibc-git/test/assert/Makefile
  100772. --- uClibc-0.9.33.2/test/assert/Makefile 2012-05-15 09:20:09.000000000 +0200
  100773. +++ uClibc-git/test/assert/Makefile 2014-07-25 20:36:11.325358357 +0200
  100774. @@ -2,6 +2,7 @@
  100775. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  100776. top_builddir=../../
  100777. +top_srcdir=../../
  100778. include ../Rules.mak
  100779. -include Makefile.in
  100780. include ../Test.mak
  100781. diff -Nur uClibc-0.9.33.2/test/build/Makefile uClibc-git/test/build/Makefile
  100782. --- uClibc-0.9.33.2/test/build/Makefile 2012-05-15 09:20:09.000000000 +0200
  100783. +++ uClibc-git/test/build/Makefile 2014-07-25 20:36:11.377358630 +0200
  100784. @@ -2,6 +2,7 @@
  100785. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  100786. top_builddir=../../
  100787. +top_srcdir=../../
  100788. include ../Rules.mak
  100789. -include Makefile.in
  100790. include ../Test.mak
  100791. diff -Nur uClibc-0.9.33.2/test/crypt/Makefile uClibc-git/test/crypt/Makefile
  100792. --- uClibc-0.9.33.2/test/crypt/Makefile 2012-05-15 09:20:09.000000000 +0200
  100793. +++ uClibc-git/test/crypt/Makefile 2014-07-25 20:36:11.385358673 +0200
  100794. @@ -2,6 +2,7 @@
  100795. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  100796. top_builddir=../../
  100797. +top_srcdir=../../
  100798. include ../Rules.mak
  100799. -include Makefile.in
  100800. include ../Test.mak
  100801. diff -Nur uClibc-0.9.33.2/test/ctype/Makefile uClibc-git/test/ctype/Makefile
  100802. --- uClibc-0.9.33.2/test/ctype/Makefile 2012-05-15 09:20:09.000000000 +0200
  100803. +++ uClibc-git/test/ctype/Makefile 2014-07-25 20:36:11.405358777 +0200
  100804. @@ -2,6 +2,7 @@
  100805. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  100806. top_builddir=../../
  100807. +top_srcdir=../../
  100808. include ../Rules.mak
  100809. -include Makefile.in
  100810. include ../Test.mak
  100811. diff -Nur uClibc-0.9.33.2/test/dlopen/libA.c uClibc-git/test/dlopen/libA.c
  100812. --- uClibc-0.9.33.2/test/dlopen/libA.c 1970-01-01 01:00:00.000000000 +0100
  100813. +++ uClibc-git/test/dlopen/libA.c 2014-07-25 20:36:11.417358839 +0200
  100814. @@ -0,0 +1,7 @@
  100815. +extern void libB_func(void);
  100816. +
  100817. +void libA_func(void);
  100818. +void libA_func(void)
  100819. +{
  100820. + libB_func();
  100821. +}
  100822. diff -Nur uClibc-0.9.33.2/test/dlopen/libB.c uClibc-git/test/dlopen/libB.c
  100823. --- uClibc-0.9.33.2/test/dlopen/libB.c 1970-01-01 01:00:00.000000000 +0100
  100824. +++ uClibc-git/test/dlopen/libB.c 2014-07-25 20:36:11.417358839 +0200
  100825. @@ -0,0 +1,7 @@
  100826. +extern void libC_func(void);
  100827. +
  100828. +void libB_func(void);
  100829. +void libB_func(void)
  100830. +{
  100831. + libC_func();
  100832. +}
  100833. diff -Nur uClibc-0.9.33.2/test/dlopen/libC.c uClibc-git/test/dlopen/libC.c
  100834. --- uClibc-0.9.33.2/test/dlopen/libC.c 1970-01-01 01:00:00.000000000 +0100
  100835. +++ uClibc-git/test/dlopen/libC.c 2014-07-25 20:36:11.417358839 +0200
  100836. @@ -0,0 +1,30 @@
  100837. +#include <dlfcn.h>
  100838. +#include <stdio.h>
  100839. +#include <stdlib.h>
  100840. +
  100841. +#define LIBNAME "libB.so"
  100842. +void _libC_fini(void);
  100843. +void _libC_fini(void)
  100844. +{
  100845. + printf("libC_fini():finish - atexit()\n");
  100846. +}
  100847. +
  100848. +void libC_fini(void);
  100849. +void libC_fini(void)
  100850. +{
  100851. + _libC_fini();
  100852. +}
  100853. +
  100854. +void libC_func(void);
  100855. +void libC_func(void)
  100856. +{
  100857. + void *libB;
  100858. +
  100859. + libB = dlopen(LIBNAME, RTLD_LAZY);
  100860. + if (!libB) {
  100861. + fprintf(stderr, "Could not open ./%s: %s\n", LIBNAME, dlerror());
  100862. + exit(1);
  100863. + }
  100864. +
  100865. + atexit(libC_fini);
  100866. +}
  100867. diff -Nur uClibc-0.9.33.2/test/dlopen/Makefile uClibc-git/test/dlopen/Makefile
  100868. --- uClibc-0.9.33.2/test/dlopen/Makefile 2012-05-15 09:20:09.000000000 +0200
  100869. +++ uClibc-git/test/dlopen/Makefile 2014-07-25 20:36:11.417358839 +0200
  100870. @@ -2,11 +2,7 @@
  100871. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  100872. top_builddir=../../
  100873. +top_srcdir=../../
  100874. include ../Rules.mak
  100875. -include Makefile.in
  100876. -ifneq ($(HAVE_SHARED),y)
  100877. -TESTS_DISABLED := test3
  100878. -LDFLAGS_libtest.so := -lpthread
  100879. -endif
  100880. -
  100881. include ../Test.mak
  100882. diff -Nur uClibc-0.9.33.2/test/dlopen/Makefile.in uClibc-git/test/dlopen/Makefile.in
  100883. --- uClibc-0.9.33.2/test/dlopen/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  100884. +++ uClibc-git/test/dlopen/Makefile.in 2014-07-25 20:36:11.417358839 +0200
  100885. @@ -4,7 +4,13 @@
  100886. # rules need a little love to work with glibc ...
  100887. export UCLIBC_ONLY := 1
  100888. -TESTS := dltest dltest2 dlstatic test1 test2 test3 dlundef dlafk dladdr
  100889. +TESTS := dltest dltest2 dlstatic test1 test2 test3 dlundef dlafk dladdr \
  100890. + testscope
  100891. +
  100892. +ifneq ($(HAVE_SHARED),y)
  100893. +TESTS_DISABLED := test3
  100894. +LDFLAGS_libtest.so := -lpthread
  100895. +endif
  100896. CFLAGS_dltest := -DLIBNAME="\"./libtest.so\""
  100897. CFLAGS_dltest2 := -DLIBNAME="\"./libtest3.so\""
  100898. @@ -18,22 +24,42 @@
  100899. LDFLAGS_test2 := -ldl
  100900. LDFLAGS_test3 := -ldl ./libtest1.so ./libtest2.so -Wl,-rpath,.
  100901. LDFLAGS_dladdr := -ldl
  100902. +LDFLAGS_testscope:= -ldl
  100903. DEBUG_LIBS := X
  100904. WRAPPER := env $(DEBUG_LIBS)=all LD_LIBRARY_PATH="$$PWD:.:$(LD_LIBRARY_PATH)"
  100905. +# Build libC.so without -mprefergot compilation flag to force a
  100906. +# R_SH_JMP_SLOT relocation instead of R_SH_GLOB_DAT for _libC_fini. This is
  100907. +# needed to resolve the _libC_fini symbol when used (by libC.so destructor),
  100908. +# whereas with GLOB_DAT relocation the resolution happens in the GOT entry
  100909. +# when the libC is loaded, for the same reason remove also the "-z now"
  100910. +# linker flag.
  100911. +# These are needed to spot the issue test case want raise.
  100912. +
  100913. +ifeq ($(TARGET_ARCH),sh)
  100914. +CFLAGS-OMIT-libC.c = -mprefergot
  100915. +endif
  100916. +LDFLAGS-OMIT-libC.c = -Wl,-z,now
  100917. +
  100918. dltest: libtest.so
  100919. dltest2: libtest3.so
  100920. dlstatic: libstatic.so
  100921. dlundef: libundef.so
  100922. dlafk: libafk.so
  100923. +testscope:libA.so
  100924. libafk.so: libafk-temp.so
  100925. LDFLAGS_libafk.so := ./libafk-temp.so -Wl,-rpath,.
  100926. test1: libtest1.so
  100927. test2: libtest1.so libtest2.so
  100928. test3: libtest1.so libtest2.so
  100929. libtest1.so: libtest2.so
  100930. +libB.so: libC.so
  100931. +libA.so: libB.so
  100932. LDFLAGS_libtest.so := -lpthread
  100933. LDFLAGS_libtest1.so := ./libtest2.so -Wl,-rpath,.
  100934. LDFLAGS_libtest2.so := -Wl,-rpath,.
  100935. LDFLAGS_libtest3.so := -lpthread -Wl,-rpath,.
  100936. +LDFLAGS_libC.so := -ldl
  100937. +LDFLAGS_libB.so := ./libC.so -Wl,-rpath,.
  100938. +LDFLAGS_libA.so := ./libB.so -Wl,-rpath,.
  100939. diff -Nur uClibc-0.9.33.2/test/dlopen/testscope.c uClibc-git/test/dlopen/testscope.c
  100940. --- uClibc-0.9.33.2/test/dlopen/testscope.c 1970-01-01 01:00:00.000000000 +0100
  100941. +++ uClibc-git/test/dlopen/testscope.c 2014-07-25 20:36:11.417358839 +0200
  100942. @@ -0,0 +1,29 @@
  100943. +#include <dlfcn.h>
  100944. +#include <stdio.h>
  100945. +#include <stdlib.h>
  100946. +
  100947. +#define LIBNAME "libA.so"
  100948. +int main(int argc, char **argv)
  100949. +{
  100950. + void *libA;
  100951. + void (*libAfn)(void);
  100952. + char *error;
  100953. +
  100954. + libA = dlopen(LIBNAME, RTLD_LAZY);
  100955. + if (!libA) {
  100956. + fprintf(stderr, "Could not open ./%s: %s\n", LIBNAME, dlerror());
  100957. + exit(1);
  100958. + }
  100959. +
  100960. + libAfn = dlsym(libA, "libA_func");
  100961. + if ((error = dlerror()) != NULL) {
  100962. + fprintf(stderr, "Could not locate symbol 'libA_func': %s\n", error);
  100963. + exit(1);
  100964. + }
  100965. +
  100966. + libAfn();
  100967. +
  100968. + dlclose(libA);
  100969. +
  100970. + return EXIT_SUCCESS;
  100971. +}
  100972. diff -Nur uClibc-0.9.33.2/test/.gitignore uClibc-git/test/.gitignore
  100973. --- uClibc-0.9.33.2/test/.gitignore 2012-05-15 09:20:09.000000000 +0200
  100974. +++ uClibc-git/test/.gitignore 2014-07-25 20:36:09.949351149 +0200
  100975. @@ -29,13 +29,19 @@
  100976. dlopen/dlundef
  100977. dlopen/libafk.so
  100978. dlopen/libafk-temp.so
  100979. +dlopen/libA.so
  100980. +dlopen/libB.so
  100981. +dlopen/libC.so
  100982. dlopen/libstatic.so
  100983. dlopen/libtest[123].so
  100984. dlopen/libtest.so
  100985. dlopen/libundef.so
  100986. dlopen/test[1-3]
  100987. +dlopen/testscope
  100988. inet/bug-if1
  100989. inet/gethost_r-align
  100990. +inet/gethostid
  100991. +inet/getnetent
  100992. inet/if_nameindex
  100993. inet/tst-aton
  100994. inet/tst-ether_aton
  100995. @@ -43,13 +49,28 @@
  100996. inet/tst-ethers-line
  100997. inet/tst-network
  100998. inet/tst-ntoa
  100999. -inet/gethostid
  101000. -inet/getnetent
  101001. +inet/tst-res
  101002. +inet/tst-sock-nonblock
  101003. librt/shmtest
  101004. locale/bug-iconv-trans
  101005. +locale/bug-usesetlocale
  101006. +locale/C
  101007. locale/collate-test
  101008. locale/dump-ctype
  101009. locale/gen-unicode-ctype
  101010. +locale/show-ucs-data
  101011. +locale/tst-digits
  101012. +locale/tst-langinfo
  101013. +locale/tst-mbswcs[1-6]
  101014. +locale/tst_nl_langinfo
  101015. +locale/tst-numeric
  101016. +locale/tst-setlocale
  101017. +locale/tst-sscanf
  101018. +locale/tst-trans
  101019. +locale/tst-wctype
  101020. +locale/tst-xlocale1
  101021. +locale/tst-xlocale2
  101022. +locale/xfrm-test
  101023. locale-mbwc/tst_iswalnum
  101024. locale-mbwc/tst_iswalpha
  101025. locale-mbwc/tst_iswcntrl
  101026. @@ -100,16 +121,6 @@
  101027. locale-mbwc/tst_wctype
  101028. locale-mbwc/tst_wcwidth
  101029. locale-mbwc/tst2_mbrtowc
  101030. -locale/show-ucs-data
  101031. -locale/tst-digits
  101032. -locale/tst-langinfo
  101033. -locale/tst-mbswcs[1-6]
  101034. -locale/tst_nl_langinfo
  101035. -locale/tst-numeric
  101036. -locale/tst-setlocale
  101037. -locale/tst-sscanf
  101038. -locale/tst-trans
  101039. -locale/tst-wctype
  101040. malloc/malloc
  101041. malloc/mallocbug
  101042. malloc/malloc-standard-alignment
  101043. @@ -146,8 +157,11 @@
  101044. misc/seek
  101045. misc/sem
  101046. misc/stdarg
  101047. +misc/tst-inotify
  101048. misc/tst-scandir
  101049. misc/tst-seekdir
  101050. +misc/tst-statfs
  101051. +misc/tst-statvfs
  101052. misc/tst-utmp
  101053. mmap/mmap
  101054. mmap/mmap2
  101055. @@ -243,6 +257,7 @@
  101056. signal/signal
  101057. signal/tst-raise
  101058. signal/tst-signal
  101059. +signal/tst-signalfd
  101060. signal/tst-sigset
  101061. signal/tst-sigsimple
  101062. silly/hello
  101063. @@ -250,10 +265,12 @@
  101064. stat/memcmp-stat
  101065. stat/stat
  101066. stat/stat64
  101067. +stat/stat-loop256
  101068. stdio/64bit
  101069. stdio/fclose-loop
  101070. stdlib/ptytest
  101071. stdlib/qsort
  101072. +stdlib/testarc4random
  101073. stdlib/testatexit
  101074. stdlib/test-canon
  101075. stdlib/test-canon2
  101076. @@ -282,6 +299,7 @@
  101077. time/tst-mktime
  101078. time/tst-mktime3
  101079. time/tst-strptime2
  101080. +time/tst-timerfd
  101081. time/tst_wcsftime
  101082. tls/tst-tls[1-9]
  101083. tls/tst-tls1[0-8]
  101084. @@ -302,6 +320,8 @@
  101085. unistd/getopt
  101086. unistd/getopt_long
  101087. unistd/tstgetopt
  101088. +unistd/tst-posix_fallocate
  101089. +unistd/tst-posix_fallocate64
  101090. unistd/tst-preadwrite
  101091. unistd/tst-preadwrite64
  101092. unistd/vfork
  101093. diff -Nur uClibc-0.9.33.2/test/inet/bug-if1.c uClibc-git/test/inet/bug-if1.c
  101094. --- uClibc-0.9.33.2/test/inet/bug-if1.c 2012-05-15 09:20:09.000000000 +0200
  101095. +++ uClibc-git/test/inet/bug-if1.c 2014-07-25 20:36:11.433358924 +0200
  101096. @@ -13,9 +13,8 @@
  101097. Lesser General Public License for more details.
  101098. You should have received a copy of the GNU Lesser General Public
  101099. - License along with the GNU C Library; if not, write to the Free
  101100. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101101. - 02111-1307 USA. */
  101102. + License along with the GNU C Library; if not, see
  101103. + <http://www.gnu.org/licenses/>. */
  101104. #include <errno.h>
  101105. #include <limits.h>
  101106. diff -Nur uClibc-0.9.33.2/test/inet/gethostid.c uClibc-git/test/inet/gethostid.c
  101107. --- uClibc-0.9.33.2/test/inet/gethostid.c 2012-05-15 09:20:09.000000000 +0200
  101108. +++ uClibc-git/test/inet/gethostid.c 2014-07-25 20:36:11.433358924 +0200
  101109. @@ -1,6 +1,6 @@
  101110. #include <unistd.h>
  101111. #include <stdio.h>
  101112. int main(void) {
  101113. - printf("hostid=%d\n", gethostid());
  101114. + printf("hostid=%ld\n", gethostid());
  101115. return 0;
  101116. }
  101117. diff -Nur uClibc-0.9.33.2/test/inet/getnetent.c uClibc-git/test/inet/getnetent.c
  101118. --- uClibc-0.9.33.2/test/inet/getnetent.c 2012-05-15 09:20:09.000000000 +0200
  101119. +++ uClibc-git/test/inet/getnetent.c 2014-07-25 20:36:11.433358924 +0200
  101120. @@ -8,7 +8,7 @@
  101121. while (net->n_net && !((net->n_net >> 24) & 0xff)) {
  101122. net->n_net <<= 8;
  101123. }
  101124. - printf("%lu.%lu.%lu.%lu\n",
  101125. + printf("%u.%u.%u.%u\n",
  101126. (net->n_net >> 24) & 0xff, (net->n_net >> 16) & 0xff,
  101127. (net->n_net >> 8) & 0xff, net->n_net & 0xff);
  101128. }
  101129. diff -Nur uClibc-0.9.33.2/test/inet/Makefile uClibc-git/test/inet/Makefile
  101130. --- uClibc-0.9.33.2/test/inet/Makefile 2012-05-15 09:20:09.000000000 +0200
  101131. +++ uClibc-git/test/inet/Makefile 2014-07-25 20:36:11.433358924 +0200
  101132. @@ -2,6 +2,7 @@
  101133. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  101134. top_builddir=../../
  101135. +top_srcdir=../../
  101136. include ../Rules.mak
  101137. -include Makefile.in
  101138. include ../Test.mak
  101139. diff -Nur uClibc-0.9.33.2/test/inet/Makefile.in uClibc-git/test/inet/Makefile.in
  101140. --- uClibc-0.9.33.2/test/inet/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  101141. +++ uClibc-git/test/inet/Makefile.in 2014-07-25 20:36:11.433358924 +0200
  101142. @@ -7,5 +7,11 @@
  101143. endif
  101144. ifeq ($(UCLIBC_HAS_SOCKET)$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6),)
  101145. -TESTS_DISABLED := tst-ether_aton tst-ethers tst-ethers-line
  101146. +TESTS_DISABLED += tst-ether_aton tst-ethers tst-ethers-line
  101147. +endif
  101148. +
  101149. +ifeq ($(UCLIBC_HAS_RESOLVER_SUPPORT),)
  101150. +TESTS_DISABLED += tst-res
  101151. +else
  101152. +LDFLAGS_tst-res_glibc := -lresolv # assume it's glibc or somebody with that lib
  101153. endif
  101154. diff -Nur uClibc-0.9.33.2/test/inet/tst-network.c uClibc-git/test/inet/tst-network.c
  101155. --- uClibc-0.9.33.2/test/inet/tst-network.c 2012-05-15 09:20:09.000000000 +0200
  101156. +++ uClibc-git/test/inet/tst-network.c 2014-07-25 20:36:11.433358924 +0200
  101157. @@ -14,9 +14,8 @@
  101158. Lesser General Public License for more details.
  101159. You should have received a copy of the GNU Lesser General Public
  101160. - License along with the GNU C Library; if not, write to the Free
  101161. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101162. - 02111-1307 USA. */
  101163. + License along with the GNU C Library; if not, see
  101164. + <http://www.gnu.org/licenses/>. */
  101165. #include <stdio.h>
  101166. #include <sys/socket.h>
  101167. diff -Nur uClibc-0.9.33.2/test/inet/tst-res.c uClibc-git/test/inet/tst-res.c
  101168. --- uClibc-0.9.33.2/test/inet/tst-res.c 1970-01-01 01:00:00.000000000 +0100
  101169. +++ uClibc-git/test/inet/tst-res.c 2014-07-25 20:36:11.433358924 +0200
  101170. @@ -0,0 +1,44 @@
  101171. +#include <stdlib.h>
  101172. +#include <assert.h>
  101173. +#include <sys/types.h>
  101174. +#include <netinet/in.h>
  101175. +#include <arpa/nameser.h>
  101176. +#include <resolv.h>
  101177. +#include <netdb.h>
  101178. +
  101179. +int main(int argc, char **argv)
  101180. +{
  101181. + int r;
  101182. + struct __res_state state;
  101183. +
  101184. + r = res_ninit(&state);
  101185. + if (r) {
  101186. + herror("ninit");
  101187. + abort();
  101188. + }
  101189. + r = res_init();
  101190. + if (r) {
  101191. + herror("init");
  101192. + abort();
  101193. + }
  101194. +
  101195. +#ifdef __UCLIBC_HAS_BSD_RES_CLOSE__
  101196. + res_close();
  101197. +#endif
  101198. +#ifdef __UCLIBC__
  101199. + /* assume there is at least one resolver configured */
  101200. + assert (state._u._ext.nscount > 0);
  101201. +#else
  101202. + assert (state._u._ext.nscount == 0);
  101203. +#endif
  101204. + assert (state.options & RES_INIT);
  101205. + res_nclose(&state);
  101206. +#ifdef __UCLIBC__
  101207. + /* We wipe the whole thing */
  101208. + assert ((state.options & RES_INIT) == 0);
  101209. +#endif
  101210. + assert (state._u._ext.nscount == 0);
  101211. +
  101212. + return 0;
  101213. +}
  101214. +
  101215. diff -Nur uClibc-0.9.33.2/test/inet/tst-sock-nonblock.c uClibc-git/test/inet/tst-sock-nonblock.c
  101216. --- uClibc-0.9.33.2/test/inet/tst-sock-nonblock.c 1970-01-01 01:00:00.000000000 +0100
  101217. +++ uClibc-git/test/inet/tst-sock-nonblock.c 2014-07-25 20:36:11.433358924 +0200
  101218. @@ -0,0 +1,53 @@
  101219. +/* vi: set sw=4 ts=4 sts=4: */
  101220. +/*
  101221. + * Nonblocking socket test for uClibc
  101222. + * Copyright (C) 2012 by Kevin Cernekee <cernekee@gmail.com>
  101223. + *
  101224. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  101225. + */
  101226. +
  101227. +#include <stdio.h>
  101228. +#include <stdlib.h>
  101229. +#include <string.h>
  101230. +#include <unistd.h>
  101231. +#include <errno.h>
  101232. +#include <error.h>
  101233. +#include <sys/types.h>
  101234. +#include <sys/socket.h>
  101235. +#include <sys/un.h>
  101236. +#include <sys/fcntl.h>
  101237. +
  101238. +static int
  101239. +do_test(void)
  101240. +{
  101241. + int fd, ret, result = 0;
  101242. + struct sockaddr_un sa;
  101243. + char buf;
  101244. +
  101245. + fd = socket(AF_UNIX, SOCK_DGRAM | SOCK_NONBLOCK, 0);
  101246. + if (fd < 0) {
  101247. + perror("socket()");
  101248. + result = 1;
  101249. + }
  101250. +
  101251. + memset(&sa, 0, sizeof(sa));
  101252. + sa.sun_family = AF_UNIX;
  101253. + strcpy(sa.sun_path, "socktest");
  101254. + unlink("socktest");
  101255. + if (bind(fd, (const struct sockaddr *)&sa, sizeof(sa)) < 0) {
  101256. + perror("bind()");
  101257. + result = 1;
  101258. + }
  101259. +
  101260. + ret = read(fd, &buf, sizeof(buf));
  101261. + if (ret != -1 || errno != EAGAIN) {
  101262. + error(0, 0, "Nonblocking read returned %d", ret);
  101263. + result = 1;
  101264. + }
  101265. +
  101266. + return result;
  101267. +}
  101268. +
  101269. +#define TIMEOUT 5
  101270. +#define TEST_FUNCTION do_test ()
  101271. +#include "../test-skeleton.c"
  101272. diff -Nur uClibc-0.9.33.2/test/librt/Makefile uClibc-git/test/librt/Makefile
  101273. --- uClibc-0.9.33.2/test/librt/Makefile 2012-05-15 09:20:09.000000000 +0200
  101274. +++ uClibc-git/test/librt/Makefile 2014-07-25 20:36:11.449359008 +0200
  101275. @@ -2,6 +2,7 @@
  101276. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  101277. top_builddir=../../
  101278. +top_srcdir=../../
  101279. include ../Rules.mak
  101280. -include Makefile.in
  101281. include ../Test.mak
  101282. diff -Nur uClibc-0.9.33.2/test/locale/collate-test.c uClibc-git/test/locale/collate-test.c
  101283. --- uClibc-0.9.33.2/test/locale/collate-test.c 2012-05-15 09:20:09.000000000 +0200
  101284. +++ uClibc-git/test/locale/collate-test.c 2014-07-25 20:36:11.489359217 +0200
  101285. @@ -14,9 +14,8 @@
  101286. Lesser General Public License for more details.
  101287. You should have received a copy of the GNU Lesser General Public
  101288. - License along with the GNU C Library; if not, write to the Free
  101289. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101290. - 02111-1307 USA. */
  101291. + License along with the GNU C Library; if not, see
  101292. + <http://www.gnu.org/licenses/>. */
  101293. #include <ctype.h>
  101294. #include <error.h>
  101295. diff -Nur uClibc-0.9.33.2/test/locale/dump-ctype.c uClibc-git/test/locale/dump-ctype.c
  101296. --- uClibc-0.9.33.2/test/locale/dump-ctype.c 2012-05-15 09:20:09.000000000 +0200
  101297. +++ uClibc-git/test/locale/dump-ctype.c 2014-07-25 20:36:11.489359217 +0200
  101298. @@ -15,9 +15,8 @@
  101299. Lesser General Public License for more details.
  101300. You should have received a copy of the GNU Lesser General Public
  101301. - License along with the GNU C Library; if not, write to the Free
  101302. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101303. - 02111-1307 USA. */
  101304. + License along with the GNU C Library; if not, see
  101305. + <http://www.gnu.org/licenses/>. */
  101306. /* Usage example:
  101307. $ dump-ctype de_DE.UTF-8
  101308. diff -Nur uClibc-0.9.33.2/test/locale/gen-unicode-ctype.c uClibc-git/test/locale/gen-unicode-ctype.c
  101309. --- uClibc-0.9.33.2/test/locale/gen-unicode-ctype.c 2012-05-15 09:20:09.000000000 +0200
  101310. +++ uClibc-git/test/locale/gen-unicode-ctype.c 2014-07-25 20:36:11.489359217 +0200
  101311. @@ -14,9 +14,8 @@
  101312. Lesser General Public License for more details.
  101313. You should have received a copy of the GNU Lesser General Public
  101314. - License along with the GNU C Library; if not, write to the Free
  101315. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101316. - 02111-1307 USA. */
  101317. + License along with the GNU C Library; if not, see
  101318. + <http://www.gnu.org/licenses/>. */
  101319. /* Usage example:
  101320. $ gen-unicode /usr/local/share/Unidata/UnicodeData.txt 3.1
  101321. diff -Nur uClibc-0.9.33.2/test/locale/Makefile uClibc-git/test/locale/Makefile
  101322. --- uClibc-0.9.33.2/test/locale/Makefile 2012-05-15 09:20:09.000000000 +0200
  101323. +++ uClibc-git/test/locale/Makefile 2014-07-25 20:36:11.485359196 +0200
  101324. @@ -2,6 +2,7 @@
  101325. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  101326. top_builddir=../../
  101327. +top_srcdir=../../
  101328. include ../Rules.mak
  101329. -include Makefile.in
  101330. include ../Test.mak
  101331. diff -Nur uClibc-0.9.33.2/test/locale/tst-C-locale.c uClibc-git/test/locale/tst-C-locale.c
  101332. --- uClibc-0.9.33.2/test/locale/tst-C-locale.c 2012-05-15 09:20:09.000000000 +0200
  101333. +++ uClibc-git/test/locale/tst-C-locale.c 2014-07-25 20:36:11.489359217 +0200
  101334. @@ -14,9 +14,8 @@
  101335. Lesser General Public License for more details.
  101336. You should have received a copy of the GNU Lesser General Public
  101337. - License along with the GNU C Library; if not, write to the Free
  101338. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101339. - 02111-1307 USA. */
  101340. + License along with the GNU C Library; if not, see
  101341. + <http://www.gnu.org/licenses/>. */
  101342. #include <ctype.h>
  101343. #include <langinfo.h>
  101344. diff -Nur uClibc-0.9.33.2/test/locale/tst-ctype.c uClibc-git/test/locale/tst-ctype.c
  101345. --- uClibc-0.9.33.2/test/locale/tst-ctype.c 2012-05-15 09:20:09.000000000 +0200
  101346. +++ uClibc-git/test/locale/tst-ctype.c 2014-07-25 20:36:11.489359217 +0200
  101347. @@ -13,9 +13,8 @@
  101348. Lesser General Public License for more details.
  101349. You should have received a copy of the GNU Lesser General Public
  101350. - License along with the GNU C Library; if not, write to the Free
  101351. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101352. - 02111-1307 USA. */
  101353. + License along with the GNU C Library; if not, see
  101354. + <http://www.gnu.org/licenses/>. */
  101355. #include <ctype.h>
  101356. #include <locale.h>
  101357. diff -Nur uClibc-0.9.33.2/test/locale/tst-digits.c uClibc-git/test/locale/tst-digits.c
  101358. --- uClibc-0.9.33.2/test/locale/tst-digits.c 2012-05-15 09:20:09.000000000 +0200
  101359. +++ uClibc-git/test/locale/tst-digits.c 2014-07-25 20:36:11.489359217 +0200
  101360. @@ -13,9 +13,8 @@
  101361. Lesser General Public License for more details.
  101362. You should have received a copy of the GNU Lesser General Public
  101363. - License along with the GNU C Library; if not, write to the Free
  101364. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101365. - 02111-1307 USA. */
  101366. + License along with the GNU C Library; if not, see
  101367. + <http://www.gnu.org/licenses/>. */
  101368. #include <ctype.h>
  101369. #include <langinfo.h>
  101370. diff -Nur uClibc-0.9.33.2/test/locale/tst-fmon.c uClibc-git/test/locale/tst-fmon.c
  101371. --- uClibc-0.9.33.2/test/locale/tst-fmon.c 2012-05-15 09:20:09.000000000 +0200
  101372. +++ uClibc-git/test/locale/tst-fmon.c 2014-07-25 20:36:11.489359217 +0200
  101373. @@ -14,9 +14,8 @@
  101374. Lesser General Public License for more details.
  101375. You should have received a copy of the GNU Lesser General Public
  101376. - License along with the GNU C Library; if not, write to the Free
  101377. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101378. - 02111-1307 USA. */
  101379. + License along with the GNU C Library; if not, see
  101380. + <http://www.gnu.org/licenses/>. */
  101381. #include <stdio.h>
  101382. #include <locale.h>
  101383. diff -Nur uClibc-0.9.33.2/test/locale/tst-langinfo.c uClibc-git/test/locale/tst-langinfo.c
  101384. --- uClibc-0.9.33.2/test/locale/tst-langinfo.c 2012-05-15 09:20:09.000000000 +0200
  101385. +++ uClibc-git/test/locale/tst-langinfo.c 2014-07-25 20:36:11.489359217 +0200
  101386. @@ -14,9 +14,8 @@
  101387. Lesser General Public License for more details.
  101388. You should have received a copy of the GNU Lesser General Public
  101389. - License along with the GNU C Library; if not, write to the Free
  101390. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101391. - 02111-1307 USA. */
  101392. + License along with the GNU C Library; if not, see
  101393. + <http://www.gnu.org/licenses/>. */
  101394. #include <langinfo.h>
  101395. #include <locale.h>
  101396. diff -Nur uClibc-0.9.33.2/test/locale/tst-langinfo.input uClibc-git/test/locale/tst-langinfo.input
  101397. --- uClibc-0.9.33.2/test/locale/tst-langinfo.input 2012-05-15 09:20:09.000000000 +0200
  101398. +++ uClibc-git/test/locale/tst-langinfo.input 2014-07-25 20:36:11.489359217 +0200
  101399. @@ -15,9 +15,8 @@
  101400. # Lesser General Public License for more details.
  101401. # You should have received a copy of the GNU Lesser General Public
  101402. -# License along with the GNU C Library; if not, write to the Free
  101403. -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101404. -# 02111-1307 USA.
  101405. +# License along with the GNU C Library; see the file COPYING.LIB. If
  101406. +# not, see <http://www.gnu.org/licenses/>.
  101407. # Run the test program.
  101408. diff -Nur uClibc-0.9.33.2/test/locale/tst-mbswcs1.c uClibc-git/test/locale/tst-mbswcs1.c
  101409. --- uClibc-0.9.33.2/test/locale/tst-mbswcs1.c 2012-05-15 09:20:09.000000000 +0200
  101410. +++ uClibc-git/test/locale/tst-mbswcs1.c 2014-07-25 20:36:11.489359217 +0200
  101411. @@ -14,9 +14,8 @@
  101412. Lesser General Public License for more details.
  101413. You should have received a copy of the GNU Lesser General Public
  101414. - License along with the GNU C Library; if not, write to the Free
  101415. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101416. - 02111-1307 USA. */
  101417. + License along with the GNU C Library; if not, see
  101418. + <http://www.gnu.org/licenses/>. */
  101419. #include <stdio.h>
  101420. #include <string.h>
  101421. diff -Nur uClibc-0.9.33.2/test/locale/tst-mbswcs2.c uClibc-git/test/locale/tst-mbswcs2.c
  101422. --- uClibc-0.9.33.2/test/locale/tst-mbswcs2.c 2012-05-15 09:20:09.000000000 +0200
  101423. +++ uClibc-git/test/locale/tst-mbswcs2.c 2014-07-25 20:36:11.489359217 +0200
  101424. @@ -14,9 +14,8 @@
  101425. Lesser General Public License for more details.
  101426. You should have received a copy of the GNU Lesser General Public
  101427. - License along with the GNU C Library; if not, write to the Free
  101428. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101429. - 02111-1307 USA. */
  101430. + License along with the GNU C Library; if not, see
  101431. + <http://www.gnu.org/licenses/>. */
  101432. #include <stdio.h>
  101433. #include <string.h>
  101434. diff -Nur uClibc-0.9.33.2/test/locale/tst-mbswcs3.c uClibc-git/test/locale/tst-mbswcs3.c
  101435. --- uClibc-0.9.33.2/test/locale/tst-mbswcs3.c 2012-05-15 09:20:09.000000000 +0200
  101436. +++ uClibc-git/test/locale/tst-mbswcs3.c 2014-07-25 20:36:11.489359217 +0200
  101437. @@ -14,9 +14,8 @@
  101438. Lesser General Public License for more details.
  101439. You should have received a copy of the GNU Lesser General Public
  101440. - License along with the GNU C Library; if not, write to the Free
  101441. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101442. - 02111-1307 USA. */
  101443. + License along with the GNU C Library; if not, see
  101444. + <http://www.gnu.org/licenses/>. */
  101445. #include <stdio.h>
  101446. #include <string.h>
  101447. diff -Nur uClibc-0.9.33.2/test/locale/tst-mbswcs4.c uClibc-git/test/locale/tst-mbswcs4.c
  101448. --- uClibc-0.9.33.2/test/locale/tst-mbswcs4.c 2012-05-15 09:20:09.000000000 +0200
  101449. +++ uClibc-git/test/locale/tst-mbswcs4.c 2014-07-25 20:36:11.489359217 +0200
  101450. @@ -13,9 +13,8 @@
  101451. Lesser General Public License for more details.
  101452. You should have received a copy of the GNU Lesser General Public
  101453. - License along with the GNU C Library; if not, write to the Free
  101454. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101455. - 02111-1307 USA. */
  101456. + License along with the GNU C Library; if not, see
  101457. + <http://www.gnu.org/licenses/>. */
  101458. #include <stdio.h>
  101459. #include <string.h>
  101460. diff -Nur uClibc-0.9.33.2/test/locale/tst-mbswcs5.c uClibc-git/test/locale/tst-mbswcs5.c
  101461. --- uClibc-0.9.33.2/test/locale/tst-mbswcs5.c 2012-05-15 09:20:09.000000000 +0200
  101462. +++ uClibc-git/test/locale/tst-mbswcs5.c 2014-07-25 20:36:11.489359217 +0200
  101463. @@ -14,9 +14,8 @@
  101464. Lesser General Public License for more details.
  101465. You should have received a copy of the GNU Lesser General Public
  101466. - License along with the GNU C Library; if not, write to the Free
  101467. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101468. - 02111-1307 USA. */
  101469. + License along with the GNU C Library; if not, see
  101470. + <http://www.gnu.org/licenses/>. */
  101471. #include <stdio.h>
  101472. #include <string.h>
  101473. diff -Nur uClibc-0.9.33.2/test/locale/tst-mbswcs6.c uClibc-git/test/locale/tst-mbswcs6.c
  101474. --- uClibc-0.9.33.2/test/locale/tst-mbswcs6.c 2012-05-15 09:20:09.000000000 +0200
  101475. +++ uClibc-git/test/locale/tst-mbswcs6.c 2014-07-25 20:36:11.489359217 +0200
  101476. @@ -14,9 +14,8 @@
  101477. Lesser General Public License for more details.
  101478. You should have received a copy of the GNU Lesser General Public
  101479. - License along with the GNU C Library; if not, write to the Free
  101480. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101481. - 02111-1307 USA. */
  101482. + License along with the GNU C Library; if not, see
  101483. + <http://www.gnu.org/licenses/>. */
  101484. #include <errno.h>
  101485. #include <locale.h>
  101486. diff -Nur uClibc-0.9.33.2/test/locale/tst-numeric.c uClibc-git/test/locale/tst-numeric.c
  101487. --- uClibc-0.9.33.2/test/locale/tst-numeric.c 2012-05-15 09:20:09.000000000 +0200
  101488. +++ uClibc-git/test/locale/tst-numeric.c 2014-07-25 20:36:11.489359217 +0200
  101489. @@ -16,9 +16,8 @@
  101490. Lesser General Public License for more details.
  101491. You should have received a copy of the GNU Lesser General Public
  101492. - License along with the GNU C Library; if not, write to the Free
  101493. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101494. - 02111-1307 USA. */
  101495. + License along with the GNU C Library; if not, see
  101496. + <http://www.gnu.org/licenses/>. */
  101497. #include <stdio.h>
  101498. #include <locale.h>
  101499. diff -Nur uClibc-0.9.33.2/test/locale/tst-rpmatch.c uClibc-git/test/locale/tst-rpmatch.c
  101500. --- uClibc-0.9.33.2/test/locale/tst-rpmatch.c 2012-05-15 09:20:09.000000000 +0200
  101501. +++ uClibc-git/test/locale/tst-rpmatch.c 2014-07-25 20:36:11.489359217 +0200
  101502. @@ -14,9 +14,8 @@
  101503. Lesser General Public License for more details.
  101504. You should have received a copy of the GNU Lesser General Public
  101505. - License along with the GNU C Library; if not, write to the Free
  101506. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101507. - 02111-1307 USA. */
  101508. + License along with the GNU C Library; if not, see
  101509. + <http://www.gnu.org/licenses/>. */
  101510. #include <locale.h>
  101511. #include <stdio.h>
  101512. diff -Nur uClibc-0.9.33.2/test/locale/tst-trans.c uClibc-git/test/locale/tst-trans.c
  101513. --- uClibc-0.9.33.2/test/locale/tst-trans.c 2012-05-15 09:20:09.000000000 +0200
  101514. +++ uClibc-git/test/locale/tst-trans.c 2014-07-25 20:36:11.489359217 +0200
  101515. @@ -14,9 +14,8 @@
  101516. Lesser General Public License for more details.
  101517. You should have received a copy of the GNU Lesser General Public
  101518. - License along with the GNU C Library; if not, write to the Free
  101519. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101520. - 02111-1307 USA. */
  101521. + License along with the GNU C Library; if not, see
  101522. + <http://www.gnu.org/licenses/>. */
  101523. #include <locale.h>
  101524. #include <stdio.h>
  101525. diff -Nur uClibc-0.9.33.2/test/locale/tst-wctype.c uClibc-git/test/locale/tst-wctype.c
  101526. --- uClibc-0.9.33.2/test/locale/tst-wctype.c 2012-05-15 09:20:09.000000000 +0200
  101527. +++ uClibc-git/test/locale/tst-wctype.c 2014-07-25 20:36:11.489359217 +0200
  101528. @@ -14,9 +14,8 @@
  101529. Lesser General Public License for more details.
  101530. You should have received a copy of the GNU Lesser General Public
  101531. - License along with the GNU C Library; if not, write to the Free
  101532. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101533. - 02111-1307 USA. */
  101534. + License along with the GNU C Library; if not, see
  101535. + <http://www.gnu.org/licenses/>. */
  101536. #include <error.h>
  101537. #include <locale.h>
  101538. diff -Nur uClibc-0.9.33.2/test/locale/xfrm-test.c uClibc-git/test/locale/xfrm-test.c
  101539. --- uClibc-0.9.33.2/test/locale/xfrm-test.c 2012-05-15 09:20:09.000000000 +0200
  101540. +++ uClibc-git/test/locale/xfrm-test.c 2014-07-25 20:36:11.489359217 +0200
  101541. @@ -14,9 +14,8 @@
  101542. Lesser General Public License for more details.
  101543. You should have received a copy of the GNU Lesser General Public
  101544. - License along with the GNU C Library; if not, write to the Free
  101545. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101546. - 02111-1307 USA. */
  101547. + License along with the GNU C Library; if not, see
  101548. + <http://www.gnu.org/licenses/>. */
  101549. #include <ctype.h>
  101550. #include <error.h>
  101551. diff -Nur uClibc-0.9.33.2/test/locale-mbwc/Makefile uClibc-git/test/locale-mbwc/Makefile
  101552. --- uClibc-0.9.33.2/test/locale-mbwc/Makefile 2012-05-15 09:20:09.000000000 +0200
  101553. +++ uClibc-git/test/locale-mbwc/Makefile 2014-07-25 20:36:11.469359112 +0200
  101554. @@ -2,6 +2,7 @@
  101555. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  101556. top_builddir=../../
  101557. +top_srcdir=../../
  101558. include ../Rules.mak
  101559. -include Makefile.in
  101560. include ../Test.mak
  101561. diff -Nur uClibc-0.9.33.2/test/Makefile uClibc-git/test/Makefile
  101562. --- uClibc-0.9.33.2/test/Makefile 2012-05-15 09:20:09.000000000 +0200
  101563. +++ uClibc-git/test/Makefile 2014-07-25 20:36:10.745355319 +0200
  101564. @@ -5,6 +5,7 @@
  101565. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  101566. #
  101567. +top_srcdir=../
  101568. top_builddir=../
  101569. include Rules.mak
  101570. @@ -46,9 +47,9 @@
  101571. run: compile subdirs_run
  101572. -compile: $(top_builddir)/$(LOCAL_INSTALL_PATH) subdirs_compile
  101573. +compile: $(top_builddir)$(LOCAL_INSTALL_PATH) subdirs_compile
  101574. -$(top_builddir)/$(LOCAL_INSTALL_PATH):
  101575. +$(top_builddir)$(LOCAL_INSTALL_PATH):
  101576. $(Q)$(MAKE) -C $(top_builddir) $(LOCAL_INSTALL_PATH)
  101577. tags:
  101578. @@ -62,13 +63,16 @@
  101579. subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
  101580. $(patsubst %, _dir_%, $(DIRS)) : dummy
  101581. - $(Q)$(MAKE) -C $(patsubst _dir_%, %, $@)
  101582. + $(Q)$(MAKE) -C $(patsubst _dir_%, %, $@) \
  101583. + KCONFIG_CONFIG=$(KCONFIG_CONFIG)
  101584. $(patsubst %, _dirrun_%, $(DIRS)) : dummy
  101585. - $(Q)$(MAKE) -C $(patsubst _dirrun_%, %, $@) run
  101586. + $(Q)$(MAKE) -C $(patsubst _dirrun_%, %, $@) run \
  101587. + KCONFIG_CONFIG=$(KCONFIG_CONFIG)
  101588. $(patsubst %, _dircompile_%, $(DIRS)) : dummy
  101589. - $(Q)$(MAKE) -C $(patsubst _dircompile_%, %, $@) compile
  101590. + $(Q)$(MAKE) -C $(patsubst _dircompile_%, %, $@) compile \
  101591. + KCONFIG_CONFIG=$(KCONFIG_CONFIG)
  101592. $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
  101593. $(Q)$(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
  101594. diff -Nur uClibc-0.9.33.2/test/malloc/Makefile uClibc-git/test/malloc/Makefile
  101595. --- uClibc-0.9.33.2/test/malloc/Makefile 2012-05-15 09:20:09.000000000 +0200
  101596. +++ uClibc-git/test/malloc/Makefile 2014-07-25 20:36:11.501359280 +0200
  101597. @@ -2,6 +2,7 @@
  101598. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  101599. top_builddir=../../
  101600. +top_srcdir=../../
  101601. include ../Rules.mak
  101602. -include Makefile.in
  101603. include ../Test.mak
  101604. diff -Nur uClibc-0.9.33.2/test/malloc/Makefile.in uClibc-git/test/malloc/Makefile.in
  101605. --- uClibc-0.9.33.2/test/malloc/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  101606. +++ uClibc-git/test/malloc/Makefile.in 2014-07-25 20:36:11.501359280 +0200
  101607. @@ -2,3 +2,11 @@
  101608. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  101609. TESTS_DISABLED := time_malloc
  101610. +
  101611. +ifneq ($(UCLIBC_SUSV2_LEGACY),y)
  101612. +TESTS_DISABLED += tst-valloc
  101613. +endif
  101614. +
  101615. +ifneq ($(UCLIBC_HAS_OBSTACK),y)
  101616. +TESTS_DISABLED += tst-obstack
  101617. +endif
  101618. diff -Nur uClibc-0.9.33.2/test/malloc/tst-calloc.c uClibc-git/test/malloc/tst-calloc.c
  101619. --- uClibc-0.9.33.2/test/malloc/tst-calloc.c 2012-05-15 09:20:09.000000000 +0200
  101620. +++ uClibc-git/test/malloc/tst-calloc.c 2014-07-25 20:36:11.505359301 +0200
  101621. @@ -13,9 +13,8 @@
  101622. Lesser General Public License for more details.
  101623. You should have received a copy of the GNU Lesser General Public
  101624. - License along with the GNU C Library; if not, write to the Free
  101625. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101626. - 02111-1307 USA. */
  101627. + License along with the GNU C Library; if not, see
  101628. + <http://www.gnu.org/licenses/>. */
  101629. #include <errno.h>
  101630. #include <limits.h>
  101631. diff -Nur uClibc-0.9.33.2/test/malloc/tst-malloc.c uClibc-git/test/malloc/tst-malloc.c
  101632. --- uClibc-0.9.33.2/test/malloc/tst-malloc.c 2012-05-15 09:20:09.000000000 +0200
  101633. +++ uClibc-git/test/malloc/tst-malloc.c 2014-07-25 20:36:11.505359301 +0200
  101634. @@ -13,9 +13,8 @@
  101635. Lesser General Public License for more details.
  101636. You should have received a copy of the GNU Lesser General Public
  101637. - License along with the GNU C Library; if not, write to the Free
  101638. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101639. - 02111-1307 USA. */
  101640. + License along with the GNU C Library; if not, see
  101641. + <http://www.gnu.org/licenses/>. */
  101642. #include <errno.h>
  101643. #include <malloc.h>
  101644. diff -Nur uClibc-0.9.33.2/test/malloc/tst-mcheck.c uClibc-git/test/malloc/tst-mcheck.c
  101645. --- uClibc-0.9.33.2/test/malloc/tst-mcheck.c 2012-05-15 09:20:09.000000000 +0200
  101646. +++ uClibc-git/test/malloc/tst-mcheck.c 2014-07-25 20:36:11.505359301 +0200
  101647. @@ -13,9 +13,8 @@
  101648. Lesser General Public License for more details.
  101649. You should have received a copy of the GNU Lesser General Public
  101650. - License along with the GNU C Library; if not, write to the Free
  101651. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101652. - 02111-1307 USA. */
  101653. + License along with the GNU C Library; if not, see
  101654. + <http://www.gnu.org/licenses/>. */
  101655. #include <errno.h>
  101656. #include <stdio.h>
  101657. diff -Nur uClibc-0.9.33.2/test/malloc/tst-obstack.c uClibc-git/test/malloc/tst-obstack.c
  101658. --- uClibc-0.9.33.2/test/malloc/tst-obstack.c 2012-05-15 09:20:09.000000000 +0200
  101659. +++ uClibc-git/test/malloc/tst-obstack.c 2014-07-25 20:36:11.505359301 +0200
  101660. @@ -1,4 +1,8 @@
  101661. -/* Test case by Alexandre Duret-Lutz <duret_g@epita.fr>. */
  101662. +/* Test case by Alexandre Duret-Lutz <duret_g@epita.fr>.
  101663. + * test_obstack_printf() added by Anthony G. Basile <blueness.gentoo.org>.
  101664. + */
  101665. +
  101666. +#include <features.h>
  101667. #include <obstack.h>
  101668. #include <stdint.h>
  101669. #include <stdio.h>
  101670. @@ -26,7 +30,7 @@
  101671. }
  101672. int
  101673. -main (void)
  101674. +test_obstack_alloc (void)
  101675. {
  101676. int result = 0;
  101677. int align = 2;
  101678. @@ -62,3 +66,39 @@
  101679. return result;
  101680. }
  101681. +
  101682. +int
  101683. +test_obstack_printf (void)
  101684. +{
  101685. + int result = 0;
  101686. + int n;
  101687. + char *s;
  101688. + struct obstack ob;
  101689. +
  101690. + obstack_init (&ob);
  101691. +
  101692. + n = obstack_printf (&ob, "%s%d%c", "testing 1 ... 2 ... ", 3, '\n');
  101693. + result |= (n != 22);
  101694. + printf("obstack_printf => %d\n", n);
  101695. +
  101696. + n = obstack_printf (&ob, "%s%d%c", "testing 3 ... 2 ... ", 1, '\0');
  101697. + result |= (n != 22);
  101698. + printf("obstack_printf => %d\n", n);
  101699. +
  101700. + s = obstack_finish (&ob);
  101701. + printf("obstack_printf => %s\n", s);
  101702. + obstack_free (&ob, NULL);
  101703. +
  101704. + return result;
  101705. +}
  101706. +
  101707. +int
  101708. +main (void)
  101709. +{
  101710. + int result = 0;
  101711. +
  101712. + result |= test_obstack_alloc();
  101713. + result |= test_obstack_printf();
  101714. +
  101715. + return result;
  101716. +}
  101717. diff -Nur uClibc-0.9.33.2/test/math/basic-test.c uClibc-git/test/math/basic-test.c
  101718. --- uClibc-0.9.33.2/test/math/basic-test.c 2012-05-15 09:20:09.000000000 +0200
  101719. +++ uClibc-git/test/math/basic-test.c 2014-07-25 20:36:11.517359363 +0200
  101720. @@ -13,9 +13,8 @@
  101721. Lesser General Public License for more details.
  101722. You should have received a copy of the GNU Lesser General Public
  101723. - License along with the GNU C Library; if not, write to the Free
  101724. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101725. - 02111-1307 USA. */
  101726. + License along with the GNU C Library; if not, see
  101727. + <http://www.gnu.org/licenses/>. */
  101728. #define _ISOC99_SOURCE
  101729. @@ -65,11 +64,6 @@
  101730. check (#FLOAT " !isnan (1)", !(isnan (one_var))); \
  101731. check (#FLOAT " !isnan (inf)", !(isnan (Inf_var))); \
  101732. \
  101733. - check (#FLOAT " inf == inf", Inf_var == Inf_var); \
  101734. - check (#FLOAT " -inf == -inf", -Inf_var == -Inf_var); \
  101735. - check (#FLOAT " inf != -inf", Inf_var != -Inf_var); \
  101736. - check (#FLOAT " NaN != NaN", NaN_var != NaN_var); \
  101737. - \
  101738. /* \
  101739. the same tests but this time with NAN from <bits/nan.h> \
  101740. NAN is a double const \
  101741. @@ -78,7 +72,6 @@
  101742. check (#FLOAT " isnan (-NAN)", isnan (-NAN)); \
  101743. check (#FLOAT " !isinf (NAN)", !(isinf (NAN))); \
  101744. check (#FLOAT " !isinf (-NAN)", !(isinf (-NAN))); \
  101745. - check (#FLOAT " NAN != NAN", NAN != NAN); \
  101746. \
  101747. /* \
  101748. And again with the value returned by the `nan' function. \
  101749. @@ -89,6 +82,48 @@
  101750. check (#FLOAT " !isinf (-NAN)", !(isinf (-NANFUNC ("")))); \
  101751. check (#FLOAT " NAN != NAN", NANFUNC ("") != NANFUNC ("")); \
  101752. \
  101753. + /* test if HUGE_VALx is ok */ \
  101754. + x1 = HUGEVAL; \
  101755. + check (#FLOAT " isinf (HUGE_VALx) == +1", isinf (x1) == +1); \
  101756. + x1 = - HUGEVAL; \
  101757. + check (#FLOAT " isinf (-HUGE_VALx) == -1", isinf (x1) == -1); \
  101758. +}
  101759. +#ifndef DO_C99_MATH
  101760. +# undef TEST_FUNC
  101761. +# define TEST_FUNC(NAME, FLOAT, NANFUNC, EPSILON, HUGEVAL) \
  101762. +static void \
  101763. +NAME(void) \
  101764. +{ /* nothing */ }
  101765. +#endif
  101766. +
  101767. +#define TEST_VAL(NAME, FLOAT, NANFUNC, EPSILON, HUGEVAL) \
  101768. +static void \
  101769. +NAME (void) \
  101770. +{ \
  101771. + /* Variables are declared volatile to forbid some compiler \
  101772. + optimizations. */ \
  101773. + volatile FLOAT Inf_var, NaN_var, zero_var, one_var; \
  101774. + FLOAT x1, x2; \
  101775. + \
  101776. + zero_var = 0.0; \
  101777. + one_var = 1.0; \
  101778. + NaN_var = zero_var/zero_var; \
  101779. + Inf_var = one_var / zero_var; \
  101780. + \
  101781. + (void) &zero_var; \
  101782. + (void) &one_var; \
  101783. + (void) &NaN_var; \
  101784. + (void) &Inf_var; \
  101785. + \
  101786. + \
  101787. + check (#FLOAT " inf == inf", Inf_var == Inf_var); \
  101788. + check (#FLOAT " -inf == -inf", -Inf_var == -Inf_var); \
  101789. + check (#FLOAT " inf != -inf", Inf_var != -Inf_var); \
  101790. + check (#FLOAT " NaN != NaN", NaN_var != NaN_var); \
  101791. + \
  101792. + check (#FLOAT " NAN != NAN", NAN != NAN); \
  101793. + \
  101794. + \
  101795. /* test if EPSILON is ok */ \
  101796. x1 = 1.0; \
  101797. x2 = x1 + EPSILON; \
  101798. @@ -98,27 +133,28 @@
  101799. x2 = x1 - EPSILON; \
  101800. check (#FLOAT " 1 != 1-EPSILON", x1 != x2); \
  101801. \
  101802. - /* test if HUGE_VALx is ok */ \
  101803. - x1 = HUGEVAL; \
  101804. - check (#FLOAT " isinf (HUGE_VALx) == +1", isinf (x1) == +1); \
  101805. - x1 = - HUGEVAL; \
  101806. - check (#FLOAT " isinf (-HUGE_VALx) == -1", isinf (x1) == -1); \
  101807. }
  101808. -TEST_FUNC (float_test, float, nanf, FLT_EPSILON, HUGE_VALF)
  101809. -TEST_FUNC (double_test, double, nan, DBL_EPSILON, HUGE_VAL)
  101810. +TEST_VAL (float_test_value, float, nanf, FLT_EPSILON, HUGE_VALF)
  101811. +TEST_FUNC (float_test_call, float, nanf, FLT_EPSILON, HUGE_VALF)
  101812. +TEST_VAL (double_test_value, double, nan, DBL_EPSILON, HUGE_VAL)
  101813. +TEST_FUNC (double_test_call, double, nan, DBL_EPSILON, HUGE_VAL)
  101814. #ifndef NO_LONG_DOUBLE
  101815. -TEST_FUNC (ldouble_test, long double, nanl, LDBL_EPSILON, HUGE_VALL)
  101816. +TEST_VAL (ldouble_test_value, long double, nanl, LDBL_EPSILON, HUGE_VALL)
  101817. +TEST_FUNC (ldouble_test_call, long double, nanl, LDBL_EPSILON, HUGE_VALL)
  101818. #endif
  101819. int
  101820. main (void)
  101821. {
  101822. - float_test ();
  101823. - double_test ();
  101824. + float_test_value ();
  101825. + float_test_call ();
  101826. + double_test_value ();
  101827. + double_test_call ();
  101828. #ifndef NO_LONG_DOUBLE
  101829. - ldouble_test ();
  101830. + ldouble_test_value ();
  101831. + ldouble_test_call ();
  101832. #endif
  101833. return errors != 0;
  101834. diff -Nur uClibc-0.9.33.2/test/math/gen-libm-test.pl uClibc-git/test/math/gen-libm-test.pl
  101835. --- uClibc-0.9.33.2/test/math/gen-libm-test.pl 2012-05-15 09:20:09.000000000 +0200
  101836. +++ uClibc-git/test/math/gen-libm-test.pl 2014-07-25 20:36:11.517359363 +0200
  101837. @@ -14,9 +14,8 @@
  101838. # Lesser General Public License for more details.
  101839. # You should have received a copy of the GNU Lesser General Public
  101840. -# License along with the GNU C Library; if not, write to the Free
  101841. -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101842. -# 02111-1307 USA.
  101843. +# License along with the GNU C Library; see the file COPYING.LIB. If
  101844. +# not, see <http://www.gnu.org/licenses/>.
  101845. # This file needs to be tidied up
  101846. # Note that functions and tests share the same namespace.
  101847. diff -Nur uClibc-0.9.33.2/test/math/libm-test.inc uClibc-git/test/math/libm-test.inc
  101848. --- uClibc-0.9.33.2/test/math/libm-test.inc 2012-05-15 09:20:09.000000000 +0200
  101849. +++ uClibc-git/test/math/libm-test.inc 2014-07-25 20:36:11.517359363 +0200
  101850. @@ -13,9 +13,8 @@
  101851. Lesser General Public License for more details.
  101852. You should have received a copy of the GNU Lesser General Public
  101853. - License along with the GNU C Library; if not, write to the Free
  101854. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  101855. - 02111-1307 USA. */
  101856. + License along with the GNU C Library; if not, see
  101857. + <http://www.gnu.org/licenses/>. */
  101858. /* Part of testsuite for libm.
  101859. diff -Nur uClibc-0.9.33.2/test/math/libm-test-ulps-arm uClibc-git/test/math/libm-test-ulps-arm
  101860. --- uClibc-0.9.33.2/test/math/libm-test-ulps-arm 1970-01-01 01:00:00.000000000 +0100
  101861. +++ uClibc-git/test/math/libm-test-ulps-arm 2014-07-25 20:36:11.517359363 +0200
  101862. @@ -0,0 +1,4981 @@
  101863. +# Begin of automatic generation
  101864. +
  101865. +# acos_downward
  101866. +Test "acos_downward (-0)":
  101867. +float: 1
  101868. +ifloat: 1
  101869. +Test "acos_downward (-0.5)":
  101870. +double: 1
  101871. +idouble: 1
  101872. +Test "acos_downward (-1)":
  101873. +float: 1
  101874. +ifloat: 1
  101875. +Test "acos_downward (0)":
  101876. +float: 1
  101877. +ifloat: 1
  101878. +Test "acos_downward (0.5)":
  101879. +double: 1
  101880. +float: 1
  101881. +idouble: 1
  101882. +ifloat: 1
  101883. +
  101884. +# acos_towardzero
  101885. +Test "acos_towardzero (-0)":
  101886. +float: 1
  101887. +ifloat: 1
  101888. +Test "acos_towardzero (-0.5)":
  101889. +double: 1
  101890. +idouble: 1
  101891. +Test "acos_towardzero (-1)":
  101892. +float: 1
  101893. +ifloat: 1
  101894. +Test "acos_towardzero (0)":
  101895. +float: 1
  101896. +ifloat: 1
  101897. +Test "acos_towardzero (0.5)":
  101898. +double: 1
  101899. +float: 1
  101900. +idouble: 1
  101901. +ifloat: 1
  101902. +
  101903. +# asin_downward
  101904. +Test "asin_downward (-0.5)":
  101905. +double: 1
  101906. +idouble: 1
  101907. +Test "asin_downward (0.5)":
  101908. +double: 1
  101909. +idouble: 1
  101910. +Test "asin_downward (1.0)":
  101911. +float: 1
  101912. +ifloat: 1
  101913. +
  101914. +# asin_towardzero
  101915. +Test "asin_towardzero (-0.5)":
  101916. +double: 1
  101917. +idouble: 1
  101918. +Test "asin_towardzero (-1.0)":
  101919. +float: 1
  101920. +ifloat: 1
  101921. +Test "asin_towardzero (0.5)":
  101922. +double: 1
  101923. +idouble: 1
  101924. +Test "asin_towardzero (1.0)":
  101925. +float: 1
  101926. +ifloat: 1
  101927. +
  101928. +# asin_upward
  101929. +Test "asin_upward (-1.0)":
  101930. +float: 1
  101931. +ifloat: 1
  101932. +
  101933. +# atan2
  101934. +Test "atan2 (-0.75, -1.0)":
  101935. +float: 1
  101936. +ifloat: 1
  101937. +Test "atan2 (-max_value, -min_value)":
  101938. +float: 1
  101939. +ifloat: 1
  101940. +Test "atan2 (0.75, -1.0)":
  101941. +float: 1
  101942. +ifloat: 1
  101943. +Test "atan2 (1.390625, 0.9296875)":
  101944. +float: 1
  101945. +ifloat: 1
  101946. +
  101947. +# atanh
  101948. +Test "atanh (0.75)":
  101949. +float: 1
  101950. +ifloat: 1
  101951. +
  101952. +# cacos
  101953. +Test "Imaginary part of: cacos (+0 + 0.5 i)":
  101954. +float: 1
  101955. +ifloat: 1
  101956. +Test "Imaginary part of: cacos (+0 + 1.0 i)":
  101957. +double: 1
  101958. +float: 1
  101959. +idouble: 1
  101960. +ifloat: 1
  101961. +Test "Imaginary part of: cacos (+0 + 1.5 i)":
  101962. +double: 1
  101963. +idouble: 1
  101964. +Test "Imaginary part of: cacos (+0 - 0.5 i)":
  101965. +float: 1
  101966. +ifloat: 1
  101967. +Test "Imaginary part of: cacos (+0 - 1.0 i)":
  101968. +double: 1
  101969. +float: 1
  101970. +idouble: 1
  101971. +ifloat: 1
  101972. +Test "Imaginary part of: cacos (+0 - 1.5 i)":
  101973. +double: 1
  101974. +idouble: 1
  101975. +Test "Imaginary part of: cacos (-0 + 0.5 i)":
  101976. +float: 1
  101977. +ifloat: 1
  101978. +Test "Imaginary part of: cacos (-0 + 1.0 i)":
  101979. +double: 1
  101980. +float: 1
  101981. +idouble: 1
  101982. +ifloat: 1
  101983. +Test "Imaginary part of: cacos (-0 + 1.5 i)":
  101984. +double: 1
  101985. +idouble: 1
  101986. +Test "Imaginary part of: cacos (-0 - 0.5 i)":
  101987. +float: 1
  101988. +ifloat: 1
  101989. +Test "Imaginary part of: cacos (-0 - 1.0 i)":
  101990. +double: 1
  101991. +float: 1
  101992. +idouble: 1
  101993. +ifloat: 1
  101994. +Test "Imaginary part of: cacos (-0 - 1.5 i)":
  101995. +double: 1
  101996. +idouble: 1
  101997. +Test "Real part of: cacos (-0.25 + 1.0 i)":
  101998. +double: 1
  101999. +float: 1
  102000. +idouble: 1
  102001. +ifloat: 1
  102002. +Test "Imaginary part of: cacos (-0.25 + 1.0 i)":
  102003. +float: 1
  102004. +ifloat: 1
  102005. +Test "Real part of: cacos (-0.25 - 1.0 i)":
  102006. +double: 1
  102007. +float: 1
  102008. +idouble: 1
  102009. +ifloat: 1
  102010. +Test "Imaginary part of: cacos (-0.25 - 1.0 i)":
  102011. +float: 1
  102012. +ifloat: 1
  102013. +Test "Imaginary part of: cacos (-0.5 + 0x1.fp-129 i)":
  102014. +double: 1
  102015. +idouble: 1
  102016. +Test "Imaginary part of: cacos (-0.5 + 0x1p-105 i)":
  102017. +double: 1
  102018. +idouble: 1
  102019. +Test "Imaginary part of: cacos (-0.5 + 0x1p-112 i)":
  102020. +double: 1
  102021. +idouble: 1
  102022. +Test "Imaginary part of: cacos (-0.5 + 0x1p-23 i)":
  102023. +double: 1
  102024. +idouble: 1
  102025. +Test "Real part of: cacos (-0.5 + 1.0 i)":
  102026. +float: 1
  102027. +ifloat: 1
  102028. +Test "Imaginary part of: cacos (-0.5 + 1.0 i)":
  102029. +double: 1
  102030. +idouble: 1
  102031. +Test "Imaginary part of: cacos (-0.5 - 0x1.fp-129 i)":
  102032. +double: 1
  102033. +idouble: 1
  102034. +Test "Imaginary part of: cacos (-0.5 - 0x1p-105 i)":
  102035. +double: 1
  102036. +idouble: 1
  102037. +Test "Imaginary part of: cacos (-0.5 - 0x1p-112 i)":
  102038. +double: 1
  102039. +idouble: 1
  102040. +Test "Imaginary part of: cacos (-0.5 - 0x1p-23 i)":
  102041. +double: 1
  102042. +idouble: 1
  102043. +Test "Real part of: cacos (-0.5 - 1.0 i)":
  102044. +float: 1
  102045. +ifloat: 1
  102046. +Test "Imaginary part of: cacos (-0.5 - 1.0 i)":
  102047. +double: 1
  102048. +idouble: 1
  102049. +Test "Imaginary part of: cacos (-0x0.fffffffffffff8p0 + 0x1p-52 i)":
  102050. +double: 1
  102051. +idouble: 1
  102052. +Test "Imaginary part of: cacos (-0x0.fffffffffffff8p0 - 0x1p-52 i)":
  102053. +double: 1
  102054. +idouble: 1
  102055. +Test "Imaginary part of: cacos (-0x0.ffffffp0 + 0x1p-23 i)":
  102056. +float: 2
  102057. +ifloat: 2
  102058. +Test "Imaginary part of: cacos (-0x0.ffffffp0 - 0x1p-23 i)":
  102059. +float: 2
  102060. +ifloat: 2
  102061. +Test "Imaginary part of: cacos (-0x1.000002p0 + 0x1p-23 i)":
  102062. +float: 1
  102063. +ifloat: 1
  102064. +Test "Imaginary part of: cacos (-0x1.000002p0 - 0x1p-23 i)":
  102065. +float: 1
  102066. +ifloat: 1
  102067. +Test "Imaginary part of: cacos (-0x1.fp-10 + 1.0 i)":
  102068. +double: 1
  102069. +idouble: 1
  102070. +Test "Imaginary part of: cacos (-0x1.fp-10 - 1.0 i)":
  102071. +double: 1
  102072. +idouble: 1
  102073. +Test "Real part of: cacos (-0x1.fp-100 + 1.0 i)":
  102074. +float: 1
  102075. +ifloat: 1
  102076. +Test "Imaginary part of: cacos (-0x1.fp-100 + 1.0 i)":
  102077. +double: 1
  102078. +float: 1
  102079. +idouble: 1
  102080. +ifloat: 1
  102081. +Test "Real part of: cacos (-0x1.fp-100 - 1.0 i)":
  102082. +float: 1
  102083. +ifloat: 1
  102084. +Test "Imaginary part of: cacos (-0x1.fp-100 - 1.0 i)":
  102085. +double: 1
  102086. +float: 1
  102087. +idouble: 1
  102088. +ifloat: 1
  102089. +Test "Imaginary part of: cacos (-0x1.fp-1000 + 1.0 i)":
  102090. +double: 1
  102091. +idouble: 1
  102092. +Test "Imaginary part of: cacos (-0x1.fp-1000 - 1.0 i)":
  102093. +double: 1
  102094. +idouble: 1
  102095. +Test "Imaginary part of: cacos (-0x1.fp-1025 + 1.0 i)":
  102096. +double: 1
  102097. +idouble: 1
  102098. +Test "Imaginary part of: cacos (-0x1.fp-1025 + 1.5 i)":
  102099. +double: 1
  102100. +idouble: 1
  102101. +Test "Imaginary part of: cacos (-0x1.fp-1025 - 1.0 i)":
  102102. +double: 1
  102103. +idouble: 1
  102104. +Test "Imaginary part of: cacos (-0x1.fp-1025 - 1.5 i)":
  102105. +double: 1
  102106. +idouble: 1
  102107. +Test "Real part of: cacos (-0x1.fp-129 + 0.5 i)":
  102108. +float: 1
  102109. +ifloat: 1
  102110. +Test "Imaginary part of: cacos (-0x1.fp-129 + 0.5 i)":
  102111. +float: 1
  102112. +ifloat: 1
  102113. +Test "Real part of: cacos (-0x1.fp-129 + 0x0.ffffffp0 i)":
  102114. +float: 1
  102115. +ifloat: 1
  102116. +Test "Real part of: cacos (-0x1.fp-129 + 0x1.000002p0 i)":
  102117. +float: 1
  102118. +ifloat: 1
  102119. +Test "Real part of: cacos (-0x1.fp-129 + 0x1.fp-129 i)":
  102120. +float: 1
  102121. +ifloat: 1
  102122. +Test "Real part of: cacos (-0x1.fp-129 + 0x1p-23 i)":
  102123. +float: 1
  102124. +ifloat: 1
  102125. +Test "Real part of: cacos (-0x1.fp-129 + 1.0 i)":
  102126. +float: 1
  102127. +ifloat: 1
  102128. +Test "Imaginary part of: cacos (-0x1.fp-129 + 1.0 i)":
  102129. +double: 1
  102130. +float: 1
  102131. +idouble: 1
  102132. +ifloat: 1
  102133. +Test "Real part of: cacos (-0x1.fp-129 + 1.5 i)":
  102134. +float: 1
  102135. +ifloat: 1
  102136. +Test "Imaginary part of: cacos (-0x1.fp-129 + 1.5 i)":
  102137. +double: 1
  102138. +idouble: 1
  102139. +Test "Real part of: cacos (-0x1.fp-129 - 0.5 i)":
  102140. +float: 1
  102141. +ifloat: 1
  102142. +Test "Imaginary part of: cacos (-0x1.fp-129 - 0.5 i)":
  102143. +float: 1
  102144. +ifloat: 1
  102145. +Test "Real part of: cacos (-0x1.fp-129 - 0x0.ffffffp0 i)":
  102146. +float: 1
  102147. +ifloat: 1
  102148. +Test "Real part of: cacos (-0x1.fp-129 - 0x1.000002p0 i)":
  102149. +float: 1
  102150. +ifloat: 1
  102151. +Test "Real part of: cacos (-0x1.fp-129 - 0x1.fp-129 i)":
  102152. +float: 1
  102153. +ifloat: 1
  102154. +Test "Real part of: cacos (-0x1.fp-129 - 0x1p-23 i)":
  102155. +float: 1
  102156. +ifloat: 1
  102157. +Test "Real part of: cacos (-0x1.fp-129 - 1.0 i)":
  102158. +float: 1
  102159. +ifloat: 1
  102160. +Test "Imaginary part of: cacos (-0x1.fp-129 - 1.0 i)":
  102161. +double: 1
  102162. +float: 1
  102163. +idouble: 1
  102164. +ifloat: 1
  102165. +Test "Real part of: cacos (-0x1.fp-129 - 1.5 i)":
  102166. +float: 1
  102167. +ifloat: 1
  102168. +Test "Imaginary part of: cacos (-0x1.fp-129 - 1.5 i)":
  102169. +double: 1
  102170. +idouble: 1
  102171. +Test "Real part of: cacos (-0x1.fp-30 + 1.0 i)":
  102172. +float: 1
  102173. +ifloat: 1
  102174. +Test "Imaginary part of: cacos (-0x1.fp-30 + 1.0 i)":
  102175. +double: 1
  102176. +float: 1
  102177. +idouble: 1
  102178. +ifloat: 1
  102179. +Test "Real part of: cacos (-0x1.fp-30 - 1.0 i)":
  102180. +float: 1
  102181. +ifloat: 1
  102182. +Test "Imaginary part of: cacos (-0x1.fp-30 - 1.0 i)":
  102183. +double: 1
  102184. +float: 1
  102185. +idouble: 1
  102186. +ifloat: 1
  102187. +Test "Real part of: cacos (-0x1p-105 + 0.0 i)":
  102188. +float: 1
  102189. +ifloat: 1
  102190. +Test "Real part of: cacos (-0x1p-105 + 0.5 i)":
  102191. +float: 1
  102192. +ifloat: 1
  102193. +Test "Imaginary part of: cacos (-0x1p-105 + 0.5 i)":
  102194. +float: 1
  102195. +ifloat: 1
  102196. +Test "Real part of: cacos (-0x1p-105 + 0x1p-105 i)":
  102197. +float: 1
  102198. +ifloat: 1
  102199. +Test "Real part of: cacos (-0x1p-105 - 0.0 i)":
  102200. +float: 1
  102201. +ifloat: 1
  102202. +Test "Real part of: cacos (-0x1p-105 - 0.5 i)":
  102203. +float: 1
  102204. +ifloat: 1
  102205. +Test "Imaginary part of: cacos (-0x1p-105 - 0.5 i)":
  102206. +float: 1
  102207. +ifloat: 1
  102208. +Test "Real part of: cacos (-0x1p-105 - 0x1p-105 i)":
  102209. +float: 1
  102210. +ifloat: 1
  102211. +Test "Real part of: cacos (-0x1p-112 + 0.0 i)":
  102212. +float: 1
  102213. +ifloat: 1
  102214. +Test "Real part of: cacos (-0x1p-112 + 0.5 i)":
  102215. +float: 1
  102216. +ifloat: 1
  102217. +Test "Imaginary part of: cacos (-0x1p-112 + 0.5 i)":
  102218. +float: 1
  102219. +ifloat: 1
  102220. +Test "Real part of: cacos (-0x1p-112 + 0x1p-112 i)":
  102221. +float: 1
  102222. +ifloat: 1
  102223. +Test "Real part of: cacos (-0x1p-112 - 0.0 i)":
  102224. +float: 1
  102225. +ifloat: 1
  102226. +Test "Real part of: cacos (-0x1p-112 - 0.5 i)":
  102227. +float: 1
  102228. +ifloat: 1
  102229. +Test "Imaginary part of: cacos (-0x1p-112 - 0.5 i)":
  102230. +float: 1
  102231. +ifloat: 1
  102232. +Test "Real part of: cacos (-0x1p-112 - 0x1p-112 i)":
  102233. +float: 1
  102234. +ifloat: 1
  102235. +Test "Real part of: cacos (-0x1p-23 + 0.0 i)":
  102236. +float: 1
  102237. +ifloat: 1
  102238. +Test "Real part of: cacos (-0x1p-23 + 0.5 i)":
  102239. +float: 1
  102240. +ifloat: 1
  102241. +Test "Imaginary part of: cacos (-0x1p-23 + 0.5 i)":
  102242. +float: 1
  102243. +ifloat: 1
  102244. +Test "Imaginary part of: cacos (-0x1p-23 + 0x0.ffffffp0 i)":
  102245. +double: 1
  102246. +idouble: 1
  102247. +Test "Real part of: cacos (-0x1p-23 + 0x1.fp-129 i)":
  102248. +float: 1
  102249. +ifloat: 1
  102250. +Test "Real part of: cacos (-0x1p-23 + 0x1p-23 i)":
  102251. +float: 1
  102252. +ifloat: 1
  102253. +Test "Real part of: cacos (-0x1p-23 - 0.0 i)":
  102254. +float: 1
  102255. +ifloat: 1
  102256. +Test "Real part of: cacos (-0x1p-23 - 0.5 i)":
  102257. +float: 1
  102258. +ifloat: 1
  102259. +Test "Imaginary part of: cacos (-0x1p-23 - 0.5 i)":
  102260. +float: 1
  102261. +ifloat: 1
  102262. +Test "Imaginary part of: cacos (-0x1p-23 - 0x0.ffffffp0 i)":
  102263. +double: 1
  102264. +idouble: 1
  102265. +Test "Real part of: cacos (-0x1p-23 - 0x1.fp-129 i)":
  102266. +float: 1
  102267. +ifloat: 1
  102268. +Test "Real part of: cacos (-0x1p-23 - 0x1p-23 i)":
  102269. +float: 1
  102270. +ifloat: 1
  102271. +Test "Real part of: cacos (-0x1p-52 + 0.0 i)":
  102272. +float: 1
  102273. +ifloat: 1
  102274. +Test "Real part of: cacos (-0x1p-52 + 0.5 i)":
  102275. +float: 1
  102276. +ifloat: 1
  102277. +Test "Imaginary part of: cacos (-0x1p-52 + 0.5 i)":
  102278. +float: 1
  102279. +ifloat: 1
  102280. +Test "Real part of: cacos (-0x1p-52 + 0x1p-52 i)":
  102281. +float: 1
  102282. +ifloat: 1
  102283. +Test "Real part of: cacos (-0x1p-52 - 0.0 i)":
  102284. +float: 1
  102285. +ifloat: 1
  102286. +Test "Real part of: cacos (-0x1p-52 - 0.5 i)":
  102287. +float: 1
  102288. +ifloat: 1
  102289. +Test "Imaginary part of: cacos (-0x1p-52 - 0.5 i)":
  102290. +float: 1
  102291. +ifloat: 1
  102292. +Test "Real part of: cacos (-0x1p-52 - 0x1p-52 i)":
  102293. +float: 1
  102294. +ifloat: 1
  102295. +Test "Real part of: cacos (-0x1p-63 + 0.0 i)":
  102296. +float: 1
  102297. +ifloat: 1
  102298. +Test "Real part of: cacos (-0x1p-63 + 0.5 i)":
  102299. +float: 1
  102300. +ifloat: 1
  102301. +Test "Imaginary part of: cacos (-0x1p-63 + 0.5 i)":
  102302. +float: 1
  102303. +ifloat: 1
  102304. +Test "Real part of: cacos (-0x1p-63 + 0x1p-63 i)":
  102305. +float: 1
  102306. +ifloat: 1
  102307. +Test "Real part of: cacos (-0x1p-63 - 0.0 i)":
  102308. +float: 1
  102309. +ifloat: 1
  102310. +Test "Real part of: cacos (-0x1p-63 - 0.5 i)":
  102311. +float: 1
  102312. +ifloat: 1
  102313. +Test "Imaginary part of: cacos (-0x1p-63 - 0.5 i)":
  102314. +float: 1
  102315. +ifloat: 1
  102316. +Test "Real part of: cacos (-0x1p-63 - 0x1p-63 i)":
  102317. +float: 1
  102318. +ifloat: 1
  102319. +Test "Imaginary part of: cacos (-1.0 + 0.5 i)":
  102320. +float: 1
  102321. +ifloat: 1
  102322. +Test "Imaginary part of: cacos (-1.0 + 0x1.fp-10 i)":
  102323. +float: 1
  102324. +ifloat: 1
  102325. +Test "Real part of: cacos (-1.0 + 0x1p50 i)":
  102326. +float: 1
  102327. +ifloat: 1
  102328. +Test "Imaginary part of: cacos (-1.0 - 0.5 i)":
  102329. +float: 1
  102330. +ifloat: 1
  102331. +Test "Imaginary part of: cacos (-1.0 - 0x1.fp-10 i)":
  102332. +float: 1
  102333. +ifloat: 1
  102334. +Test "Real part of: cacos (-1.0 - 0x1p50 i)":
  102335. +float: 1
  102336. +ifloat: 1
  102337. +Test "Real part of: cacos (-2 - 3 i)":
  102338. +float: 1
  102339. +ifloat: 1
  102340. +Test "Imaginary part of: cacos (0.25 + 1.0 i)":
  102341. +float: 1
  102342. +ifloat: 1
  102343. +Test "Imaginary part of: cacos (0.25 - 1.0 i)":
  102344. +float: 1
  102345. +ifloat: 1
  102346. +Test "Real part of: cacos (0.5 + +0 i)":
  102347. +double: 1
  102348. +idouble: 1
  102349. +Test "Real part of: cacos (0.5 + 0x1.fp-1025 i)":
  102350. +double: 1
  102351. +idouble: 1
  102352. +Test "Real part of: cacos (0.5 + 0x1.fp-129 i)":
  102353. +double: 1
  102354. +idouble: 1
  102355. +Test "Imaginary part of: cacos (0.5 + 0x1.fp-129 i)":
  102356. +double: 1
  102357. +idouble: 1
  102358. +Test "Real part of: cacos (0.5 + 0x1p-105 i)":
  102359. +double: 1
  102360. +idouble: 1
  102361. +Test "Imaginary part of: cacos (0.5 + 0x1p-105 i)":
  102362. +double: 1
  102363. +idouble: 1
  102364. +Test "Real part of: cacos (0.5 + 0x1p-112 i)":
  102365. +double: 1
  102366. +idouble: 1
  102367. +Test "Imaginary part of: cacos (0.5 + 0x1p-112 i)":
  102368. +double: 1
  102369. +idouble: 1
  102370. +Test "Imaginary part of: cacos (0.5 + 0x1p-23 i)":
  102371. +double: 1
  102372. +idouble: 1
  102373. +Test "Real part of: cacos (0.5 + 0x1p-52 i)":
  102374. +double: 1
  102375. +idouble: 1
  102376. +Test "Real part of: cacos (0.5 + 0x1p-63 i)":
  102377. +double: 1
  102378. +idouble: 1
  102379. +Test "Real part of: cacos (0.5 + 1.0 i)":
  102380. +float: 1
  102381. +ifloat: 1
  102382. +Test "Imaginary part of: cacos (0.5 + 1.0 i)":
  102383. +double: 1
  102384. +idouble: 1
  102385. +Test "Real part of: cacos (0.5 - 0 i)":
  102386. +double: 1
  102387. +idouble: 1
  102388. +Test "Real part of: cacos (0.5 - 0x1.fp-1025 i)":
  102389. +double: 1
  102390. +idouble: 1
  102391. +Test "Real part of: cacos (0.5 - 0x1.fp-129 i)":
  102392. +double: 1
  102393. +idouble: 1
  102394. +Test "Imaginary part of: cacos (0.5 - 0x1.fp-129 i)":
  102395. +double: 1
  102396. +idouble: 1
  102397. +Test "Real part of: cacos (0.5 - 0x1p-105 i)":
  102398. +double: 1
  102399. +idouble: 1
  102400. +Test "Imaginary part of: cacos (0.5 - 0x1p-105 i)":
  102401. +double: 1
  102402. +idouble: 1
  102403. +Test "Real part of: cacos (0.5 - 0x1p-112 i)":
  102404. +double: 1
  102405. +idouble: 1
  102406. +Test "Imaginary part of: cacos (0.5 - 0x1p-112 i)":
  102407. +double: 1
  102408. +idouble: 1
  102409. +Test "Imaginary part of: cacos (0.5 - 0x1p-23 i)":
  102410. +double: 1
  102411. +idouble: 1
  102412. +Test "Real part of: cacos (0.5 - 0x1p-52 i)":
  102413. +double: 1
  102414. +idouble: 1
  102415. +Test "Real part of: cacos (0.5 - 0x1p-63 i)":
  102416. +double: 1
  102417. +idouble: 1
  102418. +Test "Real part of: cacos (0.5 - 1.0 i)":
  102419. +float: 1
  102420. +ifloat: 1
  102421. +Test "Imaginary part of: cacos (0.5 - 1.0 i)":
  102422. +double: 1
  102423. +idouble: 1
  102424. +Test "Imaginary part of: cacos (0x0.fffffffffffff8p0 + 0x1p-52 i)":
  102425. +double: 1
  102426. +idouble: 1
  102427. +Test "Imaginary part of: cacos (0x0.fffffffffffff8p0 - 0x1p-52 i)":
  102428. +double: 1
  102429. +idouble: 1
  102430. +Test "Real part of: cacos (0x0.ffffffp0 + 0.0 i)":
  102431. +float: 1
  102432. +ifloat: 1
  102433. +Test "Real part of: cacos (0x0.ffffffp0 + 0x1.fp-129 i)":
  102434. +float: 1
  102435. +ifloat: 1
  102436. +Test "Real part of: cacos (0x0.ffffffp0 + 0x1p-23 i)":
  102437. +float: 2
  102438. +ifloat: 2
  102439. +Test "Imaginary part of: cacos (0x0.ffffffp0 + 0x1p-23 i)":
  102440. +float: 2
  102441. +ifloat: 2
  102442. +Test "Real part of: cacos (0x0.ffffffp0 - 0.0 i)":
  102443. +float: 1
  102444. +ifloat: 1
  102445. +Test "Real part of: cacos (0x0.ffffffp0 - 0x1.fp-129 i)":
  102446. +float: 1
  102447. +ifloat: 1
  102448. +Test "Real part of: cacos (0x0.ffffffp0 - 0x1p-23 i)":
  102449. +float: 2
  102450. +ifloat: 2
  102451. +Test "Imaginary part of: cacos (0x0.ffffffp0 - 0x1p-23 i)":
  102452. +float: 2
  102453. +ifloat: 2
  102454. +Test "Real part of: cacos (0x1.0000000000001p0 + 0x1p-52 i)":
  102455. +double: 1
  102456. +idouble: 1
  102457. +Test "Real part of: cacos (0x1.0000000000001p0 - 0x1p-52 i)":
  102458. +double: 1
  102459. +idouble: 1
  102460. +Test "Real part of: cacos (0x1.000002p0 + 0x1p-23 i)":
  102461. +float: 2
  102462. +ifloat: 2
  102463. +Test "Imaginary part of: cacos (0x1.000002p0 + 0x1p-23 i)":
  102464. +float: 1
  102465. +ifloat: 1
  102466. +Test "Real part of: cacos (0x1.000002p0 - 0x1p-23 i)":
  102467. +float: 2
  102468. +ifloat: 2
  102469. +Test "Imaginary part of: cacos (0x1.000002p0 - 0x1p-23 i)":
  102470. +float: 1
  102471. +ifloat: 1
  102472. +Test "Imaginary part of: cacos (0x1.fp-10 + 1.0 i)":
  102473. +double: 1
  102474. +idouble: 1
  102475. +Test "Imaginary part of: cacos (0x1.fp-10 - 1.0 i)":
  102476. +double: 1
  102477. +idouble: 1
  102478. +Test "Imaginary part of: cacos (0x1.fp-100 + 1.0 i)":
  102479. +double: 1
  102480. +float: 1
  102481. +idouble: 1
  102482. +ifloat: 1
  102483. +Test "Imaginary part of: cacos (0x1.fp-100 - 1.0 i)":
  102484. +double: 1
  102485. +float: 1
  102486. +idouble: 1
  102487. +ifloat: 1
  102488. +Test "Imaginary part of: cacos (0x1.fp-1000 + 1.0 i)":
  102489. +double: 1
  102490. +idouble: 1
  102491. +Test "Imaginary part of: cacos (0x1.fp-1000 - 1.0 i)":
  102492. +double: 1
  102493. +idouble: 1
  102494. +Test "Imaginary part of: cacos (0x1.fp-1025 + 1.0 i)":
  102495. +double: 1
  102496. +idouble: 1
  102497. +Test "Imaginary part of: cacos (0x1.fp-1025 + 1.5 i)":
  102498. +double: 1
  102499. +idouble: 1
  102500. +Test "Imaginary part of: cacos (0x1.fp-1025 - 1.0 i)":
  102501. +double: 1
  102502. +idouble: 1
  102503. +Test "Imaginary part of: cacos (0x1.fp-1025 - 1.5 i)":
  102504. +double: 1
  102505. +idouble: 1
  102506. +Test "Imaginary part of: cacos (0x1.fp-129 + 0.5 i)":
  102507. +float: 1
  102508. +ifloat: 1
  102509. +Test "Imaginary part of: cacos (0x1.fp-129 + 1.0 i)":
  102510. +double: 1
  102511. +float: 1
  102512. +idouble: 1
  102513. +ifloat: 1
  102514. +Test "Imaginary part of: cacos (0x1.fp-129 + 1.5 i)":
  102515. +double: 1
  102516. +idouble: 1
  102517. +Test "Imaginary part of: cacos (0x1.fp-129 - 0.5 i)":
  102518. +float: 1
  102519. +ifloat: 1
  102520. +Test "Imaginary part of: cacos (0x1.fp-129 - 1.0 i)":
  102521. +double: 1
  102522. +float: 1
  102523. +idouble: 1
  102524. +ifloat: 1
  102525. +Test "Imaginary part of: cacos (0x1.fp-129 - 1.5 i)":
  102526. +double: 1
  102527. +idouble: 1
  102528. +Test "Imaginary part of: cacos (0x1.fp-30 + 1.0 i)":
  102529. +double: 1
  102530. +float: 1
  102531. +idouble: 1
  102532. +ifloat: 1
  102533. +Test "Imaginary part of: cacos (0x1.fp-30 - 1.0 i)":
  102534. +double: 1
  102535. +float: 1
  102536. +idouble: 1
  102537. +ifloat: 1
  102538. +Test "Imaginary part of: cacos (0x1.fp1023 + 0x1.fp1023 i)":
  102539. +double: 1
  102540. +idouble: 1
  102541. +Test "Imaginary part of: cacos (0x1.fp127 + 0x1.fp127 i)":
  102542. +double: 1
  102543. +idouble: 1
  102544. +Test "Imaginary part of: cacos (0x1p-105 + 0.5 i)":
  102545. +float: 1
  102546. +ifloat: 1
  102547. +Test "Imaginary part of: cacos (0x1p-105 - 0.5 i)":
  102548. +float: 1
  102549. +ifloat: 1
  102550. +Test "Imaginary part of: cacos (0x1p-112 + 0.5 i)":
  102551. +float: 1
  102552. +ifloat: 1
  102553. +Test "Imaginary part of: cacos (0x1p-112 - 0.5 i)":
  102554. +float: 1
  102555. +ifloat: 1
  102556. +Test "Imaginary part of: cacos (0x1p-23 + 0.5 i)":
  102557. +float: 1
  102558. +ifloat: 1
  102559. +Test "Imaginary part of: cacos (0x1p-23 + 0x0.ffffffp0 i)":
  102560. +double: 1
  102561. +idouble: 1
  102562. +Test "Imaginary part of: cacos (0x1p-23 - 0.5 i)":
  102563. +float: 1
  102564. +ifloat: 1
  102565. +Test "Imaginary part of: cacos (0x1p-23 - 0x0.ffffffp0 i)":
  102566. +double: 1
  102567. +idouble: 1
  102568. +Test "Imaginary part of: cacos (0x1p-52 + 0.5 i)":
  102569. +float: 1
  102570. +ifloat: 1
  102571. +Test "Imaginary part of: cacos (0x1p-52 - 0.5 i)":
  102572. +float: 1
  102573. +ifloat: 1
  102574. +Test "Imaginary part of: cacos (0x1p-63 + 0.5 i)":
  102575. +float: 1
  102576. +ifloat: 1
  102577. +Test "Imaginary part of: cacos (0x1p-63 - 0.5 i)":
  102578. +float: 1
  102579. +ifloat: 1
  102580. +Test "Real part of: cacos (1.0 + 0.25 i)":
  102581. +double: 1
  102582. +idouble: 1
  102583. +Test "Real part of: cacos (1.0 + 0.5 i)":
  102584. +float: 1
  102585. +ifloat: 1
  102586. +Test "Imaginary part of: cacos (1.0 + 0.5 i)":
  102587. +float: 1
  102588. +ifloat: 1
  102589. +Test "Real part of: cacos (1.0 + 0x1.fp-10 i)":
  102590. +float: 2
  102591. +ifloat: 2
  102592. +Test "Imaginary part of: cacos (1.0 + 0x1.fp-10 i)":
  102593. +float: 1
  102594. +ifloat: 1
  102595. +Test "Real part of: cacos (1.0 - 0.25 i)":
  102596. +double: 1
  102597. +idouble: 1
  102598. +Test "Real part of: cacos (1.0 - 0.5 i)":
  102599. +float: 1
  102600. +ifloat: 1
  102601. +Test "Imaginary part of: cacos (1.0 - 0.5 i)":
  102602. +float: 1
  102603. +ifloat: 1
  102604. +Test "Real part of: cacos (1.0 - 0x1.fp-10 i)":
  102605. +float: 2
  102606. +ifloat: 2
  102607. +Test "Imaginary part of: cacos (1.0 - 0x1.fp-10 i)":
  102608. +float: 1
  102609. +ifloat: 1
  102610. +
  102611. +# cacosh
  102612. +Test "Real part of: cacosh (+0 + 0.5 i)":
  102613. +float: 1
  102614. +ifloat: 1
  102615. +Test "Real part of: cacosh (+0 + 1.0 i)":
  102616. +double: 1
  102617. +float: 1
  102618. +idouble: 1
  102619. +ifloat: 1
  102620. +Test "Real part of: cacosh (+0 + 1.5 i)":
  102621. +double: 1
  102622. +idouble: 1
  102623. +Test "Real part of: cacosh (+0 - 0.5 i)":
  102624. +float: 1
  102625. +ifloat: 1
  102626. +Test "Real part of: cacosh (+0 - 1.0 i)":
  102627. +double: 1
  102628. +float: 1
  102629. +idouble: 1
  102630. +ifloat: 1
  102631. +Test "Real part of: cacosh (+0 - 1.5 i)":
  102632. +double: 1
  102633. +idouble: 1
  102634. +Test "Real part of: cacosh (-0 + 0.5 i)":
  102635. +float: 1
  102636. +ifloat: 1
  102637. +Test "Real part of: cacosh (-0 + 1.0 i)":
  102638. +double: 1
  102639. +float: 1
  102640. +idouble: 1
  102641. +ifloat: 1
  102642. +Test "Real part of: cacosh (-0 + 1.5 i)":
  102643. +double: 1
  102644. +idouble: 1
  102645. +Test "Real part of: cacosh (-0 - 0.5 i)":
  102646. +float: 1
  102647. +ifloat: 1
  102648. +Test "Real part of: cacosh (-0 - 1.0 i)":
  102649. +double: 1
  102650. +float: 1
  102651. +idouble: 1
  102652. +ifloat: 1
  102653. +Test "Real part of: cacosh (-0 - 1.5 i)":
  102654. +double: 1
  102655. +idouble: 1
  102656. +Test "Real part of: cacosh (-0.25 + 1.0 i)":
  102657. +float: 1
  102658. +ifloat: 1
  102659. +Test "Imaginary part of: cacosh (-0.25 + 1.0 i)":
  102660. +double: 1
  102661. +float: 1
  102662. +idouble: 1
  102663. +ifloat: 1
  102664. +Test "Real part of: cacosh (-0.25 - 1.0 i)":
  102665. +float: 1
  102666. +ifloat: 1
  102667. +Test "Imaginary part of: cacosh (-0.25 - 1.0 i)":
  102668. +double: 1
  102669. +float: 1
  102670. +idouble: 1
  102671. +ifloat: 1
  102672. +Test "Real part of: cacosh (-0.5 + 0x1.fp-129 i)":
  102673. +double: 1
  102674. +idouble: 1
  102675. +Test "Real part of: cacosh (-0.5 + 0x1p-105 i)":
  102676. +double: 1
  102677. +idouble: 1
  102678. +Test "Real part of: cacosh (-0.5 + 0x1p-112 i)":
  102679. +double: 1
  102680. +idouble: 1
  102681. +Test "Real part of: cacosh (-0.5 + 0x1p-23 i)":
  102682. +double: 1
  102683. +idouble: 1
  102684. +Test "Real part of: cacosh (-0.5 + 1.0 i)":
  102685. +double: 1
  102686. +idouble: 1
  102687. +Test "Imaginary part of: cacosh (-0.5 + 1.0 i)":
  102688. +float: 1
  102689. +ifloat: 1
  102690. +Test "Real part of: cacosh (-0.5 - 0x1.fp-129 i)":
  102691. +double: 1
  102692. +idouble: 1
  102693. +Test "Real part of: cacosh (-0.5 - 0x1p-105 i)":
  102694. +double: 1
  102695. +idouble: 1
  102696. +Test "Real part of: cacosh (-0.5 - 0x1p-112 i)":
  102697. +double: 1
  102698. +idouble: 1
  102699. +Test "Real part of: cacosh (-0.5 - 0x1p-23 i)":
  102700. +double: 1
  102701. +idouble: 1
  102702. +Test "Real part of: cacosh (-0.5 - 1.0 i)":
  102703. +double: 1
  102704. +idouble: 1
  102705. +Test "Imaginary part of: cacosh (-0.5 - 1.0 i)":
  102706. +float: 1
  102707. +ifloat: 1
  102708. +Test "Real part of: cacosh (-0x0.fffffffffffff8p0 + 0x1p-52 i)":
  102709. +double: 1
  102710. +idouble: 1
  102711. +Test "Real part of: cacosh (-0x0.fffffffffffff8p0 - 0x1p-52 i)":
  102712. +double: 1
  102713. +idouble: 1
  102714. +Test "Real part of: cacosh (-0x0.ffffffp0 + 0x1p-23 i)":
  102715. +float: 2
  102716. +ifloat: 2
  102717. +Test "Real part of: cacosh (-0x0.ffffffp0 - 0x1p-23 i)":
  102718. +float: 2
  102719. +ifloat: 2
  102720. +Test "Real part of: cacosh (-0x1.000002p0 + 0x1p-23 i)":
  102721. +float: 1
  102722. +ifloat: 1
  102723. +Test "Real part of: cacosh (-0x1.000002p0 - 0x1p-23 i)":
  102724. +float: 1
  102725. +ifloat: 1
  102726. +Test "Real part of: cacosh (-0x1.fp-10 + 1.0 i)":
  102727. +double: 1
  102728. +idouble: 1
  102729. +Test "Real part of: cacosh (-0x1.fp-10 - 1.0 i)":
  102730. +double: 1
  102731. +idouble: 1
  102732. +Test "Real part of: cacosh (-0x1.fp-100 + 1.0 i)":
  102733. +double: 1
  102734. +float: 1
  102735. +idouble: 1
  102736. +ifloat: 1
  102737. +Test "Imaginary part of: cacosh (-0x1.fp-100 + 1.0 i)":
  102738. +float: 1
  102739. +ifloat: 1
  102740. +Test "Real part of: cacosh (-0x1.fp-100 - 1.0 i)":
  102741. +double: 1
  102742. +float: 1
  102743. +idouble: 1
  102744. +ifloat: 1
  102745. +Test "Imaginary part of: cacosh (-0x1.fp-100 - 1.0 i)":
  102746. +float: 1
  102747. +ifloat: 1
  102748. +Test "Real part of: cacosh (-0x1.fp-1000 + 1.0 i)":
  102749. +double: 1
  102750. +idouble: 1
  102751. +Test "Real part of: cacosh (-0x1.fp-1000 - 1.0 i)":
  102752. +double: 1
  102753. +idouble: 1
  102754. +Test "Real part of: cacosh (-0x1.fp-1025 + 1.0 i)":
  102755. +double: 1
  102756. +idouble: 1
  102757. +Test "Real part of: cacosh (-0x1.fp-1025 + 1.5 i)":
  102758. +double: 1
  102759. +idouble: 1
  102760. +Test "Real part of: cacosh (-0x1.fp-1025 - 1.0 i)":
  102761. +double: 1
  102762. +idouble: 1
  102763. +Test "Real part of: cacosh (-0x1.fp-1025 - 1.5 i)":
  102764. +double: 1
  102765. +idouble: 1
  102766. +Test "Real part of: cacosh (-0x1.fp-129 + 0.5 i)":
  102767. +float: 1
  102768. +ifloat: 1
  102769. +Test "Imaginary part of: cacosh (-0x1.fp-129 + 0.5 i)":
  102770. +float: 1
  102771. +ifloat: 1
  102772. +Test "Imaginary part of: cacosh (-0x1.fp-129 + 0x0.ffffffp0 i)":
  102773. +float: 1
  102774. +ifloat: 1
  102775. +Test "Imaginary part of: cacosh (-0x1.fp-129 + 0x1.000002p0 i)":
  102776. +float: 1
  102777. +ifloat: 1
  102778. +Test "Imaginary part of: cacosh (-0x1.fp-129 + 0x1.fp-129 i)":
  102779. +float: 1
  102780. +ifloat: 1
  102781. +Test "Imaginary part of: cacosh (-0x1.fp-129 + 0x1p-23 i)":
  102782. +float: 1
  102783. +ifloat: 1
  102784. +Test "Real part of: cacosh (-0x1.fp-129 + 1.0 i)":
  102785. +double: 1
  102786. +float: 1
  102787. +idouble: 1
  102788. +ifloat: 1
  102789. +Test "Imaginary part of: cacosh (-0x1.fp-129 + 1.0 i)":
  102790. +float: 1
  102791. +ifloat: 1
  102792. +Test "Real part of: cacosh (-0x1.fp-129 + 1.5 i)":
  102793. +double: 1
  102794. +idouble: 1
  102795. +Test "Imaginary part of: cacosh (-0x1.fp-129 + 1.5 i)":
  102796. +float: 1
  102797. +ifloat: 1
  102798. +Test "Real part of: cacosh (-0x1.fp-129 - 0.5 i)":
  102799. +float: 1
  102800. +ifloat: 1
  102801. +Test "Imaginary part of: cacosh (-0x1.fp-129 - 0.5 i)":
  102802. +float: 1
  102803. +ifloat: 1
  102804. +Test "Imaginary part of: cacosh (-0x1.fp-129 - 0x0.ffffffp0 i)":
  102805. +float: 1
  102806. +ifloat: 1
  102807. +Test "Imaginary part of: cacosh (-0x1.fp-129 - 0x1.000002p0 i)":
  102808. +float: 1
  102809. +ifloat: 1
  102810. +Test "Imaginary part of: cacosh (-0x1.fp-129 - 0x1.fp-129 i)":
  102811. +float: 1
  102812. +ifloat: 1
  102813. +Test "Imaginary part of: cacosh (-0x1.fp-129 - 0x1p-23 i)":
  102814. +float: 1
  102815. +ifloat: 1
  102816. +Test "Real part of: cacosh (-0x1.fp-129 - 1.0 i)":
  102817. +double: 1
  102818. +float: 1
  102819. +idouble: 1
  102820. +ifloat: 1
  102821. +Test "Imaginary part of: cacosh (-0x1.fp-129 - 1.0 i)":
  102822. +float: 1
  102823. +ifloat: 1
  102824. +Test "Real part of: cacosh (-0x1.fp-129 - 1.5 i)":
  102825. +double: 1
  102826. +idouble: 1
  102827. +Test "Imaginary part of: cacosh (-0x1.fp-129 - 1.5 i)":
  102828. +float: 1
  102829. +ifloat: 1
  102830. +Test "Real part of: cacosh (-0x1.fp-30 + 1.0 i)":
  102831. +double: 1
  102832. +float: 1
  102833. +idouble: 1
  102834. +ifloat: 1
  102835. +Test "Imaginary part of: cacosh (-0x1.fp-30 + 1.0 i)":
  102836. +float: 1
  102837. +ifloat: 1
  102838. +Test "Real part of: cacosh (-0x1.fp-30 - 1.0 i)":
  102839. +double: 1
  102840. +float: 1
  102841. +idouble: 1
  102842. +ifloat: 1
  102843. +Test "Imaginary part of: cacosh (-0x1.fp-30 - 1.0 i)":
  102844. +float: 1
  102845. +ifloat: 1
  102846. +Test "Imaginary part of: cacosh (-0x1p-105 + 0.0 i)":
  102847. +float: 1
  102848. +ifloat: 1
  102849. +Test "Real part of: cacosh (-0x1p-105 + 0.5 i)":
  102850. +float: 1
  102851. +ifloat: 1
  102852. +Test "Imaginary part of: cacosh (-0x1p-105 + 0.5 i)":
  102853. +float: 1
  102854. +ifloat: 1
  102855. +Test "Imaginary part of: cacosh (-0x1p-105 + 0x1p-105 i)":
  102856. +float: 1
  102857. +ifloat: 1
  102858. +Test "Imaginary part of: cacosh (-0x1p-105 - 0.0 i)":
  102859. +float: 1
  102860. +ifloat: 1
  102861. +Test "Real part of: cacosh (-0x1p-105 - 0.5 i)":
  102862. +float: 1
  102863. +ifloat: 1
  102864. +Test "Imaginary part of: cacosh (-0x1p-105 - 0.5 i)":
  102865. +float: 1
  102866. +ifloat: 1
  102867. +Test "Imaginary part of: cacosh (-0x1p-105 - 0x1p-105 i)":
  102868. +float: 1
  102869. +ifloat: 1
  102870. +Test "Imaginary part of: cacosh (-0x1p-112 + 0.0 i)":
  102871. +float: 1
  102872. +ifloat: 1
  102873. +Test "Real part of: cacosh (-0x1p-112 + 0.5 i)":
  102874. +float: 1
  102875. +ifloat: 1
  102876. +Test "Imaginary part of: cacosh (-0x1p-112 + 0.5 i)":
  102877. +float: 1
  102878. +ifloat: 1
  102879. +Test "Imaginary part of: cacosh (-0x1p-112 + 0x1p-112 i)":
  102880. +float: 1
  102881. +ifloat: 1
  102882. +Test "Imaginary part of: cacosh (-0x1p-112 - 0.0 i)":
  102883. +float: 1
  102884. +ifloat: 1
  102885. +Test "Real part of: cacosh (-0x1p-112 - 0.5 i)":
  102886. +float: 1
  102887. +ifloat: 1
  102888. +Test "Imaginary part of: cacosh (-0x1p-112 - 0.5 i)":
  102889. +float: 1
  102890. +ifloat: 1
  102891. +Test "Imaginary part of: cacosh (-0x1p-112 - 0x1p-112 i)":
  102892. +float: 1
  102893. +ifloat: 1
  102894. +Test "Imaginary part of: cacosh (-0x1p-23 + 0.0 i)":
  102895. +float: 1
  102896. +ifloat: 1
  102897. +Test "Real part of: cacosh (-0x1p-23 + 0.5 i)":
  102898. +float: 1
  102899. +ifloat: 1
  102900. +Test "Imaginary part of: cacosh (-0x1p-23 + 0.5 i)":
  102901. +float: 1
  102902. +ifloat: 1
  102903. +Test "Real part of: cacosh (-0x1p-23 + 0x0.ffffffp0 i)":
  102904. +double: 1
  102905. +idouble: 1
  102906. +Test "Imaginary part of: cacosh (-0x1p-23 + 0x1.fp-129 i)":
  102907. +float: 1
  102908. +ifloat: 1
  102909. +Test "Imaginary part of: cacosh (-0x1p-23 + 0x1p-23 i)":
  102910. +float: 1
  102911. +ifloat: 1
  102912. +Test "Imaginary part of: cacosh (-0x1p-23 - 0.0 i)":
  102913. +float: 1
  102914. +ifloat: 1
  102915. +Test "Real part of: cacosh (-0x1p-23 - 0.5 i)":
  102916. +float: 1
  102917. +ifloat: 1
  102918. +Test "Imaginary part of: cacosh (-0x1p-23 - 0.5 i)":
  102919. +float: 1
  102920. +ifloat: 1
  102921. +Test "Real part of: cacosh (-0x1p-23 - 0x0.ffffffp0 i)":
  102922. +double: 1
  102923. +idouble: 1
  102924. +Test "Imaginary part of: cacosh (-0x1p-23 - 0x1.fp-129 i)":
  102925. +float: 1
  102926. +ifloat: 1
  102927. +Test "Imaginary part of: cacosh (-0x1p-23 - 0x1p-23 i)":
  102928. +float: 1
  102929. +ifloat: 1
  102930. +Test "Imaginary part of: cacosh (-0x1p-52 + 0.0 i)":
  102931. +float: 1
  102932. +ifloat: 1
  102933. +Test "Real part of: cacosh (-0x1p-52 + 0.5 i)":
  102934. +float: 1
  102935. +ifloat: 1
  102936. +Test "Imaginary part of: cacosh (-0x1p-52 + 0.5 i)":
  102937. +float: 1
  102938. +ifloat: 1
  102939. +Test "Imaginary part of: cacosh (-0x1p-52 + 0x1p-52 i)":
  102940. +float: 1
  102941. +ifloat: 1
  102942. +Test "Imaginary part of: cacosh (-0x1p-52 - 0.0 i)":
  102943. +float: 1
  102944. +ifloat: 1
  102945. +Test "Real part of: cacosh (-0x1p-52 - 0.5 i)":
  102946. +float: 1
  102947. +ifloat: 1
  102948. +Test "Imaginary part of: cacosh (-0x1p-52 - 0.5 i)":
  102949. +float: 1
  102950. +ifloat: 1
  102951. +Test "Imaginary part of: cacosh (-0x1p-52 - 0x1p-52 i)":
  102952. +float: 1
  102953. +ifloat: 1
  102954. +Test "Imaginary part of: cacosh (-0x1p-63 + 0.0 i)":
  102955. +float: 1
  102956. +ifloat: 1
  102957. +Test "Real part of: cacosh (-0x1p-63 + 0.5 i)":
  102958. +float: 1
  102959. +ifloat: 1
  102960. +Test "Imaginary part of: cacosh (-0x1p-63 + 0.5 i)":
  102961. +float: 1
  102962. +ifloat: 1
  102963. +Test "Imaginary part of: cacosh (-0x1p-63 + 0x1p-63 i)":
  102964. +float: 1
  102965. +ifloat: 1
  102966. +Test "Imaginary part of: cacosh (-0x1p-63 - 0.0 i)":
  102967. +float: 1
  102968. +ifloat: 1
  102969. +Test "Real part of: cacosh (-0x1p-63 - 0.5 i)":
  102970. +float: 1
  102971. +ifloat: 1
  102972. +Test "Imaginary part of: cacosh (-0x1p-63 - 0.5 i)":
  102973. +float: 1
  102974. +ifloat: 1
  102975. +Test "Imaginary part of: cacosh (-0x1p-63 - 0x1p-63 i)":
  102976. +float: 1
  102977. +ifloat: 1
  102978. +Test "Real part of: cacosh (-1.0 + 0.5 i)":
  102979. +float: 1
  102980. +ifloat: 1
  102981. +Test "Real part of: cacosh (-1.0 + 0x1.fp-10 i)":
  102982. +float: 1
  102983. +ifloat: 1
  102984. +Test "Imaginary part of: cacosh (-1.0 + 0x1p50 i)":
  102985. +float: 1
  102986. +ifloat: 1
  102987. +Test "Real part of: cacosh (-1.0 - 0.5 i)":
  102988. +float: 1
  102989. +ifloat: 1
  102990. +Test "Real part of: cacosh (-1.0 - 0x1.fp-10 i)":
  102991. +float: 1
  102992. +ifloat: 1
  102993. +Test "Imaginary part of: cacosh (-1.0 - 0x1p50 i)":
  102994. +float: 1
  102995. +ifloat: 1
  102996. +Test "Imaginary part of: cacosh (-2 - 3 i)":
  102997. +float: 1
  102998. +ifloat: 1
  102999. +Test "Real part of: cacosh (0.25 + 1.0 i)":
  103000. +float: 1
  103001. +ifloat: 1
  103002. +Test "Real part of: cacosh (0.25 - 1.0 i)":
  103003. +float: 1
  103004. +ifloat: 1
  103005. +Test "Imaginary part of: cacosh (0.5 + +0 i)":
  103006. +double: 1
  103007. +idouble: 1
  103008. +Test "Imaginary part of: cacosh (0.5 + 0x1.fp-1025 i)":
  103009. +double: 1
  103010. +idouble: 1
  103011. +Test "Real part of: cacosh (0.5 + 0x1.fp-129 i)":
  103012. +double: 1
  103013. +idouble: 1
  103014. +Test "Imaginary part of: cacosh (0.5 + 0x1.fp-129 i)":
  103015. +double: 1
  103016. +idouble: 1
  103017. +Test "Real part of: cacosh (0.5 + 0x1p-105 i)":
  103018. +double: 1
  103019. +idouble: 1
  103020. +Test "Imaginary part of: cacosh (0.5 + 0x1p-105 i)":
  103021. +double: 1
  103022. +idouble: 1
  103023. +Test "Real part of: cacosh (0.5 + 0x1p-112 i)":
  103024. +double: 1
  103025. +idouble: 1
  103026. +Test "Imaginary part of: cacosh (0.5 + 0x1p-112 i)":
  103027. +double: 1
  103028. +idouble: 1
  103029. +Test "Real part of: cacosh (0.5 + 0x1p-23 i)":
  103030. +double: 1
  103031. +idouble: 1
  103032. +Test "Imaginary part of: cacosh (0.5 + 0x1p-52 i)":
  103033. +double: 1
  103034. +idouble: 1
  103035. +Test "Imaginary part of: cacosh (0.5 + 0x1p-63 i)":
  103036. +double: 1
  103037. +idouble: 1
  103038. +Test "Real part of: cacosh (0.5 + 1.0 i)":
  103039. +double: 1
  103040. +idouble: 1
  103041. +Test "Imaginary part of: cacosh (0.5 + 1.0 i)":
  103042. +float: 1
  103043. +ifloat: 1
  103044. +Test "Imaginary part of: cacosh (0.5 - 0 i)":
  103045. +double: 1
  103046. +idouble: 1
  103047. +Test "Imaginary part of: cacosh (0.5 - 0x1.fp-1025 i)":
  103048. +double: 1
  103049. +idouble: 1
  103050. +Test "Real part of: cacosh (0.5 - 0x1.fp-129 i)":
  103051. +double: 1
  103052. +idouble: 1
  103053. +Test "Imaginary part of: cacosh (0.5 - 0x1.fp-129 i)":
  103054. +double: 1
  103055. +idouble: 1
  103056. +Test "Real part of: cacosh (0.5 - 0x1p-105 i)":
  103057. +double: 1
  103058. +idouble: 1
  103059. +Test "Imaginary part of: cacosh (0.5 - 0x1p-105 i)":
  103060. +double: 1
  103061. +idouble: 1
  103062. +Test "Real part of: cacosh (0.5 - 0x1p-112 i)":
  103063. +double: 1
  103064. +idouble: 1
  103065. +Test "Imaginary part of: cacosh (0.5 - 0x1p-112 i)":
  103066. +double: 1
  103067. +idouble: 1
  103068. +Test "Real part of: cacosh (0.5 - 0x1p-23 i)":
  103069. +double: 1
  103070. +idouble: 1
  103071. +Test "Imaginary part of: cacosh (0.5 - 0x1p-52 i)":
  103072. +double: 1
  103073. +idouble: 1
  103074. +Test "Imaginary part of: cacosh (0.5 - 0x1p-63 i)":
  103075. +double: 1
  103076. +idouble: 1
  103077. +Test "Real part of: cacosh (0.5 - 1.0 i)":
  103078. +double: 1
  103079. +idouble: 1
  103080. +Test "Imaginary part of: cacosh (0.5 - 1.0 i)":
  103081. +float: 1
  103082. +ifloat: 1
  103083. +Test "Real part of: cacosh (0x0.fffffffffffff8p0 + 0x1p-52 i)":
  103084. +double: 1
  103085. +idouble: 1
  103086. +Test "Real part of: cacosh (0x0.fffffffffffff8p0 - 0x1p-52 i)":
  103087. +double: 1
  103088. +idouble: 1
  103089. +Test "Imaginary part of: cacosh (0x0.ffffffp0 + 0.0 i)":
  103090. +float: 1
  103091. +ifloat: 1
  103092. +Test "Imaginary part of: cacosh (0x0.ffffffp0 + 0x1.fp-129 i)":
  103093. +float: 1
  103094. +ifloat: 1
  103095. +Test "Real part of: cacosh (0x0.ffffffp0 + 0x1p-23 i)":
  103096. +float: 2
  103097. +ifloat: 2
  103098. +Test "Imaginary part of: cacosh (0x0.ffffffp0 + 0x1p-23 i)":
  103099. +float: 2
  103100. +ifloat: 2
  103101. +Test "Imaginary part of: cacosh (0x0.ffffffp0 - 0.0 i)":
  103102. +float: 1
  103103. +ifloat: 1
  103104. +Test "Imaginary part of: cacosh (0x0.ffffffp0 - 0x1.fp-129 i)":
  103105. +float: 1
  103106. +ifloat: 1
  103107. +Test "Real part of: cacosh (0x0.ffffffp0 - 0x1p-23 i)":
  103108. +float: 2
  103109. +ifloat: 2
  103110. +Test "Imaginary part of: cacosh (0x0.ffffffp0 - 0x1p-23 i)":
  103111. +float: 2
  103112. +ifloat: 2
  103113. +Test "Imaginary part of: cacosh (0x1.0000000000001p0 + 0x1p-52 i)":
  103114. +double: 1
  103115. +idouble: 1
  103116. +Test "Imaginary part of: cacosh (0x1.0000000000001p0 - 0x1p-52 i)":
  103117. +double: 1
  103118. +idouble: 1
  103119. +Test "Real part of: cacosh (0x1.000002p0 + 0x1p-23 i)":
  103120. +float: 1
  103121. +ifloat: 1
  103122. +Test "Imaginary part of: cacosh (0x1.000002p0 + 0x1p-23 i)":
  103123. +float: 2
  103124. +ifloat: 2
  103125. +Test "Real part of: cacosh (0x1.000002p0 - 0x1p-23 i)":
  103126. +float: 1
  103127. +ifloat: 1
  103128. +Test "Imaginary part of: cacosh (0x1.000002p0 - 0x1p-23 i)":
  103129. +float: 2
  103130. +ifloat: 2
  103131. +Test "Real part of: cacosh (0x1.fp-10 + 1.0 i)":
  103132. +double: 1
  103133. +idouble: 1
  103134. +Test "Real part of: cacosh (0x1.fp-10 - 1.0 i)":
  103135. +double: 1
  103136. +idouble: 1
  103137. +Test "Real part of: cacosh (0x1.fp-100 + 1.0 i)":
  103138. +double: 1
  103139. +float: 1
  103140. +idouble: 1
  103141. +ifloat: 1
  103142. +Test "Real part of: cacosh (0x1.fp-100 - 1.0 i)":
  103143. +double: 1
  103144. +float: 1
  103145. +idouble: 1
  103146. +ifloat: 1
  103147. +Test "Real part of: cacosh (0x1.fp-1000 + 1.0 i)":
  103148. +double: 1
  103149. +idouble: 1
  103150. +Test "Real part of: cacosh (0x1.fp-1000 - 1.0 i)":
  103151. +double: 1
  103152. +idouble: 1
  103153. +Test "Real part of: cacosh (0x1.fp-1025 + 1.0 i)":
  103154. +double: 1
  103155. +idouble: 1
  103156. +Test "Real part of: cacosh (0x1.fp-1025 + 1.5 i)":
  103157. +double: 1
  103158. +idouble: 1
  103159. +Test "Real part of: cacosh (0x1.fp-1025 - 1.0 i)":
  103160. +double: 1
  103161. +idouble: 1
  103162. +Test "Real part of: cacosh (0x1.fp-1025 - 1.5 i)":
  103163. +double: 1
  103164. +idouble: 1
  103165. +Test "Real part of: cacosh (0x1.fp-129 + 0.5 i)":
  103166. +float: 1
  103167. +ifloat: 1
  103168. +Test "Real part of: cacosh (0x1.fp-129 + 1.0 i)":
  103169. +double: 1
  103170. +float: 1
  103171. +idouble: 1
  103172. +ifloat: 1
  103173. +Test "Real part of: cacosh (0x1.fp-129 + 1.5 i)":
  103174. +double: 1
  103175. +idouble: 1
  103176. +Test "Real part of: cacosh (0x1.fp-129 - 0.5 i)":
  103177. +float: 1
  103178. +ifloat: 1
  103179. +Test "Real part of: cacosh (0x1.fp-129 - 1.0 i)":
  103180. +double: 1
  103181. +float: 1
  103182. +idouble: 1
  103183. +ifloat: 1
  103184. +Test "Real part of: cacosh (0x1.fp-129 - 1.5 i)":
  103185. +double: 1
  103186. +idouble: 1
  103187. +Test "Real part of: cacosh (0x1.fp-30 + 1.0 i)":
  103188. +double: 1
  103189. +float: 1
  103190. +idouble: 1
  103191. +ifloat: 1
  103192. +Test "Real part of: cacosh (0x1.fp-30 - 1.0 i)":
  103193. +double: 1
  103194. +float: 1
  103195. +idouble: 1
  103196. +ifloat: 1
  103197. +Test "Real part of: cacosh (0x1.fp1023 + 0x1.fp1023 i)":
  103198. +double: 1
  103199. +idouble: 1
  103200. +Test "Real part of: cacosh (0x1.fp127 + 0x1.fp127 i)":
  103201. +double: 1
  103202. +idouble: 1
  103203. +Test "Real part of: cacosh (0x1p-105 + 0.5 i)":
  103204. +float: 1
  103205. +ifloat: 1
  103206. +Test "Real part of: cacosh (0x1p-105 - 0.5 i)":
  103207. +float: 1
  103208. +ifloat: 1
  103209. +Test "Real part of: cacosh (0x1p-112 + 0.5 i)":
  103210. +float: 1
  103211. +ifloat: 1
  103212. +Test "Real part of: cacosh (0x1p-112 - 0.5 i)":
  103213. +float: 1
  103214. +ifloat: 1
  103215. +Test "Real part of: cacosh (0x1p-23 + 0.5 i)":
  103216. +float: 1
  103217. +ifloat: 1
  103218. +Test "Real part of: cacosh (0x1p-23 + 0x0.ffffffp0 i)":
  103219. +double: 1
  103220. +idouble: 1
  103221. +Test "Real part of: cacosh (0x1p-23 - 0.5 i)":
  103222. +float: 1
  103223. +ifloat: 1
  103224. +Test "Real part of: cacosh (0x1p-23 - 0x0.ffffffp0 i)":
  103225. +double: 1
  103226. +idouble: 1
  103227. +Test "Real part of: cacosh (0x1p-52 + 0.5 i)":
  103228. +float: 1
  103229. +ifloat: 1
  103230. +Test "Real part of: cacosh (0x1p-52 - 0.5 i)":
  103231. +float: 1
  103232. +ifloat: 1
  103233. +Test "Real part of: cacosh (0x1p-63 + 0.5 i)":
  103234. +float: 1
  103235. +ifloat: 1
  103236. +Test "Real part of: cacosh (0x1p-63 - 0.5 i)":
  103237. +float: 1
  103238. +ifloat: 1
  103239. +Test "Imaginary part of: cacosh (1.0 + 0.25 i)":
  103240. +double: 1
  103241. +idouble: 1
  103242. +Test "Real part of: cacosh (1.0 + 0.5 i)":
  103243. +float: 1
  103244. +ifloat: 1
  103245. +Test "Imaginary part of: cacosh (1.0 + 0.5 i)":
  103246. +float: 1
  103247. +ifloat: 1
  103248. +Test "Real part of: cacosh (1.0 + 0x1.fp-10 i)":
  103249. +float: 1
  103250. +ifloat: 1
  103251. +Test "Imaginary part of: cacosh (1.0 + 0x1.fp-10 i)":
  103252. +float: 2
  103253. +ifloat: 2
  103254. +Test "Imaginary part of: cacosh (1.0 - 0.25 i)":
  103255. +double: 1
  103256. +idouble: 1
  103257. +Test "Real part of: cacosh (1.0 - 0.5 i)":
  103258. +float: 1
  103259. +ifloat: 1
  103260. +Test "Imaginary part of: cacosh (1.0 - 0.5 i)":
  103261. +float: 1
  103262. +ifloat: 1
  103263. +Test "Real part of: cacosh (1.0 - 0x1.fp-10 i)":
  103264. +float: 1
  103265. +ifloat: 1
  103266. +Test "Imaginary part of: cacosh (1.0 - 0x1.fp-10 i)":
  103267. +float: 2
  103268. +ifloat: 2
  103269. +
  103270. +# casin
  103271. +Test "Imaginary part of: casin (+0 + 0.5 i)":
  103272. +float: 1
  103273. +ifloat: 1
  103274. +Test "Imaginary part of: casin (+0 + 1.0 i)":
  103275. +double: 1
  103276. +float: 1
  103277. +idouble: 1
  103278. +ifloat: 1
  103279. +Test "Imaginary part of: casin (+0 + 1.5 i)":
  103280. +double: 1
  103281. +idouble: 1
  103282. +Test "Imaginary part of: casin (+0 - 0.5 i)":
  103283. +float: 1
  103284. +ifloat: 1
  103285. +Test "Imaginary part of: casin (+0 - 1.0 i)":
  103286. +double: 1
  103287. +float: 1
  103288. +idouble: 1
  103289. +ifloat: 1
  103290. +Test "Imaginary part of: casin (+0 - 1.5 i)":
  103291. +double: 1
  103292. +idouble: 1
  103293. +Test "Imaginary part of: casin (-0 + 0.5 i)":
  103294. +float: 1
  103295. +ifloat: 1
  103296. +Test "Imaginary part of: casin (-0 + 1.0 i)":
  103297. +double: 1
  103298. +float: 1
  103299. +idouble: 1
  103300. +ifloat: 1
  103301. +Test "Imaginary part of: casin (-0 + 1.5 i)":
  103302. +double: 1
  103303. +idouble: 1
  103304. +Test "Imaginary part of: casin (-0 - 0.5 i)":
  103305. +float: 1
  103306. +ifloat: 1
  103307. +Test "Imaginary part of: casin (-0 - 1.0 i)":
  103308. +double: 1
  103309. +float: 1
  103310. +idouble: 1
  103311. +ifloat: 1
  103312. +Test "Imaginary part of: casin (-0 - 1.5 i)":
  103313. +double: 1
  103314. +idouble: 1
  103315. +Test "Imaginary part of: casin (-0.25 + 1.0 i)":
  103316. +float: 1
  103317. +ifloat: 1
  103318. +Test "Imaginary part of: casin (-0.25 - 1.0 i)":
  103319. +float: 1
  103320. +ifloat: 1
  103321. +Test "Imaginary part of: casin (-0.5 + 0x1.fp-129 i)":
  103322. +double: 1
  103323. +idouble: 1
  103324. +Test "Imaginary part of: casin (-0.5 + 0x1p-105 i)":
  103325. +double: 1
  103326. +idouble: 1
  103327. +Test "Imaginary part of: casin (-0.5 + 0x1p-112 i)":
  103328. +double: 1
  103329. +idouble: 1
  103330. +Test "Imaginary part of: casin (-0.5 + 0x1p-23 i)":
  103331. +double: 1
  103332. +idouble: 1
  103333. +Test "Imaginary part of: casin (-0.5 + 1.0 i)":
  103334. +double: 1
  103335. +idouble: 1
  103336. +Test "Imaginary part of: casin (-0.5 - 0x1.fp-129 i)":
  103337. +double: 1
  103338. +idouble: 1
  103339. +Test "Imaginary part of: casin (-0.5 - 0x1p-105 i)":
  103340. +double: 1
  103341. +idouble: 1
  103342. +Test "Imaginary part of: casin (-0.5 - 0x1p-112 i)":
  103343. +double: 1
  103344. +idouble: 1
  103345. +Test "Imaginary part of: casin (-0.5 - 0x1p-23 i)":
  103346. +double: 1
  103347. +idouble: 1
  103348. +Test "Imaginary part of: casin (-0.5 - 1.0 i)":
  103349. +double: 1
  103350. +idouble: 1
  103351. +Test "Imaginary part of: casin (-0x0.fffffffffffff8p0 + 0x1p-52 i)":
  103352. +double: 1
  103353. +idouble: 1
  103354. +Test "Imaginary part of: casin (-0x0.fffffffffffff8p0 - 0x1p-52 i)":
  103355. +double: 1
  103356. +idouble: 1
  103357. +Test "Imaginary part of: casin (-0x0.ffffffp0 + 0x1p-23 i)":
  103358. +float: 2
  103359. +ifloat: 2
  103360. +Test "Imaginary part of: casin (-0x0.ffffffp0 - 0x1p-23 i)":
  103361. +float: 2
  103362. +ifloat: 2
  103363. +Test "Imaginary part of: casin (-0x1.000002p0 + 0x1p-23 i)":
  103364. +float: 1
  103365. +ifloat: 1
  103366. +Test "Imaginary part of: casin (-0x1.000002p0 - 0x1p-23 i)":
  103367. +float: 1
  103368. +ifloat: 1
  103369. +Test "Real part of: casin (-0x1.fp-10 + 1.0 i)":
  103370. +float: 1
  103371. +ifloat: 1
  103372. +Test "Imaginary part of: casin (-0x1.fp-10 + 1.0 i)":
  103373. +double: 1
  103374. +idouble: 1
  103375. +Test "Real part of: casin (-0x1.fp-10 - 1.0 i)":
  103376. +float: 1
  103377. +ifloat: 1
  103378. +Test "Imaginary part of: casin (-0x1.fp-10 - 1.0 i)":
  103379. +double: 1
  103380. +idouble: 1
  103381. +Test "Imaginary part of: casin (-0x1.fp-100 + 1.0 i)":
  103382. +double: 1
  103383. +float: 1
  103384. +idouble: 1
  103385. +ifloat: 1
  103386. +Test "Imaginary part of: casin (-0x1.fp-100 - 1.0 i)":
  103387. +double: 1
  103388. +float: 1
  103389. +idouble: 1
  103390. +ifloat: 1
  103391. +Test "Imaginary part of: casin (-0x1.fp-1000 + 1.0 i)":
  103392. +double: 1
  103393. +idouble: 1
  103394. +Test "Imaginary part of: casin (-0x1.fp-1000 - 1.0 i)":
  103395. +double: 1
  103396. +idouble: 1
  103397. +Test "Imaginary part of: casin (-0x1.fp-1025 + 1.0 i)":
  103398. +double: 1
  103399. +idouble: 1
  103400. +Test "Imaginary part of: casin (-0x1.fp-1025 + 1.5 i)":
  103401. +double: 1
  103402. +idouble: 1
  103403. +Test "Imaginary part of: casin (-0x1.fp-1025 - 1.0 i)":
  103404. +double: 1
  103405. +idouble: 1
  103406. +Test "Imaginary part of: casin (-0x1.fp-1025 - 1.5 i)":
  103407. +double: 1
  103408. +idouble: 1
  103409. +Test "Imaginary part of: casin (-0x1.fp-129 + 0.5 i)":
  103410. +float: 1
  103411. +ifloat: 1
  103412. +Test "Imaginary part of: casin (-0x1.fp-129 + 1.0 i)":
  103413. +double: 1
  103414. +float: 1
  103415. +idouble: 1
  103416. +ifloat: 1
  103417. +Test "Imaginary part of: casin (-0x1.fp-129 + 1.5 i)":
  103418. +double: 1
  103419. +idouble: 1
  103420. +Test "Imaginary part of: casin (-0x1.fp-129 - 0.5 i)":
  103421. +float: 1
  103422. +ifloat: 1
  103423. +Test "Imaginary part of: casin (-0x1.fp-129 - 1.0 i)":
  103424. +double: 1
  103425. +float: 1
  103426. +idouble: 1
  103427. +ifloat: 1
  103428. +Test "Imaginary part of: casin (-0x1.fp-129 - 1.5 i)":
  103429. +double: 1
  103430. +idouble: 1
  103431. +Test "Imaginary part of: casin (-0x1.fp-30 + 1.0 i)":
  103432. +double: 1
  103433. +float: 1
  103434. +idouble: 1
  103435. +ifloat: 1
  103436. +Test "Imaginary part of: casin (-0x1.fp-30 - 1.0 i)":
  103437. +double: 1
  103438. +float: 1
  103439. +idouble: 1
  103440. +ifloat: 1
  103441. +Test "Imaginary part of: casin (-0x1p-105 + 0.5 i)":
  103442. +float: 1
  103443. +ifloat: 1
  103444. +Test "Imaginary part of: casin (-0x1p-105 - 0.5 i)":
  103445. +float: 1
  103446. +ifloat: 1
  103447. +Test "Imaginary part of: casin (-0x1p-112 + 0.5 i)":
  103448. +float: 1
  103449. +ifloat: 1
  103450. +Test "Imaginary part of: casin (-0x1p-112 - 0.5 i)":
  103451. +float: 1
  103452. +ifloat: 1
  103453. +Test "Real part of: casin (-0x1p-23 + 0.5 i)":
  103454. +double: 1
  103455. +float: 1
  103456. +idouble: 1
  103457. +ifloat: 1
  103458. +Test "Imaginary part of: casin (-0x1p-23 + 0.5 i)":
  103459. +float: 1
  103460. +ifloat: 1
  103461. +Test "Imaginary part of: casin (-0x1p-23 + 0x0.ffffffp0 i)":
  103462. +double: 1
  103463. +idouble: 1
  103464. +Test "Real part of: casin (-0x1p-23 + 0x1.000002p0 i)":
  103465. +double: 1
  103466. +float: 1
  103467. +idouble: 1
  103468. +ifloat: 1
  103469. +Test "Real part of: casin (-0x1p-23 - 0.5 i)":
  103470. +double: 1
  103471. +float: 1
  103472. +idouble: 1
  103473. +ifloat: 1
  103474. +Test "Imaginary part of: casin (-0x1p-23 - 0.5 i)":
  103475. +float: 1
  103476. +ifloat: 1
  103477. +Test "Imaginary part of: casin (-0x1p-23 - 0x0.ffffffp0 i)":
  103478. +double: 1
  103479. +idouble: 1
  103480. +Test "Real part of: casin (-0x1p-23 - 0x1.000002p0 i)":
  103481. +double: 1
  103482. +float: 1
  103483. +idouble: 1
  103484. +ifloat: 1
  103485. +Test "Imaginary part of: casin (-0x1p-52 + 0.5 i)":
  103486. +float: 1
  103487. +ifloat: 1
  103488. +Test "Imaginary part of: casin (-0x1p-52 - 0.5 i)":
  103489. +float: 1
  103490. +ifloat: 1
  103491. +Test "Imaginary part of: casin (-0x1p-63 + 0.5 i)":
  103492. +float: 1
  103493. +ifloat: 1
  103494. +Test "Imaginary part of: casin (-0x1p-63 - 0.5 i)":
  103495. +float: 1
  103496. +ifloat: 1
  103497. +Test "Real part of: casin (-1.0 + 0.25 i)":
  103498. +double: 1
  103499. +idouble: 1
  103500. +Test "Real part of: casin (-1.0 + 0.5 i)":
  103501. +float: 1
  103502. +ifloat: 1
  103503. +Test "Imaginary part of: casin (-1.0 + 0.5 i)":
  103504. +float: 1
  103505. +ifloat: 1
  103506. +Test "Imaginary part of: casin (-1.0 + 0x1.fp-10 i)":
  103507. +float: 1
  103508. +ifloat: 1
  103509. +Test "Real part of: casin (-1.0 - 0.25 i)":
  103510. +double: 1
  103511. +idouble: 1
  103512. +Test "Real part of: casin (-1.0 - 0.5 i)":
  103513. +float: 1
  103514. +ifloat: 1
  103515. +Test "Imaginary part of: casin (-1.0 - 0.5 i)":
  103516. +float: 1
  103517. +ifloat: 1
  103518. +Test "Imaginary part of: casin (-1.0 - 0x1.fp-10 i)":
  103519. +float: 1
  103520. +ifloat: 1
  103521. +Test "Imaginary part of: casin (0.25 + 1.0 i)":
  103522. +float: 1
  103523. +ifloat: 1
  103524. +Test "Imaginary part of: casin (0.25 - 1.0 i)":
  103525. +float: 1
  103526. +ifloat: 1
  103527. +Test "Imaginary part of: casin (0.5 + 0x1.fp-129 i)":
  103528. +double: 1
  103529. +idouble: 1
  103530. +Test "Imaginary part of: casin (0.5 + 0x1p-105 i)":
  103531. +double: 1
  103532. +idouble: 1
  103533. +Test "Imaginary part of: casin (0.5 + 0x1p-112 i)":
  103534. +double: 1
  103535. +idouble: 1
  103536. +Test "Imaginary part of: casin (0.5 + 0x1p-23 i)":
  103537. +double: 1
  103538. +idouble: 1
  103539. +Test "Imaginary part of: casin (0.5 + 1.0 i)":
  103540. +double: 1
  103541. +idouble: 1
  103542. +Test "Imaginary part of: casin (0.5 - 0x1.fp-129 i)":
  103543. +double: 1
  103544. +idouble: 1
  103545. +Test "Imaginary part of: casin (0.5 - 0x1p-105 i)":
  103546. +double: 1
  103547. +idouble: 1
  103548. +Test "Imaginary part of: casin (0.5 - 0x1p-112 i)":
  103549. +double: 1
  103550. +idouble: 1
  103551. +Test "Imaginary part of: casin (0.5 - 0x1p-23 i)":
  103552. +double: 1
  103553. +idouble: 1
  103554. +Test "Imaginary part of: casin (0.5 - 1.0 i)":
  103555. +double: 1
  103556. +idouble: 1
  103557. +Test "Real part of: casin (0.75 + 1.25 i)":
  103558. +double: 1
  103559. +float: 1
  103560. +idouble: 1
  103561. +ifloat: 1
  103562. +Test "Imaginary part of: casin (0x0.fffffffffffff8p0 + 0x1p-52 i)":
  103563. +double: 1
  103564. +idouble: 1
  103565. +Test "Imaginary part of: casin (0x0.fffffffffffff8p0 - 0x1p-52 i)":
  103566. +double: 1
  103567. +idouble: 1
  103568. +Test "Imaginary part of: casin (0x0.ffffffp0 + 0x1p-23 i)":
  103569. +float: 2
  103570. +ifloat: 2
  103571. +Test "Imaginary part of: casin (0x0.ffffffp0 - 0x1p-23 i)":
  103572. +float: 2
  103573. +ifloat: 2
  103574. +Test "Imaginary part of: casin (0x1.000002p0 + 0x1p-23 i)":
  103575. +float: 1
  103576. +ifloat: 1
  103577. +Test "Imaginary part of: casin (0x1.000002p0 - 0x1p-23 i)":
  103578. +float: 1
  103579. +ifloat: 1
  103580. +Test "Real part of: casin (0x1.fp-10 + 1.0 i)":
  103581. +float: 1
  103582. +ifloat: 1
  103583. +Test "Imaginary part of: casin (0x1.fp-10 + 1.0 i)":
  103584. +double: 1
  103585. +idouble: 1
  103586. +Test "Real part of: casin (0x1.fp-10 - 1.0 i)":
  103587. +float: 1
  103588. +ifloat: 1
  103589. +Test "Imaginary part of: casin (0x1.fp-10 - 1.0 i)":
  103590. +double: 1
  103591. +idouble: 1
  103592. +Test "Imaginary part of: casin (0x1.fp-100 + 1.0 i)":
  103593. +double: 1
  103594. +float: 1
  103595. +idouble: 1
  103596. +ifloat: 1
  103597. +Test "Imaginary part of: casin (0x1.fp-100 - 1.0 i)":
  103598. +double: 1
  103599. +float: 1
  103600. +idouble: 1
  103601. +ifloat: 1
  103602. +Test "Imaginary part of: casin (0x1.fp-1000 + 1.0 i)":
  103603. +double: 1
  103604. +idouble: 1
  103605. +Test "Imaginary part of: casin (0x1.fp-1000 - 1.0 i)":
  103606. +double: 1
  103607. +idouble: 1
  103608. +Test "Imaginary part of: casin (0x1.fp-1025 + 1.0 i)":
  103609. +double: 1
  103610. +idouble: 1
  103611. +Test "Imaginary part of: casin (0x1.fp-1025 + 1.5 i)":
  103612. +double: 1
  103613. +idouble: 1
  103614. +Test "Imaginary part of: casin (0x1.fp-1025 - 1.0 i)":
  103615. +double: 1
  103616. +idouble: 1
  103617. +Test "Imaginary part of: casin (0x1.fp-1025 - 1.5 i)":
  103618. +double: 1
  103619. +idouble: 1
  103620. +Test "Imaginary part of: casin (0x1.fp-129 + 0.5 i)":
  103621. +float: 1
  103622. +ifloat: 1
  103623. +Test "Imaginary part of: casin (0x1.fp-129 + 1.0 i)":
  103624. +double: 1
  103625. +float: 1
  103626. +idouble: 1
  103627. +ifloat: 1
  103628. +Test "Imaginary part of: casin (0x1.fp-129 + 1.5 i)":
  103629. +double: 1
  103630. +idouble: 1
  103631. +Test "Imaginary part of: casin (0x1.fp-129 - 0.5 i)":
  103632. +float: 1
  103633. +ifloat: 1
  103634. +Test "Imaginary part of: casin (0x1.fp-129 - 1.0 i)":
  103635. +double: 1
  103636. +float: 1
  103637. +idouble: 1
  103638. +ifloat: 1
  103639. +Test "Imaginary part of: casin (0x1.fp-129 - 1.5 i)":
  103640. +double: 1
  103641. +idouble: 1
  103642. +Test "Imaginary part of: casin (0x1.fp-30 + 1.0 i)":
  103643. +double: 1
  103644. +float: 1
  103645. +idouble: 1
  103646. +ifloat: 1
  103647. +Test "Imaginary part of: casin (0x1.fp-30 - 1.0 i)":
  103648. +double: 1
  103649. +float: 1
  103650. +idouble: 1
  103651. +ifloat: 1
  103652. +Test "Imaginary part of: casin (0x1.fp1023 + 0x1.fp1023 i)":
  103653. +double: 1
  103654. +idouble: 1
  103655. +Test "Imaginary part of: casin (0x1.fp127 + 0x1.fp127 i)":
  103656. +double: 1
  103657. +idouble: 1
  103658. +Test "Imaginary part of: casin (0x1p-105 + 0.5 i)":
  103659. +float: 1
  103660. +ifloat: 1
  103661. +Test "Imaginary part of: casin (0x1p-105 - 0.5 i)":
  103662. +float: 1
  103663. +ifloat: 1
  103664. +Test "Imaginary part of: casin (0x1p-112 + 0.5 i)":
  103665. +float: 1
  103666. +ifloat: 1
  103667. +Test "Imaginary part of: casin (0x1p-112 - 0.5 i)":
  103668. +float: 1
  103669. +ifloat: 1
  103670. +Test "Real part of: casin (0x1p-23 + 0.5 i)":
  103671. +double: 1
  103672. +float: 1
  103673. +idouble: 1
  103674. +ifloat: 1
  103675. +Test "Imaginary part of: casin (0x1p-23 + 0.5 i)":
  103676. +float: 1
  103677. +ifloat: 1
  103678. +Test "Imaginary part of: casin (0x1p-23 + 0x0.ffffffp0 i)":
  103679. +double: 1
  103680. +idouble: 1
  103681. +Test "Real part of: casin (0x1p-23 + 0x1.000002p0 i)":
  103682. +double: 1
  103683. +float: 1
  103684. +idouble: 1
  103685. +ifloat: 1
  103686. +Test "Real part of: casin (0x1p-23 - 0.5 i)":
  103687. +double: 1
  103688. +float: 1
  103689. +idouble: 1
  103690. +ifloat: 1
  103691. +Test "Imaginary part of: casin (0x1p-23 - 0.5 i)":
  103692. +float: 1
  103693. +ifloat: 1
  103694. +Test "Imaginary part of: casin (0x1p-23 - 0x0.ffffffp0 i)":
  103695. +double: 1
  103696. +idouble: 1
  103697. +Test "Real part of: casin (0x1p-23 - 0x1.000002p0 i)":
  103698. +double: 1
  103699. +float: 1
  103700. +idouble: 1
  103701. +ifloat: 1
  103702. +Test "Imaginary part of: casin (0x1p-52 + 0.5 i)":
  103703. +float: 1
  103704. +ifloat: 1
  103705. +Test "Imaginary part of: casin (0x1p-52 - 0.5 i)":
  103706. +float: 1
  103707. +ifloat: 1
  103708. +Test "Imaginary part of: casin (0x1p-63 + 0.5 i)":
  103709. +float: 1
  103710. +ifloat: 1
  103711. +Test "Imaginary part of: casin (0x1p-63 - 0.5 i)":
  103712. +float: 1
  103713. +ifloat: 1
  103714. +Test "Real part of: casin (1.0 + 0.25 i)":
  103715. +double: 1
  103716. +idouble: 1
  103717. +Test "Real part of: casin (1.0 + 0.5 i)":
  103718. +float: 1
  103719. +ifloat: 1
  103720. +Test "Imaginary part of: casin (1.0 + 0.5 i)":
  103721. +float: 1
  103722. +ifloat: 1
  103723. +Test "Imaginary part of: casin (1.0 + 0x1.fp-10 i)":
  103724. +float: 1
  103725. +ifloat: 1
  103726. +Test "Real part of: casin (1.0 - 0.25 i)":
  103727. +double: 1
  103728. +idouble: 1
  103729. +Test "Real part of: casin (1.0 - 0.5 i)":
  103730. +float: 1
  103731. +ifloat: 1
  103732. +Test "Imaginary part of: casin (1.0 - 0.5 i)":
  103733. +float: 1
  103734. +ifloat: 1
  103735. +Test "Imaginary part of: casin (1.0 - 0x1.fp-10 i)":
  103736. +float: 1
  103737. +ifloat: 1
  103738. +
  103739. +# casinh
  103740. +Test "Imaginary part of: casinh (-0.25 + 1.0 i)":
  103741. +double: 1
  103742. +idouble: 1
  103743. +Test "Imaginary part of: casinh (-0.25 - 1.0 i)":
  103744. +double: 1
  103745. +idouble: 1
  103746. +Test "Real part of: casinh (-0.5 + +0 i)":
  103747. +float: 1
  103748. +ifloat: 1
  103749. +Test "Real part of: casinh (-0.5 + 0x1.fp-129 i)":
  103750. +float: 1
  103751. +ifloat: 1
  103752. +Test "Real part of: casinh (-0.5 + 0x1p-105 i)":
  103753. +float: 1
  103754. +ifloat: 1
  103755. +Test "Real part of: casinh (-0.5 + 0x1p-112 i)":
  103756. +float: 1
  103757. +ifloat: 1
  103758. +Test "Real part of: casinh (-0.5 + 0x1p-23 i)":
  103759. +float: 1
  103760. +ifloat: 1
  103761. +Test "Imaginary part of: casinh (-0.5 + 0x1p-23 i)":
  103762. +double: 1
  103763. +float: 1
  103764. +idouble: 1
  103765. +ifloat: 1
  103766. +Test "Real part of: casinh (-0.5 + 0x1p-52 i)":
  103767. +float: 1
  103768. +ifloat: 1
  103769. +Test "Real part of: casinh (-0.5 + 0x1p-63 i)":
  103770. +float: 1
  103771. +ifloat: 1
  103772. +Test "Real part of: casinh (-0.5 + 1.0 i)":
  103773. +float: 1
  103774. +ifloat: 1
  103775. +Test "Imaginary part of: casinh (-0.5 + 1.0 i)":
  103776. +float: 1
  103777. +ifloat: 1
  103778. +Test "Real part of: casinh (-0.5 - 0 i)":
  103779. +float: 1
  103780. +ifloat: 1
  103781. +Test "Real part of: casinh (-0.5 - 0x1.fp-129 i)":
  103782. +float: 1
  103783. +ifloat: 1
  103784. +Test "Real part of: casinh (-0.5 - 0x1p-105 i)":
  103785. +float: 1
  103786. +ifloat: 1
  103787. +Test "Real part of: casinh (-0.5 - 0x1p-112 i)":
  103788. +float: 1
  103789. +ifloat: 1
  103790. +Test "Real part of: casinh (-0.5 - 0x1p-23 i)":
  103791. +float: 1
  103792. +ifloat: 1
  103793. +Test "Imaginary part of: casinh (-0.5 - 0x1p-23 i)":
  103794. +double: 1
  103795. +float: 1
  103796. +idouble: 1
  103797. +ifloat: 1
  103798. +Test "Real part of: casinh (-0.5 - 0x1p-52 i)":
  103799. +float: 1
  103800. +ifloat: 1
  103801. +Test "Real part of: casinh (-0.5 - 0x1p-63 i)":
  103802. +float: 1
  103803. +ifloat: 1
  103804. +Test "Real part of: casinh (-0.5 - 1.0 i)":
  103805. +float: 1
  103806. +ifloat: 1
  103807. +Test "Imaginary part of: casinh (-0.5 - 1.0 i)":
  103808. +float: 1
  103809. +ifloat: 1
  103810. +Test "Real part of: casinh (-0x0.ffffffp0 + 0x1p-23 i)":
  103811. +double: 1
  103812. +idouble: 1
  103813. +Test "Real part of: casinh (-0x0.ffffffp0 - 0x1p-23 i)":
  103814. +double: 1
  103815. +idouble: 1
  103816. +Test "Imaginary part of: casinh (-0x1.000002p0 + 0x1p-23 i)":
  103817. +double: 1
  103818. +float: 1
  103819. +idouble: 1
  103820. +ifloat: 1
  103821. +Test "Imaginary part of: casinh (-0x1.000002p0 - 0x1p-23 i)":
  103822. +double: 1
  103823. +float: 1
  103824. +idouble: 1
  103825. +ifloat: 1
  103826. +Test "Real part of: casinh (-0x1.fp-10 + 1.0 i)":
  103827. +float: 1
  103828. +ifloat: 1
  103829. +Test "Real part of: casinh (-0x1.fp-10 - 1.0 i)":
  103830. +float: 1
  103831. +ifloat: 1
  103832. +Test "Real part of: casinh (-0x1.fp-129 + 0.5 i)":
  103833. +double: 1
  103834. +idouble: 1
  103835. +Test "Real part of: casinh (-0x1.fp-129 - 0.5 i)":
  103836. +double: 1
  103837. +idouble: 1
  103838. +Test "Real part of: casinh (-0x1p-105 + 0.5 i)":
  103839. +double: 1
  103840. +idouble: 1
  103841. +Test "Real part of: casinh (-0x1p-105 - 0.5 i)":
  103842. +double: 1
  103843. +idouble: 1
  103844. +Test "Real part of: casinh (-0x1p-112 + 0.5 i)":
  103845. +double: 1
  103846. +idouble: 1
  103847. +Test "Real part of: casinh (-0x1p-112 - 0.5 i)":
  103848. +double: 1
  103849. +idouble: 1
  103850. +Test "Real part of: casinh (-0x1p-23 + 0.5 i)":
  103851. +double: 1
  103852. +idouble: 1
  103853. +Test "Real part of: casinh (-0x1p-23 + 0x0.ffffffp0 i)":
  103854. +float: 2
  103855. +ifloat: 2
  103856. +Test "Real part of: casinh (-0x1p-23 + 0x1.000002p0 i)":
  103857. +float: 1
  103858. +ifloat: 1
  103859. +Test "Real part of: casinh (-0x1p-23 - 0.5 i)":
  103860. +double: 1
  103861. +idouble: 1
  103862. +Test "Real part of: casinh (-0x1p-23 - 0x0.ffffffp0 i)":
  103863. +float: 2
  103864. +ifloat: 2
  103865. +Test "Real part of: casinh (-0x1p-23 - 0x1.000002p0 i)":
  103866. +float: 1
  103867. +ifloat: 1
  103868. +Test "Real part of: casinh (-0x1p-52 + 0x0.fffffffffffff8p0 i)":
  103869. +double: 1
  103870. +idouble: 1
  103871. +Test "Real part of: casinh (-0x1p-52 - 0x0.fffffffffffff8p0 i)":
  103872. +double: 1
  103873. +idouble: 1
  103874. +Test "Real part of: casinh (-1.0 + +0 i)":
  103875. +double: 1
  103876. +float: 1
  103877. +idouble: 1
  103878. +ifloat: 1
  103879. +Test "Real part of: casinh (-1.0 + 0.25 i)":
  103880. +float: 1
  103881. +ifloat: 1
  103882. +Test "Real part of: casinh (-1.0 + 0.5 i)":
  103883. +double: 1
  103884. +idouble: 1
  103885. +Test "Real part of: casinh (-1.0 + 0x1.fp-10 i)":
  103886. +double: 1
  103887. +idouble: 1
  103888. +Test "Imaginary part of: casinh (-1.0 + 0x1.fp-10 i)":
  103889. +float: 1
  103890. +ifloat: 1
  103891. +Test "Real part of: casinh (-1.0 + 0x1.fp-100 i)":
  103892. +double: 1
  103893. +float: 1
  103894. +idouble: 1
  103895. +ifloat: 1
  103896. +Test "Real part of: casinh (-1.0 + 0x1.fp-1000 i)":
  103897. +double: 1
  103898. +idouble: 1
  103899. +Test "Real part of: casinh (-1.0 + 0x1.fp-1025 i)":
  103900. +double: 1
  103901. +idouble: 1
  103902. +Test "Real part of: casinh (-1.0 + 0x1.fp-129 i)":
  103903. +double: 1
  103904. +float: 1
  103905. +idouble: 1
  103906. +ifloat: 1
  103907. +Test "Real part of: casinh (-1.0 + 0x1.fp-30 i)":
  103908. +double: 1
  103909. +float: 1
  103910. +idouble: 1
  103911. +ifloat: 1
  103912. +Test "Real part of: casinh (-1.0 - 0 i)":
  103913. +double: 1
  103914. +float: 1
  103915. +idouble: 1
  103916. +ifloat: 1
  103917. +Test "Real part of: casinh (-1.0 - 0.25 i)":
  103918. +float: 1
  103919. +ifloat: 1
  103920. +Test "Real part of: casinh (-1.0 - 0.5 i)":
  103921. +double: 1
  103922. +idouble: 1
  103923. +Test "Real part of: casinh (-1.0 - 0x1.fp-10 i)":
  103924. +double: 1
  103925. +idouble: 1
  103926. +Test "Imaginary part of: casinh (-1.0 - 0x1.fp-10 i)":
  103927. +float: 1
  103928. +ifloat: 1
  103929. +Test "Real part of: casinh (-1.0 - 0x1.fp-100 i)":
  103930. +double: 1
  103931. +float: 1
  103932. +idouble: 1
  103933. +ifloat: 1
  103934. +Test "Real part of: casinh (-1.0 - 0x1.fp-1000 i)":
  103935. +double: 1
  103936. +idouble: 1
  103937. +Test "Real part of: casinh (-1.0 - 0x1.fp-1025 i)":
  103938. +double: 1
  103939. +idouble: 1
  103940. +Test "Real part of: casinh (-1.0 - 0x1.fp-129 i)":
  103941. +double: 1
  103942. +float: 1
  103943. +idouble: 1
  103944. +ifloat: 1
  103945. +Test "Real part of: casinh (-1.0 - 0x1.fp-30 i)":
  103946. +double: 1
  103947. +float: 1
  103948. +idouble: 1
  103949. +ifloat: 1
  103950. +Test "Real part of: casinh (-1.5 + +0 i)":
  103951. +double: 1
  103952. +idouble: 1
  103953. +Test "Real part of: casinh (-1.5 + 0x1.fp-1025 i)":
  103954. +double: 1
  103955. +idouble: 1
  103956. +Test "Real part of: casinh (-1.5 + 0x1.fp-129 i)":
  103957. +double: 1
  103958. +idouble: 1
  103959. +Test "Real part of: casinh (-1.5 - 0 i)":
  103960. +double: 1
  103961. +idouble: 1
  103962. +Test "Real part of: casinh (-1.5 - 0x1.fp-1025 i)":
  103963. +double: 1
  103964. +idouble: 1
  103965. +Test "Real part of: casinh (-1.5 - 0x1.fp-129 i)":
  103966. +double: 1
  103967. +idouble: 1
  103968. +Test "Imaginary part of: casinh (0.25 + 1.0 i)":
  103969. +double: 1
  103970. +idouble: 1
  103971. +Test "Imaginary part of: casinh (0.25 - 1.0 i)":
  103972. +double: 1
  103973. +idouble: 1
  103974. +Test "Real part of: casinh (0.5 + +0 i)":
  103975. +float: 1
  103976. +ifloat: 1
  103977. +Test "Real part of: casinh (0.5 + 0x1.fp-129 i)":
  103978. +float: 1
  103979. +ifloat: 1
  103980. +Test "Real part of: casinh (0.5 + 0x1p-105 i)":
  103981. +float: 1
  103982. +ifloat: 1
  103983. +Test "Real part of: casinh (0.5 + 0x1p-112 i)":
  103984. +float: 1
  103985. +ifloat: 1
  103986. +Test "Real part of: casinh (0.5 + 0x1p-23 i)":
  103987. +float: 1
  103988. +ifloat: 1
  103989. +Test "Imaginary part of: casinh (0.5 + 0x1p-23 i)":
  103990. +double: 1
  103991. +float: 1
  103992. +idouble: 1
  103993. +ifloat: 1
  103994. +Test "Real part of: casinh (0.5 + 0x1p-52 i)":
  103995. +float: 1
  103996. +ifloat: 1
  103997. +Test "Real part of: casinh (0.5 + 0x1p-63 i)":
  103998. +float: 1
  103999. +ifloat: 1
  104000. +Test "Real part of: casinh (0.5 + 1.0 i)":
  104001. +float: 1
  104002. +ifloat: 1
  104003. +Test "Imaginary part of: casinh (0.5 + 1.0 i)":
  104004. +float: 1
  104005. +ifloat: 1
  104006. +Test "Real part of: casinh (0.5 - 0 i)":
  104007. +float: 1
  104008. +ifloat: 1
  104009. +Test "Real part of: casinh (0.5 - 0x1.fp-129 i)":
  104010. +float: 1
  104011. +ifloat: 1
  104012. +Test "Real part of: casinh (0.5 - 0x1p-105 i)":
  104013. +float: 1
  104014. +ifloat: 1
  104015. +Test "Real part of: casinh (0.5 - 0x1p-112 i)":
  104016. +float: 1
  104017. +ifloat: 1
  104018. +Test "Real part of: casinh (0.5 - 0x1p-23 i)":
  104019. +float: 1
  104020. +ifloat: 1
  104021. +Test "Imaginary part of: casinh (0.5 - 0x1p-23 i)":
  104022. +double: 1
  104023. +float: 1
  104024. +idouble: 1
  104025. +ifloat: 1
  104026. +Test "Real part of: casinh (0.5 - 0x1p-52 i)":
  104027. +float: 1
  104028. +ifloat: 1
  104029. +Test "Real part of: casinh (0.5 - 0x1p-63 i)":
  104030. +float: 1
  104031. +ifloat: 1
  104032. +Test "Real part of: casinh (0.5 - 1.0 i)":
  104033. +float: 1
  104034. +ifloat: 1
  104035. +Test "Imaginary part of: casinh (0.5 - 1.0 i)":
  104036. +float: 1
  104037. +ifloat: 1
  104038. +Test "Real part of: casinh (0.75 + 1.25 i)":
  104039. +float: 1
  104040. +ifloat: 1
  104041. +Test "Imaginary part of: casinh (0.75 + 1.25 i)":
  104042. +double: 1
  104043. +float: 1
  104044. +idouble: 1
  104045. +ifloat: 1
  104046. +Test "Real part of: casinh (0x0.ffffffp0 + 0x1p-23 i)":
  104047. +double: 1
  104048. +idouble: 1
  104049. +Test "Real part of: casinh (0x0.ffffffp0 - 0x1p-23 i)":
  104050. +double: 1
  104051. +idouble: 1
  104052. +Test "Imaginary part of: casinh (0x1.000002p0 + 0x1p-23 i)":
  104053. +double: 1
  104054. +float: 1
  104055. +idouble: 1
  104056. +ifloat: 1
  104057. +Test "Imaginary part of: casinh (0x1.000002p0 - 0x1p-23 i)":
  104058. +double: 1
  104059. +float: 1
  104060. +idouble: 1
  104061. +ifloat: 1
  104062. +Test "Real part of: casinh (0x1.fp-10 + 1.0 i)":
  104063. +float: 1
  104064. +ifloat: 1
  104065. +Test "Real part of: casinh (0x1.fp-10 - 1.0 i)":
  104066. +float: 1
  104067. +ifloat: 1
  104068. +Test "Real part of: casinh (0x1.fp-129 + 0.5 i)":
  104069. +double: 1
  104070. +idouble: 1
  104071. +Test "Real part of: casinh (0x1.fp-129 - 0.5 i)":
  104072. +double: 1
  104073. +idouble: 1
  104074. +Test "Real part of: casinh (0x1.fp1023 + 0x1.fp1023 i)":
  104075. +double: 1
  104076. +idouble: 1
  104077. +Test "Real part of: casinh (0x1.fp127 + 0x1.fp127 i)":
  104078. +double: 1
  104079. +idouble: 1
  104080. +Test "Real part of: casinh (0x1p-105 + 0.5 i)":
  104081. +double: 1
  104082. +idouble: 1
  104083. +Test "Real part of: casinh (0x1p-105 - 0.5 i)":
  104084. +double: 1
  104085. +idouble: 1
  104086. +Test "Real part of: casinh (0x1p-112 + 0.5 i)":
  104087. +double: 1
  104088. +idouble: 1
  104089. +Test "Real part of: casinh (0x1p-112 - 0.5 i)":
  104090. +double: 1
  104091. +idouble: 1
  104092. +Test "Real part of: casinh (0x1p-23 + 0.5 i)":
  104093. +double: 1
  104094. +idouble: 1
  104095. +Test "Real part of: casinh (0x1p-23 + 0x0.ffffffp0 i)":
  104096. +float: 2
  104097. +ifloat: 2
  104098. +Test "Real part of: casinh (0x1p-23 + 0x1.000002p0 i)":
  104099. +float: 1
  104100. +ifloat: 1
  104101. +Test "Real part of: casinh (0x1p-23 - 0.5 i)":
  104102. +double: 1
  104103. +idouble: 1
  104104. +Test "Real part of: casinh (0x1p-23 - 0x0.ffffffp0 i)":
  104105. +float: 2
  104106. +ifloat: 2
  104107. +Test "Real part of: casinh (0x1p-23 - 0x1.000002p0 i)":
  104108. +float: 1
  104109. +ifloat: 1
  104110. +Test "Real part of: casinh (0x1p-52 + 0x0.fffffffffffff8p0 i)":
  104111. +double: 1
  104112. +idouble: 1
  104113. +Test "Real part of: casinh (0x1p-52 - 0x0.fffffffffffff8p0 i)":
  104114. +double: 1
  104115. +idouble: 1
  104116. +Test "Real part of: casinh (1.0 + +0 i)":
  104117. +double: 1
  104118. +float: 1
  104119. +idouble: 1
  104120. +ifloat: 1
  104121. +Test "Real part of: casinh (1.0 + 0.25 i)":
  104122. +float: 1
  104123. +ifloat: 1
  104124. +Test "Real part of: casinh (1.0 + 0.5 i)":
  104125. +double: 1
  104126. +idouble: 1
  104127. +Test "Real part of: casinh (1.0 + 0x1.fp-10 i)":
  104128. +double: 1
  104129. +idouble: 1
  104130. +Test "Imaginary part of: casinh (1.0 + 0x1.fp-10 i)":
  104131. +float: 1
  104132. +ifloat: 1
  104133. +Test "Real part of: casinh (1.0 + 0x1.fp-100 i)":
  104134. +double: 1
  104135. +float: 1
  104136. +idouble: 1
  104137. +ifloat: 1
  104138. +Test "Real part of: casinh (1.0 + 0x1.fp-1000 i)":
  104139. +double: 1
  104140. +idouble: 1
  104141. +Test "Real part of: casinh (1.0 + 0x1.fp-1025 i)":
  104142. +double: 1
  104143. +idouble: 1
  104144. +Test "Real part of: casinh (1.0 + 0x1.fp-129 i)":
  104145. +double: 1
  104146. +float: 1
  104147. +idouble: 1
  104148. +ifloat: 1
  104149. +Test "Real part of: casinh (1.0 + 0x1.fp-30 i)":
  104150. +double: 1
  104151. +float: 1
  104152. +idouble: 1
  104153. +ifloat: 1
  104154. +Test "Real part of: casinh (1.0 - 0 i)":
  104155. +double: 1
  104156. +float: 1
  104157. +idouble: 1
  104158. +ifloat: 1
  104159. +Test "Real part of: casinh (1.0 - 0.25 i)":
  104160. +float: 1
  104161. +ifloat: 1
  104162. +Test "Real part of: casinh (1.0 - 0.5 i)":
  104163. +double: 1
  104164. +idouble: 1
  104165. +Test "Real part of: casinh (1.0 - 0x1.fp-10 i)":
  104166. +double: 1
  104167. +idouble: 1
  104168. +Test "Imaginary part of: casinh (1.0 - 0x1.fp-10 i)":
  104169. +float: 1
  104170. +ifloat: 1
  104171. +Test "Real part of: casinh (1.0 - 0x1.fp-100 i)":
  104172. +double: 1
  104173. +float: 1
  104174. +idouble: 1
  104175. +ifloat: 1
  104176. +Test "Real part of: casinh (1.0 - 0x1.fp-1000 i)":
  104177. +double: 1
  104178. +idouble: 1
  104179. +Test "Real part of: casinh (1.0 - 0x1.fp-1025 i)":
  104180. +double: 1
  104181. +idouble: 1
  104182. +Test "Real part of: casinh (1.0 - 0x1.fp-129 i)":
  104183. +double: 1
  104184. +float: 1
  104185. +idouble: 1
  104186. +ifloat: 1
  104187. +Test "Real part of: casinh (1.0 - 0x1.fp-30 i)":
  104188. +double: 1
  104189. +float: 1
  104190. +idouble: 1
  104191. +ifloat: 1
  104192. +Test "Real part of: casinh (1.5 + +0 i)":
  104193. +double: 1
  104194. +idouble: 1
  104195. +Test "Real part of: casinh (1.5 + 0x1.fp-1025 i)":
  104196. +double: 1
  104197. +idouble: 1
  104198. +Test "Real part of: casinh (1.5 + 0x1.fp-129 i)":
  104199. +double: 1
  104200. +idouble: 1
  104201. +Test "Real part of: casinh (1.5 - 0 i)":
  104202. +double: 1
  104203. +idouble: 1
  104204. +Test "Real part of: casinh (1.5 - 0x1.fp-1025 i)":
  104205. +double: 1
  104206. +idouble: 1
  104207. +Test "Real part of: casinh (1.5 - 0x1.fp-129 i)":
  104208. +double: 1
  104209. +idouble: 1
  104210. +
  104211. +# catan
  104212. +Test "Imaginary part of: catan (-0x0.fffffffffffff8p0 + 0x1p-27 i)":
  104213. +double: 1
  104214. +idouble: 1
  104215. +Test "Imaginary part of: catan (-0x0.ffffffp0 + 0x1p-13 i)":
  104216. +double: 1
  104217. +float: 1
  104218. +idouble: 1
  104219. +ifloat: 1
  104220. +Test "Imaginary part of: catan (-0x1.0000000000001p0 - 0x1p-27 i)":
  104221. +double: 1
  104222. +idouble: 1
  104223. +Test "Real part of: catan (-0x1.000002p0 + 0x1p-126 i)":
  104224. +float: 1
  104225. +ifloat: 1
  104226. +Test "Real part of: catan (-0x1.000002p0 + 0x1p-13 i)":
  104227. +float: 1
  104228. +ifloat: 1
  104229. +Test "Real part of: catan (-0x1.000002p0 - 0x1p-126 i)":
  104230. +float: 1
  104231. +ifloat: 1
  104232. +Test "Real part of: catan (-0x1.000002p0 - 0x1p-13 i)":
  104233. +float: 1
  104234. +ifloat: 1
  104235. +Test "Imaginary part of: catan (-0x1.000002p0 - 0x1p-13 i)":
  104236. +double: 1
  104237. +idouble: 1
  104238. +Test "Imaginary part of: catan (-0x1.fp1023 + 0x1.fp1023 i)":
  104239. +double: 1
  104240. +idouble: 1
  104241. +Test "Imaginary part of: catan (-0x1.fp1023 - 0x1.fp1023 i)":
  104242. +double: 1
  104243. +idouble: 1
  104244. +Test "Imaginary part of: catan (-0x1.fp127 + 0x1.fp127 i)":
  104245. +double: 1
  104246. +idouble: 1
  104247. +Test "Imaginary part of: catan (-0x1.fp127 - 0x1.fp127 i)":
  104248. +double: 1
  104249. +idouble: 1
  104250. +Test "Imaginary part of: catan (-0x1p-1020 + 1.0 i)":
  104251. +double: 1
  104252. +idouble: 1
  104253. +Test "Imaginary part of: catan (-0x1p-1020 - 1.0 i)":
  104254. +double: 1
  104255. +idouble: 1
  104256. +Test "Real part of: catan (-0x1p-13 + 0x1.000002p0 i)":
  104257. +float: 1
  104258. +ifloat: 1
  104259. +Test "Real part of: catan (-0x1p-13 + 1.0 i)":
  104260. +float: 1
  104261. +ifloat: 1
  104262. +Test "Real part of: catan (-0x1p-13 - 0x1.000002p0 i)":
  104263. +float: 1
  104264. +ifloat: 1
  104265. +Test "Imaginary part of: catan (-0x1p-13 - 0x1.000002p0 i)":
  104266. +float: 1
  104267. +ifloat: 1
  104268. +Test "Real part of: catan (-0x1p-13 - 1.0 i)":
  104269. +float: 1
  104270. +ifloat: 1
  104271. +Test "Imaginary part of: catan (-0x1p-54 + 1.0 i)":
  104272. +float: 1
  104273. +ifloat: 1
  104274. +Test "Imaginary part of: catan (-0x1p-54 - 1.0 i)":
  104275. +float: 1
  104276. +ifloat: 1
  104277. +Test "Imaginary part of: catan (-0x1p-57 + 1.0 i)":
  104278. +float: 1
  104279. +ifloat: 1
  104280. +Test "Imaginary part of: catan (-0x1p-57 - 1.0 i)":
  104281. +float: 1
  104282. +ifloat: 1
  104283. +Test "Real part of: catan (-1.0 + 0x1p-13 i)":
  104284. +float: 1
  104285. +ifloat: 1
  104286. +Test "Real part of: catan (-1.0 - 0x1p-13 i)":
  104287. +float: 1
  104288. +ifloat: 1
  104289. +Test "Imaginary part of: catan (-2 - 3 i)":
  104290. +double: 1
  104291. +float: 1
  104292. +idouble: 1
  104293. +ifloat: 1
  104294. +Test "Imaginary part of: catan (0x0.fffffffffffff8p0 + 0x1p-27 i)":
  104295. +double: 1
  104296. +idouble: 1
  104297. +Test "Imaginary part of: catan (0x0.ffffffp0 + 0x1p-13 i)":
  104298. +double: 1
  104299. +float: 1
  104300. +idouble: 1
  104301. +ifloat: 1
  104302. +Test "Imaginary part of: catan (0x1.0000000000001p0 - 0x1p-27 i)":
  104303. +double: 1
  104304. +idouble: 1
  104305. +Test "Real part of: catan (0x1.000002p0 + 0x1p-126 i)":
  104306. +float: 1
  104307. +ifloat: 1
  104308. +Test "Real part of: catan (0x1.000002p0 + 0x1p-13 i)":
  104309. +float: 1
  104310. +ifloat: 1
  104311. +Test "Real part of: catan (0x1.000002p0 - 0x1p-126 i)":
  104312. +float: 1
  104313. +ifloat: 1
  104314. +Test "Real part of: catan (0x1.000002p0 - 0x1p-13 i)":
  104315. +float: 1
  104316. +ifloat: 1
  104317. +Test "Imaginary part of: catan (0x1.000002p0 - 0x1p-13 i)":
  104318. +double: 1
  104319. +idouble: 1
  104320. +Test "Imaginary part of: catan (0x1.fp1023 + 0x1.fp1023 i)":
  104321. +double: 1
  104322. +idouble: 1
  104323. +Test "Imaginary part of: catan (0x1.fp1023 - 0x1.fp1023 i)":
  104324. +double: 1
  104325. +idouble: 1
  104326. +Test "Imaginary part of: catan (0x1.fp127 + 0x1.fp127 i)":
  104327. +double: 1
  104328. +idouble: 1
  104329. +Test "Imaginary part of: catan (0x1.fp127 - 0x1.fp127 i)":
  104330. +double: 1
  104331. +idouble: 1
  104332. +Test "Imaginary part of: catan (0x1p-1020 + 1.0 i)":
  104333. +double: 1
  104334. +idouble: 1
  104335. +Test "Imaginary part of: catan (0x1p-1020 - 1.0 i)":
  104336. +double: 1
  104337. +idouble: 1
  104338. +Test "Real part of: catan (0x1p-13 + 0x1.000002p0 i)":
  104339. +float: 1
  104340. +ifloat: 1
  104341. +Test "Real part of: catan (0x1p-13 + 1.0 i)":
  104342. +float: 1
  104343. +ifloat: 1
  104344. +Test "Real part of: catan (0x1p-13 - 0x1.000002p0 i)":
  104345. +float: 1
  104346. +ifloat: 1
  104347. +Test "Imaginary part of: catan (0x1p-13 - 0x1.000002p0 i)":
  104348. +float: 1
  104349. +ifloat: 1
  104350. +Test "Real part of: catan (0x1p-13 - 1.0 i)":
  104351. +float: 1
  104352. +ifloat: 1
  104353. +Test "Imaginary part of: catan (0x1p-54 + 1.0 i)":
  104354. +float: 1
  104355. +ifloat: 1
  104356. +Test "Imaginary part of: catan (0x1p-54 - 1.0 i)":
  104357. +float: 1
  104358. +ifloat: 1
  104359. +Test "Imaginary part of: catan (0x1p-57 + 1.0 i)":
  104360. +float: 1
  104361. +ifloat: 1
  104362. +Test "Imaginary part of: catan (0x1p-57 - 1.0 i)":
  104363. +float: 1
  104364. +ifloat: 1
  104365. +Test "Real part of: catan (1.0 + 0x1p-13 i)":
  104366. +float: 1
  104367. +ifloat: 1
  104368. +Test "Real part of: catan (1.0 - 0x1p-13 i)":
  104369. +float: 1
  104370. +ifloat: 1
  104371. +
  104372. +# catanh
  104373. +Test "Real part of: catanh (-0x1.000002p0 + 0x1p-13 i)":
  104374. +float: 1
  104375. +ifloat: 1
  104376. +Test "Imaginary part of: catanh (-0x1.000002p0 + 0x1p-13 i)":
  104377. +float: 1
  104378. +ifloat: 1
  104379. +Test "Real part of: catanh (-0x1.000002p0 - 0x1p-13 i)":
  104380. +float: 1
  104381. +ifloat: 1
  104382. +Test "Imaginary part of: catanh (-0x1.000002p0 - 0x1p-13 i)":
  104383. +float: 1
  104384. +ifloat: 1
  104385. +Test "Real part of: catanh (-0x1.fp1023 + 0x1.fp1023 i)":
  104386. +double: 1
  104387. +idouble: 1
  104388. +Test "Real part of: catanh (-0x1.fp1023 - 0x1.fp1023 i)":
  104389. +double: 1
  104390. +idouble: 1
  104391. +Test "Real part of: catanh (-0x1.fp127 + 0x1.fp127 i)":
  104392. +double: 1
  104393. +idouble: 1
  104394. +Test "Real part of: catanh (-0x1.fp127 - 0x1.fp127 i)":
  104395. +double: 1
  104396. +idouble: 1
  104397. +Test "Imaginary part of: catanh (-0x1p-126 + 0x1.000002p0 i)":
  104398. +float: 1
  104399. +ifloat: 1
  104400. +Test "Imaginary part of: catanh (-0x1p-126 - 0x1.000002p0 i)":
  104401. +float: 1
  104402. +ifloat: 1
  104403. +Test "Real part of: catanh (-0x1p-13 + 0x1.000002p0 i)":
  104404. +double: 1
  104405. +idouble: 1
  104406. +Test "Imaginary part of: catanh (-0x1p-13 + 0x1.000002p0 i)":
  104407. +float: 1
  104408. +ifloat: 1
  104409. +Test "Imaginary part of: catanh (-0x1p-13 + 1.0 i)":
  104410. +float: 1
  104411. +ifloat: 1
  104412. +Test "Real part of: catanh (-0x1p-13 - 0x1.000002p0 i)":
  104413. +double: 1
  104414. +idouble: 1
  104415. +Test "Imaginary part of: catanh (-0x1p-13 - 0x1.000002p0 i)":
  104416. +float: 1
  104417. +ifloat: 1
  104418. +Test "Imaginary part of: catanh (-0x1p-13 - 1.0 i)":
  104419. +float: 1
  104420. +ifloat: 1
  104421. +Test "Real part of: catanh (-0x1p-27 + 0x1.0000000000001p0 i)":
  104422. +double: 1
  104423. +idouble: 1
  104424. +Test "Real part of: catanh (-0x1p-27 - 0x1.0000000000001p0 i)":
  104425. +double: 1
  104426. +idouble: 1
  104427. +Test "Real part of: catanh (-1.0 + 0x1p-1020 i)":
  104428. +double: 1
  104429. +idouble: 1
  104430. +Test "Imaginary part of: catanh (-1.0 + 0x1p-13 i)":
  104431. +float: 1
  104432. +ifloat: 1
  104433. +Test "Real part of: catanh (-1.0 + 0x1p-54 i)":
  104434. +float: 1
  104435. +ifloat: 1
  104436. +Test "Real part of: catanh (-1.0 + 0x1p-57 i)":
  104437. +float: 1
  104438. +ifloat: 1
  104439. +Test "Real part of: catanh (-1.0 - 0x1p-1020 i)":
  104440. +double: 1
  104441. +idouble: 1
  104442. +Test "Imaginary part of: catanh (-1.0 - 0x1p-13 i)":
  104443. +float: 1
  104444. +ifloat: 1
  104445. +Test "Real part of: catanh (-1.0 - 0x1p-54 i)":
  104446. +float: 1
  104447. +ifloat: 1
  104448. +Test "Real part of: catanh (-1.0 - 0x1p-57 i)":
  104449. +float: 1
  104450. +ifloat: 1
  104451. +Test "Real part of: catanh (-2 - 3 i)":
  104452. +double: 1
  104453. +idouble: 1
  104454. +Test "Imaginary part of: catanh (0x1.000002p0 + 0x1p-13 i)":
  104455. +float: 1
  104456. +ifloat: 1
  104457. +Test "Imaginary part of: catanh (0x1.000002p0 - 0x1p-13 i)":
  104458. +float: 1
  104459. +ifloat: 1
  104460. +Test "Real part of: catanh (0x1.fp1023 + 0x1.fp1023 i)":
  104461. +double: 1
  104462. +idouble: 1
  104463. +Test "Real part of: catanh (0x1.fp1023 - 0x1.fp1023 i)":
  104464. +double: 1
  104465. +idouble: 1
  104466. +Test "Real part of: catanh (0x1.fp127 + 0x1.fp127 i)":
  104467. +double: 1
  104468. +idouble: 1
  104469. +Test "Real part of: catanh (0x1.fp127 - 0x1.fp127 i)":
  104470. +double: 1
  104471. +idouble: 1
  104472. +Test "Imaginary part of: catanh (0x1p-126 + 0x1.000002p0 i)":
  104473. +float: 1
  104474. +ifloat: 1
  104475. +Test "Imaginary part of: catanh (0x1p-126 - 0x1.000002p0 i)":
  104476. +float: 1
  104477. +ifloat: 1
  104478. +Test "Real part of: catanh (0x1p-13 + 0x0.ffffffp0 i)":
  104479. +double: 1
  104480. +float: 1
  104481. +idouble: 1
  104482. +ifloat: 1
  104483. +Test "Imaginary part of: catanh (0x1p-13 + 0x1.000002p0 i)":
  104484. +float: 1
  104485. +ifloat: 1
  104486. +Test "Imaginary part of: catanh (0x1p-13 + 1.0 i)":
  104487. +float: 1
  104488. +ifloat: 1
  104489. +Test "Real part of: catanh (0x1p-13 - 0x0.ffffffp0 i)":
  104490. +double: 1
  104491. +float: 1
  104492. +idouble: 1
  104493. +ifloat: 1
  104494. +Test "Imaginary part of: catanh (0x1p-13 - 0x1.000002p0 i)":
  104495. +float: 1
  104496. +ifloat: 1
  104497. +Test "Imaginary part of: catanh (0x1p-13 - 1.0 i)":
  104498. +float: 1
  104499. +ifloat: 1
  104500. +Test "Real part of: catanh (0x1p-27 + 0x0.fffffffffffff8p0 i)":
  104501. +double: 1
  104502. +idouble: 1
  104503. +Test "Real part of: catanh (0x1p-27 - 0x0.fffffffffffff8p0 i)":
  104504. +double: 1
  104505. +idouble: 1
  104506. +Test "Real part of: catanh (1.0 + 0x1p-1020 i)":
  104507. +double: 1
  104508. +idouble: 1
  104509. +Test "Imaginary part of: catanh (1.0 + 0x1p-13 i)":
  104510. +float: 1
  104511. +ifloat: 1
  104512. +Test "Real part of: catanh (1.0 + 0x1p-54 i)":
  104513. +float: 1
  104514. +ifloat: 1
  104515. +Test "Real part of: catanh (1.0 + 0x1p-57 i)":
  104516. +float: 1
  104517. +ifloat: 1
  104518. +Test "Real part of: catanh (1.0 - 0x1p-1020 i)":
  104519. +double: 1
  104520. +idouble: 1
  104521. +Test "Imaginary part of: catanh (1.0 - 0x1p-13 i)":
  104522. +float: 1
  104523. +ifloat: 1
  104524. +Test "Real part of: catanh (1.0 - 0x1p-54 i)":
  104525. +float: 1
  104526. +ifloat: 1
  104527. +Test "Real part of: catanh (1.0 - 0x1p-57 i)":
  104528. +float: 1
  104529. +ifloat: 1
  104530. +
  104531. +# cbrt
  104532. +Test "cbrt (-27.0)":
  104533. +double: 1
  104534. +idouble: 1
  104535. +Test "cbrt (0.75)":
  104536. +double: 1
  104537. +idouble: 1
  104538. +Test "cbrt (0.9921875)":
  104539. +double: 1
  104540. +idouble: 1
  104541. +
  104542. +# ccos
  104543. +Test "Imaginary part of: ccos (-0.75 + 710.5 i)":
  104544. +double: 1
  104545. +idouble: 1
  104546. +Test "Imaginary part of: ccos (-0.75 + 89.5 i)":
  104547. +float: 1
  104548. +ifloat: 1
  104549. +Test "Imaginary part of: ccos (-0.75 - 710.5 i)":
  104550. +double: 1
  104551. +idouble: 1
  104552. +Test "Imaginary part of: ccos (-0.75 - 89.5 i)":
  104553. +float: 1
  104554. +ifloat: 1
  104555. +Test "Imaginary part of: ccos (-2 - 3 i)":
  104556. +float: 1
  104557. +ifloat: 1
  104558. +Test "Real part of: ccos (0.75 + 1.25 i)":
  104559. +double: 1
  104560. +float: 1
  104561. +idouble: 1
  104562. +ifloat: 1
  104563. +Test "Imaginary part of: ccos (0.75 + 1.25 i)":
  104564. +float: 1
  104565. +ifloat: 1
  104566. +Test "Imaginary part of: ccos (0.75 + 710.5 i)":
  104567. +double: 1
  104568. +idouble: 1
  104569. +Test "Imaginary part of: ccos (0.75 + 89.5 i)":
  104570. +float: 1
  104571. +ifloat: 1
  104572. +Test "Imaginary part of: ccos (0.75 - 710.5 i)":
  104573. +double: 1
  104574. +idouble: 1
  104575. +Test "Imaginary part of: ccos (0.75 - 89.5 i)":
  104576. +float: 1
  104577. +ifloat: 1
  104578. +Test "Imaginary part of: ccos (0x1p-1074 + 1440 i)":
  104579. +double: 1
  104580. +idouble: 1
  104581. +
  104582. +# ccosh
  104583. +Test "Real part of: ccosh (-2 - 3 i)":
  104584. +float: 1
  104585. +ifloat: 1
  104586. +Test "Imaginary part of: ccosh (-2 - 3 i)":
  104587. +float: 1
  104588. +ifloat: 1
  104589. +Test "Imaginary part of: ccosh (-710.5 + 0.75 i)":
  104590. +double: 1
  104591. +idouble: 1
  104592. +Test "Imaginary part of: ccosh (-710.5 - 0.75 i)":
  104593. +double: 1
  104594. +idouble: 1
  104595. +Test "Imaginary part of: ccosh (-89.5 + 0.75 i)":
  104596. +float: 1
  104597. +ifloat: 1
  104598. +Test "Imaginary part of: ccosh (-89.5 - 0.75 i)":
  104599. +float: 1
  104600. +ifloat: 1
  104601. +Test "Real part of: ccosh (0.75 + 1.25 i)":
  104602. +double: 1
  104603. +float: 1
  104604. +idouble: 1
  104605. +ifloat: 1
  104606. +Test "Imaginary part of: ccosh (0.75 + 1.25 i)":
  104607. +float: 1
  104608. +ifloat: 1
  104609. +Test "Imaginary part of: ccosh (1440 + 0x1p-1074 i)":
  104610. +double: 1
  104611. +idouble: 1
  104612. +Test "Imaginary part of: ccosh (710.5 + 0.75 i)":
  104613. +double: 1
  104614. +idouble: 1
  104615. +Test "Imaginary part of: ccosh (710.5 - 0.75 i)":
  104616. +double: 1
  104617. +idouble: 1
  104618. +Test "Imaginary part of: ccosh (89.5 + 0.75 i)":
  104619. +float: 1
  104620. +ifloat: 1
  104621. +Test "Imaginary part of: ccosh (89.5 - 0.75 i)":
  104622. +float: 1
  104623. +ifloat: 1
  104624. +
  104625. +# cexp
  104626. +Test "Imaginary part of: cexp (-2.0 - 3.0 i)":
  104627. +float: 1
  104628. +ifloat: 1
  104629. +Test "Imaginary part of: cexp (-95 + 0.75 i)":
  104630. +double: 1
  104631. +idouble: 1
  104632. +Test "Real part of: cexp (0.75 + 1.25 i)":
  104633. +float: 1
  104634. +ifloat: 1
  104635. +Test "Imaginary part of: cexp (1440 + 0x1p-1074 i)":
  104636. +double: 1
  104637. +idouble: 1
  104638. +Test "Real part of: cexp (50 + 0x1p127 i)":
  104639. +double: 2
  104640. +float: 1
  104641. +idouble: 2
  104642. +ifloat: 1
  104643. +Test "Imaginary part of: cexp (50 + 0x1p127 i)":
  104644. +double: 1
  104645. +idouble: 1
  104646. +Test "Real part of: cexp (500 + 0x1p1023 i)":
  104647. +double: 1
  104648. +idouble: 1
  104649. +Test "Real part of: cexp (709.8125 + 0.75 i)":
  104650. +double: 1
  104651. +idouble: 1
  104652. +Test "Imaginary part of: cexp (709.8125 + 0.75 i)":
  104653. +double: 1
  104654. +idouble: 1
  104655. +Test "Real part of: cexp (88.75 + 0.75 i)":
  104656. +float: 1
  104657. +ifloat: 1
  104658. +Test "Imaginary part of: cexp (88.75 + 0.75 i)":
  104659. +float: 2
  104660. +ifloat: 2
  104661. +
  104662. +# clog
  104663. +Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-1000 i)":
  104664. +double: 1
  104665. +idouble: 1
  104666. +Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-30 i)":
  104667. +double: 1
  104668. +idouble: 1
  104669. +Test "Imaginary part of: clog (-0x1.234566p-40 - 1.0 i)":
  104670. +float: 1
  104671. +ifloat: 1
  104672. +Test "Real part of: clog (-0x1.fp+127 + 0x1p-149 i)":
  104673. +float: 1
  104674. +ifloat: 1
  104675. +Test "Real part of: clog (-0x1.fp+127 - 0x1p-149 i)":
  104676. +float: 1
  104677. +ifloat: 1
  104678. +Test "Real part of: clog (-0x1p-149 + 0x1.fp+127 i)":
  104679. +float: 1
  104680. +ifloat: 1
  104681. +Test "Imaginary part of: clog (-0x1p-149 + 0x1.fp+127 i)":
  104682. +float: 1
  104683. +ifloat: 1
  104684. +Test "Real part of: clog (-0x1p-149 - 0x1.fp+127 i)":
  104685. +float: 1
  104686. +ifloat: 1
  104687. +Test "Imaginary part of: clog (-0x1p-149 - 0x1.fp+127 i)":
  104688. +float: 1
  104689. +ifloat: 1
  104690. +Test "Real part of: clog (0x0.ffffffp0 + 0x0.ffffffp-100 i)":
  104691. +float: 1
  104692. +ifloat: 1
  104693. +Test "Real part of: clog (0x1.000566p0 + 0x1.234p-10 i)":
  104694. +float: 1
  104695. +ifloat: 1
  104696. +Test "Real part of: clog (0x1.fp+127 + 0x1p-149 i)":
  104697. +float: 1
  104698. +ifloat: 1
  104699. +Test "Real part of: clog (0x1.fp+127 - 0x1p-149 i)":
  104700. +float: 1
  104701. +ifloat: 1
  104702. +Test "Real part of: clog (0x1p-1074 + 0x1p-1074 i)":
  104703. +double: 1
  104704. +idouble: 1
  104705. +Test "Real part of: clog (0x1p-147 + 0x1p-147 i)":
  104706. +float: 1
  104707. +ifloat: 1
  104708. +Test "Real part of: clog (0x1p-149 + 0x1.fp+127 i)":
  104709. +float: 1
  104710. +ifloat: 1
  104711. +Test "Real part of: clog (0x1p-149 - 0x1.fp+127 i)":
  104712. +float: 1
  104713. +ifloat: 1
  104714. +Test "Imaginary part of: clog (0x2818p-15 + 0x798fp-15 i)":
  104715. +float: 1
  104716. +ifloat: 1
  104717. +Test "Real part of: clog (1.0 + 0x1.234566p-10 i)":
  104718. +float: 1
  104719. +ifloat: 1
  104720. +
  104721. +# clog10
  104722. +Test "Imaginary part of: clog10 (-0 + inf i)":
  104723. +double: 1
  104724. +float: 1
  104725. +idouble: 1
  104726. +ifloat: 1
  104727. +Test "Imaginary part of: clog10 (-0 - inf i)":
  104728. +double: 1
  104729. +float: 1
  104730. +idouble: 1
  104731. +ifloat: 1
  104732. +Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i)":
  104733. +double: 2
  104734. +idouble: 2
  104735. +Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i)":
  104736. +double: 1
  104737. +idouble: 1
  104738. +Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i)":
  104739. +double: 2
  104740. +idouble: 2
  104741. +Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i)":
  104742. +double: 1
  104743. +idouble: 1
  104744. +Test "Imaginary part of: clog10 (-0x1.fp+1023 + 0x1p-1074 i)":
  104745. +double: 1
  104746. +idouble: 1
  104747. +Test "Imaginary part of: clog10 (-0x1.fp+1023 - 0x1p-1074 i)":
  104748. +double: 1
  104749. +idouble: 1
  104750. +Test "Imaginary part of: clog10 (-0x1.fp+127 + 0x1p-149 i)":
  104751. +double: 1
  104752. +float: 1
  104753. +idouble: 1
  104754. +ifloat: 1
  104755. +Test "Imaginary part of: clog10 (-0x1.fp+127 - 0x1p-149 i)":
  104756. +double: 1
  104757. +float: 1
  104758. +idouble: 1
  104759. +ifloat: 1
  104760. +Test "Imaginary part of: clog10 (-0x1p-1074 + 0x1.fp+1023 i)":
  104761. +double: 1
  104762. +idouble: 1
  104763. +Test "Imaginary part of: clog10 (-0x1p-1074 - 0x1.fp+1023 i)":
  104764. +double: 1
  104765. +idouble: 1
  104766. +Test "Imaginary part of: clog10 (-0x1p-149 + 0x1.fp+127 i)":
  104767. +double: 1
  104768. +idouble: 1
  104769. +Test "Imaginary part of: clog10 (-0x1p-149 - 0x1.fp+127 i)":
  104770. +double: 1
  104771. +idouble: 1
  104772. +Test "Imaginary part of: clog10 (-1.0 + 0x1.234566p-20 i)":
  104773. +double: 1
  104774. +idouble: 1
  104775. +Test "Imaginary part of: clog10 (-2 - 3 i)":
  104776. +double: 1
  104777. +idouble: 1
  104778. +Test "Imaginary part of: clog10 (-3 + inf i)":
  104779. +double: 1
  104780. +float: 1
  104781. +idouble: 1
  104782. +ifloat: 1
  104783. +Test "Imaginary part of: clog10 (-3 - inf i)":
  104784. +double: 1
  104785. +float: 1
  104786. +idouble: 1
  104787. +ifloat: 1
  104788. +Test "Imaginary part of: clog10 (-inf + 0 i)":
  104789. +double: 1
  104790. +float: 1
  104791. +idouble: 1
  104792. +ifloat: 1
  104793. +Test "Imaginary part of: clog10 (-inf + 1 i)":
  104794. +double: 1
  104795. +float: 1
  104796. +idouble: 1
  104797. +ifloat: 1
  104798. +Test "Imaginary part of: clog10 (-inf + inf i)":
  104799. +double: 1
  104800. +idouble: 1
  104801. +Test "Imaginary part of: clog10 (-inf - 0 i)":
  104802. +double: 1
  104803. +float: 1
  104804. +idouble: 1
  104805. +ifloat: 1
  104806. +Test "Imaginary part of: clog10 (-inf - 1 i)":
  104807. +double: 1
  104808. +float: 1
  104809. +idouble: 1
  104810. +ifloat: 1
  104811. +Test "Imaginary part of: clog10 (0 + inf i)":
  104812. +double: 1
  104813. +float: 1
  104814. +idouble: 1
  104815. +ifloat: 1
  104816. +Test "Imaginary part of: clog10 (0 - inf i)":
  104817. +double: 1
  104818. +float: 1
  104819. +idouble: 1
  104820. +ifloat: 1
  104821. +Test "Real part of: clog10 (0x0.fffffffffffff8p0 + 0x0.fffffffffffff8p-1000 i)":
  104822. +double: 1
  104823. +idouble: 1
  104824. +Test "Real part of: clog10 (0x0.ffffffp0 + 0x0.ffffffp-100 i)":
  104825. +double: 1
  104826. +float: 2
  104827. +idouble: 1
  104828. +ifloat: 2
  104829. +Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-10 i)":
  104830. +float: 1
  104831. +ifloat: 1
  104832. +Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-10 i)":
  104833. +double: 1
  104834. +idouble: 1
  104835. +Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-100 i)":
  104836. +float: 1
  104837. +ifloat: 1
  104838. +Test "Imaginary part of: clog10 (0x1.234566p-30 + 1.0 i)":
  104839. +float: 1
  104840. +ifloat: 1
  104841. +Test "Imaginary part of: clog10 (0x1.234566p-50 + 1.0 i)":
  104842. +float: 1
  104843. +ifloat: 1
  104844. +Test "Imaginary part of: clog10 (0x1.234566p-60 + 1.0 i)":
  104845. +double: 1
  104846. +float: 1
  104847. +idouble: 1
  104848. +ifloat: 1
  104849. +Test "Imaginary part of: clog10 (0x1.fffffep+127 + 0x1.fffffep+127 i)":
  104850. +double: 1
  104851. +float: 1
  104852. +idouble: 1
  104853. +ifloat: 1
  104854. +Test "Real part of: clog10 (0x1.fffffep+127 + 1.0 i)":
  104855. +float: 1
  104856. +ifloat: 1
  104857. +Test "Imaginary part of: clog10 (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i)":
  104858. +double: 1
  104859. +idouble: 1
  104860. +Test "Real part of: clog10 (0x10673dd0f2481p-51 + 0x7ef1d17cefbd2p-51 i)":
  104861. +double: 1
  104862. +idouble: 1
  104863. +Test "Real part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i)":
  104864. +double: 1
  104865. +idouble: 1
  104866. +Test "Imaginary part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i)":
  104867. +double: 1
  104868. +idouble: 1
  104869. +Test "Imaginary part of: clog10 (0x164c74eea876p-45 + 0x16f393482f77p-45 i)":
  104870. +double: 1
  104871. +idouble: 1
  104872. +Test "Imaginary part of: clog10 (0x1a6p-10 + 0x3a5p-10 i)":
  104873. +double: 1
  104874. +idouble: 1
  104875. +Test "Imaginary part of: clog10 (0x1p-1073 + 0x1p-1073 i)":
  104876. +double: 1
  104877. +idouble: 1
  104878. +Test "Imaginary part of: clog10 (0x1p-1074 + 0x1.fp+1023 i)":
  104879. +double: 1
  104880. +idouble: 1
  104881. +Test "Real part of: clog10 (0x1p-1074 + 0x1p-1074 i)":
  104882. +double: 1
  104883. +idouble: 1
  104884. +Test "Imaginary part of: clog10 (0x1p-1074 + 0x1p-1074 i)":
  104885. +double: 1
  104886. +idouble: 1
  104887. +Test "Imaginary part of: clog10 (0x1p-1074 - 0x1.fp+1023 i)":
  104888. +double: 1
  104889. +idouble: 1
  104890. +Test "Imaginary part of: clog10 (0x1p-147 + 0x1p-147 i)":
  104891. +double: 1
  104892. +float: 1
  104893. +idouble: 1
  104894. +ifloat: 1
  104895. +Test "Imaginary part of: clog10 (0x1p-149 + 0x1.fp+127 i)":
  104896. +double: 1
  104897. +float: 1
  104898. +idouble: 1
  104899. +ifloat: 1
  104900. +Test "Imaginary part of: clog10 (0x1p-149 + 0x1p-149 i)":
  104901. +double: 1
  104902. +float: 1
  104903. +idouble: 1
  104904. +ifloat: 1
  104905. +Test "Imaginary part of: clog10 (0x1p-149 - 0x1.fp+127 i)":
  104906. +double: 1
  104907. +float: 1
  104908. +idouble: 1
  104909. +ifloat: 1
  104910. +Test "Imaginary part of: clog10 (0x1p-509 + 1.0 i)":
  104911. +double: 1
  104912. +idouble: 1
  104913. +Test "Imaginary part of: clog10 (0x1p-510 + 1.0 i)":
  104914. +double: 1
  104915. +idouble: 1
  104916. +Test "Imaginary part of: clog10 (0x1p-511 + 1.0 i)":
  104917. +double: 1
  104918. +idouble: 1
  104919. +Test "Imaginary part of: clog10 (0x1p-61 + 1.0 i)":
  104920. +double: 1
  104921. +float: 1
  104922. +idouble: 1
  104923. +ifloat: 1
  104924. +Test "Imaginary part of: clog10 (0x1p-62 + 1.0 i)":
  104925. +double: 1
  104926. +float: 1
  104927. +idouble: 1
  104928. +ifloat: 1
  104929. +Test "Imaginary part of: clog10 (0x1p-63 + 1.0 i)":
  104930. +double: 1
  104931. +float: 1
  104932. +idouble: 1
  104933. +ifloat: 1
  104934. +Test "Real part of: clog10 (0x2818p-15 + 0x798fp-15 i)":
  104935. +double: 1
  104936. +float: 1
  104937. +idouble: 1
  104938. +ifloat: 1
  104939. +Test "Imaginary part of: clog10 (0x2818p-15 + 0x798fp-15 i)":
  104940. +float: 1
  104941. +ifloat: 1
  104942. +Test "Real part of: clog10 (0x2dd46725bp-35 + 0x7783a1284p-35 i)":
  104943. +double: 1
  104944. +idouble: 1
  104945. +Test "Real part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i)":
  104946. +float: 1
  104947. +ifloat: 1
  104948. +Test "Imaginary part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i)":
  104949. +double: 1
  104950. +idouble: 1
  104951. +Test "Real part of: clog10 (0x4447d7175p-35 + 0x6c445e00ap-35 i)":
  104952. +double: 1
  104953. +idouble: 1
  104954. +Test "Imaginary part of: clog10 (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i)":
  104955. +double: 1
  104956. +idouble: 1
  104957. +Test "Imaginary part of: clog10 (0x9b57bp-20 + 0xcb7b4p-20 i)":
  104958. +double: 1
  104959. +idouble: 1
  104960. +Test "Real part of: clog10 (0xf2p-10 + 0x3e3p-10 i)":
  104961. +double: 1
  104962. +idouble: 1
  104963. +Test "Imaginary part of: clog10 (0xf2p-10 + 0x3e3p-10 i)":
  104964. +double: 1
  104965. +idouble: 1
  104966. +Test "Imaginary part of: clog10 (0xfe961079616p-45 + 0x1bc37e09e6d1p-45 i)":
  104967. +double: 1
  104968. +idouble: 1
  104969. +Test "Imaginary part of: clog10 (1.0 + 0x1.234566p-10 i)":
  104970. +double: 1
  104971. +idouble: 1
  104972. +Test "Imaginary part of: clog10 (3 + inf i)":
  104973. +double: 1
  104974. +float: 1
  104975. +idouble: 1
  104976. +ifloat: 1
  104977. +Test "Imaginary part of: clog10 (3 - inf i)":
  104978. +double: 1
  104979. +float: 1
  104980. +idouble: 1
  104981. +ifloat: 1
  104982. +Test "Imaginary part of: clog10 (inf + inf i)":
  104983. +double: 1
  104984. +float: 1
  104985. +idouble: 1
  104986. +ifloat: 1
  104987. +Test "Imaginary part of: clog10 (inf - inf i)":
  104988. +double: 1
  104989. +float: 1
  104990. +idouble: 1
  104991. +ifloat: 1
  104992. +
  104993. +# cos
  104994. +Test "cos (0x1p+120)":
  104995. +float: 1
  104996. +ifloat: 1
  104997. +Test "cos (0x1p+127)":
  104998. +float: 1
  104999. +ifloat: 1
  105000. +Test "cos (M_PI_6l * 2.0) == 0.5":
  105001. +double: 1
  105002. +idouble: 1
  105003. +ifloat: 1
  105004. +Test "cos (M_PI_6l * 4.0) == -0.5":
  105005. +double: 2
  105006. +float: 1
  105007. +idouble: 2
  105008. +ifloat: 1
  105009. +
  105010. +# cos_downward
  105011. +Test "cos_downward (1)":
  105012. +float: 1
  105013. +ifloat: 1
  105014. +Test "cos_downward (2)":
  105015. +float: 1
  105016. +ifloat: 1
  105017. +Test "cos_downward (3)":
  105018. +float: 1
  105019. +ifloat: 1
  105020. +Test "cos_downward (4)":
  105021. +float: 1
  105022. +ifloat: 1
  105023. +Test "cos_downward (5)":
  105024. +float: 1
  105025. +ifloat: 1
  105026. +Test "cos_downward (7)":
  105027. +float: 1
  105028. +ifloat: 1
  105029. +Test "cos_downward (8)":
  105030. +float: 1
  105031. +ifloat: 1
  105032. +
  105033. +# cos_tonearest
  105034. +Test "cos_tonearest (7)":
  105035. +float: 1
  105036. +ifloat: 1
  105037. +
  105038. +# cos_towardzero
  105039. +Test "cos_towardzero (2)":
  105040. +float: 1
  105041. +ifloat: 1
  105042. +Test "cos_towardzero (3)":
  105043. +float: 1
  105044. +ifloat: 1
  105045. +Test "cos_towardzero (5)":
  105046. +float: 1
  105047. +ifloat: 1
  105048. +Test "cos_towardzero (7)":
  105049. +float: 1
  105050. +ifloat: 1
  105051. +Test "cos_towardzero (8)":
  105052. +float: 1
  105053. +ifloat: 1
  105054. +
  105055. +# cos_upward
  105056. +Test "cos_upward (10)":
  105057. +float: 1
  105058. +ifloat: 1
  105059. +Test "cos_upward (6)":
  105060. +float: 1
  105061. +ifloat: 1
  105062. +Test "cos_upward (7)":
  105063. +float: 1
  105064. +ifloat: 1
  105065. +Test "cos_upward (9)":
  105066. +float: 2
  105067. +ifloat: 2
  105068. +
  105069. +# cosh_downward
  105070. +Test "cosh_downward (22)":
  105071. +float: 1
  105072. +ifloat: 1
  105073. +Test "cosh_downward (23)":
  105074. +float: 1
  105075. +ifloat: 1
  105076. +Test "cosh_downward (24)":
  105077. +float: 1
  105078. +ifloat: 1
  105079. +
  105080. +# cosh_towardzero
  105081. +Test "cosh_towardzero (22)":
  105082. +float: 1
  105083. +ifloat: 1
  105084. +Test "cosh_towardzero (23)":
  105085. +float: 1
  105086. +ifloat: 1
  105087. +Test "cosh_towardzero (24)":
  105088. +float: 1
  105089. +ifloat: 1
  105090. +
  105091. +# cpow
  105092. +Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i)":
  105093. +float: 1
  105094. +ifloat: 1
  105095. +Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i)":
  105096. +double: 1
  105097. +float: 4
  105098. +idouble: 1
  105099. +ifloat: 4
  105100. +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i)":
  105101. +double: 2
  105102. +float: 3
  105103. +idouble: 2
  105104. +ifloat: 3
  105105. +Test "Real part of: cpow (2 + 3 i, 4 + 0 i)":
  105106. +double: 1
  105107. +float: 4
  105108. +idouble: 1
  105109. +ifloat: 4
  105110. +Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i)":
  105111. +float: 2
  105112. +ifloat: 2
  105113. +
  105114. +# csin
  105115. +Test "Real part of: csin (-0.75 + 710.5 i)":
  105116. +double: 1
  105117. +idouble: 1
  105118. +Test "Real part of: csin (-0.75 + 89.5 i)":
  105119. +float: 1
  105120. +ifloat: 1
  105121. +Test "Real part of: csin (-0.75 - 710.5 i)":
  105122. +double: 1
  105123. +idouble: 1
  105124. +Test "Real part of: csin (-0.75 - 89.5 i)":
  105125. +float: 1
  105126. +ifloat: 1
  105127. +Test "Real part of: csin (0.75 + 710.5 i)":
  105128. +double: 1
  105129. +idouble: 1
  105130. +Test "Real part of: csin (0.75 + 89.5 i)":
  105131. +float: 1
  105132. +ifloat: 1
  105133. +Test "Real part of: csin (0.75 - 710.5 i)":
  105134. +double: 1
  105135. +idouble: 1
  105136. +Test "Real part of: csin (0.75 - 89.5 i)":
  105137. +float: 1
  105138. +ifloat: 1
  105139. +Test "Real part of: csin (0x1p-1074 + 1440 i)":
  105140. +double: 1
  105141. +idouble: 1
  105142. +
  105143. +# csinh
  105144. +Test "Imaginary part of: csinh (-2 - 3 i)":
  105145. +double: 1
  105146. +idouble: 1
  105147. +Test "Imaginary part of: csinh (-710.5 + 0.75 i)":
  105148. +double: 1
  105149. +idouble: 1
  105150. +Test "Imaginary part of: csinh (-710.5 - 0.75 i)":
  105151. +double: 1
  105152. +idouble: 1
  105153. +Test "Imaginary part of: csinh (-89.5 + 0.75 i)":
  105154. +float: 1
  105155. +ifloat: 1
  105156. +Test "Imaginary part of: csinh (-89.5 - 0.75 i)":
  105157. +float: 1
  105158. +ifloat: 1
  105159. +Test "Real part of: csinh (0.75 + 1.25 i)":
  105160. +float: 1
  105161. +ifloat: 1
  105162. +Test "Imaginary part of: csinh (0.75 + 1.25 i)":
  105163. +float: 1
  105164. +ifloat: 1
  105165. +Test "Imaginary part of: csinh (1440 + 0x1p-1074 i)":
  105166. +double: 1
  105167. +idouble: 1
  105168. +Test "Imaginary part of: csinh (710.5 + 0.75 i)":
  105169. +double: 1
  105170. +idouble: 1
  105171. +Test "Imaginary part of: csinh (710.5 - 0.75 i)":
  105172. +double: 1
  105173. +idouble: 1
  105174. +Test "Imaginary part of: csinh (89.5 + 0.75 i)":
  105175. +float: 1
  105176. +ifloat: 1
  105177. +Test "Imaginary part of: csinh (89.5 - 0.75 i)":
  105178. +float: 1
  105179. +ifloat: 1
  105180. +
  105181. +# csqrt
  105182. +Test "Real part of: csqrt (-0x1.000002p-126 - 0x1.000002p-126 i)":
  105183. +double: 1
  105184. +idouble: 1
  105185. +Test "Real part of: csqrt (-2 + 3 i)":
  105186. +float: 1
  105187. +ifloat: 1
  105188. +Test "Real part of: csqrt (-2 - 3 i)":
  105189. +float: 1
  105190. +ifloat: 1
  105191. +Test "Imaginary part of: csqrt (0x1.000002p-126 + 0x1.000002p-126 i)":
  105192. +double: 1
  105193. +idouble: 1
  105194. +Test "Imaginary part of: csqrt (0x1.fffffep+127 + 1.0 i)":
  105195. +float: 1
  105196. +ifloat: 1
  105197. +Test "Real part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i)":
  105198. +double: 1
  105199. +idouble: 1
  105200. +Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i)":
  105201. +double: 1
  105202. +idouble: 1
  105203. +Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1p+1023 i)":
  105204. +double: 1
  105205. +idouble: 1
  105206. +
  105207. +# ctan
  105208. +Test "Real part of: ctan (-2 - 3 i)":
  105209. +float: 1
  105210. +ifloat: 1
  105211. +Test "Imaginary part of: ctan (-2 - 3 i)":
  105212. +double: 1
  105213. +idouble: 1
  105214. +Test "Imaginary part of: ctan (0.75 + 1.25 i)":
  105215. +double: 1
  105216. +idouble: 1
  105217. +Test "Real part of: ctan (0x1p1023 + 1 i)":
  105218. +double: 1
  105219. +idouble: 1
  105220. +Test "Imaginary part of: ctan (0x1p127 + 1 i)":
  105221. +double: 1
  105222. +idouble: 1
  105223. +Test "Real part of: ctan (0x3.243f6cp-1 + 0 i)":
  105224. +float: 1
  105225. +ifloat: 1
  105226. +
  105227. +# ctan_downward
  105228. +Test "Real part of: ctan_downward (0x1.921fb6p+0 + 0x1p-149 i)":
  105229. +double: 2
  105230. +float: 1
  105231. +idouble: 2
  105232. +ifloat: 1
  105233. +Test "Imaginary part of: ctan_downward (0x1.921fb6p+0 + 0x1p-149 i)":
  105234. +float: 1
  105235. +ifloat: 1
  105236. +
  105237. +# ctan_tonearest
  105238. +Test "Real part of: ctan_tonearest (0x1.921fb6p+0 + 0x1p-149 i)":
  105239. +float: 1
  105240. +ifloat: 1
  105241. +Test "Imaginary part of: ctan_tonearest (0x1.921fb6p+0 + 0x1p-149 i)":
  105242. +float: 1
  105243. +ifloat: 1
  105244. +
  105245. +# ctan_towardzero
  105246. +Test "Real part of: ctan_towardzero (0x1.921fb6p+0 + 0x1p-149 i)":
  105247. +float: 1
  105248. +ifloat: 1
  105249. +Test "Imaginary part of: ctan_towardzero (0x1.921fb6p+0 + 0x1p-149 i)":
  105250. +float: 1
  105251. +ifloat: 1
  105252. +
  105253. +# ctan_upward
  105254. +Test "Real part of: ctan_upward (0x1.921fb54442d18p+0 + 0x1p-1074 i)":
  105255. +double: 1
  105256. +idouble: 1
  105257. +Test "Real part of: ctan_upward (0x1.921fb6p+0 + 0x1p-149 i)":
  105258. +double: 2
  105259. +float: 1
  105260. +idouble: 2
  105261. +ifloat: 1
  105262. +Test "Imaginary part of: ctan_upward (0x1.921fb6p+0 + 0x1p-149 i)":
  105263. +double: 1
  105264. +float: 2
  105265. +idouble: 1
  105266. +ifloat: 2
  105267. +
  105268. +# ctanh
  105269. +Test "Real part of: ctanh (-2 - 3 i)":
  105270. +double: 1
  105271. +float: 1
  105272. +idouble: 1
  105273. +ifloat: 1
  105274. +Test "Imaginary part of: ctanh (-2 - 3 i)":
  105275. +double: 1
  105276. +float: 1
  105277. +idouble: 1
  105278. +ifloat: 1
  105279. +Test "Imaginary part of: ctanh (0 + 0x3.243f6cp-1 i)":
  105280. +float: 1
  105281. +ifloat: 1
  105282. +Test "Imaginary part of: ctanh (0 + pi/4 i)":
  105283. +double: 1
  105284. +float: 1
  105285. +idouble: 1
  105286. +ifloat: 1
  105287. +Test "Real part of: ctanh (0.75 + 1.25 i)":
  105288. +double: 1
  105289. +float: 1
  105290. +idouble: 1
  105291. +ifloat: 1
  105292. +Test "Imaginary part of: ctanh (0.75 + 1.25 i)":
  105293. +float: 2
  105294. +ifloat: 2
  105295. +Test "Imaginary part of: ctanh (1 + 0x1p1023 i)":
  105296. +double: 1
  105297. +idouble: 1
  105298. +Test "Real part of: ctanh (1 + 0x1p127 i)":
  105299. +double: 1
  105300. +idouble: 1
  105301. +
  105302. +# ctanh_downward
  105303. +Test "Real part of: ctanh_downward (0x1p-149 + 0x1.921fb6p+0 i)":
  105304. +float: 1
  105305. +ifloat: 1
  105306. +Test "Imaginary part of: ctanh_downward (0x1p-149 + 0x1.921fb6p+0 i)":
  105307. +double: 2
  105308. +float: 1
  105309. +idouble: 2
  105310. +ifloat: 1
  105311. +
  105312. +# ctanh_tonearest
  105313. +Test "Real part of: ctanh_tonearest (0x1p-149 + 0x1.921fb6p+0 i)":
  105314. +float: 1
  105315. +ifloat: 1
  105316. +Test "Imaginary part of: ctanh_tonearest (0x1p-149 + 0x1.921fb6p+0 i)":
  105317. +float: 1
  105318. +ifloat: 1
  105319. +
  105320. +# ctanh_towardzero
  105321. +Test "Real part of: ctanh_towardzero (0x1p-149 + 0x1.921fb6p+0 i)":
  105322. +float: 1
  105323. +ifloat: 1
  105324. +Test "Imaginary part of: ctanh_towardzero (0x1p-149 + 0x1.921fb6p+0 i)":
  105325. +float: 1
  105326. +ifloat: 1
  105327. +
  105328. +# ctanh_upward
  105329. +Test "Imaginary part of: ctanh_upward (0x1p-1074 + 0x1.921fb54442d18p+0 i)":
  105330. +double: 1
  105331. +idouble: 1
  105332. +Test "Real part of: ctanh_upward (0x1p-149 + 0x1.921fb6p+0 i)":
  105333. +double: 1
  105334. +float: 2
  105335. +idouble: 1
  105336. +ifloat: 2
  105337. +Test "Imaginary part of: ctanh_upward (0x1p-149 + 0x1.921fb6p+0 i)":
  105338. +double: 2
  105339. +float: 1
  105340. +idouble: 2
  105341. +ifloat: 1
  105342. +
  105343. +# erf
  105344. +Test "erf (0.75) == 0.711155633653515131598937834591410777":
  105345. +double: 1
  105346. +idouble: 1
  105347. +Test "erf (1.25) == 0.922900128256458230136523481197281140":
  105348. +double: 1
  105349. +idouble: 1
  105350. +
  105351. +# erfc
  105352. +Test "erfc (0x1.f7303cp+1)":
  105353. +double: 1
  105354. +idouble: 1
  105355. +Test "erfc (0x1.ffa002p+2)":
  105356. +float: 1
  105357. +ifloat: 1
  105358. +Test "erfc (2.0)":
  105359. +double: 1
  105360. +idouble: 1
  105361. +Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8":
  105362. +double: 1
  105363. +idouble: 1
  105364. +
  105365. +# exp
  105366. +Test "exp (1) == e":
  105367. +double: 1
  105368. +idouble: 1
  105369. +
  105370. +# exp10
  105371. +Test "exp10 (-1)":
  105372. +double: 1
  105373. +idouble: 1
  105374. +Test "exp10 (-305)":
  105375. +double: 1
  105376. +idouble: 1
  105377. +Test "exp10 (-36)":
  105378. +double: 1
  105379. +idouble: 1
  105380. +Test "exp10 (3)":
  105381. +double: 1
  105382. +idouble: 1
  105383. +Test "exp10 (36)":
  105384. +double: 1
  105385. +idouble: 1
  105386. +
  105387. +# exp_downward
  105388. +Test "exp_downward (2)":
  105389. +float: 1
  105390. +ifloat: 1
  105391. +Test "exp_downward (3)":
  105392. +float: 1
  105393. +ifloat: 1
  105394. +
  105395. +# exp_towardzero
  105396. +Test "exp_towardzero (2)":
  105397. +float: 1
  105398. +ifloat: 1
  105399. +Test "exp_towardzero (3)":
  105400. +float: 1
  105401. +ifloat: 1
  105402. +
  105403. +# exp_upward
  105404. +Test "exp_upward (1)":
  105405. +float: 1
  105406. +ifloat: 1
  105407. +
  105408. +# expm1
  105409. +Test "expm1 (0.75) == 1.11700001661267466854536981983709561":
  105410. +double: 1
  105411. +idouble: 1
  105412. +Test "expm1 (1)":
  105413. +float: 1
  105414. +ifloat: 1
  105415. +Test "expm1 (500.0)":
  105416. +double: 1
  105417. +idouble: 1
  105418. +
  105419. +# gamma
  105420. +Test "gamma (0.7)":
  105421. +double: 1
  105422. +float: 1
  105423. +idouble: 1
  105424. +ifloat: 1
  105425. +Test "gamma (1.2)":
  105426. +double: 1
  105427. +float: 2
  105428. +idouble: 1
  105429. +ifloat: 2
  105430. +
  105431. +# hypot
  105432. +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
  105433. +float: 1
  105434. +ifloat: 1
  105435. +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271":
  105436. +float: 1
  105437. +ifloat: 1
  105438. +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271":
  105439. +float: 1
  105440. +ifloat: 1
  105441. +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271":
  105442. +float: 1
  105443. +ifloat: 1
  105444. +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271":
  105445. +float: 1
  105446. +ifloat: 1
  105447. +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271":
  105448. +float: 1
  105449. +ifloat: 1
  105450. +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271":
  105451. +float: 1
  105452. +ifloat: 1
  105453. +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271":
  105454. +float: 1
  105455. +ifloat: 1
  105456. +
  105457. +# j0
  105458. +Test "j0 (-4.0)":
  105459. +double: 1
  105460. +float: 1
  105461. +idouble: 1
  105462. +ifloat: 1
  105463. +Test "j0 (0.75)":
  105464. +float: 1
  105465. +ifloat: 1
  105466. +Test "j0 (0x1.d7ce3ap+107)":
  105467. +float: 2
  105468. +ifloat: 2
  105469. +Test "j0 (10.0)":
  105470. +double: 2
  105471. +float: 1
  105472. +idouble: 2
  105473. +ifloat: 1
  105474. +Test "j0 (2.0)":
  105475. +float: 2
  105476. +ifloat: 2
  105477. +Test "j0 (4.0)":
  105478. +double: 1
  105479. +float: 1
  105480. +idouble: 1
  105481. +ifloat: 1
  105482. +Test "j0 (8.0)":
  105483. +float: 1
  105484. +ifloat: 1
  105485. +
  105486. +# j1
  105487. +Test "j1 (0x1.3ffp+74)":
  105488. +double: 1
  105489. +idouble: 1
  105490. +Test "j1 (0x1.ff00000000002p+840)":
  105491. +double: 1
  105492. +idouble: 1
  105493. +Test "j1 (10.0)":
  105494. +float: 2
  105495. +ifloat: 2
  105496. +Test "j1 (2.0)":
  105497. +double: 1
  105498. +idouble: 1
  105499. +Test "j1 (8.0)":
  105500. +double: 1
  105501. +idouble: 1
  105502. +
  105503. +# jn
  105504. +Test "jn (0, -4.0)":
  105505. +double: 1
  105506. +float: 1
  105507. +idouble: 1
  105508. +ifloat: 1
  105509. +Test "jn (0, 0.75)":
  105510. +float: 1
  105511. +ifloat: 1
  105512. +Test "jn (0, 10.0)":
  105513. +double: 2
  105514. +float: 1
  105515. +idouble: 2
  105516. +ifloat: 1
  105517. +Test "jn (0, 2.0)":
  105518. +float: 2
  105519. +ifloat: 2
  105520. +Test "jn (0, 4.0)":
  105521. +double: 1
  105522. +float: 1
  105523. +idouble: 1
  105524. +ifloat: 1
  105525. +Test "jn (0, 8.0)":
  105526. +float: 1
  105527. +ifloat: 1
  105528. +Test "jn (1, 10.0)":
  105529. +float: 2
  105530. +ifloat: 2
  105531. +Test "jn (1, 2.0)":
  105532. +double: 1
  105533. +idouble: 1
  105534. +Test "jn (1, 8.0)":
  105535. +double: 1
  105536. +idouble: 1
  105537. +Test "jn (10, 0.125)":
  105538. +double: 1
  105539. +float: 1
  105540. +idouble: 1
  105541. +ifloat: 1
  105542. +Test "jn (10, 0.75)":
  105543. +double: 1
  105544. +float: 1
  105545. +idouble: 1
  105546. +ifloat: 1
  105547. +Test "jn (10, 10.0)":
  105548. +double: 4
  105549. +float: 3
  105550. +idouble: 4
  105551. +ifloat: 3
  105552. +Test "jn (10, 2.0)":
  105553. +double: 1
  105554. +float: 2
  105555. +idouble: 1
  105556. +ifloat: 2
  105557. +Test "jn (2, 0x1.ffff62p+99)":
  105558. +double: 2
  105559. +float: 2
  105560. +idouble: 2
  105561. +ifloat: 2
  105562. +Test "jn (2, 2.4048255576957729)":
  105563. +double: 2
  105564. +float: 1
  105565. +idouble: 2
  105566. +ifloat: 1
  105567. +Test "jn (3, 0.125)":
  105568. +double: 1
  105569. +float: 1
  105570. +idouble: 1
  105571. +ifloat: 1
  105572. +Test "jn (3, 0.75)":
  105573. +double: 1
  105574. +float: 1
  105575. +idouble: 1
  105576. +ifloat: 1
  105577. +Test "jn (3, 10.0)":
  105578. +double: 3
  105579. +float: 1
  105580. +idouble: 3
  105581. +ifloat: 1
  105582. +Test "jn (3, 2.0)":
  105583. +float: 1
  105584. +ifloat: 1
  105585. +Test "jn (3, 2.4048255576957729)":
  105586. +double: 3
  105587. +idouble: 3
  105588. +Test "jn (4, 2.4048255576957729)":
  105589. +double: 1
  105590. +idouble: 1
  105591. +Test "jn (5, 2.4048255576957729)":
  105592. +double: 3
  105593. +float: 1
  105594. +idouble: 3
  105595. +ifloat: 1
  105596. +Test "jn (6, 2.4048255576957729)":
  105597. +double: 4
  105598. +float: 3
  105599. +idouble: 4
  105600. +ifloat: 3
  105601. +Test "jn (7, 2.4048255576957729)":
  105602. +double: 3
  105603. +float: 5
  105604. +idouble: 3
  105605. +ifloat: 5
  105606. +Test "jn (8, 2.4048255576957729)":
  105607. +double: 3
  105608. +float: 2
  105609. +idouble: 3
  105610. +ifloat: 2
  105611. +Test "jn (9, 2.4048255576957729)":
  105612. +double: 1
  105613. +float: 2
  105614. +idouble: 1
  105615. +ifloat: 2
  105616. +
  105617. +# lgamma
  105618. +Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
  105619. +double: 1
  105620. +float: 1
  105621. +idouble: 1
  105622. +ifloat: 1
  105623. +Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1":
  105624. +double: 1
  105625. +float: 2
  105626. +idouble: 1
  105627. +ifloat: 2
  105628. +
  105629. +# log10
  105630. +Test "log10 (0.75) == -0.124938736608299953132449886193870744":
  105631. +double: 1
  105632. +idouble: 1
  105633. +Test "log10 (e) == log10(e)":
  105634. +float: 1
  105635. +ifloat: 1
  105636. +
  105637. +# log1p
  105638. +Test "log1p (-0.25)":
  105639. +float: 1
  105640. +ifloat: 1
  105641. +
  105642. +# pow
  105643. +Test "pow (0x0.ffffffp0, -0x1p24)":
  105644. +float: 1
  105645. +ifloat: 1
  105646. +Test "pow (0x0.ffffffp0, 0x1p24)":
  105647. +float: 1
  105648. +ifloat: 1
  105649. +Test "pow (0x1.000002p0, 0x1p24)":
  105650. +float: 1
  105651. +ifloat: 1
  105652. +
  105653. +# pow10
  105654. +Test "pow10 (-1)":
  105655. +double: 1
  105656. +idouble: 1
  105657. +Test "pow10 (-305)":
  105658. +double: 1
  105659. +idouble: 1
  105660. +Test "pow10 (-36)":
  105661. +double: 1
  105662. +idouble: 1
  105663. +Test "pow10 (3)":
  105664. +double: 1
  105665. +idouble: 1
  105666. +Test "pow10 (36)":
  105667. +double: 1
  105668. +idouble: 1
  105669. +
  105670. +# pow_downward
  105671. +Test "pow_downward (1.5, 1.03125)":
  105672. +float: 1
  105673. +ifloat: 1
  105674. +
  105675. +# pow_towardzero
  105676. +Test "pow_towardzero (1.5, 1.03125)":
  105677. +float: 1
  105678. +ifloat: 1
  105679. +
  105680. +# pow_upward
  105681. +Test "pow_upward (1.0625, 1.125)":
  105682. +float: 1
  105683. +ifloat: 1
  105684. +
  105685. +# sin_downward
  105686. +Test "sin_downward (10)":
  105687. +float: 1
  105688. +ifloat: 1
  105689. +Test "sin_downward (3)":
  105690. +float: 1
  105691. +ifloat: 1
  105692. +Test "sin_downward (5)":
  105693. +float: 1
  105694. +ifloat: 1
  105695. +Test "sin_downward (6)":
  105696. +float: 1
  105697. +ifloat: 1
  105698. +
  105699. +# sin_tonearest
  105700. +Test "sin_tonearest (1)":
  105701. +float: 1
  105702. +ifloat: 1
  105703. +
  105704. +# sin_towardzero
  105705. +Test "sin_towardzero (1)":
  105706. +float: 1
  105707. +ifloat: 1
  105708. +Test "sin_towardzero (10)":
  105709. +float: 1
  105710. +ifloat: 1
  105711. +Test "sin_towardzero (4)":
  105712. +float: 1
  105713. +ifloat: 1
  105714. +Test "sin_towardzero (5)":
  105715. +float: 1
  105716. +ifloat: 1
  105717. +Test "sin_towardzero (9)":
  105718. +float: 1
  105719. +ifloat: 1
  105720. +
  105721. +# sin_upward
  105722. +Test "sin_upward (1)":
  105723. +float: 1
  105724. +ifloat: 1
  105725. +Test "sin_upward (2)":
  105726. +float: 2
  105727. +ifloat: 2
  105728. +Test "sin_upward (4)":
  105729. +float: 1
  105730. +ifloat: 1
  105731. +Test "sin_upward (9)":
  105732. +float: 1
  105733. +ifloat: 1
  105734. +
  105735. +# sincos
  105736. +Test "sincos (0x1p+120) extra output 2":
  105737. +float: 1
  105738. +ifloat: 1
  105739. +Test "sincos (0x1p+127) extra output 2":
  105740. +float: 1
  105741. +ifloat: 1
  105742. +Test "sincos (M_PI_6l*2.0) extra output 1":
  105743. +double: 1
  105744. +float: 1
  105745. +idouble: 1
  105746. +ifloat: 1
  105747. +Test "sincos (M_PI_6l*2.0) extra output 2":
  105748. +double: 1
  105749. +idouble: 1
  105750. +Test "sincos (pi/6) extra output 2":
  105751. +float: 1
  105752. +ifloat: 1
  105753. +
  105754. +# sinh_downward
  105755. +Test "sinh_downward (22)":
  105756. +float: 1
  105757. +ifloat: 1
  105758. +Test "sinh_downward (23)":
  105759. +float: 1
  105760. +ifloat: 1
  105761. +Test "sinh_downward (24)":
  105762. +float: 1
  105763. +ifloat: 1
  105764. +
  105765. +# sinh_towardzero
  105766. +Test "sinh_towardzero (22)":
  105767. +float: 1
  105768. +ifloat: 1
  105769. +Test "sinh_towardzero (23)":
  105770. +float: 1
  105771. +ifloat: 1
  105772. +Test "sinh_towardzero (24)":
  105773. +float: 1
  105774. +ifloat: 1
  105775. +
  105776. +# tan_downward
  105777. +Test "tan_downward (1)":
  105778. +float: 1
  105779. +ifloat: 1
  105780. +Test "tan_downward (10)":
  105781. +float: 1
  105782. +ifloat: 1
  105783. +Test "tan_downward (2)":
  105784. +float: 1
  105785. +ifloat: 1
  105786. +Test "tan_downward (6)":
  105787. +float: 1
  105788. +ifloat: 1
  105789. +Test "tan_downward (8)":
  105790. +float: 1
  105791. +ifloat: 1
  105792. +Test "tan_downward (9)":
  105793. +float: 1
  105794. +ifloat: 1
  105795. +
  105796. +# tan_towardzero
  105797. +Test "tan_towardzero (10)":
  105798. +float: 1
  105799. +ifloat: 1
  105800. +Test "tan_towardzero (3)":
  105801. +float: 1
  105802. +ifloat: 1
  105803. +Test "tan_towardzero (4)":
  105804. +float: 1
  105805. +ifloat: 1
  105806. +Test "tan_towardzero (5)":
  105807. +float: 1
  105808. +ifloat: 1
  105809. +Test "tan_towardzero (9)":
  105810. +float: 1
  105811. +ifloat: 1
  105812. +
  105813. +# tan_upward
  105814. +Test "tan_upward (1)":
  105815. +float: 1
  105816. +ifloat: 1
  105817. +Test "tan_upward (10)":
  105818. +float: 1
  105819. +ifloat: 1
  105820. +Test "tan_upward (3)":
  105821. +float: 1
  105822. +ifloat: 1
  105823. +Test "tan_upward (5)":
  105824. +float: 1
  105825. +ifloat: 1
  105826. +
  105827. +# tgamma
  105828. +Test "tgamma (-0.5)":
  105829. +double: 1
  105830. +float: 1
  105831. +idouble: 1
  105832. +ifloat: 1
  105833. +Test "tgamma (-0x0.fffffffffffff8p0)":
  105834. +double: 1
  105835. +idouble: 1
  105836. +Test "tgamma (-0x0.ffffffp0)":
  105837. +float: 1
  105838. +ifloat: 1
  105839. +Test "tgamma (-0x1.000002p0)":
  105840. +double: 2
  105841. +idouble: 2
  105842. +Test "tgamma (-0x1.0a32a2p+5)":
  105843. +float: 2
  105844. +ifloat: 2
  105845. +Test "tgamma (-0x13.ffffep0)":
  105846. +float: 2
  105847. +ifloat: 2
  105848. +Test "tgamma (-0x14.000000000001p0)":
  105849. +double: 1
  105850. +idouble: 1
  105851. +Test "tgamma (-0x14.00002p0)":
  105852. +float: 1
  105853. +ifloat: 1
  105854. +Test "tgamma (-0x1d.ffffep0)":
  105855. +double: 1
  105856. +float: 1
  105857. +idouble: 1
  105858. +ifloat: 1
  105859. +Test "tgamma (-0x1e.000000000001p0)":
  105860. +double: 3
  105861. +idouble: 3
  105862. +Test "tgamma (-0x1e.00002p0)":
  105863. +double: 1
  105864. +float: 1
  105865. +idouble: 1
  105866. +ifloat: 1
  105867. +Test "tgamma (-0x2.0000000000002p0)":
  105868. +double: 1
  105869. +idouble: 1
  105870. +Test "tgamma (-0x2.000004p0)":
  105871. +double: 2
  105872. +float: 1
  105873. +idouble: 2
  105874. +ifloat: 1
  105875. +Test "tgamma (-0x2.fffffcp0)":
  105876. +double: 1
  105877. +float: 1
  105878. +idouble: 1
  105879. +ifloat: 1
  105880. +Test "tgamma (-0x27.fffffffffffep0)":
  105881. +double: 1
  105882. +idouble: 1
  105883. +Test "tgamma (-0x28.000000000002p0)":
  105884. +double: 1
  105885. +idouble: 1
  105886. +Test "tgamma (-0x28.00004p0)":
  105887. +double: 2
  105888. +idouble: 2
  105889. +Test "tgamma (-0x29.00004p0)":
  105890. +double: 1
  105891. +idouble: 1
  105892. +Test "tgamma (-0x29.ffffcp0)":
  105893. +double: 1
  105894. +idouble: 1
  105895. +Test "tgamma (-0x3.000004p0)":
  105896. +double: 2
  105897. +float: 1
  105898. +idouble: 2
  105899. +ifloat: 1
  105900. +Test "tgamma (-0x3.fffffcp0)":
  105901. +double: 1
  105902. +float: 1
  105903. +idouble: 1
  105904. +ifloat: 1
  105905. +Test "tgamma (-0x3.ffffffffffffep0)":
  105906. +double: 2
  105907. +idouble: 2
  105908. +Test "tgamma (-0x31.fffffffffffep0)":
  105909. +double: 3
  105910. +idouble: 3
  105911. +Test "tgamma (-0x4.000008p0)":
  105912. +float: 1
  105913. +ifloat: 1
  105914. +Test "tgamma (-0x4.fffff8p0)":
  105915. +double: 1
  105916. +idouble: 1
  105917. +Test "tgamma (-0x4.ffffffffffffcp0)":
  105918. +double: 1
  105919. +idouble: 1
  105920. +Test "tgamma (-0x5.000008p0)":
  105921. +double: 1
  105922. +float: 1
  105923. +idouble: 1
  105924. +ifloat: 1
  105925. +Test "tgamma (-0x5.ffffffffffffcp0)":
  105926. +double: 1
  105927. +idouble: 1
  105928. +Test "tgamma (-0x6.000008p0)":
  105929. +float: 2
  105930. +ifloat: 2
  105931. +Test "tgamma (-0x6.fffff8p0)":
  105932. +double: 2
  105933. +float: 1
  105934. +idouble: 2
  105935. +ifloat: 1
  105936. +Test "tgamma (-0x6.ffffffffffffcp0)":
  105937. +double: 4
  105938. +idouble: 4
  105939. +Test "tgamma (-0x63.fffffffffffcp0)":
  105940. +double: 2
  105941. +idouble: 2
  105942. +Test "tgamma (-0x64.000000000004p0)":
  105943. +double: 1
  105944. +idouble: 1
  105945. +Test "tgamma (-0x7.0000000000004p0)":
  105946. +double: 3
  105947. +idouble: 3
  105948. +Test "tgamma (-0x7.000008p0)":
  105949. +double: 1
  105950. +float: 1
  105951. +idouble: 1
  105952. +ifloat: 1
  105953. +Test "tgamma (-0x7.fffff8p0)":
  105954. +double: 3
  105955. +float: 1
  105956. +idouble: 3
  105957. +ifloat: 1
  105958. +Test "tgamma (-0x7.ffffffffffffcp0)":
  105959. +double: 3
  105960. +idouble: 3
  105961. +Test "tgamma (-0x8.00001p0)":
  105962. +double: 2
  105963. +idouble: 2
  105964. +Test "tgamma (-0x9.ffffffffffff8p0)":
  105965. +double: 1
  105966. +idouble: 1
  105967. +Test "tgamma (-0x9.fffffp0)":
  105968. +float: 1
  105969. +ifloat: 1
  105970. +Test "tgamma (-0x96.000000000008p0)":
  105971. +double: 1
  105972. +idouble: 1
  105973. +Test "tgamma (-0xa.00001p0)":
  105974. +double: 1
  105975. +idouble: 1
  105976. +Test "tgamma (-2.5)":
  105977. +double: 1
  105978. +float: 2
  105979. +idouble: 1
  105980. +ifloat: 2
  105981. +Test "tgamma (-3.5)":
  105982. +double: 1
  105983. +float: 1
  105984. +idouble: 1
  105985. +ifloat: 1
  105986. +Test "tgamma (-4.5)":
  105987. +double: 1
  105988. +float: 1
  105989. +idouble: 1
  105990. +ifloat: 1
  105991. +Test "tgamma (-5.5)":
  105992. +double: 1
  105993. +idouble: 1
  105994. +Test "tgamma (-6.5)":
  105995. +float: 1
  105996. +ifloat: 1
  105997. +Test "tgamma (-7.5)":
  105998. +double: 2
  105999. +float: 1
  106000. +idouble: 2
  106001. +ifloat: 1
  106002. +Test "tgamma (-8.5)":
  106003. +double: 1
  106004. +float: 1
  106005. +idouble: 1
  106006. +ifloat: 1
  106007. +Test "tgamma (-9.5)":
  106008. +double: 1
  106009. +float: 1
  106010. +idouble: 1
  106011. +ifloat: 1
  106012. +Test "tgamma (0.5)":
  106013. +float: 1
  106014. +ifloat: 1
  106015. +Test "tgamma (0.7)":
  106016. +double: 1
  106017. +float: 1
  106018. +idouble: 1
  106019. +ifloat: 1
  106020. +Test "tgamma (0x1.fffffep0)":
  106021. +float: 1
  106022. +ifloat: 1
  106023. +Test "tgamma (0x1.fffffffffffffp0)":
  106024. +double: 1
  106025. +idouble: 1
  106026. +Test "tgamma (0x1p-24)":
  106027. +float: 1
  106028. +ifloat: 1
  106029. +Test "tgamma (0x1p-53)":
  106030. +double: 1
  106031. +idouble: 1
  106032. +Test "tgamma (0x2.30a43cp+4)":
  106033. +double: 1
  106034. +float: 2
  106035. +idouble: 1
  106036. +ifloat: 2
  106037. +Test "tgamma (0x2.fffffcp0)":
  106038. +float: 3
  106039. +ifloat: 3
  106040. +Test "tgamma (0x3.fffffcp0)":
  106041. +float: 1
  106042. +ifloat: 1
  106043. +Test "tgamma (0x3.ffffffffffffep0)":
  106044. +double: 1
  106045. +idouble: 1
  106046. +Test "tgamma (0x4.0000000000004p0)":
  106047. +double: 1
  106048. +idouble: 1
  106049. +Test "tgamma (0x4.ffffffffffffcp0)":
  106050. +double: 1
  106051. +idouble: 1
  106052. +Test "tgamma (0x5.0000000000004p0)":
  106053. +double: 1
  106054. +idouble: 1
  106055. +Test "tgamma (0x5.000008p0)":
  106056. +float: 2
  106057. +ifloat: 2
  106058. +Test "tgamma (0x5.fffff8p0)":
  106059. +double: 1
  106060. +float: 1
  106061. +idouble: 1
  106062. +ifloat: 1
  106063. +Test "tgamma (0x6.0000000000004p0)":
  106064. +double: 1
  106065. +idouble: 1
  106066. +Test "tgamma (0x6.000008p0)":
  106067. +float: 2
  106068. +ifloat: 2
  106069. +Test "tgamma (0x6.fffff8p0)":
  106070. +double: 1
  106071. +idouble: 1
  106072. +Test "tgamma (0x6.ffffffffffffcp0)":
  106073. +double: 4
  106074. +idouble: 4
  106075. +Test "tgamma (0x7.0000000000004p0)":
  106076. +double: 4
  106077. +idouble: 4
  106078. +Test "tgamma (0x7.000008p0)":
  106079. +double: 1
  106080. +float: 1
  106081. +idouble: 1
  106082. +ifloat: 1
  106083. +Test "tgamma (0x7.fffff8p0)":
  106084. +double: 2
  106085. +float: 1
  106086. +idouble: 2
  106087. +ifloat: 1
  106088. +Test "tgamma (0x7.ffffffffffffcp0)":
  106089. +double: 2
  106090. +idouble: 2
  106091. +Test "tgamma (0x8.00001p0)":
  106092. +double: 2
  106093. +idouble: 2
  106094. +Test "tgamma (0xa.b9fd72b0fb238p+4)":
  106095. +double: 1
  106096. +idouble: 1
  106097. +Test "tgamma (10)":
  106098. +double: 1
  106099. +float: 1
  106100. +idouble: 1
  106101. +ifloat: 1
  106102. +Test "tgamma (18.5)":
  106103. +double: 1
  106104. +float: 1
  106105. +idouble: 1
  106106. +ifloat: 1
  106107. +Test "tgamma (19.5)":
  106108. +double: 2
  106109. +idouble: 2
  106110. +Test "tgamma (2.5)":
  106111. +float: 2
  106112. +ifloat: 2
  106113. +Test "tgamma (23.5)":
  106114. +double: 1
  106115. +float: 1
  106116. +idouble: 1
  106117. +ifloat: 1
  106118. +Test "tgamma (29.5)":
  106119. +double: 1
  106120. +float: 1
  106121. +idouble: 1
  106122. +ifloat: 1
  106123. +Test "tgamma (3)":
  106124. +float: 1
  106125. +ifloat: 1
  106126. +Test "tgamma (3.5)":
  106127. +float: 2
  106128. +ifloat: 2
  106129. +Test "tgamma (30.5)":
  106130. +float: 1
  106131. +ifloat: 1
  106132. +Test "tgamma (33.5)":
  106133. +float: 1
  106134. +ifloat: 1
  106135. +Test "tgamma (34.5)":
  106136. +double: 1
  106137. +float: 2
  106138. +idouble: 1
  106139. +ifloat: 2
  106140. +Test "tgamma (4)":
  106141. +float: 1
  106142. +ifloat: 1
  106143. +Test "tgamma (4.5)":
  106144. +double: 1
  106145. +float: 1
  106146. +idouble: 1
  106147. +ifloat: 1
  106148. +Test "tgamma (6)":
  106149. +float: 1
  106150. +ifloat: 1
  106151. +Test "tgamma (6.5)":
  106152. +float: 1
  106153. +ifloat: 1
  106154. +Test "tgamma (7)":
  106155. +double: 1
  106156. +idouble: 1
  106157. +Test "tgamma (7.5)":
  106158. +double: 2
  106159. +float: 1
  106160. +idouble: 2
  106161. +ifloat: 1
  106162. +Test "tgamma (8)":
  106163. +double: 1
  106164. +idouble: 1
  106165. +Test "tgamma (8.5)":
  106166. +double: 1
  106167. +float: 1
  106168. +idouble: 1
  106169. +ifloat: 1
  106170. +Test "tgamma (9)":
  106171. +double: 1
  106172. +idouble: 1
  106173. +Test "tgamma (9.5)":
  106174. +double: 1
  106175. +idouble: 1
  106176. +
  106177. +# y0
  106178. +Test "y0 (0x1.3ffp+74)":
  106179. +double: 1
  106180. +idouble: 1
  106181. +Test "y0 (0x1.ff00000000002p+840)":
  106182. +double: 1
  106183. +idouble: 1
  106184. +Test "y0 (0x1p-10)":
  106185. +double: 1
  106186. +idouble: 1
  106187. +Test "y0 (0x1p-110)":
  106188. +double: 1
  106189. +idouble: 1
  106190. +Test "y0 (0x1p-20)":
  106191. +float: 1
  106192. +ifloat: 1
  106193. +Test "y0 (0x1p-30)":
  106194. +float: 1
  106195. +ifloat: 1
  106196. +Test "y0 (0x1p-40)":
  106197. +double: 1
  106198. +float: 1
  106199. +idouble: 1
  106200. +ifloat: 1
  106201. +Test "y0 (0x1p-50)":
  106202. +float: 1
  106203. +ifloat: 1
  106204. +Test "y0 (0x1p-70)":
  106205. +double: 1
  106206. +idouble: 1
  106207. +Test "y0 (0x1p-80)":
  106208. +double: 1
  106209. +float: 1
  106210. +idouble: 1
  106211. +ifloat: 1
  106212. +Test "y0 (1.0)":
  106213. +double: 2
  106214. +float: 1
  106215. +idouble: 2
  106216. +ifloat: 1
  106217. +Test "y0 (1.5)":
  106218. +double: 2
  106219. +float: 1
  106220. +idouble: 2
  106221. +ifloat: 1
  106222. +Test "y0 (10.0)":
  106223. +float: 1
  106224. +ifloat: 1
  106225. +Test "y0 (8.0)":
  106226. +double: 1
  106227. +float: 1
  106228. +idouble: 1
  106229. +ifloat: 1
  106230. +
  106231. +# y1
  106232. +Test "y1 (0.125)":
  106233. +double: 1
  106234. +idouble: 1
  106235. +Test "y1 (0x1.27e204p+99)":
  106236. +double: 1
  106237. +idouble: 1
  106238. +Test "y1 (0x1p-10)":
  106239. +double: 1
  106240. +idouble: 1
  106241. +Test "y1 (1.5)":
  106242. +float: 1
  106243. +ifloat: 1
  106244. +Test "y1 (10.0)":
  106245. +double: 3
  106246. +float: 1
  106247. +idouble: 3
  106248. +ifloat: 1
  106249. +Test "y1 (2.0)":
  106250. +double: 1
  106251. +float: 1
  106252. +idouble: 1
  106253. +ifloat: 1
  106254. +Test "y1 (8.0)":
  106255. +double: 1
  106256. +float: 2
  106257. +idouble: 1
  106258. +ifloat: 2
  106259. +
  106260. +# yn
  106261. +Test "yn (0, 1.0)":
  106262. +double: 2
  106263. +float: 1
  106264. +idouble: 2
  106265. +ifloat: 1
  106266. +Test "yn (0, 1.5)":
  106267. +double: 2
  106268. +float: 1
  106269. +idouble: 2
  106270. +ifloat: 1
  106271. +Test "yn (0, 10.0)":
  106272. +float: 1
  106273. +ifloat: 1
  106274. +Test "yn (0, 8.0)":
  106275. +double: 1
  106276. +float: 1
  106277. +idouble: 1
  106278. +ifloat: 1
  106279. +Test "yn (1, 0.125)":
  106280. +double: 1
  106281. +idouble: 1
  106282. +Test "yn (1, 1.5)":
  106283. +float: 1
  106284. +ifloat: 1
  106285. +Test "yn (1, 10.0)":
  106286. +double: 3
  106287. +float: 1
  106288. +idouble: 3
  106289. +ifloat: 1
  106290. +Test "yn (1, 2.0)":
  106291. +double: 1
  106292. +float: 1
  106293. +idouble: 1
  106294. +ifloat: 1
  106295. +Test "yn (1, 8.0)":
  106296. +double: 1
  106297. +float: 2
  106298. +idouble: 1
  106299. +ifloat: 2
  106300. +Test "yn (10, 0.125)":
  106301. +double: 1
  106302. +idouble: 1
  106303. +Test "yn (10, 0.75)":
  106304. +double: 1
  106305. +float: 1
  106306. +idouble: 1
  106307. +ifloat: 1
  106308. +Test "yn (10, 1.0)":
  106309. +double: 1
  106310. +idouble: 1
  106311. +Test "yn (10, 10.0)":
  106312. +double: 1
  106313. +float: 1
  106314. +idouble: 1
  106315. +ifloat: 1
  106316. +Test "yn (10, 2.0)":
  106317. +double: 2
  106318. +idouble: 2
  106319. +Test "yn (3, 0.125)":
  106320. +double: 1
  106321. +idouble: 1
  106322. +Test "yn (3, 0.75)":
  106323. +double: 1
  106324. +float: 1
  106325. +idouble: 1
  106326. +ifloat: 1
  106327. +Test "yn (3, 10.0)":
  106328. +double: 1
  106329. +float: 1
  106330. +idouble: 1
  106331. +ifloat: 1
  106332. +Test "yn (3, 2.0)":
  106333. +double: 1
  106334. +idouble: 1
  106335. +
  106336. +# Maximal error of functions:
  106337. +Function: "acos_downward":
  106338. +double: 1
  106339. +float: 1
  106340. +idouble: 1
  106341. +ifloat: 1
  106342. +
  106343. +Function: "acos_towardzero":
  106344. +double: 1
  106345. +float: 1
  106346. +idouble: 1
  106347. +ifloat: 1
  106348. +
  106349. +Function: "asin_downward":
  106350. +double: 1
  106351. +float: 1
  106352. +idouble: 1
  106353. +ifloat: 1
  106354. +
  106355. +Function: "asin_towardzero":
  106356. +double: 1
  106357. +float: 1
  106358. +idouble: 1
  106359. +ifloat: 1
  106360. +
  106361. +Function: "asin_upward":
  106362. +float: 1
  106363. +ifloat: 1
  106364. +
  106365. +Function: "atan2":
  106366. +float: 1
  106367. +ifloat: 1
  106368. +
  106369. +Function: "atanh":
  106370. +float: 1
  106371. +ifloat: 1
  106372. +
  106373. +Function: Real part of "cacos":
  106374. +double: 1
  106375. +float: 2
  106376. +idouble: 1
  106377. +ifloat: 2
  106378. +
  106379. +Function: Imaginary part of "cacos":
  106380. +double: 1
  106381. +float: 2
  106382. +idouble: 1
  106383. +ifloat: 2
  106384. +
  106385. +Function: Real part of "cacosh":
  106386. +double: 1
  106387. +float: 2
  106388. +idouble: 1
  106389. +ifloat: 2
  106390. +
  106391. +Function: Imaginary part of "cacosh":
  106392. +double: 1
  106393. +float: 2
  106394. +idouble: 1
  106395. +ifloat: 2
  106396. +
  106397. +Function: Real part of "casin":
  106398. +double: 1
  106399. +float: 1
  106400. +idouble: 1
  106401. +ifloat: 1
  106402. +
  106403. +Function: Imaginary part of "casin":
  106404. +double: 1
  106405. +float: 2
  106406. +idouble: 1
  106407. +ifloat: 2
  106408. +
  106409. +Function: Real part of "casinh":
  106410. +double: 1
  106411. +float: 2
  106412. +idouble: 1
  106413. +ifloat: 2
  106414. +
  106415. +Function: Imaginary part of "casinh":
  106416. +double: 1
  106417. +float: 1
  106418. +idouble: 1
  106419. +ifloat: 1
  106420. +
  106421. +Function: Real part of "catan":
  106422. +float: 1
  106423. +ifloat: 1
  106424. +
  106425. +Function: Imaginary part of "catan":
  106426. +double: 1
  106427. +float: 1
  106428. +idouble: 1
  106429. +ifloat: 1
  106430. +
  106431. +Function: Real part of "catanh":
  106432. +double: 1
  106433. +float: 1
  106434. +idouble: 1
  106435. +ifloat: 1
  106436. +
  106437. +Function: Imaginary part of "catanh":
  106438. +float: 1
  106439. +ifloat: 1
  106440. +
  106441. +Function: "cbrt":
  106442. +double: 1
  106443. +idouble: 1
  106444. +
  106445. +Function: Real part of "ccos":
  106446. +double: 1
  106447. +float: 1
  106448. +idouble: 1
  106449. +ifloat: 1
  106450. +
  106451. +Function: Imaginary part of "ccos":
  106452. +double: 1
  106453. +float: 1
  106454. +idouble: 1
  106455. +ifloat: 1
  106456. +
  106457. +Function: Real part of "ccosh":
  106458. +double: 1
  106459. +float: 1
  106460. +idouble: 1
  106461. +ifloat: 1
  106462. +
  106463. +Function: Imaginary part of "ccosh":
  106464. +double: 1
  106465. +float: 1
  106466. +idouble: 1
  106467. +ifloat: 1
  106468. +
  106469. +Function: Real part of "cexp":
  106470. +double: 2
  106471. +float: 1
  106472. +idouble: 2
  106473. +ifloat: 1
  106474. +
  106475. +Function: Imaginary part of "cexp":
  106476. +double: 1
  106477. +float: 2
  106478. +idouble: 1
  106479. +ifloat: 2
  106480. +
  106481. +Function: Real part of "clog":
  106482. +double: 1
  106483. +float: 1
  106484. +idouble: 1
  106485. +ifloat: 1
  106486. +
  106487. +Function: Imaginary part of "clog":
  106488. +float: 1
  106489. +ifloat: 1
  106490. +
  106491. +Function: Real part of "clog10":
  106492. +double: 2
  106493. +float: 2
  106494. +idouble: 2
  106495. +ifloat: 2
  106496. +
  106497. +Function: Imaginary part of "clog10":
  106498. +double: 1
  106499. +float: 1
  106500. +idouble: 1
  106501. +ifloat: 1
  106502. +
  106503. +Function: "cos":
  106504. +double: 2
  106505. +float: 1
  106506. +idouble: 2
  106507. +ifloat: 1
  106508. +
  106509. +Function: "cos_downward":
  106510. +float: 1
  106511. +ifloat: 1
  106512. +
  106513. +Function: "cos_tonearest":
  106514. +float: 1
  106515. +ifloat: 1
  106516. +
  106517. +Function: "cos_towardzero":
  106518. +float: 1
  106519. +ifloat: 1
  106520. +
  106521. +Function: "cos_upward":
  106522. +float: 2
  106523. +ifloat: 2
  106524. +
  106525. +Function: "cosh_downward":
  106526. +float: 1
  106527. +ifloat: 1
  106528. +
  106529. +Function: "cosh_towardzero":
  106530. +float: 1
  106531. +ifloat: 1
  106532. +
  106533. +Function: Real part of "cpow":
  106534. +double: 2
  106535. +float: 4
  106536. +idouble: 2
  106537. +ifloat: 4
  106538. +
  106539. +Function: Imaginary part of "cpow":
  106540. +float: 2
  106541. +ifloat: 2
  106542. +
  106543. +Function: Real part of "csin":
  106544. +double: 1
  106545. +float: 1
  106546. +idouble: 1
  106547. +ifloat: 1
  106548. +
  106549. +Function: Real part of "csinh":
  106550. +float: 1
  106551. +ifloat: 1
  106552. +
  106553. +Function: Imaginary part of "csinh":
  106554. +double: 1
  106555. +float: 1
  106556. +idouble: 1
  106557. +ifloat: 1
  106558. +
  106559. +Function: Real part of "csqrt":
  106560. +double: 1
  106561. +float: 1
  106562. +idouble: 1
  106563. +ifloat: 1
  106564. +
  106565. +Function: Imaginary part of "csqrt":
  106566. +double: 1
  106567. +float: 1
  106568. +idouble: 1
  106569. +ifloat: 1
  106570. +
  106571. +Function: Real part of "ctan":
  106572. +double: 1
  106573. +float: 1
  106574. +idouble: 1
  106575. +ifloat: 1
  106576. +
  106577. +Function: Imaginary part of "ctan":
  106578. +double: 1
  106579. +idouble: 1
  106580. +
  106581. +Function: Real part of "ctan_downward":
  106582. +double: 2
  106583. +float: 1
  106584. +idouble: 2
  106585. +ifloat: 1
  106586. +
  106587. +Function: Imaginary part of "ctan_downward":
  106588. +float: 1
  106589. +ifloat: 1
  106590. +
  106591. +Function: Real part of "ctan_tonearest":
  106592. +float: 1
  106593. +ifloat: 1
  106594. +
  106595. +Function: Imaginary part of "ctan_tonearest":
  106596. +float: 1
  106597. +ifloat: 1
  106598. +
  106599. +Function: Real part of "ctan_towardzero":
  106600. +float: 1
  106601. +ifloat: 1
  106602. +
  106603. +Function: Imaginary part of "ctan_towardzero":
  106604. +float: 1
  106605. +ifloat: 1
  106606. +
  106607. +Function: Real part of "ctan_upward":
  106608. +double: 2
  106609. +float: 1
  106610. +idouble: 2
  106611. +ifloat: 1
  106612. +
  106613. +Function: Imaginary part of "ctan_upward":
  106614. +double: 1
  106615. +float: 2
  106616. +idouble: 1
  106617. +ifloat: 2
  106618. +
  106619. +Function: Real part of "ctanh":
  106620. +double: 1
  106621. +float: 1
  106622. +idouble: 1
  106623. +ifloat: 1
  106624. +
  106625. +Function: Imaginary part of "ctanh":
  106626. +double: 1
  106627. +float: 2
  106628. +idouble: 1
  106629. +ifloat: 2
  106630. +
  106631. +Function: Real part of "ctanh_downward":
  106632. +float: 1
  106633. +ifloat: 1
  106634. +
  106635. +Function: Imaginary part of "ctanh_downward":
  106636. +double: 2
  106637. +float: 1
  106638. +idouble: 2
  106639. +ifloat: 1
  106640. +
  106641. +Function: Real part of "ctanh_tonearest":
  106642. +float: 1
  106643. +ifloat: 1
  106644. +
  106645. +Function: Imaginary part of "ctanh_tonearest":
  106646. +float: 1
  106647. +ifloat: 1
  106648. +
  106649. +Function: Real part of "ctanh_towardzero":
  106650. +float: 1
  106651. +ifloat: 1
  106652. +
  106653. +Function: Imaginary part of "ctanh_towardzero":
  106654. +float: 1
  106655. +ifloat: 1
  106656. +
  106657. +Function: Real part of "ctanh_upward":
  106658. +double: 1
  106659. +float: 2
  106660. +idouble: 1
  106661. +ifloat: 2
  106662. +
  106663. +Function: Imaginary part of "ctanh_upward":
  106664. +double: 2
  106665. +float: 1
  106666. +idouble: 2
  106667. +ifloat: 1
  106668. +
  106669. +Function: "erf":
  106670. +double: 1
  106671. +idouble: 1
  106672. +
  106673. +Function: "erfc":
  106674. +double: 1
  106675. +float: 1
  106676. +idouble: 1
  106677. +ifloat: 1
  106678. +
  106679. +Function: "exp":
  106680. +double: 1
  106681. +idouble: 1
  106682. +
  106683. +Function: "exp10":
  106684. +double: 1
  106685. +idouble: 1
  106686. +
  106687. +Function: "exp_downward":
  106688. +float: 1
  106689. +ifloat: 1
  106690. +
  106691. +Function: "exp_towardzero":
  106692. +float: 1
  106693. +ifloat: 1
  106694. +
  106695. +Function: "exp_upward":
  106696. +float: 1
  106697. +ifloat: 1
  106698. +
  106699. +Function: "expm1":
  106700. +double: 1
  106701. +float: 1
  106702. +idouble: 1
  106703. +ifloat: 1
  106704. +
  106705. +Function: "gamma":
  106706. +double: 1
  106707. +float: 2
  106708. +idouble: 1
  106709. +ifloat: 2
  106710. +
  106711. +Function: "hypot":
  106712. +float: 1
  106713. +ifloat: 1
  106714. +
  106715. +Function: "j0":
  106716. +double: 2
  106717. +float: 2
  106718. +idouble: 2
  106719. +ifloat: 2
  106720. +
  106721. +Function: "j1":
  106722. +double: 1
  106723. +float: 2
  106724. +idouble: 1
  106725. +ifloat: 2
  106726. +
  106727. +Function: "jn":
  106728. +double: 4
  106729. +float: 5
  106730. +idouble: 4
  106731. +ifloat: 5
  106732. +
  106733. +Function: "lgamma":
  106734. +double: 1
  106735. +float: 2
  106736. +idouble: 1
  106737. +ifloat: 2
  106738. +
  106739. +Function: "log":
  106740. +float: 1
  106741. +ifloat: 1
  106742. +
  106743. +Function: "log10":
  106744. +double: 1
  106745. +float: 2
  106746. +idouble: 1
  106747. +ifloat: 2
  106748. +
  106749. +Function: "log1p":
  106750. +float: 1
  106751. +ifloat: 1
  106752. +
  106753. +Function: "pow":
  106754. +float: 1
  106755. +ifloat: 1
  106756. +
  106757. +Function: "pow10":
  106758. +double: 1
  106759. +idouble: 1
  106760. +
  106761. +Function: "pow_downward":
  106762. +float: 1
  106763. +ifloat: 1
  106764. +
  106765. +Function: "pow_towardzero":
  106766. +float: 1
  106767. +ifloat: 1
  106768. +
  106769. +Function: "pow_upward":
  106770. +float: 1
  106771. +ifloat: 1
  106772. +
  106773. +Function: "sin_downward":
  106774. +float: 1
  106775. +ifloat: 1
  106776. +
  106777. +Function: "sin_tonearest":
  106778. +float: 1
  106779. +ifloat: 1
  106780. +
  106781. +Function: "sin_towardzero":
  106782. +float: 1
  106783. +ifloat: 1
  106784. +
  106785. +Function: "sin_upward":
  106786. +float: 2
  106787. +ifloat: 2
  106788. +
  106789. +Function: "sincos":
  106790. +double: 1
  106791. +float: 1
  106792. +idouble: 1
  106793. +ifloat: 1
  106794. +
  106795. +Function: "sinh_downward":
  106796. +float: 1
  106797. +ifloat: 1
  106798. +
  106799. +Function: "sinh_towardzero":
  106800. +float: 1
  106801. +ifloat: 1
  106802. +
  106803. +Function: "tan":
  106804. +double: 1
  106805. +idouble: 1
  106806. +
  106807. +Function: "tan_downward":
  106808. +float: 1
  106809. +ifloat: 1
  106810. +
  106811. +Function: "tan_towardzero":
  106812. +float: 1
  106813. +ifloat: 1
  106814. +
  106815. +Function: "tan_upward":
  106816. +float: 1
  106817. +ifloat: 1
  106818. +
  106819. +Function: "tgamma":
  106820. +double: 4
  106821. +float: 3
  106822. +idouble: 4
  106823. +ifloat: 3
  106824. +
  106825. +Function: "y0":
  106826. +double: 2
  106827. +float: 1
  106828. +idouble: 2
  106829. +ifloat: 1
  106830. +
  106831. +Function: "y1":
  106832. +double: 3
  106833. +float: 2
  106834. +idouble: 3
  106835. +ifloat: 2
  106836. +
  106837. +Function: "yn":
  106838. +double: 3
  106839. +float: 2
  106840. +idouble: 3
  106841. +ifloat: 2
  106842. +
  106843. +# end of automatic generation
  106844. diff -Nur uClibc-0.9.33.2/test/math/libm-test-ulps-mips32 uClibc-git/test/math/libm-test-ulps-mips32
  106845. --- uClibc-0.9.33.2/test/math/libm-test-ulps-mips32 1970-01-01 01:00:00.000000000 +0100
  106846. +++ uClibc-git/test/math/libm-test-ulps-mips32 2014-07-25 20:36:11.517359363 +0200
  106847. @@ -0,0 +1,4966 @@
  106848. +# Begin of automatic generation
  106849. +
  106850. +# acos_downward
  106851. +Test "acos_downward (-0)":
  106852. +float: 1
  106853. +ifloat: 1
  106854. +Test "acos_downward (-0.5)":
  106855. +double: 1
  106856. +idouble: 1
  106857. +Test "acos_downward (-1)":
  106858. +float: 1
  106859. +ifloat: 1
  106860. +Test "acos_downward (0)":
  106861. +float: 1
  106862. +ifloat: 1
  106863. +Test "acos_downward (0.5)":
  106864. +double: 1
  106865. +float: 1
  106866. +idouble: 1
  106867. +ifloat: 1
  106868. +
  106869. +# acos_towardzero
  106870. +Test "acos_towardzero (-0)":
  106871. +float: 1
  106872. +ifloat: 1
  106873. +Test "acos_towardzero (-0.5)":
  106874. +double: 1
  106875. +idouble: 1
  106876. +Test "acos_towardzero (-1)":
  106877. +float: 1
  106878. +ifloat: 1
  106879. +Test "acos_towardzero (0)":
  106880. +float: 1
  106881. +ifloat: 1
  106882. +Test "acos_towardzero (0.5)":
  106883. +double: 1
  106884. +float: 1
  106885. +idouble: 1
  106886. +ifloat: 1
  106887. +
  106888. +# asin_downward
  106889. +Test "asin_downward (-0.5)":
  106890. +double: 1
  106891. +idouble: 1
  106892. +Test "asin_downward (0.5)":
  106893. +double: 1
  106894. +idouble: 1
  106895. +Test "asin_downward (1.0)":
  106896. +float: 1
  106897. +ifloat: 1
  106898. +
  106899. +# asin_towardzero
  106900. +Test "asin_towardzero (-0.5)":
  106901. +double: 1
  106902. +idouble: 1
  106903. +Test "asin_towardzero (-1.0)":
  106904. +float: 1
  106905. +ifloat: 1
  106906. +Test "asin_towardzero (0.5)":
  106907. +double: 1
  106908. +idouble: 1
  106909. +Test "asin_towardzero (1.0)":
  106910. +float: 1
  106911. +ifloat: 1
  106912. +
  106913. +# asin_upward
  106914. +Test "asin_upward (-1.0)":
  106915. +float: 1
  106916. +ifloat: 1
  106917. +
  106918. +# atan2
  106919. +Test "atan2 (-0.75, -1.0)":
  106920. +float: 1
  106921. +ifloat: 1
  106922. +Test "atan2 (-max_value, -min_value)":
  106923. +float: 1
  106924. +ifloat: 1
  106925. +Test "atan2 (0.75, -1.0)":
  106926. +float: 1
  106927. +ifloat: 1
  106928. +Test "atan2 (1.390625, 0.9296875)":
  106929. +float: 1
  106930. +ifloat: 1
  106931. +
  106932. +# atanh
  106933. +Test "atanh (0.75)":
  106934. +float: 1
  106935. +ifloat: 1
  106936. +
  106937. +# cacos
  106938. +Test "Imaginary part of: cacos (+0 + 0.5 i)":
  106939. +float: 1
  106940. +ifloat: 1
  106941. +Test "Imaginary part of: cacos (+0 + 1.0 i)":
  106942. +double: 1
  106943. +float: 1
  106944. +idouble: 1
  106945. +ifloat: 1
  106946. +Test "Imaginary part of: cacos (+0 + 1.5 i)":
  106947. +double: 1
  106948. +idouble: 1
  106949. +Test "Imaginary part of: cacos (+0 - 0.5 i)":
  106950. +float: 1
  106951. +ifloat: 1
  106952. +Test "Imaginary part of: cacos (+0 - 1.0 i)":
  106953. +double: 1
  106954. +float: 1
  106955. +idouble: 1
  106956. +ifloat: 1
  106957. +Test "Imaginary part of: cacos (+0 - 1.5 i)":
  106958. +double: 1
  106959. +idouble: 1
  106960. +Test "Imaginary part of: cacos (-0 + 0.5 i)":
  106961. +float: 1
  106962. +ifloat: 1
  106963. +Test "Imaginary part of: cacos (-0 + 1.0 i)":
  106964. +double: 1
  106965. +float: 1
  106966. +idouble: 1
  106967. +ifloat: 1
  106968. +Test "Imaginary part of: cacos (-0 + 1.5 i)":
  106969. +double: 1
  106970. +idouble: 1
  106971. +Test "Imaginary part of: cacos (-0 - 0.5 i)":
  106972. +float: 1
  106973. +ifloat: 1
  106974. +Test "Imaginary part of: cacos (-0 - 1.0 i)":
  106975. +double: 1
  106976. +float: 1
  106977. +idouble: 1
  106978. +ifloat: 1
  106979. +Test "Imaginary part of: cacos (-0 - 1.5 i)":
  106980. +double: 1
  106981. +idouble: 1
  106982. +Test "Real part of: cacos (-0.25 + 1.0 i)":
  106983. +double: 1
  106984. +float: 1
  106985. +idouble: 1
  106986. +ifloat: 1
  106987. +Test "Imaginary part of: cacos (-0.25 + 1.0 i)":
  106988. +float: 1
  106989. +ifloat: 1
  106990. +Test "Real part of: cacos (-0.25 - 1.0 i)":
  106991. +double: 1
  106992. +float: 1
  106993. +idouble: 1
  106994. +ifloat: 1
  106995. +Test "Imaginary part of: cacos (-0.25 - 1.0 i)":
  106996. +float: 1
  106997. +ifloat: 1
  106998. +Test "Imaginary part of: cacos (-0.5 + 0x1.fp-129 i)":
  106999. +double: 1
  107000. +idouble: 1
  107001. +Test "Imaginary part of: cacos (-0.5 + 0x1p-105 i)":
  107002. +double: 1
  107003. +idouble: 1
  107004. +Test "Imaginary part of: cacos (-0.5 + 0x1p-112 i)":
  107005. +double: 1
  107006. +idouble: 1
  107007. +Test "Imaginary part of: cacos (-0.5 + 0x1p-23 i)":
  107008. +double: 1
  107009. +idouble: 1
  107010. +Test "Real part of: cacos (-0.5 + 1.0 i)":
  107011. +float: 1
  107012. +ifloat: 1
  107013. +Test "Imaginary part of: cacos (-0.5 + 1.0 i)":
  107014. +double: 1
  107015. +idouble: 1
  107016. +Test "Imaginary part of: cacos (-0.5 - 0x1.fp-129 i)":
  107017. +double: 1
  107018. +idouble: 1
  107019. +Test "Imaginary part of: cacos (-0.5 - 0x1p-105 i)":
  107020. +double: 1
  107021. +idouble: 1
  107022. +Test "Imaginary part of: cacos (-0.5 - 0x1p-112 i)":
  107023. +double: 1
  107024. +idouble: 1
  107025. +Test "Imaginary part of: cacos (-0.5 - 0x1p-23 i)":
  107026. +double: 1
  107027. +idouble: 1
  107028. +Test "Real part of: cacos (-0.5 - 1.0 i)":
  107029. +float: 1
  107030. +ifloat: 1
  107031. +Test "Imaginary part of: cacos (-0.5 - 1.0 i)":
  107032. +double: 1
  107033. +idouble: 1
  107034. +Test "Imaginary part of: cacos (-0x0.fffffffffffff8p0 + 0x1p-52 i)":
  107035. +double: 1
  107036. +idouble: 1
  107037. +Test "Imaginary part of: cacos (-0x0.fffffffffffff8p0 - 0x1p-52 i)":
  107038. +double: 1
  107039. +idouble: 1
  107040. +Test "Imaginary part of: cacos (-0x0.ffffffp0 + 0x1p-23 i)":
  107041. +float: 2
  107042. +ifloat: 2
  107043. +Test "Imaginary part of: cacos (-0x0.ffffffp0 - 0x1p-23 i)":
  107044. +float: 2
  107045. +ifloat: 2
  107046. +Test "Imaginary part of: cacos (-0x1.000002p0 + 0x1p-23 i)":
  107047. +float: 1
  107048. +ifloat: 1
  107049. +Test "Imaginary part of: cacos (-0x1.000002p0 - 0x1p-23 i)":
  107050. +float: 1
  107051. +ifloat: 1
  107052. +Test "Imaginary part of: cacos (-0x1.fp-10 + 1.0 i)":
  107053. +double: 1
  107054. +idouble: 1
  107055. +Test "Imaginary part of: cacos (-0x1.fp-10 - 1.0 i)":
  107056. +double: 1
  107057. +idouble: 1
  107058. +Test "Real part of: cacos (-0x1.fp-100 + 1.0 i)":
  107059. +float: 1
  107060. +ifloat: 1
  107061. +Test "Imaginary part of: cacos (-0x1.fp-100 + 1.0 i)":
  107062. +double: 1
  107063. +float: 1
  107064. +idouble: 1
  107065. +ifloat: 1
  107066. +Test "Real part of: cacos (-0x1.fp-100 - 1.0 i)":
  107067. +float: 1
  107068. +ifloat: 1
  107069. +Test "Imaginary part of: cacos (-0x1.fp-100 - 1.0 i)":
  107070. +double: 1
  107071. +float: 1
  107072. +idouble: 1
  107073. +ifloat: 1
  107074. +Test "Imaginary part of: cacos (-0x1.fp-1000 + 1.0 i)":
  107075. +double: 1
  107076. +idouble: 1
  107077. +Test "Imaginary part of: cacos (-0x1.fp-1000 - 1.0 i)":
  107078. +double: 1
  107079. +idouble: 1
  107080. +Test "Imaginary part of: cacos (-0x1.fp-1025 + 1.0 i)":
  107081. +double: 1
  107082. +idouble: 1
  107083. +Test "Imaginary part of: cacos (-0x1.fp-1025 + 1.5 i)":
  107084. +double: 1
  107085. +idouble: 1
  107086. +Test "Imaginary part of: cacos (-0x1.fp-1025 - 1.0 i)":
  107087. +double: 1
  107088. +idouble: 1
  107089. +Test "Imaginary part of: cacos (-0x1.fp-1025 - 1.5 i)":
  107090. +double: 1
  107091. +idouble: 1
  107092. +Test "Real part of: cacos (-0x1.fp-129 + 0.5 i)":
  107093. +float: 1
  107094. +ifloat: 1
  107095. +Test "Imaginary part of: cacos (-0x1.fp-129 + 0.5 i)":
  107096. +float: 1
  107097. +ifloat: 1
  107098. +Test "Real part of: cacos (-0x1.fp-129 + 0x0.ffffffp0 i)":
  107099. +float: 1
  107100. +ifloat: 1
  107101. +Test "Real part of: cacos (-0x1.fp-129 + 0x1.000002p0 i)":
  107102. +float: 1
  107103. +ifloat: 1
  107104. +Test "Real part of: cacos (-0x1.fp-129 + 0x1.fp-129 i)":
  107105. +float: 1
  107106. +ifloat: 1
  107107. +Test "Real part of: cacos (-0x1.fp-129 + 0x1p-23 i)":
  107108. +float: 1
  107109. +ifloat: 1
  107110. +Test "Real part of: cacos (-0x1.fp-129 + 1.0 i)":
  107111. +float: 1
  107112. +ifloat: 1
  107113. +Test "Imaginary part of: cacos (-0x1.fp-129 + 1.0 i)":
  107114. +double: 1
  107115. +float: 1
  107116. +idouble: 1
  107117. +ifloat: 1
  107118. +Test "Real part of: cacos (-0x1.fp-129 + 1.5 i)":
  107119. +float: 1
  107120. +ifloat: 1
  107121. +Test "Imaginary part of: cacos (-0x1.fp-129 + 1.5 i)":
  107122. +double: 1
  107123. +idouble: 1
  107124. +Test "Real part of: cacos (-0x1.fp-129 - 0.5 i)":
  107125. +float: 1
  107126. +ifloat: 1
  107127. +Test "Imaginary part of: cacos (-0x1.fp-129 - 0.5 i)":
  107128. +float: 1
  107129. +ifloat: 1
  107130. +Test "Real part of: cacos (-0x1.fp-129 - 0x0.ffffffp0 i)":
  107131. +float: 1
  107132. +ifloat: 1
  107133. +Test "Real part of: cacos (-0x1.fp-129 - 0x1.000002p0 i)":
  107134. +float: 1
  107135. +ifloat: 1
  107136. +Test "Real part of: cacos (-0x1.fp-129 - 0x1.fp-129 i)":
  107137. +float: 1
  107138. +ifloat: 1
  107139. +Test "Real part of: cacos (-0x1.fp-129 - 0x1p-23 i)":
  107140. +float: 1
  107141. +ifloat: 1
  107142. +Test "Real part of: cacos (-0x1.fp-129 - 1.0 i)":
  107143. +float: 1
  107144. +ifloat: 1
  107145. +Test "Imaginary part of: cacos (-0x1.fp-129 - 1.0 i)":
  107146. +double: 1
  107147. +float: 1
  107148. +idouble: 1
  107149. +ifloat: 1
  107150. +Test "Real part of: cacos (-0x1.fp-129 - 1.5 i)":
  107151. +float: 1
  107152. +ifloat: 1
  107153. +Test "Imaginary part of: cacos (-0x1.fp-129 - 1.5 i)":
  107154. +double: 1
  107155. +idouble: 1
  107156. +Test "Real part of: cacos (-0x1.fp-30 + 1.0 i)":
  107157. +float: 1
  107158. +ifloat: 1
  107159. +Test "Imaginary part of: cacos (-0x1.fp-30 + 1.0 i)":
  107160. +double: 1
  107161. +float: 1
  107162. +idouble: 1
  107163. +ifloat: 1
  107164. +Test "Real part of: cacos (-0x1.fp-30 - 1.0 i)":
  107165. +float: 1
  107166. +ifloat: 1
  107167. +Test "Imaginary part of: cacos (-0x1.fp-30 - 1.0 i)":
  107168. +double: 1
  107169. +float: 1
  107170. +idouble: 1
  107171. +ifloat: 1
  107172. +Test "Real part of: cacos (-0x1p-105 + 0.0 i)":
  107173. +float: 1
  107174. +ifloat: 1
  107175. +Test "Real part of: cacos (-0x1p-105 + 0.5 i)":
  107176. +float: 1
  107177. +ifloat: 1
  107178. +Test "Imaginary part of: cacos (-0x1p-105 + 0.5 i)":
  107179. +float: 1
  107180. +ifloat: 1
  107181. +Test "Real part of: cacos (-0x1p-105 + 0x1p-105 i)":
  107182. +float: 1
  107183. +ifloat: 1
  107184. +Test "Real part of: cacos (-0x1p-105 - 0.0 i)":
  107185. +float: 1
  107186. +ifloat: 1
  107187. +Test "Real part of: cacos (-0x1p-105 - 0.5 i)":
  107188. +float: 1
  107189. +ifloat: 1
  107190. +Test "Imaginary part of: cacos (-0x1p-105 - 0.5 i)":
  107191. +float: 1
  107192. +ifloat: 1
  107193. +Test "Real part of: cacos (-0x1p-105 - 0x1p-105 i)":
  107194. +float: 1
  107195. +ifloat: 1
  107196. +Test "Real part of: cacos (-0x1p-112 + 0.0 i)":
  107197. +float: 1
  107198. +ifloat: 1
  107199. +Test "Real part of: cacos (-0x1p-112 + 0.5 i)":
  107200. +float: 1
  107201. +ifloat: 1
  107202. +Test "Imaginary part of: cacos (-0x1p-112 + 0.5 i)":
  107203. +float: 1
  107204. +ifloat: 1
  107205. +Test "Real part of: cacos (-0x1p-112 + 0x1p-112 i)":
  107206. +float: 1
  107207. +ifloat: 1
  107208. +Test "Real part of: cacos (-0x1p-112 - 0.0 i)":
  107209. +float: 1
  107210. +ifloat: 1
  107211. +Test "Real part of: cacos (-0x1p-112 - 0.5 i)":
  107212. +float: 1
  107213. +ifloat: 1
  107214. +Test "Imaginary part of: cacos (-0x1p-112 - 0.5 i)":
  107215. +float: 1
  107216. +ifloat: 1
  107217. +Test "Real part of: cacos (-0x1p-112 - 0x1p-112 i)":
  107218. +float: 1
  107219. +ifloat: 1
  107220. +Test "Real part of: cacos (-0x1p-23 + 0.0 i)":
  107221. +float: 1
  107222. +ifloat: 1
  107223. +Test "Real part of: cacos (-0x1p-23 + 0.5 i)":
  107224. +float: 1
  107225. +ifloat: 1
  107226. +Test "Imaginary part of: cacos (-0x1p-23 + 0.5 i)":
  107227. +float: 1
  107228. +ifloat: 1
  107229. +Test "Imaginary part of: cacos (-0x1p-23 + 0x0.ffffffp0 i)":
  107230. +double: 1
  107231. +idouble: 1
  107232. +Test "Real part of: cacos (-0x1p-23 + 0x1.fp-129 i)":
  107233. +float: 1
  107234. +ifloat: 1
  107235. +Test "Real part of: cacos (-0x1p-23 + 0x1p-23 i)":
  107236. +float: 1
  107237. +ifloat: 1
  107238. +Test "Real part of: cacos (-0x1p-23 - 0.0 i)":
  107239. +float: 1
  107240. +ifloat: 1
  107241. +Test "Real part of: cacos (-0x1p-23 - 0.5 i)":
  107242. +float: 1
  107243. +ifloat: 1
  107244. +Test "Imaginary part of: cacos (-0x1p-23 - 0.5 i)":
  107245. +float: 1
  107246. +ifloat: 1
  107247. +Test "Imaginary part of: cacos (-0x1p-23 - 0x0.ffffffp0 i)":
  107248. +double: 1
  107249. +idouble: 1
  107250. +Test "Real part of: cacos (-0x1p-23 - 0x1.fp-129 i)":
  107251. +float: 1
  107252. +ifloat: 1
  107253. +Test "Real part of: cacos (-0x1p-23 - 0x1p-23 i)":
  107254. +float: 1
  107255. +ifloat: 1
  107256. +Test "Real part of: cacos (-0x1p-52 + 0.0 i)":
  107257. +float: 1
  107258. +ifloat: 1
  107259. +Test "Real part of: cacos (-0x1p-52 + 0.5 i)":
  107260. +float: 1
  107261. +ifloat: 1
  107262. +Test "Imaginary part of: cacos (-0x1p-52 + 0.5 i)":
  107263. +float: 1
  107264. +ifloat: 1
  107265. +Test "Real part of: cacos (-0x1p-52 + 0x1p-52 i)":
  107266. +float: 1
  107267. +ifloat: 1
  107268. +Test "Real part of: cacos (-0x1p-52 - 0.0 i)":
  107269. +float: 1
  107270. +ifloat: 1
  107271. +Test "Real part of: cacos (-0x1p-52 - 0.5 i)":
  107272. +float: 1
  107273. +ifloat: 1
  107274. +Test "Imaginary part of: cacos (-0x1p-52 - 0.5 i)":
  107275. +float: 1
  107276. +ifloat: 1
  107277. +Test "Real part of: cacos (-0x1p-52 - 0x1p-52 i)":
  107278. +float: 1
  107279. +ifloat: 1
  107280. +Test "Real part of: cacos (-0x1p-63 + 0.0 i)":
  107281. +float: 1
  107282. +ifloat: 1
  107283. +Test "Real part of: cacos (-0x1p-63 + 0.5 i)":
  107284. +float: 1
  107285. +ifloat: 1
  107286. +Test "Imaginary part of: cacos (-0x1p-63 + 0.5 i)":
  107287. +float: 1
  107288. +ifloat: 1
  107289. +Test "Real part of: cacos (-0x1p-63 + 0x1p-63 i)":
  107290. +float: 1
  107291. +ifloat: 1
  107292. +Test "Real part of: cacos (-0x1p-63 - 0.0 i)":
  107293. +float: 1
  107294. +ifloat: 1
  107295. +Test "Real part of: cacos (-0x1p-63 - 0.5 i)":
  107296. +float: 1
  107297. +ifloat: 1
  107298. +Test "Imaginary part of: cacos (-0x1p-63 - 0.5 i)":
  107299. +float: 1
  107300. +ifloat: 1
  107301. +Test "Real part of: cacos (-0x1p-63 - 0x1p-63 i)":
  107302. +float: 1
  107303. +ifloat: 1
  107304. +Test "Imaginary part of: cacos (-1.0 + 0.5 i)":
  107305. +float: 1
  107306. +ifloat: 1
  107307. +Test "Imaginary part of: cacos (-1.0 + 0x1.fp-10 i)":
  107308. +float: 1
  107309. +ifloat: 1
  107310. +Test "Real part of: cacos (-1.0 + 0x1p50 i)":
  107311. +float: 1
  107312. +ifloat: 1
  107313. +Test "Imaginary part of: cacos (-1.0 - 0.5 i)":
  107314. +float: 1
  107315. +ifloat: 1
  107316. +Test "Imaginary part of: cacos (-1.0 - 0x1.fp-10 i)":
  107317. +float: 1
  107318. +ifloat: 1
  107319. +Test "Real part of: cacos (-1.0 - 0x1p50 i)":
  107320. +float: 1
  107321. +ifloat: 1
  107322. +Test "Real part of: cacos (-2 - 3 i)":
  107323. +float: 1
  107324. +ifloat: 1
  107325. +Test "Imaginary part of: cacos (0.25 + 1.0 i)":
  107326. +float: 1
  107327. +ifloat: 1
  107328. +Test "Imaginary part of: cacos (0.25 - 1.0 i)":
  107329. +float: 1
  107330. +ifloat: 1
  107331. +Test "Real part of: cacos (0.5 + +0 i)":
  107332. +double: 1
  107333. +idouble: 1
  107334. +Test "Real part of: cacos (0.5 + 0x1.fp-1025 i)":
  107335. +double: 1
  107336. +idouble: 1
  107337. +Test "Real part of: cacos (0.5 + 0x1.fp-129 i)":
  107338. +double: 1
  107339. +idouble: 1
  107340. +Test "Imaginary part of: cacos (0.5 + 0x1.fp-129 i)":
  107341. +double: 1
  107342. +idouble: 1
  107343. +Test "Real part of: cacos (0.5 + 0x1p-105 i)":
  107344. +double: 1
  107345. +idouble: 1
  107346. +Test "Imaginary part of: cacos (0.5 + 0x1p-105 i)":
  107347. +double: 1
  107348. +idouble: 1
  107349. +Test "Real part of: cacos (0.5 + 0x1p-112 i)":
  107350. +double: 1
  107351. +idouble: 1
  107352. +Test "Imaginary part of: cacos (0.5 + 0x1p-112 i)":
  107353. +double: 1
  107354. +idouble: 1
  107355. +Test "Imaginary part of: cacos (0.5 + 0x1p-23 i)":
  107356. +double: 1
  107357. +idouble: 1
  107358. +Test "Real part of: cacos (0.5 + 0x1p-52 i)":
  107359. +double: 1
  107360. +idouble: 1
  107361. +Test "Real part of: cacos (0.5 + 0x1p-63 i)":
  107362. +double: 1
  107363. +idouble: 1
  107364. +Test "Real part of: cacos (0.5 + 1.0 i)":
  107365. +float: 1
  107366. +ifloat: 1
  107367. +Test "Imaginary part of: cacos (0.5 + 1.0 i)":
  107368. +double: 1
  107369. +idouble: 1
  107370. +Test "Real part of: cacos (0.5 - 0 i)":
  107371. +double: 1
  107372. +idouble: 1
  107373. +Test "Real part of: cacos (0.5 - 0x1.fp-1025 i)":
  107374. +double: 1
  107375. +idouble: 1
  107376. +Test "Real part of: cacos (0.5 - 0x1.fp-129 i)":
  107377. +double: 1
  107378. +idouble: 1
  107379. +Test "Imaginary part of: cacos (0.5 - 0x1.fp-129 i)":
  107380. +double: 1
  107381. +idouble: 1
  107382. +Test "Real part of: cacos (0.5 - 0x1p-105 i)":
  107383. +double: 1
  107384. +idouble: 1
  107385. +Test "Imaginary part of: cacos (0.5 - 0x1p-105 i)":
  107386. +double: 1
  107387. +idouble: 1
  107388. +Test "Real part of: cacos (0.5 - 0x1p-112 i)":
  107389. +double: 1
  107390. +idouble: 1
  107391. +Test "Imaginary part of: cacos (0.5 - 0x1p-112 i)":
  107392. +double: 1
  107393. +idouble: 1
  107394. +Test "Imaginary part of: cacos (0.5 - 0x1p-23 i)":
  107395. +double: 1
  107396. +idouble: 1
  107397. +Test "Real part of: cacos (0.5 - 0x1p-52 i)":
  107398. +double: 1
  107399. +idouble: 1
  107400. +Test "Real part of: cacos (0.5 - 0x1p-63 i)":
  107401. +double: 1
  107402. +idouble: 1
  107403. +Test "Real part of: cacos (0.5 - 1.0 i)":
  107404. +float: 1
  107405. +ifloat: 1
  107406. +Test "Imaginary part of: cacos (0.5 - 1.0 i)":
  107407. +double: 1
  107408. +idouble: 1
  107409. +Test "Imaginary part of: cacos (0x0.fffffffffffff8p0 + 0x1p-52 i)":
  107410. +double: 1
  107411. +idouble: 1
  107412. +Test "Imaginary part of: cacos (0x0.fffffffffffff8p0 - 0x1p-52 i)":
  107413. +double: 1
  107414. +idouble: 1
  107415. +Test "Real part of: cacos (0x0.ffffffp0 + 0.0 i)":
  107416. +float: 1
  107417. +ifloat: 1
  107418. +Test "Real part of: cacos (0x0.ffffffp0 + 0x1.fp-129 i)":
  107419. +float: 1
  107420. +ifloat: 1
  107421. +Test "Real part of: cacos (0x0.ffffffp0 + 0x1p-23 i)":
  107422. +float: 2
  107423. +ifloat: 2
  107424. +Test "Imaginary part of: cacos (0x0.ffffffp0 + 0x1p-23 i)":
  107425. +float: 2
  107426. +ifloat: 2
  107427. +Test "Real part of: cacos (0x0.ffffffp0 - 0.0 i)":
  107428. +float: 1
  107429. +ifloat: 1
  107430. +Test "Real part of: cacos (0x0.ffffffp0 - 0x1.fp-129 i)":
  107431. +float: 1
  107432. +ifloat: 1
  107433. +Test "Real part of: cacos (0x0.ffffffp0 - 0x1p-23 i)":
  107434. +float: 2
  107435. +ifloat: 2
  107436. +Test "Imaginary part of: cacos (0x0.ffffffp0 - 0x1p-23 i)":
  107437. +float: 2
  107438. +ifloat: 2
  107439. +Test "Real part of: cacos (0x1.0000000000001p0 + 0x1p-52 i)":
  107440. +double: 1
  107441. +idouble: 1
  107442. +Test "Real part of: cacos (0x1.0000000000001p0 - 0x1p-52 i)":
  107443. +double: 1
  107444. +idouble: 1
  107445. +Test "Real part of: cacos (0x1.000002p0 + 0x1p-23 i)":
  107446. +float: 2
  107447. +ifloat: 2
  107448. +Test "Imaginary part of: cacos (0x1.000002p0 + 0x1p-23 i)":
  107449. +float: 1
  107450. +ifloat: 1
  107451. +Test "Real part of: cacos (0x1.000002p0 - 0x1p-23 i)":
  107452. +float: 2
  107453. +ifloat: 2
  107454. +Test "Imaginary part of: cacos (0x1.000002p0 - 0x1p-23 i)":
  107455. +float: 1
  107456. +ifloat: 1
  107457. +Test "Imaginary part of: cacos (0x1.fp-10 + 1.0 i)":
  107458. +double: 1
  107459. +idouble: 1
  107460. +Test "Imaginary part of: cacos (0x1.fp-10 - 1.0 i)":
  107461. +double: 1
  107462. +idouble: 1
  107463. +Test "Imaginary part of: cacos (0x1.fp-100 + 1.0 i)":
  107464. +double: 1
  107465. +float: 1
  107466. +idouble: 1
  107467. +ifloat: 1
  107468. +Test "Imaginary part of: cacos (0x1.fp-100 - 1.0 i)":
  107469. +double: 1
  107470. +float: 1
  107471. +idouble: 1
  107472. +ifloat: 1
  107473. +Test "Imaginary part of: cacos (0x1.fp-1000 + 1.0 i)":
  107474. +double: 1
  107475. +idouble: 1
  107476. +Test "Imaginary part of: cacos (0x1.fp-1000 - 1.0 i)":
  107477. +double: 1
  107478. +idouble: 1
  107479. +Test "Imaginary part of: cacos (0x1.fp-1025 + 1.0 i)":
  107480. +double: 1
  107481. +idouble: 1
  107482. +Test "Imaginary part of: cacos (0x1.fp-1025 + 1.5 i)":
  107483. +double: 1
  107484. +idouble: 1
  107485. +Test "Imaginary part of: cacos (0x1.fp-1025 - 1.0 i)":
  107486. +double: 1
  107487. +idouble: 1
  107488. +Test "Imaginary part of: cacos (0x1.fp-1025 - 1.5 i)":
  107489. +double: 1
  107490. +idouble: 1
  107491. +Test "Imaginary part of: cacos (0x1.fp-129 + 0.5 i)":
  107492. +float: 1
  107493. +ifloat: 1
  107494. +Test "Imaginary part of: cacos (0x1.fp-129 + 1.0 i)":
  107495. +double: 1
  107496. +float: 1
  107497. +idouble: 1
  107498. +ifloat: 1
  107499. +Test "Imaginary part of: cacos (0x1.fp-129 + 1.5 i)":
  107500. +double: 1
  107501. +idouble: 1
  107502. +Test "Imaginary part of: cacos (0x1.fp-129 - 0.5 i)":
  107503. +float: 1
  107504. +ifloat: 1
  107505. +Test "Imaginary part of: cacos (0x1.fp-129 - 1.0 i)":
  107506. +double: 1
  107507. +float: 1
  107508. +idouble: 1
  107509. +ifloat: 1
  107510. +Test "Imaginary part of: cacos (0x1.fp-129 - 1.5 i)":
  107511. +double: 1
  107512. +idouble: 1
  107513. +Test "Imaginary part of: cacos (0x1.fp-30 + 1.0 i)":
  107514. +double: 1
  107515. +float: 1
  107516. +idouble: 1
  107517. +ifloat: 1
  107518. +Test "Imaginary part of: cacos (0x1.fp-30 - 1.0 i)":
  107519. +double: 1
  107520. +float: 1
  107521. +idouble: 1
  107522. +ifloat: 1
  107523. +Test "Imaginary part of: cacos (0x1.fp1023 + 0x1.fp1023 i)":
  107524. +double: 1
  107525. +idouble: 1
  107526. +Test "Imaginary part of: cacos (0x1.fp127 + 0x1.fp127 i)":
  107527. +double: 1
  107528. +idouble: 1
  107529. +Test "Imaginary part of: cacos (0x1p-105 + 0.5 i)":
  107530. +float: 1
  107531. +ifloat: 1
  107532. +Test "Imaginary part of: cacos (0x1p-105 - 0.5 i)":
  107533. +float: 1
  107534. +ifloat: 1
  107535. +Test "Imaginary part of: cacos (0x1p-112 + 0.5 i)":
  107536. +float: 1
  107537. +ifloat: 1
  107538. +Test "Imaginary part of: cacos (0x1p-112 - 0.5 i)":
  107539. +float: 1
  107540. +ifloat: 1
  107541. +Test "Imaginary part of: cacos (0x1p-23 + 0.5 i)":
  107542. +float: 1
  107543. +ifloat: 1
  107544. +Test "Imaginary part of: cacos (0x1p-23 + 0x0.ffffffp0 i)":
  107545. +double: 1
  107546. +idouble: 1
  107547. +Test "Imaginary part of: cacos (0x1p-23 - 0.5 i)":
  107548. +float: 1
  107549. +ifloat: 1
  107550. +Test "Imaginary part of: cacos (0x1p-23 - 0x0.ffffffp0 i)":
  107551. +double: 1
  107552. +idouble: 1
  107553. +Test "Imaginary part of: cacos (0x1p-52 + 0.5 i)":
  107554. +float: 1
  107555. +ifloat: 1
  107556. +Test "Imaginary part of: cacos (0x1p-52 - 0.5 i)":
  107557. +float: 1
  107558. +ifloat: 1
  107559. +Test "Imaginary part of: cacos (0x1p-63 + 0.5 i)":
  107560. +float: 1
  107561. +ifloat: 1
  107562. +Test "Imaginary part of: cacos (0x1p-63 - 0.5 i)":
  107563. +float: 1
  107564. +ifloat: 1
  107565. +Test "Real part of: cacos (1.0 + 0.25 i)":
  107566. +double: 1
  107567. +idouble: 1
  107568. +Test "Real part of: cacos (1.0 + 0.5 i)":
  107569. +float: 1
  107570. +ifloat: 1
  107571. +Test "Imaginary part of: cacos (1.0 + 0.5 i)":
  107572. +float: 1
  107573. +ifloat: 1
  107574. +Test "Real part of: cacos (1.0 + 0x1.fp-10 i)":
  107575. +float: 2
  107576. +ifloat: 2
  107577. +Test "Imaginary part of: cacos (1.0 + 0x1.fp-10 i)":
  107578. +float: 1
  107579. +ifloat: 1
  107580. +Test "Real part of: cacos (1.0 - 0.25 i)":
  107581. +double: 1
  107582. +idouble: 1
  107583. +Test "Real part of: cacos (1.0 - 0.5 i)":
  107584. +float: 1
  107585. +ifloat: 1
  107586. +Test "Imaginary part of: cacos (1.0 - 0.5 i)":
  107587. +float: 1
  107588. +ifloat: 1
  107589. +Test "Real part of: cacos (1.0 - 0x1.fp-10 i)":
  107590. +float: 2
  107591. +ifloat: 2
  107592. +Test "Imaginary part of: cacos (1.0 - 0x1.fp-10 i)":
  107593. +float: 1
  107594. +ifloat: 1
  107595. +
  107596. +# cacosh
  107597. +Test "Real part of: cacosh (+0 + 0.5 i)":
  107598. +float: 1
  107599. +ifloat: 1
  107600. +Test "Real part of: cacosh (+0 + 1.0 i)":
  107601. +double: 1
  107602. +float: 1
  107603. +idouble: 1
  107604. +ifloat: 1
  107605. +Test "Real part of: cacosh (+0 + 1.5 i)":
  107606. +double: 1
  107607. +idouble: 1
  107608. +Test "Real part of: cacosh (+0 - 0.5 i)":
  107609. +float: 1
  107610. +ifloat: 1
  107611. +Test "Real part of: cacosh (+0 - 1.0 i)":
  107612. +double: 1
  107613. +float: 1
  107614. +idouble: 1
  107615. +ifloat: 1
  107616. +Test "Real part of: cacosh (+0 - 1.5 i)":
  107617. +double: 1
  107618. +idouble: 1
  107619. +Test "Real part of: cacosh (-0 + 0.5 i)":
  107620. +float: 1
  107621. +ifloat: 1
  107622. +Test "Real part of: cacosh (-0 + 1.0 i)":
  107623. +double: 1
  107624. +float: 1
  107625. +idouble: 1
  107626. +ifloat: 1
  107627. +Test "Real part of: cacosh (-0 + 1.5 i)":
  107628. +double: 1
  107629. +idouble: 1
  107630. +Test "Real part of: cacosh (-0 - 0.5 i)":
  107631. +float: 1
  107632. +ifloat: 1
  107633. +Test "Real part of: cacosh (-0 - 1.0 i)":
  107634. +double: 1
  107635. +float: 1
  107636. +idouble: 1
  107637. +ifloat: 1
  107638. +Test "Real part of: cacosh (-0 - 1.5 i)":
  107639. +double: 1
  107640. +idouble: 1
  107641. +Test "Real part of: cacosh (-0.25 + 1.0 i)":
  107642. +float: 1
  107643. +ifloat: 1
  107644. +Test "Imaginary part of: cacosh (-0.25 + 1.0 i)":
  107645. +double: 1
  107646. +float: 1
  107647. +idouble: 1
  107648. +ifloat: 1
  107649. +Test "Real part of: cacosh (-0.25 - 1.0 i)":
  107650. +float: 1
  107651. +ifloat: 1
  107652. +Test "Imaginary part of: cacosh (-0.25 - 1.0 i)":
  107653. +double: 1
  107654. +float: 1
  107655. +idouble: 1
  107656. +ifloat: 1
  107657. +Test "Real part of: cacosh (-0.5 + 0x1.fp-129 i)":
  107658. +double: 1
  107659. +idouble: 1
  107660. +Test "Real part of: cacosh (-0.5 + 0x1p-105 i)":
  107661. +double: 1
  107662. +idouble: 1
  107663. +Test "Real part of: cacosh (-0.5 + 0x1p-112 i)":
  107664. +double: 1
  107665. +idouble: 1
  107666. +Test "Real part of: cacosh (-0.5 + 0x1p-23 i)":
  107667. +double: 1
  107668. +idouble: 1
  107669. +Test "Real part of: cacosh (-0.5 + 1.0 i)":
  107670. +double: 1
  107671. +idouble: 1
  107672. +Test "Imaginary part of: cacosh (-0.5 + 1.0 i)":
  107673. +float: 1
  107674. +ifloat: 1
  107675. +Test "Real part of: cacosh (-0.5 - 0x1.fp-129 i)":
  107676. +double: 1
  107677. +idouble: 1
  107678. +Test "Real part of: cacosh (-0.5 - 0x1p-105 i)":
  107679. +double: 1
  107680. +idouble: 1
  107681. +Test "Real part of: cacosh (-0.5 - 0x1p-112 i)":
  107682. +double: 1
  107683. +idouble: 1
  107684. +Test "Real part of: cacosh (-0.5 - 0x1p-23 i)":
  107685. +double: 1
  107686. +idouble: 1
  107687. +Test "Real part of: cacosh (-0.5 - 1.0 i)":
  107688. +double: 1
  107689. +idouble: 1
  107690. +Test "Imaginary part of: cacosh (-0.5 - 1.0 i)":
  107691. +float: 1
  107692. +ifloat: 1
  107693. +Test "Real part of: cacosh (-0x0.fffffffffffff8p0 + 0x1p-52 i)":
  107694. +double: 1
  107695. +idouble: 1
  107696. +Test "Real part of: cacosh (-0x0.fffffffffffff8p0 - 0x1p-52 i)":
  107697. +double: 1
  107698. +idouble: 1
  107699. +Test "Real part of: cacosh (-0x0.ffffffp0 + 0x1p-23 i)":
  107700. +float: 2
  107701. +ifloat: 2
  107702. +Test "Real part of: cacosh (-0x0.ffffffp0 - 0x1p-23 i)":
  107703. +float: 2
  107704. +ifloat: 2
  107705. +Test "Real part of: cacosh (-0x1.000002p0 + 0x1p-23 i)":
  107706. +float: 1
  107707. +ifloat: 1
  107708. +Test "Real part of: cacosh (-0x1.000002p0 - 0x1p-23 i)":
  107709. +float: 1
  107710. +ifloat: 1
  107711. +Test "Real part of: cacosh (-0x1.fp-10 + 1.0 i)":
  107712. +double: 1
  107713. +idouble: 1
  107714. +Test "Real part of: cacosh (-0x1.fp-10 - 1.0 i)":
  107715. +double: 1
  107716. +idouble: 1
  107717. +Test "Real part of: cacosh (-0x1.fp-100 + 1.0 i)":
  107718. +double: 1
  107719. +float: 1
  107720. +idouble: 1
  107721. +ifloat: 1
  107722. +Test "Imaginary part of: cacosh (-0x1.fp-100 + 1.0 i)":
  107723. +float: 1
  107724. +ifloat: 1
  107725. +Test "Real part of: cacosh (-0x1.fp-100 - 1.0 i)":
  107726. +double: 1
  107727. +float: 1
  107728. +idouble: 1
  107729. +ifloat: 1
  107730. +Test "Imaginary part of: cacosh (-0x1.fp-100 - 1.0 i)":
  107731. +float: 1
  107732. +ifloat: 1
  107733. +Test "Real part of: cacosh (-0x1.fp-1000 + 1.0 i)":
  107734. +double: 1
  107735. +idouble: 1
  107736. +Test "Real part of: cacosh (-0x1.fp-1000 - 1.0 i)":
  107737. +double: 1
  107738. +idouble: 1
  107739. +Test "Real part of: cacosh (-0x1.fp-1025 + 1.0 i)":
  107740. +double: 1
  107741. +idouble: 1
  107742. +Test "Real part of: cacosh (-0x1.fp-1025 + 1.5 i)":
  107743. +double: 1
  107744. +idouble: 1
  107745. +Test "Real part of: cacosh (-0x1.fp-1025 - 1.0 i)":
  107746. +double: 1
  107747. +idouble: 1
  107748. +Test "Real part of: cacosh (-0x1.fp-1025 - 1.5 i)":
  107749. +double: 1
  107750. +idouble: 1
  107751. +Test "Real part of: cacosh (-0x1.fp-129 + 0.5 i)":
  107752. +float: 1
  107753. +ifloat: 1
  107754. +Test "Imaginary part of: cacosh (-0x1.fp-129 + 0.5 i)":
  107755. +float: 1
  107756. +ifloat: 1
  107757. +Test "Imaginary part of: cacosh (-0x1.fp-129 + 0x0.ffffffp0 i)":
  107758. +float: 1
  107759. +ifloat: 1
  107760. +Test "Imaginary part of: cacosh (-0x1.fp-129 + 0x1.000002p0 i)":
  107761. +float: 1
  107762. +ifloat: 1
  107763. +Test "Imaginary part of: cacosh (-0x1.fp-129 + 0x1.fp-129 i)":
  107764. +float: 1
  107765. +ifloat: 1
  107766. +Test "Imaginary part of: cacosh (-0x1.fp-129 + 0x1p-23 i)":
  107767. +float: 1
  107768. +ifloat: 1
  107769. +Test "Real part of: cacosh (-0x1.fp-129 + 1.0 i)":
  107770. +double: 1
  107771. +float: 1
  107772. +idouble: 1
  107773. +ifloat: 1
  107774. +Test "Imaginary part of: cacosh (-0x1.fp-129 + 1.0 i)":
  107775. +float: 1
  107776. +ifloat: 1
  107777. +Test "Real part of: cacosh (-0x1.fp-129 + 1.5 i)":
  107778. +double: 1
  107779. +idouble: 1
  107780. +Test "Imaginary part of: cacosh (-0x1.fp-129 + 1.5 i)":
  107781. +float: 1
  107782. +ifloat: 1
  107783. +Test "Real part of: cacosh (-0x1.fp-129 - 0.5 i)":
  107784. +float: 1
  107785. +ifloat: 1
  107786. +Test "Imaginary part of: cacosh (-0x1.fp-129 - 0.5 i)":
  107787. +float: 1
  107788. +ifloat: 1
  107789. +Test "Imaginary part of: cacosh (-0x1.fp-129 - 0x0.ffffffp0 i)":
  107790. +float: 1
  107791. +ifloat: 1
  107792. +Test "Imaginary part of: cacosh (-0x1.fp-129 - 0x1.000002p0 i)":
  107793. +float: 1
  107794. +ifloat: 1
  107795. +Test "Imaginary part of: cacosh (-0x1.fp-129 - 0x1.fp-129 i)":
  107796. +float: 1
  107797. +ifloat: 1
  107798. +Test "Imaginary part of: cacosh (-0x1.fp-129 - 0x1p-23 i)":
  107799. +float: 1
  107800. +ifloat: 1
  107801. +Test "Real part of: cacosh (-0x1.fp-129 - 1.0 i)":
  107802. +double: 1
  107803. +float: 1
  107804. +idouble: 1
  107805. +ifloat: 1
  107806. +Test "Imaginary part of: cacosh (-0x1.fp-129 - 1.0 i)":
  107807. +float: 1
  107808. +ifloat: 1
  107809. +Test "Real part of: cacosh (-0x1.fp-129 - 1.5 i)":
  107810. +double: 1
  107811. +idouble: 1
  107812. +Test "Imaginary part of: cacosh (-0x1.fp-129 - 1.5 i)":
  107813. +float: 1
  107814. +ifloat: 1
  107815. +Test "Real part of: cacosh (-0x1.fp-30 + 1.0 i)":
  107816. +double: 1
  107817. +float: 1
  107818. +idouble: 1
  107819. +ifloat: 1
  107820. +Test "Imaginary part of: cacosh (-0x1.fp-30 + 1.0 i)":
  107821. +float: 1
  107822. +ifloat: 1
  107823. +Test "Real part of: cacosh (-0x1.fp-30 - 1.0 i)":
  107824. +double: 1
  107825. +float: 1
  107826. +idouble: 1
  107827. +ifloat: 1
  107828. +Test "Imaginary part of: cacosh (-0x1.fp-30 - 1.0 i)":
  107829. +float: 1
  107830. +ifloat: 1
  107831. +Test "Imaginary part of: cacosh (-0x1p-105 + 0.0 i)":
  107832. +float: 1
  107833. +ifloat: 1
  107834. +Test "Real part of: cacosh (-0x1p-105 + 0.5 i)":
  107835. +float: 1
  107836. +ifloat: 1
  107837. +Test "Imaginary part of: cacosh (-0x1p-105 + 0.5 i)":
  107838. +float: 1
  107839. +ifloat: 1
  107840. +Test "Imaginary part of: cacosh (-0x1p-105 + 0x1p-105 i)":
  107841. +float: 1
  107842. +ifloat: 1
  107843. +Test "Imaginary part of: cacosh (-0x1p-105 - 0.0 i)":
  107844. +float: 1
  107845. +ifloat: 1
  107846. +Test "Real part of: cacosh (-0x1p-105 - 0.5 i)":
  107847. +float: 1
  107848. +ifloat: 1
  107849. +Test "Imaginary part of: cacosh (-0x1p-105 - 0.5 i)":
  107850. +float: 1
  107851. +ifloat: 1
  107852. +Test "Imaginary part of: cacosh (-0x1p-105 - 0x1p-105 i)":
  107853. +float: 1
  107854. +ifloat: 1
  107855. +Test "Imaginary part of: cacosh (-0x1p-112 + 0.0 i)":
  107856. +float: 1
  107857. +ifloat: 1
  107858. +Test "Real part of: cacosh (-0x1p-112 + 0.5 i)":
  107859. +float: 1
  107860. +ifloat: 1
  107861. +Test "Imaginary part of: cacosh (-0x1p-112 + 0.5 i)":
  107862. +float: 1
  107863. +ifloat: 1
  107864. +Test "Imaginary part of: cacosh (-0x1p-112 + 0x1p-112 i)":
  107865. +float: 1
  107866. +ifloat: 1
  107867. +Test "Imaginary part of: cacosh (-0x1p-112 - 0.0 i)":
  107868. +float: 1
  107869. +ifloat: 1
  107870. +Test "Real part of: cacosh (-0x1p-112 - 0.5 i)":
  107871. +float: 1
  107872. +ifloat: 1
  107873. +Test "Imaginary part of: cacosh (-0x1p-112 - 0.5 i)":
  107874. +float: 1
  107875. +ifloat: 1
  107876. +Test "Imaginary part of: cacosh (-0x1p-112 - 0x1p-112 i)":
  107877. +float: 1
  107878. +ifloat: 1
  107879. +Test "Imaginary part of: cacosh (-0x1p-23 + 0.0 i)":
  107880. +float: 1
  107881. +ifloat: 1
  107882. +Test "Real part of: cacosh (-0x1p-23 + 0.5 i)":
  107883. +float: 1
  107884. +ifloat: 1
  107885. +Test "Imaginary part of: cacosh (-0x1p-23 + 0.5 i)":
  107886. +float: 1
  107887. +ifloat: 1
  107888. +Test "Real part of: cacosh (-0x1p-23 + 0x0.ffffffp0 i)":
  107889. +double: 1
  107890. +idouble: 1
  107891. +Test "Imaginary part of: cacosh (-0x1p-23 + 0x1.fp-129 i)":
  107892. +float: 1
  107893. +ifloat: 1
  107894. +Test "Imaginary part of: cacosh (-0x1p-23 + 0x1p-23 i)":
  107895. +float: 1
  107896. +ifloat: 1
  107897. +Test "Imaginary part of: cacosh (-0x1p-23 - 0.0 i)":
  107898. +float: 1
  107899. +ifloat: 1
  107900. +Test "Real part of: cacosh (-0x1p-23 - 0.5 i)":
  107901. +float: 1
  107902. +ifloat: 1
  107903. +Test "Imaginary part of: cacosh (-0x1p-23 - 0.5 i)":
  107904. +float: 1
  107905. +ifloat: 1
  107906. +Test "Real part of: cacosh (-0x1p-23 - 0x0.ffffffp0 i)":
  107907. +double: 1
  107908. +idouble: 1
  107909. +Test "Imaginary part of: cacosh (-0x1p-23 - 0x1.fp-129 i)":
  107910. +float: 1
  107911. +ifloat: 1
  107912. +Test "Imaginary part of: cacosh (-0x1p-23 - 0x1p-23 i)":
  107913. +float: 1
  107914. +ifloat: 1
  107915. +Test "Imaginary part of: cacosh (-0x1p-52 + 0.0 i)":
  107916. +float: 1
  107917. +ifloat: 1
  107918. +Test "Real part of: cacosh (-0x1p-52 + 0.5 i)":
  107919. +float: 1
  107920. +ifloat: 1
  107921. +Test "Imaginary part of: cacosh (-0x1p-52 + 0.5 i)":
  107922. +float: 1
  107923. +ifloat: 1
  107924. +Test "Imaginary part of: cacosh (-0x1p-52 + 0x1p-52 i)":
  107925. +float: 1
  107926. +ifloat: 1
  107927. +Test "Imaginary part of: cacosh (-0x1p-52 - 0.0 i)":
  107928. +float: 1
  107929. +ifloat: 1
  107930. +Test "Real part of: cacosh (-0x1p-52 - 0.5 i)":
  107931. +float: 1
  107932. +ifloat: 1
  107933. +Test "Imaginary part of: cacosh (-0x1p-52 - 0.5 i)":
  107934. +float: 1
  107935. +ifloat: 1
  107936. +Test "Imaginary part of: cacosh (-0x1p-52 - 0x1p-52 i)":
  107937. +float: 1
  107938. +ifloat: 1
  107939. +Test "Imaginary part of: cacosh (-0x1p-63 + 0.0 i)":
  107940. +float: 1
  107941. +ifloat: 1
  107942. +Test "Real part of: cacosh (-0x1p-63 + 0.5 i)":
  107943. +float: 1
  107944. +ifloat: 1
  107945. +Test "Imaginary part of: cacosh (-0x1p-63 + 0.5 i)":
  107946. +float: 1
  107947. +ifloat: 1
  107948. +Test "Imaginary part of: cacosh (-0x1p-63 + 0x1p-63 i)":
  107949. +float: 1
  107950. +ifloat: 1
  107951. +Test "Imaginary part of: cacosh (-0x1p-63 - 0.0 i)":
  107952. +float: 1
  107953. +ifloat: 1
  107954. +Test "Real part of: cacosh (-0x1p-63 - 0.5 i)":
  107955. +float: 1
  107956. +ifloat: 1
  107957. +Test "Imaginary part of: cacosh (-0x1p-63 - 0.5 i)":
  107958. +float: 1
  107959. +ifloat: 1
  107960. +Test "Imaginary part of: cacosh (-0x1p-63 - 0x1p-63 i)":
  107961. +float: 1
  107962. +ifloat: 1
  107963. +Test "Real part of: cacosh (-1.0 + 0.5 i)":
  107964. +float: 1
  107965. +ifloat: 1
  107966. +Test "Real part of: cacosh (-1.0 + 0x1.fp-10 i)":
  107967. +float: 1
  107968. +ifloat: 1
  107969. +Test "Imaginary part of: cacosh (-1.0 + 0x1p50 i)":
  107970. +float: 1
  107971. +ifloat: 1
  107972. +Test "Real part of: cacosh (-1.0 - 0.5 i)":
  107973. +float: 1
  107974. +ifloat: 1
  107975. +Test "Real part of: cacosh (-1.0 - 0x1.fp-10 i)":
  107976. +float: 1
  107977. +ifloat: 1
  107978. +Test "Imaginary part of: cacosh (-1.0 - 0x1p50 i)":
  107979. +float: 1
  107980. +ifloat: 1
  107981. +Test "Imaginary part of: cacosh (-2 - 3 i)":
  107982. +float: 1
  107983. +ifloat: 1
  107984. +Test "Real part of: cacosh (0.25 + 1.0 i)":
  107985. +float: 1
  107986. +ifloat: 1
  107987. +Test "Real part of: cacosh (0.25 - 1.0 i)":
  107988. +float: 1
  107989. +ifloat: 1
  107990. +Test "Imaginary part of: cacosh (0.5 + +0 i)":
  107991. +double: 1
  107992. +idouble: 1
  107993. +Test "Imaginary part of: cacosh (0.5 + 0x1.fp-1025 i)":
  107994. +double: 1
  107995. +idouble: 1
  107996. +Test "Real part of: cacosh (0.5 + 0x1.fp-129 i)":
  107997. +double: 1
  107998. +idouble: 1
  107999. +Test "Imaginary part of: cacosh (0.5 + 0x1.fp-129 i)":
  108000. +double: 1
  108001. +idouble: 1
  108002. +Test "Real part of: cacosh (0.5 + 0x1p-105 i)":
  108003. +double: 1
  108004. +idouble: 1
  108005. +Test "Imaginary part of: cacosh (0.5 + 0x1p-105 i)":
  108006. +double: 1
  108007. +idouble: 1
  108008. +Test "Real part of: cacosh (0.5 + 0x1p-112 i)":
  108009. +double: 1
  108010. +idouble: 1
  108011. +Test "Imaginary part of: cacosh (0.5 + 0x1p-112 i)":
  108012. +double: 1
  108013. +idouble: 1
  108014. +Test "Real part of: cacosh (0.5 + 0x1p-23 i)":
  108015. +double: 1
  108016. +idouble: 1
  108017. +Test "Imaginary part of: cacosh (0.5 + 0x1p-52 i)":
  108018. +double: 1
  108019. +idouble: 1
  108020. +Test "Imaginary part of: cacosh (0.5 + 0x1p-63 i)":
  108021. +double: 1
  108022. +idouble: 1
  108023. +Test "Real part of: cacosh (0.5 + 1.0 i)":
  108024. +double: 1
  108025. +idouble: 1
  108026. +Test "Imaginary part of: cacosh (0.5 + 1.0 i)":
  108027. +float: 1
  108028. +ifloat: 1
  108029. +Test "Imaginary part of: cacosh (0.5 - 0 i)":
  108030. +double: 1
  108031. +idouble: 1
  108032. +Test "Imaginary part of: cacosh (0.5 - 0x1.fp-1025 i)":
  108033. +double: 1
  108034. +idouble: 1
  108035. +Test "Real part of: cacosh (0.5 - 0x1.fp-129 i)":
  108036. +double: 1
  108037. +idouble: 1
  108038. +Test "Imaginary part of: cacosh (0.5 - 0x1.fp-129 i)":
  108039. +double: 1
  108040. +idouble: 1
  108041. +Test "Real part of: cacosh (0.5 - 0x1p-105 i)":
  108042. +double: 1
  108043. +idouble: 1
  108044. +Test "Imaginary part of: cacosh (0.5 - 0x1p-105 i)":
  108045. +double: 1
  108046. +idouble: 1
  108047. +Test "Real part of: cacosh (0.5 - 0x1p-112 i)":
  108048. +double: 1
  108049. +idouble: 1
  108050. +Test "Imaginary part of: cacosh (0.5 - 0x1p-112 i)":
  108051. +double: 1
  108052. +idouble: 1
  108053. +Test "Real part of: cacosh (0.5 - 0x1p-23 i)":
  108054. +double: 1
  108055. +idouble: 1
  108056. +Test "Imaginary part of: cacosh (0.5 - 0x1p-52 i)":
  108057. +double: 1
  108058. +idouble: 1
  108059. +Test "Imaginary part of: cacosh (0.5 - 0x1p-63 i)":
  108060. +double: 1
  108061. +idouble: 1
  108062. +Test "Real part of: cacosh (0.5 - 1.0 i)":
  108063. +double: 1
  108064. +idouble: 1
  108065. +Test "Imaginary part of: cacosh (0.5 - 1.0 i)":
  108066. +float: 1
  108067. +ifloat: 1
  108068. +Test "Real part of: cacosh (0x0.fffffffffffff8p0 + 0x1p-52 i)":
  108069. +double: 1
  108070. +idouble: 1
  108071. +Test "Real part of: cacosh (0x0.fffffffffffff8p0 - 0x1p-52 i)":
  108072. +double: 1
  108073. +idouble: 1
  108074. +Test "Imaginary part of: cacosh (0x0.ffffffp0 + 0.0 i)":
  108075. +float: 1
  108076. +ifloat: 1
  108077. +Test "Imaginary part of: cacosh (0x0.ffffffp0 + 0x1.fp-129 i)":
  108078. +float: 1
  108079. +ifloat: 1
  108080. +Test "Real part of: cacosh (0x0.ffffffp0 + 0x1p-23 i)":
  108081. +float: 2
  108082. +ifloat: 2
  108083. +Test "Imaginary part of: cacosh (0x0.ffffffp0 + 0x1p-23 i)":
  108084. +float: 2
  108085. +ifloat: 2
  108086. +Test "Imaginary part of: cacosh (0x0.ffffffp0 - 0.0 i)":
  108087. +float: 1
  108088. +ifloat: 1
  108089. +Test "Imaginary part of: cacosh (0x0.ffffffp0 - 0x1.fp-129 i)":
  108090. +float: 1
  108091. +ifloat: 1
  108092. +Test "Real part of: cacosh (0x0.ffffffp0 - 0x1p-23 i)":
  108093. +float: 2
  108094. +ifloat: 2
  108095. +Test "Imaginary part of: cacosh (0x0.ffffffp0 - 0x1p-23 i)":
  108096. +float: 2
  108097. +ifloat: 2
  108098. +Test "Imaginary part of: cacosh (0x1.0000000000001p0 + 0x1p-52 i)":
  108099. +double: 1
  108100. +idouble: 1
  108101. +Test "Imaginary part of: cacosh (0x1.0000000000001p0 - 0x1p-52 i)":
  108102. +double: 1
  108103. +idouble: 1
  108104. +Test "Real part of: cacosh (0x1.000002p0 + 0x1p-23 i)":
  108105. +float: 1
  108106. +ifloat: 1
  108107. +Test "Imaginary part of: cacosh (0x1.000002p0 + 0x1p-23 i)":
  108108. +float: 2
  108109. +ifloat: 2
  108110. +Test "Real part of: cacosh (0x1.000002p0 - 0x1p-23 i)":
  108111. +float: 1
  108112. +ifloat: 1
  108113. +Test "Imaginary part of: cacosh (0x1.000002p0 - 0x1p-23 i)":
  108114. +float: 2
  108115. +ifloat: 2
  108116. +Test "Real part of: cacosh (0x1.fp-10 + 1.0 i)":
  108117. +double: 1
  108118. +idouble: 1
  108119. +Test "Real part of: cacosh (0x1.fp-10 - 1.0 i)":
  108120. +double: 1
  108121. +idouble: 1
  108122. +Test "Real part of: cacosh (0x1.fp-100 + 1.0 i)":
  108123. +double: 1
  108124. +float: 1
  108125. +idouble: 1
  108126. +ifloat: 1
  108127. +Test "Real part of: cacosh (0x1.fp-100 - 1.0 i)":
  108128. +double: 1
  108129. +float: 1
  108130. +idouble: 1
  108131. +ifloat: 1
  108132. +Test "Real part of: cacosh (0x1.fp-1000 + 1.0 i)":
  108133. +double: 1
  108134. +idouble: 1
  108135. +Test "Real part of: cacosh (0x1.fp-1000 - 1.0 i)":
  108136. +double: 1
  108137. +idouble: 1
  108138. +Test "Real part of: cacosh (0x1.fp-1025 + 1.0 i)":
  108139. +double: 1
  108140. +idouble: 1
  108141. +Test "Real part of: cacosh (0x1.fp-1025 + 1.5 i)":
  108142. +double: 1
  108143. +idouble: 1
  108144. +Test "Real part of: cacosh (0x1.fp-1025 - 1.0 i)":
  108145. +double: 1
  108146. +idouble: 1
  108147. +Test "Real part of: cacosh (0x1.fp-1025 - 1.5 i)":
  108148. +double: 1
  108149. +idouble: 1
  108150. +Test "Real part of: cacosh (0x1.fp-129 + 0.5 i)":
  108151. +float: 1
  108152. +ifloat: 1
  108153. +Test "Real part of: cacosh (0x1.fp-129 + 1.0 i)":
  108154. +double: 1
  108155. +float: 1
  108156. +idouble: 1
  108157. +ifloat: 1
  108158. +Test "Real part of: cacosh (0x1.fp-129 + 1.5 i)":
  108159. +double: 1
  108160. +idouble: 1
  108161. +Test "Real part of: cacosh (0x1.fp-129 - 0.5 i)":
  108162. +float: 1
  108163. +ifloat: 1
  108164. +Test "Real part of: cacosh (0x1.fp-129 - 1.0 i)":
  108165. +double: 1
  108166. +float: 1
  108167. +idouble: 1
  108168. +ifloat: 1
  108169. +Test "Real part of: cacosh (0x1.fp-129 - 1.5 i)":
  108170. +double: 1
  108171. +idouble: 1
  108172. +Test "Real part of: cacosh (0x1.fp-30 + 1.0 i)":
  108173. +double: 1
  108174. +float: 1
  108175. +idouble: 1
  108176. +ifloat: 1
  108177. +Test "Real part of: cacosh (0x1.fp-30 - 1.0 i)":
  108178. +double: 1
  108179. +float: 1
  108180. +idouble: 1
  108181. +ifloat: 1
  108182. +Test "Real part of: cacosh (0x1.fp1023 + 0x1.fp1023 i)":
  108183. +double: 1
  108184. +idouble: 1
  108185. +Test "Real part of: cacosh (0x1.fp127 + 0x1.fp127 i)":
  108186. +double: 1
  108187. +idouble: 1
  108188. +Test "Real part of: cacosh (0x1p-105 + 0.5 i)":
  108189. +float: 1
  108190. +ifloat: 1
  108191. +Test "Real part of: cacosh (0x1p-105 - 0.5 i)":
  108192. +float: 1
  108193. +ifloat: 1
  108194. +Test "Real part of: cacosh (0x1p-112 + 0.5 i)":
  108195. +float: 1
  108196. +ifloat: 1
  108197. +Test "Real part of: cacosh (0x1p-112 - 0.5 i)":
  108198. +float: 1
  108199. +ifloat: 1
  108200. +Test "Real part of: cacosh (0x1p-23 + 0.5 i)":
  108201. +float: 1
  108202. +ifloat: 1
  108203. +Test "Real part of: cacosh (0x1p-23 + 0x0.ffffffp0 i)":
  108204. +double: 1
  108205. +idouble: 1
  108206. +Test "Real part of: cacosh (0x1p-23 - 0.5 i)":
  108207. +float: 1
  108208. +ifloat: 1
  108209. +Test "Real part of: cacosh (0x1p-23 - 0x0.ffffffp0 i)":
  108210. +double: 1
  108211. +idouble: 1
  108212. +Test "Real part of: cacosh (0x1p-52 + 0.5 i)":
  108213. +float: 1
  108214. +ifloat: 1
  108215. +Test "Real part of: cacosh (0x1p-52 - 0.5 i)":
  108216. +float: 1
  108217. +ifloat: 1
  108218. +Test "Real part of: cacosh (0x1p-63 + 0.5 i)":
  108219. +float: 1
  108220. +ifloat: 1
  108221. +Test "Real part of: cacosh (0x1p-63 - 0.5 i)":
  108222. +float: 1
  108223. +ifloat: 1
  108224. +Test "Imaginary part of: cacosh (1.0 + 0.25 i)":
  108225. +double: 1
  108226. +idouble: 1
  108227. +Test "Real part of: cacosh (1.0 + 0.5 i)":
  108228. +float: 1
  108229. +ifloat: 1
  108230. +Test "Imaginary part of: cacosh (1.0 + 0.5 i)":
  108231. +float: 1
  108232. +ifloat: 1
  108233. +Test "Real part of: cacosh (1.0 + 0x1.fp-10 i)":
  108234. +float: 1
  108235. +ifloat: 1
  108236. +Test "Imaginary part of: cacosh (1.0 + 0x1.fp-10 i)":
  108237. +float: 2
  108238. +ifloat: 2
  108239. +Test "Imaginary part of: cacosh (1.0 - 0.25 i)":
  108240. +double: 1
  108241. +idouble: 1
  108242. +Test "Real part of: cacosh (1.0 - 0.5 i)":
  108243. +float: 1
  108244. +ifloat: 1
  108245. +Test "Imaginary part of: cacosh (1.0 - 0.5 i)":
  108246. +float: 1
  108247. +ifloat: 1
  108248. +Test "Real part of: cacosh (1.0 - 0x1.fp-10 i)":
  108249. +float: 1
  108250. +ifloat: 1
  108251. +Test "Imaginary part of: cacosh (1.0 - 0x1.fp-10 i)":
  108252. +float: 2
  108253. +ifloat: 2
  108254. +
  108255. +# casin
  108256. +Test "Imaginary part of: casin (+0 + 0.5 i)":
  108257. +float: 1
  108258. +ifloat: 1
  108259. +Test "Imaginary part of: casin (+0 + 1.0 i)":
  108260. +double: 1
  108261. +float: 1
  108262. +idouble: 1
  108263. +ifloat: 1
  108264. +Test "Imaginary part of: casin (+0 + 1.5 i)":
  108265. +double: 1
  108266. +idouble: 1
  108267. +Test "Imaginary part of: casin (+0 - 0.5 i)":
  108268. +float: 1
  108269. +ifloat: 1
  108270. +Test "Imaginary part of: casin (+0 - 1.0 i)":
  108271. +double: 1
  108272. +float: 1
  108273. +idouble: 1
  108274. +ifloat: 1
  108275. +Test "Imaginary part of: casin (+0 - 1.5 i)":
  108276. +double: 1
  108277. +idouble: 1
  108278. +Test "Imaginary part of: casin (-0 + 0.5 i)":
  108279. +float: 1
  108280. +ifloat: 1
  108281. +Test "Imaginary part of: casin (-0 + 1.0 i)":
  108282. +double: 1
  108283. +float: 1
  108284. +idouble: 1
  108285. +ifloat: 1
  108286. +Test "Imaginary part of: casin (-0 + 1.5 i)":
  108287. +double: 1
  108288. +idouble: 1
  108289. +Test "Imaginary part of: casin (-0 - 0.5 i)":
  108290. +float: 1
  108291. +ifloat: 1
  108292. +Test "Imaginary part of: casin (-0 - 1.0 i)":
  108293. +double: 1
  108294. +float: 1
  108295. +idouble: 1
  108296. +ifloat: 1
  108297. +Test "Imaginary part of: casin (-0 - 1.5 i)":
  108298. +double: 1
  108299. +idouble: 1
  108300. +Test "Imaginary part of: casin (-0.25 + 1.0 i)":
  108301. +float: 1
  108302. +ifloat: 1
  108303. +Test "Imaginary part of: casin (-0.25 - 1.0 i)":
  108304. +float: 1
  108305. +ifloat: 1
  108306. +Test "Imaginary part of: casin (-0.5 + 0x1.fp-129 i)":
  108307. +double: 1
  108308. +idouble: 1
  108309. +Test "Imaginary part of: casin (-0.5 + 0x1p-105 i)":
  108310. +double: 1
  108311. +idouble: 1
  108312. +Test "Imaginary part of: casin (-0.5 + 0x1p-112 i)":
  108313. +double: 1
  108314. +idouble: 1
  108315. +Test "Imaginary part of: casin (-0.5 + 0x1p-23 i)":
  108316. +double: 1
  108317. +idouble: 1
  108318. +Test "Imaginary part of: casin (-0.5 + 1.0 i)":
  108319. +double: 1
  108320. +idouble: 1
  108321. +Test "Imaginary part of: casin (-0.5 - 0x1.fp-129 i)":
  108322. +double: 1
  108323. +idouble: 1
  108324. +Test "Imaginary part of: casin (-0.5 - 0x1p-105 i)":
  108325. +double: 1
  108326. +idouble: 1
  108327. +Test "Imaginary part of: casin (-0.5 - 0x1p-112 i)":
  108328. +double: 1
  108329. +idouble: 1
  108330. +Test "Imaginary part of: casin (-0.5 - 0x1p-23 i)":
  108331. +double: 1
  108332. +idouble: 1
  108333. +Test "Imaginary part of: casin (-0.5 - 1.0 i)":
  108334. +double: 1
  108335. +idouble: 1
  108336. +Test "Imaginary part of: casin (-0x0.fffffffffffff8p0 + 0x1p-52 i)":
  108337. +double: 1
  108338. +idouble: 1
  108339. +Test "Imaginary part of: casin (-0x0.fffffffffffff8p0 - 0x1p-52 i)":
  108340. +double: 1
  108341. +idouble: 1
  108342. +Test "Imaginary part of: casin (-0x0.ffffffp0 + 0x1p-23 i)":
  108343. +float: 2
  108344. +ifloat: 2
  108345. +Test "Imaginary part of: casin (-0x0.ffffffp0 - 0x1p-23 i)":
  108346. +float: 2
  108347. +ifloat: 2
  108348. +Test "Imaginary part of: casin (-0x1.000002p0 + 0x1p-23 i)":
  108349. +float: 1
  108350. +ifloat: 1
  108351. +Test "Imaginary part of: casin (-0x1.000002p0 - 0x1p-23 i)":
  108352. +float: 1
  108353. +ifloat: 1
  108354. +Test "Real part of: casin (-0x1.fp-10 + 1.0 i)":
  108355. +float: 1
  108356. +ifloat: 1
  108357. +Test "Imaginary part of: casin (-0x1.fp-10 + 1.0 i)":
  108358. +double: 1
  108359. +idouble: 1
  108360. +Test "Real part of: casin (-0x1.fp-10 - 1.0 i)":
  108361. +float: 1
  108362. +ifloat: 1
  108363. +Test "Imaginary part of: casin (-0x1.fp-10 - 1.0 i)":
  108364. +double: 1
  108365. +idouble: 1
  108366. +Test "Imaginary part of: casin (-0x1.fp-100 + 1.0 i)":
  108367. +double: 1
  108368. +float: 1
  108369. +idouble: 1
  108370. +ifloat: 1
  108371. +Test "Imaginary part of: casin (-0x1.fp-100 - 1.0 i)":
  108372. +double: 1
  108373. +float: 1
  108374. +idouble: 1
  108375. +ifloat: 1
  108376. +Test "Imaginary part of: casin (-0x1.fp-1000 + 1.0 i)":
  108377. +double: 1
  108378. +idouble: 1
  108379. +Test "Imaginary part of: casin (-0x1.fp-1000 - 1.0 i)":
  108380. +double: 1
  108381. +idouble: 1
  108382. +Test "Imaginary part of: casin (-0x1.fp-1025 + 1.0 i)":
  108383. +double: 1
  108384. +idouble: 1
  108385. +Test "Imaginary part of: casin (-0x1.fp-1025 + 1.5 i)":
  108386. +double: 1
  108387. +idouble: 1
  108388. +Test "Imaginary part of: casin (-0x1.fp-1025 - 1.0 i)":
  108389. +double: 1
  108390. +idouble: 1
  108391. +Test "Imaginary part of: casin (-0x1.fp-1025 - 1.5 i)":
  108392. +double: 1
  108393. +idouble: 1
  108394. +Test "Imaginary part of: casin (-0x1.fp-129 + 0.5 i)":
  108395. +float: 1
  108396. +ifloat: 1
  108397. +Test "Imaginary part of: casin (-0x1.fp-129 + 1.0 i)":
  108398. +double: 1
  108399. +float: 1
  108400. +idouble: 1
  108401. +ifloat: 1
  108402. +Test "Imaginary part of: casin (-0x1.fp-129 + 1.5 i)":
  108403. +double: 1
  108404. +idouble: 1
  108405. +Test "Imaginary part of: casin (-0x1.fp-129 - 0.5 i)":
  108406. +float: 1
  108407. +ifloat: 1
  108408. +Test "Imaginary part of: casin (-0x1.fp-129 - 1.0 i)":
  108409. +double: 1
  108410. +float: 1
  108411. +idouble: 1
  108412. +ifloat: 1
  108413. +Test "Imaginary part of: casin (-0x1.fp-129 - 1.5 i)":
  108414. +double: 1
  108415. +idouble: 1
  108416. +Test "Imaginary part of: casin (-0x1.fp-30 + 1.0 i)":
  108417. +double: 1
  108418. +float: 1
  108419. +idouble: 1
  108420. +ifloat: 1
  108421. +Test "Imaginary part of: casin (-0x1.fp-30 - 1.0 i)":
  108422. +double: 1
  108423. +float: 1
  108424. +idouble: 1
  108425. +ifloat: 1
  108426. +Test "Imaginary part of: casin (-0x1p-105 + 0.5 i)":
  108427. +float: 1
  108428. +ifloat: 1
  108429. +Test "Imaginary part of: casin (-0x1p-105 - 0.5 i)":
  108430. +float: 1
  108431. +ifloat: 1
  108432. +Test "Imaginary part of: casin (-0x1p-112 + 0.5 i)":
  108433. +float: 1
  108434. +ifloat: 1
  108435. +Test "Imaginary part of: casin (-0x1p-112 - 0.5 i)":
  108436. +float: 1
  108437. +ifloat: 1
  108438. +Test "Real part of: casin (-0x1p-23 + 0.5 i)":
  108439. +double: 1
  108440. +float: 1
  108441. +idouble: 1
  108442. +ifloat: 1
  108443. +Test "Imaginary part of: casin (-0x1p-23 + 0.5 i)":
  108444. +float: 1
  108445. +ifloat: 1
  108446. +Test "Imaginary part of: casin (-0x1p-23 + 0x0.ffffffp0 i)":
  108447. +double: 1
  108448. +idouble: 1
  108449. +Test "Real part of: casin (-0x1p-23 + 0x1.000002p0 i)":
  108450. +double: 1
  108451. +float: 1
  108452. +idouble: 1
  108453. +ifloat: 1
  108454. +Test "Real part of: casin (-0x1p-23 - 0.5 i)":
  108455. +double: 1
  108456. +float: 1
  108457. +idouble: 1
  108458. +ifloat: 1
  108459. +Test "Imaginary part of: casin (-0x1p-23 - 0.5 i)":
  108460. +float: 1
  108461. +ifloat: 1
  108462. +Test "Imaginary part of: casin (-0x1p-23 - 0x0.ffffffp0 i)":
  108463. +double: 1
  108464. +idouble: 1
  108465. +Test "Real part of: casin (-0x1p-23 - 0x1.000002p0 i)":
  108466. +double: 1
  108467. +float: 1
  108468. +idouble: 1
  108469. +ifloat: 1
  108470. +Test "Imaginary part of: casin (-0x1p-52 + 0.5 i)":
  108471. +float: 1
  108472. +ifloat: 1
  108473. +Test "Imaginary part of: casin (-0x1p-52 - 0.5 i)":
  108474. +float: 1
  108475. +ifloat: 1
  108476. +Test "Imaginary part of: casin (-0x1p-63 + 0.5 i)":
  108477. +float: 1
  108478. +ifloat: 1
  108479. +Test "Imaginary part of: casin (-0x1p-63 - 0.5 i)":
  108480. +float: 1
  108481. +ifloat: 1
  108482. +Test "Real part of: casin (-1.0 + 0.25 i)":
  108483. +double: 1
  108484. +idouble: 1
  108485. +Test "Real part of: casin (-1.0 + 0.5 i)":
  108486. +float: 1
  108487. +ifloat: 1
  108488. +Test "Imaginary part of: casin (-1.0 + 0.5 i)":
  108489. +float: 1
  108490. +ifloat: 1
  108491. +Test "Imaginary part of: casin (-1.0 + 0x1.fp-10 i)":
  108492. +float: 1
  108493. +ifloat: 1
  108494. +Test "Real part of: casin (-1.0 - 0.25 i)":
  108495. +double: 1
  108496. +idouble: 1
  108497. +Test "Real part of: casin (-1.0 - 0.5 i)":
  108498. +float: 1
  108499. +ifloat: 1
  108500. +Test "Imaginary part of: casin (-1.0 - 0.5 i)":
  108501. +float: 1
  108502. +ifloat: 1
  108503. +Test "Imaginary part of: casin (-1.0 - 0x1.fp-10 i)":
  108504. +float: 1
  108505. +ifloat: 1
  108506. +Test "Imaginary part of: casin (0.25 + 1.0 i)":
  108507. +float: 1
  108508. +ifloat: 1
  108509. +Test "Imaginary part of: casin (0.25 - 1.0 i)":
  108510. +float: 1
  108511. +ifloat: 1
  108512. +Test "Imaginary part of: casin (0.5 + 0x1.fp-129 i)":
  108513. +double: 1
  108514. +idouble: 1
  108515. +Test "Imaginary part of: casin (0.5 + 0x1p-105 i)":
  108516. +double: 1
  108517. +idouble: 1
  108518. +Test "Imaginary part of: casin (0.5 + 0x1p-112 i)":
  108519. +double: 1
  108520. +idouble: 1
  108521. +Test "Imaginary part of: casin (0.5 + 0x1p-23 i)":
  108522. +double: 1
  108523. +idouble: 1
  108524. +Test "Imaginary part of: casin (0.5 + 1.0 i)":
  108525. +double: 1
  108526. +idouble: 1
  108527. +Test "Imaginary part of: casin (0.5 - 0x1.fp-129 i)":
  108528. +double: 1
  108529. +idouble: 1
  108530. +Test "Imaginary part of: casin (0.5 - 0x1p-105 i)":
  108531. +double: 1
  108532. +idouble: 1
  108533. +Test "Imaginary part of: casin (0.5 - 0x1p-112 i)":
  108534. +double: 1
  108535. +idouble: 1
  108536. +Test "Imaginary part of: casin (0.5 - 0x1p-23 i)":
  108537. +double: 1
  108538. +idouble: 1
  108539. +Test "Imaginary part of: casin (0.5 - 1.0 i)":
  108540. +double: 1
  108541. +idouble: 1
  108542. +Test "Real part of: casin (0.75 + 1.25 i)":
  108543. +double: 1
  108544. +float: 1
  108545. +idouble: 1
  108546. +ifloat: 1
  108547. +Test "Imaginary part of: casin (0x0.fffffffffffff8p0 + 0x1p-52 i)":
  108548. +double: 1
  108549. +idouble: 1
  108550. +Test "Imaginary part of: casin (0x0.fffffffffffff8p0 - 0x1p-52 i)":
  108551. +double: 1
  108552. +idouble: 1
  108553. +Test "Imaginary part of: casin (0x0.ffffffp0 + 0x1p-23 i)":
  108554. +float: 2
  108555. +ifloat: 2
  108556. +Test "Imaginary part of: casin (0x0.ffffffp0 - 0x1p-23 i)":
  108557. +float: 2
  108558. +ifloat: 2
  108559. +Test "Imaginary part of: casin (0x1.000002p0 + 0x1p-23 i)":
  108560. +float: 1
  108561. +ifloat: 1
  108562. +Test "Imaginary part of: casin (0x1.000002p0 - 0x1p-23 i)":
  108563. +float: 1
  108564. +ifloat: 1
  108565. +Test "Real part of: casin (0x1.fp-10 + 1.0 i)":
  108566. +float: 1
  108567. +ifloat: 1
  108568. +Test "Imaginary part of: casin (0x1.fp-10 + 1.0 i)":
  108569. +double: 1
  108570. +idouble: 1
  108571. +Test "Real part of: casin (0x1.fp-10 - 1.0 i)":
  108572. +float: 1
  108573. +ifloat: 1
  108574. +Test "Imaginary part of: casin (0x1.fp-10 - 1.0 i)":
  108575. +double: 1
  108576. +idouble: 1
  108577. +Test "Imaginary part of: casin (0x1.fp-100 + 1.0 i)":
  108578. +double: 1
  108579. +float: 1
  108580. +idouble: 1
  108581. +ifloat: 1
  108582. +Test "Imaginary part of: casin (0x1.fp-100 - 1.0 i)":
  108583. +double: 1
  108584. +float: 1
  108585. +idouble: 1
  108586. +ifloat: 1
  108587. +Test "Imaginary part of: casin (0x1.fp-1000 + 1.0 i)":
  108588. +double: 1
  108589. +idouble: 1
  108590. +Test "Imaginary part of: casin (0x1.fp-1000 - 1.0 i)":
  108591. +double: 1
  108592. +idouble: 1
  108593. +Test "Imaginary part of: casin (0x1.fp-1025 + 1.0 i)":
  108594. +double: 1
  108595. +idouble: 1
  108596. +Test "Imaginary part of: casin (0x1.fp-1025 + 1.5 i)":
  108597. +double: 1
  108598. +idouble: 1
  108599. +Test "Imaginary part of: casin (0x1.fp-1025 - 1.0 i)":
  108600. +double: 1
  108601. +idouble: 1
  108602. +Test "Imaginary part of: casin (0x1.fp-1025 - 1.5 i)":
  108603. +double: 1
  108604. +idouble: 1
  108605. +Test "Imaginary part of: casin (0x1.fp-129 + 0.5 i)":
  108606. +float: 1
  108607. +ifloat: 1
  108608. +Test "Imaginary part of: casin (0x1.fp-129 + 1.0 i)":
  108609. +double: 1
  108610. +float: 1
  108611. +idouble: 1
  108612. +ifloat: 1
  108613. +Test "Imaginary part of: casin (0x1.fp-129 + 1.5 i)":
  108614. +double: 1
  108615. +idouble: 1
  108616. +Test "Imaginary part of: casin (0x1.fp-129 - 0.5 i)":
  108617. +float: 1
  108618. +ifloat: 1
  108619. +Test "Imaginary part of: casin (0x1.fp-129 - 1.0 i)":
  108620. +double: 1
  108621. +float: 1
  108622. +idouble: 1
  108623. +ifloat: 1
  108624. +Test "Imaginary part of: casin (0x1.fp-129 - 1.5 i)":
  108625. +double: 1
  108626. +idouble: 1
  108627. +Test "Imaginary part of: casin (0x1.fp-30 + 1.0 i)":
  108628. +double: 1
  108629. +float: 1
  108630. +idouble: 1
  108631. +ifloat: 1
  108632. +Test "Imaginary part of: casin (0x1.fp-30 - 1.0 i)":
  108633. +double: 1
  108634. +float: 1
  108635. +idouble: 1
  108636. +ifloat: 1
  108637. +Test "Imaginary part of: casin (0x1.fp1023 + 0x1.fp1023 i)":
  108638. +double: 1
  108639. +idouble: 1
  108640. +Test "Imaginary part of: casin (0x1.fp127 + 0x1.fp127 i)":
  108641. +double: 1
  108642. +idouble: 1
  108643. +Test "Imaginary part of: casin (0x1p-105 + 0.5 i)":
  108644. +float: 1
  108645. +ifloat: 1
  108646. +Test "Imaginary part of: casin (0x1p-105 - 0.5 i)":
  108647. +float: 1
  108648. +ifloat: 1
  108649. +Test "Imaginary part of: casin (0x1p-112 + 0.5 i)":
  108650. +float: 1
  108651. +ifloat: 1
  108652. +Test "Imaginary part of: casin (0x1p-112 - 0.5 i)":
  108653. +float: 1
  108654. +ifloat: 1
  108655. +Test "Real part of: casin (0x1p-23 + 0.5 i)":
  108656. +double: 1
  108657. +float: 1
  108658. +idouble: 1
  108659. +ifloat: 1
  108660. +Test "Imaginary part of: casin (0x1p-23 + 0.5 i)":
  108661. +float: 1
  108662. +ifloat: 1
  108663. +Test "Imaginary part of: casin (0x1p-23 + 0x0.ffffffp0 i)":
  108664. +double: 1
  108665. +idouble: 1
  108666. +Test "Real part of: casin (0x1p-23 + 0x1.000002p0 i)":
  108667. +double: 1
  108668. +float: 1
  108669. +idouble: 1
  108670. +ifloat: 1
  108671. +Test "Real part of: casin (0x1p-23 - 0.5 i)":
  108672. +double: 1
  108673. +float: 1
  108674. +idouble: 1
  108675. +ifloat: 1
  108676. +Test "Imaginary part of: casin (0x1p-23 - 0.5 i)":
  108677. +float: 1
  108678. +ifloat: 1
  108679. +Test "Imaginary part of: casin (0x1p-23 - 0x0.ffffffp0 i)":
  108680. +double: 1
  108681. +idouble: 1
  108682. +Test "Real part of: casin (0x1p-23 - 0x1.000002p0 i)":
  108683. +double: 1
  108684. +float: 1
  108685. +idouble: 1
  108686. +ifloat: 1
  108687. +Test "Imaginary part of: casin (0x1p-52 + 0.5 i)":
  108688. +float: 1
  108689. +ifloat: 1
  108690. +Test "Imaginary part of: casin (0x1p-52 - 0.5 i)":
  108691. +float: 1
  108692. +ifloat: 1
  108693. +Test "Imaginary part of: casin (0x1p-63 + 0.5 i)":
  108694. +float: 1
  108695. +ifloat: 1
  108696. +Test "Imaginary part of: casin (0x1p-63 - 0.5 i)":
  108697. +float: 1
  108698. +ifloat: 1
  108699. +Test "Real part of: casin (1.0 + 0.25 i)":
  108700. +double: 1
  108701. +idouble: 1
  108702. +Test "Real part of: casin (1.0 + 0.5 i)":
  108703. +float: 1
  108704. +ifloat: 1
  108705. +Test "Imaginary part of: casin (1.0 + 0.5 i)":
  108706. +float: 1
  108707. +ifloat: 1
  108708. +Test "Imaginary part of: casin (1.0 + 0x1.fp-10 i)":
  108709. +float: 1
  108710. +ifloat: 1
  108711. +Test "Real part of: casin (1.0 - 0.25 i)":
  108712. +double: 1
  108713. +idouble: 1
  108714. +Test "Real part of: casin (1.0 - 0.5 i)":
  108715. +float: 1
  108716. +ifloat: 1
  108717. +Test "Imaginary part of: casin (1.0 - 0.5 i)":
  108718. +float: 1
  108719. +ifloat: 1
  108720. +Test "Imaginary part of: casin (1.0 - 0x1.fp-10 i)":
  108721. +float: 1
  108722. +ifloat: 1
  108723. +
  108724. +# casinh
  108725. +Test "Imaginary part of: casinh (-0.25 + 1.0 i)":
  108726. +double: 1
  108727. +idouble: 1
  108728. +Test "Imaginary part of: casinh (-0.25 - 1.0 i)":
  108729. +double: 1
  108730. +idouble: 1
  108731. +Test "Real part of: casinh (-0.5 + +0 i)":
  108732. +float: 1
  108733. +ifloat: 1
  108734. +Test "Real part of: casinh (-0.5 + 0x1.fp-129 i)":
  108735. +float: 1
  108736. +ifloat: 1
  108737. +Test "Real part of: casinh (-0.5 + 0x1p-105 i)":
  108738. +float: 1
  108739. +ifloat: 1
  108740. +Test "Real part of: casinh (-0.5 + 0x1p-112 i)":
  108741. +float: 1
  108742. +ifloat: 1
  108743. +Test "Real part of: casinh (-0.5 + 0x1p-23 i)":
  108744. +float: 1
  108745. +ifloat: 1
  108746. +Test "Imaginary part of: casinh (-0.5 + 0x1p-23 i)":
  108747. +double: 1
  108748. +float: 1
  108749. +idouble: 1
  108750. +ifloat: 1
  108751. +Test "Real part of: casinh (-0.5 + 0x1p-52 i)":
  108752. +float: 1
  108753. +ifloat: 1
  108754. +Test "Real part of: casinh (-0.5 + 0x1p-63 i)":
  108755. +float: 1
  108756. +ifloat: 1
  108757. +Test "Real part of: casinh (-0.5 + 1.0 i)":
  108758. +float: 1
  108759. +ifloat: 1
  108760. +Test "Imaginary part of: casinh (-0.5 + 1.0 i)":
  108761. +float: 1
  108762. +ifloat: 1
  108763. +Test "Real part of: casinh (-0.5 - 0 i)":
  108764. +float: 1
  108765. +ifloat: 1
  108766. +Test "Real part of: casinh (-0.5 - 0x1.fp-129 i)":
  108767. +float: 1
  108768. +ifloat: 1
  108769. +Test "Real part of: casinh (-0.5 - 0x1p-105 i)":
  108770. +float: 1
  108771. +ifloat: 1
  108772. +Test "Real part of: casinh (-0.5 - 0x1p-112 i)":
  108773. +float: 1
  108774. +ifloat: 1
  108775. +Test "Real part of: casinh (-0.5 - 0x1p-23 i)":
  108776. +float: 1
  108777. +ifloat: 1
  108778. +Test "Imaginary part of: casinh (-0.5 - 0x1p-23 i)":
  108779. +double: 1
  108780. +float: 1
  108781. +idouble: 1
  108782. +ifloat: 1
  108783. +Test "Real part of: casinh (-0.5 - 0x1p-52 i)":
  108784. +float: 1
  108785. +ifloat: 1
  108786. +Test "Real part of: casinh (-0.5 - 0x1p-63 i)":
  108787. +float: 1
  108788. +ifloat: 1
  108789. +Test "Real part of: casinh (-0.5 - 1.0 i)":
  108790. +float: 1
  108791. +ifloat: 1
  108792. +Test "Imaginary part of: casinh (-0.5 - 1.0 i)":
  108793. +float: 1
  108794. +ifloat: 1
  108795. +Test "Real part of: casinh (-0x0.ffffffp0 + 0x1p-23 i)":
  108796. +double: 1
  108797. +idouble: 1
  108798. +Test "Real part of: casinh (-0x0.ffffffp0 - 0x1p-23 i)":
  108799. +double: 1
  108800. +idouble: 1
  108801. +Test "Imaginary part of: casinh (-0x1.000002p0 + 0x1p-23 i)":
  108802. +double: 1
  108803. +float: 1
  108804. +idouble: 1
  108805. +ifloat: 1
  108806. +Test "Imaginary part of: casinh (-0x1.000002p0 - 0x1p-23 i)":
  108807. +double: 1
  108808. +float: 1
  108809. +idouble: 1
  108810. +ifloat: 1
  108811. +Test "Real part of: casinh (-0x1.fp-10 + 1.0 i)":
  108812. +float: 1
  108813. +ifloat: 1
  108814. +Test "Real part of: casinh (-0x1.fp-10 - 1.0 i)":
  108815. +float: 1
  108816. +ifloat: 1
  108817. +Test "Real part of: casinh (-0x1.fp-129 + 0.5 i)":
  108818. +double: 1
  108819. +idouble: 1
  108820. +Test "Real part of: casinh (-0x1.fp-129 - 0.5 i)":
  108821. +double: 1
  108822. +idouble: 1
  108823. +Test "Real part of: casinh (-0x1p-105 + 0.5 i)":
  108824. +double: 1
  108825. +idouble: 1
  108826. +Test "Real part of: casinh (-0x1p-105 - 0.5 i)":
  108827. +double: 1
  108828. +idouble: 1
  108829. +Test "Real part of: casinh (-0x1p-112 + 0.5 i)":
  108830. +double: 1
  108831. +idouble: 1
  108832. +Test "Real part of: casinh (-0x1p-112 - 0.5 i)":
  108833. +double: 1
  108834. +idouble: 1
  108835. +Test "Real part of: casinh (-0x1p-23 + 0.5 i)":
  108836. +double: 1
  108837. +idouble: 1
  108838. +Test "Real part of: casinh (-0x1p-23 + 0x0.ffffffp0 i)":
  108839. +float: 2
  108840. +ifloat: 2
  108841. +Test "Real part of: casinh (-0x1p-23 + 0x1.000002p0 i)":
  108842. +float: 1
  108843. +ifloat: 1
  108844. +Test "Real part of: casinh (-0x1p-23 - 0.5 i)":
  108845. +double: 1
  108846. +idouble: 1
  108847. +Test "Real part of: casinh (-0x1p-23 - 0x0.ffffffp0 i)":
  108848. +float: 2
  108849. +ifloat: 2
  108850. +Test "Real part of: casinh (-0x1p-23 - 0x1.000002p0 i)":
  108851. +float: 1
  108852. +ifloat: 1
  108853. +Test "Real part of: casinh (-0x1p-52 + 0x0.fffffffffffff8p0 i)":
  108854. +double: 1
  108855. +idouble: 1
  108856. +Test "Real part of: casinh (-0x1p-52 - 0x0.fffffffffffff8p0 i)":
  108857. +double: 1
  108858. +idouble: 1
  108859. +Test "Real part of: casinh (-1.0 + +0 i)":
  108860. +double: 1
  108861. +float: 1
  108862. +idouble: 1
  108863. +ifloat: 1
  108864. +Test "Real part of: casinh (-1.0 + 0.25 i)":
  108865. +float: 1
  108866. +ifloat: 1
  108867. +Test "Real part of: casinh (-1.0 + 0.5 i)":
  108868. +double: 1
  108869. +idouble: 1
  108870. +Test "Real part of: casinh (-1.0 + 0x1.fp-10 i)":
  108871. +double: 1
  108872. +idouble: 1
  108873. +Test "Imaginary part of: casinh (-1.0 + 0x1.fp-10 i)":
  108874. +float: 1
  108875. +ifloat: 1
  108876. +Test "Real part of: casinh (-1.0 + 0x1.fp-100 i)":
  108877. +double: 1
  108878. +float: 1
  108879. +idouble: 1
  108880. +ifloat: 1
  108881. +Test "Real part of: casinh (-1.0 + 0x1.fp-1000 i)":
  108882. +double: 1
  108883. +idouble: 1
  108884. +Test "Real part of: casinh (-1.0 + 0x1.fp-1025 i)":
  108885. +double: 1
  108886. +idouble: 1
  108887. +Test "Real part of: casinh (-1.0 + 0x1.fp-129 i)":
  108888. +double: 1
  108889. +float: 1
  108890. +idouble: 1
  108891. +ifloat: 1
  108892. +Test "Real part of: casinh (-1.0 + 0x1.fp-30 i)":
  108893. +double: 1
  108894. +float: 1
  108895. +idouble: 1
  108896. +ifloat: 1
  108897. +Test "Real part of: casinh (-1.0 - 0 i)":
  108898. +double: 1
  108899. +float: 1
  108900. +idouble: 1
  108901. +ifloat: 1
  108902. +Test "Real part of: casinh (-1.0 - 0.25 i)":
  108903. +float: 1
  108904. +ifloat: 1
  108905. +Test "Real part of: casinh (-1.0 - 0.5 i)":
  108906. +double: 1
  108907. +idouble: 1
  108908. +Test "Real part of: casinh (-1.0 - 0x1.fp-10 i)":
  108909. +double: 1
  108910. +idouble: 1
  108911. +Test "Imaginary part of: casinh (-1.0 - 0x1.fp-10 i)":
  108912. +float: 1
  108913. +ifloat: 1
  108914. +Test "Real part of: casinh (-1.0 - 0x1.fp-100 i)":
  108915. +double: 1
  108916. +float: 1
  108917. +idouble: 1
  108918. +ifloat: 1
  108919. +Test "Real part of: casinh (-1.0 - 0x1.fp-1000 i)":
  108920. +double: 1
  108921. +idouble: 1
  108922. +Test "Real part of: casinh (-1.0 - 0x1.fp-1025 i)":
  108923. +double: 1
  108924. +idouble: 1
  108925. +Test "Real part of: casinh (-1.0 - 0x1.fp-129 i)":
  108926. +double: 1
  108927. +float: 1
  108928. +idouble: 1
  108929. +ifloat: 1
  108930. +Test "Real part of: casinh (-1.0 - 0x1.fp-30 i)":
  108931. +double: 1
  108932. +float: 1
  108933. +idouble: 1
  108934. +ifloat: 1
  108935. +Test "Real part of: casinh (-1.5 + +0 i)":
  108936. +double: 1
  108937. +idouble: 1
  108938. +Test "Real part of: casinh (-1.5 + 0x1.fp-1025 i)":
  108939. +double: 1
  108940. +idouble: 1
  108941. +Test "Real part of: casinh (-1.5 + 0x1.fp-129 i)":
  108942. +double: 1
  108943. +idouble: 1
  108944. +Test "Real part of: casinh (-1.5 - 0 i)":
  108945. +double: 1
  108946. +idouble: 1
  108947. +Test "Real part of: casinh (-1.5 - 0x1.fp-1025 i)":
  108948. +double: 1
  108949. +idouble: 1
  108950. +Test "Real part of: casinh (-1.5 - 0x1.fp-129 i)":
  108951. +double: 1
  108952. +idouble: 1
  108953. +Test "Imaginary part of: casinh (0.25 + 1.0 i)":
  108954. +double: 1
  108955. +idouble: 1
  108956. +Test "Imaginary part of: casinh (0.25 - 1.0 i)":
  108957. +double: 1
  108958. +idouble: 1
  108959. +Test "Real part of: casinh (0.5 + +0 i)":
  108960. +float: 1
  108961. +ifloat: 1
  108962. +Test "Real part of: casinh (0.5 + 0x1.fp-129 i)":
  108963. +float: 1
  108964. +ifloat: 1
  108965. +Test "Real part of: casinh (0.5 + 0x1p-105 i)":
  108966. +float: 1
  108967. +ifloat: 1
  108968. +Test "Real part of: casinh (0.5 + 0x1p-112 i)":
  108969. +float: 1
  108970. +ifloat: 1
  108971. +Test "Real part of: casinh (0.5 + 0x1p-23 i)":
  108972. +float: 1
  108973. +ifloat: 1
  108974. +Test "Imaginary part of: casinh (0.5 + 0x1p-23 i)":
  108975. +double: 1
  108976. +float: 1
  108977. +idouble: 1
  108978. +ifloat: 1
  108979. +Test "Real part of: casinh (0.5 + 0x1p-52 i)":
  108980. +float: 1
  108981. +ifloat: 1
  108982. +Test "Real part of: casinh (0.5 + 0x1p-63 i)":
  108983. +float: 1
  108984. +ifloat: 1
  108985. +Test "Real part of: casinh (0.5 + 1.0 i)":
  108986. +float: 1
  108987. +ifloat: 1
  108988. +Test "Imaginary part of: casinh (0.5 + 1.0 i)":
  108989. +float: 1
  108990. +ifloat: 1
  108991. +Test "Real part of: casinh (0.5 - 0 i)":
  108992. +float: 1
  108993. +ifloat: 1
  108994. +Test "Real part of: casinh (0.5 - 0x1.fp-129 i)":
  108995. +float: 1
  108996. +ifloat: 1
  108997. +Test "Real part of: casinh (0.5 - 0x1p-105 i)":
  108998. +float: 1
  108999. +ifloat: 1
  109000. +Test "Real part of: casinh (0.5 - 0x1p-112 i)":
  109001. +float: 1
  109002. +ifloat: 1
  109003. +Test "Real part of: casinh (0.5 - 0x1p-23 i)":
  109004. +float: 1
  109005. +ifloat: 1
  109006. +Test "Imaginary part of: casinh (0.5 - 0x1p-23 i)":
  109007. +double: 1
  109008. +float: 1
  109009. +idouble: 1
  109010. +ifloat: 1
  109011. +Test "Real part of: casinh (0.5 - 0x1p-52 i)":
  109012. +float: 1
  109013. +ifloat: 1
  109014. +Test "Real part of: casinh (0.5 - 0x1p-63 i)":
  109015. +float: 1
  109016. +ifloat: 1
  109017. +Test "Real part of: casinh (0.5 - 1.0 i)":
  109018. +float: 1
  109019. +ifloat: 1
  109020. +Test "Imaginary part of: casinh (0.5 - 1.0 i)":
  109021. +float: 1
  109022. +ifloat: 1
  109023. +Test "Real part of: casinh (0.75 + 1.25 i)":
  109024. +float: 1
  109025. +ifloat: 1
  109026. +Test "Imaginary part of: casinh (0.75 + 1.25 i)":
  109027. +double: 1
  109028. +float: 1
  109029. +idouble: 1
  109030. +ifloat: 1
  109031. +Test "Real part of: casinh (0x0.ffffffp0 + 0x1p-23 i)":
  109032. +double: 1
  109033. +idouble: 1
  109034. +Test "Real part of: casinh (0x0.ffffffp0 - 0x1p-23 i)":
  109035. +double: 1
  109036. +idouble: 1
  109037. +Test "Imaginary part of: casinh (0x1.000002p0 + 0x1p-23 i)":
  109038. +double: 1
  109039. +float: 1
  109040. +idouble: 1
  109041. +ifloat: 1
  109042. +Test "Imaginary part of: casinh (0x1.000002p0 - 0x1p-23 i)":
  109043. +double: 1
  109044. +float: 1
  109045. +idouble: 1
  109046. +ifloat: 1
  109047. +Test "Real part of: casinh (0x1.fp-10 + 1.0 i)":
  109048. +float: 1
  109049. +ifloat: 1
  109050. +Test "Real part of: casinh (0x1.fp-10 - 1.0 i)":
  109051. +float: 1
  109052. +ifloat: 1
  109053. +Test "Real part of: casinh (0x1.fp-129 + 0.5 i)":
  109054. +double: 1
  109055. +idouble: 1
  109056. +Test "Real part of: casinh (0x1.fp-129 - 0.5 i)":
  109057. +double: 1
  109058. +idouble: 1
  109059. +Test "Real part of: casinh (0x1.fp1023 + 0x1.fp1023 i)":
  109060. +double: 1
  109061. +idouble: 1
  109062. +Test "Real part of: casinh (0x1.fp127 + 0x1.fp127 i)":
  109063. +double: 1
  109064. +idouble: 1
  109065. +Test "Real part of: casinh (0x1p-105 + 0.5 i)":
  109066. +double: 1
  109067. +idouble: 1
  109068. +Test "Real part of: casinh (0x1p-105 - 0.5 i)":
  109069. +double: 1
  109070. +idouble: 1
  109071. +Test "Real part of: casinh (0x1p-112 + 0.5 i)":
  109072. +double: 1
  109073. +idouble: 1
  109074. +Test "Real part of: casinh (0x1p-112 - 0.5 i)":
  109075. +double: 1
  109076. +idouble: 1
  109077. +Test "Real part of: casinh (0x1p-23 + 0.5 i)":
  109078. +double: 1
  109079. +idouble: 1
  109080. +Test "Real part of: casinh (0x1p-23 + 0x0.ffffffp0 i)":
  109081. +float: 2
  109082. +ifloat: 2
  109083. +Test "Real part of: casinh (0x1p-23 + 0x1.000002p0 i)":
  109084. +float: 1
  109085. +ifloat: 1
  109086. +Test "Real part of: casinh (0x1p-23 - 0.5 i)":
  109087. +double: 1
  109088. +idouble: 1
  109089. +Test "Real part of: casinh (0x1p-23 - 0x0.ffffffp0 i)":
  109090. +float: 2
  109091. +ifloat: 2
  109092. +Test "Real part of: casinh (0x1p-23 - 0x1.000002p0 i)":
  109093. +float: 1
  109094. +ifloat: 1
  109095. +Test "Real part of: casinh (0x1p-52 + 0x0.fffffffffffff8p0 i)":
  109096. +double: 1
  109097. +idouble: 1
  109098. +Test "Real part of: casinh (0x1p-52 - 0x0.fffffffffffff8p0 i)":
  109099. +double: 1
  109100. +idouble: 1
  109101. +Test "Real part of: casinh (1.0 + +0 i)":
  109102. +double: 1
  109103. +float: 1
  109104. +idouble: 1
  109105. +ifloat: 1
  109106. +Test "Real part of: casinh (1.0 + 0.25 i)":
  109107. +float: 1
  109108. +ifloat: 1
  109109. +Test "Real part of: casinh (1.0 + 0.5 i)":
  109110. +double: 1
  109111. +idouble: 1
  109112. +Test "Real part of: casinh (1.0 + 0x1.fp-10 i)":
  109113. +double: 1
  109114. +idouble: 1
  109115. +Test "Imaginary part of: casinh (1.0 + 0x1.fp-10 i)":
  109116. +float: 1
  109117. +ifloat: 1
  109118. +Test "Real part of: casinh (1.0 + 0x1.fp-100 i)":
  109119. +double: 1
  109120. +float: 1
  109121. +idouble: 1
  109122. +ifloat: 1
  109123. +Test "Real part of: casinh (1.0 + 0x1.fp-1000 i)":
  109124. +double: 1
  109125. +idouble: 1
  109126. +Test "Real part of: casinh (1.0 + 0x1.fp-1025 i)":
  109127. +double: 1
  109128. +idouble: 1
  109129. +Test "Real part of: casinh (1.0 + 0x1.fp-129 i)":
  109130. +double: 1
  109131. +float: 1
  109132. +idouble: 1
  109133. +ifloat: 1
  109134. +Test "Real part of: casinh (1.0 + 0x1.fp-30 i)":
  109135. +double: 1
  109136. +float: 1
  109137. +idouble: 1
  109138. +ifloat: 1
  109139. +Test "Real part of: casinh (1.0 - 0 i)":
  109140. +double: 1
  109141. +float: 1
  109142. +idouble: 1
  109143. +ifloat: 1
  109144. +Test "Real part of: casinh (1.0 - 0.25 i)":
  109145. +float: 1
  109146. +ifloat: 1
  109147. +Test "Real part of: casinh (1.0 - 0.5 i)":
  109148. +double: 1
  109149. +idouble: 1
  109150. +Test "Real part of: casinh (1.0 - 0x1.fp-10 i)":
  109151. +double: 1
  109152. +idouble: 1
  109153. +Test "Imaginary part of: casinh (1.0 - 0x1.fp-10 i)":
  109154. +float: 1
  109155. +ifloat: 1
  109156. +Test "Real part of: casinh (1.0 - 0x1.fp-100 i)":
  109157. +double: 1
  109158. +float: 1
  109159. +idouble: 1
  109160. +ifloat: 1
  109161. +Test "Real part of: casinh (1.0 - 0x1.fp-1000 i)":
  109162. +double: 1
  109163. +idouble: 1
  109164. +Test "Real part of: casinh (1.0 - 0x1.fp-1025 i)":
  109165. +double: 1
  109166. +idouble: 1
  109167. +Test "Real part of: casinh (1.0 - 0x1.fp-129 i)":
  109168. +double: 1
  109169. +float: 1
  109170. +idouble: 1
  109171. +ifloat: 1
  109172. +Test "Real part of: casinh (1.0 - 0x1.fp-30 i)":
  109173. +double: 1
  109174. +float: 1
  109175. +idouble: 1
  109176. +ifloat: 1
  109177. +Test "Real part of: casinh (1.5 + +0 i)":
  109178. +double: 1
  109179. +idouble: 1
  109180. +Test "Real part of: casinh (1.5 + 0x1.fp-1025 i)":
  109181. +double: 1
  109182. +idouble: 1
  109183. +Test "Real part of: casinh (1.5 + 0x1.fp-129 i)":
  109184. +double: 1
  109185. +idouble: 1
  109186. +Test "Real part of: casinh (1.5 - 0 i)":
  109187. +double: 1
  109188. +idouble: 1
  109189. +Test "Real part of: casinh (1.5 - 0x1.fp-1025 i)":
  109190. +double: 1
  109191. +idouble: 1
  109192. +Test "Real part of: casinh (1.5 - 0x1.fp-129 i)":
  109193. +double: 1
  109194. +idouble: 1
  109195. +
  109196. +# catan
  109197. +Test "Imaginary part of: catan (-0x0.fffffffffffff8p0 + 0x1p-27 i)":
  109198. +double: 1
  109199. +idouble: 1
  109200. +Test "Imaginary part of: catan (-0x0.ffffffp0 + 0x1p-13 i)":
  109201. +double: 1
  109202. +float: 1
  109203. +idouble: 1
  109204. +ifloat: 1
  109205. +Test "Imaginary part of: catan (-0x1.0000000000001p0 - 0x1p-27 i)":
  109206. +double: 1
  109207. +idouble: 1
  109208. +Test "Real part of: catan (-0x1.000002p0 + 0x1p-126 i)":
  109209. +float: 1
  109210. +ifloat: 1
  109211. +Test "Real part of: catan (-0x1.000002p0 + 0x1p-13 i)":
  109212. +float: 1
  109213. +ifloat: 1
  109214. +Test "Real part of: catan (-0x1.000002p0 - 0x1p-126 i)":
  109215. +float: 1
  109216. +ifloat: 1
  109217. +Test "Real part of: catan (-0x1.000002p0 - 0x1p-13 i)":
  109218. +float: 1
  109219. +ifloat: 1
  109220. +Test "Imaginary part of: catan (-0x1.000002p0 - 0x1p-13 i)":
  109221. +double: 1
  109222. +idouble: 1
  109223. +Test "Imaginary part of: catan (-0x1.fp1023 + 0x1.fp1023 i)":
  109224. +double: 1
  109225. +idouble: 1
  109226. +Test "Imaginary part of: catan (-0x1.fp1023 - 0x1.fp1023 i)":
  109227. +double: 1
  109228. +idouble: 1
  109229. +Test "Imaginary part of: catan (-0x1.fp127 + 0x1.fp127 i)":
  109230. +double: 1
  109231. +idouble: 1
  109232. +Test "Imaginary part of: catan (-0x1.fp127 - 0x1.fp127 i)":
  109233. +double: 1
  109234. +idouble: 1
  109235. +Test "Imaginary part of: catan (-0x1p-1020 + 1.0 i)":
  109236. +double: 1
  109237. +idouble: 1
  109238. +Test "Imaginary part of: catan (-0x1p-1020 - 1.0 i)":
  109239. +double: 1
  109240. +idouble: 1
  109241. +Test "Real part of: catan (-0x1p-13 + 0x1.000002p0 i)":
  109242. +float: 1
  109243. +ifloat: 1
  109244. +Test "Real part of: catan (-0x1p-13 + 1.0 i)":
  109245. +float: 1
  109246. +ifloat: 1
  109247. +Test "Real part of: catan (-0x1p-13 - 0x1.000002p0 i)":
  109248. +float: 1
  109249. +ifloat: 1
  109250. +Test "Imaginary part of: catan (-0x1p-13 - 0x1.000002p0 i)":
  109251. +float: 1
  109252. +ifloat: 1
  109253. +Test "Real part of: catan (-0x1p-13 - 1.0 i)":
  109254. +float: 1
  109255. +ifloat: 1
  109256. +Test "Imaginary part of: catan (-0x1p-54 + 1.0 i)":
  109257. +float: 1
  109258. +ifloat: 1
  109259. +Test "Imaginary part of: catan (-0x1p-54 - 1.0 i)":
  109260. +float: 1
  109261. +ifloat: 1
  109262. +Test "Imaginary part of: catan (-0x1p-57 + 1.0 i)":
  109263. +float: 1
  109264. +ifloat: 1
  109265. +Test "Imaginary part of: catan (-0x1p-57 - 1.0 i)":
  109266. +float: 1
  109267. +ifloat: 1
  109268. +Test "Real part of: catan (-1.0 + 0x1p-13 i)":
  109269. +float: 1
  109270. +ifloat: 1
  109271. +Test "Real part of: catan (-1.0 - 0x1p-13 i)":
  109272. +float: 1
  109273. +ifloat: 1
  109274. +Test "Imaginary part of: catan (-2 - 3 i)":
  109275. +double: 1
  109276. +float: 1
  109277. +idouble: 1
  109278. +ifloat: 1
  109279. +Test "Imaginary part of: catan (0x0.fffffffffffff8p0 + 0x1p-27 i)":
  109280. +double: 1
  109281. +idouble: 1
  109282. +Test "Imaginary part of: catan (0x0.ffffffp0 + 0x1p-13 i)":
  109283. +double: 1
  109284. +float: 1
  109285. +idouble: 1
  109286. +ifloat: 1
  109287. +Test "Imaginary part of: catan (0x1.0000000000001p0 - 0x1p-27 i)":
  109288. +double: 1
  109289. +idouble: 1
  109290. +Test "Real part of: catan (0x1.000002p0 + 0x1p-126 i)":
  109291. +float: 1
  109292. +ifloat: 1
  109293. +Test "Real part of: catan (0x1.000002p0 + 0x1p-13 i)":
  109294. +float: 1
  109295. +ifloat: 1
  109296. +Test "Real part of: catan (0x1.000002p0 - 0x1p-126 i)":
  109297. +float: 1
  109298. +ifloat: 1
  109299. +Test "Real part of: catan (0x1.000002p0 - 0x1p-13 i)":
  109300. +float: 1
  109301. +ifloat: 1
  109302. +Test "Imaginary part of: catan (0x1.000002p0 - 0x1p-13 i)":
  109303. +double: 1
  109304. +idouble: 1
  109305. +Test "Imaginary part of: catan (0x1.fp1023 + 0x1.fp1023 i)":
  109306. +double: 1
  109307. +idouble: 1
  109308. +Test "Imaginary part of: catan (0x1.fp1023 - 0x1.fp1023 i)":
  109309. +double: 1
  109310. +idouble: 1
  109311. +Test "Imaginary part of: catan (0x1.fp127 + 0x1.fp127 i)":
  109312. +double: 1
  109313. +idouble: 1
  109314. +Test "Imaginary part of: catan (0x1.fp127 - 0x1.fp127 i)":
  109315. +double: 1
  109316. +idouble: 1
  109317. +Test "Imaginary part of: catan (0x1p-1020 + 1.0 i)":
  109318. +double: 1
  109319. +idouble: 1
  109320. +Test "Imaginary part of: catan (0x1p-1020 - 1.0 i)":
  109321. +double: 1
  109322. +idouble: 1
  109323. +Test "Real part of: catan (0x1p-13 + 0x1.000002p0 i)":
  109324. +float: 1
  109325. +ifloat: 1
  109326. +Test "Real part of: catan (0x1p-13 + 1.0 i)":
  109327. +float: 1
  109328. +ifloat: 1
  109329. +Test "Real part of: catan (0x1p-13 - 0x1.000002p0 i)":
  109330. +float: 1
  109331. +ifloat: 1
  109332. +Test "Imaginary part of: catan (0x1p-13 - 0x1.000002p0 i)":
  109333. +float: 1
  109334. +ifloat: 1
  109335. +Test "Real part of: catan (0x1p-13 - 1.0 i)":
  109336. +float: 1
  109337. +ifloat: 1
  109338. +Test "Imaginary part of: catan (0x1p-54 + 1.0 i)":
  109339. +float: 1
  109340. +ifloat: 1
  109341. +Test "Imaginary part of: catan (0x1p-54 - 1.0 i)":
  109342. +float: 1
  109343. +ifloat: 1
  109344. +Test "Imaginary part of: catan (0x1p-57 + 1.0 i)":
  109345. +float: 1
  109346. +ifloat: 1
  109347. +Test "Imaginary part of: catan (0x1p-57 - 1.0 i)":
  109348. +float: 1
  109349. +ifloat: 1
  109350. +Test "Real part of: catan (1.0 + 0x1p-13 i)":
  109351. +float: 1
  109352. +ifloat: 1
  109353. +Test "Real part of: catan (1.0 - 0x1p-13 i)":
  109354. +float: 1
  109355. +ifloat: 1
  109356. +
  109357. +# catanh
  109358. +Test "Real part of: catanh (-0x1.000002p0 + 0x1p-13 i)":
  109359. +float: 1
  109360. +ifloat: 1
  109361. +Test "Imaginary part of: catanh (-0x1.000002p0 + 0x1p-13 i)":
  109362. +float: 1
  109363. +ifloat: 1
  109364. +Test "Real part of: catanh (-0x1.000002p0 - 0x1p-13 i)":
  109365. +float: 1
  109366. +ifloat: 1
  109367. +Test "Imaginary part of: catanh (-0x1.000002p0 - 0x1p-13 i)":
  109368. +float: 1
  109369. +ifloat: 1
  109370. +Test "Real part of: catanh (-0x1.fp1023 + 0x1.fp1023 i)":
  109371. +double: 1
  109372. +idouble: 1
  109373. +Test "Real part of: catanh (-0x1.fp1023 - 0x1.fp1023 i)":
  109374. +double: 1
  109375. +idouble: 1
  109376. +Test "Real part of: catanh (-0x1.fp127 + 0x1.fp127 i)":
  109377. +double: 1
  109378. +idouble: 1
  109379. +Test "Real part of: catanh (-0x1.fp127 - 0x1.fp127 i)":
  109380. +double: 1
  109381. +idouble: 1
  109382. +Test "Imaginary part of: catanh (-0x1p-126 + 0x1.000002p0 i)":
  109383. +float: 1
  109384. +ifloat: 1
  109385. +Test "Imaginary part of: catanh (-0x1p-126 - 0x1.000002p0 i)":
  109386. +float: 1
  109387. +ifloat: 1
  109388. +Test "Real part of: catanh (-0x1p-13 + 0x1.000002p0 i)":
  109389. +double: 1
  109390. +idouble: 1
  109391. +Test "Imaginary part of: catanh (-0x1p-13 + 0x1.000002p0 i)":
  109392. +float: 1
  109393. +ifloat: 1
  109394. +Test "Imaginary part of: catanh (-0x1p-13 + 1.0 i)":
  109395. +float: 1
  109396. +ifloat: 1
  109397. +Test "Real part of: catanh (-0x1p-13 - 0x1.000002p0 i)":
  109398. +double: 1
  109399. +idouble: 1
  109400. +Test "Imaginary part of: catanh (-0x1p-13 - 0x1.000002p0 i)":
  109401. +float: 1
  109402. +ifloat: 1
  109403. +Test "Imaginary part of: catanh (-0x1p-13 - 1.0 i)":
  109404. +float: 1
  109405. +ifloat: 1
  109406. +Test "Real part of: catanh (-0x1p-27 + 0x1.0000000000001p0 i)":
  109407. +double: 1
  109408. +idouble: 1
  109409. +Test "Real part of: catanh (-0x1p-27 - 0x1.0000000000001p0 i)":
  109410. +double: 1
  109411. +idouble: 1
  109412. +Test "Real part of: catanh (-1.0 + 0x1p-1020 i)":
  109413. +double: 1
  109414. +idouble: 1
  109415. +Test "Imaginary part of: catanh (-1.0 + 0x1p-13 i)":
  109416. +float: 1
  109417. +ifloat: 1
  109418. +Test "Real part of: catanh (-1.0 + 0x1p-54 i)":
  109419. +float: 1
  109420. +ifloat: 1
  109421. +Test "Real part of: catanh (-1.0 + 0x1p-57 i)":
  109422. +float: 1
  109423. +ifloat: 1
  109424. +Test "Real part of: catanh (-1.0 - 0x1p-1020 i)":
  109425. +double: 1
  109426. +idouble: 1
  109427. +Test "Imaginary part of: catanh (-1.0 - 0x1p-13 i)":
  109428. +float: 1
  109429. +ifloat: 1
  109430. +Test "Real part of: catanh (-1.0 - 0x1p-54 i)":
  109431. +float: 1
  109432. +ifloat: 1
  109433. +Test "Real part of: catanh (-1.0 - 0x1p-57 i)":
  109434. +float: 1
  109435. +ifloat: 1
  109436. +Test "Real part of: catanh (-2 - 3 i)":
  109437. +double: 1
  109438. +idouble: 1
  109439. +Test "Imaginary part of: catanh (0x1.000002p0 + 0x1p-13 i)":
  109440. +float: 1
  109441. +ifloat: 1
  109442. +Test "Imaginary part of: catanh (0x1.000002p0 - 0x1p-13 i)":
  109443. +float: 1
  109444. +ifloat: 1
  109445. +Test "Real part of: catanh (0x1.fp1023 + 0x1.fp1023 i)":
  109446. +double: 1
  109447. +idouble: 1
  109448. +Test "Real part of: catanh (0x1.fp1023 - 0x1.fp1023 i)":
  109449. +double: 1
  109450. +idouble: 1
  109451. +Test "Real part of: catanh (0x1.fp127 + 0x1.fp127 i)":
  109452. +double: 1
  109453. +idouble: 1
  109454. +Test "Real part of: catanh (0x1.fp127 - 0x1.fp127 i)":
  109455. +double: 1
  109456. +idouble: 1
  109457. +Test "Imaginary part of: catanh (0x1p-126 + 0x1.000002p0 i)":
  109458. +float: 1
  109459. +ifloat: 1
  109460. +Test "Imaginary part of: catanh (0x1p-126 - 0x1.000002p0 i)":
  109461. +float: 1
  109462. +ifloat: 1
  109463. +Test "Real part of: catanh (0x1p-13 + 0x0.ffffffp0 i)":
  109464. +double: 1
  109465. +float: 1
  109466. +idouble: 1
  109467. +ifloat: 1
  109468. +Test "Imaginary part of: catanh (0x1p-13 + 0x1.000002p0 i)":
  109469. +float: 1
  109470. +ifloat: 1
  109471. +Test "Imaginary part of: catanh (0x1p-13 + 1.0 i)":
  109472. +float: 1
  109473. +ifloat: 1
  109474. +Test "Real part of: catanh (0x1p-13 - 0x0.ffffffp0 i)":
  109475. +double: 1
  109476. +float: 1
  109477. +idouble: 1
  109478. +ifloat: 1
  109479. +Test "Imaginary part of: catanh (0x1p-13 - 0x1.000002p0 i)":
  109480. +float: 1
  109481. +ifloat: 1
  109482. +Test "Imaginary part of: catanh (0x1p-13 - 1.0 i)":
  109483. +float: 1
  109484. +ifloat: 1
  109485. +Test "Real part of: catanh (0x1p-27 + 0x0.fffffffffffff8p0 i)":
  109486. +double: 1
  109487. +idouble: 1
  109488. +Test "Real part of: catanh (0x1p-27 - 0x0.fffffffffffff8p0 i)":
  109489. +double: 1
  109490. +idouble: 1
  109491. +Test "Real part of: catanh (1.0 + 0x1p-1020 i)":
  109492. +double: 1
  109493. +idouble: 1
  109494. +Test "Imaginary part of: catanh (1.0 + 0x1p-13 i)":
  109495. +float: 1
  109496. +ifloat: 1
  109497. +Test "Real part of: catanh (1.0 + 0x1p-54 i)":
  109498. +float: 1
  109499. +ifloat: 1
  109500. +Test "Real part of: catanh (1.0 + 0x1p-57 i)":
  109501. +float: 1
  109502. +ifloat: 1
  109503. +Test "Real part of: catanh (1.0 - 0x1p-1020 i)":
  109504. +double: 1
  109505. +idouble: 1
  109506. +Test "Imaginary part of: catanh (1.0 - 0x1p-13 i)":
  109507. +float: 1
  109508. +ifloat: 1
  109509. +Test "Real part of: catanh (1.0 - 0x1p-54 i)":
  109510. +float: 1
  109511. +ifloat: 1
  109512. +Test "Real part of: catanh (1.0 - 0x1p-57 i)":
  109513. +float: 1
  109514. +ifloat: 1
  109515. +
  109516. +# cbrt
  109517. +Test "cbrt (-27.0)":
  109518. +double: 1
  109519. +idouble: 1
  109520. +Test "cbrt (0.75)":
  109521. +double: 1
  109522. +idouble: 1
  109523. +Test "cbrt (0.9921875)":
  109524. +double: 1
  109525. +idouble: 1
  109526. +
  109527. +# ccos
  109528. +Test "Imaginary part of: ccos (-0.75 + 710.5 i)":
  109529. +double: 1
  109530. +idouble: 1
  109531. +Test "Imaginary part of: ccos (-0.75 + 89.5 i)":
  109532. +float: 1
  109533. +ifloat: 1
  109534. +Test "Imaginary part of: ccos (-0.75 - 710.5 i)":
  109535. +double: 1
  109536. +idouble: 1
  109537. +Test "Imaginary part of: ccos (-0.75 - 89.5 i)":
  109538. +float: 1
  109539. +ifloat: 1
  109540. +Test "Imaginary part of: ccos (-2 - 3 i)":
  109541. +float: 1
  109542. +ifloat: 1
  109543. +Test "Real part of: ccos (0.75 + 1.25 i)":
  109544. +double: 1
  109545. +float: 1
  109546. +idouble: 1
  109547. +ifloat: 1
  109548. +Test "Imaginary part of: ccos (0.75 + 1.25 i)":
  109549. +float: 1
  109550. +ifloat: 1
  109551. +Test "Imaginary part of: ccos (0.75 + 710.5 i)":
  109552. +double: 1
  109553. +idouble: 1
  109554. +Test "Imaginary part of: ccos (0.75 + 89.5 i)":
  109555. +float: 1
  109556. +ifloat: 1
  109557. +Test "Imaginary part of: ccos (0.75 - 710.5 i)":
  109558. +double: 1
  109559. +idouble: 1
  109560. +Test "Imaginary part of: ccos (0.75 - 89.5 i)":
  109561. +float: 1
  109562. +ifloat: 1
  109563. +Test "Imaginary part of: ccos (0x1p-1074 + 1440 i)":
  109564. +double: 1
  109565. +idouble: 1
  109566. +
  109567. +# ccosh
  109568. +Test "Real part of: ccosh (-2 - 3 i)":
  109569. +float: 1
  109570. +ifloat: 1
  109571. +Test "Imaginary part of: ccosh (-2 - 3 i)":
  109572. +float: 1
  109573. +ifloat: 1
  109574. +Test "Imaginary part of: ccosh (-710.5 + 0.75 i)":
  109575. +double: 1
  109576. +idouble: 1
  109577. +Test "Imaginary part of: ccosh (-710.5 - 0.75 i)":
  109578. +double: 1
  109579. +idouble: 1
  109580. +Test "Imaginary part of: ccosh (-89.5 + 0.75 i)":
  109581. +float: 1
  109582. +ifloat: 1
  109583. +Test "Imaginary part of: ccosh (-89.5 - 0.75 i)":
  109584. +float: 1
  109585. +ifloat: 1
  109586. +Test "Real part of: ccosh (0.75 + 1.25 i)":
  109587. +double: 1
  109588. +float: 1
  109589. +idouble: 1
  109590. +ifloat: 1
  109591. +Test "Imaginary part of: ccosh (0.75 + 1.25 i)":
  109592. +float: 1
  109593. +ifloat: 1
  109594. +Test "Imaginary part of: ccosh (1440 + 0x1p-1074 i)":
  109595. +double: 1
  109596. +idouble: 1
  109597. +Test "Imaginary part of: ccosh (710.5 + 0.75 i)":
  109598. +double: 1
  109599. +idouble: 1
  109600. +Test "Imaginary part of: ccosh (710.5 - 0.75 i)":
  109601. +double: 1
  109602. +idouble: 1
  109603. +Test "Imaginary part of: ccosh (89.5 + 0.75 i)":
  109604. +float: 1
  109605. +ifloat: 1
  109606. +Test "Imaginary part of: ccosh (89.5 - 0.75 i)":
  109607. +float: 1
  109608. +ifloat: 1
  109609. +
  109610. +# cexp
  109611. +Test "Imaginary part of: cexp (-2.0 - 3.0 i)":
  109612. +float: 1
  109613. +ifloat: 1
  109614. +Test "Imaginary part of: cexp (-95 + 0.75 i)":
  109615. +double: 1
  109616. +idouble: 1
  109617. +Test "Real part of: cexp (0.75 + 1.25 i)":
  109618. +float: 1
  109619. +ifloat: 1
  109620. +Test "Imaginary part of: cexp (1440 + 0x1p-1074 i)":
  109621. +double: 1
  109622. +idouble: 1
  109623. +Test "Real part of: cexp (50 + 0x1p127 i)":
  109624. +double: 2
  109625. +float: 1
  109626. +idouble: 2
  109627. +ifloat: 1
  109628. +Test "Imaginary part of: cexp (50 + 0x1p127 i)":
  109629. +double: 1
  109630. +idouble: 1
  109631. +Test "Real part of: cexp (500 + 0x1p1023 i)":
  109632. +double: 1
  109633. +idouble: 1
  109634. +Test "Real part of: cexp (709.8125 + 0.75 i)":
  109635. +double: 1
  109636. +idouble: 1
  109637. +Test "Imaginary part of: cexp (709.8125 + 0.75 i)":
  109638. +double: 1
  109639. +idouble: 1
  109640. +Test "Real part of: cexp (88.75 + 0.75 i)":
  109641. +float: 1
  109642. +ifloat: 1
  109643. +Test "Imaginary part of: cexp (88.75 + 0.75 i)":
  109644. +float: 2
  109645. +ifloat: 2
  109646. +
  109647. +# clog
  109648. +Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-1000 i)":
  109649. +double: 1
  109650. +idouble: 1
  109651. +Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-30 i)":
  109652. +double: 1
  109653. +idouble: 1
  109654. +Test "Imaginary part of: clog (-0x1.234566p-40 - 1.0 i)":
  109655. +float: 1
  109656. +ifloat: 1
  109657. +Test "Real part of: clog (-0x1.fp+127 + 0x1p-149 i)":
  109658. +float: 1
  109659. +ifloat: 1
  109660. +Test "Real part of: clog (-0x1.fp+127 - 0x1p-149 i)":
  109661. +float: 1
  109662. +ifloat: 1
  109663. +Test "Real part of: clog (-0x1p-149 + 0x1.fp+127 i)":
  109664. +float: 1
  109665. +ifloat: 1
  109666. +Test "Imaginary part of: clog (-0x1p-149 + 0x1.fp+127 i)":
  109667. +float: 1
  109668. +ifloat: 1
  109669. +Test "Real part of: clog (-0x1p-149 - 0x1.fp+127 i)":
  109670. +float: 1
  109671. +ifloat: 1
  109672. +Test "Imaginary part of: clog (-0x1p-149 - 0x1.fp+127 i)":
  109673. +float: 1
  109674. +ifloat: 1
  109675. +Test "Real part of: clog (0x0.ffffffp0 + 0x0.ffffffp-100 i)":
  109676. +float: 1
  109677. +ifloat: 1
  109678. +Test "Real part of: clog (0x1.000566p0 + 0x1.234p-10 i)":
  109679. +float: 1
  109680. +ifloat: 1
  109681. +Test "Real part of: clog (0x1.fp+127 + 0x1p-149 i)":
  109682. +float: 1
  109683. +ifloat: 1
  109684. +Test "Real part of: clog (0x1.fp+127 - 0x1p-149 i)":
  109685. +float: 1
  109686. +ifloat: 1
  109687. +Test "Real part of: clog (0x1p-1074 + 0x1p-1074 i)":
  109688. +double: 1
  109689. +idouble: 1
  109690. +Test "Real part of: clog (0x1p-147 + 0x1p-147 i)":
  109691. +float: 1
  109692. +ifloat: 1
  109693. +Test "Real part of: clog (0x1p-149 + 0x1.fp+127 i)":
  109694. +float: 1
  109695. +ifloat: 1
  109696. +Test "Real part of: clog (0x1p-149 - 0x1.fp+127 i)":
  109697. +float: 1
  109698. +ifloat: 1
  109699. +Test "Imaginary part of: clog (0x2818p-15 + 0x798fp-15 i)":
  109700. +float: 1
  109701. +ifloat: 1
  109702. +Test "Real part of: clog (1.0 + 0x1.234566p-10 i)":
  109703. +float: 1
  109704. +ifloat: 1
  109705. +
  109706. +# clog10
  109707. +Test "Imaginary part of: clog10 (-0 + inf i)":
  109708. +double: 1
  109709. +float: 1
  109710. +idouble: 1
  109711. +ifloat: 1
  109712. +Test "Imaginary part of: clog10 (-0 - inf i)":
  109713. +double: 1
  109714. +float: 1
  109715. +idouble: 1
  109716. +ifloat: 1
  109717. +Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i)":
  109718. +double: 2
  109719. +idouble: 2
  109720. +Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i)":
  109721. +double: 1
  109722. +idouble: 1
  109723. +Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i)":
  109724. +double: 2
  109725. +idouble: 2
  109726. +Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i)":
  109727. +double: 1
  109728. +idouble: 1
  109729. +Test "Imaginary part of: clog10 (-0x1.fp+1023 + 0x1p-1074 i)":
  109730. +double: 1
  109731. +idouble: 1
  109732. +Test "Imaginary part of: clog10 (-0x1.fp+1023 - 0x1p-1074 i)":
  109733. +double: 1
  109734. +idouble: 1
  109735. +Test "Imaginary part of: clog10 (-0x1.fp+127 + 0x1p-149 i)":
  109736. +double: 1
  109737. +float: 1
  109738. +idouble: 1
  109739. +ifloat: 1
  109740. +Test "Imaginary part of: clog10 (-0x1.fp+127 - 0x1p-149 i)":
  109741. +double: 1
  109742. +float: 1
  109743. +idouble: 1
  109744. +ifloat: 1
  109745. +Test "Imaginary part of: clog10 (-0x1p-1074 + 0x1.fp+1023 i)":
  109746. +double: 1
  109747. +idouble: 1
  109748. +Test "Imaginary part of: clog10 (-0x1p-1074 - 0x1.fp+1023 i)":
  109749. +double: 1
  109750. +idouble: 1
  109751. +Test "Imaginary part of: clog10 (-0x1p-149 + 0x1.fp+127 i)":
  109752. +double: 1
  109753. +idouble: 1
  109754. +Test "Imaginary part of: clog10 (-0x1p-149 - 0x1.fp+127 i)":
  109755. +double: 1
  109756. +idouble: 1
  109757. +Test "Imaginary part of: clog10 (-1.0 + 0x1.234566p-20 i)":
  109758. +double: 1
  109759. +idouble: 1
  109760. +Test "Imaginary part of: clog10 (-2 - 3 i)":
  109761. +double: 1
  109762. +idouble: 1
  109763. +Test "Imaginary part of: clog10 (-3 + inf i)":
  109764. +double: 1
  109765. +float: 1
  109766. +idouble: 1
  109767. +ifloat: 1
  109768. +Test "Imaginary part of: clog10 (-3 - inf i)":
  109769. +double: 1
  109770. +float: 1
  109771. +idouble: 1
  109772. +ifloat: 1
  109773. +Test "Imaginary part of: clog10 (-inf + 0 i)":
  109774. +double: 1
  109775. +float: 1
  109776. +idouble: 1
  109777. +ifloat: 1
  109778. +Test "Imaginary part of: clog10 (-inf + 1 i)":
  109779. +double: 1
  109780. +float: 1
  109781. +idouble: 1
  109782. +ifloat: 1
  109783. +Test "Imaginary part of: clog10 (-inf + inf i)":
  109784. +double: 1
  109785. +idouble: 1
  109786. +Test "Imaginary part of: clog10 (-inf - 0 i)":
  109787. +double: 1
  109788. +float: 1
  109789. +idouble: 1
  109790. +ifloat: 1
  109791. +Test "Imaginary part of: clog10 (-inf - 1 i)":
  109792. +double: 1
  109793. +float: 1
  109794. +idouble: 1
  109795. +ifloat: 1
  109796. +Test "Imaginary part of: clog10 (0 + inf i)":
  109797. +double: 1
  109798. +float: 1
  109799. +idouble: 1
  109800. +ifloat: 1
  109801. +Test "Imaginary part of: clog10 (0 - inf i)":
  109802. +double: 1
  109803. +float: 1
  109804. +idouble: 1
  109805. +ifloat: 1
  109806. +Test "Real part of: clog10 (0x0.fffffffffffff8p0 + 0x0.fffffffffffff8p-1000 i)":
  109807. +double: 1
  109808. +idouble: 1
  109809. +Test "Real part of: clog10 (0x0.ffffffp0 + 0x0.ffffffp-100 i)":
  109810. +double: 1
  109811. +float: 2
  109812. +idouble: 1
  109813. +ifloat: 2
  109814. +Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-10 i)":
  109815. +float: 1
  109816. +ifloat: 1
  109817. +Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-10 i)":
  109818. +double: 1
  109819. +idouble: 1
  109820. +Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-100 i)":
  109821. +float: 1
  109822. +ifloat: 1
  109823. +Test "Imaginary part of: clog10 (0x1.234566p-30 + 1.0 i)":
  109824. +float: 1
  109825. +ifloat: 1
  109826. +Test "Imaginary part of: clog10 (0x1.234566p-50 + 1.0 i)":
  109827. +float: 1
  109828. +ifloat: 1
  109829. +Test "Imaginary part of: clog10 (0x1.234566p-60 + 1.0 i)":
  109830. +double: 1
  109831. +float: 1
  109832. +idouble: 1
  109833. +ifloat: 1
  109834. +Test "Imaginary part of: clog10 (0x1.fffffep+127 + 0x1.fffffep+127 i)":
  109835. +double: 1
  109836. +float: 1
  109837. +idouble: 1
  109838. +ifloat: 1
  109839. +Test "Real part of: clog10 (0x1.fffffep+127 + 1.0 i)":
  109840. +float: 1
  109841. +ifloat: 1
  109842. +Test "Imaginary part of: clog10 (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i)":
  109843. +double: 1
  109844. +idouble: 1
  109845. +Test "Real part of: clog10 (0x10673dd0f2481p-51 + 0x7ef1d17cefbd2p-51 i)":
  109846. +double: 1
  109847. +idouble: 1
  109848. +Test "Real part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i)":
  109849. +double: 1
  109850. +idouble: 1
  109851. +Test "Imaginary part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i)":
  109852. +double: 1
  109853. +idouble: 1
  109854. +Test "Imaginary part of: clog10 (0x164c74eea876p-45 + 0x16f393482f77p-45 i)":
  109855. +double: 1
  109856. +idouble: 1
  109857. +Test "Imaginary part of: clog10 (0x1a6p-10 + 0x3a5p-10 i)":
  109858. +double: 1
  109859. +idouble: 1
  109860. +Test "Imaginary part of: clog10 (0x1p-1073 + 0x1p-1073 i)":
  109861. +double: 1
  109862. +idouble: 1
  109863. +Test "Imaginary part of: clog10 (0x1p-1074 + 0x1.fp+1023 i)":
  109864. +double: 1
  109865. +idouble: 1
  109866. +Test "Real part of: clog10 (0x1p-1074 + 0x1p-1074 i)":
  109867. +double: 1
  109868. +idouble: 1
  109869. +Test "Imaginary part of: clog10 (0x1p-1074 + 0x1p-1074 i)":
  109870. +double: 1
  109871. +idouble: 1
  109872. +Test "Imaginary part of: clog10 (0x1p-1074 - 0x1.fp+1023 i)":
  109873. +double: 1
  109874. +idouble: 1
  109875. +Test "Imaginary part of: clog10 (0x1p-147 + 0x1p-147 i)":
  109876. +double: 1
  109877. +float: 1
  109878. +idouble: 1
  109879. +ifloat: 1
  109880. +Test "Imaginary part of: clog10 (0x1p-149 + 0x1.fp+127 i)":
  109881. +double: 1
  109882. +float: 1
  109883. +idouble: 1
  109884. +ifloat: 1
  109885. +Test "Imaginary part of: clog10 (0x1p-149 + 0x1p-149 i)":
  109886. +double: 1
  109887. +float: 1
  109888. +idouble: 1
  109889. +ifloat: 1
  109890. +Test "Imaginary part of: clog10 (0x1p-149 - 0x1.fp+127 i)":
  109891. +double: 1
  109892. +float: 1
  109893. +idouble: 1
  109894. +ifloat: 1
  109895. +Test "Imaginary part of: clog10 (0x1p-509 + 1.0 i)":
  109896. +double: 1
  109897. +idouble: 1
  109898. +Test "Imaginary part of: clog10 (0x1p-510 + 1.0 i)":
  109899. +double: 1
  109900. +idouble: 1
  109901. +Test "Imaginary part of: clog10 (0x1p-511 + 1.0 i)":
  109902. +double: 1
  109903. +idouble: 1
  109904. +Test "Imaginary part of: clog10 (0x1p-61 + 1.0 i)":
  109905. +double: 1
  109906. +float: 1
  109907. +idouble: 1
  109908. +ifloat: 1
  109909. +Test "Imaginary part of: clog10 (0x1p-62 + 1.0 i)":
  109910. +double: 1
  109911. +float: 1
  109912. +idouble: 1
  109913. +ifloat: 1
  109914. +Test "Imaginary part of: clog10 (0x1p-63 + 1.0 i)":
  109915. +double: 1
  109916. +float: 1
  109917. +idouble: 1
  109918. +ifloat: 1
  109919. +Test "Real part of: clog10 (0x2818p-15 + 0x798fp-15 i)":
  109920. +double: 1
  109921. +float: 1
  109922. +idouble: 1
  109923. +ifloat: 1
  109924. +Test "Imaginary part of: clog10 (0x2818p-15 + 0x798fp-15 i)":
  109925. +float: 1
  109926. +ifloat: 1
  109927. +Test "Real part of: clog10 (0x2dd46725bp-35 + 0x7783a1284p-35 i)":
  109928. +double: 1
  109929. +idouble: 1
  109930. +Test "Real part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i)":
  109931. +float: 1
  109932. +ifloat: 1
  109933. +Test "Imaginary part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i)":
  109934. +double: 1
  109935. +idouble: 1
  109936. +Test "Real part of: clog10 (0x4447d7175p-35 + 0x6c445e00ap-35 i)":
  109937. +double: 1
  109938. +idouble: 1
  109939. +Test "Imaginary part of: clog10 (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i)":
  109940. +double: 1
  109941. +idouble: 1
  109942. +Test "Imaginary part of: clog10 (0x9b57bp-20 + 0xcb7b4p-20 i)":
  109943. +double: 1
  109944. +idouble: 1
  109945. +Test "Real part of: clog10 (0xf2p-10 + 0x3e3p-10 i)":
  109946. +double: 1
  109947. +idouble: 1
  109948. +Test "Imaginary part of: clog10 (0xf2p-10 + 0x3e3p-10 i)":
  109949. +double: 1
  109950. +idouble: 1
  109951. +Test "Imaginary part of: clog10 (0xfe961079616p-45 + 0x1bc37e09e6d1p-45 i)":
  109952. +double: 1
  109953. +idouble: 1
  109954. +Test "Imaginary part of: clog10 (1.0 + 0x1.234566p-10 i)":
  109955. +double: 1
  109956. +idouble: 1
  109957. +Test "Imaginary part of: clog10 (3 + inf i)":
  109958. +double: 1
  109959. +float: 1
  109960. +idouble: 1
  109961. +ifloat: 1
  109962. +Test "Imaginary part of: clog10 (3 - inf i)":
  109963. +double: 1
  109964. +float: 1
  109965. +idouble: 1
  109966. +ifloat: 1
  109967. +Test "Imaginary part of: clog10 (inf + inf i)":
  109968. +double: 1
  109969. +float: 1
  109970. +idouble: 1
  109971. +ifloat: 1
  109972. +Test "Imaginary part of: clog10 (inf - inf i)":
  109973. +double: 1
  109974. +float: 1
  109975. +idouble: 1
  109976. +ifloat: 1
  109977. +
  109978. +# cos
  109979. +Test "cos (0x1p+120)":
  109980. +float: 1
  109981. +ifloat: 1
  109982. +Test "cos (0x1p+127)":
  109983. +float: 1
  109984. +ifloat: 1
  109985. +Test "cos (M_PI_6l * 2.0)":
  109986. +double: 1
  109987. +idouble: 1
  109988. +Test "cos (M_PI_6l * 4.0)":
  109989. +double: 2
  109990. +float: 1
  109991. +idouble: 2
  109992. +ifloat: 1
  109993. +
  109994. +# cos_downward
  109995. +Test "cos_downward (1)":
  109996. +float: 1
  109997. +ifloat: 1
  109998. +Test "cos_downward (2)":
  109999. +float: 1
  110000. +ifloat: 1
  110001. +Test "cos_downward (3)":
  110002. +float: 1
  110003. +ifloat: 1
  110004. +Test "cos_downward (4)":
  110005. +float: 1
  110006. +ifloat: 1
  110007. +Test "cos_downward (5)":
  110008. +float: 1
  110009. +ifloat: 1
  110010. +Test "cos_downward (7)":
  110011. +float: 1
  110012. +ifloat: 1
  110013. +Test "cos_downward (8)":
  110014. +float: 1
  110015. +ifloat: 1
  110016. +
  110017. +# cos_tonearest
  110018. +Test "cos_tonearest (7)":
  110019. +float: 1
  110020. +ifloat: 1
  110021. +
  110022. +# cos_towardzero
  110023. +Test "cos_towardzero (2)":
  110024. +float: 1
  110025. +ifloat: 1
  110026. +Test "cos_towardzero (3)":
  110027. +float: 1
  110028. +ifloat: 1
  110029. +Test "cos_towardzero (5)":
  110030. +float: 1
  110031. +ifloat: 1
  110032. +Test "cos_towardzero (7)":
  110033. +float: 1
  110034. +ifloat: 1
  110035. +Test "cos_towardzero (8)":
  110036. +float: 1
  110037. +ifloat: 1
  110038. +
  110039. +# cos_upward
  110040. +Test "cos_upward (10)":
  110041. +float: 1
  110042. +ifloat: 1
  110043. +Test "cos_upward (6)":
  110044. +float: 1
  110045. +ifloat: 1
  110046. +Test "cos_upward (7)":
  110047. +float: 1
  110048. +ifloat: 1
  110049. +Test "cos_upward (9)":
  110050. +float: 2
  110051. +ifloat: 2
  110052. +
  110053. +# cosh_downward
  110054. +Test "cosh_downward (22)":
  110055. +float: 1
  110056. +ifloat: 1
  110057. +Test "cosh_downward (23)":
  110058. +float: 1
  110059. +ifloat: 1
  110060. +Test "cosh_downward (24)":
  110061. +float: 1
  110062. +ifloat: 1
  110063. +
  110064. +# cosh_towardzero
  110065. +Test "cosh_towardzero (22)":
  110066. +float: 1
  110067. +ifloat: 1
  110068. +Test "cosh_towardzero (23)":
  110069. +float: 1
  110070. +ifloat: 1
  110071. +Test "cosh_towardzero (24)":
  110072. +float: 1
  110073. +ifloat: 1
  110074. +
  110075. +# cpow
  110076. +Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i)":
  110077. +float: 1
  110078. +ifloat: 1
  110079. +Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i)":
  110080. +double: 1
  110081. +float: 4
  110082. +idouble: 1
  110083. +ifloat: 4
  110084. +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i)":
  110085. +double: 2
  110086. +float: 3
  110087. +idouble: 2
  110088. +ifloat: 3
  110089. +Test "Real part of: cpow (2 + 3 i, 4 + 0 i)":
  110090. +double: 1
  110091. +float: 4
  110092. +idouble: 1
  110093. +ifloat: 4
  110094. +Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i)":
  110095. +float: 2
  110096. +ifloat: 2
  110097. +
  110098. +# csin
  110099. +Test "Real part of: csin (-0.75 + 710.5 i)":
  110100. +double: 1
  110101. +idouble: 1
  110102. +Test "Real part of: csin (-0.75 + 89.5 i)":
  110103. +float: 1
  110104. +ifloat: 1
  110105. +Test "Real part of: csin (-0.75 - 710.5 i)":
  110106. +double: 1
  110107. +idouble: 1
  110108. +Test "Real part of: csin (-0.75 - 89.5 i)":
  110109. +float: 1
  110110. +ifloat: 1
  110111. +Test "Real part of: csin (0.75 + 710.5 i)":
  110112. +double: 1
  110113. +idouble: 1
  110114. +Test "Real part of: csin (0.75 + 89.5 i)":
  110115. +float: 1
  110116. +ifloat: 1
  110117. +Test "Real part of: csin (0.75 - 710.5 i)":
  110118. +double: 1
  110119. +idouble: 1
  110120. +Test "Real part of: csin (0.75 - 89.5 i)":
  110121. +float: 1
  110122. +ifloat: 1
  110123. +Test "Real part of: csin (0x1p-1074 + 1440 i)":
  110124. +double: 1
  110125. +idouble: 1
  110126. +
  110127. +# csinh
  110128. +Test "Imaginary part of: csinh (-2 - 3 i)":
  110129. +double: 1
  110130. +idouble: 1
  110131. +Test "Imaginary part of: csinh (-710.5 + 0.75 i)":
  110132. +double: 1
  110133. +idouble: 1
  110134. +Test "Imaginary part of: csinh (-710.5 - 0.75 i)":
  110135. +double: 1
  110136. +idouble: 1
  110137. +Test "Imaginary part of: csinh (-89.5 + 0.75 i)":
  110138. +float: 1
  110139. +ifloat: 1
  110140. +Test "Imaginary part of: csinh (-89.5 - 0.75 i)":
  110141. +float: 1
  110142. +ifloat: 1
  110143. +Test "Real part of: csinh (0.75 + 1.25 i)":
  110144. +float: 1
  110145. +ifloat: 1
  110146. +Test "Imaginary part of: csinh (0.75 + 1.25 i)":
  110147. +float: 1
  110148. +ifloat: 1
  110149. +Test "Imaginary part of: csinh (1440 + 0x1p-1074 i)":
  110150. +double: 1
  110151. +idouble: 1
  110152. +Test "Imaginary part of: csinh (710.5 + 0.75 i)":
  110153. +double: 1
  110154. +idouble: 1
  110155. +Test "Imaginary part of: csinh (710.5 - 0.75 i)":
  110156. +double: 1
  110157. +idouble: 1
  110158. +Test "Imaginary part of: csinh (89.5 + 0.75 i)":
  110159. +float: 1
  110160. +ifloat: 1
  110161. +Test "Imaginary part of: csinh (89.5 - 0.75 i)":
  110162. +float: 1
  110163. +ifloat: 1
  110164. +
  110165. +# csqrt
  110166. +Test "Real part of: csqrt (-0x1.000002p-126 - 0x1.000002p-126 i)":
  110167. +double: 1
  110168. +idouble: 1
  110169. +Test "Real part of: csqrt (-2 + 3 i)":
  110170. +float: 1
  110171. +ifloat: 1
  110172. +Test "Real part of: csqrt (-2 - 3 i)":
  110173. +float: 1
  110174. +ifloat: 1
  110175. +Test "Imaginary part of: csqrt (0x1.000002p-126 + 0x1.000002p-126 i)":
  110176. +double: 1
  110177. +idouble: 1
  110178. +Test "Imaginary part of: csqrt (0x1.fffffep+127 + 1.0 i)":
  110179. +float: 1
  110180. +ifloat: 1
  110181. +Test "Real part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i)":
  110182. +double: 1
  110183. +idouble: 1
  110184. +Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i)":
  110185. +double: 1
  110186. +idouble: 1
  110187. +Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1p+1023 i)":
  110188. +double: 1
  110189. +idouble: 1
  110190. +
  110191. +# ctan
  110192. +Test "Real part of: ctan (-2 - 3 i)":
  110193. +float: 1
  110194. +ifloat: 1
  110195. +Test "Imaginary part of: ctan (-2 - 3 i)":
  110196. +double: 1
  110197. +idouble: 1
  110198. +Test "Imaginary part of: ctan (0.75 + 1.25 i)":
  110199. +double: 1
  110200. +idouble: 1
  110201. +Test "Real part of: ctan (0x1p1023 + 1 i)":
  110202. +double: 1
  110203. +idouble: 1
  110204. +Test "Imaginary part of: ctan (0x1p127 + 1 i)":
  110205. +double: 1
  110206. +idouble: 1
  110207. +Test "Real part of: ctan (0x3.243f6cp-1 + 0 i)":
  110208. +float: 1
  110209. +ifloat: 1
  110210. +
  110211. +# ctan_downward
  110212. +Test "Real part of: ctan_downward (0x1.921fb6p+0 + 0x1p-149 i)":
  110213. +double: 2
  110214. +float: 1
  110215. +idouble: 2
  110216. +ifloat: 1
  110217. +Test "Imaginary part of: ctan_downward (0x1.921fb6p+0 + 0x1p-149 i)":
  110218. +float: 1
  110219. +ifloat: 1
  110220. +
  110221. +# ctan_tonearest
  110222. +Test "Real part of: ctan_tonearest (0x1.921fb6p+0 + 0x1p-149 i)":
  110223. +float: 1
  110224. +ifloat: 1
  110225. +Test "Imaginary part of: ctan_tonearest (0x1.921fb6p+0 + 0x1p-149 i)":
  110226. +float: 1
  110227. +ifloat: 1
  110228. +
  110229. +# ctan_towardzero
  110230. +Test "Real part of: ctan_towardzero (0x1.921fb6p+0 + 0x1p-149 i)":
  110231. +float: 1
  110232. +ifloat: 1
  110233. +Test "Imaginary part of: ctan_towardzero (0x1.921fb6p+0 + 0x1p-149 i)":
  110234. +float: 1
  110235. +ifloat: 1
  110236. +
  110237. +# ctan_upward
  110238. +Test "Real part of: ctan_upward (0x1.921fb54442d18p+0 + 0x1p-1074 i)":
  110239. +double: 1
  110240. +idouble: 1
  110241. +Test "Real part of: ctan_upward (0x1.921fb6p+0 + 0x1p-149 i)":
  110242. +double: 2
  110243. +float: 1
  110244. +idouble: 2
  110245. +ifloat: 1
  110246. +Test "Imaginary part of: ctan_upward (0x1.921fb6p+0 + 0x1p-149 i)":
  110247. +double: 1
  110248. +float: 2
  110249. +idouble: 1
  110250. +ifloat: 2
  110251. +
  110252. +# ctanh
  110253. +Test "Real part of: ctanh (-2 - 3 i)":
  110254. +double: 1
  110255. +float: 1
  110256. +idouble: 1
  110257. +ifloat: 1
  110258. +Test "Imaginary part of: ctanh (-2 - 3 i)":
  110259. +double: 1
  110260. +float: 1
  110261. +idouble: 1
  110262. +ifloat: 1
  110263. +Test "Imaginary part of: ctanh (0 + 0x3.243f6cp-1 i)":
  110264. +float: 1
  110265. +ifloat: 1
  110266. +Test "Imaginary part of: ctanh (0 + pi/4 i)":
  110267. +double: 1
  110268. +float: 1
  110269. +idouble: 1
  110270. +ifloat: 1
  110271. +Test "Real part of: ctanh (0.75 + 1.25 i)":
  110272. +double: 1
  110273. +float: 1
  110274. +idouble: 1
  110275. +ifloat: 1
  110276. +Test "Imaginary part of: ctanh (0.75 + 1.25 i)":
  110277. +float: 2
  110278. +ifloat: 2
  110279. +Test "Imaginary part of: ctanh (1 + 0x1p1023 i)":
  110280. +double: 1
  110281. +idouble: 1
  110282. +Test "Real part of: ctanh (1 + 0x1p127 i)":
  110283. +double: 1
  110284. +idouble: 1
  110285. +
  110286. +# ctanh_downward
  110287. +Test "Real part of: ctanh_downward (0x1p-149 + 0x1.921fb6p+0 i)":
  110288. +float: 1
  110289. +ifloat: 1
  110290. +Test "Imaginary part of: ctanh_downward (0x1p-149 + 0x1.921fb6p+0 i)":
  110291. +double: 2
  110292. +float: 1
  110293. +idouble: 2
  110294. +ifloat: 1
  110295. +
  110296. +# ctanh_tonearest
  110297. +Test "Real part of: ctanh_tonearest (0x1p-149 + 0x1.921fb6p+0 i)":
  110298. +float: 1
  110299. +ifloat: 1
  110300. +Test "Imaginary part of: ctanh_tonearest (0x1p-149 + 0x1.921fb6p+0 i)":
  110301. +float: 1
  110302. +ifloat: 1
  110303. +
  110304. +# ctanh_towardzero
  110305. +Test "Real part of: ctanh_towardzero (0x1p-149 + 0x1.921fb6p+0 i)":
  110306. +float: 1
  110307. +ifloat: 1
  110308. +Test "Imaginary part of: ctanh_towardzero (0x1p-149 + 0x1.921fb6p+0 i)":
  110309. +float: 1
  110310. +ifloat: 1
  110311. +
  110312. +# ctanh_upward
  110313. +Test "Imaginary part of: ctanh_upward (0x1p-1074 + 0x1.921fb54442d18p+0 i)":
  110314. +double: 1
  110315. +idouble: 1
  110316. +Test "Real part of: ctanh_upward (0x1p-149 + 0x1.921fb6p+0 i)":
  110317. +double: 1
  110318. +float: 2
  110319. +idouble: 1
  110320. +ifloat: 2
  110321. +Test "Imaginary part of: ctanh_upward (0x1p-149 + 0x1.921fb6p+0 i)":
  110322. +double: 2
  110323. +float: 1
  110324. +idouble: 2
  110325. +ifloat: 1
  110326. +
  110327. +# erf
  110328. +Test "erf (1.25)":
  110329. +double: 1
  110330. +idouble: 1
  110331. +
  110332. +# erfc
  110333. +Test "erfc (0x1.f7303cp+1)":
  110334. +double: 1
  110335. +idouble: 1
  110336. +Test "erfc (0x1.ffa002p+2)":
  110337. +float: 1
  110338. +ifloat: 1
  110339. +Test "erfc (2.0)":
  110340. +double: 1
  110341. +idouble: 1
  110342. +Test "erfc (4.125)":
  110343. +double: 1
  110344. +idouble: 1
  110345. +
  110346. +# exp10
  110347. +Test "exp10 (-1)":
  110348. +double: 1
  110349. +idouble: 1
  110350. +Test "exp10 (-305)":
  110351. +double: 1
  110352. +idouble: 1
  110353. +Test "exp10 (-36)":
  110354. +double: 1
  110355. +idouble: 1
  110356. +Test "exp10 (3)":
  110357. +double: 1
  110358. +idouble: 1
  110359. +Test "exp10 (36)":
  110360. +double: 1
  110361. +idouble: 1
  110362. +
  110363. +# exp_downward
  110364. +Test "exp_downward (2)":
  110365. +float: 1
  110366. +ifloat: 1
  110367. +Test "exp_downward (3)":
  110368. +float: 1
  110369. +ifloat: 1
  110370. +
  110371. +# exp_towardzero
  110372. +Test "exp_towardzero (2)":
  110373. +float: 1
  110374. +ifloat: 1
  110375. +Test "exp_towardzero (3)":
  110376. +float: 1
  110377. +ifloat: 1
  110378. +
  110379. +# exp_upward
  110380. +Test "exp_upward (1)":
  110381. +float: 1
  110382. +ifloat: 1
  110383. +
  110384. +# expm1
  110385. +Test "expm1 (0.75)":
  110386. +double: 1
  110387. +idouble: 1
  110388. +Test "expm1 (1)":
  110389. +float: 1
  110390. +ifloat: 1
  110391. +Test "expm1 (500.0)":
  110392. +double: 1
  110393. +idouble: 1
  110394. +
  110395. +# gamma
  110396. +Test "gamma (0.7)":
  110397. +double: 1
  110398. +float: 1
  110399. +idouble: 1
  110400. +ifloat: 1
  110401. +Test "gamma (1.2)":
  110402. +double: 1
  110403. +float: 2
  110404. +idouble: 1
  110405. +ifloat: 2
  110406. +
  110407. +# hypot
  110408. +Test "hypot (-0.7, -12.4)":
  110409. +float: 1
  110410. +ifloat: 1
  110411. +Test "hypot (-0.7, 12.4)":
  110412. +float: 1
  110413. +ifloat: 1
  110414. +Test "hypot (-12.4, -0.7)":
  110415. +float: 1
  110416. +ifloat: 1
  110417. +Test "hypot (-12.4, 0.7)":
  110418. +float: 1
  110419. +ifloat: 1
  110420. +Test "hypot (0.7, -12.4)":
  110421. +float: 1
  110422. +ifloat: 1
  110423. +Test "hypot (0.7, 12.4)":
  110424. +float: 1
  110425. +ifloat: 1
  110426. +Test "hypot (12.4, -0.7)":
  110427. +float: 1
  110428. +ifloat: 1
  110429. +Test "hypot (12.4, 0.7)":
  110430. +float: 1
  110431. +ifloat: 1
  110432. +
  110433. +# j0
  110434. +Test "j0 (-4.0)":
  110435. +double: 1
  110436. +float: 1
  110437. +idouble: 1
  110438. +ifloat: 1
  110439. +Test "j0 (0.75)":
  110440. +float: 1
  110441. +ifloat: 1
  110442. +Test "j0 (0x1.d7ce3ap+107)":
  110443. +float: 2
  110444. +ifloat: 2
  110445. +Test "j0 (10.0)":
  110446. +double: 2
  110447. +float: 1
  110448. +idouble: 2
  110449. +ifloat: 1
  110450. +Test "j0 (2.0)":
  110451. +float: 2
  110452. +ifloat: 2
  110453. +Test "j0 (4.0)":
  110454. +double: 1
  110455. +float: 1
  110456. +idouble: 1
  110457. +ifloat: 1
  110458. +Test "j0 (8.0)":
  110459. +float: 1
  110460. +ifloat: 1
  110461. +
  110462. +# j1
  110463. +Test "j1 (0x1.3ffp+74)":
  110464. +double: 1
  110465. +idouble: 1
  110466. +Test "j1 (0x1.ff00000000002p+840)":
  110467. +double: 1
  110468. +idouble: 1
  110469. +Test "j1 (10.0)":
  110470. +float: 2
  110471. +ifloat: 2
  110472. +Test "j1 (2.0)":
  110473. +double: 1
  110474. +idouble: 1
  110475. +Test "j1 (8.0)":
  110476. +double: 1
  110477. +idouble: 1
  110478. +
  110479. +# jn
  110480. +Test "jn (0, -4.0)":
  110481. +double: 1
  110482. +float: 1
  110483. +idouble: 1
  110484. +ifloat: 1
  110485. +Test "jn (0, 0.75)":
  110486. +float: 1
  110487. +ifloat: 1
  110488. +Test "jn (0, 10.0)":
  110489. +double: 2
  110490. +float: 1
  110491. +idouble: 2
  110492. +ifloat: 1
  110493. +Test "jn (0, 2.0)":
  110494. +float: 2
  110495. +ifloat: 2
  110496. +Test "jn (0, 4.0)":
  110497. +double: 1
  110498. +float: 1
  110499. +idouble: 1
  110500. +ifloat: 1
  110501. +Test "jn (0, 8.0)":
  110502. +float: 1
  110503. +ifloat: 1
  110504. +Test "jn (1, 10.0)":
  110505. +float: 2
  110506. +ifloat: 2
  110507. +Test "jn (1, 2.0)":
  110508. +double: 1
  110509. +idouble: 1
  110510. +Test "jn (1, 8.0)":
  110511. +double: 1
  110512. +idouble: 1
  110513. +Test "jn (10, 0.125)":
  110514. +double: 1
  110515. +float: 1
  110516. +idouble: 1
  110517. +ifloat: 1
  110518. +Test "jn (10, 0.75)":
  110519. +double: 1
  110520. +float: 1
  110521. +idouble: 1
  110522. +ifloat: 1
  110523. +Test "jn (10, 10.0)":
  110524. +double: 4
  110525. +float: 3
  110526. +idouble: 4
  110527. +ifloat: 3
  110528. +Test "jn (10, 2.0)":
  110529. +double: 1
  110530. +float: 2
  110531. +idouble: 1
  110532. +ifloat: 2
  110533. +Test "jn (2, 0x1.ffff62p+99)":
  110534. +double: 2
  110535. +float: 2
  110536. +idouble: 2
  110537. +ifloat: 2
  110538. +Test "jn (2, 2.4048255576957729)":
  110539. +double: 2
  110540. +float: 1
  110541. +idouble: 2
  110542. +ifloat: 1
  110543. +Test "jn (3, 0.125)":
  110544. +double: 1
  110545. +float: 1
  110546. +idouble: 1
  110547. +ifloat: 1
  110548. +Test "jn (3, 0.75)":
  110549. +double: 1
  110550. +float: 1
  110551. +idouble: 1
  110552. +ifloat: 1
  110553. +Test "jn (3, 10.0)":
  110554. +double: 3
  110555. +float: 1
  110556. +idouble: 3
  110557. +ifloat: 1
  110558. +Test "jn (3, 2.0)":
  110559. +float: 1
  110560. +ifloat: 1
  110561. +Test "jn (3, 2.4048255576957729)":
  110562. +double: 3
  110563. +idouble: 3
  110564. +Test "jn (4, 2.4048255576957729)":
  110565. +double: 1
  110566. +idouble: 1
  110567. +Test "jn (5, 2.4048255576957729)":
  110568. +double: 3
  110569. +float: 1
  110570. +idouble: 3
  110571. +ifloat: 1
  110572. +Test "jn (6, 2.4048255576957729)":
  110573. +double: 4
  110574. +float: 3
  110575. +idouble: 4
  110576. +ifloat: 3
  110577. +Test "jn (7, 2.4048255576957729)":
  110578. +double: 3
  110579. +float: 5
  110580. +idouble: 3
  110581. +ifloat: 5
  110582. +Test "jn (8, 2.4048255576957729)":
  110583. +double: 3
  110584. +float: 2
  110585. +idouble: 3
  110586. +ifloat: 2
  110587. +Test "jn (9, 2.4048255576957729)":
  110588. +double: 1
  110589. +float: 2
  110590. +idouble: 1
  110591. +ifloat: 2
  110592. +
  110593. +# lgamma
  110594. +Test "lgamma (0.7)":
  110595. +double: 1
  110596. +float: 1
  110597. +idouble: 1
  110598. +ifloat: 1
  110599. +Test "lgamma (1.2)":
  110600. +double: 1
  110601. +float: 2
  110602. +idouble: 1
  110603. +ifloat: 2
  110604. +
  110605. +# log10
  110606. +Test "log10 (0.75)":
  110607. +double: 1
  110608. +float: 2
  110609. +idouble: 1
  110610. +ifloat: 2
  110611. +Test "log10 (e)":
  110612. +float: 1
  110613. +ifloat: 1
  110614. +
  110615. +# log1p
  110616. +Test "log1p (-0.25)":
  110617. +float: 1
  110618. +ifloat: 1
  110619. +
  110620. +# pow
  110621. +Test "pow (0x0.ffffffp0, -0x1p24)":
  110622. +float: 1
  110623. +ifloat: 1
  110624. +Test "pow (0x0.ffffffp0, 0x1p24)":
  110625. +float: 1
  110626. +ifloat: 1
  110627. +Test "pow (0x1.000002p0, 0x1p24)":
  110628. +float: 1
  110629. +ifloat: 1
  110630. +
  110631. +# pow10
  110632. +Test "pow10 (-1)":
  110633. +double: 1
  110634. +idouble: 1
  110635. +Test "pow10 (-305)":
  110636. +double: 1
  110637. +idouble: 1
  110638. +Test "pow10 (-36)":
  110639. +double: 1
  110640. +idouble: 1
  110641. +Test "pow10 (3)":
  110642. +double: 1
  110643. +idouble: 1
  110644. +Test "pow10 (36)":
  110645. +double: 1
  110646. +idouble: 1
  110647. +
  110648. +# pow_downward
  110649. +Test "pow_downward (1.5, 1.03125)":
  110650. +float: 1
  110651. +ifloat: 1
  110652. +
  110653. +# pow_towardzero
  110654. +Test "pow_towardzero (1.5, 1.03125)":
  110655. +float: 1
  110656. +ifloat: 1
  110657. +
  110658. +# pow_upward
  110659. +Test "pow_upward (1.0625, 1.125)":
  110660. +float: 1
  110661. +ifloat: 1
  110662. +
  110663. +# sin_downward
  110664. +Test "sin_downward (10)":
  110665. +float: 1
  110666. +ifloat: 1
  110667. +Test "sin_downward (3)":
  110668. +float: 1
  110669. +ifloat: 1
  110670. +Test "sin_downward (5)":
  110671. +float: 1
  110672. +ifloat: 1
  110673. +Test "sin_downward (6)":
  110674. +float: 1
  110675. +ifloat: 1
  110676. +
  110677. +# sin_tonearest
  110678. +Test "sin_tonearest (1)":
  110679. +float: 1
  110680. +ifloat: 1
  110681. +
  110682. +# sin_towardzero
  110683. +Test "sin_towardzero (1)":
  110684. +float: 1
  110685. +ifloat: 1
  110686. +Test "sin_towardzero (10)":
  110687. +float: 1
  110688. +ifloat: 1
  110689. +Test "sin_towardzero (4)":
  110690. +float: 1
  110691. +ifloat: 1
  110692. +Test "sin_towardzero (5)":
  110693. +float: 1
  110694. +ifloat: 1
  110695. +Test "sin_towardzero (9)":
  110696. +float: 1
  110697. +ifloat: 1
  110698. +
  110699. +# sin_upward
  110700. +Test "sin_upward (1)":
  110701. +float: 1
  110702. +ifloat: 1
  110703. +Test "sin_upward (2)":
  110704. +float: 2
  110705. +ifloat: 2
  110706. +Test "sin_upward (4)":
  110707. +float: 1
  110708. +ifloat: 1
  110709. +Test "sin_upward (9)":
  110710. +float: 1
  110711. +ifloat: 1
  110712. +
  110713. +# sincos
  110714. +Test "sincos (0x1p+120) extra output 2":
  110715. +float: 1
  110716. +ifloat: 1
  110717. +Test "sincos (0x1p+127) extra output 2":
  110718. +float: 1
  110719. +ifloat: 1
  110720. +Test "sincos (M_PI_6l*2.0) extra output 1":
  110721. +double: 1
  110722. +float: 1
  110723. +idouble: 1
  110724. +ifloat: 1
  110725. +Test "sincos (M_PI_6l*2.0) extra output 2":
  110726. +double: 1
  110727. +idouble: 1
  110728. +Test "sincos (pi/6) extra output 2":
  110729. +float: 1
  110730. +ifloat: 1
  110731. +
  110732. +# sinh_downward
  110733. +Test "sinh_downward (22)":
  110734. +float: 1
  110735. +ifloat: 1
  110736. +Test "sinh_downward (23)":
  110737. +float: 1
  110738. +ifloat: 1
  110739. +Test "sinh_downward (24)":
  110740. +float: 1
  110741. +ifloat: 1
  110742. +
  110743. +# sinh_towardzero
  110744. +Test "sinh_towardzero (22)":
  110745. +float: 1
  110746. +ifloat: 1
  110747. +Test "sinh_towardzero (23)":
  110748. +float: 1
  110749. +ifloat: 1
  110750. +Test "sinh_towardzero (24)":
  110751. +float: 1
  110752. +ifloat: 1
  110753. +
  110754. +# tan_downward
  110755. +Test "tan_downward (1)":
  110756. +float: 1
  110757. +ifloat: 1
  110758. +Test "tan_downward (10)":
  110759. +float: 1
  110760. +ifloat: 1
  110761. +Test "tan_downward (2)":
  110762. +float: 1
  110763. +ifloat: 1
  110764. +Test "tan_downward (6)":
  110765. +float: 1
  110766. +ifloat: 1
  110767. +Test "tan_downward (8)":
  110768. +float: 1
  110769. +ifloat: 1
  110770. +Test "tan_downward (9)":
  110771. +float: 1
  110772. +ifloat: 1
  110773. +
  110774. +# tan_towardzero
  110775. +Test "tan_towardzero (10)":
  110776. +float: 1
  110777. +ifloat: 1
  110778. +Test "tan_towardzero (3)":
  110779. +float: 1
  110780. +ifloat: 1
  110781. +Test "tan_towardzero (4)":
  110782. +float: 1
  110783. +ifloat: 1
  110784. +Test "tan_towardzero (5)":
  110785. +float: 1
  110786. +ifloat: 1
  110787. +Test "tan_towardzero (9)":
  110788. +float: 1
  110789. +ifloat: 1
  110790. +
  110791. +# tan_upward
  110792. +Test "tan_upward (1)":
  110793. +float: 1
  110794. +ifloat: 1
  110795. +Test "tan_upward (10)":
  110796. +float: 1
  110797. +ifloat: 1
  110798. +Test "tan_upward (3)":
  110799. +float: 1
  110800. +ifloat: 1
  110801. +Test "tan_upward (5)":
  110802. +float: 1
  110803. +ifloat: 1
  110804. +
  110805. +# tgamma
  110806. +Test "tgamma (-0.5)":
  110807. +double: 1
  110808. +float: 1
  110809. +idouble: 1
  110810. +ifloat: 1
  110811. +Test "tgamma (-0x0.fffffffffffff8p0)":
  110812. +double: 1
  110813. +idouble: 1
  110814. +Test "tgamma (-0x0.ffffffp0)":
  110815. +float: 1
  110816. +ifloat: 1
  110817. +Test "tgamma (-0x1.000002p0)":
  110818. +double: 2
  110819. +idouble: 2
  110820. +Test "tgamma (-0x1.0a32a2p+5)":
  110821. +float: 2
  110822. +ifloat: 2
  110823. +Test "tgamma (-0x13.ffffep0)":
  110824. +float: 2
  110825. +ifloat: 2
  110826. +Test "tgamma (-0x14.000000000001p0)":
  110827. +double: 1
  110828. +idouble: 1
  110829. +Test "tgamma (-0x14.00002p0)":
  110830. +float: 1
  110831. +ifloat: 1
  110832. +Test "tgamma (-0x1d.ffffep0)":
  110833. +double: 1
  110834. +float: 1
  110835. +idouble: 1
  110836. +ifloat: 1
  110837. +Test "tgamma (-0x1e.000000000001p0)":
  110838. +double: 3
  110839. +idouble: 3
  110840. +Test "tgamma (-0x1e.00002p0)":
  110841. +double: 1
  110842. +float: 1
  110843. +idouble: 1
  110844. +ifloat: 1
  110845. +Test "tgamma (-0x2.0000000000002p0)":
  110846. +double: 1
  110847. +idouble: 1
  110848. +Test "tgamma (-0x2.000004p0)":
  110849. +double: 2
  110850. +float: 1
  110851. +idouble: 2
  110852. +ifloat: 1
  110853. +Test "tgamma (-0x2.fffffcp0)":
  110854. +double: 1
  110855. +float: 1
  110856. +idouble: 1
  110857. +ifloat: 1
  110858. +Test "tgamma (-0x27.fffffffffffep0)":
  110859. +double: 1
  110860. +idouble: 1
  110861. +Test "tgamma (-0x28.000000000002p0)":
  110862. +double: 1
  110863. +idouble: 1
  110864. +Test "tgamma (-0x28.00004p0)":
  110865. +double: 2
  110866. +idouble: 2
  110867. +Test "tgamma (-0x29.00004p0)":
  110868. +double: 1
  110869. +idouble: 1
  110870. +Test "tgamma (-0x29.ffffcp0)":
  110871. +double: 1
  110872. +idouble: 1
  110873. +Test "tgamma (-0x3.000004p0)":
  110874. +double: 2
  110875. +float: 1
  110876. +idouble: 2
  110877. +ifloat: 1
  110878. +Test "tgamma (-0x3.fffffcp0)":
  110879. +double: 1
  110880. +float: 1
  110881. +idouble: 1
  110882. +ifloat: 1
  110883. +Test "tgamma (-0x3.ffffffffffffep0)":
  110884. +double: 2
  110885. +idouble: 2
  110886. +Test "tgamma (-0x31.fffffffffffep0)":
  110887. +double: 3
  110888. +idouble: 3
  110889. +Test "tgamma (-0x4.000008p0)":
  110890. +float: 1
  110891. +ifloat: 1
  110892. +Test "tgamma (-0x4.fffff8p0)":
  110893. +double: 1
  110894. +idouble: 1
  110895. +Test "tgamma (-0x4.ffffffffffffcp0)":
  110896. +double: 1
  110897. +idouble: 1
  110898. +Test "tgamma (-0x5.000008p0)":
  110899. +double: 1
  110900. +float: 1
  110901. +idouble: 1
  110902. +ifloat: 1
  110903. +Test "tgamma (-0x5.ffffffffffffcp0)":
  110904. +double: 1
  110905. +idouble: 1
  110906. +Test "tgamma (-0x6.000008p0)":
  110907. +float: 2
  110908. +ifloat: 2
  110909. +Test "tgamma (-0x6.fffff8p0)":
  110910. +double: 2
  110911. +float: 1
  110912. +idouble: 2
  110913. +ifloat: 1
  110914. +Test "tgamma (-0x6.ffffffffffffcp0)":
  110915. +double: 4
  110916. +idouble: 4
  110917. +Test "tgamma (-0x63.fffffffffffcp0)":
  110918. +double: 2
  110919. +idouble: 2
  110920. +Test "tgamma (-0x64.000000000004p0)":
  110921. +double: 1
  110922. +idouble: 1
  110923. +Test "tgamma (-0x7.0000000000004p0)":
  110924. +double: 3
  110925. +idouble: 3
  110926. +Test "tgamma (-0x7.000008p0)":
  110927. +double: 1
  110928. +float: 1
  110929. +idouble: 1
  110930. +ifloat: 1
  110931. +Test "tgamma (-0x7.fffff8p0)":
  110932. +double: 3
  110933. +float: 1
  110934. +idouble: 3
  110935. +ifloat: 1
  110936. +Test "tgamma (-0x7.ffffffffffffcp0)":
  110937. +double: 3
  110938. +idouble: 3
  110939. +Test "tgamma (-0x8.00001p0)":
  110940. +double: 2
  110941. +idouble: 2
  110942. +Test "tgamma (-0x9.ffffffffffff8p0)":
  110943. +double: 1
  110944. +idouble: 1
  110945. +Test "tgamma (-0x9.fffffp0)":
  110946. +float: 1
  110947. +ifloat: 1
  110948. +Test "tgamma (-0x96.000000000008p0)":
  110949. +double: 1
  110950. +idouble: 1
  110951. +Test "tgamma (-0xa.00001p0)":
  110952. +double: 1
  110953. +idouble: 1
  110954. +Test "tgamma (-2.5)":
  110955. +double: 1
  110956. +float: 2
  110957. +idouble: 1
  110958. +ifloat: 2
  110959. +Test "tgamma (-3.5)":
  110960. +double: 1
  110961. +float: 1
  110962. +idouble: 1
  110963. +ifloat: 1
  110964. +Test "tgamma (-4.5)":
  110965. +double: 1
  110966. +float: 1
  110967. +idouble: 1
  110968. +ifloat: 1
  110969. +Test "tgamma (-5.5)":
  110970. +double: 1
  110971. +idouble: 1
  110972. +Test "tgamma (-6.5)":
  110973. +float: 1
  110974. +ifloat: 1
  110975. +Test "tgamma (-7.5)":
  110976. +double: 2
  110977. +float: 1
  110978. +idouble: 2
  110979. +ifloat: 1
  110980. +Test "tgamma (-8.5)":
  110981. +double: 1
  110982. +float: 1
  110983. +idouble: 1
  110984. +ifloat: 1
  110985. +Test "tgamma (-9.5)":
  110986. +double: 1
  110987. +float: 1
  110988. +idouble: 1
  110989. +ifloat: 1
  110990. +Test "tgamma (0.5)":
  110991. +float: 1
  110992. +ifloat: 1
  110993. +Test "tgamma (0.7)":
  110994. +double: 1
  110995. +float: 1
  110996. +idouble: 1
  110997. +ifloat: 1
  110998. +Test "tgamma (0x1.fffffep0)":
  110999. +float: 1
  111000. +ifloat: 1
  111001. +Test "tgamma (0x1.fffffffffffffp0)":
  111002. +double: 1
  111003. +idouble: 1
  111004. +Test "tgamma (0x1p-24)":
  111005. +float: 1
  111006. +ifloat: 1
  111007. +Test "tgamma (0x1p-53)":
  111008. +double: 1
  111009. +idouble: 1
  111010. +Test "tgamma (0x2.30a43cp+4)":
  111011. +double: 1
  111012. +float: 2
  111013. +idouble: 1
  111014. +ifloat: 2
  111015. +Test "tgamma (0x2.fffffcp0)":
  111016. +float: 3
  111017. +ifloat: 3
  111018. +Test "tgamma (0x3.fffffcp0)":
  111019. +float: 1
  111020. +ifloat: 1
  111021. +Test "tgamma (0x3.ffffffffffffep0)":
  111022. +double: 1
  111023. +idouble: 1
  111024. +Test "tgamma (0x4.0000000000004p0)":
  111025. +double: 1
  111026. +idouble: 1
  111027. +Test "tgamma (0x4.ffffffffffffcp0)":
  111028. +double: 1
  111029. +idouble: 1
  111030. +Test "tgamma (0x5.0000000000004p0)":
  111031. +double: 1
  111032. +idouble: 1
  111033. +Test "tgamma (0x5.000008p0)":
  111034. +float: 2
  111035. +ifloat: 2
  111036. +Test "tgamma (0x5.fffff8p0)":
  111037. +double: 1
  111038. +float: 1
  111039. +idouble: 1
  111040. +ifloat: 1
  111041. +Test "tgamma (0x6.0000000000004p0)":
  111042. +double: 1
  111043. +idouble: 1
  111044. +Test "tgamma (0x6.000008p0)":
  111045. +float: 2
  111046. +ifloat: 2
  111047. +Test "tgamma (0x6.fffff8p0)":
  111048. +double: 1
  111049. +idouble: 1
  111050. +Test "tgamma (0x6.ffffffffffffcp0)":
  111051. +double: 4
  111052. +idouble: 4
  111053. +Test "tgamma (0x7.0000000000004p0)":
  111054. +double: 4
  111055. +idouble: 4
  111056. +Test "tgamma (0x7.000008p0)":
  111057. +double: 1
  111058. +float: 1
  111059. +idouble: 1
  111060. +ifloat: 1
  111061. +Test "tgamma (0x7.fffff8p0)":
  111062. +double: 2
  111063. +float: 1
  111064. +idouble: 2
  111065. +ifloat: 1
  111066. +Test "tgamma (0x7.ffffffffffffcp0)":
  111067. +double: 2
  111068. +idouble: 2
  111069. +Test "tgamma (0x8.00001p0)":
  111070. +double: 2
  111071. +idouble: 2
  111072. +Test "tgamma (0xa.b9fd72b0fb238p+4)":
  111073. +double: 1
  111074. +idouble: 1
  111075. +Test "tgamma (10)":
  111076. +double: 1
  111077. +float: 1
  111078. +idouble: 1
  111079. +ifloat: 1
  111080. +Test "tgamma (18.5)":
  111081. +double: 1
  111082. +float: 1
  111083. +idouble: 1
  111084. +ifloat: 1
  111085. +Test "tgamma (19.5)":
  111086. +double: 2
  111087. +idouble: 2
  111088. +Test "tgamma (2.5)":
  111089. +float: 2
  111090. +ifloat: 2
  111091. +Test "tgamma (23.5)":
  111092. +double: 1
  111093. +float: 1
  111094. +idouble: 1
  111095. +ifloat: 1
  111096. +Test "tgamma (29.5)":
  111097. +double: 1
  111098. +float: 1
  111099. +idouble: 1
  111100. +ifloat: 1
  111101. +Test "tgamma (3)":
  111102. +float: 1
  111103. +ifloat: 1
  111104. +Test "tgamma (3.5)":
  111105. +float: 2
  111106. +ifloat: 2
  111107. +Test "tgamma (30.5)":
  111108. +float: 1
  111109. +ifloat: 1
  111110. +Test "tgamma (33.5)":
  111111. +float: 1
  111112. +ifloat: 1
  111113. +Test "tgamma (34.5)":
  111114. +double: 1
  111115. +float: 2
  111116. +idouble: 1
  111117. +ifloat: 2
  111118. +Test "tgamma (4)":
  111119. +float: 1
  111120. +ifloat: 1
  111121. +Test "tgamma (4.5)":
  111122. +double: 1
  111123. +float: 1
  111124. +idouble: 1
  111125. +ifloat: 1
  111126. +Test "tgamma (6)":
  111127. +float: 1
  111128. +ifloat: 1
  111129. +Test "tgamma (6.5)":
  111130. +float: 1
  111131. +ifloat: 1
  111132. +Test "tgamma (7)":
  111133. +double: 1
  111134. +idouble: 1
  111135. +Test "tgamma (7.5)":
  111136. +double: 2
  111137. +float: 1
  111138. +idouble: 2
  111139. +ifloat: 1
  111140. +Test "tgamma (8)":
  111141. +double: 1
  111142. +idouble: 1
  111143. +Test "tgamma (8.5)":
  111144. +double: 1
  111145. +float: 1
  111146. +idouble: 1
  111147. +ifloat: 1
  111148. +Test "tgamma (9)":
  111149. +double: 1
  111150. +idouble: 1
  111151. +Test "tgamma (9.5)":
  111152. +double: 1
  111153. +idouble: 1
  111154. +
  111155. +# y0
  111156. +Test "y0 (0x1.3ffp+74)":
  111157. +double: 1
  111158. +idouble: 1
  111159. +Test "y0 (0x1.ff00000000002p+840)":
  111160. +double: 1
  111161. +idouble: 1
  111162. +Test "y0 (0x1p-10)":
  111163. +double: 1
  111164. +idouble: 1
  111165. +Test "y0 (0x1p-110)":
  111166. +double: 1
  111167. +idouble: 1
  111168. +Test "y0 (0x1p-20)":
  111169. +float: 1
  111170. +ifloat: 1
  111171. +Test "y0 (0x1p-30)":
  111172. +float: 1
  111173. +ifloat: 1
  111174. +Test "y0 (0x1p-40)":
  111175. +double: 1
  111176. +float: 1
  111177. +idouble: 1
  111178. +ifloat: 1
  111179. +Test "y0 (0x1p-50)":
  111180. +float: 1
  111181. +ifloat: 1
  111182. +Test "y0 (0x1p-70)":
  111183. +double: 1
  111184. +idouble: 1
  111185. +Test "y0 (0x1p-80)":
  111186. +double: 1
  111187. +float: 1
  111188. +idouble: 1
  111189. +ifloat: 1
  111190. +Test "y0 (1.0)":
  111191. +double: 2
  111192. +float: 1
  111193. +idouble: 2
  111194. +ifloat: 1
  111195. +Test "y0 (1.5)":
  111196. +double: 2
  111197. +float: 1
  111198. +idouble: 2
  111199. +ifloat: 1
  111200. +Test "y0 (10.0)":
  111201. +float: 1
  111202. +ifloat: 1
  111203. +Test "y0 (8.0)":
  111204. +double: 1
  111205. +float: 1
  111206. +idouble: 1
  111207. +ifloat: 1
  111208. +
  111209. +# y1
  111210. +Test "y1 (0.125)":
  111211. +double: 1
  111212. +idouble: 1
  111213. +Test "y1 (0x1.27e204p+99)":
  111214. +double: 1
  111215. +idouble: 1
  111216. +Test "y1 (0x1p-10)":
  111217. +double: 1
  111218. +idouble: 1
  111219. +Test "y1 (1.5)":
  111220. +float: 1
  111221. +ifloat: 1
  111222. +Test "y1 (10.0)":
  111223. +double: 3
  111224. +float: 1
  111225. +idouble: 3
  111226. +ifloat: 1
  111227. +Test "y1 (2.0)":
  111228. +double: 1
  111229. +float: 1
  111230. +idouble: 1
  111231. +ifloat: 1
  111232. +Test "y1 (8.0)":
  111233. +double: 1
  111234. +float: 2
  111235. +idouble: 1
  111236. +ifloat: 2
  111237. +
  111238. +# yn
  111239. +Test "yn (0, 1.0)":
  111240. +double: 2
  111241. +float: 1
  111242. +idouble: 2
  111243. +ifloat: 1
  111244. +Test "yn (0, 1.5)":
  111245. +double: 2
  111246. +float: 1
  111247. +idouble: 2
  111248. +ifloat: 1
  111249. +Test "yn (0, 10.0)":
  111250. +float: 1
  111251. +ifloat: 1
  111252. +Test "yn (0, 8.0)":
  111253. +double: 1
  111254. +float: 1
  111255. +idouble: 1
  111256. +ifloat: 1
  111257. +Test "yn (1, 0.125)":
  111258. +double: 1
  111259. +idouble: 1
  111260. +Test "yn (1, 1.5)":
  111261. +float: 1
  111262. +ifloat: 1
  111263. +Test "yn (1, 10.0)":
  111264. +double: 3
  111265. +float: 1
  111266. +idouble: 3
  111267. +ifloat: 1
  111268. +Test "yn (1, 2.0)":
  111269. +double: 1
  111270. +float: 1
  111271. +idouble: 1
  111272. +ifloat: 1
  111273. +Test "yn (1, 8.0)":
  111274. +double: 1
  111275. +float: 2
  111276. +idouble: 1
  111277. +ifloat: 2
  111278. +Test "yn (10, 0.125)":
  111279. +double: 1
  111280. +idouble: 1
  111281. +Test "yn (10, 0.75)":
  111282. +double: 1
  111283. +float: 1
  111284. +idouble: 1
  111285. +ifloat: 1
  111286. +Test "yn (10, 1.0)":
  111287. +double: 1
  111288. +idouble: 1
  111289. +Test "yn (10, 10.0)":
  111290. +double: 1
  111291. +float: 1
  111292. +idouble: 1
  111293. +ifloat: 1
  111294. +Test "yn (10, 2.0)":
  111295. +double: 2
  111296. +idouble: 2
  111297. +Test "yn (3, 0.125)":
  111298. +double: 1
  111299. +idouble: 1
  111300. +Test "yn (3, 0.75)":
  111301. +double: 1
  111302. +float: 1
  111303. +idouble: 1
  111304. +ifloat: 1
  111305. +Test "yn (3, 10.0)":
  111306. +double: 1
  111307. +float: 1
  111308. +idouble: 1
  111309. +ifloat: 1
  111310. +Test "yn (3, 2.0)":
  111311. +double: 1
  111312. +idouble: 1
  111313. +
  111314. +# Maximal error of functions:
  111315. +Function: "acos_downward":
  111316. +double: 1
  111317. +float: 1
  111318. +idouble: 1
  111319. +ifloat: 1
  111320. +
  111321. +Function: "acos_towardzero":
  111322. +double: 1
  111323. +float: 1
  111324. +idouble: 1
  111325. +ifloat: 1
  111326. +
  111327. +Function: "asin_downward":
  111328. +double: 1
  111329. +float: 1
  111330. +idouble: 1
  111331. +ifloat: 1
  111332. +
  111333. +Function: "asin_towardzero":
  111334. +double: 1
  111335. +float: 1
  111336. +idouble: 1
  111337. +ifloat: 1
  111338. +
  111339. +Function: "asin_upward":
  111340. +float: 1
  111341. +ifloat: 1
  111342. +
  111343. +Function: "atan2":
  111344. +float: 1
  111345. +ifloat: 1
  111346. +
  111347. +Function: "atanh":
  111348. +float: 1
  111349. +ifloat: 1
  111350. +
  111351. +Function: Real part of "cacos":
  111352. +double: 1
  111353. +float: 2
  111354. +idouble: 1
  111355. +ifloat: 2
  111356. +
  111357. +Function: Imaginary part of "cacos":
  111358. +double: 1
  111359. +float: 2
  111360. +idouble: 1
  111361. +ifloat: 2
  111362. +
  111363. +Function: Real part of "cacosh":
  111364. +double: 1
  111365. +float: 2
  111366. +idouble: 1
  111367. +ifloat: 2
  111368. +
  111369. +Function: Imaginary part of "cacosh":
  111370. +double: 1
  111371. +float: 2
  111372. +idouble: 1
  111373. +ifloat: 2
  111374. +
  111375. +Function: Real part of "casin":
  111376. +double: 1
  111377. +float: 1
  111378. +idouble: 1
  111379. +ifloat: 1
  111380. +
  111381. +Function: Imaginary part of "casin":
  111382. +double: 1
  111383. +float: 2
  111384. +idouble: 1
  111385. +ifloat: 2
  111386. +
  111387. +Function: Real part of "casinh":
  111388. +double: 1
  111389. +float: 2
  111390. +idouble: 1
  111391. +ifloat: 2
  111392. +
  111393. +Function: Imaginary part of "casinh":
  111394. +double: 1
  111395. +float: 1
  111396. +idouble: 1
  111397. +ifloat: 1
  111398. +
  111399. +Function: Real part of "catan":
  111400. +float: 1
  111401. +ifloat: 1
  111402. +
  111403. +Function: Imaginary part of "catan":
  111404. +double: 1
  111405. +float: 1
  111406. +idouble: 1
  111407. +ifloat: 1
  111408. +
  111409. +Function: Real part of "catanh":
  111410. +double: 1
  111411. +float: 1
  111412. +idouble: 1
  111413. +ifloat: 1
  111414. +
  111415. +Function: Imaginary part of "catanh":
  111416. +float: 1
  111417. +ifloat: 1
  111418. +
  111419. +Function: "cbrt":
  111420. +double: 1
  111421. +idouble: 1
  111422. +
  111423. +Function: Real part of "ccos":
  111424. +double: 1
  111425. +float: 1
  111426. +idouble: 1
  111427. +ifloat: 1
  111428. +
  111429. +Function: Imaginary part of "ccos":
  111430. +double: 1
  111431. +float: 1
  111432. +idouble: 1
  111433. +ifloat: 1
  111434. +
  111435. +Function: Real part of "ccosh":
  111436. +double: 1
  111437. +float: 1
  111438. +idouble: 1
  111439. +ifloat: 1
  111440. +
  111441. +Function: Imaginary part of "ccosh":
  111442. +double: 1
  111443. +float: 1
  111444. +idouble: 1
  111445. +ifloat: 1
  111446. +
  111447. +Function: Real part of "cexp":
  111448. +double: 2
  111449. +float: 1
  111450. +idouble: 2
  111451. +ifloat: 1
  111452. +
  111453. +Function: Imaginary part of "cexp":
  111454. +double: 1
  111455. +float: 2
  111456. +idouble: 1
  111457. +ifloat: 2
  111458. +
  111459. +Function: Real part of "clog":
  111460. +double: 1
  111461. +float: 1
  111462. +idouble: 1
  111463. +ifloat: 1
  111464. +
  111465. +Function: Imaginary part of "clog":
  111466. +float: 1
  111467. +ifloat: 1
  111468. +
  111469. +Function: Real part of "clog10":
  111470. +double: 2
  111471. +float: 2
  111472. +idouble: 2
  111473. +ifloat: 2
  111474. +
  111475. +Function: Imaginary part of "clog10":
  111476. +double: 1
  111477. +float: 1
  111478. +idouble: 1
  111479. +ifloat: 1
  111480. +
  111481. +Function: "cos":
  111482. +double: 2
  111483. +float: 1
  111484. +idouble: 2
  111485. +ifloat: 1
  111486. +
  111487. +Function: "cos_downward":
  111488. +float: 1
  111489. +ifloat: 1
  111490. +
  111491. +Function: "cos_tonearest":
  111492. +float: 1
  111493. +ifloat: 1
  111494. +
  111495. +Function: "cos_towardzero":
  111496. +float: 1
  111497. +ifloat: 1
  111498. +
  111499. +Function: "cos_upward":
  111500. +float: 2
  111501. +ifloat: 2
  111502. +
  111503. +Function: "cosh_downward":
  111504. +float: 1
  111505. +ifloat: 1
  111506. +
  111507. +Function: "cosh_towardzero":
  111508. +float: 1
  111509. +ifloat: 1
  111510. +
  111511. +Function: Real part of "cpow":
  111512. +double: 2
  111513. +float: 4
  111514. +idouble: 2
  111515. +ifloat: 4
  111516. +
  111517. +Function: Imaginary part of "cpow":
  111518. +float: 2
  111519. +ifloat: 2
  111520. +
  111521. +Function: Real part of "csin":
  111522. +double: 1
  111523. +float: 1
  111524. +idouble: 1
  111525. +ifloat: 1
  111526. +
  111527. +Function: Real part of "csinh":
  111528. +float: 1
  111529. +ifloat: 1
  111530. +
  111531. +Function: Imaginary part of "csinh":
  111532. +double: 1
  111533. +float: 1
  111534. +idouble: 1
  111535. +ifloat: 1
  111536. +
  111537. +Function: Real part of "csqrt":
  111538. +double: 1
  111539. +float: 1
  111540. +idouble: 1
  111541. +ifloat: 1
  111542. +
  111543. +Function: Imaginary part of "csqrt":
  111544. +double: 1
  111545. +float: 1
  111546. +idouble: 1
  111547. +ifloat: 1
  111548. +
  111549. +Function: Real part of "ctan":
  111550. +double: 1
  111551. +float: 1
  111552. +idouble: 1
  111553. +ifloat: 1
  111554. +
  111555. +Function: Imaginary part of "ctan":
  111556. +double: 1
  111557. +idouble: 1
  111558. +
  111559. +Function: Real part of "ctan_downward":
  111560. +double: 2
  111561. +float: 1
  111562. +idouble: 2
  111563. +ifloat: 1
  111564. +
  111565. +Function: Imaginary part of "ctan_downward":
  111566. +float: 1
  111567. +ifloat: 1
  111568. +
  111569. +Function: Real part of "ctan_tonearest":
  111570. +float: 1
  111571. +ifloat: 1
  111572. +
  111573. +Function: Imaginary part of "ctan_tonearest":
  111574. +float: 1
  111575. +ifloat: 1
  111576. +
  111577. +Function: Real part of "ctan_towardzero":
  111578. +float: 1
  111579. +ifloat: 1
  111580. +
  111581. +Function: Imaginary part of "ctan_towardzero":
  111582. +float: 1
  111583. +ifloat: 1
  111584. +
  111585. +Function: Real part of "ctan_upward":
  111586. +double: 2
  111587. +float: 1
  111588. +idouble: 2
  111589. +ifloat: 1
  111590. +
  111591. +Function: Imaginary part of "ctan_upward":
  111592. +double: 1
  111593. +float: 2
  111594. +idouble: 1
  111595. +ifloat: 2
  111596. +
  111597. +Function: Real part of "ctanh":
  111598. +double: 1
  111599. +float: 1
  111600. +idouble: 1
  111601. +ifloat: 1
  111602. +
  111603. +Function: Imaginary part of "ctanh":
  111604. +double: 1
  111605. +float: 2
  111606. +idouble: 1
  111607. +ifloat: 2
  111608. +
  111609. +Function: Real part of "ctanh_downward":
  111610. +float: 1
  111611. +ifloat: 1
  111612. +
  111613. +Function: Imaginary part of "ctanh_downward":
  111614. +double: 2
  111615. +float: 1
  111616. +idouble: 2
  111617. +ifloat: 1
  111618. +
  111619. +Function: Real part of "ctanh_tonearest":
  111620. +float: 1
  111621. +ifloat: 1
  111622. +
  111623. +Function: Imaginary part of "ctanh_tonearest":
  111624. +float: 1
  111625. +ifloat: 1
  111626. +
  111627. +Function: Real part of "ctanh_towardzero":
  111628. +float: 1
  111629. +ifloat: 1
  111630. +
  111631. +Function: Imaginary part of "ctanh_towardzero":
  111632. +float: 1
  111633. +ifloat: 1
  111634. +
  111635. +Function: Real part of "ctanh_upward":
  111636. +double: 1
  111637. +float: 2
  111638. +idouble: 1
  111639. +ifloat: 2
  111640. +
  111641. +Function: Imaginary part of "ctanh_upward":
  111642. +double: 2
  111643. +float: 1
  111644. +idouble: 2
  111645. +ifloat: 1
  111646. +
  111647. +Function: "erf":
  111648. +double: 1
  111649. +idouble: 1
  111650. +
  111651. +Function: "erfc":
  111652. +double: 1
  111653. +float: 1
  111654. +idouble: 1
  111655. +ifloat: 1
  111656. +
  111657. +Function: "exp10":
  111658. +double: 1
  111659. +idouble: 1
  111660. +
  111661. +Function: "exp_downward":
  111662. +float: 1
  111663. +ifloat: 1
  111664. +
  111665. +Function: "exp_towardzero":
  111666. +float: 1
  111667. +ifloat: 1
  111668. +
  111669. +Function: "exp_upward":
  111670. +float: 1
  111671. +ifloat: 1
  111672. +
  111673. +Function: "expm1":
  111674. +double: 1
  111675. +float: 1
  111676. +idouble: 1
  111677. +ifloat: 1
  111678. +
  111679. +Function: "gamma":
  111680. +double: 1
  111681. +float: 2
  111682. +idouble: 1
  111683. +ifloat: 2
  111684. +
  111685. +Function: "hypot":
  111686. +float: 1
  111687. +ifloat: 1
  111688. +
  111689. +Function: "j0":
  111690. +double: 2
  111691. +float: 2
  111692. +idouble: 2
  111693. +ifloat: 2
  111694. +
  111695. +Function: "j1":
  111696. +double: 1
  111697. +float: 2
  111698. +idouble: 1
  111699. +ifloat: 2
  111700. +
  111701. +Function: "jn":
  111702. +double: 4
  111703. +float: 5
  111704. +idouble: 4
  111705. +ifloat: 5
  111706. +
  111707. +Function: "lgamma":
  111708. +double: 1
  111709. +float: 2
  111710. +idouble: 1
  111711. +ifloat: 2
  111712. +
  111713. +Function: "log10":
  111714. +double: 1
  111715. +float: 2
  111716. +idouble: 1
  111717. +ifloat: 2
  111718. +
  111719. +Function: "log1p":
  111720. +float: 1
  111721. +ifloat: 1
  111722. +
  111723. +Function: "pow":
  111724. +float: 1
  111725. +ifloat: 1
  111726. +
  111727. +Function: "pow10":
  111728. +double: 1
  111729. +idouble: 1
  111730. +
  111731. +Function: "pow_downward":
  111732. +float: 1
  111733. +ifloat: 1
  111734. +
  111735. +Function: "pow_towardzero":
  111736. +float: 1
  111737. +ifloat: 1
  111738. +
  111739. +Function: "pow_upward":
  111740. +float: 1
  111741. +ifloat: 1
  111742. +
  111743. +Function: "sin_downward":
  111744. +float: 1
  111745. +ifloat: 1
  111746. +
  111747. +Function: "sin_tonearest":
  111748. +float: 1
  111749. +ifloat: 1
  111750. +
  111751. +Function: "sin_towardzero":
  111752. +float: 1
  111753. +ifloat: 1
  111754. +
  111755. +Function: "sin_upward":
  111756. +float: 2
  111757. +ifloat: 2
  111758. +
  111759. +Function: "sincos":
  111760. +double: 1
  111761. +float: 1
  111762. +idouble: 1
  111763. +ifloat: 1
  111764. +
  111765. +Function: "sinh_downward":
  111766. +float: 1
  111767. +ifloat: 1
  111768. +
  111769. +Function: "sinh_towardzero":
  111770. +float: 1
  111771. +ifloat: 1
  111772. +
  111773. +Function: "tan":
  111774. +double: 1
  111775. +idouble: 1
  111776. +
  111777. +Function: "tan_downward":
  111778. +float: 1
  111779. +ifloat: 1
  111780. +
  111781. +Function: "tan_towardzero":
  111782. +float: 1
  111783. +ifloat: 1
  111784. +
  111785. +Function: "tan_upward":
  111786. +float: 1
  111787. +ifloat: 1
  111788. +
  111789. +Function: "tgamma":
  111790. +double: 4
  111791. +float: 3
  111792. +idouble: 4
  111793. +ifloat: 3
  111794. +
  111795. +Function: "y0":
  111796. +double: 2
  111797. +float: 1
  111798. +idouble: 2
  111799. +ifloat: 1
  111800. +
  111801. +Function: "y1":
  111802. +double: 3
  111803. +float: 2
  111804. +idouble: 3
  111805. +ifloat: 2
  111806. +
  111807. +Function: "yn":
  111808. +double: 3
  111809. +float: 2
  111810. +idouble: 3
  111811. +ifloat: 2
  111812. +
  111813. +# end of automatic generation
  111814. diff -Nur uClibc-0.9.33.2/test/math/libm-test-ulps-mips64 uClibc-git/test/math/libm-test-ulps-mips64
  111815. --- uClibc-0.9.33.2/test/math/libm-test-ulps-mips64 1970-01-01 01:00:00.000000000 +0100
  111816. +++ uClibc-git/test/math/libm-test-ulps-mips64 2014-07-25 20:36:11.517359363 +0200
  111817. @@ -0,0 +1,9633 @@
  111818. +# Begin of automatic generation
  111819. +
  111820. +# acos_downward
  111821. +Test "acos_downward (-0)":
  111822. +float: 1
  111823. +ifloat: 1
  111824. +Test "acos_downward (-0.5)":
  111825. +double: 1
  111826. +idouble: 1
  111827. +Test "acos_downward (-1)":
  111828. +float: 1
  111829. +ifloat: 1
  111830. +Test "acos_downward (0)":
  111831. +float: 1
  111832. +ifloat: 1
  111833. +Test "acos_downward (0.5)":
  111834. +double: 1
  111835. +float: 1
  111836. +idouble: 1
  111837. +ifloat: 1
  111838. +
  111839. +# acos_towardzero
  111840. +Test "acos_towardzero (-0)":
  111841. +float: 1
  111842. +ifloat: 1
  111843. +Test "acos_towardzero (-0.5)":
  111844. +double: 1
  111845. +idouble: 1
  111846. +Test "acos_towardzero (-1)":
  111847. +float: 1
  111848. +ifloat: 1
  111849. +Test "acos_towardzero (0)":
  111850. +float: 1
  111851. +ifloat: 1
  111852. +Test "acos_towardzero (0.5)":
  111853. +double: 1
  111854. +float: 1
  111855. +idouble: 1
  111856. +ifloat: 1
  111857. +
  111858. +# asin_downward
  111859. +Test "asin_downward (-0.5)":
  111860. +double: 1
  111861. +idouble: 1
  111862. +Test "asin_downward (0.5)":
  111863. +double: 1
  111864. +idouble: 1
  111865. +Test "asin_downward (1.0)":
  111866. +float: 1
  111867. +ifloat: 1
  111868. +
  111869. +# asin_towardzero
  111870. +Test "asin_towardzero (-0.5)":
  111871. +double: 1
  111872. +idouble: 1
  111873. +Test "asin_towardzero (-1.0)":
  111874. +float: 1
  111875. +ifloat: 1
  111876. +Test "asin_towardzero (0.5)":
  111877. +double: 1
  111878. +idouble: 1
  111879. +Test "asin_towardzero (1.0)":
  111880. +float: 1
  111881. +ifloat: 1
  111882. +
  111883. +# asin_upward
  111884. +Test "asin_upward (-1.0)":
  111885. +float: 1
  111886. +ifloat: 1
  111887. +
  111888. +# atan2
  111889. +Test "atan2 (-0.00756827042671106339, -.001792735857538728036)":
  111890. +ildouble: 1
  111891. +ldouble: 1
  111892. +Test "atan2 (-0.75, -1.0)":
  111893. +float: 1
  111894. +ifloat: 1
  111895. +ildouble: 1
  111896. +ldouble: 1
  111897. +Test "atan2 (-max_value, -min_value)":
  111898. +float: 1
  111899. +ifloat: 1
  111900. +Test "atan2 (0.75, -1.0)":
  111901. +float: 1
  111902. +ifloat: 1
  111903. +ildouble: 1
  111904. +ldouble: 1
  111905. +Test "atan2 (1.390625, 0.9296875)":
  111906. +float: 1
  111907. +ifloat: 1
  111908. +ildouble: 1
  111909. +ldouble: 1
  111910. +
  111911. +# atanh
  111912. +Test "atanh (0.75)":
  111913. +float: 1
  111914. +ifloat: 1
  111915. +
  111916. +# cacos
  111917. +Test "Imaginary part of: cacos (+0 + 0.5 i)":
  111918. +float: 1
  111919. +ifloat: 1
  111920. +ildouble: 1
  111921. +ldouble: 1
  111922. +Test "Imaginary part of: cacos (+0 + 1.0 i)":
  111923. +double: 1
  111924. +float: 1
  111925. +idouble: 1
  111926. +ifloat: 1
  111927. +ildouble: 1
  111928. +ldouble: 1
  111929. +Test "Imaginary part of: cacos (+0 + 1.5 i)":
  111930. +double: 1
  111931. +idouble: 1
  111932. +ildouble: 1
  111933. +ldouble: 1
  111934. +Test "Imaginary part of: cacos (+0 - 0.5 i)":
  111935. +float: 1
  111936. +ifloat: 1
  111937. +ildouble: 1
  111938. +ldouble: 1
  111939. +Test "Imaginary part of: cacos (+0 - 1.0 i)":
  111940. +double: 1
  111941. +float: 1
  111942. +idouble: 1
  111943. +ifloat: 1
  111944. +ildouble: 1
  111945. +ldouble: 1
  111946. +Test "Imaginary part of: cacos (+0 - 1.5 i)":
  111947. +double: 1
  111948. +idouble: 1
  111949. +ildouble: 1
  111950. +ldouble: 1
  111951. +Test "Imaginary part of: cacos (-0 + 0.5 i)":
  111952. +float: 1
  111953. +ifloat: 1
  111954. +ildouble: 1
  111955. +ldouble: 1
  111956. +Test "Imaginary part of: cacos (-0 + 1.0 i)":
  111957. +double: 1
  111958. +float: 1
  111959. +idouble: 1
  111960. +ifloat: 1
  111961. +ildouble: 1
  111962. +ldouble: 1
  111963. +Test "Imaginary part of: cacos (-0 + 1.5 i)":
  111964. +double: 1
  111965. +idouble: 1
  111966. +ildouble: 1
  111967. +ldouble: 1
  111968. +Test "Imaginary part of: cacos (-0 - 0.5 i)":
  111969. +float: 1
  111970. +ifloat: 1
  111971. +ildouble: 1
  111972. +ldouble: 1
  111973. +Test "Imaginary part of: cacos (-0 - 1.0 i)":
  111974. +double: 1
  111975. +float: 1
  111976. +idouble: 1
  111977. +ifloat: 1
  111978. +ildouble: 1
  111979. +ldouble: 1
  111980. +Test "Imaginary part of: cacos (-0 - 1.5 i)":
  111981. +double: 1
  111982. +idouble: 1
  111983. +ildouble: 1
  111984. +ldouble: 1
  111985. +Test "Imaginary part of: cacos (-0.0 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  111986. +ildouble: 1
  111987. +ldouble: 1
  111988. +Test "Imaginary part of: cacos (-0.0 + 0x0.ffffffffffffffffp0 i)":
  111989. +ildouble: 1
  111990. +ldouble: 1
  111991. +Test "Imaginary part of: cacos (-0.0 + 0x1.0000000000000000000000000001p0 i)":
  111992. +ildouble: 1
  111993. +ldouble: 1
  111994. +Test "Imaginary part of: cacos (-0.0 + 0x1.0000000000000002p0 i)":
  111995. +ildouble: 1
  111996. +ldouble: 1
  111997. +Test "Imaginary part of: cacos (-0.0 + 0x1.0000000000001p0 i)":
  111998. +ildouble: 1
  111999. +ldouble: 1
  112000. +Test "Imaginary part of: cacos (-0.0 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  112001. +ildouble: 1
  112002. +ldouble: 1
  112003. +Test "Imaginary part of: cacos (-0.0 - 0x0.ffffffffffffffffp0 i)":
  112004. +ildouble: 1
  112005. +ldouble: 1
  112006. +Test "Imaginary part of: cacos (-0.0 - 0x1.0000000000000000000000000001p0 i)":
  112007. +ildouble: 1
  112008. +ldouble: 1
  112009. +Test "Imaginary part of: cacos (-0.0 - 0x1.0000000000000002p0 i)":
  112010. +ildouble: 1
  112011. +ldouble: 1
  112012. +Test "Imaginary part of: cacos (-0.0 - 0x1.0000000000001p0 i)":
  112013. +ildouble: 1
  112014. +ldouble: 1
  112015. +Test "Real part of: cacos (-0.25 + 1.0 i)":
  112016. +double: 1
  112017. +float: 1
  112018. +idouble: 1
  112019. +ifloat: 1
  112020. +Test "Imaginary part of: cacos (-0.25 + 1.0 i)":
  112021. +float: 1
  112022. +ifloat: 1
  112023. +ildouble: 1
  112024. +ldouble: 1
  112025. +Test "Real part of: cacos (-0.25 - 1.0 i)":
  112026. +double: 1
  112027. +float: 1
  112028. +idouble: 1
  112029. +ifloat: 1
  112030. +Test "Imaginary part of: cacos (-0.25 - 1.0 i)":
  112031. +float: 1
  112032. +ifloat: 1
  112033. +ildouble: 1
  112034. +ldouble: 1
  112035. +Test "Real part of: cacos (-0.5 + +0 i)":
  112036. +ildouble: 1
  112037. +ldouble: 1
  112038. +Test "Real part of: cacos (-0.5 + 0x1.fp-1025 i)":
  112039. +ildouble: 1
  112040. +ldouble: 1
  112041. +Test "Real part of: cacos (-0.5 + 0x1.fp-129 i)":
  112042. +ildouble: 1
  112043. +ldouble: 1
  112044. +Test "Imaginary part of: cacos (-0.5 + 0x1.fp-129 i)":
  112045. +double: 1
  112046. +idouble: 1
  112047. +Test "Real part of: cacos (-0.5 + 0x1.fp-16385 i)":
  112048. +ildouble: 1
  112049. +ldouble: 1
  112050. +Test "Real part of: cacos (-0.5 + 0x1p-105 i)":
  112051. +ildouble: 1
  112052. +ldouble: 1
  112053. +Test "Imaginary part of: cacos (-0.5 + 0x1p-105 i)":
  112054. +double: 1
  112055. +idouble: 1
  112056. +ildouble: 1
  112057. +ldouble: 1
  112058. +Test "Real part of: cacos (-0.5 + 0x1p-112 i)":
  112059. +ildouble: 1
  112060. +ldouble: 1
  112061. +Test "Imaginary part of: cacos (-0.5 + 0x1p-112 i)":
  112062. +double: 1
  112063. +idouble: 1
  112064. +ildouble: 1
  112065. +ldouble: 1
  112066. +Test "Imaginary part of: cacos (-0.5 + 0x1p-23 i)":
  112067. +double: 1
  112068. +idouble: 1
  112069. +ildouble: 1
  112070. +ldouble: 1
  112071. +Test "Real part of: cacos (-0.5 + 0x1p-52 i)":
  112072. +ildouble: 1
  112073. +ldouble: 1
  112074. +Test "Real part of: cacos (-0.5 + 0x1p-63 i)":
  112075. +ildouble: 1
  112076. +ldouble: 1
  112077. +Test "Imaginary part of: cacos (-0.5 + 0x1p-63 i)":
  112078. +ildouble: 1
  112079. +ldouble: 1
  112080. +Test "Real part of: cacos (-0.5 + 1.0 i)":
  112081. +float: 1
  112082. +ifloat: 1
  112083. +Test "Imaginary part of: cacos (-0.5 + 1.0 i)":
  112084. +double: 1
  112085. +idouble: 1
  112086. +ildouble: 1
  112087. +ldouble: 1
  112088. +Test "Real part of: cacos (-0.5 - 0 i)":
  112089. +ildouble: 1
  112090. +ldouble: 1
  112091. +Test "Real part of: cacos (-0.5 - 0x1.fp-1025 i)":
  112092. +ildouble: 1
  112093. +ldouble: 1
  112094. +Test "Real part of: cacos (-0.5 - 0x1.fp-129 i)":
  112095. +ildouble: 1
  112096. +ldouble: 1
  112097. +Test "Imaginary part of: cacos (-0.5 - 0x1.fp-129 i)":
  112098. +double: 1
  112099. +idouble: 1
  112100. +Test "Real part of: cacos (-0.5 - 0x1.fp-16385 i)":
  112101. +ildouble: 1
  112102. +ldouble: 1
  112103. +Test "Real part of: cacos (-0.5 - 0x1p-105 i)":
  112104. +ildouble: 1
  112105. +ldouble: 1
  112106. +Test "Imaginary part of: cacos (-0.5 - 0x1p-105 i)":
  112107. +double: 1
  112108. +idouble: 1
  112109. +ildouble: 1
  112110. +ldouble: 1
  112111. +Test "Real part of: cacos (-0.5 - 0x1p-112 i)":
  112112. +ildouble: 1
  112113. +ldouble: 1
  112114. +Test "Imaginary part of: cacos (-0.5 - 0x1p-112 i)":
  112115. +double: 1
  112116. +idouble: 1
  112117. +ildouble: 1
  112118. +ldouble: 1
  112119. +Test "Imaginary part of: cacos (-0.5 - 0x1p-23 i)":
  112120. +double: 1
  112121. +idouble: 1
  112122. +ildouble: 1
  112123. +ldouble: 1
  112124. +Test "Real part of: cacos (-0.5 - 0x1p-52 i)":
  112125. +ildouble: 1
  112126. +ldouble: 1
  112127. +Test "Real part of: cacos (-0.5 - 0x1p-63 i)":
  112128. +ildouble: 1
  112129. +ldouble: 1
  112130. +Test "Imaginary part of: cacos (-0.5 - 0x1p-63 i)":
  112131. +ildouble: 1
  112132. +ldouble: 1
  112133. +Test "Real part of: cacos (-0.5 - 1.0 i)":
  112134. +float: 1
  112135. +ifloat: 1
  112136. +Test "Imaginary part of: cacos (-0.5 - 1.0 i)":
  112137. +double: 1
  112138. +idouble: 1
  112139. +ildouble: 1
  112140. +ldouble: 1
  112141. +Test "Imaginary part of: cacos (-0x0.fffffffffffff8p0 + 0x1p-52 i)":
  112142. +double: 1
  112143. +idouble: 1
  112144. +Test "Imaginary part of: cacos (-0x0.fffffffffffff8p0 - 0x1p-52 i)":
  112145. +double: 1
  112146. +idouble: 1
  112147. +Test "Imaginary part of: cacos (-0x0.ffffffffffffffffffffffffffcp0 + 0x1p-105 i)":
  112148. +ildouble: 1
  112149. +ldouble: 1
  112150. +Test "Imaginary part of: cacos (-0x0.ffffffffffffffffffffffffffcp0 - 0x1p-105 i)":
  112151. +ildouble: 1
  112152. +ldouble: 1
  112153. +Test "Imaginary part of: cacos (-0x0.ffffffffffffffffp0 + 0x1p-63 i)":
  112154. +ildouble: 1
  112155. +ldouble: 1
  112156. +Test "Imaginary part of: cacos (-0x0.ffffffffffffffffp0 - 0x1p-63 i)":
  112157. +ildouble: 1
  112158. +ldouble: 1
  112159. +Test "Imaginary part of: cacos (-0x0.ffffffp0 + 0x1p-23 i)":
  112160. +float: 2
  112161. +ifloat: 2
  112162. +Test "Imaginary part of: cacos (-0x0.ffffffp0 - 0x1p-23 i)":
  112163. +float: 2
  112164. +ifloat: 2
  112165. +Test "Imaginary part of: cacos (-0x1.0000000000000000000000000001p0 + 0.0 i)":
  112166. +ildouble: 1
  112167. +ldouble: 1
  112168. +Test "Imaginary part of: cacos (-0x1.0000000000000000000000000001p0 + 0x1.fp-16385 i)":
  112169. +ildouble: 1
  112170. +ldouble: 1
  112171. +Test "Imaginary part of: cacos (-0x1.0000000000000000000000000001p0 + 0x1p-113 i)":
  112172. +ildouble: 1
  112173. +ldouble: 1
  112174. +Test "Imaginary part of: cacos (-0x1.0000000000000000000000000001p0 - 0.0 i)":
  112175. +ildouble: 1
  112176. +ldouble: 1
  112177. +Test "Imaginary part of: cacos (-0x1.0000000000000000000000000001p0 - 0x1.fp-16385 i)":
  112178. +ildouble: 1
  112179. +ldouble: 1
  112180. +Test "Imaginary part of: cacos (-0x1.0000000000000000000000000001p0 - 0x1p-113 i)":
  112181. +ildouble: 1
  112182. +ldouble: 1
  112183. +Test "Imaginary part of: cacos (-0x1.000002p0 + 0x1p-23 i)":
  112184. +float: 1
  112185. +ifloat: 1
  112186. +ildouble: 1
  112187. +ldouble: 1
  112188. +Test "Imaginary part of: cacos (-0x1.000002p0 - 0x1p-23 i)":
  112189. +float: 1
  112190. +ifloat: 1
  112191. +ildouble: 1
  112192. +ldouble: 1
  112193. +Test "Imaginary part of: cacos (-0x1.fp-10 + 1.0 i)":
  112194. +double: 1
  112195. +idouble: 1
  112196. +Test "Imaginary part of: cacos (-0x1.fp-10 - 1.0 i)":
  112197. +double: 1
  112198. +idouble: 1
  112199. +Test "Real part of: cacos (-0x1.fp-100 + 1.0 i)":
  112200. +float: 1
  112201. +ifloat: 1
  112202. +Test "Imaginary part of: cacos (-0x1.fp-100 + 1.0 i)":
  112203. +double: 1
  112204. +float: 1
  112205. +idouble: 1
  112206. +ifloat: 1
  112207. +ildouble: 1
  112208. +ldouble: 1
  112209. +Test "Real part of: cacos (-0x1.fp-100 - 1.0 i)":
  112210. +float: 1
  112211. +ifloat: 1
  112212. +Test "Imaginary part of: cacos (-0x1.fp-100 - 1.0 i)":
  112213. +double: 1
  112214. +float: 1
  112215. +idouble: 1
  112216. +ifloat: 1
  112217. +ildouble: 1
  112218. +ldouble: 1
  112219. +Test "Imaginary part of: cacos (-0x1.fp-1000 + 1.0 i)":
  112220. +double: 1
  112221. +idouble: 1
  112222. +ildouble: 1
  112223. +ldouble: 1
  112224. +Test "Imaginary part of: cacos (-0x1.fp-1000 - 1.0 i)":
  112225. +double: 1
  112226. +idouble: 1
  112227. +ildouble: 1
  112228. +ldouble: 1
  112229. +Test "Imaginary part of: cacos (-0x1.fp-10000 + 1.0 i)":
  112230. +ildouble: 1
  112231. +ldouble: 1
  112232. +Test "Imaginary part of: cacos (-0x1.fp-10000 - 1.0 i)":
  112233. +ildouble: 1
  112234. +ldouble: 1
  112235. +Test "Imaginary part of: cacos (-0x1.fp-1025 + 0.5 i)":
  112236. +ildouble: 1
  112237. +ldouble: 1
  112238. +Test "Imaginary part of: cacos (-0x1.fp-1025 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  112239. +ildouble: 1
  112240. +ldouble: 1
  112241. +Test "Imaginary part of: cacos (-0x1.fp-1025 + 0x1.0000000000001p0 i)":
  112242. +ildouble: 1
  112243. +ldouble: 1
  112244. +Test "Imaginary part of: cacos (-0x1.fp-1025 + 1.0 i)":
  112245. +double: 1
  112246. +idouble: 1
  112247. +ildouble: 1
  112248. +ldouble: 1
  112249. +Test "Imaginary part of: cacos (-0x1.fp-1025 + 1.5 i)":
  112250. +double: 1
  112251. +idouble: 1
  112252. +ildouble: 1
  112253. +ldouble: 1
  112254. +Test "Imaginary part of: cacos (-0x1.fp-1025 - 0.5 i)":
  112255. +ildouble: 1
  112256. +ldouble: 1
  112257. +Test "Imaginary part of: cacos (-0x1.fp-1025 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  112258. +ildouble: 1
  112259. +ldouble: 1
  112260. +Test "Imaginary part of: cacos (-0x1.fp-1025 - 0x1.0000000000001p0 i)":
  112261. +ildouble: 1
  112262. +ldouble: 1
  112263. +Test "Imaginary part of: cacos (-0x1.fp-1025 - 1.0 i)":
  112264. +double: 1
  112265. +idouble: 1
  112266. +ildouble: 1
  112267. +ldouble: 1
  112268. +Test "Imaginary part of: cacos (-0x1.fp-1025 - 1.5 i)":
  112269. +double: 1
  112270. +idouble: 1
  112271. +ildouble: 1
  112272. +ldouble: 1
  112273. +Test "Real part of: cacos (-0x1.fp-129 + 0.5 i)":
  112274. +float: 1
  112275. +ifloat: 1
  112276. +Test "Imaginary part of: cacos (-0x1.fp-129 + 0.5 i)":
  112277. +float: 1
  112278. +ifloat: 1
  112279. +ildouble: 1
  112280. +ldouble: 1
  112281. +Test "Real part of: cacos (-0x1.fp-129 + 0x0.ffffffp0 i)":
  112282. +float: 1
  112283. +ifloat: 1
  112284. +Test "Real part of: cacos (-0x1.fp-129 + 0x1.000002p0 i)":
  112285. +float: 1
  112286. +ifloat: 1
  112287. +Test "Real part of: cacos (-0x1.fp-129 + 0x1.fp-129 i)":
  112288. +float: 1
  112289. +ifloat: 1
  112290. +Test "Real part of: cacos (-0x1.fp-129 + 0x1p-23 i)":
  112291. +float: 1
  112292. +ifloat: 1
  112293. +Test "Real part of: cacos (-0x1.fp-129 + 1.0 i)":
  112294. +float: 1
  112295. +ifloat: 1
  112296. +Test "Imaginary part of: cacos (-0x1.fp-129 + 1.0 i)":
  112297. +double: 1
  112298. +float: 1
  112299. +idouble: 1
  112300. +ifloat: 1
  112301. +ildouble: 1
  112302. +ldouble: 1
  112303. +Test "Real part of: cacos (-0x1.fp-129 + 1.5 i)":
  112304. +float: 1
  112305. +ifloat: 1
  112306. +Test "Imaginary part of: cacos (-0x1.fp-129 + 1.5 i)":
  112307. +double: 1
  112308. +idouble: 1
  112309. +ildouble: 1
  112310. +ldouble: 1
  112311. +Test "Real part of: cacos (-0x1.fp-129 - 0.5 i)":
  112312. +float: 1
  112313. +ifloat: 1
  112314. +Test "Imaginary part of: cacos (-0x1.fp-129 - 0.5 i)":
  112315. +float: 1
  112316. +ifloat: 1
  112317. +ildouble: 1
  112318. +ldouble: 1
  112319. +Test "Real part of: cacos (-0x1.fp-129 - 0x0.ffffffp0 i)":
  112320. +float: 1
  112321. +ifloat: 1
  112322. +Test "Real part of: cacos (-0x1.fp-129 - 0x1.000002p0 i)":
  112323. +float: 1
  112324. +ifloat: 1
  112325. +Test "Real part of: cacos (-0x1.fp-129 - 0x1.fp-129 i)":
  112326. +float: 1
  112327. +ifloat: 1
  112328. +Test "Real part of: cacos (-0x1.fp-129 - 0x1p-23 i)":
  112329. +float: 1
  112330. +ifloat: 1
  112331. +Test "Real part of: cacos (-0x1.fp-129 - 1.0 i)":
  112332. +float: 1
  112333. +ifloat: 1
  112334. +Test "Imaginary part of: cacos (-0x1.fp-129 - 1.0 i)":
  112335. +double: 1
  112336. +float: 1
  112337. +idouble: 1
  112338. +ifloat: 1
  112339. +ildouble: 1
  112340. +ldouble: 1
  112341. +Test "Real part of: cacos (-0x1.fp-129 - 1.5 i)":
  112342. +float: 1
  112343. +ifloat: 1
  112344. +Test "Imaginary part of: cacos (-0x1.fp-129 - 1.5 i)":
  112345. +double: 1
  112346. +idouble: 1
  112347. +ildouble: 1
  112348. +ldouble: 1
  112349. +Test "Imaginary part of: cacos (-0x1.fp-16385 + 0.5 i)":
  112350. +ildouble: 1
  112351. +ldouble: 1
  112352. +Test "Imaginary part of: cacos (-0x1.fp-16385 + 0x0.ffffffffffffffffp0 i)":
  112353. +ildouble: 1
  112354. +ldouble: 1
  112355. +Test "Imaginary part of: cacos (-0x1.fp-16385 + 0x1.0000000000000000000000000001p0 i)":
  112356. +ildouble: 1
  112357. +ldouble: 1
  112358. +Test "Imaginary part of: cacos (-0x1.fp-16385 + 0x1.0000000000000002p0 i)":
  112359. +ildouble: 1
  112360. +ldouble: 1
  112361. +Test "Imaginary part of: cacos (-0x1.fp-16385 + 1.0 i)":
  112362. +ildouble: 1
  112363. +ldouble: 1
  112364. +Test "Imaginary part of: cacos (-0x1.fp-16385 + 1.5 i)":
  112365. +ildouble: 1
  112366. +ldouble: 1
  112367. +Test "Imaginary part of: cacos (-0x1.fp-16385 - 0.5 i)":
  112368. +ildouble: 1
  112369. +ldouble: 1
  112370. +Test "Imaginary part of: cacos (-0x1.fp-16385 - 0x0.ffffffffffffffffp0 i)":
  112371. +ildouble: 1
  112372. +ldouble: 1
  112373. +Test "Imaginary part of: cacos (-0x1.fp-16385 - 0x1.0000000000000000000000000001p0 i)":
  112374. +ildouble: 1
  112375. +ldouble: 1
  112376. +Test "Imaginary part of: cacos (-0x1.fp-16385 - 0x1.0000000000000002p0 i)":
  112377. +ildouble: 1
  112378. +ldouble: 1
  112379. +Test "Imaginary part of: cacos (-0x1.fp-16385 - 1.0 i)":
  112380. +ildouble: 1
  112381. +ldouble: 1
  112382. +Test "Imaginary part of: cacos (-0x1.fp-16385 - 1.5 i)":
  112383. +ildouble: 1
  112384. +ldouble: 1
  112385. +Test "Real part of: cacos (-0x1.fp-30 + 1.0 i)":
  112386. +float: 1
  112387. +ifloat: 1
  112388. +Test "Imaginary part of: cacos (-0x1.fp-30 + 1.0 i)":
  112389. +double: 1
  112390. +float: 1
  112391. +idouble: 1
  112392. +ifloat: 1
  112393. +ildouble: 1
  112394. +ldouble: 1
  112395. +Test "Real part of: cacos (-0x1.fp-30 - 1.0 i)":
  112396. +float: 1
  112397. +ifloat: 1
  112398. +Test "Imaginary part of: cacos (-0x1.fp-30 - 1.0 i)":
  112399. +double: 1
  112400. +float: 1
  112401. +idouble: 1
  112402. +ifloat: 1
  112403. +ildouble: 1
  112404. +ldouble: 1
  112405. +Test "Real part of: cacos (-0x1p-105 + 0.0 i)":
  112406. +float: 1
  112407. +ifloat: 1
  112408. +Test "Real part of: cacos (-0x1p-105 + 0.5 i)":
  112409. +float: 1
  112410. +ifloat: 1
  112411. +ildouble: 1
  112412. +ldouble: 1
  112413. +Test "Imaginary part of: cacos (-0x1p-105 + 0.5 i)":
  112414. +float: 1
  112415. +ifloat: 1
  112416. +Test "Imaginary part of: cacos (-0x1p-105 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  112417. +ildouble: 1
  112418. +ldouble: 1
  112419. +Test "Real part of: cacos (-0x1p-105 + 0x1p-105 i)":
  112420. +float: 1
  112421. +ifloat: 1
  112422. +Test "Real part of: cacos (-0x1p-105 - 0.0 i)":
  112423. +float: 1
  112424. +ifloat: 1
  112425. +Test "Real part of: cacos (-0x1p-105 - 0.5 i)":
  112426. +float: 1
  112427. +ifloat: 1
  112428. +ildouble: 1
  112429. +ldouble: 1
  112430. +Test "Imaginary part of: cacos (-0x1p-105 - 0.5 i)":
  112431. +float: 1
  112432. +ifloat: 1
  112433. +Test "Imaginary part of: cacos (-0x1p-105 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  112434. +ildouble: 1
  112435. +ldouble: 1
  112436. +Test "Real part of: cacos (-0x1p-105 - 0x1p-105 i)":
  112437. +float: 1
  112438. +ifloat: 1
  112439. +Test "Real part of: cacos (-0x1p-112 + 0.0 i)":
  112440. +float: 1
  112441. +ifloat: 1
  112442. +Test "Real part of: cacos (-0x1p-112 + 0.5 i)":
  112443. +float: 1
  112444. +ifloat: 1
  112445. +Test "Imaginary part of: cacos (-0x1p-112 + 0.5 i)":
  112446. +float: 1
  112447. +ifloat: 1
  112448. +Test "Real part of: cacos (-0x1p-112 + 0x1p-112 i)":
  112449. +float: 1
  112450. +ifloat: 1
  112451. +Test "Real part of: cacos (-0x1p-112 - 0.0 i)":
  112452. +float: 1
  112453. +ifloat: 1
  112454. +Test "Real part of: cacos (-0x1p-112 - 0.5 i)":
  112455. +float: 1
  112456. +ifloat: 1
  112457. +Test "Imaginary part of: cacos (-0x1p-112 - 0.5 i)":
  112458. +float: 1
  112459. +ifloat: 1
  112460. +Test "Real part of: cacos (-0x1p-112 - 0x1p-112 i)":
  112461. +float: 1
  112462. +ifloat: 1
  112463. +Test "Real part of: cacos (-0x1p-113 + 0x1.0000000000000000000000000001p0 i)":
  112464. +ildouble: 1
  112465. +ldouble: 1
  112466. +Test "Imaginary part of: cacos (-0x1p-113 + 0x1.0000000000000000000000000001p0 i)":
  112467. +ildouble: 1
  112468. +ldouble: 1
  112469. +Test "Real part of: cacos (-0x1p-113 - 0x1.0000000000000000000000000001p0 i)":
  112470. +ildouble: 1
  112471. +ldouble: 1
  112472. +Test "Imaginary part of: cacos (-0x1p-113 - 0x1.0000000000000000000000000001p0 i)":
  112473. +ildouble: 1
  112474. +ldouble: 1
  112475. +Test "Real part of: cacos (-0x1p-23 + 0.0 i)":
  112476. +float: 1
  112477. +ifloat: 1
  112478. +ildouble: 1
  112479. +ldouble: 1
  112480. +Test "Real part of: cacos (-0x1p-23 + 0.5 i)":
  112481. +float: 1
  112482. +ifloat: 1
  112483. +Test "Imaginary part of: cacos (-0x1p-23 + 0.5 i)":
  112484. +float: 1
  112485. +ifloat: 1
  112486. +ildouble: 2
  112487. +ldouble: 2
  112488. +Test "Imaginary part of: cacos (-0x1p-23 + 0x0.ffffffp0 i)":
  112489. +double: 1
  112490. +idouble: 1
  112491. +Test "Real part of: cacos (-0x1p-23 + 0x1.fp-129 i)":
  112492. +float: 1
  112493. +ifloat: 1
  112494. +ildouble: 1
  112495. +ldouble: 1
  112496. +Test "Real part of: cacos (-0x1p-23 + 0x1p-23 i)":
  112497. +float: 1
  112498. +ifloat: 1
  112499. +ildouble: 1
  112500. +ldouble: 1
  112501. +Test "Real part of: cacos (-0x1p-23 - 0.0 i)":
  112502. +float: 1
  112503. +ifloat: 1
  112504. +ildouble: 1
  112505. +ldouble: 1
  112506. +Test "Real part of: cacos (-0x1p-23 - 0.5 i)":
  112507. +float: 1
  112508. +ifloat: 1
  112509. +Test "Imaginary part of: cacos (-0x1p-23 - 0.5 i)":
  112510. +float: 1
  112511. +ifloat: 1
  112512. +ildouble: 2
  112513. +ldouble: 2
  112514. +Test "Imaginary part of: cacos (-0x1p-23 - 0x0.ffffffp0 i)":
  112515. +double: 1
  112516. +idouble: 1
  112517. +Test "Real part of: cacos (-0x1p-23 - 0x1.fp-129 i)":
  112518. +float: 1
  112519. +ifloat: 1
  112520. +ildouble: 1
  112521. +ldouble: 1
  112522. +Test "Real part of: cacos (-0x1p-23 - 0x1p-23 i)":
  112523. +float: 1
  112524. +ifloat: 1
  112525. +ildouble: 1
  112526. +ldouble: 1
  112527. +Test "Real part of: cacos (-0x1p-52 + 0.0 i)":
  112528. +float: 1
  112529. +ifloat: 1
  112530. +Test "Real part of: cacos (-0x1p-52 + 0.5 i)":
  112531. +float: 1
  112532. +ifloat: 1
  112533. +Test "Imaginary part of: cacos (-0x1p-52 + 0.5 i)":
  112534. +float: 1
  112535. +ifloat: 1
  112536. +ildouble: 1
  112537. +ldouble: 1
  112538. +Test "Real part of: cacos (-0x1p-52 + 0x1p-52 i)":
  112539. +float: 1
  112540. +ifloat: 1
  112541. +Test "Real part of: cacos (-0x1p-52 - 0.0 i)":
  112542. +float: 1
  112543. +ifloat: 1
  112544. +Test "Real part of: cacos (-0x1p-52 - 0.5 i)":
  112545. +float: 1
  112546. +ifloat: 1
  112547. +Test "Imaginary part of: cacos (-0x1p-52 - 0.5 i)":
  112548. +float: 1
  112549. +ifloat: 1
  112550. +ildouble: 1
  112551. +ldouble: 1
  112552. +Test "Real part of: cacos (-0x1p-52 - 0x1p-52 i)":
  112553. +float: 1
  112554. +ifloat: 1
  112555. +Test "Real part of: cacos (-0x1p-63 + 0.0 i)":
  112556. +float: 1
  112557. +ifloat: 1
  112558. +Test "Real part of: cacos (-0x1p-63 + 0.5 i)":
  112559. +float: 1
  112560. +ifloat: 1
  112561. +Test "Imaginary part of: cacos (-0x1p-63 + 0.5 i)":
  112562. +float: 1
  112563. +ifloat: 1
  112564. +Test "Imaginary part of: cacos (-0x1p-63 + 0x0.ffffffffffffffffp0 i)":
  112565. +ildouble: 1
  112566. +ldouble: 1
  112567. +Test "Imaginary part of: cacos (-0x1p-63 + 0x1.0000000000000002p0 i)":
  112568. +ildouble: 1
  112569. +ldouble: 1
  112570. +Test "Real part of: cacos (-0x1p-63 + 0x1p-63 i)":
  112571. +float: 1
  112572. +ifloat: 1
  112573. +Test "Real part of: cacos (-0x1p-63 - 0.0 i)":
  112574. +float: 1
  112575. +ifloat: 1
  112576. +Test "Real part of: cacos (-0x1p-63 - 0.5 i)":
  112577. +float: 1
  112578. +ifloat: 1
  112579. +Test "Imaginary part of: cacos (-0x1p-63 - 0.5 i)":
  112580. +float: 1
  112581. +ifloat: 1
  112582. +Test "Imaginary part of: cacos (-0x1p-63 - 0x0.ffffffffffffffffp0 i)":
  112583. +ildouble: 1
  112584. +ldouble: 1
  112585. +Test "Imaginary part of: cacos (-0x1p-63 - 0x1.0000000000000002p0 i)":
  112586. +ildouble: 1
  112587. +ldouble: 1
  112588. +Test "Real part of: cacos (-0x1p-63 - 0x1p-63 i)":
  112589. +float: 1
  112590. +ifloat: 1
  112591. +Test "Imaginary part of: cacos (-0x1p500 + 1.0 i)":
  112592. +ildouble: 1
  112593. +ldouble: 1
  112594. +Test "Imaginary part of: cacos (-0x1p500 - 1.0 i)":
  112595. +ildouble: 1
  112596. +ldouble: 1
  112597. +Test "Imaginary part of: cacos (-0x1p5000 + 1.0 i)":
  112598. +ildouble: 1
  112599. +ldouble: 1
  112600. +Test "Imaginary part of: cacos (-0x1p5000 - 1.0 i)":
  112601. +ildouble: 1
  112602. +ldouble: 1
  112603. +Test "Imaginary part of: cacos (-1.0 + 0.5 i)":
  112604. +float: 1
  112605. +ifloat: 1
  112606. +Test "Imaginary part of: cacos (-1.0 + 0x1.fp-10 i)":
  112607. +float: 1
  112608. +ifloat: 1
  112609. +ildouble: 1
  112610. +ldouble: 1
  112611. +Test "Imaginary part of: cacos (-1.0 + 0x1.fp-30 i)":
  112612. +ildouble: 1
  112613. +ldouble: 1
  112614. +Test "Real part of: cacos (-1.0 + 0x1p50 i)":
  112615. +float: 1
  112616. +ifloat: 1
  112617. +Test "Imaginary part of: cacos (-1.0 + 0x1p500 i)":
  112618. +ildouble: 1
  112619. +ldouble: 1
  112620. +Test "Imaginary part of: cacos (-1.0 + 0x1p5000 i)":
  112621. +ildouble: 1
  112622. +ldouble: 1
  112623. +Test "Imaginary part of: cacos (-1.0 - 0.5 i)":
  112624. +float: 1
  112625. +ifloat: 1
  112626. +Test "Imaginary part of: cacos (-1.0 - 0x1.fp-10 i)":
  112627. +float: 1
  112628. +ifloat: 1
  112629. +ildouble: 1
  112630. +ldouble: 1
  112631. +Test "Imaginary part of: cacos (-1.0 - 0x1.fp-30 i)":
  112632. +ildouble: 1
  112633. +ldouble: 1
  112634. +Test "Real part of: cacos (-1.0 - 0x1p50 i)":
  112635. +float: 1
  112636. +ifloat: 1
  112637. +Test "Imaginary part of: cacos (-1.0 - 0x1p500 i)":
  112638. +ildouble: 1
  112639. +ldouble: 1
  112640. +Test "Imaginary part of: cacos (-1.0 - 0x1p5000 i)":
  112641. +ildouble: 1
  112642. +ldouble: 1
  112643. +Test "Real part of: cacos (-2 - 3 i)":
  112644. +float: 1
  112645. +ifloat: 1
  112646. +ildouble: 1
  112647. +ldouble: 1
  112648. +Test "Imaginary part of: cacos (0.0 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  112649. +ildouble: 1
  112650. +ldouble: 1
  112651. +Test "Imaginary part of: cacos (0.0 + 0x0.ffffffffffffffffp0 i)":
  112652. +ildouble: 1
  112653. +ldouble: 1
  112654. +Test "Imaginary part of: cacos (0.0 + 0x1.0000000000000000000000000001p0 i)":
  112655. +ildouble: 1
  112656. +ldouble: 1
  112657. +Test "Imaginary part of: cacos (0.0 + 0x1.0000000000000002p0 i)":
  112658. +ildouble: 1
  112659. +ldouble: 1
  112660. +Test "Imaginary part of: cacos (0.0 + 0x1.0000000000001p0 i)":
  112661. +ildouble: 1
  112662. +ldouble: 1
  112663. +Test "Imaginary part of: cacos (0.0 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  112664. +ildouble: 1
  112665. +ldouble: 1
  112666. +Test "Imaginary part of: cacos (0.0 - 0x0.ffffffffffffffffp0 i)":
  112667. +ildouble: 1
  112668. +ldouble: 1
  112669. +Test "Imaginary part of: cacos (0.0 - 0x1.0000000000000000000000000001p0 i)":
  112670. +ildouble: 1
  112671. +ldouble: 1
  112672. +Test "Imaginary part of: cacos (0.0 - 0x1.0000000000000002p0 i)":
  112673. +ildouble: 1
  112674. +ldouble: 1
  112675. +Test "Imaginary part of: cacos (0.0 - 0x1.0000000000001p0 i)":
  112676. +ildouble: 1
  112677. +ldouble: 1
  112678. +Test "Imaginary part of: cacos (0.25 + 1.0 i)":
  112679. +float: 1
  112680. +ifloat: 1
  112681. +ildouble: 1
  112682. +ldouble: 1
  112683. +Test "Imaginary part of: cacos (0.25 - 1.0 i)":
  112684. +float: 1
  112685. +ifloat: 1
  112686. +ildouble: 1
  112687. +ldouble: 1
  112688. +Test "Real part of: cacos (0.5 + +0 i)":
  112689. +double: 1
  112690. +idouble: 1
  112691. +Test "Real part of: cacos (0.5 + 0x1.fp-1025 i)":
  112692. +double: 1
  112693. +idouble: 1
  112694. +Test "Real part of: cacos (0.5 + 0x1.fp-129 i)":
  112695. +double: 1
  112696. +idouble: 1
  112697. +Test "Imaginary part of: cacos (0.5 + 0x1.fp-129 i)":
  112698. +double: 1
  112699. +idouble: 1
  112700. +Test "Real part of: cacos (0.5 + 0x1p-105 i)":
  112701. +double: 1
  112702. +idouble: 1
  112703. +Test "Imaginary part of: cacos (0.5 + 0x1p-105 i)":
  112704. +double: 1
  112705. +idouble: 1
  112706. +ildouble: 1
  112707. +ldouble: 1
  112708. +Test "Real part of: cacos (0.5 + 0x1p-112 i)":
  112709. +double: 1
  112710. +idouble: 1
  112711. +Test "Imaginary part of: cacos (0.5 + 0x1p-112 i)":
  112712. +double: 1
  112713. +idouble: 1
  112714. +ildouble: 1
  112715. +ldouble: 1
  112716. +Test "Imaginary part of: cacos (0.5 + 0x1p-23 i)":
  112717. +double: 1
  112718. +idouble: 1
  112719. +ildouble: 1
  112720. +ldouble: 1
  112721. +Test "Real part of: cacos (0.5 + 0x1p-52 i)":
  112722. +double: 1
  112723. +idouble: 1
  112724. +ildouble: 1
  112725. +ldouble: 1
  112726. +Test "Real part of: cacos (0.5 + 0x1p-63 i)":
  112727. +double: 1
  112728. +idouble: 1
  112729. +Test "Imaginary part of: cacos (0.5 + 0x1p-63 i)":
  112730. +ildouble: 1
  112731. +ldouble: 1
  112732. +Test "Real part of: cacos (0.5 + 1.0 i)":
  112733. +float: 1
  112734. +ifloat: 1
  112735. +Test "Imaginary part of: cacos (0.5 + 1.0 i)":
  112736. +double: 1
  112737. +idouble: 1
  112738. +ildouble: 1
  112739. +ldouble: 1
  112740. +Test "Real part of: cacos (0.5 - 0 i)":
  112741. +double: 1
  112742. +idouble: 1
  112743. +Test "Real part of: cacos (0.5 - 0x1.fp-1025 i)":
  112744. +double: 1
  112745. +idouble: 1
  112746. +Test "Real part of: cacos (0.5 - 0x1.fp-129 i)":
  112747. +double: 1
  112748. +idouble: 1
  112749. +Test "Imaginary part of: cacos (0.5 - 0x1.fp-129 i)":
  112750. +double: 1
  112751. +idouble: 1
  112752. +Test "Real part of: cacos (0.5 - 0x1p-105 i)":
  112753. +double: 1
  112754. +idouble: 1
  112755. +Test "Imaginary part of: cacos (0.5 - 0x1p-105 i)":
  112756. +double: 1
  112757. +idouble: 1
  112758. +ildouble: 1
  112759. +ldouble: 1
  112760. +Test "Real part of: cacos (0.5 - 0x1p-112 i)":
  112761. +double: 1
  112762. +idouble: 1
  112763. +Test "Imaginary part of: cacos (0.5 - 0x1p-112 i)":
  112764. +double: 1
  112765. +idouble: 1
  112766. +ildouble: 1
  112767. +ldouble: 1
  112768. +Test "Imaginary part of: cacos (0.5 - 0x1p-23 i)":
  112769. +double: 1
  112770. +idouble: 1
  112771. +ildouble: 1
  112772. +ldouble: 1
  112773. +Test "Real part of: cacos (0.5 - 0x1p-52 i)":
  112774. +double: 1
  112775. +idouble: 1
  112776. +ildouble: 1
  112777. +ldouble: 1
  112778. +Test "Real part of: cacos (0.5 - 0x1p-63 i)":
  112779. +double: 1
  112780. +idouble: 1
  112781. +Test "Imaginary part of: cacos (0.5 - 0x1p-63 i)":
  112782. +ildouble: 1
  112783. +ldouble: 1
  112784. +Test "Real part of: cacos (0.5 - 1.0 i)":
  112785. +float: 1
  112786. +ifloat: 1
  112787. +Test "Imaginary part of: cacos (0.5 - 1.0 i)":
  112788. +double: 1
  112789. +idouble: 1
  112790. +ildouble: 1
  112791. +ldouble: 1
  112792. +Test "Imaginary part of: cacos (0x0.fffffffffffff8p0 + 0x1p-52 i)":
  112793. +double: 1
  112794. +idouble: 1
  112795. +Test "Imaginary part of: cacos (0x0.fffffffffffff8p0 - 0x1p-52 i)":
  112796. +double: 1
  112797. +idouble: 1
  112798. +Test "Real part of: cacos (0x0.ffffffffffffffffffffffffffcp0 + 0.0 i)":
  112799. +ildouble: 1
  112800. +ldouble: 1
  112801. +Test "Real part of: cacos (0x0.ffffffffffffffffffffffffffcp0 + 0x1.fp-1025 i)":
  112802. +ildouble: 1
  112803. +ldouble: 1
  112804. +Test "Imaginary part of: cacos (0x0.ffffffffffffffffffffffffffcp0 + 0x1p-105 i)":
  112805. +ildouble: 1
  112806. +ldouble: 1
  112807. +Test "Real part of: cacos (0x0.ffffffffffffffffffffffffffcp0 - 0.0 i)":
  112808. +ildouble: 1
  112809. +ldouble: 1
  112810. +Test "Real part of: cacos (0x0.ffffffffffffffffffffffffffcp0 - 0x1.fp-1025 i)":
  112811. +ildouble: 1
  112812. +ldouble: 1
  112813. +Test "Imaginary part of: cacos (0x0.ffffffffffffffffffffffffffcp0 - 0x1p-105 i)":
  112814. +ildouble: 1
  112815. +ldouble: 1
  112816. +Test "Real part of: cacos (0x0.ffffffffffffffffffffffffffff8p0 + 0.0 i)":
  112817. +ildouble: 1
  112818. +ldouble: 1
  112819. +Test "Real part of: cacos (0x0.ffffffffffffffffffffffffffff8p0 + 0x1.fp-16385 i)":
  112820. +ildouble: 1
  112821. +ldouble: 1
  112822. +Test "Real part of: cacos (0x0.ffffffffffffffffffffffffffff8p0 - 0.0 i)":
  112823. +ildouble: 1
  112824. +ldouble: 1
  112825. +Test "Real part of: cacos (0x0.ffffffffffffffffffffffffffff8p0 - 0x1.fp-16385 i)":
  112826. +ildouble: 1
  112827. +ldouble: 1
  112828. +Test "Imaginary part of: cacos (0x0.ffffffffffffffffp0 + 0x1p-63 i)":
  112829. +ildouble: 1
  112830. +ldouble: 1
  112831. +Test "Imaginary part of: cacos (0x0.ffffffffffffffffp0 - 0x1p-63 i)":
  112832. +ildouble: 1
  112833. +ldouble: 1
  112834. +Test "Real part of: cacos (0x0.ffffffp0 + 0.0 i)":
  112835. +float: 1
  112836. +ifloat: 1
  112837. +ildouble: 1
  112838. +ldouble: 1
  112839. +Test "Real part of: cacos (0x0.ffffffp0 + 0x1.fp-129 i)":
  112840. +float: 1
  112841. +ifloat: 1
  112842. +ildouble: 1
  112843. +ldouble: 1
  112844. +Test "Real part of: cacos (0x0.ffffffp0 + 0x1p-23 i)":
  112845. +float: 2
  112846. +ifloat: 2
  112847. +ildouble: 1
  112848. +ldouble: 1
  112849. +Test "Imaginary part of: cacos (0x0.ffffffp0 + 0x1p-23 i)":
  112850. +float: 2
  112851. +ifloat: 2
  112852. +Test "Real part of: cacos (0x0.ffffffp0 - 0.0 i)":
  112853. +float: 1
  112854. +ifloat: 1
  112855. +ildouble: 1
  112856. +ldouble: 1
  112857. +Test "Real part of: cacos (0x0.ffffffp0 - 0x1.fp-129 i)":
  112858. +float: 1
  112859. +ifloat: 1
  112860. +ildouble: 1
  112861. +ldouble: 1
  112862. +Test "Real part of: cacos (0x0.ffffffp0 - 0x1p-23 i)":
  112863. +float: 2
  112864. +ifloat: 2
  112865. +ildouble: 1
  112866. +ldouble: 1
  112867. +Test "Imaginary part of: cacos (0x0.ffffffp0 - 0x1p-23 i)":
  112868. +float: 2
  112869. +ifloat: 2
  112870. +Test "Imaginary part of: cacos (0x1.0000000000000000000000000001p0 + 0.0 i)":
  112871. +ildouble: 1
  112872. +ldouble: 1
  112873. +Test "Real part of: cacos (0x1.0000000000000000000000000001p0 + 0x1.fp-16385 i)":
  112874. +ildouble: 1
  112875. +ldouble: 1
  112876. +Test "Imaginary part of: cacos (0x1.0000000000000000000000000001p0 + 0x1.fp-16385 i)":
  112877. +ildouble: 1
  112878. +ldouble: 1
  112879. +Test "Imaginary part of: cacos (0x1.0000000000000000000000000001p0 + 0x1p-113 i)":
  112880. +ildouble: 1
  112881. +ldouble: 1
  112882. +Test "Imaginary part of: cacos (0x1.0000000000000000000000000001p0 - 0.0 i)":
  112883. +ildouble: 1
  112884. +ldouble: 1
  112885. +Test "Real part of: cacos (0x1.0000000000000000000000000001p0 - 0x1.fp-16385 i)":
  112886. +ildouble: 1
  112887. +ldouble: 1
  112888. +Test "Imaginary part of: cacos (0x1.0000000000000000000000000001p0 - 0x1.fp-16385 i)":
  112889. +ildouble: 1
  112890. +ldouble: 1
  112891. +Test "Imaginary part of: cacos (0x1.0000000000000000000000000001p0 - 0x1p-113 i)":
  112892. +ildouble: 1
  112893. +ldouble: 1
  112894. +Test "Real part of: cacos (0x1.0000000000000002p0 + 0x1p-63 i)":
  112895. +ildouble: 2
  112896. +ldouble: 2
  112897. +Test "Real part of: cacos (0x1.0000000000000002p0 - 0x1p-63 i)":
  112898. +ildouble: 2
  112899. +ldouble: 2
  112900. +Test "Real part of: cacos (0x1.0000000000001p0 + 0x1p-52 i)":
  112901. +double: 1
  112902. +idouble: 1
  112903. +ildouble: 1
  112904. +ldouble: 1
  112905. +Test "Real part of: cacos (0x1.0000000000001p0 - 0x1p-52 i)":
  112906. +double: 1
  112907. +idouble: 1
  112908. +ildouble: 1
  112909. +ldouble: 1
  112910. +Test "Real part of: cacos (0x1.000002p0 + 0x1p-23 i)":
  112911. +float: 2
  112912. +ifloat: 2
  112913. +ildouble: 1
  112914. +ldouble: 1
  112915. +Test "Imaginary part of: cacos (0x1.000002p0 + 0x1p-23 i)":
  112916. +float: 1
  112917. +ifloat: 1
  112918. +ildouble: 1
  112919. +ldouble: 1
  112920. +Test "Real part of: cacos (0x1.000002p0 - 0x1p-23 i)":
  112921. +float: 2
  112922. +ifloat: 2
  112923. +ildouble: 1
  112924. +ldouble: 1
  112925. +Test "Imaginary part of: cacos (0x1.000002p0 - 0x1p-23 i)":
  112926. +float: 1
  112927. +ifloat: 1
  112928. +ildouble: 1
  112929. +ldouble: 1
  112930. +Test "Imaginary part of: cacos (0x1.fp-10 + 1.0 i)":
  112931. +double: 1
  112932. +idouble: 1
  112933. +Test "Imaginary part of: cacos (0x1.fp-10 - 1.0 i)":
  112934. +double: 1
  112935. +idouble: 1
  112936. +Test "Real part of: cacos (0x1.fp-100 + 1.0 i)":
  112937. +ildouble: 1
  112938. +ldouble: 1
  112939. +Test "Imaginary part of: cacos (0x1.fp-100 + 1.0 i)":
  112940. +double: 1
  112941. +float: 1
  112942. +idouble: 1
  112943. +ifloat: 1
  112944. +ildouble: 1
  112945. +ldouble: 1
  112946. +Test "Real part of: cacos (0x1.fp-100 - 1.0 i)":
  112947. +ildouble: 1
  112948. +ldouble: 1
  112949. +Test "Imaginary part of: cacos (0x1.fp-100 - 1.0 i)":
  112950. +double: 1
  112951. +float: 1
  112952. +idouble: 1
  112953. +ifloat: 1
  112954. +ildouble: 1
  112955. +ldouble: 1
  112956. +Test "Imaginary part of: cacos (0x1.fp-1000 + 1.0 i)":
  112957. +double: 1
  112958. +idouble: 1
  112959. +ildouble: 1
  112960. +ldouble: 1
  112961. +Test "Imaginary part of: cacos (0x1.fp-1000 - 1.0 i)":
  112962. +double: 1
  112963. +idouble: 1
  112964. +ildouble: 1
  112965. +ldouble: 1
  112966. +Test "Imaginary part of: cacos (0x1.fp-10000 + 1.0 i)":
  112967. +ildouble: 1
  112968. +ldouble: 1
  112969. +Test "Imaginary part of: cacos (0x1.fp-10000 - 1.0 i)":
  112970. +ildouble: 1
  112971. +ldouble: 1
  112972. +Test "Imaginary part of: cacos (0x1.fp-1025 + 0.5 i)":
  112973. +ildouble: 1
  112974. +ldouble: 1
  112975. +Test "Imaginary part of: cacos (0x1.fp-1025 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  112976. +ildouble: 1
  112977. +ldouble: 1
  112978. +Test "Imaginary part of: cacos (0x1.fp-1025 + 0x1.0000000000001p0 i)":
  112979. +ildouble: 1
  112980. +ldouble: 1
  112981. +Test "Imaginary part of: cacos (0x1.fp-1025 + 1.0 i)":
  112982. +double: 1
  112983. +idouble: 1
  112984. +ildouble: 1
  112985. +ldouble: 1
  112986. +Test "Imaginary part of: cacos (0x1.fp-1025 + 1.5 i)":
  112987. +double: 1
  112988. +idouble: 1
  112989. +ildouble: 1
  112990. +ldouble: 1
  112991. +Test "Imaginary part of: cacos (0x1.fp-1025 - 0.5 i)":
  112992. +ildouble: 1
  112993. +ldouble: 1
  112994. +Test "Imaginary part of: cacos (0x1.fp-1025 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  112995. +ildouble: 1
  112996. +ldouble: 1
  112997. +Test "Imaginary part of: cacos (0x1.fp-1025 - 0x1.0000000000001p0 i)":
  112998. +ildouble: 1
  112999. +ldouble: 1
  113000. +Test "Imaginary part of: cacos (0x1.fp-1025 - 1.0 i)":
  113001. +double: 1
  113002. +idouble: 1
  113003. +ildouble: 1
  113004. +ldouble: 1
  113005. +Test "Imaginary part of: cacos (0x1.fp-1025 - 1.5 i)":
  113006. +double: 1
  113007. +idouble: 1
  113008. +ildouble: 1
  113009. +ldouble: 1
  113010. +Test "Imaginary part of: cacos (0x1.fp-129 + 0.5 i)":
  113011. +float: 1
  113012. +ifloat: 1
  113013. +ildouble: 1
  113014. +ldouble: 1
  113015. +Test "Imaginary part of: cacos (0x1.fp-129 + 1.0 i)":
  113016. +double: 1
  113017. +float: 1
  113018. +idouble: 1
  113019. +ifloat: 1
  113020. +ildouble: 1
  113021. +ldouble: 1
  113022. +Test "Imaginary part of: cacos (0x1.fp-129 + 1.5 i)":
  113023. +double: 1
  113024. +idouble: 1
  113025. +ildouble: 1
  113026. +ldouble: 1
  113027. +Test "Imaginary part of: cacos (0x1.fp-129 - 0.5 i)":
  113028. +float: 1
  113029. +ifloat: 1
  113030. +ildouble: 1
  113031. +ldouble: 1
  113032. +Test "Imaginary part of: cacos (0x1.fp-129 - 1.0 i)":
  113033. +double: 1
  113034. +float: 1
  113035. +idouble: 1
  113036. +ifloat: 1
  113037. +ildouble: 1
  113038. +ldouble: 1
  113039. +Test "Imaginary part of: cacos (0x1.fp-129 - 1.5 i)":
  113040. +double: 1
  113041. +idouble: 1
  113042. +ildouble: 1
  113043. +ldouble: 1
  113044. +Test "Imaginary part of: cacos (0x1.fp-16385 + 0.5 i)":
  113045. +ildouble: 1
  113046. +ldouble: 1
  113047. +Test "Imaginary part of: cacos (0x1.fp-16385 + 0x0.ffffffffffffffffp0 i)":
  113048. +ildouble: 1
  113049. +ldouble: 1
  113050. +Test "Imaginary part of: cacos (0x1.fp-16385 + 0x1.0000000000000000000000000001p0 i)":
  113051. +ildouble: 1
  113052. +ldouble: 1
  113053. +Test "Imaginary part of: cacos (0x1.fp-16385 + 0x1.0000000000000002p0 i)":
  113054. +ildouble: 1
  113055. +ldouble: 1
  113056. +Test "Imaginary part of: cacos (0x1.fp-16385 + 1.0 i)":
  113057. +ildouble: 1
  113058. +ldouble: 1
  113059. +Test "Imaginary part of: cacos (0x1.fp-16385 + 1.5 i)":
  113060. +ildouble: 1
  113061. +ldouble: 1
  113062. +Test "Imaginary part of: cacos (0x1.fp-16385 - 0.5 i)":
  113063. +ildouble: 1
  113064. +ldouble: 1
  113065. +Test "Imaginary part of: cacos (0x1.fp-16385 - 0x0.ffffffffffffffffp0 i)":
  113066. +ildouble: 1
  113067. +ldouble: 1
  113068. +Test "Imaginary part of: cacos (0x1.fp-16385 - 0x1.0000000000000000000000000001p0 i)":
  113069. +ildouble: 1
  113070. +ldouble: 1
  113071. +Test "Imaginary part of: cacos (0x1.fp-16385 - 0x1.0000000000000002p0 i)":
  113072. +ildouble: 1
  113073. +ldouble: 1
  113074. +Test "Imaginary part of: cacos (0x1.fp-16385 - 1.0 i)":
  113075. +ildouble: 1
  113076. +ldouble: 1
  113077. +Test "Imaginary part of: cacos (0x1.fp-16385 - 1.5 i)":
  113078. +ildouble: 1
  113079. +ldouble: 1
  113080. +Test "Imaginary part of: cacos (0x1.fp-30 + 1.0 i)":
  113081. +double: 1
  113082. +float: 1
  113083. +idouble: 1
  113084. +ifloat: 1
  113085. +ildouble: 1
  113086. +ldouble: 1
  113087. +Test "Imaginary part of: cacos (0x1.fp-30 - 1.0 i)":
  113088. +double: 1
  113089. +float: 1
  113090. +idouble: 1
  113091. +ifloat: 1
  113092. +ildouble: 1
  113093. +ldouble: 1
  113094. +Test "Imaginary part of: cacos (0x1.fp1023 + 0x1.fp1023 i)":
  113095. +double: 1
  113096. +idouble: 1
  113097. +Test "Imaginary part of: cacos (0x1.fp127 + 0x1.fp127 i)":
  113098. +double: 1
  113099. +idouble: 1
  113100. +Test "Imaginary part of: cacos (0x1.fp16383 + 0x1.fp16383 i)":
  113101. +ildouble: 1
  113102. +ldouble: 1
  113103. +Test "Imaginary part of: cacos (0x1p-105 + 0.5 i)":
  113104. +float: 1
  113105. +ifloat: 1
  113106. +Test "Real part of: cacos (0x1p-105 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  113107. +ildouble: 1
  113108. +ldouble: 1
  113109. +Test "Imaginary part of: cacos (0x1p-105 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  113110. +ildouble: 1
  113111. +ldouble: 1
  113112. +Test "Imaginary part of: cacos (0x1p-105 - 0.5 i)":
  113113. +float: 1
  113114. +ifloat: 1
  113115. +Test "Real part of: cacos (0x1p-105 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  113116. +ildouble: 1
  113117. +ldouble: 1
  113118. +Test "Imaginary part of: cacos (0x1p-105 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  113119. +ildouble: 1
  113120. +ldouble: 1
  113121. +Test "Imaginary part of: cacos (0x1p-112 + 0.5 i)":
  113122. +float: 1
  113123. +ifloat: 1
  113124. +Test "Real part of: cacos (0x1p-112 + 0x0.ffffffffffffffffffffffffffff8p0 i)":
  113125. +ildouble: 1
  113126. +ldouble: 1
  113127. +Test "Imaginary part of: cacos (0x1p-112 - 0.5 i)":
  113128. +float: 1
  113129. +ifloat: 1
  113130. +Test "Real part of: cacos (0x1p-112 - 0x0.ffffffffffffffffffffffffffff8p0 i)":
  113131. +ildouble: 1
  113132. +ldouble: 1
  113133. +Test "Imaginary part of: cacos (0x1p-113 + 0x1.0000000000000000000000000001p0 i)":
  113134. +ildouble: 1
  113135. +ldouble: 1
  113136. +Test "Imaginary part of: cacos (0x1p-113 - 0x1.0000000000000000000000000001p0 i)":
  113137. +ildouble: 1
  113138. +ldouble: 1
  113139. +Test "Imaginary part of: cacos (0x1p-23 + 0.5 i)":
  113140. +float: 1
  113141. +ifloat: 1
  113142. +ildouble: 2
  113143. +ldouble: 2
  113144. +Test "Imaginary part of: cacos (0x1p-23 + 0x0.ffffffp0 i)":
  113145. +double: 1
  113146. +idouble: 1
  113147. +Test "Real part of: cacos (0x1p-23 + 0x1.000002p0 i)":
  113148. +ildouble: 1
  113149. +ldouble: 1
  113150. +Test "Imaginary part of: cacos (0x1p-23 - 0.5 i)":
  113151. +float: 1
  113152. +ifloat: 1
  113153. +ildouble: 2
  113154. +ldouble: 2
  113155. +Test "Imaginary part of: cacos (0x1p-23 - 0x0.ffffffp0 i)":
  113156. +double: 1
  113157. +idouble: 1
  113158. +Test "Real part of: cacos (0x1p-23 - 0x1.000002p0 i)":
  113159. +ildouble: 1
  113160. +ldouble: 1
  113161. +Test "Real part of: cacos (0x1p-52 + 0.5 i)":
  113162. +ildouble: 1
  113163. +ldouble: 1
  113164. +Test "Imaginary part of: cacos (0x1p-52 + 0.5 i)":
  113165. +float: 1
  113166. +ifloat: 1
  113167. +ildouble: 1
  113168. +ldouble: 1
  113169. +Test "Real part of: cacos (0x1p-52 + 0x0.fffffffffffff8p0 i)":
  113170. +ildouble: 1
  113171. +ldouble: 1
  113172. +Test "Real part of: cacos (0x1p-52 - 0.5 i)":
  113173. +ildouble: 1
  113174. +ldouble: 1
  113175. +Test "Imaginary part of: cacos (0x1p-52 - 0.5 i)":
  113176. +float: 1
  113177. +ifloat: 1
  113178. +ildouble: 1
  113179. +ldouble: 1
  113180. +Test "Real part of: cacos (0x1p-52 - 0x0.fffffffffffff8p0 i)":
  113181. +ildouble: 1
  113182. +ldouble: 1
  113183. +Test "Real part of: cacos (0x1p-63 + 0.5 i)":
  113184. +ildouble: 1
  113185. +ldouble: 1
  113186. +Test "Imaginary part of: cacos (0x1p-63 + 0.5 i)":
  113187. +float: 1
  113188. +ifloat: 1
  113189. +Test "Imaginary part of: cacos (0x1p-63 + 0x0.ffffffffffffffffp0 i)":
  113190. +ildouble: 1
  113191. +ldouble: 1
  113192. +Test "Imaginary part of: cacos (0x1p-63 + 0x1.0000000000000002p0 i)":
  113193. +ildouble: 1
  113194. +ldouble: 1
  113195. +Test "Real part of: cacos (0x1p-63 - 0.5 i)":
  113196. +ildouble: 1
  113197. +ldouble: 1
  113198. +Test "Imaginary part of: cacos (0x1p-63 - 0.5 i)":
  113199. +float: 1
  113200. +ifloat: 1
  113201. +Test "Imaginary part of: cacos (0x1p-63 - 0x0.ffffffffffffffffp0 i)":
  113202. +ildouble: 1
  113203. +ldouble: 1
  113204. +Test "Imaginary part of: cacos (0x1p-63 - 0x1.0000000000000002p0 i)":
  113205. +ildouble: 1
  113206. +ldouble: 1
  113207. +Test "Imaginary part of: cacos (0x1p500 + 1.0 i)":
  113208. +ildouble: 1
  113209. +ldouble: 1
  113210. +Test "Imaginary part of: cacos (0x1p500 - 1.0 i)":
  113211. +ildouble: 1
  113212. +ldouble: 1
  113213. +Test "Imaginary part of: cacos (0x1p5000 + 1.0 i)":
  113214. +ildouble: 1
  113215. +ldouble: 1
  113216. +Test "Imaginary part of: cacos (0x1p5000 - 1.0 i)":
  113217. +ildouble: 1
  113218. +ldouble: 1
  113219. +Test "Real part of: cacos (1.0 + 0.25 i)":
  113220. +double: 1
  113221. +idouble: 1
  113222. +Test "Real part of: cacos (1.0 + 0.5 i)":
  113223. +float: 1
  113224. +ifloat: 1
  113225. +Test "Imaginary part of: cacos (1.0 + 0.5 i)":
  113226. +float: 1
  113227. +ifloat: 1
  113228. +Test "Real part of: cacos (1.0 + 0x1.fp-10 i)":
  113229. +float: 2
  113230. +ifloat: 2
  113231. +Test "Imaginary part of: cacos (1.0 + 0x1.fp-10 i)":
  113232. +float: 1
  113233. +ifloat: 1
  113234. +ildouble: 1
  113235. +ldouble: 1
  113236. +Test "Real part of: cacos (1.0 + 0x1.fp-100 i)":
  113237. +ildouble: 1
  113238. +ldouble: 1
  113239. +Test "Imaginary part of: cacos (1.0 + 0x1.fp-30 i)":
  113240. +ildouble: 1
  113241. +ldouble: 1
  113242. +Test "Imaginary part of: cacos (1.0 + 0x1p500 i)":
  113243. +ildouble: 1
  113244. +ldouble: 1
  113245. +Test "Imaginary part of: cacos (1.0 + 0x1p5000 i)":
  113246. +ildouble: 1
  113247. +ldouble: 1
  113248. +Test "Real part of: cacos (1.0 - 0.25 i)":
  113249. +double: 1
  113250. +idouble: 1
  113251. +Test "Real part of: cacos (1.0 - 0.5 i)":
  113252. +float: 1
  113253. +ifloat: 1
  113254. +Test "Imaginary part of: cacos (1.0 - 0.5 i)":
  113255. +float: 1
  113256. +ifloat: 1
  113257. +Test "Real part of: cacos (1.0 - 0x1.fp-10 i)":
  113258. +float: 2
  113259. +ifloat: 2
  113260. +Test "Imaginary part of: cacos (1.0 - 0x1.fp-10 i)":
  113261. +float: 1
  113262. +ifloat: 1
  113263. +ildouble: 1
  113264. +ldouble: 1
  113265. +Test "Real part of: cacos (1.0 - 0x1.fp-100 i)":
  113266. +ildouble: 1
  113267. +ldouble: 1
  113268. +Test "Imaginary part of: cacos (1.0 - 0x1.fp-30 i)":
  113269. +ildouble: 1
  113270. +ldouble: 1
  113271. +Test "Imaginary part of: cacos (1.0 - 0x1p500 i)":
  113272. +ildouble: 1
  113273. +ldouble: 1
  113274. +Test "Imaginary part of: cacos (1.0 - 0x1p5000 i)":
  113275. +ildouble: 1
  113276. +ldouble: 1
  113277. +
  113278. +# cacosh
  113279. +Test "Real part of: cacosh (+0 + 0.5 i)":
  113280. +float: 1
  113281. +ifloat: 1
  113282. +ildouble: 1
  113283. +ldouble: 1
  113284. +Test "Real part of: cacosh (+0 + 1.0 i)":
  113285. +double: 1
  113286. +float: 1
  113287. +idouble: 1
  113288. +ifloat: 1
  113289. +ildouble: 1
  113290. +ldouble: 1
  113291. +Test "Real part of: cacosh (+0 + 1.5 i)":
  113292. +double: 1
  113293. +idouble: 1
  113294. +ildouble: 1
  113295. +ldouble: 1
  113296. +Test "Real part of: cacosh (+0 - 0.5 i)":
  113297. +float: 1
  113298. +ifloat: 1
  113299. +ildouble: 1
  113300. +ldouble: 1
  113301. +Test "Real part of: cacosh (+0 - 1.0 i)":
  113302. +double: 1
  113303. +float: 1
  113304. +idouble: 1
  113305. +ifloat: 1
  113306. +ildouble: 1
  113307. +ldouble: 1
  113308. +Test "Real part of: cacosh (+0 - 1.5 i)":
  113309. +double: 1
  113310. +idouble: 1
  113311. +ildouble: 1
  113312. +ldouble: 1
  113313. +Test "Real part of: cacosh (-0 + 0.5 i)":
  113314. +float: 1
  113315. +ifloat: 1
  113316. +ildouble: 1
  113317. +ldouble: 1
  113318. +Test "Real part of: cacosh (-0 + 1.0 i)":
  113319. +double: 1
  113320. +float: 1
  113321. +idouble: 1
  113322. +ifloat: 1
  113323. +ildouble: 1
  113324. +ldouble: 1
  113325. +Test "Real part of: cacosh (-0 + 1.5 i)":
  113326. +double: 1
  113327. +idouble: 1
  113328. +ildouble: 1
  113329. +ldouble: 1
  113330. +Test "Real part of: cacosh (-0 - 0.5 i)":
  113331. +float: 1
  113332. +ifloat: 1
  113333. +ildouble: 1
  113334. +ldouble: 1
  113335. +Test "Real part of: cacosh (-0 - 1.0 i)":
  113336. +double: 1
  113337. +float: 1
  113338. +idouble: 1
  113339. +ifloat: 1
  113340. +ildouble: 1
  113341. +ldouble: 1
  113342. +Test "Real part of: cacosh (-0 - 1.5 i)":
  113343. +double: 1
  113344. +idouble: 1
  113345. +ildouble: 1
  113346. +ldouble: 1
  113347. +Test "Real part of: cacosh (-0.0 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  113348. +ildouble: 1
  113349. +ldouble: 1
  113350. +Test "Real part of: cacosh (-0.0 + 0x0.ffffffffffffffffp0 i)":
  113351. +ildouble: 1
  113352. +ldouble: 1
  113353. +Test "Real part of: cacosh (-0.0 + 0x1.0000000000000000000000000001p0 i)":
  113354. +ildouble: 1
  113355. +ldouble: 1
  113356. +Test "Real part of: cacosh (-0.0 + 0x1.0000000000000002p0 i)":
  113357. +ildouble: 1
  113358. +ldouble: 1
  113359. +Test "Real part of: cacosh (-0.0 + 0x1.0000000000001p0 i)":
  113360. +ildouble: 1
  113361. +ldouble: 1
  113362. +Test "Real part of: cacosh (-0.0 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  113363. +ildouble: 1
  113364. +ldouble: 1
  113365. +Test "Real part of: cacosh (-0.0 - 0x0.ffffffffffffffffp0 i)":
  113366. +ildouble: 1
  113367. +ldouble: 1
  113368. +Test "Real part of: cacosh (-0.0 - 0x1.0000000000000000000000000001p0 i)":
  113369. +ildouble: 1
  113370. +ldouble: 1
  113371. +Test "Real part of: cacosh (-0.0 - 0x1.0000000000000002p0 i)":
  113372. +ildouble: 1
  113373. +ldouble: 1
  113374. +Test "Real part of: cacosh (-0.0 - 0x1.0000000000001p0 i)":
  113375. +ildouble: 1
  113376. +ldouble: 1
  113377. +Test "Real part of: cacosh (-0.25 + 1.0 i)":
  113378. +float: 1
  113379. +ifloat: 1
  113380. +ildouble: 1
  113381. +ldouble: 1
  113382. +Test "Imaginary part of: cacosh (-0.25 + 1.0 i)":
  113383. +double: 1
  113384. +float: 1
  113385. +idouble: 1
  113386. +ifloat: 1
  113387. +Test "Real part of: cacosh (-0.25 - 1.0 i)":
  113388. +float: 1
  113389. +ifloat: 1
  113390. +ildouble: 1
  113391. +ldouble: 1
  113392. +Test "Imaginary part of: cacosh (-0.25 - 1.0 i)":
  113393. +double: 1
  113394. +float: 1
  113395. +idouble: 1
  113396. +ifloat: 1
  113397. +Test "Imaginary part of: cacosh (-0.5 + +0 i)":
  113398. +ildouble: 1
  113399. +ldouble: 1
  113400. +Test "Imaginary part of: cacosh (-0.5 + 0x1.fp-1025 i)":
  113401. +ildouble: 1
  113402. +ldouble: 1
  113403. +Test "Real part of: cacosh (-0.5 + 0x1.fp-129 i)":
  113404. +double: 1
  113405. +idouble: 1
  113406. +Test "Imaginary part of: cacosh (-0.5 + 0x1.fp-129 i)":
  113407. +ildouble: 1
  113408. +ldouble: 1
  113409. +Test "Imaginary part of: cacosh (-0.5 + 0x1.fp-16385 i)":
  113410. +ildouble: 1
  113411. +ldouble: 1
  113412. +Test "Real part of: cacosh (-0.5 + 0x1p-105 i)":
  113413. +double: 1
  113414. +idouble: 1
  113415. +ildouble: 1
  113416. +ldouble: 1
  113417. +Test "Imaginary part of: cacosh (-0.5 + 0x1p-105 i)":
  113418. +ildouble: 1
  113419. +ldouble: 1
  113420. +Test "Real part of: cacosh (-0.5 + 0x1p-112 i)":
  113421. +double: 1
  113422. +idouble: 1
  113423. +ildouble: 1
  113424. +ldouble: 1
  113425. +Test "Imaginary part of: cacosh (-0.5 + 0x1p-112 i)":
  113426. +ildouble: 1
  113427. +ldouble: 1
  113428. +Test "Real part of: cacosh (-0.5 + 0x1p-23 i)":
  113429. +double: 1
  113430. +idouble: 1
  113431. +ildouble: 1
  113432. +ldouble: 1
  113433. +Test "Imaginary part of: cacosh (-0.5 + 0x1p-52 i)":
  113434. +ildouble: 1
  113435. +ldouble: 1
  113436. +Test "Real part of: cacosh (-0.5 + 0x1p-63 i)":
  113437. +ildouble: 1
  113438. +ldouble: 1
  113439. +Test "Imaginary part of: cacosh (-0.5 + 0x1p-63 i)":
  113440. +ildouble: 1
  113441. +ldouble: 1
  113442. +Test "Real part of: cacosh (-0.5 + 1.0 i)":
  113443. +double: 1
  113444. +idouble: 1
  113445. +ildouble: 1
  113446. +ldouble: 1
  113447. +Test "Imaginary part of: cacosh (-0.5 + 1.0 i)":
  113448. +float: 1
  113449. +ifloat: 1
  113450. +Test "Imaginary part of: cacosh (-0.5 - 0 i)":
  113451. +ildouble: 1
  113452. +ldouble: 1
  113453. +Test "Imaginary part of: cacosh (-0.5 - 0x1.fp-1025 i)":
  113454. +ildouble: 1
  113455. +ldouble: 1
  113456. +Test "Real part of: cacosh (-0.5 - 0x1.fp-129 i)":
  113457. +double: 1
  113458. +idouble: 1
  113459. +Test "Imaginary part of: cacosh (-0.5 - 0x1.fp-129 i)":
  113460. +ildouble: 1
  113461. +ldouble: 1
  113462. +Test "Imaginary part of: cacosh (-0.5 - 0x1.fp-16385 i)":
  113463. +ildouble: 1
  113464. +ldouble: 1
  113465. +Test "Real part of: cacosh (-0.5 - 0x1p-105 i)":
  113466. +double: 1
  113467. +idouble: 1
  113468. +ildouble: 1
  113469. +ldouble: 1
  113470. +Test "Imaginary part of: cacosh (-0.5 - 0x1p-105 i)":
  113471. +ildouble: 1
  113472. +ldouble: 1
  113473. +Test "Real part of: cacosh (-0.5 - 0x1p-112 i)":
  113474. +double: 1
  113475. +idouble: 1
  113476. +ildouble: 1
  113477. +ldouble: 1
  113478. +Test "Imaginary part of: cacosh (-0.5 - 0x1p-112 i)":
  113479. +ildouble: 1
  113480. +ldouble: 1
  113481. +Test "Real part of: cacosh (-0.5 - 0x1p-23 i)":
  113482. +double: 1
  113483. +idouble: 1
  113484. +ildouble: 1
  113485. +ldouble: 1
  113486. +Test "Imaginary part of: cacosh (-0.5 - 0x1p-52 i)":
  113487. +ildouble: 1
  113488. +ldouble: 1
  113489. +Test "Real part of: cacosh (-0.5 - 0x1p-63 i)":
  113490. +ildouble: 1
  113491. +ldouble: 1
  113492. +Test "Imaginary part of: cacosh (-0.5 - 0x1p-63 i)":
  113493. +ildouble: 1
  113494. +ldouble: 1
  113495. +Test "Real part of: cacosh (-0.5 - 1.0 i)":
  113496. +double: 1
  113497. +idouble: 1
  113498. +ildouble: 1
  113499. +ldouble: 1
  113500. +Test "Imaginary part of: cacosh (-0.5 - 1.0 i)":
  113501. +float: 1
  113502. +ifloat: 1
  113503. +Test "Real part of: cacosh (-0x0.fffffffffffff8p0 + 0x1p-52 i)":
  113504. +double: 1
  113505. +idouble: 1
  113506. +Test "Real part of: cacosh (-0x0.fffffffffffff8p0 - 0x1p-52 i)":
  113507. +double: 1
  113508. +idouble: 1
  113509. +Test "Real part of: cacosh (-0x0.ffffffffffffffffffffffffffcp0 + 0x1p-105 i)":
  113510. +ildouble: 1
  113511. +ldouble: 1
  113512. +Test "Real part of: cacosh (-0x0.ffffffffffffffffffffffffffcp0 - 0x1p-105 i)":
  113513. +ildouble: 1
  113514. +ldouble: 1
  113515. +Test "Real part of: cacosh (-0x0.ffffffffffffffffp0 + 0x1p-63 i)":
  113516. +ildouble: 1
  113517. +ldouble: 1
  113518. +Test "Real part of: cacosh (-0x0.ffffffffffffffffp0 - 0x1p-63 i)":
  113519. +ildouble: 1
  113520. +ldouble: 1
  113521. +Test "Real part of: cacosh (-0x0.ffffffp0 + 0x1p-23 i)":
  113522. +float: 2
  113523. +ifloat: 2
  113524. +Test "Real part of: cacosh (-0x0.ffffffp0 - 0x1p-23 i)":
  113525. +float: 2
  113526. +ifloat: 2
  113527. +Test "Real part of: cacosh (-0x1.0000000000000000000000000001p0 + 0.0 i)":
  113528. +ildouble: 1
  113529. +ldouble: 1
  113530. +Test "Real part of: cacosh (-0x1.0000000000000000000000000001p0 + 0x1.fp-16385 i)":
  113531. +ildouble: 1
  113532. +ldouble: 1
  113533. +Test "Real part of: cacosh (-0x1.0000000000000000000000000001p0 + 0x1p-113 i)":
  113534. +ildouble: 1
  113535. +ldouble: 1
  113536. +Test "Real part of: cacosh (-0x1.0000000000000000000000000001p0 - 0.0 i)":
  113537. +ildouble: 1
  113538. +ldouble: 1
  113539. +Test "Real part of: cacosh (-0x1.0000000000000000000000000001p0 - 0x1.fp-16385 i)":
  113540. +ildouble: 1
  113541. +ldouble: 1
  113542. +Test "Real part of: cacosh (-0x1.0000000000000000000000000001p0 - 0x1p-113 i)":
  113543. +ildouble: 1
  113544. +ldouble: 1
  113545. +Test "Real part of: cacosh (-0x1.000002p0 + 0x1p-23 i)":
  113546. +float: 1
  113547. +ifloat: 1
  113548. +ildouble: 1
  113549. +ldouble: 1
  113550. +Test "Real part of: cacosh (-0x1.000002p0 - 0x1p-23 i)":
  113551. +float: 1
  113552. +ifloat: 1
  113553. +ildouble: 1
  113554. +ldouble: 1
  113555. +Test "Real part of: cacosh (-0x1.fp-10 + 1.0 i)":
  113556. +double: 1
  113557. +idouble: 1
  113558. +Test "Real part of: cacosh (-0x1.fp-10 - 1.0 i)":
  113559. +double: 1
  113560. +idouble: 1
  113561. +Test "Real part of: cacosh (-0x1.fp-100 + 1.0 i)":
  113562. +double: 1
  113563. +float: 1
  113564. +idouble: 1
  113565. +ifloat: 1
  113566. +ildouble: 1
  113567. +ldouble: 1
  113568. +Test "Imaginary part of: cacosh (-0x1.fp-100 + 1.0 i)":
  113569. +float: 1
  113570. +ifloat: 1
  113571. +Test "Real part of: cacosh (-0x1.fp-100 - 1.0 i)":
  113572. +double: 1
  113573. +float: 1
  113574. +idouble: 1
  113575. +ifloat: 1
  113576. +ildouble: 1
  113577. +ldouble: 1
  113578. +Test "Imaginary part of: cacosh (-0x1.fp-100 - 1.0 i)":
  113579. +float: 1
  113580. +ifloat: 1
  113581. +Test "Real part of: cacosh (-0x1.fp-1000 + 1.0 i)":
  113582. +double: 1
  113583. +idouble: 1
  113584. +ildouble: 1
  113585. +ldouble: 1
  113586. +Test "Real part of: cacosh (-0x1.fp-1000 - 1.0 i)":
  113587. +double: 1
  113588. +idouble: 1
  113589. +ildouble: 1
  113590. +ldouble: 1
  113591. +Test "Real part of: cacosh (-0x1.fp-10000 + 1.0 i)":
  113592. +ildouble: 1
  113593. +ldouble: 1
  113594. +Test "Real part of: cacosh (-0x1.fp-10000 - 1.0 i)":
  113595. +ildouble: 1
  113596. +ldouble: 1
  113597. +Test "Real part of: cacosh (-0x1.fp-1025 + 0.5 i)":
  113598. +ildouble: 1
  113599. +ldouble: 1
  113600. +Test "Real part of: cacosh (-0x1.fp-1025 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  113601. +ildouble: 1
  113602. +ldouble: 1
  113603. +Test "Real part of: cacosh (-0x1.fp-1025 + 0x1.0000000000001p0 i)":
  113604. +ildouble: 1
  113605. +ldouble: 1
  113606. +Test "Real part of: cacosh (-0x1.fp-1025 + 1.0 i)":
  113607. +double: 1
  113608. +idouble: 1
  113609. +ildouble: 1
  113610. +ldouble: 1
  113611. +Test "Real part of: cacosh (-0x1.fp-1025 + 1.5 i)":
  113612. +double: 1
  113613. +idouble: 1
  113614. +ildouble: 1
  113615. +ldouble: 1
  113616. +Test "Real part of: cacosh (-0x1.fp-1025 - 0.5 i)":
  113617. +ildouble: 1
  113618. +ldouble: 1
  113619. +Test "Real part of: cacosh (-0x1.fp-1025 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  113620. +ildouble: 1
  113621. +ldouble: 1
  113622. +Test "Real part of: cacosh (-0x1.fp-1025 - 0x1.0000000000001p0 i)":
  113623. +ildouble: 1
  113624. +ldouble: 1
  113625. +Test "Real part of: cacosh (-0x1.fp-1025 - 1.0 i)":
  113626. +double: 1
  113627. +idouble: 1
  113628. +ildouble: 1
  113629. +ldouble: 1
  113630. +Test "Real part of: cacosh (-0x1.fp-1025 - 1.5 i)":
  113631. +double: 1
  113632. +idouble: 1
  113633. +ildouble: 1
  113634. +ldouble: 1
  113635. +Test "Real part of: cacosh (-0x1.fp-129 + 0.5 i)":
  113636. +float: 1
  113637. +ifloat: 1
  113638. +ildouble: 1
  113639. +ldouble: 1
  113640. +Test "Imaginary part of: cacosh (-0x1.fp-129 + 0.5 i)":
  113641. +float: 1
  113642. +ifloat: 1
  113643. +Test "Imaginary part of: cacosh (-0x1.fp-129 + 0x0.ffffffp0 i)":
  113644. +float: 1
  113645. +ifloat: 1
  113646. +Test "Imaginary part of: cacosh (-0x1.fp-129 + 0x1.000002p0 i)":
  113647. +float: 1
  113648. +ifloat: 1
  113649. +Test "Imaginary part of: cacosh (-0x1.fp-129 + 0x1.fp-129 i)":
  113650. +float: 1
  113651. +ifloat: 1
  113652. +Test "Imaginary part of: cacosh (-0x1.fp-129 + 0x1p-23 i)":
  113653. +float: 1
  113654. +ifloat: 1
  113655. +Test "Real part of: cacosh (-0x1.fp-129 + 1.0 i)":
  113656. +double: 1
  113657. +float: 1
  113658. +idouble: 1
  113659. +ifloat: 1
  113660. +ildouble: 1
  113661. +ldouble: 1
  113662. +Test "Imaginary part of: cacosh (-0x1.fp-129 + 1.0 i)":
  113663. +float: 1
  113664. +ifloat: 1
  113665. +Test "Real part of: cacosh (-0x1.fp-129 + 1.5 i)":
  113666. +double: 1
  113667. +idouble: 1
  113668. +ildouble: 1
  113669. +ldouble: 1
  113670. +Test "Imaginary part of: cacosh (-0x1.fp-129 + 1.5 i)":
  113671. +float: 1
  113672. +ifloat: 1
  113673. +Test "Real part of: cacosh (-0x1.fp-129 - 0.5 i)":
  113674. +float: 1
  113675. +ifloat: 1
  113676. +ildouble: 1
  113677. +ldouble: 1
  113678. +Test "Imaginary part of: cacosh (-0x1.fp-129 - 0.5 i)":
  113679. +float: 1
  113680. +ifloat: 1
  113681. +Test "Imaginary part of: cacosh (-0x1.fp-129 - 0x0.ffffffp0 i)":
  113682. +float: 1
  113683. +ifloat: 1
  113684. +Test "Imaginary part of: cacosh (-0x1.fp-129 - 0x1.000002p0 i)":
  113685. +float: 1
  113686. +ifloat: 1
  113687. +Test "Imaginary part of: cacosh (-0x1.fp-129 - 0x1.fp-129 i)":
  113688. +float: 1
  113689. +ifloat: 1
  113690. +Test "Imaginary part of: cacosh (-0x1.fp-129 - 0x1p-23 i)":
  113691. +float: 1
  113692. +ifloat: 1
  113693. +Test "Real part of: cacosh (-0x1.fp-129 - 1.0 i)":
  113694. +double: 1
  113695. +float: 1
  113696. +idouble: 1
  113697. +ifloat: 1
  113698. +ildouble: 1
  113699. +ldouble: 1
  113700. +Test "Imaginary part of: cacosh (-0x1.fp-129 - 1.0 i)":
  113701. +float: 1
  113702. +ifloat: 1
  113703. +Test "Real part of: cacosh (-0x1.fp-129 - 1.5 i)":
  113704. +double: 1
  113705. +idouble: 1
  113706. +ildouble: 1
  113707. +ldouble: 1
  113708. +Test "Imaginary part of: cacosh (-0x1.fp-129 - 1.5 i)":
  113709. +float: 1
  113710. +ifloat: 1
  113711. +Test "Real part of: cacosh (-0x1.fp-16385 + 0.5 i)":
  113712. +ildouble: 1
  113713. +ldouble: 1
  113714. +Test "Real part of: cacosh (-0x1.fp-16385 + 0x0.ffffffffffffffffp0 i)":
  113715. +ildouble: 1
  113716. +ldouble: 1
  113717. +Test "Real part of: cacosh (-0x1.fp-16385 + 0x1.0000000000000000000000000001p0 i)":
  113718. +ildouble: 1
  113719. +ldouble: 1
  113720. +Test "Real part of: cacosh (-0x1.fp-16385 + 0x1.0000000000000002p0 i)":
  113721. +ildouble: 1
  113722. +ldouble: 1
  113723. +Test "Real part of: cacosh (-0x1.fp-16385 + 1.0 i)":
  113724. +ildouble: 1
  113725. +ldouble: 1
  113726. +Test "Real part of: cacosh (-0x1.fp-16385 + 1.5 i)":
  113727. +ildouble: 1
  113728. +ldouble: 1
  113729. +Test "Real part of: cacosh (-0x1.fp-16385 - 0.5 i)":
  113730. +ildouble: 1
  113731. +ldouble: 1
  113732. +Test "Real part of: cacosh (-0x1.fp-16385 - 0x0.ffffffffffffffffp0 i)":
  113733. +ildouble: 1
  113734. +ldouble: 1
  113735. +Test "Real part of: cacosh (-0x1.fp-16385 - 0x1.0000000000000000000000000001p0 i)":
  113736. +ildouble: 1
  113737. +ldouble: 1
  113738. +Test "Real part of: cacosh (-0x1.fp-16385 - 0x1.0000000000000002p0 i)":
  113739. +ildouble: 1
  113740. +ldouble: 1
  113741. +Test "Real part of: cacosh (-0x1.fp-16385 - 1.0 i)":
  113742. +ildouble: 1
  113743. +ldouble: 1
  113744. +Test "Real part of: cacosh (-0x1.fp-16385 - 1.5 i)":
  113745. +ildouble: 1
  113746. +ldouble: 1
  113747. +Test "Real part of: cacosh (-0x1.fp-30 + 1.0 i)":
  113748. +double: 1
  113749. +float: 1
  113750. +idouble: 1
  113751. +ifloat: 1
  113752. +ildouble: 1
  113753. +ldouble: 1
  113754. +Test "Imaginary part of: cacosh (-0x1.fp-30 + 1.0 i)":
  113755. +float: 1
  113756. +ifloat: 1
  113757. +Test "Real part of: cacosh (-0x1.fp-30 - 1.0 i)":
  113758. +double: 1
  113759. +float: 1
  113760. +idouble: 1
  113761. +ifloat: 1
  113762. +ildouble: 1
  113763. +ldouble: 1
  113764. +Test "Imaginary part of: cacosh (-0x1.fp-30 - 1.0 i)":
  113765. +float: 1
  113766. +ifloat: 1
  113767. +Test "Imaginary part of: cacosh (-0x1p-105 + 0.0 i)":
  113768. +float: 1
  113769. +ifloat: 1
  113770. +Test "Real part of: cacosh (-0x1p-105 + 0.5 i)":
  113771. +float: 1
  113772. +ifloat: 1
  113773. +Test "Imaginary part of: cacosh (-0x1p-105 + 0.5 i)":
  113774. +float: 1
  113775. +ifloat: 1
  113776. +ildouble: 1
  113777. +ldouble: 1
  113778. +Test "Real part of: cacosh (-0x1p-105 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  113779. +ildouble: 1
  113780. +ldouble: 1
  113781. +Test "Imaginary part of: cacosh (-0x1p-105 + 0x1p-105 i)":
  113782. +float: 1
  113783. +ifloat: 1
  113784. +Test "Imaginary part of: cacosh (-0x1p-105 - 0.0 i)":
  113785. +float: 1
  113786. +ifloat: 1
  113787. +Test "Real part of: cacosh (-0x1p-105 - 0.5 i)":
  113788. +float: 1
  113789. +ifloat: 1
  113790. +Test "Imaginary part of: cacosh (-0x1p-105 - 0.5 i)":
  113791. +float: 1
  113792. +ifloat: 1
  113793. +ildouble: 1
  113794. +ldouble: 1
  113795. +Test "Real part of: cacosh (-0x1p-105 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  113796. +ildouble: 1
  113797. +ldouble: 1
  113798. +Test "Imaginary part of: cacosh (-0x1p-105 - 0x1p-105 i)":
  113799. +float: 1
  113800. +ifloat: 1
  113801. +Test "Imaginary part of: cacosh (-0x1p-112 + 0.0 i)":
  113802. +float: 1
  113803. +ifloat: 1
  113804. +Test "Real part of: cacosh (-0x1p-112 + 0.5 i)":
  113805. +float: 1
  113806. +ifloat: 1
  113807. +Test "Imaginary part of: cacosh (-0x1p-112 + 0.5 i)":
  113808. +float: 1
  113809. +ifloat: 1
  113810. +Test "Imaginary part of: cacosh (-0x1p-112 + 0x1p-112 i)":
  113811. +float: 1
  113812. +ifloat: 1
  113813. +Test "Imaginary part of: cacosh (-0x1p-112 - 0.0 i)":
  113814. +float: 1
  113815. +ifloat: 1
  113816. +Test "Real part of: cacosh (-0x1p-112 - 0.5 i)":
  113817. +float: 1
  113818. +ifloat: 1
  113819. +Test "Imaginary part of: cacosh (-0x1p-112 - 0.5 i)":
  113820. +float: 1
  113821. +ifloat: 1
  113822. +Test "Imaginary part of: cacosh (-0x1p-112 - 0x1p-112 i)":
  113823. +float: 1
  113824. +ifloat: 1
  113825. +Test "Real part of: cacosh (-0x1p-113 + 0x1.0000000000000000000000000001p0 i)":
  113826. +ildouble: 1
  113827. +ldouble: 1
  113828. +Test "Imaginary part of: cacosh (-0x1p-113 + 0x1.0000000000000000000000000001p0 i)":
  113829. +ildouble: 1
  113830. +ldouble: 1
  113831. +Test "Real part of: cacosh (-0x1p-113 - 0x1.0000000000000000000000000001p0 i)":
  113832. +ildouble: 1
  113833. +ldouble: 1
  113834. +Test "Imaginary part of: cacosh (-0x1p-113 - 0x1.0000000000000000000000000001p0 i)":
  113835. +ildouble: 1
  113836. +ldouble: 1
  113837. +Test "Imaginary part of: cacosh (-0x1p-23 + 0.0 i)":
  113838. +float: 1
  113839. +ifloat: 1
  113840. +ildouble: 1
  113841. +ldouble: 1
  113842. +Test "Real part of: cacosh (-0x1p-23 + 0.5 i)":
  113843. +float: 1
  113844. +ifloat: 1
  113845. +ildouble: 2
  113846. +ldouble: 2
  113847. +Test "Imaginary part of: cacosh (-0x1p-23 + 0.5 i)":
  113848. +float: 1
  113849. +ifloat: 1
  113850. +Test "Real part of: cacosh (-0x1p-23 + 0x0.ffffffp0 i)":
  113851. +double: 1
  113852. +idouble: 1
  113853. +Test "Imaginary part of: cacosh (-0x1p-23 + 0x1.fp-129 i)":
  113854. +float: 1
  113855. +ifloat: 1
  113856. +ildouble: 1
  113857. +ldouble: 1
  113858. +Test "Imaginary part of: cacosh (-0x1p-23 + 0x1p-23 i)":
  113859. +float: 1
  113860. +ifloat: 1
  113861. +ildouble: 1
  113862. +ldouble: 1
  113863. +Test "Imaginary part of: cacosh (-0x1p-23 - 0.0 i)":
  113864. +float: 1
  113865. +ifloat: 1
  113866. +ildouble: 1
  113867. +ldouble: 1
  113868. +Test "Real part of: cacosh (-0x1p-23 - 0.5 i)":
  113869. +float: 1
  113870. +ifloat: 1
  113871. +ildouble: 2
  113872. +ldouble: 2
  113873. +Test "Imaginary part of: cacosh (-0x1p-23 - 0.5 i)":
  113874. +float: 1
  113875. +ifloat: 1
  113876. +Test "Real part of: cacosh (-0x1p-23 - 0x0.ffffffp0 i)":
  113877. +double: 1
  113878. +idouble: 1
  113879. +Test "Imaginary part of: cacosh (-0x1p-23 - 0x1.fp-129 i)":
  113880. +float: 1
  113881. +ifloat: 1
  113882. +ildouble: 1
  113883. +ldouble: 1
  113884. +Test "Imaginary part of: cacosh (-0x1p-23 - 0x1p-23 i)":
  113885. +float: 1
  113886. +ifloat: 1
  113887. +ildouble: 1
  113888. +ldouble: 1
  113889. +Test "Imaginary part of: cacosh (-0x1p-52 + 0.0 i)":
  113890. +float: 1
  113891. +ifloat: 1
  113892. +Test "Real part of: cacosh (-0x1p-52 + 0.5 i)":
  113893. +float: 1
  113894. +ifloat: 1
  113895. +ildouble: 1
  113896. +ldouble: 1
  113897. +Test "Imaginary part of: cacosh (-0x1p-52 + 0.5 i)":
  113898. +float: 1
  113899. +ifloat: 1
  113900. +Test "Imaginary part of: cacosh (-0x1p-52 + 0x1p-52 i)":
  113901. +float: 1
  113902. +ifloat: 1
  113903. +Test "Imaginary part of: cacosh (-0x1p-52 - 0.0 i)":
  113904. +float: 1
  113905. +ifloat: 1
  113906. +Test "Real part of: cacosh (-0x1p-52 - 0.5 i)":
  113907. +float: 1
  113908. +ifloat: 1
  113909. +ildouble: 1
  113910. +ldouble: 1
  113911. +Test "Imaginary part of: cacosh (-0x1p-52 - 0.5 i)":
  113912. +float: 1
  113913. +ifloat: 1
  113914. +Test "Imaginary part of: cacosh (-0x1p-52 - 0x1p-52 i)":
  113915. +float: 1
  113916. +ifloat: 1
  113917. +Test "Imaginary part of: cacosh (-0x1p-63 + 0.0 i)":
  113918. +float: 1
  113919. +ifloat: 1
  113920. +Test "Real part of: cacosh (-0x1p-63 + 0.5 i)":
  113921. +float: 1
  113922. +ifloat: 1
  113923. +Test "Imaginary part of: cacosh (-0x1p-63 + 0.5 i)":
  113924. +float: 1
  113925. +ifloat: 1
  113926. +Test "Real part of: cacosh (-0x1p-63 + 0x0.ffffffffffffffffp0 i)":
  113927. +ildouble: 1
  113928. +ldouble: 1
  113929. +Test "Real part of: cacosh (-0x1p-63 + 0x1.0000000000000002p0 i)":
  113930. +ildouble: 1
  113931. +ldouble: 1
  113932. +Test "Imaginary part of: cacosh (-0x1p-63 + 0x1p-63 i)":
  113933. +float: 1
  113934. +ifloat: 1
  113935. +Test "Imaginary part of: cacosh (-0x1p-63 - 0.0 i)":
  113936. +float: 1
  113937. +ifloat: 1
  113938. +Test "Real part of: cacosh (-0x1p-63 - 0.5 i)":
  113939. +float: 1
  113940. +ifloat: 1
  113941. +Test "Imaginary part of: cacosh (-0x1p-63 - 0.5 i)":
  113942. +float: 1
  113943. +ifloat: 1
  113944. +Test "Real part of: cacosh (-0x1p-63 - 0x0.ffffffffffffffffp0 i)":
  113945. +ildouble: 1
  113946. +ldouble: 1
  113947. +Test "Real part of: cacosh (-0x1p-63 - 0x1.0000000000000002p0 i)":
  113948. +ildouble: 1
  113949. +ldouble: 1
  113950. +Test "Imaginary part of: cacosh (-0x1p-63 - 0x1p-63 i)":
  113951. +float: 1
  113952. +ifloat: 1
  113953. +Test "Real part of: cacosh (-0x1p500 + 1.0 i)":
  113954. +ildouble: 1
  113955. +ldouble: 1
  113956. +Test "Real part of: cacosh (-0x1p500 - 1.0 i)":
  113957. +ildouble: 1
  113958. +ldouble: 1
  113959. +Test "Real part of: cacosh (-0x1p5000 + 1.0 i)":
  113960. +ildouble: 1
  113961. +ldouble: 1
  113962. +Test "Real part of: cacosh (-0x1p5000 - 1.0 i)":
  113963. +ildouble: 1
  113964. +ldouble: 1
  113965. +Test "Real part of: cacosh (-1.0 + 0.5 i)":
  113966. +float: 1
  113967. +ifloat: 1
  113968. +Test "Real part of: cacosh (-1.0 + 0x1.fp-10 i)":
  113969. +float: 1
  113970. +ifloat: 1
  113971. +ildouble: 1
  113972. +ldouble: 1
  113973. +Test "Real part of: cacosh (-1.0 + 0x1.fp-30 i)":
  113974. +ildouble: 1
  113975. +ldouble: 1
  113976. +Test "Imaginary part of: cacosh (-1.0 + 0x1p50 i)":
  113977. +float: 1
  113978. +ifloat: 1
  113979. +Test "Real part of: cacosh (-1.0 + 0x1p500 i)":
  113980. +ildouble: 1
  113981. +ldouble: 1
  113982. +Test "Real part of: cacosh (-1.0 + 0x1p5000 i)":
  113983. +ildouble: 1
  113984. +ldouble: 1
  113985. +Test "Real part of: cacosh (-1.0 - 0.5 i)":
  113986. +float: 1
  113987. +ifloat: 1
  113988. +Test "Real part of: cacosh (-1.0 - 0x1.fp-10 i)":
  113989. +float: 1
  113990. +ifloat: 1
  113991. +ildouble: 1
  113992. +ldouble: 1
  113993. +Test "Real part of: cacosh (-1.0 - 0x1.fp-30 i)":
  113994. +ildouble: 1
  113995. +ldouble: 1
  113996. +Test "Imaginary part of: cacosh (-1.0 - 0x1p50 i)":
  113997. +float: 1
  113998. +ifloat: 1
  113999. +Test "Real part of: cacosh (-1.0 - 0x1p500 i)":
  114000. +ildouble: 1
  114001. +ldouble: 1
  114002. +Test "Real part of: cacosh (-1.0 - 0x1p5000 i)":
  114003. +ildouble: 1
  114004. +ldouble: 1
  114005. +Test "Imaginary part of: cacosh (-2 - 3 i)":
  114006. +float: 1
  114007. +ifloat: 1
  114008. +ildouble: 1
  114009. +ldouble: 1
  114010. +Test "Real part of: cacosh (0.0 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  114011. +ildouble: 1
  114012. +ldouble: 1
  114013. +Test "Real part of: cacosh (0.0 + 0x0.ffffffffffffffffp0 i)":
  114014. +ildouble: 1
  114015. +ldouble: 1
  114016. +Test "Real part of: cacosh (0.0 + 0x1.0000000000000000000000000001p0 i)":
  114017. +ildouble: 1
  114018. +ldouble: 1
  114019. +Test "Real part of: cacosh (0.0 + 0x1.0000000000000002p0 i)":
  114020. +ildouble: 1
  114021. +ldouble: 1
  114022. +Test "Real part of: cacosh (0.0 + 0x1.0000000000001p0 i)":
  114023. +ildouble: 1
  114024. +ldouble: 1
  114025. +Test "Real part of: cacosh (0.0 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  114026. +ildouble: 1
  114027. +ldouble: 1
  114028. +Test "Real part of: cacosh (0.0 - 0x0.ffffffffffffffffp0 i)":
  114029. +ildouble: 1
  114030. +ldouble: 1
  114031. +Test "Real part of: cacosh (0.0 - 0x1.0000000000000000000000000001p0 i)":
  114032. +ildouble: 1
  114033. +ldouble: 1
  114034. +Test "Real part of: cacosh (0.0 - 0x1.0000000000000002p0 i)":
  114035. +ildouble: 1
  114036. +ldouble: 1
  114037. +Test "Real part of: cacosh (0.0 - 0x1.0000000000001p0 i)":
  114038. +ildouble: 1
  114039. +ldouble: 1
  114040. +Test "Real part of: cacosh (0.25 + 1.0 i)":
  114041. +float: 1
  114042. +ifloat: 1
  114043. +ildouble: 1
  114044. +ldouble: 1
  114045. +Test "Real part of: cacosh (0.25 - 1.0 i)":
  114046. +float: 1
  114047. +ifloat: 1
  114048. +ildouble: 1
  114049. +ldouble: 1
  114050. +Test "Imaginary part of: cacosh (0.5 + +0 i)":
  114051. +double: 1
  114052. +idouble: 1
  114053. +Test "Imaginary part of: cacosh (0.5 + 0x1.fp-1025 i)":
  114054. +double: 1
  114055. +idouble: 1
  114056. +Test "Real part of: cacosh (0.5 + 0x1.fp-129 i)":
  114057. +double: 1
  114058. +idouble: 1
  114059. +Test "Imaginary part of: cacosh (0.5 + 0x1.fp-129 i)":
  114060. +double: 1
  114061. +idouble: 1
  114062. +Test "Real part of: cacosh (0.5 + 0x1p-105 i)":
  114063. +double: 1
  114064. +idouble: 1
  114065. +ildouble: 1
  114066. +ldouble: 1
  114067. +Test "Imaginary part of: cacosh (0.5 + 0x1p-105 i)":
  114068. +double: 1
  114069. +idouble: 1
  114070. +Test "Real part of: cacosh (0.5 + 0x1p-112 i)":
  114071. +double: 1
  114072. +idouble: 1
  114073. +ildouble: 1
  114074. +ldouble: 1
  114075. +Test "Imaginary part of: cacosh (0.5 + 0x1p-112 i)":
  114076. +double: 1
  114077. +idouble: 1
  114078. +Test "Real part of: cacosh (0.5 + 0x1p-23 i)":
  114079. +double: 1
  114080. +idouble: 1
  114081. +ildouble: 1
  114082. +ldouble: 1
  114083. +Test "Imaginary part of: cacosh (0.5 + 0x1p-52 i)":
  114084. +double: 1
  114085. +idouble: 1
  114086. +ildouble: 1
  114087. +ldouble: 1
  114088. +Test "Real part of: cacosh (0.5 + 0x1p-63 i)":
  114089. +ildouble: 1
  114090. +ldouble: 1
  114091. +Test "Imaginary part of: cacosh (0.5 + 0x1p-63 i)":
  114092. +double: 1
  114093. +idouble: 1
  114094. +Test "Real part of: cacosh (0.5 + 1.0 i)":
  114095. +double: 1
  114096. +idouble: 1
  114097. +ildouble: 1
  114098. +ldouble: 1
  114099. +Test "Imaginary part of: cacosh (0.5 + 1.0 i)":
  114100. +float: 1
  114101. +ifloat: 1
  114102. +Test "Imaginary part of: cacosh (0.5 - 0 i)":
  114103. +double: 1
  114104. +idouble: 1
  114105. +Test "Imaginary part of: cacosh (0.5 - 0x1.fp-1025 i)":
  114106. +double: 1
  114107. +idouble: 1
  114108. +Test "Real part of: cacosh (0.5 - 0x1.fp-129 i)":
  114109. +double: 1
  114110. +idouble: 1
  114111. +Test "Imaginary part of: cacosh (0.5 - 0x1.fp-129 i)":
  114112. +double: 1
  114113. +idouble: 1
  114114. +Test "Real part of: cacosh (0.5 - 0x1p-105 i)":
  114115. +double: 1
  114116. +idouble: 1
  114117. +ildouble: 1
  114118. +ldouble: 1
  114119. +Test "Imaginary part of: cacosh (0.5 - 0x1p-105 i)":
  114120. +double: 1
  114121. +idouble: 1
  114122. +Test "Real part of: cacosh (0.5 - 0x1p-112 i)":
  114123. +double: 1
  114124. +idouble: 1
  114125. +ildouble: 1
  114126. +ldouble: 1
  114127. +Test "Imaginary part of: cacosh (0.5 - 0x1p-112 i)":
  114128. +double: 1
  114129. +idouble: 1
  114130. +Test "Real part of: cacosh (0.5 - 0x1p-23 i)":
  114131. +double: 1
  114132. +idouble: 1
  114133. +ildouble: 1
  114134. +ldouble: 1
  114135. +Test "Imaginary part of: cacosh (0.5 - 0x1p-52 i)":
  114136. +double: 1
  114137. +idouble: 1
  114138. +ildouble: 1
  114139. +ldouble: 1
  114140. +Test "Real part of: cacosh (0.5 - 0x1p-63 i)":
  114141. +ildouble: 1
  114142. +ldouble: 1
  114143. +Test "Imaginary part of: cacosh (0.5 - 0x1p-63 i)":
  114144. +double: 1
  114145. +idouble: 1
  114146. +Test "Real part of: cacosh (0.5 - 1.0 i)":
  114147. +double: 1
  114148. +idouble: 1
  114149. +ildouble: 1
  114150. +ldouble: 1
  114151. +Test "Imaginary part of: cacosh (0.5 - 1.0 i)":
  114152. +float: 1
  114153. +ifloat: 1
  114154. +Test "Real part of: cacosh (0x0.fffffffffffff8p0 + 0x1p-52 i)":
  114155. +double: 1
  114156. +idouble: 1
  114157. +Test "Real part of: cacosh (0x0.fffffffffffff8p0 - 0x1p-52 i)":
  114158. +double: 1
  114159. +idouble: 1
  114160. +Test "Imaginary part of: cacosh (0x0.ffffffffffffffffffffffffffcp0 + 0.0 i)":
  114161. +ildouble: 1
  114162. +ldouble: 1
  114163. +Test "Imaginary part of: cacosh (0x0.ffffffffffffffffffffffffffcp0 + 0x1.fp-1025 i)":
  114164. +ildouble: 1
  114165. +ldouble: 1
  114166. +Test "Real part of: cacosh (0x0.ffffffffffffffffffffffffffcp0 + 0x1p-105 i)":
  114167. +ildouble: 1
  114168. +ldouble: 1
  114169. +Test "Imaginary part of: cacosh (0x0.ffffffffffffffffffffffffffcp0 - 0.0 i)":
  114170. +ildouble: 1
  114171. +ldouble: 1
  114172. +Test "Imaginary part of: cacosh (0x0.ffffffffffffffffffffffffffcp0 - 0x1.fp-1025 i)":
  114173. +ildouble: 1
  114174. +ldouble: 1
  114175. +Test "Real part of: cacosh (0x0.ffffffffffffffffffffffffffcp0 - 0x1p-105 i)":
  114176. +ildouble: 1
  114177. +ldouble: 1
  114178. +Test "Imaginary part of: cacosh (0x0.ffffffffffffffffffffffffffff8p0 + 0.0 i)":
  114179. +ildouble: 1
  114180. +ldouble: 1
  114181. +Test "Imaginary part of: cacosh (0x0.ffffffffffffffffffffffffffff8p0 + 0x1.fp-16385 i)":
  114182. +ildouble: 1
  114183. +ldouble: 1
  114184. +Test "Imaginary part of: cacosh (0x0.ffffffffffffffffffffffffffff8p0 - 0.0 i)":
  114185. +ildouble: 1
  114186. +ldouble: 1
  114187. +Test "Imaginary part of: cacosh (0x0.ffffffffffffffffffffffffffff8p0 - 0x1.fp-16385 i)":
  114188. +ildouble: 1
  114189. +ldouble: 1
  114190. +Test "Real part of: cacosh (0x0.ffffffffffffffffp0 + 0x1p-63 i)":
  114191. +ildouble: 1
  114192. +ldouble: 1
  114193. +Test "Real part of: cacosh (0x0.ffffffffffffffffp0 - 0x1p-63 i)":
  114194. +ildouble: 1
  114195. +ldouble: 1
  114196. +Test "Imaginary part of: cacosh (0x0.ffffffp0 + 0.0 i)":
  114197. +float: 1
  114198. +ifloat: 1
  114199. +ildouble: 1
  114200. +ldouble: 1
  114201. +Test "Imaginary part of: cacosh (0x0.ffffffp0 + 0x1.fp-129 i)":
  114202. +float: 1
  114203. +ifloat: 1
  114204. +ildouble: 1
  114205. +ldouble: 1
  114206. +Test "Real part of: cacosh (0x0.ffffffp0 + 0x1p-23 i)":
  114207. +float: 2
  114208. +ifloat: 2
  114209. +Test "Imaginary part of: cacosh (0x0.ffffffp0 + 0x1p-23 i)":
  114210. +float: 2
  114211. +ifloat: 2
  114212. +ildouble: 1
  114213. +ldouble: 1
  114214. +Test "Imaginary part of: cacosh (0x0.ffffffp0 - 0.0 i)":
  114215. +float: 1
  114216. +ifloat: 1
  114217. +ildouble: 1
  114218. +ldouble: 1
  114219. +Test "Imaginary part of: cacosh (0x0.ffffffp0 - 0x1.fp-129 i)":
  114220. +float: 1
  114221. +ifloat: 1
  114222. +ildouble: 1
  114223. +ldouble: 1
  114224. +Test "Real part of: cacosh (0x0.ffffffp0 - 0x1p-23 i)":
  114225. +float: 2
  114226. +ifloat: 2
  114227. +Test "Imaginary part of: cacosh (0x0.ffffffp0 - 0x1p-23 i)":
  114228. +float: 2
  114229. +ifloat: 2
  114230. +ildouble: 1
  114231. +ldouble: 1
  114232. +Test "Real part of: cacosh (0x1.0000000000000000000000000001p0 + 0.0 i)":
  114233. +ildouble: 1
  114234. +ldouble: 1
  114235. +Test "Real part of: cacosh (0x1.0000000000000000000000000001p0 + 0x1.fp-16385 i)":
  114236. +ildouble: 1
  114237. +ldouble: 1
  114238. +Test "Imaginary part of: cacosh (0x1.0000000000000000000000000001p0 + 0x1.fp-16385 i)":
  114239. +ildouble: 1
  114240. +ldouble: 1
  114241. +Test "Real part of: cacosh (0x1.0000000000000000000000000001p0 + 0x1p-113 i)":
  114242. +ildouble: 1
  114243. +ldouble: 1
  114244. +Test "Real part of: cacosh (0x1.0000000000000000000000000001p0 - 0.0 i)":
  114245. +ildouble: 1
  114246. +ldouble: 1
  114247. +Test "Real part of: cacosh (0x1.0000000000000000000000000001p0 - 0x1.fp-16385 i)":
  114248. +ildouble: 1
  114249. +ldouble: 1
  114250. +Test "Imaginary part of: cacosh (0x1.0000000000000000000000000001p0 - 0x1.fp-16385 i)":
  114251. +ildouble: 1
  114252. +ldouble: 1
  114253. +Test "Real part of: cacosh (0x1.0000000000000000000000000001p0 - 0x1p-113 i)":
  114254. +ildouble: 1
  114255. +ldouble: 1
  114256. +Test "Imaginary part of: cacosh (0x1.0000000000000002p0 + 0x1p-63 i)":
  114257. +ildouble: 2
  114258. +ldouble: 2
  114259. +Test "Imaginary part of: cacosh (0x1.0000000000000002p0 - 0x1p-63 i)":
  114260. +ildouble: 2
  114261. +ldouble: 2
  114262. +Test "Imaginary part of: cacosh (0x1.0000000000001p0 + 0x1p-52 i)":
  114263. +double: 1
  114264. +idouble: 1
  114265. +ildouble: 1
  114266. +ldouble: 1
  114267. +Test "Imaginary part of: cacosh (0x1.0000000000001p0 - 0x1p-52 i)":
  114268. +double: 1
  114269. +idouble: 1
  114270. +ildouble: 1
  114271. +ldouble: 1
  114272. +Test "Real part of: cacosh (0x1.000002p0 + 0x1p-23 i)":
  114273. +float: 1
  114274. +ifloat: 1
  114275. +ildouble: 1
  114276. +ldouble: 1
  114277. +Test "Imaginary part of: cacosh (0x1.000002p0 + 0x1p-23 i)":
  114278. +float: 2
  114279. +ifloat: 2
  114280. +ildouble: 1
  114281. +ldouble: 1
  114282. +Test "Real part of: cacosh (0x1.000002p0 - 0x1p-23 i)":
  114283. +float: 1
  114284. +ifloat: 1
  114285. +ildouble: 1
  114286. +ldouble: 1
  114287. +Test "Imaginary part of: cacosh (0x1.000002p0 - 0x1p-23 i)":
  114288. +float: 2
  114289. +ifloat: 2
  114290. +ildouble: 1
  114291. +ldouble: 1
  114292. +Test "Real part of: cacosh (0x1.fp-10 + 1.0 i)":
  114293. +double: 1
  114294. +idouble: 1
  114295. +Test "Real part of: cacosh (0x1.fp-10 - 1.0 i)":
  114296. +double: 1
  114297. +idouble: 1
  114298. +Test "Real part of: cacosh (0x1.fp-100 + 1.0 i)":
  114299. +double: 1
  114300. +float: 1
  114301. +idouble: 1
  114302. +ifloat: 1
  114303. +ildouble: 1
  114304. +ldouble: 1
  114305. +Test "Imaginary part of: cacosh (0x1.fp-100 + 1.0 i)":
  114306. +ildouble: 1
  114307. +ldouble: 1
  114308. +Test "Real part of: cacosh (0x1.fp-100 - 1.0 i)":
  114309. +double: 1
  114310. +float: 1
  114311. +idouble: 1
  114312. +ifloat: 1
  114313. +ildouble: 1
  114314. +ldouble: 1
  114315. +Test "Imaginary part of: cacosh (0x1.fp-100 - 1.0 i)":
  114316. +ildouble: 1
  114317. +ldouble: 1
  114318. +Test "Real part of: cacosh (0x1.fp-1000 + 1.0 i)":
  114319. +double: 1
  114320. +idouble: 1
  114321. +ildouble: 1
  114322. +ldouble: 1
  114323. +Test "Real part of: cacosh (0x1.fp-1000 - 1.0 i)":
  114324. +double: 1
  114325. +idouble: 1
  114326. +ildouble: 1
  114327. +ldouble: 1
  114328. +Test "Real part of: cacosh (0x1.fp-10000 + 1.0 i)":
  114329. +ildouble: 1
  114330. +ldouble: 1
  114331. +Test "Real part of: cacosh (0x1.fp-10000 - 1.0 i)":
  114332. +ildouble: 1
  114333. +ldouble: 1
  114334. +Test "Real part of: cacosh (0x1.fp-1025 + 0.5 i)":
  114335. +ildouble: 1
  114336. +ldouble: 1
  114337. +Test "Real part of: cacosh (0x1.fp-1025 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  114338. +ildouble: 1
  114339. +ldouble: 1
  114340. +Test "Real part of: cacosh (0x1.fp-1025 + 0x1.0000000000001p0 i)":
  114341. +ildouble: 1
  114342. +ldouble: 1
  114343. +Test "Real part of: cacosh (0x1.fp-1025 + 1.0 i)":
  114344. +double: 1
  114345. +idouble: 1
  114346. +ildouble: 1
  114347. +ldouble: 1
  114348. +Test "Real part of: cacosh (0x1.fp-1025 + 1.5 i)":
  114349. +double: 1
  114350. +idouble: 1
  114351. +ildouble: 1
  114352. +ldouble: 1
  114353. +Test "Real part of: cacosh (0x1.fp-1025 - 0.5 i)":
  114354. +ildouble: 1
  114355. +ldouble: 1
  114356. +Test "Real part of: cacosh (0x1.fp-1025 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  114357. +ildouble: 1
  114358. +ldouble: 1
  114359. +Test "Real part of: cacosh (0x1.fp-1025 - 0x1.0000000000001p0 i)":
  114360. +ildouble: 1
  114361. +ldouble: 1
  114362. +Test "Real part of: cacosh (0x1.fp-1025 - 1.0 i)":
  114363. +double: 1
  114364. +idouble: 1
  114365. +ildouble: 1
  114366. +ldouble: 1
  114367. +Test "Real part of: cacosh (0x1.fp-1025 - 1.5 i)":
  114368. +double: 1
  114369. +idouble: 1
  114370. +ildouble: 1
  114371. +ldouble: 1
  114372. +Test "Real part of: cacosh (0x1.fp-129 + 0.5 i)":
  114373. +float: 1
  114374. +ifloat: 1
  114375. +ildouble: 1
  114376. +ldouble: 1
  114377. +Test "Real part of: cacosh (0x1.fp-129 + 1.0 i)":
  114378. +double: 1
  114379. +float: 1
  114380. +idouble: 1
  114381. +ifloat: 1
  114382. +ildouble: 1
  114383. +ldouble: 1
  114384. +Test "Real part of: cacosh (0x1.fp-129 + 1.5 i)":
  114385. +double: 1
  114386. +idouble: 1
  114387. +ildouble: 1
  114388. +ldouble: 1
  114389. +Test "Real part of: cacosh (0x1.fp-129 - 0.5 i)":
  114390. +float: 1
  114391. +ifloat: 1
  114392. +ildouble: 1
  114393. +ldouble: 1
  114394. +Test "Real part of: cacosh (0x1.fp-129 - 1.0 i)":
  114395. +double: 1
  114396. +float: 1
  114397. +idouble: 1
  114398. +ifloat: 1
  114399. +ildouble: 1
  114400. +ldouble: 1
  114401. +Test "Real part of: cacosh (0x1.fp-129 - 1.5 i)":
  114402. +double: 1
  114403. +idouble: 1
  114404. +ildouble: 1
  114405. +ldouble: 1
  114406. +Test "Real part of: cacosh (0x1.fp-16385 + 0.5 i)":
  114407. +ildouble: 1
  114408. +ldouble: 1
  114409. +Test "Real part of: cacosh (0x1.fp-16385 + 0x0.ffffffffffffffffp0 i)":
  114410. +ildouble: 1
  114411. +ldouble: 1
  114412. +Test "Real part of: cacosh (0x1.fp-16385 + 0x1.0000000000000000000000000001p0 i)":
  114413. +ildouble: 1
  114414. +ldouble: 1
  114415. +Test "Real part of: cacosh (0x1.fp-16385 + 0x1.0000000000000002p0 i)":
  114416. +ildouble: 1
  114417. +ldouble: 1
  114418. +Test "Real part of: cacosh (0x1.fp-16385 + 1.0 i)":
  114419. +ildouble: 1
  114420. +ldouble: 1
  114421. +Test "Real part of: cacosh (0x1.fp-16385 + 1.5 i)":
  114422. +ildouble: 1
  114423. +ldouble: 1
  114424. +Test "Real part of: cacosh (0x1.fp-16385 - 0.5 i)":
  114425. +ildouble: 1
  114426. +ldouble: 1
  114427. +Test "Real part of: cacosh (0x1.fp-16385 - 0x0.ffffffffffffffffp0 i)":
  114428. +ildouble: 1
  114429. +ldouble: 1
  114430. +Test "Real part of: cacosh (0x1.fp-16385 - 0x1.0000000000000000000000000001p0 i)":
  114431. +ildouble: 1
  114432. +ldouble: 1
  114433. +Test "Real part of: cacosh (0x1.fp-16385 - 0x1.0000000000000002p0 i)":
  114434. +ildouble: 1
  114435. +ldouble: 1
  114436. +Test "Real part of: cacosh (0x1.fp-16385 - 1.0 i)":
  114437. +ildouble: 1
  114438. +ldouble: 1
  114439. +Test "Real part of: cacosh (0x1.fp-16385 - 1.5 i)":
  114440. +ildouble: 1
  114441. +ldouble: 1
  114442. +Test "Real part of: cacosh (0x1.fp-30 + 1.0 i)":
  114443. +double: 1
  114444. +float: 1
  114445. +idouble: 1
  114446. +ifloat: 1
  114447. +ildouble: 1
  114448. +ldouble: 1
  114449. +Test "Real part of: cacosh (0x1.fp-30 - 1.0 i)":
  114450. +double: 1
  114451. +float: 1
  114452. +idouble: 1
  114453. +ifloat: 1
  114454. +ildouble: 1
  114455. +ldouble: 1
  114456. +Test "Real part of: cacosh (0x1.fp1023 + 0x1.fp1023 i)":
  114457. +double: 1
  114458. +idouble: 1
  114459. +Test "Real part of: cacosh (0x1.fp127 + 0x1.fp127 i)":
  114460. +double: 1
  114461. +idouble: 1
  114462. +Test "Real part of: cacosh (0x1.fp16383 + 0x1.fp16383 i)":
  114463. +ildouble: 1
  114464. +ldouble: 1
  114465. +Test "Real part of: cacosh (0x1p-105 + 0.5 i)":
  114466. +float: 1
  114467. +ifloat: 1
  114468. +Test "Real part of: cacosh (0x1p-105 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  114469. +ildouble: 1
  114470. +ldouble: 1
  114471. +Test "Imaginary part of: cacosh (0x1p-105 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  114472. +ildouble: 1
  114473. +ldouble: 1
  114474. +Test "Real part of: cacosh (0x1p-105 - 0.5 i)":
  114475. +float: 1
  114476. +ifloat: 1
  114477. +Test "Real part of: cacosh (0x1p-105 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  114478. +ildouble: 1
  114479. +ldouble: 1
  114480. +Test "Imaginary part of: cacosh (0x1p-105 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  114481. +ildouble: 1
  114482. +ldouble: 1
  114483. +Test "Real part of: cacosh (0x1p-112 + 0.5 i)":
  114484. +float: 1
  114485. +ifloat: 1
  114486. +Test "Imaginary part of: cacosh (0x1p-112 + 0x0.ffffffffffffffffffffffffffff8p0 i)":
  114487. +ildouble: 1
  114488. +ldouble: 1
  114489. +Test "Real part of: cacosh (0x1p-112 - 0.5 i)":
  114490. +float: 1
  114491. +ifloat: 1
  114492. +Test "Imaginary part of: cacosh (0x1p-112 - 0x0.ffffffffffffffffffffffffffff8p0 i)":
  114493. +ildouble: 1
  114494. +ldouble: 1
  114495. +Test "Real part of: cacosh (0x1p-113 + 0x1.0000000000000000000000000001p0 i)":
  114496. +ildouble: 1
  114497. +ldouble: 1
  114498. +Test "Real part of: cacosh (0x1p-113 - 0x1.0000000000000000000000000001p0 i)":
  114499. +ildouble: 1
  114500. +ldouble: 1
  114501. +Test "Real part of: cacosh (0x1p-23 + 0.5 i)":
  114502. +float: 1
  114503. +ifloat: 1
  114504. +ildouble: 2
  114505. +ldouble: 2
  114506. +Test "Real part of: cacosh (0x1p-23 + 0x0.ffffffp0 i)":
  114507. +double: 1
  114508. +idouble: 1
  114509. +Test "Imaginary part of: cacosh (0x1p-23 + 0x1.000002p0 i)":
  114510. +ildouble: 1
  114511. +ldouble: 1
  114512. +Test "Real part of: cacosh (0x1p-23 - 0.5 i)":
  114513. +float: 1
  114514. +ifloat: 1
  114515. +ildouble: 2
  114516. +ldouble: 2
  114517. +Test "Real part of: cacosh (0x1p-23 - 0x0.ffffffp0 i)":
  114518. +double: 1
  114519. +idouble: 1
  114520. +Test "Imaginary part of: cacosh (0x1p-23 - 0x1.000002p0 i)":
  114521. +ildouble: 1
  114522. +ldouble: 1
  114523. +Test "Real part of: cacosh (0x1p-52 + 0.5 i)":
  114524. +float: 1
  114525. +ifloat: 1
  114526. +ildouble: 1
  114527. +ldouble: 1
  114528. +Test "Imaginary part of: cacosh (0x1p-52 + 0.5 i)":
  114529. +ildouble: 1
  114530. +ldouble: 1
  114531. +Test "Imaginary part of: cacosh (0x1p-52 + 0x0.fffffffffffff8p0 i)":
  114532. +ildouble: 1
  114533. +ldouble: 1
  114534. +Test "Real part of: cacosh (0x1p-52 - 0.5 i)":
  114535. +float: 1
  114536. +ifloat: 1
  114537. +ildouble: 1
  114538. +ldouble: 1
  114539. +Test "Imaginary part of: cacosh (0x1p-52 - 0.5 i)":
  114540. +ildouble: 1
  114541. +ldouble: 1
  114542. +Test "Imaginary part of: cacosh (0x1p-52 - 0x0.fffffffffffff8p0 i)":
  114543. +ildouble: 1
  114544. +ldouble: 1
  114545. +Test "Real part of: cacosh (0x1p-63 + 0.5 i)":
  114546. +float: 1
  114547. +ifloat: 1
  114548. +Test "Imaginary part of: cacosh (0x1p-63 + 0.5 i)":
  114549. +ildouble: 1
  114550. +ldouble: 1
  114551. +Test "Real part of: cacosh (0x1p-63 + 0x0.ffffffffffffffffp0 i)":
  114552. +ildouble: 1
  114553. +ldouble: 1
  114554. +Test "Real part of: cacosh (0x1p-63 + 0x1.0000000000000002p0 i)":
  114555. +ildouble: 1
  114556. +ldouble: 1
  114557. +Test "Real part of: cacosh (0x1p-63 - 0.5 i)":
  114558. +float: 1
  114559. +ifloat: 1
  114560. +Test "Imaginary part of: cacosh (0x1p-63 - 0.5 i)":
  114561. +ildouble: 1
  114562. +ldouble: 1
  114563. +Test "Real part of: cacosh (0x1p-63 - 0x0.ffffffffffffffffp0 i)":
  114564. +ildouble: 1
  114565. +ldouble: 1
  114566. +Test "Real part of: cacosh (0x1p-63 - 0x1.0000000000000002p0 i)":
  114567. +ildouble: 1
  114568. +ldouble: 1
  114569. +Test "Real part of: cacosh (0x1p500 + 1.0 i)":
  114570. +ildouble: 1
  114571. +ldouble: 1
  114572. +Test "Real part of: cacosh (0x1p500 - 1.0 i)":
  114573. +ildouble: 1
  114574. +ldouble: 1
  114575. +Test "Real part of: cacosh (0x1p5000 + 1.0 i)":
  114576. +ildouble: 1
  114577. +ldouble: 1
  114578. +Test "Real part of: cacosh (0x1p5000 - 1.0 i)":
  114579. +ildouble: 1
  114580. +ldouble: 1
  114581. +Test "Imaginary part of: cacosh (1.0 + 0.25 i)":
  114582. +double: 1
  114583. +idouble: 1
  114584. +Test "Real part of: cacosh (1.0 + 0.5 i)":
  114585. +float: 1
  114586. +ifloat: 1
  114587. +Test "Imaginary part of: cacosh (1.0 + 0.5 i)":
  114588. +float: 1
  114589. +ifloat: 1
  114590. +Test "Real part of: cacosh (1.0 + 0x1.fp-10 i)":
  114591. +float: 1
  114592. +ifloat: 1
  114593. +ildouble: 1
  114594. +ldouble: 1
  114595. +Test "Imaginary part of: cacosh (1.0 + 0x1.fp-10 i)":
  114596. +float: 2
  114597. +ifloat: 2
  114598. +Test "Imaginary part of: cacosh (1.0 + 0x1.fp-100 i)":
  114599. +ildouble: 1
  114600. +ldouble: 1
  114601. +Test "Real part of: cacosh (1.0 + 0x1.fp-30 i)":
  114602. +ildouble: 1
  114603. +ldouble: 1
  114604. +Test "Real part of: cacosh (1.0 + 0x1p500 i)":
  114605. +ildouble: 1
  114606. +ldouble: 1
  114607. +Test "Real part of: cacosh (1.0 + 0x1p5000 i)":
  114608. +ildouble: 1
  114609. +ldouble: 1
  114610. +Test "Imaginary part of: cacosh (1.0 - 0.25 i)":
  114611. +double: 1
  114612. +idouble: 1
  114613. +Test "Real part of: cacosh (1.0 - 0.5 i)":
  114614. +float: 1
  114615. +ifloat: 1
  114616. +Test "Imaginary part of: cacosh (1.0 - 0.5 i)":
  114617. +float: 1
  114618. +ifloat: 1
  114619. +Test "Real part of: cacosh (1.0 - 0x1.fp-10 i)":
  114620. +float: 1
  114621. +ifloat: 1
  114622. +ildouble: 1
  114623. +ldouble: 1
  114624. +Test "Imaginary part of: cacosh (1.0 - 0x1.fp-10 i)":
  114625. +float: 2
  114626. +ifloat: 2
  114627. +Test "Imaginary part of: cacosh (1.0 - 0x1.fp-100 i)":
  114628. +ildouble: 1
  114629. +ldouble: 1
  114630. +Test "Real part of: cacosh (1.0 - 0x1.fp-30 i)":
  114631. +ildouble: 1
  114632. +ldouble: 1
  114633. +Test "Real part of: cacosh (1.0 - 0x1p500 i)":
  114634. +ildouble: 1
  114635. +ldouble: 1
  114636. +Test "Real part of: cacosh (1.0 - 0x1p5000 i)":
  114637. +ildouble: 1
  114638. +ldouble: 1
  114639. +
  114640. +# casin
  114641. +Test "Imaginary part of: casin (+0 + 0.5 i)":
  114642. +float: 1
  114643. +ifloat: 1
  114644. +ildouble: 1
  114645. +ldouble: 1
  114646. +Test "Imaginary part of: casin (+0 + 1.0 i)":
  114647. +double: 1
  114648. +float: 1
  114649. +idouble: 1
  114650. +ifloat: 1
  114651. +ildouble: 1
  114652. +ldouble: 1
  114653. +Test "Imaginary part of: casin (+0 + 1.5 i)":
  114654. +double: 1
  114655. +idouble: 1
  114656. +ildouble: 1
  114657. +ldouble: 1
  114658. +Test "Imaginary part of: casin (+0 - 0.5 i)":
  114659. +float: 1
  114660. +ifloat: 1
  114661. +ildouble: 1
  114662. +ldouble: 1
  114663. +Test "Imaginary part of: casin (+0 - 1.0 i)":
  114664. +double: 1
  114665. +float: 1
  114666. +idouble: 1
  114667. +ifloat: 1
  114668. +ildouble: 1
  114669. +ldouble: 1
  114670. +Test "Imaginary part of: casin (+0 - 1.5 i)":
  114671. +double: 1
  114672. +idouble: 1
  114673. +ildouble: 1
  114674. +ldouble: 1
  114675. +Test "Imaginary part of: casin (-0 + 0.5 i)":
  114676. +float: 1
  114677. +ifloat: 1
  114678. +ildouble: 1
  114679. +ldouble: 1
  114680. +Test "Imaginary part of: casin (-0 + 1.0 i)":
  114681. +double: 1
  114682. +float: 1
  114683. +idouble: 1
  114684. +ifloat: 1
  114685. +ildouble: 1
  114686. +ldouble: 1
  114687. +Test "Imaginary part of: casin (-0 + 1.5 i)":
  114688. +double: 1
  114689. +idouble: 1
  114690. +ildouble: 1
  114691. +ldouble: 1
  114692. +Test "Imaginary part of: casin (-0 - 0.5 i)":
  114693. +float: 1
  114694. +ifloat: 1
  114695. +ildouble: 1
  114696. +ldouble: 1
  114697. +Test "Imaginary part of: casin (-0 - 1.0 i)":
  114698. +double: 1
  114699. +float: 1
  114700. +idouble: 1
  114701. +ifloat: 1
  114702. +ildouble: 1
  114703. +ldouble: 1
  114704. +Test "Imaginary part of: casin (-0 - 1.5 i)":
  114705. +double: 1
  114706. +idouble: 1
  114707. +ildouble: 1
  114708. +ldouble: 1
  114709. +Test "Imaginary part of: casin (-0.0 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  114710. +ildouble: 1
  114711. +ldouble: 1
  114712. +Test "Imaginary part of: casin (-0.0 + 0x0.ffffffffffffffffp0 i)":
  114713. +ildouble: 1
  114714. +ldouble: 1
  114715. +Test "Imaginary part of: casin (-0.0 + 0x1.0000000000000000000000000001p0 i)":
  114716. +ildouble: 1
  114717. +ldouble: 1
  114718. +Test "Imaginary part of: casin (-0.0 + 0x1.0000000000000002p0 i)":
  114719. +ildouble: 1
  114720. +ldouble: 1
  114721. +Test "Imaginary part of: casin (-0.0 + 0x1.0000000000001p0 i)":
  114722. +ildouble: 1
  114723. +ldouble: 1
  114724. +Test "Imaginary part of: casin (-0.0 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  114725. +ildouble: 1
  114726. +ldouble: 1
  114727. +Test "Imaginary part of: casin (-0.0 - 0x0.ffffffffffffffffp0 i)":
  114728. +ildouble: 1
  114729. +ldouble: 1
  114730. +Test "Imaginary part of: casin (-0.0 - 0x1.0000000000000000000000000001p0 i)":
  114731. +ildouble: 1
  114732. +ldouble: 1
  114733. +Test "Imaginary part of: casin (-0.0 - 0x1.0000000000000002p0 i)":
  114734. +ildouble: 1
  114735. +ldouble: 1
  114736. +Test "Imaginary part of: casin (-0.0 - 0x1.0000000000001p0 i)":
  114737. +ildouble: 1
  114738. +ldouble: 1
  114739. +Test "Imaginary part of: casin (-0.25 + 1.0 i)":
  114740. +float: 1
  114741. +ifloat: 1
  114742. +ildouble: 1
  114743. +ldouble: 1
  114744. +Test "Imaginary part of: casin (-0.25 - 1.0 i)":
  114745. +float: 1
  114746. +ifloat: 1
  114747. +ildouble: 1
  114748. +ldouble: 1
  114749. +Test "Imaginary part of: casin (-0.5 + 0x1.fp-129 i)":
  114750. +double: 1
  114751. +idouble: 1
  114752. +Test "Imaginary part of: casin (-0.5 + 0x1p-105 i)":
  114753. +double: 1
  114754. +idouble: 1
  114755. +ildouble: 1
  114756. +ldouble: 1
  114757. +Test "Real part of: casin (-0.5 + 0x1p-112 i)":
  114758. +ildouble: 1
  114759. +ldouble: 1
  114760. +Test "Imaginary part of: casin (-0.5 + 0x1p-112 i)":
  114761. +double: 1
  114762. +idouble: 1
  114763. +ildouble: 1
  114764. +ldouble: 1
  114765. +Test "Real part of: casin (-0.5 + 0x1p-23 i)":
  114766. +ildouble: 1
  114767. +ldouble: 1
  114768. +Test "Imaginary part of: casin (-0.5 + 0x1p-23 i)":
  114769. +double: 1
  114770. +idouble: 1
  114771. +ildouble: 1
  114772. +ldouble: 1
  114773. +Test "Imaginary part of: casin (-0.5 + 0x1p-63 i)":
  114774. +ildouble: 1
  114775. +ldouble: 1
  114776. +Test "Real part of: casin (-0.5 + 1.0 i)":
  114777. +ildouble: 1
  114778. +ldouble: 1
  114779. +Test "Imaginary part of: casin (-0.5 + 1.0 i)":
  114780. +double: 1
  114781. +idouble: 1
  114782. +ildouble: 1
  114783. +ldouble: 1
  114784. +Test "Imaginary part of: casin (-0.5 - 0x1.fp-129 i)":
  114785. +double: 1
  114786. +idouble: 1
  114787. +Test "Imaginary part of: casin (-0.5 - 0x1p-105 i)":
  114788. +double: 1
  114789. +idouble: 1
  114790. +ildouble: 1
  114791. +ldouble: 1
  114792. +Test "Real part of: casin (-0.5 - 0x1p-112 i)":
  114793. +ildouble: 1
  114794. +ldouble: 1
  114795. +Test "Imaginary part of: casin (-0.5 - 0x1p-112 i)":
  114796. +double: 1
  114797. +idouble: 1
  114798. +ildouble: 1
  114799. +ldouble: 1
  114800. +Test "Real part of: casin (-0.5 - 0x1p-23 i)":
  114801. +ildouble: 1
  114802. +ldouble: 1
  114803. +Test "Imaginary part of: casin (-0.5 - 0x1p-23 i)":
  114804. +double: 1
  114805. +idouble: 1
  114806. +ildouble: 1
  114807. +ldouble: 1
  114808. +Test "Imaginary part of: casin (-0.5 - 0x1p-63 i)":
  114809. +ildouble: 1
  114810. +ldouble: 1
  114811. +Test "Real part of: casin (-0.5 - 1.0 i)":
  114812. +ildouble: 1
  114813. +ldouble: 1
  114814. +Test "Imaginary part of: casin (-0.5 - 1.0 i)":
  114815. +double: 1
  114816. +idouble: 1
  114817. +ildouble: 1
  114818. +ldouble: 1
  114819. +Test "Real part of: casin (-0x0.fffffffffffff8p0 + 0.0 i)":
  114820. +ildouble: 1
  114821. +ldouble: 1
  114822. +Test "Real part of: casin (-0x0.fffffffffffff8p0 + 0x1.fp-1025 i)":
  114823. +ildouble: 1
  114824. +ldouble: 1
  114825. +Test "Imaginary part of: casin (-0x0.fffffffffffff8p0 + 0x1p-52 i)":
  114826. +double: 1
  114827. +idouble: 1
  114828. +Test "Real part of: casin (-0x0.fffffffffffff8p0 - 0.0 i)":
  114829. +ildouble: 1
  114830. +ldouble: 1
  114831. +Test "Real part of: casin (-0x0.fffffffffffff8p0 - 0x1.fp-1025 i)":
  114832. +ildouble: 1
  114833. +ldouble: 1
  114834. +Test "Imaginary part of: casin (-0x0.fffffffffffff8p0 - 0x1p-52 i)":
  114835. +double: 1
  114836. +idouble: 1
  114837. +Test "Real part of: casin (-0x0.ffffffffffffffffffffffffffcp0 + 0x1p-105 i)":
  114838. +ildouble: 1
  114839. +ldouble: 1
  114840. +Test "Imaginary part of: casin (-0x0.ffffffffffffffffffffffffffcp0 + 0x1p-105 i)":
  114841. +ildouble: 1
  114842. +ldouble: 1
  114843. +Test "Real part of: casin (-0x0.ffffffffffffffffffffffffffcp0 - 0x1p-105 i)":
  114844. +ildouble: 1
  114845. +ldouble: 1
  114846. +Test "Imaginary part of: casin (-0x0.ffffffffffffffffffffffffffcp0 - 0x1p-105 i)":
  114847. +ildouble: 1
  114848. +ldouble: 1
  114849. +Test "Real part of: casin (-0x0.ffffffffffffffffffffffffffff8p0 + 0x1p-112 i)":
  114850. +ildouble: 1
  114851. +ldouble: 1
  114852. +Test "Real part of: casin (-0x0.ffffffffffffffffffffffffffff8p0 - 0x1p-112 i)":
  114853. +ildouble: 1
  114854. +ldouble: 1
  114855. +Test "Real part of: casin (-0x0.ffffffffffffffffp0 + 0.0 i)":
  114856. +ildouble: 1
  114857. +ldouble: 1
  114858. +Test "Real part of: casin (-0x0.ffffffffffffffffp0 + 0x1.fp-16385 i)":
  114859. +ildouble: 1
  114860. +ldouble: 1
  114861. +Test "Imaginary part of: casin (-0x0.ffffffffffffffffp0 + 0x1p-63 i)":
  114862. +ildouble: 1
  114863. +ldouble: 1
  114864. +Test "Real part of: casin (-0x0.ffffffffffffffffp0 - 0.0 i)":
  114865. +ildouble: 1
  114866. +ldouble: 1
  114867. +Test "Real part of: casin (-0x0.ffffffffffffffffp0 - 0x1.fp-16385 i)":
  114868. +ildouble: 1
  114869. +ldouble: 1
  114870. +Test "Imaginary part of: casin (-0x0.ffffffffffffffffp0 - 0x1p-63 i)":
  114871. +ildouble: 1
  114872. +ldouble: 1
  114873. +Test "Real part of: casin (-0x0.ffffffp0 + 0x1p-23 i)":
  114874. +ildouble: 1
  114875. +ldouble: 1
  114876. +Test "Imaginary part of: casin (-0x0.ffffffp0 + 0x1p-23 i)":
  114877. +float: 2
  114878. +ifloat: 2
  114879. +Test "Real part of: casin (-0x0.ffffffp0 - 0x1p-23 i)":
  114880. +ildouble: 1
  114881. +ldouble: 1
  114882. +Test "Imaginary part of: casin (-0x0.ffffffp0 - 0x1p-23 i)":
  114883. +float: 2
  114884. +ifloat: 2
  114885. +Test "Imaginary part of: casin (-0x1.0000000000000000000000000001p0 + 0.0 i)":
  114886. +ildouble: 1
  114887. +ldouble: 1
  114888. +Test "Imaginary part of: casin (-0x1.0000000000000000000000000001p0 + 0x1.fp-16385 i)":
  114889. +ildouble: 1
  114890. +ldouble: 1
  114891. +Test "Imaginary part of: casin (-0x1.0000000000000000000000000001p0 + 0x1p-113 i)":
  114892. +ildouble: 1
  114893. +ldouble: 1
  114894. +Test "Imaginary part of: casin (-0x1.0000000000000000000000000001p0 - 0.0 i)":
  114895. +ildouble: 1
  114896. +ldouble: 1
  114897. +Test "Imaginary part of: casin (-0x1.0000000000000000000000000001p0 - 0x1.fp-16385 i)":
  114898. +ildouble: 1
  114899. +ldouble: 1
  114900. +Test "Imaginary part of: casin (-0x1.0000000000000000000000000001p0 - 0x1p-113 i)":
  114901. +ildouble: 1
  114902. +ldouble: 1
  114903. +Test "Imaginary part of: casin (-0x1.000002p0 + 0x1p-23 i)":
  114904. +float: 1
  114905. +ifloat: 1
  114906. +ildouble: 1
  114907. +ldouble: 1
  114908. +Test "Imaginary part of: casin (-0x1.000002p0 - 0x1p-23 i)":
  114909. +float: 1
  114910. +ifloat: 1
  114911. +ildouble: 1
  114912. +ldouble: 1
  114913. +Test "Real part of: casin (-0x1.fp-10 + 1.0 i)":
  114914. +float: 1
  114915. +ifloat: 1
  114916. +ildouble: 1
  114917. +ldouble: 1
  114918. +Test "Imaginary part of: casin (-0x1.fp-10 + 1.0 i)":
  114919. +double: 1
  114920. +idouble: 1
  114921. +Test "Real part of: casin (-0x1.fp-10 - 1.0 i)":
  114922. +float: 1
  114923. +ifloat: 1
  114924. +ildouble: 1
  114925. +ldouble: 1
  114926. +Test "Imaginary part of: casin (-0x1.fp-10 - 1.0 i)":
  114927. +double: 1
  114928. +idouble: 1
  114929. +Test "Imaginary part of: casin (-0x1.fp-100 + 1.0 i)":
  114930. +double: 1
  114931. +float: 1
  114932. +idouble: 1
  114933. +ifloat: 1
  114934. +ildouble: 1
  114935. +ldouble: 1
  114936. +Test "Imaginary part of: casin (-0x1.fp-100 - 1.0 i)":
  114937. +double: 1
  114938. +float: 1
  114939. +idouble: 1
  114940. +ifloat: 1
  114941. +ildouble: 1
  114942. +ldouble: 1
  114943. +Test "Imaginary part of: casin (-0x1.fp-1000 + 1.0 i)":
  114944. +double: 1
  114945. +idouble: 1
  114946. +ildouble: 1
  114947. +ldouble: 1
  114948. +Test "Imaginary part of: casin (-0x1.fp-1000 - 1.0 i)":
  114949. +double: 1
  114950. +idouble: 1
  114951. +ildouble: 1
  114952. +ldouble: 1
  114953. +Test "Imaginary part of: casin (-0x1.fp-10000 + 1.0 i)":
  114954. +ildouble: 1
  114955. +ldouble: 1
  114956. +Test "Imaginary part of: casin (-0x1.fp-10000 - 1.0 i)":
  114957. +ildouble: 1
  114958. +ldouble: 1
  114959. +Test "Imaginary part of: casin (-0x1.fp-1025 + 0.5 i)":
  114960. +ildouble: 1
  114961. +ldouble: 1
  114962. +Test "Real part of: casin (-0x1.fp-1025 + 0x0.fffffffffffff8p0 i)":
  114963. +ildouble: 1
  114964. +ldouble: 1
  114965. +Test "Imaginary part of: casin (-0x1.fp-1025 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  114966. +ildouble: 1
  114967. +ldouble: 1
  114968. +Test "Imaginary part of: casin (-0x1.fp-1025 + 0x1.0000000000001p0 i)":
  114969. +ildouble: 1
  114970. +ldouble: 1
  114971. +Test "Imaginary part of: casin (-0x1.fp-1025 + 1.0 i)":
  114972. +double: 1
  114973. +idouble: 1
  114974. +ildouble: 1
  114975. +ldouble: 1
  114976. +Test "Imaginary part of: casin (-0x1.fp-1025 + 1.5 i)":
  114977. +double: 1
  114978. +idouble: 1
  114979. +ildouble: 1
  114980. +ldouble: 1
  114981. +Test "Imaginary part of: casin (-0x1.fp-1025 - 0.5 i)":
  114982. +ildouble: 1
  114983. +ldouble: 1
  114984. +Test "Real part of: casin (-0x1.fp-1025 - 0x0.fffffffffffff8p0 i)":
  114985. +ildouble: 1
  114986. +ldouble: 1
  114987. +Test "Imaginary part of: casin (-0x1.fp-1025 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  114988. +ildouble: 1
  114989. +ldouble: 1
  114990. +Test "Imaginary part of: casin (-0x1.fp-1025 - 0x1.0000000000001p0 i)":
  114991. +ildouble: 1
  114992. +ldouble: 1
  114993. +Test "Imaginary part of: casin (-0x1.fp-1025 - 1.0 i)":
  114994. +double: 1
  114995. +idouble: 1
  114996. +ildouble: 1
  114997. +ldouble: 1
  114998. +Test "Imaginary part of: casin (-0x1.fp-1025 - 1.5 i)":
  114999. +double: 1
  115000. +idouble: 1
  115001. +ildouble: 1
  115002. +ldouble: 1
  115003. +Test "Imaginary part of: casin (-0x1.fp-129 + 0.5 i)":
  115004. +float: 1
  115005. +ifloat: 1
  115006. +ildouble: 1
  115007. +ldouble: 1
  115008. +Test "Imaginary part of: casin (-0x1.fp-129 + 1.0 i)":
  115009. +double: 1
  115010. +float: 1
  115011. +idouble: 1
  115012. +ifloat: 1
  115013. +ildouble: 1
  115014. +ldouble: 1
  115015. +Test "Imaginary part of: casin (-0x1.fp-129 + 1.5 i)":
  115016. +double: 1
  115017. +idouble: 1
  115018. +ildouble: 1
  115019. +ldouble: 1
  115020. +Test "Imaginary part of: casin (-0x1.fp-129 - 0.5 i)":
  115021. +float: 1
  115022. +ifloat: 1
  115023. +ildouble: 1
  115024. +ldouble: 1
  115025. +Test "Imaginary part of: casin (-0x1.fp-129 - 1.0 i)":
  115026. +double: 1
  115027. +float: 1
  115028. +idouble: 1
  115029. +ifloat: 1
  115030. +ildouble: 1
  115031. +ldouble: 1
  115032. +Test "Imaginary part of: casin (-0x1.fp-129 - 1.5 i)":
  115033. +double: 1
  115034. +idouble: 1
  115035. +ildouble: 1
  115036. +ldouble: 1
  115037. +Test "Imaginary part of: casin (-0x1.fp-16385 + 0.5 i)":
  115038. +ildouble: 1
  115039. +ldouble: 1
  115040. +Test "Imaginary part of: casin (-0x1.fp-16385 + 0x0.ffffffffffffffffp0 i)":
  115041. +ildouble: 1
  115042. +ldouble: 1
  115043. +Test "Imaginary part of: casin (-0x1.fp-16385 + 0x1.0000000000000000000000000001p0 i)":
  115044. +ildouble: 1
  115045. +ldouble: 1
  115046. +Test "Imaginary part of: casin (-0x1.fp-16385 + 0x1.0000000000000002p0 i)":
  115047. +ildouble: 1
  115048. +ldouble: 1
  115049. +Test "Imaginary part of: casin (-0x1.fp-16385 + 1.0 i)":
  115050. +ildouble: 1
  115051. +ldouble: 1
  115052. +Test "Imaginary part of: casin (-0x1.fp-16385 + 1.5 i)":
  115053. +ildouble: 1
  115054. +ldouble: 1
  115055. +Test "Imaginary part of: casin (-0x1.fp-16385 - 0.5 i)":
  115056. +ildouble: 1
  115057. +ldouble: 1
  115058. +Test "Imaginary part of: casin (-0x1.fp-16385 - 0x0.ffffffffffffffffp0 i)":
  115059. +ildouble: 1
  115060. +ldouble: 1
  115061. +Test "Imaginary part of: casin (-0x1.fp-16385 - 0x1.0000000000000000000000000001p0 i)":
  115062. +ildouble: 1
  115063. +ldouble: 1
  115064. +Test "Imaginary part of: casin (-0x1.fp-16385 - 0x1.0000000000000002p0 i)":
  115065. +ildouble: 1
  115066. +ldouble: 1
  115067. +Test "Imaginary part of: casin (-0x1.fp-16385 - 1.0 i)":
  115068. +ildouble: 1
  115069. +ldouble: 1
  115070. +Test "Imaginary part of: casin (-0x1.fp-16385 - 1.5 i)":
  115071. +ildouble: 1
  115072. +ldouble: 1
  115073. +Test "Real part of: casin (-0x1.fp-30 + 1.0 i)":
  115074. +ildouble: 1
  115075. +ldouble: 1
  115076. +Test "Imaginary part of: casin (-0x1.fp-30 + 1.0 i)":
  115077. +double: 1
  115078. +float: 1
  115079. +idouble: 1
  115080. +ifloat: 1
  115081. +ildouble: 1
  115082. +ldouble: 1
  115083. +Test "Real part of: casin (-0x1.fp-30 - 1.0 i)":
  115084. +ildouble: 1
  115085. +ldouble: 1
  115086. +Test "Imaginary part of: casin (-0x1.fp-30 - 1.0 i)":
  115087. +double: 1
  115088. +float: 1
  115089. +idouble: 1
  115090. +ifloat: 1
  115091. +ildouble: 1
  115092. +ldouble: 1
  115093. +Test "Imaginary part of: casin (-0x1p-105 + 0.5 i)":
  115094. +float: 1
  115095. +ifloat: 1
  115096. +Test "Imaginary part of: casin (-0x1p-105 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  115097. +ildouble: 1
  115098. +ldouble: 1
  115099. +Test "Imaginary part of: casin (-0x1p-105 - 0.5 i)":
  115100. +float: 1
  115101. +ifloat: 1
  115102. +Test "Imaginary part of: casin (-0x1p-105 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  115103. +ildouble: 1
  115104. +ldouble: 1
  115105. +Test "Imaginary part of: casin (-0x1p-112 + 0.5 i)":
  115106. +float: 1
  115107. +ifloat: 1
  115108. +Test "Imaginary part of: casin (-0x1p-112 - 0.5 i)":
  115109. +float: 1
  115110. +ifloat: 1
  115111. +Test "Real part of: casin (-0x1p-113 + 0x1.0000000000000000000000000001p0 i)":
  115112. +ildouble: 1
  115113. +ldouble: 1
  115114. +Test "Imaginary part of: casin (-0x1p-113 + 0x1.0000000000000000000000000001p0 i)":
  115115. +ildouble: 1
  115116. +ldouble: 1
  115117. +Test "Real part of: casin (-0x1p-113 - 0x1.0000000000000000000000000001p0 i)":
  115118. +ildouble: 1
  115119. +ldouble: 1
  115120. +Test "Imaginary part of: casin (-0x1p-113 - 0x1.0000000000000000000000000001p0 i)":
  115121. +ildouble: 1
  115122. +ldouble: 1
  115123. +Test "Real part of: casin (-0x1p-23 + 0.5 i)":
  115124. +double: 1
  115125. +float: 1
  115126. +idouble: 1
  115127. +ifloat: 1
  115128. +ildouble: 2
  115129. +ldouble: 2
  115130. +Test "Imaginary part of: casin (-0x1p-23 + 0.5 i)":
  115131. +float: 1
  115132. +ifloat: 1
  115133. +ildouble: 2
  115134. +ldouble: 2
  115135. +Test "Imaginary part of: casin (-0x1p-23 + 0x0.ffffffp0 i)":
  115136. +double: 1
  115137. +idouble: 1
  115138. +Test "Real part of: casin (-0x1p-23 + 0x1.000002p0 i)":
  115139. +double: 1
  115140. +float: 1
  115141. +idouble: 1
  115142. +ifloat: 1
  115143. +ildouble: 1
  115144. +ldouble: 1
  115145. +Test "Real part of: casin (-0x1p-23 - 0.5 i)":
  115146. +double: 1
  115147. +float: 1
  115148. +idouble: 1
  115149. +ifloat: 1
  115150. +ildouble: 2
  115151. +ldouble: 2
  115152. +Test "Imaginary part of: casin (-0x1p-23 - 0.5 i)":
  115153. +float: 1
  115154. +ifloat: 1
  115155. +ildouble: 2
  115156. +ldouble: 2
  115157. +Test "Imaginary part of: casin (-0x1p-23 - 0x0.ffffffp0 i)":
  115158. +double: 1
  115159. +idouble: 1
  115160. +Test "Real part of: casin (-0x1p-23 - 0x1.000002p0 i)":
  115161. +double: 1
  115162. +float: 1
  115163. +idouble: 1
  115164. +ifloat: 1
  115165. +ildouble: 1
  115166. +ldouble: 1
  115167. +Test "Real part of: casin (-0x1p-52 + 0.5 i)":
  115168. +ildouble: 1
  115169. +ldouble: 1
  115170. +Test "Imaginary part of: casin (-0x1p-52 + 0.5 i)":
  115171. +float: 1
  115172. +ifloat: 1
  115173. +ildouble: 1
  115174. +ldouble: 1
  115175. +Test "Real part of: casin (-0x1p-52 + 0x1.0000000000001p0 i)":
  115176. +ildouble: 1
  115177. +ldouble: 1
  115178. +Test "Real part of: casin (-0x1p-52 - 0.5 i)":
  115179. +ildouble: 1
  115180. +ldouble: 1
  115181. +Test "Imaginary part of: casin (-0x1p-52 - 0.5 i)":
  115182. +float: 1
  115183. +ifloat: 1
  115184. +ildouble: 1
  115185. +ldouble: 1
  115186. +Test "Real part of: casin (-0x1p-52 - 0x1.0000000000001p0 i)":
  115187. +ildouble: 1
  115188. +ldouble: 1
  115189. +Test "Imaginary part of: casin (-0x1p-63 + 0.5 i)":
  115190. +float: 1
  115191. +ifloat: 1
  115192. +Test "Imaginary part of: casin (-0x1p-63 + 0x0.ffffffffffffffffp0 i)":
  115193. +ildouble: 1
  115194. +ldouble: 1
  115195. +Test "Real part of: casin (-0x1p-63 + 0x1.0000000000000002p0 i)":
  115196. +ildouble: 1
  115197. +ldouble: 1
  115198. +Test "Imaginary part of: casin (-0x1p-63 + 0x1.0000000000000002p0 i)":
  115199. +ildouble: 1
  115200. +ldouble: 1
  115201. +Test "Imaginary part of: casin (-0x1p-63 - 0.5 i)":
  115202. +float: 1
  115203. +ifloat: 1
  115204. +Test "Imaginary part of: casin (-0x1p-63 - 0x0.ffffffffffffffffp0 i)":
  115205. +ildouble: 1
  115206. +ldouble: 1
  115207. +Test "Real part of: casin (-0x1p-63 - 0x1.0000000000000002p0 i)":
  115208. +ildouble: 1
  115209. +ldouble: 1
  115210. +Test "Imaginary part of: casin (-0x1p-63 - 0x1.0000000000000002p0 i)":
  115211. +ildouble: 1
  115212. +ldouble: 1
  115213. +Test "Imaginary part of: casin (-0x1p500 + 1.0 i)":
  115214. +ildouble: 1
  115215. +ldouble: 1
  115216. +Test "Imaginary part of: casin (-0x1p500 - 1.0 i)":
  115217. +ildouble: 1
  115218. +ldouble: 1
  115219. +Test "Imaginary part of: casin (-0x1p5000 + 1.0 i)":
  115220. +ildouble: 1
  115221. +ldouble: 1
  115222. +Test "Imaginary part of: casin (-0x1p5000 - 1.0 i)":
  115223. +ildouble: 1
  115224. +ldouble: 1
  115225. +Test "Real part of: casin (-1.0 + 0.25 i)":
  115226. +double: 1
  115227. +idouble: 1
  115228. +ildouble: 1
  115229. +ldouble: 1
  115230. +Test "Real part of: casin (-1.0 + 0.5 i)":
  115231. +float: 1
  115232. +ifloat: 1
  115233. +Test "Imaginary part of: casin (-1.0 + 0.5 i)":
  115234. +float: 1
  115235. +ifloat: 1
  115236. +Test "Imaginary part of: casin (-1.0 + 0x1.fp-10 i)":
  115237. +float: 1
  115238. +ifloat: 1
  115239. +ildouble: 1
  115240. +ldouble: 1
  115241. +Test "Real part of: casin (-1.0 + 0x1.fp-129 i)":
  115242. +ildouble: 1
  115243. +ldouble: 1
  115244. +Test "Imaginary part of: casin (-1.0 + 0x1.fp-30 i)":
  115245. +ildouble: 1
  115246. +ldouble: 1
  115247. +Test "Imaginary part of: casin (-1.0 + 0x1p500 i)":
  115248. +ildouble: 1
  115249. +ldouble: 1
  115250. +Test "Imaginary part of: casin (-1.0 + 0x1p5000 i)":
  115251. +ildouble: 1
  115252. +ldouble: 1
  115253. +Test "Real part of: casin (-1.0 - 0.25 i)":
  115254. +double: 1
  115255. +idouble: 1
  115256. +ildouble: 1
  115257. +ldouble: 1
  115258. +Test "Real part of: casin (-1.0 - 0.5 i)":
  115259. +float: 1
  115260. +ifloat: 1
  115261. +Test "Imaginary part of: casin (-1.0 - 0.5 i)":
  115262. +float: 1
  115263. +ifloat: 1
  115264. +Test "Imaginary part of: casin (-1.0 - 0x1.fp-10 i)":
  115265. +float: 1
  115266. +ifloat: 1
  115267. +ildouble: 1
  115268. +ldouble: 1
  115269. +Test "Real part of: casin (-1.0 - 0x1.fp-129 i)":
  115270. +ildouble: 1
  115271. +ldouble: 1
  115272. +Test "Imaginary part of: casin (-1.0 - 0x1.fp-30 i)":
  115273. +ildouble: 1
  115274. +ldouble: 1
  115275. +Test "Imaginary part of: casin (-1.0 - 0x1p500 i)":
  115276. +ildouble: 1
  115277. +ldouble: 1
  115278. +Test "Imaginary part of: casin (-1.0 - 0x1p5000 i)":
  115279. +ildouble: 1
  115280. +ldouble: 1
  115281. +Test "Imaginary part of: casin (0.0 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  115282. +ildouble: 1
  115283. +ldouble: 1
  115284. +Test "Imaginary part of: casin (0.0 + 0x0.ffffffffffffffffp0 i)":
  115285. +ildouble: 1
  115286. +ldouble: 1
  115287. +Test "Imaginary part of: casin (0.0 + 0x1.0000000000000000000000000001p0 i)":
  115288. +ildouble: 1
  115289. +ldouble: 1
  115290. +Test "Imaginary part of: casin (0.0 + 0x1.0000000000000002p0 i)":
  115291. +ildouble: 1
  115292. +ldouble: 1
  115293. +Test "Imaginary part of: casin (0.0 + 0x1.0000000000001p0 i)":
  115294. +ildouble: 1
  115295. +ldouble: 1
  115296. +Test "Imaginary part of: casin (0.0 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  115297. +ildouble: 1
  115298. +ldouble: 1
  115299. +Test "Imaginary part of: casin (0.0 - 0x0.ffffffffffffffffp0 i)":
  115300. +ildouble: 1
  115301. +ldouble: 1
  115302. +Test "Imaginary part of: casin (0.0 - 0x1.0000000000000000000000000001p0 i)":
  115303. +ildouble: 1
  115304. +ldouble: 1
  115305. +Test "Imaginary part of: casin (0.0 - 0x1.0000000000000002p0 i)":
  115306. +ildouble: 1
  115307. +ldouble: 1
  115308. +Test "Imaginary part of: casin (0.0 - 0x1.0000000000001p0 i)":
  115309. +ildouble: 1
  115310. +ldouble: 1
  115311. +Test "Imaginary part of: casin (0.25 + 1.0 i)":
  115312. +float: 1
  115313. +ifloat: 1
  115314. +ildouble: 1
  115315. +ldouble: 1
  115316. +Test "Imaginary part of: casin (0.25 - 1.0 i)":
  115317. +float: 1
  115318. +ifloat: 1
  115319. +ildouble: 1
  115320. +ldouble: 1
  115321. +Test "Imaginary part of: casin (0.5 + 0x1.fp-129 i)":
  115322. +double: 1
  115323. +idouble: 1
  115324. +Test "Imaginary part of: casin (0.5 + 0x1p-105 i)":
  115325. +double: 1
  115326. +idouble: 1
  115327. +ildouble: 1
  115328. +ldouble: 1
  115329. +Test "Real part of: casin (0.5 + 0x1p-112 i)":
  115330. +ildouble: 1
  115331. +ldouble: 1
  115332. +Test "Imaginary part of: casin (0.5 + 0x1p-112 i)":
  115333. +double: 1
  115334. +idouble: 1
  115335. +ildouble: 1
  115336. +ldouble: 1
  115337. +Test "Real part of: casin (0.5 + 0x1p-23 i)":
  115338. +ildouble: 1
  115339. +ldouble: 1
  115340. +Test "Imaginary part of: casin (0.5 + 0x1p-23 i)":
  115341. +double: 1
  115342. +idouble: 1
  115343. +ildouble: 1
  115344. +ldouble: 1
  115345. +Test "Imaginary part of: casin (0.5 + 0x1p-63 i)":
  115346. +ildouble: 1
  115347. +ldouble: 1
  115348. +Test "Real part of: casin (0.5 + 1.0 i)":
  115349. +ildouble: 1
  115350. +ldouble: 1
  115351. +Test "Imaginary part of: casin (0.5 + 1.0 i)":
  115352. +double: 1
  115353. +idouble: 1
  115354. +ildouble: 1
  115355. +ldouble: 1
  115356. +Test "Imaginary part of: casin (0.5 - 0x1.fp-129 i)":
  115357. +double: 1
  115358. +idouble: 1
  115359. +Test "Imaginary part of: casin (0.5 - 0x1p-105 i)":
  115360. +double: 1
  115361. +idouble: 1
  115362. +ildouble: 1
  115363. +ldouble: 1
  115364. +Test "Real part of: casin (0.5 - 0x1p-112 i)":
  115365. +ildouble: 1
  115366. +ldouble: 1
  115367. +Test "Imaginary part of: casin (0.5 - 0x1p-112 i)":
  115368. +double: 1
  115369. +idouble: 1
  115370. +ildouble: 1
  115371. +ldouble: 1
  115372. +Test "Real part of: casin (0.5 - 0x1p-23 i)":
  115373. +ildouble: 1
  115374. +ldouble: 1
  115375. +Test "Imaginary part of: casin (0.5 - 0x1p-23 i)":
  115376. +double: 1
  115377. +idouble: 1
  115378. +ildouble: 1
  115379. +ldouble: 1
  115380. +Test "Imaginary part of: casin (0.5 - 0x1p-63 i)":
  115381. +ildouble: 1
  115382. +ldouble: 1
  115383. +Test "Real part of: casin (0.5 - 1.0 i)":
  115384. +ildouble: 1
  115385. +ldouble: 1
  115386. +Test "Imaginary part of: casin (0.5 - 1.0 i)":
  115387. +double: 1
  115388. +idouble: 1
  115389. +ildouble: 1
  115390. +ldouble: 1
  115391. +Test "Real part of: casin (0.75 + 1.25 i)":
  115392. +double: 1
  115393. +float: 1
  115394. +idouble: 1
  115395. +ifloat: 1
  115396. +Test "Real part of: casin (0x0.fffffffffffff8p0 + 0.0 i)":
  115397. +ildouble: 1
  115398. +ldouble: 1
  115399. +Test "Real part of: casin (0x0.fffffffffffff8p0 + 0x1.fp-1025 i)":
  115400. +ildouble: 1
  115401. +ldouble: 1
  115402. +Test "Imaginary part of: casin (0x0.fffffffffffff8p0 + 0x1p-52 i)":
  115403. +double: 1
  115404. +idouble: 1
  115405. +Test "Real part of: casin (0x0.fffffffffffff8p0 - 0.0 i)":
  115406. +ildouble: 1
  115407. +ldouble: 1
  115408. +Test "Real part of: casin (0x0.fffffffffffff8p0 - 0x1.fp-1025 i)":
  115409. +ildouble: 1
  115410. +ldouble: 1
  115411. +Test "Imaginary part of: casin (0x0.fffffffffffff8p0 - 0x1p-52 i)":
  115412. +double: 1
  115413. +idouble: 1
  115414. +Test "Real part of: casin (0x0.ffffffffffffffffffffffffffcp0 + 0x1p-105 i)":
  115415. +ildouble: 1
  115416. +ldouble: 1
  115417. +Test "Imaginary part of: casin (0x0.ffffffffffffffffffffffffffcp0 + 0x1p-105 i)":
  115418. +ildouble: 1
  115419. +ldouble: 1
  115420. +Test "Real part of: casin (0x0.ffffffffffffffffffffffffffcp0 - 0x1p-105 i)":
  115421. +ildouble: 1
  115422. +ldouble: 1
  115423. +Test "Imaginary part of: casin (0x0.ffffffffffffffffffffffffffcp0 - 0x1p-105 i)":
  115424. +ildouble: 1
  115425. +ldouble: 1
  115426. +Test "Real part of: casin (0x0.ffffffffffffffffffffffffffff8p0 + 0x1p-112 i)":
  115427. +ildouble: 1
  115428. +ldouble: 1
  115429. +Test "Real part of: casin (0x0.ffffffffffffffffffffffffffff8p0 - 0x1p-112 i)":
  115430. +ildouble: 1
  115431. +ldouble: 1
  115432. +Test "Real part of: casin (0x0.ffffffffffffffffp0 + 0.0 i)":
  115433. +ildouble: 1
  115434. +ldouble: 1
  115435. +Test "Real part of: casin (0x0.ffffffffffffffffp0 + 0x1.fp-16385 i)":
  115436. +ildouble: 1
  115437. +ldouble: 1
  115438. +Test "Imaginary part of: casin (0x0.ffffffffffffffffp0 + 0x1p-63 i)":
  115439. +ildouble: 1
  115440. +ldouble: 1
  115441. +Test "Real part of: casin (0x0.ffffffffffffffffp0 - 0.0 i)":
  115442. +ildouble: 1
  115443. +ldouble: 1
  115444. +Test "Real part of: casin (0x0.ffffffffffffffffp0 - 0x1.fp-16385 i)":
  115445. +ildouble: 1
  115446. +ldouble: 1
  115447. +Test "Imaginary part of: casin (0x0.ffffffffffffffffp0 - 0x1p-63 i)":
  115448. +ildouble: 1
  115449. +ldouble: 1
  115450. +Test "Real part of: casin (0x0.ffffffp0 + 0x1p-23 i)":
  115451. +ildouble: 1
  115452. +ldouble: 1
  115453. +Test "Imaginary part of: casin (0x0.ffffffp0 + 0x1p-23 i)":
  115454. +float: 2
  115455. +ifloat: 2
  115456. +Test "Real part of: casin (0x0.ffffffp0 - 0x1p-23 i)":
  115457. +ildouble: 1
  115458. +ldouble: 1
  115459. +Test "Imaginary part of: casin (0x0.ffffffp0 - 0x1p-23 i)":
  115460. +float: 2
  115461. +ifloat: 2
  115462. +Test "Imaginary part of: casin (0x1.0000000000000000000000000001p0 + 0.0 i)":
  115463. +ildouble: 1
  115464. +ldouble: 1
  115465. +Test "Imaginary part of: casin (0x1.0000000000000000000000000001p0 + 0x1.fp-16385 i)":
  115466. +ildouble: 1
  115467. +ldouble: 1
  115468. +Test "Imaginary part of: casin (0x1.0000000000000000000000000001p0 + 0x1p-113 i)":
  115469. +ildouble: 1
  115470. +ldouble: 1
  115471. +Test "Imaginary part of: casin (0x1.0000000000000000000000000001p0 - 0.0 i)":
  115472. +ildouble: 1
  115473. +ldouble: 1
  115474. +Test "Imaginary part of: casin (0x1.0000000000000000000000000001p0 - 0x1.fp-16385 i)":
  115475. +ildouble: 1
  115476. +ldouble: 1
  115477. +Test "Imaginary part of: casin (0x1.0000000000000000000000000001p0 - 0x1p-113 i)":
  115478. +ildouble: 1
  115479. +ldouble: 1
  115480. +Test "Imaginary part of: casin (0x1.000002p0 + 0x1p-23 i)":
  115481. +float: 1
  115482. +ifloat: 1
  115483. +ildouble: 1
  115484. +ldouble: 1
  115485. +Test "Imaginary part of: casin (0x1.000002p0 - 0x1p-23 i)":
  115486. +float: 1
  115487. +ifloat: 1
  115488. +ildouble: 1
  115489. +ldouble: 1
  115490. +Test "Real part of: casin (0x1.fp-10 + 1.0 i)":
  115491. +float: 1
  115492. +ifloat: 1
  115493. +ildouble: 1
  115494. +ldouble: 1
  115495. +Test "Imaginary part of: casin (0x1.fp-10 + 1.0 i)":
  115496. +double: 1
  115497. +idouble: 1
  115498. +Test "Real part of: casin (0x1.fp-10 - 1.0 i)":
  115499. +float: 1
  115500. +ifloat: 1
  115501. +ildouble: 1
  115502. +ldouble: 1
  115503. +Test "Imaginary part of: casin (0x1.fp-10 - 1.0 i)":
  115504. +double: 1
  115505. +idouble: 1
  115506. +Test "Imaginary part of: casin (0x1.fp-100 + 1.0 i)":
  115507. +double: 1
  115508. +float: 1
  115509. +idouble: 1
  115510. +ifloat: 1
  115511. +ildouble: 1
  115512. +ldouble: 1
  115513. +Test "Imaginary part of: casin (0x1.fp-100 - 1.0 i)":
  115514. +double: 1
  115515. +float: 1
  115516. +idouble: 1
  115517. +ifloat: 1
  115518. +ildouble: 1
  115519. +ldouble: 1
  115520. +Test "Imaginary part of: casin (0x1.fp-1000 + 1.0 i)":
  115521. +double: 1
  115522. +idouble: 1
  115523. +ildouble: 1
  115524. +ldouble: 1
  115525. +Test "Imaginary part of: casin (0x1.fp-1000 - 1.0 i)":
  115526. +double: 1
  115527. +idouble: 1
  115528. +ildouble: 1
  115529. +ldouble: 1
  115530. +Test "Imaginary part of: casin (0x1.fp-10000 + 1.0 i)":
  115531. +ildouble: 1
  115532. +ldouble: 1
  115533. +Test "Imaginary part of: casin (0x1.fp-10000 - 1.0 i)":
  115534. +ildouble: 1
  115535. +ldouble: 1
  115536. +Test "Imaginary part of: casin (0x1.fp-1025 + 0.5 i)":
  115537. +ildouble: 1
  115538. +ldouble: 1
  115539. +Test "Real part of: casin (0x1.fp-1025 + 0x0.fffffffffffff8p0 i)":
  115540. +ildouble: 1
  115541. +ldouble: 1
  115542. +Test "Imaginary part of: casin (0x1.fp-1025 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  115543. +ildouble: 1
  115544. +ldouble: 1
  115545. +Test "Imaginary part of: casin (0x1.fp-1025 + 0x1.0000000000001p0 i)":
  115546. +ildouble: 1
  115547. +ldouble: 1
  115548. +Test "Imaginary part of: casin (0x1.fp-1025 + 1.0 i)":
  115549. +double: 1
  115550. +idouble: 1
  115551. +ildouble: 1
  115552. +ldouble: 1
  115553. +Test "Imaginary part of: casin (0x1.fp-1025 + 1.5 i)":
  115554. +double: 1
  115555. +idouble: 1
  115556. +ildouble: 1
  115557. +ldouble: 1
  115558. +Test "Imaginary part of: casin (0x1.fp-1025 - 0.5 i)":
  115559. +ildouble: 1
  115560. +ldouble: 1
  115561. +Test "Real part of: casin (0x1.fp-1025 - 0x0.fffffffffffff8p0 i)":
  115562. +ildouble: 1
  115563. +ldouble: 1
  115564. +Test "Imaginary part of: casin (0x1.fp-1025 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  115565. +ildouble: 1
  115566. +ldouble: 1
  115567. +Test "Imaginary part of: casin (0x1.fp-1025 - 0x1.0000000000001p0 i)":
  115568. +ildouble: 1
  115569. +ldouble: 1
  115570. +Test "Imaginary part of: casin (0x1.fp-1025 - 1.0 i)":
  115571. +double: 1
  115572. +idouble: 1
  115573. +ildouble: 1
  115574. +ldouble: 1
  115575. +Test "Imaginary part of: casin (0x1.fp-1025 - 1.5 i)":
  115576. +double: 1
  115577. +idouble: 1
  115578. +ildouble: 1
  115579. +ldouble: 1
  115580. +Test "Imaginary part of: casin (0x1.fp-129 + 0.5 i)":
  115581. +float: 1
  115582. +ifloat: 1
  115583. +ildouble: 1
  115584. +ldouble: 1
  115585. +Test "Imaginary part of: casin (0x1.fp-129 + 1.0 i)":
  115586. +double: 1
  115587. +float: 1
  115588. +idouble: 1
  115589. +ifloat: 1
  115590. +ildouble: 1
  115591. +ldouble: 1
  115592. +Test "Imaginary part of: casin (0x1.fp-129 + 1.5 i)":
  115593. +double: 1
  115594. +idouble: 1
  115595. +ildouble: 1
  115596. +ldouble: 1
  115597. +Test "Imaginary part of: casin (0x1.fp-129 - 0.5 i)":
  115598. +float: 1
  115599. +ifloat: 1
  115600. +ildouble: 1
  115601. +ldouble: 1
  115602. +Test "Imaginary part of: casin (0x1.fp-129 - 1.0 i)":
  115603. +double: 1
  115604. +float: 1
  115605. +idouble: 1
  115606. +ifloat: 1
  115607. +ildouble: 1
  115608. +ldouble: 1
  115609. +Test "Imaginary part of: casin (0x1.fp-129 - 1.5 i)":
  115610. +double: 1
  115611. +idouble: 1
  115612. +ildouble: 1
  115613. +ldouble: 1
  115614. +Test "Imaginary part of: casin (0x1.fp-16385 + 0.5 i)":
  115615. +ildouble: 1
  115616. +ldouble: 1
  115617. +Test "Imaginary part of: casin (0x1.fp-16385 + 0x0.ffffffffffffffffp0 i)":
  115618. +ildouble: 1
  115619. +ldouble: 1
  115620. +Test "Imaginary part of: casin (0x1.fp-16385 + 0x1.0000000000000000000000000001p0 i)":
  115621. +ildouble: 1
  115622. +ldouble: 1
  115623. +Test "Imaginary part of: casin (0x1.fp-16385 + 0x1.0000000000000002p0 i)":
  115624. +ildouble: 1
  115625. +ldouble: 1
  115626. +Test "Imaginary part of: casin (0x1.fp-16385 + 1.0 i)":
  115627. +ildouble: 1
  115628. +ldouble: 1
  115629. +Test "Imaginary part of: casin (0x1.fp-16385 + 1.5 i)":
  115630. +ildouble: 1
  115631. +ldouble: 1
  115632. +Test "Imaginary part of: casin (0x1.fp-16385 - 0.5 i)":
  115633. +ildouble: 1
  115634. +ldouble: 1
  115635. +Test "Imaginary part of: casin (0x1.fp-16385 - 0x0.ffffffffffffffffp0 i)":
  115636. +ildouble: 1
  115637. +ldouble: 1
  115638. +Test "Imaginary part of: casin (0x1.fp-16385 - 0x1.0000000000000000000000000001p0 i)":
  115639. +ildouble: 1
  115640. +ldouble: 1
  115641. +Test "Imaginary part of: casin (0x1.fp-16385 - 0x1.0000000000000002p0 i)":
  115642. +ildouble: 1
  115643. +ldouble: 1
  115644. +Test "Imaginary part of: casin (0x1.fp-16385 - 1.0 i)":
  115645. +ildouble: 1
  115646. +ldouble: 1
  115647. +Test "Imaginary part of: casin (0x1.fp-16385 - 1.5 i)":
  115648. +ildouble: 1
  115649. +ldouble: 1
  115650. +Test "Real part of: casin (0x1.fp-30 + 1.0 i)":
  115651. +ildouble: 1
  115652. +ldouble: 1
  115653. +Test "Imaginary part of: casin (0x1.fp-30 + 1.0 i)":
  115654. +double: 1
  115655. +float: 1
  115656. +idouble: 1
  115657. +ifloat: 1
  115658. +ildouble: 1
  115659. +ldouble: 1
  115660. +Test "Real part of: casin (0x1.fp-30 - 1.0 i)":
  115661. +ildouble: 1
  115662. +ldouble: 1
  115663. +Test "Imaginary part of: casin (0x1.fp-30 - 1.0 i)":
  115664. +double: 1
  115665. +float: 1
  115666. +idouble: 1
  115667. +ifloat: 1
  115668. +ildouble: 1
  115669. +ldouble: 1
  115670. +Test "Imaginary part of: casin (0x1.fp1023 + 0x1.fp1023 i)":
  115671. +double: 1
  115672. +idouble: 1
  115673. +Test "Imaginary part of: casin (0x1.fp127 + 0x1.fp127 i)":
  115674. +double: 1
  115675. +idouble: 1
  115676. +Test "Imaginary part of: casin (0x1.fp16383 + 0x1.fp16383 i)":
  115677. +ildouble: 1
  115678. +ldouble: 1
  115679. +Test "Imaginary part of: casin (0x1p-105 + 0.5 i)":
  115680. +float: 1
  115681. +ifloat: 1
  115682. +Test "Imaginary part of: casin (0x1p-105 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  115683. +ildouble: 1
  115684. +ldouble: 1
  115685. +Test "Imaginary part of: casin (0x1p-105 - 0.5 i)":
  115686. +float: 1
  115687. +ifloat: 1
  115688. +Test "Imaginary part of: casin (0x1p-105 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  115689. +ildouble: 1
  115690. +ldouble: 1
  115691. +Test "Imaginary part of: casin (0x1p-112 + 0.5 i)":
  115692. +float: 1
  115693. +ifloat: 1
  115694. +Test "Imaginary part of: casin (0x1p-112 - 0.5 i)":
  115695. +float: 1
  115696. +ifloat: 1
  115697. +Test "Real part of: casin (0x1p-113 + 0x1.0000000000000000000000000001p0 i)":
  115698. +ildouble: 1
  115699. +ldouble: 1
  115700. +Test "Imaginary part of: casin (0x1p-113 + 0x1.0000000000000000000000000001p0 i)":
  115701. +ildouble: 1
  115702. +ldouble: 1
  115703. +Test "Real part of: casin (0x1p-113 - 0x1.0000000000000000000000000001p0 i)":
  115704. +ildouble: 1
  115705. +ldouble: 1
  115706. +Test "Imaginary part of: casin (0x1p-113 - 0x1.0000000000000000000000000001p0 i)":
  115707. +ildouble: 1
  115708. +ldouble: 1
  115709. +Test "Real part of: casin (0x1p-23 + 0.5 i)":
  115710. +double: 1
  115711. +float: 1
  115712. +idouble: 1
  115713. +ifloat: 1
  115714. +ildouble: 2
  115715. +ldouble: 2
  115716. +Test "Imaginary part of: casin (0x1p-23 + 0.5 i)":
  115717. +float: 1
  115718. +ifloat: 1
  115719. +ildouble: 2
  115720. +ldouble: 2
  115721. +Test "Imaginary part of: casin (0x1p-23 + 0x0.ffffffp0 i)":
  115722. +double: 1
  115723. +idouble: 1
  115724. +Test "Real part of: casin (0x1p-23 + 0x1.000002p0 i)":
  115725. +double: 1
  115726. +float: 1
  115727. +idouble: 1
  115728. +ifloat: 1
  115729. +ildouble: 1
  115730. +ldouble: 1
  115731. +Test "Real part of: casin (0x1p-23 - 0.5 i)":
  115732. +double: 1
  115733. +float: 1
  115734. +idouble: 1
  115735. +ifloat: 1
  115736. +ildouble: 2
  115737. +ldouble: 2
  115738. +Test "Imaginary part of: casin (0x1p-23 - 0.5 i)":
  115739. +float: 1
  115740. +ifloat: 1
  115741. +ildouble: 2
  115742. +ldouble: 2
  115743. +Test "Imaginary part of: casin (0x1p-23 - 0x0.ffffffp0 i)":
  115744. +double: 1
  115745. +idouble: 1
  115746. +Test "Real part of: casin (0x1p-23 - 0x1.000002p0 i)":
  115747. +double: 1
  115748. +float: 1
  115749. +idouble: 1
  115750. +ifloat: 1
  115751. +ildouble: 1
  115752. +ldouble: 1
  115753. +Test "Real part of: casin (0x1p-52 + 0.5 i)":
  115754. +ildouble: 1
  115755. +ldouble: 1
  115756. +Test "Imaginary part of: casin (0x1p-52 + 0.5 i)":
  115757. +float: 1
  115758. +ifloat: 1
  115759. +ildouble: 1
  115760. +ldouble: 1
  115761. +Test "Real part of: casin (0x1p-52 + 0x1.0000000000001p0 i)":
  115762. +ildouble: 1
  115763. +ldouble: 1
  115764. +Test "Real part of: casin (0x1p-52 - 0.5 i)":
  115765. +ildouble: 1
  115766. +ldouble: 1
  115767. +Test "Imaginary part of: casin (0x1p-52 - 0.5 i)":
  115768. +float: 1
  115769. +ifloat: 1
  115770. +ildouble: 1
  115771. +ldouble: 1
  115772. +Test "Real part of: casin (0x1p-52 - 0x1.0000000000001p0 i)":
  115773. +ildouble: 1
  115774. +ldouble: 1
  115775. +Test "Imaginary part of: casin (0x1p-63 + 0.5 i)":
  115776. +float: 1
  115777. +ifloat: 1
  115778. +Test "Imaginary part of: casin (0x1p-63 + 0x0.ffffffffffffffffp0 i)":
  115779. +ildouble: 1
  115780. +ldouble: 1
  115781. +Test "Real part of: casin (0x1p-63 + 0x1.0000000000000002p0 i)":
  115782. +ildouble: 1
  115783. +ldouble: 1
  115784. +Test "Imaginary part of: casin (0x1p-63 + 0x1.0000000000000002p0 i)":
  115785. +ildouble: 1
  115786. +ldouble: 1
  115787. +Test "Imaginary part of: casin (0x1p-63 - 0.5 i)":
  115788. +float: 1
  115789. +ifloat: 1
  115790. +Test "Imaginary part of: casin (0x1p-63 - 0x0.ffffffffffffffffp0 i)":
  115791. +ildouble: 1
  115792. +ldouble: 1
  115793. +Test "Real part of: casin (0x1p-63 - 0x1.0000000000000002p0 i)":
  115794. +ildouble: 1
  115795. +ldouble: 1
  115796. +Test "Imaginary part of: casin (0x1p-63 - 0x1.0000000000000002p0 i)":
  115797. +ildouble: 1
  115798. +ldouble: 1
  115799. +Test "Imaginary part of: casin (0x1p500 + 1.0 i)":
  115800. +ildouble: 1
  115801. +ldouble: 1
  115802. +Test "Imaginary part of: casin (0x1p500 - 1.0 i)":
  115803. +ildouble: 1
  115804. +ldouble: 1
  115805. +Test "Imaginary part of: casin (0x1p5000 + 1.0 i)":
  115806. +ildouble: 1
  115807. +ldouble: 1
  115808. +Test "Imaginary part of: casin (0x1p5000 - 1.0 i)":
  115809. +ildouble: 1
  115810. +ldouble: 1
  115811. +Test "Real part of: casin (1.0 + 0.25 i)":
  115812. +double: 1
  115813. +idouble: 1
  115814. +ildouble: 1
  115815. +ldouble: 1
  115816. +Test "Real part of: casin (1.0 + 0.5 i)":
  115817. +float: 1
  115818. +ifloat: 1
  115819. +Test "Imaginary part of: casin (1.0 + 0.5 i)":
  115820. +float: 1
  115821. +ifloat: 1
  115822. +Test "Imaginary part of: casin (1.0 + 0x1.fp-10 i)":
  115823. +float: 1
  115824. +ifloat: 1
  115825. +ildouble: 1
  115826. +ldouble: 1
  115827. +Test "Real part of: casin (1.0 + 0x1.fp-129 i)":
  115828. +ildouble: 1
  115829. +ldouble: 1
  115830. +Test "Imaginary part of: casin (1.0 + 0x1.fp-30 i)":
  115831. +ildouble: 1
  115832. +ldouble: 1
  115833. +Test "Imaginary part of: casin (1.0 + 0x1p500 i)":
  115834. +ildouble: 1
  115835. +ldouble: 1
  115836. +Test "Imaginary part of: casin (1.0 + 0x1p5000 i)":
  115837. +ildouble: 1
  115838. +ldouble: 1
  115839. +Test "Real part of: casin (1.0 - 0.25 i)":
  115840. +double: 1
  115841. +idouble: 1
  115842. +ildouble: 1
  115843. +ldouble: 1
  115844. +Test "Real part of: casin (1.0 - 0.5 i)":
  115845. +float: 1
  115846. +ifloat: 1
  115847. +Test "Imaginary part of: casin (1.0 - 0.5 i)":
  115848. +float: 1
  115849. +ifloat: 1
  115850. +Test "Imaginary part of: casin (1.0 - 0x1.fp-10 i)":
  115851. +float: 1
  115852. +ifloat: 1
  115853. +ildouble: 1
  115854. +ldouble: 1
  115855. +Test "Real part of: casin (1.0 - 0x1.fp-129 i)":
  115856. +ildouble: 1
  115857. +ldouble: 1
  115858. +Test "Imaginary part of: casin (1.0 - 0x1.fp-30 i)":
  115859. +ildouble: 1
  115860. +ldouble: 1
  115861. +Test "Imaginary part of: casin (1.0 - 0x1p500 i)":
  115862. +ildouble: 1
  115863. +ldouble: 1
  115864. +Test "Imaginary part of: casin (1.0 - 0x1p5000 i)":
  115865. +ildouble: 1
  115866. +ldouble: 1
  115867. +
  115868. +# casinh
  115869. +Test "Imaginary part of: casinh (-0.0 + 0x0.fffffffffffff8p0 i)":
  115870. +ildouble: 1
  115871. +ldouble: 1
  115872. +Test "Imaginary part of: casinh (-0.0 + 0x0.ffffffffffffffffp0 i)":
  115873. +ildouble: 1
  115874. +ldouble: 1
  115875. +Test "Real part of: casinh (-0.0 + 0x1.0000000000000000000000000001p0 i)":
  115876. +ildouble: 1
  115877. +ldouble: 1
  115878. +Test "Imaginary part of: casinh (-0.0 - 0x0.fffffffffffff8p0 i)":
  115879. +ildouble: 1
  115880. +ldouble: 1
  115881. +Test "Imaginary part of: casinh (-0.0 - 0x0.ffffffffffffffffp0 i)":
  115882. +ildouble: 1
  115883. +ldouble: 1
  115884. +Test "Real part of: casinh (-0.0 - 0x1.0000000000000000000000000001p0 i)":
  115885. +ildouble: 1
  115886. +ldouble: 1
  115887. +Test "Imaginary part of: casinh (-0.25 + 1.0 i)":
  115888. +double: 1
  115889. +idouble: 1
  115890. +ildouble: 1
  115891. +ldouble: 1
  115892. +Test "Imaginary part of: casinh (-0.25 - 1.0 i)":
  115893. +double: 1
  115894. +idouble: 1
  115895. +ildouble: 1
  115896. +ldouble: 1
  115897. +Test "Real part of: casinh (-0.5 + +0 i)":
  115898. +float: 1
  115899. +ifloat: 1
  115900. +ildouble: 1
  115901. +ldouble: 1
  115902. +Test "Real part of: casinh (-0.5 + 0x1.fp-1025 i)":
  115903. +ildouble: 1
  115904. +ldouble: 1
  115905. +Test "Real part of: casinh (-0.5 + 0x1.fp-129 i)":
  115906. +float: 1
  115907. +ifloat: 1
  115908. +ildouble: 1
  115909. +ldouble: 1
  115910. +Test "Real part of: casinh (-0.5 + 0x1.fp-16385 i)":
  115911. +ildouble: 1
  115912. +ldouble: 1
  115913. +Test "Real part of: casinh (-0.5 + 0x1p-105 i)":
  115914. +float: 1
  115915. +ifloat: 1
  115916. +Test "Real part of: casinh (-0.5 + 0x1p-112 i)":
  115917. +float: 1
  115918. +ifloat: 1
  115919. +Test "Real part of: casinh (-0.5 + 0x1p-23 i)":
  115920. +float: 1
  115921. +ifloat: 1
  115922. +ildouble: 2
  115923. +ldouble: 2
  115924. +Test "Imaginary part of: casinh (-0.5 + 0x1p-23 i)":
  115925. +double: 1
  115926. +float: 1
  115927. +idouble: 1
  115928. +ifloat: 1
  115929. +ildouble: 2
  115930. +ldouble: 2
  115931. +Test "Real part of: casinh (-0.5 + 0x1p-52 i)":
  115932. +float: 1
  115933. +ifloat: 1
  115934. +ildouble: 1
  115935. +ldouble: 1
  115936. +Test "Imaginary part of: casinh (-0.5 + 0x1p-52 i)":
  115937. +ildouble: 1
  115938. +ldouble: 1
  115939. +Test "Real part of: casinh (-0.5 + 0x1p-63 i)":
  115940. +float: 1
  115941. +ifloat: 1
  115942. +Test "Real part of: casinh (-0.5 + 1.0 i)":
  115943. +float: 1
  115944. +ifloat: 1
  115945. +Test "Imaginary part of: casinh (-0.5 + 1.0 i)":
  115946. +float: 1
  115947. +ifloat: 1
  115948. +Test "Real part of: casinh (-0.5 - 0 i)":
  115949. +float: 1
  115950. +ifloat: 1
  115951. +ildouble: 1
  115952. +ldouble: 1
  115953. +Test "Real part of: casinh (-0.5 - 0x1.fp-1025 i)":
  115954. +ildouble: 1
  115955. +ldouble: 1
  115956. +Test "Real part of: casinh (-0.5 - 0x1.fp-129 i)":
  115957. +float: 1
  115958. +ifloat: 1
  115959. +ildouble: 1
  115960. +ldouble: 1
  115961. +Test "Real part of: casinh (-0.5 - 0x1.fp-16385 i)":
  115962. +ildouble: 1
  115963. +ldouble: 1
  115964. +Test "Real part of: casinh (-0.5 - 0x1p-105 i)":
  115965. +float: 1
  115966. +ifloat: 1
  115967. +Test "Real part of: casinh (-0.5 - 0x1p-112 i)":
  115968. +float: 1
  115969. +ifloat: 1
  115970. +Test "Real part of: casinh (-0.5 - 0x1p-23 i)":
  115971. +float: 1
  115972. +ifloat: 1
  115973. +ildouble: 2
  115974. +ldouble: 2
  115975. +Test "Imaginary part of: casinh (-0.5 - 0x1p-23 i)":
  115976. +double: 1
  115977. +float: 1
  115978. +idouble: 1
  115979. +ifloat: 1
  115980. +ildouble: 2
  115981. +ldouble: 2
  115982. +Test "Real part of: casinh (-0.5 - 0x1p-52 i)":
  115983. +float: 1
  115984. +ifloat: 1
  115985. +ildouble: 1
  115986. +ldouble: 1
  115987. +Test "Imaginary part of: casinh (-0.5 - 0x1p-52 i)":
  115988. +ildouble: 1
  115989. +ldouble: 1
  115990. +Test "Real part of: casinh (-0.5 - 0x1p-63 i)":
  115991. +float: 1
  115992. +ifloat: 1
  115993. +Test "Real part of: casinh (-0.5 - 1.0 i)":
  115994. +float: 1
  115995. +ifloat: 1
  115996. +Test "Imaginary part of: casinh (-0.5 - 1.0 i)":
  115997. +float: 1
  115998. +ifloat: 1
  115999. +Test "Imaginary part of: casinh (-0x0.fffffffffffff8p0 + 0x1.fp-1025 i)":
  116000. +ildouble: 1
  116001. +ldouble: 1
  116002. +Test "Imaginary part of: casinh (-0x0.fffffffffffff8p0 - 0x1.fp-1025 i)":
  116003. +ildouble: 1
  116004. +ldouble: 1
  116005. +Test "Real part of: casinh (-0x0.ffffffffffffffffffffffffffcp0 + 0.0 i)":
  116006. +ildouble: 1
  116007. +ldouble: 1
  116008. +Test "Real part of: casinh (-0x0.ffffffffffffffffffffffffffcp0 + 0x1.fp-1025 i)":
  116009. +ildouble: 1
  116010. +ldouble: 1
  116011. +Test "Real part of: casinh (-0x0.ffffffffffffffffffffffffffcp0 + 0x1p-105 i)":
  116012. +ildouble: 1
  116013. +ldouble: 1
  116014. +Test "Real part of: casinh (-0x0.ffffffffffffffffffffffffffcp0 - 0.0 i)":
  116015. +ildouble: 1
  116016. +ldouble: 1
  116017. +Test "Real part of: casinh (-0x0.ffffffffffffffffffffffffffcp0 - 0x1.fp-1025 i)":
  116018. +ildouble: 1
  116019. +ldouble: 1
  116020. +Test "Real part of: casinh (-0x0.ffffffffffffffffffffffffffcp0 - 0x1p-105 i)":
  116021. +ildouble: 1
  116022. +ldouble: 1
  116023. +Test "Real part of: casinh (-0x0.ffffffffffffffffp0 + 0.0 i)":
  116024. +ildouble: 1
  116025. +ldouble: 1
  116026. +Test "Real part of: casinh (-0x0.ffffffffffffffffp0 + 0x1.fp-16385 i)":
  116027. +ildouble: 1
  116028. +ldouble: 1
  116029. +Test "Real part of: casinh (-0x0.ffffffffffffffffp0 + 0x1p-63 i)":
  116030. +ildouble: 1
  116031. +ldouble: 1
  116032. +Test "Real part of: casinh (-0x0.ffffffffffffffffp0 - 0.0 i)":
  116033. +ildouble: 1
  116034. +ldouble: 1
  116035. +Test "Real part of: casinh (-0x0.ffffffffffffffffp0 - 0x1.fp-16385 i)":
  116036. +ildouble: 1
  116037. +ldouble: 1
  116038. +Test "Real part of: casinh (-0x0.ffffffffffffffffp0 - 0x1p-63 i)":
  116039. +ildouble: 1
  116040. +ldouble: 1
  116041. +Test "Real part of: casinh (-0x0.ffffffp0 + 0x1p-23 i)":
  116042. +double: 1
  116043. +idouble: 1
  116044. +Test "Real part of: casinh (-0x0.ffffffp0 - 0x1p-23 i)":
  116045. +double: 1
  116046. +idouble: 1
  116047. +Test "Real part of: casinh (-0x1.0000000000000000000000000001p0 + 0.0 i)":
  116048. +ildouble: 1
  116049. +ldouble: 1
  116050. +Test "Real part of: casinh (-0x1.0000000000000000000000000001p0 + 0x1.fp-16385 i)":
  116051. +ildouble: 1
  116052. +ldouble: 1
  116053. +Test "Real part of: casinh (-0x1.0000000000000000000000000001p0 + 0x1p-113 i)":
  116054. +ildouble: 1
  116055. +ldouble: 1
  116056. +Test "Imaginary part of: casinh (-0x1.0000000000000000000000000001p0 + 0x1p-113 i)":
  116057. +ildouble: 1
  116058. +ldouble: 1
  116059. +Test "Real part of: casinh (-0x1.0000000000000000000000000001p0 - 0.0 i)":
  116060. +ildouble: 1
  116061. +ldouble: 1
  116062. +Test "Real part of: casinh (-0x1.0000000000000000000000000001p0 - 0x1.fp-16385 i)":
  116063. +ildouble: 1
  116064. +ldouble: 1
  116065. +Test "Real part of: casinh (-0x1.0000000000000000000000000001p0 - 0x1p-113 i)":
  116066. +ildouble: 1
  116067. +ldouble: 1
  116068. +Test "Imaginary part of: casinh (-0x1.0000000000000000000000000001p0 - 0x1p-113 i)":
  116069. +ildouble: 1
  116070. +ldouble: 1
  116071. +Test "Real part of: casinh (-0x1.0000000000000002p0 + 0.0 i)":
  116072. +ildouble: 1
  116073. +ldouble: 1
  116074. +Test "Real part of: casinh (-0x1.0000000000000002p0 + 0x1.fp-16385 i)":
  116075. +ildouble: 1
  116076. +ldouble: 1
  116077. +Test "Real part of: casinh (-0x1.0000000000000002p0 + 0x1p-63 i)":
  116078. +ildouble: 1
  116079. +ldouble: 1
  116080. +Test "Imaginary part of: casinh (-0x1.0000000000000002p0 + 0x1p-63 i)":
  116081. +ildouble: 1
  116082. +ldouble: 1
  116083. +Test "Real part of: casinh (-0x1.0000000000000002p0 - 0.0 i)":
  116084. +ildouble: 1
  116085. +ldouble: 1
  116086. +Test "Real part of: casinh (-0x1.0000000000000002p0 - 0x1.fp-16385 i)":
  116087. +ildouble: 1
  116088. +ldouble: 1
  116089. +Test "Real part of: casinh (-0x1.0000000000000002p0 - 0x1p-63 i)":
  116090. +ildouble: 1
  116091. +ldouble: 1
  116092. +Test "Imaginary part of: casinh (-0x1.0000000000000002p0 - 0x1p-63 i)":
  116093. +ildouble: 1
  116094. +ldouble: 1
  116095. +Test "Real part of: casinh (-0x1.0000000000001p0 + 0.0 i)":
  116096. +ildouble: 1
  116097. +ldouble: 1
  116098. +Test "Real part of: casinh (-0x1.0000000000001p0 + 0x1.fp-1025 i)":
  116099. +ildouble: 1
  116100. +ldouble: 1
  116101. +Test "Imaginary part of: casinh (-0x1.0000000000001p0 + 0x1p-52 i)":
  116102. +ildouble: 1
  116103. +ldouble: 1
  116104. +Test "Real part of: casinh (-0x1.0000000000001p0 - 0.0 i)":
  116105. +ildouble: 1
  116106. +ldouble: 1
  116107. +Test "Real part of: casinh (-0x1.0000000000001p0 - 0x1.fp-1025 i)":
  116108. +ildouble: 1
  116109. +ldouble: 1
  116110. +Test "Imaginary part of: casinh (-0x1.0000000000001p0 - 0x1p-52 i)":
  116111. +ildouble: 1
  116112. +ldouble: 1
  116113. +Test "Imaginary part of: casinh (-0x1.000002p0 + 0x1p-23 i)":
  116114. +double: 1
  116115. +float: 1
  116116. +idouble: 1
  116117. +ifloat: 1
  116118. +ildouble: 1
  116119. +ldouble: 1
  116120. +Test "Imaginary part of: casinh (-0x1.000002p0 - 0x1p-23 i)":
  116121. +double: 1
  116122. +float: 1
  116123. +idouble: 1
  116124. +ifloat: 1
  116125. +ildouble: 1
  116126. +ldouble: 1
  116127. +Test "Real part of: casinh (-0x1.fp-10 + 1.0 i)":
  116128. +float: 1
  116129. +ifloat: 1
  116130. +ildouble: 1
  116131. +ldouble: 1
  116132. +Test "Real part of: casinh (-0x1.fp-10 - 1.0 i)":
  116133. +float: 1
  116134. +ifloat: 1
  116135. +ildouble: 1
  116136. +ldouble: 1
  116137. +Test "Imaginary part of: casinh (-0x1.fp-1025 + 0x0.fffffffffffff8p0 i)":
  116138. +ildouble: 1
  116139. +ldouble: 1
  116140. +Test "Imaginary part of: casinh (-0x1.fp-1025 - 0x0.fffffffffffff8p0 i)":
  116141. +ildouble: 1
  116142. +ldouble: 1
  116143. +Test "Real part of: casinh (-0x1.fp-129 + 0.5 i)":
  116144. +double: 1
  116145. +idouble: 1
  116146. +Test "Imaginary part of: casinh (-0x1.fp-129 + 1.0 i)":
  116147. +ildouble: 1
  116148. +ldouble: 1
  116149. +Test "Real part of: casinh (-0x1.fp-129 - 0.5 i)":
  116150. +double: 1
  116151. +idouble: 1
  116152. +Test "Imaginary part of: casinh (-0x1.fp-129 - 1.0 i)":
  116153. +ildouble: 1
  116154. +ldouble: 1
  116155. +Test "Imaginary part of: casinh (-0x1.fp-16385 + 0x0.ffffffffffffffffp0 i)":
  116156. +ildouble: 1
  116157. +ldouble: 1
  116158. +Test "Real part of: casinh (-0x1.fp-16385 + 0x1.0000000000000000000000000001p0 i)":
  116159. +ildouble: 1
  116160. +ldouble: 1
  116161. +Test "Imaginary part of: casinh (-0x1.fp-16385 - 0x0.ffffffffffffffffp0 i)":
  116162. +ildouble: 1
  116163. +ldouble: 1
  116164. +Test "Real part of: casinh (-0x1.fp-16385 - 0x1.0000000000000000000000000001p0 i)":
  116165. +ildouble: 1
  116166. +ldouble: 1
  116167. +Test "Real part of: casinh (-0x1.fp-30 + 1.0 i)":
  116168. +ildouble: 1
  116169. +ldouble: 1
  116170. +Test "Real part of: casinh (-0x1.fp-30 - 1.0 i)":
  116171. +ildouble: 1
  116172. +ldouble: 1
  116173. +Test "Real part of: casinh (-0x1p-105 + 0.5 i)":
  116174. +double: 1
  116175. +idouble: 1
  116176. +ildouble: 1
  116177. +ldouble: 1
  116178. +Test "Real part of: casinh (-0x1p-105 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  116179. +ildouble: 1
  116180. +ldouble: 1
  116181. +Test "Imaginary part of: casinh (-0x1p-105 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  116182. +ildouble: 1
  116183. +ldouble: 1
  116184. +Test "Real part of: casinh (-0x1p-105 - 0.5 i)":
  116185. +double: 1
  116186. +idouble: 1
  116187. +ildouble: 1
  116188. +ldouble: 1
  116189. +Test "Real part of: casinh (-0x1p-105 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  116190. +ildouble: 1
  116191. +ldouble: 1
  116192. +Test "Imaginary part of: casinh (-0x1p-105 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  116193. +ildouble: 1
  116194. +ldouble: 1
  116195. +Test "Real part of: casinh (-0x1p-112 + 0.5 i)":
  116196. +double: 1
  116197. +idouble: 1
  116198. +ildouble: 1
  116199. +ldouble: 1
  116200. +Test "Imaginary part of: casinh (-0x1p-112 + 0.5 i)":
  116201. +ildouble: 1
  116202. +ldouble: 1
  116203. +Test "Imaginary part of: casinh (-0x1p-112 + 0x0.ffffffffffffffffffffffffffff8p0 i)":
  116204. +ildouble: 1
  116205. +ldouble: 1
  116206. +Test "Real part of: casinh (-0x1p-112 - 0.5 i)":
  116207. +double: 1
  116208. +idouble: 1
  116209. +ildouble: 1
  116210. +ldouble: 1
  116211. +Test "Imaginary part of: casinh (-0x1p-112 - 0.5 i)":
  116212. +ildouble: 1
  116213. +ldouble: 1
  116214. +Test "Imaginary part of: casinh (-0x1p-112 - 0x0.ffffffffffffffffffffffffffff8p0 i)":
  116215. +ildouble: 1
  116216. +ldouble: 1
  116217. +Test "Real part of: casinh (-0x1p-113 + 0x1.0000000000000000000000000001p0 i)":
  116218. +ildouble: 1
  116219. +ldouble: 1
  116220. +Test "Real part of: casinh (-0x1p-113 - 0x1.0000000000000000000000000001p0 i)":
  116221. +ildouble: 1
  116222. +ldouble: 1
  116223. +Test "Real part of: casinh (-0x1p-23 + 0.5 i)":
  116224. +double: 1
  116225. +idouble: 1
  116226. +ildouble: 1
  116227. +ldouble: 1
  116228. +Test "Imaginary part of: casinh (-0x1p-23 + 0.5 i)":
  116229. +ildouble: 1
  116230. +ldouble: 1
  116231. +Test "Real part of: casinh (-0x1p-23 + 0x0.ffffffp0 i)":
  116232. +float: 2
  116233. +ifloat: 2
  116234. +Test "Imaginary part of: casinh (-0x1p-23 + 0x0.ffffffp0 i)":
  116235. +ildouble: 1
  116236. +ldouble: 1
  116237. +Test "Real part of: casinh (-0x1p-23 + 0x1.000002p0 i)":
  116238. +float: 1
  116239. +ifloat: 1
  116240. +ildouble: 1
  116241. +ldouble: 1
  116242. +Test "Real part of: casinh (-0x1p-23 - 0.5 i)":
  116243. +double: 1
  116244. +idouble: 1
  116245. +ildouble: 1
  116246. +ldouble: 1
  116247. +Test "Imaginary part of: casinh (-0x1p-23 - 0.5 i)":
  116248. +ildouble: 1
  116249. +ldouble: 1
  116250. +Test "Real part of: casinh (-0x1p-23 - 0x0.ffffffp0 i)":
  116251. +float: 2
  116252. +ifloat: 2
  116253. +Test "Imaginary part of: casinh (-0x1p-23 - 0x0.ffffffp0 i)":
  116254. +ildouble: 1
  116255. +ldouble: 1
  116256. +Test "Real part of: casinh (-0x1p-23 - 0x1.000002p0 i)":
  116257. +float: 1
  116258. +ifloat: 1
  116259. +ildouble: 1
  116260. +ldouble: 1
  116261. +Test "Real part of: casinh (-0x1p-52 + 0x0.fffffffffffff8p0 i)":
  116262. +double: 1
  116263. +idouble: 1
  116264. +Test "Real part of: casinh (-0x1p-52 - 0x0.fffffffffffff8p0 i)":
  116265. +double: 1
  116266. +idouble: 1
  116267. +Test "Real part of: casinh (-0x1p-63 + 0.5 i)":
  116268. +ildouble: 1
  116269. +ldouble: 1
  116270. +Test "Real part of: casinh (-0x1p-63 + 0x0.ffffffffffffffffp0 i)":
  116271. +ildouble: 1
  116272. +ldouble: 1
  116273. +Test "Real part of: casinh (-0x1p-63 - 0.5 i)":
  116274. +ildouble: 1
  116275. +ldouble: 1
  116276. +Test "Real part of: casinh (-0x1p-63 - 0x0.ffffffffffffffffp0 i)":
  116277. +ildouble: 1
  116278. +ldouble: 1
  116279. +Test "Real part of: casinh (-0x1p500 + 1.0 i)":
  116280. +ildouble: 1
  116281. +ldouble: 1
  116282. +Test "Real part of: casinh (-0x1p500 - 1.0 i)":
  116283. +ildouble: 1
  116284. +ldouble: 1
  116285. +Test "Real part of: casinh (-0x1p5000 + 1.0 i)":
  116286. +ildouble: 1
  116287. +ldouble: 1
  116288. +Test "Real part of: casinh (-0x1p5000 - 1.0 i)":
  116289. +ildouble: 1
  116290. +ldouble: 1
  116291. +Test "Real part of: casinh (-1.0 + +0 i)":
  116292. +double: 1
  116293. +float: 1
  116294. +idouble: 1
  116295. +ifloat: 1
  116296. +ildouble: 1
  116297. +ldouble: 1
  116298. +Test "Real part of: casinh (-1.0 + 0.25 i)":
  116299. +float: 1
  116300. +ifloat: 1
  116301. +ildouble: 1
  116302. +ldouble: 1
  116303. +Test "Real part of: casinh (-1.0 + 0.5 i)":
  116304. +double: 1
  116305. +idouble: 1
  116306. +ildouble: 1
  116307. +ldouble: 1
  116308. +Test "Imaginary part of: casinh (-1.0 + 0.5 i)":
  116309. +ildouble: 1
  116310. +ldouble: 1
  116311. +Test "Real part of: casinh (-1.0 + 0x1.fp-10 i)":
  116312. +double: 1
  116313. +idouble: 1
  116314. +Test "Imaginary part of: casinh (-1.0 + 0x1.fp-10 i)":
  116315. +float: 1
  116316. +ifloat: 1
  116317. +ildouble: 1
  116318. +ldouble: 1
  116319. +Test "Real part of: casinh (-1.0 + 0x1.fp-100 i)":
  116320. +double: 1
  116321. +float: 1
  116322. +idouble: 1
  116323. +ifloat: 1
  116324. +ildouble: 1
  116325. +ldouble: 1
  116326. +Test "Real part of: casinh (-1.0 + 0x1.fp-1000 i)":
  116327. +double: 1
  116328. +idouble: 1
  116329. +ildouble: 1
  116330. +ldouble: 1
  116331. +Test "Real part of: casinh (-1.0 + 0x1.fp-10000 i)":
  116332. +ildouble: 1
  116333. +ldouble: 1
  116334. +Test "Real part of: casinh (-1.0 + 0x1.fp-1025 i)":
  116335. +double: 1
  116336. +idouble: 1
  116337. +ildouble: 1
  116338. +ldouble: 1
  116339. +Test "Real part of: casinh (-1.0 + 0x1.fp-129 i)":
  116340. +double: 1
  116341. +float: 1
  116342. +idouble: 1
  116343. +ifloat: 1
  116344. +ildouble: 1
  116345. +ldouble: 1
  116346. +Test "Real part of: casinh (-1.0 + 0x1.fp-16385 i)":
  116347. +ildouble: 1
  116348. +ldouble: 1
  116349. +Test "Real part of: casinh (-1.0 + 0x1.fp-30 i)":
  116350. +double: 1
  116351. +float: 1
  116352. +idouble: 1
  116353. +ifloat: 1
  116354. +ildouble: 1
  116355. +ldouble: 1
  116356. +Test "Imaginary part of: casinh (-1.0 + 0x1.fp-30 i)":
  116357. +ildouble: 1
  116358. +ldouble: 1
  116359. +Test "Real part of: casinh (-1.0 + 0x1p500 i)":
  116360. +ildouble: 1
  116361. +ldouble: 1
  116362. +Test "Real part of: casinh (-1.0 + 0x1p5000 i)":
  116363. +ildouble: 1
  116364. +ldouble: 1
  116365. +Test "Real part of: casinh (-1.0 - 0 i)":
  116366. +double: 1
  116367. +float: 1
  116368. +idouble: 1
  116369. +ifloat: 1
  116370. +ildouble: 1
  116371. +ldouble: 1
  116372. +Test "Real part of: casinh (-1.0 - 0.25 i)":
  116373. +float: 1
  116374. +ifloat: 1
  116375. +ildouble: 1
  116376. +ldouble: 1
  116377. +Test "Real part of: casinh (-1.0 - 0.5 i)":
  116378. +double: 1
  116379. +idouble: 1
  116380. +ildouble: 1
  116381. +ldouble: 1
  116382. +Test "Imaginary part of: casinh (-1.0 - 0.5 i)":
  116383. +ildouble: 1
  116384. +ldouble: 1
  116385. +Test "Real part of: casinh (-1.0 - 0x1.fp-10 i)":
  116386. +double: 1
  116387. +idouble: 1
  116388. +Test "Imaginary part of: casinh (-1.0 - 0x1.fp-10 i)":
  116389. +float: 1
  116390. +ifloat: 1
  116391. +ildouble: 1
  116392. +ldouble: 1
  116393. +Test "Real part of: casinh (-1.0 - 0x1.fp-100 i)":
  116394. +double: 1
  116395. +float: 1
  116396. +idouble: 1
  116397. +ifloat: 1
  116398. +ildouble: 1
  116399. +ldouble: 1
  116400. +Test "Real part of: casinh (-1.0 - 0x1.fp-1000 i)":
  116401. +double: 1
  116402. +idouble: 1
  116403. +ildouble: 1
  116404. +ldouble: 1
  116405. +Test "Real part of: casinh (-1.0 - 0x1.fp-10000 i)":
  116406. +ildouble: 1
  116407. +ldouble: 1
  116408. +Test "Real part of: casinh (-1.0 - 0x1.fp-1025 i)":
  116409. +double: 1
  116410. +idouble: 1
  116411. +ildouble: 1
  116412. +ldouble: 1
  116413. +Test "Real part of: casinh (-1.0 - 0x1.fp-129 i)":
  116414. +double: 1
  116415. +float: 1
  116416. +idouble: 1
  116417. +ifloat: 1
  116418. +ildouble: 1
  116419. +ldouble: 1
  116420. +Test "Real part of: casinh (-1.0 - 0x1.fp-16385 i)":
  116421. +ildouble: 1
  116422. +ldouble: 1
  116423. +Test "Real part of: casinh (-1.0 - 0x1.fp-30 i)":
  116424. +double: 1
  116425. +float: 1
  116426. +idouble: 1
  116427. +ifloat: 1
  116428. +ildouble: 1
  116429. +ldouble: 1
  116430. +Test "Imaginary part of: casinh (-1.0 - 0x1.fp-30 i)":
  116431. +ildouble: 1
  116432. +ldouble: 1
  116433. +Test "Real part of: casinh (-1.0 - 0x1p500 i)":
  116434. +ildouble: 1
  116435. +ldouble: 1
  116436. +Test "Real part of: casinh (-1.0 - 0x1p5000 i)":
  116437. +ildouble: 1
  116438. +ldouble: 1
  116439. +Test "Real part of: casinh (-1.5 + +0 i)":
  116440. +double: 1
  116441. +idouble: 1
  116442. +ildouble: 1
  116443. +ldouble: 1
  116444. +Test "Real part of: casinh (-1.5 + 0x1.fp-1025 i)":
  116445. +double: 1
  116446. +idouble: 1
  116447. +ildouble: 1
  116448. +ldouble: 1
  116449. +Test "Real part of: casinh (-1.5 + 0x1.fp-129 i)":
  116450. +double: 1
  116451. +idouble: 1
  116452. +ildouble: 1
  116453. +ldouble: 1
  116454. +Test "Real part of: casinh (-1.5 + 0x1.fp-16385 i)":
  116455. +ildouble: 1
  116456. +ldouble: 1
  116457. +Test "Real part of: casinh (-1.5 - 0 i)":
  116458. +double: 1
  116459. +idouble: 1
  116460. +ildouble: 1
  116461. +ldouble: 1
  116462. +Test "Real part of: casinh (-1.5 - 0x1.fp-1025 i)":
  116463. +double: 1
  116464. +idouble: 1
  116465. +ildouble: 1
  116466. +ldouble: 1
  116467. +Test "Real part of: casinh (-1.5 - 0x1.fp-129 i)":
  116468. +double: 1
  116469. +idouble: 1
  116470. +ildouble: 1
  116471. +ldouble: 1
  116472. +Test "Real part of: casinh (-1.5 - 0x1.fp-16385 i)":
  116473. +ildouble: 1
  116474. +ldouble: 1
  116475. +Test "Imaginary part of: casinh (0.0 + 0x0.fffffffffffff8p0 i)":
  116476. +ildouble: 1
  116477. +ldouble: 1
  116478. +Test "Imaginary part of: casinh (0.0 + 0x0.ffffffffffffffffp0 i)":
  116479. +ildouble: 1
  116480. +ldouble: 1
  116481. +Test "Real part of: casinh (0.0 + 0x1.0000000000000000000000000001p0 i)":
  116482. +ildouble: 1
  116483. +ldouble: 1
  116484. +Test "Imaginary part of: casinh (0.0 - 0x0.fffffffffffff8p0 i)":
  116485. +ildouble: 1
  116486. +ldouble: 1
  116487. +Test "Imaginary part of: casinh (0.0 - 0x0.ffffffffffffffffp0 i)":
  116488. +ildouble: 1
  116489. +ldouble: 1
  116490. +Test "Real part of: casinh (0.0 - 0x1.0000000000000000000000000001p0 i)":
  116491. +ildouble: 1
  116492. +ldouble: 1
  116493. +Test "Imaginary part of: casinh (0.25 + 1.0 i)":
  116494. +double: 1
  116495. +idouble: 1
  116496. +ildouble: 1
  116497. +ldouble: 1
  116498. +Test "Imaginary part of: casinh (0.25 - 1.0 i)":
  116499. +double: 1
  116500. +idouble: 1
  116501. +ildouble: 1
  116502. +ldouble: 1
  116503. +Test "Real part of: casinh (0.5 + +0 i)":
  116504. +float: 1
  116505. +ifloat: 1
  116506. +ildouble: 1
  116507. +ldouble: 1
  116508. +Test "Real part of: casinh (0.5 + 0x1.fp-1025 i)":
  116509. +ildouble: 1
  116510. +ldouble: 1
  116511. +Test "Real part of: casinh (0.5 + 0x1.fp-129 i)":
  116512. +float: 1
  116513. +ifloat: 1
  116514. +ildouble: 1
  116515. +ldouble: 1
  116516. +Test "Real part of: casinh (0.5 + 0x1.fp-16385 i)":
  116517. +ildouble: 1
  116518. +ldouble: 1
  116519. +Test "Real part of: casinh (0.5 + 0x1p-105 i)":
  116520. +float: 1
  116521. +ifloat: 1
  116522. +Test "Real part of: casinh (0.5 + 0x1p-112 i)":
  116523. +float: 1
  116524. +ifloat: 1
  116525. +Test "Real part of: casinh (0.5 + 0x1p-23 i)":
  116526. +float: 1
  116527. +ifloat: 1
  116528. +ildouble: 2
  116529. +ldouble: 2
  116530. +Test "Imaginary part of: casinh (0.5 + 0x1p-23 i)":
  116531. +double: 1
  116532. +float: 1
  116533. +idouble: 1
  116534. +ifloat: 1
  116535. +ildouble: 2
  116536. +ldouble: 2
  116537. +Test "Real part of: casinh (0.5 + 0x1p-52 i)":
  116538. +float: 1
  116539. +ifloat: 1
  116540. +ildouble: 1
  116541. +ldouble: 1
  116542. +Test "Imaginary part of: casinh (0.5 + 0x1p-52 i)":
  116543. +ildouble: 1
  116544. +ldouble: 1
  116545. +Test "Real part of: casinh (0.5 + 0x1p-63 i)":
  116546. +float: 1
  116547. +ifloat: 1
  116548. +Test "Real part of: casinh (0.5 + 1.0 i)":
  116549. +float: 1
  116550. +ifloat: 1
  116551. +Test "Imaginary part of: casinh (0.5 + 1.0 i)":
  116552. +float: 1
  116553. +ifloat: 1
  116554. +Test "Real part of: casinh (0.5 - 0 i)":
  116555. +float: 1
  116556. +ifloat: 1
  116557. +ildouble: 1
  116558. +ldouble: 1
  116559. +Test "Real part of: casinh (0.5 - 0x1.fp-1025 i)":
  116560. +ildouble: 1
  116561. +ldouble: 1
  116562. +Test "Real part of: casinh (0.5 - 0x1.fp-129 i)":
  116563. +float: 1
  116564. +ifloat: 1
  116565. +ildouble: 1
  116566. +ldouble: 1
  116567. +Test "Real part of: casinh (0.5 - 0x1.fp-16385 i)":
  116568. +ildouble: 1
  116569. +ldouble: 1
  116570. +Test "Real part of: casinh (0.5 - 0x1p-105 i)":
  116571. +float: 1
  116572. +ifloat: 1
  116573. +Test "Real part of: casinh (0.5 - 0x1p-112 i)":
  116574. +float: 1
  116575. +ifloat: 1
  116576. +Test "Real part of: casinh (0.5 - 0x1p-23 i)":
  116577. +float: 1
  116578. +ifloat: 1
  116579. +ildouble: 2
  116580. +ldouble: 2
  116581. +Test "Imaginary part of: casinh (0.5 - 0x1p-23 i)":
  116582. +double: 1
  116583. +float: 1
  116584. +idouble: 1
  116585. +ifloat: 1
  116586. +ildouble: 2
  116587. +ldouble: 2
  116588. +Test "Real part of: casinh (0.5 - 0x1p-52 i)":
  116589. +float: 1
  116590. +ifloat: 1
  116591. +ildouble: 1
  116592. +ldouble: 1
  116593. +Test "Imaginary part of: casinh (0.5 - 0x1p-52 i)":
  116594. +ildouble: 1
  116595. +ldouble: 1
  116596. +Test "Real part of: casinh (0.5 - 0x1p-63 i)":
  116597. +float: 1
  116598. +ifloat: 1
  116599. +Test "Real part of: casinh (0.5 - 1.0 i)":
  116600. +float: 1
  116601. +ifloat: 1
  116602. +Test "Imaginary part of: casinh (0.5 - 1.0 i)":
  116603. +float: 1
  116604. +ifloat: 1
  116605. +Test "Real part of: casinh (0.75 + 1.25 i)":
  116606. +float: 1
  116607. +ifloat: 1
  116608. +ildouble: 1
  116609. +ldouble: 1
  116610. +Test "Imaginary part of: casinh (0.75 + 1.25 i)":
  116611. +double: 1
  116612. +float: 1
  116613. +idouble: 1
  116614. +ifloat: 1
  116615. +ildouble: 1
  116616. +ldouble: 1
  116617. +Test "Imaginary part of: casinh (0x0.fffffffffffff8p0 + 0x1.fp-1025 i)":
  116618. +ildouble: 1
  116619. +ldouble: 1
  116620. +Test "Imaginary part of: casinh (0x0.fffffffffffff8p0 - 0x1.fp-1025 i)":
  116621. +ildouble: 1
  116622. +ldouble: 1
  116623. +Test "Real part of: casinh (0x0.ffffffffffffffffffffffffffcp0 + 0.0 i)":
  116624. +ildouble: 1
  116625. +ldouble: 1
  116626. +Test "Real part of: casinh (0x0.ffffffffffffffffffffffffffcp0 + 0x1.fp-1025 i)":
  116627. +ildouble: 1
  116628. +ldouble: 1
  116629. +Test "Real part of: casinh (0x0.ffffffffffffffffffffffffffcp0 + 0x1p-105 i)":
  116630. +ildouble: 1
  116631. +ldouble: 1
  116632. +Test "Real part of: casinh (0x0.ffffffffffffffffffffffffffcp0 - 0.0 i)":
  116633. +ildouble: 1
  116634. +ldouble: 1
  116635. +Test "Real part of: casinh (0x0.ffffffffffffffffffffffffffcp0 - 0x1.fp-1025 i)":
  116636. +ildouble: 1
  116637. +ldouble: 1
  116638. +Test "Real part of: casinh (0x0.ffffffffffffffffffffffffffcp0 - 0x1p-105 i)":
  116639. +ildouble: 1
  116640. +ldouble: 1
  116641. +Test "Real part of: casinh (0x0.ffffffffffffffffp0 + 0.0 i)":
  116642. +ildouble: 1
  116643. +ldouble: 1
  116644. +Test "Real part of: casinh (0x0.ffffffffffffffffp0 + 0x1.fp-16385 i)":
  116645. +ildouble: 1
  116646. +ldouble: 1
  116647. +Test "Real part of: casinh (0x0.ffffffffffffffffp0 + 0x1p-63 i)":
  116648. +ildouble: 1
  116649. +ldouble: 1
  116650. +Test "Real part of: casinh (0x0.ffffffffffffffffp0 - 0.0 i)":
  116651. +ildouble: 1
  116652. +ldouble: 1
  116653. +Test "Real part of: casinh (0x0.ffffffffffffffffp0 - 0x1.fp-16385 i)":
  116654. +ildouble: 1
  116655. +ldouble: 1
  116656. +Test "Real part of: casinh (0x0.ffffffffffffffffp0 - 0x1p-63 i)":
  116657. +ildouble: 1
  116658. +ldouble: 1
  116659. +Test "Real part of: casinh (0x0.ffffffp0 + 0x1p-23 i)":
  116660. +double: 1
  116661. +idouble: 1
  116662. +Test "Real part of: casinh (0x0.ffffffp0 - 0x1p-23 i)":
  116663. +double: 1
  116664. +idouble: 1
  116665. +Test "Real part of: casinh (0x1.0000000000000000000000000001p0 + 0.0 i)":
  116666. +ildouble: 1
  116667. +ldouble: 1
  116668. +Test "Real part of: casinh (0x1.0000000000000000000000000001p0 + 0x1.fp-16385 i)":
  116669. +ildouble: 1
  116670. +ldouble: 1
  116671. +Test "Real part of: casinh (0x1.0000000000000000000000000001p0 + 0x1p-113 i)":
  116672. +ildouble: 1
  116673. +ldouble: 1
  116674. +Test "Imaginary part of: casinh (0x1.0000000000000000000000000001p0 + 0x1p-113 i)":
  116675. +ildouble: 1
  116676. +ldouble: 1
  116677. +Test "Real part of: casinh (0x1.0000000000000000000000000001p0 - 0.0 i)":
  116678. +ildouble: 1
  116679. +ldouble: 1
  116680. +Test "Real part of: casinh (0x1.0000000000000000000000000001p0 - 0x1.fp-16385 i)":
  116681. +ildouble: 1
  116682. +ldouble: 1
  116683. +Test "Real part of: casinh (0x1.0000000000000000000000000001p0 - 0x1p-113 i)":
  116684. +ildouble: 1
  116685. +ldouble: 1
  116686. +Test "Imaginary part of: casinh (0x1.0000000000000000000000000001p0 - 0x1p-113 i)":
  116687. +ildouble: 1
  116688. +ldouble: 1
  116689. +Test "Real part of: casinh (0x1.0000000000000002p0 + 0.0 i)":
  116690. +ildouble: 1
  116691. +ldouble: 1
  116692. +Test "Real part of: casinh (0x1.0000000000000002p0 + 0x1.fp-16385 i)":
  116693. +ildouble: 1
  116694. +ldouble: 1
  116695. +Test "Real part of: casinh (0x1.0000000000000002p0 + 0x1p-63 i)":
  116696. +ildouble: 1
  116697. +ldouble: 1
  116698. +Test "Imaginary part of: casinh (0x1.0000000000000002p0 + 0x1p-63 i)":
  116699. +ildouble: 1
  116700. +ldouble: 1
  116701. +Test "Real part of: casinh (0x1.0000000000000002p0 - 0.0 i)":
  116702. +ildouble: 1
  116703. +ldouble: 1
  116704. +Test "Real part of: casinh (0x1.0000000000000002p0 - 0x1.fp-16385 i)":
  116705. +ildouble: 1
  116706. +ldouble: 1
  116707. +Test "Real part of: casinh (0x1.0000000000000002p0 - 0x1p-63 i)":
  116708. +ildouble: 1
  116709. +ldouble: 1
  116710. +Test "Imaginary part of: casinh (0x1.0000000000000002p0 - 0x1p-63 i)":
  116711. +ildouble: 1
  116712. +ldouble: 1
  116713. +Test "Real part of: casinh (0x1.0000000000001p0 + 0.0 i)":
  116714. +ildouble: 1
  116715. +ldouble: 1
  116716. +Test "Real part of: casinh (0x1.0000000000001p0 + 0x1.fp-1025 i)":
  116717. +ildouble: 1
  116718. +ldouble: 1
  116719. +Test "Imaginary part of: casinh (0x1.0000000000001p0 + 0x1p-52 i)":
  116720. +ildouble: 1
  116721. +ldouble: 1
  116722. +Test "Real part of: casinh (0x1.0000000000001p0 - 0.0 i)":
  116723. +ildouble: 1
  116724. +ldouble: 1
  116725. +Test "Real part of: casinh (0x1.0000000000001p0 - 0x1.fp-1025 i)":
  116726. +ildouble: 1
  116727. +ldouble: 1
  116728. +Test "Imaginary part of: casinh (0x1.0000000000001p0 - 0x1p-52 i)":
  116729. +ildouble: 1
  116730. +ldouble: 1
  116731. +Test "Imaginary part of: casinh (0x1.000002p0 + 0x1p-23 i)":
  116732. +double: 1
  116733. +float: 1
  116734. +idouble: 1
  116735. +ifloat: 1
  116736. +ildouble: 1
  116737. +ldouble: 1
  116738. +Test "Imaginary part of: casinh (0x1.000002p0 - 0x1p-23 i)":
  116739. +double: 1
  116740. +float: 1
  116741. +idouble: 1
  116742. +ifloat: 1
  116743. +ildouble: 1
  116744. +ldouble: 1
  116745. +Test "Real part of: casinh (0x1.fp-10 + 1.0 i)":
  116746. +float: 1
  116747. +ifloat: 1
  116748. +ildouble: 1
  116749. +ldouble: 1
  116750. +Test "Real part of: casinh (0x1.fp-10 - 1.0 i)":
  116751. +float: 1
  116752. +ifloat: 1
  116753. +ildouble: 1
  116754. +ldouble: 1
  116755. +Test "Imaginary part of: casinh (0x1.fp-1025 + 0x0.fffffffffffff8p0 i)":
  116756. +ildouble: 1
  116757. +ldouble: 1
  116758. +Test "Imaginary part of: casinh (0x1.fp-1025 - 0x0.fffffffffffff8p0 i)":
  116759. +ildouble: 1
  116760. +ldouble: 1
  116761. +Test "Real part of: casinh (0x1.fp-129 + 0.5 i)":
  116762. +double: 1
  116763. +idouble: 1
  116764. +Test "Imaginary part of: casinh (0x1.fp-129 + 1.0 i)":
  116765. +ildouble: 1
  116766. +ldouble: 1
  116767. +Test "Real part of: casinh (0x1.fp-129 - 0.5 i)":
  116768. +double: 1
  116769. +idouble: 1
  116770. +Test "Imaginary part of: casinh (0x1.fp-129 - 1.0 i)":
  116771. +ildouble: 1
  116772. +ldouble: 1
  116773. +Test "Imaginary part of: casinh (0x1.fp-16385 + 0x0.ffffffffffffffffp0 i)":
  116774. +ildouble: 1
  116775. +ldouble: 1
  116776. +Test "Real part of: casinh (0x1.fp-16385 + 0x1.0000000000000000000000000001p0 i)":
  116777. +ildouble: 1
  116778. +ldouble: 1
  116779. +Test "Imaginary part of: casinh (0x1.fp-16385 - 0x0.ffffffffffffffffp0 i)":
  116780. +ildouble: 1
  116781. +ldouble: 1
  116782. +Test "Real part of: casinh (0x1.fp-16385 - 0x1.0000000000000000000000000001p0 i)":
  116783. +ildouble: 1
  116784. +ldouble: 1
  116785. +Test "Real part of: casinh (0x1.fp-30 + 1.0 i)":
  116786. +ildouble: 1
  116787. +ldouble: 1
  116788. +Test "Real part of: casinh (0x1.fp-30 - 1.0 i)":
  116789. +ildouble: 1
  116790. +ldouble: 1
  116791. +Test "Real part of: casinh (0x1.fp1023 + 0x1.fp1023 i)":
  116792. +double: 1
  116793. +idouble: 1
  116794. +Test "Real part of: casinh (0x1.fp127 + 0x1.fp127 i)":
  116795. +double: 1
  116796. +idouble: 1
  116797. +Test "Real part of: casinh (0x1.fp16383 + 0x1.fp16383 i)":
  116798. +ildouble: 1
  116799. +ldouble: 1
  116800. +Test "Real part of: casinh (0x1p-105 + 0.5 i)":
  116801. +double: 1
  116802. +idouble: 1
  116803. +ildouble: 1
  116804. +ldouble: 1
  116805. +Test "Real part of: casinh (0x1p-105 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  116806. +ildouble: 1
  116807. +ldouble: 1
  116808. +Test "Imaginary part of: casinh (0x1p-105 + 0x0.ffffffffffffffffffffffffffcp0 i)":
  116809. +ildouble: 1
  116810. +ldouble: 1
  116811. +Test "Real part of: casinh (0x1p-105 - 0.5 i)":
  116812. +double: 1
  116813. +idouble: 1
  116814. +ildouble: 1
  116815. +ldouble: 1
  116816. +Test "Real part of: casinh (0x1p-105 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  116817. +ildouble: 1
  116818. +ldouble: 1
  116819. +Test "Imaginary part of: casinh (0x1p-105 - 0x0.ffffffffffffffffffffffffffcp0 i)":
  116820. +ildouble: 1
  116821. +ldouble: 1
  116822. +Test "Real part of: casinh (0x1p-112 + 0.5 i)":
  116823. +double: 1
  116824. +idouble: 1
  116825. +ildouble: 1
  116826. +ldouble: 1
  116827. +Test "Imaginary part of: casinh (0x1p-112 + 0.5 i)":
  116828. +ildouble: 1
  116829. +ldouble: 1
  116830. +Test "Imaginary part of: casinh (0x1p-112 + 0x0.ffffffffffffffffffffffffffff8p0 i)":
  116831. +ildouble: 1
  116832. +ldouble: 1
  116833. +Test "Real part of: casinh (0x1p-112 - 0.5 i)":
  116834. +double: 1
  116835. +idouble: 1
  116836. +ildouble: 1
  116837. +ldouble: 1
  116838. +Test "Imaginary part of: casinh (0x1p-112 - 0.5 i)":
  116839. +ildouble: 1
  116840. +ldouble: 1
  116841. +Test "Imaginary part of: casinh (0x1p-112 - 0x0.ffffffffffffffffffffffffffff8p0 i)":
  116842. +ildouble: 1
  116843. +ldouble: 1
  116844. +Test "Real part of: casinh (0x1p-113 + 0x1.0000000000000000000000000001p0 i)":
  116845. +ildouble: 1
  116846. +ldouble: 1
  116847. +Test "Real part of: casinh (0x1p-113 - 0x1.0000000000000000000000000001p0 i)":
  116848. +ildouble: 1
  116849. +ldouble: 1
  116850. +Test "Real part of: casinh (0x1p-23 + 0.5 i)":
  116851. +double: 1
  116852. +idouble: 1
  116853. +ildouble: 1
  116854. +ldouble: 1
  116855. +Test "Imaginary part of: casinh (0x1p-23 + 0.5 i)":
  116856. +ildouble: 1
  116857. +ldouble: 1
  116858. +Test "Real part of: casinh (0x1p-23 + 0x0.ffffffp0 i)":
  116859. +float: 2
  116860. +ifloat: 2
  116861. +Test "Imaginary part of: casinh (0x1p-23 + 0x0.ffffffp0 i)":
  116862. +ildouble: 1
  116863. +ldouble: 1
  116864. +Test "Real part of: casinh (0x1p-23 + 0x1.000002p0 i)":
  116865. +float: 1
  116866. +ifloat: 1
  116867. +ildouble: 1
  116868. +ldouble: 1
  116869. +Test "Real part of: casinh (0x1p-23 - 0.5 i)":
  116870. +double: 1
  116871. +idouble: 1
  116872. +ildouble: 1
  116873. +ldouble: 1
  116874. +Test "Imaginary part of: casinh (0x1p-23 - 0.5 i)":
  116875. +ildouble: 1
  116876. +ldouble: 1
  116877. +Test "Real part of: casinh (0x1p-23 - 0x0.ffffffp0 i)":
  116878. +float: 2
  116879. +ifloat: 2
  116880. +Test "Imaginary part of: casinh (0x1p-23 - 0x0.ffffffp0 i)":
  116881. +ildouble: 1
  116882. +ldouble: 1
  116883. +Test "Real part of: casinh (0x1p-23 - 0x1.000002p0 i)":
  116884. +float: 1
  116885. +ifloat: 1
  116886. +ildouble: 1
  116887. +ldouble: 1
  116888. +Test "Real part of: casinh (0x1p-52 + 0x0.fffffffffffff8p0 i)":
  116889. +double: 1
  116890. +idouble: 1
  116891. +Test "Real part of: casinh (0x1p-52 - 0x0.fffffffffffff8p0 i)":
  116892. +double: 1
  116893. +idouble: 1
  116894. +Test "Real part of: casinh (0x1p-63 + 0.5 i)":
  116895. +ildouble: 1
  116896. +ldouble: 1
  116897. +Test "Real part of: casinh (0x1p-63 + 0x0.ffffffffffffffffp0 i)":
  116898. +ildouble: 1
  116899. +ldouble: 1
  116900. +Test "Real part of: casinh (0x1p-63 - 0.5 i)":
  116901. +ildouble: 1
  116902. +ldouble: 1
  116903. +Test "Real part of: casinh (0x1p-63 - 0x0.ffffffffffffffffp0 i)":
  116904. +ildouble: 1
  116905. +ldouble: 1
  116906. +Test "Real part of: casinh (0x1p500 + 1.0 i)":
  116907. +ildouble: 1
  116908. +ldouble: 1
  116909. +Test "Real part of: casinh (0x1p500 - 1.0 i)":
  116910. +ildouble: 1
  116911. +ldouble: 1
  116912. +Test "Real part of: casinh (0x1p5000 + 1.0 i)":
  116913. +ildouble: 1
  116914. +ldouble: 1
  116915. +Test "Real part of: casinh (0x1p5000 - 1.0 i)":
  116916. +ildouble: 1
  116917. +ldouble: 1
  116918. +Test "Real part of: casinh (1.0 + +0 i)":
  116919. +double: 1
  116920. +float: 1
  116921. +idouble: 1
  116922. +ifloat: 1
  116923. +ildouble: 1
  116924. +ldouble: 1
  116925. +Test "Real part of: casinh (1.0 + 0.25 i)":
  116926. +float: 1
  116927. +ifloat: 1
  116928. +ildouble: 1
  116929. +ldouble: 1
  116930. +Test "Real part of: casinh (1.0 + 0.5 i)":
  116931. +double: 1
  116932. +idouble: 1
  116933. +ildouble: 1
  116934. +ldouble: 1
  116935. +Test "Imaginary part of: casinh (1.0 + 0.5 i)":
  116936. +ildouble: 1
  116937. +ldouble: 1
  116938. +Test "Real part of: casinh (1.0 + 0x1.fp-10 i)":
  116939. +double: 1
  116940. +idouble: 1
  116941. +Test "Imaginary part of: casinh (1.0 + 0x1.fp-10 i)":
  116942. +float: 1
  116943. +ifloat: 1
  116944. +ildouble: 1
  116945. +ldouble: 1
  116946. +Test "Real part of: casinh (1.0 + 0x1.fp-100 i)":
  116947. +double: 1
  116948. +float: 1
  116949. +idouble: 1
  116950. +ifloat: 1
  116951. +ildouble: 1
  116952. +ldouble: 1
  116953. +Test "Real part of: casinh (1.0 + 0x1.fp-1000 i)":
  116954. +double: 1
  116955. +idouble: 1
  116956. +ildouble: 1
  116957. +ldouble: 1
  116958. +Test "Real part of: casinh (1.0 + 0x1.fp-10000 i)":
  116959. +ildouble: 1
  116960. +ldouble: 1
  116961. +Test "Real part of: casinh (1.0 + 0x1.fp-1025 i)":
  116962. +double: 1
  116963. +idouble: 1
  116964. +ildouble: 1
  116965. +ldouble: 1
  116966. +Test "Real part of: casinh (1.0 + 0x1.fp-129 i)":
  116967. +double: 1
  116968. +float: 1
  116969. +idouble: 1
  116970. +ifloat: 1
  116971. +ildouble: 1
  116972. +ldouble: 1
  116973. +Test "Real part of: casinh (1.0 + 0x1.fp-16385 i)":
  116974. +ildouble: 1
  116975. +ldouble: 1
  116976. +Test "Real part of: casinh (1.0 + 0x1.fp-30 i)":
  116977. +double: 1
  116978. +float: 1
  116979. +idouble: 1
  116980. +ifloat: 1
  116981. +ildouble: 1
  116982. +ldouble: 1
  116983. +Test "Imaginary part of: casinh (1.0 + 0x1.fp-30 i)":
  116984. +ildouble: 1
  116985. +ldouble: 1
  116986. +Test "Real part of: casinh (1.0 + 0x1p500 i)":
  116987. +ildouble: 1
  116988. +ldouble: 1
  116989. +Test "Real part of: casinh (1.0 + 0x1p5000 i)":
  116990. +ildouble: 1
  116991. +ldouble: 1
  116992. +Test "Real part of: casinh (1.0 - 0 i)":
  116993. +double: 1
  116994. +float: 1
  116995. +idouble: 1
  116996. +ifloat: 1
  116997. +ildouble: 1
  116998. +ldouble: 1
  116999. +Test "Real part of: casinh (1.0 - 0.25 i)":
  117000. +float: 1
  117001. +ifloat: 1
  117002. +ildouble: 1
  117003. +ldouble: 1
  117004. +Test "Real part of: casinh (1.0 - 0.5 i)":
  117005. +double: 1
  117006. +idouble: 1
  117007. +ildouble: 1
  117008. +ldouble: 1
  117009. +Test "Imaginary part of: casinh (1.0 - 0.5 i)":
  117010. +ildouble: 1
  117011. +ldouble: 1
  117012. +Test "Real part of: casinh (1.0 - 0x1.fp-10 i)":
  117013. +double: 1
  117014. +idouble: 1
  117015. +Test "Imaginary part of: casinh (1.0 - 0x1.fp-10 i)":
  117016. +float: 1
  117017. +ifloat: 1
  117018. +ildouble: 1
  117019. +ldouble: 1
  117020. +Test "Real part of: casinh (1.0 - 0x1.fp-100 i)":
  117021. +double: 1
  117022. +float: 1
  117023. +idouble: 1
  117024. +ifloat: 1
  117025. +ildouble: 1
  117026. +ldouble: 1
  117027. +Test "Real part of: casinh (1.0 - 0x1.fp-1000 i)":
  117028. +double: 1
  117029. +idouble: 1
  117030. +ildouble: 1
  117031. +ldouble: 1
  117032. +Test "Real part of: casinh (1.0 - 0x1.fp-10000 i)":
  117033. +ildouble: 1
  117034. +ldouble: 1
  117035. +Test "Real part of: casinh (1.0 - 0x1.fp-1025 i)":
  117036. +double: 1
  117037. +idouble: 1
  117038. +ildouble: 1
  117039. +ldouble: 1
  117040. +Test "Real part of: casinh (1.0 - 0x1.fp-129 i)":
  117041. +double: 1
  117042. +float: 1
  117043. +idouble: 1
  117044. +ifloat: 1
  117045. +ildouble: 1
  117046. +ldouble: 1
  117047. +Test "Real part of: casinh (1.0 - 0x1.fp-16385 i)":
  117048. +ildouble: 1
  117049. +ldouble: 1
  117050. +Test "Real part of: casinh (1.0 - 0x1.fp-30 i)":
  117051. +double: 1
  117052. +float: 1
  117053. +idouble: 1
  117054. +ifloat: 1
  117055. +ildouble: 1
  117056. +ldouble: 1
  117057. +Test "Imaginary part of: casinh (1.0 - 0x1.fp-30 i)":
  117058. +ildouble: 1
  117059. +ldouble: 1
  117060. +Test "Real part of: casinh (1.0 - 0x1p500 i)":
  117061. +ildouble: 1
  117062. +ldouble: 1
  117063. +Test "Real part of: casinh (1.0 - 0x1p5000 i)":
  117064. +ildouble: 1
  117065. +ldouble: 1
  117066. +Test "Real part of: casinh (1.5 + +0 i)":
  117067. +double: 1
  117068. +idouble: 1
  117069. +ildouble: 1
  117070. +ldouble: 1
  117071. +Test "Real part of: casinh (1.5 + 0x1.fp-1025 i)":
  117072. +double: 1
  117073. +idouble: 1
  117074. +ildouble: 1
  117075. +ldouble: 1
  117076. +Test "Real part of: casinh (1.5 + 0x1.fp-129 i)":
  117077. +double: 1
  117078. +idouble: 1
  117079. +ildouble: 1
  117080. +ldouble: 1
  117081. +Test "Real part of: casinh (1.5 + 0x1.fp-16385 i)":
  117082. +ildouble: 1
  117083. +ldouble: 1
  117084. +Test "Real part of: casinh (1.5 - 0 i)":
  117085. +double: 1
  117086. +idouble: 1
  117087. +ildouble: 1
  117088. +ldouble: 1
  117089. +Test "Real part of: casinh (1.5 - 0x1.fp-1025 i)":
  117090. +double: 1
  117091. +idouble: 1
  117092. +ildouble: 1
  117093. +ldouble: 1
  117094. +Test "Real part of: casinh (1.5 - 0x1.fp-129 i)":
  117095. +double: 1
  117096. +idouble: 1
  117097. +ildouble: 1
  117098. +ldouble: 1
  117099. +Test "Real part of: casinh (1.5 - 0x1.fp-16385 i)":
  117100. +ildouble: 1
  117101. +ldouble: 1
  117102. +
  117103. +# catan
  117104. +Test "Imaginary part of: catan (-0x0.fffffffffffff8p0 + 0x1p-27 i)":
  117105. +double: 1
  117106. +idouble: 1
  117107. +Test "Real part of: catan (-0x0.ffffffffffffffffffffffffffff8p0 + 0x1p-16382 i)":
  117108. +ildouble: 1
  117109. +ldouble: 1
  117110. +Test "Imaginary part of: catan (-0x0.ffffffffffffffffffffffffffff8p0 + 0x1p-57 i)":
  117111. +ildouble: 1
  117112. +ldouble: 1
  117113. +Test "Real part of: catan (-0x0.ffffffffffffffffffffffffffff8p0 - 0x1p-16382 i)":
  117114. +ildouble: 1
  117115. +ldouble: 1
  117116. +Test "Real part of: catan (-0x0.ffffffp0 + 0x1p-126 i)":
  117117. +ildouble: 1
  117118. +ldouble: 1
  117119. +Test "Imaginary part of: catan (-0x0.ffffffp0 + 0x1p-13 i)":
  117120. +double: 1
  117121. +float: 1
  117122. +idouble: 1
  117123. +ifloat: 1
  117124. +ildouble: 1
  117125. +ldouble: 1
  117126. +Test "Real part of: catan (-0x0.ffffffp0 - 0x1p-126 i)":
  117127. +ildouble: 1
  117128. +ldouble: 1
  117129. +Test "Imaginary part of: catan (-0x1.0000000000000000000000000001p0 + 0x1p-16382 i)":
  117130. +ildouble: 1
  117131. +ldouble: 1
  117132. +Test "Imaginary part of: catan (-0x1.0000000000000000000000000001p0 - 0x1p-16382 i)":
  117133. +ildouble: 1
  117134. +ldouble: 1
  117135. +Test "Imaginary part of: catan (-0x1.0000000000000000000000000001p0 - 0x1p-57 i)":
  117136. +ildouble: 1
  117137. +ldouble: 1
  117138. +Test "Imaginary part of: catan (-0x1.0000000000001p0 - 0x1p-27 i)":
  117139. +double: 1
  117140. +idouble: 1
  117141. +Test "Real part of: catan (-0x1.000002p0 + 0x1p-126 i)":
  117142. +float: 1
  117143. +ifloat: 1
  117144. +ildouble: 1
  117145. +ldouble: 1
  117146. +Test "Real part of: catan (-0x1.000002p0 + 0x1p-13 i)":
  117147. +float: 1
  117148. +ifloat: 1
  117149. +Test "Real part of: catan (-0x1.000002p0 - 0x1p-126 i)":
  117150. +float: 1
  117151. +ifloat: 1
  117152. +ildouble: 1
  117153. +ldouble: 1
  117154. +Test "Real part of: catan (-0x1.000002p0 - 0x1p-13 i)":
  117155. +float: 1
  117156. +ifloat: 1
  117157. +Test "Imaginary part of: catan (-0x1.000002p0 - 0x1p-13 i)":
  117158. +double: 1
  117159. +idouble: 1
  117160. +Test "Imaginary part of: catan (-0x1.fp1023 + 0x1.fp1023 i)":
  117161. +double: 1
  117162. +idouble: 1
  117163. +Test "Imaginary part of: catan (-0x1.fp1023 - 0x1.fp1023 i)":
  117164. +double: 1
  117165. +idouble: 1
  117166. +Test "Imaginary part of: catan (-0x1.fp127 + 0x1.fp127 i)":
  117167. +double: 1
  117168. +idouble: 1
  117169. +Test "Imaginary part of: catan (-0x1.fp127 - 0x1.fp127 i)":
  117170. +double: 1
  117171. +idouble: 1
  117172. +Test "Imaginary part of: catan (-0x1.fp16383 + 0x1.fp16383 i)":
  117173. +ildouble: 1
  117174. +ldouble: 1
  117175. +Test "Imaginary part of: catan (-0x1.fp16383 - 0x1.fp16383 i)":
  117176. +ildouble: 1
  117177. +ldouble: 1
  117178. +Test "Imaginary part of: catan (-0x1p-1020 + 1.0 i)":
  117179. +double: 1
  117180. +idouble: 1
  117181. +Test "Imaginary part of: catan (-0x1p-1020 - 1.0 i)":
  117182. +double: 1
  117183. +idouble: 1
  117184. +Test "Real part of: catan (-0x1p-13 + 0x1.000002p0 i)":
  117185. +float: 1
  117186. +ifloat: 1
  117187. +Test "Real part of: catan (-0x1p-13 + 1.0 i)":
  117188. +float: 1
  117189. +ifloat: 1
  117190. +Test "Real part of: catan (-0x1p-13 - 0x1.000002p0 i)":
  117191. +float: 1
  117192. +ifloat: 1
  117193. +Test "Imaginary part of: catan (-0x1p-13 - 0x1.000002p0 i)":
  117194. +float: 1
  117195. +ifloat: 1
  117196. +Test "Real part of: catan (-0x1p-13 - 1.0 i)":
  117197. +float: 1
  117198. +ifloat: 1
  117199. +Test "Imaginary part of: catan (-0x1p-16380 + 1.0 i)":
  117200. +ildouble: 1
  117201. +ldouble: 1
  117202. +Test "Imaginary part of: catan (-0x1p-16380 - 1.0 i)":
  117203. +ildouble: 1
  117204. +ldouble: 1
  117205. +Test "Real part of: catan (-0x1p-33 + 0x0.ffffffffffffffffp0 i)":
  117206. +ildouble: 1
  117207. +ldouble: 1
  117208. +Test "Real part of: catan (-0x1p-33 + 0x1.0000000000000002p0 i)":
  117209. +ildouble: 1
  117210. +ldouble: 1
  117211. +Test "Real part of: catan (-0x1p-33 - 0x0.ffffffffffffffffp0 i)":
  117212. +ildouble: 1
  117213. +ldouble: 1
  117214. +Test "Real part of: catan (-0x1p-33 - 0x1.0000000000000002p0 i)":
  117215. +ildouble: 1
  117216. +ldouble: 1
  117217. +Test "Imaginary part of: catan (-0x1p-54 + 1.0 i)":
  117218. +float: 1
  117219. +ifloat: 1
  117220. +Test "Imaginary part of: catan (-0x1p-54 - 1.0 i)":
  117221. +float: 1
  117222. +ifloat: 1
  117223. +Test "Imaginary part of: catan (-0x1p-57 + 1.0 i)":
  117224. +float: 1
  117225. +ifloat: 1
  117226. +Test "Imaginary part of: catan (-0x1p-57 - 1.0 i)":
  117227. +float: 1
  117228. +ifloat: 1
  117229. +Test "Real part of: catan (-1.0 + 0x1p-13 i)":
  117230. +float: 1
  117231. +ifloat: 1
  117232. +ildouble: 1
  117233. +ldouble: 1
  117234. +Test "Real part of: catan (-1.0 - 0x1p-13 i)":
  117235. +float: 1
  117236. +ifloat: 1
  117237. +ildouble: 1
  117238. +ldouble: 1
  117239. +Test "Imaginary part of: catan (-2 - 3 i)":
  117240. +double: 1
  117241. +float: 1
  117242. +idouble: 1
  117243. +ifloat: 1
  117244. +Test "Imaginary part of: catan (0.75 + 1.25 i)":
  117245. +ildouble: 1
  117246. +ldouble: 1
  117247. +Test "Imaginary part of: catan (0x0.fffffffffffff8p0 + 0x1p-27 i)":
  117248. +double: 1
  117249. +idouble: 1
  117250. +Test "Real part of: catan (0x0.ffffffffffffffffffffffffffff8p0 + 0x1p-16382 i)":
  117251. +ildouble: 1
  117252. +ldouble: 1
  117253. +Test "Imaginary part of: catan (0x0.ffffffffffffffffffffffffffff8p0 + 0x1p-57 i)":
  117254. +ildouble: 1
  117255. +ldouble: 1
  117256. +Test "Real part of: catan (0x0.ffffffffffffffffffffffffffff8p0 - 0x1p-16382 i)":
  117257. +ildouble: 1
  117258. +ldouble: 1
  117259. +Test "Real part of: catan (0x0.ffffffp0 + 0x1p-126 i)":
  117260. +ildouble: 1
  117261. +ldouble: 1
  117262. +Test "Imaginary part of: catan (0x0.ffffffp0 + 0x1p-13 i)":
  117263. +double: 1
  117264. +float: 1
  117265. +idouble: 1
  117266. +ifloat: 1
  117267. +ildouble: 1
  117268. +ldouble: 1
  117269. +Test "Real part of: catan (0x0.ffffffp0 - 0x1p-126 i)":
  117270. +ildouble: 1
  117271. +ldouble: 1
  117272. +Test "Imaginary part of: catan (0x1.0000000000000000000000000001p0 + 0x1p-16382 i)":
  117273. +ildouble: 1
  117274. +ldouble: 1
  117275. +Test "Imaginary part of: catan (0x1.0000000000000000000000000001p0 - 0x1p-16382 i)":
  117276. +ildouble: 1
  117277. +ldouble: 1
  117278. +Test "Imaginary part of: catan (0x1.0000000000000000000000000001p0 - 0x1p-57 i)":
  117279. +ildouble: 1
  117280. +ldouble: 1
  117281. +Test "Imaginary part of: catan (0x1.0000000000001p0 - 0x1p-27 i)":
  117282. +double: 1
  117283. +idouble: 1
  117284. +Test "Real part of: catan (0x1.000002p0 + 0x1p-126 i)":
  117285. +float: 1
  117286. +ifloat: 1
  117287. +ildouble: 1
  117288. +ldouble: 1
  117289. +Test "Real part of: catan (0x1.000002p0 + 0x1p-13 i)":
  117290. +float: 1
  117291. +ifloat: 1
  117292. +Test "Real part of: catan (0x1.000002p0 - 0x1p-126 i)":
  117293. +float: 1
  117294. +ifloat: 1
  117295. +ildouble: 1
  117296. +ldouble: 1
  117297. +Test "Real part of: catan (0x1.000002p0 - 0x1p-13 i)":
  117298. +float: 1
  117299. +ifloat: 1
  117300. +Test "Imaginary part of: catan (0x1.000002p0 - 0x1p-13 i)":
  117301. +double: 1
  117302. +idouble: 1
  117303. +Test "Imaginary part of: catan (0x1.fp1023 + 0x1.fp1023 i)":
  117304. +double: 1
  117305. +idouble: 1
  117306. +Test "Imaginary part of: catan (0x1.fp1023 - 0x1.fp1023 i)":
  117307. +double: 1
  117308. +idouble: 1
  117309. +Test "Imaginary part of: catan (0x1.fp127 + 0x1.fp127 i)":
  117310. +double: 1
  117311. +idouble: 1
  117312. +Test "Imaginary part of: catan (0x1.fp127 - 0x1.fp127 i)":
  117313. +double: 1
  117314. +idouble: 1
  117315. +Test "Imaginary part of: catan (0x1.fp16383 + 0x1.fp16383 i)":
  117316. +ildouble: 1
  117317. +ldouble: 1
  117318. +Test "Imaginary part of: catan (0x1.fp16383 - 0x1.fp16383 i)":
  117319. +ildouble: 1
  117320. +ldouble: 1
  117321. +Test "Imaginary part of: catan (0x1p-1020 + 1.0 i)":
  117322. +double: 1
  117323. +idouble: 1
  117324. +Test "Imaginary part of: catan (0x1p-1020 - 1.0 i)":
  117325. +double: 1
  117326. +idouble: 1
  117327. +Test "Real part of: catan (0x1p-13 + 0x1.000002p0 i)":
  117328. +float: 1
  117329. +ifloat: 1
  117330. +Test "Real part of: catan (0x1p-13 + 1.0 i)":
  117331. +float: 1
  117332. +ifloat: 1
  117333. +Test "Real part of: catan (0x1p-13 - 0x1.000002p0 i)":
  117334. +float: 1
  117335. +ifloat: 1
  117336. +Test "Imaginary part of: catan (0x1p-13 - 0x1.000002p0 i)":
  117337. +float: 1
  117338. +ifloat: 1
  117339. +Test "Real part of: catan (0x1p-13 - 1.0 i)":
  117340. +float: 1
  117341. +ifloat: 1
  117342. +Test "Imaginary part of: catan (0x1p-16380 + 1.0 i)":
  117343. +ildouble: 1
  117344. +ldouble: 1
  117345. +Test "Imaginary part of: catan (0x1p-16380 - 1.0 i)":
  117346. +ildouble: 1
  117347. +ldouble: 1
  117348. +Test "Real part of: catan (0x1p-33 + 0x0.ffffffffffffffffp0 i)":
  117349. +ildouble: 1
  117350. +ldouble: 1
  117351. +Test "Real part of: catan (0x1p-33 + 0x1.0000000000000002p0 i)":
  117352. +ildouble: 1
  117353. +ldouble: 1
  117354. +Test "Real part of: catan (0x1p-33 - 0x0.ffffffffffffffffp0 i)":
  117355. +ildouble: 1
  117356. +ldouble: 1
  117357. +Test "Real part of: catan (0x1p-33 - 0x1.0000000000000002p0 i)":
  117358. +ildouble: 1
  117359. +ldouble: 1
  117360. +Test "Imaginary part of: catan (0x1p-54 + 1.0 i)":
  117361. +float: 1
  117362. +ifloat: 1
  117363. +Test "Imaginary part of: catan (0x1p-54 - 1.0 i)":
  117364. +float: 1
  117365. +ifloat: 1
  117366. +Test "Imaginary part of: catan (0x1p-57 + 1.0 i)":
  117367. +float: 1
  117368. +ifloat: 1
  117369. +Test "Imaginary part of: catan (0x1p-57 - 1.0 i)":
  117370. +float: 1
  117371. +ifloat: 1
  117372. +Test "Real part of: catan (1.0 + 0x1p-13 i)":
  117373. +float: 1
  117374. +ifloat: 1
  117375. +ildouble: 1
  117376. +ldouble: 1
  117377. +Test "Real part of: catan (1.0 - 0x1p-13 i)":
  117378. +float: 1
  117379. +ifloat: 1
  117380. +ildouble: 1
  117381. +ldouble: 1
  117382. +
  117383. +# catanh
  117384. +Test "Imaginary part of: catanh (-0x0.ffffffffffffffffp0 + 0x1p-33 i)":
  117385. +ildouble: 1
  117386. +ldouble: 1
  117387. +Test "Imaginary part of: catanh (-0x0.ffffffffffffffffp0 - 0x1p-33 i)":
  117388. +ildouble: 1
  117389. +ldouble: 1
  117390. +Test "Imaginary part of: catanh (-0x1.0000000000000002p0 + 0x1p-33 i)":
  117391. +ildouble: 1
  117392. +ldouble: 1
  117393. +Test "Imaginary part of: catanh (-0x1.0000000000000002p0 - 0x1p-33 i)":
  117394. +ildouble: 1
  117395. +ldouble: 1
  117396. +Test "Real part of: catanh (-0x1.000002p0 + 0x1p-13 i)":
  117397. +float: 1
  117398. +ifloat: 1
  117399. +Test "Imaginary part of: catanh (-0x1.000002p0 + 0x1p-13 i)":
  117400. +float: 1
  117401. +ifloat: 1
  117402. +Test "Real part of: catanh (-0x1.000002p0 - 0x1p-13 i)":
  117403. +float: 1
  117404. +ifloat: 1
  117405. +Test "Imaginary part of: catanh (-0x1.000002p0 - 0x1p-13 i)":
  117406. +float: 1
  117407. +ifloat: 1
  117408. +Test "Real part of: catanh (-0x1.fp1023 + 0x1.fp1023 i)":
  117409. +double: 1
  117410. +idouble: 1
  117411. +Test "Real part of: catanh (-0x1.fp1023 - 0x1.fp1023 i)":
  117412. +double: 1
  117413. +idouble: 1
  117414. +Test "Real part of: catanh (-0x1.fp127 + 0x1.fp127 i)":
  117415. +double: 1
  117416. +idouble: 1
  117417. +Test "Real part of: catanh (-0x1.fp127 - 0x1.fp127 i)":
  117418. +double: 1
  117419. +idouble: 1
  117420. +Test "Real part of: catanh (-0x1.fp16383 + 0x1.fp16383 i)":
  117421. +ildouble: 1
  117422. +ldouble: 1
  117423. +Test "Real part of: catanh (-0x1.fp16383 - 0x1.fp16383 i)":
  117424. +ildouble: 1
  117425. +ldouble: 1
  117426. +Test "Imaginary part of: catanh (-0x1p-126 + 0x0.ffffffp0 i)":
  117427. +ildouble: 1
  117428. +ldouble: 1
  117429. +Test "Imaginary part of: catanh (-0x1p-126 + 0x1.000002p0 i)":
  117430. +float: 1
  117431. +ifloat: 1
  117432. +ildouble: 1
  117433. +ldouble: 1
  117434. +Test "Imaginary part of: catanh (-0x1p-126 - 0x0.ffffffp0 i)":
  117435. +ildouble: 1
  117436. +ldouble: 1
  117437. +Test "Imaginary part of: catanh (-0x1p-126 - 0x1.000002p0 i)":
  117438. +float: 1
  117439. +ifloat: 1
  117440. +ildouble: 1
  117441. +ldouble: 1
  117442. +Test "Real part of: catanh (-0x1p-13 + 0x1.000002p0 i)":
  117443. +double: 1
  117444. +idouble: 1
  117445. +Test "Imaginary part of: catanh (-0x1p-13 + 0x1.000002p0 i)":
  117446. +float: 1
  117447. +ifloat: 1
  117448. +Test "Imaginary part of: catanh (-0x1p-13 + 1.0 i)":
  117449. +float: 1
  117450. +ifloat: 1
  117451. +ildouble: 1
  117452. +ldouble: 1
  117453. +Test "Real part of: catanh (-0x1p-13 - 0x1.000002p0 i)":
  117454. +double: 1
  117455. +idouble: 1
  117456. +Test "Imaginary part of: catanh (-0x1p-13 - 0x1.000002p0 i)":
  117457. +float: 1
  117458. +ifloat: 1
  117459. +Test "Imaginary part of: catanh (-0x1p-13 - 1.0 i)":
  117460. +float: 1
  117461. +ifloat: 1
  117462. +ildouble: 1
  117463. +ldouble: 1
  117464. +Test "Imaginary part of: catanh (-0x1p-16382 + 0x0.ffffffffffffffffffffffffffff8p0 i)":
  117465. +ildouble: 1
  117466. +ldouble: 1
  117467. +Test "Real part of: catanh (-0x1p-16382 + 0x1.0000000000000000000000000001p0 i)":
  117468. +ildouble: 1
  117469. +ldouble: 1
  117470. +Test "Imaginary part of: catanh (-0x1p-16382 - 0x0.ffffffffffffffffffffffffffff8p0 i)":
  117471. +ildouble: 1
  117472. +ldouble: 1
  117473. +Test "Real part of: catanh (-0x1p-16382 - 0x1.0000000000000000000000000001p0 i)":
  117474. +ildouble: 1
  117475. +ldouble: 1
  117476. +Test "Real part of: catanh (-0x1p-27 + 0x1.0000000000001p0 i)":
  117477. +double: 1
  117478. +idouble: 1
  117479. +Test "Real part of: catanh (-0x1p-27 - 0x1.0000000000001p0 i)":
  117480. +double: 1
  117481. +idouble: 1
  117482. +Test "Real part of: catanh (-0x1p-57 + 0x1.0000000000000000000000000001p0 i)":
  117483. +ildouble: 1
  117484. +ldouble: 1
  117485. +Test "Real part of: catanh (-0x1p-57 - 0x1.0000000000000000000000000001p0 i)":
  117486. +ildouble: 1
  117487. +ldouble: 1
  117488. +Test "Real part of: catanh (-1.0 + 0x1p-1020 i)":
  117489. +double: 1
  117490. +idouble: 1
  117491. +Test "Imaginary part of: catanh (-1.0 + 0x1p-13 i)":
  117492. +float: 1
  117493. +ifloat: 1
  117494. +Test "Real part of: catanh (-1.0 + 0x1p-16380 i)":
  117495. +ildouble: 1
  117496. +ldouble: 1
  117497. +Test "Real part of: catanh (-1.0 + 0x1p-54 i)":
  117498. +float: 1
  117499. +ifloat: 1
  117500. +Test "Real part of: catanh (-1.0 + 0x1p-57 i)":
  117501. +float: 1
  117502. +ifloat: 1
  117503. +Test "Real part of: catanh (-1.0 - 0x1p-1020 i)":
  117504. +double: 1
  117505. +idouble: 1
  117506. +Test "Imaginary part of: catanh (-1.0 - 0x1p-13 i)":
  117507. +float: 1
  117508. +ifloat: 1
  117509. +Test "Real part of: catanh (-1.0 - 0x1p-16380 i)":
  117510. +ildouble: 1
  117511. +ldouble: 1
  117512. +Test "Real part of: catanh (-1.0 - 0x1p-54 i)":
  117513. +float: 1
  117514. +ifloat: 1
  117515. +Test "Real part of: catanh (-1.0 - 0x1p-57 i)":
  117516. +float: 1
  117517. +ifloat: 1
  117518. +Test "Real part of: catanh (-2 - 3 i)":
  117519. +double: 1
  117520. +idouble: 1
  117521. +ildouble: 1
  117522. +ldouble: 1
  117523. +Test "Real part of: catanh (0.75 + 1.25 i)":
  117524. +ildouble: 1
  117525. +ldouble: 1
  117526. +Test "Imaginary part of: catanh (0.75 + 1.25 i)":
  117527. +ildouble: 1
  117528. +ldouble: 1
  117529. +Test "Imaginary part of: catanh (0x0.ffffffffffffffffp0 + 0x1p-33 i)":
  117530. +ildouble: 1
  117531. +ldouble: 1
  117532. +Test "Imaginary part of: catanh (0x0.ffffffffffffffffp0 - 0x1p-33 i)":
  117533. +ildouble: 1
  117534. +ldouble: 1
  117535. +Test "Imaginary part of: catanh (0x1.0000000000000002p0 + 0x1p-33 i)":
  117536. +ildouble: 1
  117537. +ldouble: 1
  117538. +Test "Imaginary part of: catanh (0x1.0000000000000002p0 - 0x1p-33 i)":
  117539. +ildouble: 1
  117540. +ldouble: 1
  117541. +Test "Imaginary part of: catanh (0x1.000002p0 + 0x1p-13 i)":
  117542. +float: 1
  117543. +ifloat: 1
  117544. +Test "Imaginary part of: catanh (0x1.000002p0 - 0x1p-13 i)":
  117545. +float: 1
  117546. +ifloat: 1
  117547. +Test "Real part of: catanh (0x1.fp1023 + 0x1.fp1023 i)":
  117548. +double: 1
  117549. +idouble: 1
  117550. +Test "Real part of: catanh (0x1.fp1023 - 0x1.fp1023 i)":
  117551. +double: 1
  117552. +idouble: 1
  117553. +Test "Real part of: catanh (0x1.fp127 + 0x1.fp127 i)":
  117554. +double: 1
  117555. +idouble: 1
  117556. +Test "Real part of: catanh (0x1.fp127 - 0x1.fp127 i)":
  117557. +double: 1
  117558. +idouble: 1
  117559. +Test "Real part of: catanh (0x1.fp16383 + 0x1.fp16383 i)":
  117560. +ildouble: 1
  117561. +ldouble: 1
  117562. +Test "Real part of: catanh (0x1.fp16383 - 0x1.fp16383 i)":
  117563. +ildouble: 1
  117564. +ldouble: 1
  117565. +Test "Imaginary part of: catanh (0x1p-126 + 0x0.ffffffp0 i)":
  117566. +ildouble: 1
  117567. +ldouble: 1
  117568. +Test "Imaginary part of: catanh (0x1p-126 + 0x1.000002p0 i)":
  117569. +float: 1
  117570. +ifloat: 1
  117571. +ildouble: 1
  117572. +ldouble: 1
  117573. +Test "Imaginary part of: catanh (0x1p-126 - 0x0.ffffffp0 i)":
  117574. +ildouble: 1
  117575. +ldouble: 1
  117576. +Test "Imaginary part of: catanh (0x1p-126 - 0x1.000002p0 i)":
  117577. +float: 1
  117578. +ifloat: 1
  117579. +ildouble: 1
  117580. +ldouble: 1
  117581. +Test "Real part of: catanh (0x1p-13 + 0x0.ffffffp0 i)":
  117582. +double: 1
  117583. +float: 1
  117584. +idouble: 1
  117585. +ifloat: 1
  117586. +ildouble: 1
  117587. +ldouble: 1
  117588. +Test "Imaginary part of: catanh (0x1p-13 + 0x1.000002p0 i)":
  117589. +float: 1
  117590. +ifloat: 1
  117591. +Test "Imaginary part of: catanh (0x1p-13 + 1.0 i)":
  117592. +float: 1
  117593. +ifloat: 1
  117594. +ildouble: 1
  117595. +ldouble: 1
  117596. +Test "Real part of: catanh (0x1p-13 - 0x0.ffffffp0 i)":
  117597. +double: 1
  117598. +float: 1
  117599. +idouble: 1
  117600. +ifloat: 1
  117601. +ildouble: 1
  117602. +ldouble: 1
  117603. +Test "Imaginary part of: catanh (0x1p-13 - 0x1.000002p0 i)":
  117604. +float: 1
  117605. +ifloat: 1
  117606. +Test "Imaginary part of: catanh (0x1p-13 - 1.0 i)":
  117607. +float: 1
  117608. +ifloat: 1
  117609. +ildouble: 1
  117610. +ldouble: 1
  117611. +Test "Imaginary part of: catanh (0x1p-16382 + 0x0.ffffffffffffffffffffffffffff8p0 i)":
  117612. +ildouble: 1
  117613. +ldouble: 1
  117614. +Test "Real part of: catanh (0x1p-16382 + 0x1.0000000000000000000000000001p0 i)":
  117615. +ildouble: 1
  117616. +ldouble: 1
  117617. +Test "Imaginary part of: catanh (0x1p-16382 - 0x0.ffffffffffffffffffffffffffff8p0 i)":
  117618. +ildouble: 1
  117619. +ldouble: 1
  117620. +Test "Real part of: catanh (0x1p-16382 - 0x1.0000000000000000000000000001p0 i)":
  117621. +ildouble: 1
  117622. +ldouble: 1
  117623. +Test "Real part of: catanh (0x1p-27 + 0x0.fffffffffffff8p0 i)":
  117624. +double: 1
  117625. +idouble: 1
  117626. +Test "Real part of: catanh (0x1p-27 - 0x0.fffffffffffff8p0 i)":
  117627. +double: 1
  117628. +idouble: 1
  117629. +Test "Real part of: catanh (0x1p-57 + 0x0.ffffffffffffffffffffffffffff8p0 i)":
  117630. +ildouble: 1
  117631. +ldouble: 1
  117632. +Test "Real part of: catanh (0x1p-57 - 0x0.ffffffffffffffffffffffffffff8p0 i)":
  117633. +ildouble: 1
  117634. +ldouble: 1
  117635. +Test "Real part of: catanh (1.0 + 0x1p-1020 i)":
  117636. +double: 1
  117637. +idouble: 1
  117638. +Test "Imaginary part of: catanh (1.0 + 0x1p-13 i)":
  117639. +float: 1
  117640. +ifloat: 1
  117641. +Test "Real part of: catanh (1.0 + 0x1p-16380 i)":
  117642. +ildouble: 1
  117643. +ldouble: 1
  117644. +Test "Real part of: catanh (1.0 + 0x1p-54 i)":
  117645. +float: 1
  117646. +ifloat: 1
  117647. +Test "Real part of: catanh (1.0 + 0x1p-57 i)":
  117648. +float: 1
  117649. +ifloat: 1
  117650. +Test "Real part of: catanh (1.0 - 0x1p-1020 i)":
  117651. +double: 1
  117652. +idouble: 1
  117653. +Test "Imaginary part of: catanh (1.0 - 0x1p-13 i)":
  117654. +float: 1
  117655. +ifloat: 1
  117656. +Test "Real part of: catanh (1.0 - 0x1p-16380 i)":
  117657. +ildouble: 1
  117658. +ldouble: 1
  117659. +Test "Real part of: catanh (1.0 - 0x1p-54 i)":
  117660. +float: 1
  117661. +ifloat: 1
  117662. +Test "Real part of: catanh (1.0 - 0x1p-57 i)":
  117663. +float: 1
  117664. +ifloat: 1
  117665. +
  117666. +# cbrt
  117667. +Test "cbrt (-0.001)":
  117668. +ildouble: 1
  117669. +ldouble: 1
  117670. +Test "cbrt (-27.0)":
  117671. +double: 1
  117672. +idouble: 1
  117673. +Test "cbrt (0.75)":
  117674. +double: 1
  117675. +idouble: 1
  117676. +Test "cbrt (0.9921875)":
  117677. +double: 1
  117678. +idouble: 1
  117679. +
  117680. +# ccos
  117681. +Test "Imaginary part of: ccos (-0.75 + 11357.25 i)":
  117682. +ildouble: 1
  117683. +ldouble: 1
  117684. +Test "Imaginary part of: ccos (-0.75 + 710.5 i)":
  117685. +double: 1
  117686. +idouble: 1
  117687. +ildouble: 1
  117688. +ldouble: 1
  117689. +Test "Real part of: ccos (-0.75 + 89.5 i)":
  117690. +ildouble: 1
  117691. +ldouble: 1
  117692. +Test "Imaginary part of: ccos (-0.75 + 89.5 i)":
  117693. +float: 1
  117694. +ifloat: 1
  117695. +ildouble: 1
  117696. +ldouble: 1
  117697. +Test "Imaginary part of: ccos (-0.75 - 11357.25 i)":
  117698. +ildouble: 1
  117699. +ldouble: 1
  117700. +Test "Imaginary part of: ccos (-0.75 - 710.5 i)":
  117701. +double: 1
  117702. +idouble: 1
  117703. +ildouble: 1
  117704. +ldouble: 1
  117705. +Test "Real part of: ccos (-0.75 - 89.5 i)":
  117706. +ildouble: 1
  117707. +ldouble: 1
  117708. +Test "Imaginary part of: ccos (-0.75 - 89.5 i)":
  117709. +float: 1
  117710. +ifloat: 1
  117711. +ildouble: 1
  117712. +ldouble: 1
  117713. +Test "Real part of: ccos (-2 - 3 i)":
  117714. +ildouble: 1
  117715. +ldouble: 1
  117716. +Test "Imaginary part of: ccos (-2 - 3 i)":
  117717. +float: 1
  117718. +ifloat: 1
  117719. +ildouble: 1
  117720. +ldouble: 1
  117721. +Test "Real part of: ccos (0.75 + 1.25 i)":
  117722. +double: 1
  117723. +float: 1
  117724. +idouble: 1
  117725. +ifloat: 1
  117726. +Test "Imaginary part of: ccos (0.75 + 1.25 i)":
  117727. +float: 1
  117728. +ifloat: 1
  117729. +Test "Imaginary part of: ccos (0.75 + 11357.25 i)":
  117730. +ildouble: 1
  117731. +ldouble: 1
  117732. +Test "Imaginary part of: ccos (0.75 + 710.5 i)":
  117733. +double: 1
  117734. +idouble: 1
  117735. +ildouble: 1
  117736. +ldouble: 1
  117737. +Test "Real part of: ccos (0.75 + 89.5 i)":
  117738. +ildouble: 1
  117739. +ldouble: 1
  117740. +Test "Imaginary part of: ccos (0.75 + 89.5 i)":
  117741. +float: 1
  117742. +ifloat: 1
  117743. +ildouble: 1
  117744. +ldouble: 1
  117745. +Test "Imaginary part of: ccos (0.75 - 11357.25 i)":
  117746. +ildouble: 1
  117747. +ldouble: 1
  117748. +Test "Imaginary part of: ccos (0.75 - 710.5 i)":
  117749. +double: 1
  117750. +idouble: 1
  117751. +ildouble: 1
  117752. +ldouble: 1
  117753. +Test "Real part of: ccos (0.75 - 89.5 i)":
  117754. +ildouble: 1
  117755. +ldouble: 1
  117756. +Test "Imaginary part of: ccos (0.75 - 89.5 i)":
  117757. +float: 1
  117758. +ifloat: 1
  117759. +ildouble: 1
  117760. +ldouble: 1
  117761. +Test "Imaginary part of: ccos (0x1p-1074 + 1440 i)":
  117762. +double: 1
  117763. +idouble: 1
  117764. +Test "Imaginary part of: ccos (0x1p-16434 + 22730 i)":
  117765. +ildouble: 1
  117766. +ldouble: 1
  117767. +
  117768. +# ccosh
  117769. +Test "Imaginary part of: ccosh (-11357.25 + 0.75 i)":
  117770. +ildouble: 1
  117771. +ldouble: 1
  117772. +Test "Imaginary part of: ccosh (-11357.25 - 0.75 i)":
  117773. +ildouble: 1
  117774. +ldouble: 1
  117775. +Test "Real part of: ccosh (-2 - 3 i)":
  117776. +float: 1
  117777. +ifloat: 1
  117778. +ildouble: 1
  117779. +ldouble: 1
  117780. +Test "Imaginary part of: ccosh (-2 - 3 i)":
  117781. +float: 1
  117782. +ifloat: 1
  117783. +ildouble: 1
  117784. +ldouble: 1
  117785. +Test "Imaginary part of: ccosh (-710.5 + 0.75 i)":
  117786. +double: 1
  117787. +idouble: 1
  117788. +ildouble: 1
  117789. +ldouble: 1
  117790. +Test "Imaginary part of: ccosh (-710.5 - 0.75 i)":
  117791. +double: 1
  117792. +idouble: 1
  117793. +ildouble: 1
  117794. +ldouble: 1
  117795. +Test "Real part of: ccosh (-89.5 + 0.75 i)":
  117796. +ildouble: 1
  117797. +ldouble: 1
  117798. +Test "Imaginary part of: ccosh (-89.5 + 0.75 i)":
  117799. +float: 1
  117800. +ifloat: 1
  117801. +ildouble: 1
  117802. +ldouble: 1
  117803. +Test "Real part of: ccosh (-89.5 - 0.75 i)":
  117804. +ildouble: 1
  117805. +ldouble: 1
  117806. +Test "Imaginary part of: ccosh (-89.5 - 0.75 i)":
  117807. +float: 1
  117808. +ifloat: 1
  117809. +ildouble: 1
  117810. +ldouble: 1
  117811. +Test "Real part of: ccosh (0.75 + 1.25 i)":
  117812. +double: 1
  117813. +float: 1
  117814. +idouble: 1
  117815. +ifloat: 1
  117816. +Test "Imaginary part of: ccosh (0.75 + 1.25 i)":
  117817. +float: 1
  117818. +ifloat: 1
  117819. +Test "Imaginary part of: ccosh (11357.25 + 0.75 i)":
  117820. +ildouble: 1
  117821. +ldouble: 1
  117822. +Test "Imaginary part of: ccosh (11357.25 - 0.75 i)":
  117823. +ildouble: 1
  117824. +ldouble: 1
  117825. +Test "Imaginary part of: ccosh (1440 + 0x1p-1074 i)":
  117826. +double: 1
  117827. +idouble: 1
  117828. +Test "Imaginary part of: ccosh (22730 + 0x1p-16434 i)":
  117829. +ildouble: 1
  117830. +ldouble: 1
  117831. +Test "Imaginary part of: ccosh (710.5 + 0.75 i)":
  117832. +double: 1
  117833. +idouble: 1
  117834. +ildouble: 1
  117835. +ldouble: 1
  117836. +Test "Imaginary part of: ccosh (710.5 - 0.75 i)":
  117837. +double: 1
  117838. +idouble: 1
  117839. +ildouble: 1
  117840. +ldouble: 1
  117841. +Test "Real part of: ccosh (89.5 + 0.75 i)":
  117842. +ildouble: 1
  117843. +ldouble: 1
  117844. +Test "Imaginary part of: ccosh (89.5 + 0.75 i)":
  117845. +float: 1
  117846. +ifloat: 1
  117847. +ildouble: 1
  117848. +ldouble: 1
  117849. +Test "Real part of: ccosh (89.5 - 0.75 i)":
  117850. +ildouble: 1
  117851. +ldouble: 1
  117852. +Test "Imaginary part of: ccosh (89.5 - 0.75 i)":
  117853. +float: 1
  117854. +ifloat: 1
  117855. +ildouble: 1
  117856. +ldouble: 1
  117857. +
  117858. +# cexp
  117859. +Test "Imaginary part of: cexp (-10000 + 0x1p16383 i)":
  117860. +ildouble: 1
  117861. +ldouble: 1
  117862. +Test "Real part of: cexp (-2.0 - 3.0 i)":
  117863. +ildouble: 1
  117864. +ldouble: 1
  117865. +Test "Imaginary part of: cexp (-2.0 - 3.0 i)":
  117866. +float: 1
  117867. +ifloat: 1
  117868. +ildouble: 1
  117869. +ldouble: 1
  117870. +Test "Imaginary part of: cexp (-720 + 0.75 i)":
  117871. +ildouble: 1
  117872. +ldouble: 1
  117873. +Test "Imaginary part of: cexp (-95 + 0.75 i)":
  117874. +double: 1
  117875. +idouble: 1
  117876. +Test "Real part of: cexp (0.75 + 1.25 i)":
  117877. +float: 1
  117878. +ifloat: 1
  117879. +Test "Imaginary part of: cexp (0.75 + 1.25 i)":
  117880. +ildouble: 1
  117881. +ldouble: 1
  117882. +Test "Imaginary part of: cexp (1440 + 0x1p-1074 i)":
  117883. +double: 1
  117884. +idouble: 1
  117885. +Test "Imaginary part of: cexp (22730 + 0x1p-16434 i)":
  117886. +ildouble: 1
  117887. +ldouble: 1
  117888. +Test "Real part of: cexp (50 + 0x1p127 i)":
  117889. +double: 2
  117890. +float: 1
  117891. +idouble: 2
  117892. +ifloat: 1
  117893. +ildouble: 1
  117894. +ldouble: 1
  117895. +Test "Imaginary part of: cexp (50 + 0x1p127 i)":
  117896. +double: 1
  117897. +idouble: 1
  117898. +Test "Real part of: cexp (500 + 0x1p1023 i)":
  117899. +double: 1
  117900. +idouble: 1
  117901. +Test "Real part of: cexp (709.8125 + 0.75 i)":
  117902. +double: 1
  117903. +idouble: 1
  117904. +Test "Imaginary part of: cexp (709.8125 + 0.75 i)":
  117905. +double: 1
  117906. +idouble: 1
  117907. +ildouble: 1
  117908. +ldouble: 1
  117909. +Test "Real part of: cexp (88.75 + 0.75 i)":
  117910. +float: 1
  117911. +ifloat: 1
  117912. +ildouble: 1
  117913. +ldouble: 1
  117914. +Test "Imaginary part of: cexp (88.75 + 0.75 i)":
  117915. +float: 2
  117916. +ifloat: 2
  117917. +ildouble: 1
  117918. +ldouble: 1
  117919. +
  117920. +# clog
  117921. +Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-1000 i)":
  117922. +double: 1
  117923. +idouble: 1
  117924. +Test "Real part of: clog (-0x1.0000000123456p0 + 0x1.2345678p-30 i)":
  117925. +double: 1
  117926. +idouble: 1
  117927. +Test "Imaginary part of: clog (-0x1.234566p-40 - 1.0 i)":
  117928. +float: 1
  117929. +ifloat: 1
  117930. +Test "Real part of: clog (-0x1.fp+127 + 0x1p-149 i)":
  117931. +float: 1
  117932. +ifloat: 1
  117933. +Test "Real part of: clog (-0x1.fp+127 - 0x1p-149 i)":
  117934. +float: 1
  117935. +ifloat: 1
  117936. +Test "Real part of: clog (-0x1.fp+16383 + 0x1p-16445 i)":
  117937. +ildouble: 1
  117938. +ldouble: 1
  117939. +Test "Real part of: clog (-0x1.fp+16383 + 0x1p-16494 i)":
  117940. +ildouble: 1
  117941. +ldouble: 1
  117942. +Test "Real part of: clog (-0x1.fp+16383 - 0x1p-16445 i)":
  117943. +ildouble: 1
  117944. +ldouble: 1
  117945. +Test "Real part of: clog (-0x1.fp+16383 - 0x1p-16494 i)":
  117946. +ildouble: 1
  117947. +ldouble: 1
  117948. +Test "Real part of: clog (-0x1p-149 + 0x1.fp+127 i)":
  117949. +float: 1
  117950. +ifloat: 1
  117951. +Test "Imaginary part of: clog (-0x1p-149 + 0x1.fp+127 i)":
  117952. +float: 1
  117953. +ifloat: 1
  117954. +Test "Real part of: clog (-0x1p-149 - 0x1.fp+127 i)":
  117955. +float: 1
  117956. +ifloat: 1
  117957. +Test "Imaginary part of: clog (-0x1p-149 - 0x1.fp+127 i)":
  117958. +float: 1
  117959. +ifloat: 1
  117960. +Test "Real part of: clog (-0x1p-16445 + 0x1.fp+16383 i)":
  117961. +ildouble: 1
  117962. +ldouble: 1
  117963. +Test "Real part of: clog (-0x1p-16445 - 0x1.fp+16383 i)":
  117964. +ildouble: 1
  117965. +ldouble: 1
  117966. +Test "Real part of: clog (-0x1p-16494 + 0x1.fp+16383 i)":
  117967. +ildouble: 1
  117968. +ldouble: 1
  117969. +Test "Real part of: clog (-0x1p-16494 - 0x1.fp+16383 i)":
  117970. +ildouble: 1
  117971. +ldouble: 1
  117972. +Test "Real part of: clog (0x0.ffffffp0 + 0x0.ffffffp-100 i)":
  117973. +float: 1
  117974. +ifloat: 1
  117975. +Test "Real part of: clog (0x1.000566p0 + 0x1.234p-10 i)":
  117976. +float: 1
  117977. +ifloat: 1
  117978. +Test "Imaginary part of: clog (0x1.000566p0 + 0x1.234p-10 i)":
  117979. +ildouble: 1
  117980. +ldouble: 1
  117981. +Test "Real part of: clog (0x1.fp+127 + 0x1p-149 i)":
  117982. +float: 1
  117983. +ifloat: 1
  117984. +Test "Real part of: clog (0x1.fp+127 - 0x1p-149 i)":
  117985. +float: 1
  117986. +ifloat: 1
  117987. +Test "Real part of: clog (0x1.fp+16383 + 0x1.fp+16383 i)":
  117988. +ildouble: 1
  117989. +ldouble: 1
  117990. +Test "Real part of: clog (0x1.fp+16383 + 0x1p-16445 i)":
  117991. +ildouble: 1
  117992. +ldouble: 1
  117993. +Test "Real part of: clog (0x1.fp+16383 + 0x1p-16494 i)":
  117994. +ildouble: 1
  117995. +ldouble: 1
  117996. +Test "Real part of: clog (0x1.fp+16383 - 0x1p-16445 i)":
  117997. +ildouble: 1
  117998. +ldouble: 1
  117999. +Test "Real part of: clog (0x1.fp+16383 - 0x1p-16494 i)":
  118000. +ildouble: 1
  118001. +ldouble: 1
  118002. +Test "Imaginary part of: clog (0x10673dd0f2481p-51 + 0x7ef1d17cefbd2p-51 i)":
  118003. +ildouble: 1
  118004. +ldouble: 1
  118005. +Test "Real part of: clog (0x1p-1074 + 0x1p-1074 i)":
  118006. +double: 1
  118007. +idouble: 1
  118008. +Test "Real part of: clog (0x1p-147 + 0x1p-147 i)":
  118009. +float: 1
  118010. +ifloat: 1
  118011. +Test "Real part of: clog (0x1p-149 + 0x1.fp+127 i)":
  118012. +float: 1
  118013. +ifloat: 1
  118014. +Test "Real part of: clog (0x1p-149 - 0x1.fp+127 i)":
  118015. +float: 1
  118016. +ifloat: 1
  118017. +Test "Real part of: clog (0x1p-16445 + 0x1.fp+16383 i)":
  118018. +ildouble: 1
  118019. +ldouble: 1
  118020. +Test "Real part of: clog (0x1p-16445 - 0x1.fp+16383 i)":
  118021. +ildouble: 1
  118022. +ldouble: 1
  118023. +Test "Real part of: clog (0x1p-16494 + 0x1.fp+16383 i)":
  118024. +ildouble: 1
  118025. +ldouble: 1
  118026. +Test "Real part of: clog (0x1p-16494 - 0x1.fp+16383 i)":
  118027. +ildouble: 1
  118028. +ldouble: 1
  118029. +Test "Imaginary part of: clog (0x2818p-15 + 0x798fp-15 i)":
  118030. +float: 1
  118031. +ifloat: 1
  118032. +ildouble: 1
  118033. +ldouble: 1
  118034. +Test "Imaginary part of: clog (0x298c62cb546588a7p-63 + 0x7911b1dfcc4ecdaep-63 i)":
  118035. +ildouble: 1
  118036. +ldouble: 1
  118037. +Test "Imaginary part of: clog (0x2ede88p-23 + 0x771c3fp-23 i)":
  118038. +ildouble: 1
  118039. +ldouble: 1
  118040. +Test "Imaginary part of: clog (0x3f96469050f650869c2p-75 + 0x6f16b2c9c8b05988335p-75 i)":
  118041. +ildouble: 1
  118042. +ldouble: 1
  118043. +Test "Imaginary part of: clog (0x55cb6d0c83af5p-55 + 0x7fe33c0c7c4e90p-55 i)":
  118044. +ildouble: 1
  118045. +ldouble: 1
  118046. +Test "Imaginary part of: clog (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i)":
  118047. +ildouble: 1
  118048. +ldouble: 1
  118049. +Test "Imaginary part of: clog (0x659feap-24 + 0xeaf6f9p-24 i)":
  118050. +ildouble: 1
  118051. +ldouble: 1
  118052. +Test "Imaginary part of: clog (0x6771f22c64ed551b857c128b4cp-105 + 0x1f570e7a13cc3cf2f44fd793ea1p-105 i)":
  118053. +ildouble: 1
  118054. +ldouble: 1
  118055. +Test "Imaginary part of: clog (0x6b10b4f3520217b6p-64 + 0xe8893cbb449253a1p-64 i)":
  118056. +ildouble: 1
  118057. +ldouble: 1
  118058. +Test "Real part of: clog (0x8ecbf810c4ae6p-52 + 0xd479468b09a37p-52 i)":
  118059. +ildouble: 1
  118060. +ldouble: 1
  118061. +Test "Imaginary part of: clog (0x9b57bp-20 + 0xcb7b4p-20 i)":
  118062. +ildouble: 1
  118063. +ldouble: 1
  118064. +Test "Imaginary part of: clog (0xdb85c467ee2aadd5f425fe0f4b8dp-114 + 0x3e83162a0f95f1dcbf97dddf410eap-114 i)":
  118065. +ildouble: 1
  118066. +ldouble: 1
  118067. +Test "Imaginary part of: clog (0xfd95243681c055c2632286921092p-113 + 0x1bccabcd29ca2152860ec29e34ef7p-113 i)":
  118068. +ildouble: 1
  118069. +ldouble: 1
  118070. +Test "Imaginary part of: clog (0xfe961079616p-45 + 0x1bc37e09e6d1p-45 i)":
  118071. +ildouble: 1
  118072. +ldouble: 1
  118073. +Test "Real part of: clog (1.0 + 0x1.234566p-10 i)":
  118074. +float: 1
  118075. +ifloat: 1
  118076. +
  118077. +# clog10
  118078. +Test "Imaginary part of: clog10 (-0 + inf i)":
  118079. +double: 1
  118080. +float: 1
  118081. +idouble: 1
  118082. +ifloat: 1
  118083. +Test "Imaginary part of: clog10 (-0 - inf i)":
  118084. +double: 1
  118085. +float: 1
  118086. +idouble: 1
  118087. +ifloat: 1
  118088. +Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i)":
  118089. +double: 2
  118090. +idouble: 2
  118091. +ildouble: 1
  118092. +ldouble: 1
  118093. +Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-1000 i)":
  118094. +double: 1
  118095. +idouble: 1
  118096. +Test "Real part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i)":
  118097. +double: 2
  118098. +idouble: 2
  118099. +ildouble: 1
  118100. +ldouble: 1
  118101. +Test "Imaginary part of: clog10 (-0x1.0000000123456p0 + 0x1.2345678p-30 i)":
  118102. +double: 1
  118103. +idouble: 1
  118104. +Test "Imaginary part of: clog10 (-0x1.fp+1023 + 0x1p-1074 i)":
  118105. +double: 1
  118106. +idouble: 1
  118107. +Test "Imaginary part of: clog10 (-0x1.fp+1023 - 0x1p-1074 i)":
  118108. +double: 1
  118109. +idouble: 1
  118110. +Test "Imaginary part of: clog10 (-0x1.fp+127 + 0x1p-149 i)":
  118111. +double: 1
  118112. +float: 1
  118113. +idouble: 1
  118114. +ifloat: 1
  118115. +Test "Imaginary part of: clog10 (-0x1.fp+127 - 0x1p-149 i)":
  118116. +double: 1
  118117. +float: 1
  118118. +idouble: 1
  118119. +ifloat: 1
  118120. +Test "Imaginary part of: clog10 (-0x1p-1074 + 0x1.fp+1023 i)":
  118121. +double: 1
  118122. +idouble: 1
  118123. +Test "Imaginary part of: clog10 (-0x1p-1074 - 0x1.fp+1023 i)":
  118124. +double: 1
  118125. +idouble: 1
  118126. +Test "Imaginary part of: clog10 (-0x1p-149 + 0x1.fp+127 i)":
  118127. +double: 1
  118128. +idouble: 1
  118129. +Test "Imaginary part of: clog10 (-0x1p-149 - 0x1.fp+127 i)":
  118130. +double: 1
  118131. +idouble: 1
  118132. +Test "Imaginary part of: clog10 (-1.0 + 0x1.234566p-20 i)":
  118133. +double: 1
  118134. +idouble: 1
  118135. +Test "Real part of: clog10 (-2 - 3 i)":
  118136. +ildouble: 1
  118137. +ldouble: 1
  118138. +Test "Imaginary part of: clog10 (-2 - 3 i)":
  118139. +double: 1
  118140. +idouble: 1
  118141. +ildouble: 1
  118142. +ldouble: 1
  118143. +Test "Imaginary part of: clog10 (-3 + inf i)":
  118144. +double: 1
  118145. +float: 1
  118146. +idouble: 1
  118147. +ifloat: 1
  118148. +Test "Imaginary part of: clog10 (-3 - inf i)":
  118149. +double: 1
  118150. +float: 1
  118151. +idouble: 1
  118152. +ifloat: 1
  118153. +Test "Imaginary part of: clog10 (-inf + 0 i)":
  118154. +double: 1
  118155. +float: 1
  118156. +idouble: 1
  118157. +ifloat: 1
  118158. +Test "Imaginary part of: clog10 (-inf + 1 i)":
  118159. +double: 1
  118160. +float: 1
  118161. +idouble: 1
  118162. +ifloat: 1
  118163. +Test "Imaginary part of: clog10 (-inf + inf i)":
  118164. +double: 1
  118165. +idouble: 1
  118166. +Test "Imaginary part of: clog10 (-inf - 0 i)":
  118167. +double: 1
  118168. +float: 1
  118169. +idouble: 1
  118170. +ifloat: 1
  118171. +Test "Imaginary part of: clog10 (-inf - 1 i)":
  118172. +double: 1
  118173. +float: 1
  118174. +idouble: 1
  118175. +ifloat: 1
  118176. +Test "Imaginary part of: clog10 (0 + inf i)":
  118177. +double: 1
  118178. +float: 1
  118179. +idouble: 1
  118180. +ifloat: 1
  118181. +Test "Imaginary part of: clog10 (0 - inf i)":
  118182. +double: 1
  118183. +float: 1
  118184. +idouble: 1
  118185. +ifloat: 1
  118186. +Test "Imaginary part of: clog10 (0.75 + 1.25 i)":
  118187. +ildouble: 1
  118188. +ldouble: 1
  118189. +Test "Real part of: clog10 (0x0.fffffffffffff8p0 + 0x0.fffffffffffff8p-1000 i)":
  118190. +double: 1
  118191. +idouble: 1
  118192. +Test "Real part of: clog10 (0x0.ffffffp0 + 0x0.ffffffp-100 i)":
  118193. +double: 1
  118194. +float: 2
  118195. +idouble: 1
  118196. +ifloat: 2
  118197. +ildouble: 1
  118198. +ldouble: 1
  118199. +Test "Real part of: clog10 (0x1.00000000000000123456789abcp0 + 0x1.23456789p-1000 i)":
  118200. +ildouble: 1
  118201. +ldouble: 1
  118202. +Test "Imaginary part of: clog10 (0x1.00000000000000123456789abcp0 + 0x1.23456789p-1000 i)":
  118203. +ildouble: 1
  118204. +ldouble: 1
  118205. +Test "Imaginary part of: clog10 (0x1.00000000000000123456789abcp0 + 0x1.23456789p-60 i)":
  118206. +ildouble: 1
  118207. +ldouble: 1
  118208. +Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-10 i)":
  118209. +float: 1
  118210. +ifloat: 1
  118211. +Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-10 i)":
  118212. +double: 1
  118213. +idouble: 1
  118214. +ildouble: 2
  118215. +ldouble: 2
  118216. +Test "Real part of: clog10 (0x1.000566p0 + 0x1.234p-100 i)":
  118217. +float: 1
  118218. +ifloat: 1
  118219. +Test "Imaginary part of: clog10 (0x1.000566p0 + 0x1.234p-100 i)":
  118220. +ildouble: 1
  118221. +ldouble: 1
  118222. +Test "Imaginary part of: clog10 (0x1.234566p-30 + 1.0 i)":
  118223. +float: 1
  118224. +ifloat: 1
  118225. +Test "Real part of: clog10 (0x1.234566p-50 + 1.0 i)":
  118226. +ildouble: 1
  118227. +ldouble: 1
  118228. +Test "Imaginary part of: clog10 (0x1.234566p-50 + 1.0 i)":
  118229. +float: 1
  118230. +ifloat: 1
  118231. +Test "Real part of: clog10 (0x1.234566p-60 + 1.0 i)":
  118232. +ildouble: 1
  118233. +ldouble: 1
  118234. +Test "Imaginary part of: clog10 (0x1.234566p-60 + 1.0 i)":
  118235. +double: 1
  118236. +float: 1
  118237. +idouble: 1
  118238. +ifloat: 1
  118239. +Test "Imaginary part of: clog10 (0x1.fffffep+127 + 0x1.fffffep+127 i)":
  118240. +double: 1
  118241. +float: 1
  118242. +idouble: 1
  118243. +ifloat: 1
  118244. +Test "Real part of: clog10 (0x1.fffffep+127 + 1.0 i)":
  118245. +float: 1
  118246. +ifloat: 1
  118247. +Test "Imaginary part of: clog10 (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i)":
  118248. +double: 1
  118249. +idouble: 1
  118250. +Test "Real part of: clog10 (0x1.fp+16383 + 0x1.fp+16383 i)":
  118251. +ildouble: 1
  118252. +ldouble: 1
  118253. +Test "Real part of: clog10 (0x1.fp+16383 + 0x1p+16383 i)":
  118254. +ildouble: 1
  118255. +ldouble: 1
  118256. +Test "Real part of: clog10 (0x10673dd0f2481p-51 + 0x7ef1d17cefbd2p-51 i)":
  118257. +double: 1
  118258. +idouble: 1
  118259. +ildouble: 1
  118260. +ldouble: 1
  118261. +Test "Real part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i)":
  118262. +double: 1
  118263. +idouble: 1
  118264. +ildouble: 1
  118265. +ldouble: 1
  118266. +Test "Imaginary part of: clog10 (0x1367a310575591p-54 + 0x3cfcc0a0541f60p-54 i)":
  118267. +double: 1
  118268. +idouble: 1
  118269. +Test "Real part of: clog10 (0x1415bcaf2105940d49a636e98ae59p-115 + 0x7e6a150adfcd1b0921d44b31f40f4p-115 i)":
  118270. +ildouble: 1
  118271. +ldouble: 1
  118272. +Test "Imaginary part of: clog10 (0x15cfbd1990d1ffp-53 + 0x176a3973e09a9ap-53 i)":
  118273. +ildouble: 1
  118274. +ldouble: 1
  118275. +Test "Imaginary part of: clog10 (0x164c74eea876p-45 + 0x16f393482f77p-45 i)":
  118276. +double: 1
  118277. +idouble: 1
  118278. +Test "Imaginary part of: clog10 (0x1a6p-10 + 0x3a5p-10 i)":
  118279. +double: 1
  118280. +idouble: 1
  118281. +Test "Real part of: clog10 (0x1df515eb171a808b9e400266p-95 + 0x7c71eb0cd4688dfe98581c77p-95 i)":
  118282. +ildouble: 1
  118283. +ldouble: 1
  118284. +Test "Imaginary part of: clog10 (0x1df515eb171a808b9e400266p-95 + 0x7c71eb0cd4688dfe98581c77p-95 i)":
  118285. +ildouble: 1
  118286. +ldouble: 1
  118287. +Test "Imaginary part of: clog10 (0x1p-1073 + 0x1p-1073 i)":
  118288. +double: 1
  118289. +idouble: 1
  118290. +Test "Imaginary part of: clog10 (0x1p-1074 + 0x1.fp+1023 i)":
  118291. +double: 1
  118292. +idouble: 1
  118293. +Test "Real part of: clog10 (0x1p-1074 + 0x1p-1074 i)":
  118294. +double: 1
  118295. +idouble: 1
  118296. +Test "Imaginary part of: clog10 (0x1p-1074 + 0x1p-1074 i)":
  118297. +double: 1
  118298. +idouble: 1
  118299. +Test "Imaginary part of: clog10 (0x1p-1074 - 0x1.fp+1023 i)":
  118300. +double: 1
  118301. +idouble: 1
  118302. +Test "Imaginary part of: clog10 (0x1p-147 + 0x1p-147 i)":
  118303. +double: 1
  118304. +float: 1
  118305. +idouble: 1
  118306. +ifloat: 1
  118307. +Test "Imaginary part of: clog10 (0x1p-149 + 0x1.fp+127 i)":
  118308. +double: 1
  118309. +float: 1
  118310. +idouble: 1
  118311. +ifloat: 1
  118312. +Test "Imaginary part of: clog10 (0x1p-149 + 0x1p-149 i)":
  118313. +double: 1
  118314. +float: 1
  118315. +idouble: 1
  118316. +ifloat: 1
  118317. +Test "Imaginary part of: clog10 (0x1p-149 - 0x1.fp+127 i)":
  118318. +double: 1
  118319. +float: 1
  118320. +idouble: 1
  118321. +ifloat: 1
  118322. +Test "Imaginary part of: clog10 (0x1p-509 + 1.0 i)":
  118323. +double: 1
  118324. +idouble: 1
  118325. +Test "Imaginary part of: clog10 (0x1p-510 + 1.0 i)":
  118326. +double: 1
  118327. +idouble: 1
  118328. +Test "Imaginary part of: clog10 (0x1p-511 + 1.0 i)":
  118329. +double: 1
  118330. +idouble: 1
  118331. +Test "Imaginary part of: clog10 (0x1p-61 + 1.0 i)":
  118332. +double: 1
  118333. +float: 1
  118334. +idouble: 1
  118335. +ifloat: 1
  118336. +Test "Imaginary part of: clog10 (0x1p-62 + 1.0 i)":
  118337. +double: 1
  118338. +float: 1
  118339. +idouble: 1
  118340. +ifloat: 1
  118341. +Test "Imaginary part of: clog10 (0x1p-63 + 1.0 i)":
  118342. +double: 1
  118343. +float: 1
  118344. +idouble: 1
  118345. +ifloat: 1
  118346. +Test "Real part of: clog10 (0x2818p-15 + 0x798fp-15 i)":
  118347. +double: 1
  118348. +float: 1
  118349. +idouble: 1
  118350. +ifloat: 1
  118351. +ildouble: 1
  118352. +ldouble: 1
  118353. +Test "Imaginary part of: clog10 (0x2818p-15 + 0x798fp-15 i)":
  118354. +float: 1
  118355. +ifloat: 1
  118356. +ildouble: 1
  118357. +ldouble: 1
  118358. +Test "Real part of: clog10 (0x2dd46725bp-35 + 0x7783a1284p-35 i)":
  118359. +double: 1
  118360. +idouble: 1
  118361. +ildouble: 1
  118362. +ldouble: 1
  118363. +Test "Real part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i)":
  118364. +float: 1
  118365. +ifloat: 1
  118366. +Test "Imaginary part of: clog10 (0x2ede88p-23 + 0x771c3fp-23 i)":
  118367. +double: 1
  118368. +idouble: 1
  118369. +ildouble: 1
  118370. +ldouble: 1
  118371. +Test "Imaginary part of: clog10 (0x3f96469050f650869c2p-75 + 0x6f16b2c9c8b05988335p-75 i)":
  118372. +ildouble: 1
  118373. +ldouble: 1
  118374. +Test "Real part of: clog10 (0x4447d7175p-35 + 0x6c445e00ap-35 i)":
  118375. +double: 1
  118376. +idouble: 1
  118377. +Test "Real part of: clog10 (0x4d4ep-15 + 0x6605p-15 i)":
  118378. +ildouble: 1
  118379. +ldouble: 1
  118380. +Test "Real part of: clog10 (0x4d9c37e2b5cb4533p-63 + 0x65c98be2385a042ep-63 i)":
  118381. +ildouble: 1
  118382. +ldouble: 1
  118383. +Test "Real part of: clog10 (0x55cb6d0c83af5p-55 + 0x7fe33c0c7c4e90p-55 i)":
  118384. +ildouble: 1
  118385. +ldouble: 1
  118386. +Test "Imaginary part of: clog10 (0x5b06b680ea2ccp-52 + 0xef452b965da9fp-52 i)":
  118387. +double: 1
  118388. +idouble: 1
  118389. +ildouble: 1
  118390. +ldouble: 1
  118391. +Test "Real part of: clog10 (0x602fd5037c4792efp-64 + 0xed3e2086dcca80b8p-64 i)":
  118392. +ildouble: 1
  118393. +ldouble: 1
  118394. +Test "Real part of: clog10 (0x6241ef0da53f539f02fad67dabp-106 + 0x3fb46641182f7efd9caa769dac0p-106 i)":
  118395. +ildouble: 1
  118396. +ldouble: 1
  118397. +Test "Real part of: clog10 (0x659feap-24 + 0xeaf6f9p-24 i)":
  118398. +ildouble: 1
  118399. +ldouble: 1
  118400. +Test "Imaginary part of: clog10 (0x659feap-24 + 0xeaf6f9p-24 i)":
  118401. +ildouble: 1
  118402. +ldouble: 1
  118403. +Test "Imaginary part of: clog10 (0x6b10b4f3520217b6p-64 + 0xe8893cbb449253a1p-64 i)":
  118404. +ildouble: 1
  118405. +ldouble: 1
  118406. +Test "Imaginary part of: clog10 (0x9b57bp-20 + 0xcb7b4p-20 i)":
  118407. +double: 1
  118408. +idouble: 1
  118409. +ildouble: 1
  118410. +ldouble: 1
  118411. +Test "Real part of: clog10 (0xdb85c467ee2aadd5f425fe0f4b8dp-114 + 0x3e83162a0f95f1dcbf97dddf410eap-114 i)":
  118412. +ildouble: 1
  118413. +ldouble: 1
  118414. +Test "Real part of: clog10 (0xf2p-10 + 0x3e3p-10 i)":
  118415. +double: 1
  118416. +idouble: 1
  118417. +Test "Imaginary part of: clog10 (0xf2p-10 + 0x3e3p-10 i)":
  118418. +double: 1
  118419. +idouble: 1
  118420. +Test "Imaginary part of: clog10 (0xfd95243681c055c2632286921092p-113 + 0x1bccabcd29ca2152860ec29e34ef7p-113 i)":
  118421. +ildouble: 2
  118422. +ldouble: 2
  118423. +Test "Imaginary part of: clog10 (0xfe961079616p-45 + 0x1bc37e09e6d1p-45 i)":
  118424. +double: 1
  118425. +idouble: 1
  118426. +ildouble: 1
  118427. +ldouble: 1
  118428. +Test "Imaginary part of: clog10 (1.0 + 0x1.234566p-10 i)":
  118429. +double: 1
  118430. +idouble: 1
  118431. +Test "Imaginary part of: clog10 (3 + inf i)":
  118432. +double: 1
  118433. +float: 1
  118434. +idouble: 1
  118435. +ifloat: 1
  118436. +Test "Imaginary part of: clog10 (3 - inf i)":
  118437. +double: 1
  118438. +float: 1
  118439. +idouble: 1
  118440. +ifloat: 1
  118441. +Test "Imaginary part of: clog10 (inf + inf i)":
  118442. +double: 1
  118443. +float: 1
  118444. +idouble: 1
  118445. +ifloat: 1
  118446. +Test "Imaginary part of: clog10 (inf - inf i)":
  118447. +double: 1
  118448. +float: 1
  118449. +idouble: 1
  118450. +ifloat: 1
  118451. +
  118452. +# cos
  118453. +Test "cos (0x1p+120)":
  118454. +float: 1
  118455. +ifloat: 1
  118456. +Test "cos (0x1p+127)":
  118457. +float: 1
  118458. +ifloat: 1
  118459. +Test "cos (M_PI_6l * 2.0)":
  118460. +double: 1
  118461. +idouble: 1
  118462. +Test "cos (M_PI_6l * 4.0)":
  118463. +double: 2
  118464. +float: 1
  118465. +idouble: 2
  118466. +ifloat: 1
  118467. +ildouble: 1
  118468. +ldouble: 1
  118469. +
  118470. +# cos_downward
  118471. +Test "cos_downward (1)":
  118472. +float: 1
  118473. +ifloat: 1
  118474. +Test "cos_downward (2)":
  118475. +float: 1
  118476. +ifloat: 1
  118477. +Test "cos_downward (3)":
  118478. +float: 1
  118479. +ifloat: 1
  118480. +Test "cos_downward (4)":
  118481. +float: 1
  118482. +ifloat: 1
  118483. +Test "cos_downward (5)":
  118484. +float: 1
  118485. +ifloat: 1
  118486. +Test "cos_downward (7)":
  118487. +float: 1
  118488. +ifloat: 1
  118489. +Test "cos_downward (8)":
  118490. +float: 1
  118491. +ifloat: 1
  118492. +
  118493. +# cos_tonearest
  118494. +Test "cos_tonearest (7)":
  118495. +float: 1
  118496. +ifloat: 1
  118497. +
  118498. +# cos_towardzero
  118499. +Test "cos_towardzero (2)":
  118500. +float: 1
  118501. +ifloat: 1
  118502. +Test "cos_towardzero (3)":
  118503. +float: 1
  118504. +ifloat: 1
  118505. +Test "cos_towardzero (5)":
  118506. +float: 1
  118507. +ifloat: 1
  118508. +Test "cos_towardzero (7)":
  118509. +float: 1
  118510. +ifloat: 1
  118511. +Test "cos_towardzero (8)":
  118512. +float: 1
  118513. +ifloat: 1
  118514. +
  118515. +# cos_upward
  118516. +Test "cos_upward (10)":
  118517. +float: 1
  118518. +ifloat: 1
  118519. +Test "cos_upward (6)":
  118520. +float: 1
  118521. +ifloat: 1
  118522. +Test "cos_upward (7)":
  118523. +float: 1
  118524. +ifloat: 1
  118525. +Test "cos_upward (9)":
  118526. +float: 2
  118527. +ifloat: 2
  118528. +
  118529. +# cosh_downward
  118530. +Test "cosh_downward (22)":
  118531. +float: 1
  118532. +ifloat: 1
  118533. +Test "cosh_downward (23)":
  118534. +float: 1
  118535. +ifloat: 1
  118536. +Test "cosh_downward (24)":
  118537. +float: 1
  118538. +ifloat: 1
  118539. +
  118540. +# cosh_tonearest
  118541. +Test "cosh_tonearest (22)":
  118542. +ildouble: 1
  118543. +ldouble: 1
  118544. +
  118545. +# cosh_towardzero
  118546. +Test "cosh_towardzero (22)":
  118547. +float: 1
  118548. +ifloat: 1
  118549. +Test "cosh_towardzero (23)":
  118550. +float: 1
  118551. +ifloat: 1
  118552. +Test "cosh_towardzero (24)":
  118553. +float: 1
  118554. +ifloat: 1
  118555. +
  118556. +# cpow
  118557. +Test "Real part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i)":
  118558. +float: 1
  118559. +ifloat: 1
  118560. +Test "Imaginary part of: cpow (0.75 + 1.25 i, 0.0 + 1.0 i)":
  118561. +ildouble: 1
  118562. +ldouble: 1
  118563. +Test "Real part of: cpow (0.75 + 1.25 i, 0.75 + 1.25 i)":
  118564. +double: 1
  118565. +float: 4
  118566. +idouble: 1
  118567. +ifloat: 4
  118568. +ildouble: 4
  118569. +ldouble: 4
  118570. +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 0.0 i)":
  118571. +ildouble: 1
  118572. +ldouble: 1
  118573. +Test "Real part of: cpow (0.75 + 1.25 i, 1.0 + 1.0 i)":
  118574. +double: 2
  118575. +float: 3
  118576. +idouble: 2
  118577. +ifloat: 3
  118578. +ildouble: 2
  118579. +ldouble: 2
  118580. +Test "Real part of: cpow (2 + 0 i, 10 + 0 i)":
  118581. +ildouble: 2
  118582. +ldouble: 2
  118583. +Test "Real part of: cpow (2 + 3 i, 4 + 0 i)":
  118584. +double: 1
  118585. +float: 4
  118586. +idouble: 1
  118587. +ifloat: 4
  118588. +ildouble: 2
  118589. +ldouble: 2
  118590. +Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i)":
  118591. +float: 2
  118592. +ifloat: 2
  118593. +
  118594. +# csin
  118595. +Test "Real part of: csin (-0.75 + 11357.25 i)":
  118596. +ildouble: 1
  118597. +ldouble: 1
  118598. +Test "Real part of: csin (-0.75 + 710.5 i)":
  118599. +double: 1
  118600. +idouble: 1
  118601. +ildouble: 1
  118602. +ldouble: 1
  118603. +Test "Real part of: csin (-0.75 + 89.5 i)":
  118604. +float: 1
  118605. +ifloat: 1
  118606. +ildouble: 1
  118607. +ldouble: 1
  118608. +Test "Imaginary part of: csin (-0.75 + 89.5 i)":
  118609. +ildouble: 1
  118610. +ldouble: 1
  118611. +Test "Real part of: csin (-0.75 - 11357.25 i)":
  118612. +ildouble: 1
  118613. +ldouble: 1
  118614. +Test "Real part of: csin (-0.75 - 710.5 i)":
  118615. +double: 1
  118616. +idouble: 1
  118617. +ildouble: 1
  118618. +ldouble: 1
  118619. +Test "Real part of: csin (-0.75 - 89.5 i)":
  118620. +float: 1
  118621. +ifloat: 1
  118622. +ildouble: 1
  118623. +ldouble: 1
  118624. +Test "Imaginary part of: csin (-0.75 - 89.5 i)":
  118625. +ildouble: 1
  118626. +ldouble: 1
  118627. +Test "Imaginary part of: csin (-2 - 3 i)":
  118628. +ildouble: 1
  118629. +ldouble: 1
  118630. +Test "Real part of: csin (0.75 + 1.25 i)":
  118631. +ildouble: 1
  118632. +ldouble: 1
  118633. +Test "Real part of: csin (0.75 + 11357.25 i)":
  118634. +ildouble: 1
  118635. +ldouble: 1
  118636. +Test "Real part of: csin (0.75 + 710.5 i)":
  118637. +double: 1
  118638. +idouble: 1
  118639. +ildouble: 1
  118640. +ldouble: 1
  118641. +Test "Real part of: csin (0.75 + 89.5 i)":
  118642. +float: 1
  118643. +ifloat: 1
  118644. +ildouble: 1
  118645. +ldouble: 1
  118646. +Test "Imaginary part of: csin (0.75 + 89.5 i)":
  118647. +ildouble: 1
  118648. +ldouble: 1
  118649. +Test "Real part of: csin (0.75 - 11357.25 i)":
  118650. +ildouble: 1
  118651. +ldouble: 1
  118652. +Test "Real part of: csin (0.75 - 710.5 i)":
  118653. +double: 1
  118654. +idouble: 1
  118655. +ildouble: 1
  118656. +ldouble: 1
  118657. +Test "Real part of: csin (0.75 - 89.5 i)":
  118658. +float: 1
  118659. +ifloat: 1
  118660. +ildouble: 1
  118661. +ldouble: 1
  118662. +Test "Imaginary part of: csin (0.75 - 89.5 i)":
  118663. +ildouble: 1
  118664. +ldouble: 1
  118665. +Test "Real part of: csin (0x1p-1074 + 1440 i)":
  118666. +double: 1
  118667. +idouble: 1
  118668. +Test "Real part of: csin (0x1p-16434 + 22730 i)":
  118669. +ildouble: 1
  118670. +ldouble: 1
  118671. +
  118672. +# csinh
  118673. +Test "Imaginary part of: csinh (-11357.25 + 0.75 i)":
  118674. +ildouble: 1
  118675. +ldouble: 1
  118676. +Test "Imaginary part of: csinh (-11357.25 - 0.75 i)":
  118677. +ildouble: 1
  118678. +ldouble: 1
  118679. +Test "Real part of: csinh (-2 - 3 i)":
  118680. +ildouble: 1
  118681. +ldouble: 1
  118682. +Test "Imaginary part of: csinh (-2 - 3 i)":
  118683. +double: 1
  118684. +idouble: 1
  118685. +Test "Imaginary part of: csinh (-710.5 + 0.75 i)":
  118686. +double: 1
  118687. +idouble: 1
  118688. +ildouble: 1
  118689. +ldouble: 1
  118690. +Test "Imaginary part of: csinh (-710.5 - 0.75 i)":
  118691. +double: 1
  118692. +idouble: 1
  118693. +ildouble: 1
  118694. +ldouble: 1
  118695. +Test "Real part of: csinh (-89.5 + 0.75 i)":
  118696. +ildouble: 1
  118697. +ldouble: 1
  118698. +Test "Imaginary part of: csinh (-89.5 + 0.75 i)":
  118699. +float: 1
  118700. +ifloat: 1
  118701. +ildouble: 1
  118702. +ldouble: 1
  118703. +Test "Real part of: csinh (-89.5 - 0.75 i)":
  118704. +ildouble: 1
  118705. +ldouble: 1
  118706. +Test "Imaginary part of: csinh (-89.5 - 0.75 i)":
  118707. +float: 1
  118708. +ifloat: 1
  118709. +ildouble: 1
  118710. +ldouble: 1
  118711. +Test "Real part of: csinh (0.75 + 1.25 i)":
  118712. +float: 1
  118713. +ifloat: 1
  118714. +Test "Imaginary part of: csinh (0.75 + 1.25 i)":
  118715. +float: 1
  118716. +ifloat: 1
  118717. +Test "Imaginary part of: csinh (11357.25 + 0.75 i)":
  118718. +ildouble: 1
  118719. +ldouble: 1
  118720. +Test "Imaginary part of: csinh (11357.25 - 0.75 i)":
  118721. +ildouble: 1
  118722. +ldouble: 1
  118723. +Test "Imaginary part of: csinh (1440 + 0x1p-1074 i)":
  118724. +double: 1
  118725. +idouble: 1
  118726. +Test "Imaginary part of: csinh (22730 + 0x1p-16434 i)":
  118727. +ildouble: 1
  118728. +ldouble: 1
  118729. +Test "Imaginary part of: csinh (710.5 + 0.75 i)":
  118730. +double: 1
  118731. +idouble: 1
  118732. +ildouble: 1
  118733. +ldouble: 1
  118734. +Test "Imaginary part of: csinh (710.5 - 0.75 i)":
  118735. +double: 1
  118736. +idouble: 1
  118737. +ildouble: 1
  118738. +ldouble: 1
  118739. +Test "Real part of: csinh (89.5 + 0.75 i)":
  118740. +ildouble: 1
  118741. +ldouble: 1
  118742. +Test "Imaginary part of: csinh (89.5 + 0.75 i)":
  118743. +float: 1
  118744. +ifloat: 1
  118745. +ildouble: 1
  118746. +ldouble: 1
  118747. +Test "Real part of: csinh (89.5 - 0.75 i)":
  118748. +ildouble: 1
  118749. +ldouble: 1
  118750. +Test "Imaginary part of: csinh (89.5 - 0.75 i)":
  118751. +float: 1
  118752. +ifloat: 1
  118753. +ildouble: 1
  118754. +ldouble: 1
  118755. +
  118756. +# csqrt
  118757. +Test "Real part of: csqrt (-0x1.0000000000000000000000000001p-16382 - 0x1.0000000000000000000000000001p-16382 i)":
  118758. +ildouble: 1
  118759. +ldouble: 1
  118760. +Test "Real part of: csqrt (-0x1.0000000000000002p-16382 - 0x1.0000000000000002p-16382 i)":
  118761. +ildouble: 1
  118762. +ldouble: 1
  118763. +Test "Imaginary part of: csqrt (-0x1.0000000000000002p-16382 - 0x1.0000000000000002p-16382 i)":
  118764. +ildouble: 1
  118765. +ldouble: 1
  118766. +Test "Real part of: csqrt (-0x1.0000000000001p-1022 - 0x1.0000000000001p-1022 i)":
  118767. +ildouble: 1
  118768. +ldouble: 1
  118769. +Test "Real part of: csqrt (-0x1.000002p-126 - 0x1.000002p-126 i)":
  118770. +double: 1
  118771. +idouble: 1
  118772. +Test "Real part of: csqrt (-2 + 3 i)":
  118773. +float: 1
  118774. +ifloat: 1
  118775. +ildouble: 1
  118776. +ldouble: 1
  118777. +Test "Real part of: csqrt (-2 - 3 i)":
  118778. +float: 1
  118779. +ifloat: 1
  118780. +ildouble: 1
  118781. +ldouble: 1
  118782. +Test "Imaginary part of: csqrt (0.75 + 1.25 i)":
  118783. +ildouble: 1
  118784. +ldouble: 1
  118785. +Test "Imaginary part of: csqrt (0x1.0000000000000000000000000001p-16382 + 0x1.0000000000000000000000000001p-16382 i)":
  118786. +ildouble: 1
  118787. +ldouble: 1
  118788. +Test "Real part of: csqrt (0x1.0000000000000002p-16382 + 0x1.0000000000000002p-16382 i)":
  118789. +ildouble: 1
  118790. +ldouble: 1
  118791. +Test "Imaginary part of: csqrt (0x1.0000000000000002p-16382 + 0x1.0000000000000002p-16382 i)":
  118792. +ildouble: 1
  118793. +ldouble: 1
  118794. +Test "Imaginary part of: csqrt (0x1.0000000000001p-1022 + 0x1.0000000000001p-1022 i)":
  118795. +ildouble: 1
  118796. +ldouble: 1
  118797. +Test "Imaginary part of: csqrt (0x1.000002p-126 + 0x1.000002p-126 i)":
  118798. +double: 1
  118799. +idouble: 1
  118800. +Test "Imaginary part of: csqrt (0x1.fffffep+127 + 1.0 i)":
  118801. +float: 1
  118802. +ifloat: 1
  118803. +Test "Real part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i)":
  118804. +double: 1
  118805. +idouble: 1
  118806. +Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i)":
  118807. +double: 1
  118808. +idouble: 1
  118809. +ildouble: 1
  118810. +ldouble: 1
  118811. +Test "Imaginary part of: csqrt (0x1.fffffffffffffp+1023 + 0x1p+1023 i)":
  118812. +double: 1
  118813. +idouble: 1
  118814. +ildouble: 1
  118815. +ldouble: 1
  118816. +Test "Real part of: csqrt (0x1.fp+16383 + 0x1.fp+16383 i)":
  118817. +ildouble: 1
  118818. +ldouble: 1
  118819. +Test "Imaginary part of: csqrt (0x1.fp+16383 + 0x1.fp+16383 i)":
  118820. +ildouble: 1
  118821. +ldouble: 1
  118822. +Test "Imaginary part of: csqrt (0x1.fp+16383 + 0x1p+16383 i)":
  118823. +ildouble: 1
  118824. +ldouble: 1
  118825. +Test "Imaginary part of: csqrt (0x1p-16440 + 0x1p-16441 i)":
  118826. +ildouble: 1
  118827. +ldouble: 1
  118828. +
  118829. +# ctan
  118830. +Test "Real part of: ctan (-2 - 3 i)":
  118831. +float: 1
  118832. +ifloat: 1
  118833. +Test "Imaginary part of: ctan (-2 - 3 i)":
  118834. +double: 1
  118835. +idouble: 1
  118836. +ildouble: 1
  118837. +ldouble: 1
  118838. +Test "Real part of: ctan (0.75 + 1.25 i)":
  118839. +ildouble: 1
  118840. +ldouble: 1
  118841. +Test "Imaginary part of: ctan (0.75 + 1.25 i)":
  118842. +double: 1
  118843. +idouble: 1
  118844. +ildouble: 2
  118845. +ldouble: 2
  118846. +Test "Real part of: ctan (0x1p1023 + 1 i)":
  118847. +double: 1
  118848. +idouble: 1
  118849. +Test "Imaginary part of: ctan (0x1p1023 + 1 i)":
  118850. +ildouble: 2
  118851. +ldouble: 2
  118852. +Test "Real part of: ctan (0x1p127 + 1 i)":
  118853. +ildouble: 2
  118854. +ldouble: 2
  118855. +Test "Imaginary part of: ctan (0x1p127 + 1 i)":
  118856. +double: 1
  118857. +idouble: 1
  118858. +ildouble: 1
  118859. +ldouble: 1
  118860. +Test "Real part of: ctan (0x1p16383 + 1 i)":
  118861. +ildouble: 1
  118862. +ldouble: 1
  118863. +Test "Imaginary part of: ctan (0x1p16383 + 1 i)":
  118864. +ildouble: 2
  118865. +ldouble: 2
  118866. +Test "Real part of: ctan (0x3.243f6cp-1 + 0 i)":
  118867. +float: 1
  118868. +ifloat: 1
  118869. +ildouble: 1
  118870. +ldouble: 1
  118871. +Test "Real part of: ctan (1 + 355 i)":
  118872. +ildouble: 2
  118873. +ldouble: 2
  118874. +Test "Real part of: ctan (1 + 365 i)":
  118875. +ildouble: 1
  118876. +ldouble: 1
  118877. +Test "Real part of: ctan (1 + 45 i)":
  118878. +ildouble: 2
  118879. +ldouble: 2
  118880. +Test "Real part of: ctan (1 + 47 i)":
  118881. +ildouble: 1
  118882. +ldouble: 1
  118883. +
  118884. +# ctan_downward
  118885. +Test "Real part of: ctan_downward (0x1.921fb6p+0 + 0x1p-149 i)":
  118886. +double: 2
  118887. +float: 1
  118888. +idouble: 2
  118889. +ifloat: 1
  118890. +Test "Imaginary part of: ctan_downward (0x1.921fb6p+0 + 0x1p-149 i)":
  118891. +float: 1
  118892. +ifloat: 1
  118893. +
  118894. +# ctan_tonearest
  118895. +Test "Imaginary part of: ctan_tonearest (0x1.921fb54442d1846ap+0 + 0x1p-16445 i)":
  118896. +ildouble: 1
  118897. +ldouble: 1
  118898. +Test "Real part of: ctan_tonearest (0x1.921fb54442d18p+0 + 0x1p-1074 i)":
  118899. +ildouble: 3
  118900. +ldouble: 3
  118901. +Test "Imaginary part of: ctan_tonearest (0x1.921fb54442d18p+0 + 0x1p-1074 i)":
  118902. +ildouble: 3
  118903. +ldouble: 3
  118904. +Test "Real part of: ctan_tonearest (0x1.921fb6p+0 + 0x1p-149 i)":
  118905. +float: 1
  118906. +ifloat: 1
  118907. +ildouble: 1
  118908. +ldouble: 1
  118909. +Test "Imaginary part of: ctan_tonearest (0x1.921fb6p+0 + 0x1p-149 i)":
  118910. +float: 1
  118911. +ifloat: 1
  118912. +ildouble: 2
  118913. +ldouble: 2
  118914. +
  118915. +# ctan_towardzero
  118916. +Test "Real part of: ctan_towardzero (0x1.921fb6p+0 + 0x1p-149 i)":
  118917. +float: 1
  118918. +ifloat: 1
  118919. +Test "Imaginary part of: ctan_towardzero (0x1.921fb6p+0 + 0x1p-149 i)":
  118920. +float: 1
  118921. +ifloat: 1
  118922. +
  118923. +# ctan_upward
  118924. +Test "Real part of: ctan_upward (0x1.921fb54442d18p+0 + 0x1p-1074 i)":
  118925. +double: 1
  118926. +idouble: 1
  118927. +Test "Real part of: ctan_upward (0x1.921fb6p+0 + 0x1p-149 i)":
  118928. +double: 2
  118929. +float: 1
  118930. +idouble: 2
  118931. +ifloat: 1
  118932. +Test "Imaginary part of: ctan_upward (0x1.921fb6p+0 + 0x1p-149 i)":
  118933. +double: 1
  118934. +float: 2
  118935. +idouble: 1
  118936. +ifloat: 2
  118937. +
  118938. +# ctanh
  118939. +Test "Real part of: ctanh (-2 - 3 i)":
  118940. +double: 1
  118941. +float: 1
  118942. +idouble: 1
  118943. +ifloat: 1
  118944. +Test "Imaginary part of: ctanh (-2 - 3 i)":
  118945. +double: 1
  118946. +float: 1
  118947. +idouble: 1
  118948. +ifloat: 1
  118949. +Test "Imaginary part of: ctanh (0 + 0x3.243f6cp-1 i)":
  118950. +float: 1
  118951. +ifloat: 1
  118952. +ildouble: 1
  118953. +ldouble: 1
  118954. +Test "Imaginary part of: ctanh (0 + pi/4 i)":
  118955. +double: 1
  118956. +float: 1
  118957. +idouble: 1
  118958. +ifloat: 1
  118959. +ildouble: 1
  118960. +ldouble: 1
  118961. +Test "Real part of: ctanh (0.75 + 1.25 i)":
  118962. +double: 1
  118963. +float: 1
  118964. +idouble: 1
  118965. +ifloat: 1
  118966. +Test "Imaginary part of: ctanh (0.75 + 1.25 i)":
  118967. +float: 2
  118968. +ifloat: 2
  118969. +Test "Real part of: ctanh (1 + 0x1p1023 i)":
  118970. +ildouble: 2
  118971. +ldouble: 2
  118972. +Test "Imaginary part of: ctanh (1 + 0x1p1023 i)":
  118973. +double: 1
  118974. +idouble: 1
  118975. +Test "Real part of: ctanh (1 + 0x1p127 i)":
  118976. +double: 1
  118977. +idouble: 1
  118978. +ildouble: 1
  118979. +ldouble: 1
  118980. +Test "Imaginary part of: ctanh (1 + 0x1p127 i)":
  118981. +ildouble: 2
  118982. +ldouble: 2
  118983. +Test "Real part of: ctanh (1 + 0x1p16383 i)":
  118984. +ildouble: 2
  118985. +ldouble: 2
  118986. +Test "Imaginary part of: ctanh (1 + 0x1p16383 i)":
  118987. +ildouble: 1
  118988. +ldouble: 1
  118989. +Test "Imaginary part of: ctanh (355 + 1 i)":
  118990. +ildouble: 2
  118991. +ldouble: 2
  118992. +Test "Imaginary part of: ctanh (365 + 1 i)":
  118993. +ildouble: 1
  118994. +ldouble: 1
  118995. +Test "Imaginary part of: ctanh (45 + 1 i)":
  118996. +ildouble: 2
  118997. +ldouble: 2
  118998. +Test "Imaginary part of: ctanh (47 + 1 i)":
  118999. +ildouble: 1
  119000. +ldouble: 1
  119001. +
  119002. +# ctanh_downward
  119003. +Test "Real part of: ctanh_downward (0x1p-149 + 0x1.921fb6p+0 i)":
  119004. +float: 1
  119005. +ifloat: 1
  119006. +Test "Imaginary part of: ctanh_downward (0x1p-149 + 0x1.921fb6p+0 i)":
  119007. +double: 2
  119008. +float: 1
  119009. +idouble: 2
  119010. +ifloat: 1
  119011. +
  119012. +# ctanh_tonearest
  119013. +Test "Real part of: ctanh_tonearest (0x1p-1074 + 0x1.921fb54442d18p+0 i)":
  119014. +ildouble: 3
  119015. +ldouble: 3
  119016. +Test "Imaginary part of: ctanh_tonearest (0x1p-1074 + 0x1.921fb54442d18p+0 i)":
  119017. +ildouble: 3
  119018. +ldouble: 3
  119019. +Test "Real part of: ctanh_tonearest (0x1p-149 + 0x1.921fb6p+0 i)":
  119020. +float: 1
  119021. +ifloat: 1
  119022. +ildouble: 2
  119023. +ldouble: 2
  119024. +Test "Imaginary part of: ctanh_tonearest (0x1p-149 + 0x1.921fb6p+0 i)":
  119025. +float: 1
  119026. +ifloat: 1
  119027. +ildouble: 1
  119028. +ldouble: 1
  119029. +Test "Real part of: ctanh_tonearest (0x1p-16445 + 0x1.921fb54442d1846ap+0 i)":
  119030. +ildouble: 1
  119031. +ldouble: 1
  119032. +
  119033. +# ctanh_towardzero
  119034. +Test "Real part of: ctanh_towardzero (0x1p-149 + 0x1.921fb6p+0 i)":
  119035. +float: 1
  119036. +ifloat: 1
  119037. +Test "Imaginary part of: ctanh_towardzero (0x1p-149 + 0x1.921fb6p+0 i)":
  119038. +float: 1
  119039. +ifloat: 1
  119040. +
  119041. +# ctanh_upward
  119042. +Test "Imaginary part of: ctanh_upward (0x1p-1074 + 0x1.921fb54442d18p+0 i)":
  119043. +double: 1
  119044. +idouble: 1
  119045. +Test "Real part of: ctanh_upward (0x1p-149 + 0x1.921fb6p+0 i)":
  119046. +double: 1
  119047. +float: 2
  119048. +idouble: 1
  119049. +ifloat: 2
  119050. +Test "Imaginary part of: ctanh_upward (0x1p-149 + 0x1.921fb6p+0 i)":
  119051. +double: 2
  119052. +float: 1
  119053. +idouble: 2
  119054. +ifloat: 1
  119055. +
  119056. +# erf
  119057. +Test "erf (1.25)":
  119058. +double: 1
  119059. +idouble: 1
  119060. +
  119061. +# erfc
  119062. +Test "erfc (0x1.f7303cp+1)":
  119063. +double: 1
  119064. +idouble: 1
  119065. +Test "erfc (0x1.ffa002p+2)":
  119066. +float: 1
  119067. +ifloat: 1
  119068. +ildouble: 1
  119069. +ldouble: 1
  119070. +Test "erfc (0x1.ffffc8p+2)":
  119071. +ildouble: 1
  119072. +ldouble: 1
  119073. +Test "erfc (2.0)":
  119074. +double: 1
  119075. +idouble: 1
  119076. +Test "erfc (27.0)":
  119077. +ildouble: 1
  119078. +ldouble: 1
  119079. +Test "erfc (4.125)":
  119080. +double: 1
  119081. +idouble: 1
  119082. +
  119083. +# exp10
  119084. +Test "exp10 (-1)":
  119085. +double: 1
  119086. +idouble: 1
  119087. +Test "exp10 (-305)":
  119088. +double: 1
  119089. +idouble: 1
  119090. +Test "exp10 (-36)":
  119091. +double: 1
  119092. +idouble: 1
  119093. +ildouble: 1
  119094. +ldouble: 1
  119095. +Test "exp10 (3)":
  119096. +double: 1
  119097. +idouble: 1
  119098. +Test "exp10 (36)":
  119099. +double: 1
  119100. +idouble: 1
  119101. +Test "exp10 (4932)":
  119102. +ildouble: 1
  119103. +ldouble: 1
  119104. +
  119105. +# exp2
  119106. +Test "exp2 (100.5)":
  119107. +ildouble: 1
  119108. +ldouble: 1
  119109. +
  119110. +# exp_downward
  119111. +Test "exp_downward (2)":
  119112. +float: 1
  119113. +ifloat: 1
  119114. +Test "exp_downward (3)":
  119115. +float: 1
  119116. +ifloat: 1
  119117. +
  119118. +# exp_towardzero
  119119. +Test "exp_towardzero (2)":
  119120. +float: 1
  119121. +ifloat: 1
  119122. +Test "exp_towardzero (3)":
  119123. +float: 1
  119124. +ifloat: 1
  119125. +
  119126. +# exp_upward
  119127. +Test "exp_upward (1)":
  119128. +float: 1
  119129. +ifloat: 1
  119130. +
  119131. +# expm1
  119132. +Test "expm1 (-79.0)":
  119133. +ildouble: 1
  119134. +ldouble: 1
  119135. +Test "expm1 (0.75)":
  119136. +double: 1
  119137. +idouble: 1
  119138. +Test "expm1 (1)":
  119139. +double: 1
  119140. +float: 1
  119141. +idouble: 1
  119142. +ifloat: 1
  119143. +ildouble: 1
  119144. +ldouble: 1
  119145. +Test "expm1 (500.0)":
  119146. +double: 1
  119147. +idouble: 1
  119148. +
  119149. +# gamma
  119150. +Test "gamma (-0.5)":
  119151. +ildouble: 1
  119152. +ldouble: 1
  119153. +Test "gamma (0.7)":
  119154. +double: 1
  119155. +float: 1
  119156. +idouble: 1
  119157. +ifloat: 1
  119158. +ildouble: 1
  119159. +ldouble: 1
  119160. +Test "gamma (1.2)":
  119161. +double: 1
  119162. +float: 2
  119163. +idouble: 1
  119164. +ifloat: 2
  119165. +ildouble: 1
  119166. +ldouble: 1
  119167. +
  119168. +# hypot
  119169. +Test "hypot (-0.7, -12.4)":
  119170. +float: 1
  119171. +ifloat: 1
  119172. +Test "hypot (-0.7, 12.4)":
  119173. +float: 1
  119174. +ifloat: 1
  119175. +Test "hypot (-12.4, -0.7)":
  119176. +float: 1
  119177. +ifloat: 1
  119178. +Test "hypot (-12.4, 0.7)":
  119179. +float: 1
  119180. +ifloat: 1
  119181. +Test "hypot (0.7, -12.4)":
  119182. +float: 1
  119183. +ifloat: 1
  119184. +Test "hypot (0.7, 12.4)":
  119185. +float: 1
  119186. +ifloat: 1
  119187. +Test "hypot (12.4, -0.7)":
  119188. +float: 1
  119189. +ifloat: 1
  119190. +Test "hypot (12.4, 0.7)":
  119191. +float: 1
  119192. +ifloat: 1
  119193. +
  119194. +# j0
  119195. +Test "j0 (-0x1.001000001p+593)":
  119196. +ildouble: 1
  119197. +ldouble: 1
  119198. +Test "j0 (-4.0)":
  119199. +double: 1
  119200. +float: 1
  119201. +idouble: 1
  119202. +ifloat: 1
  119203. +Test "j0 (0.75)":
  119204. +float: 1
  119205. +ifloat: 1
  119206. +Test "j0 (0x1.d7ce3ap+107)":
  119207. +float: 2
  119208. +ifloat: 2
  119209. +ildouble: 1
  119210. +ldouble: 1
  119211. +Test "j0 (0x1p1023)":
  119212. +ildouble: 1
  119213. +ldouble: 1
  119214. +Test "j0 (0x1p16383)":
  119215. +ildouble: 2
  119216. +ldouble: 2
  119217. +Test "j0 (10.0)":
  119218. +double: 2
  119219. +float: 1
  119220. +idouble: 2
  119221. +ifloat: 1
  119222. +ildouble: 2
  119223. +ldouble: 2
  119224. +Test "j0 (2.0)":
  119225. +float: 2
  119226. +ifloat: 2
  119227. +ildouble: 2
  119228. +ldouble: 2
  119229. +Test "j0 (4.0)":
  119230. +double: 1
  119231. +float: 1
  119232. +idouble: 1
  119233. +ifloat: 1
  119234. +Test "j0 (8.0)":
  119235. +float: 1
  119236. +ifloat: 1
  119237. +ildouble: 1
  119238. +ldouble: 1
  119239. +
  119240. +# j1
  119241. +Test "j1 (-1.0)":
  119242. +ildouble: 1
  119243. +ldouble: 1
  119244. +Test "j1 (0.75)":
  119245. +ildouble: 1
  119246. +ldouble: 1
  119247. +Test "j1 (0x1.3ffp+74)":
  119248. +double: 1
  119249. +idouble: 1
  119250. +ildouble: 1
  119251. +ldouble: 1
  119252. +Test "j1 (0x1.ff00000000002p+840)":
  119253. +double: 1
  119254. +idouble: 1
  119255. +ildouble: 1
  119256. +ldouble: 1
  119257. +Test "j1 (0x1p1023)":
  119258. +ildouble: 1
  119259. +ldouble: 1
  119260. +Test "j1 (0x1p16382)":
  119261. +ildouble: 1
  119262. +ldouble: 1
  119263. +Test "j1 (0x1p16383)":
  119264. +ildouble: 2
  119265. +ldouble: 2
  119266. +Test "j1 (1.0)":
  119267. +ildouble: 1
  119268. +ldouble: 1
  119269. +Test "j1 (10.0)":
  119270. +float: 2
  119271. +ifloat: 2
  119272. +ildouble: 2
  119273. +ldouble: 2
  119274. +Test "j1 (2.0)":
  119275. +double: 1
  119276. +idouble: 1
  119277. +Test "j1 (8.0)":
  119278. +double: 1
  119279. +idouble: 1
  119280. +ildouble: 4
  119281. +ldouble: 4
  119282. +
  119283. +# jn
  119284. +Test "jn (0, -4.0)":
  119285. +double: 1
  119286. +float: 1
  119287. +idouble: 1
  119288. +ifloat: 1
  119289. +Test "jn (0, 0.75)":
  119290. +float: 1
  119291. +ifloat: 1
  119292. +Test "jn (0, 10.0)":
  119293. +double: 2
  119294. +float: 1
  119295. +idouble: 2
  119296. +ifloat: 1
  119297. +ildouble: 2
  119298. +ldouble: 2
  119299. +Test "jn (0, 2.0)":
  119300. +float: 2
  119301. +ifloat: 2
  119302. +ildouble: 2
  119303. +ldouble: 2
  119304. +Test "jn (0, 4.0)":
  119305. +double: 1
  119306. +float: 1
  119307. +idouble: 1
  119308. +ifloat: 1
  119309. +Test "jn (0, 8.0)":
  119310. +float: 1
  119311. +ifloat: 1
  119312. +ildouble: 1
  119313. +ldouble: 1
  119314. +Test "jn (1, -1.0)":
  119315. +ildouble: 1
  119316. +ldouble: 1
  119317. +Test "jn (1, 0.75)":
  119318. +ildouble: 1
  119319. +ldouble: 1
  119320. +Test "jn (1, 1.0)":
  119321. +ildouble: 1
  119322. +ldouble: 1
  119323. +Test "jn (1, 10.0)":
  119324. +float: 2
  119325. +ifloat: 2
  119326. +ildouble: 2
  119327. +ldouble: 2
  119328. +Test "jn (1, 2.0)":
  119329. +double: 1
  119330. +idouble: 1
  119331. +Test "jn (1, 8.0)":
  119332. +double: 1
  119333. +idouble: 1
  119334. +ildouble: 4
  119335. +ldouble: 4
  119336. +Test "jn (10, -1.0)":
  119337. +ildouble: 1
  119338. +ldouble: 1
  119339. +Test "jn (10, 0.125)":
  119340. +double: 1
  119341. +float: 1
  119342. +idouble: 1
  119343. +ifloat: 1
  119344. +ildouble: 1
  119345. +ldouble: 1
  119346. +Test "jn (10, 0.75)":
  119347. +double: 1
  119348. +float: 1
  119349. +idouble: 1
  119350. +ifloat: 1
  119351. +ildouble: 1
  119352. +ldouble: 1
  119353. +Test "jn (10, 1.0)":
  119354. +ildouble: 1
  119355. +ldouble: 1
  119356. +Test "jn (10, 10.0)":
  119357. +double: 4
  119358. +float: 3
  119359. +idouble: 4
  119360. +ifloat: 3
  119361. +ildouble: 2
  119362. +ldouble: 2
  119363. +Test "jn (10, 2.0)":
  119364. +double: 1
  119365. +float: 2
  119366. +idouble: 1
  119367. +ifloat: 2
  119368. +Test "jn (2, 0x1.ffff62p+99)":
  119369. +double: 2
  119370. +float: 2
  119371. +idouble: 2
  119372. +ifloat: 2
  119373. +Test "jn (2, 2.4048255576957729)":
  119374. +double: 2
  119375. +float: 1
  119376. +idouble: 2
  119377. +ifloat: 1
  119378. +ildouble: 1
  119379. +ldouble: 1
  119380. +Test "jn (3, 0.125)":
  119381. +double: 1
  119382. +float: 1
  119383. +idouble: 1
  119384. +ifloat: 1
  119385. +Test "jn (3, 0.75)":
  119386. +double: 1
  119387. +float: 1
  119388. +idouble: 1
  119389. +ifloat: 1
  119390. +Test "jn (3, 10.0)":
  119391. +double: 3
  119392. +float: 1
  119393. +idouble: 3
  119394. +ifloat: 1
  119395. +ildouble: 2
  119396. +ldouble: 2
  119397. +Test "jn (3, 2.0)":
  119398. +float: 1
  119399. +ifloat: 1
  119400. +Test "jn (3, 2.4048255576957729)":
  119401. +double: 3
  119402. +idouble: 3
  119403. +ildouble: 1
  119404. +ldouble: 1
  119405. +Test "jn (4, 2.4048255576957729)":
  119406. +double: 1
  119407. +idouble: 1
  119408. +ildouble: 1
  119409. +ldouble: 1
  119410. +Test "jn (5, 2.4048255576957729)":
  119411. +double: 3
  119412. +float: 1
  119413. +idouble: 3
  119414. +ifloat: 1
  119415. +ildouble: 2
  119416. +ldouble: 2
  119417. +Test "jn (6, 2.4048255576957729)":
  119418. +double: 4
  119419. +float: 3
  119420. +idouble: 4
  119421. +ifloat: 3
  119422. +ildouble: 5
  119423. +ldouble: 5
  119424. +Test "jn (7, 2.4048255576957729)":
  119425. +double: 3
  119426. +float: 5
  119427. +idouble: 3
  119428. +ifloat: 5
  119429. +ildouble: 3
  119430. +ldouble: 3
  119431. +Test "jn (8, 2.4048255576957729)":
  119432. +double: 3
  119433. +float: 2
  119434. +idouble: 3
  119435. +ifloat: 2
  119436. +ildouble: 8
  119437. +ldouble: 8
  119438. +Test "jn (9, 2.4048255576957729)":
  119439. +double: 1
  119440. +float: 2
  119441. +idouble: 1
  119442. +ifloat: 2
  119443. +ildouble: 3
  119444. +ldouble: 3
  119445. +
  119446. +# lgamma
  119447. +Test "lgamma (-0.5)":
  119448. +ildouble: 1
  119449. +ldouble: 1
  119450. +Test "lgamma (0.7)":
  119451. +double: 1
  119452. +float: 1
  119453. +idouble: 1
  119454. +ifloat: 1
  119455. +ildouble: 1
  119456. +ldouble: 1
  119457. +Test "lgamma (1.2)":
  119458. +double: 1
  119459. +float: 2
  119460. +idouble: 1
  119461. +ifloat: 2
  119462. +ildouble: 1
  119463. +ldouble: 1
  119464. +
  119465. +# log10
  119466. +Test "log10 (0.75)":
  119467. +double: 1
  119468. +float: 2
  119469. +idouble: 1
  119470. +ifloat: 2
  119471. +Test "log10 (e)":
  119472. +float: 1
  119473. +ifloat: 1
  119474. +ildouble: 1
  119475. +ldouble: 1
  119476. +
  119477. +# log1p
  119478. +Test "log1p (-0.25)":
  119479. +float: 1
  119480. +ifloat: 1
  119481. +
  119482. +# log2
  119483. +Test "log2 (0.75)":
  119484. +ildouble: 1
  119485. +ldouble: 1
  119486. +
  119487. +# pow
  119488. +Test "pow (0x0.fffffffffffff8p0, -0x1.23456789abcdfp62)":
  119489. +ildouble: 1
  119490. +ldouble: 1
  119491. +Test "pow (0x0.ffffffp0, -0x1p24)":
  119492. +float: 1
  119493. +ifloat: 1
  119494. +ildouble: 1
  119495. +ldouble: 1
  119496. +Test "pow (0x0.ffffffp0, 0x1p24)":
  119497. +float: 1
  119498. +ifloat: 1
  119499. +Test "pow (0x1.000002p0, 0x1p24)":
  119500. +float: 1
  119501. +ifloat: 1
  119502. +Test "pow (10.0, -4930.0)":
  119503. +ildouble: 1
  119504. +ldouble: 1
  119505. +Test "pow (10.0, 4929.0)":
  119506. +ildouble: 1
  119507. +ldouble: 1
  119508. +Test "pow (10.0, 4930.0)":
  119509. +ildouble: 1
  119510. +ldouble: 1
  119511. +Test "pow (10.0, 4931.0)":
  119512. +ildouble: 1
  119513. +ldouble: 1
  119514. +Test "pow (10.0, 4932.0)":
  119515. +ildouble: 1
  119516. +ldouble: 1
  119517. +Test "pow (1e4932, 0.75)":
  119518. +ildouble: 1
  119519. +ldouble: 1
  119520. +
  119521. +# pow10
  119522. +Test "pow10 (-1)":
  119523. +double: 1
  119524. +idouble: 1
  119525. +Test "pow10 (-305)":
  119526. +double: 1
  119527. +idouble: 1
  119528. +Test "pow10 (-36)":
  119529. +double: 1
  119530. +idouble: 1
  119531. +ildouble: 1
  119532. +ldouble: 1
  119533. +Test "pow10 (3)":
  119534. +double: 1
  119535. +idouble: 1
  119536. +Test "pow10 (36)":
  119537. +double: 1
  119538. +idouble: 1
  119539. +Test "pow10 (4932)":
  119540. +ildouble: 1
  119541. +ldouble: 1
  119542. +
  119543. +# pow_downward
  119544. +Test "pow_downward (1.5, 1.03125)":
  119545. +float: 1
  119546. +ifloat: 1
  119547. +
  119548. +# pow_towardzero
  119549. +Test "pow_towardzero (1.5, 1.03125)":
  119550. +float: 1
  119551. +ifloat: 1
  119552. +
  119553. +# pow_upward
  119554. +Test "pow_upward (1.0625, 1.125)":
  119555. +float: 1
  119556. +ifloat: 1
  119557. +
  119558. +# sin_downward
  119559. +Test "sin_downward (10)":
  119560. +float: 1
  119561. +ifloat: 1
  119562. +Test "sin_downward (3)":
  119563. +float: 1
  119564. +ifloat: 1
  119565. +Test "sin_downward (5)":
  119566. +float: 1
  119567. +ifloat: 1
  119568. +Test "sin_downward (6)":
  119569. +float: 1
  119570. +ifloat: 1
  119571. +
  119572. +# sin_tonearest
  119573. +Test "sin_tonearest (1)":
  119574. +float: 1
  119575. +ifloat: 1
  119576. +Test "sin_tonearest (3)":
  119577. +ildouble: 1
  119578. +ldouble: 1
  119579. +
  119580. +# sin_towardzero
  119581. +Test "sin_towardzero (1)":
  119582. +float: 1
  119583. +ifloat: 1
  119584. +Test "sin_towardzero (10)":
  119585. +float: 1
  119586. +ifloat: 1
  119587. +Test "sin_towardzero (4)":
  119588. +float: 1
  119589. +ifloat: 1
  119590. +Test "sin_towardzero (5)":
  119591. +float: 1
  119592. +ifloat: 1
  119593. +Test "sin_towardzero (9)":
  119594. +float: 1
  119595. +ifloat: 1
  119596. +
  119597. +# sin_upward
  119598. +Test "sin_upward (1)":
  119599. +float: 1
  119600. +ifloat: 1
  119601. +Test "sin_upward (2)":
  119602. +float: 2
  119603. +ifloat: 2
  119604. +Test "sin_upward (4)":
  119605. +float: 1
  119606. +ifloat: 1
  119607. +Test "sin_upward (9)":
  119608. +float: 1
  119609. +ifloat: 1
  119610. +
  119611. +# sincos
  119612. +Test "sincos (0x1p+120) extra output 2":
  119613. +float: 1
  119614. +ifloat: 1
  119615. +Test "sincos (0x1p+127) extra output 2":
  119616. +float: 1
  119617. +ifloat: 1
  119618. +Test "sincos (M_PI_6l*2.0) extra output 1":
  119619. +double: 1
  119620. +float: 1
  119621. +idouble: 1
  119622. +ifloat: 1
  119623. +Test "sincos (M_PI_6l*2.0) extra output 2":
  119624. +double: 1
  119625. +idouble: 1
  119626. +Test "sincos (pi/6) extra output 2":
  119627. +float: 1
  119628. +ifloat: 1
  119629. +
  119630. +# sinh_downward
  119631. +Test "sinh_downward (22)":
  119632. +float: 1
  119633. +ifloat: 1
  119634. +Test "sinh_downward (23)":
  119635. +float: 1
  119636. +ifloat: 1
  119637. +Test "sinh_downward (24)":
  119638. +float: 1
  119639. +ifloat: 1
  119640. +
  119641. +# sinh_towardzero
  119642. +Test "sinh_towardzero (22)":
  119643. +float: 1
  119644. +ifloat: 1
  119645. +Test "sinh_towardzero (23)":
  119646. +float: 1
  119647. +ifloat: 1
  119648. +Test "sinh_towardzero (24)":
  119649. +float: 1
  119650. +ifloat: 1
  119651. +
  119652. +# tan_downward
  119653. +Test "tan_downward (1)":
  119654. +float: 1
  119655. +ifloat: 1
  119656. +Test "tan_downward (10)":
  119657. +float: 1
  119658. +ifloat: 1
  119659. +Test "tan_downward (2)":
  119660. +float: 1
  119661. +ifloat: 1
  119662. +Test "tan_downward (6)":
  119663. +float: 1
  119664. +ifloat: 1
  119665. +Test "tan_downward (8)":
  119666. +float: 1
  119667. +ifloat: 1
  119668. +Test "tan_downward (9)":
  119669. +float: 1
  119670. +ifloat: 1
  119671. +
  119672. +# tan_towardzero
  119673. +Test "tan_towardzero (10)":
  119674. +float: 1
  119675. +ifloat: 1
  119676. +Test "tan_towardzero (3)":
  119677. +float: 1
  119678. +ifloat: 1
  119679. +Test "tan_towardzero (4)":
  119680. +float: 1
  119681. +ifloat: 1
  119682. +Test "tan_towardzero (5)":
  119683. +float: 1
  119684. +ifloat: 1
  119685. +Test "tan_towardzero (9)":
  119686. +float: 1
  119687. +ifloat: 1
  119688. +
  119689. +# tan_upward
  119690. +Test "tan_upward (1)":
  119691. +float: 1
  119692. +ifloat: 1
  119693. +Test "tan_upward (10)":
  119694. +float: 1
  119695. +ifloat: 1
  119696. +Test "tan_upward (3)":
  119697. +float: 1
  119698. +ifloat: 1
  119699. +Test "tan_upward (5)":
  119700. +float: 1
  119701. +ifloat: 1
  119702. +
  119703. +# tanh
  119704. +Test "tanh (-0.75)":
  119705. +ildouble: 1
  119706. +ldouble: 1
  119707. +Test "tanh (-1.0)":
  119708. +ildouble: 1
  119709. +ldouble: 1
  119710. +Test "tanh (0.75)":
  119711. +ildouble: 1
  119712. +ldouble: 1
  119713. +Test "tanh (1.0)":
  119714. +ildouble: 1
  119715. +ldouble: 1
  119716. +
  119717. +# tgamma
  119718. +Test "tgamma (-0.5)":
  119719. +double: 1
  119720. +float: 1
  119721. +idouble: 1
  119722. +ifloat: 1
  119723. +Test "tgamma (-0x0.fffffffffffff8p0)":
  119724. +double: 1
  119725. +idouble: 1
  119726. +Test "tgamma (-0x0.ffffffffffffffffffffffffffff8p0)":
  119727. +ildouble: 1
  119728. +ldouble: 1
  119729. +Test "tgamma (-0x0.ffffffp0)":
  119730. +float: 1
  119731. +ifloat: 1
  119732. +ildouble: 1
  119733. +ldouble: 1
  119734. +Test "tgamma (-0x1.0000000000000002p0)":
  119735. +ildouble: 1
  119736. +ldouble: 1
  119737. +Test "tgamma (-0x1.0000000000001p0)":
  119738. +ildouble: 1
  119739. +ldouble: 1
  119740. +Test "tgamma (-0x1.000002p0)":
  119741. +double: 2
  119742. +idouble: 2
  119743. +Test "tgamma (-0x1.0a32a2p+5)":
  119744. +float: 2
  119745. +ifloat: 2
  119746. +ildouble: 2
  119747. +ldouble: 2
  119748. +Test "tgamma (-0x1.5800000080001p+7)":
  119749. +ildouble: 1
  119750. +ldouble: 1
  119751. +Test "tgamma (-0x1.fffffffffffffffep0)":
  119752. +ildouble: 1
  119753. +ldouble: 1
  119754. +Test "tgamma (-0x1.fffffffffffffp0)":
  119755. +ildouble: 1
  119756. +ldouble: 1
  119757. +Test "tgamma (-0x13.ffffep0)":
  119758. +float: 2
  119759. +ifloat: 2
  119760. +ildouble: 1
  119761. +ldouble: 1
  119762. +Test "tgamma (-0x13.ffffffffffffffep0)":
  119763. +ildouble: 1
  119764. +ldouble: 1
  119765. +Test "tgamma (-0x13.fffffffffffffffffffffffff8p0)":
  119766. +ildouble: 1
  119767. +ldouble: 1
  119768. +Test "tgamma (-0x13.ffffffffffffp0)":
  119769. +ildouble: 2
  119770. +ldouble: 2
  119771. +Test "tgamma (-0x14.000000000000000000000000001p0)":
  119772. +ildouble: 1
  119773. +ldouble: 1
  119774. +Test "tgamma (-0x14.000000000001p0)":
  119775. +double: 1
  119776. +idouble: 1
  119777. +ildouble: 1
  119778. +ldouble: 1
  119779. +Test "tgamma (-0x14.00002p0)":
  119780. +float: 1
  119781. +ifloat: 1
  119782. +ildouble: 4
  119783. +ldouble: 4
  119784. +Test "tgamma (-0x1d.ffffep0)":
  119785. +double: 1
  119786. +float: 1
  119787. +idouble: 1
  119788. +ifloat: 1
  119789. +ildouble: 1
  119790. +ldouble: 1
  119791. +Test "tgamma (-0x1d.fffffffffffffffffffffffff8p0)":
  119792. +ildouble: 1
  119793. +ldouble: 1
  119794. +Test "tgamma (-0x1d.ffffffffffffp0)":
  119795. +ildouble: 1
  119796. +ldouble: 1
  119797. +Test "tgamma (-0x1e.000000000000000000000000001p0)":
  119798. +ildouble: 2
  119799. +ldouble: 2
  119800. +Test "tgamma (-0x1e.00000000000000000000000008p0)":
  119801. +ildouble: 1
  119802. +ldouble: 1
  119803. +Test "tgamma (-0x1e.000000000000002p0)":
  119804. +ildouble: 1
  119805. +ldouble: 1
  119806. +Test "tgamma (-0x1e.000000000001p0)":
  119807. +double: 3
  119808. +idouble: 3
  119809. +Test "tgamma (-0x1e.00002p0)":
  119810. +double: 1
  119811. +float: 1
  119812. +idouble: 1
  119813. +ifloat: 1
  119814. +ildouble: 1
  119815. +ldouble: 1
  119816. +Test "tgamma (-0x1f3.ffffffffffffffffffffffffffp0)":
  119817. +ildouble: 1
  119818. +ldouble: 1
  119819. +Test "tgamma (-0x1p-24)":
  119820. +ildouble: 1
  119821. +ldouble: 1
  119822. +Test "tgamma (-0x2.0000000000000000000000000002p0)":
  119823. +ildouble: 1
  119824. +ldouble: 1
  119825. +Test "tgamma (-0x2.0000000000002p0)":
  119826. +double: 1
  119827. +idouble: 1
  119828. +ildouble: 1
  119829. +ldouble: 1
  119830. +Test "tgamma (-0x2.000004p0)":
  119831. +double: 2
  119832. +float: 1
  119833. +idouble: 2
  119834. +ifloat: 1
  119835. +ildouble: 1
  119836. +ldouble: 1
  119837. +Test "tgamma (-0x2.fffffcp0)":
  119838. +double: 1
  119839. +float: 1
  119840. +idouble: 1
  119841. +ifloat: 1
  119842. +Test "tgamma (-0x2.ffffffffffffep0)":
  119843. +ildouble: 1
  119844. +ldouble: 1
  119845. +Test "tgamma (-0x27.fffffffffffep0)":
  119846. +double: 1
  119847. +idouble: 1
  119848. +ildouble: 1
  119849. +ldouble: 1
  119850. +Test "tgamma (-0x27.ffffffffffffffcp0)":
  119851. +ildouble: 1
  119852. +ldouble: 1
  119853. +Test "tgamma (-0x27.ffffffffffffffffffffffffffep0)":
  119854. +ildouble: 2
  119855. +ldouble: 2
  119856. +Test "tgamma (-0x27.fffffffffffffffffffffffffp0)":
  119857. +ildouble: 1
  119858. +ldouble: 1
  119859. +Test "tgamma (-0x28.0000000000000000000000001p0)":
  119860. +ildouble: 1
  119861. +ldouble: 1
  119862. +Test "tgamma (-0x28.000000000002p0)":
  119863. +double: 1
  119864. +idouble: 1
  119865. +ildouble: 1
  119866. +ldouble: 1
  119867. +Test "tgamma (-0x28.00004p0)":
  119868. +double: 2
  119869. +idouble: 2
  119870. +ildouble: 2
  119871. +ldouble: 2
  119872. +Test "tgamma (-0x28.ffffffffffffffcp0)":
  119873. +ildouble: 1
  119874. +ldouble: 1
  119875. +Test "tgamma (-0x28.ffffffffffffffffffffffffffep0)":
  119876. +ildouble: 1
  119877. +ldouble: 1
  119878. +Test "tgamma (-0x28.fffffffffffffffffffffffffp0)":
  119879. +ildouble: 1
  119880. +ldouble: 1
  119881. +Test "tgamma (-0x29.000000000000000000000000002p0)":
  119882. +ildouble: 1
  119883. +ldouble: 1
  119884. +Test "tgamma (-0x29.0000000000000000000000001p0)":
  119885. +ildouble: 2
  119886. +ldouble: 2
  119887. +Test "tgamma (-0x29.00004p0)":
  119888. +double: 1
  119889. +idouble: 1
  119890. +Test "tgamma (-0x29.ffffcp0)":
  119891. +double: 1
  119892. +idouble: 1
  119893. +Test "tgamma (-0x29.fffffffffffep0)":
  119894. +ildouble: 1
  119895. +ldouble: 1
  119896. +Test "tgamma (-0x29.ffffffffffffffcp0)":
  119897. +ildouble: 1
  119898. +ldouble: 1
  119899. +Test "tgamma (-0x29.ffffffffffffffffffffffffffep0)":
  119900. +ildouble: 1
  119901. +ldouble: 1
  119902. +Test "tgamma (-0x29.fffffffffffffffffffffffffp0)":
  119903. +ildouble: 1
  119904. +ldouble: 1
  119905. +Test "tgamma (-0x2a.000000000000000000000000002p0)":
  119906. +ildouble: 1
  119907. +ldouble: 1
  119908. +Test "tgamma (-0x2a.0000000000000000000000001p0)":
  119909. +ildouble: 1
  119910. +ldouble: 1
  119911. +Test "tgamma (-0x2a.000000000000004p0)":
  119912. +ildouble: 1
  119913. +ldouble: 1
  119914. +Test "tgamma (-0x2a.000000000002p0)":
  119915. +ildouble: 1
  119916. +ldouble: 1
  119917. +Test "tgamma (-0x2ed.fffffffffffffffffffffffffep0)":
  119918. +ildouble: 1
  119919. +ldouble: 1
  119920. +Test "tgamma (-0x2ee.00000000000004p0)":
  119921. +ildouble: 1
  119922. +ldouble: 1
  119923. +Test "tgamma (-0x3.00000000000000000000000001p0)":
  119924. +ildouble: 1
  119925. +ldouble: 1
  119926. +Test "tgamma (-0x3.000004p0)":
  119927. +double: 2
  119928. +float: 1
  119929. +idouble: 2
  119930. +ifloat: 1
  119931. +Test "tgamma (-0x3.fffffcp0)":
  119932. +double: 1
  119933. +float: 1
  119934. +idouble: 1
  119935. +ifloat: 1
  119936. +Test "tgamma (-0x3.ffffffffffffep0)":
  119937. +double: 2
  119938. +idouble: 2
  119939. +Test "tgamma (-0x3.fffffffffffffffcp0)":
  119940. +ildouble: 1
  119941. +ldouble: 1
  119942. +Test "tgamma (-0x3.fffffffffffffffffffffffffffep0)":
  119943. +ildouble: 2
  119944. +ldouble: 2
  119945. +Test "tgamma (-0x31.fffffffffffep0)":
  119946. +double: 3
  119947. +idouble: 3
  119948. +ildouble: 2
  119949. +ldouble: 2
  119950. +Test "tgamma (-0x31.ffffffffffffffcp0)":
  119951. +ildouble: 1
  119952. +ldouble: 1
  119953. +Test "tgamma (-0x31.ffffffffffffffffffffffffffep0)":
  119954. +ildouble: 1
  119955. +ldouble: 1
  119956. +Test "tgamma (-0x31.fffffffffffffffffffffffffp0)":
  119957. +ildouble: 2
  119958. +ldouble: 2
  119959. +Test "tgamma (-0x32.000000000000000000000000002p0)":
  119960. +ildouble: 1
  119961. +ldouble: 1
  119962. +Test "tgamma (-0x32.0000000000000000000000001p0)":
  119963. +ildouble: 1
  119964. +ldouble: 1
  119965. +Test "tgamma (-0x32.000000000000004p0)":
  119966. +ildouble: 1
  119967. +ldouble: 1
  119968. +Test "tgamma (-0x3e7.fffffffffffffcp0)":
  119969. +ildouble: 1
  119970. +ldouble: 1
  119971. +Test "tgamma (-0x3e7.fffffffffffffffffffffffffep0)":
  119972. +ildouble: 1
  119973. +ldouble: 1
  119974. +Test "tgamma (-0x3e8.00000000000000000000000002p0)":
  119975. +ildouble: 2
  119976. +ldouble: 2
  119977. +Test "tgamma (-0x3e8.00000000000004p0)":
  119978. +ildouble: 1
  119979. +ldouble: 1
  119980. +Test "tgamma (-0x4.0000000000004p0)":
  119981. +ildouble: 1
  119982. +ldouble: 1
  119983. +Test "tgamma (-0x4.000008p0)":
  119984. +float: 1
  119985. +ifloat: 1
  119986. +ildouble: 1
  119987. +ldouble: 1
  119988. +Test "tgamma (-0x4.fffff8p0)":
  119989. +double: 1
  119990. +idouble: 1
  119991. +Test "tgamma (-0x4.ffffffffffffcp0)":
  119992. +double: 1
  119993. +idouble: 1
  119994. +ildouble: 1
  119995. +ldouble: 1
  119996. +Test "tgamma (-0x4.fffffffffffffffffffffffffep0)":
  119997. +ildouble: 1
  119998. +ldouble: 1
  119999. +Test "tgamma (-0x4.fffffffffffffffffffffffffffcp0)":
  120000. +ildouble: 1
  120001. +ldouble: 1
  120002. +Test "tgamma (-0x5.0000000000000008p0)":
  120003. +ildouble: 1
  120004. +ldouble: 1
  120005. +Test "tgamma (-0x5.0000000000004p0)":
  120006. +ildouble: 1
  120007. +ldouble: 1
  120008. +Test "tgamma (-0x5.000008p0)":
  120009. +double: 1
  120010. +float: 1
  120011. +idouble: 1
  120012. +ifloat: 1
  120013. +Test "tgamma (-0x5.fffff8p0)":
  120014. +ildouble: 1
  120015. +ldouble: 1
  120016. +Test "tgamma (-0x5.ffffffffffffcp0)":
  120017. +double: 1
  120018. +idouble: 1
  120019. +ildouble: 1
  120020. +ldouble: 1
  120021. +Test "tgamma (-0x5.fffffffffffffff8p0)":
  120022. +ildouble: 2
  120023. +ldouble: 2
  120024. +Test "tgamma (-0x5.fffffffffffffffffffffffffep0)":
  120025. +ildouble: 1
  120026. +ldouble: 1
  120027. +Test "tgamma (-0x5.fffffffffffffffffffffffffffcp0)":
  120028. +ildouble: 1
  120029. +ldouble: 1
  120030. +Test "tgamma (-0x5db.fffffffffffff8p0)":
  120031. +ildouble: 1
  120032. +ldouble: 1
  120033. +Test "tgamma (-0x5db.fffffffffffffffffffffffffcp0)":
  120034. +ildouble: 1
  120035. +ldouble: 1
  120036. +Test "tgamma (-0x5dc.00000000000000000000000004p0)":
  120037. +ildouble: 2
  120038. +ldouble: 2
  120039. +Test "tgamma (-0x6.0000000000000000000000000004p0)":
  120040. +ildouble: 1
  120041. +ldouble: 1
  120042. +Test "tgamma (-0x6.00000000000000000000000002p0)":
  120043. +ildouble: 1
  120044. +ldouble: 1
  120045. +Test "tgamma (-0x6.0000000000004p0)":
  120046. +ildouble: 1
  120047. +ldouble: 1
  120048. +Test "tgamma (-0x6.000008p0)":
  120049. +float: 2
  120050. +ifloat: 2
  120051. +ildouble: 2
  120052. +ldouble: 2
  120053. +Test "tgamma (-0x6.fffff8p0)":
  120054. +double: 2
  120055. +float: 1
  120056. +idouble: 2
  120057. +ifloat: 1
  120058. +ildouble: 1
  120059. +ldouble: 1
  120060. +Test "tgamma (-0x6.ffffffffffffcp0)":
  120061. +double: 4
  120062. +idouble: 4
  120063. +ildouble: 1
  120064. +ldouble: 1
  120065. +Test "tgamma (-0x6.fffffffffffffff8p0)":
  120066. +ildouble: 1
  120067. +ldouble: 1
  120068. +Test "tgamma (-0x6.fffffffffffffffffffffffffffcp0)":
  120069. +ildouble: 1
  120070. +ldouble: 1
  120071. +Test "tgamma (-0x63.fffffffffffcp0)":
  120072. +double: 2
  120073. +idouble: 2
  120074. +Test "tgamma (-0x63.ffffffffffffff8p0)":
  120075. +ildouble: 2
  120076. +ldouble: 2
  120077. +Test "tgamma (-0x63.ffffffffffffffffffffffffep0)":
  120078. +ildouble: 2
  120079. +ldouble: 2
  120080. +Test "tgamma (-0x64.000000000000000000000000004p0)":
  120081. +ildouble: 2
  120082. +ldouble: 2
  120083. +Test "tgamma (-0x64.0000000000000000000000002p0)":
  120084. +ildouble: 1
  120085. +ldouble: 1
  120086. +Test "tgamma (-0x64.000000000004p0)":
  120087. +double: 1
  120088. +idouble: 1
  120089. +ildouble: 1
  120090. +ldouble: 1
  120091. +Test "tgamma (-0x6d5.fffffffffffff8p0)":
  120092. +ildouble: 1
  120093. +ldouble: 1
  120094. +Test "tgamma (-0x6d6.00000000000000000000000004p0)":
  120095. +ildouble: 1
  120096. +ldouble: 1
  120097. +Test "tgamma (-0x6e3.00000000000000000000000004p0)":
  120098. +ildouble: 2
  120099. +ldouble: 2
  120100. +Test "tgamma (-0x7.0000000000000008p0)":
  120101. +ildouble: 1
  120102. +ldouble: 1
  120103. +Test "tgamma (-0x7.0000000000004p0)":
  120104. +double: 3
  120105. +idouble: 3
  120106. +Test "tgamma (-0x7.000008p0)":
  120107. +double: 1
  120108. +float: 1
  120109. +idouble: 1
  120110. +ifloat: 1
  120111. +Test "tgamma (-0x7.fffff8p0)":
  120112. +double: 3
  120113. +float: 1
  120114. +idouble: 3
  120115. +ifloat: 1
  120116. +Test "tgamma (-0x7.ffffffffffffcp0)":
  120117. +double: 3
  120118. +idouble: 3
  120119. +Test "tgamma (-0x7.fffffffffffffff8p0)":
  120120. +ildouble: 1
  120121. +ldouble: 1
  120122. +Test "tgamma (-0x7.fffffffffffffffffffffffffep0)":
  120123. +ildouble: 1
  120124. +ldouble: 1
  120125. +Test "tgamma (-0x7.fffffffffffffffffffffffffffcp0)":
  120126. +ildouble: 1
  120127. +ldouble: 1
  120128. +Test "tgamma (-0x8.0000000000000000000000000008p0)":
  120129. +ildouble: 1
  120130. +ldouble: 1
  120131. +Test "tgamma (-0x8.00000000000000000000000004p0)":
  120132. +ildouble: 1
  120133. +ldouble: 1
  120134. +Test "tgamma (-0x8.0000000000008p0)":
  120135. +ildouble: 1
  120136. +ldouble: 1
  120137. +Test "tgamma (-0x8.00001p0)":
  120138. +double: 2
  120139. +idouble: 2
  120140. +ildouble: 1
  120141. +ldouble: 1
  120142. +Test "tgamma (-0x9.ffffffffffff8p0)":
  120143. +double: 1
  120144. +idouble: 1
  120145. +Test "tgamma (-0x9.fffffffffffffffffffffffffff8p0)":
  120146. +ildouble: 1
  120147. +ldouble: 1
  120148. +Test "tgamma (-0x9.fffffp0)":
  120149. +float: 1
  120150. +ifloat: 1
  120151. +Test "tgamma (-0x95.ffffffffffffffp0)":
  120152. +ildouble: 1
  120153. +ldouble: 1
  120154. +Test "tgamma (-0x96.000000000000000000000000008p0)":
  120155. +ildouble: 1
  120156. +ldouble: 1
  120157. +Test "tgamma (-0x96.0000000000000000000000004p0)":
  120158. +ildouble: 1
  120159. +ldouble: 1
  120160. +Test "tgamma (-0x96.00000000000001p0)":
  120161. +ildouble: 2
  120162. +ldouble: 2
  120163. +Test "tgamma (-0x96.000000000008p0)":
  120164. +double: 1
  120165. +idouble: 1
  120166. +Test "tgamma (-0xa.0000000000008p0)":
  120167. +ildouble: 1
  120168. +ldouble: 1
  120169. +Test "tgamma (-0xa.00001p0)":
  120170. +double: 1
  120171. +idouble: 1
  120172. +ildouble: 1
  120173. +ldouble: 1
  120174. +Test "tgamma (-0xb4.ffffffffffffffffffffffffcp0)":
  120175. +ildouble: 1
  120176. +ldouble: 1
  120177. +Test "tgamma (-0xb4.ffffffffffffffp0)":
  120178. +ildouble: 1
  120179. +ldouble: 1
  120180. +Test "tgamma (-0xb5.0000000000000000000000004p0)":
  120181. +ildouble: 1
  120182. +ldouble: 1
  120183. +Test "tgamma (-0xb5.00000000000001p0)":
  120184. +ildouble: 2
  120185. +ldouble: 2
  120186. +Test "tgamma (-0xb5.000000000008p0)":
  120187. +ildouble: 1
  120188. +ldouble: 1
  120189. +Test "tgamma (-0xb5.ffffffffffffffffffffffffff8p0)":
  120190. +ildouble: 1
  120191. +ldouble: 1
  120192. +Test "tgamma (-0xb6.00000000000001p0)":
  120193. +ildouble: 1
  120194. +ldouble: 1
  120195. +Test "tgamma (-0xb6.000000000008p0)":
  120196. +ildouble: 1
  120197. +ldouble: 1
  120198. +Test "tgamma (-0xb6.fffffffffff8p0)":
  120199. +ildouble: 1
  120200. +ldouble: 1
  120201. +Test "tgamma (-0xb6.ffffffffffffffffffffffffff8p0)":
  120202. +ildouble: 3
  120203. +ldouble: 3
  120204. +Test "tgamma (-0xb7.000000000000000000000000008p0)":
  120205. +ildouble: 1
  120206. +ldouble: 1
  120207. +Test "tgamma (-0xb7.00000000000001p0)":
  120208. +ildouble: 2
  120209. +ldouble: 2
  120210. +Test "tgamma (-0xb7.000000000008p0)":
  120211. +ildouble: 1
  120212. +ldouble: 1
  120213. +Test "tgamma (-0xb7.ffffffffffffffffffffffffcp0)":
  120214. +ildouble: 1
  120215. +ldouble: 1
  120216. +Test "tgamma (-0xb7.ffffffffffffffffffffffffff8p0)":
  120217. +ildouble: 1
  120218. +ldouble: 1
  120219. +Test "tgamma (-0xb8.00000000000001p0)":
  120220. +ildouble: 1
  120221. +ldouble: 1
  120222. +Test "tgamma (-0xbb.ffffffffffffffffffffffffcp0)":
  120223. +ildouble: 3
  120224. +ldouble: 3
  120225. +Test "tgamma (-0xbb.ffffffffffffffffffffffffff8p0)":
  120226. +ildouble: 4
  120227. +ldouble: 4
  120228. +Test "tgamma (-0xbc.000000000000000000000000008p0)":
  120229. +ildouble: 1
  120230. +ldouble: 1
  120231. +Test "tgamma (-0xbc.0000000000000000000000004p0)":
  120232. +ildouble: 2
  120233. +ldouble: 2
  120234. +Test "tgamma (-0xbc.00000000000001p0)":
  120235. +ildouble: 2
  120236. +ldouble: 2
  120237. +Test "tgamma (-0xbc.ffffffffffffffp0)":
  120238. +ildouble: 1
  120239. +ldouble: 1
  120240. +Test "tgamma (-0xbd.000000000000000000000000008p0)":
  120241. +ildouble: 1
  120242. +ldouble: 1
  120243. +Test "tgamma (-0xbd.00000000000001p0)":
  120244. +ildouble: 2
  120245. +ldouble: 2
  120246. +Test "tgamma (-0xbd.ffffffffffffffp0)":
  120247. +ildouble: 2
  120248. +ldouble: 2
  120249. +Test "tgamma (-0xbe.000000000000000000000000008p0)":
  120250. +ildouble: 1
  120251. +ldouble: 1
  120252. +Test "tgamma (-0xbe.0000000000000000000000004p0)":
  120253. +ildouble: 1
  120254. +ldouble: 1
  120255. +Test "tgamma (-0xbe.ffffffffffffffffffffffffcp0)":
  120256. +ildouble: 1
  120257. +ldouble: 1
  120258. +Test "tgamma (-0xbe.ffffffffffffffp0)":
  120259. +ildouble: 1
  120260. +ldouble: 1
  120261. +Test "tgamma (-0xbf.000000000000000000000000008p0)":
  120262. +ildouble: 1
  120263. +ldouble: 1
  120264. +Test "tgamma (-0xbf.0000000000000000000000004p0)":
  120265. +ildouble: 1
  120266. +ldouble: 1
  120267. +Test "tgamma (-0xbf.00000000000001p0)":
  120268. +ildouble: 1
  120269. +ldouble: 1
  120270. +Test "tgamma (-0xf9.ffffffffffffffp0)":
  120271. +ildouble: 1
  120272. +ldouble: 1
  120273. +Test "tgamma (-0xfa.000000000000000000000000008p0)":
  120274. +ildouble: 1
  120275. +ldouble: 1
  120276. +Test "tgamma (-2.5)":
  120277. +double: 1
  120278. +float: 2
  120279. +idouble: 1
  120280. +ifloat: 2
  120281. +ildouble: 1
  120282. +ldouble: 1
  120283. +Test "tgamma (-3.5)":
  120284. +double: 1
  120285. +float: 1
  120286. +idouble: 1
  120287. +ifloat: 1
  120288. +ildouble: 1
  120289. +ldouble: 1
  120290. +Test "tgamma (-4.5)":
  120291. +double: 1
  120292. +float: 1
  120293. +idouble: 1
  120294. +ifloat: 1
  120295. +Test "tgamma (-5.5)":
  120296. +double: 1
  120297. +idouble: 1
  120298. +Test "tgamma (-6.5)":
  120299. +float: 1
  120300. +ifloat: 1
  120301. +ildouble: 1
  120302. +ldouble: 1
  120303. +Test "tgamma (-7.5)":
  120304. +double: 2
  120305. +float: 1
  120306. +idouble: 2
  120307. +ifloat: 1
  120308. +Test "tgamma (-8.5)":
  120309. +double: 1
  120310. +float: 1
  120311. +idouble: 1
  120312. +ifloat: 1
  120313. +Test "tgamma (-9.5)":
  120314. +double: 1
  120315. +float: 1
  120316. +idouble: 1
  120317. +ifloat: 1
  120318. +Test "tgamma (0.5)":
  120319. +float: 1
  120320. +ifloat: 1
  120321. +Test "tgamma (0.7)":
  120322. +double: 1
  120323. +float: 1
  120324. +idouble: 1
  120325. +ifloat: 1
  120326. +Test "tgamma (0x1.fffffep0)":
  120327. +float: 1
  120328. +ifloat: 1
  120329. +Test "tgamma (0x1.fffffffffffffffep0)":
  120330. +ildouble: 1
  120331. +ldouble: 1
  120332. +Test "tgamma (0x1.ffffffffffffffffffffffffffffp0)":
  120333. +ildouble: 1
  120334. +ldouble: 1
  120335. +Test "tgamma (0x1.fffffffffffffp0)":
  120336. +double: 1
  120337. +idouble: 1
  120338. +ildouble: 1
  120339. +ldouble: 1
  120340. +Test "tgamma (0x1p-113)":
  120341. +ildouble: 1
  120342. +ldouble: 1
  120343. +Test "tgamma (0x1p-24)":
  120344. +float: 1
  120345. +ifloat: 1
  120346. +Test "tgamma (0x1p-53)":
  120347. +double: 1
  120348. +idouble: 1
  120349. +Test "tgamma (0x2.30a43cp+4)":
  120350. +double: 1
  120351. +float: 2
  120352. +idouble: 1
  120353. +ifloat: 2
  120354. +ildouble: 2
  120355. +ldouble: 2
  120356. +Test "tgamma (0x2.fffffcp0)":
  120357. +float: 3
  120358. +ifloat: 3
  120359. +Test "tgamma (0x2.ffffffffffffep0)":
  120360. +ildouble: 1
  120361. +ldouble: 1
  120362. +Test "tgamma (0x3.0000000000002p0)":
  120363. +ildouble: 1
  120364. +ldouble: 1
  120365. +Test "tgamma (0x3.fffffcp0)":
  120366. +float: 1
  120367. +ifloat: 1
  120368. +Test "tgamma (0x3.ffffffffffffep0)":
  120369. +double: 1
  120370. +idouble: 1
  120371. +ildouble: 1
  120372. +ldouble: 1
  120373. +Test "tgamma (0x3.fffffffffffffffcp0)":
  120374. +ildouble: 1
  120375. +ldouble: 1
  120376. +Test "tgamma (0x3.fffffffffffffffffffffffffffep0)":
  120377. +ildouble: 1
  120378. +ldouble: 1
  120379. +Test "tgamma (0x4.0000000000000000000000000004p0)":
  120380. +ildouble: 1
  120381. +ldouble: 1
  120382. +Test "tgamma (0x4.0000000000004p0)":
  120383. +double: 1
  120384. +idouble: 1
  120385. +Test "tgamma (0x4.000008p0)":
  120386. +ildouble: 1
  120387. +ldouble: 1
  120388. +Test "tgamma (0x4.ffffffffffffcp0)":
  120389. +double: 1
  120390. +idouble: 1
  120391. +Test "tgamma (0x4.fffffffffffffffffffffffffep0)":
  120392. +ildouble: 1
  120393. +ldouble: 1
  120394. +Test "tgamma (0x4.fffffffffffffffffffffffffffcp0)":
  120395. +ildouble: 1
  120396. +ldouble: 1
  120397. +Test "tgamma (0x5.0000000000000000000000000004p0)":
  120398. +ildouble: 1
  120399. +ldouble: 1
  120400. +Test "tgamma (0x5.0000000000004p0)":
  120401. +double: 1
  120402. +idouble: 1
  120403. +Test "tgamma (0x5.000008p0)":
  120404. +float: 2
  120405. +ifloat: 2
  120406. +Test "tgamma (0x5.fffff8p0)":
  120407. +double: 1
  120408. +float: 1
  120409. +idouble: 1
  120410. +ifloat: 1
  120411. +Test "tgamma (0x5.ffffffffffffcp0)":
  120412. +ildouble: 1
  120413. +ldouble: 1
  120414. +Test "tgamma (0x5.fffffffffffffff8p0)":
  120415. +ildouble: 1
  120416. +ldouble: 1
  120417. +Test "tgamma (0x5.fffffffffffffffffffffffffep0)":
  120418. +ildouble: 1
  120419. +ldouble: 1
  120420. +Test "tgamma (0x6.0000000000000000000000000004p0)":
  120421. +ildouble: 1
  120422. +ldouble: 1
  120423. +Test "tgamma (0x6.0000000000000008p0)":
  120424. +ildouble: 1
  120425. +ldouble: 1
  120426. +Test "tgamma (0x6.0000000000004p0)":
  120427. +double: 1
  120428. +idouble: 1
  120429. +Test "tgamma (0x6.000008p0)":
  120430. +float: 2
  120431. +ifloat: 2
  120432. +ildouble: 1
  120433. +ldouble: 1
  120434. +Test "tgamma (0x6.fffff8p0)":
  120435. +double: 1
  120436. +idouble: 1
  120437. +ildouble: 1
  120438. +ldouble: 1
  120439. +Test "tgamma (0x6.ffffffffffffcp0)":
  120440. +double: 4
  120441. +idouble: 4
  120442. +Test "tgamma (0x6.fffffffffffffff8p0)":
  120443. +ildouble: 1
  120444. +ldouble: 1
  120445. +Test "tgamma (0x7.0000000000000000000000000004p0)":
  120446. +ildouble: 1
  120447. +ldouble: 1
  120448. +Test "tgamma (0x7.0000000000000008p0)":
  120449. +ildouble: 1
  120450. +ldouble: 1
  120451. +Test "tgamma (0x7.0000000000004p0)":
  120452. +double: 4
  120453. +idouble: 4
  120454. +Test "tgamma (0x7.000008p0)":
  120455. +double: 1
  120456. +float: 1
  120457. +idouble: 1
  120458. +ifloat: 1
  120459. +Test "tgamma (0x7.fffff8p0)":
  120460. +double: 2
  120461. +float: 1
  120462. +idouble: 2
  120463. +ifloat: 1
  120464. +Test "tgamma (0x7.ffffffffffffcp0)":
  120465. +double: 2
  120466. +idouble: 2
  120467. +ildouble: 1
  120468. +ldouble: 1
  120469. +Test "tgamma (0x7.fffffffffffffffffffffffffffcp0)":
  120470. +ildouble: 1
  120471. +ldouble: 1
  120472. +Test "tgamma (0x8.0000000000000000000000000008p0)":
  120473. +ildouble: 1
  120474. +ldouble: 1
  120475. +Test "tgamma (0x8.0000000000008p0)":
  120476. +ildouble: 1
  120477. +ldouble: 1
  120478. +Test "tgamma (0x8.00001p0)":
  120479. +double: 2
  120480. +idouble: 2
  120481. +Test "tgamma (0xa.b9fd72b0fb238p+4)":
  120482. +double: 1
  120483. +idouble: 1
  120484. +ildouble: 1
  120485. +ldouble: 1
  120486. +Test "tgamma (0xa.b9fd72b0fb23a9ddbf0d3804f8p+4)":
  120487. +ildouble: 2
  120488. +ldouble: 2
  120489. +Test "tgamma (10)":
  120490. +double: 1
  120491. +float: 1
  120492. +idouble: 1
  120493. +ifloat: 1
  120494. +Test "tgamma (18.5)":
  120495. +double: 1
  120496. +float: 1
  120497. +idouble: 1
  120498. +ifloat: 1
  120499. +Test "tgamma (19.5)":
  120500. +double: 2
  120501. +idouble: 2
  120502. +ildouble: 1
  120503. +ldouble: 1
  120504. +Test "tgamma (2.5)":
  120505. +float: 2
  120506. +ifloat: 2
  120507. +Test "tgamma (23.5)":
  120508. +double: 1
  120509. +float: 1
  120510. +idouble: 1
  120511. +ifloat: 1
  120512. +Test "tgamma (29.5)":
  120513. +double: 1
  120514. +float: 1
  120515. +idouble: 1
  120516. +ifloat: 1
  120517. +Test "tgamma (3)":
  120518. +float: 1
  120519. +ifloat: 1
  120520. +Test "tgamma (3.5)":
  120521. +float: 2
  120522. +ifloat: 2
  120523. +ildouble: 1
  120524. +ldouble: 1
  120525. +Test "tgamma (30.5)":
  120526. +float: 1
  120527. +ifloat: 1
  120528. +Test "tgamma (32.5)":
  120529. +ildouble: 1
  120530. +ldouble: 1
  120531. +Test "tgamma (33.5)":
  120532. +float: 1
  120533. +ifloat: 1
  120534. +ildouble: 1
  120535. +ldouble: 1
  120536. +Test "tgamma (34.5)":
  120537. +double: 1
  120538. +float: 2
  120539. +idouble: 1
  120540. +ifloat: 2
  120541. +Test "tgamma (4)":
  120542. +float: 1
  120543. +ifloat: 1
  120544. +Test "tgamma (4.5)":
  120545. +double: 1
  120546. +float: 1
  120547. +idouble: 1
  120548. +ifloat: 1
  120549. +Test "tgamma (6)":
  120550. +float: 1
  120551. +ifloat: 1
  120552. +Test "tgamma (6.5)":
  120553. +float: 1
  120554. +ifloat: 1
  120555. +Test "tgamma (7)":
  120556. +double: 1
  120557. +idouble: 1
  120558. +Test "tgamma (7.5)":
  120559. +double: 2
  120560. +float: 1
  120561. +idouble: 2
  120562. +ifloat: 1
  120563. +Test "tgamma (8)":
  120564. +double: 1
  120565. +idouble: 1
  120566. +Test "tgamma (8.5)":
  120567. +double: 1
  120568. +float: 1
  120569. +idouble: 1
  120570. +ifloat: 1
  120571. +Test "tgamma (9)":
  120572. +double: 1
  120573. +idouble: 1
  120574. +Test "tgamma (9.5)":
  120575. +double: 1
  120576. +idouble: 1
  120577. +ildouble: 1
  120578. +ldouble: 1
  120579. +
  120580. +# y0
  120581. +Test "y0 (0x1.3ffp+74)":
  120582. +double: 1
  120583. +idouble: 1
  120584. +ildouble: 1
  120585. +ldouble: 1
  120586. +Test "y0 (0x1.ff00000000002p+840)":
  120587. +double: 1
  120588. +idouble: 1
  120589. +ildouble: 1
  120590. +ldouble: 1
  120591. +Test "y0 (0x1p-10)":
  120592. +double: 1
  120593. +idouble: 1
  120594. +ildouble: 1
  120595. +ldouble: 1
  120596. +Test "y0 (0x1p-110)":
  120597. +double: 1
  120598. +idouble: 1
  120599. +ildouble: 1
  120600. +ldouble: 1
  120601. +Test "y0 (0x1p-20)":
  120602. +float: 1
  120603. +ifloat: 1
  120604. +Test "y0 (0x1p-30)":
  120605. +float: 1
  120606. +ifloat: 1
  120607. +ildouble: 2
  120608. +ldouble: 2
  120609. +Test "y0 (0x1p-40)":
  120610. +double: 1
  120611. +float: 1
  120612. +idouble: 1
  120613. +ifloat: 1
  120614. +Test "y0 (0x1p-50)":
  120615. +float: 1
  120616. +ifloat: 1
  120617. +Test "y0 (0x1p-60)":
  120618. +ildouble: 1
  120619. +ldouble: 1
  120620. +Test "y0 (0x1p-70)":
  120621. +double: 1
  120622. +idouble: 1
  120623. +Test "y0 (0x1p-80)":
  120624. +double: 1
  120625. +float: 1
  120626. +idouble: 1
  120627. +ifloat: 1
  120628. +Test "y0 (0x1p1023)":
  120629. +ildouble: 1
  120630. +ldouble: 1
  120631. +Test "y0 (0x1p16382)":
  120632. +ildouble: 1
  120633. +ldouble: 1
  120634. +Test "y0 (0x1p16383)":
  120635. +ildouble: 2
  120636. +ldouble: 2
  120637. +Test "y0 (1.0)":
  120638. +double: 2
  120639. +float: 1
  120640. +idouble: 2
  120641. +ifloat: 1
  120642. +Test "y0 (1.5)":
  120643. +double: 2
  120644. +float: 1
  120645. +idouble: 2
  120646. +ifloat: 1
  120647. +Test "y0 (10.0)":
  120648. +float: 1
  120649. +ifloat: 1
  120650. +ildouble: 3
  120651. +ldouble: 3
  120652. +Test "y0 (8.0)":
  120653. +double: 1
  120654. +float: 1
  120655. +idouble: 1
  120656. +ifloat: 1
  120657. +ildouble: 3
  120658. +ldouble: 3
  120659. +
  120660. +# y1
  120661. +Test "y1 (0.125)":
  120662. +double: 1
  120663. +idouble: 1
  120664. +Test "y1 (0.75)":
  120665. +ildouble: 1
  120666. +ldouble: 1
  120667. +Test "y1 (0x1.001000001p+593)":
  120668. +ildouble: 1
  120669. +ldouble: 1
  120670. +Test "y1 (0x1.27e204p+99)":
  120671. +double: 1
  120672. +idouble: 1
  120673. +Test "y1 (0x1p-10)":
  120674. +double: 1
  120675. +idouble: 1
  120676. +ildouble: 1
  120677. +ldouble: 1
  120678. +Test "y1 (0x1p-30)":
  120679. +ildouble: 1
  120680. +ldouble: 1
  120681. +Test "y1 (0x1p1023)":
  120682. +ildouble: 1
  120683. +ldouble: 1
  120684. +Test "y1 (0x1p16383)":
  120685. +ildouble: 2
  120686. +ldouble: 2
  120687. +Test "y1 (1.5)":
  120688. +float: 1
  120689. +ifloat: 1
  120690. +ildouble: 1
  120691. +ldouble: 1
  120692. +Test "y1 (10.0)":
  120693. +double: 3
  120694. +float: 1
  120695. +idouble: 3
  120696. +ifloat: 1
  120697. +Test "y1 (2.0)":
  120698. +double: 1
  120699. +float: 1
  120700. +idouble: 1
  120701. +ifloat: 1
  120702. +ildouble: 1
  120703. +ldouble: 1
  120704. +Test "y1 (8.0)":
  120705. +double: 1
  120706. +float: 2
  120707. +idouble: 1
  120708. +ifloat: 2
  120709. +ildouble: 1
  120710. +ldouble: 1
  120711. +
  120712. +# yn
  120713. +Test "yn (0, 1.0)":
  120714. +double: 2
  120715. +float: 1
  120716. +idouble: 2
  120717. +ifloat: 1
  120718. +Test "yn (0, 1.5)":
  120719. +double: 2
  120720. +float: 1
  120721. +idouble: 2
  120722. +ifloat: 1
  120723. +Test "yn (0, 10.0)":
  120724. +float: 1
  120725. +ifloat: 1
  120726. +ildouble: 3
  120727. +ldouble: 3
  120728. +Test "yn (0, 8.0)":
  120729. +double: 1
  120730. +float: 1
  120731. +idouble: 1
  120732. +ifloat: 1
  120733. +ildouble: 3
  120734. +ldouble: 3
  120735. +Test "yn (1, 0.125)":
  120736. +double: 1
  120737. +idouble: 1
  120738. +Test "yn (1, 0.75)":
  120739. +ildouble: 1
  120740. +ldouble: 1
  120741. +Test "yn (1, 1.5)":
  120742. +float: 1
  120743. +ifloat: 1
  120744. +ildouble: 1
  120745. +ldouble: 1
  120746. +Test "yn (1, 10.0)":
  120747. +double: 3
  120748. +float: 1
  120749. +idouble: 3
  120750. +ifloat: 1
  120751. +Test "yn (1, 2.0)":
  120752. +double: 1
  120753. +float: 1
  120754. +idouble: 1
  120755. +ifloat: 1
  120756. +ildouble: 1
  120757. +ldouble: 1
  120758. +Test "yn (1, 8.0)":
  120759. +double: 1
  120760. +float: 2
  120761. +idouble: 1
  120762. +ifloat: 2
  120763. +ildouble: 1
  120764. +ldouble: 1
  120765. +Test "yn (10, 0.125)":
  120766. +double: 1
  120767. +idouble: 1
  120768. +ildouble: 2
  120769. +ldouble: 2
  120770. +Test "yn (10, 0.75)":
  120771. +double: 1
  120772. +float: 1
  120773. +idouble: 1
  120774. +ifloat: 1
  120775. +ildouble: 5
  120776. +ldouble: 5
  120777. +Test "yn (10, 1.0)":
  120778. +double: 1
  120779. +idouble: 1
  120780. +ildouble: 1
  120781. +ldouble: 1
  120782. +Test "yn (10, 10.0)":
  120783. +double: 1
  120784. +float: 1
  120785. +idouble: 1
  120786. +ifloat: 1
  120787. +ildouble: 2
  120788. +ldouble: 2
  120789. +Test "yn (10, 2.0)":
  120790. +double: 2
  120791. +idouble: 2
  120792. +ildouble: 2
  120793. +ldouble: 2
  120794. +Test "yn (3, 0.125)":
  120795. +double: 1
  120796. +idouble: 1
  120797. +Test "yn (3, 0.75)":
  120798. +double: 1
  120799. +float: 1
  120800. +idouble: 1
  120801. +ifloat: 1
  120802. +ildouble: 2
  120803. +ldouble: 2
  120804. +Test "yn (3, 10.0)":
  120805. +double: 1
  120806. +float: 1
  120807. +idouble: 1
  120808. +ifloat: 1
  120809. +ildouble: 1
  120810. +ldouble: 1
  120811. +Test "yn (3, 2.0)":
  120812. +double: 1
  120813. +idouble: 1
  120814. +
  120815. +# Maximal error of functions:
  120816. +Function: "acos_downward":
  120817. +double: 1
  120818. +float: 1
  120819. +idouble: 1
  120820. +ifloat: 1
  120821. +
  120822. +Function: "acos_towardzero":
  120823. +double: 1
  120824. +float: 1
  120825. +idouble: 1
  120826. +ifloat: 1
  120827. +
  120828. +Function: "asin_downward":
  120829. +double: 1
  120830. +float: 1
  120831. +idouble: 1
  120832. +ifloat: 1
  120833. +
  120834. +Function: "asin_towardzero":
  120835. +double: 1
  120836. +float: 1
  120837. +idouble: 1
  120838. +ifloat: 1
  120839. +
  120840. +Function: "asin_upward":
  120841. +float: 1
  120842. +ifloat: 1
  120843. +
  120844. +Function: "atan2":
  120845. +float: 1
  120846. +ifloat: 1
  120847. +ildouble: 1
  120848. +ldouble: 1
  120849. +
  120850. +Function: "atanh":
  120851. +float: 1
  120852. +ifloat: 1
  120853. +
  120854. +Function: Real part of "cacos":
  120855. +double: 1
  120856. +float: 2
  120857. +idouble: 1
  120858. +ifloat: 2
  120859. +ildouble: 2
  120860. +ldouble: 2
  120861. +
  120862. +Function: Imaginary part of "cacos":
  120863. +double: 1
  120864. +float: 2
  120865. +idouble: 1
  120866. +ifloat: 2
  120867. +ildouble: 2
  120868. +ldouble: 2
  120869. +
  120870. +Function: Real part of "cacosh":
  120871. +double: 1
  120872. +float: 2
  120873. +idouble: 1
  120874. +ifloat: 2
  120875. +ildouble: 2
  120876. +ldouble: 2
  120877. +
  120878. +Function: Imaginary part of "cacosh":
  120879. +double: 1
  120880. +float: 2
  120881. +idouble: 1
  120882. +ifloat: 2
  120883. +ildouble: 2
  120884. +ldouble: 2
  120885. +
  120886. +Function: Real part of "casin":
  120887. +double: 1
  120888. +float: 1
  120889. +idouble: 1
  120890. +ifloat: 1
  120891. +ildouble: 2
  120892. +ldouble: 2
  120893. +
  120894. +Function: Imaginary part of "casin":
  120895. +double: 1
  120896. +float: 2
  120897. +idouble: 1
  120898. +ifloat: 2
  120899. +ildouble: 2
  120900. +ldouble: 2
  120901. +
  120902. +Function: Real part of "casinh":
  120903. +double: 1
  120904. +float: 2
  120905. +idouble: 1
  120906. +ifloat: 2
  120907. +ildouble: 2
  120908. +ldouble: 2
  120909. +
  120910. +Function: Imaginary part of "casinh":
  120911. +double: 1
  120912. +float: 1
  120913. +idouble: 1
  120914. +ifloat: 1
  120915. +ildouble: 2
  120916. +ldouble: 2
  120917. +
  120918. +Function: Real part of "catan":
  120919. +float: 1
  120920. +ifloat: 1
  120921. +ildouble: 1
  120922. +ldouble: 1
  120923. +
  120924. +Function: Imaginary part of "catan":
  120925. +double: 1
  120926. +float: 1
  120927. +idouble: 1
  120928. +ifloat: 1
  120929. +ildouble: 1
  120930. +ldouble: 1
  120931. +
  120932. +Function: Real part of "catanh":
  120933. +double: 1
  120934. +float: 1
  120935. +idouble: 1
  120936. +ifloat: 1
  120937. +ildouble: 1
  120938. +ldouble: 1
  120939. +
  120940. +Function: Imaginary part of "catanh":
  120941. +float: 1
  120942. +ifloat: 1
  120943. +ildouble: 1
  120944. +ldouble: 1
  120945. +
  120946. +Function: "cbrt":
  120947. +double: 1
  120948. +idouble: 1
  120949. +ildouble: 1
  120950. +ldouble: 1
  120951. +
  120952. +Function: Real part of "ccos":
  120953. +double: 1
  120954. +float: 1
  120955. +idouble: 1
  120956. +ifloat: 1
  120957. +ildouble: 1
  120958. +ldouble: 1
  120959. +
  120960. +Function: Imaginary part of "ccos":
  120961. +double: 1
  120962. +float: 1
  120963. +idouble: 1
  120964. +ifloat: 1
  120965. +ildouble: 1
  120966. +ldouble: 1
  120967. +
  120968. +Function: Real part of "ccosh":
  120969. +double: 1
  120970. +float: 1
  120971. +idouble: 1
  120972. +ifloat: 1
  120973. +ildouble: 1
  120974. +ldouble: 1
  120975. +
  120976. +Function: Imaginary part of "ccosh":
  120977. +double: 1
  120978. +float: 1
  120979. +idouble: 1
  120980. +ifloat: 1
  120981. +ildouble: 1
  120982. +ldouble: 1
  120983. +
  120984. +Function: Real part of "cexp":
  120985. +double: 2
  120986. +float: 1
  120987. +idouble: 2
  120988. +ifloat: 1
  120989. +ildouble: 1
  120990. +ldouble: 1
  120991. +
  120992. +Function: Imaginary part of "cexp":
  120993. +double: 1
  120994. +float: 2
  120995. +idouble: 1
  120996. +ifloat: 2
  120997. +ildouble: 1
  120998. +ldouble: 1
  120999. +
  121000. +Function: Real part of "clog":
  121001. +double: 1
  121002. +float: 1
  121003. +idouble: 1
  121004. +ifloat: 1
  121005. +ildouble: 1
  121006. +ldouble: 1
  121007. +
  121008. +Function: Imaginary part of "clog":
  121009. +float: 1
  121010. +ifloat: 1
  121011. +ildouble: 1
  121012. +ldouble: 1
  121013. +
  121014. +Function: Real part of "clog10":
  121015. +double: 2
  121016. +float: 2
  121017. +idouble: 2
  121018. +ifloat: 2
  121019. +ildouble: 1
  121020. +ldouble: 1
  121021. +
  121022. +Function: Imaginary part of "clog10":
  121023. +double: 1
  121024. +float: 1
  121025. +idouble: 1
  121026. +ifloat: 1
  121027. +ildouble: 2
  121028. +ldouble: 2
  121029. +
  121030. +Function: "cos":
  121031. +double: 2
  121032. +float: 1
  121033. +idouble: 2
  121034. +ifloat: 1
  121035. +ildouble: 1
  121036. +ldouble: 1
  121037. +
  121038. +Function: "cos_downward":
  121039. +float: 1
  121040. +ifloat: 1
  121041. +
  121042. +Function: "cos_tonearest":
  121043. +float: 1
  121044. +ifloat: 1
  121045. +
  121046. +Function: "cos_towardzero":
  121047. +float: 1
  121048. +ifloat: 1
  121049. +
  121050. +Function: "cos_upward":
  121051. +float: 2
  121052. +ifloat: 2
  121053. +
  121054. +Function: "cosh_downward":
  121055. +float: 1
  121056. +ifloat: 1
  121057. +
  121058. +Function: "cosh_tonearest":
  121059. +ildouble: 1
  121060. +ldouble: 1
  121061. +
  121062. +Function: "cosh_towardzero":
  121063. +float: 1
  121064. +ifloat: 1
  121065. +
  121066. +Function: Real part of "cpow":
  121067. +double: 2
  121068. +float: 4
  121069. +idouble: 2
  121070. +ifloat: 4
  121071. +ildouble: 4
  121072. +ldouble: 4
  121073. +
  121074. +Function: Imaginary part of "cpow":
  121075. +float: 2
  121076. +ifloat: 2
  121077. +ildouble: 1
  121078. +ldouble: 1
  121079. +
  121080. +Function: Real part of "csin":
  121081. +double: 1
  121082. +float: 1
  121083. +idouble: 1
  121084. +ifloat: 1
  121085. +ildouble: 1
  121086. +ldouble: 1
  121087. +
  121088. +Function: Imaginary part of "csin":
  121089. +ildouble: 1
  121090. +ldouble: 1
  121091. +
  121092. +Function: Real part of "csinh":
  121093. +float: 1
  121094. +ifloat: 1
  121095. +ildouble: 1
  121096. +ldouble: 1
  121097. +
  121098. +Function: Imaginary part of "csinh":
  121099. +double: 1
  121100. +float: 1
  121101. +idouble: 1
  121102. +ifloat: 1
  121103. +ildouble: 1
  121104. +ldouble: 1
  121105. +
  121106. +Function: Real part of "csqrt":
  121107. +double: 1
  121108. +float: 1
  121109. +idouble: 1
  121110. +ifloat: 1
  121111. +ildouble: 1
  121112. +ldouble: 1
  121113. +
  121114. +Function: Imaginary part of "csqrt":
  121115. +double: 1
  121116. +float: 1
  121117. +idouble: 1
  121118. +ifloat: 1
  121119. +ildouble: 1
  121120. +ldouble: 1
  121121. +
  121122. +Function: Real part of "ctan":
  121123. +double: 1
  121124. +float: 1
  121125. +idouble: 1
  121126. +ifloat: 1
  121127. +ildouble: 2
  121128. +ldouble: 2
  121129. +
  121130. +Function: Imaginary part of "ctan":
  121131. +double: 1
  121132. +idouble: 1
  121133. +ildouble: 2
  121134. +ldouble: 2
  121135. +
  121136. +Function: Real part of "ctan_downward":
  121137. +double: 2
  121138. +float: 1
  121139. +idouble: 2
  121140. +ifloat: 1
  121141. +
  121142. +Function: Imaginary part of "ctan_downward":
  121143. +float: 1
  121144. +ifloat: 1
  121145. +
  121146. +Function: Real part of "ctan_tonearest":
  121147. +float: 1
  121148. +ifloat: 1
  121149. +ildouble: 3
  121150. +ldouble: 3
  121151. +
  121152. +Function: Imaginary part of "ctan_tonearest":
  121153. +float: 1
  121154. +ifloat: 1
  121155. +ildouble: 3
  121156. +ldouble: 3
  121157. +
  121158. +Function: Real part of "ctan_towardzero":
  121159. +float: 1
  121160. +ifloat: 1
  121161. +
  121162. +Function: Imaginary part of "ctan_towardzero":
  121163. +float: 1
  121164. +ifloat: 1
  121165. +
  121166. +Function: Real part of "ctan_upward":
  121167. +double: 2
  121168. +float: 1
  121169. +idouble: 2
  121170. +ifloat: 1
  121171. +
  121172. +Function: Imaginary part of "ctan_upward":
  121173. +double: 1
  121174. +float: 2
  121175. +idouble: 1
  121176. +ifloat: 2
  121177. +
  121178. +Function: Real part of "ctanh":
  121179. +double: 1
  121180. +float: 1
  121181. +idouble: 1
  121182. +ifloat: 1
  121183. +ildouble: 2
  121184. +ldouble: 2
  121185. +
  121186. +Function: Imaginary part of "ctanh":
  121187. +double: 1
  121188. +float: 2
  121189. +idouble: 1
  121190. +ifloat: 2
  121191. +ildouble: 2
  121192. +ldouble: 2
  121193. +
  121194. +Function: Real part of "ctanh_downward":
  121195. +float: 1
  121196. +ifloat: 1
  121197. +
  121198. +Function: Imaginary part of "ctanh_downward":
  121199. +double: 2
  121200. +float: 1
  121201. +idouble: 2
  121202. +ifloat: 1
  121203. +
  121204. +Function: Real part of "ctanh_tonearest":
  121205. +float: 1
  121206. +ifloat: 1
  121207. +ildouble: 3
  121208. +ldouble: 3
  121209. +
  121210. +Function: Imaginary part of "ctanh_tonearest":
  121211. +float: 1
  121212. +ifloat: 1
  121213. +ildouble: 3
  121214. +ldouble: 3
  121215. +
  121216. +Function: Real part of "ctanh_towardzero":
  121217. +float: 1
  121218. +ifloat: 1
  121219. +
  121220. +Function: Imaginary part of "ctanh_towardzero":
  121221. +float: 1
  121222. +ifloat: 1
  121223. +
  121224. +Function: Real part of "ctanh_upward":
  121225. +double: 1
  121226. +float: 2
  121227. +idouble: 1
  121228. +ifloat: 2
  121229. +
  121230. +Function: Imaginary part of "ctanh_upward":
  121231. +double: 2
  121232. +float: 1
  121233. +idouble: 2
  121234. +ifloat: 1
  121235. +
  121236. +Function: "erf":
  121237. +double: 1
  121238. +idouble: 1
  121239. +
  121240. +Function: "erfc":
  121241. +double: 1
  121242. +float: 1
  121243. +idouble: 1
  121244. +ifloat: 1
  121245. +ildouble: 1
  121246. +ldouble: 1
  121247. +
  121248. +Function: "exp10":
  121249. +double: 1
  121250. +idouble: 1
  121251. +ildouble: 1
  121252. +ldouble: 1
  121253. +
  121254. +Function: "exp2":
  121255. +ildouble: 1
  121256. +ldouble: 1
  121257. +
  121258. +Function: "exp_downward":
  121259. +float: 1
  121260. +ifloat: 1
  121261. +
  121262. +Function: "exp_towardzero":
  121263. +float: 1
  121264. +ifloat: 1
  121265. +
  121266. +Function: "exp_upward":
  121267. +float: 1
  121268. +ifloat: 1
  121269. +
  121270. +Function: "expm1":
  121271. +double: 1
  121272. +float: 1
  121273. +idouble: 1
  121274. +ifloat: 1
  121275. +ildouble: 1
  121276. +ldouble: 1
  121277. +
  121278. +Function: "gamma":
  121279. +double: 1
  121280. +float: 2
  121281. +idouble: 1
  121282. +ifloat: 2
  121283. +ildouble: 1
  121284. +ldouble: 1
  121285. +
  121286. +Function: "hypot":
  121287. +float: 1
  121288. +ifloat: 1
  121289. +
  121290. +Function: "j0":
  121291. +double: 2
  121292. +float: 2
  121293. +idouble: 2
  121294. +ifloat: 2
  121295. +ildouble: 2
  121296. +ldouble: 2
  121297. +
  121298. +Function: "j1":
  121299. +double: 1
  121300. +float: 2
  121301. +idouble: 1
  121302. +ifloat: 2
  121303. +ildouble: 4
  121304. +ldouble: 4
  121305. +
  121306. +Function: "jn":
  121307. +double: 4
  121308. +float: 5
  121309. +idouble: 4
  121310. +ifloat: 5
  121311. +ildouble: 8
  121312. +ldouble: 8
  121313. +
  121314. +Function: "lgamma":
  121315. +double: 1
  121316. +float: 2
  121317. +idouble: 1
  121318. +ifloat: 2
  121319. +ildouble: 1
  121320. +ldouble: 1
  121321. +
  121322. +Function: "log10":
  121323. +double: 1
  121324. +float: 2
  121325. +idouble: 1
  121326. +ifloat: 2
  121327. +ildouble: 1
  121328. +ldouble: 1
  121329. +
  121330. +Function: "log1p":
  121331. +float: 1
  121332. +ifloat: 1
  121333. +ildouble: 1
  121334. +ldouble: 1
  121335. +
  121336. +Function: "log2":
  121337. +ildouble: 1
  121338. +ldouble: 1
  121339. +
  121340. +Function: "pow":
  121341. +float: 1
  121342. +ifloat: 1
  121343. +ildouble: 1
  121344. +ldouble: 1
  121345. +
  121346. +Function: "pow10":
  121347. +double: 1
  121348. +idouble: 1
  121349. +ildouble: 1
  121350. +ldouble: 1
  121351. +
  121352. +Function: "pow_downward":
  121353. +float: 1
  121354. +ifloat: 1
  121355. +
  121356. +Function: "pow_towardzero":
  121357. +float: 1
  121358. +ifloat: 1
  121359. +
  121360. +Function: "pow_upward":
  121361. +float: 1
  121362. +ifloat: 1
  121363. +
  121364. +Function: "sin_downward":
  121365. +float: 1
  121366. +ifloat: 1
  121367. +
  121368. +Function: "sin_tonearest":
  121369. +float: 1
  121370. +ifloat: 1
  121371. +ildouble: 1
  121372. +ldouble: 1
  121373. +
  121374. +Function: "sin_towardzero":
  121375. +float: 1
  121376. +ifloat: 1
  121377. +
  121378. +Function: "sin_upward":
  121379. +float: 2
  121380. +ifloat: 2
  121381. +
  121382. +Function: "sincos":
  121383. +double: 1
  121384. +float: 1
  121385. +idouble: 1
  121386. +ifloat: 1
  121387. +ildouble: 1
  121388. +ldouble: 1
  121389. +
  121390. +Function: "sinh_downward":
  121391. +float: 1
  121392. +ifloat: 1
  121393. +
  121394. +Function: "sinh_towardzero":
  121395. +float: 1
  121396. +ifloat: 1
  121397. +
  121398. +Function: "tan":
  121399. +double: 1
  121400. +idouble: 1
  121401. +
  121402. +Function: "tan_downward":
  121403. +float: 1
  121404. +ifloat: 1
  121405. +
  121406. +Function: "tan_towardzero":
  121407. +float: 1
  121408. +ifloat: 1
  121409. +
  121410. +Function: "tan_upward":
  121411. +float: 1
  121412. +ifloat: 1
  121413. +
  121414. +Function: "tanh":
  121415. +ildouble: 1
  121416. +ldouble: 1
  121417. +
  121418. +Function: "tgamma":
  121419. +double: 4
  121420. +float: 3
  121421. +idouble: 4
  121422. +ifloat: 3
  121423. +ildouble: 4
  121424. +ldouble: 4
  121425. +
  121426. +Function: "y0":
  121427. +double: 2
  121428. +float: 1
  121429. +idouble: 2
  121430. +ifloat: 1
  121431. +ildouble: 3
  121432. +ldouble: 3
  121433. +
  121434. +Function: "y1":
  121435. +double: 3
  121436. +float: 2
  121437. +idouble: 3
  121438. +ifloat: 2
  121439. +ildouble: 2
  121440. +ldouble: 2
  121441. +
  121442. +Function: "yn":
  121443. +double: 3
  121444. +float: 2
  121445. +idouble: 3
  121446. +ifloat: 2
  121447. +ildouble: 5
  121448. +ldouble: 5
  121449. +
  121450. +# end of automatic generation
  121451. diff -Nur uClibc-0.9.33.2/test/math/libm-test-ulps-sh uClibc-git/test/math/libm-test-ulps-sh
  121452. --- uClibc-0.9.33.2/test/math/libm-test-ulps-sh 1970-01-01 01:00:00.000000000 +0100
  121453. +++ uClibc-git/test/math/libm-test-ulps-sh 2014-07-25 20:36:11.517359363 +0200
  121454. @@ -0,0 +1,1094 @@
  121455. +# Begin of automatic generation
  121456. +
  121457. +# asin
  121458. +Test "asin (-0.5) == -pi/6":
  121459. +float: 2
  121460. +ifloat: 2
  121461. +Test "asin (0.5) == pi/6":
  121462. +float: 2
  121463. +ifloat: 2
  121464. +Test "asin (0.7) == 0.7753974966107530637":
  121465. +double: 1
  121466. +float: 2
  121467. +idouble: 1
  121468. +ifloat: 2
  121469. +
  121470. +# atan2
  121471. +Test "atan2 (0.7, -1.0) == 2.530866689200584621918884506789267":
  121472. +float: 3
  121473. +ifloat: 3
  121474. +Test "atan2 (-0.7, -1.0) == -2.530866689200584621918884506789267":
  121475. +float: 3
  121476. +ifloat: 3
  121477. +Test "atan2 (1.4, -0.93) == 2.1571487668237843754887415992772736":
  121478. +float: 4
  121479. +ifloat: 4
  121480. +
  121481. +# atanh
  121482. +Test "atanh (0.7) == 0.8673005276940531944":
  121483. +double: 1
  121484. +idouble: 1
  121485. +
  121486. +# cabs
  121487. +Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271":
  121488. +float: 1
  121489. +ifloat: 1
  121490. +Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271":
  121491. +float: 1
  121492. +ifloat: 1
  121493. +Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271":
  121494. +float: 1
  121495. +ifloat: 1
  121496. +Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271":
  121497. +float: 1
  121498. +ifloat: 1
  121499. +Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554":
  121500. +double: 1
  121501. +idouble: 1
  121502. +Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271":
  121503. +float: 1
  121504. +ifloat: 1
  121505. +
  121506. +# cacos
  121507. +Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
  121508. +double: 1
  121509. +float: 1
  121510. +idouble: 1
  121511. +ifloat: 1
  121512. +Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
  121513. +float: 1
  121514. +ifloat: 1
  121515. +
  121516. +# cacosh
  121517. +Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
  121518. +double: 1
  121519. +float: 7
  121520. +idouble: 1
  121521. +ifloat: 7
  121522. +Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
  121523. +double: 1
  121524. +float: 3
  121525. +idouble: 1
  121526. +ifloat: 3
  121527. +Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i":
  121528. +double: 1
  121529. +float: 1
  121530. +idouble: 1
  121531. +ifloat: 1
  121532. +
  121533. +# casin
  121534. +Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
  121535. +double: 3
  121536. +float: 2
  121537. +idouble: 3
  121538. +ifloat: 2
  121539. +Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
  121540. +float: 1
  121541. +ifloat: 1
  121542. +
  121543. +# casinh
  121544. +Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
  121545. +double: 5
  121546. +float: 1
  121547. +idouble: 5
  121548. +ifloat: 1
  121549. +Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
  121550. +double: 3
  121551. +float: 6
  121552. +idouble: 3
  121553. +ifloat: 6
  121554. +Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
  121555. +double: 1
  121556. +idouble: 1
  121557. +Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
  121558. +float: 1
  121559. +ifloat: 1
  121560. +
  121561. +# catan
  121562. +Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
  121563. +float: 3
  121564. +ifloat: 3
  121565. +Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
  121566. +double: 1
  121567. +float: 1
  121568. +idouble: 1
  121569. +ifloat: 1
  121570. +Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
  121571. +float: 4
  121572. +ifloat: 4
  121573. +Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
  121574. +double: 1
  121575. +idouble: 1
  121576. +
  121577. +# catanh
  121578. +Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
  121579. +double: 4
  121580. +idouble: 4
  121581. +Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
  121582. +float: 4
  121583. +ifloat: 4
  121584. +Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
  121585. +float: 1
  121586. +ifloat: 1
  121587. +Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
  121588. +double: 1
  121589. +float: 6
  121590. +idouble: 1
  121591. +ifloat: 6
  121592. +
  121593. +# cbrt
  121594. +Test "cbrt (-27.0) == -3.0":
  121595. +double: 1
  121596. +idouble: 1
  121597. +Test "cbrt (0.970299) == 0.99":
  121598. +double: 1
  121599. +idouble: 1
  121600. +
  121601. +# ccos
  121602. +Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
  121603. +float: 1
  121604. +ifloat: 1
  121605. +Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
  121606. +double: 1
  121607. +idouble: 1
  121608. +Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
  121609. +double: 1
  121610. +idouble: 1
  121611. +
  121612. +# ccosh
  121613. +Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
  121614. +float: 1
  121615. +ifloat: 1
  121616. +Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
  121617. +float: 1
  121618. +ifloat: 1
  121619. +Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
  121620. +double: 1
  121621. +float: 1
  121622. +idouble: 1
  121623. +ifloat: 1
  121624. +Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
  121625. +double: 1
  121626. +idouble: 1
  121627. +
  121628. +# cexp
  121629. +Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
  121630. +float: 1
  121631. +ifloat: 1
  121632. +Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
  121633. +double: 1
  121634. +float: 1
  121635. +idouble: 1
  121636. +ifloat: 1
  121637. +Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
  121638. +float: 1
  121639. +ifloat: 1
  121640. +
  121641. +# clog
  121642. +Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
  121643. +double: 1
  121644. +float: 3
  121645. +idouble: 1
  121646. +ifloat: 3
  121647. +
  121648. +# clog10
  121649. +Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
  121650. +float: 1
  121651. +ifloat: 1
  121652. +Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
  121653. +float: 1
  121654. +ifloat: 1
  121655. +Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
  121656. +double: 1
  121657. +float: 5
  121658. +idouble: 1
  121659. +ifloat: 5
  121660. +Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i":
  121661. +float: 1
  121662. +ifloat: 1
  121663. +Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i":
  121664. +float: 1
  121665. +ifloat: 1
  121666. +Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i":
  121667. +float: 1
  121668. +ifloat: 1
  121669. +Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i":
  121670. +float: 1
  121671. +ifloat: 1
  121672. +Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i":
  121673. +float: 1
  121674. +ifloat: 1
  121675. +Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i":
  121676. +float: 1
  121677. +ifloat: 1
  121678. +Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i":
  121679. +float: 1
  121680. +ifloat: 1
  121681. +Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
  121682. +float: 1
  121683. +ifloat: 1
  121684. +Test "Real part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
  121685. +double: 1
  121686. +float: 1
  121687. +idouble: 1
  121688. +ifloat: 1
  121689. +Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
  121690. +double: 1
  121691. +idouble: 1
  121692. +Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
  121693. +float: 1
  121694. +ifloat: 1
  121695. +Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i":
  121696. +float: 1
  121697. +ifloat: 1
  121698. +Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i":
  121699. +float: 1
  121700. +ifloat: 1
  121701. +Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i":
  121702. +float: 1
  121703. +ifloat: 1
  121704. +
  121705. +# cos
  121706. +Test "cos (0.7) == 0.7648421872844884262":
  121707. +double: 1
  121708. +float: 1
  121709. +idouble: 1
  121710. +ifloat: 1
  121711. +Test "cos (M_PI_6l * 2.0) == 0.5":
  121712. +double: 1
  121713. +float: 0.5
  121714. +idouble: 1
  121715. +ifloat: 0.5
  121716. +Test "cos (M_PI_6l * 4.0) == -0.5":
  121717. +double: 2
  121718. +float: 1
  121719. +idouble: 2
  121720. +ifloat: 1
  121721. +Test "cos (pi/2) == 0":
  121722. +double: 0.2758
  121723. +float: 0.3667
  121724. +idouble: 0.2758
  121725. +ifloat: 0.3667
  121726. +
  121727. +# cpow
  121728. +Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
  121729. +double: 1
  121730. +float: 4
  121731. +idouble: 1
  121732. +ifloat: 4
  121733. +Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
  121734. +float: 2
  121735. +ifloat: 2
  121736. +Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
  121737. +double: 1.1031
  121738. +float: 1.5
  121739. +idouble: 1.1031
  121740. +ifloat: 1.5
  121741. +
  121742. +# csin
  121743. +Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i":
  121744. +float: 1
  121745. +ifloat: 1
  121746. +
  121747. +# csinh
  121748. +Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
  121749. +double: 1
  121750. +idouble: 1
  121751. +Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
  121752. +float: 1
  121753. +ifloat: 1
  121754. +Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
  121755. +float: 1
  121756. +ifloat: 1
  121757. +
  121758. +# csqrt
  121759. +Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
  121760. +float: 1
  121761. +ifloat: 1
  121762. +Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
  121763. +float: 1
  121764. +ifloat: 1
  121765. +Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
  121766. +double: 1
  121767. +float: 1
  121768. +idouble: 1
  121769. +ifloat: 1
  121770. +Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
  121771. +float: 1
  121772. +ifloat: 1
  121773. +
  121774. +# ctan
  121775. +Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
  121776. +double: 1
  121777. +idouble: 1
  121778. +Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
  121779. +float: 1
  121780. +ifloat: 1
  121781. +Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
  121782. +double: 1
  121783. +float: 1
  121784. +idouble: 1
  121785. +ifloat: 1
  121786. +
  121787. +# ctanh
  121788. +Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
  121789. +double: 1
  121790. +float: 2
  121791. +idouble: 1
  121792. +ifloat: 2
  121793. +Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
  121794. +float: 1
  121795. +ifloat: 1
  121796. +Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
  121797. +double: 2
  121798. +float: 1
  121799. +idouble: 2
  121800. +ifloat: 1
  121801. +Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
  121802. +double: 2
  121803. +float: 1
  121804. +idouble: 2
  121805. +ifloat: 1
  121806. +
  121807. +# erfc
  121808. +Test "erfc (0.7) == 0.32219880616258152702":
  121809. +double: 1
  121810. +idouble: 1
  121811. +Test "erfc (1.2) == 0.089686021770364619762":
  121812. +double: 2
  121813. +float: 2
  121814. +idouble: 2
  121815. +ifloat: 2
  121816. +Test "erfc (2.0) == 0.0046777349810472658379":
  121817. +double: 1
  121818. +idouble: 1
  121819. +Test "erfc (4.1) == 0.67000276540848983727e-8":
  121820. +double: 24
  121821. +float: 12
  121822. +idouble: 24
  121823. +ifloat: 12
  121824. +
  121825. +# exp10
  121826. +Test "exp10 (-1) == 0.1":
  121827. +double: 2
  121828. +float: 1
  121829. +idouble: 2
  121830. +ifloat: 1
  121831. +Test "exp10 (0.7) == 5.0118723362727228500":
  121832. +float: 1
  121833. +ifloat: 1
  121834. +Test "exp10 (3) == 1000":
  121835. +double: 6
  121836. +float: 2
  121837. +idouble: 6
  121838. +ifloat: 2
  121839. +
  121840. +# expm1
  121841. +Test "expm1 (1) == M_El - 1.0":
  121842. +float: 1
  121843. +ifloat: 1
  121844. +
  121845. +# fmod
  121846. +Test "fmod (-6.5, -2.3) == -1.9":
  121847. +double: 2
  121848. +float: 1
  121849. +idouble: 2
  121850. +ifloat: 1
  121851. +Test "fmod (-6.5, 2.3) == -1.9":
  121852. +double: 2
  121853. +float: 1
  121854. +idouble: 2
  121855. +ifloat: 1
  121856. +Test "fmod (6.5, -2.3) == 1.9":
  121857. +double: 2
  121858. +float: 1
  121859. +idouble: 2
  121860. +ifloat: 1
  121861. +Test "fmod (6.5, 2.3) == 1.9":
  121862. +double: 2
  121863. +float: 1
  121864. +idouble: 2
  121865. +ifloat: 1
  121866. +
  121867. +# hypot
  121868. +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
  121869. +float: 1
  121870. +ifloat: 1
  121871. +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271":
  121872. +float: 1
  121873. +ifloat: 1
  121874. +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271":
  121875. +float: 1
  121876. +ifloat: 1
  121877. +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271":
  121878. +float: 1
  121879. +ifloat: 1
  121880. +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271":
  121881. +float: 1
  121882. +ifloat: 1
  121883. +Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554":
  121884. +double: 1
  121885. +idouble: 1
  121886. +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271":
  121887. +float: 1
  121888. +ifloat: 1
  121889. +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271":
  121890. +float: 1
  121891. +ifloat: 1
  121892. +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271":
  121893. +float: 1
  121894. +ifloat: 1
  121895. +
  121896. +# j0
  121897. +Test "j0 (10.0) == -0.24593576445134833520":
  121898. +double: 2
  121899. +float: 1
  121900. +idouble: 2
  121901. +ifloat: 1
  121902. +Test "j0 (2.0) == 0.22389077914123566805":
  121903. +float: 2
  121904. +ifloat: 2
  121905. +Test "j0 (8.0) == 0.17165080713755390609":
  121906. +float: 1
  121907. +ifloat: 1
  121908. +
  121909. +# j1
  121910. +Test "j1 (10.0) == 0.043472746168861436670":
  121911. +float: 2
  121912. +ifloat: 2
  121913. +Test "j1 (2.0) == 0.57672480775687338720":
  121914. +double: 1
  121915. +idouble: 1
  121916. +Test "j1 (8.0) == 0.23463634685391462438":
  121917. +double: 1
  121918. +idouble: 1
  121919. +
  121920. +# jn
  121921. +Test "jn (0, 10.0) == -0.24593576445134833520":
  121922. +double: 2
  121923. +float: 1
  121924. +idouble: 2
  121925. +ifloat: 1
  121926. +Test "jn (0, 2.0) == 0.22389077914123566805":
  121927. +float: 2
  121928. +ifloat: 2
  121929. +Test "jn (0, 8.0) == 0.17165080713755390609":
  121930. +float: 1
  121931. +ifloat: 1
  121932. +Test "jn (1, 10.0) == 0.043472746168861436670":
  121933. +float: 2
  121934. +ifloat: 2
  121935. +Test "jn (1, 2.0) == 0.57672480775687338720":
  121936. +double: 1
  121937. +idouble: 1
  121938. +Test "jn (1, 8.0) == 0.23463634685391462438":
  121939. +double: 1
  121940. +idouble: 1
  121941. +Test "jn (10, 0.1) == 0.26905328954342155795e-19":
  121942. +double: 6
  121943. +float: 4
  121944. +idouble: 6
  121945. +ifloat: 4
  121946. +Test "jn (10, 0.7) == 0.75175911502153953928e-11":
  121947. +double: 3
  121948. +float: 1
  121949. +idouble: 3
  121950. +ifloat: 1
  121951. +Test "jn (10, 10.0) == 0.20748610663335885770":
  121952. +double: 4
  121953. +float: 3
  121954. +idouble: 4
  121955. +ifloat: 3
  121956. +Test "jn (10, 2.0) == 0.25153862827167367096e-6":
  121957. +float: 4
  121958. +ifloat: 4
  121959. +Test "jn (3, 0.1) == 0.000020820315754756261429":
  121960. +double: 1
  121961. +idouble: 1
  121962. +Test "jn (3, 0.7) == 0.0069296548267508408077":
  121963. +float: 1
  121964. +ifloat: 1
  121965. +Test "jn (3, 10.0) == 0.058379379305186812343":
  121966. +double: 3
  121967. +float: 1
  121968. +idouble: 3
  121969. +ifloat: 1
  121970. +Test "jn (3, 2.0) == 0.12894324947440205110":
  121971. +double: 1
  121972. +float: 2
  121973. +idouble: 1
  121974. +ifloat: 2
  121975. +
  121976. +# lgamma
  121977. +Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
  121978. +double: 1
  121979. +float: 1
  121980. +idouble: 1
  121981. +ifloat: 1
  121982. +Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1":
  121983. +double: 1
  121984. +float: 2
  121985. +idouble: 1
  121986. +ifloat: 2
  121987. +
  121988. +# log
  121989. +Test "log (0.7) == -0.35667494393873237891263871124118447":
  121990. +double: 1
  121991. +float: 1
  121992. +idouble: 1
  121993. +ifloat: 1
  121994. +
  121995. +# log10
  121996. +Test "log10 (0.7) == -0.15490195998574316929":
  121997. +double: 1
  121998. +float: 1
  121999. +idouble: 1
  122000. +ifloat: 1
  122001. +Test "log10 (e) == log10(e)":
  122002. +float: 1
  122003. +ifloat: 1
  122004. +
  122005. +# log1p
  122006. +Test "log1p (-0.3) == -0.35667494393873237891263871124118447":
  122007. +double: 1
  122008. +float: 1
  122009. +idouble: 1
  122010. +ifloat: 1
  122011. +
  122012. +# log2
  122013. +Test "log2 (0.7) == -0.51457317282975824043":
  122014. +double: 1
  122015. +float: 1
  122016. +idouble: 1
  122017. +ifloat: 1
  122018. +
  122019. +# sincos
  122020. +Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res":
  122021. +double: 1
  122022. +float: 1
  122023. +idouble: 1
  122024. +ifloat: 1
  122025. +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
  122026. +double: 1
  122027. +float: 0.5
  122028. +idouble: 1
  122029. +ifloat: 0.5
  122030. +Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res":
  122031. +double: 1
  122032. +float: 1
  122033. +idouble: 1
  122034. +ifloat: 1
  122035. +Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res":
  122036. +double: 0.2758
  122037. +float: 0.3667
  122038. +idouble: 0.2758
  122039. +ifloat: 0.3667
  122040. +Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646764 in cos_res":
  122041. +float: 1
  122042. +ifloat: 1
  122043. +
  122044. +# sinh
  122045. +Test "sinh (0.7) == 0.75858370183953350346":
  122046. +double: 1
  122047. +float: 1
  122048. +idouble: 1
  122049. +ifloat: 1
  122050. +
  122051. +# tan
  122052. +Test "tan (pi/4) == 1":
  122053. +double: 0.5
  122054. +idouble: 0.5
  122055. +
  122056. +# tanh
  122057. +Test "tanh (0.7) == 0.60436777711716349631":
  122058. +double: 1
  122059. +float: 1
  122060. +idouble: 1
  122061. +ifloat: 1
  122062. +
  122063. +# tgamma
  122064. +Test "tgamma (-0.5) == -2 sqrt (pi)":
  122065. +double: 1
  122066. +float: 1
  122067. +idouble: 1
  122068. +ifloat: 1
  122069. +Test "tgamma (0.5) == sqrt (pi)":
  122070. +float: 1
  122071. +ifloat: 1
  122072. +Test "tgamma (0.7) == 1.29805533264755778568117117915281162":
  122073. +double: 1
  122074. +float: 1
  122075. +idouble: 1
  122076. +ifloat: 1
  122077. +
  122078. +# y0
  122079. +Test "y0 (0.7) == -0.19066492933739506743":
  122080. +double: 2
  122081. +float: 1
  122082. +idouble: 2
  122083. +ifloat: 1
  122084. +Test "y0 (1.0) == 0.088256964215676957983":
  122085. +double: 2
  122086. +float: 1
  122087. +idouble: 2
  122088. +ifloat: 1
  122089. +Test "y0 (1.5) == 0.38244892379775884396":
  122090. +double: 2
  122091. +float: 1
  122092. +idouble: 2
  122093. +ifloat: 1
  122094. +Test "y0 (10.0) == 0.055671167283599391424":
  122095. +float: 1
  122096. +ifloat: 1
  122097. +Test "y0 (8.0) == 0.22352148938756622053":
  122098. +double: 1
  122099. +float: 1
  122100. +idouble: 1
  122101. +ifloat: 1
  122102. +
  122103. +# y1
  122104. +Test "y1 (0.1) == -6.4589510947020269877":
  122105. +double: 1
  122106. +idouble: 1
  122107. +Test "y1 (0.7) == -1.1032498719076333697":
  122108. +double: 1
  122109. +float: 1
  122110. +idouble: 1
  122111. +ifloat: 1
  122112. +Test "y1 (1.5) == -0.41230862697391129595":
  122113. +float: 1
  122114. +ifloat: 1
  122115. +Test "y1 (10.0) == 0.24901542420695388392":
  122116. +double: 3
  122117. +float: 1
  122118. +idouble: 3
  122119. +ifloat: 1
  122120. +Test "y1 (2.0) == -0.10703243154093754689":
  122121. +double: 1
  122122. +float: 1
  122123. +idouble: 1
  122124. +ifloat: 1
  122125. +Test "y1 (8.0) == -0.15806046173124749426":
  122126. +double: 1
  122127. +float: 2
  122128. +idouble: 1
  122129. +ifloat: 2
  122130. +
  122131. +# yn
  122132. +Test "yn (0, 0.7) == -0.19066492933739506743":
  122133. +double: 2
  122134. +float: 1
  122135. +idouble: 2
  122136. +ifloat: 1
  122137. +Test "yn (0, 1.0) == 0.088256964215676957983":
  122138. +double: 2
  122139. +float: 1
  122140. +idouble: 2
  122141. +ifloat: 1
  122142. +Test "yn (0, 1.5) == 0.38244892379775884396":
  122143. +double: 2
  122144. +float: 1
  122145. +idouble: 2
  122146. +ifloat: 1
  122147. +Test "yn (0, 10.0) == 0.055671167283599391424":
  122148. +float: 1
  122149. +ifloat: 1
  122150. +Test "yn (0, 8.0) == 0.22352148938756622053":
  122151. +double: 1
  122152. +float: 1
  122153. +idouble: 1
  122154. +ifloat: 1
  122155. +Test "yn (1, 0.1) == -6.4589510947020269877":
  122156. +double: 1
  122157. +idouble: 1
  122158. +Test "yn (1, 0.7) == -1.1032498719076333697":
  122159. +double: 1
  122160. +float: 1
  122161. +idouble: 1
  122162. +ifloat: 1
  122163. +Test "yn (1, 1.5) == -0.41230862697391129595":
  122164. +float: 1
  122165. +ifloat: 1
  122166. +Test "yn (1, 10.0) == 0.24901542420695388392":
  122167. +double: 3
  122168. +float: 1
  122169. +idouble: 3
  122170. +ifloat: 1
  122171. +Test "yn (1, 2.0) == -0.10703243154093754689":
  122172. +double: 1
  122173. +float: 1
  122174. +idouble: 1
  122175. +ifloat: 1
  122176. +Test "yn (1, 8.0) == -0.15806046173124749426":
  122177. +double: 1
  122178. +float: 2
  122179. +idouble: 1
  122180. +ifloat: 2
  122181. +Test "yn (10, 0.1) == -0.11831335132045197885e19":
  122182. +double: 2
  122183. +float: 2
  122184. +idouble: 2
  122185. +ifloat: 2
  122186. +Test "yn (10, 0.7) == -0.42447194260703866924e10":
  122187. +double: 3
  122188. +idouble: 3
  122189. +Test "yn (10, 1.0) == -0.12161801427868918929e9":
  122190. +double: 1
  122191. +idouble: 1
  122192. +Test "yn (10, 10.0) == -0.35981415218340272205":
  122193. +double: 1
  122194. +float: 1
  122195. +idouble: 1
  122196. +ifloat: 1
  122197. +Test "yn (10, 2.0) == -129184.54220803928264":
  122198. +double: 2
  122199. +idouble: 2
  122200. +Test "yn (3, 0.1) == -5099.3323786129048894":
  122201. +double: 1
  122202. +float: 1
  122203. +idouble: 1
  122204. +ifloat: 1
  122205. +Test "yn (3, 0.7) == -15.819479052819633505":
  122206. +double: 3
  122207. +float: 1
  122208. +idouble: 3
  122209. +ifloat: 1
  122210. +Test "yn (3, 10.0) == -0.25136265718383732978":
  122211. +double: 1
  122212. +float: 1
  122213. +idouble: 1
  122214. +ifloat: 1
  122215. +Test "yn (3, 2.0) == -1.1277837768404277861":
  122216. +double: 1
  122217. +idouble: 1
  122218. +
  122219. +# Maximal error of functions:
  122220. +Function: "asin":
  122221. +double: 1
  122222. +float: 2
  122223. +idouble: 1
  122224. +ifloat: 2
  122225. +
  122226. +Function: "atan2":
  122227. +float: 4
  122228. +ifloat: 4
  122229. +
  122230. +Function: "atanh":
  122231. +double: 1
  122232. +idouble: 1
  122233. +
  122234. +Function: "cabs":
  122235. +double: 1
  122236. +float: 1
  122237. +idouble: 1
  122238. +ifloat: 1
  122239. +
  122240. +Function: Real part of "cacos":
  122241. +double: 1
  122242. +float: 1
  122243. +idouble: 1
  122244. +ifloat: 1
  122245. +
  122246. +Function: Imaginary part of "cacos":
  122247. +float: 1
  122248. +ifloat: 1
  122249. +
  122250. +Function: Real part of "cacosh":
  122251. +double: 1
  122252. +float: 7
  122253. +idouble: 1
  122254. +ifloat: 7
  122255. +
  122256. +Function: Imaginary part of "cacosh":
  122257. +double: 1
  122258. +float: 3
  122259. +idouble: 1
  122260. +ifloat: 3
  122261. +
  122262. +Function: Real part of "casin":
  122263. +double: 3
  122264. +float: 2
  122265. +idouble: 3
  122266. +ifloat: 2
  122267. +
  122268. +Function: Imaginary part of "casin":
  122269. +float: 1
  122270. +ifloat: 1
  122271. +
  122272. +Function: Real part of "casinh":
  122273. +double: 5
  122274. +float: 1
  122275. +idouble: 5
  122276. +ifloat: 1
  122277. +
  122278. +Function: Imaginary part of "casinh":
  122279. +double: 3
  122280. +float: 6
  122281. +idouble: 3
  122282. +ifloat: 6
  122283. +
  122284. +Function: Real part of "catan":
  122285. +float: 4
  122286. +ifloat: 4
  122287. +
  122288. +Function: Imaginary part of "catan":
  122289. +double: 1
  122290. +float: 1
  122291. +idouble: 1
  122292. +ifloat: 1
  122293. +
  122294. +Function: Real part of "catanh":
  122295. +double: 4
  122296. +float: 1
  122297. +idouble: 4
  122298. +ifloat: 1
  122299. +
  122300. +Function: Imaginary part of "catanh":
  122301. +double: 1
  122302. +float: 6
  122303. +idouble: 1
  122304. +ifloat: 6
  122305. +
  122306. +Function: "cbrt":
  122307. +double: 1
  122308. +idouble: 1
  122309. +
  122310. +Function: Real part of "ccos":
  122311. +double: 1
  122312. +idouble: 1
  122313. +
  122314. +Function: Imaginary part of "ccos":
  122315. +double: 1
  122316. +float: 1
  122317. +idouble: 1
  122318. +ifloat: 1
  122319. +
  122320. +Function: Real part of "ccosh":
  122321. +double: 1
  122322. +float: 1
  122323. +idouble: 1
  122324. +ifloat: 1
  122325. +
  122326. +Function: Imaginary part of "ccosh":
  122327. +double: 1
  122328. +float: 1
  122329. +idouble: 1
  122330. +ifloat: 1
  122331. +
  122332. +Function: Real part of "cexp":
  122333. +double: 1
  122334. +float: 1
  122335. +idouble: 1
  122336. +ifloat: 1
  122337. +
  122338. +Function: Imaginary part of "cexp":
  122339. +float: 1
  122340. +ifloat: 1
  122341. +
  122342. +Function: Imaginary part of "clog":
  122343. +double: 1
  122344. +float: 3
  122345. +idouble: 1
  122346. +ifloat: 3
  122347. +
  122348. +Function: Real part of "clog10":
  122349. +double: 1
  122350. +float: 1
  122351. +idouble: 1
  122352. +ifloat: 1
  122353. +
  122354. +Function: Imaginary part of "clog10":
  122355. +double: 1
  122356. +float: 5
  122357. +idouble: 1
  122358. +ifloat: 5
  122359. +
  122360. +Function: "cos":
  122361. +double: 2
  122362. +float: 1
  122363. +idouble: 2
  122364. +ifloat: 1
  122365. +
  122366. +Function: Real part of "cpow":
  122367. +double: 1
  122368. +float: 4
  122369. +idouble: 1
  122370. +ifloat: 4
  122371. +
  122372. +Function: Imaginary part of "cpow":
  122373. +double: 1.1031
  122374. +float: 2
  122375. +idouble: 1.1031
  122376. +ifloat: 2
  122377. +
  122378. +Function: Imaginary part of "csin":
  122379. +float: 1
  122380. +ifloat: 1
  122381. +
  122382. +Function: Real part of "csinh":
  122383. +float: 1
  122384. +ifloat: 1
  122385. +
  122386. +Function: Imaginary part of "csinh":
  122387. +double: 1
  122388. +float: 1
  122389. +idouble: 1
  122390. +ifloat: 1
  122391. +
  122392. +Function: Real part of "csqrt":
  122393. +double: 1
  122394. +float: 1
  122395. +idouble: 1
  122396. +ifloat: 1
  122397. +
  122398. +Function: Imaginary part of "csqrt":
  122399. +float: 1
  122400. +ifloat: 1
  122401. +
  122402. +Function: Real part of "ctan":
  122403. +double: 1
  122404. +float: 1
  122405. +idouble: 1
  122406. +ifloat: 1
  122407. +
  122408. +Function: Imaginary part of "ctan":
  122409. +double: 1
  122410. +float: 1
  122411. +idouble: 1
  122412. +ifloat: 1
  122413. +
  122414. +Function: Real part of "ctanh":
  122415. +double: 2
  122416. +float: 2
  122417. +idouble: 2
  122418. +ifloat: 2
  122419. +
  122420. +Function: Imaginary part of "ctanh":
  122421. +double: 2
  122422. +float: 1
  122423. +idouble: 2
  122424. +ifloat: 1
  122425. +
  122426. +Function: "erfc":
  122427. +double: 24
  122428. +float: 12
  122429. +idouble: 24
  122430. +ifloat: 12
  122431. +
  122432. +Function: "exp10":
  122433. +double: 6
  122434. +float: 2
  122435. +idouble: 6
  122436. +ifloat: 2
  122437. +
  122438. +Function: "expm1":
  122439. +float: 1
  122440. +ifloat: 1
  122441. +
  122442. +Function: "fmod":
  122443. +double: 2
  122444. +float: 1
  122445. +idouble: 2
  122446. +ifloat: 1
  122447. +
  122448. +Function: "hypot":
  122449. +double: 1
  122450. +float: 1
  122451. +idouble: 1
  122452. +ifloat: 1
  122453. +
  122454. +Function: "j0":
  122455. +double: 2
  122456. +float: 2
  122457. +idouble: 2
  122458. +ifloat: 2
  122459. +
  122460. +Function: "j1":
  122461. +double: 1
  122462. +float: 2
  122463. +idouble: 1
  122464. +ifloat: 2
  122465. +
  122466. +Function: "jn":
  122467. +double: 6
  122468. +float: 4
  122469. +idouble: 6
  122470. +ifloat: 4
  122471. +
  122472. +Function: "lgamma":
  122473. +double: 1
  122474. +float: 2
  122475. +idouble: 1
  122476. +ifloat: 2
  122477. +
  122478. +Function: "log":
  122479. +double: 1
  122480. +float: 1
  122481. +idouble: 1
  122482. +ifloat: 1
  122483. +
  122484. +Function: "log10":
  122485. +double: 1
  122486. +float: 1
  122487. +idouble: 1
  122488. +ifloat: 1
  122489. +
  122490. +Function: "log1p":
  122491. +double: 1
  122492. +float: 1
  122493. +idouble: 1
  122494. +ifloat: 1
  122495. +
  122496. +Function: "log2":
  122497. +double: 1
  122498. +float: 1
  122499. +idouble: 1
  122500. +ifloat: 1
  122501. +
  122502. +Function: "sincos":
  122503. +double: 1
  122504. +float: 1
  122505. +idouble: 1
  122506. +ifloat: 1
  122507. +
  122508. +Function: "sinh":
  122509. +double: 1
  122510. +float: 1
  122511. +idouble: 1
  122512. +ifloat: 1
  122513. +
  122514. +Function: "tan":
  122515. +double: 0.5
  122516. +idouble: 0.5
  122517. +
  122518. +Function: "tanh":
  122519. +double: 1
  122520. +float: 1
  122521. +idouble: 1
  122522. +ifloat: 1
  122523. +
  122524. +Function: "tgamma":
  122525. +double: 1
  122526. +float: 1
  122527. +idouble: 1
  122528. +ifloat: 1
  122529. +
  122530. +Function: "y0":
  122531. +double: 2
  122532. +float: 1
  122533. +idouble: 2
  122534. +ifloat: 1
  122535. +
  122536. +Function: "y1":
  122537. +double: 3
  122538. +float: 2
  122539. +idouble: 3
  122540. +ifloat: 2
  122541. +
  122542. +Function: "yn":
  122543. +double: 3
  122544. +float: 2
  122545. +idouble: 3
  122546. +ifloat: 2
  122547. +
  122548. +# end of automatic generation
  122549. diff -Nur uClibc-0.9.33.2/test/math/libm-test-ulps-sh4 uClibc-git/test/math/libm-test-ulps-sh4
  122550. --- uClibc-0.9.33.2/test/math/libm-test-ulps-sh4 2012-05-15 09:20:09.000000000 +0200
  122551. +++ uClibc-git/test/math/libm-test-ulps-sh4 1970-01-01 01:00:00.000000000 +0100
  122552. @@ -1,1094 +0,0 @@
  122553. -# Begin of automatic generation
  122554. -
  122555. -# asin
  122556. -Test "asin (-0.5) == -pi/6":
  122557. -float: 2
  122558. -ifloat: 2
  122559. -Test "asin (0.5) == pi/6":
  122560. -float: 2
  122561. -ifloat: 2
  122562. -Test "asin (0.7) == 0.7753974966107530637":
  122563. -double: 1
  122564. -float: 2
  122565. -idouble: 1
  122566. -ifloat: 2
  122567. -
  122568. -# atan2
  122569. -Test "atan2 (0.7, -1.0) == 2.530866689200584621918884506789267":
  122570. -float: 3
  122571. -ifloat: 3
  122572. -Test "atan2 (-0.7, -1.0) == -2.530866689200584621918884506789267":
  122573. -float: 3
  122574. -ifloat: 3
  122575. -Test "atan2 (1.4, -0.93) == 2.1571487668237843754887415992772736":
  122576. -float: 4
  122577. -ifloat: 4
  122578. -
  122579. -# atanh
  122580. -Test "atanh (0.7) == 0.8673005276940531944":
  122581. -double: 1
  122582. -idouble: 1
  122583. -
  122584. -# cabs
  122585. -Test "cabs (-0.7 + 12.4 i) == 12.419742348374220601176836866763271":
  122586. -float: 1
  122587. -ifloat: 1
  122588. -Test "cabs (-0.7 - 12.4 i) == 12.419742348374220601176836866763271":
  122589. -float: 1
  122590. -ifloat: 1
  122591. -Test "cabs (-12.4 + 0.7 i) == 12.419742348374220601176836866763271":
  122592. -float: 1
  122593. -ifloat: 1
  122594. -Test "cabs (-12.4 - 0.7 i) == 12.419742348374220601176836866763271":
  122595. -float: 1
  122596. -ifloat: 1
  122597. -Test "cabs (0.7 + 1.2 i) == 1.3892443989449804508432547041028554":
  122598. -double: 1
  122599. -idouble: 1
  122600. -Test "cabs (0.7 + 12.4 i) == 12.419742348374220601176836866763271":
  122601. -float: 1
  122602. -ifloat: 1
  122603. -
  122604. -# cacos
  122605. -Test "Real part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
  122606. -double: 1
  122607. -float: 1
  122608. -idouble: 1
  122609. -ifloat: 1
  122610. -Test "Imaginary part of: cacos (0.7 + 1.2 i) == 1.1351827477151551088992008271819053 - 1.0927647857577371459105272080819308 i":
  122611. -float: 1
  122612. -ifloat: 1
  122613. -
  122614. -# cacosh
  122615. -Test "Real part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
  122616. -double: 1
  122617. -float: 7
  122618. -idouble: 1
  122619. -ifloat: 7
  122620. -Test "Imaginary part of: cacosh (-2 - 3 i) == 1.9833870299165354323470769028940395 - 2.1414491111159960199416055713254211 i":
  122621. -double: 1
  122622. -float: 3
  122623. -idouble: 1
  122624. -ifloat: 3
  122625. -Test "Real part of: cacosh (0.7 + 1.2 i) == 1.0927647857577371459105272080819308 + 1.1351827477151551088992008271819053 i":
  122626. -double: 1
  122627. -float: 1
  122628. -idouble: 1
  122629. -ifloat: 1
  122630. -
  122631. -# casin
  122632. -Test "Real part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
  122633. -double: 3
  122634. -float: 2
  122635. -idouble: 3
  122636. -ifloat: 2
  122637. -Test "Imaginary part of: casin (0.7 + 1.2 i) == 0.4356135790797415103321208644578462 + 1.0927647857577371459105272080819308 i":
  122638. -float: 1
  122639. -ifloat: 1
  122640. -
  122641. -# casinh
  122642. -Test "Real part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
  122643. -double: 5
  122644. -float: 1
  122645. -idouble: 5
  122646. -ifloat: 1
  122647. -Test "Imaginary part of: casinh (-2 - 3 i) == -1.9686379257930962917886650952454982 - 0.96465850440760279204541105949953237 i":
  122648. -double: 3
  122649. -float: 6
  122650. -idouble: 3
  122651. -ifloat: 6
  122652. -Test "Real part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
  122653. -double: 1
  122654. -idouble: 1
  122655. -Test "Imaginary part of: casinh (0.7 + 1.2 i) == 0.97865459559367387689317593222160964 + 0.91135418953156011567903546856170941 i":
  122656. -float: 1
  122657. -ifloat: 1
  122658. -
  122659. -# catan
  122660. -Test "Real part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
  122661. -float: 3
  122662. -ifloat: 3
  122663. -Test "Imaginary part of: catan (-2 - 3 i) == -1.4099210495965755225306193844604208 - 0.22907268296853876629588180294200276 i":
  122664. -double: 1
  122665. -float: 1
  122666. -idouble: 1
  122667. -ifloat: 1
  122668. -Test "Real part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
  122669. -float: 4
  122670. -ifloat: 4
  122671. -Test "Imaginary part of: catan (0.7 + 1.2 i) == 1.0785743834118921877443707996386368 + 0.57705737765343067644394541889341712 i":
  122672. -double: 1
  122673. -idouble: 1
  122674. -
  122675. -# catanh
  122676. -Test "Real part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
  122677. -double: 4
  122678. -idouble: 4
  122679. -Test "Imaginary part of: catanh (-2 - 3 i) == -0.14694666622552975204743278515471595 - 1.3389725222944935611241935759091443 i":
  122680. -float: 4
  122681. -ifloat: 4
  122682. -Test "Real part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
  122683. -float: 1
  122684. -ifloat: 1
  122685. -Test "Imaginary part of: catanh (0.7 + 1.2 i) == 0.2600749516525135959200648705635915 + 0.97024030779509898497385130162655963 i":
  122686. -double: 1
  122687. -float: 6
  122688. -idouble: 1
  122689. -ifloat: 6
  122690. -
  122691. -# cbrt
  122692. -Test "cbrt (-27.0) == -3.0":
  122693. -double: 1
  122694. -idouble: 1
  122695. -Test "cbrt (0.970299) == 0.99":
  122696. -double: 1
  122697. -idouble: 1
  122698. -
  122699. -# ccos
  122700. -Test "Imaginary part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
  122701. -float: 1
  122702. -ifloat: 1
  122703. -Test "Real part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
  122704. -double: 1
  122705. -idouble: 1
  122706. -Test "Imaginary part of: ccos (0.7 + 1.2 i) == 1.3848657645312111080 - 0.97242170335830028619 i":
  122707. -double: 1
  122708. -idouble: 1
  122709. -
  122710. -# ccosh
  122711. -Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
  122712. -float: 1
  122713. -ifloat: 1
  122714. -Test "Imaginary part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
  122715. -float: 1
  122716. -ifloat: 1
  122717. -Test "Real part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
  122718. -double: 1
  122719. -float: 1
  122720. -idouble: 1
  122721. -ifloat: 1
  122722. -Test "Imaginary part of: ccosh (0.7 + 1.2 i) == 0.4548202223691477654 + 0.7070296600921537682 i":
  122723. -double: 1
  122724. -idouble: 1
  122725. -
  122726. -# cexp
  122727. -Test "Imaginary part of: cexp (-2.0 - 3.0 i) == -0.13398091492954261346140525546115575 - 0.019098516261135196432576240858800925 i":
  122728. -float: 1
  122729. -ifloat: 1
  122730. -Test "Real part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
  122731. -double: 1
  122732. -float: 1
  122733. -idouble: 1
  122734. -ifloat: 1
  122735. -Test "Imaginary part of: cexp (0.7 + 1.2 i) == 0.7296989091503236012 + 1.8768962328348102821 i":
  122736. -float: 1
  122737. -ifloat: 1
  122738. -
  122739. -# clog
  122740. -Test "Imaginary part of: clog (-2 - 3 i) == 1.2824746787307683680267437207826593 - 2.1587989303424641704769327722648368 i":
  122741. -double: 1
  122742. -float: 3
  122743. -idouble: 1
  122744. -ifloat: 3
  122745. -
  122746. -# clog10
  122747. -Test "Imaginary part of: clog10 (-0 + inf i) == inf + pi/2*log10(e) i":
  122748. -float: 1
  122749. -ifloat: 1
  122750. -Test "Imaginary part of: clog10 (-0 - inf i) == inf - pi/2*log10(e) i":
  122751. -float: 1
  122752. -ifloat: 1
  122753. -Test "Imaginary part of: clog10 (-2 - 3 i) == 0.556971676153418384603252578971164214 - 0.937554462986374708541507952140189646 i":
  122754. -double: 1
  122755. -float: 5
  122756. -idouble: 1
  122757. -ifloat: 5
  122758. -Test "Imaginary part of: clog10 (-3 + inf i) == inf + pi/2*log10(e) i":
  122759. -float: 1
  122760. -ifloat: 1
  122761. -Test "Imaginary part of: clog10 (-3 - inf i) == inf - pi/2*log10(e) i":
  122762. -float: 1
  122763. -ifloat: 1
  122764. -Test "Imaginary part of: clog10 (-inf + 0 i) == inf + pi*log10(e) i":
  122765. -float: 1
  122766. -ifloat: 1
  122767. -Test "Imaginary part of: clog10 (-inf + 1 i) == inf + pi*log10(e) i":
  122768. -float: 1
  122769. -ifloat: 1
  122770. -Test "Imaginary part of: clog10 (-inf - 0 i) == inf - pi*log10(e) i":
  122771. -float: 1
  122772. -ifloat: 1
  122773. -Test "Imaginary part of: clog10 (-inf - 1 i) == inf - pi*log10(e) i":
  122774. -float: 1
  122775. -ifloat: 1
  122776. -Test "Imaginary part of: clog10 (0 + inf i) == inf + pi/2*log10(e) i":
  122777. -float: 1
  122778. -ifloat: 1
  122779. -Test "Imaginary part of: clog10 (0 - inf i) == inf - pi/2*log10(e) i":
  122780. -float: 1
  122781. -ifloat: 1
  122782. -Test "Real part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
  122783. -double: 1
  122784. -float: 1
  122785. -idouble: 1
  122786. -ifloat: 1
  122787. -Test "Imaginary part of: clog10 (0.7 + 1.2 i) == 0.1427786545038868803 + 0.4528483579352493248 i":
  122788. -double: 1
  122789. -idouble: 1
  122790. -Test "Imaginary part of: clog10 (3 + inf i) == inf + pi/2*log10(e) i":
  122791. -float: 1
  122792. -ifloat: 1
  122793. -Test "Imaginary part of: clog10 (3 - inf i) == inf - pi/2*log10(e) i":
  122794. -float: 1
  122795. -ifloat: 1
  122796. -Test "Imaginary part of: clog10 (inf + inf i) == inf + pi/4*log10(e) i":
  122797. -float: 1
  122798. -ifloat: 1
  122799. -Test "Imaginary part of: clog10 (inf - inf i) == inf - pi/4*log10(e) i":
  122800. -float: 1
  122801. -ifloat: 1
  122802. -
  122803. -# cos
  122804. -Test "cos (0.7) == 0.7648421872844884262":
  122805. -double: 1
  122806. -float: 1
  122807. -idouble: 1
  122808. -ifloat: 1
  122809. -Test "cos (M_PI_6l * 2.0) == 0.5":
  122810. -double: 1
  122811. -float: 0.5
  122812. -idouble: 1
  122813. -ifloat: 0.5
  122814. -Test "cos (M_PI_6l * 4.0) == -0.5":
  122815. -double: 2
  122816. -float: 1
  122817. -idouble: 2
  122818. -ifloat: 1
  122819. -Test "cos (pi/2) == 0":
  122820. -double: 0.2758
  122821. -float: 0.3667
  122822. -idouble: 0.2758
  122823. -ifloat: 0.3667
  122824. -
  122825. -# cpow
  122826. -Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
  122827. -double: 1
  122828. -float: 4
  122829. -idouble: 1
  122830. -ifloat: 4
  122831. -Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
  122832. -float: 2
  122833. -ifloat: 2
  122834. -Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
  122835. -double: 1.1031
  122836. -float: 1.5
  122837. -idouble: 1.1031
  122838. -ifloat: 1.5
  122839. -
  122840. -# csin
  122841. -Test "Imaginary part of: csin (0.7 + 1.2 i) == 1.1664563419657581376 + 1.1544997246948547371 i":
  122842. -float: 1
  122843. -ifloat: 1
  122844. -
  122845. -# csinh
  122846. -Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
  122847. -double: 1
  122848. -idouble: 1
  122849. -Test "Real part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
  122850. -float: 1
  122851. -ifloat: 1
  122852. -Test "Imaginary part of: csinh (0.7 + 1.2 i) == 0.27487868678117583582 + 1.1698665727426565139 i":
  122853. -float: 1
  122854. -ifloat: 1
  122855. -
  122856. -# csqrt
  122857. -Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
  122858. -float: 1
  122859. -ifloat: 1
  122860. -Test "Real part of: csqrt (-2 - 3 i) == 0.89597747612983812471573375529004348 - 1.6741492280355400404480393008490519 i":
  122861. -float: 1
  122862. -ifloat: 1
  122863. -Test "Real part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
  122864. -double: 1
  122865. -float: 1
  122866. -idouble: 1
  122867. -ifloat: 1
  122868. -Test "Imaginary part of: csqrt (0.7 + 1.2 i) == 1.022067610030026450706487883081139 + 0.58704531296356521154977678719838035 i":
  122869. -float: 1
  122870. -ifloat: 1
  122871. -
  122872. -# ctan
  122873. -Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
  122874. -double: 1
  122875. -idouble: 1
  122876. -Test "Real part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
  122877. -float: 1
  122878. -ifloat: 1
  122879. -Test "Imaginary part of: ctan (0.7 + 1.2 i) == 0.1720734197630349001 + 0.9544807059989405538 i":
  122880. -double: 1
  122881. -float: 1
  122882. -idouble: 1
  122883. -ifloat: 1
  122884. -
  122885. -# ctanh
  122886. -Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
  122887. -double: 1
  122888. -float: 2
  122889. -idouble: 1
  122890. -ifloat: 2
  122891. -Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
  122892. -float: 1
  122893. -ifloat: 1
  122894. -Test "Real part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
  122895. -double: 2
  122896. -float: 1
  122897. -idouble: 2
  122898. -ifloat: 1
  122899. -Test "Imaginary part of: ctanh (0.7 + 1.2 i) == 1.3472197399061191630 + 0.4778641038326365540 i":
  122900. -double: 2
  122901. -float: 1
  122902. -idouble: 2
  122903. -ifloat: 1
  122904. -
  122905. -# erfc
  122906. -Test "erfc (0.7) == 0.32219880616258152702":
  122907. -double: 1
  122908. -idouble: 1
  122909. -Test "erfc (1.2) == 0.089686021770364619762":
  122910. -double: 2
  122911. -float: 2
  122912. -idouble: 2
  122913. -ifloat: 2
  122914. -Test "erfc (2.0) == 0.0046777349810472658379":
  122915. -double: 1
  122916. -idouble: 1
  122917. -Test "erfc (4.1) == 0.67000276540848983727e-8":
  122918. -double: 24
  122919. -float: 12
  122920. -idouble: 24
  122921. -ifloat: 12
  122922. -
  122923. -# exp10
  122924. -Test "exp10 (-1) == 0.1":
  122925. -double: 2
  122926. -float: 1
  122927. -idouble: 2
  122928. -ifloat: 1
  122929. -Test "exp10 (0.7) == 5.0118723362727228500":
  122930. -float: 1
  122931. -ifloat: 1
  122932. -Test "exp10 (3) == 1000":
  122933. -double: 6
  122934. -float: 2
  122935. -idouble: 6
  122936. -ifloat: 2
  122937. -
  122938. -# expm1
  122939. -Test "expm1 (1) == M_El - 1.0":
  122940. -float: 1
  122941. -ifloat: 1
  122942. -
  122943. -# fmod
  122944. -Test "fmod (-6.5, -2.3) == -1.9":
  122945. -double: 2
  122946. -float: 1
  122947. -idouble: 2
  122948. -ifloat: 1
  122949. -Test "fmod (-6.5, 2.3) == -1.9":
  122950. -double: 2
  122951. -float: 1
  122952. -idouble: 2
  122953. -ifloat: 1
  122954. -Test "fmod (6.5, -2.3) == 1.9":
  122955. -double: 2
  122956. -float: 1
  122957. -idouble: 2
  122958. -ifloat: 1
  122959. -Test "fmod (6.5, 2.3) == 1.9":
  122960. -double: 2
  122961. -float: 1
  122962. -idouble: 2
  122963. -ifloat: 1
  122964. -
  122965. -# hypot
  122966. -Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
  122967. -float: 1
  122968. -ifloat: 1
  122969. -Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271":
  122970. -float: 1
  122971. -ifloat: 1
  122972. -Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271":
  122973. -float: 1
  122974. -ifloat: 1
  122975. -Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271":
  122976. -float: 1
  122977. -ifloat: 1
  122978. -Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271":
  122979. -float: 1
  122980. -ifloat: 1
  122981. -Test "hypot (0.7, 1.2) == 1.3892443989449804508432547041028554":
  122982. -double: 1
  122983. -idouble: 1
  122984. -Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271":
  122985. -float: 1
  122986. -ifloat: 1
  122987. -Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271":
  122988. -float: 1
  122989. -ifloat: 1
  122990. -Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271":
  122991. -float: 1
  122992. -ifloat: 1
  122993. -
  122994. -# j0
  122995. -Test "j0 (10.0) == -0.24593576445134833520":
  122996. -double: 2
  122997. -float: 1
  122998. -idouble: 2
  122999. -ifloat: 1
  123000. -Test "j0 (2.0) == 0.22389077914123566805":
  123001. -float: 2
  123002. -ifloat: 2
  123003. -Test "j0 (8.0) == 0.17165080713755390609":
  123004. -float: 1
  123005. -ifloat: 1
  123006. -
  123007. -# j1
  123008. -Test "j1 (10.0) == 0.043472746168861436670":
  123009. -float: 2
  123010. -ifloat: 2
  123011. -Test "j1 (2.0) == 0.57672480775687338720":
  123012. -double: 1
  123013. -idouble: 1
  123014. -Test "j1 (8.0) == 0.23463634685391462438":
  123015. -double: 1
  123016. -idouble: 1
  123017. -
  123018. -# jn
  123019. -Test "jn (0, 10.0) == -0.24593576445134833520":
  123020. -double: 2
  123021. -float: 1
  123022. -idouble: 2
  123023. -ifloat: 1
  123024. -Test "jn (0, 2.0) == 0.22389077914123566805":
  123025. -float: 2
  123026. -ifloat: 2
  123027. -Test "jn (0, 8.0) == 0.17165080713755390609":
  123028. -float: 1
  123029. -ifloat: 1
  123030. -Test "jn (1, 10.0) == 0.043472746168861436670":
  123031. -float: 2
  123032. -ifloat: 2
  123033. -Test "jn (1, 2.0) == 0.57672480775687338720":
  123034. -double: 1
  123035. -idouble: 1
  123036. -Test "jn (1, 8.0) == 0.23463634685391462438":
  123037. -double: 1
  123038. -idouble: 1
  123039. -Test "jn (10, 0.1) == 0.26905328954342155795e-19":
  123040. -double: 6
  123041. -float: 4
  123042. -idouble: 6
  123043. -ifloat: 4
  123044. -Test "jn (10, 0.7) == 0.75175911502153953928e-11":
  123045. -double: 3
  123046. -float: 1
  123047. -idouble: 3
  123048. -ifloat: 1
  123049. -Test "jn (10, 10.0) == 0.20748610663335885770":
  123050. -double: 4
  123051. -float: 3
  123052. -idouble: 4
  123053. -ifloat: 3
  123054. -Test "jn (10, 2.0) == 0.25153862827167367096e-6":
  123055. -float: 4
  123056. -ifloat: 4
  123057. -Test "jn (3, 0.1) == 0.000020820315754756261429":
  123058. -double: 1
  123059. -idouble: 1
  123060. -Test "jn (3, 0.7) == 0.0069296548267508408077":
  123061. -float: 1
  123062. -ifloat: 1
  123063. -Test "jn (3, 10.0) == 0.058379379305186812343":
  123064. -double: 3
  123065. -float: 1
  123066. -idouble: 3
  123067. -ifloat: 1
  123068. -Test "jn (3, 2.0) == 0.12894324947440205110":
  123069. -double: 1
  123070. -float: 2
  123071. -idouble: 1
  123072. -ifloat: 2
  123073. -
  123074. -# lgamma
  123075. -Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
  123076. -double: 1
  123077. -float: 1
  123078. -idouble: 1
  123079. -ifloat: 1
  123080. -Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1":
  123081. -double: 1
  123082. -float: 2
  123083. -idouble: 1
  123084. -ifloat: 2
  123085. -
  123086. -# log
  123087. -Test "log (0.7) == -0.35667494393873237891263871124118447":
  123088. -double: 1
  123089. -float: 1
  123090. -idouble: 1
  123091. -ifloat: 1
  123092. -
  123093. -# log10
  123094. -Test "log10 (0.7) == -0.15490195998574316929":
  123095. -double: 1
  123096. -float: 1
  123097. -idouble: 1
  123098. -ifloat: 1
  123099. -Test "log10 (e) == log10(e)":
  123100. -float: 1
  123101. -ifloat: 1
  123102. -
  123103. -# log1p
  123104. -Test "log1p (-0.3) == -0.35667494393873237891263871124118447":
  123105. -double: 1
  123106. -float: 1
  123107. -idouble: 1
  123108. -ifloat: 1
  123109. -
  123110. -# log2
  123111. -Test "log2 (0.7) == -0.51457317282975824043":
  123112. -double: 1
  123113. -float: 1
  123114. -idouble: 1
  123115. -ifloat: 1
  123116. -
  123117. -# sincos
  123118. -Test "sincos (0.7, &sin_res, &cos_res) puts 0.76484218728448842626 in cos_res":
  123119. -double: 1
  123120. -float: 1
  123121. -idouble: 1
  123122. -ifloat: 1
  123123. -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.5 in cos_res":
  123124. -double: 1
  123125. -float: 0.5
  123126. -idouble: 1
  123127. -ifloat: 0.5
  123128. -Test "sincos (M_PI_6l*2.0, &sin_res, &cos_res) puts 0.866025403784438646764 in sin_res":
  123129. -double: 1
  123130. -float: 1
  123131. -idouble: 1
  123132. -ifloat: 1
  123133. -Test "sincos (pi/2, &sin_res, &cos_res) puts 0 in cos_res":
  123134. -double: 0.2758
  123135. -float: 0.3667
  123136. -idouble: 0.2758
  123137. -ifloat: 0.3667
  123138. -Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646764 in cos_res":
  123139. -float: 1
  123140. -ifloat: 1
  123141. -
  123142. -# sinh
  123143. -Test "sinh (0.7) == 0.75858370183953350346":
  123144. -double: 1
  123145. -float: 1
  123146. -idouble: 1
  123147. -ifloat: 1
  123148. -
  123149. -# tan
  123150. -Test "tan (pi/4) == 1":
  123151. -double: 0.5
  123152. -idouble: 0.5
  123153. -
  123154. -# tanh
  123155. -Test "tanh (0.7) == 0.60436777711716349631":
  123156. -double: 1
  123157. -float: 1
  123158. -idouble: 1
  123159. -ifloat: 1
  123160. -
  123161. -# tgamma
  123162. -Test "tgamma (-0.5) == -2 sqrt (pi)":
  123163. -double: 1
  123164. -float: 1
  123165. -idouble: 1
  123166. -ifloat: 1
  123167. -Test "tgamma (0.5) == sqrt (pi)":
  123168. -float: 1
  123169. -ifloat: 1
  123170. -Test "tgamma (0.7) == 1.29805533264755778568117117915281162":
  123171. -double: 1
  123172. -float: 1
  123173. -idouble: 1
  123174. -ifloat: 1
  123175. -
  123176. -# y0
  123177. -Test "y0 (0.7) == -0.19066492933739506743":
  123178. -double: 2
  123179. -float: 1
  123180. -idouble: 2
  123181. -ifloat: 1
  123182. -Test "y0 (1.0) == 0.088256964215676957983":
  123183. -double: 2
  123184. -float: 1
  123185. -idouble: 2
  123186. -ifloat: 1
  123187. -Test "y0 (1.5) == 0.38244892379775884396":
  123188. -double: 2
  123189. -float: 1
  123190. -idouble: 2
  123191. -ifloat: 1
  123192. -Test "y0 (10.0) == 0.055671167283599391424":
  123193. -float: 1
  123194. -ifloat: 1
  123195. -Test "y0 (8.0) == 0.22352148938756622053":
  123196. -double: 1
  123197. -float: 1
  123198. -idouble: 1
  123199. -ifloat: 1
  123200. -
  123201. -# y1
  123202. -Test "y1 (0.1) == -6.4589510947020269877":
  123203. -double: 1
  123204. -idouble: 1
  123205. -Test "y1 (0.7) == -1.1032498719076333697":
  123206. -double: 1
  123207. -float: 1
  123208. -idouble: 1
  123209. -ifloat: 1
  123210. -Test "y1 (1.5) == -0.41230862697391129595":
  123211. -float: 1
  123212. -ifloat: 1
  123213. -Test "y1 (10.0) == 0.24901542420695388392":
  123214. -double: 3
  123215. -float: 1
  123216. -idouble: 3
  123217. -ifloat: 1
  123218. -Test "y1 (2.0) == -0.10703243154093754689":
  123219. -double: 1
  123220. -float: 1
  123221. -idouble: 1
  123222. -ifloat: 1
  123223. -Test "y1 (8.0) == -0.15806046173124749426":
  123224. -double: 1
  123225. -float: 2
  123226. -idouble: 1
  123227. -ifloat: 2
  123228. -
  123229. -# yn
  123230. -Test "yn (0, 0.7) == -0.19066492933739506743":
  123231. -double: 2
  123232. -float: 1
  123233. -idouble: 2
  123234. -ifloat: 1
  123235. -Test "yn (0, 1.0) == 0.088256964215676957983":
  123236. -double: 2
  123237. -float: 1
  123238. -idouble: 2
  123239. -ifloat: 1
  123240. -Test "yn (0, 1.5) == 0.38244892379775884396":
  123241. -double: 2
  123242. -float: 1
  123243. -idouble: 2
  123244. -ifloat: 1
  123245. -Test "yn (0, 10.0) == 0.055671167283599391424":
  123246. -float: 1
  123247. -ifloat: 1
  123248. -Test "yn (0, 8.0) == 0.22352148938756622053":
  123249. -double: 1
  123250. -float: 1
  123251. -idouble: 1
  123252. -ifloat: 1
  123253. -Test "yn (1, 0.1) == -6.4589510947020269877":
  123254. -double: 1
  123255. -idouble: 1
  123256. -Test "yn (1, 0.7) == -1.1032498719076333697":
  123257. -double: 1
  123258. -float: 1
  123259. -idouble: 1
  123260. -ifloat: 1
  123261. -Test "yn (1, 1.5) == -0.41230862697391129595":
  123262. -float: 1
  123263. -ifloat: 1
  123264. -Test "yn (1, 10.0) == 0.24901542420695388392":
  123265. -double: 3
  123266. -float: 1
  123267. -idouble: 3
  123268. -ifloat: 1
  123269. -Test "yn (1, 2.0) == -0.10703243154093754689":
  123270. -double: 1
  123271. -float: 1
  123272. -idouble: 1
  123273. -ifloat: 1
  123274. -Test "yn (1, 8.0) == -0.15806046173124749426":
  123275. -double: 1
  123276. -float: 2
  123277. -idouble: 1
  123278. -ifloat: 2
  123279. -Test "yn (10, 0.1) == -0.11831335132045197885e19":
  123280. -double: 2
  123281. -float: 2
  123282. -idouble: 2
  123283. -ifloat: 2
  123284. -Test "yn (10, 0.7) == -0.42447194260703866924e10":
  123285. -double: 3
  123286. -idouble: 3
  123287. -Test "yn (10, 1.0) == -0.12161801427868918929e9":
  123288. -double: 1
  123289. -idouble: 1
  123290. -Test "yn (10, 10.0) == -0.35981415218340272205":
  123291. -double: 1
  123292. -float: 1
  123293. -idouble: 1
  123294. -ifloat: 1
  123295. -Test "yn (10, 2.0) == -129184.54220803928264":
  123296. -double: 2
  123297. -idouble: 2
  123298. -Test "yn (3, 0.1) == -5099.3323786129048894":
  123299. -double: 1
  123300. -float: 1
  123301. -idouble: 1
  123302. -ifloat: 1
  123303. -Test "yn (3, 0.7) == -15.819479052819633505":
  123304. -double: 3
  123305. -float: 1
  123306. -idouble: 3
  123307. -ifloat: 1
  123308. -Test "yn (3, 10.0) == -0.25136265718383732978":
  123309. -double: 1
  123310. -float: 1
  123311. -idouble: 1
  123312. -ifloat: 1
  123313. -Test "yn (3, 2.0) == -1.1277837768404277861":
  123314. -double: 1
  123315. -idouble: 1
  123316. -
  123317. -# Maximal error of functions:
  123318. -Function: "asin":
  123319. -double: 1
  123320. -float: 2
  123321. -idouble: 1
  123322. -ifloat: 2
  123323. -
  123324. -Function: "atan2":
  123325. -float: 4
  123326. -ifloat: 4
  123327. -
  123328. -Function: "atanh":
  123329. -double: 1
  123330. -idouble: 1
  123331. -
  123332. -Function: "cabs":
  123333. -double: 1
  123334. -float: 1
  123335. -idouble: 1
  123336. -ifloat: 1
  123337. -
  123338. -Function: Real part of "cacos":
  123339. -double: 1
  123340. -float: 1
  123341. -idouble: 1
  123342. -ifloat: 1
  123343. -
  123344. -Function: Imaginary part of "cacos":
  123345. -float: 1
  123346. -ifloat: 1
  123347. -
  123348. -Function: Real part of "cacosh":
  123349. -double: 1
  123350. -float: 7
  123351. -idouble: 1
  123352. -ifloat: 7
  123353. -
  123354. -Function: Imaginary part of "cacosh":
  123355. -double: 1
  123356. -float: 3
  123357. -idouble: 1
  123358. -ifloat: 3
  123359. -
  123360. -Function: Real part of "casin":
  123361. -double: 3
  123362. -float: 2
  123363. -idouble: 3
  123364. -ifloat: 2
  123365. -
  123366. -Function: Imaginary part of "casin":
  123367. -float: 1
  123368. -ifloat: 1
  123369. -
  123370. -Function: Real part of "casinh":
  123371. -double: 5
  123372. -float: 1
  123373. -idouble: 5
  123374. -ifloat: 1
  123375. -
  123376. -Function: Imaginary part of "casinh":
  123377. -double: 3
  123378. -float: 6
  123379. -idouble: 3
  123380. -ifloat: 6
  123381. -
  123382. -Function: Real part of "catan":
  123383. -float: 4
  123384. -ifloat: 4
  123385. -
  123386. -Function: Imaginary part of "catan":
  123387. -double: 1
  123388. -float: 1
  123389. -idouble: 1
  123390. -ifloat: 1
  123391. -
  123392. -Function: Real part of "catanh":
  123393. -double: 4
  123394. -float: 1
  123395. -idouble: 4
  123396. -ifloat: 1
  123397. -
  123398. -Function: Imaginary part of "catanh":
  123399. -double: 1
  123400. -float: 6
  123401. -idouble: 1
  123402. -ifloat: 6
  123403. -
  123404. -Function: "cbrt":
  123405. -double: 1
  123406. -idouble: 1
  123407. -
  123408. -Function: Real part of "ccos":
  123409. -double: 1
  123410. -idouble: 1
  123411. -
  123412. -Function: Imaginary part of "ccos":
  123413. -double: 1
  123414. -float: 1
  123415. -idouble: 1
  123416. -ifloat: 1
  123417. -
  123418. -Function: Real part of "ccosh":
  123419. -double: 1
  123420. -float: 1
  123421. -idouble: 1
  123422. -ifloat: 1
  123423. -
  123424. -Function: Imaginary part of "ccosh":
  123425. -double: 1
  123426. -float: 1
  123427. -idouble: 1
  123428. -ifloat: 1
  123429. -
  123430. -Function: Real part of "cexp":
  123431. -double: 1
  123432. -float: 1
  123433. -idouble: 1
  123434. -ifloat: 1
  123435. -
  123436. -Function: Imaginary part of "cexp":
  123437. -float: 1
  123438. -ifloat: 1
  123439. -
  123440. -Function: Imaginary part of "clog":
  123441. -double: 1
  123442. -float: 3
  123443. -idouble: 1
  123444. -ifloat: 3
  123445. -
  123446. -Function: Real part of "clog10":
  123447. -double: 1
  123448. -float: 1
  123449. -idouble: 1
  123450. -ifloat: 1
  123451. -
  123452. -Function: Imaginary part of "clog10":
  123453. -double: 1
  123454. -float: 5
  123455. -idouble: 1
  123456. -ifloat: 5
  123457. -
  123458. -Function: "cos":
  123459. -double: 2
  123460. -float: 1
  123461. -idouble: 2
  123462. -ifloat: 1
  123463. -
  123464. -Function: Real part of "cpow":
  123465. -double: 1
  123466. -float: 4
  123467. -idouble: 1
  123468. -ifloat: 4
  123469. -
  123470. -Function: Imaginary part of "cpow":
  123471. -double: 1.1031
  123472. -float: 2
  123473. -idouble: 1.1031
  123474. -ifloat: 2
  123475. -
  123476. -Function: Imaginary part of "csin":
  123477. -float: 1
  123478. -ifloat: 1
  123479. -
  123480. -Function: Real part of "csinh":
  123481. -float: 1
  123482. -ifloat: 1
  123483. -
  123484. -Function: Imaginary part of "csinh":
  123485. -double: 1
  123486. -float: 1
  123487. -idouble: 1
  123488. -ifloat: 1
  123489. -
  123490. -Function: Real part of "csqrt":
  123491. -double: 1
  123492. -float: 1
  123493. -idouble: 1
  123494. -ifloat: 1
  123495. -
  123496. -Function: Imaginary part of "csqrt":
  123497. -float: 1
  123498. -ifloat: 1
  123499. -
  123500. -Function: Real part of "ctan":
  123501. -double: 1
  123502. -float: 1
  123503. -idouble: 1
  123504. -ifloat: 1
  123505. -
  123506. -Function: Imaginary part of "ctan":
  123507. -double: 1
  123508. -float: 1
  123509. -idouble: 1
  123510. -ifloat: 1
  123511. -
  123512. -Function: Real part of "ctanh":
  123513. -double: 2
  123514. -float: 2
  123515. -idouble: 2
  123516. -ifloat: 2
  123517. -
  123518. -Function: Imaginary part of "ctanh":
  123519. -double: 2
  123520. -float: 1
  123521. -idouble: 2
  123522. -ifloat: 1
  123523. -
  123524. -Function: "erfc":
  123525. -double: 24
  123526. -float: 12
  123527. -idouble: 24
  123528. -ifloat: 12
  123529. -
  123530. -Function: "exp10":
  123531. -double: 6
  123532. -float: 2
  123533. -idouble: 6
  123534. -ifloat: 2
  123535. -
  123536. -Function: "expm1":
  123537. -float: 1
  123538. -ifloat: 1
  123539. -
  123540. -Function: "fmod":
  123541. -double: 2
  123542. -float: 1
  123543. -idouble: 2
  123544. -ifloat: 1
  123545. -
  123546. -Function: "hypot":
  123547. -double: 1
  123548. -float: 1
  123549. -idouble: 1
  123550. -ifloat: 1
  123551. -
  123552. -Function: "j0":
  123553. -double: 2
  123554. -float: 2
  123555. -idouble: 2
  123556. -ifloat: 2
  123557. -
  123558. -Function: "j1":
  123559. -double: 1
  123560. -float: 2
  123561. -idouble: 1
  123562. -ifloat: 2
  123563. -
  123564. -Function: "jn":
  123565. -double: 6
  123566. -float: 4
  123567. -idouble: 6
  123568. -ifloat: 4
  123569. -
  123570. -Function: "lgamma":
  123571. -double: 1
  123572. -float: 2
  123573. -idouble: 1
  123574. -ifloat: 2
  123575. -
  123576. -Function: "log":
  123577. -double: 1
  123578. -float: 1
  123579. -idouble: 1
  123580. -ifloat: 1
  123581. -
  123582. -Function: "log10":
  123583. -double: 1
  123584. -float: 1
  123585. -idouble: 1
  123586. -ifloat: 1
  123587. -
  123588. -Function: "log1p":
  123589. -double: 1
  123590. -float: 1
  123591. -idouble: 1
  123592. -ifloat: 1
  123593. -
  123594. -Function: "log2":
  123595. -double: 1
  123596. -float: 1
  123597. -idouble: 1
  123598. -ifloat: 1
  123599. -
  123600. -Function: "sincos":
  123601. -double: 1
  123602. -float: 1
  123603. -idouble: 1
  123604. -ifloat: 1
  123605. -
  123606. -Function: "sinh":
  123607. -double: 1
  123608. -float: 1
  123609. -idouble: 1
  123610. -ifloat: 1
  123611. -
  123612. -Function: "tan":
  123613. -double: 0.5
  123614. -idouble: 0.5
  123615. -
  123616. -Function: "tanh":
  123617. -double: 1
  123618. -float: 1
  123619. -idouble: 1
  123620. -ifloat: 1
  123621. -
  123622. -Function: "tgamma":
  123623. -double: 1
  123624. -float: 1
  123625. -idouble: 1
  123626. -ifloat: 1
  123627. -
  123628. -Function: "y0":
  123629. -double: 2
  123630. -float: 1
  123631. -idouble: 2
  123632. -ifloat: 1
  123633. -
  123634. -Function: "y1":
  123635. -double: 3
  123636. -float: 2
  123637. -idouble: 3
  123638. -ifloat: 2
  123639. -
  123640. -Function: "yn":
  123641. -double: 3
  123642. -float: 2
  123643. -idouble: 3
  123644. -ifloat: 2
  123645. -
  123646. -# end of automatic generation
  123647. diff -Nur uClibc-0.9.33.2/test/math/libm-test-ulps-xtensa uClibc-git/test/math/libm-test-ulps-xtensa
  123648. --- uClibc-0.9.33.2/test/math/libm-test-ulps-xtensa 1970-01-01 01:00:00.000000000 +0100
  123649. +++ uClibc-git/test/math/libm-test-ulps-xtensa 2014-07-25 20:36:11.517359363 +0200
  123650. @@ -0,0 +1,129 @@
  123651. +# Begin of automatic generation
  123652. +
  123653. +# cos
  123654. +Test "cos (M_PI_6l * 2.0) == 0.5":
  123655. +double: 1
  123656. +idouble: 1
  123657. +Test "cos (M_PI_6l * 4.0) == -0.5":
  123658. +double: 2
  123659. +float: 1
  123660. +idouble: 2
  123661. +ifloat: 1
  123662. +
  123663. +# erf
  123664. +Test "erf (0.75) == 0.711155633653515131598937834591410777":
  123665. +double: 1
  123666. +idouble: 1
  123667. +Test "erf (1.25) == 0.922900128256458230136523481197281140":
  123668. +double: 1
  123669. +idouble: 1
  123670. +
  123671. +# erfc
  123672. +Test "erfc (4.125) == 0.542340079956506600531223408575531062e-8":
  123673. +double: 1
  123674. +idouble: 1
  123675. +
  123676. +# exp
  123677. +Test "exp (1) == e":
  123678. +double: 1
  123679. +idouble: 1
  123680. +
  123681. +# expm1
  123682. +Test "expm1 (0.75) == 1.11700001661267466854536981983709561":
  123683. +double: 1
  123684. +idouble: 1
  123685. +
  123686. +# hypot
  123687. +Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
  123688. +float: 1
  123689. +ifloat: 1
  123690. +Test "hypot (-0.7, 12.4) == 12.419742348374220601176836866763271":
  123691. +float: 1
  123692. +ifloat: 1
  123693. +Test "hypot (-12.4, -0.7) == 12.419742348374220601176836866763271":
  123694. +float: 1
  123695. +ifloat: 1
  123696. +Test "hypot (-12.4, 0.7) == 12.419742348374220601176836866763271":
  123697. +float: 1
  123698. +ifloat: 1
  123699. +Test "hypot (0.7, -12.4) == 12.419742348374220601176836866763271":
  123700. +float: 1
  123701. +ifloat: 1
  123702. +Test "hypot (0.7, 12.4) == 12.419742348374220601176836866763271":
  123703. +float: 1
  123704. +ifloat: 1
  123705. +Test "hypot (12.4, -0.7) == 12.419742348374220601176836866763271":
  123706. +float: 1
  123707. +ifloat: 1
  123708. +Test "hypot (12.4, 0.7) == 12.419742348374220601176836866763271":
  123709. +float: 1
  123710. +ifloat: 1
  123711. +
  123712. +# lgamma
  123713. +Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
  123714. +double: 1
  123715. +float: 1
  123716. +idouble: 1
  123717. +ifloat: 1
  123718. +Test "lgamma (1.2) == -0.853740900033158497197028392998854470e-1":
  123719. +double: 1
  123720. +float: 2
  123721. +idouble: 1
  123722. +ifloat: 2
  123723. +
  123724. +# log10
  123725. +Test "log10 (0.75) == -0.124938736608299953132449886193870744":
  123726. +double: 1
  123727. +idouble: 1
  123728. +Test "log10 (e) == log10(e)":
  123729. +float: 1
  123730. +ifloat: 1
  123731. +
  123732. +# Maximal error of functions:
  123733. +Function: "cos":
  123734. +double: 2
  123735. +float: 1
  123736. +idouble: 2
  123737. +ifloat: 1
  123738. +
  123739. +Function: "erf":
  123740. +double: 1
  123741. +idouble: 1
  123742. +
  123743. +Function: "erfc":
  123744. +double: 1
  123745. +idouble: 1
  123746. +
  123747. +Function: "exp":
  123748. +double: 1
  123749. +idouble: 1
  123750. +
  123751. +Function: "expm1":
  123752. +double: 1
  123753. +idouble: 1
  123754. +
  123755. +Function: "hypot":
  123756. +float: 1
  123757. +ifloat: 1
  123758. +
  123759. +Function: "lgamma":
  123760. +double: 1
  123761. +float: 2
  123762. +idouble: 1
  123763. +ifloat: 2
  123764. +
  123765. +Function: "log":
  123766. +float: 1
  123767. +ifloat: 1
  123768. +
  123769. +Function: "log10":
  123770. +double: 1
  123771. +float: 1
  123772. +idouble: 1
  123773. +ifloat: 1
  123774. +
  123775. +Function: "tan":
  123776. +double: 1
  123777. +idouble: 1
  123778. +
  123779. +# end of automatic generation
  123780. diff -Nur uClibc-0.9.33.2/test/math/Makefile uClibc-git/test/math/Makefile
  123781. --- uClibc-0.9.33.2/test/math/Makefile 2012-05-15 09:20:09.000000000 +0200
  123782. +++ uClibc-git/test/math/Makefile 2014-07-25 20:36:11.517359363 +0200
  123783. @@ -2,6 +2,7 @@
  123784. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  123785. top_builddir=../../
  123786. +top_srcdir=../../
  123787. include ../Rules.mak
  123788. -include Makefile.in
  123789. include ../Test.mak
  123790. diff -Nur uClibc-0.9.33.2/test/math/Makefile.in uClibc-git/test/math/Makefile.in
  123791. --- uClibc-0.9.33.2/test/math/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  123792. +++ uClibc-git/test/math/Makefile.in 2014-07-25 20:36:11.517359363 +0200
  123793. @@ -1,14 +1,19 @@
  123794. # uClibc math tests
  123795. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  123796. -TESTS := basic-test tst-definitions test-fpucw test-float test-ifloat test-double test-idouble \
  123797. - rint signgam ilogb
  123798. +# libm-test.c is a generated file used by the tests internally so skip it
  123799. +TESTS_DISABLED := libm-test
  123800. +
  123801. # gamma (removed from TESTS, need to add "small errors are ok" machinery there)
  123802. -ifeq ($(UCLIBC_HAS_LONG_DOUBLE_MATH),y)
  123803. -TESTS += test-ldouble test-ildoubl compile_test c99_test
  123804. +TESTS_DISABLED += gamma
  123805. +ifeq ($(UCLIBC_HAS_LONG_DOUBLE_MATH),)
  123806. +TESTS_DISABLED += test-ldouble test-ildoubl compile_test c99_test
  123807. else
  123808. CFLAGS_basic-test := -DNO_LONG_DOUBLE
  123809. endif
  123810. +ifeq ($(DO_C99_MATH),)
  123811. +TESTS_DISABLED += test-float test-ifloat test-double test-idouble rint signgam ilogb
  123812. +endif
  123813. DODIFF_rint := 1
  123814. DODIFF_signgam := 1
  123815. @@ -23,9 +28,17 @@
  123816. PERL := /usr/bin/perl
  123817. -$(TESTS): libm-test.c
  123818. +MDEPS := $(wildcard test-*.c)
  123819. +$(MDEPS): libm-test.c
  123820. +
  123821. +TARGET_ULP := $(if $(wildcard libm-test-ulps-$(TARGET_ARCH)),$(TARGET_ARCH),generic)
  123822. +ULP_SUFFIX :=
  123823. +ifeq ($(TARGET_ARCH),mips)
  123824. +ULP_SUFFIX:=$(if $(CONFIG_MIPS_ISA_MIPS64R1)$(CONFIG_MIPS_ISA_MIPS64R2),64,32)
  123825. +endif
  123826. +TARGET_ULP:=$(TARGET_ULP)$(ULP_SUFFIX)
  123827. -libm-test.c: libm-test-ulps-$(TARGET_ARCH) libm-test.inc gen-libm-test.pl
  123828. - $(Q)$(PERL) ./gen-libm-test.pl -u libm-test-ulps-$(TARGET_ARCH) ./libm-test.inc -o "." 2>&1 > /dev/null
  123829. +libm-test.c: libm-test-ulps-$(TARGET_ULP) libm-test.inc gen-libm-test.pl
  123830. + $(Q)$(PERL) ./gen-libm-test.pl -u libm-test-ulps-$(TARGET_ULP) ./libm-test.inc -o "." 2>&1 > /dev/null
  123831. EXTRA_CLEAN := libm-test.c libm-test-ulps.h
  123832. diff -Nur uClibc-0.9.33.2/test/math/test-double.c uClibc-git/test/math/test-double.c
  123833. --- uClibc-0.9.33.2/test/math/test-double.c 2012-05-15 09:20:09.000000000 +0200
  123834. +++ uClibc-git/test/math/test-double.c 2014-07-25 20:36:11.521359385 +0200
  123835. @@ -13,9 +13,8 @@
  123836. Lesser General Public License for more details.
  123837. You should have received a copy of the GNU Lesser General Public
  123838. - License along with the GNU C Library; if not, write to the Free
  123839. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  123840. - 02111-1307 USA. */
  123841. + License along with the GNU C Library; if not, see
  123842. + <http://www.gnu.org/licenses/>. */
  123843. #define FUNC(function) function
  123844. #define FLOAT double
  123845. diff -Nur uClibc-0.9.33.2/test/math/test-float.c uClibc-git/test/math/test-float.c
  123846. --- uClibc-0.9.33.2/test/math/test-float.c 2012-05-15 09:20:09.000000000 +0200
  123847. +++ uClibc-git/test/math/test-float.c 2014-07-25 20:36:11.521359385 +0200
  123848. @@ -13,9 +13,8 @@
  123849. Lesser General Public License for more details.
  123850. You should have received a copy of the GNU Lesser General Public
  123851. - License along with the GNU C Library; if not, write to the Free
  123852. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  123853. - 02111-1307 USA. */
  123854. + License along with the GNU C Library; if not, see
  123855. + <http://www.gnu.org/licenses/>. */
  123856. #define FUNC(function) function ## f
  123857. #define FLOAT float
  123858. diff -Nur uClibc-0.9.33.2/test/math/test-fpucw.c uClibc-git/test/math/test-fpucw.c
  123859. --- uClibc-0.9.33.2/test/math/test-fpucw.c 2012-05-15 09:20:09.000000000 +0200
  123860. +++ uClibc-git/test/math/test-fpucw.c 2014-07-25 20:36:11.521359385 +0200
  123861. @@ -13,9 +13,8 @@
  123862. Lesser General Public License for more details.
  123863. You should have received a copy of the GNU Lesser General Public
  123864. - License along with the GNU C Library; if not, write to the Free
  123865. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  123866. - 02111-1307 USA. */
  123867. + License along with the GNU C Library; if not, see
  123868. + <http://www.gnu.org/licenses/>. */
  123869. #include <fpu_control.h>
  123870. #include <stdio.h>
  123871. diff -Nur uClibc-0.9.33.2/test/math/test-idouble.c uClibc-git/test/math/test-idouble.c
  123872. --- uClibc-0.9.33.2/test/math/test-idouble.c 2012-05-15 09:20:09.000000000 +0200
  123873. +++ uClibc-git/test/math/test-idouble.c 2014-07-25 20:36:11.521359385 +0200
  123874. @@ -13,9 +13,8 @@
  123875. Lesser General Public License for more details.
  123876. You should have received a copy of the GNU Lesser General Public
  123877. - License along with the GNU C Library; if not, write to the Free
  123878. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  123879. - 02111-1307 USA. */
  123880. + License along with the GNU C Library; if not, see
  123881. + <http://www.gnu.org/licenses/>. */
  123882. #define FUNC(function) function
  123883. #define FLOAT double
  123884. diff -Nur uClibc-0.9.33.2/test/math/test-ifloat.c uClibc-git/test/math/test-ifloat.c
  123885. --- uClibc-0.9.33.2/test/math/test-ifloat.c 2012-05-15 09:20:09.000000000 +0200
  123886. +++ uClibc-git/test/math/test-ifloat.c 2014-07-25 20:36:11.521359385 +0200
  123887. @@ -13,9 +13,8 @@
  123888. Lesser General Public License for more details.
  123889. You should have received a copy of the GNU Lesser General Public
  123890. - License along with the GNU C Library; if not, write to the Free
  123891. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  123892. - 02111-1307 USA. */
  123893. + License along with the GNU C Library; if not, see
  123894. + <http://www.gnu.org/licenses/>. */
  123895. #define FUNC(function) function ## f
  123896. #define FLOAT float
  123897. diff -Nur uClibc-0.9.33.2/test/math/test-ildoubl.c uClibc-git/test/math/test-ildoubl.c
  123898. --- uClibc-0.9.33.2/test/math/test-ildoubl.c 2012-05-15 09:20:09.000000000 +0200
  123899. +++ uClibc-git/test/math/test-ildoubl.c 2014-07-25 20:36:11.521359385 +0200
  123900. @@ -13,9 +13,8 @@
  123901. Lesser General Public License for more details.
  123902. You should have received a copy of the GNU Lesser General Public
  123903. - License along with the GNU C Library; if not, write to the Free
  123904. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  123905. - 02111-1307 USA. */
  123906. + License along with the GNU C Library; if not, see
  123907. + <http://www.gnu.org/licenses/>. */
  123908. #define FUNC(function) function##l
  123909. #define FLOAT long double
  123910. diff -Nur uClibc-0.9.33.2/test/math/test-ldouble.c uClibc-git/test/math/test-ldouble.c
  123911. --- uClibc-0.9.33.2/test/math/test-ldouble.c 2012-05-15 09:20:09.000000000 +0200
  123912. +++ uClibc-git/test/math/test-ldouble.c 2014-07-25 20:36:11.521359385 +0200
  123913. @@ -13,9 +13,8 @@
  123914. Lesser General Public License for more details.
  123915. You should have received a copy of the GNU Lesser General Public
  123916. - License along with the GNU C Library; if not, write to the Free
  123917. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  123918. - 02111-1307 USA. */
  123919. + License along with the GNU C Library; if not, see
  123920. + <http://www.gnu.org/licenses/>. */
  123921. #define FUNC(function) function##l
  123922. #define FLOAT long double
  123923. diff -Nur uClibc-0.9.33.2/test/math/tst-definitions.c uClibc-git/test/math/tst-definitions.c
  123924. --- uClibc-0.9.33.2/test/math/tst-definitions.c 2012-05-15 09:20:09.000000000 +0200
  123925. +++ uClibc-git/test/math/tst-definitions.c 2014-07-25 20:36:11.521359385 +0200
  123926. @@ -13,9 +13,8 @@
  123927. Lesser General Public License for more details.
  123928. You should have received a copy of the GNU Lesser General Public
  123929. - License along with the GNU C Library; if not, write to the Free
  123930. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  123931. - 02111-1307 USA. */
  123932. + License along with the GNU C Library; if not, see
  123933. + <http://www.gnu.org/licenses/>. */
  123934. #include <limits.h>
  123935. #include <math.h>
  123936. diff -Nur uClibc-0.9.33.2/test/misc/bug-glob2.c uClibc-git/test/misc/bug-glob2.c
  123937. --- uClibc-0.9.33.2/test/misc/bug-glob2.c 2012-05-15 09:20:09.000000000 +0200
  123938. +++ uClibc-git/test/misc/bug-glob2.c 2014-07-25 20:36:11.537359468 +0200
  123939. @@ -14,9 +14,8 @@
  123940. Lesser General Public License for more details.
  123941. You should have received a copy of the GNU Lesser General Public
  123942. - License along with the GNU C Library; if not, write to the Free
  123943. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  123944. - 02111-1307 USA. */
  123945. + License along with the GNU C Library; if not, see
  123946. + <http://www.gnu.org/licenses/>. */
  123947. #include <errno.h>
  123948. #include <error.h>
  123949. diff -Nur uClibc-0.9.33.2/test/misc/Makefile uClibc-git/test/misc/Makefile
  123950. --- uClibc-0.9.33.2/test/misc/Makefile 2012-05-15 09:20:09.000000000 +0200
  123951. +++ uClibc-git/test/misc/Makefile 2014-07-25 20:36:11.537359468 +0200
  123952. @@ -2,6 +2,7 @@
  123953. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  123954. top_builddir=../../
  123955. +top_srcdir=../../
  123956. include ../Rules.mak
  123957. -include Makefile.in
  123958. include ../Test.mak
  123959. diff -Nur uClibc-0.9.33.2/test/misc/Makefile.in uClibc-git/test/misc/Makefile.in
  123960. --- uClibc-0.9.33.2/test/misc/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  123961. +++ uClibc-git/test/misc/Makefile.in 2014-07-25 20:36:11.537359468 +0200
  123962. @@ -4,11 +4,18 @@
  123963. TESTS_DISABLED := outb tst-fnmatch bug-glob1 tst-gnuglob
  123964. ifeq ($(UCLIBC_HAS_LFS),)
  123965. TESTS_DISABLED += dirent64
  123966. +TESTS_DISABLED += tst-statfs # assuming host has LFS on
  123967. endif
  123968. CFLAGS_dirent64 := -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
  123969. DODIFF_dirent := 1
  123970. DODIFF_dirent64 := 1
  123971. +DODIFF_tst-statfs := 1
  123972. +DODIFF_tst-statvfs := 1
  123973. OPTS_bug-glob1 := $(PWD)
  123974. OPTS_tst-fnmatch := < tst-fnmatch.input
  123975. +
  123976. +MNTENTS = $(shell mount | while read dev on mp rest; do echo $$mp; done)
  123977. +OPTS_tst-statfs := $(MNTENTS)
  123978. +OPTS_tst-statvfs := $(MNTENTS)
  123979. diff -Nur uClibc-0.9.33.2/test/misc/opendir-tst1.c uClibc-git/test/misc/opendir-tst1.c
  123980. --- uClibc-0.9.33.2/test/misc/opendir-tst1.c 2012-05-15 09:20:09.000000000 +0200
  123981. +++ uClibc-git/test/misc/opendir-tst1.c 2014-07-25 20:36:11.541359489 +0200
  123982. @@ -13,9 +13,8 @@
  123983. Lesser General Public License for more details.
  123984. You should have received a copy of the GNU Lesser General Public
  123985. - License along with the GNU C Library; if not, write to the Free
  123986. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  123987. - 02111-1307 USA. */
  123988. + License along with the GNU C Library; if not, see
  123989. + <http://www.gnu.org/licenses/>. */
  123990. #include <dirent.h>
  123991. #include <errno.h>
  123992. diff -Nur uClibc-0.9.33.2/test/misc/tst-fnmatch.c uClibc-git/test/misc/tst-fnmatch.c
  123993. --- uClibc-0.9.33.2/test/misc/tst-fnmatch.c 2012-05-15 09:20:09.000000000 +0200
  123994. +++ uClibc-git/test/misc/tst-fnmatch.c 2014-07-25 20:36:11.541359489 +0200
  123995. @@ -13,9 +13,8 @@
  123996. Lesser General Public License for more details.
  123997. You should have received a copy of the GNU Lesser General Public
  123998. - License along with the GNU C Library; if not, write to the Free
  123999. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124000. - 02111-1307 USA. */
  124001. + License along with the GNU C Library; if not, see
  124002. + <http://www.gnu.org/licenses/>. */
  124003. #include <errno.h>
  124004. #include <error.h>
  124005. diff -Nur uClibc-0.9.33.2/test/misc/tst-fnmatch.input uClibc-git/test/misc/tst-fnmatch.input
  124006. --- uClibc-0.9.33.2/test/misc/tst-fnmatch.input 2012-05-15 09:20:09.000000000 +0200
  124007. +++ uClibc-git/test/misc/tst-fnmatch.input 2014-07-25 20:36:11.541359489 +0200
  124008. @@ -15,9 +15,8 @@
  124009. # Lesser General Public License for more details.
  124010. # You should have received a copy of the GNU Lesser General Public
  124011. -# License along with the GNU C Library; if not, write to the Free
  124012. -# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124013. -# 02111-1307 USA.
  124014. +# License along with the GNU C Library; see the file COPYING.LIB. If
  124015. +# not, see <http://www.gnu.org/licenses/>.
  124016. # Derived from the IEEE 2003.2 text. The standard only contains some
  124017. diff -Nur uClibc-0.9.33.2/test/misc/tst-gnuglob.c uClibc-git/test/misc/tst-gnuglob.c
  124018. --- uClibc-0.9.33.2/test/misc/tst-gnuglob.c 2012-05-15 09:20:09.000000000 +0200
  124019. +++ uClibc-git/test/misc/tst-gnuglob.c 2014-07-25 20:36:11.541359489 +0200
  124020. @@ -15,9 +15,8 @@
  124021. Lesser General Public License for more details.
  124022. You should have received a copy of the GNU Lesser General Public
  124023. - License along with the GNU C Library; if not, write to the Free
  124024. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124025. - 02111-1307 USA. */
  124026. + License along with the GNU C Library; if not, see
  124027. + <http://www.gnu.org/licenses/>. */
  124028. #include <dirent.h>
  124029. #include <errno.h>
  124030. diff -Nur uClibc-0.9.33.2/test/misc/tst-inotify.c uClibc-git/test/misc/tst-inotify.c
  124031. --- uClibc-0.9.33.2/test/misc/tst-inotify.c 1970-01-01 01:00:00.000000000 +0100
  124032. +++ uClibc-git/test/misc/tst-inotify.c 2014-07-25 20:36:11.541359489 +0200
  124033. @@ -0,0 +1,66 @@
  124034. +/* vi: set sw=4 ts=4 sts=4: */
  124035. +/*
  124036. + * inotify test for uClibc
  124037. + * Copyright (C) 2012 by Kevin Cernekee <cernekee@gmail.com>
  124038. + *
  124039. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  124040. + */
  124041. +
  124042. +#include <stdio.h>
  124043. +#include <stdlib.h>
  124044. +#include <string.h>
  124045. +#include <unistd.h>
  124046. +#include <errno.h>
  124047. +#include <error.h>
  124048. +#include <inttypes.h>
  124049. +#include <sys/inotify.h>
  124050. +#include <sys/fcntl.h>
  124051. +
  124052. +static int
  124053. +do_test(void)
  124054. +{
  124055. + int ifd, fd, ret, result = 0;
  124056. + struct inotify_event e;
  124057. + char tfile[] = "/tmp/inotify.XXXXXX";
  124058. +
  124059. + fd = mkstemp(tfile);
  124060. + close(fd);
  124061. +
  124062. + ifd = inotify_init1(IN_NONBLOCK);
  124063. + if (ifd < 0) {
  124064. + perror("inotify_init1()");
  124065. + result = 1;
  124066. + }
  124067. + if (inotify_add_watch(ifd, tfile, IN_DELETE_SELF) < 0) {
  124068. + perror("inotify_add_watch()");
  124069. + result = 1;
  124070. + }
  124071. +
  124072. + /* nonblocking inotify should return immediately with no events */
  124073. + ret = read(ifd, &e, sizeof(e));
  124074. + if (ret != -1 || errno != EAGAIN) {
  124075. + error(0, 0, "first read() returned %d", ret);
  124076. + result = 1;
  124077. + }
  124078. +
  124079. + /* generate an event */
  124080. + unlink(tfile);
  124081. +
  124082. + /* now check whether our event was seen */
  124083. + ret = read(ifd, &e, sizeof(e));
  124084. + if (ret != sizeof(e)) {
  124085. + error(0, 0, "second read() returned %d", ret);
  124086. + result = 1;
  124087. + }
  124088. +
  124089. + if (!(e.mask & IN_DELETE_SELF)) {
  124090. + error(0, 0, "incorrect event mask: %" PRIx32, e.mask);
  124091. + result = 1;
  124092. + }
  124093. +
  124094. + return result;
  124095. +}
  124096. +
  124097. +#define TIMEOUT 5
  124098. +#define TEST_FUNCTION do_test ()
  124099. +#include "../test-skeleton.c"
  124100. diff -Nur uClibc-0.9.33.2/test/misc/tst-statfs.c uClibc-git/test/misc/tst-statfs.c
  124101. --- uClibc-0.9.33.2/test/misc/tst-statfs.c 1970-01-01 01:00:00.000000000 +0100
  124102. +++ uClibc-git/test/misc/tst-statfs.c 2014-07-25 20:36:11.541359489 +0200
  124103. @@ -0,0 +1,31 @@
  124104. +#include <sys/vfs.h>
  124105. +#include <errno.h>
  124106. +#include <stdio.h>
  124107. +#include <stdlib.h>
  124108. +#include <string.h>
  124109. +
  124110. +int
  124111. +main(int argc, char* argv[])
  124112. +{
  124113. + struct statfs s;
  124114. + int ret = 0, i;
  124115. +
  124116. + for (i = 1; i < argc; i++) {
  124117. + if (statfs(argv[i], &s) != 0) {
  124118. + fprintf(stderr, "%s: %s: statfs failed. %s\n",
  124119. + *argv, argv[i], strerror(errno));
  124120. + exit(EXIT_FAILURE);
  124121. + }
  124122. + ++ret;
  124123. + printf("statfs %s:\n\tblocks=%lld\n\tblkfree=%lld\n\tbsize=%d\n",
  124124. + argv[i], s.f_blocks, s.f_bfree, s.f_bsize);
  124125. +#ifdef _STATFS_F_FRSIZE
  124126. + printf("\tfrsize=%lld\n", s.f_frsize);
  124127. +#elif defined __mips__
  124128. + printf("\tfrsize=mips, unsupported?\n");
  124129. +#else
  124130. +# error no _STATFS_F_FRSIZE
  124131. +#endif
  124132. + }
  124133. + exit(ret ? EXIT_SUCCESS : EXIT_FAILURE);
  124134. +}
  124135. diff -Nur uClibc-0.9.33.2/test/misc/tst-statvfs.c uClibc-git/test/misc/tst-statvfs.c
  124136. --- uClibc-0.9.33.2/test/misc/tst-statvfs.c 1970-01-01 01:00:00.000000000 +0100
  124137. +++ uClibc-git/test/misc/tst-statvfs.c 2014-07-25 20:36:11.541359489 +0200
  124138. @@ -0,0 +1,26 @@
  124139. +#include <sys/statvfs.h>
  124140. +#include <errno.h>
  124141. +#include <stdio.h>
  124142. +#include <stdlib.h>
  124143. +#include <string.h>
  124144. +
  124145. +int
  124146. +main(int argc, char* argv[])
  124147. +{
  124148. + struct statvfs s;
  124149. + int i;
  124150. +
  124151. + for (i = 1; i < argc; i++) {
  124152. + if (statvfs(argv[i], &s) != 0) {
  124153. + fprintf(stderr, "%s: %s: statvfs failed. %s\n",
  124154. + *argv, argv[i], strerror(errno));
  124155. + exit(EXIT_FAILURE);
  124156. + }
  124157. + printf("statvfs %s:\n\tblocks=%lld\n\tblkfree=%lld\n\tbsize=%d\n",
  124158. + argv[i], s.f_blocks, s.f_bfree, s.f_bsize);
  124159. +#if 1 // def _STATFS_F_FRSIZE
  124160. + printf("\tfrsize=%lld\n", s.f_frsize);
  124161. +#endif
  124162. + }
  124163. + exit(EXIT_SUCCESS);
  124164. +}
  124165. diff -Nur uClibc-0.9.33.2/test/misc/tst-utmp.c uClibc-git/test/misc/tst-utmp.c
  124166. --- uClibc-0.9.33.2/test/misc/tst-utmp.c 2012-05-15 09:20:09.000000000 +0200
  124167. +++ uClibc-git/test/misc/tst-utmp.c 2014-07-25 20:36:11.541359489 +0200
  124168. @@ -14,9 +14,8 @@
  124169. Lesser General Public License for more details.
  124170. You should have received a copy of the GNU Lesser General Public
  124171. - License along with the GNU C Library; if not, write to the Free
  124172. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124173. - 02111-1307 USA. */
  124174. + License along with the GNU C Library; if not, see
  124175. + <http://www.gnu.org/licenses/>. */
  124176. #include <errno.h>
  124177. #include <error.h>
  124178. diff -Nur uClibc-0.9.33.2/test/mmap/Makefile uClibc-git/test/mmap/Makefile
  124179. --- uClibc-0.9.33.2/test/mmap/Makefile 2012-05-15 09:20:09.000000000 +0200
  124180. +++ uClibc-git/test/mmap/Makefile 2014-07-25 20:36:11.561359595 +0200
  124181. @@ -2,6 +2,7 @@
  124182. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  124183. top_builddir=../../
  124184. +top_srcdir=../../
  124185. include ../Rules.mak
  124186. -include Makefile.in
  124187. include ../Test.mak
  124188. diff -Nur uClibc-0.9.33.2/test/nptl/eintr.c uClibc-git/test/nptl/eintr.c
  124189. --- uClibc-0.9.33.2/test/nptl/eintr.c 2012-05-15 09:20:09.000000000 +0200
  124190. +++ uClibc-git/test/nptl/eintr.c 2014-07-25 20:36:11.581359699 +0200
  124191. @@ -13,9 +13,8 @@
  124192. Lesser General Public License for more details.
  124193. You should have received a copy of the GNU Lesser General Public
  124194. - License along with the GNU C Library; if not, write to the Free
  124195. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124196. - 02111-1307 USA. */
  124197. + License along with the GNU C Library; if not, see
  124198. + <http://www.gnu.org/licenses/>. */
  124199. #include <pthread.h>
  124200. #include <signal.h>
  124201. diff -Nur uClibc-0.9.33.2/test/nptl/Makefile.in uClibc-git/test/nptl/Makefile.in
  124202. --- uClibc-0.9.33.2/test/nptl/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  124203. +++ uClibc-git/test/nptl/Makefile.in 2014-07-25 20:36:11.581359699 +0200
  124204. @@ -73,21 +73,11 @@
  124205. GLIBC_TESTS_DISABLED += tst-tls3_glibc tst-tls4_glibc tst-tls5_glibc
  124206. endif
  124207. -PTDIR := $(top_builddir)libpthread/nptl
  124208. -SYSDEPS_DIR := $(top_srcdir)libc/sysdeps
  124209. -
  124210. EXTRA_CFLAGS := -DNOT_IN_libc=1 -D_LIBC -D__USE_GNU -std=gnu99 \
  124211. - -I$(SYSDEPS_DIR)/linux \
  124212. - -I$(SYSDEPS_DIR)/linux/$(TARGET_ARCH) \
  124213. - -I$(PTDIR) -I$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH) \
  124214. - -I$(PTDIR)/sysdeps/$(TARGET_ARCH) \
  124215. - -I$(PTDIR)/sysdeps/unix/sysv/linux \
  124216. - -I$(PTDIR)/sysdeps/pthread \
  124217. - -I$(PTDIR)/sysdeps/pthread/bits \
  124218. - -I$(PTDIR)/sysdeps/generic \
  124219. - -I$(top_builddir)ldso/include \
  124220. - -I$(top_builddir)ldso/ldso/$(TARGET_ARCH) \
  124221. - -I$(top_builddir)include \
  124222. + $(PTINC) \
  124223. + -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH) \
  124224. + -I$(top_srcdir)libc/sysdeps/linux \
  124225. + -I$(top_builddir)include \
  124226. -include $(top_builddir)include/libc-symbols.h
  124227. ifeq ($(TARGET_ARCH),i386)
  124228. diff -Nur uClibc-0.9.33.2/test/nptl/tst-align2.c uClibc-git/test/nptl/tst-align2.c
  124229. --- uClibc-0.9.33.2/test/nptl/tst-align2.c 2012-05-15 09:20:09.000000000 +0200
  124230. +++ uClibc-git/test/nptl/tst-align2.c 2014-07-25 20:36:11.581359699 +0200
  124231. @@ -12,9 +12,8 @@
  124232. Lesser General Public License for more details.
  124233. You should have received a copy of the GNU Lesser General Public
  124234. - License along with the GNU C Library; if not, write to the Free
  124235. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124236. - 02111-1307 USA. */
  124237. + License along with the GNU C Library; if not, see
  124238. + <http://www.gnu.org/licenses/>. */
  124239. #include <sched.h>
  124240. #include <stdbool.h>
  124241. diff -Nur uClibc-0.9.33.2/test/nptl/tst-align3.c uClibc-git/test/nptl/tst-align3.c
  124242. --- uClibc-0.9.33.2/test/nptl/tst-align3.c 2012-05-15 09:20:09.000000000 +0200
  124243. +++ uClibc-git/test/nptl/tst-align3.c 2014-07-25 20:36:11.581359699 +0200
  124244. @@ -13,9 +13,8 @@
  124245. Lesser General Public License for more details.
  124246. You should have received a copy of the GNU Lesser General Public
  124247. - License along with the GNU C Library; if not, write to the Free
  124248. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124249. - 02111-1307 USA. */
  124250. + License along with the GNU C Library; if not, see
  124251. + <http://www.gnu.org/licenses/>. */
  124252. #include <pthread.h>
  124253. #include <stdbool.h>
  124254. diff -Nur uClibc-0.9.33.2/test/nptl/tst-align.c uClibc-git/test/nptl/tst-align.c
  124255. --- uClibc-0.9.33.2/test/nptl/tst-align.c 2012-05-15 09:20:09.000000000 +0200
  124256. +++ uClibc-git/test/nptl/tst-align.c 2014-07-25 20:36:11.581359699 +0200
  124257. @@ -13,9 +13,8 @@
  124258. Lesser General Public License for more details.
  124259. You should have received a copy of the GNU Lesser General Public
  124260. - License along with the GNU C Library; if not, write to the Free
  124261. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124262. - 02111-1307 USA. */
  124263. + License along with the GNU C Library; if not, see
  124264. + <http://www.gnu.org/licenses/>. */
  124265. #include <pthread.h>
  124266. #include <stdbool.h>
  124267. diff -Nur uClibc-0.9.33.2/test/nptl/tst-atfork1.c uClibc-git/test/nptl/tst-atfork1.c
  124268. --- uClibc-0.9.33.2/test/nptl/tst-atfork1.c 2012-05-15 09:20:09.000000000 +0200
  124269. +++ uClibc-git/test/nptl/tst-atfork1.c 2014-07-25 20:36:11.581359699 +0200
  124270. @@ -13,9 +13,8 @@
  124271. Lesser General Public License for more details.
  124272. You should have received a copy of the GNU Lesser General Public
  124273. - License along with the GNU C Library; if not, write to the Free
  124274. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124275. - 02111-1307 USA. */
  124276. + License along with the GNU C Library; if not, see
  124277. + <http://www.gnu.org/licenses/>. */
  124278. #include <errno.h>
  124279. #include <pthread.h>
  124280. diff -Nur uClibc-0.9.33.2/test/nptl/tst-attr1.c uClibc-git/test/nptl/tst-attr1.c
  124281. --- uClibc-0.9.33.2/test/nptl/tst-attr1.c 2012-05-15 09:20:09.000000000 +0200
  124282. +++ uClibc-git/test/nptl/tst-attr1.c 2014-07-25 20:36:11.581359699 +0200
  124283. @@ -13,9 +13,8 @@
  124284. Lesser General Public License for more details.
  124285. You should have received a copy of the GNU Lesser General Public
  124286. - License along with the GNU C Library; if not, write to the Free
  124287. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124288. - 02111-1307 USA. */
  124289. + License along with the GNU C Library; if not, see
  124290. + <http://www.gnu.org/licenses/>. */
  124291. #include <errno.h>
  124292. #include <pthread.h>
  124293. diff -Nur uClibc-0.9.33.2/test/nptl/tst-attr2.c uClibc-git/test/nptl/tst-attr2.c
  124294. --- uClibc-0.9.33.2/test/nptl/tst-attr2.c 2012-05-15 09:20:09.000000000 +0200
  124295. +++ uClibc-git/test/nptl/tst-attr2.c 2014-07-25 20:36:11.581359699 +0200
  124296. @@ -13,9 +13,8 @@
  124297. Lesser General Public License for more details.
  124298. You should have received a copy of the GNU Lesser General Public
  124299. - License along with the GNU C Library; if not, write to the Free
  124300. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124301. - 02111-1307 USA. */
  124302. + License along with the GNU C Library; if not, see
  124303. + <http://www.gnu.org/licenses/>. */
  124304. #include <errno.h>
  124305. #include <pthread.h>
  124306. diff -Nur uClibc-0.9.33.2/test/nptl/tst-attr3.c uClibc-git/test/nptl/tst-attr3.c
  124307. --- uClibc-0.9.33.2/test/nptl/tst-attr3.c 2012-05-15 09:20:09.000000000 +0200
  124308. +++ uClibc-git/test/nptl/tst-attr3.c 2014-07-25 20:36:11.581359699 +0200
  124309. @@ -14,9 +14,8 @@
  124310. Lesser General Public License for more details.
  124311. You should have received a copy of the GNU Lesser General Public
  124312. - License along with the GNU C Library; if not, write to the Free
  124313. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124314. - 02111-1307 USA. */
  124315. + License along with the GNU C Library; if not, see
  124316. + <http://www.gnu.org/licenses/>. */
  124317. #include <errno.h>
  124318. #include <error.h>
  124319. diff -Nur uClibc-0.9.33.2/test/nptl/tst-barrier1.c uClibc-git/test/nptl/tst-barrier1.c
  124320. --- uClibc-0.9.33.2/test/nptl/tst-barrier1.c 2012-05-15 09:20:09.000000000 +0200
  124321. +++ uClibc-git/test/nptl/tst-barrier1.c 2014-07-25 20:36:11.581359699 +0200
  124322. @@ -13,9 +13,8 @@
  124323. Lesser General Public License for more details.
  124324. You should have received a copy of the GNU Lesser General Public
  124325. - License along with the GNU C Library; if not, write to the Free
  124326. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124327. - 02111-1307 USA. */
  124328. + License along with the GNU C Library; if not, see
  124329. + <http://www.gnu.org/licenses/>. */
  124330. #include <errno.h>
  124331. #include <pthread.h>
  124332. diff -Nur uClibc-0.9.33.2/test/nptl/tst-barrier2.c uClibc-git/test/nptl/tst-barrier2.c
  124333. --- uClibc-0.9.33.2/test/nptl/tst-barrier2.c 2012-05-15 09:20:09.000000000 +0200
  124334. +++ uClibc-git/test/nptl/tst-barrier2.c 2014-07-25 20:36:11.581359699 +0200
  124335. @@ -13,9 +13,8 @@
  124336. Lesser General Public License for more details.
  124337. You should have received a copy of the GNU Lesser General Public
  124338. - License along with the GNU C Library; if not, write to the Free
  124339. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124340. - 02111-1307 USA. */
  124341. + License along with the GNU C Library; if not, see
  124342. + <http://www.gnu.org/licenses/>. */
  124343. #include <errno.h>
  124344. #include <pthread.h>
  124345. diff -Nur uClibc-0.9.33.2/test/nptl/tst-barrier3.c uClibc-git/test/nptl/tst-barrier3.c
  124346. --- uClibc-0.9.33.2/test/nptl/tst-barrier3.c 2012-05-15 09:20:09.000000000 +0200
  124347. +++ uClibc-git/test/nptl/tst-barrier3.c 2014-07-25 20:36:11.581359699 +0200
  124348. @@ -13,9 +13,8 @@
  124349. Lesser General Public License for more details.
  124350. You should have received a copy of the GNU Lesser General Public
  124351. - License along with the GNU C Library; if not, write to the Free
  124352. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124353. - 02111-1307 USA. */
  124354. + License along with the GNU C Library; if not, see
  124355. + <http://www.gnu.org/licenses/>. */
  124356. /* Test of POSIX barriers. */
  124357. diff -Nur uClibc-0.9.33.2/test/nptl/tst-barrier4.c uClibc-git/test/nptl/tst-barrier4.c
  124358. --- uClibc-0.9.33.2/test/nptl/tst-barrier4.c 2012-05-15 09:20:09.000000000 +0200
  124359. +++ uClibc-git/test/nptl/tst-barrier4.c 2014-07-25 20:36:11.581359699 +0200
  124360. @@ -13,9 +13,8 @@
  124361. Lesser General Public License for more details.
  124362. You should have received a copy of the GNU Lesser General Public
  124363. - License along with the GNU C Library; if not, write to the Free
  124364. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124365. - 02111-1307 USA. */
  124366. + License along with the GNU C Library; if not, see
  124367. + <http://www.gnu.org/licenses/>. */
  124368. /* This is a test for behavior not guaranteed by POSIX. */
  124369. #include <errno.h>
  124370. diff -Nur uClibc-0.9.33.2/test/nptl/tst-basic1.c uClibc-git/test/nptl/tst-basic1.c
  124371. --- uClibc-0.9.33.2/test/nptl/tst-basic1.c 2012-05-15 09:20:09.000000000 +0200
  124372. +++ uClibc-git/test/nptl/tst-basic1.c 2014-07-25 20:36:11.581359699 +0200
  124373. @@ -13,9 +13,8 @@
  124374. Lesser General Public License for more details.
  124375. You should have received a copy of the GNU Lesser General Public
  124376. - License along with the GNU C Library; if not, write to the Free
  124377. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124378. - 02111-1307 USA. */
  124379. + License along with the GNU C Library; if not, see
  124380. + <http://www.gnu.org/licenses/>. */
  124381. #include <pthread.h>
  124382. #include <stdio.h>
  124383. diff -Nur uClibc-0.9.33.2/test/nptl/tst-basic2.c uClibc-git/test/nptl/tst-basic2.c
  124384. --- uClibc-0.9.33.2/test/nptl/tst-basic2.c 2012-05-15 09:20:09.000000000 +0200
  124385. +++ uClibc-git/test/nptl/tst-basic2.c 2014-07-25 20:36:11.581359699 +0200
  124386. @@ -13,9 +13,8 @@
  124387. Lesser General Public License for more details.
  124388. You should have received a copy of the GNU Lesser General Public
  124389. - License along with the GNU C Library; if not, write to the Free
  124390. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124391. - 02111-1307 USA. */
  124392. + License along with the GNU C Library; if not, see
  124393. + <http://www.gnu.org/licenses/>. */
  124394. #include <pthread.h>
  124395. #include <stdio.h>
  124396. diff -Nur uClibc-0.9.33.2/test/nptl/tst-basic3.c uClibc-git/test/nptl/tst-basic3.c
  124397. --- uClibc-0.9.33.2/test/nptl/tst-basic3.c 2012-05-15 09:20:09.000000000 +0200
  124398. +++ uClibc-git/test/nptl/tst-basic3.c 2014-07-25 20:36:11.581359699 +0200
  124399. @@ -13,9 +13,8 @@
  124400. Lesser General Public License for more details.
  124401. You should have received a copy of the GNU Lesser General Public
  124402. - License along with the GNU C Library; if not, write to the Free
  124403. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124404. - 02111-1307 USA. */
  124405. + License along with the GNU C Library; if not, see
  124406. + <http://www.gnu.org/licenses/>. */
  124407. #include <pthread.h>
  124408. #include <signal.h>
  124409. diff -Nur uClibc-0.9.33.2/test/nptl/tst-basic4.c uClibc-git/test/nptl/tst-basic4.c
  124410. --- uClibc-0.9.33.2/test/nptl/tst-basic4.c 2012-05-15 09:20:09.000000000 +0200
  124411. +++ uClibc-git/test/nptl/tst-basic4.c 2014-07-25 20:36:11.581359699 +0200
  124412. @@ -13,9 +13,8 @@
  124413. Lesser General Public License for more details.
  124414. You should have received a copy of the GNU Lesser General Public
  124415. - License along with the GNU C Library; if not, write to the Free
  124416. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124417. - 02111-1307 USA. */
  124418. + License along with the GNU C Library; if not, see
  124419. + <http://www.gnu.org/licenses/>. */
  124420. #include <errno.h>
  124421. #include <pthread.h>
  124422. diff -Nur uClibc-0.9.33.2/test/nptl/tst-basic5.c uClibc-git/test/nptl/tst-basic5.c
  124423. --- uClibc-0.9.33.2/test/nptl/tst-basic5.c 2012-05-15 09:20:09.000000000 +0200
  124424. +++ uClibc-git/test/nptl/tst-basic5.c 2014-07-25 20:36:11.581359699 +0200
  124425. @@ -13,9 +13,8 @@
  124426. Lesser General Public License for more details.
  124427. You should have received a copy of the GNU Lesser General Public
  124428. - License along with the GNU C Library; if not, write to the Free
  124429. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124430. - 02111-1307 USA. */
  124431. + License along with the GNU C Library; if not, see
  124432. + <http://www.gnu.org/licenses/>. */
  124433. #include <errno.h>
  124434. #include <pthread.h>
  124435. diff -Nur uClibc-0.9.33.2/test/nptl/tst-basic6.c uClibc-git/test/nptl/tst-basic6.c
  124436. --- uClibc-0.9.33.2/test/nptl/tst-basic6.c 2012-05-15 09:20:09.000000000 +0200
  124437. +++ uClibc-git/test/nptl/tst-basic6.c 2014-07-25 20:36:11.581359699 +0200
  124438. @@ -13,9 +13,8 @@
  124439. Lesser General Public License for more details.
  124440. You should have received a copy of the GNU Lesser General Public
  124441. - License along with the GNU C Library; if not, write to the Free
  124442. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124443. - 02111-1307 USA. */
  124444. + License along with the GNU C Library; if not, see
  124445. + <http://www.gnu.org/licenses/>. */
  124446. #include <pthread.h>
  124447. #include <stdio.h>
  124448. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel10.c uClibc-git/test/nptl/tst-cancel10.c
  124449. --- uClibc-0.9.33.2/test/nptl/tst-cancel10.c 2012-05-15 09:20:09.000000000 +0200
  124450. +++ uClibc-git/test/nptl/tst-cancel10.c 2014-07-25 20:36:11.581359699 +0200
  124451. @@ -13,9 +13,8 @@
  124452. Lesser General Public License for more details.
  124453. You should have received a copy of the GNU Lesser General Public
  124454. - License along with the GNU C Library; if not, write to the Free
  124455. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124456. - 02111-1307 USA. */
  124457. + License along with the GNU C Library; if not, see
  124458. + <http://www.gnu.org/licenses/>. */
  124459. #include <pthread.h>
  124460. #include <stdio.h>
  124461. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel11.c uClibc-git/test/nptl/tst-cancel11.c
  124462. --- uClibc-0.9.33.2/test/nptl/tst-cancel11.c 2012-05-15 09:20:09.000000000 +0200
  124463. +++ uClibc-git/test/nptl/tst-cancel11.c 2014-07-25 20:36:11.581359699 +0200
  124464. @@ -13,9 +13,8 @@
  124465. Lesser General Public License for more details.
  124466. You should have received a copy of the GNU Lesser General Public
  124467. - License along with the GNU C Library; if not, write to the Free
  124468. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124469. - 02111-1307 USA. */
  124470. + License along with the GNU C Library; if not, see
  124471. + <http://www.gnu.org/licenses/>. */
  124472. #include <errno.h>
  124473. #include <pthread.h>
  124474. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel12.c uClibc-git/test/nptl/tst-cancel12.c
  124475. --- uClibc-0.9.33.2/test/nptl/tst-cancel12.c 2012-05-15 09:20:09.000000000 +0200
  124476. +++ uClibc-git/test/nptl/tst-cancel12.c 2014-07-25 20:36:11.581359699 +0200
  124477. @@ -13,9 +13,8 @@
  124478. Lesser General Public License for more details.
  124479. You should have received a copy of the GNU Lesser General Public
  124480. - License along with the GNU C Library; if not, write to the Free
  124481. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124482. - 02111-1307 USA. */
  124483. + License along with the GNU C Library; if not, see
  124484. + <http://www.gnu.org/licenses/>. */
  124485. #include <errno.h>
  124486. #include <pthread.h>
  124487. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel13.c uClibc-git/test/nptl/tst-cancel13.c
  124488. --- uClibc-0.9.33.2/test/nptl/tst-cancel13.c 2012-05-15 09:20:09.000000000 +0200
  124489. +++ uClibc-git/test/nptl/tst-cancel13.c 2014-07-25 20:36:11.581359699 +0200
  124490. @@ -13,9 +13,8 @@
  124491. Lesser General Public License for more details.
  124492. You should have received a copy of the GNU Lesser General Public
  124493. - License along with the GNU C Library; if not, write to the Free
  124494. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124495. - 02111-1307 USA. */
  124496. + License along with the GNU C Library; if not, see
  124497. + <http://www.gnu.org/licenses/>. */
  124498. #include <errno.h>
  124499. #include <pthread.h>
  124500. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel14.c uClibc-git/test/nptl/tst-cancel14.c
  124501. --- uClibc-0.9.33.2/test/nptl/tst-cancel14.c 2012-05-15 09:20:09.000000000 +0200
  124502. +++ uClibc-git/test/nptl/tst-cancel14.c 2014-07-25 20:36:11.581359699 +0200
  124503. @@ -13,9 +13,8 @@
  124504. Lesser General Public License for more details.
  124505. You should have received a copy of the GNU Lesser General Public
  124506. - License along with the GNU C Library; if not, write to the Free
  124507. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124508. - 02111-1307 USA. */
  124509. + License along with the GNU C Library; if not, see
  124510. + <http://www.gnu.org/licenses/>. */
  124511. #include <errno.h>
  124512. #include <pthread.h>
  124513. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel15.c uClibc-git/test/nptl/tst-cancel15.c
  124514. --- uClibc-0.9.33.2/test/nptl/tst-cancel15.c 2012-05-15 09:20:09.000000000 +0200
  124515. +++ uClibc-git/test/nptl/tst-cancel15.c 2014-07-25 20:36:11.581359699 +0200
  124516. @@ -13,9 +13,8 @@
  124517. Lesser General Public License for more details.
  124518. You should have received a copy of the GNU Lesser General Public
  124519. - License along with the GNU C Library; if not, write to the Free
  124520. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124521. - 02111-1307 USA. */
  124522. + License along with the GNU C Library; if not, see
  124523. + <http://www.gnu.org/licenses/>. */
  124524. #include <errno.h>
  124525. #include <pthread.h>
  124526. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel16.c uClibc-git/test/nptl/tst-cancel16.c
  124527. --- uClibc-0.9.33.2/test/nptl/tst-cancel16.c 2012-05-15 09:20:09.000000000 +0200
  124528. +++ uClibc-git/test/nptl/tst-cancel16.c 2014-07-25 20:36:11.581359699 +0200
  124529. @@ -13,9 +13,8 @@
  124530. Lesser General Public License for more details.
  124531. You should have received a copy of the GNU Lesser General Public
  124532. - License along with the GNU C Library; if not, write to the Free
  124533. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124534. - 02111-1307 USA. */
  124535. + License along with the GNU C Library; if not, see
  124536. + <http://www.gnu.org/licenses/>. */
  124537. #include <errno.h>
  124538. #include <pthread.h>
  124539. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel18.c uClibc-git/test/nptl/tst-cancel18.c
  124540. --- uClibc-0.9.33.2/test/nptl/tst-cancel18.c 2012-05-15 09:20:09.000000000 +0200
  124541. +++ uClibc-git/test/nptl/tst-cancel18.c 2014-07-25 20:36:11.581359699 +0200
  124542. @@ -13,9 +13,8 @@
  124543. Lesser General Public License for more details.
  124544. You should have received a copy of the GNU Lesser General Public
  124545. - License along with the GNU C Library; if not, write to the Free
  124546. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124547. - 02111-1307 USA. */
  124548. + License along with the GNU C Library; if not, see
  124549. + <http://www.gnu.org/licenses/>. */
  124550. #include <errno.h>
  124551. #include <pthread.h>
  124552. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel19.c uClibc-git/test/nptl/tst-cancel19.c
  124553. --- uClibc-0.9.33.2/test/nptl/tst-cancel19.c 2012-05-15 09:20:09.000000000 +0200
  124554. +++ uClibc-git/test/nptl/tst-cancel19.c 2014-07-25 20:36:11.581359699 +0200
  124555. @@ -13,9 +13,8 @@
  124556. Lesser General Public License for more details.
  124557. You should have received a copy of the GNU Lesser General Public
  124558. - License along with the GNU C Library; if not, write to the Free
  124559. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124560. - 02111-1307 USA. */
  124561. + License along with the GNU C Library; if not, see
  124562. + <http://www.gnu.org/licenses/>. */
  124563. #include <errno.h>
  124564. #include <error.h>
  124565. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel1.c uClibc-git/test/nptl/tst-cancel1.c
  124566. --- uClibc-0.9.33.2/test/nptl/tst-cancel1.c 2012-05-15 09:20:09.000000000 +0200
  124567. +++ uClibc-git/test/nptl/tst-cancel1.c 2014-07-25 20:36:11.581359699 +0200
  124568. @@ -13,9 +13,8 @@
  124569. Lesser General Public License for more details.
  124570. You should have received a copy of the GNU Lesser General Public
  124571. - License along with the GNU C Library; if not, write to the Free
  124572. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124573. - 02111-1307 USA. */
  124574. + License along with the GNU C Library; if not, see
  124575. + <http://www.gnu.org/licenses/>. */
  124576. #include <pthread.h>
  124577. #include <signal.h>
  124578. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel20.c uClibc-git/test/nptl/tst-cancel20.c
  124579. --- uClibc-0.9.33.2/test/nptl/tst-cancel20.c 2012-05-15 09:20:09.000000000 +0200
  124580. +++ uClibc-git/test/nptl/tst-cancel20.c 2014-07-25 20:36:11.581359699 +0200
  124581. @@ -13,9 +13,8 @@
  124582. Lesser General Public License for more details.
  124583. You should have received a copy of the GNU Lesser General Public
  124584. - License along with the GNU C Library; if not, write to the Free
  124585. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124586. - 02111-1307 USA. */
  124587. + License along with the GNU C Library; if not, see
  124588. + <http://www.gnu.org/licenses/>. */
  124589. #include <errno.h>
  124590. #include <pthread.h>
  124591. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel21.c uClibc-git/test/nptl/tst-cancel21.c
  124592. --- uClibc-0.9.33.2/test/nptl/tst-cancel21.c 2012-05-15 09:20:09.000000000 +0200
  124593. +++ uClibc-git/test/nptl/tst-cancel21.c 2014-07-25 20:36:11.581359699 +0200
  124594. @@ -13,9 +13,8 @@
  124595. Lesser General Public License for more details.
  124596. You should have received a copy of the GNU Lesser General Public
  124597. - License along with the GNU C Library; if not, write to the Free
  124598. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124599. - 02111-1307 USA. */
  124600. + License along with the GNU C Library; if not, see
  124601. + <http://www.gnu.org/licenses/>. */
  124602. #include <errno.h>
  124603. #include <pthread.h>
  124604. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel22.c uClibc-git/test/nptl/tst-cancel22.c
  124605. --- uClibc-0.9.33.2/test/nptl/tst-cancel22.c 2012-05-15 09:20:09.000000000 +0200
  124606. +++ uClibc-git/test/nptl/tst-cancel22.c 2014-07-25 20:36:11.581359699 +0200
  124607. @@ -13,9 +13,8 @@
  124608. Lesser General Public License for more details.
  124609. You should have received a copy of the GNU Lesser General Public
  124610. - License along with the GNU C Library; if not, write to the Free
  124611. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124612. - 02111-1307 USA. */
  124613. + License along with the GNU C Library; if not, see
  124614. + <http://www.gnu.org/licenses/>. */
  124615. #include <errno.h>
  124616. #include <pthread.h>
  124617. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel2.c uClibc-git/test/nptl/tst-cancel2.c
  124618. --- uClibc-0.9.33.2/test/nptl/tst-cancel2.c 2012-05-15 09:20:09.000000000 +0200
  124619. +++ uClibc-git/test/nptl/tst-cancel2.c 2014-07-25 20:36:11.581359699 +0200
  124620. @@ -13,9 +13,8 @@
  124621. Lesser General Public License for more details.
  124622. You should have received a copy of the GNU Lesser General Public
  124623. - License along with the GNU C Library; if not, write to the Free
  124624. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124625. - 02111-1307 USA. */
  124626. + License along with the GNU C Library; if not, see
  124627. + <http://www.gnu.org/licenses/>. */
  124628. #include <pthread.h>
  124629. #include <signal.h>
  124630. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel3.c uClibc-git/test/nptl/tst-cancel3.c
  124631. --- uClibc-0.9.33.2/test/nptl/tst-cancel3.c 2012-05-15 09:20:09.000000000 +0200
  124632. +++ uClibc-git/test/nptl/tst-cancel3.c 2014-07-25 20:36:11.581359699 +0200
  124633. @@ -13,9 +13,8 @@
  124634. Lesser General Public License for more details.
  124635. You should have received a copy of the GNU Lesser General Public
  124636. - License along with the GNU C Library; if not, write to the Free
  124637. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124638. - 02111-1307 USA. */
  124639. + License along with the GNU C Library; if not, see
  124640. + <http://www.gnu.org/licenses/>. */
  124641. #include <pthread.h>
  124642. #include <signal.h>
  124643. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel4.c uClibc-git/test/nptl/tst-cancel4.c
  124644. --- uClibc-0.9.33.2/test/nptl/tst-cancel4.c 2012-05-15 09:20:09.000000000 +0200
  124645. +++ uClibc-git/test/nptl/tst-cancel4.c 2014-07-25 20:36:11.581359699 +0200
  124646. @@ -13,9 +13,8 @@
  124647. Lesser General Public License for more details.
  124648. You should have received a copy of the GNU Lesser General Public
  124649. - License along with the GNU C Library; if not, write to the Free
  124650. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124651. - 02111-1307 USA. */
  124652. + License along with the GNU C Library; if not, see
  124653. + <http://www.gnu.org/licenses/>. */
  124654. /* NOTE: this tests functionality beyond POSIX. POSIX does not allow
  124655. exit to be called more than once. */
  124656. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel6.c uClibc-git/test/nptl/tst-cancel6.c
  124657. --- uClibc-0.9.33.2/test/nptl/tst-cancel6.c 2012-05-15 09:20:09.000000000 +0200
  124658. +++ uClibc-git/test/nptl/tst-cancel6.c 2014-07-25 20:36:11.581359699 +0200
  124659. @@ -13,9 +13,8 @@
  124660. Lesser General Public License for more details.
  124661. You should have received a copy of the GNU Lesser General Public
  124662. - License along with the GNU C Library; if not, write to the Free
  124663. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124664. - 02111-1307 USA. */
  124665. + License along with the GNU C Library; if not, see
  124666. + <http://www.gnu.org/licenses/>. */
  124667. #include <pthread.h>
  124668. #include <stdio.h>
  124669. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel7.c uClibc-git/test/nptl/tst-cancel7.c
  124670. --- uClibc-0.9.33.2/test/nptl/tst-cancel7.c 2012-05-15 09:20:09.000000000 +0200
  124671. +++ uClibc-git/test/nptl/tst-cancel7.c 2014-07-25 20:36:11.581359699 +0200
  124672. @@ -13,9 +13,8 @@
  124673. Lesser General Public License for more details.
  124674. You should have received a copy of the GNU Lesser General Public
  124675. - License along with the GNU C Library; if not, write to the Free
  124676. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124677. - 02111-1307 USA. */
  124678. + License along with the GNU C Library; if not, see
  124679. + <http://www.gnu.org/licenses/>. */
  124680. #include <errno.h>
  124681. #include <fcntl.h>
  124682. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel8.c uClibc-git/test/nptl/tst-cancel8.c
  124683. --- uClibc-0.9.33.2/test/nptl/tst-cancel8.c 2012-05-15 09:20:09.000000000 +0200
  124684. +++ uClibc-git/test/nptl/tst-cancel8.c 2014-07-25 20:36:11.581359699 +0200
  124685. @@ -13,9 +13,8 @@
  124686. Lesser General Public License for more details.
  124687. You should have received a copy of the GNU Lesser General Public
  124688. - License along with the GNU C Library; if not, write to the Free
  124689. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124690. - 02111-1307 USA. */
  124691. + License along with the GNU C Library; if not, see
  124692. + <http://www.gnu.org/licenses/>. */
  124693. #include <pthread.h>
  124694. #include <stdio.h>
  124695. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cancel9.c uClibc-git/test/nptl/tst-cancel9.c
  124696. --- uClibc-0.9.33.2/test/nptl/tst-cancel9.c 2012-05-15 09:20:09.000000000 +0200
  124697. +++ uClibc-git/test/nptl/tst-cancel9.c 2014-07-25 20:36:11.581359699 +0200
  124698. @@ -13,9 +13,8 @@
  124699. Lesser General Public License for more details.
  124700. You should have received a copy of the GNU Lesser General Public
  124701. - License along with the GNU C Library; if not, write to the Free
  124702. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124703. - 02111-1307 USA. */
  124704. + License along with the GNU C Library; if not, see
  124705. + <http://www.gnu.org/licenses/>. */
  124706. #include <fcntl.h>
  124707. #include <pthread.h>
  124708. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cleanup0.c uClibc-git/test/nptl/tst-cleanup0.c
  124709. --- uClibc-0.9.33.2/test/nptl/tst-cleanup0.c 2012-05-15 09:20:09.000000000 +0200
  124710. +++ uClibc-git/test/nptl/tst-cleanup0.c 2014-07-25 20:36:11.585359720 +0200
  124711. @@ -13,9 +13,8 @@
  124712. Lesser General Public License for more details.
  124713. You should have received a copy of the GNU Lesser General Public
  124714. - License along with the GNU C Library; if not, write to the Free
  124715. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124716. - 02111-1307 USA. */
  124717. + License along with the GNU C Library; if not, see
  124718. + <http://www.gnu.org/licenses/>. */
  124719. #include <pthread.h>
  124720. #include <stdio.h>
  124721. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cleanup1.c uClibc-git/test/nptl/tst-cleanup1.c
  124722. --- uClibc-0.9.33.2/test/nptl/tst-cleanup1.c 2012-05-15 09:20:09.000000000 +0200
  124723. +++ uClibc-git/test/nptl/tst-cleanup1.c 2014-07-25 20:36:11.585359720 +0200
  124724. @@ -13,9 +13,8 @@
  124725. Lesser General Public License for more details.
  124726. You should have received a copy of the GNU Lesser General Public
  124727. - License along with the GNU C Library; if not, write to the Free
  124728. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124729. - 02111-1307 USA. */
  124730. + License along with the GNU C Library; if not, see
  124731. + <http://www.gnu.org/licenses/>. */
  124732. #include <pthread.h>
  124733. #include <stdio.h>
  124734. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cleanup2.c uClibc-git/test/nptl/tst-cleanup2.c
  124735. --- uClibc-0.9.33.2/test/nptl/tst-cleanup2.c 2012-05-15 09:20:09.000000000 +0200
  124736. +++ uClibc-git/test/nptl/tst-cleanup2.c 2014-07-25 20:36:11.585359720 +0200
  124737. @@ -13,9 +13,8 @@
  124738. Lesser General Public License for more details.
  124739. You should have received a copy of the GNU Lesser General Public
  124740. - License along with the GNU C Library; if not, write to the Free
  124741. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124742. - 02111-1307 USA. */
  124743. + License along with the GNU C Library; if not, see
  124744. + <http://www.gnu.org/licenses/>. */
  124745. #include <setjmp.h>
  124746. #include <signal.h>
  124747. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cleanup3.c uClibc-git/test/nptl/tst-cleanup3.c
  124748. --- uClibc-0.9.33.2/test/nptl/tst-cleanup3.c 2012-05-15 09:20:09.000000000 +0200
  124749. +++ uClibc-git/test/nptl/tst-cleanup3.c 2014-07-25 20:36:11.585359720 +0200
  124750. @@ -13,9 +13,8 @@
  124751. Lesser General Public License for more details.
  124752. You should have received a copy of the GNU Lesser General Public
  124753. - License along with the GNU C Library; if not, write to the Free
  124754. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124755. - 02111-1307 USA. */
  124756. + License along with the GNU C Library; if not, see
  124757. + <http://www.gnu.org/licenses/>. */
  124758. #include <pthread.h>
  124759. #include <stdio.h>
  124760. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cleanup4aux.c uClibc-git/test/nptl/tst-cleanup4aux.c
  124761. --- uClibc-0.9.33.2/test/nptl/tst-cleanup4aux.c 2012-05-15 09:20:09.000000000 +0200
  124762. +++ uClibc-git/test/nptl/tst-cleanup4aux.c 2014-07-25 20:36:11.585359720 +0200
  124763. @@ -13,9 +13,8 @@
  124764. Lesser General Public License for more details.
  124765. You should have received a copy of the GNU Lesser General Public
  124766. - License along with the GNU C Library; if not, write to the Free
  124767. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124768. - 02111-1307 USA. */
  124769. + License along with the GNU C Library; if not, see
  124770. + <http://www.gnu.org/licenses/>. */
  124771. #include <pthread.h>
  124772. #include <stdio.h>
  124773. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cleanup4.c uClibc-git/test/nptl/tst-cleanup4.c
  124774. --- uClibc-0.9.33.2/test/nptl/tst-cleanup4.c 2012-05-15 09:20:09.000000000 +0200
  124775. +++ uClibc-git/test/nptl/tst-cleanup4.c 2014-07-25 20:36:11.585359720 +0200
  124776. @@ -13,9 +13,8 @@
  124777. Lesser General Public License for more details.
  124778. You should have received a copy of the GNU Lesser General Public
  124779. - License along with the GNU C Library; if not, write to the Free
  124780. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124781. - 02111-1307 USA. */
  124782. + License along with the GNU C Library; if not, see
  124783. + <http://www.gnu.org/licenses/>. */
  124784. #include <pthread.h>
  124785. #include <stdio.h>
  124786. diff -Nur uClibc-0.9.33.2/test/nptl/tst-clock1.c uClibc-git/test/nptl/tst-clock1.c
  124787. --- uClibc-0.9.33.2/test/nptl/tst-clock1.c 2012-05-15 09:20:09.000000000 +0200
  124788. +++ uClibc-git/test/nptl/tst-clock1.c 2014-07-25 20:36:11.585359720 +0200
  124789. @@ -13,9 +13,8 @@
  124790. Lesser General Public License for more details.
  124791. You should have received a copy of the GNU Lesser General Public
  124792. - License along with the GNU C Library; if not, write to the Free
  124793. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124794. - 02111-1307 USA. */
  124795. + License along with the GNU C Library; if not, see
  124796. + <http://www.gnu.org/licenses/>. */
  124797. #include <pthread.h>
  124798. #include <stdio.h>
  124799. diff -Nur uClibc-0.9.33.2/test/nptl/tst-clock2.c uClibc-git/test/nptl/tst-clock2.c
  124800. --- uClibc-0.9.33.2/test/nptl/tst-clock2.c 2012-05-15 09:20:09.000000000 +0200
  124801. +++ uClibc-git/test/nptl/tst-clock2.c 2014-07-25 20:36:11.585359720 +0200
  124802. @@ -13,9 +13,8 @@
  124803. Lesser General Public License for more details.
  124804. You should have received a copy of the GNU Lesser General Public
  124805. - License along with the GNU C Library; if not, write to the Free
  124806. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124807. - 02111-1307 USA. */
  124808. + License along with the GNU C Library; if not, see
  124809. + <http://www.gnu.org/licenses/>. */
  124810. #include <errno.h>
  124811. #include <pthread.h>
  124812. diff -Nur uClibc-0.9.33.2/test/nptl/tst-clock.c uClibc-git/test/nptl/tst-clock.c
  124813. --- uClibc-0.9.33.2/test/nptl/tst-clock.c 2012-05-15 09:20:09.000000000 +0200
  124814. +++ uClibc-git/test/nptl/tst-clock.c 2014-07-25 20:36:11.585359720 +0200
  124815. @@ -14,9 +14,8 @@
  124816. Lesser General Public License for more details.
  124817. You should have received a copy of the GNU Lesser General Public
  124818. - License along with the GNU C Library; if not, write to the Free
  124819. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124820. - 02111-1307 USA. */
  124821. + License along with the GNU C Library; if not, see
  124822. + <http://www.gnu.org/licenses/>. */
  124823. #include <stdio.h>
  124824. #include <string.h>
  124825. diff -Nur uClibc-0.9.33.2/test/nptl/tst-clock_nanosleep.c uClibc-git/test/nptl/tst-clock_nanosleep.c
  124826. --- uClibc-0.9.33.2/test/nptl/tst-clock_nanosleep.c 2012-05-15 09:20:09.000000000 +0200
  124827. +++ uClibc-git/test/nptl/tst-clock_nanosleep.c 2014-07-25 20:36:11.585359720 +0200
  124828. @@ -12,9 +12,8 @@
  124829. Lesser General Public License for more details.
  124830. You should have received a copy of the GNU Lesser General Public
  124831. - License along with the GNU C Library; if not, write to the Free
  124832. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124833. - 02111-1307 USA. */
  124834. + License along with the GNU C Library; if not, see
  124835. + <http://www.gnu.org/licenses/>. */
  124836. #include <errno.h>
  124837. #include <stdio.h>
  124838. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond10.c uClibc-git/test/nptl/tst-cond10.c
  124839. --- uClibc-0.9.33.2/test/nptl/tst-cond10.c 2012-05-15 09:20:09.000000000 +0200
  124840. +++ uClibc-git/test/nptl/tst-cond10.c 2014-07-25 20:36:11.585359720 +0200
  124841. @@ -13,9 +13,8 @@
  124842. Lesser General Public License for more details.
  124843. You should have received a copy of the GNU Lesser General Public
  124844. - License along with the GNU C Library; if not, write to the Free
  124845. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124846. - 02111-1307 USA. */
  124847. + License along with the GNU C Library; if not, see
  124848. + <http://www.gnu.org/licenses/>. */
  124849. #include <error.h>
  124850. #include <pthread.h>
  124851. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond11.c uClibc-git/test/nptl/tst-cond11.c
  124852. --- uClibc-0.9.33.2/test/nptl/tst-cond11.c 2012-05-15 09:20:09.000000000 +0200
  124853. +++ uClibc-git/test/nptl/tst-cond11.c 2014-07-25 20:36:11.585359720 +0200
  124854. @@ -13,9 +13,8 @@
  124855. Lesser General Public License for more details.
  124856. You should have received a copy of the GNU Lesser General Public
  124857. - License along with the GNU C Library; if not, write to the Free
  124858. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124859. - 02111-1307 USA. */
  124860. + License along with the GNU C Library; if not, see
  124861. + <http://www.gnu.org/licenses/>. */
  124862. #include <errno.h>
  124863. #include <pthread.h>
  124864. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond12.c uClibc-git/test/nptl/tst-cond12.c
  124865. --- uClibc-0.9.33.2/test/nptl/tst-cond12.c 2012-05-15 09:20:09.000000000 +0200
  124866. +++ uClibc-git/test/nptl/tst-cond12.c 2014-07-25 20:36:11.585359720 +0200
  124867. @@ -13,9 +13,8 @@
  124868. Lesser General Public License for more details.
  124869. You should have received a copy of the GNU Lesser General Public
  124870. - License along with the GNU C Library; if not, write to the Free
  124871. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124872. - 02111-1307 USA. */
  124873. + License along with the GNU C Library; if not, see
  124874. + <http://www.gnu.org/licenses/>. */
  124875. #include <errno.h>
  124876. #include <pthread.h>
  124877. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond14.c uClibc-git/test/nptl/tst-cond14.c
  124878. --- uClibc-0.9.33.2/test/nptl/tst-cond14.c 2012-05-15 09:20:09.000000000 +0200
  124879. +++ uClibc-git/test/nptl/tst-cond14.c 2014-07-25 20:36:11.585359720 +0200
  124880. @@ -13,9 +13,8 @@
  124881. Lesser General Public License for more details.
  124882. You should have received a copy of the GNU Lesser General Public
  124883. - License along with the GNU C Library; if not, write to the Free
  124884. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124885. - 02111-1307 USA. */
  124886. + License along with the GNU C Library; if not, see
  124887. + <http://www.gnu.org/licenses/>. */
  124888. #include <pthread.h>
  124889. #include <stdio.h>
  124890. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond15.c uClibc-git/test/nptl/tst-cond15.c
  124891. --- uClibc-0.9.33.2/test/nptl/tst-cond15.c 2012-05-15 09:20:09.000000000 +0200
  124892. +++ uClibc-git/test/nptl/tst-cond15.c 2014-07-25 20:36:11.585359720 +0200
  124893. @@ -13,9 +13,8 @@
  124894. Lesser General Public License for more details.
  124895. You should have received a copy of the GNU Lesser General Public
  124896. - License along with the GNU C Library; if not, write to the Free
  124897. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124898. - 02111-1307 USA. */
  124899. + License along with the GNU C Library; if not, see
  124900. + <http://www.gnu.org/licenses/>. */
  124901. #include <errno.h>
  124902. #include <pthread.h>
  124903. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond16.c uClibc-git/test/nptl/tst-cond16.c
  124904. --- uClibc-0.9.33.2/test/nptl/tst-cond16.c 2012-05-15 09:20:09.000000000 +0200
  124905. +++ uClibc-git/test/nptl/tst-cond16.c 2014-07-25 20:36:11.585359720 +0200
  124906. @@ -13,9 +13,8 @@
  124907. Lesser General Public License for more details.
  124908. You should have received a copy of the GNU Lesser General Public
  124909. - License along with the GNU C Library; if not, write to the Free
  124910. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124911. - 02111-1307 USA. */
  124912. + License along with the GNU C Library; if not, see
  124913. + <http://www.gnu.org/licenses/>. */
  124914. #include <errno.h>
  124915. #include <pthread.h>
  124916. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond18.c uClibc-git/test/nptl/tst-cond18.c
  124917. --- uClibc-0.9.33.2/test/nptl/tst-cond18.c 2012-05-15 09:20:09.000000000 +0200
  124918. +++ uClibc-git/test/nptl/tst-cond18.c 2014-07-25 20:36:11.585359720 +0200
  124919. @@ -13,9 +13,8 @@
  124920. Lesser General Public License for more details.
  124921. You should have received a copy of the GNU Lesser General Public
  124922. - License along with the GNU C Library; if not, write to the Free
  124923. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124924. - 02111-1307 USA. */
  124925. + License along with the GNU C Library; if not, see
  124926. + <http://www.gnu.org/licenses/>. */
  124927. #include <errno.h>
  124928. #include <fcntl.h>
  124929. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond19.c uClibc-git/test/nptl/tst-cond19.c
  124930. --- uClibc-0.9.33.2/test/nptl/tst-cond19.c 2012-05-15 09:20:09.000000000 +0200
  124931. +++ uClibc-git/test/nptl/tst-cond19.c 2014-07-25 20:36:11.585359720 +0200
  124932. @@ -13,9 +13,8 @@
  124933. Lesser General Public License for more details.
  124934. You should have received a copy of the GNU Lesser General Public
  124935. - License along with the GNU C Library; if not, write to the Free
  124936. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124937. - 02111-1307 USA. */
  124938. + License along with the GNU C Library; if not, see
  124939. + <http://www.gnu.org/licenses/>. */
  124940. #include <errno.h>
  124941. #include <pthread.h>
  124942. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond1.c uClibc-git/test/nptl/tst-cond1.c
  124943. --- uClibc-0.9.33.2/test/nptl/tst-cond1.c 2012-05-15 09:20:09.000000000 +0200
  124944. +++ uClibc-git/test/nptl/tst-cond1.c 2014-07-25 20:36:11.585359720 +0200
  124945. @@ -13,9 +13,8 @@
  124946. Lesser General Public License for more details.
  124947. You should have received a copy of the GNU Lesser General Public
  124948. - License along with the GNU C Library; if not, write to the Free
  124949. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124950. - 02111-1307 USA. */
  124951. + License along with the GNU C Library; if not, see
  124952. + <http://www.gnu.org/licenses/>. */
  124953. #include <error.h>
  124954. #include <pthread.h>
  124955. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond20.c uClibc-git/test/nptl/tst-cond20.c
  124956. --- uClibc-0.9.33.2/test/nptl/tst-cond20.c 2012-05-15 09:20:09.000000000 +0200
  124957. +++ uClibc-git/test/nptl/tst-cond20.c 2014-07-25 20:36:11.585359720 +0200
  124958. @@ -13,9 +13,8 @@
  124959. Lesser General Public License for more details.
  124960. You should have received a copy of the GNU Lesser General Public
  124961. - License along with the GNU C Library; if not, write to the Free
  124962. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124963. - 02111-1307 USA. */
  124964. + License along with the GNU C Library; if not, see
  124965. + <http://www.gnu.org/licenses/>. */
  124966. #include <pthread.h>
  124967. #include <stdio.h>
  124968. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond23.c uClibc-git/test/nptl/tst-cond23.c
  124969. --- uClibc-0.9.33.2/test/nptl/tst-cond23.c 2012-05-15 09:20:09.000000000 +0200
  124970. +++ uClibc-git/test/nptl/tst-cond23.c 2014-07-25 20:36:11.585359720 +0200
  124971. @@ -13,9 +13,8 @@
  124972. Lesser General Public License for more details.
  124973. You should have received a copy of the GNU Lesser General Public
  124974. - License along with the GNU C Library; if not, write to the Free
  124975. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124976. - 02111-1307 USA. */
  124977. + License along with the GNU C Library; if not, see
  124978. + <http://www.gnu.org/licenses/>. */
  124979. #include <errno.h>
  124980. #include <pthread.h>
  124981. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond2.c uClibc-git/test/nptl/tst-cond2.c
  124982. --- uClibc-0.9.33.2/test/nptl/tst-cond2.c 2012-05-15 09:20:09.000000000 +0200
  124983. +++ uClibc-git/test/nptl/tst-cond2.c 2014-07-25 20:36:11.585359720 +0200
  124984. @@ -13,9 +13,8 @@
  124985. Lesser General Public License for more details.
  124986. You should have received a copy of the GNU Lesser General Public
  124987. - License along with the GNU C Library; if not, write to the Free
  124988. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  124989. - 02111-1307 USA. */
  124990. + License along with the GNU C Library; if not, see
  124991. + <http://www.gnu.org/licenses/>. */
  124992. #include <error.h>
  124993. #include <pthread.h>
  124994. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond3.c uClibc-git/test/nptl/tst-cond3.c
  124995. --- uClibc-0.9.33.2/test/nptl/tst-cond3.c 2012-05-15 09:20:09.000000000 +0200
  124996. +++ uClibc-git/test/nptl/tst-cond3.c 2014-07-25 20:36:11.585359720 +0200
  124997. @@ -13,9 +13,8 @@
  124998. Lesser General Public License for more details.
  124999. You should have received a copy of the GNU Lesser General Public
  125000. - License along with the GNU C Library; if not, write to the Free
  125001. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125002. - 02111-1307 USA. */
  125003. + License along with the GNU C Library; if not, see
  125004. + <http://www.gnu.org/licenses/>. */
  125005. #include <pthread.h>
  125006. #include <stdio.h>
  125007. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond4.c uClibc-git/test/nptl/tst-cond4.c
  125008. --- uClibc-0.9.33.2/test/nptl/tst-cond4.c 2012-05-15 09:20:09.000000000 +0200
  125009. +++ uClibc-git/test/nptl/tst-cond4.c 2014-07-25 20:36:11.585359720 +0200
  125010. @@ -13,9 +13,8 @@
  125011. Lesser General Public License for more details.
  125012. You should have received a copy of the GNU Lesser General Public
  125013. - License along with the GNU C Library; if not, write to the Free
  125014. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125015. - 02111-1307 USA. */
  125016. + License along with the GNU C Library; if not, see
  125017. + <http://www.gnu.org/licenses/>. */
  125018. #include <errno.h>
  125019. #include <pthread.h>
  125020. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond5.c uClibc-git/test/nptl/tst-cond5.c
  125021. --- uClibc-0.9.33.2/test/nptl/tst-cond5.c 2012-05-15 09:20:09.000000000 +0200
  125022. +++ uClibc-git/test/nptl/tst-cond5.c 2014-07-25 20:36:11.585359720 +0200
  125023. @@ -13,9 +13,8 @@
  125024. Lesser General Public License for more details.
  125025. You should have received a copy of the GNU Lesser General Public
  125026. - License along with the GNU C Library; if not, write to the Free
  125027. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125028. - 02111-1307 USA. */
  125029. + License along with the GNU C Library; if not, see
  125030. + <http://www.gnu.org/licenses/>. */
  125031. #include <errno.h>
  125032. #include <pthread.h>
  125033. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond6.c uClibc-git/test/nptl/tst-cond6.c
  125034. --- uClibc-0.9.33.2/test/nptl/tst-cond6.c 2012-05-15 09:20:09.000000000 +0200
  125035. +++ uClibc-git/test/nptl/tst-cond6.c 2014-07-25 20:36:11.585359720 +0200
  125036. @@ -13,9 +13,8 @@
  125037. Lesser General Public License for more details.
  125038. You should have received a copy of the GNU Lesser General Public
  125039. - License along with the GNU C Library; if not, write to the Free
  125040. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125041. - 02111-1307 USA. */
  125042. + License along with the GNU C Library; if not, see
  125043. + <http://www.gnu.org/licenses/>. */
  125044. #include <errno.h>
  125045. #include <pthread.h>
  125046. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond7.c uClibc-git/test/nptl/tst-cond7.c
  125047. --- uClibc-0.9.33.2/test/nptl/tst-cond7.c 2012-05-15 09:20:09.000000000 +0200
  125048. +++ uClibc-git/test/nptl/tst-cond7.c 2014-07-25 20:36:11.585359720 +0200
  125049. @@ -13,9 +13,8 @@
  125050. Lesser General Public License for more details.
  125051. You should have received a copy of the GNU Lesser General Public
  125052. - License along with the GNU C Library; if not, write to the Free
  125053. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125054. - 02111-1307 USA. */
  125055. + License along with the GNU C Library; if not, see
  125056. + <http://www.gnu.org/licenses/>. */
  125057. #include <errno.h>
  125058. #include <pthread.h>
  125059. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond8.c uClibc-git/test/nptl/tst-cond8.c
  125060. --- uClibc-0.9.33.2/test/nptl/tst-cond8.c 2012-05-15 09:20:09.000000000 +0200
  125061. +++ uClibc-git/test/nptl/tst-cond8.c 2014-07-25 20:36:11.585359720 +0200
  125062. @@ -13,9 +13,8 @@
  125063. Lesser General Public License for more details.
  125064. You should have received a copy of the GNU Lesser General Public
  125065. - License along with the GNU C Library; if not, write to the Free
  125066. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125067. - 02111-1307 USA. */
  125068. + License along with the GNU C Library; if not, see
  125069. + <http://www.gnu.org/licenses/>. */
  125070. #include <errno.h>
  125071. #include <pthread.h>
  125072. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cond9.c uClibc-git/test/nptl/tst-cond9.c
  125073. --- uClibc-0.9.33.2/test/nptl/tst-cond9.c 2012-05-15 09:20:09.000000000 +0200
  125074. +++ uClibc-git/test/nptl/tst-cond9.c 2014-07-25 20:36:11.585359720 +0200
  125075. @@ -13,9 +13,8 @@
  125076. Lesser General Public License for more details.
  125077. You should have received a copy of the GNU Lesser General Public
  125078. - License along with the GNU C Library; if not, write to the Free
  125079. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125080. - 02111-1307 USA. */
  125081. + License along with the GNU C Library; if not, see
  125082. + <http://www.gnu.org/licenses/>. */
  125083. #include <errno.h>
  125084. #include <pthread.h>
  125085. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cpuclock1.c uClibc-git/test/nptl/tst-cpuclock1.c
  125086. --- uClibc-0.9.33.2/test/nptl/tst-cpuclock1.c 2012-05-15 09:20:09.000000000 +0200
  125087. +++ uClibc-git/test/nptl/tst-cpuclock1.c 2014-07-25 20:36:11.585359720 +0200
  125088. @@ -13,9 +13,8 @@
  125089. Lesser General Public License for more details.
  125090. You should have received a copy of the GNU Lesser General Public
  125091. - License along with the GNU C Library; if not, write to the Free
  125092. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125093. - 02111-1307 USA. */
  125094. + License along with the GNU C Library; if not, see
  125095. + <http://www.gnu.org/licenses/>. */
  125096. #include <stdio.h>
  125097. #include <stdlib.h>
  125098. diff -Nur uClibc-0.9.33.2/test/nptl/tst-cpuclock2.c uClibc-git/test/nptl/tst-cpuclock2.c
  125099. --- uClibc-0.9.33.2/test/nptl/tst-cpuclock2.c 2012-05-15 09:20:09.000000000 +0200
  125100. +++ uClibc-git/test/nptl/tst-cpuclock2.c 2014-07-25 20:36:11.585359720 +0200
  125101. @@ -13,9 +13,8 @@
  125102. Lesser General Public License for more details.
  125103. You should have received a copy of the GNU Lesser General Public
  125104. - License along with the GNU C Library; if not, write to the Free
  125105. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125106. - 02111-1307 USA. */
  125107. + License along with the GNU C Library; if not, see
  125108. + <http://www.gnu.org/licenses/>. */
  125109. #include <unistd.h>
  125110. diff -Nur uClibc-0.9.33.2/test/nptl/tst-detach1.c uClibc-git/test/nptl/tst-detach1.c
  125111. --- uClibc-0.9.33.2/test/nptl/tst-detach1.c 2012-05-15 09:20:09.000000000 +0200
  125112. +++ uClibc-git/test/nptl/tst-detach1.c 2014-07-25 20:36:11.585359720 +0200
  125113. @@ -13,9 +13,8 @@
  125114. Lesser General Public License for more details.
  125115. You should have received a copy of the GNU Lesser General Public
  125116. - License along with the GNU C Library; if not, write to the Free
  125117. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125118. - 02111-1307 USA. */
  125119. + License along with the GNU C Library; if not, see
  125120. + <http://www.gnu.org/licenses/>. */
  125121. #include <pthread.h>
  125122. #include <stdio.h>
  125123. diff -Nur uClibc-0.9.33.2/test/nptl/tst-eintr1.c uClibc-git/test/nptl/tst-eintr1.c
  125124. --- uClibc-0.9.33.2/test/nptl/tst-eintr1.c 2012-05-15 09:20:09.000000000 +0200
  125125. +++ uClibc-git/test/nptl/tst-eintr1.c 2014-07-25 20:36:11.585359720 +0200
  125126. @@ -13,9 +13,8 @@
  125127. Lesser General Public License for more details.
  125128. You should have received a copy of the GNU Lesser General Public
  125129. - License along with the GNU C Library; if not, write to the Free
  125130. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125131. - 02111-1307 USA. */
  125132. + License along with the GNU C Library; if not, see
  125133. + <http://www.gnu.org/licenses/>. */
  125134. #include <errno.h>
  125135. #include <pthread.h>
  125136. diff -Nur uClibc-0.9.33.2/test/nptl/tst-eintr2.c uClibc-git/test/nptl/tst-eintr2.c
  125137. --- uClibc-0.9.33.2/test/nptl/tst-eintr2.c 2012-05-15 09:20:09.000000000 +0200
  125138. +++ uClibc-git/test/nptl/tst-eintr2.c 2014-07-25 20:36:11.585359720 +0200
  125139. @@ -13,9 +13,8 @@
  125140. Lesser General Public License for more details.
  125141. You should have received a copy of the GNU Lesser General Public
  125142. - License along with the GNU C Library; if not, write to the Free
  125143. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125144. - 02111-1307 USA. */
  125145. + License along with the GNU C Library; if not, see
  125146. + <http://www.gnu.org/licenses/>. */
  125147. #include <errno.h>
  125148. #include <pthread.h>
  125149. diff -Nur uClibc-0.9.33.2/test/nptl/tst-eintr3.c uClibc-git/test/nptl/tst-eintr3.c
  125150. --- uClibc-0.9.33.2/test/nptl/tst-eintr3.c 2012-05-15 09:20:09.000000000 +0200
  125151. +++ uClibc-git/test/nptl/tst-eintr3.c 2014-07-25 20:36:11.585359720 +0200
  125152. @@ -13,9 +13,8 @@
  125153. Lesser General Public License for more details.
  125154. You should have received a copy of the GNU Lesser General Public
  125155. - License along with the GNU C Library; if not, write to the Free
  125156. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125157. - 02111-1307 USA. */
  125158. + License along with the GNU C Library; if not, see
  125159. + <http://www.gnu.org/licenses/>. */
  125160. #include <errno.h>
  125161. #include <pthread.h>
  125162. diff -Nur uClibc-0.9.33.2/test/nptl/tst-eintr4.c uClibc-git/test/nptl/tst-eintr4.c
  125163. --- uClibc-0.9.33.2/test/nptl/tst-eintr4.c 2012-05-15 09:20:09.000000000 +0200
  125164. +++ uClibc-git/test/nptl/tst-eintr4.c 2014-07-25 20:36:11.585359720 +0200
  125165. @@ -13,9 +13,8 @@
  125166. Lesser General Public License for more details.
  125167. You should have received a copy of the GNU Lesser General Public
  125168. - License along with the GNU C Library; if not, write to the Free
  125169. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125170. - 02111-1307 USA. */
  125171. + License along with the GNU C Library; if not, see
  125172. + <http://www.gnu.org/licenses/>. */
  125173. #include <errno.h>
  125174. #include <pthread.h>
  125175. diff -Nur uClibc-0.9.33.2/test/nptl/tst-eintr5.c uClibc-git/test/nptl/tst-eintr5.c
  125176. --- uClibc-0.9.33.2/test/nptl/tst-eintr5.c 2012-05-15 09:20:09.000000000 +0200
  125177. +++ uClibc-git/test/nptl/tst-eintr5.c 2014-07-25 20:36:11.585359720 +0200
  125178. @@ -13,9 +13,8 @@
  125179. Lesser General Public License for more details.
  125180. You should have received a copy of the GNU Lesser General Public
  125181. - License along with the GNU C Library; if not, write to the Free
  125182. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125183. - 02111-1307 USA. */
  125184. + License along with the GNU C Library; if not, see
  125185. + <http://www.gnu.org/licenses/>. */
  125186. #include <errno.h>
  125187. #include <pthread.h>
  125188. diff -Nur uClibc-0.9.33.2/test/nptl/tst-exec2.c uClibc-git/test/nptl/tst-exec2.c
  125189. --- uClibc-0.9.33.2/test/nptl/tst-exec2.c 2012-05-15 09:20:09.000000000 +0200
  125190. +++ uClibc-git/test/nptl/tst-exec2.c 2014-07-25 20:36:11.585359720 +0200
  125191. @@ -14,9 +14,8 @@
  125192. Lesser General Public License for more details.
  125193. You should have received a copy of the GNU Lesser General Public
  125194. - License along with the GNU C Library; if not, write to the Free
  125195. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125196. - 02111-1307 USA. */
  125197. + License along with the GNU C Library; if not, see
  125198. + <http://www.gnu.org/licenses/>. */
  125199. #include <errno.h>
  125200. #include <paths.h>
  125201. diff -Nur uClibc-0.9.33.2/test/nptl/tst-exec3.c uClibc-git/test/nptl/tst-exec3.c
  125202. --- uClibc-0.9.33.2/test/nptl/tst-exec3.c 2012-05-15 09:20:09.000000000 +0200
  125203. +++ uClibc-git/test/nptl/tst-exec3.c 2014-07-25 20:36:11.585359720 +0200
  125204. @@ -14,9 +14,8 @@
  125205. Lesser General Public License for more details.
  125206. You should have received a copy of the GNU Lesser General Public
  125207. - License along with the GNU C Library; if not, write to the Free
  125208. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125209. - 02111-1307 USA. */
  125210. + License along with the GNU C Library; if not, see
  125211. + <http://www.gnu.org/licenses/>. */
  125212. #include <errno.h>
  125213. #include <paths.h>
  125214. diff -Nur uClibc-0.9.33.2/test/nptl/tst-exec4.c uClibc-git/test/nptl/tst-exec4.c
  125215. --- uClibc-0.9.33.2/test/nptl/tst-exec4.c 2012-05-15 09:20:09.000000000 +0200
  125216. +++ uClibc-git/test/nptl/tst-exec4.c 2014-07-25 20:36:11.585359720 +0200
  125217. @@ -14,9 +14,8 @@
  125218. Lesser General Public License for more details.
  125219. You should have received a copy of the GNU Lesser General Public
  125220. - License along with the GNU C Library; if not, write to the Free
  125221. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125222. - 02111-1307 USA. */
  125223. + License along with the GNU C Library; if not, see
  125224. + <http://www.gnu.org/licenses/>. */
  125225. #include <pthread.h>
  125226. #include <signal.h>
  125227. diff -Nur uClibc-0.9.33.2/test/nptl/tst-exit1.c uClibc-git/test/nptl/tst-exit1.c
  125228. --- uClibc-0.9.33.2/test/nptl/tst-exit1.c 2012-05-15 09:20:09.000000000 +0200
  125229. +++ uClibc-git/test/nptl/tst-exit1.c 2014-07-25 20:36:11.585359720 +0200
  125230. @@ -13,9 +13,8 @@
  125231. Lesser General Public License for more details.
  125232. You should have received a copy of the GNU Lesser General Public
  125233. - License along with the GNU C Library; if not, write to the Free
  125234. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125235. - 02111-1307 USA. */
  125236. + License along with the GNU C Library; if not, see
  125237. + <http://www.gnu.org/licenses/>. */
  125238. /* NOTE: this tests functionality beyond POSIX. POSIX does not allow
  125239. exit to be called more than once. */
  125240. diff -Nur uClibc-0.9.33.2/test/nptl/tst-fini1.c uClibc-git/test/nptl/tst-fini1.c
  125241. --- uClibc-0.9.33.2/test/nptl/tst-fini1.c 2012-05-15 09:20:09.000000000 +0200
  125242. +++ uClibc-git/test/nptl/tst-fini1.c 2014-07-25 20:36:11.585359720 +0200
  125243. @@ -13,9 +13,8 @@
  125244. Lesser General Public License for more details.
  125245. You should have received a copy of the GNU Lesser General Public
  125246. - License along with the GNU C Library; if not, write to the Free
  125247. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125248. - 02111-1307 USA. */
  125249. + License along with the GNU C Library; if not, see
  125250. + <http://www.gnu.org/licenses/>. */
  125251. #include <unistd.h>
  125252. diff -Nur uClibc-0.9.33.2/test/nptl/tst-fini1mod.c uClibc-git/test/nptl/tst-fini1mod.c
  125253. --- uClibc-0.9.33.2/test/nptl/tst-fini1mod.c 2012-05-15 09:20:09.000000000 +0200
  125254. +++ uClibc-git/test/nptl/tst-fini1mod.c 2014-07-25 20:36:11.585359720 +0200
  125255. @@ -13,9 +13,8 @@
  125256. Lesser General Public License for more details.
  125257. You should have received a copy of the GNU Lesser General Public
  125258. - License along with the GNU C Library; if not, write to the Free
  125259. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125260. - 02111-1307 USA. */
  125261. + License along with the GNU C Library; if not, see
  125262. + <http://www.gnu.org/licenses/>. */
  125263. #include <pthread.h>
  125264. #include <stdio.h>
  125265. diff -Nur uClibc-0.9.33.2/test/nptl/tst-flock1.c uClibc-git/test/nptl/tst-flock1.c
  125266. --- uClibc-0.9.33.2/test/nptl/tst-flock1.c 2012-05-15 09:20:09.000000000 +0200
  125267. +++ uClibc-git/test/nptl/tst-flock1.c 2014-07-25 20:36:11.585359720 +0200
  125268. @@ -13,9 +13,8 @@
  125269. Lesser General Public License for more details.
  125270. You should have received a copy of the GNU Lesser General Public
  125271. - License along with the GNU C Library; if not, write to the Free
  125272. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125273. - 02111-1307 USA. */
  125274. + License along with the GNU C Library; if not, see
  125275. + <http://www.gnu.org/licenses/>. */
  125276. #include <pthread.h>
  125277. #include <stdio.h>
  125278. diff -Nur uClibc-0.9.33.2/test/nptl/tst-flock2.c uClibc-git/test/nptl/tst-flock2.c
  125279. --- uClibc-0.9.33.2/test/nptl/tst-flock2.c 2012-05-15 09:20:09.000000000 +0200
  125280. +++ uClibc-git/test/nptl/tst-flock2.c 2014-07-25 20:36:11.585359720 +0200
  125281. @@ -13,9 +13,8 @@
  125282. Lesser General Public License for more details.
  125283. You should have received a copy of the GNU Lesser General Public
  125284. - License along with the GNU C Library; if not, write to the Free
  125285. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125286. - 02111-1307 USA. */
  125287. + License along with the GNU C Library; if not, see
  125288. + <http://www.gnu.org/licenses/>. */
  125289. #include <errno.h>
  125290. #include <pthread.h>
  125291. diff -Nur uClibc-0.9.33.2/test/nptl/tst-fork1.c uClibc-git/test/nptl/tst-fork1.c
  125292. --- uClibc-0.9.33.2/test/nptl/tst-fork1.c 2012-05-15 09:20:09.000000000 +0200
  125293. +++ uClibc-git/test/nptl/tst-fork1.c 2014-07-25 20:36:11.585359720 +0200
  125294. @@ -13,9 +13,8 @@
  125295. Lesser General Public License for more details.
  125296. You should have received a copy of the GNU Lesser General Public
  125297. - License along with the GNU C Library; if not, write to the Free
  125298. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125299. - 02111-1307 USA. */
  125300. + License along with the GNU C Library; if not, see
  125301. + <http://www.gnu.org/licenses/>. */
  125302. #include <errno.h>
  125303. #include <pthread.h>
  125304. diff -Nur uClibc-0.9.33.2/test/nptl/tst-fork2.c uClibc-git/test/nptl/tst-fork2.c
  125305. --- uClibc-0.9.33.2/test/nptl/tst-fork2.c 2012-05-15 09:20:09.000000000 +0200
  125306. +++ uClibc-git/test/nptl/tst-fork2.c 2014-07-25 20:36:11.585359720 +0200
  125307. @@ -13,9 +13,8 @@
  125308. Lesser General Public License for more details.
  125309. You should have received a copy of the GNU Lesser General Public
  125310. - License along with the GNU C Library; if not, write to the Free
  125311. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125312. - 02111-1307 USA. */
  125313. + License along with the GNU C Library; if not, see
  125314. + <http://www.gnu.org/licenses/>. */
  125315. #include <errno.h>
  125316. #include <pthread.h>
  125317. diff -Nur uClibc-0.9.33.2/test/nptl/tst-fork3.c uClibc-git/test/nptl/tst-fork3.c
  125318. --- uClibc-0.9.33.2/test/nptl/tst-fork3.c 2012-05-15 09:20:09.000000000 +0200
  125319. +++ uClibc-git/test/nptl/tst-fork3.c 2014-07-25 20:36:11.585359720 +0200
  125320. @@ -13,9 +13,8 @@
  125321. Lesser General Public License for more details.
  125322. You should have received a copy of the GNU Lesser General Public
  125323. - License along with the GNU C Library; if not, write to the Free
  125324. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125325. - 02111-1307 USA. */
  125326. + License along with the GNU C Library; if not, see
  125327. + <http://www.gnu.org/licenses/>. */
  125328. #include <errno.h>
  125329. #include <pthread.h>
  125330. diff -Nur uClibc-0.9.33.2/test/nptl/tst-fork4.c uClibc-git/test/nptl/tst-fork4.c
  125331. --- uClibc-0.9.33.2/test/nptl/tst-fork4.c 2012-05-15 09:20:09.000000000 +0200
  125332. +++ uClibc-git/test/nptl/tst-fork4.c 2014-07-25 20:36:11.585359720 +0200
  125333. @@ -13,9 +13,8 @@
  125334. Lesser General Public License for more details.
  125335. You should have received a copy of the GNU Lesser General Public
  125336. - License along with the GNU C Library; if not, write to the Free
  125337. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125338. - 02111-1307 USA. */
  125339. + License along with the GNU C Library; if not, see
  125340. + <http://www.gnu.org/licenses/>. */
  125341. #include <errno.h>
  125342. #include <pthread.h>
  125343. diff -Nur uClibc-0.9.33.2/test/nptl/tst-initializers1.c uClibc-git/test/nptl/tst-initializers1.c
  125344. --- uClibc-0.9.33.2/test/nptl/tst-initializers1.c 2012-05-15 09:20:09.000000000 +0200
  125345. +++ uClibc-git/test/nptl/tst-initializers1.c 2014-07-25 20:36:11.585359720 +0200
  125346. @@ -13,9 +13,8 @@
  125347. Lesser General Public License for more details.
  125348. You should have received a copy of the GNU Lesser General Public
  125349. - License along with the GNU C Library; if not, write to the Free
  125350. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125351. - 02111-1307 USA. */
  125352. + License along with the GNU C Library; if not, see
  125353. + <http://www.gnu.org/licenses/>. */
  125354. #include <pthread.h>
  125355. diff -Nur uClibc-0.9.33.2/test/nptl/tst-join1.c uClibc-git/test/nptl/tst-join1.c
  125356. --- uClibc-0.9.33.2/test/nptl/tst-join1.c 2012-05-15 09:20:09.000000000 +0200
  125357. +++ uClibc-git/test/nptl/tst-join1.c 2014-07-25 20:36:11.585359720 +0200
  125358. @@ -13,9 +13,8 @@
  125359. Lesser General Public License for more details.
  125360. You should have received a copy of the GNU Lesser General Public
  125361. - License along with the GNU C Library; if not, write to the Free
  125362. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125363. - 02111-1307 USA. */
  125364. + License along with the GNU C Library; if not, see
  125365. + <http://www.gnu.org/licenses/>. */
  125366. #include <pthread.h>
  125367. #include <stdio.h>
  125368. diff -Nur uClibc-0.9.33.2/test/nptl/tst-join2.c uClibc-git/test/nptl/tst-join2.c
  125369. --- uClibc-0.9.33.2/test/nptl/tst-join2.c 2012-05-15 09:20:09.000000000 +0200
  125370. +++ uClibc-git/test/nptl/tst-join2.c 2014-07-25 20:36:11.585359720 +0200
  125371. @@ -13,9 +13,8 @@
  125372. Lesser General Public License for more details.
  125373. You should have received a copy of the GNU Lesser General Public
  125374. - License along with the GNU C Library; if not, write to the Free
  125375. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125376. - 02111-1307 USA. */
  125377. + License along with the GNU C Library; if not, see
  125378. + <http://www.gnu.org/licenses/>. */
  125379. #include <errno.h>
  125380. #include <pthread.h>
  125381. diff -Nur uClibc-0.9.33.2/test/nptl/tst-join3.c uClibc-git/test/nptl/tst-join3.c
  125382. --- uClibc-0.9.33.2/test/nptl/tst-join3.c 2012-05-15 09:20:09.000000000 +0200
  125383. +++ uClibc-git/test/nptl/tst-join3.c 2014-07-25 20:36:11.585359720 +0200
  125384. @@ -13,9 +13,8 @@
  125385. Lesser General Public License for more details.
  125386. You should have received a copy of the GNU Lesser General Public
  125387. - License along with the GNU C Library; if not, write to the Free
  125388. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125389. - 02111-1307 USA. */
  125390. + License along with the GNU C Library; if not, see
  125391. + <http://www.gnu.org/licenses/>. */
  125392. #include <errno.h>
  125393. #include <pthread.h>
  125394. diff -Nur uClibc-0.9.33.2/test/nptl/tst-join4.c uClibc-git/test/nptl/tst-join4.c
  125395. --- uClibc-0.9.33.2/test/nptl/tst-join4.c 2012-05-15 09:20:09.000000000 +0200
  125396. +++ uClibc-git/test/nptl/tst-join4.c 2014-07-25 20:36:11.585359720 +0200
  125397. @@ -13,9 +13,8 @@
  125398. Lesser General Public License for more details.
  125399. You should have received a copy of the GNU Lesser General Public
  125400. - License along with the GNU C Library; if not, write to the Free
  125401. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125402. - 02111-1307 USA. */
  125403. + License along with the GNU C Library; if not, see
  125404. + <http://www.gnu.org/licenses/>. */
  125405. #include <errno.h>
  125406. #include <pthread.h>
  125407. diff -Nur uClibc-0.9.33.2/test/nptl/tst-join5.c uClibc-git/test/nptl/tst-join5.c
  125408. --- uClibc-0.9.33.2/test/nptl/tst-join5.c 2012-05-15 09:20:09.000000000 +0200
  125409. +++ uClibc-git/test/nptl/tst-join5.c 2014-07-25 20:36:11.585359720 +0200
  125410. @@ -13,9 +13,8 @@
  125411. Lesser General Public License for more details.
  125412. You should have received a copy of the GNU Lesser General Public
  125413. - License along with the GNU C Library; if not, write to the Free
  125414. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125415. - 02111-1307 USA. */
  125416. + License along with the GNU C Library; if not, see
  125417. + <http://www.gnu.org/licenses/>. */
  125418. #include <errno.h>
  125419. #include <pthread.h>
  125420. diff -Nur uClibc-0.9.33.2/test/nptl/tst-key1.c uClibc-git/test/nptl/tst-key1.c
  125421. --- uClibc-0.9.33.2/test/nptl/tst-key1.c 2012-05-15 09:20:09.000000000 +0200
  125422. +++ uClibc-git/test/nptl/tst-key1.c 2014-07-25 20:36:11.585359720 +0200
  125423. @@ -13,9 +13,8 @@
  125424. Lesser General Public License for more details.
  125425. You should have received a copy of the GNU Lesser General Public
  125426. - License along with the GNU C Library; if not, write to the Free
  125427. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125428. - 02111-1307 USA. */
  125429. + License along with the GNU C Library; if not, see
  125430. + <http://www.gnu.org/licenses/>. */
  125431. #include <limits.h>
  125432. #include <pthread.h>
  125433. diff -Nur uClibc-0.9.33.2/test/nptl/tst-key2.c uClibc-git/test/nptl/tst-key2.c
  125434. --- uClibc-0.9.33.2/test/nptl/tst-key2.c 2012-05-15 09:20:09.000000000 +0200
  125435. +++ uClibc-git/test/nptl/tst-key2.c 2014-07-25 20:36:11.585359720 +0200
  125436. @@ -13,9 +13,8 @@
  125437. Lesser General Public License for more details.
  125438. You should have received a copy of the GNU Lesser General Public
  125439. - License along with the GNU C Library; if not, write to the Free
  125440. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125441. - 02111-1307 USA. */
  125442. + License along with the GNU C Library; if not, see
  125443. + <http://www.gnu.org/licenses/>. */
  125444. #include <pthread.h>
  125445. #include <stdio.h>
  125446. diff -Nur uClibc-0.9.33.2/test/nptl/tst-key3.c uClibc-git/test/nptl/tst-key3.c
  125447. --- uClibc-0.9.33.2/test/nptl/tst-key3.c 2012-05-15 09:20:09.000000000 +0200
  125448. +++ uClibc-git/test/nptl/tst-key3.c 2014-07-25 20:36:11.585359720 +0200
  125449. @@ -13,9 +13,8 @@
  125450. Lesser General Public License for more details.
  125451. You should have received a copy of the GNU Lesser General Public
  125452. - License along with the GNU C Library; if not, write to the Free
  125453. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125454. - 02111-1307 USA. */
  125455. + License along with the GNU C Library; if not, see
  125456. + <http://www.gnu.org/licenses/>. */
  125457. #include <pthread.h>
  125458. #include <stdio.h>
  125459. diff -Nur uClibc-0.9.33.2/test/nptl/tst-key4.c uClibc-git/test/nptl/tst-key4.c
  125460. --- uClibc-0.9.33.2/test/nptl/tst-key4.c 2012-05-15 09:20:09.000000000 +0200
  125461. +++ uClibc-git/test/nptl/tst-key4.c 2014-07-25 20:36:11.585359720 +0200
  125462. @@ -13,9 +13,8 @@
  125463. Lesser General Public License for more details.
  125464. You should have received a copy of the GNU Lesser General Public
  125465. - License along with the GNU C Library; if not, write to the Free
  125466. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125467. - 02111-1307 USA. */
  125468. + License along with the GNU C Library; if not, see
  125469. + <http://www.gnu.org/licenses/>. */
  125470. #include <limits.h>
  125471. #include <pthread.h>
  125472. diff -Nur uClibc-0.9.33.2/test/nptl/tst-kill1.c uClibc-git/test/nptl/tst-kill1.c
  125473. --- uClibc-0.9.33.2/test/nptl/tst-kill1.c 2012-05-15 09:20:09.000000000 +0200
  125474. +++ uClibc-git/test/nptl/tst-kill1.c 2014-07-25 20:36:11.585359720 +0200
  125475. @@ -13,9 +13,8 @@
  125476. Lesser General Public License for more details.
  125477. You should have received a copy of the GNU Lesser General Public
  125478. - License along with the GNU C Library; if not, write to the Free
  125479. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125480. - 02111-1307 USA. */
  125481. + License along with the GNU C Library; if not, see
  125482. + <http://www.gnu.org/licenses/>. */
  125483. #include <pthread.h>
  125484. #include <signal.h>
  125485. diff -Nur uClibc-0.9.33.2/test/nptl/tst-kill2.c uClibc-git/test/nptl/tst-kill2.c
  125486. --- uClibc-0.9.33.2/test/nptl/tst-kill2.c 2012-05-15 09:20:09.000000000 +0200
  125487. +++ uClibc-git/test/nptl/tst-kill2.c 2014-07-25 20:36:11.585359720 +0200
  125488. @@ -13,9 +13,8 @@
  125489. Lesser General Public License for more details.
  125490. You should have received a copy of the GNU Lesser General Public
  125491. - License along with the GNU C Library; if not, write to the Free
  125492. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125493. - 02111-1307 USA. */
  125494. + License along with the GNU C Library; if not, see
  125495. + <http://www.gnu.org/licenses/>. */
  125496. #include <errno.h>
  125497. #include <pthread.h>
  125498. diff -Nur uClibc-0.9.33.2/test/nptl/tst-kill3.c uClibc-git/test/nptl/tst-kill3.c
  125499. --- uClibc-0.9.33.2/test/nptl/tst-kill3.c 2012-05-15 09:20:09.000000000 +0200
  125500. +++ uClibc-git/test/nptl/tst-kill3.c 2014-07-25 20:36:11.585359720 +0200
  125501. @@ -13,9 +13,8 @@
  125502. Lesser General Public License for more details.
  125503. You should have received a copy of the GNU Lesser General Public
  125504. - License along with the GNU C Library; if not, write to the Free
  125505. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125506. - 02111-1307 USA. */
  125507. + License along with the GNU C Library; if not, see
  125508. + <http://www.gnu.org/licenses/>. */
  125509. #include <errno.h>
  125510. #include <pthread.h>
  125511. diff -Nur uClibc-0.9.33.2/test/nptl/tst-kill4.c uClibc-git/test/nptl/tst-kill4.c
  125512. --- uClibc-0.9.33.2/test/nptl/tst-kill4.c 2012-05-15 09:20:09.000000000 +0200
  125513. +++ uClibc-git/test/nptl/tst-kill4.c 2014-07-25 20:36:11.585359720 +0200
  125514. @@ -13,9 +13,8 @@
  125515. Lesser General Public License for more details.
  125516. You should have received a copy of the GNU Lesser General Public
  125517. - License along with the GNU C Library; if not, write to the Free
  125518. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125519. - 02111-1307 USA. */
  125520. + License along with the GNU C Library; if not, see
  125521. + <http://www.gnu.org/licenses/>. */
  125522. #include <errno.h>
  125523. #include <pthread.h>
  125524. diff -Nur uClibc-0.9.33.2/test/nptl/tst-kill5.c uClibc-git/test/nptl/tst-kill5.c
  125525. --- uClibc-0.9.33.2/test/nptl/tst-kill5.c 2012-05-15 09:20:09.000000000 +0200
  125526. +++ uClibc-git/test/nptl/tst-kill5.c 2014-07-25 20:36:11.585359720 +0200
  125527. @@ -13,9 +13,8 @@
  125528. Lesser General Public License for more details.
  125529. You should have received a copy of the GNU Lesser General Public
  125530. - License along with the GNU C Library; if not, write to the Free
  125531. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125532. - 02111-1307 USA. */
  125533. + License along with the GNU C Library; if not, see
  125534. + <http://www.gnu.org/licenses/>. */
  125535. #include <errno.h>
  125536. #include <pthread.h>
  125537. diff -Nur uClibc-0.9.33.2/test/nptl/tst-kill6.c uClibc-git/test/nptl/tst-kill6.c
  125538. --- uClibc-0.9.33.2/test/nptl/tst-kill6.c 2012-05-15 09:20:09.000000000 +0200
  125539. +++ uClibc-git/test/nptl/tst-kill6.c 2014-07-25 20:36:11.585359720 +0200
  125540. @@ -13,9 +13,8 @@
  125541. Lesser General Public License for more details.
  125542. You should have received a copy of the GNU Lesser General Public
  125543. - License along with the GNU C Library; if not, write to the Free
  125544. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125545. - 02111-1307 USA. */
  125546. + License along with the GNU C Library; if not, see
  125547. + <http://www.gnu.org/licenses/>. */
  125548. #include <errno.h>
  125549. #include <pthread.h>
  125550. diff -Nur uClibc-0.9.33.2/test/nptl/tst-mqueue1.c uClibc-git/test/nptl/tst-mqueue1.c
  125551. --- uClibc-0.9.33.2/test/nptl/tst-mqueue1.c 2012-05-15 09:20:09.000000000 +0200
  125552. +++ uClibc-git/test/nptl/tst-mqueue1.c 2014-07-25 20:36:11.589359741 +0200
  125553. @@ -14,9 +14,8 @@
  125554. Lesser General Public License for more details.
  125555. You should have received a copy of the GNU Lesser General Public
  125556. - License along with the GNU C Library; if not, write to the Free
  125557. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125558. - 02111-1307 USA. */
  125559. + License along with the GNU C Library; if not, see
  125560. + <http://www.gnu.org/licenses/>. */
  125561. #include <errno.h>
  125562. #include <fcntl.h>
  125563. diff -Nur uClibc-0.9.33.2/test/nptl/tst-mqueue2.c uClibc-git/test/nptl/tst-mqueue2.c
  125564. --- uClibc-0.9.33.2/test/nptl/tst-mqueue2.c 2012-05-15 09:20:09.000000000 +0200
  125565. +++ uClibc-git/test/nptl/tst-mqueue2.c 2014-07-25 20:36:11.589359741 +0200
  125566. @@ -14,9 +14,8 @@
  125567. Lesser General Public License for more details.
  125568. You should have received a copy of the GNU Lesser General Public
  125569. - License along with the GNU C Library; if not, write to the Free
  125570. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125571. - 02111-1307 USA. */
  125572. + License along with the GNU C Library; if not, see
  125573. + <http://www.gnu.org/licenses/>. */
  125574. #include <errno.h>
  125575. #include <fcntl.h>
  125576. diff -Nur uClibc-0.9.33.2/test/nptl/tst-mqueue3.c uClibc-git/test/nptl/tst-mqueue3.c
  125577. --- uClibc-0.9.33.2/test/nptl/tst-mqueue3.c 2012-05-15 09:20:09.000000000 +0200
  125578. +++ uClibc-git/test/nptl/tst-mqueue3.c 2014-07-25 20:36:11.589359741 +0200
  125579. @@ -14,9 +14,8 @@
  125580. Lesser General Public License for more details.
  125581. You should have received a copy of the GNU Lesser General Public
  125582. - License along with the GNU C Library; if not, write to the Free
  125583. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125584. - 02111-1307 USA. */
  125585. + License along with the GNU C Library; if not, see
  125586. + <http://www.gnu.org/licenses/>. */
  125587. #include <errno.h>
  125588. #include <mqueue.h>
  125589. diff -Nur uClibc-0.9.33.2/test/nptl/tst-mqueue4.c uClibc-git/test/nptl/tst-mqueue4.c
  125590. --- uClibc-0.9.33.2/test/nptl/tst-mqueue4.c 2012-05-15 09:20:09.000000000 +0200
  125591. +++ uClibc-git/test/nptl/tst-mqueue4.c 2014-07-25 20:36:11.589359741 +0200
  125592. @@ -14,9 +14,8 @@
  125593. Lesser General Public License for more details.
  125594. You should have received a copy of the GNU Lesser General Public
  125595. - License along with the GNU C Library; if not, write to the Free
  125596. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125597. - 02111-1307 USA. */
  125598. + License along with the GNU C Library; if not, see
  125599. + <http://www.gnu.org/licenses/>. */
  125600. #include <errno.h>
  125601. #include <fcntl.h>
  125602. diff -Nur uClibc-0.9.33.2/test/nptl/tst-mqueue5.c uClibc-git/test/nptl/tst-mqueue5.c
  125603. --- uClibc-0.9.33.2/test/nptl/tst-mqueue5.c 2012-05-15 09:20:09.000000000 +0200
  125604. +++ uClibc-git/test/nptl/tst-mqueue5.c 2014-07-25 20:36:11.589359741 +0200
  125605. @@ -14,9 +14,8 @@
  125606. Lesser General Public License for more details.
  125607. You should have received a copy of the GNU Lesser General Public
  125608. - License along with the GNU C Library; if not, write to the Free
  125609. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125610. - 02111-1307 USA. */
  125611. + License along with the GNU C Library; if not, see
  125612. + <http://www.gnu.org/licenses/>. */
  125613. #include <errno.h>
  125614. #include <fcntl.h>
  125615. diff -Nur uClibc-0.9.33.2/test/nptl/tst-mqueue6.c uClibc-git/test/nptl/tst-mqueue6.c
  125616. --- uClibc-0.9.33.2/test/nptl/tst-mqueue6.c 2012-05-15 09:20:09.000000000 +0200
  125617. +++ uClibc-git/test/nptl/tst-mqueue6.c 2014-07-25 20:36:11.589359741 +0200
  125618. @@ -14,9 +14,8 @@
  125619. Lesser General Public License for more details.
  125620. You should have received a copy of the GNU Lesser General Public
  125621. - License along with the GNU C Library; if not, write to the Free
  125622. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125623. - 02111-1307 USA. */
  125624. + License along with the GNU C Library; if not, see
  125625. + <http://www.gnu.org/licenses/>. */
  125626. #include <errno.h>
  125627. #include <fcntl.h>
  125628. diff -Nur uClibc-0.9.33.2/test/nptl/tst-mqueue7.c uClibc-git/test/nptl/tst-mqueue7.c
  125629. --- uClibc-0.9.33.2/test/nptl/tst-mqueue7.c 2012-05-15 09:20:09.000000000 +0200
  125630. +++ uClibc-git/test/nptl/tst-mqueue7.c 2014-07-25 20:36:11.589359741 +0200
  125631. @@ -14,9 +14,8 @@
  125632. Lesser General Public License for more details.
  125633. You should have received a copy of the GNU Lesser General Public
  125634. - License along with the GNU C Library; if not, write to the Free
  125635. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125636. - 02111-1307 USA. */
  125637. + License along with the GNU C Library; if not, see
  125638. + <http://www.gnu.org/licenses/>. */
  125639. #include <errno.h>
  125640. #include <fcntl.h>
  125641. diff -Nur uClibc-0.9.33.2/test/nptl/tst-mqueue8.c uClibc-git/test/nptl/tst-mqueue8.c
  125642. --- uClibc-0.9.33.2/test/nptl/tst-mqueue8.c 2012-05-15 09:20:09.000000000 +0200
  125643. +++ uClibc-git/test/nptl/tst-mqueue8.c 2014-07-25 20:36:11.589359741 +0200
  125644. @@ -13,9 +13,8 @@
  125645. Lesser General Public License for more details.
  125646. You should have received a copy of the GNU Lesser General Public
  125647. - License along with the GNU C Library; if not, write to the Free
  125648. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125649. - 02111-1307 USA. */
  125650. + License along with the GNU C Library; if not, see
  125651. + <http://www.gnu.org/licenses/>. */
  125652. #include <errno.h>
  125653. #include <mqueue.h>
  125654. diff -Nur uClibc-0.9.33.2/test/nptl/tst-mqueue9.c uClibc-git/test/nptl/tst-mqueue9.c
  125655. --- uClibc-0.9.33.2/test/nptl/tst-mqueue9.c 2012-05-15 09:20:09.000000000 +0200
  125656. +++ uClibc-git/test/nptl/tst-mqueue9.c 2014-07-25 20:36:11.589359741 +0200
  125657. @@ -13,9 +13,8 @@
  125658. Lesser General Public License for more details.
  125659. You should have received a copy of the GNU Lesser General Public
  125660. - License along with the GNU C Library; if not, write to the Free
  125661. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125662. - 02111-1307 USA. */
  125663. + License along with the GNU C Library; if not, see
  125664. + <http://www.gnu.org/licenses/>. */
  125665. #include <errno.h>
  125666. #include <mqueue.h>
  125667. diff -Nur uClibc-0.9.33.2/test/nptl/tst-mqueue.h uClibc-git/test/nptl/tst-mqueue.h
  125668. --- uClibc-0.9.33.2/test/nptl/tst-mqueue.h 2012-05-15 09:20:09.000000000 +0200
  125669. +++ uClibc-git/test/nptl/tst-mqueue.h 2014-07-25 20:36:11.589359741 +0200
  125670. @@ -14,9 +14,8 @@
  125671. Lesser General Public License for more details.
  125672. You should have received a copy of the GNU Lesser General Public
  125673. - License along with the GNU C Library; if not, write to the Free
  125674. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125675. - 02111-1307 USA. */
  125676. + License along with the GNU C Library; if not, see
  125677. + <http://www.gnu.org/licenses/>. */
  125678. #include <mqueue.h>
  125679. #include <search.h>
  125680. diff -Nur uClibc-0.9.33.2/test/nptl/tst-mutex1.c uClibc-git/test/nptl/tst-mutex1.c
  125681. --- uClibc-0.9.33.2/test/nptl/tst-mutex1.c 2012-05-15 09:20:09.000000000 +0200
  125682. +++ uClibc-git/test/nptl/tst-mutex1.c 2014-07-25 20:36:11.589359741 +0200
  125683. @@ -13,9 +13,8 @@
  125684. Lesser General Public License for more details.
  125685. You should have received a copy of the GNU Lesser General Public
  125686. - License along with the GNU C Library; if not, write to the Free
  125687. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125688. - 02111-1307 USA. */
  125689. + License along with the GNU C Library; if not, see
  125690. + <http://www.gnu.org/licenses/>. */
  125691. #include <pthread.h>
  125692. #include <stdio.h>
  125693. diff -Nur uClibc-0.9.33.2/test/nptl/tst-mutex2.c uClibc-git/test/nptl/tst-mutex2.c
  125694. --- uClibc-0.9.33.2/test/nptl/tst-mutex2.c 2012-05-15 09:20:09.000000000 +0200
  125695. +++ uClibc-git/test/nptl/tst-mutex2.c 2014-07-25 20:36:11.589359741 +0200
  125696. @@ -13,9 +13,8 @@
  125697. Lesser General Public License for more details.
  125698. You should have received a copy of the GNU Lesser General Public
  125699. - License along with the GNU C Library; if not, write to the Free
  125700. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125701. - 02111-1307 USA. */
  125702. + License along with the GNU C Library; if not, see
  125703. + <http://www.gnu.org/licenses/>. */
  125704. #include <errno.h>
  125705. #include <pthread.h>
  125706. diff -Nur uClibc-0.9.33.2/test/nptl/tst-mutex3.c uClibc-git/test/nptl/tst-mutex3.c
  125707. --- uClibc-0.9.33.2/test/nptl/tst-mutex3.c 2012-05-15 09:20:09.000000000 +0200
  125708. +++ uClibc-git/test/nptl/tst-mutex3.c 2014-07-25 20:36:11.589359741 +0200
  125709. @@ -13,9 +13,8 @@
  125710. Lesser General Public License for more details.
  125711. You should have received a copy of the GNU Lesser General Public
  125712. - License along with the GNU C Library; if not, write to the Free
  125713. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125714. - 02111-1307 USA. */
  125715. + License along with the GNU C Library; if not, see
  125716. + <http://www.gnu.org/licenses/>. */
  125717. #include <errno.h>
  125718. #include <pthread.h>
  125719. diff -Nur uClibc-0.9.33.2/test/nptl/tst-mutex4.c uClibc-git/test/nptl/tst-mutex4.c
  125720. --- uClibc-0.9.33.2/test/nptl/tst-mutex4.c 2012-05-15 09:20:09.000000000 +0200
  125721. +++ uClibc-git/test/nptl/tst-mutex4.c 2014-07-25 20:36:11.589359741 +0200
  125722. @@ -13,9 +13,8 @@
  125723. Lesser General Public License for more details.
  125724. You should have received a copy of the GNU Lesser General Public
  125725. - License along with the GNU C Library; if not, write to the Free
  125726. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125727. - 02111-1307 USA. */
  125728. + License along with the GNU C Library; if not, see
  125729. + <http://www.gnu.org/licenses/>. */
  125730. #include <errno.h>
  125731. #include <pthread.h>
  125732. diff -Nur uClibc-0.9.33.2/test/nptl/tst-mutex5.c uClibc-git/test/nptl/tst-mutex5.c
  125733. --- uClibc-0.9.33.2/test/nptl/tst-mutex5.c 2012-05-15 09:20:09.000000000 +0200
  125734. +++ uClibc-git/test/nptl/tst-mutex5.c 2014-07-25 20:36:11.589359741 +0200
  125735. @@ -13,9 +13,8 @@
  125736. Lesser General Public License for more details.
  125737. You should have received a copy of the GNU Lesser General Public
  125738. - License along with the GNU C Library; if not, write to the Free
  125739. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125740. - 02111-1307 USA. */
  125741. + License along with the GNU C Library; if not, see
  125742. + <http://www.gnu.org/licenses/>. */
  125743. #include <errno.h>
  125744. #include <pthread.h>
  125745. diff -Nur uClibc-0.9.33.2/test/nptl/tst-mutex6.c uClibc-git/test/nptl/tst-mutex6.c
  125746. --- uClibc-0.9.33.2/test/nptl/tst-mutex6.c 2012-05-15 09:20:09.000000000 +0200
  125747. +++ uClibc-git/test/nptl/tst-mutex6.c 2014-07-25 20:36:11.589359741 +0200
  125748. @@ -13,9 +13,8 @@
  125749. Lesser General Public License for more details.
  125750. You should have received a copy of the GNU Lesser General Public
  125751. - License along with the GNU C Library; if not, write to the Free
  125752. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125753. - 02111-1307 USA. */
  125754. + License along with the GNU C Library; if not, see
  125755. + <http://www.gnu.org/licenses/>. */
  125756. #include <pthread.h>
  125757. #include <signal.h>
  125758. diff -Nur uClibc-0.9.33.2/test/nptl/tst-mutex7.c uClibc-git/test/nptl/tst-mutex7.c
  125759. --- uClibc-0.9.33.2/test/nptl/tst-mutex7.c 2012-05-15 09:20:09.000000000 +0200
  125760. +++ uClibc-git/test/nptl/tst-mutex7.c 2014-07-25 20:36:11.589359741 +0200
  125761. @@ -13,9 +13,8 @@
  125762. Lesser General Public License for more details.
  125763. You should have received a copy of the GNU Lesser General Public
  125764. - License along with the GNU C Library; if not, write to the Free
  125765. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125766. - 02111-1307 USA. */
  125767. + License along with the GNU C Library; if not, see
  125768. + <http://www.gnu.org/licenses/>. */
  125769. #include <pthread.h>
  125770. #include <stdio.h>
  125771. diff -Nur uClibc-0.9.33.2/test/nptl/tst-mutex8.c uClibc-git/test/nptl/tst-mutex8.c
  125772. --- uClibc-0.9.33.2/test/nptl/tst-mutex8.c 2012-05-15 09:20:09.000000000 +0200
  125773. +++ uClibc-git/test/nptl/tst-mutex8.c 2014-07-25 20:36:11.589359741 +0200
  125774. @@ -13,9 +13,8 @@
  125775. Lesser General Public License for more details.
  125776. You should have received a copy of the GNU Lesser General Public
  125777. - License along with the GNU C Library; if not, write to the Free
  125778. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125779. - 02111-1307 USA. */
  125780. + License along with the GNU C Library; if not, see
  125781. + <http://www.gnu.org/licenses/>. */
  125782. /* This test checks behavior not required by POSIX. */
  125783. #include <errno.h>
  125784. diff -Nur uClibc-0.9.33.2/test/nptl/tst-mutex9.c uClibc-git/test/nptl/tst-mutex9.c
  125785. --- uClibc-0.9.33.2/test/nptl/tst-mutex9.c 2012-05-15 09:20:09.000000000 +0200
  125786. +++ uClibc-git/test/nptl/tst-mutex9.c 2014-07-25 20:36:11.589359741 +0200
  125787. @@ -13,9 +13,8 @@
  125788. Lesser General Public License for more details.
  125789. You should have received a copy of the GNU Lesser General Public
  125790. - License along with the GNU C Library; if not, write to the Free
  125791. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125792. - 02111-1307 USA. */
  125793. + License along with the GNU C Library; if not, see
  125794. + <http://www.gnu.org/licenses/>. */
  125795. #include <errno.h>
  125796. #include <pthread.h>
  125797. diff -Nur uClibc-0.9.33.2/test/nptl/tst-once1.c uClibc-git/test/nptl/tst-once1.c
  125798. --- uClibc-0.9.33.2/test/nptl/tst-once1.c 2012-05-15 09:20:09.000000000 +0200
  125799. +++ uClibc-git/test/nptl/tst-once1.c 2014-07-25 20:36:11.589359741 +0200
  125800. @@ -13,9 +13,8 @@
  125801. Lesser General Public License for more details.
  125802. You should have received a copy of the GNU Lesser General Public
  125803. - License along with the GNU C Library; if not, write to the Free
  125804. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125805. - 02111-1307 USA. */
  125806. + License along with the GNU C Library; if not, see
  125807. + <http://www.gnu.org/licenses/>. */
  125808. #include <pthread.h>
  125809. #include <stdio.h>
  125810. diff -Nur uClibc-0.9.33.2/test/nptl/tst-once2.c uClibc-git/test/nptl/tst-once2.c
  125811. --- uClibc-0.9.33.2/test/nptl/tst-once2.c 2012-05-15 09:20:09.000000000 +0200
  125812. +++ uClibc-git/test/nptl/tst-once2.c 2014-07-25 20:36:11.589359741 +0200
  125813. @@ -13,9 +13,8 @@
  125814. Lesser General Public License for more details.
  125815. You should have received a copy of the GNU Lesser General Public
  125816. - License along with the GNU C Library; if not, write to the Free
  125817. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125818. - 02111-1307 USA. */
  125819. + License along with the GNU C Library; if not, see
  125820. + <http://www.gnu.org/licenses/>. */
  125821. #include <pthread.h>
  125822. #include <stdio.h>
  125823. diff -Nur uClibc-0.9.33.2/test/nptl/tst-once3.c uClibc-git/test/nptl/tst-once3.c
  125824. --- uClibc-0.9.33.2/test/nptl/tst-once3.c 2012-05-15 09:20:09.000000000 +0200
  125825. +++ uClibc-git/test/nptl/tst-once3.c 2014-07-25 20:36:11.589359741 +0200
  125826. @@ -13,9 +13,8 @@
  125827. Lesser General Public License for more details.
  125828. You should have received a copy of the GNU Lesser General Public
  125829. - License along with the GNU C Library; if not, write to the Free
  125830. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125831. - 02111-1307 USA. */
  125832. + License along with the GNU C Library; if not, see
  125833. + <http://www.gnu.org/licenses/>. */
  125834. #include <pthread.h>
  125835. #include <stdio.h>
  125836. diff -Nur uClibc-0.9.33.2/test/nptl/tst-once4.c uClibc-git/test/nptl/tst-once4.c
  125837. --- uClibc-0.9.33.2/test/nptl/tst-once4.c 2012-05-15 09:20:09.000000000 +0200
  125838. +++ uClibc-git/test/nptl/tst-once4.c 2014-07-25 20:36:11.589359741 +0200
  125839. @@ -13,9 +13,8 @@
  125840. Lesser General Public License for more details.
  125841. You should have received a copy of the GNU Lesser General Public
  125842. - License along with the GNU C Library; if not, write to the Free
  125843. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125844. - 02111-1307 USA. */
  125845. + License along with the GNU C Library; if not, see
  125846. + <http://www.gnu.org/licenses/>. */
  125847. #include <pthread.h>
  125848. #include <stdio.h>
  125849. diff -Nur uClibc-0.9.33.2/test/nptl/tst-popen1.c uClibc-git/test/nptl/tst-popen1.c
  125850. --- uClibc-0.9.33.2/test/nptl/tst-popen1.c 2012-05-15 09:20:09.000000000 +0200
  125851. +++ uClibc-git/test/nptl/tst-popen1.c 2014-07-25 20:36:11.589359741 +0200
  125852. @@ -13,9 +13,8 @@
  125853. Lesser General Public License for more details.
  125854. You should have received a copy of the GNU Lesser General Public
  125855. - License along with the GNU C Library; if not, write to the Free
  125856. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125857. - 02111-1307 USA. */
  125858. + License along with the GNU C Library; if not, see
  125859. + <http://www.gnu.org/licenses/>. */
  125860. #include <errno.h>
  125861. #include <error.h>
  125862. diff -Nur uClibc-0.9.33.2/test/nptl/tst-raise1.c uClibc-git/test/nptl/tst-raise1.c
  125863. --- uClibc-0.9.33.2/test/nptl/tst-raise1.c 2012-05-15 09:20:09.000000000 +0200
  125864. +++ uClibc-git/test/nptl/tst-raise1.c 2014-07-25 20:36:11.589359741 +0200
  125865. @@ -13,9 +13,8 @@
  125866. Lesser General Public License for more details.
  125867. You should have received a copy of the GNU Lesser General Public
  125868. - License along with the GNU C Library; if not, write to the Free
  125869. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125870. - 02111-1307 USA. */
  125871. + License along with the GNU C Library; if not, see
  125872. + <http://www.gnu.org/licenses/>. */
  125873. #include <errno.h>
  125874. #include <error.h>
  125875. diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock10.c uClibc-git/test/nptl/tst-rwlock10.c
  125876. --- uClibc-0.9.33.2/test/nptl/tst-rwlock10.c 2012-05-15 09:20:09.000000000 +0200
  125877. +++ uClibc-git/test/nptl/tst-rwlock10.c 2014-07-25 20:36:11.589359741 +0200
  125878. @@ -13,9 +13,8 @@
  125879. Lesser General Public License for more details.
  125880. You should have received a copy of the GNU Lesser General Public
  125881. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  125882. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  125883. - Boston, MA 02111-1307, USA. */
  125884. + License along with the GNU C Library; see the file COPYING.LIB. If
  125885. + not, see <http://www.gnu.org/licenses/>. */
  125886. #define INIT PTHREAD_RWLOCK_INITIALIZER
  125887. #include "tst-rwlock8.c"
  125888. diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock11.c uClibc-git/test/nptl/tst-rwlock11.c
  125889. --- uClibc-0.9.33.2/test/nptl/tst-rwlock11.c 2012-05-15 09:20:09.000000000 +0200
  125890. +++ uClibc-git/test/nptl/tst-rwlock11.c 2014-07-25 20:36:11.589359741 +0200
  125891. @@ -13,9 +13,8 @@
  125892. Lesser General Public License for more details.
  125893. You should have received a copy of the GNU Lesser General Public
  125894. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  125895. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  125896. - Boston, MA 02111-1307, USA. */
  125897. + License along with the GNU C Library; see the file COPYING.LIB. If
  125898. + not, see <http://www.gnu.org/licenses/>. */
  125899. #define INIT PTHREAD_RWLOCK_INITIALIZER
  125900. #include "tst-rwlock9.c"
  125901. diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock12.c uClibc-git/test/nptl/tst-rwlock12.c
  125902. --- uClibc-0.9.33.2/test/nptl/tst-rwlock12.c 2012-05-15 09:20:09.000000000 +0200
  125903. +++ uClibc-git/test/nptl/tst-rwlock12.c 2014-07-25 20:36:11.589359741 +0200
  125904. @@ -13,9 +13,8 @@
  125905. Lesser General Public License for more details.
  125906. You should have received a copy of the GNU Lesser General Public
  125907. - License along with the GNU C Library; if not, write to the Free
  125908. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125909. - 02111-1307 USA. */
  125910. + License along with the GNU C Library; if not, see
  125911. + <http://www.gnu.org/licenses/>. */
  125912. #include <errno.h>
  125913. #include <pthread.h>
  125914. diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock13.c uClibc-git/test/nptl/tst-rwlock13.c
  125915. --- uClibc-0.9.33.2/test/nptl/tst-rwlock13.c 2012-05-15 09:20:09.000000000 +0200
  125916. +++ uClibc-git/test/nptl/tst-rwlock13.c 2014-07-25 20:36:11.589359741 +0200
  125917. @@ -12,9 +12,8 @@
  125918. Lesser General Public License for more details.
  125919. You should have received a copy of the GNU Lesser General Public
  125920. - License along with the GNU C Library; if not, write to the Free
  125921. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125922. - 02111-1307 USA. */
  125923. + License along with the GNU C Library; if not, see
  125924. + <http://www.gnu.org/licenses/>. */
  125925. #include <pthread.h>
  125926. #include <stdio.h>
  125927. diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock14.c uClibc-git/test/nptl/tst-rwlock14.c
  125928. --- uClibc-0.9.33.2/test/nptl/tst-rwlock14.c 2012-05-15 09:20:09.000000000 +0200
  125929. +++ uClibc-git/test/nptl/tst-rwlock14.c 2014-07-25 20:36:11.589359741 +0200
  125930. @@ -13,9 +13,8 @@
  125931. Lesser General Public License for more details.
  125932. You should have received a copy of the GNU Lesser General Public
  125933. - License along with the GNU C Library; if not, write to the Free
  125934. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125935. - 02111-1307 USA. */
  125936. + License along with the GNU C Library; if not, see
  125937. + <http://www.gnu.org/licenses/>. */
  125938. #include <errno.h>
  125939. #include <pthread.h>
  125940. diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock1.c uClibc-git/test/nptl/tst-rwlock1.c
  125941. --- uClibc-0.9.33.2/test/nptl/tst-rwlock1.c 2012-05-15 09:20:09.000000000 +0200
  125942. +++ uClibc-git/test/nptl/tst-rwlock1.c 2014-07-25 20:36:11.589359741 +0200
  125943. @@ -13,9 +13,8 @@
  125944. Lesser General Public License for more details.
  125945. You should have received a copy of the GNU Lesser General Public
  125946. - License along with the GNU C Library; if not, write to the Free
  125947. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125948. - 02111-1307 USA. */
  125949. + License along with the GNU C Library; if not, see
  125950. + <http://www.gnu.org/licenses/>. */
  125951. #include <pthread.h>
  125952. #include <stdio.h>
  125953. diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock2.c uClibc-git/test/nptl/tst-rwlock2.c
  125954. --- uClibc-0.9.33.2/test/nptl/tst-rwlock2.c 2012-05-15 09:20:09.000000000 +0200
  125955. +++ uClibc-git/test/nptl/tst-rwlock2.c 2014-07-25 20:36:11.589359741 +0200
  125956. @@ -13,9 +13,8 @@
  125957. Lesser General Public License for more details.
  125958. You should have received a copy of the GNU Lesser General Public
  125959. - License along with the GNU C Library; if not, write to the Free
  125960. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125961. - 02111-1307 USA. */
  125962. + License along with the GNU C Library; if not, see
  125963. + <http://www.gnu.org/licenses/>. */
  125964. #include <errno.h>
  125965. #include <pthread.h>
  125966. diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock3.c uClibc-git/test/nptl/tst-rwlock3.c
  125967. --- uClibc-0.9.33.2/test/nptl/tst-rwlock3.c 2012-05-15 09:20:09.000000000 +0200
  125968. +++ uClibc-git/test/nptl/tst-rwlock3.c 2014-07-25 20:36:11.589359741 +0200
  125969. @@ -13,9 +13,8 @@
  125970. Lesser General Public License for more details.
  125971. You should have received a copy of the GNU Lesser General Public
  125972. - License along with the GNU C Library; if not, write to the Free
  125973. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125974. - 02111-1307 USA. */
  125975. + License along with the GNU C Library; if not, see
  125976. + <http://www.gnu.org/licenses/>. */
  125977. /* This test case checks more than standard compliance. An
  125978. implementation may provide this service but it is not required to
  125979. diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock4.c uClibc-git/test/nptl/tst-rwlock4.c
  125980. --- uClibc-0.9.33.2/test/nptl/tst-rwlock4.c 2012-05-15 09:20:09.000000000 +0200
  125981. +++ uClibc-git/test/nptl/tst-rwlock4.c 2014-07-25 20:36:11.589359741 +0200
  125982. @@ -13,9 +13,8 @@
  125983. Lesser General Public License for more details.
  125984. You should have received a copy of the GNU Lesser General Public
  125985. - License along with the GNU C Library; if not, write to the Free
  125986. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  125987. - 02111-1307 USA. */
  125988. + License along with the GNU C Library; if not, see
  125989. + <http://www.gnu.org/licenses/>. */
  125990. #include <errno.h>
  125991. #include <pthread.h>
  125992. diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock5.c uClibc-git/test/nptl/tst-rwlock5.c
  125993. --- uClibc-0.9.33.2/test/nptl/tst-rwlock5.c 2012-05-15 09:20:09.000000000 +0200
  125994. +++ uClibc-git/test/nptl/tst-rwlock5.c 2014-07-25 20:36:11.589359741 +0200
  125995. @@ -13,9 +13,8 @@
  125996. Lesser General Public License for more details.
  125997. You should have received a copy of the GNU Lesser General Public
  125998. - License along with the GNU C Library; if not, write to the Free
  125999. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126000. - 02111-1307 USA. */
  126001. + License along with the GNU C Library; if not, see
  126002. + <http://www.gnu.org/licenses/>. */
  126003. #include <pthread.h>
  126004. #include <signal.h>
  126005. diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock6.c uClibc-git/test/nptl/tst-rwlock6.c
  126006. --- uClibc-0.9.33.2/test/nptl/tst-rwlock6.c 2012-05-15 09:20:09.000000000 +0200
  126007. +++ uClibc-git/test/nptl/tst-rwlock6.c 2014-07-25 20:36:11.589359741 +0200
  126008. @@ -13,9 +13,8 @@
  126009. Lesser General Public License for more details.
  126010. You should have received a copy of the GNU Lesser General Public
  126011. - License along with the GNU C Library; if not, write to the Free
  126012. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126013. - 02111-1307 USA. */
  126014. + License along with the GNU C Library; if not, see
  126015. + <http://www.gnu.org/licenses/>. */
  126016. #include <errno.h>
  126017. #include <pthread.h>
  126018. diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock7.c uClibc-git/test/nptl/tst-rwlock7.c
  126019. --- uClibc-0.9.33.2/test/nptl/tst-rwlock7.c 2012-05-15 09:20:09.000000000 +0200
  126020. +++ uClibc-git/test/nptl/tst-rwlock7.c 2014-07-25 20:36:11.589359741 +0200
  126021. @@ -13,9 +13,8 @@
  126022. Lesser General Public License for more details.
  126023. You should have received a copy of the GNU Lesser General Public
  126024. - License along with the GNU C Library; if not, write to the Free
  126025. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126026. - 02111-1307 USA. */
  126027. + License along with the GNU C Library; if not, see
  126028. + <http://www.gnu.org/licenses/>. */
  126029. #include <errno.h>
  126030. #include <pthread.h>
  126031. diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock8.c uClibc-git/test/nptl/tst-rwlock8.c
  126032. --- uClibc-0.9.33.2/test/nptl/tst-rwlock8.c 2012-05-15 09:20:09.000000000 +0200
  126033. +++ uClibc-git/test/nptl/tst-rwlock8.c 2014-07-25 20:36:11.589359741 +0200
  126034. @@ -13,9 +13,8 @@
  126035. Lesser General Public License for more details.
  126036. You should have received a copy of the GNU Lesser General Public
  126037. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  126038. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  126039. - Boston, MA 02111-1307, USA. */
  126040. + License along with the GNU C Library; see the file COPYING.LIB. If
  126041. + not, see <http://www.gnu.org/licenses/>. */
  126042. #include <errno.h>
  126043. #include <error.h>
  126044. diff -Nur uClibc-0.9.33.2/test/nptl/tst-rwlock9.c uClibc-git/test/nptl/tst-rwlock9.c
  126045. --- uClibc-0.9.33.2/test/nptl/tst-rwlock9.c 2012-05-15 09:20:09.000000000 +0200
  126046. +++ uClibc-git/test/nptl/tst-rwlock9.c 2014-07-25 20:36:11.589359741 +0200
  126047. @@ -13,9 +13,8 @@
  126048. Lesser General Public License for more details.
  126049. You should have received a copy of the GNU Lesser General Public
  126050. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  126051. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  126052. - Boston, MA 02111-1307, USA. */
  126053. + License along with the GNU C Library; see the file COPYING.LIB. If
  126054. + not, see <http://www.gnu.org/licenses/>. */
  126055. #include <errno.h>
  126056. #include <error.h>
  126057. diff -Nur uClibc-0.9.33.2/test/nptl/tst-sched1.c uClibc-git/test/nptl/tst-sched1.c
  126058. --- uClibc-0.9.33.2/test/nptl/tst-sched1.c 2012-05-15 09:20:09.000000000 +0200
  126059. +++ uClibc-git/test/nptl/tst-sched1.c 2014-07-25 20:36:11.589359741 +0200
  126060. @@ -13,9 +13,8 @@
  126061. Lesser General Public License for more details.
  126062. You should have received a copy of the GNU Lesser General Public
  126063. - License along with the GNU C Library; if not, write to the Free
  126064. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126065. - 02111-1307 USA. */
  126066. + License along with the GNU C Library; if not, see
  126067. + <http://www.gnu.org/licenses/>. */
  126068. #include <pthread.h>
  126069. #include <stdio.h>
  126070. diff -Nur uClibc-0.9.33.2/test/nptl/tst-sem10.c uClibc-git/test/nptl/tst-sem10.c
  126071. --- uClibc-0.9.33.2/test/nptl/tst-sem10.c 2012-05-15 09:20:09.000000000 +0200
  126072. +++ uClibc-git/test/nptl/tst-sem10.c 2014-07-25 20:36:11.589359741 +0200
  126073. @@ -13,9 +13,8 @@
  126074. Lesser General Public License for more details.
  126075. You should have received a copy of the GNU Lesser General Public
  126076. - License along with the GNU C Library; if not, write to the Free
  126077. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126078. - 02111-1307 USA. */
  126079. + License along with the GNU C Library; if not, see
  126080. + <http://www.gnu.org/licenses/>. */
  126081. #include <errno.h>
  126082. #include <pthread.h>
  126083. diff -Nur uClibc-0.9.33.2/test/nptl/tst-sem1.c uClibc-git/test/nptl/tst-sem1.c
  126084. --- uClibc-0.9.33.2/test/nptl/tst-sem1.c 2012-05-15 09:20:09.000000000 +0200
  126085. +++ uClibc-git/test/nptl/tst-sem1.c 2014-07-25 20:36:11.589359741 +0200
  126086. @@ -13,9 +13,8 @@
  126087. Lesser General Public License for more details.
  126088. You should have received a copy of the GNU Lesser General Public
  126089. - License along with the GNU C Library; if not, write to the Free
  126090. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126091. - 02111-1307 USA. */
  126092. + License along with the GNU C Library; if not, see
  126093. + <http://www.gnu.org/licenses/>. */
  126094. #include <errno.h>
  126095. #include <semaphore.h>
  126096. diff -Nur uClibc-0.9.33.2/test/nptl/tst-sem2.c uClibc-git/test/nptl/tst-sem2.c
  126097. --- uClibc-0.9.33.2/test/nptl/tst-sem2.c 2012-05-15 09:20:09.000000000 +0200
  126098. +++ uClibc-git/test/nptl/tst-sem2.c 2014-07-25 20:36:11.589359741 +0200
  126099. @@ -13,9 +13,8 @@
  126100. Lesser General Public License for more details.
  126101. You should have received a copy of the GNU Lesser General Public
  126102. - License along with the GNU C Library; if not, write to the Free
  126103. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126104. - 02111-1307 USA. */
  126105. + License along with the GNU C Library; if not, see
  126106. + <http://www.gnu.org/licenses/>. */
  126107. #include <errno.h>
  126108. #include <semaphore.h>
  126109. diff -Nur uClibc-0.9.33.2/test/nptl/tst-sem3.c uClibc-git/test/nptl/tst-sem3.c
  126110. --- uClibc-0.9.33.2/test/nptl/tst-sem3.c 2012-05-15 09:20:09.000000000 +0200
  126111. +++ uClibc-git/test/nptl/tst-sem3.c 2014-07-25 20:36:11.589359741 +0200
  126112. @@ -13,9 +13,8 @@
  126113. Lesser General Public License for more details.
  126114. You should have received a copy of the GNU Lesser General Public
  126115. - License along with the GNU C Library; if not, write to the Free
  126116. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126117. - 02111-1307 USA. */
  126118. + License along with the GNU C Library; if not, see
  126119. + <http://www.gnu.org/licenses/>. */
  126120. #include <errno.h>
  126121. #include <semaphore.h>
  126122. diff -Nur uClibc-0.9.33.2/test/nptl/tst-sem4.c uClibc-git/test/nptl/tst-sem4.c
  126123. --- uClibc-0.9.33.2/test/nptl/tst-sem4.c 2012-05-15 09:20:09.000000000 +0200
  126124. +++ uClibc-git/test/nptl/tst-sem4.c 2014-07-25 20:36:11.589359741 +0200
  126125. @@ -13,9 +13,8 @@
  126126. Lesser General Public License for more details.
  126127. You should have received a copy of the GNU Lesser General Public
  126128. - License along with the GNU C Library; if not, write to the Free
  126129. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126130. - 02111-1307 USA. */
  126131. + License along with the GNU C Library; if not, see
  126132. + <http://www.gnu.org/licenses/>. */
  126133. #include <errno.h>
  126134. #include <fcntl.h>
  126135. diff -Nur uClibc-0.9.33.2/test/nptl/tst-sem5.c uClibc-git/test/nptl/tst-sem5.c
  126136. --- uClibc-0.9.33.2/test/nptl/tst-sem5.c 2012-05-15 09:20:09.000000000 +0200
  126137. +++ uClibc-git/test/nptl/tst-sem5.c 2014-07-25 20:36:11.589359741 +0200
  126138. @@ -13,9 +13,8 @@
  126139. Lesser General Public License for more details.
  126140. You should have received a copy of the GNU Lesser General Public
  126141. - License along with the GNU C Library; if not, write to the Free
  126142. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126143. - 02111-1307 USA. */
  126144. + License along with the GNU C Library; if not, see
  126145. + <http://www.gnu.org/licenses/>. */
  126146. #include <errno.h>
  126147. #include <semaphore.h>
  126148. diff -Nur uClibc-0.9.33.2/test/nptl/tst-sem6.c uClibc-git/test/nptl/tst-sem6.c
  126149. --- uClibc-0.9.33.2/test/nptl/tst-sem6.c 2012-05-15 09:20:09.000000000 +0200
  126150. +++ uClibc-git/test/nptl/tst-sem6.c 2014-07-25 20:36:11.589359741 +0200
  126151. @@ -13,9 +13,8 @@
  126152. Lesser General Public License for more details.
  126153. You should have received a copy of the GNU Lesser General Public
  126154. - License along with the GNU C Library; if not, write to the Free
  126155. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126156. - 02111-1307 USA. */
  126157. + License along with the GNU C Library; if not, see
  126158. + <http://www.gnu.org/licenses/>. */
  126159. #include <errno.h>
  126160. #include <semaphore.h>
  126161. diff -Nur uClibc-0.9.33.2/test/nptl/tst-sem7.c uClibc-git/test/nptl/tst-sem7.c
  126162. --- uClibc-0.9.33.2/test/nptl/tst-sem7.c 2012-05-15 09:20:09.000000000 +0200
  126163. +++ uClibc-git/test/nptl/tst-sem7.c 2014-07-25 20:36:11.589359741 +0200
  126164. @@ -13,9 +13,8 @@
  126165. Lesser General Public License for more details.
  126166. You should have received a copy of the GNU Lesser General Public
  126167. - License along with the GNU C Library; if not, write to the Free
  126168. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126169. - 02111-1307 USA. */
  126170. + License along with the GNU C Library; if not, see
  126171. + <http://www.gnu.org/licenses/>. */
  126172. #include <errno.h>
  126173. #include <fcntl.h>
  126174. diff -Nur uClibc-0.9.33.2/test/nptl/tst-sem8.c uClibc-git/test/nptl/tst-sem8.c
  126175. --- uClibc-0.9.33.2/test/nptl/tst-sem8.c 2012-05-15 09:20:09.000000000 +0200
  126176. +++ uClibc-git/test/nptl/tst-sem8.c 2014-07-25 20:36:11.589359741 +0200
  126177. @@ -13,9 +13,8 @@
  126178. Lesser General Public License for more details.
  126179. You should have received a copy of the GNU Lesser General Public
  126180. - License along with the GNU C Library; if not, write to the Free
  126181. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126182. - 02111-1307 USA. */
  126183. + License along with the GNU C Library; if not, see
  126184. + <http://www.gnu.org/licenses/>. */
  126185. #include <errno.h>
  126186. #include <fcntl.h>
  126187. diff -Nur uClibc-0.9.33.2/test/nptl/tst-sem9.c uClibc-git/test/nptl/tst-sem9.c
  126188. --- uClibc-0.9.33.2/test/nptl/tst-sem9.c 2012-05-15 09:20:09.000000000 +0200
  126189. +++ uClibc-git/test/nptl/tst-sem9.c 2014-07-25 20:36:11.589359741 +0200
  126190. @@ -13,9 +13,8 @@
  126191. Lesser General Public License for more details.
  126192. You should have received a copy of the GNU Lesser General Public
  126193. - License along with the GNU C Library; if not, write to the Free
  126194. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126195. - 02111-1307 USA. */
  126196. + License along with the GNU C Library; if not, see
  126197. + <http://www.gnu.org/licenses/>. */
  126198. #include <errno.h>
  126199. #include <fcntl.h>
  126200. diff -Nur uClibc-0.9.33.2/test/nptl/tst-signal1.c uClibc-git/test/nptl/tst-signal1.c
  126201. --- uClibc-0.9.33.2/test/nptl/tst-signal1.c 2012-05-15 09:20:09.000000000 +0200
  126202. +++ uClibc-git/test/nptl/tst-signal1.c 2014-07-25 20:36:11.589359741 +0200
  126203. @@ -13,9 +13,8 @@
  126204. Lesser General Public License for more details.
  126205. You should have received a copy of the GNU Lesser General Public
  126206. - License along with the GNU C Library; if not, write to the Free
  126207. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126208. - 02111-1307 USA. */
  126209. + License along with the GNU C Library; if not, see
  126210. + <http://www.gnu.org/licenses/>. */
  126211. #include <errno.h>
  126212. #include <pthread.h>
  126213. diff -Nur uClibc-0.9.33.2/test/nptl/tst-signal2.c uClibc-git/test/nptl/tst-signal2.c
  126214. --- uClibc-0.9.33.2/test/nptl/tst-signal2.c 2012-05-15 09:20:09.000000000 +0200
  126215. +++ uClibc-git/test/nptl/tst-signal2.c 2014-07-25 20:36:11.589359741 +0200
  126216. @@ -13,9 +13,8 @@
  126217. Lesser General Public License for more details.
  126218. You should have received a copy of the GNU Lesser General Public
  126219. - License along with the GNU C Library; if not, write to the Free
  126220. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126221. - 02111-1307 USA. */
  126222. + License along with the GNU C Library; if not, see
  126223. + <http://www.gnu.org/licenses/>. */
  126224. #include <errno.h>
  126225. #include <pthread.h>
  126226. diff -Nur uClibc-0.9.33.2/test/nptl/tst-signal3.c uClibc-git/test/nptl/tst-signal3.c
  126227. --- uClibc-0.9.33.2/test/nptl/tst-signal3.c 2012-05-15 09:20:09.000000000 +0200
  126228. +++ uClibc-git/test/nptl/tst-signal3.c 2014-07-25 20:36:11.589359741 +0200
  126229. @@ -13,9 +13,8 @@
  126230. Lesser General Public License for more details.
  126231. You should have received a copy of the GNU Lesser General Public
  126232. - License along with the GNU C Library; if not, write to the Free
  126233. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126234. - 02111-1307 USA. */
  126235. + License along with the GNU C Library; if not, see
  126236. + <http://www.gnu.org/licenses/>. */
  126237. #include <errno.h>
  126238. #include <pthread.h>
  126239. diff -Nur uClibc-0.9.33.2/test/nptl/tst-signal4.c uClibc-git/test/nptl/tst-signal4.c
  126240. --- uClibc-0.9.33.2/test/nptl/tst-signal4.c 2012-05-15 09:20:09.000000000 +0200
  126241. +++ uClibc-git/test/nptl/tst-signal4.c 2014-07-25 20:36:11.589359741 +0200
  126242. @@ -13,9 +13,8 @@
  126243. Lesser General Public License for more details.
  126244. You should have received a copy of the GNU Lesser General Public
  126245. - License along with the GNU C Library; if not, write to the Free
  126246. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126247. - 02111-1307 USA. */
  126248. + License along with the GNU C Library; if not, see
  126249. + <http://www.gnu.org/licenses/>. */
  126250. #include <errno.h>
  126251. #include <pthread.h>
  126252. diff -Nur uClibc-0.9.33.2/test/nptl/tst-signal5.c uClibc-git/test/nptl/tst-signal5.c
  126253. --- uClibc-0.9.33.2/test/nptl/tst-signal5.c 2012-05-15 09:20:09.000000000 +0200
  126254. +++ uClibc-git/test/nptl/tst-signal5.c 2014-07-25 20:36:11.589359741 +0200
  126255. @@ -13,9 +13,8 @@
  126256. Lesser General Public License for more details.
  126257. You should have received a copy of the GNU Lesser General Public
  126258. - License along with the GNU C Library; if not, write to the Free
  126259. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126260. - 02111-1307 USA. */
  126261. + License along with the GNU C Library; if not, see
  126262. + <http://www.gnu.org/licenses/>. */
  126263. #include <errno.h>
  126264. #include <pthread.h>
  126265. diff -Nur uClibc-0.9.33.2/test/nptl/tst-signal6.c uClibc-git/test/nptl/tst-signal6.c
  126266. --- uClibc-0.9.33.2/test/nptl/tst-signal6.c 2012-05-15 09:20:09.000000000 +0200
  126267. +++ uClibc-git/test/nptl/tst-signal6.c 2014-07-25 20:36:11.589359741 +0200
  126268. @@ -13,9 +13,8 @@
  126269. Lesser General Public License for more details.
  126270. You should have received a copy of the GNU Lesser General Public
  126271. - License along with the GNU C Library; if not, write to the Free
  126272. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126273. - 02111-1307 USA. */
  126274. + License along with the GNU C Library; if not, see
  126275. + <http://www.gnu.org/licenses/>. */
  126276. #include <pthread.h>
  126277. #include <signal.h>
  126278. diff -Nur uClibc-0.9.33.2/test/nptl/tst-signal7.c uClibc-git/test/nptl/tst-signal7.c
  126279. --- uClibc-0.9.33.2/test/nptl/tst-signal7.c 2012-05-15 09:20:09.000000000 +0200
  126280. +++ uClibc-git/test/nptl/tst-signal7.c 2014-07-25 20:36:11.589359741 +0200
  126281. @@ -13,9 +13,8 @@
  126282. Lesser General Public License for more details.
  126283. You should have received a copy of the GNU Lesser General Public
  126284. - License along with the GNU C Library; if not, write to the Free
  126285. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126286. - 02111-1307 USA. */
  126287. + License along with the GNU C Library; if not, see
  126288. + <http://www.gnu.org/licenses/>. */
  126289. #include <errno.h>
  126290. #include <pthreadP.h>
  126291. diff -Nur uClibc-0.9.33.2/test/nptl/tst-spin1.c uClibc-git/test/nptl/tst-spin1.c
  126292. --- uClibc-0.9.33.2/test/nptl/tst-spin1.c 2012-05-15 09:20:09.000000000 +0200
  126293. +++ uClibc-git/test/nptl/tst-spin1.c 2014-07-25 20:36:11.589359741 +0200
  126294. @@ -13,9 +13,8 @@
  126295. Lesser General Public License for more details.
  126296. You should have received a copy of the GNU Lesser General Public
  126297. - License along with the GNU C Library; if not, write to the Free
  126298. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126299. - 02111-1307 USA. */
  126300. + License along with the GNU C Library; if not, see
  126301. + <http://www.gnu.org/licenses/>. */
  126302. #include <pthread.h>
  126303. #include <stdio.h>
  126304. diff -Nur uClibc-0.9.33.2/test/nptl/tst-spin2.c uClibc-git/test/nptl/tst-spin2.c
  126305. --- uClibc-0.9.33.2/test/nptl/tst-spin2.c 2012-05-15 09:20:09.000000000 +0200
  126306. +++ uClibc-git/test/nptl/tst-spin2.c 2014-07-25 20:36:11.589359741 +0200
  126307. @@ -13,9 +13,8 @@
  126308. Lesser General Public License for more details.
  126309. You should have received a copy of the GNU Lesser General Public
  126310. - License along with the GNU C Library; if not, write to the Free
  126311. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126312. - 02111-1307 USA. */
  126313. + License along with the GNU C Library; if not, see
  126314. + <http://www.gnu.org/licenses/>. */
  126315. #include <errno.h>
  126316. #include <pthread.h>
  126317. diff -Nur uClibc-0.9.33.2/test/nptl/tst-spin3.c uClibc-git/test/nptl/tst-spin3.c
  126318. --- uClibc-0.9.33.2/test/nptl/tst-spin3.c 2012-05-15 09:20:09.000000000 +0200
  126319. +++ uClibc-git/test/nptl/tst-spin3.c 2014-07-25 20:36:11.589359741 +0200
  126320. @@ -13,9 +13,8 @@
  126321. Lesser General Public License for more details.
  126322. You should have received a copy of the GNU Lesser General Public
  126323. - License along with the GNU C Library; if not, write to the Free
  126324. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126325. - 02111-1307 USA. */
  126326. + License along with the GNU C Library; if not, see
  126327. + <http://www.gnu.org/licenses/>. */
  126328. #include <pthread.h>
  126329. #include <signal.h>
  126330. diff -Nur uClibc-0.9.33.2/test/nptl/tst-stack1.c uClibc-git/test/nptl/tst-stack1.c
  126331. --- uClibc-0.9.33.2/test/nptl/tst-stack1.c 2012-05-15 09:20:09.000000000 +0200
  126332. +++ uClibc-git/test/nptl/tst-stack1.c 2014-07-25 20:36:11.589359741 +0200
  126333. @@ -13,9 +13,8 @@
  126334. Lesser General Public License for more details.
  126335. You should have received a copy of the GNU Lesser General Public
  126336. - License along with the GNU C Library; if not, write to the Free
  126337. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126338. - 02111-1307 USA. */
  126339. + License along with the GNU C Library; if not, see
  126340. + <http://www.gnu.org/licenses/>. */
  126341. #include <limits.h>
  126342. #include <pthread.h>
  126343. diff -Nur uClibc-0.9.33.2/test/nptl/tst-stack2.c uClibc-git/test/nptl/tst-stack2.c
  126344. --- uClibc-0.9.33.2/test/nptl/tst-stack2.c 2012-05-15 09:20:09.000000000 +0200
  126345. +++ uClibc-git/test/nptl/tst-stack2.c 2014-07-25 20:36:11.589359741 +0200
  126346. @@ -13,9 +13,8 @@
  126347. Lesser General Public License for more details.
  126348. You should have received a copy of the GNU Lesser General Public
  126349. - License along with the GNU C Library; if not, write to the Free
  126350. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126351. - 02111-1307 USA. */
  126352. + License along with the GNU C Library; if not, see
  126353. + <http://www.gnu.org/licenses/>. */
  126354. /* Test whether it is possible to create a thread with PTHREAD_STACK_MIN
  126355. stack size. */
  126356. diff -Nur uClibc-0.9.33.2/test/nptl/tst-stack-align.h uClibc-git/test/nptl/tst-stack-align.h
  126357. --- uClibc-0.9.33.2/test/nptl/tst-stack-align.h 2012-05-15 09:20:09.000000000 +0200
  126358. +++ uClibc-git/test/nptl/tst-stack-align.h 2014-07-25 20:36:11.589359741 +0200
  126359. @@ -12,9 +12,8 @@
  126360. Lesser General Public License for more details.
  126361. You should have received a copy of the GNU Lesser General Public
  126362. - License along with the GNU C Library; if not, write to the Free
  126363. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126364. - 02111-1307 USA. */
  126365. + License along with the GNU C Library; if not, see
  126366. + <http://www.gnu.org/licenses/>. */
  126367. #include <stdio.h>
  126368. #include <stdint.h>
  126369. diff -Nur uClibc-0.9.33.2/test/nptl/tst-stdio1.c uClibc-git/test/nptl/tst-stdio1.c
  126370. --- uClibc-0.9.33.2/test/nptl/tst-stdio1.c 2012-05-15 09:20:09.000000000 +0200
  126371. +++ uClibc-git/test/nptl/tst-stdio1.c 2014-07-25 20:36:11.589359741 +0200
  126372. @@ -13,9 +13,8 @@
  126373. Lesser General Public License for more details.
  126374. You should have received a copy of the GNU Lesser General Public
  126375. - License along with the GNU C Library; if not, write to the Free
  126376. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126377. - 02111-1307 USA. */
  126378. + License along with the GNU C Library; if not, see
  126379. + <http://www.gnu.org/licenses/>. */
  126380. #include <pthread.h>
  126381. #include <signal.h>
  126382. diff -Nur uClibc-0.9.33.2/test/nptl/tst-stdio2.c uClibc-git/test/nptl/tst-stdio2.c
  126383. --- uClibc-0.9.33.2/test/nptl/tst-stdio2.c 2012-05-15 09:20:09.000000000 +0200
  126384. +++ uClibc-git/test/nptl/tst-stdio2.c 2014-07-25 20:36:11.589359741 +0200
  126385. @@ -13,9 +13,8 @@
  126386. Lesser General Public License for more details.
  126387. You should have received a copy of the GNU Lesser General Public
  126388. - License along with the GNU C Library; if not, write to the Free
  126389. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126390. - 02111-1307 USA. */
  126391. + License along with the GNU C Library; if not, see
  126392. + <http://www.gnu.org/licenses/>. */
  126393. #include <pthread.h>
  126394. #include <signal.h>
  126395. diff -Nur uClibc-0.9.33.2/test/nptl/tst-sysconf.c uClibc-git/test/nptl/tst-sysconf.c
  126396. --- uClibc-0.9.33.2/test/nptl/tst-sysconf.c 2012-05-15 09:20:09.000000000 +0200
  126397. +++ uClibc-git/test/nptl/tst-sysconf.c 2014-07-25 20:36:11.589359741 +0200
  126398. @@ -13,9 +13,8 @@
  126399. Lesser General Public License for more details.
  126400. You should have received a copy of the GNU Lesser General Public
  126401. - License along with the GNU C Library; if not, write to the Free
  126402. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126403. - 02111-1307 USA. */
  126404. + License along with the GNU C Library; if not, see
  126405. + <http://www.gnu.org/licenses/>. */
  126406. #include <pthread.h>
  126407. #include <stdio.h>
  126408. diff -Nur uClibc-0.9.33.2/test/nptl/tst-timer4.c uClibc-git/test/nptl/tst-timer4.c
  126409. --- uClibc-0.9.33.2/test/nptl/tst-timer4.c 2012-05-15 09:20:09.000000000 +0200
  126410. +++ uClibc-git/test/nptl/tst-timer4.c 2014-07-25 20:36:11.593359762 +0200
  126411. @@ -14,9 +14,8 @@
  126412. Lesser General Public License for more details.
  126413. You should have received a copy of the GNU Lesser General Public
  126414. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  126415. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  126416. - Boston, MA 02111-1307, USA. */
  126417. + License along with the GNU C Library; see the file COPYING.LIB. If
  126418. + not, see <http://www.gnu.org/licenses/>. */
  126419. #include <errno.h>
  126420. #include <signal.h>
  126421. diff -Nur uClibc-0.9.33.2/test/nptl/tst-tls1.c uClibc-git/test/nptl/tst-tls1.c
  126422. --- uClibc-0.9.33.2/test/nptl/tst-tls1.c 2012-05-15 09:20:09.000000000 +0200
  126423. +++ uClibc-git/test/nptl/tst-tls1.c 2014-07-25 20:36:11.593359762 +0200
  126424. @@ -13,9 +13,8 @@
  126425. Lesser General Public License for more details.
  126426. You should have received a copy of the GNU Lesser General Public
  126427. - License along with the GNU C Library; if not, write to the Free
  126428. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126429. - 02111-1307 USA. */
  126430. + License along with the GNU C Library; if not, see
  126431. + <http://www.gnu.org/licenses/>. */
  126432. #include <pthread.h>
  126433. #include <stdio.h>
  126434. diff -Nur uClibc-0.9.33.2/test/nptl/tst-tls2.c uClibc-git/test/nptl/tst-tls2.c
  126435. --- uClibc-0.9.33.2/test/nptl/tst-tls2.c 2012-05-15 09:20:09.000000000 +0200
  126436. +++ uClibc-git/test/nptl/tst-tls2.c 2014-07-25 20:36:11.593359762 +0200
  126437. @@ -13,9 +13,8 @@
  126438. Lesser General Public License for more details.
  126439. You should have received a copy of the GNU Lesser General Public
  126440. - License along with the GNU C Library; if not, write to the Free
  126441. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126442. - 02111-1307 USA. */
  126443. + License along with the GNU C Library; if not, see
  126444. + <http://www.gnu.org/licenses/>. */
  126445. #include <errno.h>
  126446. #include <pthread.h>
  126447. diff -Nur uClibc-0.9.33.2/test/nptl/tst-tls3.c uClibc-git/test/nptl/tst-tls3.c
  126448. --- uClibc-0.9.33.2/test/nptl/tst-tls3.c 2012-05-15 09:20:09.000000000 +0200
  126449. +++ uClibc-git/test/nptl/tst-tls3.c 2014-07-25 20:36:11.593359762 +0200
  126450. @@ -13,9 +13,8 @@
  126451. Lesser General Public License for more details.
  126452. You should have received a copy of the GNU Lesser General Public
  126453. - License along with the GNU C Library; if not, write to the Free
  126454. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126455. - 02111-1307 USA. */
  126456. + License along with the GNU C Library; if not, see
  126457. + <http://www.gnu.org/licenses/>. */
  126458. #include <dlfcn.h>
  126459. #include <errno.h>
  126460. diff -Nur uClibc-0.9.33.2/test/nptl/tst-tls3mod.c uClibc-git/test/nptl/tst-tls3mod.c
  126461. --- uClibc-0.9.33.2/test/nptl/tst-tls3mod.c 2012-05-15 09:20:09.000000000 +0200
  126462. +++ uClibc-git/test/nptl/tst-tls3mod.c 2014-07-25 20:36:11.593359762 +0200
  126463. @@ -13,9 +13,8 @@
  126464. Lesser General Public License for more details.
  126465. You should have received a copy of the GNU Lesser General Public
  126466. - License along with the GNU C Library; if not, write to the Free
  126467. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126468. - 02111-1307 USA. */
  126469. + License along with the GNU C Library; if not, see
  126470. + <http://www.gnu.org/licenses/>. */
  126471. #include <pthread.h>
  126472. #include <semaphore.h>
  126473. diff -Nur uClibc-0.9.33.2/test/nptl/tst-tls4.c uClibc-git/test/nptl/tst-tls4.c
  126474. --- uClibc-0.9.33.2/test/nptl/tst-tls4.c 2012-05-15 09:20:09.000000000 +0200
  126475. +++ uClibc-git/test/nptl/tst-tls4.c 2014-07-25 20:36:11.593359762 +0200
  126476. @@ -13,9 +13,8 @@
  126477. Lesser General Public License for more details.
  126478. You should have received a copy of the GNU Lesser General Public
  126479. - License along with the GNU C Library; if not, write to the Free
  126480. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126481. - 02111-1307 USA. */
  126482. + License along with the GNU C Library; if not, see
  126483. + <http://www.gnu.org/licenses/>. */
  126484. #include <dlfcn.h>
  126485. #include <errno.h>
  126486. diff -Nur uClibc-0.9.33.2/test/nptl/tst-tls4moda.c uClibc-git/test/nptl/tst-tls4moda.c
  126487. --- uClibc-0.9.33.2/test/nptl/tst-tls4moda.c 2012-05-15 09:20:09.000000000 +0200
  126488. +++ uClibc-git/test/nptl/tst-tls4moda.c 2014-07-25 20:36:11.593359762 +0200
  126489. @@ -13,9 +13,8 @@
  126490. Lesser General Public License for more details.
  126491. You should have received a copy of the GNU Lesser General Public
  126492. - License along with the GNU C Library; if not, write to the Free
  126493. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126494. - 02111-1307 USA. */
  126495. + License along with the GNU C Library; if not, see
  126496. + <http://www.gnu.org/licenses/>. */
  126497. #include <stdio.h>
  126498. #include <stdlib.h>
  126499. diff -Nur uClibc-0.9.33.2/test/nptl/tst-tls4modb.c uClibc-git/test/nptl/tst-tls4modb.c
  126500. --- uClibc-0.9.33.2/test/nptl/tst-tls4modb.c 2012-05-15 09:20:09.000000000 +0200
  126501. +++ uClibc-git/test/nptl/tst-tls4modb.c 2014-07-25 20:36:11.593359762 +0200
  126502. @@ -13,9 +13,8 @@
  126503. Lesser General Public License for more details.
  126504. You should have received a copy of the GNU Lesser General Public
  126505. - License along with the GNU C Library; if not, write to the Free
  126506. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126507. - 02111-1307 USA. */
  126508. + License along with the GNU C Library; if not, see
  126509. + <http://www.gnu.org/licenses/>. */
  126510. #include <stdio.h>
  126511. #include <stdlib.h>
  126512. diff -Nur uClibc-0.9.33.2/test/nptl/tst-tls5.c uClibc-git/test/nptl/tst-tls5.c
  126513. --- uClibc-0.9.33.2/test/nptl/tst-tls5.c 2012-05-15 09:20:09.000000000 +0200
  126514. +++ uClibc-git/test/nptl/tst-tls5.c 2014-07-25 20:36:11.593359762 +0200
  126515. @@ -13,9 +13,8 @@
  126516. Lesser General Public License for more details.
  126517. You should have received a copy of the GNU Lesser General Public
  126518. - License along with the GNU C Library; if not, write to the Free
  126519. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126520. - 02111-1307 USA. */
  126521. + License along with the GNU C Library; if not, see
  126522. + <http://www.gnu.org/licenses/>. */
  126523. /* Check alignment, overlapping and layout of TLS variables. */
  126524. #include <stdint.h>
  126525. diff -Nur uClibc-0.9.33.2/test/nptl/tst-tsd1.c uClibc-git/test/nptl/tst-tsd1.c
  126526. --- uClibc-0.9.33.2/test/nptl/tst-tsd1.c 2012-05-15 09:20:09.000000000 +0200
  126527. +++ uClibc-git/test/nptl/tst-tsd1.c 2014-07-25 20:36:11.593359762 +0200
  126528. @@ -13,9 +13,8 @@
  126529. Lesser General Public License for more details.
  126530. You should have received a copy of the GNU Lesser General Public
  126531. - License along with the GNU C Library; if not, write to the Free
  126532. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126533. - 02111-1307 USA. */
  126534. + License along with the GNU C Library; if not, see
  126535. + <http://www.gnu.org/licenses/>. */
  126536. #include <pthread.h>
  126537. #include <stdio.h>
  126538. diff -Nur uClibc-0.9.33.2/test/nptl/tst-tsd2.c uClibc-git/test/nptl/tst-tsd2.c
  126539. --- uClibc-0.9.33.2/test/nptl/tst-tsd2.c 2012-05-15 09:20:09.000000000 +0200
  126540. +++ uClibc-git/test/nptl/tst-tsd2.c 2014-07-25 20:36:11.593359762 +0200
  126541. @@ -13,9 +13,8 @@
  126542. Lesser General Public License for more details.
  126543. You should have received a copy of the GNU Lesser General Public
  126544. - License along with the GNU C Library; if not, write to the Free
  126545. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126546. - 02111-1307 USA. */
  126547. + License along with the GNU C Library; if not, see
  126548. + <http://www.gnu.org/licenses/>. */
  126549. #include <pthread.h>
  126550. #include <stdio.h>
  126551. diff -Nur uClibc-0.9.33.2/test/nptl/tst-tsd3.c uClibc-git/test/nptl/tst-tsd3.c
  126552. --- uClibc-0.9.33.2/test/nptl/tst-tsd3.c 2012-05-15 09:20:09.000000000 +0200
  126553. +++ uClibc-git/test/nptl/tst-tsd3.c 2014-07-25 20:36:11.593359762 +0200
  126554. @@ -13,9 +13,8 @@
  126555. Lesser General Public License for more details.
  126556. You should have received a copy of the GNU Lesser General Public
  126557. - License along with the GNU C Library; if not, write to the Free
  126558. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126559. - 02111-1307 USA. */
  126560. + License along with the GNU C Library; if not, see
  126561. + <http://www.gnu.org/licenses/>. */
  126562. #include <limits.h>
  126563. #include <pthread.h>
  126564. diff -Nur uClibc-0.9.33.2/test/nptl/tst-tsd4.c uClibc-git/test/nptl/tst-tsd4.c
  126565. --- uClibc-0.9.33.2/test/nptl/tst-tsd4.c 2012-05-15 09:20:09.000000000 +0200
  126566. +++ uClibc-git/test/nptl/tst-tsd4.c 2014-07-25 20:36:11.593359762 +0200
  126567. @@ -13,9 +13,8 @@
  126568. Lesser General Public License for more details.
  126569. You should have received a copy of the GNU Lesser General Public
  126570. - License along with the GNU C Library; if not, write to the Free
  126571. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126572. - 02111-1307 USA. */
  126573. + License along with the GNU C Library; if not, see
  126574. + <http://www.gnu.org/licenses/>. */
  126575. #include <limits.h>
  126576. #include <pthread.h>
  126577. diff -Nur uClibc-0.9.33.2/test/nptl/tst-tsd5.c uClibc-git/test/nptl/tst-tsd5.c
  126578. --- uClibc-0.9.33.2/test/nptl/tst-tsd5.c 2012-05-15 09:20:09.000000000 +0200
  126579. +++ uClibc-git/test/nptl/tst-tsd5.c 2014-07-25 20:36:11.593359762 +0200
  126580. @@ -13,9 +13,8 @@
  126581. Lesser General Public License for more details.
  126582. You should have received a copy of the GNU Lesser General Public
  126583. - License along with the GNU C Library; if not, write to the Free
  126584. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126585. - 02111-1307 USA. */
  126586. + License along with the GNU C Library; if not, see
  126587. + <http://www.gnu.org/licenses/>. */
  126588. #include <pthread.h>
  126589. #include <stdio.h>
  126590. diff -Nur uClibc-0.9.33.2/test/nptl/tst-typesizes.c uClibc-git/test/nptl/tst-typesizes.c
  126591. --- uClibc-0.9.33.2/test/nptl/tst-typesizes.c 2012-05-15 09:20:09.000000000 +0200
  126592. +++ uClibc-git/test/nptl/tst-typesizes.c 2014-07-25 20:36:11.593359762 +0200
  126593. @@ -13,9 +13,8 @@
  126594. Lesser General Public License for more details.
  126595. You should have received a copy of the GNU Lesser General Public
  126596. - License along with the GNU C Library; if not, write to the Free
  126597. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126598. - 02111-1307 USA. */
  126599. + License along with the GNU C Library; if not, see
  126600. + <http://www.gnu.org/licenses/>. */
  126601. #include <stdio.h>
  126602. #include <pthreadP.h>
  126603. diff -Nur uClibc-0.9.33.2/test/nptl/tst-umask1.c uClibc-git/test/nptl/tst-umask1.c
  126604. --- uClibc-0.9.33.2/test/nptl/tst-umask1.c 2012-05-15 09:20:09.000000000 +0200
  126605. +++ uClibc-git/test/nptl/tst-umask1.c 2014-07-25 20:36:11.593359762 +0200
  126606. @@ -13,9 +13,8 @@
  126607. Lesser General Public License for more details.
  126608. You should have received a copy of the GNU Lesser General Public
  126609. - License along with the GNU C Library; if not, write to the Free
  126610. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126611. - 02111-1307 USA. */
  126612. + License along with the GNU C Library; if not, see
  126613. + <http://www.gnu.org/licenses/>. */
  126614. #include <fcntl.h>
  126615. #include <pthread.h>
  126616. diff -Nur uClibc-0.9.33.2/test/nptl/tst-unload.c uClibc-git/test/nptl/tst-unload.c
  126617. --- uClibc-0.9.33.2/test/nptl/tst-unload.c 2012-05-15 09:20:09.000000000 +0200
  126618. +++ uClibc-git/test/nptl/tst-unload.c 2014-07-25 20:36:11.593359762 +0200
  126619. @@ -13,9 +13,8 @@
  126620. Lesser General Public License for more details.
  126621. You should have received a copy of the GNU Lesser General Public
  126622. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  126623. - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  126624. - Boston, MA 02111-1307, USA. */
  126625. + License along with the GNU C Library; see the file COPYING.LIB. If
  126626. + not, see <http://www.gnu.org/licenses/>. */
  126627. #include <dlfcn.h>
  126628. #include <stdio.h>
  126629. diff -Nur uClibc-0.9.33.2/test/nptl/tst-vfork1.c uClibc-git/test/nptl/tst-vfork1.c
  126630. --- uClibc-0.9.33.2/test/nptl/tst-vfork1.c 2012-05-15 09:20:09.000000000 +0200
  126631. +++ uClibc-git/test/nptl/tst-vfork1.c 2014-07-25 20:36:11.593359762 +0200
  126632. @@ -14,9 +14,8 @@
  126633. Lesser General Public License for more details.
  126634. You should have received a copy of the GNU Lesser General Public
  126635. - License along with the GNU C Library; if not, write to the Free
  126636. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126637. - 02111-1307 USA. */
  126638. + License along with the GNU C Library; if not, see
  126639. + <http://www.gnu.org/licenses/>. */
  126640. #include <errno.h>
  126641. #include <stdio.h>
  126642. diff -Nur uClibc-0.9.33.2/test/nptl/tst-vfork1x.c uClibc-git/test/nptl/tst-vfork1x.c
  126643. --- uClibc-0.9.33.2/test/nptl/tst-vfork1x.c 2012-05-15 09:20:09.000000000 +0200
  126644. +++ uClibc-git/test/nptl/tst-vfork1x.c 2014-07-25 20:36:11.593359762 +0200
  126645. @@ -14,9 +14,8 @@
  126646. Lesser General Public License for more details.
  126647. You should have received a copy of the GNU Lesser General Public
  126648. - License along with the GNU C Library; if not, write to the Free
  126649. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126650. - 02111-1307 USA. */
  126651. + License along with the GNU C Library; if not, see
  126652. + <http://www.gnu.org/licenses/>. */
  126653. #include <errno.h>
  126654. #include <stdio.h>
  126655. diff -Nur uClibc-0.9.33.2/test/nptl/tst-vfork2.c uClibc-git/test/nptl/tst-vfork2.c
  126656. --- uClibc-0.9.33.2/test/nptl/tst-vfork2.c 2012-05-15 09:20:09.000000000 +0200
  126657. +++ uClibc-git/test/nptl/tst-vfork2.c 2014-07-25 20:36:11.593359762 +0200
  126658. @@ -14,9 +14,8 @@
  126659. Lesser General Public License for more details.
  126660. You should have received a copy of the GNU Lesser General Public
  126661. - License along with the GNU C Library; if not, write to the Free
  126662. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126663. - 02111-1307 USA. */
  126664. + License along with the GNU C Library; if not, see
  126665. + <http://www.gnu.org/licenses/>. */
  126666. #include <errno.h>
  126667. #include <signal.h>
  126668. diff -Nur uClibc-0.9.33.2/test/nptl/tst-vfork2x.c uClibc-git/test/nptl/tst-vfork2x.c
  126669. --- uClibc-0.9.33.2/test/nptl/tst-vfork2x.c 2012-05-15 09:20:09.000000000 +0200
  126670. +++ uClibc-git/test/nptl/tst-vfork2x.c 2014-07-25 20:36:11.593359762 +0200
  126671. @@ -14,9 +14,8 @@
  126672. Lesser General Public License for more details.
  126673. You should have received a copy of the GNU Lesser General Public
  126674. - License along with the GNU C Library; if not, write to the Free
  126675. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126676. - 02111-1307 USA. */
  126677. + License along with the GNU C Library; if not, see
  126678. + <http://www.gnu.org/licenses/>. */
  126679. #include <errno.h>
  126680. #include <signal.h>
  126681. diff -Nur uClibc-0.9.33.2/test/pthread/Makefile uClibc-git/test/pthread/Makefile
  126682. --- uClibc-0.9.33.2/test/pthread/Makefile 2012-05-15 09:20:09.000000000 +0200
  126683. +++ uClibc-git/test/pthread/Makefile 2014-07-25 20:36:11.621359909 +0200
  126684. @@ -2,6 +2,7 @@
  126685. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  126686. top_builddir=../../
  126687. +top_srcdir=../../
  126688. include ../Rules.mak
  126689. -include Makefile.in
  126690. include ../Test.mak
  126691. diff -Nur uClibc-0.9.33.2/test/pwd_grp/Makefile uClibc-git/test/pwd_grp/Makefile
  126692. --- uClibc-0.9.33.2/test/pwd_grp/Makefile 2012-05-15 09:20:09.000000000 +0200
  126693. +++ uClibc-git/test/pwd_grp/Makefile 2014-07-25 20:36:11.645360034 +0200
  126694. @@ -2,6 +2,7 @@
  126695. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  126696. top_builddir=../../
  126697. +top_srcdir=../../
  126698. include ../Rules.mak
  126699. -include Makefile.in
  126700. include ../Test.mak
  126701. diff -Nur uClibc-0.9.33.2/test/regex/Makefile uClibc-git/test/regex/Makefile
  126702. --- uClibc-0.9.33.2/test/regex/Makefile 2012-05-15 09:20:09.000000000 +0200
  126703. +++ uClibc-git/test/regex/Makefile 2014-07-25 20:36:11.661360118 +0200
  126704. @@ -2,6 +2,7 @@
  126705. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  126706. top_builddir=../../
  126707. +top_srcdir=../../
  126708. include ../Rules.mak
  126709. -include Makefile.in
  126710. include ../Test.mak
  126711. diff -Nur uClibc-0.9.33.2/test/regex/tst-regexloc.c uClibc-git/test/regex/tst-regexloc.c
  126712. --- uClibc-0.9.33.2/test/regex/tst-regexloc.c 2012-05-15 09:20:09.000000000 +0200
  126713. +++ uClibc-git/test/regex/tst-regexloc.c 2014-07-25 20:36:11.661360118 +0200
  126714. @@ -12,9 +12,8 @@
  126715. Lesser General Public License for more details.
  126716. You should have received a copy of the GNU Lesser General Public
  126717. - License along with the GNU C Library; if not, write to the Free
  126718. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126719. - 02111-1307 USA. */
  126720. + License along with the GNU C Library; if not, see
  126721. + <http://www.gnu.org/licenses/>. */
  126722. #include <sys/types.h>
  126723. #include <regex.h>
  126724. diff -Nur uClibc-0.9.33.2/test/rpc/Makefile uClibc-git/test/rpc/Makefile
  126725. --- uClibc-0.9.33.2/test/rpc/Makefile 2012-05-15 09:20:09.000000000 +0200
  126726. +++ uClibc-git/test/rpc/Makefile 2014-07-25 20:36:11.681360223 +0200
  126727. @@ -2,6 +2,7 @@
  126728. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  126729. top_builddir=../../
  126730. +top_srcdir=../../
  126731. include ../Rules.mak
  126732. -include Makefile.in
  126733. include ../Test.mak
  126734. diff -Nur uClibc-0.9.33.2/test/Rules.mak uClibc-git/test/Rules.mak
  126735. --- uClibc-0.9.33.2/test/Rules.mak 2012-05-15 09:20:09.000000000 +0200
  126736. +++ uClibc-git/test/Rules.mak 2014-07-25 20:36:10.745355319 +0200
  126737. @@ -8,18 +8,34 @@
  126738. .SUFFIXES:
  126739. top_builddir ?= ../
  126740. +abs_top_builddir ?= $(shell cd $(top_builddir); pwd)/
  126741. TESTDIR=$(top_builddir)test/
  126742. -include $(top_builddir)/Rules.mak
  126743. -ifndef TEST_INSTALLED_UCLIBC
  126744. +include $(top_srcdir)Rules.mak
  126745. +ifeq ($(filter $(clean_targets) CLEAN_%,$(MAKECMDGOALS)),)
  126746. +ifeq ($(HAVE_DOT_CONFIG),)
  126747. +$(error no HAVE_DOT_CONFIG, failed to read .config)
  126748. +endif
  126749. +endif
  126750. +
  126751. ifdef UCLIBC_LDSO
  126752. ifeq (,$(findstring /,$(UCLIBC_LDSO)))
  126753. -UCLIBC_LDSO := $(top_builddir)lib/$(UCLIBC_LDSO)
  126754. +UCLIBC_LDSO := $(UCLIBC_LDSO)
  126755. +else
  126756. +UCLIBC_LDSO := $(notdir $(UCLIBC_LDSO))
  126757. endif
  126758. else
  126759. -UCLIBC_LDSO := $(firstword $(wildcard $(top_builddir)lib/ld*))
  126760. +UCLIBC_LDSO := $(notdir $(firstword $(wildcard $(top_builddir)lib/ld*)))
  126761. endif
  126762. +ifndef TEST_INSTALLED_UCLIBC
  126763. +ifeq ($(LDSO_SAFE_RUNPATH),y)
  126764. +UCLIBC_PATH := $(abs_top_builddir)lib
  126765. +else
  126766. +UCLIBC_PATH := $(top_builddir)lib
  126767. +endif
  126768. +else
  126769. +UCLIBC_PATH := $(RUNTIME_PREFIX)$(MULTILIB_DIR)
  126770. endif
  126771. #--------------------------------------------------------
  126772. # Ensure consistent sort order, 'gcc -print-search-dirs' behavior, etc.
  126773. @@ -81,15 +97,14 @@
  126774. LDFLAGS += -Wl,-static -static-libgcc
  126775. endif
  126776. -LDFLAGS += -B$(top_builddir)lib -Wl,-rpath,$(top_builddir)lib -Wl,-rpath-link,$(top_builddir)lib
  126777. -UCLIBC_LDSO_ABSPATH=$(shell pwd)
  126778. -ifdef TEST_INSTALLED_UCLIBC
  126779. -LDFLAGS += -Wl,-rpath,./
  126780. -UCLIBC_LDSO_ABSPATH=$(RUNTIME_PREFIX)$(MULTILIB_DIR)
  126781. +ifndef TEST_INSTALLED_UCLIBC
  126782. +LDFLAGS += -B$(UCLIBC_PATH) -Wl,-rpath,$(UCLIBC_PATH):$(shell pwd) -Wl,-rpath-link,$(UCLIBC_PATH):$(shell pwd)
  126783. +else
  126784. +LDFLAGS += -Wl,-rpath,$(shell pwd)
  126785. endif
  126786. ifeq ($(findstring -static,$(LDFLAGS)),)
  126787. -LDFLAGS += -Wl,--dynamic-linker,$(UCLIBC_LDSO_ABSPATH)/$(UCLIBC_LDSO)
  126788. +LDFLAGS += -Wl,--dynamic-linker,$(UCLIBC_PATH)/$(UCLIBC_LDSO)
  126789. endif
  126790. ifeq ($(LDSO_GNU_HASH_SUPPORT),y)
  126791. diff -Nur uClibc-0.9.33.2/test/setjmp/bug269-setjmp.c uClibc-git/test/setjmp/bug269-setjmp.c
  126792. --- uClibc-0.9.33.2/test/setjmp/bug269-setjmp.c 2012-05-15 09:20:09.000000000 +0200
  126793. +++ uClibc-git/test/setjmp/bug269-setjmp.c 2014-07-25 20:36:11.689360265 +0200
  126794. @@ -12,9 +12,8 @@
  126795. Lesser General Public License for more details.
  126796. You should have received a copy of the GNU Lesser General Public
  126797. - License along with the GNU C Library; if not, write to the Free
  126798. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126799. - 02111-1307 USA. */ ;
  126800. + License along with the GNU C Library; If not, see
  126801. + <http://www.gnu.org/licenses/>. */
  126802. /* Test case for Bugzilla # 269 */
  126803. diff -Nur uClibc-0.9.33.2/test/setjmp/Makefile uClibc-git/test/setjmp/Makefile
  126804. --- uClibc-0.9.33.2/test/setjmp/Makefile 2012-05-15 09:20:09.000000000 +0200
  126805. +++ uClibc-git/test/setjmp/Makefile 2014-07-25 20:36:11.689360265 +0200
  126806. @@ -2,6 +2,7 @@
  126807. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  126808. top_builddir=../../
  126809. +top_srcdir=../../
  126810. include ../Rules.mak
  126811. -include Makefile.in
  126812. include ../Test.mak
  126813. diff -Nur uClibc-0.9.33.2/test/setjmp/tst-setjmp.c uClibc-git/test/setjmp/tst-setjmp.c
  126814. --- uClibc-0.9.33.2/test/setjmp/tst-setjmp.c 2012-05-15 09:20:09.000000000 +0200
  126815. +++ uClibc-git/test/setjmp/tst-setjmp.c 2014-07-25 20:36:11.689360265 +0200
  126816. @@ -12,9 +12,8 @@
  126817. Lesser General Public License for more details.
  126818. You should have received a copy of the GNU Lesser General Public
  126819. - License along with the GNU C Library; if not, write to the Free
  126820. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126821. - 02111-1307 USA. */
  126822. + License along with the GNU C Library; if not, see
  126823. + <http://www.gnu.org/licenses/>. */
  126824. #include <stdio.h>
  126825. #include <setjmp.h>
  126826. diff -Nur uClibc-0.9.33.2/test/signal/Makefile uClibc-git/test/signal/Makefile
  126827. --- uClibc-0.9.33.2/test/signal/Makefile 2012-05-15 09:20:09.000000000 +0200
  126828. +++ uClibc-git/test/signal/Makefile 2014-07-25 20:36:11.709360369 +0200
  126829. @@ -2,6 +2,7 @@
  126830. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  126831. top_builddir=../../
  126832. +top_srcdir=../../
  126833. include ../Rules.mak
  126834. -include Makefile.in
  126835. include ../Test.mak
  126836. diff -Nur uClibc-0.9.33.2/test/signal/tst-raise.c uClibc-git/test/signal/tst-raise.c
  126837. --- uClibc-0.9.33.2/test/signal/tst-raise.c 2012-05-15 09:20:09.000000000 +0200
  126838. +++ uClibc-git/test/signal/tst-raise.c 2014-07-25 20:36:11.709360369 +0200
  126839. @@ -13,9 +13,8 @@
  126840. Lesser General Public License for more details.
  126841. You should have received a copy of the GNU Lesser General Public
  126842. - License along with the GNU C Library; if not, write to the Free
  126843. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126844. - 02111-1307 USA. */
  126845. + License along with the GNU C Library; if not, see
  126846. + <http://www.gnu.org/licenses/>. */
  126847. #include <errno.h>
  126848. #include <string.h>
  126849. diff -Nur uClibc-0.9.33.2/test/signal/tst-signalfd.c uClibc-git/test/signal/tst-signalfd.c
  126850. --- uClibc-0.9.33.2/test/signal/tst-signalfd.c 1970-01-01 01:00:00.000000000 +0100
  126851. +++ uClibc-git/test/signal/tst-signalfd.c 2014-07-25 20:36:11.709360369 +0200
  126852. @@ -0,0 +1,63 @@
  126853. +/* vi: set sw=4 ts=4 sts=4: */
  126854. +/*
  126855. + * signalfd test for uClibc
  126856. + * Copyright (C) 2012 by Kevin Cernekee <cernekee@gmail.com>
  126857. + *
  126858. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  126859. + */
  126860. +
  126861. +#include <stdio.h>
  126862. +#include <stdlib.h>
  126863. +#include <string.h>
  126864. +#include <unistd.h>
  126865. +#include <errno.h>
  126866. +#include <error.h>
  126867. +#include <signal.h>
  126868. +#include <sys/signalfd.h>
  126869. +#include <sys/fcntl.h>
  126870. +
  126871. +static int
  126872. +do_test(void)
  126873. +{
  126874. + int fd, ret, result = 0;
  126875. + struct signalfd_siginfo ssi;
  126876. + sigset_t mask;
  126877. +
  126878. + sigemptyset(&mask);
  126879. + sigaddset(&mask, SIGUSR1);
  126880. + sigprocmask(SIG_BLOCK, &mask, NULL);
  126881. +
  126882. + fd = signalfd(-1, &mask, SFD_NONBLOCK);
  126883. + if (fd < 0) {
  126884. + printf("signalfd() failed: %s\n", strerror(errno));
  126885. + result = 1;
  126886. + }
  126887. +
  126888. + /* this should return immediately with EAGAIN due to SFD_NONBLOCK */
  126889. + memset(&ssi, 0, sizeof(ssi));
  126890. + ret = read(fd, &ssi, sizeof(ssi));
  126891. + if (ret != -1 || errno != EAGAIN) {
  126892. + error(0, 0, "first read() returned %d", ret);
  126893. + result = 1;
  126894. + }
  126895. +
  126896. + kill(getpid(), SIGUSR1);
  126897. +
  126898. + /* this should return a struct ssi indicating receipt of SIGUSR1 */
  126899. + ret = read(fd, &ssi, sizeof(ssi));
  126900. + if (ret != sizeof(ssi)) {
  126901. + error(0, 0, "second read() returned %d", ret);
  126902. + result = 1;
  126903. + }
  126904. +
  126905. + if (ssi.ssi_signo != SIGUSR1) {
  126906. + error(0, 0, "ssi contains bogus signo");
  126907. + result = 1;
  126908. + }
  126909. +
  126910. + return result;
  126911. +}
  126912. +
  126913. +#define TIMEOUT 5
  126914. +#define TEST_FUNCTION do_test ()
  126915. +#include "../test-skeleton.c"
  126916. diff -Nur uClibc-0.9.33.2/test/signal/tst-sigsimple.c uClibc-git/test/signal/tst-sigsimple.c
  126917. --- uClibc-0.9.33.2/test/signal/tst-sigsimple.c 2012-05-15 09:20:09.000000000 +0200
  126918. +++ uClibc-git/test/signal/tst-sigsimple.c 2014-07-25 20:36:11.709360369 +0200
  126919. @@ -13,9 +13,8 @@
  126920. Lesser General Public License for more details.
  126921. You should have received a copy of the GNU Lesser General Public
  126922. - License along with the GNU C Library; if not, write to the Free
  126923. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126924. - 02111-1307 USA. */
  126925. + License along with the GNU C Library; if not, see
  126926. + <http://www.gnu.org/licenses/>. */
  126927. #include <errno.h>
  126928. #include <signal.h>
  126929. diff -Nur uClibc-0.9.33.2/test/silly/Makefile uClibc-git/test/silly/Makefile
  126930. --- uClibc-0.9.33.2/test/silly/Makefile 2012-05-15 09:20:09.000000000 +0200
  126931. +++ uClibc-git/test/silly/Makefile 2014-07-25 20:36:11.713360391 +0200
  126932. @@ -2,6 +2,7 @@
  126933. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  126934. top_builddir=../../
  126935. +top_srcdir=../../
  126936. include ../Rules.mak
  126937. -include Makefile.in
  126938. include ../Test.mak
  126939. diff -Nur uClibc-0.9.33.2/test/stat/Makefile uClibc-git/test/stat/Makefile
  126940. --- uClibc-0.9.33.2/test/stat/Makefile 2012-05-15 09:20:09.000000000 +0200
  126941. +++ uClibc-git/test/stat/Makefile 2014-07-25 20:36:11.721360432 +0200
  126942. @@ -2,6 +2,7 @@
  126943. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  126944. top_builddir=../../
  126945. +top_srcdir=../../
  126946. include ../Rules.mak
  126947. -include Makefile.in
  126948. include ../Test.mak
  126949. diff -Nur uClibc-0.9.33.2/test/stdio/Makefile uClibc-git/test/stdio/Makefile
  126950. --- uClibc-0.9.33.2/test/stdio/Makefile 2012-05-15 09:20:09.000000000 +0200
  126951. +++ uClibc-git/test/stdio/Makefile 2014-07-25 20:36:11.737360516 +0200
  126952. @@ -2,6 +2,7 @@
  126953. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  126954. top_builddir=../../
  126955. +top_srcdir=../../
  126956. include ../Rules.mak
  126957. -include Makefile.in
  126958. include ../Test.mak
  126959. diff -Nur uClibc-0.9.33.2/test/stdlib/Makefile uClibc-git/test/stdlib/Makefile
  126960. --- uClibc-0.9.33.2/test/stdlib/Makefile 2012-05-15 09:20:09.000000000 +0200
  126961. +++ uClibc-git/test/stdlib/Makefile 2014-07-25 20:36:11.761360643 +0200
  126962. @@ -2,6 +2,7 @@
  126963. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  126964. top_builddir=../../
  126965. +top_srcdir=../../
  126966. include ../Rules.mak
  126967. -include Makefile.in
  126968. include ../Test.mak
  126969. diff -Nur uClibc-0.9.33.2/test/stdlib/testarc4random.c uClibc-git/test/stdlib/testarc4random.c
  126970. --- uClibc-0.9.33.2/test/stdlib/testarc4random.c 1970-01-01 01:00:00.000000000 +0100
  126971. +++ uClibc-git/test/stdlib/testarc4random.c 2014-07-25 20:36:11.761360643 +0200
  126972. @@ -0,0 +1,12 @@
  126973. +#include <stdlib.h>
  126974. +#include <stdio.h>
  126975. +
  126976. +int main(void)
  126977. +{
  126978. +#ifdef __UCLIBC_HAS_ARC4RANDOM__
  126979. + int random_number;
  126980. + random_number = arc4random() % 65536;
  126981. + printf("%d\n", random_number);
  126982. +#endif
  126983. + return 0;
  126984. +}
  126985. diff -Nur uClibc-0.9.33.2/test/stdlib/test-canon2.c uClibc-git/test/stdlib/test-canon2.c
  126986. --- uClibc-0.9.33.2/test/stdlib/test-canon2.c 2012-05-15 09:20:09.000000000 +0200
  126987. +++ uClibc-git/test/stdlib/test-canon2.c 2014-07-25 20:36:11.761360643 +0200
  126988. @@ -14,9 +14,8 @@
  126989. Lesser General Public License for more details.
  126990. You should have received a copy of the GNU Lesser General Public
  126991. - License along with the GNU C Library; if not, write to the Free
  126992. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  126993. - 02111-1307 USA. */
  126994. + License along with the GNU C Library; if not, see
  126995. + <http://www.gnu.org/licenses/>. */
  126996. #include <errno.h>
  126997. #include <string.h>
  126998. diff -Nur uClibc-0.9.33.2/test/stdlib/test-canon.c uClibc-git/test/stdlib/test-canon.c
  126999. --- uClibc-0.9.33.2/test/stdlib/test-canon.c 2012-05-15 09:20:09.000000000 +0200
  127000. +++ uClibc-git/test/stdlib/test-canon.c 2014-07-25 20:36:11.761360643 +0200
  127001. @@ -15,9 +15,8 @@
  127002. Lesser General Public License for more details.
  127003. You should have received a copy of the GNU Lesser General Public
  127004. - License along with the GNU C Library; if not, write to the Free
  127005. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  127006. - 02111-1307 USA. */
  127007. + License along with the GNU C Library; if not, see
  127008. + <http://www.gnu.org/licenses/>. */
  127009. /* This file must be run from within a directory called "stdlib". */
  127010. diff -Nur uClibc-0.9.33.2/test/string/Makefile uClibc-git/test/string/Makefile
  127011. --- uClibc-0.9.33.2/test/string/Makefile 2012-05-15 09:20:09.000000000 +0200
  127012. +++ uClibc-git/test/string/Makefile 2014-07-25 20:36:11.809360893 +0200
  127013. @@ -2,6 +2,7 @@
  127014. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  127015. top_builddir=../../
  127016. +top_srcdir=../../
  127017. include ../Rules.mak
  127018. -include Makefile.in
  127019. include ../Test.mak
  127020. diff -Nur uClibc-0.9.33.2/test/string/stratcliff.c uClibc-git/test/string/stratcliff.c
  127021. --- uClibc-0.9.33.2/test/string/stratcliff.c 2012-05-15 09:20:09.000000000 +0200
  127022. +++ uClibc-git/test/string/stratcliff.c 2014-07-25 20:36:11.809360893 +0200
  127023. @@ -14,9 +14,8 @@
  127024. Lesser General Public License for more details.
  127025. You should have received a copy of the GNU Lesser General Public
  127026. - License along with the GNU C Library; if not, write to the Free
  127027. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  127028. - 02111-1307 USA. */
  127029. + License along with the GNU C Library; if not, see
  127030. + <http://www.gnu.org/licenses/>. */
  127031. #define _GNU_SOURCE 1
  127032. diff -Nur uClibc-0.9.33.2/test/string/testcopy.c uClibc-git/test/string/testcopy.c
  127033. --- uClibc-0.9.33.2/test/string/testcopy.c 2012-05-15 09:20:09.000000000 +0200
  127034. +++ uClibc-git/test/string/testcopy.c 2014-07-25 20:36:11.813360914 +0200
  127035. @@ -13,9 +13,8 @@
  127036. Lesser General Public License for more details.
  127037. You should have received a copy of the GNU Lesser General Public
  127038. - License along with the GNU C Library; if not, write to the Free
  127039. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  127040. - 02111-1307 USA. */
  127041. + License along with the GNU C Library; if not, see
  127042. + <http://www.gnu.org/licenses/>. */
  127043. #include <stdlib.h>
  127044. #include <stdio.h>
  127045. diff -Nur uClibc-0.9.33.2/test/string/tester.c uClibc-git/test/string/tester.c
  127046. --- uClibc-0.9.33.2/test/string/tester.c 2012-05-15 09:20:09.000000000 +0200
  127047. +++ uClibc-git/test/string/tester.c 2014-07-25 20:36:11.813360914 +0200
  127048. @@ -13,9 +13,8 @@
  127049. Lesser General Public License for more details.
  127050. You should have received a copy of the GNU Lesser General Public
  127051. - License along with the GNU C Library; if not, write to the Free
  127052. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  127053. - 02111-1307 USA. */
  127054. + License along with the GNU C Library; if not, see
  127055. + <http://www.gnu.org/licenses/>. */
  127056. #ifndef _GNU_SOURCE
  127057. #define _GNU_SOURCE
  127058. diff -Nur uClibc-0.9.33.2/test/string/test-ffs.c uClibc-git/test/string/test-ffs.c
  127059. --- uClibc-0.9.33.2/test/string/test-ffs.c 2012-05-15 09:20:09.000000000 +0200
  127060. +++ uClibc-git/test/string/test-ffs.c 2014-07-25 20:36:11.813360914 +0200
  127061. @@ -14,9 +14,8 @@
  127062. Lesser General Public License for more details.
  127063. You should have received a copy of the GNU Lesser General Public
  127064. - License along with the GNU C Library; if not, write to the Free
  127065. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  127066. - 02111-1307 USA. */
  127067. + License along with the GNU C Library; if not, see
  127068. + <http://www.gnu.org/licenses/>. */
  127069. #include <stdlib.h>
  127070. #include <stdio.h>
  127071. diff -Nur uClibc-0.9.33.2/test/string/tst-bswap.c uClibc-git/test/string/tst-bswap.c
  127072. --- uClibc-0.9.33.2/test/string/tst-bswap.c 2012-05-15 09:20:09.000000000 +0200
  127073. +++ uClibc-git/test/string/tst-bswap.c 2014-07-25 20:36:11.813360914 +0200
  127074. @@ -13,9 +13,8 @@
  127075. Lesser General Public License for more details.
  127076. You should have received a copy of the GNU Lesser General Public
  127077. - License along with the GNU C Library; if not, write to the Free
  127078. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  127079. - 02111-1307 USA. */
  127080. + License along with the GNU C Library; if not, see
  127081. + <http://www.gnu.org/licenses/>. */
  127082. #include <byteswap.h>
  127083. #include <stdio.h>
  127084. diff -Nur uClibc-0.9.33.2/test/string/tst-inlcall.c uClibc-git/test/string/tst-inlcall.c
  127085. --- uClibc-0.9.33.2/test/string/tst-inlcall.c 2012-05-15 09:20:09.000000000 +0200
  127086. +++ uClibc-git/test/string/tst-inlcall.c 2014-07-25 20:36:11.813360914 +0200
  127087. @@ -13,9 +13,8 @@
  127088. Lesser General Public License for more details.
  127089. You should have received a copy of the GNU Lesser General Public
  127090. - License along with the GNU C Library; if not, write to the Free
  127091. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  127092. - 02111-1307 USA. */
  127093. + License along with the GNU C Library; if not, see
  127094. + <http://www.gnu.org/licenses/>. */
  127095. #ifndef _GNU_SOURCE
  127096. #define _GNU_SOURCE
  127097. diff -Nur uClibc-0.9.33.2/test/termios/Makefile uClibc-git/test/termios/Makefile
  127098. --- uClibc-0.9.33.2/test/termios/Makefile 2012-05-15 09:20:09.000000000 +0200
  127099. +++ uClibc-git/test/termios/Makefile 2014-07-25 20:36:11.825360977 +0200
  127100. @@ -2,6 +2,7 @@
  127101. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  127102. top_builddir=../../
  127103. +top_srcdir=../../
  127104. include ../Rules.mak
  127105. -include Makefile.in
  127106. include ../Test.mak
  127107. diff -Nur uClibc-0.9.33.2/test/Test.mak uClibc-git/test/Test.mak
  127108. --- uClibc-0.9.33.2/test/Test.mak 2012-05-15 09:20:09.000000000 +0200
  127109. +++ uClibc-git/test/Test.mak 2014-07-25 20:36:10.745355319 +0200
  127110. @@ -35,7 +35,9 @@
  127111. CLEAN_TARGETS := $(U_TARGETS) $(G_TARGETS)
  127112. CLEAN_TARGETS += $(TESTS_DISABLED) $(addsuffix _glibc,$(TESTS_DISABLED)) $(GLIBC_TESTS_DISABLED)
  127113. COMPILE_TARGETS := $(TARGETS)
  127114. -RUN_TARGETS := $(addsuffix .exe,$(TARGETS))
  127115. +# We sort the targets so uClibc and host-libc tests are run adjacent
  127116. +RUN_TARGETS := $(sort $(addsuffix .exe,$(TARGETS)))
  127117. +COMPILE_TARGETS := $(sort $(COMPILE_TARGETS))
  127118. # provide build rules even for disabled tests:
  127119. U_TARGETS += $(TESTS_DISABLED)
  127120. G_TARGETS += $(addsuffix _glibc,$(TESTS_DISABLED)) $(GLIBC_TESTS_DISABLED)
  127121. @@ -99,13 +101,15 @@
  127122. $(U_TARGETS): $(U_TARGET_SRCS) $(MAKE_SRCS)
  127123. $(showlink)
  127124. - $(Q)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(notdir $(CURDIR))) $(CFLAGS_$@) -c $@.c -o $@.o
  127125. + $(Q)$(CC) $(filter-out $(CFLAGS-OMIT-$@),$(CFLAGS)) $(EXTRA_CFLAGS) $(CFLAGS_$(notdir $(CURDIR))) $(CFLAGS_$@) -c $@.c -o $@.o
  127126. $(Q)$(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LDFLAGS) $(LDFLAGS_$@)
  127127. $(G_TARGETS): $(U_TARGET_SRCS) $(MAKE_SRCS)
  127128. $(showlink)
  127129. - $(Q)$(HOSTCC) $(HOST_CFLAGS) $(CFLAGS_$(notdir $(CURDIR))) $(CFLAGS_$(patsubst %_glibc,%,$@)) -c $(patsubst %_glibc,%,$@).c -o $@.o
  127130. - $(Q)$(HOSTCC) $(HOST_LDFLAGS) $@.o -o $@ $(EXTRA_LDFLAGS) $(LDFLAGS_$(patsubst %_glibc,%,$@))
  127131. + $(Q)$(HOSTCC) $(filter-out $(HOST_CFLAGS-OMIT-$(patsubst %_glibc,%,$@)),$(HOST_CFLAGS)) \
  127132. + $(CFLAGS_$(notdir $(CURDIR))) $(CFLAGS_$(patsubst %_glibc,%,$@)) \
  127133. + -c $(patsubst %_glibc,%,$@).c -o $@.o
  127134. + $(Q)$(HOSTCC) $(HOST_LDFLAGS) $@.o -o $@ $(EXTRA_LDFLAGS) $(LDFLAGS_$(patsubst %_glibc,%,$@)) $(LDFLAGS_$@)
  127135. shell_%:
  127136. @@ -117,9 +121,11 @@
  127137. %.so: %.c
  127138. $(showlink)
  127139. $(Q)$(CC) \
  127140. - $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(patsubst %_glibc,%,$@)) \
  127141. + $(filter-out $(CFLAGS-OMIT-$<),$(CFLAGS)) $(EXTRA_CFLAGS) \
  127142. + $(CFLAGS_$(patsubst %_glibc,%,$@)) \
  127143. -fPIC -shared $< -o $@ -Wl,-soname,$@ \
  127144. - $(LDFLAGS) $(EXTRA_LIBS) $(LDFLAGS_$(patsubst %_glibc,%,$@))
  127145. + $(filter-out $(LDFLAGS-OMIT-$<),$(LDFLAGS)) $(EXTRA_LIBS) \
  127146. + $(LDFLAGS_$(patsubst %_glibc,%,$@))
  127147. clean:
  127148. $(showclean)
  127149. diff -Nur uClibc-0.9.33.2/test/test-skeleton.c uClibc-git/test/test-skeleton.c
  127150. --- uClibc-0.9.33.2/test/test-skeleton.c 2012-05-15 09:20:09.000000000 +0200
  127151. +++ uClibc-git/test/test-skeleton.c 2014-07-25 20:36:11.825360977 +0200
  127152. @@ -14,9 +14,8 @@
  127153. Lesser General Public License for more details.
  127154. You should have received a copy of the GNU Lesser General Public
  127155. - License along with the GNU C Library; if not, write to the Free
  127156. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  127157. - 02111-1307 USA. */
  127158. + License along with the GNU C Library; if not, see
  127159. + <http://www.gnu.org/licenses/>. */
  127160. #include <errno.h>
  127161. #include <getopt.h>
  127162. @@ -104,7 +103,7 @@
  127163. create_temp_file (const char *base, char **filename)
  127164. {
  127165. char *fname;
  127166. - int fd;
  127167. + int _fd;
  127168. fname = (char *) malloc (strlen (test_dir) + 1 + strlen (base)
  127169. + sizeof ("XXXXXX"));
  127170. @@ -115,8 +114,8 @@
  127171. }
  127172. strcpy (stpcpy (stpcpy (stpcpy (fname, test_dir), "/"), base), "XXXXXX");
  127173. - fd = mkstemp (fname);
  127174. - if (fd == -1)
  127175. + _fd = mkstemp (fname);
  127176. + if (_fd == -1)
  127177. {
  127178. printf ("cannot open temporary file '%s': %s\n", fname, strerror(errno));
  127179. free (fname);
  127180. @@ -127,13 +126,13 @@
  127181. if (filename != NULL)
  127182. *filename = fname;
  127183. - return fd;
  127184. + return _fd;
  127185. }
  127186. /* Timeout handler. We kill the child and exit with an error. */
  127187. static void
  127188. __attribute__ ((noreturn))
  127189. -timeout_handler (int sig __attribute__ ((unused)))
  127190. +signal_handler (int sig __attribute__ ((unused)))
  127191. {
  127192. int killed = 0;
  127193. int status;
  127194. @@ -168,6 +167,12 @@
  127195. CLEANUP_HANDLER;
  127196. #endif
  127197. + if (sig == SIGINT)
  127198. + {
  127199. + signal (sig, SIG_DFL);
  127200. + raise (sig);
  127201. + }
  127202. +
  127203. /* If we expected this signal: good! */
  127204. #ifdef EXPECTED_SIGNAL
  127205. if (EXPECTED_SIGNAL == SIGALRM)
  127206. @@ -190,6 +195,7 @@
  127207. exit (1);
  127208. }
  127209. +#ifdef __XXX_HANDLE_CTRL_C
  127210. static void
  127211. __attribute__ ((noreturn))
  127212. handler_killpid(int sig)
  127213. @@ -199,6 +205,7 @@
  127214. raise(sig); /* kill ourself */
  127215. _exit(128 + sig); /* paranoia */
  127216. }
  127217. +#endif
  127218. /* We provide the entry point here. */
  127219. int
  127220. @@ -345,18 +352,23 @@
  127221. exit (1);
  127222. }
  127223. +#ifdef __XXX_HANDLE_CTRL_C
  127224. signal (SIGTERM, handler_killpid);
  127225. signal (SIGINT, handler_killpid);
  127226. signal (SIGQUIT, handler_killpid);
  127227. +#endif
  127228. /* Set timeout. */
  127229. #ifndef TIMEOUT
  127230. /* Default timeout is two seconds. */
  127231. # define TIMEOUT 2
  127232. #endif
  127233. - signal (SIGALRM, timeout_handler);
  127234. + signal (SIGALRM, signal_handler);
  127235. alarm (TIMEOUT * timeoutfactor);
  127236. + /* Make sure we clean up if the wrapper gets interrupted. */
  127237. + signal (SIGINT, signal_handler);
  127238. +
  127239. /* Wait for the regular termination. */
  127240. termpid = TEMP_FAILURE_RETRY (waitpid (pid, &status, 0));
  127241. if (termpid == -1)
  127242. diff -Nur uClibc-0.9.33.2/test/testsuite.h uClibc-git/test/testsuite.h
  127243. --- uClibc-0.9.33.2/test/testsuite.h 2012-05-15 09:20:09.000000000 +0200
  127244. +++ uClibc-git/test/testsuite.h 2014-07-25 20:36:11.825360977 +0200
  127245. @@ -27,11 +27,12 @@
  127246. {
  127247. failures++;
  127248. - printf("\nFAILED TEST %lu: \n\t%s\n", (unsigned long)test_number, command);
  127249. + printf("\nFAILED TEST %lu: \n\t%s\nResult: %d",
  127250. + (unsigned long)test_number, command, result);
  127251. printf("AT LINE: %d, FILE: %s\n\n", line, file);
  127252. }
  127253. -void success_msg(int result, const char* command)
  127254. +void success_msg(int result __attribute__((unused)), const char* command __attribute__((unused)))
  127255. {
  127256. #if 0
  127257. printf("passed test: %s == 0\n", command);
  127258. diff -Nur uClibc-0.9.33.2/test/time/Makefile uClibc-git/test/time/Makefile
  127259. --- uClibc-0.9.33.2/test/time/Makefile 2012-05-15 09:20:09.000000000 +0200
  127260. +++ uClibc-git/test/time/Makefile 2014-07-25 20:36:11.849361103 +0200
  127261. @@ -2,6 +2,7 @@
  127262. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  127263. top_builddir=../../
  127264. +top_srcdir=../../
  127265. include ../Rules.mak
  127266. -include Makefile.in
  127267. include ../Test.mak
  127268. diff -Nur uClibc-0.9.33.2/test/time/test_time.c uClibc-git/test/time/test_time.c
  127269. --- uClibc-0.9.33.2/test/time/test_time.c 2012-05-15 09:20:09.000000000 +0200
  127270. +++ uClibc-git/test/time/test_time.c 2014-07-25 20:36:11.849361103 +0200
  127271. @@ -12,9 +12,8 @@
  127272. Lesser General Public License for more details.
  127273. You should have received a copy of the GNU Lesser General Public
  127274. - License along with the GNU C Library; if not, write to the Free
  127275. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  127276. - 02111-1307 USA. */
  127277. + License along with the GNU C Library; if not, see
  127278. + <http://www.gnu.org/licenses/>. */
  127279. #include <stdio.h>
  127280. #include <stdlib.h>
  127281. diff -Nur uClibc-0.9.33.2/test/time/tst-strptime.c uClibc-git/test/time/tst-strptime.c
  127282. --- uClibc-0.9.33.2/test/time/tst-strptime.c 2012-05-15 09:20:09.000000000 +0200
  127283. +++ uClibc-git/test/time/tst-strptime.c 2014-07-25 20:36:11.849361103 +0200
  127284. @@ -14,9 +14,8 @@
  127285. Lesser General Public License for more details.
  127286. You should have received a copy of the GNU Lesser General Public
  127287. - License along with the GNU C Library; if not, write to the Free
  127288. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  127289. - 02111-1307 USA. */
  127290. + License along with the GNU C Library; if not, see
  127291. + <http://www.gnu.org/licenses/>. */
  127292. #include <locale.h>
  127293. #include <stdio.h>
  127294. diff -Nur uClibc-0.9.33.2/test/time/tst-timerfd.c uClibc-git/test/time/tst-timerfd.c
  127295. --- uClibc-0.9.33.2/test/time/tst-timerfd.c 1970-01-01 01:00:00.000000000 +0100
  127296. +++ uClibc-git/test/time/tst-timerfd.c 2014-07-25 20:36:11.853361125 +0200
  127297. @@ -0,0 +1,71 @@
  127298. +/* vi: set sw=4 ts=4 sts=4: */
  127299. +/*
  127300. + * timerfd test for uClibc
  127301. + * Copyright (C) 2012 by Kevin Cernekee <cernekee@gmail.com>
  127302. + *
  127303. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  127304. + */
  127305. +
  127306. +#include <stdio.h>
  127307. +#include <stdlib.h>
  127308. +#include <string.h>
  127309. +#include <unistd.h>
  127310. +#include <errno.h>
  127311. +#include <error.h>
  127312. +#include <signal.h>
  127313. +#include <stdint.h>
  127314. +#include <inttypes.h>
  127315. +#include <time.h>
  127316. +#include <sys/timerfd.h>
  127317. +#include <sys/fcntl.h>
  127318. +
  127319. +static int
  127320. +do_test(void)
  127321. +{
  127322. + int fd, ret, result = 0;
  127323. + struct itimerspec s;
  127324. + uint64_t val;
  127325. + time_t start, now;
  127326. +
  127327. + fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK);
  127328. + if (fd < 0) {
  127329. + perror("timerfd() failed");
  127330. + result = 1;
  127331. + }
  127332. + s.it_value.tv_sec = 1;
  127333. + s.it_value.tv_nsec = 0;
  127334. + s.it_interval.tv_sec = 0;
  127335. + s.it_interval.tv_nsec = 0;
  127336. + timerfd_settime(fd, 0, &s, NULL);
  127337. + start = time(NULL);
  127338. +
  127339. + /* this should return immediately with EAGAIN due to TFD_NONBLOCK */
  127340. + ret = read(fd, &val, sizeof(val));
  127341. + if (ret != -1 || errno != EAGAIN) {
  127342. + error(0, 0, "first read() returned %d", ret);
  127343. + result = 1;
  127344. + }
  127345. +
  127346. + /* let the timer expire, then check it again */
  127347. + do {
  127348. + now = time(NULL);
  127349. + } while (now - start < 2);
  127350. +
  127351. + ret = read(fd, &val, sizeof(val));
  127352. + if (ret != sizeof(val)) {
  127353. + error(0, 0, "second read() returned %d", ret);
  127354. + result = 1;
  127355. + }
  127356. +
  127357. + /* we are expecting a single expiration, since it_interval is 0 */
  127358. + if (val != 1) {
  127359. + error(0, 0, "wrong number of expirations: %" PRIx64, val);
  127360. + result = 1;
  127361. + }
  127362. +
  127363. + return result;
  127364. +}
  127365. +
  127366. +#define TIMEOUT 5
  127367. +#define TEST_FUNCTION do_test ()
  127368. +#include "../test-skeleton.c"
  127369. diff -Nur uClibc-0.9.33.2/test/time/tst-timezone.c uClibc-git/test/time/tst-timezone.c
  127370. --- uClibc-0.9.33.2/test/time/tst-timezone.c 2012-05-15 09:20:09.000000000 +0200
  127371. +++ uClibc-git/test/time/tst-timezone.c 2014-07-25 20:36:11.853361125 +0200
  127372. @@ -13,9 +13,8 @@
  127373. Lesser General Public License for more details.
  127374. You should have received a copy of the GNU Lesser General Public
  127375. - License along with the GNU C Library; if not, write to the Free
  127376. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  127377. - 02111-1307 USA. */
  127378. + License along with the GNU C Library; if not, see
  127379. + <http://www.gnu.org/licenses/>. */
  127380. #include <time.h>
  127381. #include <stdio.h>
  127382. diff -Nur uClibc-0.9.33.2/test/tls/Makefile.in uClibc-git/test/tls/Makefile.in
  127383. --- uClibc-0.9.33.2/test/tls/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  127384. +++ uClibc-git/test/tls/Makefile.in 2014-07-25 20:36:11.865361187 +0200
  127385. @@ -102,9 +102,9 @@
  127386. LDFLAGS_tst-tls7 := -ldl
  127387. LDFLAGS_tst-tls8 := -ldl
  127388. LDFLAGS_tst-tls9 := -ldl
  127389. -LDFLAGS_tst-tls10 := -Wl,-rpath-link=. tst-tlsmod8.so
  127390. -LDFLAGS_tst-tls11 := -Wl,-rpath-link=. tst-tlsmod10.so
  127391. -LDFLAGS_tst-tls12 := -Wl,-rpath-link=. tst-tlsmod12.so
  127392. +LDFLAGS_tst-tls10 := -Wl,-rpath-link=. tst-tlsmod8.so tst-tlsmod7.so
  127393. +LDFLAGS_tst-tls11 := -Wl,-rpath-link=. tst-tlsmod9.so tst-tlsmod10.so
  127394. +LDFLAGS_tst-tls12 := -Wl,-rpath-link=. tst-tlsmod11.so tst-tlsmod12.so
  127395. LDFLAGS_tst-tls13 := -ldl -Wl,-rpath-link=.
  127396. LDFLAGS_tst-tls14 := -ldl -Wl,-rpath-link=. tst-tlsmod14a.so
  127397. LDFLAGS_tst-tls15 := -ldl -Wl,-rpath-link=.
  127398. diff -Nur uClibc-0.9.33.2/test/tls/tst-tls6.c uClibc-git/test/tls/tst-tls6.c
  127399. --- uClibc-0.9.33.2/test/tls/tst-tls6.c 2012-05-15 09:20:09.000000000 +0200
  127400. +++ uClibc-git/test/tls/tst-tls6.c 2014-07-25 20:36:11.869361208 +0200
  127401. @@ -38,13 +38,12 @@
  127402. time. The value of the first round is used. */
  127403. #ifdef __UCLIBC__
  127404. if (modid == -1)
  127405. - modid = ((struct link_map *)((struct dyn_elf *)h)->dyn)->l_tls_modid;
  127406. - else if (((struct link_map *)((struct dyn_elf *)h)->dyn)->l_tls_modid
  127407. - != (size_t) modid)
  127408. + modid = ((struct dyn_elf *) h)->dyn->l_tls_modid;
  127409. + else if (((struct dyn_elf *)h)->dyn->l_tls_modid != (size_t) modid)
  127410. {
  127411. printf ("round %d: modid now %zu, initially %d\n",
  127412. i,
  127413. - ((struct link_map *)((struct dyn_elf *)h)->dyn)->l_tls_modid,
  127414. + ((struct dyn_elf *)h)->dyn->l_tls_modid,
  127415. modid);
  127416. result = 1;
  127417. }
  127418. diff -Nur uClibc-0.9.33.2/test/tls/tst-tls7.c uClibc-git/test/tls/tst-tls7.c
  127419. --- uClibc-0.9.33.2/test/tls/tst-tls7.c 2012-05-15 09:20:09.000000000 +0200
  127420. +++ uClibc-git/test/tls/tst-tls7.c 2014-07-25 20:36:11.869361208 +0200
  127421. @@ -36,13 +36,12 @@
  127422. time. The value of the first round is used. */
  127423. #ifdef __UCLIBC__
  127424. if (modid == -1)
  127425. - modid = ((struct link_map *)((struct dyn_elf *)h)->dyn)->l_tls_modid;
  127426. - else if (((struct link_map *)((struct dyn_elf *)h)->dyn)->l_tls_modid
  127427. - != (size_t) modid)
  127428. + modid = ((struct dyn_elf *) h)->dyn->l_tls_modid;
  127429. + else if (((struct dyn_elf *)h)->dyn->l_tls_modid != (size_t) modid)
  127430. {
  127431. printf ("round %d: modid now %zu, initially %d\n",
  127432. i,
  127433. - ((struct link_map *)((struct dyn_elf *)h)->dyn)->l_tls_modid,
  127434. + ((struct dyn_elf *)h)->dyn->l_tls_modid,
  127435. modid);
  127436. result = 1;
  127437. }
  127438. diff -Nur uClibc-0.9.33.2/test/tls/tst-tls8.c uClibc-git/test/tls/tst-tls8.c
  127439. --- uClibc-0.9.33.2/test/tls/tst-tls8.c 2012-05-15 09:20:09.000000000 +0200
  127440. +++ uClibc-git/test/tls/tst-tls8.c 2014-07-25 20:36:11.869361208 +0200
  127441. @@ -41,13 +41,12 @@
  127442. time. The value of the first round is used. */
  127443. #ifdef __UCLIBC__
  127444. if (modid1 == (size_t) -1)
  127445. - modid1 = ((struct link_map *)((struct dyn_elf *)h1)->dyn)->l_tls_modid;
  127446. - else if (((struct link_map *)((struct dyn_elf *)h1)->dyn)->l_tls_modid
  127447. - != (size_t) modid1)
  127448. + modid1 = ((struct dyn_elf *) h1)->dyn->l_tls_modid;
  127449. + else if (((struct dyn_elf *)h1)->dyn->l_tls_modid != (size_t) modid1)
  127450. {
  127451. printf ("round %d: modid now %zd, initially %zd\n",
  127452. i,
  127453. - ((struct link_map *)((struct dyn_elf *)h1)->dyn)->l_tls_modid,
  127454. + ((struct dyn_elf *)h1)->dyn->l_tls_modid,
  127455. modid1);
  127456. result = 1;
  127457. }
  127458. @@ -85,23 +84,23 @@
  127459. time. The value of the first round is used. */
  127460. #ifdef __UCLIBC__
  127461. if (modid2 == (size_t) -1)
  127462. - modid2 = ((struct link_map *)((struct dyn_elf *)h1)->dyn)->l_tls_modid;
  127463. - else if (((struct link_map *)((struct dyn_elf *)h1)->dyn)->l_tls_modid
  127464. + modid2 = ((struct dyn_elf *)h2)->dyn->l_tls_modid;
  127465. + else if (((struct dyn_elf *)h2)->dyn->l_tls_modid
  127466. != (size_t) modid2)
  127467. {
  127468. printf ("round %d: modid now %zd, initially %zd\n",
  127469. i,
  127470. - ((struct link_map *)((struct dyn_elf *)h1)->dyn)->l_tls_modid,
  127471. + ((struct dyn_elf *)h2)->dyn->l_tls_modid,
  127472. modid2);
  127473. result = 1;
  127474. }
  127475. #else
  127476. if (modid2 == (size_t) -1)
  127477. - modid2 = ((struct link_map *) h1)->l_tls_modid;
  127478. - else if (((struct link_map *) h1)->l_tls_modid != modid2)
  127479. + modid2 = ((struct link_map *) h2)->l_tls_modid;
  127480. + else if (((struct link_map *) h2)->l_tls_modid != modid2)
  127481. {
  127482. printf ("round %d: modid now %zd, initially %zd\n",
  127483. - i, ((struct link_map *) h1)->l_tls_modid, modid2);
  127484. + i, ((struct link_map *) h2)->l_tls_modid, modid2);
  127485. result = 1;
  127486. }
  127487. #endif
  127488. @@ -139,12 +138,12 @@
  127489. We make sure that the module gets assigned the same ID every
  127490. time. The value of the first round is used. */
  127491. #ifdef __UCLIBC__
  127492. - if (((struct link_map *)((struct dyn_elf *)h1)->dyn)->l_tls_modid
  127493. + if (((struct dyn_elf *)h1)->dyn->l_tls_modid
  127494. != modid1)
  127495. {
  127496. printf ("round %d: modid now %zd, initially %zd\n",
  127497. i,
  127498. - ((struct link_map *)((struct dyn_elf *)h1)->dyn)->l_tls_modid,
  127499. + ((struct dyn_elf *)h1)->dyn->l_tls_modid,
  127500. modid1);
  127501. result = 1;
  127502. }
  127503. @@ -179,20 +178,20 @@
  127504. We make sure that the module gets assigned the same ID every
  127505. time. The value of the first round is used. */
  127506. #ifdef __UCLIBC__
  127507. - if (((struct link_map *)((struct dyn_elf *)h1)->dyn)->l_tls_modid
  127508. + if (((struct dyn_elf *)h2)->dyn->l_tls_modid
  127509. != modid2)
  127510. {
  127511. printf ("round %d: modid now %zd, initially %zd\n",
  127512. i,
  127513. - ((struct link_map *)((struct dyn_elf *)h1)->dyn)->l_tls_modid,
  127514. + ((struct dyn_elf *)h2)->dyn->l_tls_modid,
  127515. modid2);
  127516. result = 1;
  127517. }
  127518. #else
  127519. - if (((struct link_map *) h1)->l_tls_modid != modid2)
  127520. + if (((struct link_map *) h2)->l_tls_modid != modid2)
  127521. {
  127522. printf ("round %d: modid now %zd, initially %zd\n",
  127523. - i, ((struct link_map *) h1)->l_tls_modid, modid2);
  127524. + i, ((struct link_map *) h2)->l_tls_modid, modid2);
  127525. result = 1;
  127526. }
  127527. #endif
  127528. diff -Nur uClibc-0.9.33.2/test/unistd/Makefile uClibc-git/test/unistd/Makefile
  127529. --- uClibc-0.9.33.2/test/unistd/Makefile 2012-05-15 09:20:09.000000000 +0200
  127530. +++ uClibc-git/test/unistd/Makefile 2014-07-25 20:36:11.869361208 +0200
  127531. @@ -2,6 +2,7 @@
  127532. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  127533. top_builddir=../../
  127534. +top_srcdir=../../
  127535. include ../Rules.mak
  127536. -include Makefile.in
  127537. include ../Test.mak
  127538. diff -Nur uClibc-0.9.33.2/test/unistd/Makefile.in uClibc-git/test/unistd/Makefile.in
  127539. --- uClibc-0.9.33.2/test/unistd/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  127540. +++ uClibc-git/test/unistd/Makefile.in 2014-07-25 20:36:11.869361208 +0200
  127541. @@ -2,7 +2,10 @@
  127542. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  127543. ifeq ($(UCLIBC_HAS_LFS),)
  127544. -TESTS_DISABLED := tst-preadwrite64
  127545. +TESTS_DISABLED := tst-preadwrite64 tst-posix_fallocate64
  127546. +endif
  127547. +ifeq ($(UCLIBC_HAS_ADVANCED_REALTIME),)
  127548. +TESTS_DISABLED += tst-posix_fallocate
  127549. endif
  127550. OPTS_getopt := -abcXXX -9
  127551. OPTS_getopt_long := --add XXX --delete YYY --verbose
  127552. diff -Nur uClibc-0.9.33.2/test/unistd/tst-posix_fallocate64.c uClibc-git/test/unistd/tst-posix_fallocate64.c
  127553. --- uClibc-0.9.33.2/test/unistd/tst-posix_fallocate64.c 1970-01-01 01:00:00.000000000 +0100
  127554. +++ uClibc-git/test/unistd/tst-posix_fallocate64.c 2014-07-25 20:36:11.869361208 +0200
  127555. @@ -0,0 +1,2 @@
  127556. +#define TST_POSIX_FALLOCATE64
  127557. +#include "tst-posix_fallocate.c"
  127558. diff -Nur uClibc-0.9.33.2/test/unistd/tst-posix_fallocate.c uClibc-git/test/unistd/tst-posix_fallocate.c
  127559. --- uClibc-0.9.33.2/test/unistd/tst-posix_fallocate.c 1970-01-01 01:00:00.000000000 +0100
  127560. +++ uClibc-git/test/unistd/tst-posix_fallocate.c 2014-07-25 20:36:11.869361208 +0200
  127561. @@ -0,0 +1,127 @@
  127562. +#include <fcntl.h>
  127563. +#include <sys/stat.h>
  127564. +
  127565. +#ifndef TST_POSIX_FALLOCATE64
  127566. +# define stat64 stat
  127567. +# define fstat64 fstat
  127568. +# else
  127569. +# ifndef O_LARGEFILE
  127570. +# error no O_LARGEFILE but you want to test with LFS enabled
  127571. +# endif
  127572. +#endif
  127573. +
  127574. +static void do_prepare (void);
  127575. +#define PREPARE(argc, argv) do_prepare ()
  127576. +static int do_test (void);
  127577. +#define TEST_FUNCTION do_test ()
  127578. +#include <test-skeleton.c>
  127579. +
  127580. +static int fd;
  127581. +static void
  127582. +do_prepare (void)
  127583. +{
  127584. + fd = create_temp_file ("tst-posix_fallocate.", NULL);
  127585. + if (fd == -1)
  127586. + {
  127587. + printf ("cannot create temporary file: %m\n");
  127588. + exit (1);
  127589. + }
  127590. +}
  127591. +
  127592. +
  127593. +static int
  127594. +do_test (void)
  127595. +{
  127596. + struct stat64 st;
  127597. +
  127598. + if (fstat64 (fd, &st) != 0)
  127599. + {
  127600. + puts ("1st fstat failed");
  127601. + return 1;
  127602. + }
  127603. +
  127604. + if (st.st_size != 0)
  127605. + {
  127606. + puts ("file not created with size 0");
  127607. + return 1;
  127608. + }
  127609. +
  127610. + if (posix_fallocate (fd, 512, 768) != 0)
  127611. + {
  127612. + puts ("1st posix_fallocate call failed");
  127613. + return 1;
  127614. + }
  127615. +
  127616. + if (fstat64 (fd, &st) != 0)
  127617. + {
  127618. + puts ("2nd fstat failed");
  127619. + return 1;
  127620. + }
  127621. +
  127622. + if (st.st_size != 512 + 768)
  127623. + {
  127624. + printf ("file size after 1st posix_fallocate call is %llu, expected %u\n",
  127625. + (unsigned long long int) st.st_size, 512u + 768u);
  127626. + return 1;
  127627. + }
  127628. +
  127629. + if (posix_fallocate (fd, 0, 1024) != 0)
  127630. + {
  127631. + puts ("2nd posix_fallocate call failed");
  127632. + return 1;
  127633. + }
  127634. +
  127635. + if (fstat64 (fd, &st) != 0)
  127636. + {
  127637. + puts ("3rd fstat failed");
  127638. + return 1;
  127639. + }
  127640. +
  127641. + if (st.st_size != 512 + 768)
  127642. + {
  127643. + puts ("file size changed in 2nd posix_fallocate");
  127644. + return 1;
  127645. + }
  127646. +
  127647. + if (posix_fallocate (fd, 2048, 64) != 0)
  127648. + {
  127649. + puts ("3rd posix_fallocate call failed");
  127650. + return 1;
  127651. + }
  127652. +
  127653. + if (fstat64 (fd, &st) != 0)
  127654. + {
  127655. + puts ("4th fstat failed");
  127656. + return 1;
  127657. + }
  127658. +
  127659. + if (st.st_size != 2048 + 64)
  127660. + {
  127661. + printf ("file size after 3rd posix_fallocate call is %llu, expected %u\n",
  127662. + (unsigned long long int) st.st_size, 2048u + 64u);
  127663. + return 1;
  127664. + }
  127665. +#ifdef TST_POSIX_FALLOCATE64
  127666. + if (posix_fallocate64 (fd, 4097ULL, 4294967295ULL + 2ULL) != 0)
  127667. + {
  127668. + puts ("4th posix_fallocate call failed");
  127669. + return 1;
  127670. + }
  127671. +
  127672. + if (fstat64 (fd, &st) != 0)
  127673. + {
  127674. + puts ("5th fstat failed");
  127675. + return 1;
  127676. + }
  127677. +
  127678. + if (st.st_size != 4097ULL + 4294967295ULL + 2ULL)
  127679. + {
  127680. + printf ("file size after 4th posix_fallocate call is %llu, expected %llu\n",
  127681. + (unsigned long long int) st.st_size, 4097ULL + 4294967295ULL + 2ULL);
  127682. + return 1;
  127683. + }
  127684. +#endif
  127685. + close (fd);
  127686. +
  127687. + return 0;
  127688. +}
  127689. diff -Nur uClibc-0.9.33.2/test/unistd/tst-preadwrite64.c uClibc-git/test/unistd/tst-preadwrite64.c
  127690. --- uClibc-0.9.33.2/test/unistd/tst-preadwrite64.c 2012-05-15 09:20:09.000000000 +0200
  127691. +++ uClibc-git/test/unistd/tst-preadwrite64.c 2014-07-25 20:36:11.869361208 +0200
  127692. @@ -14,9 +14,8 @@
  127693. Lesser General Public License for more details.
  127694. You should have received a copy of the GNU Lesser General Public
  127695. - License along with the GNU C Library; if not, write to the Free
  127696. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  127697. - 02111-1307 USA. */
  127698. + License along with the GNU C Library; if not, see
  127699. + <http://www.gnu.org/licenses/>. */
  127700. #define PREAD pread64
  127701. #define PWRITE pwrite64
  127702. diff -Nur uClibc-0.9.33.2/test/unistd/tst-preadwrite.c uClibc-git/test/unistd/tst-preadwrite.c
  127703. --- uClibc-0.9.33.2/test/unistd/tst-preadwrite.c 2012-05-15 09:20:09.000000000 +0200
  127704. +++ uClibc-git/test/unistd/tst-preadwrite.c 2014-07-25 20:36:11.869361208 +0200
  127705. @@ -14,9 +14,8 @@
  127706. Lesser General Public License for more details.
  127707. You should have received a copy of the GNU Lesser General Public
  127708. - License along with the GNU C Library; if not, write to the Free
  127709. - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  127710. - 02111-1307 USA. */
  127711. + License along with the GNU C Library; if not, see
  127712. + <http://www.gnu.org/licenses/>. */
  127713. #include <errno.h>
  127714. #include <error.h>
  127715. diff -Nur uClibc-0.9.33.2/TODO uClibc-git/TODO
  127716. --- uClibc-0.9.33.2/TODO 2012-05-15 09:20:09.000000000 +0200
  127717. +++ uClibc-git/TODO 2014-07-25 20:36:04.409322131 +0200
  127718. @@ -88,6 +88,11 @@
  127719. *) Cleanup/scrub all the Makefile copyright junk
  127720. *) Fix dlopen, for both static and dynamic cases, and make it
  127721. fully comply with SuSv3
  127722. + *) check if sched_getcpu is only pulled in where it should be
  127723. + *) remove HANDLE_OLDER_RLIMIT, NEW_GETRLIMIT (conditionalize on
  127724. + ugetrlimit, it seems, else use the modern variant)
  127725. + *) simplify exec*() in the light of execvpe (perhaps single internal
  127726. + impl); USE_GNU for execvpe (and other GNU extensions, see psm).
  127727. TODO list for AFTER the uClibc 1.0.0 release:
  127728. @@ -180,3 +185,4 @@
  127729. b) Write a space-efficient gettext substitute, to avoid storing large amounts
  127730. of redundant data.
  127731. +
  127732. diff -Nur uClibc-0.9.33.2/utils/chroot_realpath.c uClibc-git/utils/chroot_realpath.c
  127733. --- uClibc-0.9.33.2/utils/chroot_realpath.c 2012-05-15 09:20:09.000000000 +0200
  127734. +++ uClibc-git/utils/chroot_realpath.c 2014-07-25 20:36:11.877361249 +0200
  127735. @@ -14,8 +14,7 @@
  127736. *
  127737. * You should have received a copy of the GNU Lesser General Public
  127738. * License along with this library; see the file COPYING.LIB. If not,
  127739. - * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  127740. - * Boston, MA 02111-1307, USA.
  127741. + * see <http://www.gnu.org/licenses/>.
  127742. *
  127743. * 2005/09/12: Dan Howell (modified from realpath.c to emulate chroot)
  127744. */
  127745. diff -Nur uClibc-0.9.33.2/utils/getconf.c uClibc-git/utils/getconf.c
  127746. --- uClibc-0.9.33.2/utils/getconf.c 2012-05-15 09:20:09.000000000 +0200
  127747. +++ uClibc-git/utils/getconf.c 2014-07-25 20:36:11.877361249 +0200
  127748. @@ -12,10 +12,10 @@
  127749. GNU General Public License for more details.
  127750. You should have received a copy of the GNU General Public License
  127751. - along with this program; if not, write to the Free Software Foundation,
  127752. - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  127753. + along with this program; if not, see <http://www.gnu.org/licenses/>. */
  127754. #define _GNU_SOURCE 1
  127755. +#include "porting.h"
  127756. #include <unistd.h>
  127757. #include <errno.h>
  127758. #include <string.h>
  127759. @@ -1052,13 +1052,11 @@
  127760. };
  127761. static const int nspecs = sizeof (specs) / sizeof (specs[0]);
  127762. -#ifdef __UCLIBC_HAS___PROGNAME__
  127763. -extern const char *__progname;
  127764. -#else
  127765. -#define __progname "foo"
  127766. +#ifndef __UCLIBC_HAS___PROGNAME__
  127767. +static const char *__progname = "getconf";
  127768. #endif
  127769. -static void
  127770. +static attribute_noreturn void
  127771. usage (void)
  127772. {
  127773. fprintf (stderr,
  127774. @@ -1070,7 +1068,7 @@
  127775. }
  127776. -static void
  127777. +static attribute_noreturn void
  127778. print_all (const char *path)
  127779. {
  127780. register const struct conf *c;
  127781. diff -Nur uClibc-0.9.33.2/utils/iconv.c uClibc-git/utils/iconv.c
  127782. --- uClibc-0.9.33.2/utils/iconv.c 2012-05-15 09:20:09.000000000 +0200
  127783. +++ uClibc-git/utils/iconv.c 2014-07-25 20:36:11.877361249 +0200
  127784. @@ -12,8 +12,8 @@
  127785. * Library General Public License for more details.
  127786. *
  127787. * You should have received a copy of the GNU Library General Public
  127788. - * License along with this library; if not, write to the Free
  127789. - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  127790. + * License along with this library; if not, see
  127791. + * <http://www.gnu.org/licenses/>.
  127792. */
  127793. /* ATTENTION! ATTENTION! ATTENTION! ATTENTION! ATTENTION!
  127794. @@ -98,15 +98,22 @@
  127795. * Manuel
  127796. */
  127797. +/* keep libgen before string.h - and porting.h to use the
  127798. + * XPG version of basename */
  127799. +#include <libgen.h>
  127800. #include "porting.h"
  127801. #include <string.h>
  127802. #include <iconv.h>
  127803. #include <stdarg.h>
  127804. -#include <libgen.h>
  127805. #include <wchar.h>
  127806. #include "wchar.c" /* for _UC_iconv_t and __iconv_codesets */
  127807. -extern const unsigned char __iconv_codesets[];
  127808. +#ifdef L_iconv_main
  127809. +static
  127810. +#else
  127811. +extern
  127812. +#endif
  127813. +const unsigned char __iconv_codesets[];
  127814. #define IBUF BUFSIZ
  127815. #define OBUF BUFSIZ
  127816. diff -Nur uClibc-0.9.33.2/utils/ldconfig.c uClibc-git/utils/ldconfig.c
  127817. --- uClibc-0.9.33.2/utils/ldconfig.c 2012-05-15 09:20:09.000000000 +0200
  127818. +++ uClibc-git/utils/ldconfig.c 2014-07-25 20:36:11.877361249 +0200
  127819. @@ -57,8 +57,6 @@
  127820. /* Code indicating core file. */
  127821. #define CMAGIC 0421
  127822. -char *___strtok = NULL;
  127823. -
  127824. char *prog = NULL;
  127825. int debug = 0; /* debug mode */
  127826. int verbose = 0; /* verbose mode */
  127827. @@ -96,6 +94,7 @@
  127828. extern char *chroot_realpath(const char *chroot, const char *path,
  127829. char resolved_path[]);
  127830. +#if defined __UCLIBC_STATIC_LDCONFIG__ || !defined __UCLIBC_HAS_BSD_ERR__
  127831. /* These two are used internally -- you shouldn't need to use them */
  127832. static void verror_msg(const char *s, va_list p)
  127833. {
  127834. @@ -114,8 +113,7 @@
  127835. fprintf(stderr, "\n");
  127836. }
  127837. -static void err(int errnum, const char *s, ...) attribute_noreturn;
  127838. -static void err(int errnum, const char *s, ...)
  127839. +static attribute_noreturn void err(int errnum, const char *s, ...)
  127840. {
  127841. va_list p;
  127842. @@ -146,6 +144,9 @@
  127843. vperror_msg(s, p);
  127844. va_end(p);
  127845. }
  127846. +#else
  127847. +# include <err.h>
  127848. +#endif
  127849. static void *xmalloc(size_t size)
  127850. {
  127851. @@ -257,10 +258,10 @@
  127852. && N_MAGIC_SWAP(exec) != QMAGIC) {
  127853. elf_hdr = (ElfW(Ehdr) *) & exec;
  127854. if (elf_hdr->e_ident[0] != 0x7f ||
  127855. - strncmp((char *)elf_hdr->e_ident + 1, "ELF", 3) != 0)
  127856. + strncmp((const char *)elf_hdr->e_ident + 1, "ELF", 3) != 0)
  127857. {
  127858. /* silently ignore linker scripts */
  127859. - if (strncmp((char *)&exec, "/* GNU ld", 9) != 0)
  127860. + if (strncmp((const char *)&exec, "/* GNU ld", 9) != 0)
  127861. warnx("%s is not a shared library, skipping", buff);
  127862. } else {
  127863. /* always call readsoname to update type */
  127864. @@ -282,7 +283,7 @@
  127865. /* if the soname does not match the filename,
  127866. issue a warning, but only in debug mode. */
  127867. int len = strlen(good);
  127868. - if (debug && (strncmp(good, name, len) != 0
  127869. + if (debug && (strncmp((const char *)good, name, len) != 0
  127870. || (name[len] != '\0' && name[len] != '.')))
  127871. warnx("%s has inconsistent soname (%s)", buff, good);
  127872. }
  127873. @@ -784,8 +785,7 @@
  127874. }
  127875. #endif
  127876. -static void usage(void) attribute_noreturn;
  127877. -static void usage(void)
  127878. +static attribute_noreturn void usage(void)
  127879. {
  127880. fprintf(stderr,
  127881. #ifdef __LDSO_CACHE_SUPPORT__
  127882. diff -Nur uClibc-0.9.33.2/utils/ldd.c uClibc-git/utils/ldd.c
  127883. --- uClibc-0.9.33.2/utils/ldd.c 2012-05-15 09:20:09.000000000 +0200
  127884. +++ uClibc-git/utils/ldd.c 2014-07-25 20:36:11.877361249 +0200
  127885. @@ -20,6 +20,11 @@
  127886. #define ELFCLASSM ELFCLASS64
  127887. #endif
  127888. +#if defined(__arc__)
  127889. +#define MATCH_MACHINE(x) (x == EM_ARCOMPACT)
  127890. +#define ELFCLASSM ELFCLASS32
  127891. +#endif
  127892. +
  127893. #if defined(__arm__) || defined(__thumb__)
  127894. #define MATCH_MACHINE(x) (x == EM_ARM)
  127895. #define ELFCLASSM ELFCLASS32
  127896. @@ -63,6 +68,11 @@
  127897. #define ELFCLASSM ELFCLASS32
  127898. #endif
  127899. +#if defined(__metag__)
  127900. +#define MATCH_MACHINE(x) (x == EM_METAG)
  127901. +#define ELFCLASSM ELFCLASS32
  127902. +#endif
  127903. +
  127904. #if defined(__mips__)
  127905. #define MATCH_MACHINE(x) (x == EM_MIPS || x == EM_MIPS_RS3_LE)
  127906. #define ELFCLASSM ELFCLASS32
  127907. @@ -106,6 +116,11 @@
  127908. #define ELFCLASSM ELFCLASS32
  127909. #endif
  127910. +#if defined(__xtensa__)
  127911. +#define MATCH_MACHINE(x) (x == EM_XTENSA)
  127912. +#define ELFCLASSM ELFCLASS32
  127913. +#endif
  127914. +
  127915. #ifndef MATCH_MACHINE
  127916. # ifdef __linux__
  127917. # include <asm/elf.h>
  127918. @@ -127,7 +142,6 @@
  127919. #define ELFDATAM ELFDATA2MSB
  127920. #endif
  127921. -#define ARRAY_SIZE(v) (sizeof(v) / sizeof(*v))
  127922. #define TRUSTED_LDSO UCLIBC_RUNTIME_PREFIX "lib/" UCLIBC_LDSO
  127923. struct library {
  127924. @@ -145,7 +159,7 @@
  127925. static __inline__ uint32_t byteswap32_to_host(uint32_t value)
  127926. {
  127927. - if (byteswap == 1) {
  127928. + if (byteswap) {
  127929. return (bswap_32(value));
  127930. } else {
  127931. return (value);
  127932. @@ -153,7 +167,7 @@
  127933. }
  127934. static __inline__ uint64_t byteswap64_to_host(uint64_t value)
  127935. {
  127936. - if (byteswap == 1) {
  127937. + if (byteswap) {
  127938. return (bswap_64(value));
  127939. } else {
  127940. return (value);
  127941. @@ -232,14 +246,7 @@
  127942. }
  127943. /* Check if the target endianness matches the host's endianness */
  127944. - byteswap = 0;
  127945. - if (UCLIBC_ENDIAN_HOST == UCLIBC_ENDIAN_LITTLE) {
  127946. - if (ehdr->e_ident[5] == ELFDATA2MSB)
  127947. - byteswap = 1;
  127948. - } else if (UCLIBC_ENDIAN_HOST == UCLIBC_ENDIAN_BIG) {
  127949. - if (ehdr->e_ident[5] == ELFDATA2LSB)
  127950. - byteswap = 1;
  127951. - }
  127952. + byteswap = !(ehdr->e_ident[5] == ELFDATAM);
  127953. /* Be very lazy, and only byteswap the stuff we use */
  127954. if (byteswap) {
  127955. @@ -707,6 +714,7 @@
  127956. };
  127957. # ifdef __LDSO_STANDALONE_SUPPORT__
  127958. char * lib_path = getenv("LD_LIBRARY_PATH");
  127959. +
  127960. /* The 'extended' environment inclusing the LD_LIBRARY_PATH */
  127961. static char *ext_environment[ARRAY_SIZE(environment) + 1];
  127962. char **envp = (char **) environment;
  127963. diff -Nur uClibc-0.9.33.2/utils/Makefile.in uClibc-git/utils/Makefile.in
  127964. --- uClibc-0.9.33.2/utils/Makefile.in 2012-05-15 09:20:09.000000000 +0200
  127965. +++ uClibc-git/utils/Makefile.in 2014-07-25 20:36:11.877361249 +0200
  127966. @@ -10,6 +10,7 @@
  127967. CFLAGS-utils := \
  127968. $(SSP_ALL_CFLAGS) \
  127969. + -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) \
  127970. -I$(top_srcdir)ldso/include \
  127971. -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
  127972. -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" \
  127973. @@ -36,8 +37,7 @@
  127974. # Need CFLAGS-utils explicitly, because the source file is not located in utils
  127975. CFLAGS-iconv := $(CFLAGS-utils) \
  127976. $(CFLAGS-utils-shared) \
  127977. - -I$(top_srcdir)libc/misc/wchar \
  127978. - -DL_iconv_main \
  127979. + -I$(top_srcdir)libc/misc/wchar
  127980. CFLAGS-locale := $(CFLAGS-utils)
  127981. CFLAGS-getconf :=$(CFLAGS-utils) \
  127982. @@ -56,9 +56,11 @@
  127983. $(UTILS_CONFIG_FLAGS-y)
  127984. BUILD_CFLAGS-ldconfig.host := \
  127985. -DBUILDING_LINKAGE \
  127986. + -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) \
  127987. -I$(top_srcdir)ldso/include
  127988. BUILD_CFLAGS-ldd.host := \
  127989. -DBUILDING_LINKAGE \
  127990. + -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) \
  127991. -I$(top_srcdir)ldso/include \
  127992. -include $(top_srcdir)include/elf.h
  127993. BUILD_CFLAGS-locale.host := \